@wangeditor-next/editor 5.6.33 → 5.6.35
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/LICENSE +21 -0
- package/dist/core/src/config/interface.d.ts +1 -0
- package/dist/core/src/editor/interface.d.ts +2 -0
- package/dist/core/src/utils/weak-maps.d.ts +8 -6
- package/dist/css/style.css +787 -8
- package/dist/index.js +49264 -28
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -20
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var e,t,n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function E(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}function C(){return t?e:(t=1,e=function(e){try{return!!e()}catch(e){return!0}})}function D(){if(r)return n;r=1;var e=C();return n=!e((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function w(){if(i)return o;i=1;var e=D(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return o=e?r:function(e){return function(){return n.apply(e,arguments)}},o}function A(){if(s)return a;s=1;var e=w(),t=e({}.toString),n=e("".slice);return a=function(e){return n(t(e),8,-1)}}function S(){if(l)return u;l=1;var e=w(),t=C(),n=A(),r=Object,o=e("".split);return u=t((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function x(){return d?c:(d=1,c=function(e){return null==e})}function O(){if(p)return f;p=1;var e=x(),t=TypeError;return f=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function N(){if(g)return h;g=1;var e=S(),t=O();return h=function(n){return e(t(n))}}function B(){if(m)return v;m=1;var e=function(e){return e&&e.Math===Math&&e};return v=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof y&&y)||e("object"==typeof v&&v)||function(){return this}()||Function("return this")()}var T,k,F,I,P,L,R,_,M,j,H,z,$,U,V,G,W,q,K,Y,X,Z,J,Q,ee,te,ne,re,oe,ie={exports:{}};function ae(){return k?T:(k=1,T=!1)}function se(){if(I)return F;I=1;var e=B(),t=Object.defineProperty;return F=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function ue(){if(P)return ie.exports;P=1;var e=ae(),t=B(),n=se(),r="__core-js_shared__",o=ie.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:e?"pure":"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"}),ie.exports}function le(){if(R)return L;R=1;var e=ue();return L=function(t,n){return e[t]||(e[t]=n||{})}}function ce(){if(M)return _;M=1;var e=O(),t=Object;return _=function(n){return t(e(n))}}function de(){if(H)return j;H=1;var e=w(),t=ce(),n=e({}.hasOwnProperty);return j=Object.hasOwn||function(e,r){return n(t(e),r)}}function fe(){if($)return z;$=1;var e=w(),t=0,n=Math.random(),r=e(1..toString);return z=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function pe(){if(W)return G;W=1;var e,t,n=B(),r=function(){if(V)return U;V=1;var e=B().navigator,t=e&&e.userAgent;return U=t?String(t):""}(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),G=t}function he(){if(K)return q;K=1;var e=pe(),t=C(),n=B().String;return q=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})),q}function ge(){if(X)return Y;X=1;var e=he();return Y=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function ve(){if(J)return Z;J=1;var e=B(),t=le(),n=de(),r=fe(),o=he(),i=ge(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return Z=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function me(){if(ee)return Q;ee=1;var e="object"==typeof document&&document.all;return Q=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function ye(){if(ne)return te;ne=1;var e=me();return te=function(t){return"object"==typeof t?null!==t:e(t)}}function be(){if(oe)return re;oe=1;var e=ye(),t=String,n=TypeError;return re=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}var Ee,Ce,De,we,Ae={};function Se(){if(Ce)return Ee;Ce=1;var e=C();return Ee=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function xe(){if(we)return De;we=1;var e=Se(),t=C();return De=e&&t((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}var Oe,Ne,Be,Te,ke,Fe,Ie,Pe,Le,Re,_e,Me,je,He,ze,$e,Ue,Ve,Ge,We,qe,Ke,Ye,Xe,Ze,Je,Qe,et,tt,nt,rt,ot,it,at,st,ut,lt,ct,dt,ft,pt,ht,gt,vt,mt,yt,bt,Et,Ct,Dt,wt,At,St,xt,Ot,Nt,Bt,Tt,kt,Ft,It,Pt,Lt,Rt,_t={};function Mt(){if(Ne)return Oe;Ne=1;var e=B(),t=ye(),n=e.document,r=t(n)&&t(n.createElement);return Oe=function(e){return r?n.createElement(e):{}}}function jt(){if(Te)return Be;Te=1;var e=Se(),t=C(),n=Mt();return Be=!e&&!t((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function Ht(){if(Fe)return ke;Fe=1;var e=D(),t=Function.prototype.call;return ke=e?t.bind(t):function(){return t.apply(t,arguments)},ke}function zt(){if(Pe)return Ie;Pe=1;var e=B(),t=me();return Ie=function(n,r){return arguments.length<2?(o=e[n],t(o)?o:void 0):e[n]&&e[n][r];var o},Ie}function $t(){if(Re)return Le;Re=1;var e=w();return Le=e({}.isPrototypeOf)}function Ut(){if(Me)return _e;Me=1;var e=zt(),t=me(),n=$t(),r=ge(),o=Object;return _e=r?function(e){return"symbol"==typeof e}:function(r){var i=e("Symbol");return t(i)&&n(i.prototype,o(r))}}function Vt(){if(He)return je;He=1;var e=String;return je=function(t){try{return e(t)}catch(e){return"Object"}}}function Gt(){if($e)return ze;$e=1;var e=me(),t=Vt(),n=TypeError;return ze=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function Wt(){if(Ve)return Ue;Ve=1;var e=Gt(),t=x();return Ue=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Ue}function qt(){if(Ke)return qe;Ke=1;var e=Ht(),t=ye(),n=Ut(),r=Wt(),o=function(){if(We)return Ge;We=1;var e=Ht(),t=me(),n=ye(),r=TypeError;return Ge=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")},Ge}(),i=ve(),a=TypeError,s=i("toPrimitive");return qe=function(i,u){if(!t(i)||n(i))return i;var l,c=r(i,s);if(c){if(void 0===u&&(u="default"),l=e(c,i,u),!t(l)||n(l))return l;throw new a("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(i,u)}}function Kt(){if(Xe)return Ye;Xe=1;var e=qt(),t=Ut();return Ye=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Yt(){if(Ze)return _t;Ze=1;var e=Se(),t=jt(),n=xe(),r=be(),o=Kt(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return _t.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},_t}function Xt(){if(tt)return et;tt=1;var e=function(){if(Qe)return Je;Qe=1;var e=Math.ceil,t=Math.floor;return Je=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Je}();return et=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Zt(){if(it)return ot;it=1;var e=Xt(),t=Math.min;return ot=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Jt(){if(st)return at;st=1;var e=Zt();return at=function(t){return e(t.length)}}function Qt(){if(lt)return ut;lt=1;var e=N(),t=function(){if(rt)return nt;rt=1;var e=Xt(),t=Math.max,n=Math.min;return nt=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},nt}(),n=Jt(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return ut={includes:r(!0),indexOf:r(!1)}}function en(){return dt?ct:(dt=1,ct={})}function tn(){if(pt)return ft;pt=1;var e=w(),t=de(),n=N(),r=Qt().indexOf,o=en(),i=e([].push);return ft=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c},ft}function nn(){return gt?ht:(gt=1,ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function rn(){if(yt)return Ae;yt=1;var e=Se(),t=xe(),n=Yt(),r=be(),o=N(),i=function(){if(mt)return vt;mt=1;var e=tn(),t=nn();return vt=Object.keys||function(n){return e(n,t)},vt}();return Ae.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},Ae}function on(){if(Dt)return Ct;Dt=1;var e=le(),t=fe(),n=e("keys");return Ct=function(e){return n[e]||(n[e]=t(e))}}function an(){if(At)return wt;At=1;var e,t=be(),n=rn(),r=nn(),o=en(),i=function(){if(Et)return bt;Et=1;var e=zt();return bt=e("document","documentElement")}(),a=Mt(),s=on(),u="prototype",l="script",c=s("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+"</"+l+">"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;h="undefined"!=typeof document?document.domain&&e?p(e):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(e);for(var s=r.length;s--;)delete h[u][r[s]];return h()};return o[c]=!0,wt=Object.create||function(e,r){var o;return null!==e?(d[u]=t(e),o=new d,d[u]=null,o[c]=e):o=h(),void 0===r?o:n.f(o,r)},wt}function sn(){return Nt?Ot:(Nt=1,Ot={})}function un(){return Ft?kt:(Ft=1,kt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function ln(){if(Pt)return It;Pt=1;var e=Se(),t=Yt(),n=un();return It=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function cn(){if(Rt)return Lt;Rt=1;var e,t,n,r=function(){if(Tt)return Bt;Tt=1;var e=B(),t=me(),n=e.WeakMap;return Bt=t(n)&&/native code/.test(String(n))}(),o=B(),i=ye(),a=ln(),s=de(),u=ue(),l=on(),c=en(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return Lt={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}}var dn,fn,pn={},hn={};function gn(){if(fn)return pn;fn=1;var e=Se(),t=Ht(),n=function(){if(dn)return hn;dn=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return hn.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,hn}(),r=un(),o=N(),i=Kt(),a=de(),s=jt(),u=Object.getOwnPropertyDescriptor;return pn.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},pn}var vn,mn,yn,bn,En,Cn,Dn,wn={exports:{}};function An(){if(mn)return vn;mn=1;var e=Se(),t=de(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&r(n,"name").configurable);return vn={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Sn(){if(bn)return yn;bn=1;var e=w(),t=me(),n=ue(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),yn=n.inspectSource}function xn(){if(En)return wn.exports;En=1;var e=w(),t=C(),n=me(),r=de(),o=Se(),i=An().CONFIGURABLE,a=Sn(),s=cn(),u=s.enforce,l=s.get,c=String,d=Object.defineProperty,f=e("".slice),p=e("".replace),h=e([].join),g=o&&!t((function(){return 8!==d((function(){}),"length",{value:8}).length})),v=String(String).split("String"),m=wn.exports=function(e,t,n){"Symbol("===f(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||i&&e.name!==t)&&(o?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=u(e);return r(a,"source")||(a.source=h(v,"string"==typeof t?t:"")),e};return Function.prototype.toString=m((function(){return n(this)&&l(this).source||a(this)}),"toString"),wn.exports}function On(){if(Dn)return Cn;Dn=1;var e=me(),t=Yt(),n=xn(),r=se();return Cn=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(e(a)&&n(a,l,s),s.global)u?o[i]=a:r(i,a);else{try{s.unsafe?o[i]&&(u=!0):delete o[i]}catch(e){}u?o[i]=a:t.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o},Cn}var Nn,Bn={};var Tn,kn,Fn,In,Pn,Ln,Rn,_n,Mn,jn,Hn,zn,$n,Un,Vn,Gn,Wn,qn,Kn,Yn,Xn,Zn,Jn,Qn,er,tr,nr,rr,or,ir,ar,sr,ur,lr={};function cr(){if(Fn)return kn;Fn=1;var e=zt(),t=w(),n=function(){if(Nn)return Bn;Nn=1;var e=tn(),t=nn().concat("length","prototype");return Bn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Bn}(),r=(Tn||(Tn=1,lr.f=Object.getOwnPropertySymbols),lr),o=be(),i=t([].concat);return kn=e("Reflect","ownKeys")||function(e){var t=n.f(o(e)),a=r.f;return a?i(t,a(e)):t},kn}function dr(){if(Pn)return In;Pn=1;var e=de(),t=cr(),n=gn(),r=Yt();return In=function(o,i,a){for(var s=t(i),u=r.f,l=n.f,c=0;c<s.length;c++){var d=s[c];e(o,d)||a&&e(a,d)||u(o,d,l(i,d))}},In}function fr(){if(Mn)return _n;Mn=1;var e=B(),t=gn().f,n=ln(),r=On(),o=se(),i=dr(),a=function(){if(Rn)return Ln;Rn=1;var e=C(),t=me(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return Ln=r}();return _n=function(s,u){var l,c,d,f,p,h=s.target,g=s.global,v=s.stat;if(l=g?e:v?e[h]||o(h,{}):e[h]&&e[h].prototype)for(c in u){if(f=u[c],d=s.dontCallGetSet?(p=t(l,c))&&p.value:l[c],!a(g?c:h+(v?".":"#")+c,s.forced)&&void 0!==d){if(typeof f==typeof d)continue;i(f,d)}(s.sham||d&&d.sham)&&n(f,"sham",!0),r(l,c,f,s)}}}function pr(){if($n)return zn;$n=1;var e=de(),t=me(),n=ce(),r=on(),o=function(){if(Hn)return jn;Hn=1;var e=C();return jn=!e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),jn}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return zn=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},zn}function hr(){if(Vn)return Un;Vn=1;var e,t,n,r=C(),o=me(),i=ye(),a=an(),s=pr(),u=On(),l=ve(),c=ae(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):f=!0),!i(e)||r((function(){var t={};return e[d].call(t)!==t}))?e={}:c&&(e=a(e)),o(e[d])||u(e,d,(function(){return this})),Un={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function gr(){if(Wn)return Gn;Wn=1;var e=Yt().f,t=de(),n=ve()("toStringTag");return Gn=function(r,o,i){r&&!i&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function vr(){if(er)return Qn;er=1;var e=function(){if(Jn)return Zn;Jn=1;var e=ye();return Zn=function(t){return e(t)||null===t}}(),t=String,n=TypeError;return Qn=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function mr(){if(nr)return tr;nr=1;var e=function(){if(Xn)return Yn;Xn=1;var e=w(),t=Gt();return Yn=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=ye(),n=O(),r=vr();return tr=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),tr}function yr(){if(or)return rr;or=1;var e=fr(),t=Ht(),n=ae(),r=An(),o=me(),i=function(){if(Kn)return qn;Kn=1;var e=hr().IteratorPrototype,t=an(),n=un(),r=gr(),o=sn(),i=function(){return this};return qn=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}(),a=pr(),s=mr(),u=gr(),l=ln(),c=On(),d=ve(),f=sn(),p=hr(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",C="entries",D=function(){return this};return rr=function(r,d,p,w,A,S,x){i(p,d,w);var O,N,B,T=function(e){if(e===A&&L)return L;if(!m&&e&&e in I)return I[e];switch(e){case b:case E:case C:return function(){return new p(this,e)}}return function(){return new p(this)}},k=d+" Iterator",F=!1,I=r.prototype,P=I[y]||I["@@iterator"]||A&&I[A],L=!m&&P||T(A),R="Array"===d&&I.entries||P;if(R&&(O=a(R.call(new r)))!==Object.prototype&&O.next&&(n||a(O)===v||(s?s(O,v):o(O[y])||c(O,y,D)),u(O,k,!0,!0),n&&(f[k]=D)),h&&A===E&&P&&P.name!==E&&(!n&&g?l(I,"name",E):(F=!0,L=function(){return t(P,this)})),A)if(N={values:T(E),keys:S?L:T(b),entries:T(C)},x)for(B in N)(m||F||!(B in I))&&c(I,B,N[B]);else e({target:d,proto:!0,forced:m||F},N);return n&&!x||I[y]===L||c(I,y,L,{name:A}),f[d]=L,N}}function br(){return ar?ir:(ar=1,ir=function(e,t){return{value:e,done:t}})}function Er(){if(ur)return sr;ur=1;var e=N(),t=function(){if(xt)return St;xt=1;var e=ve(),t=an(),n=Yt().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),St=function(e){o[r][e]=!0}}(),n=sn(),r=cn(),o=Yt().f,i=yr(),a=br(),s=ae(),u=Se(),l="Array Iterator",c=r.set,d=r.getterFor(l);sr=i(Array,"Array",(function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})}),(function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)}),"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return sr}Er();var Cr,Dr,wr,Ar,Sr,xr,Or,Nr={};function Br(){if(Dr)return Cr;Dr=1;var e={};return e[ve()("toStringTag")]="z",Cr="[object z]"===String(e)}function Tr(){if(Ar)return wr;Ar=1;var e=Br(),t=me(),n=A(),r=ve()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return wr=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u},wr}!function(){if(Or)return Nr;Or=1;var e=Br(),t=On(),n=function(){if(xr)return Sr;xr=1;var e=Br(),t=Tr();return Sr=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",n,{unsafe:!0})}();var kr,Fr,Ir,Pr,Lr,Rr,_r,Mr,jr,Hr,zr,$r,Ur,Vr={};function Gr(){if(Fr)return kr;Fr=1;var e=Tr(),t=String;return kr=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function Wr(){if(Pr)return Ir;Pr=1;var e=be();return Ir=function(){var t=e(this),n="";return t.hasIndices&&(n+="d"),t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),t.sticky&&(n+="y"),n}}function qr(){if($r)return zr;$r=1;var e,t,n=Ht(),r=w(),o=Gr(),i=Wr(),a=function(){if(Rr)return Lr;Rr=1;var e=C(),t=B().RegExp,n=e((function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),r=n||e((function(){return!t("a","y").sticky})),o=n||e((function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")}));return Lr={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}(),s=le(),u=an(),l=cn().get,c=function(){if(Mr)return _r;Mr=1;var e=C(),t=B().RegExp;return _r=e((function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)}))}(),d=function(){if(Hr)return jr;Hr=1;var e=C(),t=B().RegExp;return jr=e((function(){var e=t("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}))}(),f=s("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,h=p,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(t=/b*/g,n(p,e=/a/,"a"),n(p,t,"a"),0!==e.lastIndex||0!==t.lastIndex),E=a.BROKEN_CARET,D=void 0!==/()??/.exec("")[1];return(b||D||E||c||d)&&(h=function(e){var t,r,a,s,c,d,C,w=this,A=l(w),S=o(e),x=A.raw;if(x)return x.lastIndex=w.lastIndex,t=n(h,x,S),w.lastIndex=x.lastIndex,t;var O=A.groups,N=E&&w.sticky,B=n(i,w),T=w.source,k=0,F=S;if(N&&(B=m(B,"y",""),-1===v(B,"g")&&(B+="g"),F=y(S,w.lastIndex),w.lastIndex>0&&(!w.multiline||w.multiline&&"\n"!==g(S,w.lastIndex-1))&&(T="(?: "+T+")",F=" "+F,k++),r=new RegExp("^(?:"+T+")",B)),D&&(r=new RegExp("^"+T+"$(?!\\s)",B)),b&&(a=w.lastIndex),s=n(p,N?r:w,F),N?s?(s.input=y(s.input,k),s[0]=y(s[0],k),s.index=w.lastIndex,w.lastIndex+=s[0].length):w.lastIndex=0:b&&s&&(w.lastIndex=w.global?s.index+s[0].length:a),D&&s&&s.length>1&&n(f,s[0],r,(function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)})),s&&O)for(s.groups=d=u(null),c=0;c<O.length;c++)d[(C=O[c])[0]]=s[C[1]];return s}),zr=h}function Kr(){if(Ur)return Vr;Ur=1;var e=fr(),t=qr();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Vr}Kr();var Yr,Xr,Zr,Jr={};function Qr(){if(Xr)return Yr;Xr=1;var e=w(),t=Xt(),n=Gr(),r=O(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=n(r(s)),f=t(u),p=d.length;return f<0||f>=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return Yr={codeAt:s(!1),charAt:s(!0)}}!function(){if(Zr)return Jr;Zr=1;var e=Qr().charAt,t=Gr(),n=cn(),r=yr(),o=br(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",(function(e){a(this,{type:i,string:t(e),index:0})}),(function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))}))}();var eo,to,no,ro,oo,io,ao,so={};function uo(){if(ro)return no;ro=1;var e=Qr().charAt;return no=function(t,n,r){return n+(r?e(t,n).length:1)},no}!function(){if(ao)return so;ao=1;var e=Ht(),t=function(){if(to)return eo;to=1,Kr();var e=Ht(),t=On(),n=qr(),r=C(),o=ve(),i=ln(),a=o("species"),s=RegExp.prototype;return eo=function(u,l,c,d){var f=o(u),p=!r((function(){var e={};return e[f]=function(){return 7},7!==""[u](e)})),h=p&&!r((function(){var e=!1,t=/a/;return"split"===u&&((t={}).constructor={},t.constructor[a]=function(){return t},t.flags="",t[f]=/./[f]),t.exec=function(){return e=!0,null},t[f](""),!e}));if(!p||!h||c){var g=/./[f],v=l(f,""[u],(function(t,r,o,i,a){var u=r.exec;return u===n||u===s.exec?p&&!a?{done:!0,value:e(g,r,o,i)}:{done:!0,value:e(t,o,r,i)}:{done:!1}}));t(String.prototype,u,v[0]),t(s,f,v[1])}d&&i(s[f],"sham",!0)},eo}(),n=be(),r=x(),o=Zt(),i=Gr(),a=O(),s=Wt(),u=uo(),l=function(){if(io)return oo;io=1;var e=Ht(),t=be(),n=me(),r=A(),o=qr(),i=TypeError;return oo=function(a,s){var u=a.exec;if(n(u)){var l=e(u,a,s);return null!==l&&t(l),l}if("RegExp"===r(a))return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")},oo}();t("match",(function(t,c,d){return[function(n){var o=a(this),u=r(n)?void 0:s(n,t);return u?e(u,n,o):new RegExp(n)[t](i(o))},function(e){var t=n(this),r=i(e),a=d(c,t,r);if(a.done)return a.value;if(!t.global)return l(t,r);var s=t.unicode;t.lastIndex=0;for(var f,p=[],h=0;null!==(f=l(t,r));){var g=i(f[0]);p[h]=g,""===g&&(t.lastIndex=u(r,o(t.lastIndex),s)),h++}return 0===h?null:p}]}))}();var lo,co,fo,po,ho,go,vo,mo,yo,bo,Eo,Co,Do,wo,Ao,So,xo,Oo,No,Bo,To,ko,Fo,Io,Po,Lo,Ro,_o={},Mo={};function jo(){if(co)return lo;co=1;var e=ye(),t=ln();return lo=function(n,r){e(r)&&"cause"in r&&t(n,"cause",r.cause)},lo}function Ho(){if(mo)return vo;mo=1;var e=ln(),t=function(){if(po)return fo;po=1;var e=w(),t=Error,n=e("".replace),r=String(new t("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(r);return fo=function(e,r){if(i&&"string"==typeof e&&!t.prepareStackTrace)for(;r--;)e=n(e,o,"");return e}}(),n=function(){if(go)return ho;go=1;var e=C(),t=un();return ho=!e((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)}))}(),r=Error.captureStackTrace;return vo=function(o,i,a,s){n&&(r?r(o,i):e(o,"stack",t(a,s)))},vo}function zo(){if(Co)return Eo;Co=1;var e=function(){if(bo)return yo;bo=1;var e=A(),t=w();return yo=function(n){if("Function"===e(n))return t(n)},yo}(),t=Gt(),n=D(),r=e(e.bind);return Eo=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},Eo}function $o(){if(wo)return Do;wo=1;var e=ve(),t=sn(),n=e("iterator"),r=Array.prototype;return Do=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function Uo(){if(So)return Ao;So=1;var e=Tr(),t=Wt(),n=x(),r=sn(),o=ve()("iterator");return Ao=function(i){if(!n(i))return t(i,o)||t(i,"@@iterator")||r[e(i)]}}function Vo(){if(Oo)return xo;Oo=1;var e=Ht(),t=Gt(),n=be(),r=Vt(),o=Uo(),i=TypeError;return xo=function(a,s){var u=arguments.length<2?o(a):s;if(t(u))return n(e(u,a));throw new i(r(a)+" is not iterable")},xo}function Go(){if(Bo)return No;Bo=1;var e=Ht(),t=be(),n=Wt();return No=function(r,o,i){var a,s;t(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=e(a,r)}catch(e){s=!0,a=e}if("throw"===o)throw i;if(s)throw a;return t(a),i},No}function Wo(){if(ko)return To;ko=1;var e=zo(),t=Ht(),n=be(),r=Vt(),o=$o(),i=Jt(),a=$t(),s=Vo(),u=Uo(),l=Go(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return To=function(p,h,g){var v,m,y,b,E,C,D,w=g&&g.that,A=!(!g||!g.AS_ENTRIES),S=!(!g||!g.IS_RECORD),x=!(!g||!g.IS_ITERATOR),O=!(!g||!g.INTERRUPTED),N=e(h,w),B=function(e){return v&&l(v,"normal",e),new d(!0,e)},T=function(e){return A?(n(e),O?N(e[0],e[1],B):N(e[0],e[1])):O?N(e,B):N(e)};if(S)v=p.iterator;else if(x)v=p;else{if(!(m=u(p)))throw new c(r(p)+" is not iterable");if(o(m)){for(y=0,b=i(p);b>y;y++)if((E=T(p[y]))&&a(f,E))return E;return new d(!1)}v=s(p,m)}for(C=S?p.next:v.next;!(D=t(C,v)).done;){try{E=T(D.value)}catch(e){l(v,"throw",e)}if("object"==typeof E&&E&&a(f,E))return E}return new d(!1)},To}function qo(){if(Io)return Fo;Io=1;var e=Gr();return Fo=function(t,n){return void 0===t?arguments.length<2?"":n:e(t)},Fo}function Ko(){return Lo||(Lo=1,function(){if(Po)return Mo;Po=1;var e=fr(),t=$t(),n=pr(),r=mr(),o=dr(),i=an(),a=ln(),s=un(),u=jo(),l=Ho(),c=Wo(),d=qo(),f=ve()("toStringTag"),p=Error,h=[].push,g=function(e,o){var s,m=t(v,this);r?s=r(new p,m?n(this):v):(s=m?this:i(v),a(s,f,"Error")),void 0!==o&&a(s,"message",d(o)),l(s,g,s.stack,1),arguments.length>2&&u(s,arguments[2]);var y=[];return c(e,h,{that:y}),a(s,"errors",y),s};r?r(g,p):o(g,p,{name:!0});var v=g.prototype=i(p.prototype,{constructor:s(1,g),message:s(1,""),name:s(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:g})}()),_o}Ro||(Ro=1,Ko());var Yo,Xo,Zo={};Xo||(Xo=1,function(){if(Yo)return Zo;Yo=1;var e=fr(),t=B();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());var Jo,Qo,ei,ti,ni,ri,oi={};function ii(){return Qo?Jo:(Qo=1,Jo={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})}function ai(){if(ti)return ei;ti=1;var e=Mt()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return ei=t===Object.prototype?void 0:t}if(function(){if(ni)return oi;ni=1;var e=B(),t=ii(),n=ai(),r=Er(),o=ln(),i=gr(),a=ve()("iterator"),s=r.values,u=function(e,n){if(e){if(e[a]!==s)try{o(e,a,s)}catch(t){e[a]=s}if(i(e,n,!0),t[n])for(var u in r)if(e[u]!==r[u])try{o(e,u,r[u])}catch(t){e[u]=r[u]}}};for(var l in t)u(e[l]&&e[l].prototype,l);u(n,"DOMTokenList")}(),"undefined"==typeof global){if("ActiveXObject"in window){console.error("抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器\n Sorry, wangEditor V5+ versions do not support IE browser.")}si(),ui()}else global&&(null===(ri=global.navigator)||void 0===ri?void 0:ri.userAgent.match("QQBrowser"))&&(si(),ui());function si(){"undefined"==typeof globalThis&&(window.globalThis=window)}function ui(){"undefined"==typeof AggregateError&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}var li,ci,di,fi,pi,hi,gi,vi,mi,yi,bi,Ei,Ci,Di,wi,Ai,Si={};function xi(){if(ci)return li;ci=1;var e=function(e){return e&&e.Math===Math&&e};return li=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof y&&y)||e("object"==typeof li&&li)||function(){return this}()||Function("return this")()}function Oi(){return fi?di:(fi=1,di=function(e){try{return!!e()}catch(e){return!0}})}function Ni(){return hi?pi:(hi=1,pi=!Oi()((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})))}function Bi(){if(vi)return gi;vi=1;var e=Ni(),t=Function.prototype,n=t.apply,r=t.call;return gi="object"==typeof Reflect&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),gi}function Ti(){if(yi)return mi;yi=1;var e=Ni(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return mi=e?r:function(e){return function(){return n.apply(e,arguments)}},mi}function ki(){if(Ei)return bi;Ei=1;var e=Ti(),t=e({}.toString),n=e("".slice);return bi=function(e){return n(t(e),8,-1)}}function Fi(){if(Di)return Ci;Di=1;var e=ki(),t=Ti();return Ci=function(n){if("Function"===e(n))return t(n)},Ci}function Ii(){if(Ai)return wi;Ai=1;var e="object"==typeof document&&document.all;return wi=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}var Pi,Li,Ri,_i,Mi={};function ji(){return Li?Pi:(Li=1,Pi=!Oi()((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})))}function Hi(){if(_i)return Ri;_i=1;var e=Ni(),t=Function.prototype.call;return Ri=e?t.bind(t):function(){return t.apply(t,arguments)},Ri}var zi,$i,Ui,Vi,Gi,Wi,qi,Ki,Yi,Xi,Zi,Ji,Qi,ea,ta,na,ra,oa,ia,aa,sa,ua,la,ca,da,fa,pa,ha,ga,va,ma,ya,ba,Ea,Ca,Da,wa,Aa={};function Sa(){if(zi)return Aa;zi=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return Aa.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,Aa}function xa(){return Ui?$i:(Ui=1,$i=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Oa(){if(Gi)return Vi;Gi=1;var e=Ti(),t=Oi(),n=ki(),r=Object,o=e("".split);return Vi=t((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function Na(){return qi?Wi:(qi=1,Wi=function(e){return null==e})}function Ba(){if(Yi)return Ki;Yi=1;var e=Na(),t=TypeError;return Ki=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function Ta(){if(Zi)return Xi;Zi=1;var e=Oa(),t=Ba();return Xi=function(n){return e(t(n))}}function ka(){if(Qi)return Ji;Qi=1;var e=Ii();return Ji=function(t){return"object"==typeof t?null!==t:e(t)}}function Fa(){return ta?ea:(ta=1,ea={})}function Ia(){if(ra)return na;ra=1;var e=Fa(),t=xi(),n=Ii(),r=function(e){return n(e)?e:void 0};return na=function(n,o){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][o]||t[n]&&t[n][o]},na}function Pa(){return ia?oa:(ia=1,oa=Ti()({}.isPrototypeOf))}function La(){if(sa)return aa;sa=1;var e=xi().navigator,t=e&&e.userAgent;return aa=t?String(t):""}function Ra(){if(la)return ua;la=1;var e,t,n=xi(),r=La(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),ua=t}function _a(){if(da)return ca;da=1;var e=Ra(),t=Oi(),n=xi().String;return ca=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})),ca}function Ma(){return pa?fa:(pa=1,fa=_a()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function ja(){if(ga)return ha;ga=1;var e=Ia(),t=Ii(),n=Pa(),r=Object;return ha=Ma()?function(e){return"symbol"==typeof e}:function(o){var i=e("Symbol");return t(i)&&n(i.prototype,r(o))}}function Ha(){if(ma)return va;ma=1;var e=String;return va=function(t){try{return e(t)}catch(e){return"Object"}}}function za(){if(ba)return ya;ba=1;var e=Ii(),t=Ha(),n=TypeError;return ya=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function $a(){if(Ca)return Ea;Ca=1;var e=za(),t=Na();return Ea=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Ea}function Ua(){if(wa)return Da;wa=1;var e=Hi(),t=Ii(),n=ka(),r=TypeError;return Da=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")},Da}var Va,Ga,Wa,qa,Ka,Ya,Xa,Za,Ja,Qa,es,ts,ns,rs,os,is,as,ss,us,ls,cs,ds,fs,ps,hs,gs,vs,ms,ys={exports:{}};function bs(){return Ga?Va:(Ga=1,Va=!0)}function Es(){if(qa)return Wa;qa=1;var e=xi(),t=Object.defineProperty;return Wa=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Cs(){if(Ka)return ys.exports;Ka=1;var e=bs(),t=xi(),n=Es(),r="__core-js_shared__",o=ys.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.38.1",mode:e?"pure":"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"}),ys.exports}function Ds(){if(Xa)return Ya;Xa=1;var e=Cs();return Ya=function(t,n){return e[t]||(e[t]=n||{})}}function ws(){if(Ja)return Za;Ja=1;var e=Ba(),t=Object;return Za=function(n){return t(e(n))}}function As(){if(es)return Qa;es=1;var e=Ti(),t=ws(),n=e({}.hasOwnProperty);return Qa=Object.hasOwn||function(e,r){return n(t(e),r)}}function Ss(){if(ns)return ts;ns=1;var e=Ti(),t=0,n=Math.random(),r=e(1..toString);return ts=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function xs(){if(os)return rs;os=1;var e=xi(),t=Ds(),n=As(),r=Ss(),o=_a(),i=Ma(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return rs=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function Os(){if(as)return is;as=1;var e=Hi(),t=ka(),n=ja(),r=$a(),o=Ua(),i=TypeError,a=xs()("toPrimitive");return is=function(s,u){if(!t(s)||n(s))return s;var l,c=r(s,a);if(c){if(void 0===u&&(u="default"),l=e(c,s,u),!t(l)||n(l))return l;throw new i("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(s,u)}}function Ns(){if(us)return ss;us=1;var e=Os(),t=ja();return ss=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Bs(){if(cs)return ls;cs=1;var e=xi(),t=ka(),n=e.document,r=t(n)&&t(n.createElement);return ls=function(e){return r?n.createElement(e):{}}}function Ts(){if(fs)return ds;fs=1;var e=ji(),t=Oi(),n=Bs();return ds=!e&&!t((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function ks(){if(ps)return Mi;ps=1;var e=ji(),t=Hi(),n=Sa(),r=xa(),o=Ta(),i=Ns(),a=As(),s=Ts(),u=Object.getOwnPropertyDescriptor;return Mi.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},Mi}function Fs(){if(gs)return hs;gs=1;var e=Oi(),t=Ii(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return hs=r}function Is(){if(ms)return vs;ms=1;var e=Fi(),t=za(),n=Ni(),r=e(e.bind);return vs=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},vs}var Ps,Ls,Rs,_s,Ms,js,Hs,zs,$s,Us,Vs,Gs,Ws,qs,Ks,Ys,Xs,Zs,Js,Qs,eu,tu,nu,ru,ou,iu,au,su,uu,lu,cu,du,fu,pu,hu,gu,vu,mu,yu={};function bu(){return Ls?Ps:(Ls=1,Ps=ji()&&Oi()((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})))}function Eu(){if(_s)return Rs;_s=1;var e=ka(),t=String,n=TypeError;return Rs=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function Cu(){if(Ms)return yu;Ms=1;var e=ji(),t=Ts(),n=bu(),r=Eu(),o=Ns(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return yu.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},yu}function Du(){if(Hs)return js;Hs=1;var e=ji(),t=Cu(),n=xa();return js=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function wu(){if($s)return zs;$s=1;var e=xi(),t=Bi(),n=Fi(),r=Ii(),o=ks().f,i=Fs(),a=Fa(),s=Is(),u=Du(),l=As(),c=function(e){var n=function(r,o,i){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,o)}return new e(r,o,i)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return zs=function(t,d){var f,p,h,g,v,m,y,b,E,C=t.target,D=t.global,w=t.stat,A=t.proto,S=D?e:w?e[C]:e[C]&&e[C].prototype,x=D?a:a[C]||u(a,C,{})[C],O=x.prototype;for(g in d)p=!(f=i(D?g:C+(w?".":"#")+g,t.forced))&&S&&l(S,g),m=x[g],p&&(y=t.dontCallGetSet?(E=o(S,g))&&E.value:S[g]),v=p&&y?y:d[g],(f||A||typeof m!=typeof v)&&(b=t.bind&&p?s(v,e):t.wrap&&p?c(v):A&&r(v)?n(v):v,(t.sham||v&&v.sham||m&&m.sham)&&u(b,"sham",!0),u(x,g,b),A&&(l(a,h=C+"Prototype")||u(a,h,{}),u(a[h],g,v),t.real&&O&&(f||!O[g])&&u(O,g,v)))}}function Au(){if(Vs)return Us;Vs=1;var e=ki();return Us=Array.isArray||function(t){return"Array"===e(t)}}function Su(){if(Ws)return Gs;Ws=1;var e=Math.ceil,t=Math.floor;return Gs=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Gs}function xu(){if(Ks)return qs;Ks=1;var e=Su();return qs=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Ou(){if(Xs)return Ys;Xs=1;var e=xu(),t=Math.min;return Ys=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Nu(){if(Js)return Zs;Js=1;var e=Ou();return Zs=function(t){return e(t.length)}}function Bu(){if(eu)return Qs;eu=1;var e=TypeError;return Qs=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}}function Tu(){if(nu)return tu;nu=1;var e=ji(),t=Cu(),n=xa();return tu=function(r,o,i){e?t.f(r,o,n(0,i)):r[o]=i}}function ku(){if(ou)return ru;ou=1;var e={};return e[xs()("toStringTag")]="z",ru="[object z]"===String(e)}function Fu(){if(au)return iu;au=1;var e=ku(),t=Ii(),n=ki(),r=xs()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return iu=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u},iu}function Iu(){if(uu)return su;uu=1;var e=Ti(),t=Ii(),n=Cs(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),su=n.inspectSource}function Pu(){if(cu)return lu;cu=1;var e=Ti(),t=Oi(),n=Ii(),r=Fu(),o=Ia(),i=Iu(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return f.sham=!0,lu=!s||t((function(){var e;return d(d.call)||!d(Object)||!d((function(){e=!0}))||e}))?f:d}function Lu(){if(fu)return du;fu=1;var e=Au(),t=Pu(),n=ka(),r=xs()("species"),o=Array;return du=function(i){var a;return e(i)&&(a=i.constructor,(t(a)&&(a===o||e(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a},du}function Ru(){if(hu)return pu;hu=1;var e=Lu();return pu=function(t,n){return new(e(t))(0===n?0:n)}}function _u(){if(vu)return gu;vu=1;var e=Oi(),t=xs(),n=Ra(),r=t("species");return gu=function(t){return n>=51||!e((function(){var e=[];return(e.constructor={})[r]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},gu}var Mu,ju,Hu={},zu={};function $u(){if(ju)return Mu;ju=1;var e=Fu(),t=String;return Mu=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}var Uu,Vu,Gu,Wu,qu,Ku,Yu,Xu,Zu,Ju,Qu,el,tl,nl,rl,ol,il,al,sl,ul={};function ll(){if(Vu)return Uu;Vu=1;var e=xu(),t=Math.max,n=Math.min;return Uu=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},Uu}function cl(){if(Wu)return Gu;Wu=1;var e=Ta(),t=ll(),n=Nu(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return Gu={includes:r(!0),indexOf:r(!1)}}function dl(){return Ku?qu:(Ku=1,qu={})}function fl(){if(Xu)return Yu;Xu=1;var e=Ti(),t=As(),n=Ta(),r=cl().indexOf,o=dl(),i=e([].push);return Yu=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c},Yu}function pl(){return Ju?Zu:(Ju=1,Zu=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function hl(){if(el)return Qu;el=1;var e=fl(),t=pl();return Qu=Object.keys||function(n){return e(n,t)},Qu}function gl(){if(tl)return ul;tl=1;var e=ji(),t=bu(),n=Cu(),r=Eu(),o=Ta(),i=hl();return ul.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},ul}function vl(){return rl?nl:(rl=1,nl=Ia()("document","documentElement"))}function ml(){if(il)return ol;il=1;var e=Ds(),t=Ss(),n=e("keys");return ol=function(e){return n[e]||(n[e]=t(e))}}function yl(){if(sl)return al;sl=1;var e,t=Eu(),n=gl(),r=pl(),o=dl(),i=vl(),a=Bs(),s="prototype",u="script",l=ml()("IE_PROTO"),c=function(){},d=function(e){return"<"+u+">"+e+"</"+u+">"},f=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;p="undefined"!=typeof document?document.domain&&e?f(e):(n=a("iframe"),o="java"+u+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):f(e);for(var l=r.length;l--;)delete p[s][r[l]];return p()};return o[l]=!0,al=Object.create||function(e,r){var o;return null!==e?(c[s]=t(e),o=new c,c[s]=null,o[l]=e):o=p(),void 0===r?o:n.f(o,r)},al}var bl,El={};function Cl(){if(bl)return El;bl=1;var e=fl(),t=pl().concat("length","prototype");return El.f=Object.getOwnPropertyNames||function(n){return e(n,t)},El}var Dl,wl,Al,Sl={};function xl(){return wl?Dl:(wl=1,Dl=Ti()([].slice))}function Ol(){if(Al)return Sl;Al=1;var e=ki(),t=Ta(),n=Cl().f,r=xl(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Sl.f=function(i){return o&&"Window"===e(i)?function(e){try{return n(e)}catch(e){return r(o)}}(i):n(t(i))},Sl}var Nl,Bl,Tl,kl,Fl,Il={};function Pl(){return Nl||(Nl=1,Il.f=Object.getOwnPropertySymbols),Il}function Ll(){if(Tl)return Bl;Tl=1;var e=Du();return Bl=function(t,n,r,o){return o&&o.enumerable?t[n]=r:e(t,n,r),t}}function Rl(){if(Fl)return kl;Fl=1;var e=Cu();return kl=function(t,n,r){return e.f(t,n,r)}}var _l,Ml,jl,Hl,zl,$l,Ul,Vl,Gl,Wl,ql,Kl,Yl,Xl,Zl,Jl,Ql={};function ec(){if(_l)return Ql;_l=1;var e=xs();return Ql.f=e,Ql}function tc(){if(jl)return Ml;jl=1;var e=Fa(),t=As(),n=ec(),r=Cu().f;return Ml=function(o){var i=e.Symbol||(e.Symbol={});t(i,o)||r(i,o,{value:n.f(o)})}}function nc(){if(zl)return Hl;zl=1;var e=Hi(),t=Ia(),n=xs(),r=Ll();return Hl=function(){var o=t("Symbol"),i=o&&o.prototype,a=i&&i.valueOf,s=n("toPrimitive");i&&!i[s]&&r(i,s,(function(t){return e(a,this)}),{arity:1})}}function rc(){if(Ul)return $l;Ul=1;var e=ku(),t=Fu();return $l=e?{}.toString:function(){return"[object "+t(this)+"]"}}function oc(){if(Gl)return Vl;Gl=1;var e=ku(),t=Cu().f,n=Du(),r=As(),o=rc(),i=xs()("toStringTag");return Vl=function(a,s,u,l){var c=u?a:a&&a.prototype;c&&(r(c,i)||t(c,i,{configurable:!0,value:s}),l&&!e&&n(c,"toString",o))}}function ic(){if(ql)return Wl;ql=1;var e=xi(),t=Ii(),n=e.WeakMap;return Wl=t(n)&&/native code/.test(String(n))}function ac(){if(Yl)return Kl;Yl=1;var e,t,n,r=ic(),o=xi(),i=ka(),a=Du(),s=As(),u=Cs(),l=ml(),c=dl(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return Kl={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}}function sc(){if(Zl)return Xl;Zl=1;var e=Is(),t=Ti(),n=Oa(),r=ws(),o=Nu(),i=Ru(),a=t([].push),s=function(t){var s=1===t,u=2===t,l=3===t,c=4===t,d=6===t,f=7===t,p=5===t||d;return function(h,g,v,m){for(var y,b,E=r(h),C=n(E),D=o(C),w=e(g,v),A=0,S=m||i,x=s?S(h,D):u||f?S(h,0):void 0;D>A;A++)if((p||A in C)&&(b=w(y=C[A],A,E),t))if(s)x[A]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:a(x,y)}else switch(t){case 4:return!1;case 7:a(x,y)}return d?-1:l||c?c:x}};return Xl={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}var uc,lc,cc,dc={};function fc(){return lc?uc:(lc=1,uc=_a()&&!!Symbol.for&&!!Symbol.keyFor)}var pc,hc={};var gc,vc,mc,yc={};function bc(){if(vc)return gc;vc=1;var e=Ti(),t=Au(),n=Ii(),r=ki(),o=$u(),i=e([].push);return gc=function(e){if(n(e))return e;if(t(e)){for(var a=e.length,s=[],u=0;u<a;u++){var l=e[u];"string"==typeof l?i(s,l):"number"!=typeof l&&"Number"!==r(l)&&"String"!==r(l)||i(s,o(l))}var c=s.length,d=!0;return function(e,n){if(d)return d=!1,n;if(t(this))return n;for(var r=0;r<c;r++)if(s[r]===e)return n}}},gc}var Ec,Cc,Dc={};function wc(){return Cc||(Cc=1,function(){if(Jl)return zu;Jl=1;var e=wu(),t=xi(),n=Hi(),r=Ti(),o=bs(),i=ji(),a=_a(),s=Oi(),u=As(),l=Pa(),c=Eu(),d=Ta(),f=Ns(),p=$u(),h=xa(),g=yl(),v=hl(),m=Cl(),y=Ol(),b=Pl(),E=ks(),C=Cu(),D=gl(),w=Sa(),A=Ll(),S=Rl(),x=Ds(),O=ml(),N=dl(),B=Ss(),T=xs(),k=ec(),F=tc(),I=nc(),P=oc(),L=ac(),R=sc().forEach,_=O("hidden"),M="Symbol",j="prototype",H=L.set,z=L.getterFor(M),$=Object[j],U=t.Symbol,V=U&&U[j],G=t.RangeError,W=t.TypeError,q=t.QObject,K=E.f,Y=C.f,X=y.f,Z=w.f,J=r([].push),Q=x("symbols"),ee=x("op-symbols"),te=x("wks"),ne=!q||!q[j]||!q[j].findChild,re=function(e,t,n){var r=K($,t);r&&delete $[t],Y(e,t,n),r&&e!==$&&Y($,t,r)},oe=i&&s((function(){return 7!==g(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?re:Y,ie=function(e,t){var n=Q[e]=g(V);return H(n,{type:M,tag:e,description:t}),i||(n.description=t),n},ae=function(e,t,n){e===$&&ae(ee,t,n),c(e);var r=f(t);return c(n),u(Q,r)?(n.enumerable?(u(e,_)&&e[_][r]&&(e[_][r]=!1),n=g(n,{enumerable:h(0,!1)})):(u(e,_)||Y(e,_,h(1,g(null))),e[_][r]=!0),oe(e,r,n)):Y(e,r,n)},se=function(e,t){c(e);var r=d(t),o=v(r).concat(de(r));return R(o,(function(t){i&&!n(ue,r,t)||ae(e,t,r[t])})),e},ue=function(e){var t=f(e),r=n(Z,this,t);return!(this===$&&u(Q,t)&&!u(ee,t))&&(!(r||!u(this,t)||!u(Q,t)||u(this,_)&&this[_][t])||r)},le=function(e,t){var n=d(e),r=f(t);if(n!==$||!u(Q,r)||u(ee,r)){var o=K(n,r);return!o||!u(Q,r)||u(n,_)&&n[_][r]||(o.enumerable=!0),o}},ce=function(e){var t=X(d(e)),n=[];return R(t,(function(e){u(Q,e)||u(N,e)||J(n,e)})),n},de=function(e){var t=e===$,n=X(t?ee:d(e)),r=[];return R(n,(function(e){!u(Q,e)||t&&!u($,e)||J(r,Q[e])})),r};a||(U=function(){if(l(V,this))throw new W("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,r=B(e),o=function(e){var i=void 0===this?t:this;i===$&&n(o,ee,e),u(i,_)&&u(i[_],r)&&(i[_][r]=!1);var a=h(1,e);try{oe(i,r,a)}catch(e){if(!(e instanceof G))throw e;re(i,r,a)}};return i&&ne&&oe($,r,{configurable:!0,set:o}),ie(r,e)},A(V=U[j],"toString",(function(){return z(this).tag})),A(U,"withoutSetter",(function(e){return ie(B(e),e)})),w.f=ue,C.f=ae,D.f=se,E.f=le,m.f=y.f=ce,b.f=de,k.f=function(e){return ie(T(e),e)},i&&(S(V,"description",{configurable:!0,get:function(){return z(this).description}}),o||A($,"propertyIsEnumerable",ue,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!a,sham:!a},{Symbol:U}),R(v(te),(function(e){F(e)})),e({target:M,stat:!0,forced:!a},{useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),e({target:"Object",stat:!0,forced:!a,sham:!i},{create:function(e,t){return void 0===t?g(e):se(g(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:le}),e({target:"Object",stat:!0,forced:!a},{getOwnPropertyNames:ce}),I(),P(U,M),N[_]=!0}(),function(){if(cc)return dc;cc=1;var e=wu(),t=Ia(),n=As(),r=$u(),o=Ds(),i=fc(),a=o("string-to-symbol-registry"),s=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{for:function(e){var o=r(e);if(n(a,o))return a[o];var i=t("Symbol")(o);return a[o]=i,s[i]=o,i}})}(),function(){if(pc)return hc;pc=1;var e=wu(),t=As(),n=ja(),r=Ha(),o=Ds(),i=fc(),a=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{keyFor:function(e){if(!n(e))throw new TypeError(r(e)+" is not a symbol");if(t(a,e))return a[e]}})}(),function(){if(mc)return yc;mc=1;var e=wu(),t=Ia(),n=Bi(),r=Hi(),o=Ti(),i=Oi(),a=Ii(),s=ja(),u=xl(),l=bc(),c=_a(),d=String,f=t("JSON","stringify"),p=o(/./.exec),h=o("".charAt),g=o("".charCodeAt),v=o("".replace),m=o(1..toString),y=/[\uD800-\uDFFF]/g,b=/^[\uD800-\uDBFF]$/,E=/^[\uDC00-\uDFFF]$/,C=!c||i((function(){var e=t("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))})),D=i((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")})),w=function(e,t){var o=u(arguments),i=l(t);if(a(i)||void 0!==e&&!s(e))return o[1]=function(e,t){if(a(i)&&(t=r(i,this,d(e),t)),!s(t))return t},n(f,null,o)},A=function(e,t,n){var r=h(n,t-1),o=h(n,t+1);return p(b,e)&&!p(E,o)||p(E,e)&&!p(b,r)?"\\u"+m(g(e,0),16):e};f&&e({target:"JSON",stat:!0,arity:3,forced:C||D},{stringify:function(e,t,r){var o=u(arguments),i=n(C?w:f,null,o);return D&&"string"==typeof i?v(i,y,A):i}})}(),function(){if(Ec)return Dc;Ec=1;var e=wu(),t=_a(),n=Oi(),r=Pl(),o=ws();e({target:"Object",stat:!0,forced:!t||n((function(){r.f(1)}))},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(o(e)):[]}})}()),Hu}var Ac;var Sc;var xc;var Oc,Nc={};function Bc(){return Oc||(Oc=1,tc()("iterator")),Nc}var Tc;var kc;var Fc;var Ic;var Pc;var Lc;var Rc,_c={};var Mc,jc={};var Hc;var zc,$c,Uc,Vc={};function Gc(){return Uc?$c:(Uc=1,function(){if(mu)return Si;mu=1;var e=wu(),t=Oi(),n=Au(),r=ka(),o=ws(),i=Nu(),a=Bu(),s=Tu(),u=Ru(),l=_u(),c=xs(),d=Ra(),f=c("isConcatSpreadable"),p=d>=51||!t((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),h=function(e){if(!r(e))return!1;var t=e[f];return void 0!==t?!!t:n(e)};e({target:"Array",proto:!0,arity:1,forced:!p||!l("concat")},{concat:function(e){var t,n,r,l,c,d=o(this),f=u(d,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(h(c=-1===t?d:arguments[t]))for(l=i(c),a(p+l),n=0;n<l;n++,p++)n in c&&s(f,p,c[n]);else a(p+1),s(f,p++,c);return f.length=p,f}})}(),wc(),Ac||(Ac=1,tc()("asyncIterator")),Sc||(Sc=1,tc()("hasInstance")),xc||(xc=1,tc()("isConcatSpreadable")),Bc(),Tc||(Tc=1,tc()("match")),kc||(kc=1,tc()("matchAll")),Fc||(Fc=1,tc()("replace")),Ic||(Ic=1,tc()("search")),Pc||(Pc=1,tc()("species")),Lc||(Lc=1,tc()("split")),function(){if(Rc)return _c;Rc=1;var e=tc(),t=nc();e("toPrimitive"),t()}(),function(){if(Mc)return jc;Mc=1;var e=Ia(),t=tc(),n=oc();t("toStringTag"),n(e("Symbol"),"Symbol")}(),Hc||(Hc=1,tc()("unscopables")),function(){if(zc)return Vc;zc=1;var e=xi();oc()(e.JSON,"JSON",!0)}(),$c=Fa().Symbol)}var Wc,qc,Kc,Yc,Xc,Zc,Jc,Qc,ed,td,nd,rd,od,id,ad,sd,ud,ld,cd,dd,fd,pd,hd,gd,vd,md,yd,bd,Ed,Cd,Dd,wd,Ad,Sd={};function xd(){return qc?Wc:(qc=1,Wc=function(){})}function Od(){return Yc?Kc:(Yc=1,Kc={})}function Nd(){if(Zc)return Xc;Zc=1;var e=ji(),t=As(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&r(n,"name").configurable);return Xc={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Bd(){return Qc||(Qc=1,Jc=!Oi()((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))),Jc}function Td(){if(td)return ed;td=1;var e=As(),t=Ii(),n=ws(),r=ml(),o=Bd(),i=r("IE_PROTO"),a=Object,s=a.prototype;return ed=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},ed}function kd(){if(rd)return nd;rd=1;var e,t,n,r=Oi(),o=Ii(),i=ka(),a=yl(),s=Td(),u=Ll(),l=xs(),c=bs(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):f=!0),!i(e)||r((function(){var t={};return e[d].call(t)!==t}))?e={}:c&&(e=a(e)),o(e[d])||u(e,d,(function(){return this})),nd={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function Fd(){if(id)return od;id=1;var e=kd().IteratorPrototype,t=yl(),n=xa(),r=oc(),o=Od(),i=function(){return this};return od=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}function Id(){if(sd)return ad;sd=1;var e=Ti(),t=za();return ad=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}function Pd(){if(ld)return ud;ld=1;var e=ka();return ud=function(t){return e(t)||null===t}}function Ld(){if(dd)return cd;dd=1;var e=Pd(),t=String,n=TypeError;return cd=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function Rd(){if(pd)return fd;pd=1;var e=Id(),t=ka(),n=Ba(),r=Ld();return fd=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),fd}function _d(){if(gd)return hd;gd=1;var e=wu(),t=Hi(),n=bs(),r=Nd(),o=Ii(),i=Fd(),a=Td(),s=Rd(),u=oc(),l=Du(),c=Ll(),d=xs(),f=Od(),p=kd(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",C="entries",D=function(){return this};return hd=function(r,d,p,w,A,S,x){i(p,d,w);var O,N,B,T=function(e){if(e===A&&L)return L;if(!m&&e&&e in I)return I[e];switch(e){case b:case E:case C:return function(){return new p(this,e)}}return function(){return new p(this)}},k=d+" Iterator",F=!1,I=r.prototype,P=I[y]||I["@@iterator"]||A&&I[A],L=!m&&P||T(A),R="Array"===d&&I.entries||P;if(R&&(O=a(R.call(new r)))!==Object.prototype&&O.next&&(n||a(O)===v||(s?s(O,v):o(O[y])||c(O,y,D)),u(O,k,!0,!0),n&&(f[k]=D)),h&&A===E&&P&&P.name!==E&&(!n&&g?l(I,"name",E):(F=!0,L=function(){return t(P,this)})),A)if(N={values:T(E),keys:S?L:T(b),entries:T(C)},x)for(B in N)(m||F||!(B in I))&&c(I,B,N[B]);else e({target:d,proto:!0,forced:m||F},N);return n&&!x||I[y]===L||c(I,y,L,{name:A}),f[d]=L,N}}function Md(){return md?vd:(md=1,vd=function(e,t){return{value:e,done:t}})}function jd(){if(bd)return yd;bd=1;var e=Ta(),t=xd(),n=Od(),r=ac(),o=Cu().f,i=_d(),a=Md(),s=bs(),u=ji(),l="Array Iterator",c=r.set,d=r.getterFor(l);yd=i(Array,"Array",(function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})}),(function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)}),"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return yd}function Hd(){return Cd?Ed:(Cd=1,Ed={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})}function zd(){if(Dd)return Sd;Dd=1,jd();var e=Hd(),t=xi(),n=oc(),r=Od();for(var o in e)n(t[o],o),r[o]=r.Array;return Sd}function $d(){if(Ad)return wd;Ad=1;var e=Gc();return zd(),wd=e}var Ud,Vd={};var Gd;var Wd;var qd,Kd,Yd;function Xd(){if(Yd)return Kd;Yd=1;var e=$d();return function(){if(Ud)return Vd;Ud=1;var e=xs(),t=Cu().f,n=e("metadata"),r=Function.prototype;void 0===r[n]&&t(r,n,{value:null})}(),Gd||(Gd=1,tc()("asyncDispose")),Wd||(Wd=1,tc()("dispose")),qd||(qd=1,tc()("metadata")),Kd=e}var Zd,Jd,Qd;function ef(){if(Jd)return Zd;Jd=1;var e=Ia(),t=Ti(),n=e("Symbol"),r=n.keyFor,o=t(n.prototype.valueOf);return Zd=n.isRegisteredSymbol||function(e){try{return void 0!==r(o(e))}catch(e){return!1}}}var tf,nf,rf;function of(){if(nf)return tf;nf=1;for(var e=Ds(),t=Ia(),n=Ti(),r=ja(),o=xs(),i=t("Symbol"),a=i.isWellKnownSymbol,s=t("Object","getOwnPropertyNames"),u=n(i.prototype.valueOf),l=e("wks"),c=0,d=s(i),f=d.length;c<f;c++)try{var p=d[c];r(i[p])&&o(p)}catch(e){}return tf=function(e){if(a&&a(e))return!0;try{for(var t=u(e),n=0,r=s(l),o=r.length;n<o;n++)if(l[r[n]]==t)return!0}catch(e){}return!1},tf}var af;var sf;var uf;var lf;var cf;var df;var ff;var pf,hf,gf,vf,mf;function yf(){if(gf)return hf;gf=1;var e=Xd();return Qd||(Qd=1,wu()({target:"Symbol",stat:!0},{isRegisteredSymbol:ef()})),rf||(rf=1,wu()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:of()})),af||(af=1,tc()("customMatcher")),sf||(sf=1,tc()("observable")),uf||(uf=1,wu()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:ef()})),lf||(lf=1,wu()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:of()})),cf||(cf=1,tc()("matcher")),df||(df=1,tc()("metadataKey")),ff||(ff=1,tc()("patternMatch")),pf||(pf=1,tc()("replaceAll")),hf=e}function bf(){return mf?vf:(mf=1,vf=yf())}var Ef,Cf,Df,wf,Af,Sf,xf,Of,Nf,Bf,Tf,kf,Ff,If=b(bf()),Pf={};function Lf(){if(Cf)return Ef;Cf=1;var e=Ti(),t=xu(),n=$u(),r=Ba(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=n(r(s)),f=t(u),p=d.length;return f<0||f>=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return Ef={codeAt:s(!1),charAt:s(!0)}}function Rf(){return Af?wf:(Af=1,jd(),function(){if(Df)return Pf;Df=1;var e=Lf().charAt,t=$u(),n=ac(),r=_d(),o=Md(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",(function(e){a(this,{type:i,string:t(e),index:0})}),(function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))}))}(),Bc(),wf=ec().f("iterator"))}function _f(){if(xf)return Sf;xf=1;var e=Rf();return zd(),Sf=e}function Mf(){return Nf?Of:(Nf=1,Of=_f())}function jf(){return Tf?Bf:(Tf=1,Bf=Mf())}function Hf(){return Ff?kf:(Ff=1,kf=jf())}var zf=b(Hf());function $f(e){return $f="function"==typeof If&&"symbol"==typeof zf?function(e){return typeof e}:function(e){return e&&"function"==typeof If&&e.constructor===If&&e!==If.prototype?"symbol":typeof e},$f(e)}var Uf,Vf={};if(function(){if(Uf)return Vf;Uf=1;var e=fr(),t=C(),n=N(),r=gn().f,o=Se();e({target:"Object",stat:!0,forced:!o||t((function(){r(1)})),sham:!o},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}})}(),"object"===("undefined"==typeof global?"undefined":$f(global))){var Gf=Object.getOwnPropertyDescriptor(global,"window");global.window&&!Gf.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),null!=global.document&&null==global.document.getElementsByTagName&&(global.document.getElementsByTagName=function(){return[]})}
|
|
1
|
+
var e,t,n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function E(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}function C(){return t?e:(t=1,e=function(e){try{return!!e()}catch(e){return!0}})}function D(){if(r)return n;r=1;var e=C();return n=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function w(){if(i)return o;i=1;var e=D(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return o=e?r:function(e){return function(){return n.apply(e,arguments)}},o}function A(){if(s)return a;s=1;var e=w(),t=e({}.toString),n=e("".slice);return a=function(e){return n(t(e),8,-1)}}function S(){if(l)return u;l=1;var e=w(),t=C(),n=A(),r=Object,o=e("".split);return u=t(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function x(){return d?c:(d=1,c=function(e){return null==e})}function O(){if(p)return f;p=1;var e=x(),t=TypeError;return f=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function N(){if(g)return h;g=1;var e=S(),t=O();return h=function(n){return e(t(n))}}function B(){if(m)return v;m=1;var e=function(e){return e&&e.Math===Math&&e};return v=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof y&&y)||e("object"==typeof v&&v)||function(){return this}()||Function("return this")()}var T,k,F,I,P,_,L,R,M,j,H,z,$,U,V,W,G,q,K,Y,X,Z,J,Q,ee,te,ne,re,oe,ie={exports:{}};function ae(){return k?T:(k=1,T=!1)}function se(){if(I)return F;I=1;var e=B(),t=Object.defineProperty;return F=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function ue(){if(P)return ie.exports;P=1;var e=ae(),t=B(),n=se(),r="__core-js_shared__",o=ie.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.43.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"}),ie.exports}function le(){if(L)return _;L=1;var e=ue();return _=function(t,n){return e[t]||(e[t]=n||{})}}function ce(){if(M)return R;M=1;var e=O(),t=Object;return R=function(n){return t(e(n))}}function de(){if(H)return j;H=1;var e=w(),t=ce(),n=e({}.hasOwnProperty);return j=Object.hasOwn||function(e,r){return n(t(e),r)}}function fe(){if($)return z;$=1;var e=w(),t=0,n=Math.random(),r=e(1.1.toString);return z=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function pe(){if(G)return W;G=1;var e,t,n=B(),r=function(){if(V)return U;V=1;var e=B().navigator,t=e&&e.userAgent;return U=t?String(t):""}(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),W=t}function he(){if(K)return q;K=1;var e=pe(),t=C(),n=B().String;return q=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),q}function ge(){if(X)return Y;X=1;var e=he();return Y=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function ve(){if(J)return Z;J=1;var e=B(),t=le(),n=de(),r=fe(),o=he(),i=ge(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return Z=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function me(){if(ee)return Q;ee=1;var e="object"==typeof document&&document.all;return Q=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function ye(){if(ne)return te;ne=1;var e=me();return te=function(t){return"object"==typeof t?null!==t:e(t)}}function be(){if(oe)return re;oe=1;var e=ye(),t=String,n=TypeError;return re=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}var Ee,Ce,De,we,Ae={};function Se(){if(Ce)return Ee;Ce=1;var e=C();return Ee=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function xe(){if(we)return De;we=1;var e=Se(),t=C();return De=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}var Oe,Ne,Be,Te,ke,Fe,Ie,Pe,_e,Le,Re,Me,je,He,ze,$e,Ue,Ve,We,Ge,qe,Ke,Ye,Xe,Ze,Je,Qe,et,tt,nt,rt,ot,it,at,st,ut,lt,ct,dt,ft,pt,ht,gt,vt,mt,yt,bt,Et,Ct,Dt,wt,At,St,xt,Ot,Nt,Bt,Tt,kt,Ft,It,Pt,_t,Lt,Rt={};function Mt(){if(Ne)return Oe;Ne=1;var e=B(),t=ye(),n=e.document,r=t(n)&&t(n.createElement);return Oe=function(e){return r?n.createElement(e):{}}}function jt(){if(Te)return Be;Te=1;var e=Se(),t=C(),n=Mt();return Be=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Ht(){if(Fe)return ke;Fe=1;var e=D(),t=Function.prototype.call;return ke=e?t.bind(t):function(){return t.apply(t,arguments)},ke}function zt(){if(Pe)return Ie;Pe=1;var e=B(),t=me();return Ie=function(n,r){return arguments.length<2?(o=e[n],t(o)?o:void 0):e[n]&&e[n][r];var o},Ie}function $t(){if(Le)return _e;Le=1;var e=w();return _e=e({}.isPrototypeOf)}function Ut(){if(Me)return Re;Me=1;var e=zt(),t=me(),n=$t(),r=ge(),o=Object;return Re=r?function(e){return"symbol"==typeof e}:function(r){var i=e("Symbol");return t(i)&&n(i.prototype,o(r))}}function Vt(){if(He)return je;He=1;var e=String;return je=function(t){try{return e(t)}catch(e){return"Object"}}}function Wt(){if($e)return ze;$e=1;var e=me(),t=Vt(),n=TypeError;return ze=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function Gt(){if(Ve)return Ue;Ve=1;var e=Wt(),t=x();return Ue=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Ue}function qt(){if(Ke)return qe;Ke=1;var e=Ht(),t=ye(),n=Ut(),r=Gt(),o=function(){if(Ge)return We;Ge=1;var e=Ht(),t=me(),n=ye(),r=TypeError;return We=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")},We}(),i=ve(),a=TypeError,s=i("toPrimitive");return qe=function(i,u){if(!t(i)||n(i))return i;var l,c=r(i,s);if(c){if(void 0===u&&(u="default"),l=e(c,i,u),!t(l)||n(l))return l;throw new a("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(i,u)}}function Kt(){if(Xe)return Ye;Xe=1;var e=qt(),t=Ut();return Ye=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Yt(){if(Ze)return Rt;Ze=1;var e=Se(),t=jt(),n=xe(),r=be(),o=Kt(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Rt.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},Rt}function Xt(){if(tt)return et;tt=1;var e=function(){if(Qe)return Je;Qe=1;var e=Math.ceil,t=Math.floor;return Je=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Je}();return et=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Zt(){if(it)return ot;it=1;var e=Xt(),t=Math.min;return ot=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Jt(){if(st)return at;st=1;var e=Zt();return at=function(t){return e(t.length)}}function Qt(){if(lt)return ut;lt=1;var e=N(),t=function(){if(rt)return nt;rt=1;var e=Xt(),t=Math.max,n=Math.min;return nt=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},nt}(),n=Jt(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return ut={includes:r(!0),indexOf:r(!1)}}function en(){return dt?ct:(dt=1,ct={})}function tn(){if(pt)return ft;pt=1;var e=w(),t=de(),n=N(),r=Qt().indexOf,o=en(),i=e([].push);return ft=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c},ft}function nn(){return gt?ht:(gt=1,ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function rn(){if(yt)return Ae;yt=1;var e=Se(),t=xe(),n=Yt(),r=be(),o=N(),i=function(){if(mt)return vt;mt=1;var e=tn(),t=nn();return vt=Object.keys||function(n){return e(n,t)},vt}();return Ae.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},Ae}function on(){if(Dt)return Ct;Dt=1;var e=le(),t=fe(),n=e("keys");return Ct=function(e){return n[e]||(n[e]=t(e))}}function an(){if(At)return wt;At=1;var e,t=be(),n=rn(),r=nn(),o=en(),i=function(){if(Et)return bt;Et=1;var e=zt();return bt=e("document","documentElement")}(),a=Mt(),s=on(),u="prototype",l="script",c=s("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+"</"+l+">"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;h="undefined"!=typeof document?document.domain&&e?p(e):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(e);for(var s=r.length;s--;)delete h[u][r[s]];return h()};return o[c]=!0,wt=Object.create||function(e,r){var o;return null!==e?(d[u]=t(e),o=new d,d[u]=null,o[c]=e):o=h(),void 0===r?o:n.f(o,r)},wt}function sn(){return Nt?Ot:(Nt=1,Ot={})}function un(){return Ft?kt:(Ft=1,kt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function ln(){if(Pt)return It;Pt=1;var e=Se(),t=Yt(),n=un();return It=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function cn(){if(Lt)return _t;Lt=1;var e,t,n,r=function(){if(Tt)return Bt;Tt=1;var e=B(),t=me(),n=e.WeakMap;return Bt=t(n)&&/native code/.test(String(n))}(),o=B(),i=ye(),a=ln(),s=de(),u=ue(),l=on(),c=en(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return _t={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}}var dn,fn,pn={},hn={};function gn(){if(fn)return pn;fn=1;var e=Se(),t=Ht(),n=function(){if(dn)return hn;dn=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return hn.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,hn}(),r=un(),o=N(),i=Kt(),a=de(),s=jt(),u=Object.getOwnPropertyDescriptor;return pn.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},pn}var vn,mn,yn,bn,En,Cn,Dn,wn={exports:{}};function An(){if(mn)return vn;mn=1;var e=Se(),t=de(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&r(n,"name").configurable);return vn={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Sn(){if(bn)return yn;bn=1;var e=w(),t=me(),n=ue(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),yn=n.inspectSource}function xn(){if(En)return wn.exports;En=1;var e=w(),t=C(),n=me(),r=de(),o=Se(),i=An().CONFIGURABLE,a=Sn(),s=cn(),u=s.enforce,l=s.get,c=String,d=Object.defineProperty,f=e("".slice),p=e("".replace),h=e([].join),g=o&&!t(function(){return 8!==d(function(){},"length",{value:8}).length}),v=String(String).split("String"),m=wn.exports=function(e,t,n){"Symbol("===f(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||i&&e.name!==t)&&(o?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=u(e);return r(a,"source")||(a.source=h(v,"string"==typeof t?t:"")),e};return Function.prototype.toString=m(function(){return n(this)&&l(this).source||a(this)},"toString"),wn.exports}function On(){if(Dn)return Cn;Dn=1;var e=me(),t=Yt(),n=xn(),r=se();return Cn=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(e(a)&&n(a,l,s),s.global)u?o[i]=a:r(i,a);else{try{s.unsafe?o[i]&&(u=!0):delete o[i]}catch(e){}u?o[i]=a:t.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o},Cn}var Nn,Bn={};var Tn,kn,Fn,In,Pn,_n,Ln,Rn,Mn,jn,Hn,zn,$n,Un,Vn,Wn,Gn,qn,Kn,Yn,Xn,Zn,Jn,Qn,er,tr,nr,rr,or,ir,ar,sr,ur,lr={};function cr(){if(Fn)return kn;Fn=1;var e=zt(),t=w(),n=function(){if(Nn)return Bn;Nn=1;var e=tn(),t=nn().concat("length","prototype");return Bn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Bn}(),r=(Tn||(Tn=1,lr.f=Object.getOwnPropertySymbols),lr),o=be(),i=t([].concat);return kn=e("Reflect","ownKeys")||function(e){var t=n.f(o(e)),a=r.f;return a?i(t,a(e)):t},kn}function dr(){if(Pn)return In;Pn=1;var e=de(),t=cr(),n=gn(),r=Yt();return In=function(o,i,a){for(var s=t(i),u=r.f,l=n.f,c=0;c<s.length;c++){var d=s[c];e(o,d)||a&&e(a,d)||u(o,d,l(i,d))}},In}function fr(){if(Mn)return Rn;Mn=1;var e=B(),t=gn().f,n=ln(),r=On(),o=se(),i=dr(),a=function(){if(Ln)return _n;Ln=1;var e=C(),t=me(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return _n=r}();return Rn=function(s,u){var l,c,d,f,p,h=s.target,g=s.global,v=s.stat;if(l=g?e:v?e[h]||o(h,{}):e[h]&&e[h].prototype)for(c in u){if(f=u[c],d=s.dontCallGetSet?(p=t(l,c))&&p.value:l[c],!a(g?c:h+(v?".":"#")+c,s.forced)&&void 0!==d){if(typeof f==typeof d)continue;i(f,d)}(s.sham||d&&d.sham)&&n(f,"sham",!0),r(l,c,f,s)}}}function pr(){if($n)return zn;$n=1;var e=de(),t=me(),n=ce(),r=on(),o=function(){if(Hn)return jn;Hn=1;var e=C();return jn=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),jn}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return zn=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},zn}function hr(){if(Vn)return Un;Vn=1;var e,t,n,r=C(),o=me(),i=ye(),a=an(),s=pr(),u=On(),l=ve(),c=ae(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):f=!0),!i(e)||r(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),Un={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function gr(){if(Gn)return Wn;Gn=1;var e=Yt().f,t=de(),n=ve()("toStringTag");return Wn=function(r,o,i){r&&!i&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function vr(){if(er)return Qn;er=1;var e=function(){if(Jn)return Zn;Jn=1;var e=ye();return Zn=function(t){return e(t)||null===t}}(),t=String,n=TypeError;return Qn=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function mr(){if(nr)return tr;nr=1;var e=function(){if(Xn)return Yn;Xn=1;var e=w(),t=Wt();return Yn=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=ye(),n=O(),r=vr();return tr=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),tr}function yr(){if(or)return rr;or=1;var e=fr(),t=Ht(),n=ae(),r=An(),o=me(),i=function(){if(Kn)return qn;Kn=1;var e=hr().IteratorPrototype,t=an(),n=un(),r=gr(),o=sn(),i=function(){return this};return qn=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}(),a=pr(),s=mr(),u=gr(),l=ln(),c=On(),d=ve(),f=sn(),p=hr(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",C="entries",D=function(){return this};return rr=function(r,d,p,w,A,S,x){i(p,d,w);var O,N,B,T=function(e){if(e===A&&_)return _;if(!m&&e&&e in I)return I[e];switch(e){case b:case E:case C:return function(){return new p(this,e)}}return function(){return new p(this)}},k=d+" Iterator",F=!1,I=r.prototype,P=I[y]||I["@@iterator"]||A&&I[A],_=!m&&P||T(A),L="Array"===d&&I.entries||P;if(L&&(O=a(L.call(new r)))!==Object.prototype&&O.next&&(n||a(O)===v||(s?s(O,v):o(O[y])||c(O,y,D)),u(O,k,!0,!0),n&&(f[k]=D)),h&&A===E&&P&&P.name!==E&&(!n&&g?l(I,"name",E):(F=!0,_=function(){return t(P,this)})),A)if(N={values:T(E),keys:S?_:T(b),entries:T(C)},x)for(B in N)(m||F||!(B in I))&&c(I,B,N[B]);else e({target:d,proto:!0,forced:m||F},N);return n&&!x||I[y]===_||c(I,y,_,{name:A}),f[d]=_,N}}function br(){return ar?ir:(ar=1,ir=function(e,t){return{value:e,done:t}})}function Er(){if(ur)return sr;ur=1;var e=N(),t=function(){if(xt)return St;xt=1;var e=ve(),t=an(),n=Yt().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),St=function(e){o[r][e]=!0}}(),n=sn(),r=cn(),o=Yt().f,i=yr(),a=br(),s=ae(),u=Se(),l="Array Iterator",c=r.set,d=r.getterFor(l);sr=i(Array,"Array",function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)},"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return sr}Er();var Cr,Dr,wr,Ar,Sr,xr,Or,Nr={};function Br(){if(Dr)return Cr;Dr=1;var e={};return e[ve()("toStringTag")]="z",Cr="[object z]"===String(e)}function Tr(){if(Ar)return wr;Ar=1;var e=Br(),t=me(),n=A(),r=ve()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return wr=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u},wr}!function(){if(Or)return Nr;Or=1;var e=Br(),t=On(),n=function(){if(xr)return Sr;xr=1;var e=Br(),t=Tr();return Sr=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",n,{unsafe:!0})}();var kr,Fr,Ir,Pr,_r,Lr,Rr,Mr,jr,Hr,zr,$r,Ur,Vr={};function Wr(){if(Fr)return kr;Fr=1;var e=Tr(),t=String;return kr=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function Gr(){if(Pr)return Ir;Pr=1;var e=be();return Ir=function(){var t=e(this),n="";return t.hasIndices&&(n+="d"),t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),t.sticky&&(n+="y"),n}}function qr(){if($r)return zr;$r=1;var e,t,n=Ht(),r=w(),o=Wr(),i=Gr(),a=function(){if(Lr)return _r;Lr=1;var e=C(),t=B().RegExp,n=e(function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),r=n||e(function(){return!t("a","y").sticky}),o=n||e(function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")});return _r={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}(),s=le(),u=an(),l=cn().get,c=function(){if(Mr)return Rr;Mr=1;var e=C(),t=B().RegExp;return Rr=e(function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})}(),d=function(){if(Hr)return jr;Hr=1;var e=C(),t=B().RegExp;return jr=e(function(){var e=t("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})}(),f=s("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,h=p,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(t=/b*/g,n(p,e=/a/,"a"),n(p,t,"a"),0!==e.lastIndex||0!==t.lastIndex),E=a.BROKEN_CARET,D=void 0!==/()??/.exec("")[1];return(b||D||E||c||d)&&(h=function(e){var t,r,a,s,c,d,C,w=this,A=l(w),S=o(e),x=A.raw;if(x)return x.lastIndex=w.lastIndex,t=n(h,x,S),w.lastIndex=x.lastIndex,t;var O=A.groups,N=E&&w.sticky,B=n(i,w),T=w.source,k=0,F=S;if(N&&(B=m(B,"y",""),-1===v(B,"g")&&(B+="g"),F=y(S,w.lastIndex),w.lastIndex>0&&(!w.multiline||w.multiline&&"\n"!==g(S,w.lastIndex-1))&&(T="(?: "+T+")",F=" "+F,k++),r=new RegExp("^(?:"+T+")",B)),D&&(r=new RegExp("^"+T+"$(?!\\s)",B)),b&&(a=w.lastIndex),s=n(p,N?r:w,F),N?s?(s.input=y(s.input,k),s[0]=y(s[0],k),s.index=w.lastIndex,w.lastIndex+=s[0].length):w.lastIndex=0:b&&s&&(w.lastIndex=w.global?s.index+s[0].length:a),D&&s&&s.length>1&&n(f,s[0],r,function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)}),s&&O)for(s.groups=d=u(null),c=0;c<O.length;c++)d[(C=O[c])[0]]=s[C[1]];return s}),zr=h}function Kr(){if(Ur)return Vr;Ur=1;var e=fr(),t=qr();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Vr}Kr();var Yr,Xr,Zr,Jr={};function Qr(){if(Xr)return Yr;Xr=1;var e=w(),t=Xt(),n=Wr(),r=O(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=n(r(s)),f=t(u),p=d.length;return f<0||f>=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return Yr={codeAt:s(!1),charAt:s(!0)}}!function(){if(Zr)return Jr;Zr=1;var e=Qr().charAt,t=Wr(),n=cn(),r=yr(),o=br(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))})}();var eo,to,no,ro,oo,io,ao,so,uo,lo,co,fo={};function po(){if(ro)return no;ro=1;var e=Qr().charAt;return no=function(t,n,r){return n+(r?e(t,n).length:1)},no}function ho(){if(so)return ao;so=1;var e=Ht(),t=de(),n=$t(),r=function(){if(io)return oo;io=1;var e=B(),t=C(),n=e.RegExp,r=!t(function(){var e=!0;try{n(".","d")}catch(t){e=!1}var t={},r="",o=e?"dgimsy":"gimsy",i=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(a.hasIndices="d"),a)i(s,a[s]);return Object.getOwnPropertyDescriptor(n.prototype,"flags").get.call(t)!==o||r!==o});return oo={correct:r}}(),o=Gr(),i=RegExp.prototype;return ao=r.correct?function(e){return e.flags}:function(a){return r.correct||!n(i,a)||t(a,"flags")?a.flags:e(o,a)}}!function(){if(co)return fo;co=1;var e=Ht(),t=w(),n=function(){if(to)return eo;to=1,Kr();var e=Ht(),t=On(),n=qr(),r=C(),o=ve(),i=ln(),a=o("species"),s=RegExp.prototype;return eo=function(u,l,c,d){var f=o(u),p=!r(function(){var e={};return e[f]=function(){return 7},7!==""[u](e)}),h=p&&!r(function(){var e=!1,t=/a/;return"split"===u&&((t={}).constructor={},t.constructor[a]=function(){return t},t.flags="",t[f]=/./[f]),t.exec=function(){return e=!0,null},t[f](""),!e});if(!p||!h||c){var g=/./[f],v=l(f,""[u],function(t,r,o,i,a){var u=r.exec;return u===n||u===s.exec?p&&!a?{done:!0,value:e(g,r,o,i)}:{done:!0,value:e(t,o,r,i)}:{done:!1}});t(String.prototype,u,v[0]),t(s,f,v[1])}d&&i(s[f],"sham",!0)},eo}(),r=be(),o=ye(),i=Zt(),a=Wr(),s=O(),u=Gt(),l=po(),c=ho(),d=function(){if(lo)return uo;lo=1;var e=Ht(),t=be(),n=me(),r=A(),o=qr(),i=TypeError;return uo=function(a,s){var u=a.exec;if(n(u)){var l=e(u,a,s);return null!==l&&t(l),l}if("RegExp"===r(a))return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")},uo}(),f=t("".indexOf);n("match",function(t,n,p){return[function(n){var r=s(this),i=o(n)?u(n,t):void 0;return i?e(i,n,r):new RegExp(n)[t](a(r))},function(e){var t=r(this),o=a(e),s=p(n,t,o);if(s.done)return s.value;var u=a(c(t));if(-1===f(u,"g"))return d(t,o);var h=-1!==f(u,"u");t.lastIndex=0;for(var g,v=[],m=0;null!==(g=d(t,o));){var y=a(g[0]);v[m]=y,""===y&&(t.lastIndex=l(o,i(t.lastIndex),h)),m++}return 0===m?null:v}]})}();var go,vo,mo,yo,bo,Eo,Co,Do,wo,Ao,So,xo,Oo,No,Bo,To,ko,Fo,Io,Po,_o,Lo,Ro,Mo,jo,Ho,zo,$o={},Uo={};function Vo(){if(vo)return go;vo=1;var e=ye(),t=ln();return go=function(n,r){e(r)&&"cause"in r&&t(n,"cause",r.cause)},go}function Wo(){if(Do)return Co;Do=1;var e=ln(),t=function(){if(yo)return mo;yo=1;var e=w(),t=Error,n=e("".replace),r=String(new t("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(r);return mo=function(e,r){if(i&&"string"==typeof e&&!t.prepareStackTrace)for(;r--;)e=n(e,o,"");return e}}(),n=function(){if(Eo)return bo;Eo=1;var e=C(),t=un();return bo=!e(function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)})}(),r=Error.captureStackTrace;return Co=function(o,i,a,s){n&&(r?r(o,i):e(o,"stack",t(a,s)))},Co}function Go(){if(xo)return So;xo=1;var e=function(){if(Ao)return wo;Ao=1;var e=A(),t=w();return wo=function(n){if("Function"===e(n))return t(n)},wo}(),t=Wt(),n=D(),r=e(e.bind);return So=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},So}function qo(){if(No)return Oo;No=1;var e=ve(),t=sn(),n=e("iterator"),r=Array.prototype;return Oo=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function Ko(){if(To)return Bo;To=1;var e=Tr(),t=Gt(),n=x(),r=sn(),o=ve()("iterator");return Bo=function(i){if(!n(i))return t(i,o)||t(i,"@@iterator")||r[e(i)]}}function Yo(){if(Fo)return ko;Fo=1;var e=Ht(),t=Wt(),n=be(),r=Vt(),o=Ko(),i=TypeError;return ko=function(a,s){var u=arguments.length<2?o(a):s;if(t(u))return n(e(u,a));throw new i(r(a)+" is not iterable")},ko}function Xo(){if(Po)return Io;Po=1;var e=Ht(),t=be(),n=Gt();return Io=function(r,o,i){var a,s;t(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=e(a,r)}catch(e){s=!0,a=e}if("throw"===o)throw i;if(s)throw a;return t(a),i},Io}function Zo(){if(Lo)return _o;Lo=1;var e=Go(),t=Ht(),n=be(),r=Vt(),o=qo(),i=Jt(),a=$t(),s=Yo(),u=Ko(),l=Xo(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return _o=function(p,h,g){var v,m,y,b,E,C,D,w=g&&g.that,A=!(!g||!g.AS_ENTRIES),S=!(!g||!g.IS_RECORD),x=!(!g||!g.IS_ITERATOR),O=!(!g||!g.INTERRUPTED),N=e(h,w),B=function(e){return v&&l(v,"normal"),new d(!0,e)},T=function(e){return A?(n(e),O?N(e[0],e[1],B):N(e[0],e[1])):O?N(e,B):N(e)};if(S)v=p.iterator;else if(x)v=p;else{if(!(m=u(p)))throw new c(r(p)+" is not iterable");if(o(m)){for(y=0,b=i(p);b>y;y++)if((E=T(p[y]))&&a(f,E))return E;return new d(!1)}v=s(p,m)}for(C=S?p.next:v.next;!(D=t(C,v)).done;){try{E=T(D.value)}catch(e){l(v,"throw",e)}if("object"==typeof E&&E&&a(f,E))return E}return new d(!1)},_o}function Jo(){if(Mo)return Ro;Mo=1;var e=Wr();return Ro=function(t,n){return void 0===t?arguments.length<2?"":n:e(t)},Ro}function Qo(){return Ho||(Ho=1,function(){if(jo)return Uo;jo=1;var e=fr(),t=$t(),n=pr(),r=mr(),o=dr(),i=an(),a=ln(),s=un(),u=Vo(),l=Wo(),c=Zo(),d=Jo(),f=ve()("toStringTag"),p=Error,h=[].push,g=function(e,o){var s,m=t(v,this);r?s=r(new p,m?n(this):v):(s=m?this:i(v),a(s,f,"Error")),void 0!==o&&a(s,"message",d(o)),l(s,g,s.stack,1),arguments.length>2&&u(s,arguments[2]);var y=[];return c(e,h,{that:y}),a(s,"errors",y),s};r?r(g,p):o(g,p,{name:!0});var v=g.prototype=i(p.prototype,{constructor:s(1,g),message:s(1,""),name:s(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:g})}()),$o}zo||(zo=1,Qo());var ei,ti,ni={};ti||(ti=1,function(){if(ei)return ni;ei=1;var e=fr(),t=B();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());var ri,oi,ii,ai,si,ui,li={};function ci(){return oi?ri:(oi=1,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})}function di(){if(ai)return ii;ai=1;var e=Mt()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return ii=t===Object.prototype?void 0:t}if(function(){if(si)return li;si=1;var e=B(),t=ci(),n=di(),r=Er(),o=ln(),i=gr(),a=ve()("iterator"),s=r.values,u=function(e,n){if(e){if(e[a]!==s)try{o(e,a,s)}catch(t){e[a]=s}if(i(e,n,!0),t[n])for(var u in r)if(e[u]!==r[u])try{o(e,u,r[u])}catch(t){e[u]=r[u]}}};for(var l in t)u(e[l]&&e[l].prototype,l);u(n,"DOMTokenList")}(),"undefined"==typeof global){if("ActiveXObject"in window){console.error("抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器\n Sorry, wangEditor V5+ versions do not support IE browser.")}fi(),pi()}else global&&(null===(ui=global.navigator)||void 0===ui?void 0:ui.userAgent.match("QQBrowser"))&&(fi(),pi());function fi(){"undefined"==typeof globalThis&&(window.globalThis=window)}function pi(){"undefined"==typeof AggregateError&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}var hi,gi,vi,mi,yi,bi,Ei,Ci,Di,wi,Ai,Si,xi,Oi,Ni,Bi,Ti={};function ki(){if(gi)return hi;gi=1;var e=function(e){return e&&e.Math===Math&&e};return hi=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof y&&y)||e("object"==typeof hi&&hi)||function(){return this}()||Function("return this")()}function Fi(){return mi?vi:(mi=1,vi=function(e){try{return!!e()}catch(e){return!0}})}function Ii(){return bi?yi:(bi=1,yi=!Fi()(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function Pi(){if(Ci)return Ei;Ci=1;var e=Ii(),t=Function.prototype,n=t.apply,r=t.call;return Ei="object"==typeof Reflect&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),Ei}function _i(){if(wi)return Di;wi=1;var e=Ii(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return Di=e?r:function(e){return function(){return n.apply(e,arguments)}},Di}function Li(){if(Si)return Ai;Si=1;var e=_i(),t=e({}.toString),n=e("".slice);return Ai=function(e){return n(t(e),8,-1)}}function Ri(){if(Oi)return xi;Oi=1;var e=Li(),t=_i();return xi=function(n){if("Function"===e(n))return t(n)},xi}function Mi(){if(Bi)return Ni;Bi=1;var e="object"==typeof document&&document.all;return Ni=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}var ji,Hi,zi,$i,Ui={};function Vi(){return Hi?ji:(Hi=1,ji=!Fi()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Wi(){if($i)return zi;$i=1;var e=Ii(),t=Function.prototype.call;return zi=e?t.bind(t):function(){return t.apply(t,arguments)},zi}var Gi,qi,Ki,Yi,Xi,Zi,Ji,Qi,ea,ta,na,ra,oa,ia,aa,sa,ua,la,ca,da,fa,pa,ha,ga,va,ma,ya,ba,Ea,Ca,Da,wa,Aa,Sa,xa,Oa,Na,Ba={};function Ta(){if(Gi)return Ba;Gi=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return Ba.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,Ba}function ka(){return Ki?qi:(Ki=1,qi=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Fa(){if(Xi)return Yi;Xi=1;var e=_i(),t=Fi(),n=Li(),r=Object,o=e("".split);return Yi=t(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function Ia(){return Ji?Zi:(Ji=1,Zi=function(e){return null==e})}function Pa(){if(ea)return Qi;ea=1;var e=Ia(),t=TypeError;return Qi=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function _a(){if(na)return ta;na=1;var e=Fa(),t=Pa();return ta=function(n){return e(t(n))}}function La(){if(oa)return ra;oa=1;var e=Mi();return ra=function(t){return"object"==typeof t?null!==t:e(t)}}function Ra(){return aa?ia:(aa=1,ia={})}function Ma(){if(ua)return sa;ua=1;var e=Ra(),t=ki(),n=Mi(),r=function(e){return n(e)?e:void 0};return sa=function(n,o){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][o]||t[n]&&t[n][o]},sa}function ja(){return ca?la:(ca=1,la=_i()({}.isPrototypeOf))}function Ha(){if(fa)return da;fa=1;var e=ki().navigator,t=e&&e.userAgent;return da=t?String(t):""}function za(){if(ha)return pa;ha=1;var e,t,n=ki(),r=Ha(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),pa=t}function $a(){if(va)return ga;va=1;var e=za(),t=Fi(),n=ki().String;return ga=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),ga}function Ua(){return ya?ma:(ya=1,ma=$a()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Va(){if(Ea)return ba;Ea=1;var e=Ma(),t=Mi(),n=ja(),r=Object;return ba=Ua()?function(e){return"symbol"==typeof e}:function(o){var i=e("Symbol");return t(i)&&n(i.prototype,r(o))}}function Wa(){if(Da)return Ca;Da=1;var e=String;return Ca=function(t){try{return e(t)}catch(e){return"Object"}}}function Ga(){if(Aa)return wa;Aa=1;var e=Mi(),t=Wa(),n=TypeError;return wa=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function qa(){if(xa)return Sa;xa=1;var e=Ga(),t=Ia();return Sa=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Sa}function Ka(){if(Na)return Oa;Na=1;var e=Wi(),t=Mi(),n=La(),r=TypeError;return Oa=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")},Oa}var Ya,Xa,Za,Ja,Qa,es,ts,ns,rs,os,is,as,ss,us,ls,cs,ds,fs,ps,hs,gs,vs,ms,ys,bs,Es,Cs,Ds,ws={exports:{}};function As(){return Xa?Ya:(Xa=1,Ya=!0)}function Ss(){if(Ja)return Za;Ja=1;var e=ki(),t=Object.defineProperty;return Za=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function xs(){if(Qa)return ws.exports;Qa=1;var e=As(),t=ki(),n=Ss(),r="__core-js_shared__",o=ws.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.43.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"}),ws.exports}function Os(){if(ts)return es;ts=1;var e=xs();return es=function(t,n){return e[t]||(e[t]=n||{})}}function Ns(){if(rs)return ns;rs=1;var e=Pa(),t=Object;return ns=function(n){return t(e(n))}}function Bs(){if(is)return os;is=1;var e=_i(),t=Ns(),n=e({}.hasOwnProperty);return os=Object.hasOwn||function(e,r){return n(t(e),r)}}function Ts(){if(ss)return as;ss=1;var e=_i(),t=0,n=Math.random(),r=e(1.1.toString);return as=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function ks(){if(ls)return us;ls=1;var e=ki(),t=Os(),n=Bs(),r=Ts(),o=$a(),i=Ua(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return us=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function Fs(){if(ds)return cs;ds=1;var e=Wi(),t=La(),n=Va(),r=qa(),o=Ka(),i=TypeError,a=ks()("toPrimitive");return cs=function(s,u){if(!t(s)||n(s))return s;var l,c=r(s,a);if(c){if(void 0===u&&(u="default"),l=e(c,s,u),!t(l)||n(l))return l;throw new i("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(s,u)}}function Is(){if(ps)return fs;ps=1;var e=Fs(),t=Va();return fs=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Ps(){if(gs)return hs;gs=1;var e=ki(),t=La(),n=e.document,r=t(n)&&t(n.createElement);return hs=function(e){return r?n.createElement(e):{}}}function _s(){if(ms)return vs;ms=1;var e=Vi(),t=Fi(),n=Ps();return vs=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Ls(){if(ys)return Ui;ys=1;var e=Vi(),t=Wi(),n=Ta(),r=ka(),o=_a(),i=Is(),a=Bs(),s=_s(),u=Object.getOwnPropertyDescriptor;return Ui.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},Ui}function Rs(){if(Es)return bs;Es=1;var e=Fi(),t=Mi(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return bs=r}function Ms(){if(Ds)return Cs;Ds=1;var e=Ri(),t=Ga(),n=Ii(),r=e(e.bind);return Cs=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},Cs}var js,Hs,zs,$s,Us,Vs,Ws,Gs,qs,Ks,Ys,Xs,Zs,Js,Qs,eu,tu,nu,ru,ou,iu,au,su,uu,lu,cu,du,fu,pu,hu,gu,vu,mu,yu,bu,Eu,Cu,Du,wu={};function Au(){return Hs?js:(Hs=1,js=Vi()&&Fi()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function Su(){if($s)return zs;$s=1;var e=La(),t=String,n=TypeError;return zs=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function xu(){if(Us)return wu;Us=1;var e=Vi(),t=_s(),n=Au(),r=Su(),o=Is(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return wu.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},wu}function Ou(){if(Ws)return Vs;Ws=1;var e=Vi(),t=xu(),n=ka();return Vs=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function Nu(){if(qs)return Gs;qs=1;var e=ki(),t=Pi(),n=Ri(),r=Mi(),o=Ls().f,i=Rs(),a=Ra(),s=Ms(),u=Ou(),l=Bs(),c=function(e){var n=function(r,o,i){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,o)}return new e(r,o,i)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return Gs=function(t,d){var f,p,h,g,v,m,y,b,E,C=t.target,D=t.global,w=t.stat,A=t.proto,S=D?e:w?e[C]:e[C]&&e[C].prototype,x=D?a:a[C]||u(a,C,{})[C],O=x.prototype;for(g in d)p=!(f=i(D?g:C+(w?".":"#")+g,t.forced))&&S&&l(S,g),m=x[g],p&&(y=t.dontCallGetSet?(E=o(S,g))&&E.value:S[g]),v=p&&y?y:d[g],(f||A||typeof m!=typeof v)&&(b=t.bind&&p?s(v,e):t.wrap&&p?c(v):A&&r(v)?n(v):v,(t.sham||v&&v.sham||m&&m.sham)&&u(b,"sham",!0),u(x,g,b),A&&(l(a,h=C+"Prototype")||u(a,h,{}),u(a[h],g,v),t.real&&O&&(f||!O[g])&&u(O,g,v)))}}function Bu(){if(Ys)return Ks;Ys=1;var e=Li();return Ks=Array.isArray||function(t){return"Array"===e(t)}}function Tu(){if(Zs)return Xs;Zs=1;var e=Math.ceil,t=Math.floor;return Xs=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Xs}function ku(){if(Qs)return Js;Qs=1;var e=Tu();return Js=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Fu(){if(tu)return eu;tu=1;var e=ku(),t=Math.min;return eu=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Iu(){if(ru)return nu;ru=1;var e=Fu();return nu=function(t){return e(t.length)}}function Pu(){if(iu)return ou;iu=1;var e=TypeError;return ou=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}}function _u(){if(su)return au;su=1;var e=Vi(),t=xu(),n=ka();return au=function(r,o,i){e?t.f(r,o,n(0,i)):r[o]=i}}function Lu(){if(lu)return uu;lu=1;var e={};return e[ks()("toStringTag")]="z",uu="[object z]"===String(e)}function Ru(){if(du)return cu;du=1;var e=Lu(),t=Mi(),n=Li(),r=ks()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return cu=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u},cu}function Mu(){if(pu)return fu;pu=1;var e=_i(),t=Mi(),n=xs(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),fu=n.inspectSource}function ju(){if(gu)return hu;gu=1;var e=_i(),t=Fi(),n=Mi(),r=Ru(),o=Ma(),i=Mu(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return f.sham=!0,hu=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d}function Hu(){if(mu)return vu;mu=1;var e=Bu(),t=ju(),n=La(),r=ks()("species"),o=Array;return vu=function(i){var a;return e(i)&&(a=i.constructor,(t(a)&&(a===o||e(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a},vu}function zu(){if(bu)return yu;bu=1;var e=Hu();return yu=function(t,n){return new(e(t))(0===n?0:n)}}function $u(){if(Cu)return Eu;Cu=1;var e=Fi(),t=ks(),n=za(),r=t("species");return Eu=function(t){return n>=51||!e(function(){var e=[];return(e.constructor={})[r]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Eu}var Uu,Vu,Wu={},Gu={};function qu(){if(Vu)return Uu;Vu=1;var e=Ru(),t=String;return Uu=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}var Ku,Yu,Xu,Zu,Ju,Qu,el,tl,nl,rl,ol,il,al,sl,ul,ll,cl,dl,fl,pl={};function hl(){if(Yu)return Ku;Yu=1;var e=ku(),t=Math.max,n=Math.min;return Ku=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},Ku}function gl(){if(Zu)return Xu;Zu=1;var e=_a(),t=hl(),n=Iu(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return Xu={includes:r(!0),indexOf:r(!1)}}function vl(){return Qu?Ju:(Qu=1,Ju={})}function ml(){if(tl)return el;tl=1;var e=_i(),t=Bs(),n=_a(),r=gl().indexOf,o=vl(),i=e([].push);return el=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c},el}function yl(){return rl?nl:(rl=1,nl=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function bl(){if(il)return ol;il=1;var e=ml(),t=yl();return ol=Object.keys||function(n){return e(n,t)},ol}function El(){if(al)return pl;al=1;var e=Vi(),t=Au(),n=xu(),r=Su(),o=_a(),i=bl();return pl.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},pl}function Cl(){return ul?sl:(ul=1,sl=Ma()("document","documentElement"))}function Dl(){if(cl)return ll;cl=1;var e=Os(),t=Ts(),n=e("keys");return ll=function(e){return n[e]||(n[e]=t(e))}}function wl(){if(fl)return dl;fl=1;var e,t=Su(),n=El(),r=yl(),o=vl(),i=Cl(),a=Ps(),s="prototype",u="script",l=Dl()("IE_PROTO"),c=function(){},d=function(e){return"<"+u+">"+e+"</"+u+">"},f=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;p="undefined"!=typeof document?document.domain&&e?f(e):(n=a("iframe"),o="java"+u+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):f(e);for(var l=r.length;l--;)delete p[s][r[l]];return p()};return o[l]=!0,dl=Object.create||function(e,r){var o;return null!==e?(c[s]=t(e),o=new c,c[s]=null,o[l]=e):o=p(),void 0===r?o:n.f(o,r)},dl}var Al,Sl={};function xl(){if(Al)return Sl;Al=1;var e=ml(),t=yl().concat("length","prototype");return Sl.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Sl}var Ol,Nl,Bl,Tl={};function kl(){return Nl?Ol:(Nl=1,Ol=_i()([].slice))}function Fl(){if(Bl)return Tl;Bl=1;var e=Li(),t=_a(),n=xl().f,r=kl(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Tl.f=function(i){return o&&"Window"===e(i)?function(e){try{return n(e)}catch(e){return r(o)}}(i):n(t(i))},Tl}var Il,Pl,_l,Ll,Rl,Ml={};function jl(){return Il||(Il=1,Ml.f=Object.getOwnPropertySymbols),Ml}function Hl(){if(_l)return Pl;_l=1;var e=Ou();return Pl=function(t,n,r,o){return o&&o.enumerable?t[n]=r:e(t,n,r),t}}function zl(){if(Rl)return Ll;Rl=1;var e=xu();return Ll=function(t,n,r){return e.f(t,n,r)}}var $l,Ul,Vl,Wl,Gl,ql,Kl,Yl,Xl,Zl,Jl,Ql,ec,tc,nc,rc,oc={};function ic(){if($l)return oc;$l=1;var e=ks();return oc.f=e,oc}function ac(){if(Vl)return Ul;Vl=1;var e=Ra(),t=Bs(),n=ic(),r=xu().f;return Ul=function(o){var i=e.Symbol||(e.Symbol={});t(i,o)||r(i,o,{value:n.f(o)})}}function sc(){if(Gl)return Wl;Gl=1;var e=Wi(),t=Ma(),n=ks(),r=Hl();return Wl=function(){var o=t("Symbol"),i=o&&o.prototype,a=i&&i.valueOf,s=n("toPrimitive");i&&!i[s]&&r(i,s,function(t){return e(a,this)},{arity:1})}}function uc(){if(Kl)return ql;Kl=1;var e=Lu(),t=Ru();return ql=e?{}.toString:function(){return"[object "+t(this)+"]"}}function lc(){if(Xl)return Yl;Xl=1;var e=Lu(),t=xu().f,n=Ou(),r=Bs(),o=uc(),i=ks()("toStringTag");return Yl=function(a,s,u,l){var c=u?a:a&&a.prototype;c&&(r(c,i)||t(c,i,{configurable:!0,value:s}),l&&!e&&n(c,"toString",o))}}function cc(){if(Jl)return Zl;Jl=1;var e=ki(),t=Mi(),n=e.WeakMap;return Zl=t(n)&&/native code/.test(String(n))}function dc(){if(ec)return Ql;ec=1;var e,t,n,r=cc(),o=ki(),i=La(),a=Ou(),s=Bs(),u=xs(),l=Dl(),c=vl(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return Ql={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}}function fc(){if(nc)return tc;nc=1;var e=Ms(),t=_i(),n=Fa(),r=Ns(),o=Iu(),i=zu(),a=t([].push),s=function(t){var s=1===t,u=2===t,l=3===t,c=4===t,d=6===t,f=7===t,p=5===t||d;return function(h,g,v,m){for(var y,b,E=r(h),C=n(E),D=o(C),w=e(g,v),A=0,S=m||i,x=s?S(h,D):u||f?S(h,0):void 0;D>A;A++)if((p||A in C)&&(b=w(y=C[A],A,E),t))if(s)x[A]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:a(x,y)}else switch(t){case 4:return!1;case 7:a(x,y)}return d?-1:l||c?c:x}};return tc={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}var pc,hc,gc,vc={};function mc(){return hc?pc:(hc=1,pc=$a()&&!!Symbol.for&&!!Symbol.keyFor)}var yc,bc={};var Ec,Cc,Dc,wc={};function Ac(){if(Cc)return Ec;Cc=1;var e=_i(),t=Bu(),n=Mi(),r=Li(),o=qu(),i=e([].push);return Ec=function(e){if(n(e))return e;if(t(e)){for(var a=e.length,s=[],u=0;u<a;u++){var l=e[u];"string"==typeof l?i(s,l):"number"!=typeof l&&"Number"!==r(l)&&"String"!==r(l)||i(s,o(l))}var c=s.length,d=!0;return function(e,n){if(d)return d=!1,n;if(t(this))return n;for(var r=0;r<c;r++)if(s[r]===e)return n}}},Ec}var Sc,xc,Oc={};function Nc(){return xc||(xc=1,function(){if(rc)return Gu;rc=1;var e=Nu(),t=ki(),n=Wi(),r=_i(),o=As(),i=Vi(),a=$a(),s=Fi(),u=Bs(),l=ja(),c=Su(),d=_a(),f=Is(),p=qu(),h=ka(),g=wl(),v=bl(),m=xl(),y=Fl(),b=jl(),E=Ls(),C=xu(),D=El(),w=Ta(),A=Hl(),S=zl(),x=Os(),O=Dl(),N=vl(),B=Ts(),T=ks(),k=ic(),F=ac(),I=sc(),P=lc(),_=dc(),L=fc().forEach,R=O("hidden"),M="Symbol",j="prototype",H=_.set,z=_.getterFor(M),$=Object[j],U=t.Symbol,V=U&&U[j],W=t.RangeError,G=t.TypeError,q=t.QObject,K=E.f,Y=C.f,X=y.f,Z=w.f,J=r([].push),Q=x("symbols"),ee=x("op-symbols"),te=x("wks"),ne=!q||!q[j]||!q[j].findChild,re=function(e,t,n){var r=K($,t);r&&delete $[t],Y(e,t,n),r&&e!==$&&Y($,t,r)},oe=i&&s(function(){return 7!==g(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a})?re:Y,ie=function(e,t){var n=Q[e]=g(V);return H(n,{type:M,tag:e,description:t}),i||(n.description=t),n},ae=function(e,t,n){e===$&&ae(ee,t,n),c(e);var r=f(t);return c(n),u(Q,r)?(n.enumerable?(u(e,R)&&e[R][r]&&(e[R][r]=!1),n=g(n,{enumerable:h(0,!1)})):(u(e,R)||Y(e,R,h(1,g(null))),e[R][r]=!0),oe(e,r,n)):Y(e,r,n)},se=function(e,t){c(e);var r=d(t),o=v(r).concat(de(r));return L(o,function(t){i&&!n(ue,r,t)||ae(e,t,r[t])}),e},ue=function(e){var t=f(e),r=n(Z,this,t);return!(this===$&&u(Q,t)&&!u(ee,t))&&(!(r||!u(this,t)||!u(Q,t)||u(this,R)&&this[R][t])||r)},le=function(e,t){var n=d(e),r=f(t);if(n!==$||!u(Q,r)||u(ee,r)){var o=K(n,r);return!o||!u(Q,r)||u(n,R)&&n[R][r]||(o.enumerable=!0),o}},ce=function(e){var t=X(d(e)),n=[];return L(t,function(e){u(Q,e)||u(N,e)||J(n,e)}),n},de=function(e){var t=e===$,n=X(t?ee:d(e)),r=[];return L(n,function(e){!u(Q,e)||t&&!u($,e)||J(r,Q[e])}),r};a||(U=function(){if(l(V,this))throw new G("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,r=B(e),o=function(e){var i=void 0===this?t:this;i===$&&n(o,ee,e),u(i,R)&&u(i[R],r)&&(i[R][r]=!1);var a=h(1,e);try{oe(i,r,a)}catch(e){if(!(e instanceof W))throw e;re(i,r,a)}};return i&&ne&&oe($,r,{configurable:!0,set:o}),ie(r,e)},A(V=U[j],"toString",function(){return z(this).tag}),A(U,"withoutSetter",function(e){return ie(B(e),e)}),w.f=ue,C.f=ae,D.f=se,E.f=le,m.f=y.f=ce,b.f=de,k.f=function(e){return ie(T(e),e)},i&&(S(V,"description",{configurable:!0,get:function(){return z(this).description}}),o||A($,"propertyIsEnumerable",ue,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!a,sham:!a},{Symbol:U}),L(v(te),function(e){F(e)}),e({target:M,stat:!0,forced:!a},{useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),e({target:"Object",stat:!0,forced:!a,sham:!i},{create:function(e,t){return void 0===t?g(e):se(g(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:le}),e({target:"Object",stat:!0,forced:!a},{getOwnPropertyNames:ce}),I(),P(U,M),N[R]=!0}(),function(){if(gc)return vc;gc=1;var e=Nu(),t=Ma(),n=Bs(),r=qu(),o=Os(),i=mc(),a=o("string-to-symbol-registry"),s=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{for:function(e){var o=r(e);if(n(a,o))return a[o];var i=t("Symbol")(o);return a[o]=i,s[i]=o,i}})}(),function(){if(yc)return bc;yc=1;var e=Nu(),t=Bs(),n=Va(),r=Wa(),o=Os(),i=mc(),a=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{keyFor:function(e){if(!n(e))throw new TypeError(r(e)+" is not a symbol");if(t(a,e))return a[e]}})}(),function(){if(Dc)return wc;Dc=1;var e=Nu(),t=Ma(),n=Pi(),r=Wi(),o=_i(),i=Fi(),a=Mi(),s=Va(),u=kl(),l=Ac(),c=$a(),d=String,f=t("JSON","stringify"),p=o(/./.exec),h=o("".charAt),g=o("".charCodeAt),v=o("".replace),m=o(1.1.toString),y=/[\uD800-\uDFFF]/g,b=/^[\uD800-\uDBFF]$/,E=/^[\uDC00-\uDFFF]$/,C=!c||i(function(){var e=t("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))}),D=i(function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")}),w=function(e,t){var o=u(arguments),i=l(t);if(a(i)||void 0!==e&&!s(e))return o[1]=function(e,t){if(a(i)&&(t=r(i,this,d(e),t)),!s(t))return t},n(f,null,o)},A=function(e,t,n){var r=h(n,t-1),o=h(n,t+1);return p(b,e)&&!p(E,o)||p(E,e)&&!p(b,r)?"\\u"+m(g(e,0),16):e};f&&e({target:"JSON",stat:!0,arity:3,forced:C||D},{stringify:function(e,t,r){var o=u(arguments),i=n(C?w:f,null,o);return D&&"string"==typeof i?v(i,y,A):i}})}(),function(){if(Sc)return Oc;Sc=1;var e=Nu(),t=$a(),n=Fi(),r=jl(),o=Ns();e({target:"Object",stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(o(e)):[]}})}()),Wu}var Bc,Tc={};function kc(){return Bc||(Bc=1,ac()("asyncDispose")),Tc}var Fc;var Ic,Pc={};function _c(){return Ic||(Ic=1,ac()("dispose")),Pc}var Lc;var Rc;var Mc,jc={};function Hc(){return Mc||(Mc=1,ac()("iterator")),jc}var zc;var $c;var Uc;var Vc;var Wc;var Gc;var qc,Kc={};var Yc,Xc={};var Zc;var Jc,Qc,ed,td={};function nd(){return ed?Qc:(ed=1,function(){if(Du)return Ti;Du=1;var e=Nu(),t=Fi(),n=Bu(),r=La(),o=Ns(),i=Iu(),a=Pu(),s=_u(),u=zu(),l=$u(),c=ks(),d=za(),f=c("isConcatSpreadable"),p=d>=51||!t(function(){var e=[];return e[f]=!1,e.concat()[0]!==e}),h=function(e){if(!r(e))return!1;var t=e[f];return void 0!==t?!!t:n(e)};e({target:"Array",proto:!0,arity:1,forced:!p||!l("concat")},{concat:function(e){var t,n,r,l,c,d=o(this),f=u(d,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(h(c=-1===t?d:arguments[t]))for(l=i(c),a(p+l),n=0;n<l;n++,p++)n in c&&s(f,p,c[n]);else a(p+1),s(f,p++,c);return f.length=p,f}})}(),Nc(),kc(),Fc||(Fc=1,ac()("asyncIterator")),_c(),Lc||(Lc=1,ac()("hasInstance")),Rc||(Rc=1,ac()("isConcatSpreadable")),Hc(),zc||(zc=1,ac()("match")),$c||($c=1,ac()("matchAll")),Uc||(Uc=1,ac()("replace")),Vc||(Vc=1,ac()("search")),Wc||(Wc=1,ac()("species")),Gc||(Gc=1,ac()("split")),function(){if(qc)return Kc;qc=1;var e=ac(),t=sc();e("toPrimitive"),t()}(),function(){if(Yc)return Xc;Yc=1;var e=Ma(),t=ac(),n=lc();t("toStringTag"),n(e("Symbol"),"Symbol")}(),Zc||(Zc=1,ac()("unscopables")),function(){if(Jc)return td;Jc=1;var e=ki();lc()(e.JSON,"JSON",!0)}(),Qc=Ra().Symbol)}var rd,od,id,ad,sd,ud,ld,cd,dd,fd,pd,hd,gd,vd,md,yd,bd,Ed,Cd,Dd,wd,Ad,Sd,xd,Od,Nd,Bd,Td,kd,Fd,Id,Pd,_d,Ld={};function Rd(){return od?rd:(od=1,rd=function(){})}function Md(){return ad?id:(ad=1,id={})}function jd(){if(ud)return sd;ud=1;var e=Vi(),t=Bs(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&r(n,"name").configurable);return sd={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Hd(){return cd||(cd=1,ld=!Fi()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ld}function zd(){if(fd)return dd;fd=1;var e=Bs(),t=Mi(),n=Ns(),r=Dl(),o=Hd(),i=r("IE_PROTO"),a=Object,s=a.prototype;return dd=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},dd}function $d(){if(hd)return pd;hd=1;var e,t,n,r=Fi(),o=Mi(),i=La(),a=wl(),s=zd(),u=Hl(),l=ks(),c=As(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):f=!0),!i(e)||r(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),pd={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function Ud(){if(vd)return gd;vd=1;var e=$d().IteratorPrototype,t=wl(),n=ka(),r=lc(),o=Md(),i=function(){return this};return gd=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}function Vd(){if(yd)return md;yd=1;var e=_i(),t=Ga();return md=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}function Wd(){if(Ed)return bd;Ed=1;var e=La();return bd=function(t){return e(t)||null===t}}function Gd(){if(Dd)return Cd;Dd=1;var e=Wd(),t=String,n=TypeError;return Cd=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function qd(){if(Ad)return wd;Ad=1;var e=Vd(),t=La(),n=Pa(),r=Gd();return wd=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),wd}function Kd(){if(xd)return Sd;xd=1;var e=Nu(),t=Wi(),n=As(),r=jd(),o=Mi(),i=Ud(),a=zd(),s=qd(),u=lc(),l=Ou(),c=Hl(),d=ks(),f=Md(),p=$d(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",C="entries",D=function(){return this};return Sd=function(r,d,p,w,A,S,x){i(p,d,w);var O,N,B,T=function(e){if(e===A&&_)return _;if(!m&&e&&e in I)return I[e];switch(e){case b:case E:case C:return function(){return new p(this,e)}}return function(){return new p(this)}},k=d+" Iterator",F=!1,I=r.prototype,P=I[y]||I["@@iterator"]||A&&I[A],_=!m&&P||T(A),L="Array"===d&&I.entries||P;if(L&&(O=a(L.call(new r)))!==Object.prototype&&O.next&&(n||a(O)===v||(s?s(O,v):o(O[y])||c(O,y,D)),u(O,k,!0,!0),n&&(f[k]=D)),h&&A===E&&P&&P.name!==E&&(!n&&g?l(I,"name",E):(F=!0,_=function(){return t(P,this)})),A)if(N={values:T(E),keys:S?_:T(b),entries:T(C)},x)for(B in N)(m||F||!(B in I))&&c(I,B,N[B]);else e({target:d,proto:!0,forced:m||F},N);return n&&!x||I[y]===_||c(I,y,_,{name:A}),f[d]=_,N}}function Yd(){return Nd?Od:(Nd=1,Od=function(e,t){return{value:e,done:t}})}function Xd(){if(Td)return Bd;Td=1;var e=_a(),t=Rd(),n=Md(),r=dc(),o=xu().f,i=Kd(),a=Yd(),s=As(),u=Vi(),l="Array Iterator",c=r.set,d=r.getterFor(l);Bd=i(Array,"Array",function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)},"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return Bd}function Zd(){return Fd?kd:(Fd=1,kd={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})}function Jd(){if(Id)return Ld;Id=1,Xd();var e=Zd(),t=ki(),n=lc(),r=Md();for(var o in e)n(t[o],o),r[o]=r.Array;return Ld}function Qd(){if(_d)return Pd;_d=1;var e=nd();return Jd(),Pd=e}var ef,tf={};var nf;var rf;var of,af,sf;function uf(){if(sf)return af;sf=1;var e=Qd();return function(){if(ef)return tf;ef=1;var e=ks(),t=xu().f,n=e("metadata"),r=Function.prototype;void 0===r[n]&&t(r,n,{value:null})}(),nf||(nf=1,kc()),rf||(rf=1,_c()),of||(of=1,ac()("metadata")),af=e}var lf,cf,df;function ff(){if(cf)return lf;cf=1;var e=Ma(),t=_i(),n=e("Symbol"),r=n.keyFor,o=t(n.prototype.valueOf);return lf=n.isRegisteredSymbol||function(e){try{return void 0!==r(o(e))}catch(e){return!1}}}var pf,hf,gf;function vf(){if(hf)return pf;hf=1;for(var e=Os(),t=Ma(),n=_i(),r=Va(),o=ks(),i=t("Symbol"),a=i.isWellKnownSymbol,s=t("Object","getOwnPropertyNames"),u=n(i.prototype.valueOf),l=e("wks"),c=0,d=s(i),f=d.length;c<f;c++)try{var p=d[c];r(i[p])&&o(p)}catch(e){}return pf=function(e){if(a&&a(e))return!0;try{for(var t=u(e),n=0,r=s(l),o=r.length;n<o;n++)if(l[r[n]]==t)return!0}catch(e){}return!1},pf}var mf;var yf;var bf;var Ef;var Cf;var Df;var wf;var Af,Sf,xf,Of,Nf;function Bf(){if(xf)return Sf;xf=1;var e=uf();return df||(df=1,Nu()({target:"Symbol",stat:!0},{isRegisteredSymbol:ff()})),gf||(gf=1,Nu()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:vf()})),mf||(mf=1,ac()("customMatcher")),yf||(yf=1,ac()("observable")),bf||(bf=1,Nu()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:ff()})),Ef||(Ef=1,Nu()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:vf()})),Cf||(Cf=1,ac()("matcher")),Df||(Df=1,ac()("metadataKey")),wf||(wf=1,ac()("patternMatch")),Af||(Af=1,ac()("replaceAll")),Sf=e}function Tf(){return Nf?Of:(Nf=1,Of=Bf())}var kf,Ff,If,Pf,_f,Lf,Rf,Mf,jf,Hf,zf,$f,Uf,Vf=b(Tf()),Wf={};function Gf(){if(Ff)return kf;Ff=1;var e=_i(),t=ku(),n=qu(),r=Pa(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=n(r(s)),f=t(u),p=d.length;return f<0||f>=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return kf={codeAt:s(!1),charAt:s(!0)}}function qf(){return _f?Pf:(_f=1,Xd(),function(){if(If)return Wf;If=1;var e=Gf().charAt,t=qu(),n=dc(),r=Kd(),o=Yd(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))})}(),Hc(),Pf=ic().f("iterator"))}function Kf(){if(Rf)return Lf;Rf=1;var e=qf();return Jd(),Lf=e}function Yf(){return jf?Mf:(jf=1,Mf=Kf())}function Xf(){return zf?Hf:(zf=1,Hf=Yf())}function Zf(){return Uf?$f:(Uf=1,$f=Xf())}var Jf=b(Zf());function Qf(e){return Qf="function"==typeof Vf&&"symbol"==typeof Jf?function(e){return typeof e}:function(e){return e&&"function"==typeof Vf&&e.constructor===Vf&&e!==Vf.prototype?"symbol":typeof e},Qf(e)}var ep,tp={};if(function(){if(ep)return tp;ep=1;var e=fr(),t=C(),n=N(),r=gn().f,o=Se();e({target:"Object",stat:!0,forced:!o||t(function(){r(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}})}(),"object"===("undefined"==typeof global?"undefined":Qf(global))){var np=Object.getOwnPropertyDescriptor(global,"window");global.window&&!np.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),null!=global.document&&null==global.document.getElementsByTagName&&(global.document.getElementsByTagName=function(){return[]})}
|
|
2
2
|
/*!
|
|
3
3
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
6
6
|
* Released under the MIT License.
|
|
7
|
-
*/function Wf(e){return"[object Object]"===Object.prototype.toString.call(e)}function qf(e){var t,n;return!1!==Wf(e)&&(void 0===(t=e.constructor)||!1!==Wf(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}function Kf(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Yf(e){return!!e&&!!e[Pp]}function Xf(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Lp}(e)||Array.isArray(e)||!!e[Ip]||!!e.constructor[Ip]||tp(e)||np(e))}function Zf(e,t,n){void 0===n&&(n=!1),0===Jf(e)?(n?Object.keys:Rp)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function Jf(e){var t=e[Pp];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:tp(e)?2:np(e)?3:0}function Qf(e,t){return 2===Jf(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ep(e,t,n){var r=Jf(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function tp(e){return Bp&&e instanceof Map}function np(e){return Tp&&e instanceof Set}function rp(e){return e.o||e.t}function op(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=_p(e);delete t[Pp];for(var n=Rp(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function ip(e,t){return void 0===t&&(t=!1),sp(e)||Yf(e)||!Xf(e)||(Jf(e)>1&&(e.set=e.add=e.clear=e.delete=ap),Object.freeze(e),t&&Zf(e,(function(e,t){return ip(t,!0)}),!0)),e}function ap(){Kf(2)}function sp(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function up(e){var t=Mp[e];return t||Kf(18,e),t}function lp(){return Op}function cp(e,t){t&&(up("Patches"),e.u=[],e.s=[],e.v=t)}function dp(e){fp(e),e.p.forEach(hp),e.p=null}function fp(e){e===Op&&(Op=e.l)}function pp(e){return Op={p:[],l:Op,h:e,m:!0,_:0}}function hp(e){var t=e[Pp];0===t.i||1===t.i?t.j():t.O=!0}function gp(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.g||up("ES5").S(t,e,r),r?(n[Pp].P&&(dp(t),Kf(4)),Xf(e)&&(e=vp(t,e),t.l||yp(t,e)),t.u&&up("Patches").M(n[Pp],e,t.u,t.s)):e=vp(t,n,[]),dp(t),t.u&&t.v(t.u,t.s),e!==Fp?e:void 0}function vp(e,t,n){if(sp(t))return t;var r=t[Pp];if(!r)return Zf(t,(function(o,i){return mp(e,r,t,o,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return yp(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=op(r.k):r.o;Zf(3===r.i?new Set(o):o,(function(t,i){return mp(e,r,o,t,i,n)})),yp(e,o,!1),n&&e.u&&up("Patches").R(r,n,e.u,e.s)}return r.o}function mp(e,t,n,r,o,i){if(Yf(o)){var a=vp(e,o,i&&t&&3!==t.i&&!Qf(t.D,r)?i.concat(r):void 0);if(ep(n,r,a),!Yf(a))return;e.m=!1}if(Xf(o)&&!sp(o)){if(!e.h.F&&e._<1)return;vp(e,o),t&&t.A.l||yp(e,o)}}function yp(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&ip(t,n)}function bp(e,t){var n=e[Pp];return(n?rp(n):e)[t]}function Ep(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Cp(e){e.P||(e.P=!0,e.l&&Cp(e.l))}function Dp(e){e.o||(e.o=op(e.t))}function wp(e,t,n){var r=tp(t)?up("MapSet").N(t,n):np(t)?up("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:lp(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=jp;n&&(o=[r],i=Hp);var a=Proxy.revocable(o,i),s=a.revoke,u=a.proxy;return r.k=u,r.j=s,u}(t,n):up("ES5").J(t,n);return(n?n.A:lp()).p.push(r),r}function Ap(e){return Yf(e)||Kf(22,e),function e(t){if(!Xf(t))return t;var n,r=t[Pp],o=Jf(t);if(r){if(!r.P&&(r.i<4||!up("ES5").K(r)))return r.t;r.I=!0,n=Sp(t,o),r.I=!1}else n=Sp(t,o);return Zf(n,(function(t,o){r&&function(e,t){return 2===Jf(e)?e.get(t):e[t]}(r.t,t)===o||ep(n,t,e(o))})),3===o?new Set(n):n}(e)}function Sp(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return op(e)}var xp,Op,Np="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Bp="undefined"!=typeof Map,Tp="undefined"!=typeof Set,kp="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Fp=Np?Symbol.for("immer-nothing"):((xp={})["immer-nothing"]=!0,xp),Ip=Np?Symbol.for("immer-draftable"):"__$immer_draftable",Pp=Np?Symbol.for("immer-state"):"__$immer_state",Lp=""+Object.prototype.constructor,Rp="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,_p=Object.getOwnPropertyDescriptors||function(e){var t={};return Rp(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Mp={},jp={get:function(e,t){if(t===Pp)return e;var n=rp(e);if(!Qf(n,t))return function(e,t,n){var r,o=Ep(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!Xf(r)?r:r===bp(e.t,t)?(Dp(e),e.o[t]=wp(e.A.h,r,e)):r},has:function(e,t){return t in rp(e)},ownKeys:function(e){return Reflect.ownKeys(rp(e))},set:function(e,t,n){var r=Ep(rp(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=bp(rp(e),t),i=null==o?void 0:o[Pp];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,o)&&(void 0!==n||Qf(e.t,t)))return!0;Dp(e),Cp(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==bp(e.t,t)||t in e.t?(e.D[t]=!1,Dp(e),Cp(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=rp(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){Kf(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){Kf(12)}},Hp={};Zf(jp,(function(e,t){Hp[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Hp.deleteProperty=function(e,t){return jp.deleteProperty.call(this,e[0],t)},Hp.set=function(e,t,n){return jp.set.call(this,e[0],t,n,e[0])};var zp=function(){function e(e){var t=this;this.g=kp,this.F=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var i=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return i.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(a))}))}}var a;if("function"!=typeof n&&Kf(6),void 0!==r&&"function"!=typeof r&&Kf(7),Xf(e)){var s=pp(t),u=wp(t,e,void 0),l=!0;try{a=n(u),l=!1}finally{l?dp(s):fp(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then((function(e){return cp(s,r),gp(e,s)}),(function(e){throw dp(s),e})):(cp(s,r),gp(a,s))}if(!e||"object"!=typeof e){if((a=n(e))===Fp)return;return void 0===a&&(a=e),t.F&&ip(a,!0),a}Kf(21,e)},this.produceWithPatches=function(e,n){return"function"==typeof e?function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(o))}))}:[t.produce(e,n,(function(e,t){r=e,o=t})),r,o];var r,o},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){Xf(e)||Kf(8),Yf(e)&&(e=Ap(e));var t=pp(this),n=wp(this,e,void 0);return n[Pp].C=!0,fp(t),n},t.finishDraft=function(e,t){var n=(e&&e[Pp]).A;return cp(n,t),gp(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!kp&&Kf(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=up("Patches").$;return Yf(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}(),$p=new zp,Up=$p.produce;$p.produceWithPatches.bind($p),$p.setAutoFreeze.bind($p),$p.setUseProxies.bind($p),$p.applyPatches.bind($p);var Vp=$p.createDraft.bind($p),Gp=$p.finishDraft.bind($p);function Wp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qp=new WeakMap,Kp=new WeakMap,Yp=new WeakMap,Xp=new WeakMap,Zp=new WeakMap,Jp=new WeakMap;function Qp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function eh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qp(Object(n),!0).forEach((function(t){Wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var th=()=>{var e={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:t=>{for(var n of Mh.pathRefs(e))Yh.transform(n,t);for(var r of Mh.pointRefs(e))Qh.transform(r,t);for(var o of Mh.rangeRefs(e))rg.transform(o,t);var i=new Set,a=[],s=e=>{if(e){var t=e.join(",");i.has(t)||(i.add(t),a.push(e))}},u=qp.get(e)||[],l=nh(t);for(var c of u){s(Kh.transform(c,t))}for(var d of l)s(d);qp.set(e,a),Og.transform(e,t),e.operations.push(t),Mh.normalize(e),"set_selection"===t.type&&(e.marks=null),Kp.get(e)||(Kp.set(e,!0),Promise.resolve().then((()=>{Kp.set(e,!1),e.onChange(),e.operations=[]})))},addMark:(t,n)=>{var{selection:r}=e;if(r)if(ng.isExpanded(r))Og.setNodes(e,{[t]:n},{match:lg.isText,split:!0});else{var o=eh(eh({},Mh.marks(e)||{}),{},{[t]:n});e.marks=o,Kp.get(e)||e.onChange()}},deleteBackward:t=>{var{selection:n}=e;n&&ng.isCollapsed(n)&&Og.delete(e,{unit:t,reverse:!0})},deleteForward:t=>{var{selection:n}=e;n&&ng.isCollapsed(n)&&Og.delete(e,{unit:t})},deleteFragment:t=>{var{selection:n}=e;n&&ng.isExpanded(n)&&Og.delete(e,{reverse:"backward"===t})},getFragment:()=>{var{selection:t}=e;return t?Vh.fragment(e,t):[]},insertBreak:()=>{Og.splitNodes(e,{always:!0})},insertFragment:t=>{Og.insertFragment(e,t)},insertNode:t=>{Og.insertNodes(e,t)},insertText:t=>{var{selection:n,marks:r}=e;if(n){if(r){var o=eh({text:t},r);Og.insertNodes(e,o)}else Og.insertText(e,t);e.marks=null}},normalizeNode:t=>{var[n,r]=t;if(!lg.isText(n))if(Fh.isElement(n)&&0===n.children.length){Og.insertNodes(e,{text:""},{at:r.concat(0),voids:!0})}else for(var o=!Mh.isEditor(n)&&(Fh.isElement(n)&&(e.isInline(n)||0===n.children.length||lg.isText(n.children[0])||e.isInline(n.children[0]))),i=0,a=0;a<n.children.length;a++,i++){var s=Vh.get(e,r);if(!lg.isText(s)){var u=n.children[a],l=s.children[i-1],c=a===n.children.length-1;if((lg.isText(u)||Fh.isElement(u)&&e.isInline(u))!==o)Og.removeNodes(e,{at:r.concat(i),voids:!0}),i--;else if(Fh.isElement(u)){if(e.isInline(u))if(null!=l&&lg.isText(l)){if(c){Og.insertNodes(e,{text:""},{at:r.concat(i+1),voids:!0}),i++}}else{Og.insertNodes(e,{text:""},{at:r.concat(i),voids:!0}),i++}}else null!=l&&lg.isText(l)&&(lg.equals(u,l,{loose:!0})?(Og.mergeNodes(e,{at:r.concat(i),voids:!0}),i--):""===l.text?(Og.removeNodes(e,{at:r.concat(i-1),voids:!0}),i--):""===u.text&&(Og.removeNodes(e,{at:r.concat(i),voids:!0}),i--))}}},removeMark:t=>{var{selection:n}=e;if(n)if(ng.isExpanded(n))Og.unsetNodes(e,t,{match:lg.isText,split:!0});else{var r=eh({},Mh.marks(e)||{});delete r[t],e.marks=r,Kp.get(e)||e.onChange()}}};return e},nh=e=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":var{path:t}=e;return Kh.levels(t);case"insert_node":var{node:n,path:r}=e,o=Kh.levels(r),i=lg.isText(n)?[]:Array.from(Vh.nodes(n),(e=>{var[,t]=e;return r.concat(t)}));return[...o,...i];case"merge_node":var{path:a}=e;return[...Kh.ancestors(a),Kh.previous(a)];case"move_node":var{path:s,newPath:u}=e;if(Kh.equals(s,u))return[];var l=[],c=[];for(var d of Kh.ancestors(s)){var f=Kh.transform(d,e);l.push(f)}for(var p of Kh.ancestors(u)){var h=Kh.transform(p,e);c.push(h)}var g=c[c.length-1],v=u[u.length-1],m=g.concat(v);return[...l,...c,m];case"remove_node":var{path:y}=e;return[...Kh.ancestors(y)];case"split_node":var{path:b}=e;return[...Kh.levels(b),Kh.next(b)];default:return[]}};function rh(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var oh,ih=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!t,r=t?dh(e):e,o=oh.None,i=oh.None,a=0,s=null;for(var u of r){var l=u.codePointAt(0);if(!l)break;var c=wh(u,l);if([o,i]=n?[i,c]:[c,o],Ah(o,oh.ZWJ)&&Ah(i,oh.ExtPict)&&!Nh(n?e.substring(0,a):e.substring(0,e.length-a)))break;if(Ah(o,oh.RI)&&Ah(i,oh.RI)&&!(s=null!==s?!s:!!n||Th(e.substring(0,e.length-a))))break;if(o!==oh.None&&i!==oh.None&&xh(o,i))break;a+=u.length}return a||1},ah=/\s/,sh=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,uh=/['\u2018\u2019]/,lh=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},ch=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(ah.test(t))return!1;if(uh.test(t)){var o=ih(n,r),[i,a]=lh(n,o,r);if(e(i,a,r))return!0}return!sh.test(t)},dh=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var r=e.charAt(t-n);if(ph(r.charCodeAt(0))){var o=e.charAt(t-n-1);if(fh(o.charCodeAt(0))){yield o+r,n++;continue}}yield r}},fh=e=>e>=55296&&e<=56319,ph=e=>e>=56320&&e<=57343;!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(oh||(oh={}));var hh=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,gh=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,vh=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,mh=/^[\u1100-\u115F\uA960-\uA97C]$/,yh=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,bh=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Eh=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Ch=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,Dh=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,wh=(e,t)=>{var n=oh.Any;return-1!==e.search(hh)&&(n|=oh.Extend),8205===t&&(n|=oh.ZWJ),t>=127462&&t<=127487&&(n|=oh.RI),-1!==e.search(gh)&&(n|=oh.Prepend),-1!==e.search(vh)&&(n|=oh.SpacingMark),-1!==e.search(mh)&&(n|=oh.L),-1!==e.search(yh)&&(n|=oh.V),-1!==e.search(bh)&&(n|=oh.T),-1!==e.search(Eh)&&(n|=oh.LV),-1!==e.search(Ch)&&(n|=oh.LVT),-1!==e.search(Dh)&&(n|=oh.ExtPict),n};function Ah(e,t){return!!(e&t)}var Sh=[[oh.L,oh.L|oh.V|oh.LV|oh.LVT],[oh.LV|oh.V,oh.V|oh.T],[oh.LVT|oh.T,oh.T],[oh.Any,oh.Extend|oh.ZWJ],[oh.Any,oh.SpacingMark],[oh.Prepend,oh.Any],[oh.ZWJ,oh.ExtPict],[oh.RI,oh.RI]];function xh(e,t){return-1===Sh.findIndex((n=>Ah(e,n[0])&&Ah(t,n[1])))}var Oh=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,Nh=e=>-1!==e.search(Oh),Bh=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Th=e=>{var t=e.match(Bh);return null!==t&&t[0].length/2%2==1},kh=e=>qf(e)&&Vh.isNodeList(e.children)&&!Mh.isEditor(e),Fh={isAncestor:e=>qf(e)&&Vh.isNodeList(e.children),isElement:kh,isElementList:e=>Array.isArray(e)&&e.every((e=>Fh.isElement(e))),isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return kh(e)&&e[n]===t},matches(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},Ih=["text"],Ph=["text"];function Lh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lh(Object(n),!0).forEach((function(t){Wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _h=new WeakMap,Mh={above(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{voids:n=!1,mode:r="lowest",at:o=e.selection,match:i}=t;if(o){var a=Mh.path(e,o),s="lowest"===r;for(var[u,l]of Mh.levels(e,{at:a,voids:n,match:i,reverse:s}))if(!lg.isText(u)&&!Kh.equals(a,l))return[u,l]}},addMark(e,t,n){e.addMark(t,n)},after(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={anchor:Mh.point(e,t,{edge:"end"}),focus:Mh.end(e,[])},{distance:i=1}=r,a=0;for(var s of Mh.positions(e,Rh(Rh({},r),{},{at:o}))){if(a>i)break;0!==a&&(n=s),a++}return n},before(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={anchor:Mh.start(e,[]),focus:Mh.point(e,t,{edge:"start"})},{distance:i=1}=r,a=0;for(var s of Mh.positions(e,Rh(Rh({},r),{},{at:o,reverse:!0}))){if(a>i)break;0!==a&&(n=s),a++}return n},deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{direction:n="forward"}=t;e.deleteFragment(n)},edges:(e,t)=>[Mh.start(e,t),Mh.end(e,t)],end:(e,t)=>Mh.point(e,t,{edge:"end"}),first(e,t){var n=Mh.path(e,t,{edge:"start"});return Mh.node(e,n)},fragment(e,t){var n=Mh.range(e,t);return Vh.fragment(e,n)},hasBlocks:(e,t)=>t.children.some((t=>Mh.isBlock(e,t))),hasInlines:(e,t)=>t.children.some((t=>lg.isText(t)||Mh.isInline(e,t))),hasTexts:(e,t)=>t.children.every((e=>lg.isText(e))),insertBreak(e){e.insertBreak()},insertFragment(e,t){e.insertFragment(t)},insertNode(e,t){e.insertNode(t)},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>Fh.isElement(t)&&!e.isInline(t),isEditor(e){if(!qf(e))return!1;var t=_h.get(e);if(void 0!==t)return t;var n="function"==typeof e.addMark&&"function"==typeof e.apply&&"function"==typeof e.deleteBackward&&"function"==typeof e.deleteForward&&"function"==typeof e.deleteFragment&&"function"==typeof e.insertBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertText&&"function"==typeof e.isInline&&"function"==typeof e.isVoid&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.removeMark&&(null===e.marks||qf(e.marks))&&(null===e.selection||ng.isRange(e.selection))&&Vh.isNodeList(e.children)&&qh.isOperationList(e.operations);return _h.set(e,n),n},isEnd(e,t,n){var r=Mh.end(e,n);return Jh.equals(t,r)},isEdge:(e,t,n)=>Mh.isStart(e,t,n)||Mh.isEnd(e,t,n),isEmpty(e,t){var{children:n}=t,[r]=n;return 0===n.length||1===n.length&&lg.isText(r)&&""===r.text&&!e.isVoid(t)},isInline:(e,t)=>Fh.isElement(t)&&e.isInline(t),isNormalizing(e){var t=Yp.get(e);return void 0===t||t},isStart(e,t,n){if(0!==t.offset)return!1;var r=Mh.start(e,n);return Jh.equals(t,r)},isVoid:(e,t)=>Fh.isElement(t)&&e.isVoid(t),last(e,t){var n=Mh.path(e,t,{edge:"end"});return Mh.node(e,n)},leaf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Mh.path(e,t,n);return[Vh.leaf(e,r),r]},*levels(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,reverse:r=!1,voids:o=!1}=t,{match:i}=t;if(null==i&&(i=()=>!0),n){var a=[],s=Mh.path(e,n);for(var[u,l]of Vh.levels(e,s))if(i(u,l)&&(a.push([u,l]),!o&&Mh.isVoid(e,u)))break;r&&a.reverse(),yield*a}},marks(e){var{marks:t,selection:n}=e;if(!n)return null;if(t)return t;if(ng.isExpanded(n)){var[r]=Mh.nodes(e,{match:lg.isText});if(r){var[o]=r;return rh(o,Ih)}return{}}var{anchor:i}=n,{path:a}=i,[s]=Mh.leaf(e,a);if(0===i.offset){var u=Mh.previous(e,{at:a,match:lg.isText}),l=Mh.above(e,{match:t=>Mh.isBlock(e,t)});if(u&&l){var[c,d]=u,[,f]=l;Kh.isAncestor(f,d)&&(s=c)}}return rh(s,Ph)},next(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection}=t;if(i){var a=Mh.after(e,i,{voids:r});if(a){var[,s]=Mh.last(e,[]),u=[a.path,s];if(Kh.isPath(i)&&0===i.length)throw new Error("Cannot get the next node from the root node!");if(null==o)if(Kh.isPath(i)){var[l]=Mh.parent(e,i);o=e=>l.children.includes(e)}else o=()=>!0;var[c]=Mh.nodes(e,{at:u,match:o,mode:n,voids:r});return c}}},node(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Mh.path(e,t,n);return[Vh.get(e,r),r]},*nodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,mode:r="all",universal:o=!1,reverse:i=!1,voids:a=!1}=t,{match:s}=t;if(s||(s=()=>!0),n){var u,l;if(Hh.isSpan(n))u=n[0],l=n[1];else{var c=Mh.path(e,n,{edge:"start"}),d=Mh.path(e,n,{edge:"end"});u=i?d:c,l=i?c:d}var f,p=Vh.nodes(e,{reverse:i,from:u,to:l,pass:t=>{var[n]=t;return!a&&Mh.isVoid(e,n)}}),h=[];for(var[g,v]of p){var m=f&&0===Kh.compare(v,f[1]);if("highest"!==r||!m)if(s(g,v))if("lowest"===r&&m)f=[g,v];else{var y="lowest"===r?f:[g,v];y&&(o?h.push(y):yield y),f=[g,v]}else if(o&&!m&&lg.isText(g))return}"lowest"===r&&f&&(o?h.push(f):yield f),o&&(yield*h)}},normalize(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{force:n=!1}=t,r=e=>qp.get(e)||[];if(Mh.isNormalizing(e)){if(n){var o=Array.from(Vh.nodes(e),(e=>{var[,t]=e;return t}));qp.set(e,o)}0!==r(e).length&&Mh.withoutNormalizing(e,(()=>{for(var t of r(e))if(Vh.has(e,t)){var n=Mh.node(e,t),[o,i]=n;Fh.isElement(o)&&0===o.children.length&&e.normalizeNode(n)}for(var a=42*r(e).length,s=0;0!==r(e).length;){if(s>a)throw new Error("\n Could not completely normalize the editor after ".concat(a," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.\n "));var u=r(e).pop();if(Vh.has(e,u)){var l=Mh.node(e,u);e.normalizeNode(l)}s++}}))}},parent(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Mh.path(e,t,n),o=Kh.parent(r);return Mh.node(e,o)},path(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{depth:r,edge:o}=n;if(Kh.isPath(t))if("start"===o){var[,i]=Vh.first(e,t);t=i}else if("end"===o){var[,a]=Vh.last(e,t);t=a}return ng.isRange(t)&&(t="start"===o?ng.start(t):"end"===o?ng.end(t):Kh.common(t.anchor.path,t.focus.path)),Jh.isPoint(t)&&(t=t.path),null!=r&&(t=t.slice(0,r)),t},hasPath:(e,t)=>Vh.has(e,t),pathRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return Mh.pathRefs(e).delete(o),o.current=null,t}};return Mh.pathRefs(e).add(o),o},pathRefs(e){var t=Xp.get(e);return t||(t=new Set,Xp.set(e,t)),t},point(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{edge:r="start"}=n;if(Kh.isPath(t)){var o;if("end"===r){var[,i]=Vh.last(e,t);o=i}else{var[,a]=Vh.first(e,t);o=a}var s=Vh.get(e,o);if(!lg.isText(s))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:o,offset:"end"===r?s.text.length:0}}if(ng.isRange(t)){var[u,l]=ng.edges(t);return"start"===r?u:l}return t},pointRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return Mh.pointRefs(e).delete(o),o.current=null,t}};return Mh.pointRefs(e).add(o),o},pointRefs(e){var t=Zp.get(e);return t||(t=new Set,Zp.set(e,t)),t},*positions(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,unit:r="offset",reverse:o=!1,voids:i=!1}=t;if(n){var a=Mh.range(e,n),[s,u]=ng.edges(a),l=o?u:s,c=!1,d="",f=0,p=0,h=0;for(var[g,v]of Mh.nodes(e,{at:n,reverse:o,voids:i})){if(Fh.isElement(g)){if(!i&&e.isVoid(g)){yield Mh.start(e,v);continue}if(e.isInline(g))continue;if(Mh.hasInlines(e,g)){var m=Kh.isAncestor(v,u.path)?u:Mh.end(e,v),y=Kh.isAncestor(v,s.path)?s:Mh.start(e,v);d=Mh.string(e,{anchor:y,focus:m},{voids:i}),c=!0}}if(lg.isText(g)){var b=Kh.equals(v,l.path);for(b?(p=o?l.offset:g.text.length-l.offset,h=l.offset):(p=g.text.length,h=o?p:0),(b||c||"offset"===r)&&(yield{path:v,offset:h},c=!1);;){if(0===f){if(""===d)break;f=E(d,r,o),d=lh(d,f,o)[1]}if(h=o?h-f:h+f,(p-=f)<0){f=-p;break}f=0,yield{path:v,offset:h}}}}}function E(e,t,n){return"character"===t?ih(e,n):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;e.length>0;){var o=ih(e,t),[i,a]=lh(e,o,t);if(ch(i,a,t))r=!0,n+=o;else{if(r)break;n+=o}e=a}return n}(e,n):"line"===t||"block"===t?e.length:1}},previous(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection}=t;if(i){var a=Mh.before(e,i,{voids:r});if(a){var[,s]=Mh.first(e,[]),u=[a.path,s];if(Kh.isPath(i)&&0===i.length)throw new Error("Cannot get the previous node from the root node!");if(null==o)if(Kh.isPath(i)){var[l]=Mh.parent(e,i);o=e=>l.children.includes(e)}else o=()=>!0;var[c]=Mh.nodes(e,{reverse:!0,at:u,match:o,mode:n,voids:r});return c}}},range:(e,t,n)=>ng.isRange(t)&&!n?t:{anchor:Mh.start(e,t),focus:Mh.end(e,n||t)},rangeRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return Mh.rangeRefs(e).delete(o),o.current=null,t}};return Mh.rangeRefs(e).add(o),o},rangeRefs(e){var t=Jp.get(e);return t||(t=new Set,Jp.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){Yp.set(e,t)},start:(e,t)=>Mh.point(e,t,{edge:"start"}),string(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,o=Mh.range(e,t),[i,a]=ng.edges(o),s="";for(var[u,l]of Mh.nodes(e,{at:o,match:lg.isText,voids:r})){var c=u.text;Kh.equals(l,a.path)&&(c=c.slice(0,a.offset)),Kh.equals(l,i.path)&&(c=c.slice(i.offset)),s+=c}return s},unhangRange(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,[o,i]=ng.edges(t);if(0!==o.offset||0!==i.offset||ng.isCollapsed(t))return t;var a=Mh.above(e,{at:i,match:t=>Mh.isBlock(e,t)}),s=a?a[1]:[],u={anchor:Mh.start(e,[]),focus:i},l=!0;for(var[c,d]of Mh.nodes(e,{at:u,match:lg.isText,reverse:!0,voids:r}))if(l)l=!1;else if(""!==c.text||Kh.isBefore(d,s)){i={path:d,offset:c.text.length};break}return{anchor:o,focus:i}},void(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Mh.above(e,Rh(Rh({},t),{},{match:t=>Mh.isVoid(e,t)}))},withoutNormalizing(e,t){var n=Mh.isNormalizing(e);Mh.setNormalizing(e,!1);try{t()}finally{Mh.setNormalizing(e,n)}Mh.normalize(e)}},jh={isLocation:e=>Kh.isPath(e)||Jh.isPoint(e)||ng.isRange(e)},Hh={isSpan:e=>Array.isArray(e)&&2===e.length&&e.every(Kh.isPath)},zh=["children"],$h=["text"],Uh=new WeakMap,Vh={ancestor(e,t){var n=Vh.get(e,t);if(lg.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(n));return n},*ancestors(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var r of Kh.ancestors(t,n)){var o=[Vh.ancestor(e,r),r];yield o}},child(e,t){if(lg.isText(e))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(JSON.stringify(e)));return n},*children(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{reverse:r=!1}=n,o=Vh.ancestor(e,t),{children:i}=o,a=r?i.length-1:0;r?a>=0:a<i.length;){var s=Vh.child(o,a),u=t.concat(a);yield[s,u],a=r?a-1:a+1}},common(e,t,n){var r=Kh.common(t,n);return[Vh.get(e,r),r]},descendant(e,t){var n=Vh.get(e,t);if(Mh.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(n));return n},*descendants(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of Vh.nodes(e,t))0!==r.length&&(yield[n,r])},*elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of Vh.nodes(e,t))Fh.isElement(n)&&(yield[n,r])},extractProps:e=>Fh.isAncestor(e)?rh(e,zh):rh(e,$h),first(e,t){for(var n=t.slice(),r=Vh.get(e,n);r&&!lg.isText(r)&&0!==r.children.length;)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(lg.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var n=Up({children:e.children},(e=>{var[n,r]=ng.edges(t),o=Vh.nodes(e,{reverse:!0,pass:e=>{var[,n]=e;return!ng.includes(t,n)}});for(var[,i]of o){if(!ng.includes(t,i)){var a=Vh.parent(e,i),s=i[i.length-1];a.children.splice(s,1)}if(Kh.equals(i,r.path)){var u=Vh.leaf(e,i);u.text=u.text.slice(0,r.offset)}if(Kh.equals(i,n.path)){var l=Vh.leaf(e,i);l.text=l.text.slice(n.offset)}}Mh.isEditor(e)&&(e.selection=null)}));return n.children},get(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(lg.isText(n)||!n.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(JSON.stringify(e)));n=n.children[o]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(lg.isText(n)||!n.children[o])return!1;n=n.children[o]}return!0},isNode:e=>lg.isText(e)||Fh.isElement(e)||Mh.isEditor(e),isNodeList(e){if(!Array.isArray(e))return!1;var t=Uh.get(e);if(void 0!==t)return t;var n=e.every((e=>Vh.isNode(e)));return Uh.set(e,n),n},last(e,t){for(var n=t.slice(),r=Vh.get(e,n);r&&!lg.isText(r)&&0!==r.children.length;){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf(e,t){var n=Vh.get(e,t);if(!lg.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(n));return n},*levels(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var r of Kh.levels(t,n)){var o=Vh.get(e,r);yield[o,r]}},matches:(e,t)=>Fh.isElement(e)&&Fh.isElementProps(t)&&Fh.matches(e,t)||lg.isText(e)&&lg.isTextProps(t)&&lg.matches(e,t),*nodes(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{pass:n,reverse:r=!1}=t,{from:o=[],to:i}=t,a=new Set,s=[],u=e;!i||!(r?Kh.isBefore(s,i):Kh.isAfter(s,i));)if(a.has(u)||(yield[u,s]),a.has(u)||lg.isText(u)||0===u.children.length||null!=n&&!1!==n([u,s])){if(0===s.length)break;if(!r){var l=Kh.next(s);if(Vh.has(e,l)){s=l,u=Vh.get(e,s);continue}}if(r&&0!==s[s.length-1])s=Kh.previous(s),u=Vh.get(e,s);else s=Kh.parent(s),u=Vh.get(e,s),a.add(u)}else{a.add(u);var c=r?u.children.length-1:0;Kh.isAncestor(s,o)&&(c=o[s.length]),s=s.concat(c),u=Vh.get(e,s)}},parent(e,t){var n=Kh.parent(t),r=Vh.get(e,n);if(lg.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:e=>lg.isText(e)?e.text:e.children.map(Vh.string).join(""),*texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of Vh.nodes(e,t))lg.isText(n)&&(yield[n,r])}};function Gh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gh(Object(n),!0).forEach((function(t){Wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qh={isNodeOperation:e=>qh.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!qf(e))return!1;switch(e.type){case"insert_node":case"remove_node":return Kh.isPath(e.path)&&Vh.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&Kh.isPath(e.path);case"merge_node":return"number"==typeof e.position&&Kh.isPath(e.path)&&qf(e.properties);case"move_node":return Kh.isPath(e.path)&&Kh.isPath(e.newPath);case"set_node":return Kh.isPath(e.path)&&qf(e.properties)&&qf(e.newProperties);case"set_selection":return null===e.properties&&ng.isRange(e.newProperties)||null===e.newProperties&&ng.isRange(e.properties)||qf(e.properties)&&qf(e.newProperties);case"split_node":return Kh.isPath(e.path)&&"number"==typeof e.position&&qf(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every((e=>qh.isOperation(e))),isSelectionOperation:e=>qh.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>qh.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return Wh(Wh({},e),{},{type:"remove_node"});case"insert_text":return Wh(Wh({},e),{},{type:"remove_text"});case"merge_node":return Wh(Wh({},e),{},{type:"split_node",path:Kh.previous(e.path)});case"move_node":var{newPath:t,path:n}=e;if(Kh.equals(t,n))return e;if(Kh.isSibling(n,t))return Wh(Wh({},e),{},{path:t,newPath:n});var r=Kh.transform(n,e),o=Kh.transform(Kh.next(n),e);return Wh(Wh({},e),{},{path:r,newPath:o});case"remove_node":return Wh(Wh({},e),{},{type:"insert_node"});case"remove_text":return Wh(Wh({},e),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=e;return Wh(Wh({},e),{},{properties:a,newProperties:i});case"set_selection":var{properties:s,newProperties:u}=e;return Wh(Wh({},e),{},null==s?{properties:u,newProperties:null}:null==u?{properties:null,newProperties:s}:{properties:u,newProperties:s});case"split_node":return Wh(Wh({},e),{},{type:"merge_node",path:Kh.next(e.path)})}}},Kh={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=Kh.levels(e,t);return r=n?r.slice(1):r.slice(0,-1)},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var o=e[r];if(o!==t[r])break;n.push(o)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return Kh.equals(r,o)&&i>a},endsAt(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return Kh.equals(r,o)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return Kh.equals(r,o)&&i<a},equals:(e,t)=>e.length===t.length&&e.every(((e,n)=>e===t[n])),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===Kh.compare(e,t),isAncestor:(e,t)=>e.length<t.length&&0===Kh.compare(e,t),isBefore:(e,t)=>-1===Kh.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===Kh.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===Kh.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===Kh.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===Kh.compare(e,t),isPath:e=>Array.isArray(e)&&(0===e.length||"number"==typeof e[0]),isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&Kh.equals(n,r)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!Kh.isAncestor(t,e)&&!Kh.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Up(e,(r=>{var{affinity:o="forward"}=n;if(e&&0!==(null==e?void 0:e.length)){if(null===r)return null;switch(t.type){case"insert_node":var{path:i}=t;(Kh.equals(i,r)||Kh.endsBefore(i,r)||Kh.isAncestor(i,r))&&(r[i.length-1]+=1);break;case"remove_node":var{path:a}=t;if(Kh.equals(a,r)||Kh.isAncestor(a,r))return null;Kh.endsBefore(a,r)&&(r[a.length-1]-=1);break;case"merge_node":var{path:s,position:u}=t;Kh.equals(s,r)||Kh.endsBefore(s,r)?r[s.length-1]-=1:Kh.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=u);break;case"split_node":var{path:l,position:c}=t;if(Kh.equals(l,r)){if("forward"===o)r[r.length-1]+=1;else if("backward"!==o)return null}else Kh.endsBefore(l,r)?r[l.length-1]+=1:Kh.isAncestor(l,r)&&e[l.length]>=c&&(r[l.length-1]+=1,r[l.length]-=c);break;case"move_node":var{path:d,newPath:f}=t;if(Kh.equals(d,f))return;if(Kh.isAncestor(d,r)||Kh.equals(d,r)){var p=f.slice();return Kh.endsBefore(d,f)&&d.length<f.length&&(p[d.length-1]-=1),p.concat(r.slice(d.length))}Kh.isSibling(d,f)&&(Kh.isAncestor(f,r)||Kh.equals(f,r))?Kh.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:Kh.endsBefore(f,r)||Kh.equals(f,r)||Kh.isAncestor(f,r)?(Kh.endsBefore(d,r)&&(r[d.length-1]-=1),r[f.length-1]+=1):Kh.endsBefore(d,r)&&(Kh.equals(f,r)&&(r[f.length-1]+=1),r[d.length-1]-=1)}}}))}},Yh={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=Kh.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}};function Xh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Zh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xh(Object(n),!0).forEach((function(t){Wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xh(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Jh={compare(e,t){var n=Kh.compare(e.path,t.path);return 0===n?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter:(e,t)=>1===Jh.compare(e,t),isBefore:(e,t)=>-1===Jh.compare(e,t),equals:(e,t)=>e.offset===t.offset&&Kh.equals(e.path,t.path),isPoint:e=>qf(e)&&"number"==typeof e.offset&&Kh.isPath(e.path),transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Up(e,(e=>{if(null===e)return null;var{affinity:r="forward"}=n,{path:o,offset:i}=e;switch(t.type){case"insert_node":case"move_node":e.path=Kh.transform(o,t,n);break;case"insert_text":Kh.equals(t.path,o)&&t.offset<=i&&(e.offset+=t.text.length);break;case"merge_node":Kh.equals(t.path,o)&&(e.offset+=t.position),e.path=Kh.transform(o,t,n);break;case"remove_text":Kh.equals(t.path,o)&&t.offset<=i&&(e.offset-=Math.min(i-t.offset,t.text.length));break;case"remove_node":if(Kh.equals(t.path,o)||Kh.isAncestor(t.path,o))return null;e.path=Kh.transform(o,t,n);break;case"split_node":if(Kh.equals(t.path,o)){if(t.position===i&&null==r)return null;(t.position<i||t.position===i&&"forward"===r)&&(e.offset-=t.position,e.path=Kh.transform(o,t,Zh(Zh({},n),{},{affinity:"forward"})))}else e.path=Kh.transform(o,t,n)}}))}},Qh={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=Jh.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},eg=["anchor","focus"];function tg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ng={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:o}=e;return ng.isBackward(e)===n?[r,o]:[o,r]},end(e){var[,t]=ng.edges(e);return t},equals:(e,t)=>Jh.equals(e.anchor,t.anchor)&&Jh.equals(e.focus,t.focus),includes(e,t){if(ng.isRange(t)){if(ng.includes(e,t.anchor)||ng.includes(e,t.focus))return!0;var[n,r]=ng.edges(e),[o,i]=ng.edges(t);return Jh.isBefore(n,o)&&Jh.isAfter(r,i)}var[a,s]=ng.edges(e),u=!1,l=!1;return Jh.isPoint(t)?(u=Jh.compare(t,a)>=0,l=Jh.compare(t,s)<=0):(u=Kh.compare(t,a.path)>=0,l=Kh.compare(t,s.path)<=0),u&&l},intersection(e,t){var n=rh(e,eg),[r,o]=ng.edges(e),[i,a]=ng.edges(t),s=Jh.isBefore(r,i)?i:r,u=Jh.isBefore(o,a)?o:a;return Jh.isBefore(u,s)?null:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tg(Object(n),!0).forEach((function(t){Wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({anchor:s,focus:u},n)},isBackward(e){var{anchor:t,focus:n}=e;return Jh.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return Jh.equals(t,n)},isExpanded:e=>!ng.isCollapsed(e),isForward:e=>!ng.isBackward(e),isRange:e=>qf(e)&&Jh.isPoint(e.anchor)&&Jh.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=ng.edges(e);return t},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Up(e,(e=>{if(null===e)return null;var r,o,{affinity:i="inward"}=n;if("inward"===i){var a=ng.isCollapsed(e);ng.isForward(e)?(r="forward",o=a?r:"backward"):(r="backward",o=a?r:"forward")}else"outward"===i?ng.isForward(e)?(r="backward",o="forward"):(r="forward",o="backward"):(r=i,o=i);var s=Jh.transform(e.anchor,t,{affinity:r}),u=Jh.transform(e.focus,t,{affinity:o});if(!s||!u)return null;e.anchor=s,e.focus=u}))}},rg={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=ng.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},og=(e,t)=>{for(var n in e){var r=e[n],o=t[n];if(qf(r)&&qf(o)){if(!og(r,o))return!1}else if(Array.isArray(r)&&Array.isArray(o)){if(r.length!==o.length)return!1;for(var i=0;i<r.length;i++)if(r[i]!==o[i])return!1}else if(r!==o)return!1}for(var a in t)if(void 0===e[a]&&void 0!==t[a])return!1;return!0},ig=["text"],ag=["anchor","focus"];function sg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ug(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sg(Object(n),!0).forEach((function(t){Wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var lg={equals(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{loose:r=!1}=n;function o(e){return rh(e,ig)}return og(r?o(e):e,r?o(t):t)},isText:e=>qf(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every((e=>lg.isText(e))),isTextProps:e=>void 0!==e.text,matches(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[ug({},e)];for(var r of t){var o=rh(r,ag),[i,a]=ng.edges(r),s=[],u=0;for(var l of n){var{length:c}=l.text,d=u;if(u+=c,i.offset<=d&&a.offset>=u)Object.assign(l,o),s.push(l);else if(i.offset!==a.offset&&(i.offset===u||a.offset===d)||i.offset>u||a.offset<d||a.offset===d&&0!==d)s.push(l);else{var f=l,p=void 0,h=void 0;if(a.offset<u){var g=a.offset-d;h=ug(ug({},f),{},{text:f.text.slice(g)}),f=ug(ug({},f),{},{text:f.text.slice(0,g)})}if(i.offset>d){var v=i.offset-d;p=ug(ug({},f),{},{text:f.text.slice(0,v)}),f=ug(ug({},f),{},{text:f.text.slice(v)})}Object.assign(f,o),p&&s.push(p),s.push(f),h&&s.push(h)}}n=s}return n}};function cg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cg(Object(n),!0).forEach((function(t){Wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fg={transform(e,t){e.children=Vp(e.children);var n=e.selection&&Vp(e.selection);try{n=((e,t,n)=>{switch(n.type){case"insert_node":var{path:r,node:o}=n,i=Vh.parent(e,r),a=r[r.length-1];if(a>i.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(i.children.splice(a,0,o),t)for(var[s,u]of ng.points(t))t[u]=Jh.transform(s,n);break;case"insert_text":var{path:l,offset:c,text:d}=n;if(0===d.length)break;var f=Vh.leaf(e,l),p=f.text.slice(0,c),h=f.text.slice(c);if(f.text=p+d+h,t)for(var[g,v]of ng.points(t))t[v]=Jh.transform(g,n);break;case"merge_node":var{path:m}=n,y=Vh.get(e,m),b=Kh.previous(m),E=Vh.get(e,b),C=Vh.parent(e,m),D=m[m.length-1];if(lg.isText(y)&&lg.isText(E))E.text+=y.text;else{if(lg.isText(y)||lg.isText(E))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(m,"] to nodes of different interfaces: ").concat(y," ").concat(E));E.children.push(...y.children)}if(C.children.splice(D,1),t)for(var[w,A]of ng.points(t))t[A]=Jh.transform(w,n);break;case"move_node":var{path:S,newPath:x}=n;if(Kh.isAncestor(S,x))throw new Error("Cannot move a path [".concat(S,"] to new path [").concat(x,"] because the destination is inside itself."));var O=Vh.get(e,S),N=Vh.parent(e,S),B=S[S.length-1];N.children.splice(B,1);var T=Kh.transform(S,n),k=Vh.get(e,Kh.parent(T)),F=T[T.length-1];if(k.children.splice(F,0,O),t)for(var[I,P]of ng.points(t))t[P]=Jh.transform(I,n);break;case"remove_node":var{path:L}=n,R=L[L.length-1];if(Vh.parent(e,L).children.splice(R,1),t)for(var[_,M]of ng.points(t)){var j=Jh.transform(_,n);if(null!=t&&null!=j)t[M]=j;else{var H=void 0,z=void 0;for(var[$,U]of Vh.texts(e)){if(-1!==Kh.compare(U,L)){z=[$,U];break}H=[$,U]}var V=!1;H&&z&&(V=Kh.equals(z[1],L)?!Kh.hasPrevious(z[1]):Kh.common(H[1],L).length<Kh.common(z[1],L).length),H&&!V?(_.path=H[1],_.offset=H[0].text.length):z?(_.path=z[1],_.offset=0):t=null}}break;case"remove_text":var{path:G,offset:W,text:q}=n;if(0===q.length)break;var K=Vh.leaf(e,G),Y=K.text.slice(0,W),X=K.text.slice(W+q.length);if(K.text=Y+X,t)for(var[Z,J]of ng.points(t))t[J]=Jh.transform(Z,n);break;case"set_node":var{path:Q,properties:ee,newProperties:te}=n;if(0===Q.length)throw new Error("Cannot set properties on the root node!");var ne=Vh.get(e,Q);for(var re in te){if("children"===re||"text"===re)throw new Error('Cannot set the "'.concat(re,'" property of nodes!'));var oe=te[re];null==oe?delete ne[re]:ne[re]=oe}for(var ie in ee)te.hasOwnProperty(ie)||delete ne[ie];break;case"set_selection":var{newProperties:ae}=n;if(null==ae)t=ae;else{if(null==t){if(!ng.isRange(ae))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(ae)," when there is no current selection."));t=dg({},ae)}for(var se in ae){var ue=ae[se];if(null==ue){if("anchor"===se||"focus"===se)throw new Error('Cannot remove the "'.concat(se,'" selection property'));delete t[se]}else t[se]=ue}}break;case"split_node":var{path:le,position:ce,properties:de}=n;if(0===le.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(le,"] because the root node cannot be split."));var fe,pe=Vh.get(e,le),he=Vh.parent(e,le),ge=le[le.length-1];if(lg.isText(pe)){var ve=pe.text.slice(0,ce),me=pe.text.slice(ce);pe.text=ve,fe=dg(dg({},de),{},{text:me})}else{var ye=pe.children.slice(0,ce),be=pe.children.slice(ce);pe.children=ye,fe=dg(dg({},de),{},{children:be})}if(he.children.splice(ge+1,0,fe),t)for(var[Ee,Ce]of ng.points(t))t[Ce]=Jh.transform(Ee,n)}return t})(e,n,t)}finally{e.children=Gp(e.children),e.selection=n?Yf(n)?Gp(n):n:null}}},pg=["text"],hg=["children"];function gg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gg(Object(n),!0).forEach((function(t){Wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mg={insertNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Mh.withoutNormalizing(e,(()=>{var{hanging:r=!1,voids:o=!1,mode:i="lowest"}=n,{at:a,match:s,select:u}=n;if(Vh.isNode(t)&&(t=[t]),0!==t.length){var[l]=t;if(a||(a=e.selection?e.selection:e.children.length>0?Mh.end(e,[]):[0],u=!0),null==u&&(u=!1),ng.isRange(a))if(r||(a=Mh.unhangRange(e,a)),ng.isCollapsed(a))a=a.anchor;else{var[,c]=ng.edges(a),d=Mh.pointRef(e,c);Og.delete(e,{at:a}),a=d.unref()}if(Jh.isPoint(a)){null==s&&(s=lg.isText(l)?e=>lg.isText(e):e.isInline(l)?t=>lg.isText(t)||Mh.isInline(e,t):t=>Mh.isBlock(e,t));var[f]=Mh.nodes(e,{at:a.path,match:s,mode:i,voids:o});if(!f)return;var[,p]=f,h=Mh.pathRef(e,p),g=Mh.isEnd(e,a,p);Og.splitNodes(e,{at:a,match:s,mode:i,voids:o});var v=h.unref();a=g?Kh.next(v):v}var m=Kh.parent(a),y=a[a.length-1];if(o||!Mh.void(e,{at:m})){for(var b of t){var E=m.concat(y);y++,e.apply({type:"insert_node",path:E,node:b}),a=Kh.next(a)}if(a=Kh.previous(a),u){var C=Mh.end(e,a);C&&Og.select(e,C)}}}}))},liftNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Mh.withoutNormalizing(e,(()=>{var{at:n=e.selection,mode:r="lowest",voids:o=!1}=t,{match:i}=t;if(null==i&&(i=Kh.isPath(n)?Eg(e,n):t=>Mh.isBlock(e,t)),n){var a=Mh.nodes(e,{at:n,match:i,mode:r,voids:o}),s=Array.from(a,(t=>{var[,n]=t;return Mh.pathRef(e,n)}));for(var u of s){var l=u.unref();if(l.length<2)throw new Error("Cannot lift node at a path [".concat(l,"] because it has a depth of less than `2`."));var c=Mh.node(e,Kh.parent(l)),[d,f]=c,p=l[l.length-1],{length:h}=d.children;if(1===h){var g=Kh.next(f);Og.moveNodes(e,{at:l,to:g,voids:o}),Og.removeNodes(e,{at:f,voids:o})}else if(0===p)Og.moveNodes(e,{at:l,to:f,voids:o});else if(p===h-1){var v=Kh.next(f);Og.moveNodes(e,{at:l,to:v,voids:o})}else{var m=Kh.next(l),y=Kh.next(f);Og.splitNodes(e,{at:m,voids:o}),Og.moveNodes(e,{at:l,to:y,voids:o})}}}}))},mergeNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Mh.withoutNormalizing(e,(()=>{var{match:n,at:r=e.selection}=t,{hanging:o=!1,voids:i=!1,mode:a="lowest"}=t;if(r){if(null==n)if(Kh.isPath(r)){var[s]=Mh.parent(e,r);n=e=>s.children.includes(e)}else n=t=>Mh.isBlock(e,t);if(!o&&ng.isRange(r)&&(r=Mh.unhangRange(e,r)),ng.isRange(r))if(ng.isCollapsed(r))r=r.anchor;else{var[,u]=ng.edges(r),l=Mh.pointRef(e,u);Og.delete(e,{at:r}),r=l.unref(),null==t.at&&Og.select(e,r)}var[c]=Mh.nodes(e,{at:r,match:n,voids:i,mode:a}),d=Mh.previous(e,{at:r,match:n,voids:i,mode:a});if(c&&d){var[f,p]=c,[h,g]=d;if(0!==p.length&&0!==g.length){var v,m,y=Kh.next(g),b=Kh.common(p,g),E=Kh.isSibling(p,g),C=Array.from(Mh.levels(e,{at:p}),(e=>{var[t]=e;return t})).slice(b.length).slice(0,-1),D=Mh.above(e,{at:p,mode:"highest",match:t=>C.includes(t)&&yg(e,t)}),w=D&&Mh.pathRef(e,D[1]);if(lg.isText(f)&&lg.isText(h)){var A=rh(f,pg);m=h.text.length,v=A}else{if(!Fh.isElement(f)||!Fh.isElement(h))throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(f)," ").concat(JSON.stringify(h)));A=rh(f,hg);m=h.children.length,v=A}E||Og.moveNodes(e,{at:p,to:y,voids:i}),w&&Og.removeNodes(e,{at:w.current,voids:i}),Fh.isElement(h)&&Mh.isEmpty(e,h)||lg.isText(h)&&""===h.text&&0!==g[g.length-1]?Og.removeNodes(e,{at:g,voids:i}):e.apply({type:"merge_node",path:y,position:m,properties:v}),w&&w.unref()}}}}))},moveNodes(e,t){Mh.withoutNormalizing(e,(()=>{var{to:n,at:r=e.selection,mode:o="lowest",voids:i=!1}=t,{match:a}=t;if(r){null==a&&(a=Kh.isPath(r)?Eg(e,r):t=>Mh.isBlock(e,t));var s=Mh.pathRef(e,n),u=Mh.nodes(e,{at:r,match:a,mode:o,voids:i}),l=Array.from(u,(t=>{var[,n]=t;return Mh.pathRef(e,n)}));for(var c of l){var d=c.unref(),f=s.current;0!==d.length&&e.apply({type:"move_node",path:d,newPath:f}),s.current&&Kh.isSibling(f,d)&&Kh.isAfter(f,d)&&(s.current=Kh.next(s.current))}s.unref()}}))},removeNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Mh.withoutNormalizing(e,(()=>{var{hanging:n=!1,voids:r=!1,mode:o="lowest"}=t,{at:i=e.selection,match:a}=t;if(i){null==a&&(a=Kh.isPath(i)?Eg(e,i):t=>Mh.isBlock(e,t)),!n&&ng.isRange(i)&&(i=Mh.unhangRange(e,i));var s=Mh.nodes(e,{at:i,match:a,mode:o,voids:r}),u=Array.from(s,(t=>{var[,n]=t;return Mh.pathRef(e,n)}));for(var l of u){var c=l.unref();if(c){var[d]=Mh.node(e,c);e.apply({type:"remove_node",path:c,node:d})}}}}))},setNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Mh.withoutNormalizing(e,(()=>{var{match:r,at:o=e.selection}=n,{hanging:i=!1,mode:a="lowest",split:s=!1,voids:u=!1}=n;if(o){if(null==r&&(r=Kh.isPath(o)?Eg(e,o):t=>Mh.isBlock(e,t)),!i&&ng.isRange(o)&&(o=Mh.unhangRange(e,o)),s&&ng.isRange(o)){if(ng.isCollapsed(o)&&Mh.leaf(e,o.anchor)[0].text.length>0)return;var l=Mh.rangeRef(e,o,{affinity:"inward"}),[c,d]=ng.edges(o),f="lowest"===a?"lowest":"highest",p=Mh.isEnd(e,d,d.path);Og.splitNodes(e,{at:d,match:r,mode:f,voids:u,always:!p});var h=Mh.isStart(e,c,c.path);Og.splitNodes(e,{at:c,match:r,mode:f,voids:u,always:!h}),o=l.unref(),null==n.at&&Og.select(e,o)}for(var[g,v]of Mh.nodes(e,{at:o,match:r,mode:a,voids:u})){var m={},y={};if(0!==v.length){var b=!1;for(var E in t)"children"!==E&&"text"!==E&&t[E]!==g[E]&&(b=!0,g.hasOwnProperty(E)&&(m[E]=g[E]),null!=t[E]&&(y[E]=t[E]));b&&e.apply({type:"set_node",path:v,properties:m,newProperties:y})}}}}))},splitNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Mh.withoutNormalizing(e,(()=>{var{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection,height:a=0,always:s=!1}=t;if(null==o&&(o=t=>Mh.isBlock(e,t)),ng.isRange(i)&&(i=bg(e,i)),Kh.isPath(i)){var u=i,l=Mh.point(e,u),[c]=Mh.parent(e,u);o=e=>e===c,a=l.path.length-u.length+1,i=l,s=!0}if(i){var d=Mh.pointRef(e,i,{affinity:"backward"}),[f]=Mh.nodes(e,{at:i,match:o,mode:n,voids:r});if(f){var p=Mh.void(e,{at:i,mode:"highest"});if(!r&&p){var[h,g]=p;if(Fh.isElement(h)&&e.isInline(h)){var v=Mh.after(e,g);if(!v){var m=Kh.next(g);Og.insertNodes(e,{text:""},{at:m,voids:r}),v=Mh.point(e,m)}i=v,s=!0}a=i.path.length-g.length+1,s=!0}var y=Mh.pointRef(e,i),b=i.path.length-a,[,E]=f,C=i.path.slice(0,b),D=0===a?i.offset:i.path[b]+0;for(var[w,A]of Mh.levels(e,{at:C,reverse:!0,voids:r})){var S=!1;if(A.length<E.length||0===A.length||!r&&Mh.isVoid(e,w))break;var x=d.current,O=Mh.isEnd(e,x,A);if(s||!d||!Mh.isEdge(e,x,A)){S=!0;var N=Vh.extractProps(w);e.apply({type:"split_node",path:A,position:D,properties:N})}D=A[A.length-1]+(S||O?1:0)}if(null==t.at){var B=y.current||Mh.end(e,[]);Og.select(e,B)}d.unref(),y.unref()}}}))},unsetNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var o of t)r[o]=null;Og.setNodes(e,r,n)},unwrapNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Mh.withoutNormalizing(e,(()=>{var{mode:n="lowest",split:r=!1,voids:o=!1}=t,{at:i=e.selection,match:a}=t;if(i){null==a&&(a=Kh.isPath(i)?Eg(e,i):t=>Mh.isBlock(e,t)),Kh.isPath(i)&&(i=Mh.range(e,i));var s=ng.isRange(i)?Mh.rangeRef(e,i):null,u=Mh.nodes(e,{at:i,match:a,mode:n,voids:o}),l=Array.from(u,(t=>{var[,n]=t;return Mh.pathRef(e,n)})).reverse(),c=function(t){var n=t.unref(),[i]=Mh.node(e,n),a=Mh.range(e,n);r&&s&&(a=ng.intersection(s.current,a)),Og.liftNodes(e,{at:a,match:e=>Fh.isAncestor(i)&&i.children.includes(e),voids:o})};for(var d of l)c(d);s&&s.unref()}}))},wrapNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Mh.withoutNormalizing(e,(()=>{var{mode:r="lowest",split:o=!1,voids:i=!1}=n,{match:a,at:s=e.selection}=n;if(s){if(null==a&&(a=Kh.isPath(s)?Eg(e,s):e.isInline(t)?t=>Mh.isInline(e,t)||lg.isText(t):t=>Mh.isBlock(e,t)),o&&ng.isRange(s)){var[u,l]=ng.edges(s),c=Mh.rangeRef(e,s,{affinity:"inward"});Og.splitNodes(e,{at:l,match:a,voids:i}),Og.splitNodes(e,{at:u,match:a,voids:i}),s=c.unref(),null==n.at&&Og.select(e,s)}var d=Array.from(Mh.nodes(e,{at:s,match:e.isInline(t)?t=>Mh.isBlock(e,t):e=>Mh.isEditor(e),mode:"lowest",voids:i}));for(var[,f]of d){var p=ng.isRange(s)?ng.intersection(s,Mh.range(e,f)):s;if(p){var h=Array.from(Mh.nodes(e,{at:p,match:a,mode:r,voids:i}));if(h.length>0){var g=function(){var[n]=h,r=h[h.length-1],[,o]=n,[,a]=r;if(0===o.length&&0===a.length)return"continue";var s=Kh.equals(o,a)?Kh.parent(o):Kh.common(o,a),u=Mh.range(e,o,a),l=Mh.node(e,s),[c]=l,d=s.length+1,f=Kh.next(a.slice(0,d)),p=vg(vg({},t),{},{children:[]});Og.insertNodes(e,p,{at:f,voids:i}),Og.moveNodes(e,{at:u,match:e=>Fh.isAncestor(c)&&c.children.includes(e),to:f.concat(0),voids:i})}();if("continue"===g)continue}}}}}))}},yg=(e,t)=>{if(Fh.isElement(t)){var n=t;return!!Mh.isVoid(e,t)||1===n.children.length&&yg(e,n.children[0])}return!Mh.isEditor(t)},bg=(e,t)=>{if(ng.isCollapsed(t))return t.anchor;var[,n]=ng.edges(t),r=Mh.pointRef(e,n);return Og.delete(e,{at:t}),r.unref()},Eg=(e,t)=>{var[n]=Mh.node(e,t);return e=>e===n};function Cg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cg(Object(n),!0).forEach((function(t){Wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wg={collapse(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{edge:n="anchor"}=t,{selection:r}=e;if(r)if("anchor"===n)Og.select(e,r.anchor);else if("focus"===n)Og.select(e,r.focus);else if("start"===n){var[o]=ng.edges(r);Og.select(e,o)}else if("end"===n){var[,i]=ng.edges(r);Og.select(e,i)}},deselect(e){var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{selection:n}=e,{distance:r=1,unit:o="character",reverse:i=!1}=t,{edge:a=null}=t;if(n){"start"===a&&(a=ng.isBackward(n)?"focus":"anchor"),"end"===a&&(a=ng.isBackward(n)?"anchor":"focus");var{anchor:s,focus:u}=n,l={distance:r,unit:o},c={};if(null==a||"anchor"===a){var d=i?Mh.before(e,s,l):Mh.after(e,s,l);d&&(c.anchor=d)}if(null==a||"focus"===a){var f=i?Mh.before(e,u,l):Mh.after(e,u,l);f&&(c.focus=f)}Og.setSelection(e,c)}},select(e,t){var{selection:n}=e;if(t=Mh.range(e,t),n)Og.setSelection(e,t);else{if(!ng.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}},setPoint(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{selection:r}=e,{edge:o="both"}=n;if(r){"start"===o&&(o=ng.isBackward(r)?"focus":"anchor"),"end"===o&&(o=ng.isBackward(r)?"anchor":"focus");var{anchor:i,focus:a}=r,s="anchor"===o?i:a;Og.setSelection(e,{["anchor"===o?"anchor":"focus"]:Dg(Dg({},s),t)})}},setSelection(e,t){var{selection:n}=e,r={},o={};if(n){for(var i in t)("anchor"===i&&null!=t.anchor&&!Jh.equals(t.anchor,n.anchor)||"focus"===i&&null!=t.focus&&!Jh.equals(t.focus,n.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==n[i])&&(r[i]=n[i],o[i]=t[i]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:o})}}},Ag={delete(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Mh.withoutNormalizing(e,(()=>{var{reverse:n=!1,unit:r="character",distance:o=1,voids:i=!1}=t,{at:a=e.selection,hanging:s=!1}=t;if(a){if(ng.isRange(a)&&ng.isCollapsed(a)&&(a=a.anchor),Jh.isPoint(a)){var u=Mh.void(e,{at:a,mode:"highest"});if(!i&&u){var[,l]=u;a=l}else{var c={unit:r,distance:o};a={anchor:a,focus:n?Mh.before(e,a,c)||Mh.start(e,[]):Mh.after(e,a,c)||Mh.end(e,[])},s=!0}}if(Kh.isPath(a))Og.removeNodes(e,{at:a,voids:i});else if(!ng.isCollapsed(a)){if(!s){var[,d]=ng.edges(a),f=Mh.end(e,[]);Jh.equals(d,f)||(a=Mh.unhangRange(e,a,{voids:i}))}var[p,h]=ng.edges(a),g=Mh.above(e,{match:t=>Mh.isBlock(e,t),at:p,voids:i}),v=Mh.above(e,{match:t=>Mh.isBlock(e,t),at:h,voids:i}),m=g&&v&&!Kh.equals(g[1],v[1]),y=Kh.equals(p.path,h.path),b=i?null:Mh.void(e,{at:p,mode:"highest"}),E=i?null:Mh.void(e,{at:h,mode:"highest"});if(b){var C=Mh.before(e,p);C&&g&&Kh.isAncestor(g[1],C.path)&&(p=C)}if(E){var D=Mh.after(e,h);D&&v&&Kh.isAncestor(v[1],D.path)&&(h=D)}var w,A=[];for(var S of Mh.nodes(e,{at:a,voids:i})){var[x,O]=S;w&&0===Kh.compare(O,w)||(!i&&Mh.isVoid(e,x)||!Kh.isCommon(O,p.path)&&!Kh.isCommon(O,h.path))&&(A.push(S),w=O)}var N=Array.from(A,(t=>{var[,n]=t;return Mh.pathRef(e,n)})),B=Mh.pointRef(e,p),T=Mh.pointRef(e,h);if(!y&&!b){var k=B.current,[F]=Mh.leaf(e,k),{path:I}=k,{offset:P}=p,L=F.text.slice(P);L.length>0&&e.apply({type:"remove_text",path:I,offset:P,text:L})}for(var R of N){var _=R.unref();Og.removeNodes(e,{at:_,voids:i})}if(!E){var M=T.current,[j]=Mh.leaf(e,M),{path:H}=M,z=y?p.offset:0,$=j.text.slice(z,h.offset);$.length>0&&e.apply({type:"remove_text",path:H,offset:z,text:$})}!y&&m&&T.current&&B.current&&Og.mergeNodes(e,{at:T.current,hanging:!0,voids:i});var U=n?B.unref()||T.unref():T.unref()||B.unref();null==t.at&&U&&Og.select(e,U)}}}))},insertFragment(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Mh.withoutNormalizing(e,(()=>{var{hanging:r=!1,voids:o=!1}=n,{at:i=e.selection}=n;if(t.length&&i){if(ng.isRange(i))if(r||(i=Mh.unhangRange(e,i)),ng.isCollapsed(i))i=i.anchor;else{var[,a]=ng.edges(i);if(!o&&Mh.void(e,{at:a}))return;var s=Mh.pointRef(e,a);Og.delete(e,{at:i}),i=s.unref()}else Kh.isPath(i)&&(i=Mh.start(e,i));if(o||!Mh.void(e,{at:i})){var u=Mh.above(e,{at:i,match:t=>Mh.isInline(e,t),mode:"highest",voids:o});if(u){var[,l]=u;if(Mh.isEnd(e,i,l))i=Mh.after(e,l);else if(Mh.isStart(e,i,l)){i=Mh.before(e,l)}}var c=Mh.above(e,{match:t=>Mh.isBlock(e,t),at:i,voids:o}),[,d]=c,f=Mh.isStart(e,i,d),p=Mh.isEnd(e,i,d),h=f&&p,g=!f||f&&p,v=!p,[,m]=Vh.first({children:t},[]),[,y]=Vh.last({children:t},[]),b=[],E=t=>{var[n,r]=t;return!(0===r.length)&&(!!h||!(g&&Kh.isAncestor(r,m)&&Fh.isElement(n)&&!e.isVoid(n)&&!e.isInline(n))&&!(v&&Kh.isAncestor(r,y)&&Fh.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)))};for(var C of Vh.nodes({children:t},{pass:E}))E(C)&&b.push(C);var D=[],w=[],A=[],S=!0,x=!1;for(var[O]of b)Fh.isElement(O)&&!e.isInline(O)?(S=!1,x=!0,w.push(O)):S?D.push(O):A.push(O);var[N]=Mh.nodes(e,{at:i,match:t=>lg.isText(t)||Mh.isInline(e,t),mode:"highest",voids:o}),[,B]=N,T=Mh.isStart(e,i,B),k=Mh.isEnd(e,i,B),F=Mh.pathRef(e,p?Kh.next(d):d),I=Mh.pathRef(e,k?Kh.next(B):B),P=Mh.pathRef(e,d);Og.splitNodes(e,{at:i,match:t=>x?Mh.isBlock(e,t):lg.isText(t)||Mh.isInline(e,t),mode:x?"lowest":"highest",voids:o});var L=Mh.pathRef(e,!T||T&&k?Kh.next(B):B);if(Og.insertNodes(e,D,{at:L.current,match:t=>lg.isText(t)||Mh.isInline(e,t),mode:"highest",voids:o}),h&&w.length&&Og.delete(e,{at:P.unref(),voids:o}),Og.insertNodes(e,w,{at:F.current,match:t=>Mh.isBlock(e,t),mode:"lowest",voids:o}),Og.insertNodes(e,A,{at:I.current,match:t=>lg.isText(t)||Mh.isInline(e,t),mode:"highest",voids:o}),!n.at){var R;R=A.length>0?Kh.previous(I.current):w.length>0?Kh.previous(F.current):Kh.previous(L.current);var _=Mh.end(e,R);Og.select(e,_)}L.unref(),F.unref(),I.unref()}}}))},insertText(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Mh.withoutNormalizing(e,(()=>{var{voids:r=!1}=n,{at:o=e.selection}=n;if(o){if(Kh.isPath(o)&&(o=Mh.range(e,o)),ng.isRange(o))if(ng.isCollapsed(o))o=o.anchor;else{var i=ng.end(o);if(!r&&Mh.void(e,{at:i}))return;var a=Mh.pointRef(e,i);Og.delete(e,{at:o,voids:r}),o=a.unref(),Og.setSelection(e,{anchor:o,focus:o})}if(r||!Mh.void(e,{at:o})){var{path:s,offset:u}=o;t.length>0&&e.apply({type:"insert_text",path:s,offset:u,text:t})}}}))}};function Sg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sg(Object(n),!0).forEach((function(t){Wp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Og=xg(xg(xg(xg({},fg),mg),wg),Ag),Ng={isHistory:e=>qf(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||qh.isOperationList(e.redos[0].operations))&&(0===e.undos.length||qh.isOperationList(e.undos[0].operations))},Bg=new WeakMap,Tg=new WeakMap,kg={isHistoryEditor:e=>Ng.isHistory(e.history)&&Mh.isEditor(e),isMerging:e=>Tg.get(e),isSaving:e=>Bg.get(e),redo(e){e.redo()},undo(e){e.undo()},withMerging(e,t){var n=kg.isMerging(e);Tg.set(e,!0),t(),Tg.set(e,n)},withoutMerging(e,t){var n=kg.isMerging(e);Tg.set(e,!1),t(),Tg.set(e,n)},withoutSaving(e,t){var n=kg.isSaving(e);Bg.set(e,!1),t(),Bg.set(e,n)}},Fg=e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:e}=t,{redos:n}=e;if(n.length>0){var r=n[n.length-1];r.selectionBefore&&Og.setSelection(t,r.selectionBefore),kg.withoutSaving(t,(()=>{Mh.withoutNormalizing(t,(()=>{for(var e of r.operations)t.apply(e)}))})),e.redos.pop(),t.writeHistory("undos",r)}},t.undo=()=>{var{history:e}=t,{undos:n}=e;if(n.length>0){var r=n[n.length-1];kg.withoutSaving(t,(()=>{Mh.withoutNormalizing(t,(()=>{var e=r.operations.map(qh.inverse).reverse();for(var n of e)t.apply(n);r.selectionBefore&&Og.setSelection(t,r.selectionBefore)}))})),t.writeHistory("redos",r),e.undos.pop()}},t.apply=e=>{var{operations:r,history:o}=t,{undos:i}=o,a=i[i.length-1],s=a&&a.operations[a.operations.length-1],u=kg.isSaving(t),l=kg.isMerging(t);if(null==u&&(u=Pg(e)),u){if(null==l&&(l=null!=a&&(0!==r.length||Ig(e,s))),a&&l)a.operations.push(e);else{var c={operations:[e],selectionBefore:t.selection};t.writeHistory("undos",c)}for(;i.length>100;)i.shift();o.redos=[]}n(e)},t.writeHistory=(e,n)=>{t.history[e].push(n)},t},Ig=(e,t)=>!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!Kh.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!Kh.equals(e.path,t.path)),Pg=(e,t)=>"set_selection"!==e.type,Lg=function(e,t){return Lg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Lg(e,t)};function Rg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Lg(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var _g=function(){return _g=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},_g.apply(this,arguments)};function Mg(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function jg(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function Hg(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function zg(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function $g(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function Ug(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Hg(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;var Vg,Gg={exports:{}};var Wg,qg,Kg=(Vg||(Vg=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",s="[object Function]",u="[object GeneratorFunction]",l="[object Map]",c="[object Number]",d="[object Object]",f="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",b="[object ArrayBuffer]",E="[object DataView]",C="[object Float32Array]",D="[object Float64Array]",w="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",x="[object Uint8Array]",O="[object Uint8ClampedArray]",N="[object Uint16Array]",B="[object Uint32Array]",T=/\w*$/,k=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,I={};I[o]=I["[object Array]"]=I[b]=I[E]=I[i]=I[a]=I[C]=I[D]=I[w]=I[A]=I[S]=I[l]=I[c]=I[d]=I[p]=I[h]=I[g]=I[v]=I[x]=I[O]=I[N]=I[B]=!0,I["[object Error]"]=I[s]=I[m]=!1;var P="object"==typeof y&&y&&y.Object===Object&&y,L="object"==typeof self&&self&&self.Object===Object&&self,R=P||L||Function("return this")(),_=t&&!t.nodeType&&t,M=_&&e&&!e.nodeType&&e,j=M&&M.exports===_;function H(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function $(e,t,n,r){for(var o=-1,i=e?e.length:0;++o<i;)n=t(n,e[o],o,e);return n}function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function G(e,t){return function(n){return e(t(n))}}function W(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var q=Array.prototype,K=Function.prototype,Y=Object.prototype,X=R["__core-js_shared__"],Z=function(){var e=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=K.toString,Q=Y.hasOwnProperty,ee=Y.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=j?R.Buffer:void 0,re=R.Symbol,oe=R.Uint8Array,ie=G(Object.getPrototypeOf,Object),ae=Object.create,se=Y.propertyIsEnumerable,ue=q.splice,le=Object.getOwnPropertySymbols,ce=ne?ne.isBuffer:void 0,de=G(Object.keys,Object),fe=_e(R,"DataView"),pe=_e(R,"Map"),he=_e(R,"Promise"),ge=_e(R,"Set"),ve=_e(R,"WeakMap"),me=_e(Object,"create"),ye=$e(fe),be=$e(pe),Ee=$e(he),Ce=$e(ge),De=$e(ve),we=re?re.prototype:void 0,Ae=we?we.valueOf:void 0;function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){this.__data__=new xe(e)}function Be(e,t){var n=Ve(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&Ge(e)}(e)&&Q.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!Q.call(e,a)||i&&("length"==a||He(a,r))||n.push(a);return n}function Te(e,t,n){var r=e[t];Q.call(e,t)&&Ue(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function ke(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function Fe(e,t,n,r,f,m,y){var k;if(r&&(k=m?r(e,f,m,y):r(e)),void 0!==k)return k;if(!Ke(e))return e;var F=Ve(e);if(F){if(k=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Q.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,k)}else{var P=je(e),L=P==s||P==u;if(We(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(P==d||P==o||L&&!m){if(U(e))return m?e:{};if(k=function(e){return"function"!=typeof e.constructor||ze(e)?{}:Ke(t=ie(e))?ae(t):{};var t}(L?{}:e),!t)return function(e,t){return Le(e,Me(e),t)}(e,function(e,t){return e&&Le(t,Ye(t),e)}(k,e))}else{if(!I[P])return m?e:{};k=function(e,t,n,r){var o=e.constructor;switch(t){case b:return Pe(e);case i:case a:return new o(+e);case E:return function(e,t){var n=t?Pe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case C:case D:case w:case A:case S:case x:case O:case N:case B:return function(e,t){var n=t?Pe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case l:return function(e,t,n){var r=t?n(V(e),!0):V(e);return $(r,H,new e.constructor)}(e,r,n);case c:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,T.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(W(e),!0):W(e);return $(r,z,new e.constructor)}(e,r,n);case v:return function(e){return Ae?Object(Ae.call(e)):{}}(e)}}(e,P,Fe,t)}}y||(y=new Ne);var R=y.get(e);if(R)return R;if(y.set(e,k),!F)var _=n?function(e){return function(e,t,n){var r=t(e);return Ve(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ye,Me)}(e):Ye(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(_||e,(function(o,i){_&&(o=e[i=o]),Te(k,i,Fe(o,t,n,r,i,e,y))})),k}function Ie(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(qe(e)||U(e)?te:k).test($e(e));var t}function Pe(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Le(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o];Te(n,a,e[a])}return n}function Re(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function _e(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ie(n)?n:void 0}Se.prototype.clear=function(){this.__data__=me?me(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return Q.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0||(n==t.length-1?t.pop():ue.call(t,n,1),0))},xe.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return ke(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Oe.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||xe),string:new Se}},Oe.prototype.delete=function(e){return Re(this,e).delete(e)},Oe.prototype.get=function(e){return Re(this,e).get(e)},Oe.prototype.has=function(e){return Re(this,e).has(e)},Oe.prototype.set=function(e,t){return Re(this,e).set(e,t),this},Ne.prototype.clear=function(){this.__data__=new xe},Ne.prototype.delete=function(e){return this.__data__.delete(e)},Ne.prototype.get=function(e){return this.__data__.get(e)},Ne.prototype.has=function(e){return this.__data__.has(e)},Ne.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Oe(r)}return n.set(e,t),this};var Me=le?G(le,Object):function(){return[]},je=function(e){return ee.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||F.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function $e(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(fe&&je(new fe(new ArrayBuffer(1)))!=E||pe&&je(new pe)!=l||he&&je(he.resolve())!=f||ge&&je(new ge)!=h||ve&&je(new ve)!=m)&&(je=function(e){var t=ee.call(e),n=t==d?e.constructor:void 0,r=n?$e(n):void 0;if(r)switch(r){case ye:return E;case be:return l;case Ee:return f;case Ce:return h;case De:return m}return t});var Ve=Array.isArray;function Ge(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!qe(e)}var We=ce||function(){return!1};function qe(e){var t=Ke(e)?ee.call(e):"";return t==s||t==u}function Ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return Ge(e)?Be(e):function(e){if(!ze(e))return de(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Fe(e,!0,!0)}}(Gg,Gg.exports)),Gg.exports),Yg=b(Kg);var Xg=function(){if(qg)return Wg;qg=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var a,s,u=Object.prototype,l=u.hasOwnProperty,c=u.toString,d=u.propertyIsEnumerable,f=(a=Object.keys,s=Object,function(e){return a(s(e))});function p(e,n){var r=b(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&E(e)}(e)&&l.call(e,"callee")&&(!d.call(e,"callee")||c.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!l.call(e,a)||i&&("length"==a||y(a,o))||r.push(a);return r}var h,g=(h=function(e,t){return e&&v(e,t,C)},function(e,t){if(null==e)return e;if(!E(e))return h(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),v=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function m(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||u,t!==r)return f(e);var t,n,r,o=[];for(var i in Object(e))l.call(e,i)&&"constructor"!=i&&o.push(i);return o}function y(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<n}var b=Array.isArray;function E(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==n||t==r}(t)}function C(e){return E(e)?p(e):m(e)}function D(e){return e}return Wg=function(e,t){return(b(e)?i:g)(e,"function"==typeof t?t:D)}}(),Zg=b(Xg),Jg={};var Qg={CREATED:"created",DESTROYED:"destroyed",CHANGE:"change",SCROLL:"scroll",FULLSCREEN:"fullscreen",UNFULLSCREEN:"unFullScreen"},ev={};function tv(e,t){var n=e.key,r=e.factory,o=e.config,i=_g(_g({},o),t||{});if(null!=ev[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));ev[n]=r,function(e,t){null!=t&&(Jg[e]=t)}(n,i)}var nv=new WeakMap,rv=new WeakMap,ov=new WeakMap,iv=new WeakMap,av=new WeakMap,sv=new WeakMap,uv=new WeakMap,lv=new WeakMap,cv=new WeakMap,dv=new WeakMap,fv=new WeakMap,pv=new WeakMap,hv=new WeakMap,gv=new WeakMap,vv=new WeakMap,mv=new WeakMap,yv=new WeakMap,bv=new WeakMap,Ev=new WeakMap,Cv=new WeakMap,Dv=new WeakMap,wv=new WeakMap,Av=new WeakMap,Sv=new WeakMap,xv=new WeakMap,Ov=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in ev)e.push(t);return e},t.getConfig=function(){var e=dv.get(t);if(null==e)throw new Error("Can not get editor config");return e},t.getMenuConfig=function(e){var n=t.getConfig().MENU_CONF;return(void 0===n?{}:n)[e]||{}},t.alert=function(e,n){void 0===n&&(n="info");var r=t.getConfig().customAlert;r&&r(e,n)},t},Nv=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function Bv(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function Tv(e={},t={}){Object.keys(t).forEach((n=>{void 0===e[n]?e[n]=t[n]:Bv(t[n])&&Bv(e[n])&&Object.keys(t[n]).length>0&&Tv(e[n],t[n])}))}const kv={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Fv(){const e="undefined"!=typeof document?document:{};return Tv(e,kv),e}const Iv={document:kv,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function Pv(){const e="undefined"!=typeof window?window:{};return Tv(e,Iv),e}class Lv extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function Rv(e=[]){const t=[];return e.forEach((e=>{Array.isArray(e)?t.push(...Rv(e)):t.push(e)})),t}function _v(e,t){return Array.prototype.filter.call(e,t)}function Mv(e,t){const n=Pv(),r=Fv();let o=[];if(!t&&e instanceof Lv)return e;if(!e)return new Lv(o);if("string"==typeof e){const n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){let e="div";0===n.indexOf("<li")&&(e="ul"),0===n.indexOf("<tr")&&(e="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(e="tr"),0===n.indexOf("<tbody")&&(e="table"),0===n.indexOf("<option")&&(e="select");const t=r.createElement(e);t.innerHTML=n;for(let e=0;e<t.childNodes.length;e+=1)o.push(t.childNodes[e])}else o=function(e,t){if("string"!=typeof e)return[e];const n=[],r=t.querySelectorAll(e);for(let e=0;e<r.length;e+=1)n.push(r[e]);return n}(e.trim(),t||r)}else if(e.nodeType||e===n||e===r)o.push(e);else if(Array.isArray(e)){if(e instanceof Lv)return e;o=e}return new Lv(function(e){const t=[];for(let n=0;n<e.length;n+=1)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(o))}function jv(...e){const t=Rv(e.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.add(...t)})),this}function Hv(...e){const t=Rv(e.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.remove(...t)})),this}function zv(...e){const t=Rv(e.map((e=>e.split(" "))));return _v(this,(e=>t.filter((t=>e.classList.contains(t))).length>0)).length>0}function $v(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(e,t);else for(const t in e)this[n][t]=e[t],this[n].setAttribute(t,e[t]);return this}function Uv(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function Vv(e,t){let n;if(void 0===t){if(n=this[0],!n)return;if(n.dom7ElementDataStorage&&e in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[e];const t=n.getAttribute(`data-${e}`);return t||void 0}for(let r=0;r<this.length;r+=1)n=this[r],n.dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[e]=t;return this}function Gv(){const e=this[0];if(!e)return;const t={};if(e.dataset)for(const n in e.dataset)t[n]=e.dataset[n];else for(let r=0;r<e.attributes.length;r+=1){const o=e.attributes[r];o.name.indexOf("data-")>=0&&(t[(n=o.name.split("data-")[1],n.toLowerCase().replace(/-(.)/g,((e,t)=>t.toUpperCase())))]=o.value)}var n;for(const e in t)"false"===t[e]?t[e]=!1:"true"===t[e]?t[e]=!0:parseFloat(t[e])===1*t[e]&&(t[e]*=1);return t}function Wv(e){if(void 0===e){const e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){const t=[];for(let n=0;n<e.selectedOptions.length;n+=1)t.push(e.selectedOptions[n].value);return t}return e.value}for(let t=0;t<this.length;t+=1){const n=this[t];if(Array.isArray(e)&&n.multiple&&"select"===n.nodeName.toLowerCase())for(let t=0;t<n.options.length;t+=1)n.options[t].selected=e.indexOf(n.options[t].value)>=0;else n.value=e}return this}function qv(...e){let[t,n,r,o]=e;function i(e){const t=e.target;if(!t)return;const o=e.target.dom7EventData||[];if(o.indexOf(e)<0&&o.unshift(e),Mv(t).is(n))r.apply(t,o);else{const e=Mv(t).parents();for(let t=0;t<e.length;t+=1)Mv(e[t]).is(n)&&r.apply(e[t],o)}}function a(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),r.apply(this,t)}"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const s=t.split(" ");let u;for(let e=0;e<this.length;e+=1){const t=this[e];if(n)for(u=0;u<s.length;u+=1){const e=s[u];t.dom7LiveListeners||(t.dom7LiveListeners={}),t.dom7LiveListeners[e]||(t.dom7LiveListeners[e]=[]),t.dom7LiveListeners[e].push({listener:r,proxyListener:i}),t.addEventListener(e,i,o)}else for(u=0;u<s.length;u+=1){const e=s[u];t.dom7Listeners||(t.dom7Listeners={}),t.dom7Listeners[e]||(t.dom7Listeners[e]=[]),t.dom7Listeners[e].push({listener:r,proxyListener:a}),t.addEventListener(e,a,o)}}return this}function Kv(...e){let[t,n,r,o]=e;"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const i=t.split(" ");for(let e=0;e<i.length;e+=1){const t=i[e];for(let e=0;e<this.length;e+=1){const i=this[e];let a;if(!n&&i.dom7Listeners?a=i.dom7Listeners[t]:n&&i.dom7LiveListeners&&(a=i.dom7LiveListeners[t]),a&&a.length)for(let e=a.length-1;e>=0;e-=1){const n=a[e];r&&n.listener===r||r&&n.listener&&n.listener.dom7proxy&&n.listener.dom7proxy===r?(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1)):r||(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1))}}}return this}function Yv(){const e=Pv();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Xv(){const e=Pv();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function Zv(){if(this.length>0){const e=Pv(),t=Fv(),n=this[0],r=n.getBoundingClientRect(),o=t.body,i=n.clientTop||o.clientTop||0,a=n.clientLeft||o.clientLeft||0,s=n===e?e.scrollY:n.scrollTop,u=n===e?e.scrollX:n.scrollLeft;return{top:r.top+s-i,left:r.left+u-a}}return null}function Jv(){for(let e=0;e<this.length;e+=1)this[e].style.display="none";return this}function Qv(){const e=Pv();for(let t=0;t<this.length;t+=1){const n=this[t];"none"===n.style.display&&(n.style.display=""),"none"===e.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this}function em(e,t){const n=Pv();let r;if(1===arguments.length){if("string"!=typeof e){for(r=0;r<this.length;r+=1)for(const t in e)this[r].style[t]=e[t];return this}if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(r=0;r<this.length;r+=1)this[r].style[e]=t;return this}return this}function tm(e){return e?(this.forEach(((t,n)=>{e.apply(t,[t,n])})),this):this}function nm(e){return Mv(_v(this,e))}function rm(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function om(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this}function im(e){const t=Pv(),n=Fv(),r=this[0];let o,i;if(!r||void 0===e)return!1;if("string"==typeof e){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(o=Mv(e),i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}if(e===n)return r===n;if(e===t)return r===t;if(e.nodeType||e instanceof Lv){for(o=e.nodeType?[e]:e,i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}return!1}function am(...e){let t;const n=Fv();for(let r=0;r<e.length;r+=1){t=e[r];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const r=n.createElement("div");for(r.innerHTML=t;r.firstChild;)this[e].appendChild(r.firstChild)}else if(t instanceof Lv)for(let n=0;n<t.length;n+=1)this[e].appendChild(t[n]);else this[e].appendChild(t)}return this}function sm(e){const t=Fv();let n,r;for(n=0;n<this.length;n+=1)if("string"==typeof e){const o=t.createElement("div");for(o.innerHTML=e,r=o.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(o.childNodes[r],this[n].childNodes[0])}else if(e instanceof Lv)for(r=0;r<e.length;r+=1)this[n].insertBefore(e[r],this[n].childNodes[0]);else this[n].insertBefore(e,this[n].childNodes[0]);return this}function um(e){const t=[];for(let n=0;n<this.length;n+=1)null!==this[n].parentNode&&(e?Mv(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return Mv(t)}function lm(e){const t=[];for(let n=0;n<this.length;n+=1){let r=this[n].parentNode;for(;r;)e?Mv(r).is(e)&&t.push(r):t.push(r),r=r.parentNode}return Mv(t)}function cm(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].querySelectorAll(e);for(let e=0;e<r.length;e+=1)t.push(r[e])}return Mv(t)}function dm(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].children;for(let n=0;n<r.length;n+=1)e&&!Mv(r[n]).is(e)||t.push(r[n])}return Mv(t)}function fm(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function pm(){for(let e=0;e<this.length;e+=1){const t=this[e];if(1===t.nodeType){for(let e=0;e<t.childNodes.length;e+=1)t.childNodes[e].parentNode&&t.childNodes[e].parentNode.removeChild(t.childNodes[e]);t.textContent=""}}return this}Mv.fn=Lv.prototype;const hm="resize scroll".split(" ");function gm(e){return function(...t){if(void 0===t[0]){for(let t=0;t<this.length;t+=1)hm.indexOf(e)<0&&(e in this[t]?this[t][e]():Mv(this[t]).trigger(e));return this}return this.on(e,...t)}}const vm=gm("click"),mm=gm("focus"),ym=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let bm=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function Em(e){Promise.resolve().then(e)}var Cm,Dm=function(e){return Object.prototype.toString.call(e)};em&&(Mv.fn.css=em),am&&(Mv.fn.append=am),jv&&(Mv.fn.addClass=jv),Hv&&(Mv.fn.removeClass=Hv),zv&&(Mv.fn.hasClass=zv),qv&&(Mv.fn.on=qv),mm&&(Mv.fn.focus=mm),$v&&(Mv.fn.attr=$v),Uv&&(Mv.fn.removeAttr=Uv),Jv&&(Mv.fn.hide=Jv),Qv&&(Mv.fn.show=Qv),Zv&&(Mv.fn.offset=Zv),Yv&&(Mv.fn.width=Yv),Xv&&(Mv.fn.height=Xv),um&&(Mv.fn.parent=um),lm&&(Mv.fn.parents=lm),im&&(Mv.fn.is=im),Gv&&(Mv.fn.dataset=Gv),Wv&&(Mv.fn.val=Wv),om&&(Mv.fn.text=om),rm&&(Mv.fn.html=rm),dm&&(Mv.fn.children=dm),fm&&(Mv.fn.remove=fm),cm&&(Mv.fn.find=cm),tm&&(Mv.fn.each=tm),pm&&(Mv.fn.empty=pm),function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(Cm||(Cm={}));var wm=/\[object HTML([A-Z][a-z]*)*Element\]/,Am=function(e){return wm.test(Dm(e))},Sm=function(e){return null!=e&&"number"==typeof e.nodeType},xm=function(e){return Sm(e)&&e.nodeType===Cm.COMMENT_NODE},Om=function(e){return Sm(e)&&e.nodeType===Cm.ELEMENT_NODE},Nm=function(e){return"[object Selection]"===Dm(e)},Bm=function(e){return Sm(e)&&e.nodeType===Cm.TEXT_NODE},Tm=function(e){var t,n,r;return null!==(t=window&&window.document.getElementById(e))&&void 0!==t?t:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},km=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(xm(o)||Om(o)&&0===o.childNodes.length||Om(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=t-1,n="backward"):i<0?(s=!0,i=t+1,n="forward"):(o=r[i],t=i,i+="forward"===n?1:-1);return[o,t]},Fm=function(e,t,n){return zg(km(e,t,n),1)[0]},Im=function(e){var t,n,r="";if(Bm(e)&&e.nodeValue)return e.nodeValue;if(Om(e)){try{for(var o=Hg(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Im(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}var s=getComputedStyle(e).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==e.tagName||(r+="\n")}return r};function Pm(e,t){if(!Am(e)||"true"!==e.dataset.slateVoid)for(var n=e.childNodes,r=n.length;r-=1;){var o=n[r],i=o.nodeType;Bm(o)?t(o,e):[Cm.ELEMENT_NODE,Cm.DOCUMENT_NODE,Cm.DOCUMENT_FRAGMENT_NODE].includes(i)&&Pm(o,t)}}function Lm(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==Cm.ELEMENT_NODE?"":t.tagName.toLowerCase()}var Rm=new RegExp(String.fromCharCode(160),"g");function _m(e){return e.replace(Rm," ")}var Mm=["span","b","strong","i","em","s","strike","u","font","sub","sup"],jm=[];var Hm=[];var zm={};function $m(e,t){var n=e.length;if(n){var r=e[n-1];if(lg.isText(r)){var o=Object.keys(r);if(1===o.length&&"text"===o[0])return r.text+=t,!0}}return!1}function Um(e,t,n){return{type:"paragraph",children:[{text:Mv(e).text().replace(/\s+/gm," ")}]}}function Vm(e,t){var n=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach((function(e){if(Om(e)){if("BR"===e.nodeName)return void($m(n,"\n")||n.push({text:"\n"}));var r=Wm(Mv(e),t);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)}else if(Bm(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=_m(o),$m(n,o)||n.push({text:o}))}})),n)}(e,t),r=function(e){for(var t in zm)if(e[0].matches(t))return zm[t];return Um}(e),o=r(e[0],n,t);return Array.isArray(o)||(o=[o]),o.forEach((function(r){Mh.isVoid(t,r)||(0===n.length&&(r.children=[{text:e.text().replace(/\s+/gm," ")}]),Hm.forEach((function(n){r=n(e[0],r,t)})))})),o}function Gm(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,"\n"));var n=e[0].textContent||"";n=function(e){return e.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}(n);var r={text:n=_m(n)};return Hm.forEach((function(n){r=n(e[0],r,t)})),r}function Wm(e,t){jm.forEach((function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=Mv(r(e[0])))}));var n=Lm(e);if("span"===n){if(e.attr("data-w-e-type"))return Vm(e,t);if(e[0].childNodes.length>1){var r=e[0].childNodes,o=function(e,t){var n={text:""};return Hm.forEach((function(r){n=r(e[0],n,t)})),n}(Mv(e[0]),t);return Array.from(r).flatMap((function(e){var n=function(e,t,n){var r=e[0];if(Om(r)){var o=Wm(e,n);return Array.isArray(o)?o.map((function(e){return _g(_g({},t),e)})):[_g(_g({},t),o)]}if(xm(r))return null;var i=Bm(r)?{text:r.textContent||""}:Gm(e,n);return[_g(_g({},t),i)]}(Mv(e),o,t);return n||[]}))}return Gm(e,t)}if("code"===n)return"pre"===Lm(e.parent())?Vm(e,t):Gm(e,t);if(Mm.includes(n)){if(e[0].childNodes.length>0&&3!==e[0].childNodes[0].nodeType){r=e[0].childNodes;return _g(_g({},Wm(Mv(r[0]),t)),Gm(e,t))}return Gm(e,t)}return Vm(e,t)}function qm(e,t,n){var r=Mv(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(Qg.DESTROYED,(function(){r.removeAttr(t)})),!1)}function Km(e,t){void 0===t&&(t="");var n=[];""===t&&(t="<p><br></p>"),0!==t.indexOf("<")&&(t=t.split(/\n/).map((function(e){return"<p>".concat(e,"</p>")})).join(""));var r=Mv("<div>".concat(t,"</div>"));return Array.from(r.children()).forEach((function(t){var r=Wm(Mv(t),e);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)})),n}function Ym(e,t){return"w-e-element-".concat(e,"-").concat(t)}var Xm=[];var Zm,Jm,Qm={};function ey(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function ty(e,t){var n=e.type,r=void 0===n?"":n,o=e.children,i=void 0===o?[]:o,a=Mh.isVoid(t,e),s="";a||(s=i.map((function(e){return hy(e,t)})).join(""));var u=function(e){return Qm[e]||ey}(r),l=u(e,s,t),c="";if(c="string"==typeof l?l:l.html||"",a||Xm.forEach((function(t){return c=t(e,c)})),"string"==typeof l)return c;var d=l.prefix,f=void 0===d?"":d,p=l.suffix,h=void 0===p?"":p;return f&&(c=f+c),h&&(c+=h),c}var ny=function(){if(Jm)return Zm;Jm=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o="[object Map]",i="[object Promise]",a="[object Set]",s="[object String]",u="[object WeakMap]",l="[object DataView]",c=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,f="\\ud800-\\udfff",p="\\u0300-\\u036f\\ufe20-\\ufe23",h="\\u20d0-\\u20f0",g="\\ufe0e\\ufe0f",v="["+f+"]",m="["+p+h+"]",b="\\ud83c[\\udffb-\\udfff]",E="[^"+f+"]",C="(?:\\ud83c[\\udde6-\\uddff]){2}",D="[\\ud800-\\udbff][\\udc00-\\udfff]",w="\\u200d",A="(?:"+m+"|"+b+")"+"?",S="["+g+"]?",x=S+A+("(?:"+w+"(?:"+[E,C,D].join("|")+")"+S+A+")*"),O="(?:"+[E+m+"?",m,C,D,v].join("|")+")",N=RegExp(b+"(?="+b+")|"+O+x,"g"),B=RegExp("["+w+f+p+h+g+"]"),T="object"==typeof y&&y&&y.Object===Object&&y,k="object"==typeof self&&self&&self.Object===Object&&self,F=T||k||Function("return this")();function I(e,t){return function(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,(function(t){return e[t]}))}function P(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function L(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function R(e){return function(e){return B.test(e)}(e)?function(e){return e.match(N)||[]}(e):function(e){return e.split("")}(e)}var _,M,j=Function.prototype,H=Object.prototype,z=F["__core-js_shared__"],$=function(){var e=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),U=j.toString,V=H.hasOwnProperty,G=H.toString,W=RegExp("^"+U.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=F.Symbol,K=q?q.iterator:void 0,Y=H.propertyIsEnumerable,X=(_=Object.keys,M=Object,function(e){return _(M(e))}),Z=ce(F,"DataView"),J=ce(F,"Map"),Q=ce(F,"Promise"),ee=ce(F,"Set"),te=ce(F,"WeakMap"),ne=pe(Z),re=pe(J),oe=pe(Q),ie=pe(ee),ae=pe(te);function se(e,n){var r=he(e)||function(e){return function(e){return ye(e)&&ge(e)}(e)&&V.call(e,"callee")&&(!Y.call(e,"callee")||G.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!V.call(e,a)||i&&("length"==a||fe(a,o))||r.push(a);return r}function ue(e){if(!me(e)||function(e){return!!$&&$ in e}(e))return!1;var t=ve(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?W:c;return t.test(pe(e))}function le(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||H,t!==r)return X(e);var t,n,r,o=[];for(var i in Object(e))V.call(e,i)&&"constructor"!=i&&o.push(i);return o}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ue(n)?n:void 0}var de=function(e){return G.call(e)};function fe(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||d.test(t))&&t>-1&&t%1==0&&t<n}function pe(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(Z&&de(new Z(new ArrayBuffer(1)))!=l||J&&de(new J)!=o||Q&&de(Q.resolve())!=i||ee&&de(new ee)!=a||te&&de(new te)!=u)&&(de=function(e){var t=G.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?pe(n):void 0;if(r)switch(r){case ne:return l;case re:return o;case oe:return i;case ie:return a;case ae:return u}return t});var he=Array.isArray;function ge(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!ve(t)}function ve(e){var t=me(e)?G.call(e):"";return t==n||t==r}function me(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ye(e){return!!e&&"object"==typeof e}function be(e){return e?I(e,function(e){return ge(e)?se(e):le(e)}(e)):[]}return Zm=function(e){if(!e)return[];if(ge(e))return function(e){return"string"==typeof e||!he(e)&&ye(e)&&G.call(e)==s}(e)?R(e):function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e);if(K&&e[K])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[K]());var t=de(e);return(t==o?P:t==a?L:be)(e)},Zm}(),ry=b(ny),oy=0,iy=function(){this.id="".concat(oy++)},ay="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),sy="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),uy="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),ly="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),cy="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),dy="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),fy=!cy&&!ly&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,py={getWindow:function(e){var t=Dv.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var n=Cv.get(t);return n||(n=new iy,Cv.set(t,n)),n},setNewKey:function(e){var t=new iy;Cv.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var o=vv.get(r);if(null==o){if(Mh.isEditor(r))return n;break}var i=gv.get(r);if(null==i)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(t)))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=py.toDOMNode(e,e),n=t.getRootNode();return"[object HTMLDocument]"!==Dm(n)&&!function(e){return"[object ShadowRoot]"===Dm(e)}(n)||null==Reflect.get(n,"getSelection")?t.ownerDocument:n},getParentNode:function(e,t){return vv.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=py.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,t){var n=[py.findPath(e,t)[0]];return Vh.get(e,n)},toDOMNode:function(e,t){var n;if(Mh.isEditor(t))n=mv.get(e);else{var r=py.findKey(e,t);n=bv.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(t)));return n},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=py.toDOMNode(e,e);try{r=Om(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,o=ng.isBackward(t),i=py.toDOMPoint(e,n),a=ng.isCollapsed(t)?i:py.toDOMPoint(e,r),s=py.getWindow(e).document.createRange(),u=zg(o?a:i,2),l=u[0],c=u[1],d=zg(o?i:a,2),f=d[0],p=d[1],h=!!(Om(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!(Om(f)?f:f.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,h?1:c),s.setEnd(f,g?1:p),s},toDOMPoint:function(e,t){var n,r,o,i=zg(Mh.node(e,t.path),1)[0],a=py.toDOMNode(e,i);Mh.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var l=Hg(s),c=l.next();!c.done;c=l.next()){var d=c.value,f=d.childNodes[0];if(null!=f&&null!=f.textContent){var p=f.textContent.length,h=d.getAttribute("data-slate-length"),g=u+(null==h?p:parseInt(h,10));if(t.offset<=g){o=[f,Math.min(p,Math.max(0,t.offset-u))];break}u=g}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(t)));return o},toSlateNode:function(e,t){var n=Om(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?yv.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,o=t.target;if(null==n||null==r)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i,a=py.toSlateNode(e,t.target),s=py.findPath(e,a);if(Mh.isVoid(e,a)){var u=o.getBoundingClientRect(),l=e.isInline(a)?n-u.left<u.left+u.width-n:r-u.top<u.top+u.height-r,c=Mh.point(e,s,{edge:l?"start":"end"}),d=l?Mh.before(e,c):Mh.after(e,c);if(d)return Mh.range(e,d)}var f=this.getWindow(e).document;if(f.caretRangeFromPoint)i=f.caretRangeFromPoint(n,r);else{var p=f.caretPositionFromPoint(n,r);p&&((i=f.createRange()).setStart(p.offsetNode,p.offset),i.setEnd(p.offsetNode,p.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));return py.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,n){var r,o,i,a,s,u=n.exactMatch,l=n.suppressThrow;if((Nm(t)?t.anchorNode:t.startContainer)&&(Nm(t)?(r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=dy&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=t.collapsed)),null==r||null==i||null==o||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=py.toSlatePoint(e,[r,o],{exactMatch:u,suppressThrow:l});if(!c)return null;var d=s?c:py.toSlatePoint(e,[i,a],{exactMatch:u,suppressThrow:l});if(!d)return null;var f={anchor:c,focus:d};return ng.isExpanded(f)&&ng.isForward(f)&&Om(i)&&Mh.void(e,{at:f.focus,mode:"highest"})&&(f=Mh.unhangRange(e,f,{voids:!0})),f},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,a=zg(o?t:function(e){var t,n=zg(e,2),r=n[0],o=n[1];if(Om(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=zg(km(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;Om(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=Fm(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]}(t),2),s=a[0],u=a[1],l=s.parentNode,c=null,d=0;if(l){var f=l.closest('[data-slate-void="true"]'),p=l.closest("[data-slate-leaf]"),h=null,g=py.getWindow(e);if(p&&g.document.createRange){c=p.closest('[data-slate-node="text"]');var v=g.document.createRange();v.setStart(c,0),v.setEnd(s,u);var m=v.cloneContents();$g($g([],zg(ry(m.querySelectorAll("[data-slate-zero-width]"))),!1),zg(ry(m.querySelectorAll("[contenteditable=false]"))),!1).forEach((function(e){e.parentNode.removeChild(e)})),d=m.textContent.length,h=c}else f&&((p=f.querySelector("[data-slate-leaf]"))?(c=p.closest('[data-slate-node="text"]'),d=(h=p).textContent.length,h.querySelectorAll("[data-slate-zero-width]").forEach((function(e){d-=e.textContent.length}))):d=1);h&&d===h.textContent.length&&(l.hasAttribute("data-slate-zero-width")||sy&&(null===(r=h.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(d-=1)}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var y=py.toSlateNode(e,c);return{path:py.findPath(e,y),offset:d}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return Mh.hasPath(e,n.path)&&Mh.hasPath(e,r.path)},getNodeType:function(e){return Fh.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map((function(e){return Vh.string(e)})).join("")},getSelectedElems:function(e){var t,n,r=[],o=Mh.nodes(e,{universal:!0});try{for(var i=Hg(o),a=i.next();!a.done;a=i.next()){var s=zg(a.value,1)[0];Fh.isElement(s)&&r.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=zg(Mh.nodes(e,{match:function(e){return n.checkNodeType(e,t)},universal:!0}),1),o=r[0];return null==o?null:o[0]},getSelectedTextNode:function(e){var t=zg(Mh.nodes(e,{match:function(e){return lg.isText(e)},universal:!0}),1),n=t[0];return null==n?null:n[0]},isNodeSelected:function(e,t){var n=zg(Mh.nodes(e,{match:function(e){return e===t},universal:!0}),1),r=n[0];return null!=r&&zg(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(Mh.isEnd(e,n.anchor,t)||Mh.isEnd(e,n.focus,t))},getTextarea:function(e){var t=nv.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return iv.get(e)||null},getHoverbar:function(e){return sv.get(e)||null},normalizeContent:function(e){e.children.forEach((function(t,n){e.normalizeNode([t,[n]])}))},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-e.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var t,n,r,o,i=py.getTextarea(e).$textArea,a=null==i?void 0:i[0].childNodes;if(a)try{for(var s=Hg(Array.from(a)),u=s.next();!u.done;u=s.next()){var l=u.value;if(!Bm(l))break;l.remove()}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}var c=Mh.nodes(e,{match:function(t){return!(!Fh.isElement(t)||e.isInline(t))},universal:!0});try{for(var d=Hg(c),f=d.next();!f.done;f=d.next()){var p=f.value;if(null!=p){var h=p[0];Pm(py.toDOMNode(e,h),(function(e,t){var n=Mv(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)}))}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,n,r=Mh.nodes(e,{match:function(t){return e.isVoid(t)}}),o=0;try{for(var i=Hg(r),a=i.next();!a.done;a=i.next()){a.value&&(o+=1)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(ng.isExpanded(t))return!1;var n=py.getSelectedNodeByType(e,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(e,t){var n=Mh.node(e,t);if(null==n)return!1;var r=zg(n,1)[0].children;if(1===r.length&&""===r[0].text)return!0;return!1}};function hy(e,t){return Fh.isElement(e)?ty(e,t):function(e,t){var n=e.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=n;r=function(e){return e.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=py.getParentsNodes(t,e).some((function(e){return"pre"===py.getNodeType(e)}));if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=py.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return Xm.forEach((function(t){return r=t(e,r)})),r}(e,t)}var gy=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},vy=function(e,t,n){var r=py.toDOMRange(e,t).getBoundingClientRect(),o=py.toDOMRange(e,n).getBoundingClientRect();return gy(r,o)&&gy(o,r)};function my(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):Og.insertNodes(e,t,{mode:"highest"})}var yy,by,Ey,Cy,Dy,wy,Ay,Sy,xy,Oy,Ny,By,Ty,ky,Fy,Iy,Py,Ly,Ry,_y,My,jy,Hy,zy,$y,Uy,Vy,Gy,Wy,qy,Ky,Yy,Xy,Zy,Jy,Qy,eb,tb,nb,rb,ob=function(e){var t=e,n=t.onChange,r=t.insertText,o=t.apply,i=t.deleteBackward;return t.insertText=function(e){t.getConfig().readOnly||r(e)},t.apply=function(e){var n,r,i,a,s,u,l,c,d=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":try{for(var f=Hg(Mh.levels(t,{at:e.path})),p=f.next();!p.done;p=f.next()){var h=zg(p.value,2),g=h[0],v=h[1],m=py.findKey(t,g);d.push([v,m])}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var y=Hg(Mh.levels(t,{at:Kh.parent(e.path)})),b=y.next();!b.done;b=y.next()){var E=zg(b.value,2);g=E[0],v=E[1],m=py.findKey(t,g);d.push([v,m])}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}break;case"move_node":try{for(var C=Hg(Mh.levels(t,{at:Kh.common(Kh.parent(e.path),Kh.parent(e.newPath))})),D=C.next();!D.done;D=C.next()){var w=zg(D.value,2);g=w[0],v=w[1],m=py.findKey(t,g);d.push([v,m])}}catch(e){s={error:e}}finally{try{D&&!D.done&&(u=C.return)&&u.call(C)}finally{if(s)throw s.error}}}o(e);try{for(var A=Hg(d),S=A.next();!S.done;S=A.next()){var x=zg(S.value,2);v=x[0],m=x[1],g=zg(Mh.node(t,v),1)[0];Cv.set(g,m)}}catch(e){l={error:e}}finally{try{S&&!S.done&&(c=A.return)&&c.call(A)}finally{if(l)throw l.error}}},t.deleteBackward=function(n){if("line"!==n)return i(n);if(e.selection&&ng.isCollapsed(e.selection)){var r=Mh.above(e,{match:function(t){return Mh.isBlock(e,t)},at:e.selection});if(r){var o=zg(r,2)[1],a=Mh.range(e,o,e.selection.anchor),s=function(e,t){var n=Mh.range(e,ng.end(t)),r=Array.from(Mh.positions(e,{at:t})),o=0,i=r.length,a=Math.floor(i/2);if(vy(e,Mh.range(e,r[o]),n))return Mh.range(e,r[o],n);if(r.length<2)return Mh.range(e,r[r.length-1],n);for(;a!==r.length&&a!==o;)vy(e,Mh.range(e,r[a]),n)?i=a:o=a,a=Math.floor((o+i)/2);return Mh.range(e,r[i],n)}(t,a);ng.isCollapsed(s)||Og.delete(e,{at:s})}}},t.onChange=function(){var e=t.selection;null!=e&&Av.set(t,e),t.emit("change"),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children;return(void 0===e?[]:e).map((function(e){return hy(e,t)})).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map((function(e){return Vh.string(e)})).join("\n")},t.getSelectionText=function(){var n=t.selection;return null==n?"":Mh.string(e,n)},t.getElemsByType=function(e,n){var r,o;void 0===n&&(n=!1);var i=[],a=Mh.nodes(t,{at:[],universal:!0});try{for(var s=Hg(a),u=s.next();!u.done;u=s.next()){var l=zg(u.value,1)[0];if(Fh.isElement(l))if(n?l.type.indexOf(e)>=0:l.type===e){var c=py.findKey(t,l),d=Ym(l.type,c.id);i.push(_g(_g({},l),{id:d}))}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=void 0===e?[]:e;if(n.length>1)return!1;var r=n[0];if(null==r)return!0;if(!Fh.isElement(r)||"paragraph"!==r.type)return!1;var o=r.children,i=void 0===o?[]:o;if(i.length>1)return!1;var a=i[0];return null==a||lg.isText(a)&&""===a.text},t.clear=function(){Og.delete(t,{at:{anchor:Mh.start(t,[]),focus:Mh.end(t,[])}}),0===t.children.length&&Og.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return py.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e){var r=document.createElement("div");r.innerHTML=e;var o=Array.from(r.childNodes);if(o=o.filter((function(e){var t=e.nodeName;return!!Bm(e)||!!Om(e)&&!Nv.has(t.toLowerCase())})),0!==o.length){var i=t.selection;if(null!=i){var a=null;if(py.isSelectedEmptyParagraph(t)&&!n)a=[i.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var s=0;o.forEach((function(e,n){var r=e.nodeName,i=e.textContent,a=void 0===i?"":i;if(Bm(e)){if(!a||!a.trim())return;t.insertNode({text:a})}else if("BR"!==r){var u=e,l=!1;if(Mm.includes(r.toLowerCase()))l=!0;else for(var c in zm)if(u.matches(c)){l=!0;break}if(l){var d=Wm(Mv(u),t);return Array.isArray(d)?(d.forEach((function(e){return my(t,e)})),s+=1):(my(t,d),s+=1),void(py.isSelectedVoidNode(t)&&t.move(1))}var f=window.getComputedStyle(u).display;if(!py.isSelectedEmptyParagraph(t)&&f.indexOf("inline")<0){if(n>=1)(function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")})(o[n-1])&&t.insertBreak();t.insertBreak()}t.dangerouslyInsertHtml(u.innerHTML,!0)}else t.insertText("\n")})),s&&a&&py.isEmptyPath(t,a)&&Og.removeNodes(t,{at:a}),r.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var n=t.isDisabled(),r=t.isFocused(),o=JSON.stringify(t.selection);t.enable(),t.focus(),t.clear();var i=Km(t,null==e?"":e);if(Og.insertFragment(t,i),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(o))}catch(e){t.select(Mh.start(t,[]))}},t},ib=1,ab=function(e){var t=e;return t.id="wangEditor-".concat(ib++),t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(py.toDOMNode(t,t).focus({preventScroll:!0}),wv.set(t,!0),e){var n=Mh.end(t,[]);Og.select(t,n)}else{var r=Av.get(t);r?Og.select(t,r):Og.select(t,Mh.start(t,[]))}},t.isFocused=function(){return!!wv.get(t)},t.blur=function(){py.toDOMNode(t,t).blur(),Og.deselect(t),wv.set(t,!1)},t.updateView=function(){py.getTextarea(t).changeViewState();var e=py.getToolbar(t);e&&e.changeToolbarState();var n=py.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=py.getTextarea(t);e.destroy(),nv.delete(t),rv.delete(e);var n=py.getToolbar(t);n&&(n.destroy(),iv.delete(t),ov.delete(n));var r=py.getHoverbar(t);r&&(r.destroy(),sv.delete(t),av.delete(r)),t.isDestroyed=!0,t.emit("destroyed")}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return n+="\nYou has disabled editor scroll, please do this yourself",void console.warn(n)}var r=Mv("#".concat(e));if(0!==r.length){var o=r[0];if(!py.hasDOMNode(t,o)){n="Element (found by id is '".concat(e,"') is not in editor DOM");return n+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(n,o)}var i=py.getTextarea(t),a=i.$textAreaContainer,s=i.$scroll,u=r.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||py.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=lv.get(t);null!=e&&e.forEach((function(e){return e.hide()}))},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return py.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=py.getToolbar(t);n&&(e=n.$box);var r=py.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),t.isFullScreen=!0,t.emit("fullScreen")}},t.unFullScreen=function(){if(t.isFullScreen){var e=py.getTextarea(t).$box.parent();setTimeout((function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit("unFullScreen")}),200)}},t.getEditableContainer=function(){return py.getTextarea(t).$textAreaContainer[0]},t},sb={exports:{}},ub={exports:{}};function lb(){if(by)return yy;by=1;return yy=function(e){return null!=e}}function cb(){if(wy)return Dy;wy=1;var e=function(){if(Cy)return Ey;Cy=1;var e=lb(),t={object:!0,function:!0,undefined:!0};return Ey=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return Dy=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function db(){if(Oy)return xy;Oy=1;var e=function(){if(Sy)return Ay;Sy=1;var e=cb();return Ay=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(e){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,n=Function.prototype.toString;return xy=function(r){return!!e(r)&&!t.test(n.call(r))}}function fb(){if(Ly)return Py;Ly=1;var e=(Iy?Fy:(Iy=1,Fy=function(){}))();return Py=function(t){return t!==e&&null!==t},Py}function pb(){return jy||(jy=1,My=(ky?Ty:(ky=1,Ty=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(_y)return Ry;_y=1;var e=fb(),t=Object.keys;return Ry=function(n){return t(e(n)?Object(n):n)}}()),My}function hb(){if(Uy)return $y;Uy=1;var e=pb(),t=function(){if(zy)return Hy;zy=1;var e=fb();return Hy=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return $y=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(t(r)),s=function(e){try{r[e]=o[e]}catch(e){i||(i=e)}},a=1;a<u;++a)e(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},$y}function gb(){return Gy?Vy:(Gy=1,Vy=(By||(By=1,Ny=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}),Ny)()?Object.assign:hb())}function vb(){return Qy||(Qy=1,Jy=function(){if(Yy)return Ky;Yy=1;var e="razdwatrzy";return Ky=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(Zy)return Xy;Zy=1;var e=String.prototype.indexOf;return Xy=function(t){return e.call(this,t,arguments[1])>-1},Xy}()),Jy}function mb(){if(eb)return ub.exports;eb=1;var e=lb(),t=db(),n=gb(),r=function(){if(qy)return Wy;qy=1;var e=fb(),t=Array.prototype.forEach,n=Object.create;return Wy=function(r){var o=n(null);return t.call(arguments,(function(t){e(t)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(t),o)})),o},Wy}(),o=vb(),i=ub.exports=function(t,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof t?(l=i,i=t,t=null):l=arguments[2],e(t)?(a=o.call(t,"c"),s=o.call(t,"e"),u=o.call(t,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,d;return"string"!=typeof i?(c=s,s=a,a=i,i=null):c=arguments[3],e(a)?t(a)?e(s)?t(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,e(i)?(u=o.call(i,"c"),l=o.call(i,"e")):(u=!0,l=!1),d={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),d):d},ub.exports}var yb=(rb||(rb=1,function(e,t){var n,r,o,i,a,s,u,l=mb(),c=(nb||(nb=1,tb=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),tb),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,h=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=p(null),h(this,"__ee__",m),m.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},r=function(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),d.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e,t){var n,r,o,i;if(c(t),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},i=function(e){var t,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)d.call(r,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];d.call(o,this,i)}},a={on:n,once:r,off:o,emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?p(u):g(Object(e),s)},t.methods=a}(sb,sb.exports)),sb.exports),bb=b(yb);function Eb(e){var t=Sv.get(e);return null==t&&(t=bb(),Sv.set(e,t)),t}var Cb=new WeakMap;function Db(e,t){var n=Cb.get(e);null==n&&(n=new Set,Cb.set(e,n)),n.add(t)}var wb=function(e){var t=e;return t.on=function(e,n){var r=Eb(t);if(r.on(e,n),"destroyed"===e&&Db(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),Db(t,o)}},t.once=function(e,n){Eb(t).once(e,n)},t.off=function(e,n){Eb(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Eb(t);if(o.emit.apply(o,$g([e],zg(n),!1)),"destroyed"===e){var i=function(e){return Cb.get(e)||new Set}(t);i.forEach((function(e){return o.off("destroyed",e)})),function(e){Cb.set(e,new Set)}(t)}},t},Ab=function(e){var t=e;return t.setFragmentData=function(e){var n=t.selection;if(n){var r=zg(ng.edges(n),2),o=r[0],i=r[1],a=Mh.void(t,{at:o.path}),s=Mh.void(t,{at:i.path});if(!ng.isCollapsed(n)||a){var u=py.toDOMRange(t,n),l=u.cloneContents(),c=l.childNodes[0];if(l.childNodes.forEach((function(e){e.textContent&&""!==e.textContent.trim()&&(c=e)})),s){var d=zg(s,1)[0],f=u.cloneRange(),p=py.toDOMNode(t,d);f.setEndAfter(p),l=f.cloneContents()}if(a&&(c=l.querySelector("[data-slate-spacer]")),Array.from(l.querySelectorAll("[data-slate-zero-width]")).forEach((function(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""})),Bm(c)){var h=c.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(c),l.appendChild(h),c=h}var g=t.getFragment(),v=JSON.stringify(g),m=window.btoa(encodeURIComponent(v));c.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var y=l.ownerDocument.createElement("div");return y.appendChild(l),y.setAttribute("hidden","true"),l.ownerDocument.body.appendChild(y),e.setData("text/html",y.innerHTML),e.setData("text/plain",Im(y)),l.ownerDocument.body.removeChild(y),e}}},t.insertData=function(e){var n,r,o=e.getData("application/x-slate-fragment");if(o){var i=decodeURIComponent(window.atob(o)),a=JSON.parse(i);t.insertFragment(a)}else{var s=e.getData("text/plain"),u=e.getData("text/html");if(u)t.dangerouslyInsertHtml(u);else if(s){var l=s.split(/\n\r|\r\n|\r|\n/),c=!1;try{for(var d=Hg(l),f=d.next();!f.done;f=d.next()){var p=f.value,h=py.getLeftLengthOfMaxLength(t);c&&h>0&&Og.splitNodes(t,{always:!0}),t.insertText(p),c=!0}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}}}},t},Sb=function(e){var t=e,n=t.insertText,r=t.insertNode,o=t.insertFragment,i=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=py.getLeftLengthOfMaxLength(t);r<=0||(r<e.length?n(e.slice(0,r)):n(e))}else n(e)},t.insertNode=function(e){if(t.getConfig().maxLength){var n=py.getLeftLengthOfMaxLength(t);if(!(n<=0))n<Vh.string(e).length||r(e)}else r(e)},t.insertFragment=function(e){if(t.getConfig().maxLength){if(e.length>0){var n=e[0];if(py.getLeftLengthOfMaxLength(t)<Vh.string(n).length)return;o([n]);for(var r=1;r<e.length;r+=1)t.insertNode(e[r])}}else o(e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e)if(t.getConfig().maxLength){var r=py.getLeftLengthOfMaxLength(t);if(!(r<=0)){var o=document.createElement("div");o.innerHTML=e,r<Array.from(o.childNodes).reduce((function(e,t){var n=t.nodeName;return t?Bm(t)?e+(t.textContent||""):Om(t)?Nv.has(n.toLowerCase())?e:e+(t.textContent||""):e:e}),"").length||i(e,n)}}else i(e,n)},t};function xb(e){var t=py.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function Ob(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=xb(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,u=py.toDOMRange(e,n).getClientRects(),l=u?u[0]:null;if(null==l)return t;var c={},d=l.top-o,f=l.left-i;if(f>a/2){var p=a-f;c.right="".concat(p+5,"px")}else c.left="".concat(f+5,"px");if(d>s/2){var h=s-d;c.bottom="".concat(h+5,"px")}else{var g=u[u.length-1],v=g.top-o+g.height;v<0&&(v=0),c.top="".concat(v+5,"px")}return c}function Nb(e,t,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==e.selection)return r;var o=Fh.isElement(t)&&e.isVoid(t),i=Fh.isElement(t)&&e.isInline(t),a=Ev.get(t);if(null==a)return r;var s=a.getBoundingClientRect(),u=s.top,l=s.left,c=s.height,d=s.width;if(o){var f=function(e){var t=[];t.push(e);for(var n=0;t.length>0;){var r=t.pop();if(null==r)break;if((n+=1)>1e4)break;var o=r.nodeName;if(r.nodeType===Cm.ELEMENT_NODE){var i=o.toLowerCase();if(ym.includes(i)||"iframe"===i||"video"===i)return r;var a=r.children||[],s=a.length;if(s)for(var u=s-1;u>=0;u-=1)t.push(a[u])}}return null}(a);if(null!=f){var p=f.getBoundingClientRect();u=p.top,c=p.height}}var h=xb(e);if(null==h)return r;var g=h.top,v=h.left,m=h.width,y=h.height,b={},E=u-g,C=l-v;if("bar"===n)return b.left="".concat(C,"px"),E>40?b.bottom="".concat(y-E+5,"px"):b.top="".concat(E+c+5,"px"),b;if("modal"===n){if(o?i?C>(m-d)/2?b.right="".concat(m-C+5,"px"):b.left="".concat(C+d+5,"px"):b.left="20px":b.left="".concat(C,"px"),o)(D=E)<0&&(D=0),b.top="".concat(D,"px");else if(E>(y-c)/2)b.bottom="".concat(y-E+5,"px");else{var D;(D=E+c)<0&&(D=0),b.top="".concat(D+5,"px")}return b}throw new Error("type '".concat(n,"' is invalid"))}function Bb(e,t){Em((function(){var n=xb(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=t.offset(),l=u.top,c=u.left,d=t.width(),f=t.height(),p=l-o,h=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=p+f-s)>0){var v=t.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),t.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=t.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=h+d-a)>0){var E=t.css("left"),C=parseInt(E.toString(),10)-r;C<0&&(C=0),t.css("left","".concat(C,"px"))}if(g.indexOf("right")>=0&&c<0){var D=t.css("right"),w=parseInt(D.toString(),10)-Math.abs(c);t.css("right","".concat(w,"px"))}}}))}var Tb,kb,Fb=function(e){var t=e;return t.select=function(e){Og.select(t,e)},t.deselect=function(){var n=t.selection,r=py.findDocumentOrShadowRoot(t).getSelection();r&&r.rangeCount>0&&r.removeAllRanges(),n&&Og.deselect(e)},t.move=function(t,n){void 0===n&&(n=!1),t&&(t<0||Og.move(e,{distance:t,unit:"character",reverse:n}))},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=Av.get(t);null!=e&&(t.focus(),Og.select(t,e))},t.getSelectionPosition=function(){return Ob(t)},t.getNodePosition=function(e){return Nb(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var n=zg(ng.edges(e),2),r=n[0],o=n[1],i=zg(Mh.edges(t,[]),2),a=i[0],s=i[1];return!(!Jh.equals(r,a)||!Jh.equals(o,s))},t.selectAll=function(){var e=Mh.start(t,[]),n=Mh.end(t,[]);Og.select(t,{anchor:e,focus:n})},t};var Ib=function(){if(kb)return Tb;kb=1;var e=NaN,t="[object Symbol]",n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof y&&y&&y.Object===Object&&y,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,d=Math.max,f=Math.min,p=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(s){if("number"==typeof s)return s;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&c.call(e)==t}(s))return e;if(h(s)){var u="function"==typeof s.valueOf?s.valueOf():s;s=h(u)?u+"":u}if("string"!=typeof s)return 0===s?s:+s;s=s.replace(n,"");var l=o.test(s);return l||i.test(s)?a(s.slice(2),l?2:8):r.test(s)?e:+s}return Tb=function(e,t,n){var r,o,i,a,s,u,l=0,c=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=o;return r=o=void 0,l=t,a=e.apply(i,n)}function b(e){var n=e-u;return void 0===u||n>=t||n<0||v&&e-l>=i}function E(){var e=p();if(b(e))return C(e);s=setTimeout(E,function(e){var n=t-(e-u);return v?f(n,i-(e-l)):n}(e))}function C(e){return s=void 0,m&&r?y(e):(r=o=void 0,a)}function D(){var e=p(),n=b(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(E,t),c?y(e):a}(u);if(v)return s=setTimeout(E,t),y(u)}return void 0===s&&(s=setTimeout(E,t)),a}return t=g(t)||0,h(n)&&(c=!!n.leading,i=(v="maxWait"in n)?d(g(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),D.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=o=s=void 0},D.flush=function(){return void 0===s?a:C(p())},D},Tb}(),Pb=b(Ib);const Lb={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Rb{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||Lb,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Rb(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Rb(this.logger,e)}}var _b=new Rb;class Mb{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[r,o]=t;for(let t=0;t<o;t++)r.apply(r,[e,...n])}))}}}const jb=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},Hb=e=>null==e?"":""+e,zb=/###/g,$b=e=>e&&e.indexOf("###")>-1?e.replace(zb,"."):e,Ub=e=>!e||"string"==typeof e,Vb=(e,t,n)=>{const r="string"!=typeof t?t:t.split(".");let o=0;for(;o<r.length-1;){if(Ub(e))return{};const t=$b(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Ub(e)?{}:{obj:e,k:$b(r[o])}},Gb=(e,t,n)=>{const{obj:r,k:o}=Vb(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=Vb(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Vb(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},Wb=(e,t)=>{const{obj:n,k:r}=Vb(e,t);if(n)return n[r]},qb=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):qb(e[r],t[r],n):e[r]=t[r]);return e},Kb=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Yb={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Xb=e=>"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>Yb[e])):e;const Zb=[" ",",","?","!",";"],Jb=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),Qb=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},eE=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class tE extends Mb{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):"string"==typeof n&&o?a.push(...n.split(o)):a.push(n)));const s=Wb(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),s||!i||"string"!=typeof n?s:Qb(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Gb(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)("string"==typeof n[r]||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=Wb(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?qb(s,n,o):s={...s,...n},Gb(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((e=>t[e]&&Object.keys(t[e]).length>0))}toJSON(){return this.data}}var nE={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach((e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))})),t}};const rE={};class oE extends Mb{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach((e=>{t[e]&&(n[e]=t[e])}))})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=_b.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=Zb.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=Jb.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);let d=c&&c.res;const f=c&&c.usedKey||i,p=c&&c.exactUsedKey||i,h=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&d&&("string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0&&("string"!=typeof g||!Array.isArray(d))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(d),n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=d[e])}d=n}}else if(v&&"string"==typeof g&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&"string"!=typeof t.count,f=oE.hasDefaultValue(t),p=l?this.pluralResolver.getSuffix(u,t.count,t):"",h=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=v),this.isValidLookup(d)||(a=!0,d=i);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=f&&v!==d&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=f&&r!==d?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||v)}))})):r(e,i,v))}d=this.extendTranslation(d,e,t,c,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):i.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=nE.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&"string"!=typeof a.count,d=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach((e=>{this.isValidLookup(t)||(i=e,!rE[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(rE[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(r)&&i.push(u+e.replace(r,this.options.pluralSeparator)),d&&i.push(u+t)),f){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const iE=e=>e.charAt(0).toUpperCase()+e.slice(1);class aE{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=_b.create("languageUtils")}getScriptPartFromCode(e){if(!(e=eE(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=eE(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=iE(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=iE(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=iE(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let sE=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],uE={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const lE=["v1","v2","v3"],cE=["v4"],dE={zero:0,one:1,two:2,few:3,many:4,other:5};class fE{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=_b.create("pluralResolver"),this.options.compatibilityJSON&&!cE.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return sE.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:uE[t.fc]}}))})),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=eE("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(n,{type:r});return this.pluralRulesCache[o]=i,i}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>dE[e]-dE[t])).map((e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`)):n.numbers.map((n=>this.getSuffix(e,n,t))):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!lE.includes(this.options.compatibilityJSON)}}const pE=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=Wb(e,n);return void 0!==r?r:Wb(t,n)})(e,t,n);return!i&&o&&"string"==typeof n&&(i=Qb(e,n,r),void 0===i&&(i=Qb(t,n,r))),i},hE=e=>e.replace(/\$/g,"$$$$");class gE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=_b.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:Xb,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Kb(o):i||"{{",this.suffix=a?Kb(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?Kb(d):f||Kb("$t("),this.nestingSuffix=p?Kb(p):h||Kb(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const o=pE(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(pE(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,d=[{regex:this.regexpUnescape,safeValue:e=>hE(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?hE(this.escape(e)):hE(e)}];return d.forEach((t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const t=l(e,o,r);i="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=Hb(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&"string"!=typeof o.replace?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Hb(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=s.reduce(((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()})),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const vE=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(eE(r),o),t[a]=s),s(n)}};class mE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=_b.create("formatter"),this.options=e,this.formats={number:vE(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:vE(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:vE(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:vE(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:vE(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=vE(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find((e=>e.indexOf(")")>-1))){const e=o.findIndex((e=>e.indexOf(")")>-1));o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce(((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e}),e);return i}}class yE extends Mb{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=_b.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach((e=>{let r=!0;t.forEach((t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach((n=>{((e,t,n)=>{const{obj:r,k:o}=Vb(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(e,t,n,r,s):u(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const bE=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),EE=e=>("string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),CE=()=>{};class DE extends Mb{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=EE(e),this.services={},this.logger=_b,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=bE();this.options={...r,...this.options,...EE(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?_b.init(o(this.modules.logger),this.options):_b.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=mE);const n=new aE(this.options);this.store=new tE(this.options.resources,this.options);const i=this.services;i.logger=_b,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new fE(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new gE(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new yE(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new oE(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)})),this.modules.external.forEach((e=>{e.init&&e.init(this)}))}if(this.format=this.options.interpolation.format,n||(n=CE),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((t=>{this[t]=function(){return e.store[t](...arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((t=>{this[t]=function(){return e.store[t](...arguments),e}}));const i=jb(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:CE;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=jb();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=CE),this.services.backendConnector.reload(e,t,(e=>{r.resolve(),n(e)})),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&nE.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=jb();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let c;return c=i.keyPrefix&&Array.isArray(e)?e.map((e=>`${i.keyPrefix}${l}${e}`)):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=jb();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=jb();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new aE(bE());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new DE(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:CE;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new DE(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach((e=>{o[e]=this[e]})),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new tE(this.store.data,r),o.services.resourceStore=o.store),o.translator=new oE(o.services,r),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit(e,...n)})),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const wE=DE.createInstance();wE.createInstance=DE.createInstance,wE.createInstance,wE.dir,wE.init,wE.loadResources,wE.reloadResources,wE.use,wE.changeLanguage,wE.getFixedT,wE.t,wE.exists,wE.setDefaultNamespace,wE.hasLoadedNamespace,wE.loadNamespaces,wE.loadLanguages;var AE="translation";function SE(e,t){wE.addResourceBundle(e,AE,t,!0,!0)}function xE(e){wE.changeLanguage(e)}function OE(e){return wE.getResourceBundle(e,AE)}function NE(e){return wE.on("languageChanged",e),function(){return wE.off("languageChanged",e)}}wE.init({lng:"zh-CN",resources:{}});var BE=wE.t.bind(wE);function TE(e){if(e.removeAttr){e.removeAttr("width"),e.removeAttr("height"),e.removeAttr("fill"),e.removeAttr("class"),e.removeAttr("t"),e.removeAttr("p-id");var t=e.children();t.length&&TE(t)}}function kE(){return Mv('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function FE(){return Mv('<div class="w-e-bar-divider"></div>')}function IE(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=ay?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(e.attr("data-tooltip",r),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var PE=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=Mv('<div class="w-e-bar-item"></div>'),this.$button=Mv('<button type="button"></button>'),this.disabled=!1,this.menu=t;var o=t.tag,i=t.width;if("button"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'button'"));var a=t.title,s=t.hotkey,u=void 0===s?"":s,l=t.iconSvg,c=void 0===l?"":l,d=this.$button;if(c){var f=Mv(c);TE(f),d.append(f)}else d.text(a);IE(d,c,a,u,n),n&&c&&d.append(Mv('<span class="title">'.concat(a,"</span>"))),i&&d.css("width","".concat(i,"px")),d.attr("data-menu-key",e),this.$elem.append(d),Em((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(t){t.preventDefault(),KE(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())}))},e.prototype.exec=function(){var e=KE(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=KE(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=KE(this),t=this.$button,n=this.menu.isDisabled(e);(null==e.selection||e.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?t.addClass(r):t.removeClass(r),this.disabled=n},e.prototype.setIcon=function(){var e=KE(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=Mv(n);TE(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=KE(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&IE(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),LE=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return Rg(t,e),t.prototype.onButtonClick=function(){},t}(PE),RE=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=lv.get(e);null==t&&(t=new Set,lv.set(e,t)),t.add(this),cv.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var n=this.genSelfElem();n&&t.append(n)},e.prototype.appendTo=function(e){var t=this.$elem;e.append(t)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=cv.get(this);e&&e.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=cv.get(this);e&&e.emit("modalOrPanelHide")}},e}(),_E=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=Mv('<div class="w-e-drop-panel"></div>'),n}return Rg(t,e),t.prototype.genSelfElem=function(){return null},t}(RE),ME=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=kE();o.$button.append(i)}return o}return Rg(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var e=this.menu;if(null!=e.getPanelContentElem){var t=KE(this);if(null==this.dropPanel){var n=new _E(t),r=e.getPanelContentElem(t);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=e.getPanelContentElem(t);o.renderContent(r),o.show()}}var i=this.dropPanel;if(i.isShow){var a=this.$elem,s=a.offset().left,u=a.parents(".w-e-bar");s-u.offset().left>=u.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},t}(PE),jE=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=Mv('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var o=r.$elem;return o.on("click",(function(e){return e.stopPropagation()})),o.on("keyup",(function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())})),r}return Rg(t,e),t.prototype.genSelfElem=function(){var e=this,t=Mv('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),n=cv.get(this);return t.on("click",(function(){e.hide(),null==n||n.restoreSelection()})),t},t.prototype.setStyle=function(e){var t=this.width,n=this.$elem;n.attr("style",""),t&&n.css("width","".concat(t,"px")),n.css(e)},t}(RE);function HE(e,t,n){var r=Mv('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=Mv('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function zE(e,t,n){var r=Mv('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=Mv('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]}function $E(e,t){var n=Mv('<div class="button-container"></div>'),r=Mv('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return n.append(r),[n[0],r[0]]}var UE=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;return o.$body=Mv("body"),o.modal=null,o.menu=n,o}return Rg(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=KE(this),t=this.menu.getModalPositionNode(e);return Fh.isElement(t)?Nb(e,t,"modal"):Ob(e)},t.prototype.handleModal=function(){var e=KE(this),t=this.menu;if(null==this.modal){var n=new jE(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},t.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var n=KE(this),r=this.menu;if(null!=r.getModalContentElem){var o=py.getTextarea(n),i=py.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(e.renderContent(s),a)e.setStyle({left:"0",right:"0"});else{var u=this.getPosition();e.setStyle(u)}t&&(a?e.appendTo(this.$body):e.appendTo(o.$textAreaContainer)),e.show(),a||Bb(n,e.$elem),setTimeout((function(){n.blur()}))}},t}(PE);var VE=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=Mv('<div class="w-e-select-list"></div>'),n&&r.$elem.css("width","".concat(n,"px")),r.$elem.on("click",(function(e){e.stopPropagation()})),r}return Rg(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=Mv("<ul></ul>");e.forEach((function(e){var t=e.value,r=e.text,o=e.selected,i=e.styleForRenderMenuList,a=Mv('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var s=Mv('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');a.append(s),a.addClass("selected")}a.append(Mv('<span data-value="'.concat(t,'">').concat(r,"</span>"))),a.attr("title",r),n.append(a)})),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(RE);var GE=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=Mv('<div class="w-e-bar-item"></div>'),this.$button=Mv('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var o=t.tag,i=t.title,a=t.width,s=t.iconSvg,u=void 0===s?"":s,l=t.hotkey,c=void 0===l?"":l;if("select"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'select'"));var d=this.$button;a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",e),IE(d,u,i,c,n),this.$elem.append(d),this.menu=t,Em((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",(function(t){t.preventDefault(),KE(e).hidePanelOrModal(),e.trigger()}))},e.prototype.trigger=function(){var e=this,t=KE(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new VE(t,n.selectPanelWidth);var r=this.selectList,o=n.getOptions(t);r.renderList(o),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",(function(t){var n=t.target;if(null!=n){t.preventDefault();var r=Mv(n).attr("data-value");e.onChange(r)}}))}else{if((r=this.selectList).isShow)r.hide();else{o=n.getOptions(t);r.renderList(o),r.show()}}}},e.prototype.onChange=function(e){var t=KE(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=KE(this),t=this.menu,n=t.getValue(e),r=function(e,t){for(var n=e.length,r="",o=0;o<n;o++){var i=e[o];if(i.value===t){r=i.text;break}}return r}(t.getOptions(e),n.toString()),o=this.$button,i=kE();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=KE(this),t=this.menu.isDisabled(e),n=this.$button;(null==e.selection||e.isDisabled())&&(t=!0);var r="disabled";t?n.addClass(r):n.removeClass(r),this.disabled=t},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),WE=function(){function e(e){this.$elem=Mv('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=Mv('<div class="w-e-bar-item-menus-container"></div>'),this.$button=Mv('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,o=this.$elem,i=this.$button;if(n){var a=Mv(n);TE(a),i.append(a)}else i.text(r);i.attr("data-menu-key",t);var s=kE();i.append(s),o.append(i);var u=this.$container;o.append(u);var l=this.createObserver();this.observe(l)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver((function(){var o=t.find("button"),i=o.length;if(0!==i){var a=0;o.each((function(e){Mv(e).hasClass("disabled")&&a++})),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}}));return r},e}(),qE=new WeakMap;function KE(e){var t=uv.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function YE(e,t,n){void 0===n&&(n=!1);var r=qE.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new ME(e,t,n):a?new UE(e,t,n):new LE(e,t,n)}if("select"===o&&(r=new GE(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return qE.set(t,r),r}function XE(e,t){var n=e.selection;return null!=n&&(!ng.isCollapsed(n)&&(!py.getSelectedElems(e).some((function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)}))&&!!lg.isText(t)))}var ZE,JE,QE=function(){function e(){var e=this;this.$elem=Mv('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.lngListen=function(){},this.changeHoverbarState=Pb((function(){var t=e.isShow,n=e.getSelectedNodeAndMenuKeys()||{},r=n.node,o=void 0===r?null:r,i=n.menuKeys,a=void 0===i?[]:i,s=e.getEditorInstance();if(null!=o&&e.changeItemsState(),o&&Fh.isElement(o)&&t){var u=e.isSamePath(o,e.prevSelectedNode);if(!Mh.isBlock(s,o)&&u)return}e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o}),200),Em((function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),py.getTextarea(t).$textAreaContainer.append(n),t.on(Qg.CHANGE,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(Qg.SCROLL,r),t.on(Qg.FULLSCREEN,r),t.on(Qg.UNFULLSCREEN,r)})),this.lngListen=NE((function(){e.menus={},e.hideAndClean(),e.getEditorInstance().deselect()}))}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var e=this.$elem;e.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],e.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var e=this.$elem,t=!1,n="undefined"!=typeof window?window.innerHeight:null;n&&n>=360&&(n-e[0].getBoundingClientRect().bottom<360&&(t=!0));t?e.addClass("w-e-bar-bottom"):e.removeClass("w-e-bar-bottom")},e.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},e.prototype.changeItemsState=function(){var e=this;Em((function(){e.hoverbarItems.forEach((function(e){e.changeMenuState()}))}))},e.prototype.registerItems=function(e){var t=this,n=this.$elem;e.forEach((function(e){if("|"!==e)t.registerSingleItem(e);else{var r=FE();n.append(r)}}))},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=ev[e];if(null==o)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));r=o(),n[e]=r}var i=t.getMenuConfig(e);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=YE(e,r);this.hoverbarItems.push(a),uv.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),Fh.isElement(e)){var r=Nb(t,e,"bar");return n.css(r),void Bb(t,n)}if(lg.isText(e)){r=Ob(t);return n.css(r),void Bb(t,n)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(null==e.selection)return null;var t=this.getHoverbarKeysConf(),n=null,r=[],o=function(o){var i=t[o],a=i.match,s=i.menuKeys,u=void 0===s?[]:s,l=a||function(e,t){return py.checkNodeType(t,o)},c=zg(Mh.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),d=c[0];if(null!=d)return n=d[0],r=u,"break"};for(var i in t){if("break"===o(i))break}return null==n||0===r.length?null:{node:n,menuKeys:r}},e.prototype.getEditorInstance=function(){var e=av.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.getHoverbarKeysConf=function(){var e=this.getEditorInstance().getConfig().hoverbarKeys,t=void 0===e?{}:e,n=t.text;return n&&null==n.match&&(n.match=XE),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var n=py.findPath(null,e),r=py.findPath(null,t);return Kh.equals(n,r)},e.prototype.destroy=function(){var e;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function eC(){if(JE)return ZE;JE=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,u="object"==typeof y&&y&&y.Object===Object&&y,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),d=Object.prototype.toString,f=Math.max,p=Math.min,h=function(){return c.Date.now()};function g(t,n,r){var o,i,a,s,u,l,c=0,d=!1,g=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var n=o,r=i;return o=i=void 0,c=e,s=t.apply(r,n)}function E(e){var t=e-l;return void 0===l||t>=n||t<0||g&&e-c>=a}function C(){var e=h();if(E(e))return D(e);u=setTimeout(C,function(e){var t=n-(e-l);return g?p(t,a-(e-c)):t}(e))}function D(e){return u=void 0,y&&o?b(e):(o=i=void 0,s)}function w(){var e=h(),t=E(e);if(o=arguments,i=this,l=e,t){if(void 0===u)return function(e){return c=e,u=setTimeout(C,n),d?b(e):s}(l);if(g)return u=setTimeout(C,n),b(l)}return void 0===u&&(u=setTimeout(C,n)),s}return n=m(n)||0,v(r)&&(d=!!r.leading,a=(g="maxWait"in r)?f(m(r.maxWait)||0,n):a,y="trailing"in r?!!r.trailing:y),w.cancel=function(){void 0!==u&&clearTimeout(u),c=0,o=l=i=u=void 0},w.flush=function(){return void 0===u?s:D(h())},w}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&d.call(e)==n}(e))return t;if(v(e)){var u="function"==typeof e.valueOf?e.valueOf():e;e=v(u)?u+"":u}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var l=i.test(e);return l||a.test(e)?s(e.slice(2),l?2:8):o.test(e)?t:+e}return ZE=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(e);return v(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),g(t,n,{leading:o,maxWait:n,trailing:i})}}var tC=b(eC());function nC(e,t){return Sm(t)&&py.hasDOMNode(e,t,{editable:!0})}function rC(e,t){if(e.getConfig().readOnly)return!1;var n=oC(e,t)&&py.toSlateNode(e,t);return Mh.isVoid(e,n)}function oC(e,t){return Sm(t)&&py.hasDOMNode(e,t)}const iC=e=>"object"==typeof e&&null!=e&&1===e.nodeType,aC=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,sC=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return aC(n.overflowY,t)||aC(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},uC=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,lC=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},cC=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,d="function"==typeof l?l:e=>e!==l;if(!iC(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;iC(h)&&d(h);){if(h=lC(h),h===f){p.push(h);break}null!=h&&h===document.body&&sC(h)&&!sC(document.documentElement)||null!=h&&sC(h,c)&&p.push(h)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:E,top:C,right:D,bottom:w,left:A}=e.getBoundingClientRect(),{top:S,right:x,bottom:O,left:N}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let B="start"===s||"nearest"===s?C-S:"end"===s?w+O:C+b/2-S+O,T="center"===u?A+E/2-N+x:"end"===u?D+x:A-N;const k=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&C>=0&&A>=0&&w<=v&&D<=g&&C>=o&&w<=l&&A>=c&&D<=i)return k;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),S=parseInt(d.borderTopWidth,10),x=parseInt(d.borderRightWidth,10),O=parseInt(d.borderBottomWidth,10);let N=0,F=0;const I="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-x:0,P="offsetHeight"in t?t.offsetHeight-t.clientHeight-S-O:0,L="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,R="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)N="start"===s?B:"end"===s?B-v:"nearest"===s?uC(y,y+v,v,S,O,y+B,y+B+b,b):B-v/2,F="start"===u?T:"center"===u?T-g/2:"end"===u?T-g:uC(m,m+g,g,h,x,m+T,m+T+E,E),N=Math.max(0,N+y),F=Math.max(0,F+m);else{N="start"===s?B-o-S:"end"===s?B-l+O+P:"nearest"===s?uC(o,l,n,S,O+P,B,B+b,b):B-(o+n/2)+P/2,F="start"===u?T-c-h:"center"===u?T-(c+r/2)+I/2:"end"===u?T-i+x+I:uC(c,i,r,h,x+I,T,T+E,E);const{scrollLeft:e,scrollTop:a}=t;N=0===R?0:Math.max(0,Math.min(a+N/R,t.scrollHeight-n/R+P)),F=0===L?0:Math.max(0,Math.min(e+F/L,t.scrollWidth-r/L+I)),B+=a-N,T+=e-F}k.push({el:t,top:N,left:F})}return k},dC=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};function fC(e,t,n){void 0===n&&(n=!1);var r=t.selection,o=t.getConfig(),i=py.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||n)&&t.isFocused()){var a="None"!==i.type;if(r||a){var s=mv.get(t),u=!1;if(s.contains(i.anchorNode)&&s.contains(i.focusNode)&&(u=!0),a&&u&&r){var l=py.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(l&&ng.equals(l,r)){var c=!0;if(ng.isCollapsed(r)){var d=i.anchorNode,f=i.anchorOffset;if(d===s){var p=s.childNodes,h=void 0;(h=p[f])&&h.matches("table")&&(c=!1),(h=p[f-1])&&h.matches("table")&&(c=!1)}}if(c)return}}if(!r||py.hasRange(t,r)){e.isUpdatingSelection=!0;var g=r&&py.toDOMRange(t,r);if(g){ng.isBackward(r)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")&&g.getBoundingClientRect){v.getBoundingClientRect=g.getBoundingClientRect.bind(g);var m=document.body;!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(cC(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of cC(e,dC(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}(v,{scrollMode:"if-needed",boundary:o.scroll?s.parentElement:m,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else i.removeAllRanges();setTimeout((function(){g&&sy&&s.focus(),e.isUpdatingSelection=!1}))}else t.selection=py.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var pC=new WeakMap,hC=new WeakMap;var gC,vC={};var mC=function(){if(gC)return vC;gC=1,Object.defineProperty(vC,"__esModule",{value:!0});for(var e="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},n={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},r={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)r["f"+o]=111+o;function i(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return a(e,t)})),o=function(e){return r.some((function(t){return s(t,e)}))};return null==n?o:o(n)}function a(e,o){var i=o&&o.byKey,a={},s=(e=e.replace("++","+add")).split("+"),c=s.length;for(var d in t)a[t[d]]=!1;var f=!0,p=!1,h=void 0;try{for(var g,v=s[Symbol.iterator]();!(f=(g=v.next()).done);f=!0){var m=g.value,y=m.endsWith("?")&&m.length>1;y&&(m=m.slice(0,-1));var b=l(m),E=t[b];if(m.length>1&&!E&&!n[m]&&!r[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==c&&E||(i?a.key=b:a.which=u(m)),E&&(a[E]=!y||null)}}catch(e){p=!0,h=e}finally{try{!f&&v.return&&v.return()}finally{if(p)throw h}}return a}function s(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function u(e){return e=l(e),r[e]||e.toUpperCase().charCodeAt(0)}function l(e){return e=e.toLowerCase(),e=n[e]||e}return vC.default=i,vC.isHotkey=i,vC.isCodeHotkey=function(e,t){return i(e,t)},vC.isKeyHotkey=function(e,t){return i(e,{byKey:!0},t)},vC.parseHotkey=a,vC.compareHotkey=s,vC.toKeyCode=u,vC.toKeyName=l,vC}(),yC={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},bC={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},EC={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},CC=function(e){var t=yC[e],n=bC[e],r=EC[e],o=t&&mC.isKeyHotkey(t),i=n&&mC.isKeyHotkey(n),a=r&&mC.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(ay&&i&&i(e))||!(ay||!a||!a(e)))}},DC={isBold:CC("bold"),isCompose:CC("compose"),isMoveBackward:CC("moveBackward"),isMoveForward:CC("moveForward"),isDeleteBackward:CC("deleteBackward"),isDeleteForward:CC("deleteForward"),isDeleteLineBackward:CC("deleteLineBackward"),isDeleteLineForward:CC("deleteLineForward"),isDeleteWordBackward:CC("deleteWordBackward"),isDeleteWordForward:CC("deleteWordForward"),isExtendBackward:CC("extendBackward"),isExtendForward:CC("extendForward"),isExtendLineBackward:CC("extendLineBackward"),isExtendLineForward:CC("extendLineForward"),isItalic:CC("italic"),isMoveLineBackward:CC("moveLineBackward"),isMoveLineForward:CC("moveLineForward"),isMoveWordBackward:CC("moveWordBackward"),isMoveWordForward:CC("moveWordForward"),isRedo:CC("redo"),isSplitBlock:CC("splitBlock"),isTransposeCharacter:CC("transposeCharacter"),isUndo:CC("undo"),isTab:CC("tab"),isSelectAll:CC("selectAll")};function wC(e){e.preventDefault()}var AC={beforeinput:function(e,t,n){var r=e,o=n.getConfig().readOnly;if(fy&&!o&&nC(n,r.target)){var i=n.selection,a=r.inputType,s=r.dataTransfer||r.data||void 0;if("insertCompositionText"!==a&&"deleteCompositionText"!==a){if(r.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var u=zg(r.getTargetRanges(),1)[0];if(u){var l=py.toSlateRange(n,u,{exactMatch:!1,suppressThrow:!1});i&&ng.equals(i,l)||Og.select(n,l)}}if(i&&ng.isExpanded(i)){var c=py.getSelectedElems(n),d="table"===c[0].type,f="table-cell"!==c[c.length-1].type;if(d&&f)return;if(a.startsWith("delete")){var p=a.endsWith("Backward")?"backward":"forward";return void Mh.deleteFragment(n,{direction:p})}}switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":Mh.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":Mh.deleteForward(n);break;case"deleteContentBackward":Mh.deleteBackward(n);break;case"deleteEntireSoftLine":Mh.deleteBackward(n,{unit:"line"}),Mh.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":Mh.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":Mh.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":Mh.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":Mh.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":Mh.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":Mh.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":Mh.insertBreak(n);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===a&&!xv.get(n))break;"[object DataTransfer]"===Dm(s)?n.insertData(s):"string"==typeof s&&Mh.insertText(n,s)}}}},blur:function(e,t,n){var r=e,o=t.isUpdatingSelection,i=t.latestElement;if(!n.getConfig().readOnly&&!o&&nC(n,r.target)){var a=py.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var s=r.relatedTarget;if(!(s===py.toDOMNode(n,n)||Om(s)&&s.hasAttribute("data-slate-spacer"))){if(null!=s&&Sm(s)&&py.hasDOMNode(n,s)){var u=py.toSlateNode(n,s);if(Fh.isElement(u)&&!n.isVoid(u))return}if(uy){var l=a.getSelection();null==l||l.removeAllRanges()}wv.delete(n)}}}},focus:function(e,t,n){var r=py.toDOMNode(n,n),o=py.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,sy&&e.target!==r?r.focus():wv.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&oC(n,e.target)&&Sm(e.target)){var r=py.toSlateNode(n,e.target),o=py.findPath(n,r);if(Mh.hasPath(n,o))if(Vh.get(n,o)===r){var i=Mh.start(n,o),a=Mh.end(n,o),s=Mh.void(n,{at:i}),u=Mh.void(n,{at:a});if(s&&u&&Kh.equals(s[1],u[1])){var l=Mh.range(n,i);Og.select(n,l)}}}},compositionstart:function(e,t,n){if(nC(n,e.target)){var r=n.selection;if(r&&ng.isExpanded(r)&&(Mh.deleteFragment(n),Promise.resolve().then((function(){fC(t,n,!0)}))),n.selection){var o=py.toDOMRange(n,n.selection).startContainer,i=o.textContent||"";pC.set(n,i),hC.set(n,o)}t.isComposing=!0,function(e,t){var n;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}(t,n)}},compositionend:function(e,t,n){var r=e;if(nC(n,r.target)){t.isComposing=!1;var o=n.selection;if(null!=o){(dy||sy)&&py.cleanExposedTexNodeInSelectionBlock(n);for(var i=ng.isBackward(o)?o.focus:o.anchor,a=zg(Mh.node(n,[i.path[0]]),1)[0],s=0;s<i.path.length;s+=1){var u=zg(Mh.node(n,i.path.slice(0,s+1)),1)[0];if(Fh.isElement(u)&&((uy||sy)&&"link"===u.type||"code"===u.type)){py.setNewKey(a);break}}var l=r.data;if(l){if(n.getConfig().maxLength){var c=py.getLeftLengthOfMaxLength(n);if(c<l.length){var d=py.toDOMRange(n,o);d.startContainer.nodeType===Node.TEXT_NODE&&(d.startContainer.textContent=pC.get(n)||""),c>0&&Mh.insertText(n,l.slice(0,c)),t.changeViewState()}else Mh.insertText(n,l)}else{var f=py.findDocumentOrShadowRoot(n).getSelection();f&&function(e,t){if(ng.isCollapsed(t)){var n=t.anchor,r=t.focus;if([2,3].includes(n.path.length)&&[2,3].includes(r.path.length)&&(0===n.offset||0===r.offset)){var o=Mh.node(e,n.path),i=0===n.offset?n.path:r.path,a=[i[0],i[1]-1];if(0===i[1])return!1;var s=Mh.node(e,a);if(lg.isText(s[0])&&lg.isText(o[0]))return!0}}}(n,o)&&(n.selection=py.toSlateRange(n,f,{exactMatch:!1,suppressThrow:!1})),Mh.insertText(n,l)}uy||setTimeout((function(){var e=n.selection;if(null!=e){var t=hC.get(n);if(null!=t)py.toDOMRange(n,e).startContainer!==t&&(t.textContent=pC.get(n)||"")}}))}}}},compositionupdate:function(e,t,n){nC(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&nC(n,r.target)){if(function(e,t){var n=iv.get(e),r=n&&n.getMenus(),o=sv.get(e),i=o&&o.getMenus(),a=_g(_g({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&mC.isHotkey(l,t)&&!u.isDisabled(e)){var c=u.getValue(e);u.exec(e,c)}}}(n,r),DC.isTab(r))return wC(r),void n.handleTab();if(DC.isRedo(r))return wC(r),void("function"==typeof n.redo&&n.redo());if(DC.isUndo(r))return wC(r),void("function"==typeof n.undo&&n.undo());if(DC.isMoveLineBackward(r))return wC(r),void Og.move(n,{unit:"line",reverse:!0});if(DC.isMoveLineForward(r))return wC(r),void Og.move(n,{unit:"line"});if(DC.isExtendLineBackward(r))return wC(r),void Og.move(n,{unit:"line",edge:"focus",reverse:!0});if(DC.isExtendLineForward(r))return wC(r),void Og.move(n,{unit:"line",edge:"focus"});if(DC.isMoveBackward(r))return wC(r),void(o&&ng.isCollapsed(o)?Og.move(n,{reverse:!0}):Og.collapse(n,{edge:"start"}));if(DC.isMoveForward(r))return wC(r),void(o&&ng.isCollapsed(o)?Og.move(n):Og.collapse(n,{edge:"end"}));if(DC.isMoveWordBackward(r))return wC(r),o&&ng.isExpanded(o)&&Og.collapse(n,{edge:"focus"}),void Og.move(n,{unit:"word",reverse:!0});if(DC.isMoveWordForward(r))return wC(r),o&&ng.isExpanded(o)&&Og.collapse(n,{edge:"focus"}),void Og.move(n,{unit:"word"});if(DC.isSelectAll(r))return wC(r),void n.selectAll();if(fy){if((dy||uy)&&o&&(DC.isDeleteBackward(r)||DC.isDeleteForward(r))&&ng.isCollapsed(o)){var i=Vh.parent(n,o.anchor.path);if(Fh.isElement(i)&&Mh.isVoid(n,i)&&Mh.isInline(n,i))return r.preventDefault(),void Og.delete(n,{unit:"block"})}}else{if(DC.isBold(r)||DC.isItalic(r)||DC.isTransposeCharacter(r))return void wC(r);if(DC.isSplitBlock(r))return wC(r),void Mh.insertBreak(n);if(DC.isDeleteBackward(r))return wC(r),void(o&&ng.isExpanded(o)?Mh.deleteFragment(n,{direction:"backward"}):Mh.deleteBackward(n));if(DC.isDeleteForward(r))return wC(r),void(o&&ng.isExpanded(o)?Mh.deleteFragment(n,{direction:"forward"}):Mh.deleteForward(n));if(DC.isDeleteLineBackward(r))return wC(r),void(o&&ng.isExpanded(o)?Mh.deleteFragment(n,{direction:"backward"}):Mh.deleteBackward(n,{unit:"line"}));if(DC.isDeleteLineForward(r))return wC(r),void(o&&ng.isExpanded(o)?Mh.deleteFragment(n,{direction:"forward"}):Mh.deleteForward(n,{unit:"line"}));if(DC.isDeleteWordBackward(r))return wC(r),void(o&&ng.isExpanded(o)?Mh.deleteFragment(n,{direction:"backward"}):Mh.deleteBackward(n,{unit:"word"}));if(DC.isDeleteWordForward(r))return wC(r),void(o&&ng.isExpanded(o)?Mh.deleteFragment(n,{direction:"forward"}):Mh.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!fy&&!n.getConfig().readOnly&&nC(n,e.target)){e.preventDefault();var r=e.key;Mh.insertText(n,r)}},copy:function(e,t,n){var r=e;if(nC(n,r.target)){n.getConfig().readOnly||r.preventDefault();var o=r.clipboardData;if(null!=o){n.setFragmentData(o);var i=n.getConfig().customCopy;i&&i(n,r)}}},cut:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&(r.preventDefault(),nC(n,r.target))){var i=r.clipboardData;if(null!=i&&(n.setFragmentData(i),o))if(ng.isExpanded(o))Mh.deleteFragment(n);else{var a=Vh.parent(n,o.anchor.path);Mh.isVoid(n,a)&&Og.delete(n)}}},paste:function(e,t,n){xv.set(n,!0);var r=e;if(!n.getConfig().readOnly&&nC(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void xv.set(n,!1);if(uy||!fy||function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length}(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,t,n){if(oC(n,e.target)){var r=py.toSlateNode(n,e.target);Mh.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(oC(n,r.target)&&!n.getConfig().readOnly){var o=py.toSlateNode(n,r.target),i=py.findPath(n,o);if(Mh.isVoid(n,o)||Mh.void(n,{at:i,voids:!0})){var a=Mh.range(n,i);Og.select(n,a)}var s=r.dataTransfer;if(null!=s)py.getSelectedNodeByType(n,"table")||(t.isDraggingInternally=!0,n.setFragmentData(s))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&oC(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,o=r.dataTransfer;if(!n.getConfig().readOnly&&oC(n,r.target)&&null!=o&&!(fy&&uy&&o.files.length>0)){r.preventDefault();var i=n.selection,a=py.findEventRange(n,r);Og.select(n,a),t.isDraggingInternally&&(i&&Og.delete(n,{at:i}),t.isDraggingInternally=!1),n.insertData(o),n.isFocused()||n.focus()}}};function SC(e){if(xC(e)){for(;e&&xC(e);){e=OC(e).parent}return null!=e?e:null}return e.parentNode}function xC(e){return 11===e.nodeType}function OC(e,t){var n,r,o;const i=e;return null!==(n=i.parent)&&void 0!==n||(i.parent=null!=t?t:null),null!==(r=i.firstChildNode)&&void 0!==r||(i.firstChildNode=e.firstChild),null!==(o=i.lastChildNode)&&void 0!==o||(i.lastChildNode=e.lastChild),i}const NC={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createDocumentFragment:function(){return OC(document.createDocumentFragment())},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){if(xC(e)){let t=e;for(;t&&xC(t);){t=OC(t).parent}e=null!=t?t:e}xC(t)&&(t=OC(t,e)),n&&xC(n)&&(n=OC(n).firstChildNode),e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){xC(t)&&(t=OC(t,e)),e.appendChild(t)},parentNode:SC,nextSibling:function(e){var t;if(xC(e)){const n=OC(e),r=SC(n);if(r&&n.lastChildNode){const e=Array.from(r.childNodes),o=e.indexOf(n.lastChildNode);return null!==(t=e[o+1])&&void 0!==t?t:null}return null}return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType},isDocumentFragment:xC};function BC(e,t,n,r,o){return{sel:e,data:t,children:n,text:r,elm:o,key:void 0===t?void 0:t.key}}const TC=Array.isArray;function kC(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}function FC(e){return void 0===e}function IC(e){return void 0!==e}const PC=BC("",{},[],void 0,void 0);function LC(e,t){var n,r;const o=e.key===t.key,i=(null===(n=e.data)||void 0===n?void 0:n.is)===(null===(r=t.data)||void 0===r?void 0:r.is),a=e.sel===t.sel,s=!(!e.sel&&e.sel===t.sel)||typeof e.text==typeof t.text;return a&&o&&i&&s}function RC(e,t,n){var r;const o={};for(let i=t;i<=n;++i){const t=null===(r=e[i])||void 0===r?void 0:r.key;void 0!==t&&(o[t]=i)}return o}const _C=["create","update","remove","destroy","pre","post"];function MC(e,t,n){const r={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},o=NC;for(const t of _C)for(const n of e){const e=n[t];void 0!==e&&r[t].push(e)}function i(e){const t=e.id?"#"+e.id:"",n=e.getAttribute("class"),r=n?"."+n.split(" ").join("."):"";return BC(o.tagName(e).toLowerCase()+t+r,{},[],void 0,e)}function a(e){return BC(void 0,{},[],void 0,e)}function s(e,t){return function(){if(0==--t){const t=o.parentNode(e);null!==t&&o.removeChild(t,e)}}}function u(e,t){var n,i;let a,s=e.data;if(void 0!==s){const t=null===(n=s.hook)||void 0===n?void 0:n.init;IC(t)&&(t(e),s=e.data)}const l=e.children,c=e.sel;if("!"===c)FC(e.text)&&(e.text=""),e.elm=o.createComment(e.text);else if(""===c)e.elm=o.createTextNode(e.text);else if(void 0!==c){const n=c.indexOf("#"),d=c.indexOf(".",n),f=n>0?n:c.length,p=d>0?d:c.length,h=-1!==n||-1!==d?c.slice(0,Math.min(f,p)):c,g=e.elm=IC(s)&&IC(a=s.ns)?o.createElementNS(a,h,s):o.createElement(h,s);for(f<p&&g.setAttribute("id",c.slice(f+1,p)),d>0&&g.setAttribute("class",c.slice(p+1).replace(/\./g," ")),a=0;a<r.create.length;++a)r.create[a](PC,e);if(!kC(e.text)||TC(l)&&0!==l.length||o.appendChild(g,o.createTextNode(e.text)),TC(l))for(a=0;a<l.length;++a){const e=l[a];null!=e&&o.appendChild(g,u(e,t))}const v=e.data.hook;IC(v)&&(null===(i=v.create)||void 0===i||i.call(v,PC,e),v.insert&&t.push(e))}else e.elm=o.createTextNode(e.text);return e.elm}function l(e,t,n,r,i,a){for(;r<=i;++r){const i=n[r];null!=i&&o.insertBefore(e,u(i,a),t)}}function c(e){var t,n;const o=e.data;if(void 0!==o){null===(n=null===(t=null==o?void 0:o.hook)||void 0===t?void 0:t.destroy)||void 0===n||n.call(t,e);for(let t=0;t<r.destroy.length;++t)r.destroy[t](e);if(void 0!==e.children)for(let t=0;t<e.children.length;++t){const n=e.children[t];null!=n&&"string"!=typeof n&&c(n)}}}function d(e,t,n,i){for(var a,u;n<=i;++n){let i,l;const f=t[n];if(null!=f)if(IC(f.sel)){c(f),i=r.remove.length+1,l=s(f.elm,i);for(let e=0;e<r.remove.length;++e)r.remove[e](f,l);const e=null===(u=null===(a=null==f?void 0:f.data)||void 0===a?void 0:a.hook)||void 0===u?void 0:u.remove;IC(e)?e(f,l):l()}else f.children?(c(f),d(e,f.children,0,f.children.length-1)):o.removeChild(e,f.elm)}}function f(e,t,n){var i,a,s,c,p,h,g,v;const m=null===(i=t.data)||void 0===i?void 0:i.hook;null===(a=null==m?void 0:m.prepatch)||void 0===a||a.call(m,e,t);const y=t.elm=e.elm;if(e===t)return;if(void 0!==t.data||IC(t.text)&&t.text!==e.text){null!==(s=t.data)&&void 0!==s||(t.data={}),null!==(c=e.data)&&void 0!==c||(e.data={});for(let n=0;n<r.update.length;++n)r.update[n](e,t);null===(g=null===(h=null===(p=t.data)||void 0===p?void 0:p.hook)||void 0===h?void 0:h.update)||void 0===g||g.call(h,e,t)}const b=e.children,E=t.children;FC(t.text)?IC(b)&&IC(E)?b!==E&&function(e,t,n,r){let i,a,s,c,p=0,h=0,g=t.length-1,v=t[0],m=t[g],y=n.length-1,b=n[0],E=n[y];for(;p<=g&&h<=y;)null==v?v=t[++p]:null==m?m=t[--g]:null==b?b=n[++h]:null==E?E=n[--y]:LC(v,b)?(f(v,b,r),v=t[++p],b=n[++h]):LC(m,E)?(f(m,E,r),m=t[--g],E=n[--y]):LC(v,E)?(f(v,E,r),o.insertBefore(e,v.elm,o.nextSibling(m.elm)),v=t[++p],E=n[--y]):LC(m,b)?(f(m,b,r),o.insertBefore(e,m.elm,v.elm),m=t[--g],b=n[++h]):(void 0===i&&(i=RC(t,p,g)),a=i[b.key],FC(a)?(o.insertBefore(e,u(b,r),v.elm),b=n[++h]):FC(i[E.key])?(o.insertBefore(e,u(E,r),o.nextSibling(m.elm)),E=n[--y]):(s=t[a],s.sel!==b.sel?o.insertBefore(e,u(b,r),v.elm):(f(s,b,r),t[a]=void 0,o.insertBefore(e,s.elm,v.elm)),b=n[++h]));h<=y&&(c=null==n[y+1]?null:n[y+1].elm,l(e,c,n,h,y,r)),p<=g&&d(e,t,p,g)}(y,b,E,n):IC(E)?(IC(e.text)&&o.setTextContent(y,""),l(y,null,E,0,E.length-1,n)):IC(b)?d(y,b,0,b.length-1):IC(e.text)&&o.setTextContent(y,""):e.text!==t.text&&(IC(b)&&d(y,b,0,b.length-1),o.setTextContent(y,t.text)),null===(v=null==m?void 0:m.postpatch)||void 0===v||v.call(m,e,t)}return function(e,t){let n,s,l;const c=[];for(n=0;n<r.pre.length;++n)r.pre[n]();for(!function(e,t){return e.isElement(t)}(o,e)?function(e,t){return e.isDocumentFragment(t)}(o,e)&&(e=a(e)):e=i(e),LC(e,t)?f(e,t,c):(s=e.elm,l=o.parentNode(s),u(t,c),null!==l&&(o.insertBefore(l,t.elm,o.nextSibling(s)),d(l,[e],0,0))),n=0;n<c.length;++n)c[n].data.hook.insert(c[n]);for(n=0;n<r.post.length;++n)r.post[n]();return t}}function jC(e,t,n){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==n&&void 0!==t)for(let e=0;e<t.length;++e){const n=t[e];if("string"==typeof n)continue;const r=n.data;void 0!==r&&jC(r,n.children,n.sel)}}function HC(e,t,n){let r,o,i,a={};if(void 0!==n?(null!==t&&(a=t),TC(n)?r=n:kC(n)?o=n.toString():n&&n.sel&&(r=[n])):null!=t&&(TC(t)?r=t:kC(t)?o=t.toString():t&&t.sel?r=[t]:a=t),void 0!==r)for(i=0;i<r.length;++i)kC(r[i])&&(r[i]=BC(void 0,void 0,void 0,r[i],void 0));return!e.startsWith("svg")||3!==e.length&&"."!==e[3]&&"#"!==e[3]||jC(a,r,e),BC(e,a,r,o,void 0)}function zC(e,t){let n;const r=t.elm;let o=e.data.attrs,i=t.data.attrs;if((o||i)&&o!==i){for(n in o=o||{},i=i||{},i){const e=i[n];o[n]!==e&&(!0===e?r.setAttribute(n,""):!1===e?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,e):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,e):58===n.charCodeAt(5)?109===n.charCodeAt(1)?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,e):r.setAttributeNS("http://www.w3.org/1999/xlink",n,e):r.setAttribute(n,e))}for(n in o)n in i||r.removeAttribute(n)}}const $C={create:zC,update:zC};function UC(e,t){let n,r;const o=t.elm;let i=e.data.class,a=t.data.class;if((i||a)&&i!==a){for(r in i=i||{},a=a||{},i)i[r]&&!Object.prototype.hasOwnProperty.call(a,r)&&o.classList.remove(r);for(r in a)n=a[r],n!==i[r]&&o.classList[n?"add":"remove"](r)}}const VC={create:UC,update:UC},GC=/[A-Z]/g;function WC(e,t){const n=t.elm;let r,o=e.data.dataset,i=t.data.dataset;if(!o&&!i)return;if(o===i)return;o=o||{},i=i||{};const a=n.dataset;for(r in o)r in i||(a?r in a&&delete a[r]:n.removeAttribute("data-"+r.replace(GC,"-$&").toLowerCase()));for(r in i)o[r]!==i[r]&&(a?a[r]=i[r]:n.setAttribute("data-"+r.replace(GC,"-$&").toLowerCase(),i[r]))}const qC={create:WC,update:WC};function KC(e,t,n){if("function"==typeof e)e.call(t,n,t);else if("object"==typeof e)for(let r=0;r<e.length;r++)KC(e[r],t,n)}function YC(e,t){const n=e.type,r=t.data.on;r&&r[n]&&KC(r[n],t,e)}function XC(e,t){const n=e.data.on,r=e.listener,o=e.elm,i=t&&t.data.on,a=t&&t.elm;let s;if(n!==i){if(n&&r)if(i)for(s in n)i[s]||o.removeEventListener(s,r,!1);else for(s in n)o.removeEventListener(s,r,!1);if(i){const r=t.listener=e.listener||function e(t){YC(t,e.vnode)};if(r.vnode=t,n)for(s in i)n[s]||a.addEventListener(s,r,!1);else for(s in i)a.addEventListener(s,r,!1)}}}const ZC={create:XC,update:XC,destroy:XC};function JC(e,t){let n,r,o;const i=t.elm;let a=e.data.props,s=t.data.props;if((a||s)&&a!==s)for(n in a=a||{},s=s||{},s)r=s[n],o=a[n],o===r||"value"===n&&i[n]===r||(i[n]=r)}const QC={create:JC,update:JC},eD="function"==typeof(null===window||void 0===window?void 0:window.requestAnimationFrame)?window.requestAnimationFrame.bind(window):setTimeout,tD=function(e){eD((function(){eD(e)}))};let nD=!1;function rD(e,t,n){tD((function(){e[t]=n}))}function oD(e,t){let n,r;const o=t.elm;let i=e.data.style,a=t.data.style;if(!i&&!a)return;if(i===a)return;i=i||{},a=a||{};const s="delayed"in i;for(r in i)r in a||("-"===r[0]&&"-"===r[1]?o.style.removeProperty(r):o.style[r]="");for(r in a)if(n=a[r],"delayed"===r&&a.delayed)for(const e in a.delayed)n=a.delayed[e],s&&n===i.delayed[e]||rD(o.style,e,n);else"remove"!==r&&n!==i[r]&&("-"===r[0]&&"-"===r[1]?o.style.setProperty(r,n):o.style[r]=n)}const iD={pre:function(){nD=!1},create:oD,update:oD,destroy:function(e){let t,n;const r=e.elm,o=e.data.style;if(o&&(t=o.destroy))for(n in t)r.style[n]=t[n]},remove:function(e,t){const n=e.data.style;if(!n||!n.remove)return void t();let r;nD||(e.elm.offsetLeft,nD=!0);const o=e.elm;let i=0;const a=n.remove;let s=0;const u=[];for(r in a)u.push(r),o.style[r]=a[r];const l=getComputedStyle(o)["transition-property"].split(", ");for(;i<l.length;++i)-1!==u.indexOf(l[i])&&s++;o.addEventListener("transitionend",(function(e){e.target===o&&--s,0===s&&t()}))}};function aD(e,t){for(const n of e)null!=n&&!1!==n&&""!==n&&(Array.isArray(n)?aD(n,t):"string"==typeof n||"number"==typeof n||"boolean"==typeof n?t.push(BC(void 0,void 0,void 0,String(n),void 0)):t.push(n));return t}function sD(e,t,...n){const r=aD(n,[]);return"function"==typeof e?e(t,r):1===r.length&&!r[0].sel&&r[0].text?HC(e,t,r[0].text):HC(e,t,r)}var uD,lD;var cD=function(){if(lD)return uD;lD=1;var e,t=1/0,n="[object Symbol]",r=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i="\\ud800-\\udfff",a="\\u0300-\\u036f\\ufe20-\\ufe23",s="\\u20d0-\\u20f0",u="\\u2700-\\u27bf",l="a-z\\xdf-\\xf6\\xf8-\\xff",c="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\ufe0e\\ufe0f",f="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="['’]",h="["+i+"]",g="["+f+"]",v="["+a+s+"]",m="\\d+",b="["+u+"]",E="["+l+"]",C="[^"+i+f+m+u+l+c+"]",D="\\ud83c[\\udffb-\\udfff]",w="[^"+i+"]",A="(?:\\ud83c[\\udde6-\\uddff]){2}",S="[\\ud800-\\udbff][\\udc00-\\udfff]",x="["+c+"]",O="\\u200d",N="(?:"+E+"|"+C+")",B="(?:"+x+"|"+C+")",T="(?:['’](?:d|ll|m|re|s|t|ve))?",k="(?:['’](?:D|LL|M|RE|S|T|VE))?",F="(?:"+v+"|"+D+")"+"?",I="["+d+"]?",P=I+F+("(?:"+O+"(?:"+[w,A,S].join("|")+")"+I+F+")*"),L="(?:"+[b,A,S].join("|")+")"+P,R="(?:"+[w+v+"?",v,A,S,h].join("|")+")",_=RegExp(p,"g"),M=RegExp(v,"g"),j=RegExp(D+"(?="+D+")|"+R+P,"g"),H=RegExp([x+"?"+E+"+"+T+"(?="+[g,x,"$"].join("|")+")",B+"+"+k+"(?="+[g,x+N,"$"].join("|")+")",x+"?"+N+"+"+T,x+"+"+k,m,L].join("|"),"g"),z=RegExp("["+O+i+a+s+d+"]"),$=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,U="object"==typeof y&&y&&y.Object===Object&&y,V="object"==typeof self&&self&&self.Object===Object&&self,G=U||V||Function("return this")(),W=(e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(t){return null==e?void 0:e[t]});function q(e){return z.test(e)}function K(e){return q(e)?function(e){return e.match(j)||[]}(e):function(e){return e.split("")}(e)}var Y=Object.prototype.toString,X=G.Symbol,Z=X?X.prototype:void 0,J=Z?Z.toString:void 0;function Q(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Y.call(e)==n}(e))return J?J.call(e):"";var r=e+"";return"0"==r&&1/e==-t?"-0":r}function ee(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function te(e){return null==e?"":Q(e)}var ne,re,oe=(ne=function(e,t,n){return t=t.toLowerCase(),e+(n?ie(te(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)n=t(n,e[r],r,e);return n}(function(e,t){return e=te(e),void 0===t?function(e){return $.test(e)}(e)?function(e){return e.match(H)||[]}(e):function(e){return e.match(r)||[]}(e):e.match(t)||[]}(function(e){return(e=te(e))&&e.replace(o,W).replace(M,"")}(e).replace(_,"")),ne,"")}),ie=(re="toUpperCase",function(e){var t=q(e=te(e))?K(e):void 0,n=t?t[0]:e.charAt(0),r=t?ee(t,1).join(""):e.slice(1);return n[re]()+r});return uD=oe}(),dD=b(cD);var fD=["props","attrs","style","dataset","on","hook"];function pD(e){var t=e.data,n=void 0===t?{}:t,r=e.children,o=void 0===r?[]:r;Object.keys(n).forEach((function(t){var r,o,i=n[t];if("key"!==t){if(!fD.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=dD(a),function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.dataset&&(n.dataset={});Object.assign(n.dataset,t)}(e,((r={})[a]=i,r)),void delete n[t]}!function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={});Object.assign(n.props,t)}(e,(o={},o[t]=i,o)),delete n[t]}}else e.key=i})),o.length>0&&o.forEach((function(e){"string"!=typeof e&&pD(e)}))}var hD=[];var gD={};function vD(e,t,n){return sD(n.isInline(e)?"span":"div",null,t)}function mD(e,t){var n,r=py.findKey(t,e),o=t.isInline(e),i=Mh.isVoid(t,e),a=Ym(e.type,r.id),s={id:a,key:r.id,"data-slate-node":"element","data-slate-inline":o},u=e.type,l=e.children,c=void 0===l?[]:l,d=function(e){return gD[e]||vD}(u);n=i?null:c.map((function(n,r){return CD(n,r,e,t)}));var f=d(e,n,t);if(i){s["data-slate-void"]=!0;var p=o?"span":"div",h=zg(Vh.texts(e),1),g=zg(h[0],1)[0],v=sD(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},CD(g,0,e,t));f=sD(p,{style:{position:"relative"}},f,v),gv.set(g,0),vv.set(g,e)}return null==f.data&&(f.data={}),Object.assign(f.data,s),i||o||(f=function(e,t){var n=t;return hD.forEach((function(r){n=r(e,t)})),n}(e,f)),Em((function(){var t=Tm(a);null!=t&&(bv.set(r,t),Ev.set(e,t),yv.set(t,e))})),f}function yD(e,t){return void 0===t&&(t=!1),sD("span",{"data-slate-string":!0},t?e+"\n":e)}function bD(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),sD("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?sD("br",null):null)}function ED(e,t,n){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=py.findKey(n,e),o=n.getConfig().decorate;if(null==o)throw new Error("Can not get config.decorate");var i,a=py.findPath(n,e),s=o([e,a]),u=lg.decorations(e,s),l=u.map((function(r,o){var i=function(e,t,n,r,o){void 0===t&&(t=!1);var i=e.text,a=py.findPath(o,n),s=Kh.parent(a);if(Mh.isEditor(r))throw new Error("Text node ".concat(JSON.stringify(n)," parent is Editor"));return o.isVoid(r)?bD(Vh.string(r).length):""!==i||r.children[r.children.length-1]!==n||o.isInline(r)||""!==Mh.string(o,s)?""===i?bD():t&&"\n"===i.slice(-1)?yD(i,!0):yD(i):bD(0,!0)}(r,o===u.length-1,e,t,n);return i=function(e,t){var n=t;return hD.forEach((function(t){n=t(e,n)})),n}(r,i),sD("span",{"data-slate-leaf":!0},i)})),c=(i=r.id,"w-e-text-".concat(i)),d=sD("span",{"data-slate-node":"text",id:c,key:r.id},l);return Em((function(){var t=Tm(c);null!=t&&(bv.set(r,t),Ev.set(e,t),yv.set(t,e))})),d}function CD(e,t,n,r){return gv.set(e,t),vv.set(e,n),Fh.isElement(e)?mD(e,r):ED(e,n,r)}function DD(e,t){var n,r,o=e.$scroll,i=(n=e.id,"w-e-textarea-".concat(n)),a=t.getConfig(),s=a.readOnly,u=a.autoFocus,l=function(e,t){return void 0===t&&(t=!1),HC("div#".concat(e),{props:{contentEditable:!t}})}(i,s),c=t.children||[];l.children=c.map((function(e,n){var r=CD(e,n,t,t);return pD(r),r}));var d=fv.get(e);if(null==d&&(d=!0),d){var f=function(e){return Mv('<div\n id="'.concat(e,'"\n data-slate-editor\n data-slate-node="value"\n suppressContentEditableWarning\n role="textarea"\n spellCheck="true"\n autoCorrect="true"\n autoCapitalize="true"\n ></div>'))}(i);o.append(f),e.$textArea=f,r=f[0],(h=MC([VC,QC,iD,qC,ZC,$C]))(r,l),fv.set(e,!1),pv.set(e,h)}else{var p=hv.get(e),h=pv.get(e);if(null==p||null==h)return;r=p.elm,h(p,l)}if(null!=r||null!=(r=Tm(i))){var g;if((d?u:t.isFocused())&&r.focus({preventScroll:!0}),d){var v=(g=r)&&g.ownerDocument&&g.ownerDocument.defaultView||null;v&&Dv.set(t,v)}mv.set(t,r),Ev.set(t,r),yv.set(r,t),hv.set(e,l)}}var wD=1,AD=function(){function e(e){var t=this;this.id=wD++,this.$textArea=null,this.$progressBar=Mv('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=Mv('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=tC((function(){var e=t.editorInstance;!function(e,t){var n=e.isComposing,r=e.isUpdatingSelection,o=e.isDraggingInternally;if(!(t.getConfig().readOnly||n||r||o)){var i=py.findDocumentOrShadowRoot(t),a=i.activeElement,s=py.toDOMNode(t,t),u=i.getSelection();if(a!==s)return wv.delete(t),void Og.deselect(t);if(e.latestElement=a,wv.set(t,!0),!u)return Og.deselect(t);var l=u.anchorNode,c=u.focusNode,d=nC(t,l)||rC(t,l),f=nC(t,c)||rC(t,c);if(d&&f){var p=py.toSlateRange(t,u,{exactMatch:!1,suppressThrow:!1});Og.select(t,p)}}}(t,e)}),100);var n=Mv(e);if(0===n.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=n;var r=Mv('<div class="w-e-text-container"></div>');r.append(this.$progressBar),r.append(this.$maxLengthInfo),n.append(r);var o=Mv('<div class="w-e-scroll"></div>');r.append(o),this.$scroll=o,this.$textAreaContainer=r,Em((function(){var e=t.editorInstance,o=py.getWindow(e);o.document.addEventListener("selectionchange",t.onDOMSelectionChange),e.on(Qg.DESTROYED,(function(){o.document.removeEventListener("selectionchange",t.onDOMSelectionChange)})),r.on("click",(function(){return e.hidePanelOrModal()})),e.on(Qg.CHANGE,t.changeViewState.bind(t));var i=e.getConfig(),a=i.onChange,s=i.scroll;a&&e.on(Qg.CHANGE,(function(){return a(e)})),s||(n.css("position","relative"),r.addClass("no-scroll")),t.onFocusAndOnBlur(),e.on(Qg.CHANGE,t.changeMaxLengthInfo.bind(t)),t.bindEvent()}))}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=rv.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(Zg(AC,(function(n,o){t.on(o,(function(t){n(t,e,r)}))})),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",tC((function(){r.emit("scroll")}),100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on(Qg.CHANGE,(function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout((function(){return o&&o(t)})):null!=e.latestEditorSelection&&null==t.selection&&setTimeout((function(){return r&&r(t)})),e.latestEditorSelection=t.selection}))},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-py.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(t)}},e.prototype.changeProgress=function(e){var t=this.$progressBar;t.css("width","".concat(e,"%")),e>=100&&setTimeout((function(){t.hide(),t.css("width","0"),t.show()}),1e3)},e.prototype.changeViewState=function(){var e=this,t=this.editorInstance;DD(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var o=t.isEmpty();if(o&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var i=Mv('<div class="w-e-text-placeholder">'.concat(r,"</div>"));e.$textAreaContainer.append(i),e.$placeholder=i}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!o&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),Em((function(){fC(e,t)}))},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function SD(e,t,n,r){if(gv.set(e,t),vv.set(e,n),Fh.isElement(e)){var o=e.children;if((void 0===o?[]:o).forEach((function(t,n){return SD(t,n,e,r)})),Mh.isVoid(r,e)){var i=zg(Vh.texts(e),1),a=zg(i[0],1)[0];gv.set(a,0),vv.set(a,e)}}}var xD=300,OD={heightWarning:{en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"}};function ND(e){var t=e.selector,n=void 0===t?"":t,r=e.config,o=void 0===r?{}:r,i=e.content,a=e.html,s=e.plugins,u=void 0===s?[]:s,l=function(e){return[Ab,ab,Ov,ob,Fb,wb,Sb,Fg].reduce((function(e,t){return t(e)}),e)}(th());if(n&&function(e,t){return qm(e,"data-w-e-textarea",t)}(l,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var c=function(e){void 0===e&&(e={});var t=Yg(Jg),n={},r=e.MENU_CONF,o=void 0===r?{}:r;return Zg(t,(function(e,t){n[t]=_g(_g({},e),o[t]||{})})),delete e.MENU_CONF,_g({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(o);dv.set(l,c);var d=c.hoverbarKeys,f=void 0===d?{}:d;if(u.forEach((function(e){l=e(l)})),function(e,t){var n=t.html,r=t.content;null!=n&&(e.children=Km(e,n)),r&&r.length&&(e.children=r),0===e.children.length&&(e.children=[{type:"paragraph",children:[{text:""}]}])}(l,{html:a,content:i}),n){var p=new AD(n);nv.set(l,p),rv.set(p,l),p.changeViewState(),Em((function(){var e=p.$scroll;null!=e&&e.height()<xD&&console.warn("".concat(OD.heightWarning.zh,"\n").concat(OD.heightWarning.en),{element:e,height:e.height()})}));var h=void 0;Object.keys(f).length>0&&(h=new QE,av.set(h,l),sv.set(l,h)),l.on(Qg.CHANGE,(function(){l.hidePanelOrModal()})),l.on(Qg.SCROLL,(function(){l.hidePanelOrModal()}))}else l.children.forEach((function(e,t){return SD(e,t,l,l)}));var g=c.onCreated,v=c.onDestroyed;return g&&l.on(Qg.CREATED,(function(){return g(l)})),v&&l.on(Qg.DESTROYED,(function(){return v(l)})),Em((function(){return l.emit("created")})),l}var BD=function(){function e(e,t){var n=this;this.$toolbar=Mv('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=Pb((function(){n.toolbarItems.forEach((function(e){e.changeMenuState()}))}),200),this.config=t;var r=Mv(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var o=this.$toolbar;o.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),r.append(o),Em((function(){n.initToolbar(),n.lngListen=NE((function(){return n.initToolbar()})),n.getEditorInstance().on(Qg.CHANGE,n.changeToolbarState)}))}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.initToolbar=function(){this.menus={};var e=this.$toolbar;null==e||e.empty(),this.registerItems(),this.changeToolbarState()},e.prototype.registerItems=function(){var e=this,t="",n=this.$toolbar,r=this.config,o=r.toolbarKeys,i=void 0===o?[]:o,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=r.excludeKeys,l=void 0===u?[]:u,c=Yg(i);s.keys.length>0&&("string"==typeof s.keys&&(s.keys=[s.keys]),s.keys.forEach((function(e,t){c.splice(s.index+t,0,e)})));var d=c.filter((function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)})),f=d.length;d.forEach((function(r,o){if("|"===r){if(0===o)return;if(o+1===f)return;if("|"===t)return;var i=FE();return n.append(i),void(t=r)}if("string"==typeof r)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t="group"}))},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new WE(e)}(e),o=e.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach((function(e){s.includes(e)||t.registerSingleItem(e,r)})),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof WE,o=this.menus,i=o[e];if(null==i){var a=ev[e];if(null==a)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));i=a(),o[e]=i}else console.warn("Duplicated toolbar menu key '".concat(e,"'\n重复注册了菜单栏 menu '").concat(e,"'"));var s=n.getMenuConfig(e);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=YE(e,i,r);(this.toolbarItems.push(u),uv.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=ov.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.destroy=function(){var e;this.$toolbar.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.toolbarItems=[]},e}();function TD(e,t){if(null==e)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,o=void 0===r?{}:r;if(function(e,t){return qm(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=_g({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new BD(n,i);return ov.set(a,e),iv.set(e,a),a}var kD,FD,ID,PD,LD,RD={exports:{}},_D={};function MD(){if(ID)return _D;ID=1,Object.defineProperty(_D,"__esModule",{value:!0}),_D.justErrorsLogger=_D.debugLogger=void 0;const e=function(){if(FD)return kD;function e(e){return e<10?`0${e}`:e.toString()}return FD=1,kD=function(){const t=new Date;return`${e(t.getHours())}:${e(t.getMinutes())}:${e(t.getSeconds())}`}}(),t={debug:()=>{},warn:()=>{},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};_D.justErrorsLogger=t;const n={debug:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.debug(`[Uppy] [${e()}]`,...n)},warn:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.warn(`[Uppy] [${e()}]`,...n)},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};return _D.debugLogger=n,_D}function jD(){if(LD)return PD;LD=1;return PD={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=0|n;for(;o--;)r+=e[Math.random()*e.length|0];return r}},PD}var HD,zD,$D,UD,VD,GD,WD,qD,KD,YD,XD,ZD,JD,QD,ew,tw,nw,rw,ow,iw,aw,sw,uw,lw,cw,dw,fw,pw,hw,gw,vw,mw={};function yw(){return zD?HD:(zD=1,HD=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var o=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o})}function bw(){if(UD)return $D;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return UD=1,e.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<i;t++)"*"!==o[t]&&(r=t<n.length&&o[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var a in r={},e)this.match(a)&&(r[a]=e[a]);return r},$D=function(t,n,r){var o=new e(t,r||/[\/\.]/);return void 0!==n?o.match(n):o},$D}function Ew(){if(WD)return mw;WD=1,Object.defineProperty(mw,"__esModule",{value:!0}),mw.defaultOptions=mw.RestrictionError=mw.Restricter=void 0;const e=yw(),t=function(){if(GD)return VD;GD=1;var e=bw(),t=/[\/\+\.]/;return VD=function(n,r){function o(r){var o=e(r,n,t);return o&&o.length>=2}return r?o(r.split(";")[0]):o}}();mw.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class n extends Error{constructor(){super(...arguments),this.isRestriction=!0}}mw.RestrictionError=n,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});return mw.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(r,o){const{maxFileSize:i,minFileSize:a,maxTotalFileSize:s,maxNumberOfFiles:u,allowedFileTypes:l}=this.getOpts().restrictions;if(u){const e=o.filter((e=>!e.isGhost));if(e.length+1>u)throw new n(`${this.i18n("youCanOnlyUploadX",{smart_count:u})}`)}if(l){if(!l.some((e=>e.includes("/")?!!r.type&&t(r.type.replace(/;.*?$/,""),e):!("."!==e[0]||!r.extension)&&r.extension.toLowerCase()===e.slice(1).toLowerCase()))){const e=l.join(", ");throw new n(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(s&&null!=r.size){const t=o.reduce(((e,t)=>e+t.size),r.size);if(t>s)throw new n(this.i18n("exceedsSize",{size:e(s),file:r.name}))}if(i&&null!=r.size&&r.size>i)throw new n(this.i18n("exceedsSize",{size:e(i),file:r.name}));if(a&&null!=r.size&&r.size<a)throw new n(this.i18n("inferiorSize",{size:e(a)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new n(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new n(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:r}=this.getOpts().restrictions,o=Object.prototype.hasOwnProperty,i=[];for(const t of r)o.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}},mw}function Cw(){if(KD)return qD;return KD=1,qD=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}function Dw(){if(XD)return YD;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}XD=1;var t=0;function n(e){return"__private_"+t+++"_"+e}const r=Cw();function o(e,t,n){const r=[];return e.forEach((e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach(((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(n)})))),r}
|
|
7
|
+
*/function rp(e){return"[object Object]"===Object.prototype.toString.call(e)}function op(e){var t,n;return!1!==rp(e)&&(void 0===(t=e.constructor)||!1!==rp(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}function ip(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(e){return"'"+e+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function ap(e){return!!e&&!!e[Wp]}function sp(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Gp}(e)||Array.isArray(e)||!!e[Vp]||!!(null===(t=e.constructor)||void 0===t?void 0:t[Vp])||fp(e)||pp(e))}function up(e,t,n){void 0===n&&(n=!1),0===lp(e)?(n?Object.keys:qp)(e).forEach(function(r){n&&"symbol"==typeof r||t(r,e[r],e)}):e.forEach(function(n,r){return t(r,n,e)})}function lp(e){var t=e[Wp];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:fp(e)?2:pp(e)?3:0}function cp(e,t){return 2===lp(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function dp(e,t,n){var r=lp(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function fp(e){return Hp&&e instanceof Map}function pp(e){return zp&&e instanceof Set}function hp(e){return e.o||e.t}function gp(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Kp(e);delete t[Wp];for(var n=qp(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function vp(e,t){return void 0===t&&(t=!1),yp(e)||ap(e)||!sp(e)||(lp(e)>1&&(e.set=e.add=e.clear=e.delete=mp),Object.freeze(e),t&&up(e,function(e,t){return vp(t,!0)},!0)),e}function mp(){ip(2)}function yp(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function bp(e){var t=Yp[e];return t||ip(18,e),t}function Ep(){return Mp}function Cp(e,t){t&&(bp("Patches"),e.u=[],e.s=[],e.v=t)}function Dp(e){wp(e),e.p.forEach(Sp),e.p=null}function wp(e){e===Mp&&(Mp=e.l)}function Ap(e){return Mp={p:[],l:Mp,h:e,m:!0,_:0}}function Sp(e){var t=e[Wp];0===t.i||1===t.i?t.j():t.g=!0}function xp(e,t){t._=t.p.length;var n=t.p[0],r=void 0!==e&&e!==n;return t.h.O||bp("ES5").S(t,e,r),r?(n[Wp].P&&(Dp(t),ip(4)),sp(e)&&(e=Op(t,e),t.l||Bp(t,e)),t.u&&bp("Patches").M(n[Wp].t,e,t.u,t.s)):e=Op(t,n,[]),Dp(t),t.u&&t.v(t.u,t.s),e!==Up?e:void 0}function Op(e,t,n){if(yp(t))return t;var r=t[Wp];if(!r)return up(t,function(o,i){return Np(e,r,t,o,i,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Bp(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=gp(r.k):r.o,i=o,a=!1;3===r.i&&(i=new Set(o),o.clear(),a=!0),up(i,function(t,i){return Np(e,r,o,t,i,n,a)}),Bp(e,o,!1),n&&e.u&&bp("Patches").N(r,n,e.u,e.s)}return r.o}function Np(e,t,n,r,o,i,a){if(ap(o)){var s=Op(e,o,i&&t&&3!==t.i&&!cp(t.R,r)?i.concat(r):void 0);if(dp(n,r,s),!ap(s))return;e.m=!1}else a&&n.add(o);if(sp(o)&&!yp(o)){if(!e.h.D&&e._<1)return;Op(e,o),t&&t.A.l||Bp(e,o)}}function Bp(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&vp(t,n)}function Tp(e,t){var n=e[Wp];return(n?hp(n):e)[t]}function kp(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Fp(e){e.P||(e.P=!0,e.l&&Fp(e.l))}function Ip(e){e.o||(e.o=gp(e.t))}function Pp(e,t,n){var r=fp(t)?bp("MapSet").F(t,n):pp(t)?bp("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:Ep(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=Xp;n&&(o=[r],i=Zp);var a=Proxy.revocable(o,i),s=a.revoke,u=a.proxy;return r.k=u,r.j=s,u}(t,n):bp("ES5").J(t,n);return(n?n.A:Ep()).p.push(r),r}function _p(e){return ap(e)||ip(22,e),function e(t){if(!sp(t))return t;var n,r=t[Wp],o=lp(t);if(r){if(!r.P&&(r.i<4||!bp("ES5").K(r)))return r.t;r.I=!0,n=Lp(t,o),r.I=!1}else n=Lp(t,o);return up(n,function(t,o){r&&function(e,t){return 2===lp(e)?e.get(t):e[t]}(r.t,t)===o||dp(n,t,e(o))}),3===o?new Set(n):n}(e)}function Lp(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return gp(e)}var Rp,Mp,jp="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Hp="undefined"!=typeof Map,zp="undefined"!=typeof Set,$p="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Up=jp?Symbol.for("immer-nothing"):((Rp={})["immer-nothing"]=!0,Rp),Vp=jp?Symbol.for("immer-draftable"):"__$immer_draftable",Wp=jp?Symbol.for("immer-state"):"__$immer_state",Gp=""+Object.prototype.constructor,qp="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Kp=Object.getOwnPropertyDescriptors||function(e){var t={};return qp(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},Yp={},Xp={get:function(e,t){if(t===Wp)return e;var n=hp(e);if(!cp(n,t))return function(e,t,n){var r,o=kp(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!sp(r)?r:r===Tp(e.t,t)?(Ip(e),e.o[t]=Pp(e.A.h,r,e)):r},has:function(e,t){return t in hp(e)},ownKeys:function(e){return Reflect.ownKeys(hp(e))},set:function(e,t,n){var r=kp(hp(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=Tp(hp(e),t),i=null==o?void 0:o[Wp];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(n,o)&&(void 0!==n||cp(e.t,t)))return!0;Ip(e),Fp(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==Tp(e.t,t)||t in e.t?(e.R[t]=!1,Ip(e),Fp(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=hp(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){ip(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){ip(12)}},Zp={};up(Xp,function(e,t){Zp[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Zp.deleteProperty=function(e,t){return Zp.set.call(this,e,t,void 0)},Zp.set=function(e,t,n){return Xp.set.call(this,e[0],t,n,e[0])};var Jp=function(){function e(e){var t=this;this.O=$p,this.D=!0,this.produce=function(e,n,r){if("function"==typeof e&&"function"!=typeof n){var o=n;n=e;var i=t;return function(e){var t=this;void 0===e&&(e=o);for(var r=arguments.length,a=Array(r>1?r-1:0),s=1;s<r;s++)a[s-1]=arguments[s];return i.produce(e,function(e){var r;return(r=n).call.apply(r,[t,e].concat(a))})}}var a;if("function"!=typeof n&&ip(6),void 0!==r&&"function"!=typeof r&&ip(7),sp(e)){var s=Ap(t),u=Pp(t,e,void 0),l=!0;try{a=n(u),l=!1}finally{l?Dp(s):wp(s)}return"undefined"!=typeof Promise&&a instanceof Promise?a.then(function(e){return Cp(s,r),xp(e,s)},function(e){throw Dp(s),e}):(Cp(s,r),xp(a,s))}if(!e||"object"!=typeof e){if(void 0===(a=n(e))&&(a=e),a===Up&&(a=void 0),t.D&&vp(a,!0),r){var c=[],d=[];bp("Patches").M(e,a,c,d),r(c,d)}return a}ip(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.produceWithPatches(n,function(t){return e.apply(void 0,[t].concat(o))})};var r,o,i=t.produce(e,n,function(e,t){r=e,o=t});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(function(e){return[e,r,o]}):[i,r,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){sp(e)||ip(8),ap(e)&&(e=_p(e));var t=Ap(this),n=Pp(this,e,void 0);return n[Wp].C=!0,wp(t),n},t.finishDraft=function(e,t){var n=(e&&e[Wp]).A;return Cp(n,t),xp(void 0,n)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!$p&&ip(20),this.O=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=bp("Patches").$;return ap(e)?o(e,t):this.produce(e,function(e){return o(e,t)})},e}(),Qp=new Jp,eh=Qp.produce;Qp.produceWithPatches.bind(Qp),Qp.setAutoFreeze.bind(Qp),Qp.setUseProxies.bind(Qp),Qp.applyPatches.bind(Qp);var th=Qp.createDraft.bind(Qp),nh=Qp.finishDraft.bind(Qp);function rh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oh=new WeakMap,ih=new WeakMap,ah=new WeakMap,sh=new WeakMap,uh=new WeakMap,lh=new WeakMap,ch=new WeakMap;function dh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dh(Object(n),!0).forEach(function(t){rh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ph(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var hh,gh=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!t,r=t?Ch(e):e,o=hh.None,i=hh.None,a=0,s=null;for(var u of r){var l=u.codePointAt(0);if(!l)break;var c=Ih(u,l);if([o,i]=n?[i,c]:[c,o],Ph(o,hh.ZWJ)&&Ph(i,hh.ExtPict)&&!Mh(n?e.substring(0,a):e.substring(0,e.length-a)))break;if(Ph(o,hh.RI)&&Ph(i,hh.RI)&&!(s=null!==s?!s:!!n||Hh(e.substring(0,e.length-a))))break;if(o!==hh.None&&i!==hh.None&&Lh(o,i))break;a+=u.length}return a||1},vh=/\s/,mh=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,yh=/['\u2018\u2019]/,bh=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},Eh=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(vh.test(t))return!1;if(yh.test(t)){var o=gh(n,r),[i,a]=bh(n,o,r);if(e(i,a,r))return!0}return!mh.test(t)},Ch=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var r=e.charAt(t-n);if(wh(r.charCodeAt(0))){var o=e.charAt(t-n-1);if(Dh(o.charCodeAt(0))){yield o+r,n++;continue}}yield r}},Dh=e=>e>=55296&&e<=56319,wh=e=>e>=56320&&e<=57343;!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(hh||(hh={}));var Ah=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,Sh=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,xh=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,Oh=/^[\u1100-\u115F\uA960-\uA97C]$/,Nh=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,Bh=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,Th=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,kh=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,Fh=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,Ih=(e,t)=>{var n=hh.Any;return-1!==e.search(Ah)&&(n|=hh.Extend),8205===t&&(n|=hh.ZWJ),t>=127462&&t<=127487&&(n|=hh.RI),-1!==e.search(Sh)&&(n|=hh.Prepend),-1!==e.search(xh)&&(n|=hh.SpacingMark),-1!==e.search(Oh)&&(n|=hh.L),-1!==e.search(Nh)&&(n|=hh.V),-1!==e.search(Bh)&&(n|=hh.T),-1!==e.search(Th)&&(n|=hh.LV),-1!==e.search(kh)&&(n|=hh.LVT),-1!==e.search(Fh)&&(n|=hh.ExtPict),n};function Ph(e,t){return 0!==(e&t)}var _h=[[hh.L,hh.L|hh.V|hh.LV|hh.LVT],[hh.LV|hh.V,hh.V|hh.T],[hh.LVT|hh.T,hh.T],[hh.Any,hh.Extend|hh.ZWJ],[hh.Any,hh.SpacingMark],[hh.Prepend,hh.Any],[hh.ZWJ,hh.ExtPict],[hh.RI,hh.RI]];function Lh(e,t){return-1===_h.findIndex(n=>Ph(e,n[0])&&Ph(t,n[1]))}var Rh=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,Mh=e=>-1!==e.search(Rh),jh=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Hh=e=>{var t=e.match(jh);return null!==t&&t[0].length/2%2==1},zh=e=>op(e)&&eg.isNodeList(e.children)&&!Kh.isEditor(e),$h={isAncestor:e=>op(e)&&eg.isNodeList(e.children),isElement:zh,isElementList:e=>Array.isArray(e)&&e.every(e=>$h.isElement(e)),isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return zh(e)&&e[n]===t},matches(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},Uh=["text"],Vh=["text"];function Wh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Gh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wh(Object(n),!0).forEach(function(t){rh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var qh=new WeakMap,Kh={above(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{voids:n=!1,mode:r="lowest",at:o=e.selection,match:i}=t;if(o){var a=Kh.path(e,o),s="lowest"===r;for(var[u,l]of Kh.levels(e,{at:a,voids:n,match:i,reverse:s}))if(!Cg.isText(u)&&!og.equals(a,l))return[u,l]}},addMark(e,t,n){e.addMark(t,n)},after(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={anchor:Kh.point(e,t,{edge:"end"}),focus:Kh.end(e,[])},{distance:i=1}=r,a=0;for(var s of Kh.positions(e,Gh(Gh({},r),{},{at:o}))){if(a>i)break;0!==a&&(n=s),a++}return n},before(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={anchor:Kh.start(e,[]),focus:Kh.point(e,t,{edge:"start"})},{distance:i=1}=r,a=0;for(var s of Kh.positions(e,Gh(Gh({},r),{},{at:o,reverse:!0}))){if(a>i)break;0!==a&&(n=s),a++}return n},deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{direction:n="forward"}=t;e.deleteFragment(n)},edges:(e,t)=>[Kh.start(e,t),Kh.end(e,t)],end:(e,t)=>Kh.point(e,t,{edge:"end"}),first(e,t){var n=Kh.path(e,t,{edge:"start"});return Kh.node(e,n)},fragment(e,t){var n=Kh.range(e,t);return eg.fragment(e,n)},hasBlocks:(e,t)=>t.children.some(t=>Kh.isBlock(e,t)),hasInlines:(e,t)=>t.children.some(t=>Cg.isText(t)||Kh.isInline(e,t)),hasTexts:(e,t)=>t.children.every(e=>Cg.isText(e)),insertBreak(e){e.insertBreak()},insertSoftBreak(e){e.insertSoftBreak()},insertFragment(e,t){e.insertFragment(t)},insertNode(e,t){e.insertNode(t)},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>$h.isElement(t)&&!e.isInline(t),isEditor(e){var t=qh.get(e);if(void 0!==t)return t;if(!op(e))return!1;var n="function"==typeof e.addMark&&"function"==typeof e.apply&&"function"==typeof e.deleteBackward&&"function"==typeof e.deleteForward&&"function"==typeof e.deleteFragment&&"function"==typeof e.insertBreak&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertText&&"function"==typeof e.isInline&&"function"==typeof e.isVoid&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.removeMark&&"function"==typeof e.getDirtyPaths&&(null===e.marks||op(e.marks))&&(null===e.selection||fg.isRange(e.selection))&&eg.isNodeList(e.children)&&rg.isOperationList(e.operations);return qh.set(e,n),n},isEnd(e,t,n){var r=Kh.end(e,n);return ug.equals(t,r)},isEdge:(e,t,n)=>Kh.isStart(e,t,n)||Kh.isEnd(e,t,n),isEmpty(e,t){var{children:n}=t,[r]=n;return 0===n.length||1===n.length&&Cg.isText(r)&&""===r.text&&!e.isVoid(t)},isInline:(e,t)=>$h.isElement(t)&&e.isInline(t),isNormalizing(e){var t=sh.get(e);return void 0===t||t},isStart(e,t,n){if(0!==t.offset)return!1;var r=Kh.start(e,n);return ug.equals(t,r)},isVoid:(e,t)=>$h.isElement(t)&&e.isVoid(t),last(e,t){var n=Kh.path(e,t,{edge:"end"});return Kh.node(e,n)},leaf(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Kh.path(e,t,n);return[eg.leaf(e,r),r]},*levels(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,reverse:r=!1,voids:o=!1}=t,{match:i}=t;if(null==i&&(i=()=>!0),n){var a=[],s=Kh.path(e,n);for(var[u,l]of eg.levels(e,s))if(i(u,l)&&(a.push([u,l]),!o&&Kh.isVoid(e,u)))break;r&&a.reverse(),yield*a}},marks(e){var{marks:t,selection:n}=e;if(!n)return null;if(t)return t;if(fg.isExpanded(n)){var[r]=Kh.nodes(e,{match:Cg.isText});if(r){var[o]=r;return ph(o,Uh)}return{}}var{anchor:i}=n,{path:a}=i,[s]=Kh.leaf(e,a);if(0===i.offset){var u=Kh.previous(e,{at:a,match:Cg.isText}),l=Kh.above(e,{match:t=>Kh.isBlock(e,t)});if(u&&l){var[c,d]=u,[,f]=l;og.isAncestor(f,d)&&(s=c)}}return ph(s,Vh)},next(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection}=t;if(i){var a=Kh.after(e,i,{voids:r});if(a){var[,s]=Kh.last(e,[]),u=[a.path,s];if(og.isPath(i)&&0===i.length)throw new Error("Cannot get the next node from the root node!");if(null==o)if(og.isPath(i)){var[l]=Kh.parent(e,i);o=e=>l.children.includes(e)}else o=()=>!0;var[c]=Kh.nodes(e,{at:u,match:o,mode:n,voids:r});return c}}},node(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Kh.path(e,t,n);return[eg.get(e,r),r]},*nodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,mode:r="all",universal:o=!1,reverse:i=!1,voids:a=!1}=t,{match:s}=t;if(s||(s=()=>!0),n){var u,l;if(Xh.isSpan(n))u=n[0],l=n[1];else{var c=Kh.path(e,n,{edge:"start"}),d=Kh.path(e,n,{edge:"end"});u=i?d:c,l=i?c:d}var f,p=eg.nodes(e,{reverse:i,from:u,to:l,pass:t=>{var[n]=t;return!a&&Kh.isVoid(e,n)}}),h=[];for(var[g,v]of p){var m=f&&0===og.compare(v,f[1]);if("highest"!==r||!m)if(s(g,v))if("lowest"===r&&m)f=[g,v];else{var y="lowest"===r?f:[g,v];y&&(o?h.push(y):yield y),f=[g,v]}else if(o&&!m&&Cg.isText(g))return}"lowest"===r&&f&&(o?h.push(f):yield f),o&&(yield*h)}},normalize(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{force:n=!1}=t,r=e=>oh.get(e)||[],o=e=>{var t=r(e).pop(),n=t.join(",");return(e=>ih.get(e)||new Set)(e).delete(n),t};if(Kh.isNormalizing(e)){if(n){var i=Array.from(eg.nodes(e),e=>{var[,t]=e;return t}),a=new Set(i.map(e=>e.join(",")));oh.set(e,i),ih.set(e,a)}0!==r(e).length&&Kh.withoutNormalizing(e,()=>{for(var t of r(e))if(eg.has(e,t)){var n=Kh.node(e,t),[i,a]=n;$h.isElement(i)&&0===i.children.length&&e.normalizeNode(n)}for(var s=42*r(e).length,u=0;0!==r(e).length;){if(u>s)throw new Error("\n Could not completely normalize the editor after ".concat(s," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.\n "));var l=o(e);if(eg.has(e,l)){var c=Kh.node(e,l);e.normalizeNode(c)}u++}})}},parent(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Kh.path(e,t,n),o=og.parent(r);return Kh.node(e,o)},path(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{depth:r,edge:o}=n;if(og.isPath(t))if("start"===o){var[,i]=eg.first(e,t);t=i}else if("end"===o){var[,a]=eg.last(e,t);t=a}return fg.isRange(t)&&(t="start"===o?fg.start(t):"end"===o?fg.end(t):og.common(t.anchor.path,t.focus.path)),ug.isPoint(t)&&(t=t.path),null!=r&&(t=t.slice(0,r)),t},hasPath:(e,t)=>eg.has(e,t),pathRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return Kh.pathRefs(e).delete(o),o.current=null,t}};return Kh.pathRefs(e).add(o),o},pathRefs(e){var t=uh.get(e);return t||(t=new Set,uh.set(e,t)),t},point(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{edge:r="start"}=n;if(og.isPath(t)){var o;if("end"===r){var[,i]=eg.last(e,t);o=i}else{var[,a]=eg.first(e,t);o=a}var s=eg.get(e,o);if(!Cg.isText(s))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:o,offset:"end"===r?s.text.length:0}}if(fg.isRange(t)){var[u,l]=fg.edges(t);return"start"===r?u:l}return t},pointRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return Kh.pointRefs(e).delete(o),o.current=null,t}};return Kh.pointRefs(e).add(o),o},pointRefs(e){var t=lh.get(e);return t||(t=new Set,lh.set(e,t)),t},*positions(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{at:n=e.selection,unit:r="offset",reverse:o=!1,voids:i=!1}=t;if(n){var a=Kh.range(e,n),[s,u]=fg.edges(a),l=o?u:s,c=!1,d="",f=0,p=0,h=0;for(var[g,v]of Kh.nodes(e,{at:n,reverse:o,voids:i})){if($h.isElement(g)){if(!i&&e.isVoid(g)){yield Kh.start(e,v);continue}if(e.isInline(g))continue;if(Kh.hasInlines(e,g)){var m=og.isAncestor(v,u.path)?u:Kh.end(e,v),y=og.isAncestor(v,s.path)?s:Kh.start(e,v);d=Kh.string(e,{anchor:y,focus:m},{voids:i}),c=!0}}if(Cg.isText(g)){var b=og.equals(v,l.path);for(b?(p=o?l.offset:g.text.length-l.offset,h=l.offset):(p=g.text.length,h=o?p:0),(b||c||"offset"===r)&&(yield{path:v,offset:h},c=!1);;){if(0===f){if(""===d)break;f=E(d,r,o),d=bh(d,f,o)[1]}if(h=o?h-f:h+f,(p-=f)<0){f=-p;break}f=0,yield{path:v,offset:h}}}}}function E(e,t,n){return"character"===t?gh(e,n):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;e.length>0;){var o=gh(e,t),[i,a]=bh(e,o,t);if(Eh(i,a,t))r=!0,n+=o;else{if(r)break;n+=o}e=a}return n}(e,n):"line"===t||"block"===t?e.length:1}},previous(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection}=t;if(i){var a=Kh.before(e,i,{voids:r});if(a){var[,s]=Kh.first(e,[]),u=[a.path,s];if(og.isPath(i)&&0===i.length)throw new Error("Cannot get the previous node from the root node!");if(null==o)if(og.isPath(i)){var[l]=Kh.parent(e,i);o=e=>l.children.includes(e)}else o=()=>!0;var[c]=Kh.nodes(e,{reverse:!0,at:u,match:o,mode:n,voids:r});return c}}},range:(e,t,n)=>fg.isRange(t)&&!n?t:{anchor:Kh.start(e,t),focus:Kh.end(e,n||t)},rangeRef(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return Kh.rangeRefs(e).delete(o),o.current=null,t}};return Kh.rangeRefs(e).add(o),o},rangeRefs(e){var t=ch.get(e);return t||(t=new Set,ch.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){sh.set(e,t)},start:(e,t)=>Kh.point(e,t,{edge:"start"}),string(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,o=Kh.range(e,t),[i,a]=fg.edges(o),s="";for(var[u,l]of Kh.nodes(e,{at:o,match:Cg.isText,voids:r})){var c=u.text;og.equals(l,a.path)&&(c=c.slice(0,a.offset)),og.equals(l,i.path)&&(c=c.slice(i.offset)),s+=c}return s},unhangRange(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,[o,i]=fg.edges(t);if(0!==o.offset||0!==i.offset||fg.isCollapsed(t))return t;var a=Kh.above(e,{at:i,match:t=>Kh.isBlock(e,t)}),s=a?a[1]:[],u={anchor:Kh.start(e,o),focus:i},l=!0;for(var[c,d]of Kh.nodes(e,{at:u,match:Cg.isText,reverse:!0,voids:r}))if(l)l=!1;else if(""!==c.text||og.isBefore(d,s)){i={path:d,offset:c.text.length};break}return{anchor:o,focus:i}},void(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Kh.above(e,Gh(Gh({},t),{},{match:t=>Kh.isVoid(e,t)}))},withoutNormalizing(e,t){var n=Kh.isNormalizing(e);Kh.setNormalizing(e,!1);try{t()}finally{Kh.setNormalizing(e,n)}Kh.normalize(e)}},Yh={isLocation:e=>og.isPath(e)||ug.isPoint(e)||fg.isRange(e)},Xh={isSpan:e=>Array.isArray(e)&&2===e.length&&e.every(og.isPath)},Zh=["children"],Jh=["text"],Qh=new WeakMap,eg={ancestor(e,t){var n=eg.get(e,t);if(Cg.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(gg.stringify(n)));return n},*ancestors(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var r of og.ancestors(t,n)){var o=[eg.ancestor(e,r),r];yield o}},child(e,t){if(Cg.isText(e))throw new Error("Cannot get the child of a text node: ".concat(gg.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(gg.stringify(e)));return n},*children(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{reverse:r=!1}=n,o=eg.ancestor(e,t),{children:i}=o,a=r?i.length-1:0;r?a>=0:a<i.length;){var s=eg.child(o,a),u=t.concat(a);yield[s,u],a=r?a-1:a+1}},common(e,t,n){var r=og.common(t,n);return[eg.get(e,r),r]},descendant(e,t){var n=eg.get(e,t);if(Kh.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(gg.stringify(n)));return n},*descendants(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of eg.nodes(e,t))0!==r.length&&(yield[n,r])},*elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of eg.nodes(e,t))$h.isElement(n)&&(yield[n,r])},extractProps:e=>$h.isAncestor(e)?ph(e,Zh):ph(e,Jh),first(e,t){for(var n=t.slice(),r=eg.get(e,n);r&&!Cg.isText(r)&&0!==r.children.length;)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){if(Cg.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(gg.stringify(e)));var n=eh({children:e.children},e=>{var[n,r]=fg.edges(t),o=eg.nodes(e,{reverse:!0,pass:e=>{var[,n]=e;return!fg.includes(t,n)}});for(var[,i]of o){if(!fg.includes(t,i)){var a=eg.parent(e,i),s=i[i.length-1];a.children.splice(s,1)}if(og.equals(i,r.path)){var u=eg.leaf(e,i);u.text=u.text.slice(0,r.offset)}if(og.equals(i,n.path)){var l=eg.leaf(e,i);l.text=l.text.slice(n.offset)}}Kh.isEditor(e)&&(e.selection=null)});return n.children},get(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(Cg.isText(n)||!n.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(gg.stringify(e)));n=n.children[o]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(Cg.isText(n)||!n.children[o])return!1;n=n.children[o]}return!0},isNode:e=>Cg.isText(e)||$h.isElement(e)||Kh.isEditor(e),isNodeList(e){if(!Array.isArray(e))return!1;var t=Qh.get(e);if(void 0!==t)return t;var n=e.every(e=>eg.isNode(e));return Qh.set(e,n),n},last(e,t){for(var n=t.slice(),r=eg.get(e,n);r&&!Cg.isText(r)&&0!==r.children.length;){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf(e,t){var n=eg.get(e,t);if(!Cg.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(gg.stringify(n)));return n},*levels(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(var r of og.levels(t,n)){var o=eg.get(e,r);yield[o,r]}},matches:(e,t)=>$h.isElement(e)&&$h.isElementProps(t)&&$h.matches(e,t)||Cg.isText(e)&&Cg.isTextProps(t)&&Cg.matches(e,t),*nodes(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{pass:n,reverse:r=!1}=t,{from:o=[],to:i}=t,a=new Set,s=[],u=e;!i||!(r?og.isBefore(s,i):og.isAfter(s,i));)if(a.has(u)||(yield[u,s]),a.has(u)||Cg.isText(u)||0===u.children.length||null!=n&&!1!==n([u,s])){if(0===s.length)break;if(!r){var l=og.next(s);if(eg.has(e,l)){s=l,u=eg.get(e,s);continue}}if(r&&0!==s[s.length-1])s=og.previous(s),u=eg.get(e,s);else s=og.parent(s),u=eg.get(e,s),a.add(u)}else{a.add(u);var c=r?u.children.length-1:0;og.isAncestor(s,o)&&(c=o[s.length]),s=s.concat(c),u=eg.get(e,s)}},parent(e,t){var n=og.parent(t),r=eg.get(e,n);if(Cg.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:e=>Cg.isText(e)?e.text:e.children.map(eg.string).join(""),*texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var[n,r]of eg.nodes(e,t))Cg.isText(n)&&(yield[n,r])}};function tg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ng(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tg(Object(n),!0).forEach(function(t){rh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var rg={isNodeOperation:e=>rg.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!op(e))return!1;switch(e.type){case"insert_node":case"remove_node":return og.isPath(e.path)&&eg.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&og.isPath(e.path);case"merge_node":return"number"==typeof e.position&&og.isPath(e.path)&&op(e.properties);case"move_node":return og.isPath(e.path)&&og.isPath(e.newPath);case"set_node":return og.isPath(e.path)&&op(e.properties)&&op(e.newProperties);case"set_selection":return null===e.properties&&fg.isRange(e.newProperties)||null===e.newProperties&&fg.isRange(e.properties)||op(e.properties)&&op(e.newProperties);case"split_node":return og.isPath(e.path)&&"number"==typeof e.position&&op(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every(e=>rg.isOperation(e)),isSelectionOperation:e=>rg.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>rg.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return ng(ng({},e),{},{type:"remove_node"});case"insert_text":return ng(ng({},e),{},{type:"remove_text"});case"merge_node":return ng(ng({},e),{},{type:"split_node",path:og.previous(e.path)});case"move_node":var{newPath:t,path:n}=e;if(og.equals(t,n))return e;if(og.isSibling(n,t))return ng(ng({},e),{},{path:t,newPath:n});var r=og.transform(n,e),o=og.transform(og.next(n),e);return ng(ng({},e),{},{path:r,newPath:o});case"remove_node":return ng(ng({},e),{},{type:"insert_node"});case"remove_text":return ng(ng({},e),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=e;return ng(ng({},e),{},{properties:a,newProperties:i});case"set_selection":var{properties:s,newProperties:u}=e;return ng(ng({},e),{},null==s?{properties:u,newProperties:null}:null==u?{properties:null,newProperties:s}:{properties:u,newProperties:s});case"split_node":return ng(ng({},e),{},{type:"merge_node",path:og.next(e.path)})}}},og={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=og.levels(e,t);return r=n?r.slice(1):r.slice(0,-1)},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var o=e[r];if(o!==t[r])break;n.push(o)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return og.equals(r,o)&&i>a},endsAt(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return og.equals(r,o)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return og.equals(r,o)&&i<a},equals:(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===og.compare(e,t),isAncestor:(e,t)=>e.length<t.length&&0===og.compare(e,t),isBefore:(e,t)=>-1===og.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===og.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===og.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===og.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===og.compare(e,t),isPath:e=>Array.isArray(e)&&(0===e.length||"number"==typeof e[0]),isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&og.equals(n,r)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!og.isAncestor(t,e)&&!og.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return eh(e,r=>{var{affinity:o="forward"}=n;if(e&&0!==(null==e?void 0:e.length)){if(null===r)return null;switch(t.type){case"insert_node":var{path:i}=t;(og.equals(i,r)||og.endsBefore(i,r)||og.isAncestor(i,r))&&(r[i.length-1]+=1);break;case"remove_node":var{path:a}=t;if(og.equals(a,r)||og.isAncestor(a,r))return null;og.endsBefore(a,r)&&(r[a.length-1]-=1);break;case"merge_node":var{path:s,position:u}=t;og.equals(s,r)||og.endsBefore(s,r)?r[s.length-1]-=1:og.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=u);break;case"split_node":var{path:l,position:c}=t;if(og.equals(l,r)){if("forward"===o)r[r.length-1]+=1;else if("backward"!==o)return null}else og.endsBefore(l,r)?r[l.length-1]+=1:og.isAncestor(l,r)&&e[l.length]>=c&&(r[l.length-1]+=1,r[l.length]-=c);break;case"move_node":var{path:d,newPath:f}=t;if(og.equals(d,f))return;if(og.isAncestor(d,r)||og.equals(d,r)){var p=f.slice();return og.endsBefore(d,f)&&d.length<f.length&&(p[d.length-1]-=1),p.concat(r.slice(d.length))}og.isSibling(d,f)&&(og.isAncestor(f,r)||og.equals(f,r))?og.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:og.endsBefore(f,r)||og.equals(f,r)||og.isAncestor(f,r)?(og.endsBefore(d,r)&&(r[d.length-1]-=1),r[f.length-1]+=1):og.endsBefore(d,r)&&(og.equals(f,r)&&(r[f.length-1]+=1),r[d.length-1]-=1)}}})}},ig={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=og.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}};function ag(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ag(Object(n),!0).forEach(function(t){rh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ag(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var ug={compare(e,t){var n=og.compare(e.path,t.path);return 0===n?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter:(e,t)=>1===ug.compare(e,t),isBefore:(e,t)=>-1===ug.compare(e,t),equals:(e,t)=>e.offset===t.offset&&og.equals(e.path,t.path),isPoint:e=>op(e)&&"number"==typeof e.offset&&og.isPath(e.path),transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return eh(e,e=>{if(null===e)return null;var{affinity:r="forward"}=n,{path:o,offset:i}=e;switch(t.type){case"insert_node":case"move_node":e.path=og.transform(o,t,n);break;case"insert_text":og.equals(t.path,o)&&(t.offset<i||t.offset===i&&"forward"===r)&&(e.offset+=t.text.length);break;case"merge_node":og.equals(t.path,o)&&(e.offset+=t.position),e.path=og.transform(o,t,n);break;case"remove_text":og.equals(t.path,o)&&t.offset<=i&&(e.offset-=Math.min(i-t.offset,t.text.length));break;case"remove_node":if(og.equals(t.path,o)||og.isAncestor(t.path,o))return null;e.path=og.transform(o,t,n);break;case"split_node":if(og.equals(t.path,o)){if(t.position===i&&null==r)return null;(t.position<i||t.position===i&&"forward"===r)&&(e.offset-=t.position,e.path=og.transform(o,t,sg(sg({},n),{},{affinity:"forward"})))}else e.path=og.transform(o,t,n)}})}},lg={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=ug.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},cg=["anchor","focus"];function dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var fg={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:o}=e;return fg.isBackward(e)===n?[r,o]:[o,r]},end(e){var[,t]=fg.edges(e);return t},equals:(e,t)=>ug.equals(e.anchor,t.anchor)&&ug.equals(e.focus,t.focus),includes(e,t){if(fg.isRange(t)){if(fg.includes(e,t.anchor)||fg.includes(e,t.focus))return!0;var[n,r]=fg.edges(e),[o,i]=fg.edges(t);return ug.isBefore(n,o)&&ug.isAfter(r,i)}var[a,s]=fg.edges(e),u=!1,l=!1;return ug.isPoint(t)?(u=ug.compare(t,a)>=0,l=ug.compare(t,s)<=0):(u=og.compare(t,a.path)>=0,l=og.compare(t,s.path)<=0),u&&l},intersection(e,t){var n=ph(e,cg),[r,o]=fg.edges(e),[i,a]=fg.edges(t),s=ug.isBefore(r,i)?i:r,u=ug.isBefore(o,a)?o:a;return ug.isBefore(u,s)?null:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dg(Object(n),!0).forEach(function(t){rh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({anchor:s,focus:u},n)},isBackward(e){var{anchor:t,focus:n}=e;return ug.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return ug.equals(t,n)},isExpanded:e=>!fg.isCollapsed(e),isForward:e=>!fg.isBackward(e),isRange:e=>op(e)&&ug.isPoint(e.anchor)&&ug.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=fg.edges(e);return t},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return eh(e,e=>{if(null===e)return null;var r,o,{affinity:i="inward"}=n;if("inward"===i){var a=fg.isCollapsed(e);fg.isForward(e)?(r="forward",o=a?r:"backward"):(r="backward",o=a?r:"forward")}else"outward"===i?fg.isForward(e)?(r="backward",o="forward"):(r="forward",o="backward"):(r=i,o=i);var s=ug.transform(e.anchor,t,{affinity:r}),u=ug.transform(e.focus,t,{affinity:o});if(!s||!u)return null;e.anchor=s,e.focus=u})}},pg={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=fg.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},hg=void 0,gg={setScrubber(e){hg=e},stringify:e=>JSON.stringify(e,hg)},vg=(e,t)=>{for(var n in e){var r=e[n],o=t[n];if(op(r)&&op(o)){if(!vg(r,o))return!1}else if(Array.isArray(r)&&Array.isArray(o)){if(r.length!==o.length)return!1;for(var i=0;i<r.length;i++)if(r[i]!==o[i])return!1}else if(r!==o)return!1}for(var a in t)if(void 0===e[a]&&void 0!==t[a])return!1;return!0},mg=["text"],yg=["anchor","focus"];function bg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Eg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bg(Object(n),!0).forEach(function(t){rh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Cg={equals(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{loose:r=!1}=n;function o(e){return ph(e,mg)}return vg(r?o(e):e,r?o(t):t)},isText:e=>op(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every(e=>Cg.isText(e)),isTextProps:e=>void 0!==e.text,matches(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[Eg({},e)];for(var r of t){var o=ph(r,yg),[i,a]=fg.edges(r),s=[],u=0,l=i.offset,c=a.offset;for(var d of n){var{length:f}=d.text,p=u;if(u+=f,l<=p&&u<=c)Object.assign(d,o),s.push(d);else if(l!==c&&(l===u||c===p)||l>u||c<p||c===p&&0!==p)s.push(d);else{var h=d,g=void 0,v=void 0;if(c<u){var m=c-p;v=Eg(Eg({},h),{},{text:h.text.slice(m)}),h=Eg(Eg({},h),{},{text:h.text.slice(0,m)})}if(l>p){var y=l-p;g=Eg(Eg({},h),{},{text:h.text.slice(0,y)}),h=Eg(Eg({},h),{},{text:h.text.slice(y)})}Object.assign(h,o),g&&s.push(g),s.push(h),v&&s.push(v)}}n=s}return n}};function Dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dg(Object(n),!0).forEach(function(t){rh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Ag={transform(e,t){e.children=th(e.children);var n=e.selection&&th(e.selection);try{n=((e,t,n)=>{switch(n.type){case"insert_node":var{path:r,node:o}=n,i=eg.parent(e,r),a=r[r.length-1];if(a>i.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(i.children.splice(a,0,o),t)for(var[s,u]of fg.points(t))t[u]=ug.transform(s,n);break;case"insert_text":var{path:l,offset:c,text:d}=n;if(0===d.length)break;var f=eg.leaf(e,l),p=f.text.slice(0,c),h=f.text.slice(c);if(f.text=p+d+h,t)for(var[g,v]of fg.points(t))t[v]=ug.transform(g,n);break;case"merge_node":var{path:m}=n,y=eg.get(e,m),b=og.previous(m),E=eg.get(e,b),C=eg.parent(e,m),D=m[m.length-1];if(Cg.isText(y)&&Cg.isText(E))E.text+=y.text;else{if(Cg.isText(y)||Cg.isText(E))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(m,"] to nodes of different interfaces: ").concat(gg.stringify(y)," ").concat(gg.stringify(E)));E.children.push(...y.children)}if(C.children.splice(D,1),t)for(var[w,A]of fg.points(t))t[A]=ug.transform(w,n);break;case"move_node":var{path:S,newPath:x}=n;if(og.isAncestor(S,x))throw new Error("Cannot move a path [".concat(S,"] to new path [").concat(x,"] because the destination is inside itself."));var O=eg.get(e,S),N=eg.parent(e,S),B=S[S.length-1];N.children.splice(B,1);var T=og.transform(S,n),k=eg.get(e,og.parent(T)),F=T[T.length-1];if(k.children.splice(F,0,O),t)for(var[I,P]of fg.points(t))t[P]=ug.transform(I,n);break;case"remove_node":var{path:_}=n,L=_[_.length-1];if(eg.parent(e,_).children.splice(L,1),t)for(var[R,M]of fg.points(t)){var j=ug.transform(R,n);if(null!=t&&null!=j)t[M]=j;else{var H=void 0,z=void 0;for(var[$,U]of eg.texts(e)){if(-1!==og.compare(U,_)){z=[$,U];break}H=[$,U]}var V=!1;H&&z&&(V=og.equals(z[1],_)?!og.hasPrevious(z[1]):og.common(H[1],_).length<og.common(z[1],_).length),H&&!V?(R.path=H[1],R.offset=H[0].text.length):z?(R.path=z[1],R.offset=0):t=null}}break;case"remove_text":var{path:W,offset:G,text:q}=n;if(0===q.length)break;var K=eg.leaf(e,W),Y=K.text.slice(0,G),X=K.text.slice(G+q.length);if(K.text=Y+X,t)for(var[Z,J]of fg.points(t))t[J]=ug.transform(Z,n);break;case"set_node":var{path:Q,properties:ee,newProperties:te}=n;if(0===Q.length)throw new Error("Cannot set properties on the root node!");var ne=eg.get(e,Q);for(var re in te){if("children"===re||"text"===re)throw new Error('Cannot set the "'.concat(re,'" property of nodes!'));var oe=te[re];null==oe?delete ne[re]:ne[re]=oe}for(var ie in ee)te.hasOwnProperty(ie)||delete ne[ie];break;case"set_selection":var{newProperties:ae}=n;if(null==ae)t=ae;else{if(null==t){if(!fg.isRange(ae))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(gg.stringify(ae)," when there is no current selection."));t=wg({},ae)}for(var se in ae){var ue=ae[se];if(null==ue){if("anchor"===se||"focus"===se)throw new Error('Cannot remove the "'.concat(se,'" selection property'));delete t[se]}else t[se]=ue}}break;case"split_node":var{path:le,position:ce,properties:de}=n;if(0===le.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(le,"] because the root node cannot be split."));var fe,pe=eg.get(e,le),he=eg.parent(e,le),ge=le[le.length-1];if(Cg.isText(pe)){var ve=pe.text.slice(0,ce),me=pe.text.slice(ce);pe.text=ve,fe=wg(wg({},de),{},{text:me})}else{var ye=pe.children.slice(0,ce),be=pe.children.slice(ce);pe.children=ye,fe=wg(wg({},de),{},{children:be})}if(he.children.splice(ge+1,0,fe),t)for(var[Ee,Ce]of fg.points(t))t[Ce]=ug.transform(Ee,n)}return t})(e,n,t)}finally{e.children=nh(e.children),e.selection=n?ap(n)?nh(n):n:null}}},Sg=["text"],xg=["children"];function Og(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ng(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Og(Object(n),!0).forEach(function(t){rh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Og(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Bg={insertNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Kh.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:o=!1,mode:i="lowest"}=n,{at:a,match:s,select:u}=n;if(eg.isNode(t)&&(t=[t]),0!==t.length){var[l]=t;if(a||(a=e.selection?e.selection:e.children.length>0?Kh.end(e,[]):[0],u=!0),null==u&&(u=!1),fg.isRange(a))if(r||(a=Kh.unhangRange(e,a)),fg.isCollapsed(a))a=a.anchor;else{var[,c]=fg.edges(a),d=Kh.pointRef(e,c);jg.delete(e,{at:a}),a=d.unref()}if(ug.isPoint(a)){null==s&&(s=Cg.isText(l)?e=>Cg.isText(e):e.isInline(l)?t=>Cg.isText(t)||Kh.isInline(e,t):t=>Kh.isBlock(e,t));var[f]=Kh.nodes(e,{at:a.path,match:s,mode:i,voids:o});if(!f)return;var[,p]=f,h=Kh.pathRef(e,p),g=Kh.isEnd(e,a,p);jg.splitNodes(e,{at:a,match:s,mode:i,voids:o});var v=h.unref();a=g?og.next(v):v}var m=og.parent(a),y=a[a.length-1];if(o||!Kh.void(e,{at:m})){for(var b of t){var E=m.concat(y);y++,e.apply({type:"insert_node",path:E,node:b}),a=og.next(a)}if(a=og.previous(a),u){var C=Kh.end(e,a);C&&jg.select(e,C)}}}})},liftNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kh.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:r="lowest",voids:o=!1}=t,{match:i}=t;if(null==i&&(i=og.isPath(n)?Fg(e,n):t=>Kh.isBlock(e,t)),n){var a=Kh.nodes(e,{at:n,match:i,mode:r,voids:o}),s=Array.from(a,t=>{var[,n]=t;return Kh.pathRef(e,n)});for(var u of s){var l=u.unref();if(l.length<2)throw new Error("Cannot lift node at a path [".concat(l,"] because it has a depth of less than `2`."));var c=Kh.node(e,og.parent(l)),[d,f]=c,p=l[l.length-1],{length:h}=d.children;if(1===h){var g=og.next(f);jg.moveNodes(e,{at:l,to:g,voids:o}),jg.removeNodes(e,{at:f,voids:o})}else if(0===p)jg.moveNodes(e,{at:l,to:f,voids:o});else if(p===h-1){var v=og.next(f);jg.moveNodes(e,{at:l,to:v,voids:o})}else{var m=og.next(l),y=og.next(f);jg.splitNodes(e,{at:m,voids:o}),jg.moveNodes(e,{at:l,to:y,voids:o})}}}})},mergeNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kh.withoutNormalizing(e,()=>{var{match:n,at:r=e.selection}=t,{hanging:o=!1,voids:i=!1,mode:a="lowest"}=t;if(r){if(null==n)if(og.isPath(r)){var[s]=Kh.parent(e,r);n=e=>s.children.includes(e)}else n=t=>Kh.isBlock(e,t);if(!o&&fg.isRange(r)&&(r=Kh.unhangRange(e,r)),fg.isRange(r))if(fg.isCollapsed(r))r=r.anchor;else{var[,u]=fg.edges(r),l=Kh.pointRef(e,u);jg.delete(e,{at:r}),r=l.unref(),null==t.at&&jg.select(e,r)}var[c]=Kh.nodes(e,{at:r,match:n,voids:i,mode:a}),d=Kh.previous(e,{at:r,match:n,voids:i,mode:a});if(c&&d){var[f,p]=c,[h,g]=d;if(0!==p.length&&0!==g.length){var v,m,y=og.next(g),b=og.common(p,g),E=og.isSibling(p,g),C=Array.from(Kh.levels(e,{at:p}),e=>{var[t]=e;return t}).slice(b.length).slice(0,-1),D=Kh.above(e,{at:p,mode:"highest",match:t=>C.includes(t)&&Tg(e,t)}),w=D&&Kh.pathRef(e,D[1]);if(Cg.isText(f)&&Cg.isText(h)){var A=ph(f,Sg);m=h.text.length,v=A}else{if(!$h.isElement(f)||!$h.isElement(h))throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(gg.stringify(f)," ").concat(gg.stringify(h)));A=ph(f,xg);m=h.children.length,v=A}E||jg.moveNodes(e,{at:p,to:y,voids:i}),w&&jg.removeNodes(e,{at:w.current,voids:i}),$h.isElement(h)&&Kh.isEmpty(e,h)||Cg.isText(h)&&""===h.text&&0!==g[g.length-1]?jg.removeNodes(e,{at:g,voids:i}):e.apply({type:"merge_node",path:y,position:m,properties:v}),w&&w.unref()}}}})},moveNodes(e,t){Kh.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:o="lowest",voids:i=!1}=t,{match:a}=t;if(r){null==a&&(a=og.isPath(r)?Fg(e,r):t=>Kh.isBlock(e,t));var s=Kh.pathRef(e,n),u=Kh.nodes(e,{at:r,match:a,mode:o,voids:i}),l=Array.from(u,t=>{var[,n]=t;return Kh.pathRef(e,n)});for(var c of l){var d=c.unref(),f=s.current;0!==d.length&&e.apply({type:"move_node",path:d,newPath:f}),s.current&&og.isSibling(f,d)&&og.isAfter(f,d)&&(s.current=og.next(s.current))}s.unref()}})},removeNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kh.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:r=!1,mode:o="lowest"}=t,{at:i=e.selection,match:a}=t;if(i){null==a&&(a=og.isPath(i)?Fg(e,i):t=>Kh.isBlock(e,t)),!n&&fg.isRange(i)&&(i=Kh.unhangRange(e,i));var s=Kh.nodes(e,{at:i,match:a,mode:o,voids:r}),u=Array.from(s,t=>{var[,n]=t;return Kh.pathRef(e,n)});for(var l of u){var c=l.unref();if(c){var[d]=Kh.node(e,c);e.apply({type:"remove_node",path:c,node:d})}}}})},setNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Kh.withoutNormalizing(e,()=>{var{match:r,at:o=e.selection,compare:i,merge:a}=n,{hanging:s=!1,mode:u="lowest",split:l=!1,voids:c=!1}=n;if(o){if(null==r&&(r=og.isPath(o)?Fg(e,o):t=>Kh.isBlock(e,t)),!s&&fg.isRange(o)&&(o=Kh.unhangRange(e,o)),l&&fg.isRange(o)){if(fg.isCollapsed(o)&&Kh.leaf(e,o.anchor)[0].text.length>0)return;var d=Kh.rangeRef(e,o,{affinity:"inward"}),[f,p]=fg.edges(o),h="lowest"===u?"lowest":"highest",g=Kh.isEnd(e,p,p.path);jg.splitNodes(e,{at:p,match:r,mode:h,voids:c,always:!g});var v=Kh.isStart(e,f,f.path);jg.splitNodes(e,{at:f,match:r,mode:h,voids:c,always:!v}),o=d.unref(),null==n.at&&jg.select(e,o)}for(var[m,y]of(i||(i=(e,t)=>e!==t),Kh.nodes(e,{at:o,match:r,mode:u,voids:c}))){var b={},E={};if(0!==y.length){var C=!1;for(var D in t)"children"!==D&&"text"!==D&&i(t[D],m[D])&&(C=!0,m.hasOwnProperty(D)&&(b[D]=m[D]),a?null!=t[D]&&(E[D]=a(m[D],t[D])):null!=t[D]&&(E[D]=t[D]));C&&e.apply({type:"set_node",path:y,properties:b,newProperties:E})}}}})},splitNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kh.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection,height:a=0,always:s=!1}=t;if(null==o&&(o=t=>Kh.isBlock(e,t)),fg.isRange(i)&&(i=kg(e,i)),og.isPath(i)){var u=i,l=Kh.point(e,u),[c]=Kh.parent(e,u);o=e=>e===c,a=l.path.length-u.length+1,i=l,s=!0}if(i){var d,f=Kh.pointRef(e,i,{affinity:"backward"});try{var[p]=Kh.nodes(e,{at:i,match:o,mode:n,voids:r});if(!p)return;var h=Kh.void(e,{at:i,mode:"highest"});if(!r&&h){var[g,v]=h;if($h.isElement(g)&&e.isInline(g)){var m=Kh.after(e,v);if(!m){var y=og.next(v);jg.insertNodes(e,{text:""},{at:y,voids:r}),m=Kh.point(e,y)}i=m,s=!0}a=i.path.length-v.length+1,s=!0}d=Kh.pointRef(e,i);var b=i.path.length-a,[,E]=p,C=i.path.slice(0,b),D=0===a?i.offset:i.path[b]+0;for(var[w,A]of Kh.levels(e,{at:C,reverse:!0,voids:r})){var S=!1;if(A.length<E.length||0===A.length||!r&&Kh.isVoid(e,w))break;var x=f.current,O=Kh.isEnd(e,x,A);if(s||!f||!Kh.isEdge(e,x,A)){S=!0;var N=eg.extractProps(w);e.apply({type:"split_node",path:A,position:D,properties:N})}D=A[A.length-1]+(S||O?1:0)}if(null==t.at){var B=d.current||Kh.end(e,[]);jg.select(e,B)}}finally{var T;f.unref(),null===(T=d)||void 0===T||T.unref()}}})},unsetNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var o of t)r[o]=null;jg.setNodes(e,r,n)},unwrapNodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kh.withoutNormalizing(e,()=>{var{mode:n="lowest",split:r=!1,voids:o=!1}=t,{at:i=e.selection,match:a}=t;if(i){null==a&&(a=og.isPath(i)?Fg(e,i):t=>Kh.isBlock(e,t)),og.isPath(i)&&(i=Kh.range(e,i));var s=fg.isRange(i)?Kh.rangeRef(e,i):null,u=Kh.nodes(e,{at:i,match:a,mode:n,voids:o}),l=Array.from(u,t=>{var[,n]=t;return Kh.pathRef(e,n)}).reverse(),c=function(t){var n=t.unref(),[i]=Kh.node(e,n),a=Kh.range(e,n);r&&s&&(a=fg.intersection(s.current,a)),jg.liftNodes(e,{at:a,match:e=>$h.isAncestor(i)&&i.children.includes(e),voids:o})};for(var d of l)c(d);s&&s.unref()}})},wrapNodes(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Kh.withoutNormalizing(e,()=>{var{mode:r="lowest",split:o=!1,voids:i=!1}=n,{match:a,at:s=e.selection}=n;if(s){if(null==a&&(a=og.isPath(s)?Fg(e,s):e.isInline(t)?t=>Kh.isInline(e,t)||Cg.isText(t):t=>Kh.isBlock(e,t)),o&&fg.isRange(s)){var[u,l]=fg.edges(s),c=Kh.rangeRef(e,s,{affinity:"inward"});jg.splitNodes(e,{at:l,match:a,voids:i}),jg.splitNodes(e,{at:u,match:a,voids:i}),s=c.unref(),null==n.at&&jg.select(e,s)}var d=Array.from(Kh.nodes(e,{at:s,match:e.isInline(t)?t=>Kh.isBlock(e,t):e=>Kh.isEditor(e),mode:"lowest",voids:i}));for(var[,f]of d){var p=fg.isRange(s)?fg.intersection(s,Kh.range(e,f)):s;if(p){var h=Array.from(Kh.nodes(e,{at:p,match:a,mode:r,voids:i}));if(h.length>0){var g=function(){var[n]=h,r=h[h.length-1],[,o]=n,[,a]=r;if(0===o.length&&0===a.length)return"continue";var s=og.equals(o,a)?og.parent(o):og.common(o,a),u=Kh.range(e,o,a),l=Kh.node(e,s),[c]=l,d=s.length+1,f=og.next(a.slice(0,d)),p=Ng(Ng({},t),{},{children:[]});jg.insertNodes(e,p,{at:f,voids:i}),jg.moveNodes(e,{at:u,match:e=>$h.isAncestor(c)&&c.children.includes(e),to:f.concat(0),voids:i})}();if("continue"===g)continue}}}}})}},Tg=(e,t)=>{if($h.isElement(t)){var n=t;return!!Kh.isVoid(e,t)||1===n.children.length&&Tg(e,n.children[0])}return!Kh.isEditor(t)},kg=(e,t)=>{if(fg.isCollapsed(t))return t.anchor;var[,n]=fg.edges(t),r=Kh.pointRef(e,n);return jg.delete(e,{at:t}),r.unref()},Fg=(e,t)=>{var[n]=Kh.node(e,t);return e=>e===n};function Ig(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Pg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ig(Object(n),!0).forEach(function(t){rh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ig(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var _g={collapse(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{edge:n="anchor"}=t,{selection:r}=e;if(r)if("anchor"===n)jg.select(e,r.anchor);else if("focus"===n)jg.select(e,r.focus);else if("start"===n){var[o]=fg.edges(r);jg.select(e,o)}else if("end"===n){var[,i]=fg.edges(r);jg.select(e,i)}},deselect(e){var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{selection:n}=e,{distance:r=1,unit:o="character",reverse:i=!1}=t,{edge:a=null}=t;if(n){"start"===a&&(a=fg.isBackward(n)?"focus":"anchor"),"end"===a&&(a=fg.isBackward(n)?"anchor":"focus");var{anchor:s,focus:u}=n,l={distance:r,unit:o},c={};if(null==a||"anchor"===a){var d=i?Kh.before(e,s,l):Kh.after(e,s,l);d&&(c.anchor=d)}if(null==a||"focus"===a){var f=i?Kh.before(e,u,l):Kh.after(e,u,l);f&&(c.focus=f)}jg.setSelection(e,c)}},select(e,t){var{selection:n}=e;if(t=Kh.range(e,t),n)jg.setSelection(e,t);else{if(!fg.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(gg.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}},setPoint(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{selection:r}=e,{edge:o="both"}=n;if(r){"start"===o&&(o=fg.isBackward(r)?"focus":"anchor"),"end"===o&&(o=fg.isBackward(r)?"anchor":"focus");var{anchor:i,focus:a}=r,s="anchor"===o?i:a;jg.setSelection(e,{["anchor"===o?"anchor":"focus"]:Pg(Pg({},s),t)})}},setSelection(e,t){var{selection:n}=e,r={},o={};if(n){for(var i in t)("anchor"===i&&null!=t.anchor&&!ug.equals(t.anchor,n.anchor)||"focus"===i&&null!=t.focus&&!ug.equals(t.focus,n.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==n[i])&&(r[i]=n[i],o[i]=t[i]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:o})}}},Lg={delete(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Kh.withoutNormalizing(e,()=>{var{reverse:n=!1,unit:r="character",distance:o=1,voids:i=!1}=t,{at:a=e.selection,hanging:s=!1}=t;if(a){var u=!1;if(fg.isRange(a)&&fg.isCollapsed(a)&&(u=!0,a=a.anchor),ug.isPoint(a)){var l=Kh.void(e,{at:a,mode:"highest"});if(!i&&l){var[,c]=l;a=c}else{var d={unit:r,distance:o};a={anchor:a,focus:n?Kh.before(e,a,d)||Kh.start(e,[]):Kh.after(e,a,d)||Kh.end(e,[])},s=!0}}if(og.isPath(a))jg.removeNodes(e,{at:a,voids:i});else if(!fg.isCollapsed(a)){if(!s){var[,f]=fg.edges(a),p=Kh.end(e,[]);ug.equals(f,p)||(a=Kh.unhangRange(e,a,{voids:i}))}var[h,g]=fg.edges(a),v=Kh.above(e,{match:t=>Kh.isBlock(e,t),at:h,voids:i}),m=Kh.above(e,{match:t=>Kh.isBlock(e,t),at:g,voids:i}),y=v&&m&&!og.equals(v[1],m[1]),b=og.equals(h.path,g.path),E=i?null:Kh.void(e,{at:h,mode:"highest"}),C=i?null:Kh.void(e,{at:g,mode:"highest"});if(E){var D=Kh.before(e,h);D&&v&&og.isAncestor(v[1],D.path)&&(h=D)}if(C){var w=Kh.after(e,g);w&&m&&og.isAncestor(m[1],w.path)&&(g=w)}var A,S=[];for(var x of Kh.nodes(e,{at:a,voids:i})){var[O,N]=x;A&&0===og.compare(N,A)||(!i&&Kh.isVoid(e,O)||!og.isCommon(N,h.path)&&!og.isCommon(N,g.path))&&(S.push(x),A=N)}var B=Array.from(S,t=>{var[,n]=t;return Kh.pathRef(e,n)}),T=Kh.pointRef(e,h),k=Kh.pointRef(e,g),F="";if(!b&&!E){var I=T.current,[P]=Kh.leaf(e,I),{path:_}=I,{offset:L}=h,R=P.text.slice(L);R.length>0&&(e.apply({type:"remove_text",path:_,offset:L,text:R}),F=R)}for(var M of B){var j=M.unref();jg.removeNodes(e,{at:j,voids:i})}if(!C){var H=k.current,[z]=Kh.leaf(e,H),{path:$}=H,U=b?h.offset:0,V=z.text.slice(U,g.offset);V.length>0&&(e.apply({type:"remove_text",path:$,offset:U,text:V}),F=V)}!b&&y&&k.current&&T.current&&jg.mergeNodes(e,{at:k.current,hanging:!0,voids:i}),u&&n&&"character"===r&&F.length>1&&F.match(/[\u0E00-\u0E7F]+/)&&jg.insertText(e,F.slice(0,F.length-o));var W=T.unref(),G=k.unref(),q=n?W||G:G||W;null==t.at&&q&&jg.select(e,q)}}})},insertFragment(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Kh.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:o=!1}=n,{at:i=e.selection}=n;if(t.length&&i){if(fg.isRange(i))if(r||(i=Kh.unhangRange(e,i)),fg.isCollapsed(i))i=i.anchor;else{var[,a]=fg.edges(i);if(!o&&Kh.void(e,{at:a}))return;var s=Kh.pointRef(e,a);jg.delete(e,{at:i}),i=s.unref()}else og.isPath(i)&&(i=Kh.start(e,i));if(o||!Kh.void(e,{at:i})){var u=Kh.above(e,{at:i,match:t=>Kh.isInline(e,t),mode:"highest",voids:o});if(u){var[,l]=u;if(Kh.isEnd(e,i,l))i=Kh.after(e,l);else if(Kh.isStart(e,i,l)){i=Kh.before(e,l)}}var c=Kh.above(e,{match:t=>Kh.isBlock(e,t),at:i,voids:o}),[,d]=c,f=Kh.isStart(e,i,d),p=Kh.isEnd(e,i,d),h=f&&p,g=!f||f&&p,v=!p,[,m]=eg.first({children:t},[]),[,y]=eg.last({children:t},[]),b=[],E=t=>{var[n,r]=t;return!(0===r.length)&&(!!h||!(g&&og.isAncestor(r,m)&&$h.isElement(n)&&!e.isVoid(n)&&!e.isInline(n))&&!(v&&og.isAncestor(r,y)&&$h.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)))};for(var C of eg.nodes({children:t},{pass:E}))E(C)&&b.push(C);var D=[],w=[],A=[],S=!0,x=!1;for(var[O]of b)$h.isElement(O)&&!e.isInline(O)?(S=!1,x=!0,w.push(O)):S?D.push(O):A.push(O);var[N]=Kh.nodes(e,{at:i,match:t=>Cg.isText(t)||Kh.isInline(e,t),mode:"highest",voids:o}),[,B]=N,T=Kh.isStart(e,i,B),k=Kh.isEnd(e,i,B),F=Kh.pathRef(e,p&&!A.length?og.next(d):d),I=Kh.pathRef(e,k?og.next(B):B);jg.splitNodes(e,{at:i,match:t=>x?Kh.isBlock(e,t):Cg.isText(t)||Kh.isInline(e,t),mode:x?"lowest":"highest",always:x&&(!f||D.length>0)&&(!p||A.length>0),voids:o});var P,_=Kh.pathRef(e,!T||T&&k?og.next(B):B);if(jg.insertNodes(e,D,{at:_.current,match:t=>Cg.isText(t)||Kh.isInline(e,t),mode:"highest",voids:o}),h&&!D.length&&w.length&&!A.length&&jg.delete(e,{at:d,voids:o}),jg.insertNodes(e,w,{at:F.current,match:t=>Kh.isBlock(e,t),mode:"lowest",voids:o}),jg.insertNodes(e,A,{at:I.current,match:t=>Cg.isText(t)||Kh.isInline(e,t),mode:"highest",voids:o}),!n.at)if(A.length>0&&I.current?P=og.previous(I.current):w.length>0&&F.current?P=og.previous(F.current):_.current&&(P=og.previous(_.current)),P){var L=Kh.end(e,P);jg.select(e,L)}_.unref(),F.unref(),I.unref()}}})},insertText(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Kh.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:o=e.selection}=n;if(o){if(og.isPath(o)&&(o=Kh.range(e,o)),fg.isRange(o))if(fg.isCollapsed(o))o=o.anchor;else{var i=fg.end(o);if(!r&&Kh.void(e,{at:i}))return;var a=fg.start(o),s=Kh.pointRef(e,a),u=Kh.pointRef(e,i);jg.delete(e,{at:o,voids:r});var l=s.unref(),c=u.unref();o=l||c,jg.setSelection(e,{anchor:o,focus:o})}if(r||!Kh.void(e,{at:o})){var{path:d,offset:f}=o;t.length>0&&e.apply({type:"insert_text",path:d,offset:f,text:t})}}})}};function Rg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rg(Object(n),!0).forEach(function(t){rh(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var jg=Mg(Mg(Mg(Mg({},Ag),Bg),_g),Lg),Hg={isHistory:e=>op(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||rg.isOperationList(e.redos[0].operations))&&(0===e.undos.length||rg.isOperationList(e.undos[0].operations))},zg=new WeakMap,$g=new WeakMap,Ug={isHistoryEditor:e=>Hg.isHistory(e.history)&&Kh.isEditor(e),isMerging:e=>$g.get(e),isSaving:e=>zg.get(e),redo(e){e.redo()},undo(e){e.undo()},withMerging(e,t){var n=Ug.isMerging(e);$g.set(e,!0),t(),$g.set(e,n)},withoutMerging(e,t){var n=Ug.isMerging(e);$g.set(e,!1),t(),$g.set(e,n)},withoutSaving(e,t){var n=Ug.isSaving(e);zg.set(e,!1),t(),zg.set(e,n)}},Vg=e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:e}=t,{redos:n}=e;if(n.length>0){var r=n[n.length-1];r.selectionBefore&&jg.setSelection(t,r.selectionBefore),Ug.withoutSaving(t,()=>{Kh.withoutNormalizing(t,()=>{for(var e of r.operations)t.apply(e)})}),e.redos.pop(),t.writeHistory("undos",r)}},t.undo=()=>{var{history:e}=t,{undos:n}=e;if(n.length>0){var r=n[n.length-1];Ug.withoutSaving(t,()=>{Kh.withoutNormalizing(t,()=>{var e=r.operations.map(rg.inverse).reverse();for(var n of e)t.apply(n);r.selectionBefore&&jg.setSelection(t,r.selectionBefore)})}),t.writeHistory("redos",r),e.undos.pop()}},t.apply=e=>{var{operations:r,history:o}=t,{undos:i}=o,a=i[i.length-1],s=a&&a.operations[a.operations.length-1],u=Ug.isSaving(t),l=Ug.isMerging(t);if(null==u&&(u=Gg(e)),u){if(null==l&&(l=null!=a&&(0!==r.length||Wg(e,s))),a&&l)a.operations.push(e);else{var c={operations:[e],selectionBefore:t.selection};t.writeHistory("undos",c)}for(;i.length>100;)i.shift();o.redos=[]}n(e)},t.writeHistory=(e,n)=>{t.history[e].push(n)},t},Wg=(e,t)=>!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!og.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!og.equals(e.path,t.path)),Gg=(e,t)=>"set_selection"!==e.type,qg=function(e,t){return qg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},qg(e,t)};function Kg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}qg(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Yg=function(){return Yg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Yg.apply(this,arguments)};function Xg(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function Zg(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function Jg(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Qg(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function ev(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function tv(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Jg(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,o,(t=e[n](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError;var nv,rv={exports:{}};var ov,iv,av=(nv||(nv=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",s="[object Function]",u="[object GeneratorFunction]",l="[object Map]",c="[object Number]",d="[object Object]",f="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",b="[object ArrayBuffer]",E="[object DataView]",C="[object Float32Array]",D="[object Float64Array]",w="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",x="[object Uint8Array]",O="[object Uint8ClampedArray]",N="[object Uint16Array]",B="[object Uint32Array]",T=/\w*$/,k=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,I={};I[o]=I["[object Array]"]=I[b]=I[E]=I[i]=I[a]=I[C]=I[D]=I[w]=I[A]=I[S]=I[l]=I[c]=I[d]=I[p]=I[h]=I[g]=I[v]=I[x]=I[O]=I[N]=I[B]=!0,I["[object Error]"]=I[s]=I[m]=!1;var P="object"==typeof y&&y&&y.Object===Object&&y,_="object"==typeof self&&self&&self.Object===Object&&self,L=P||_||Function("return this")(),R=t&&!t.nodeType&&t,M=R&&e&&!e.nodeType&&e,j=M&&M.exports===R;function H(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function $(e,t,n,r){for(var o=-1,i=e?e.length:0;++o<i;)n=t(n,e[o],o,e);return n}function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function W(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var q=Array.prototype,K=Function.prototype,Y=Object.prototype,X=L["__core-js_shared__"],Z=function(){var e=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=K.toString,Q=Y.hasOwnProperty,ee=Y.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=j?L.Buffer:void 0,re=L.Symbol,oe=L.Uint8Array,ie=W(Object.getPrototypeOf,Object),ae=Object.create,se=Y.propertyIsEnumerable,ue=q.splice,le=Object.getOwnPropertySymbols,ce=ne?ne.isBuffer:void 0,de=W(Object.keys,Object),fe=Re(L,"DataView"),pe=Re(L,"Map"),he=Re(L,"Promise"),ge=Re(L,"Set"),ve=Re(L,"WeakMap"),me=Re(Object,"create"),ye=$e(fe),be=$e(pe),Ee=$e(he),Ce=$e(ge),De=$e(ve),we=re?re.prototype:void 0,Ae=we?we.valueOf:void 0;function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){this.__data__=new xe(e)}function Be(e,t){var n=Ve(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&We(e)}(e)&&Q.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!Q.call(e,a)||i&&("length"==a||He(a,r))||n.push(a);return n}function Te(e,t,n){var r=e[t];Q.call(e,t)&&Ue(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function ke(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function Fe(e,t,n,r,f,m,y){var k;if(r&&(k=m?r(e,f,m,y):r(e)),void 0!==k)return k;if(!Ke(e))return e;var F=Ve(e);if(F){if(k=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Q.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,k)}else{var P=je(e),_=P==s||P==u;if(Ge(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(P==d||P==o||_&&!m){if(U(e))return m?e:{};if(k=function(e){return"function"!=typeof e.constructor||ze(e)?{}:Ke(t=ie(e))?ae(t):{};var t}(_?{}:e),!t)return function(e,t){return _e(e,Me(e),t)}(e,function(e,t){return e&&_e(t,Ye(t),e)}(k,e))}else{if(!I[P])return m?e:{};k=function(e,t,n,r){var o=e.constructor;switch(t){case b:return Pe(e);case i:case a:return new o(+e);case E:return function(e,t){var n=t?Pe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case C:case D:case w:case A:case S:case x:case O:case N:case B:return function(e,t){var n=t?Pe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case l:return function(e,t,n){var r=t?n(V(e),!0):V(e);return $(r,H,new e.constructor)}(e,r,n);case c:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,T.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(G(e),!0):G(e);return $(r,z,new e.constructor)}(e,r,n);case v:return function(e){return Ae?Object(Ae.call(e)):{}}(e)}}(e,P,Fe,t)}}y||(y=new Ne);var L=y.get(e);if(L)return L;if(y.set(e,k),!F)var R=n?function(e){return function(e,t,n){var r=t(e);return Ve(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ye,Me)}(e):Ye(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(R||e,function(o,i){R&&(o=e[i=o]),Te(k,i,Fe(o,t,n,r,i,e,y))}),k}function Ie(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(qe(e)||U(e)?te:k).test($e(e));var t}function Pe(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function _e(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o];Te(n,a,e[a])}return n}function Le(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Re(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ie(n)?n:void 0}Se.prototype.clear=function(){this.__data__=me?me(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return Q.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0||(n==t.length-1?t.pop():ue.call(t,n,1),0))},xe.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return ke(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Oe.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||xe),string:new Se}},Oe.prototype.delete=function(e){return Le(this,e).delete(e)},Oe.prototype.get=function(e){return Le(this,e).get(e)},Oe.prototype.has=function(e){return Le(this,e).has(e)},Oe.prototype.set=function(e,t){return Le(this,e).set(e,t),this},Ne.prototype.clear=function(){this.__data__=new xe},Ne.prototype.delete=function(e){return this.__data__.delete(e)},Ne.prototype.get=function(e){return this.__data__.get(e)},Ne.prototype.has=function(e){return this.__data__.has(e)},Ne.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Oe(r)}return n.set(e,t),this};var Me=le?W(le,Object):function(){return[]},je=function(e){return ee.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||F.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function $e(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(fe&&je(new fe(new ArrayBuffer(1)))!=E||pe&&je(new pe)!=l||he&&je(he.resolve())!=f||ge&&je(new ge)!=h||ve&&je(new ve)!=m)&&(je=function(e){var t=ee.call(e),n=t==d?e.constructor:void 0,r=n?$e(n):void 0;if(r)switch(r){case ye:return E;case be:return l;case Ee:return f;case Ce:return h;case De:return m}return t});var Ve=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!qe(e)}var Ge=ce||function(){return!1};function qe(e){var t=Ke(e)?ee.call(e):"";return t==s||t==u}function Ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return We(e)?Be(e):function(e){if(!ze(e))return de(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Fe(e,!0,!0)}}(rv,rv.exports)),rv.exports),sv=b(av);var uv=function(){if(iv)return ov;iv=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var a,s,u=Object.prototype,l=u.hasOwnProperty,c=u.toString,d=u.propertyIsEnumerable,f=(a=Object.keys,s=Object,function(e){return a(s(e))});function p(e,n){var r=b(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&E(e)}(e)&&l.call(e,"callee")&&(!d.call(e,"callee")||c.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!l.call(e,a)||i&&("length"==a||y(a,o))||r.push(a);return r}var h,g=(h=function(e,t){return e&&v(e,t,C)},function(e,t){if(null==e)return e;if(!E(e))return h(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),v=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function m(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||u,t!==r)return f(e);var t,n,r,o=[];for(var i in Object(e))l.call(e,i)&&"constructor"!=i&&o.push(i);return o}function y(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<n}var b=Array.isArray;function E(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==n||t==r}(t)}function C(e){return E(e)?p(e):m(e)}function D(e){return e}return ov=function(e,t){return(b(e)?i:g)(e,"function"==typeof t?t:D)}}(),lv=b(uv),cv={};var dv="created",fv="destroyed",pv="change",hv="scroll",gv="fullscreen",vv="unFullScreen",mv={};function yv(e,t){var n=e.key,r=e.factory,o=e.config,i=Yg(Yg({},o),t||{});if(null!=mv[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));mv[n]=r,function(e,t){null!=t&&(cv[e]=t)}(n,i)}var bv=new WeakMap,Ev=new WeakMap,Cv=new WeakMap,Dv=new WeakMap,wv=new WeakMap,Av=new WeakMap,Sv=new WeakMap,xv=new WeakMap,Ov=new WeakMap,Nv=new WeakMap,Bv=new WeakMap,Tv=new WeakMap,kv=new WeakMap,Fv=new WeakMap,Iv=new WeakMap,Pv=new WeakMap,_v=new WeakMap,Lv=new WeakMap,Rv=new WeakMap,Mv=new WeakMap,jv=new WeakMap,Hv=new WeakMap,zv=new WeakMap,$v=new WeakMap,Uv=new WeakMap,Vv=new WeakMap,Wv=new WeakMap,Gv=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in mv)e.push(t);return e},t.getConfig=function(){var e=Nv.get(t);if(null==e)throw new Error("Can not get editor config");return e},t.getMenuConfig=function(e){var n=t.getConfig().MENU_CONF;return(void 0===n?{}:n)[e]||{}},t.alert=function(e,n){void 0===n&&(n="info");var r=t.getConfig().customAlert;r&&r(e,n)},t},qv=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function Kv(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function Yv(e={},t={}){Object.keys(t).forEach(n=>{void 0===e[n]?e[n]=t[n]:Kv(t[n])&&Kv(e[n])&&Object.keys(t[n]).length>0&&Yv(e[n],t[n])})}const Xv={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Zv(){const e="undefined"!=typeof document?document:{};return Yv(e,Xv),e}const Jv={document:Xv,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function Qv(){const e="undefined"!=typeof window?window:{};return Yv(e,Jv),e}class em extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function tm(e=[]){const t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...tm(e)):t.push(e)}),t}function nm(e,t){return Array.prototype.filter.call(e,t)}function rm(e){return e.toLowerCase().replace(/-(.)/g,(e,t)=>t.toUpperCase())}function om(e,t){const n=Qv(),r=Zv();let o=[];if(!t&&e instanceof em)return e;if(!e)return new em(o);if("string"==typeof e){const n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){let e="div";0===n.indexOf("<li")&&(e="ul"),0===n.indexOf("<tr")&&(e="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(e="tr"),0===n.indexOf("<tbody")&&(e="table"),0===n.indexOf("<option")&&(e="select");const t=r.createElement(e);t.innerHTML=n;for(let e=0;e<t.childNodes.length;e+=1)o.push(t.childNodes[e])}else o=function(e,t){if("string"!=typeof e)return[e];const n=[],r=t.querySelectorAll(e);for(let e=0;e<r.length;e+=1)n.push(r[e]);return n}(e.trim(),t||r)}else if(e.nodeType||e===n||e===r)o.push(e);else if(Array.isArray(e)){if(e instanceof em)return e;o=e}return new em(function(e){const t=[];for(let n=0;n<e.length;n+=1)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(o))}function im(...e){const t=tm(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.add(...t)}),this}function am(...e){const t=tm(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.remove(...t)}),this}function sm(...e){const t=tm(e.map(e=>e.split(" ")));return nm(this,e=>t.filter(t=>e.classList.contains(t)).length>0).length>0}function um(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(e,t);else for(const t in e)this[n][t]=e[t],this[n].setAttribute(t,e[t]);return this}function lm(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function cm(e,t){let n;if(void 0===t){if(n=this[0],!n)return;if(n.dom7ElementDataStorage&&e in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[e];const t=n.getAttribute(`data-${e}`);return t||void 0}for(let r=0;r<this.length;r+=1)n=this[r],n.dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[e]=t;return this}function dm(){const e=this[0];if(!e)return;const t={};if(e.dataset)for(const n in e.dataset)t[n]=e.dataset[n];else for(let n=0;n<e.attributes.length;n+=1){const r=e.attributes[n];r.name.indexOf("data-")>=0&&(t[rm(r.name.split("data-")[1])]=r.value)}for(const e in t)"false"===t[e]?t[e]=!1:"true"===t[e]?t[e]=!0:parseFloat(t[e])===1*t[e]&&(t[e]*=1);return t}function fm(e){if(void 0===e){const e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){const t=[];for(let n=0;n<e.selectedOptions.length;n+=1)t.push(e.selectedOptions[n].value);return t}return e.value}for(let t=0;t<this.length;t+=1){const n=this[t];if(Array.isArray(e)&&n.multiple&&"select"===n.nodeName.toLowerCase())for(let t=0;t<n.options.length;t+=1)n.options[t].selected=e.indexOf(n.options[t].value)>=0;else n.value=e}return this}function pm(...e){let[t,n,r,o]=e;function i(e){const t=e.target;if(!t)return;const o=e.target.dom7EventData||[];if(o.indexOf(e)<0&&o.unshift(e),om(t).is(n))r.apply(t,o);else{const e=om(t).parents();for(let t=0;t<e.length;t+=1)om(e[t]).is(n)&&r.apply(e[t],o)}}function a(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),r.apply(this,t)}"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const s=t.split(" ");let u;for(let e=0;e<this.length;e+=1){const t=this[e];if(n)for(u=0;u<s.length;u+=1){const e=s[u];t.dom7LiveListeners||(t.dom7LiveListeners={}),t.dom7LiveListeners[e]||(t.dom7LiveListeners[e]=[]),t.dom7LiveListeners[e].push({listener:r,proxyListener:i}),t.addEventListener(e,i,o)}else for(u=0;u<s.length;u+=1){const e=s[u];t.dom7Listeners||(t.dom7Listeners={}),t.dom7Listeners[e]||(t.dom7Listeners[e]=[]),t.dom7Listeners[e].push({listener:r,proxyListener:a}),t.addEventListener(e,a,o)}}return this}function hm(...e){let[t,n,r,o]=e;"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const i=t.split(" ");for(let e=0;e<i.length;e+=1){const t=i[e];for(let e=0;e<this.length;e+=1){const i=this[e];let a;if(!n&&i.dom7Listeners?a=i.dom7Listeners[t]:n&&i.dom7LiveListeners&&(a=i.dom7LiveListeners[t]),a&&a.length)for(let e=a.length-1;e>=0;e-=1){const n=a[e];r&&n.listener===r||r&&n.listener&&n.listener.dom7proxy&&n.listener.dom7proxy===r?(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1)):r||(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1))}}}return this}function gm(){const e=Qv();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function vm(){const e=Qv();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function mm(){if(this.length>0){const e=Qv(),t=Zv(),n=this[0],r=n.getBoundingClientRect(),o=t.body,i=n.clientTop||o.clientTop||0,a=n.clientLeft||o.clientLeft||0,s=n===e?e.scrollY:n.scrollTop,u=n===e?e.scrollX:n.scrollLeft;return{top:r.top+s-i,left:r.left+u-a}}return null}function ym(){for(let e=0;e<this.length;e+=1)this[e].style.display="none";return this}function bm(){const e=Qv();for(let t=0;t<this.length;t+=1){const n=this[t];"none"===n.style.display&&(n.style.display=""),"none"===e.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this}function Em(e,t){const n=Qv();let r;if(1===arguments.length){if("string"!=typeof e){for(r=0;r<this.length;r+=1)for(const t in e)this[r].style[t]=e[t];return this}if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(r=0;r<this.length;r+=1)this[r].style[e]=t;return this}return this}function Cm(e){return e?(this.forEach((t,n)=>{e.apply(t,[t,n])}),this):this}function Dm(e){return om(nm(this,e))}function wm(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function Am(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this}function Sm(e){const t=Qv(),n=Zv(),r=this[0];let o,i;if(!r||void 0===e)return!1;if("string"==typeof e){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(o=om(e),i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}if(e===n)return r===n;if(e===t)return r===t;if(e.nodeType||e instanceof em){for(o=e.nodeType?[e]:e,i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}return!1}function xm(...e){let t;const n=Zv();for(let r=0;r<e.length;r+=1){t=e[r];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const r=n.createElement("div");for(r.innerHTML=t;r.firstChild;)this[e].appendChild(r.firstChild)}else if(t instanceof em)for(let n=0;n<t.length;n+=1)this[e].appendChild(t[n]);else this[e].appendChild(t)}return this}function Om(e){const t=Zv();let n,r;for(n=0;n<this.length;n+=1)if("string"==typeof e){const o=t.createElement("div");for(o.innerHTML=e,r=o.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(o.childNodes[r],this[n].childNodes[0])}else if(e instanceof em)for(r=0;r<e.length;r+=1)this[n].insertBefore(e[r],this[n].childNodes[0]);else this[n].insertBefore(e,this[n].childNodes[0]);return this}function Nm(e){const t=[];for(let n=0;n<this.length;n+=1)null!==this[n].parentNode&&(e?om(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return om(t)}function Bm(e){const t=[];for(let n=0;n<this.length;n+=1){let r=this[n].parentNode;for(;r;)e?om(r).is(e)&&t.push(r):t.push(r),r=r.parentNode}return om(t)}function Tm(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].querySelectorAll(e);for(let e=0;e<r.length;e+=1)t.push(r[e])}return om(t)}function km(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].children;for(let n=0;n<r.length;n+=1)e&&!om(r[n]).is(e)||t.push(r[n])}return om(t)}function Fm(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function Im(){for(let e=0;e<this.length;e+=1){const t=this[e];if(1===t.nodeType){for(let e=0;e<t.childNodes.length;e+=1)t.childNodes[e].parentNode&&t.childNodes[e].parentNode.removeChild(t.childNodes[e]);t.textContent=""}}return this}om.fn=em.prototype;const Pm="resize scroll".split(" ");function _m(e){return function(...t){if(void 0===t[0]){for(let t=0;t<this.length;t+=1)Pm.indexOf(e)<0&&(e in this[t]?this[t][e]():om(this[t]).trigger(e));return this}return this.on(e,...t)}}const Lm=_m("click"),Rm=_m("focus"),Mm=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let jm=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function Hm(e){Promise.resolve().then(e)}var zm,$m=function(e){return Object.prototype.toString.call(e)};Em&&(om.fn.css=Em),xm&&(om.fn.append=xm),im&&(om.fn.addClass=im),am&&(om.fn.removeClass=am),sm&&(om.fn.hasClass=sm),pm&&(om.fn.on=pm),Rm&&(om.fn.focus=Rm),um&&(om.fn.attr=um),lm&&(om.fn.removeAttr=lm),ym&&(om.fn.hide=ym),bm&&(om.fn.show=bm),mm&&(om.fn.offset=mm),gm&&(om.fn.width=gm),vm&&(om.fn.height=vm),Nm&&(om.fn.parent=Nm),Bm&&(om.fn.parents=Bm),Sm&&(om.fn.is=Sm),dm&&(om.fn.dataset=dm),fm&&(om.fn.val=fm),Am&&(om.fn.text=Am),wm&&(om.fn.html=wm),km&&(om.fn.children=km),Fm&&(om.fn.remove=Fm),Tm&&(om.fn.find=Tm),Cm&&(om.fn.each=Cm),Im&&(om.fn.empty=Im),function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(zm||(zm={}));var Um=/\[object HTML([A-Z][a-z]*)*Element\]/,Vm=function(e){return Um.test($m(e))},Wm=function(e){return null!=e&&"number"==typeof e.nodeType},Gm=function(e){return Wm(e)&&e.nodeType===zm.COMMENT_NODE},qm=function(e){return Wm(e)&&e.nodeType===zm.ELEMENT_NODE},Km=function(e){return"[object Selection]"===$m(e)},Ym=function(e){return Wm(e)&&e.nodeType===zm.TEXT_NODE},Xm=function(e){var t,n,r;return null!==(t=window&&window.document.getElementById(e))&&void 0!==t?t:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},Zm=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(Gm(o)||qm(o)&&0===o.childNodes.length||qm(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=t-1,n="backward"):i<0?(s=!0,i=t+1,n="forward"):(o=r[i],t=i,i+="forward"===n?1:-1);return[o,t]},Jm=function(e,t,n){return Qg(Zm(e,t,n),1)[0]},Qm=function(e){var t,n,r="";if(Ym(e)&&e.nodeValue)return e.nodeValue;if(qm(e)){try{for(var o=Jg(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Qm(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}var s=getComputedStyle(e).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==e.tagName||(r+="\n")}return r};function ey(e,t){if(!Vm(e)||"true"!==e.dataset.slateVoid)for(var n=e.childNodes,r=n.length;r-=1;){var o=n[r],i=o.nodeType;Ym(o)?t(o,e):[zm.ELEMENT_NODE,zm.DOCUMENT_NODE,zm.DOCUMENT_FRAGMENT_NODE].includes(i)&&ey(o,t)}}function ty(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==zm.ELEMENT_NODE?"":t.tagName.toLowerCase()}var ny=new RegExp(String.fromCharCode(160),"g");function ry(e){return e.replace(ny," ")}var oy=["span","b","strong","i","em","s","strike","u","font","sub","sup"],iy=[];var ay=[];var sy={};function uy(e,t){var n=e.length;if(n){var r=e[n-1];if(Cg.isText(r)){var o=Object.keys(r);if(1===o.length&&"text"===o[0])return r.text+=t,!0}}return!1}function ly(e,t,n){return{type:"paragraph",children:[{text:om(e).text().replace(/\s+/gm," ")}]}}function cy(e,t){var n=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach(function(e){if(qm(e)){if("BR"===e.nodeName)return void(uy(n,"\n")||n.push({text:"\n"}));var r=fy(om(e),t);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}else if(Ym(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=ry(o),uy(n,o)||n.push({text:o}))}}),n)}(e,t),r=function(e){for(var t in sy)if(e[0].matches(t))return sy[t];return ly}(e),o=r(e[0],n,t);return Array.isArray(o)||(o=[o]),o.forEach(function(r){Kh.isVoid(t,r)||(0===n.length&&(r.children=[{text:e.text().replace(/\s+/gm," ")}]),ay.forEach(function(n){r=n(e[0],r,t)}))}),o}function dy(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,"\n"));var n=e[0].textContent||"";n=function(e){return e.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}(n);var r={text:n=ry(n)};return ay.forEach(function(n){r=n(e[0],r,t)}),r}function fy(e,t){iy.forEach(function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=om(r(e[0])))});var n=ty(e);if("span"===n){if(e.attr("data-w-e-type"))return cy(e,t);if(e[0].childNodes.length>1){var r=e[0].childNodes,o=function(e,t){var n={text:""};return ay.forEach(function(r){n=r(e[0],n,t)}),n}(om(e[0]),t);return Array.from(r).flatMap(function(e){var n=function(e,t,n){var r=e[0];if(qm(r)){var o=fy(e,n);return Array.isArray(o)?o.map(function(e){return Yg(Yg({},t),e)}):[Yg(Yg({},t),o)]}if(Gm(r))return null;var i=Ym(r)?{text:r.textContent||""}:dy(e,n);return[Yg(Yg({},t),i)]}(om(e),o,t);return n||[]})}return dy(e,t)}if("code"===n)return"pre"===ty(e.parent())?cy(e,t):dy(e,t);if(oy.includes(n)){if(e[0].childNodes.length>0&&3!==e[0].childNodes[0].nodeType){r=e[0].childNodes;return Yg(Yg({},fy(om(r[0]),t)),dy(e,t))}return dy(e,t)}return cy(e,t)}function py(e,t,n){var r=om(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(fv,function(){r.removeAttr(t)}),!1)}function hy(e,t){void 0===t&&(t="");var n=[];""===t&&(t="<p><br></p>"),0!==t.indexOf("<")&&(t=t.split(/\n/).map(function(e){return"<p>".concat(e,"</p>")}).join(""));var r=om("<div>".concat(t,"</div>"));return Array.from(r.children()).forEach(function(t){var r=fy(om(t),e);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}),n}function gy(e,t){return"w-e-element-".concat(e,"-").concat(t)}var vy=[];var my,yy,by={};function Ey(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function Cy(e,t){var n=e.type,r=void 0===n?"":n,o=e.children,i=void 0===o?[]:o,a=Kh.isVoid(t,e),s="";a||(s=i.map(function(e){return Py(e,t)}).join(""));var u=function(e){return by[e]||Ey}(r),l=u(e,s,t),c="";if(c="string"==typeof l?l:l.html||"",a||vy.forEach(function(t){return c=t(e,c)}),"string"==typeof l)return c;var d=l.prefix,f=void 0===d?"":d,p=l.suffix,h=void 0===p?"":p;return f&&(c=f+c),h&&(c+=h),c}var Dy=function(){if(yy)return my;yy=1;var e=9007199254740991,t="[object Arguments]",n="[object Map]",r="[object Promise]",o="[object Set]",i="[object WeakMap]",a="[object DataView]",s=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,l="\\ud800-\\udfff",c="\\u0300-\\u036f\\ufe20-\\ufe23",d="\\u20d0-\\u20f0",f="\\ufe0e\\ufe0f",p="["+l+"]",h="["+c+d+"]",g="\\ud83c[\\udffb-\\udfff]",v="[^"+l+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",b="[\\ud800-\\udbff][\\udc00-\\udfff]",E="\\u200d",C="(?:"+h+"|"+g+")"+"?",D="["+f+"]?",w=D+C+("(?:"+E+"(?:"+[v,m,b].join("|")+")"+D+C+")*"),A="(?:"+[v+h+"?",h,m,b,p].join("|")+")",S=RegExp(g+"(?="+g+")|"+A+w,"g"),x=RegExp("["+E+l+c+d+f+"]"),O="object"==typeof y&&y&&y.Object===Object&&y,N="object"==typeof self&&self&&self.Object===Object&&self,B=O||N||Function("return this")();function T(e,t){return function(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,function(t){return e[t]})}function k(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function F(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function I(e){return function(e){return x.test(e)}(e)?function(e){return e.match(S)||[]}(e):function(e){return e.split("")}(e)}var P,_,L=Function.prototype,R=Object.prototype,M=B["__core-js_shared__"],j=function(){var e=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),H=L.toString,z=R.hasOwnProperty,$=R.toString,U=RegExp("^"+H.call(z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=B.Symbol,W=V?V.iterator:void 0,G=R.propertyIsEnumerable,q=(P=Object.keys,_=Object,function(e){return P(_(e))}),K=se(B,"DataView"),Y=se(B,"Map"),X=se(B,"Promise"),Z=se(B,"Set"),J=se(B,"WeakMap"),Q=ce(K),ee=ce(Y),te=ce(X),ne=ce(Z),re=ce(J);function oe(e,n){var r=de(e)||function(e){return function(e){return ge(e)&&fe(e)}(e)&&z.call(e,"callee")&&(!G.call(e,"callee")||$.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!z.call(e,a)||i&&("length"==a||le(a,o))||r.push(a);return r}function ie(e){if(!he(e)||function(e){return!!j&&j in e}(e))return!1;var t=pe(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?U:s;return t.test(ce(e))}function ae(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||R,t!==r)return q(e);var t,n,r,o=[];for(var i in Object(e))z.call(e,i)&&"constructor"!=i&&o.push(i);return o}function se(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ie(n)?n:void 0}var ue=function(e){return $.call(e)};function le(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||u.test(t))&&t>-1&&t%1==0&&t<n}function ce(e){if(null!=e){try{return H.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(K&&ue(new K(new ArrayBuffer(1)))!=a||Y&&ue(new Y)!=n||X&&ue(X.resolve())!=r||Z&&ue(new Z)!=o||J&&ue(new J)!=i)&&(ue=function(e){var t=$.call(e),s="[object Object]"==t?e.constructor:void 0,u=s?ce(s):void 0;if(u)switch(u){case Q:return a;case ee:return n;case te:return r;case ne:return o;case re:return i}return t});var de=Array.isArray;function fe(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!pe(t)}function pe(e){var t=he(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function he(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ge(e){return!!e&&"object"==typeof e}function ve(e){return e?T(e,function(e){return fe(e)?oe(e):ae(e)}(e)):[]}return my=function(e){if(!e)return[];if(fe(e))return function(e){return"string"==typeof e||!de(e)&&ge(e)&&"[object String]"==$.call(e)}(e)?I(e):function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e);if(W&&e[W])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[W]());var t=ue(e);return(t==n?k:t==o?F:ve)(e)},my}(),wy=b(Dy),Ay=0,Sy=function(){this.id="".concat(Ay++)},xy="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Oy="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Ny="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),By="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Ty="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),ky="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),Fy=!Ty&&!By&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,Iy={getWindow:function(e){var t=zv.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var n=Hv.get(t);return n||(n=new Sy,Hv.set(t,n)),n},setNewKey:function(e){var t=new Sy;Hv.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var o=_v.get(r);if(null==o){if(Kh.isEditor(r))return n;break}var i=Pv.get(r);if(null==i)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(t)))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=Iy.toDOMNode(e,e),n=t.getRootNode();return"[object HTMLDocument]"!==$m(n)&&!function(e){return"[object ShadowRoot]"===$m(e)}(n)||null==Reflect.get(n,"getSelection")?t.ownerDocument:n},getParentNode:function(e,t){return _v.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=Iy.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,t){var n=[Iy.findPath(e,t)[0]];return eg.get(e,n)},toDOMNode:function(e,t){var n;if(Kh.isEditor(t))n=Lv.get(e);else{var r=Iy.findKey(e,t);n=Mv.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(t)));return n},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=Iy.toDOMNode(e,e);try{r=qm(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,o=fg.isBackward(t),i=Iy.toDOMPoint(e,n),a=fg.isCollapsed(t)?i:Iy.toDOMPoint(e,r),s=Iy.getWindow(e).document.createRange(),u=Qg(o?a:i,2),l=u[0],c=u[1],d=Qg(o?i:a,2),f=d[0],p=d[1],h=!!(qm(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!(qm(f)?f:f.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,h?1:c),s.setEnd(f,g?1:p),s},toDOMPoint:function(e,t){var n,r,o,i=Qg(Kh.node(e,t.path),1)[0],a=Iy.toDOMNode(e,i);Kh.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var l=Jg(s),c=l.next();!c.done;c=l.next()){var d=c.value,f=d.childNodes[0];if(null!=f&&null!=f.textContent){var p=f.textContent.length,h=d.getAttribute("data-slate-length"),g=u+(null==h?p:parseInt(h,10));if(t.offset<=g){o=[f,Math.min(p,Math.max(0,t.offset-u))];break}u=g}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(t)));return o},toSlateNode:function(e,t){var n=qm(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Rv.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,o=t.target;if(null==n||null==r)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i,a=Iy.toSlateNode(e,t.target),s=Iy.findPath(e,a);if(Kh.isVoid(e,a)){var u=o.getBoundingClientRect(),l=e.isInline(a)?n-u.left<u.left+u.width-n:r-u.top<u.top+u.height-r,c=Kh.point(e,s,{edge:l?"start":"end"}),d=l?Kh.before(e,c):Kh.after(e,c);if(d)return Kh.range(e,d)}var f=this.getWindow(e).document;if(f.caretRangeFromPoint)i=f.caretRangeFromPoint(n,r);else{var p=f.caretPositionFromPoint(n,r);p&&((i=f.createRange()).setStart(p.offsetNode,p.offset),i.setEnd(p.offsetNode,p.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));return Iy.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,n){var r,o,i,a,s,u=n.exactMatch,l=n.suppressThrow;if((Km(t)?t.anchorNode:t.startContainer)&&(Km(t)?(r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=ky&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=t.collapsed)),null==r||null==i||null==o||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=Iy.toSlatePoint(e,[r,o],{exactMatch:u,suppressThrow:l});if(!c)return null;var d=s?c:Iy.toSlatePoint(e,[i,a],{exactMatch:u,suppressThrow:l});if(!d)return null;var f={anchor:c,focus:d};return fg.isExpanded(f)&&fg.isForward(f)&&qm(i)&&Kh.void(e,{at:f.focus,mode:"highest"})&&(f=Kh.unhangRange(e,f,{voids:!0})),f},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,a=Qg(o?t:function(e){var t,n=Qg(e,2),r=n[0],o=n[1];if(qm(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=Qg(Zm(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;qm(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=Jm(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]}(t),2),s=a[0],u=a[1],l=s.parentNode,c=null,d=0;if(l){var f=l.closest('[data-slate-void="true"]'),p=l.closest("[data-slate-leaf]"),h=null,g=Iy.getWindow(e);if(p&&g.document.createRange){c=p.closest('[data-slate-node="text"]');var v=g.document.createRange();v.setStart(c,0),v.setEnd(s,u);var m=v.cloneContents();ev(ev([],Qg(wy(m.querySelectorAll("[data-slate-zero-width]"))),!1),Qg(wy(m.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(e){e.parentNode.removeChild(e)}),d=m.textContent.length,h=c}else f&&((p=f.querySelector("[data-slate-leaf]"))?(c=p.closest('[data-slate-node="text"]'),d=(h=p).textContent.length,h.querySelectorAll("[data-slate-zero-width]").forEach(function(e){d-=e.textContent.length})):d=1);h&&d===h.textContent.length&&(l.hasAttribute("data-slate-zero-width")||Oy&&(null===(r=h.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(d-=1)}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var y=Iy.toSlateNode(e,c);return{path:Iy.findPath(e,y),offset:d}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return Kh.hasPath(e,n.path)&&Kh.hasPath(e,r.path)},getNodeType:function(e){return $h.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(e){return eg.string(e)}).join("")},getSelectedElems:function(e){var t,n,r=[],o=Kh.nodes(e,{universal:!0});try{for(var i=Jg(o),a=i.next();!a.done;a=i.next()){var s=Qg(a.value,1)[0];$h.isElement(s)&&r.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=Qg(Kh.nodes(e,{match:function(e){return n.checkNodeType(e,t)},universal:!0}),1),o=r[0];return null==o?null:o[0]},getSelectedTextNode:function(e){var t=Qg(Kh.nodes(e,{match:function(e){return Cg.isText(e)},universal:!0}),1),n=t[0];return null==n?null:n[0]},isNodeSelected:function(e,t){var n=Qg(Kh.nodes(e,{match:function(e){return e===t},universal:!0}),1),r=n[0];return null!=r&&Qg(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(Kh.isEnd(e,n.anchor,t)||Kh.isEnd(e,n.focus,t))},getTextarea:function(e){var t=bv.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return Dv.get(e)||null},getHoverbar:function(e){return Av.get(e)||null},normalizeContent:function(e){e.children.forEach(function(t,n){e.normalizeNode([t,[n]])})},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-e.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var t,n,r,o,i=Iy.getTextarea(e).$textArea,a=null==i?void 0:i[0].childNodes;if(a)try{for(var s=Jg(Array.from(a)),u=s.next();!u.done;u=s.next()){var l=u.value;if(!Ym(l))break;l.remove()}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}var c=Kh.nodes(e,{match:function(t){return!(!$h.isElement(t)||e.isInline(t))},universal:!0});try{for(var d=Jg(c),f=d.next();!f.done;f=d.next()){var p=f.value;if(null!=p){var h=p[0];ey(Iy.toDOMNode(e,h),function(e,t){var n=om(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)})}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,n,r=Kh.nodes(e,{match:function(t){return e.isVoid(t)}}),o=0;try{for(var i=Jg(r),a=i.next();!a.done;a=i.next()){a.value&&(o+=1)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(fg.isExpanded(t))return!1;var n=Iy.getSelectedNodeByType(e,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(e,t){var n=Kh.node(e,t);if(null==n)return!1;var r=Qg(n,1)[0].children;if(1===r.length&&""===r[0].text)return!0;return!1}};function Py(e,t){return $h.isElement(e)?Cy(e,t):function(e,t){var n=e.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=n;r=function(e){return e.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=Iy.getParentsNodes(t,e).some(function(e){return"pre"===Iy.getNodeType(e)});if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=Iy.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return vy.forEach(function(t){return r=t(e,r)}),r}(e,t)}var _y=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},Ly=function(e,t,n){var r=Iy.toDOMRange(e,t).getBoundingClientRect(),o=Iy.toDOMRange(e,n).getBoundingClientRect();return _y(r,o)&&_y(o,r)},Ry=function(e,t){var n,r,o=[];try{for(var i=Jg(Kh.levels(e,{at:t})),a=i.next();!a.done;a=i.next()){var s=Qg(a.value,2),u=s[0],l=s[1],c=Iy.findKey(e,u);o.push([l,c])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o};function My(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):jg.insertNodes(e,t,{mode:"highest"})}var jy,Hy,zy,$y,Uy,Vy,Wy,Gy,qy,Ky,Yy,Xy,Zy,Jy,Qy,eb,tb,nb,rb,ob,ib,ab,sb,ub,lb,cb,db,fb,pb,hb,gb,vb,mb,yb,bb,Eb,Cb,Db,wb,Ab,Sb=function(e){var t=e,n=t.onChange,r=t.insertText,o=t.apply,i=t.deleteBackward;return t.insertText=function(e){t.getConfig().readOnly||r(e)},t.apply=function(e){var n,r,i,a,s,u,l,c,d=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":case"split_node":d.push.apply(d,ev([],Qg(Ry(t,e.path)),!1));break;case"insert_node":case"remove_node":d.push.apply(d,ev([],Qg(Ry(t,og.parent(e.path))),!1));break;case"merge_node":var f=og.previous(e.path);d.push.apply(d,ev([],Qg(Ry(t,f)),!1));break;case"move_node":var p=og.common(og.parent(e.path),og.parent(e.newPath));d.push.apply(d,ev([],Qg(Ry(t,p)),!1));break;case"set_selection":(null===(a=null===(i=e.newProperties)||void 0===i?void 0:i.focus)||void 0===a?void 0:a.path)&&(d.push.apply(d,ev([],Qg(Ry(t,null===(u=null===(s=e.newProperties)||void 0===s?void 0:s.focus)||void 0===u?void 0:u.path)),!1)),d.push.apply(d,ev([],Qg(Ry(t,null===(c=null===(l=e.properties)||void 0===l?void 0:l.focus)||void 0===c?void 0:c.path)),!1)))}o(e);try{for(var h=Jg(d),g=h.next();!g.done;g=h.next()){var v=Qg(g.value,2),m=v[0],y=v[1],b=Qg(Kh.node(t,m),1)[0];Hv.set(b,y),"type"in b&&(Fv.has(b)&&Fv.delete(b),Iv.has(b)&&Iv.delete(b))}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}},t.deleteBackward=function(n){if("line"!==n)return i(n);if(e.selection&&fg.isCollapsed(e.selection)){var r=Kh.above(e,{match:function(t){return Kh.isBlock(e,t)},at:e.selection});if(r){var o=Qg(r,2)[1],a=Kh.range(e,o,e.selection.anchor),s=function(e,t){var n=Kh.range(e,fg.end(t)),r=Array.from(Kh.positions(e,{at:t})),o=0,i=r.length,a=Math.floor(i/2);if(Ly(e,Kh.range(e,r[o]),n))return Kh.range(e,r[o],n);if(r.length<2)return Kh.range(e,r[r.length-1],n);for(;a!==r.length&&a!==o;)Ly(e,Kh.range(e,r[a]),n)?i=a:o=a,a=Math.floor((o+i)/2);return Kh.range(e,r[i],n)}(t,a);fg.isCollapsed(s)||jg.delete(e,{at:s})}}},t.onChange=function(){var e=t.selection;null!=e&&Uv.set(t,e),t.emit("change"),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children,n=void 0===e?[]:e,r=t.getConfig().skipCacheTypes,o=void 0===r?["list-item"]:r;return n.map(function(e){var n=Iy.getNodeType(e);if(o.includes(n))return Py(e,t);var r=Iv.get(e);if(r)return r;var i=Py(e,t);return Iv.set(e,i),i}).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map(function(e){return eg.string(e)}).join("\n")},t.getSelectionText=function(){var n=t.selection;return null==n?"":Kh.string(e,n)},t.getElemsByType=function(e,n){var r,o;void 0===n&&(n=!1);var i=[],a=Kh.nodes(t,{at:[],universal:!0});try{for(var s=Jg(a),u=s.next();!u.done;u=s.next()){var l=Qg(u.value,1)[0];if($h.isElement(l))if(n?l.type.indexOf(e)>=0:l.type===e){var c=Iy.findKey(t,l),d=gy(l.type,c.id);i.push(Yg(Yg({},l),{id:d}))}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=void 0===e?[]:e;if(n.length>1)return!1;var r=n[0];if(null==r)return!0;if(!$h.isElement(r)||"paragraph"!==r.type)return!1;var o=r.children,i=void 0===o?[]:o;if(i.length>1)return!1;var a=i[0];return null==a||Cg.isText(a)&&""===a.text},t.clear=function(){jg.delete(t,{at:{anchor:Kh.start(t,[]),focus:Kh.end(t,[])}}),0===t.children.length&&jg.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return Iy.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e){var r=document.createElement("div");r.innerHTML=e;var o=Array.from(r.childNodes);if(o=o.filter(function(e){var t=e.nodeName;return!!Ym(e)||!!qm(e)&&!qv.has(t.toLowerCase())}),0!==o.length){var i=t.selection;if(null!=i){var a=null;if(Iy.isSelectedEmptyParagraph(t)&&!n)a=[i.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var s=0;o.forEach(function(e,n){var r=e.nodeName,i=e.textContent,a=void 0===i?"":i;if(Ym(e)){if(!a||!a.trim())return;t.insertNode({text:a})}else if("BR"!==r){var u=e,l=!1;if(oy.includes(r.toLowerCase()))l=!0;else for(var c in sy)if(u.matches(c)){l=!0;break}if(l){var d=fy(om(u),t);return Array.isArray(d)?(d.forEach(function(e){return My(t,e)}),s+=1):(My(t,d),s+=1),void(Iy.isSelectedVoidNode(t)&&t.move(1))}var f=window.getComputedStyle(u).display;if(!Iy.isSelectedEmptyParagraph(t)&&f.indexOf("inline")<0){if(n>=1)(function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")})(o[n-1])&&t.insertBreak();t.insertBreak()}t.dangerouslyInsertHtml(u.innerHTML,!0)}else t.insertText("\n")}),s&&a&&Iy.isEmptyPath(t,a)&&jg.removeNodes(t,{at:a}),r.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var n=t.isDisabled(),r=t.isFocused(),o=JSON.stringify(t.selection);t.enable(),t.focus(),t.clear();var i=hy(t,null==e?"":e);if(jg.insertFragment(t,i),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(o))}catch(e){t.select(Kh.start(t,[]))}},t},xb=1,Ob=function(e){var t=e;return t.id="wangEditor-".concat(xb++),t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(Iy.toDOMNode(t,t).focus({preventScroll:!0}),$v.set(t,!0),e){var n=Kh.end(t,[]);jg.select(t,n)}else{var r=Uv.get(t);r?jg.select(t,r):jg.select(t,Kh.start(t,[]))}},t.isFocused=function(){return!!$v.get(t)},t.blur=function(){Iy.toDOMNode(t,t).blur(),jg.deselect(t),$v.set(t,!1)},t.updateView=function(){Iy.getTextarea(t).changeViewState();var e=Iy.getToolbar(t);e&&e.changeToolbarState();var n=Iy.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=Iy.getTextarea(t);e.destroy(),bv.delete(t),Ev.delete(e);var n=Iy.getToolbar(t);n&&(n.destroy(),Dv.delete(t),Cv.delete(n));var r=Iy.getHoverbar(t);r&&(r.destroy(),Av.delete(t),wv.delete(r)),t.isDestroyed=!0,t.emit("destroyed")}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return n+="\nYou has disabled editor scroll, please do this yourself",void console.warn(n)}var r=om("#".concat(e));if(0!==r.length){var o=r[0];if(!Iy.hasDOMNode(t,o)){n="Element (found by id is '".concat(e,"') is not in editor DOM");return n+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(n,o)}var i=Iy.getTextarea(t),a=i.$textAreaContainer,s=i.$scroll,u=r.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||Iy.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=xv.get(t);null!=e&&e.forEach(function(e){return e.hide()})},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return Iy.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=Iy.getToolbar(t);n&&(e=n.$box);var r=Iy.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),t.isFullScreen=!0,t.emit("fullScreen")}},t.unFullScreen=function(){if(t.isFullScreen){var e=Iy.getTextarea(t).$box.parent();setTimeout(function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit("unFullScreen")},200)}},t.getEditableContainer=function(){return Iy.getTextarea(t).$textAreaContainer[0]},t},Nb={exports:{}},Bb={exports:{}};function Tb(){if(Hy)return jy;Hy=1;return jy=function(e){return null!=e}}function kb(){if(Vy)return Uy;Vy=1;var e=function(){if($y)return zy;$y=1;var e=Tb(),t={object:!0,function:!0,undefined:!0};return zy=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return Uy=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function Fb(){if(Ky)return qy;Ky=1;var e=function(){if(Gy)return Wy;Gy=1;var e=kb();return Wy=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(e){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,n=Function.prototype.toString;return qy=function(r){return!!e(r)&&!t.test(n.call(r))}}function Ib(){if(nb)return tb;nb=1;var e=(eb?Qy:(eb=1,Qy=function(){}))();return tb=function(t){return t!==e&&null!==t},tb}function Pb(){return ab||(ab=1,ib=(Jy?Zy:(Jy=1,Zy=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(ob)return rb;ob=1;var e=Ib(),t=Object.keys;return rb=function(n){return t(e(n)?Object(n):n)}}()),ib}function _b(){if(cb)return lb;cb=1;var e=Pb(),t=function(){if(ub)return sb;ub=1;var e=Ib();return sb=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return lb=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(t(r)),s=function(e){try{r[e]=o[e]}catch(e){i||(i=e)}},a=1;a<u;++a)e(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},lb}function Lb(){return fb?db:(fb=1,db=(Xy||(Xy=1,Yy=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}),Yy)()?Object.assign:_b())}function Rb(){return Eb||(Eb=1,bb=function(){if(vb)return gb;vb=1;var e="razdwatrzy";return gb=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(yb)return mb;yb=1;var e=String.prototype.indexOf;return mb=function(t){return e.call(this,t,arguments[1])>-1},mb}()),bb}function Mb(){if(Cb)return Bb.exports;Cb=1;var e=Tb(),t=Fb(),n=Lb(),r=function(){if(hb)return pb;hb=1;var e=Ib(),t=Array.prototype.forEach,n=Object.create;return pb=function(r){var o=n(null);return t.call(arguments,function(t){e(t)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(t),o)}),o},pb}(),o=Rb(),i=Bb.exports=function(t,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof t?(l=i,i=t,t=null):l=arguments[2],e(t)?(a=o.call(t,"c"),s=o.call(t,"e"),u=o.call(t,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,d;return"string"!=typeof i?(c=s,s=a,a=i,i=null):c=arguments[3],e(a)?t(a)?e(s)?t(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,e(i)?(u=o.call(i,"c"),l=o.call(i,"e")):(u=!0,l=!1),d={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),d):d},Bb.exports}var jb=(Ab||(Ab=1,function(e,t){var n,r,o,i,a,s,u,l=Mb(),c=(wb||(wb=1,Db=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),Db),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,h=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=p(null),h(this,"__ee__",m),m.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},r=function(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),d.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e,t){var n,r,o,i;if(c(t),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},i=function(e){var t,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)d.call(r,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];d.call(o,this,i)}},a={on:n,once:r,off:o,emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?p(u):g(Object(e),s)},t.methods=a}(Nb,Nb.exports)),Nb.exports),Hb=b(jb);function zb(e){var t=Vv.get(e);return null==t&&(t=Hb(),Vv.set(e,t)),t}var $b=new WeakMap;function Ub(e,t){var n=$b.get(e);null==n&&(n=new Set,$b.set(e,n)),n.add(t)}var Vb=function(e){var t=e;return t.on=function(e,n){var r=zb(t);if(r.on(e,n),"destroyed"===e&&Ub(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),Ub(t,o)}},t.once=function(e,n){zb(t).once(e,n)},t.off=function(e,n){zb(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=zb(t);if(o.emit.apply(o,ev([e],Qg(n),!1)),"destroyed"===e){var i=function(e){return $b.get(e)||new Set}(t);i.forEach(function(e){return o.off("destroyed",e)}),function(e){$b.set(e,new Set)}(t)}},t},Wb=function(e){var t=e;return t.setFragmentData=function(e){var n=t.selection;if(n){var r=Qg(fg.edges(n),2),o=r[0],i=r[1],a=Kh.void(t,{at:o.path}),s=Kh.void(t,{at:i.path});if(!fg.isCollapsed(n)||a){var u=Iy.toDOMRange(t,n),l=u.cloneContents(),c=l.childNodes[0];if(l.childNodes.forEach(function(e){e.textContent&&""!==e.textContent.trim()&&(c=e)}),s){var d=Qg(s,1)[0],f=u.cloneRange(),p=Iy.toDOMNode(t,d);f.setEndAfter(p),l=f.cloneContents()}if(a&&(c=l.querySelector("[data-slate-spacer]")),Array.from(l.querySelectorAll("[data-slate-zero-width]")).forEach(function(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""}),Ym(c)){var h=c.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(c),l.appendChild(h),c=h}var g=t.getFragment(),v=JSON.stringify(g),m=window.btoa(encodeURIComponent(v));c.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var y=l.ownerDocument.createElement("div");return y.appendChild(l),y.setAttribute("hidden","true"),l.ownerDocument.body.appendChild(y),e.setData("text/html",y.innerHTML),e.setData("text/plain",Qm(y)),l.ownerDocument.body.removeChild(y),e}}},t.insertData=function(e){var n,r,o=e.getData("application/x-slate-fragment");if(o){var i=decodeURIComponent(window.atob(o)),a=JSON.parse(i);t.insertFragment(a)}else{var s=e.getData("text/plain"),u=e.getData("text/html");if(u)t.dangerouslyInsertHtml(u);else if(s){var l=s.split(/\n\r|\r\n|\r|\n/),c=!1;try{for(var d=Jg(l),f=d.next();!f.done;f=d.next()){var p=f.value,h=Iy.getLeftLengthOfMaxLength(t);c&&h>0&&jg.splitNodes(t,{always:!0}),t.insertText(p),c=!0}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}}}},t},Gb=function(e){var t=e,n=t.insertText,r=t.insertNode,o=t.insertFragment,i=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=Iy.getLeftLengthOfMaxLength(t);r<=0||(r<e.length?n(e.slice(0,r)):n(e))}else n(e)},t.insertNode=function(e){if(t.getConfig().maxLength){var n=Iy.getLeftLengthOfMaxLength(t);if(!(n<=0))n<eg.string(e).length||r(e)}else r(e)},t.insertFragment=function(e){if(t.getConfig().maxLength){if(e.length>0){var n=e[0];if(Iy.getLeftLengthOfMaxLength(t)<eg.string(n).length)return;o([n]);for(var r=1;r<e.length;r+=1)t.insertNode(e[r])}}else o(e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e)if(t.getConfig().maxLength){var r=Iy.getLeftLengthOfMaxLength(t);if(!(r<=0)){var o=document.createElement("div");o.innerHTML=e,r<Array.from(o.childNodes).reduce(function(e,t){var n=t.nodeName;return t?Ym(t)?e+(t.textContent||""):qm(t)?qv.has(n.toLowerCase())?e:e+(t.textContent||""):e:e},"").length||i(e,n)}}else i(e,n)},t};function qb(e){var t=Iy.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function Kb(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=qb(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,u=Iy.toDOMRange(e,n).getClientRects(),l=u?u[0]:null;if(null==l)return t;var c={},d=l.top-o,f=l.left-i;if(f>a/2){var p=a-f;c.right="".concat(p+5,"px")}else c.left="".concat(f+5,"px");if(d>s/2){var h=s-d;c.bottom="".concat(h+5,"px")}else{var g=u[u.length-1],v=g.top-o+g.height;v<0&&(v=0),c.top="".concat(v+5,"px")}return c}function Yb(e,t,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==e.selection)return r;var o=$h.isElement(t)&&e.isVoid(t),i=$h.isElement(t)&&e.isInline(t),a=jv.get(t);if(null==a)return r;var s=a.getBoundingClientRect(),u=s.top,l=s.left,c=s.height,d=s.width;if(o){var f=function(e){var t=[];t.push(e);for(var n=0;t.length>0;){var r=t.pop();if(null==r)break;if((n+=1)>1e4)break;var o=r.nodeName;if(r.nodeType===zm.ELEMENT_NODE){var i=o.toLowerCase();if(Mm.includes(i)||"iframe"===i||"video"===i)return r;var a=r.children||[],s=a.length;if(s)for(var u=s-1;u>=0;u-=1)t.push(a[u])}}return null}(a);if(null!=f){var p=f.getBoundingClientRect();u=p.top,c=p.height}}var h=qb(e);if(null==h)return r;var g=h.top,v=h.left,m=h.width,y=h.height,b={},E=u-g,C=l-v;if("bar"===n)return b.left="".concat(C,"px"),E>40?b.bottom="".concat(y-E+5,"px"):b.top="".concat(E+c+5,"px"),b;if("modal"===n){if(o?i?C>(m-d)/2?b.right="".concat(m-C+5,"px"):b.left="".concat(C+d+5,"px"):b.left="20px":b.left="".concat(C,"px"),o)(D=E)<0&&(D=0),b.top="".concat(D,"px");else if(E>(y-c)/2)b.bottom="".concat(y-E+5,"px");else{var D;(D=E+c)<0&&(D=0),b.top="".concat(D+5,"px")}return b}throw new Error("type '".concat(n,"' is invalid"))}function Xb(e,t){Hm(function(){var n=qb(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=t.offset(),l=u.top,c=u.left,d=t.width(),f=t.height(),p=l-o,h=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=p+f-s)>0){var v=t.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),t.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=t.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=h+d-a)>0){var E=t.css("left"),C=parseInt(E.toString(),10)-r;C<0&&(C=0),t.css("left","".concat(C,"px"))}if(g.indexOf("right")>=0&&c<0){var D=t.css("right"),w=parseInt(D.toString(),10)-Math.abs(c);t.css("right","".concat(w,"px"))}}})}var Zb,Jb,Qb=function(e){var t=e;return t.select=function(e){jg.select(t,e)},t.deselect=function(){var n=t.selection,r=Iy.findDocumentOrShadowRoot(t).getSelection();r&&r.rangeCount>0&&r.removeAllRanges(),n&&jg.deselect(e)},t.move=function(t,n){void 0===n&&(n=!1),t&&(t<0||jg.move(e,{distance:t,unit:"character",reverse:n}))},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=Uv.get(t);null!=e&&(t.focus(),jg.select(t,e))},t.getSelectionPosition=function(){return Kb(t)},t.getNodePosition=function(e){return Yb(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var n=Qg(fg.edges(e),2),r=n[0],o=n[1],i=Qg(Kh.edges(t,[]),2),a=i[0],s=i[1];return!(!ug.equals(r,a)||!ug.equals(o,s))},t.selectAll=function(){var e=Kh.start(t,[]),n=Kh.end(t,[]);jg.select(t,{anchor:e,focus:n})},t};var eE=function(){if(Jb)return Zb;Jb=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,r=/^0o[0-7]+$/i,o=parseInt,i="object"==typeof y&&y&&y.Object===Object&&y,a="object"==typeof self&&self&&self.Object===Object&&self,s=i||a||Function("return this")(),u=Object.prototype.toString,l=Math.max,c=Math.min,d=function(){return s.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(i){if("number"==typeof i)return i;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(i))return NaN;if(f(i)){var a="function"==typeof i.valueOf?i.valueOf():i;i=f(a)?a+"":a}if("string"!=typeof i)return 0===i?i:+i;i=i.replace(e,"");var s=n.test(i);return s||r.test(i)?o(i.slice(2),s?2:8):t.test(i)?NaN:+i}return Zb=function(e,t,n){var r,o,i,a,s,u,h=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=o;return r=o=void 0,h=t,a=e.apply(i,n)}function b(e){var n=e-u;return void 0===u||n>=t||n<0||v&&e-h>=i}function E(){var e=d();if(b(e))return C(e);s=setTimeout(E,function(e){var n=t-(e-u);return v?c(n,i-(e-h)):n}(e))}function C(e){return s=void 0,m&&r?y(e):(r=o=void 0,a)}function D(){var e=d(),n=b(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return function(e){return h=e,s=setTimeout(E,t),g?y(e):a}(u);if(v)return s=setTimeout(E,t),y(u)}return void 0===s&&(s=setTimeout(E,t)),a}return t=p(t)||0,f(n)&&(g=!!n.leading,i=(v="maxWait"in n)?l(p(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),D.cancel=function(){void 0!==s&&clearTimeout(s),h=0,r=u=o=s=void 0},D.flush=function(){return void 0===s?a:C(d())},D},Zb}(),tE=b(eE);const nE=e=>"string"==typeof e,rE=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},oE=e=>null==e?"":""+e,iE=/###/g,aE=e=>e&&e.indexOf("###")>-1?e.replace(iE,"."):e,sE=e=>!e||nE(e),uE=(e,t,n)=>{const r=nE(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(sE(e))return{};const t=aE(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return sE(e)?{}:{obj:e,k:aE(r[o])}},lE=(e,t,n)=>{const{obj:r,k:o}=uE(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=uE(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=uE(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},cE=(e,t)=>{const{obj:n,k:r}=uE(e,t);if(n)return n[r]},dE=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?nE(e[r])||e[r]instanceof String||nE(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):dE(e[r],t[r],n):e[r]=t[r]);return e},fE=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var pE={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const hE=e=>nE(e)?e.replace(/[&<>"'\/]/g,e=>pE[e]):e;const gE=[" ",",","?","!",";"],vE=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),mE=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},yE=e=>e&&e.replace("_","-"),bE={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class EE{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||bE,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(nE(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new EE(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new EE(this.logger,e)}}var CE=new EE;class DE{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(t=>{let[r,o]=t;for(let t=0;t<o;t++)r.apply(r,[e,...n])})}}}class wE extends DE{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):nE(n)&&o?a.push(...n.split(o)):a.push(n)));const s=cE(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&nE(n)?mE(this.data&&this.data[e]&&this.data[e][t],n,o):s}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),lE(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)(nE(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=cE(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?dE(s,n,o):s={...s,...n},lE(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var AE={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))}),t}};const SE={};class xE extends DE{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=CE.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=gE.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=vE.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:nE(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:nE(o)?[o]:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);let d=c&&c.res;const f=c&&c.usedKey||i,p=c&&c.exactUsedKey||i,h=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,m=!nE(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(v&&d&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0)||nE(g)&&Array.isArray(d))if(v&&nE(g)&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&!nE(t.count),f=xE.hasDefaultValue(t),p=l?this.pluralResolver.getSuffix(u,t.count,t):"",h=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=v),this.isValidLookup(d)||(a=!0,d=i);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=f&&v!==d&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=f&&r!==d?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach(e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{r([e],i+n,t[`defaultValue${n}`]||v)})}):r(e,i,v))}d=this.extendTranslation(d,e,t,c,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?d:void 0):this.options.parseMissingKeyHandler(d))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(d),n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=d[e])}d=n}}return r?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=nE(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&!nE(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):i.translate(...r,t)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s=nE(a)?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=AE.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return nE(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&!nE(a.count),d=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&(nE(a.context)||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach(e=>{this.isValidLookup(t)||(i=e,!SE[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(SE[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(n=>{if(this.isValidLookup(t))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(r)&&i.push(u+e.replace(r,this.options.pluralSeparator)),d&&i.push(u+t)),f){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))}))})}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!nE(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const OE=e=>e.charAt(0).toUpperCase()+e.slice(1);class NE{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=CE.create("languageUtils")}getScriptPartFromCode(e){if(!(e=yE(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=yE(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(nE(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=OE(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=OE(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=OE(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),nE(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return nE(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):nE(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}let BE=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],TE={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const kE=["v1","v2","v3"],FE=["v4"],IE={zero:0,one:1,two:2,few:3,many:4,other:5};class PE{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=CE.create("pluralResolver"),this.options.compatibilityJSON&&!FE.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return BE.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:TE[t.fc]}})}),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const n=yE("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!e.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>IE[e]-IE[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!kE.includes(this.options.compatibilityJSON)}}const _E=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=cE(e,n);return void 0!==r?r:cE(t,n)})(e,t,n);return!i&&o&&nE(n)&&(i=mE(e,n,r),void 0===i&&(i=mE(t,n,r))),i},LE=e=>e.replace(/\$/g,"$$$$");class RE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=CE.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:hE,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?fE(o):i||"{{",this.suffix=a?fE(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?fE(d):f||fE("$t("),this.nestingSuffix=p?fE(p):h||fE(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const o=_E(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(_E(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,d=[{regex:this.regexpUnescape,safeValue:e=>LE(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?LE(this.escape(e)):LE(e)}];return d.forEach(t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const t=l(e,o,r);i=nE(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else nE(i)||this.useRawValueToEscape||(i=oE(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&!nE(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&!nE(r))return r;nE(r)||(r=oE(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=s.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const ME=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(yE(r),o),t[a]=s),s(n)}};class jE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=CE.create("formatter"),this.options=e,this.formats={number:ME((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:ME((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:ME((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:ME((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:ME((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=ME(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class HE extends DE{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=CE.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=uE(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();nE(e)&&(e=this.languageUtils.toResolveHierarchy(e)),nE(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(e,t,n,r,s):u(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const zE=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),nE(e[1])&&(t.defaultValue=e[1]),nE(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),$E=e=>(nE(e.ns)&&(e.ns=[e.ns]),nE(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),nE(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),UE=()=>{};class VE extends DE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=$E(e),this.services={},this.logger=CE,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(nE(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=zE();this.options={...r,...this.options,...$E(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?CE.init(o(this.modules.logger),this.options):CE.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=jE);const n=new NE(this.options);this.store=new wE(this.options.resources,this.options);const i=this.services;i.logger=CE,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new PE(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new RE(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new HE(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)}),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new xE(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=UE),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});const i=rE(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:UE;const n=nE(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>r(e))}this.options.preload&&this.options.preload.forEach(e=>r(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){const r=rE();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=UE),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&AE.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=rE();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=nE(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let c;return c=i.keyPrefix&&Array.isArray(e)?e.map(e=>`${i.keyPrefix}${l}${e}`):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(c,i)};return nE(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=rE();return this.options.ns?(nE(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=rE();nE(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new NE(zE());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new VE(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:UE;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new VE(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new wE(this.store.data,r),o.services.resourceStore=o.store),o.translator=new xE(o.services,r),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit(e,...n)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const WE=VE.createInstance();WE.createInstance=VE.createInstance,WE.createInstance,WE.dir,WE.init,WE.loadResources,WE.reloadResources,WE.use,WE.changeLanguage,WE.getFixedT,WE.t,WE.exists,WE.setDefaultNamespace,WE.hasLoadedNamespace,WE.loadNamespaces,WE.loadLanguages;var GE="translation";function qE(e,t){WE.addResourceBundle(e,GE,t,!0,!0)}function KE(e){WE.changeLanguage(e)}function YE(e){return WE.getResourceBundle(e,GE)}function XE(e){return WE.on("languageChanged",e),function(){return WE.off("languageChanged",e)}}WE.init({lng:"zh-CN",resources:{}});var ZE=WE.t.bind(WE);function JE(e){if(e.removeAttr){e.removeAttr("width"),e.removeAttr("height"),e.removeAttr("fill"),e.removeAttr("class"),e.removeAttr("t"),e.removeAttr("p-id");var t=e.children();t.length&&JE(t)}}function QE(){return om('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function eC(){return om('<div class="w-e-bar-divider"></div>')}function tC(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=xy?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(e.attr("data-tooltip",r),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var nC=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=om('<div class="w-e-bar-item"></div>'),this.$button=om('<button type="button"></button>'),this.disabled=!1,this.menu=t;var o=t.tag,i=t.width;if("button"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'button'"));var a=t.title,s=t.hotkey,u=void 0===s?"":s,l=t.iconSvg,c=void 0===l?"":l,d=this.$button;if(c){var f=om(c);JE(f),d.append(f)}else d.text(a);tC(d,c,a,u,n),n&&c&&d.append(om('<span class="title">'.concat(a,"</span>"))),i&&d.css("width","".concat(i,"px")),d.attr("data-menu-key",e),this.$elem.append(d),Hm(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(t){t.preventDefault(),vC(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())})},e.prototype.exec=function(){var e=vC(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=vC(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=vC(this),t=this.$button,n=this.menu.isDisabled(e);(null==e.selection||e.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?t.addClass(r):t.removeClass(r),this.disabled=n},e.prototype.setIcon=function(){var e=vC(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=om(n);JE(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=vC(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&tC(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),rC=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return Kg(t,e),t.prototype.onButtonClick=function(){},t}(nC),oC=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=xv.get(e);null==t&&(t=new Set,xv.set(e,t)),t.add(this),Ov.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var n=this.genSelfElem();n&&t.append(n)},e.prototype.appendTo=function(e){var t=this.$elem;e.append(t)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=Ov.get(this);e&&e.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=Ov.get(this);e&&e.emit("modalOrPanelHide")}},e}(),iC=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=om('<div class="w-e-drop-panel"></div>'),n}return Kg(t,e),t.prototype.genSelfElem=function(){return null},t}(oC),aC=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=QE();o.$button.append(i)}return o}return Kg(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var e=this.menu;if(null!=e.getPanelContentElem){var t=vC(this);if(null==this.dropPanel){var n=new iC(t),r=e.getPanelContentElem(t);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=e.getPanelContentElem(t);o.renderContent(r),o.show()}}var i=this.dropPanel;if(i.isShow){var a=this.$elem,s=a.offset().left,u=a.parents(".w-e-bar");s-u.offset().left>=u.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},t}(nC),sC=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=om('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var o=r.$elem;return o.on("click",function(e){return e.stopPropagation()}),o.on("keyup",function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())}),r}return Kg(t,e),t.prototype.genSelfElem=function(){var e=this,t=om('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),n=Ov.get(this);return t.on("click",function(){e.hide(),null==n||n.restoreSelection()}),t},t.prototype.setStyle=function(e){var t=this.width,n=this.$elem;n.attr("style",""),t&&n.css("width","".concat(t,"px")),n.css(e)},t}(oC);function uC(e,t,n){var r=om('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=om('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function lC(e,t,n){var r=om('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=om('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]}function cC(e,t){var n=om('<div class="button-container"></div>'),r=om('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return n.append(r),[n[0],r[0]]}var dC=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;return o.$body=om("body"),o.modal=null,o.menu=n,o}return Kg(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=vC(this),t=this.menu.getModalPositionNode(e);return $h.isElement(t)?Yb(e,t,"modal"):Kb(e)},t.prototype.handleModal=function(){var e=vC(this),t=this.menu;if(null==this.modal){var n=new sC(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},t.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var n=vC(this),r=this.menu;if(null!=r.getModalContentElem){var o=Iy.getTextarea(n),i=Iy.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(e.renderContent(s),a)e.setStyle({left:"0",right:"0"});else{var u=this.getPosition();e.setStyle(u)}t&&(a?e.appendTo(this.$body):e.appendTo(o.$textAreaContainer)),e.show(),a||Xb(n,e.$elem),setTimeout(function(){n.blur()})}},t}(nC);var fC=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=om('<div class="w-e-select-list"></div>'),n&&r.$elem.css("width","".concat(n,"px")),r.$elem.on("click",function(e){e.stopPropagation()}),r}return Kg(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=om("<ul></ul>");e.forEach(function(e){var t=e.value,r=e.text,o=e.selected,i=e.styleForRenderMenuList,a=om('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var s=om('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');a.append(s),a.addClass("selected")}a.append(om('<span data-value="'.concat(t,'">').concat(r,"</span>"))),a.attr("title",r),n.append(a)}),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(oC);var pC=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=om('<div class="w-e-bar-item"></div>'),this.$button=om('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var o=t.tag,i=t.title,a=t.width,s=t.iconSvg,u=void 0===s?"":s,l=t.hotkey,c=void 0===l?"":l;if("select"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'select'"));var d=this.$button;a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",e),tC(d,u,i,c,n),this.$elem.append(d),this.menu=t,Hm(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",function(t){t.preventDefault(),vC(e).hidePanelOrModal(),e.trigger()})},e.prototype.trigger=function(){var e=this,t=vC(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new fC(t,n.selectPanelWidth);var r=this.selectList,o=n.getOptions(t);r.renderList(o),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",function(t){var n=t.target;if(null!=n){t.preventDefault();var r=om(n).attr("data-value");e.onChange(r)}})}else{if((r=this.selectList).isShow)r.hide();else{o=n.getOptions(t);r.renderList(o),r.show()}}}},e.prototype.onChange=function(e){var t=vC(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=vC(this),t=this.menu,n=t.getValue(e),r=function(e,t){for(var n=e.length,r="",o=0;o<n;o++){var i=e[o];if(i.value===t){r=i.text;break}}return r}(t.getOptions(e),n.toString()),o=this.$button,i=QE();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=vC(this),t=this.menu.isDisabled(e),n=this.$button;(null==e.selection||e.isDisabled())&&(t=!0);var r="disabled";t?n.addClass(r):n.removeClass(r),this.disabled=t},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),hC=function(){function e(e){this.$elem=om('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=om('<div class="w-e-bar-item-menus-container"></div>'),this.$button=om('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,o=this.$elem,i=this.$button;if(n){var a=om(n);JE(a),i.append(a)}else i.text(r);i.attr("data-menu-key",t);var s=QE();i.append(s),o.append(i);var u=this.$container;o.append(u);var l=this.createObserver();this.observe(l)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver(function(){var o=t.find("button"),i=o.length;if(0!==i){var a=0;o.each(function(e){om(e).hasClass("disabled")&&a++}),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}});return r},e}(),gC=new WeakMap;function vC(e){var t=Sv.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function mC(e,t,n){void 0===n&&(n=!1);var r=gC.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new aC(e,t,n):a?new dC(e,t,n):new rC(e,t,n)}if("select"===o&&(r=new pC(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return gC.set(t,r),r}function yC(e,t){var n=e.selection;return null!=n&&(!fg.isCollapsed(n)&&(!Iy.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)})&&!!Cg.isText(t)))}var bC,EC,CC=function(){function e(){var e=this;this.$elem=om('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.lngListen=function(){},this.changeHoverbarState=tE(function(){var t=e.isShow,n=e.getSelectedNodeAndMenuKeys()||{},r=n.node,o=void 0===r?null:r,i=n.menuKeys,a=void 0===i?[]:i,s=e.getEditorInstance();if(null!=o&&e.changeItemsState(),o&&$h.isElement(o)&&t){var u=e.isSamePath(o,e.prevSelectedNode);if(!Kh.isBlock(s,o)&&u)return}e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o},200),Hm(function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),Iy.getTextarea(t).$textAreaContainer.append(n),t.on(pv,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(hv,r),t.on(gv,r),t.on(vv,r)}),this.lngListen=XE(function(){e.menus={},e.hideAndClean(),e.getEditorInstance().deselect()})}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var e=this.$elem;e.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],e.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var e=this.$elem,t=!1,n="undefined"!=typeof window?window.innerHeight:null;n&&n>=360&&(n-e[0].getBoundingClientRect().bottom<360&&(t=!0));t?e.addClass("w-e-bar-bottom"):e.removeClass("w-e-bar-bottom")},e.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},e.prototype.changeItemsState=function(){var e=this;Hm(function(){e.hoverbarItems.forEach(function(e){e.changeMenuState()})})},e.prototype.registerItems=function(e){var t=this,n=this.$elem;e.forEach(function(e){if("|"!==e)t.registerSingleItem(e);else{var r=eC();n.append(r)}})},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=mv[e];if(null==o)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));r=o(),n[e]=r}var i=t.getMenuConfig(e);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=mC(e,r);this.hoverbarItems.push(a),Sv.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),$h.isElement(e)){var r=Yb(t,e,"bar");return n.css(r),void Xb(t,n)}if(Cg.isText(e)){r=Kb(t);return n.css(r),void Xb(t,n)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(null==e.selection)return null;var t=this.getHoverbarKeysConf(),n=null,r=[],o=function(o){var i=t[o],a=i.match,s=i.menuKeys,u=void 0===s?[]:s,l=a||function(e,t){return Iy.checkNodeType(t,o)},c=Qg(Kh.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),d=c[0];if(null!=d)return n=d[0],r=u,"break"};for(var i in t){if("break"===o(i))break}return null==n||0===r.length?null:{node:n,menuKeys:r}},e.prototype.getEditorInstance=function(){var e=wv.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.getHoverbarKeysConf=function(){var e=this.getEditorInstance().getConfig().hoverbarKeys,t=void 0===e?{}:e,n=t.text;return n&&null==n.match&&(n.match=yC),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var n=Iy.findPath(null,e),r=Iy.findPath(null,t);return og.equals(n,r)},e.prototype.destroy=function(){var e;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function DC(){if(EC)return bC;EC=1;var e="Expected a function",t=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,i=parseInt,a="object"==typeof y&&y&&y.Object===Object&&y,s="object"==typeof self&&self&&self.Object===Object&&self,u=a||s||Function("return this")(),l=Object.prototype.toString,c=Math.max,d=Math.min,f=function(){return u.Date.now()};function p(t,n,r){var o,i,a,s,u,l,p=0,v=!1,m=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var n=o,r=i;return o=i=void 0,p=e,s=t.apply(r,n)}function E(e){var t=e-l;return void 0===l||t>=n||t<0||m&&e-p>=a}function C(){var e=f();if(E(e))return D(e);u=setTimeout(C,function(e){var t=n-(e-l);return m?d(t,a-(e-p)):t}(e))}function D(e){return u=void 0,y&&o?b(e):(o=i=void 0,s)}function w(){var e=f(),t=E(e);if(o=arguments,i=this,l=e,t){if(void 0===u)return function(e){return p=e,u=setTimeout(C,n),v?b(e):s}(l);if(m)return u=setTimeout(C,n),b(l)}return void 0===u&&(u=setTimeout(C,n)),s}return n=g(n)||0,h(r)&&(v=!!r.leading,a=(m="maxWait"in r)?c(g(r.maxWait)||0,n):a,y="trailing"in r?!!r.trailing:y),w.cancel=function(){void 0!==u&&clearTimeout(u),p=0,o=l=i=u=void 0},w.flush=function(){return void 0===u?s:D(f())},w}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(h(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=h(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var s=r.test(e);return s||o.test(e)?i(e.slice(2),s?2:8):n.test(e)?NaN:+e}return bC=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(e);return h(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),p(t,n,{leading:o,maxWait:n,trailing:i})}}var wC=b(DC());function AC(e,t){return Wm(t)&&Iy.hasDOMNode(e,t,{editable:!0})}function SC(e,t){if(e.getConfig().readOnly)return!1;var n=xC(e,t)&&Iy.toSlateNode(e,t);return Kh.isVoid(e,n)}function xC(e,t){return Wm(t)&&Iy.hasDOMNode(e,t)}const OC=e=>"object"==typeof e&&null!=e&&1===e.nodeType,NC=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,BC=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return NC(n.overflowY,t)||NC(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},TC=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,kC=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},FC=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,d="function"==typeof l?l:e=>e!==l;if(!OC(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;OC(h)&&d(h);){if(h=kC(h),h===f){p.push(h);break}null!=h&&h===document.body&&BC(h)&&!BC(document.documentElement)||null!=h&&BC(h,c)&&p.push(h)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:E,top:C,right:D,bottom:w,left:A}=e.getBoundingClientRect(),{top:S,right:x,bottom:O,left:N}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let B="start"===s||"nearest"===s?C-S:"end"===s?w+O:C+b/2-S+O,T="center"===u?A+E/2-N+x:"end"===u?D+x:A-N;const k=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&C>=0&&A>=0&&w<=v&&D<=g&&(t===f&&!BC(t)||C>=o&&w<=l&&A>=c&&D<=i))return k;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),S=parseInt(d.borderTopWidth,10),x=parseInt(d.borderRightWidth,10),O=parseInt(d.borderBottomWidth,10);let N=0,F=0;const I="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-x:0,P="offsetHeight"in t?t.offsetHeight-t.clientHeight-S-O:0,_="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,L="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)N="start"===s?B:"end"===s?B-v:"nearest"===s?TC(y,y+v,v,S,O,y+B,y+B+b,b):B-v/2,F="start"===u?T:"center"===u?T-g/2:"end"===u?T-g:TC(m,m+g,g,h,x,m+T,m+T+E,E),N=Math.max(0,N+y),F=Math.max(0,F+m);else{N="start"===s?B-o-S:"end"===s?B-l+O+P:"nearest"===s?TC(o,l,n,S,O+P,B,B+b,b):B-(o+n/2)+P/2,F="start"===u?T-c-h:"center"===u?T-(c+r/2)+I/2:"end"===u?T-i+x+I:TC(c,i,r,h,x+I,T,T+E,E);const{scrollLeft:e,scrollTop:a}=t;N=0===L?0:Math.max(0,Math.min(a+N/L,t.scrollHeight-n/L+P)),F=0===_?0:Math.max(0,Math.min(e+F/_,t.scrollWidth-r/_+I)),B+=a-N,T+=e-F}k.push({el:t,top:N,left:F})}return k};function IC(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(FC(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of FC(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}function PC(e,t,n){void 0===n&&(n=!1);var r=t.selection,o=t.getConfig(),i=Iy.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||n)&&t.isFocused()){var a="None"!==i.type;if(r||a){var s=Lv.get(t),u=!1;if(s.contains(i.anchorNode)&&s.contains(i.focusNode)&&(u=!0),a&&u&&r){var l=Iy.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(l&&fg.equals(l,r)){var c=!0;if(fg.isCollapsed(r)){var d=i.anchorNode,f=i.anchorOffset;if(d===s){var p=s.childNodes,h=void 0;(h=p[f])&&h.matches("table")&&(c=!1),(h=p[f-1])&&h.matches("table")&&(c=!1)}}if(c)return}}if(!r||Iy.hasRange(t,r)){e.isUpdatingSelection=!0;var g=r&&Iy.toDOMRange(t,r);if(g){fg.isBackward(r)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")&&g.getBoundingClientRect){v.getBoundingClientRect=g.getBoundingClientRect.bind(g);var m=document.body;IC(v,{scrollMode:"if-needed",boundary:o.scroll?s.parentElement:m,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else i.removeAllRanges();setTimeout(function(){g&&Oy&&s.focus(),e.isUpdatingSelection=!1})}else t.selection=Iy.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var _C=new WeakMap,LC=new WeakMap;var RC,MC={};var jC=function(){if(RC)return MC;RC=1,Object.defineProperty(MC,"__esModule",{value:!0});for(var e="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},n={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},r={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)r["f"+o]=111+o;function i(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(e){return a(e,t)}),o=function(e){return r.some(function(t){return s(t,e)})};return null==n?o:o(n)}function a(e,o){var i=o&&o.byKey,a={},s=(e=e.replace("++","+add")).split("+"),c=s.length;for(var d in t)a[t[d]]=!1;var f=!0,p=!1,h=void 0;try{for(var g,v=s[Symbol.iterator]();!(f=(g=v.next()).done);f=!0){var m=g.value,y=m.endsWith("?")&&m.length>1;y&&(m=m.slice(0,-1));var b=l(m),E=t[b];if(m.length>1&&!E&&!n[m]&&!r[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==c&&E||(i?a.key=b:a.which=u(m)),E&&(a[E]=!y||null)}}catch(e){p=!0,h=e}finally{try{!f&&v.return&&v.return()}finally{if(p)throw h}}return a}function s(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function u(e){return e=l(e),r[e]||e.toUpperCase().charCodeAt(0)}function l(e){return e=e.toLowerCase(),e=n[e]||e}return MC.default=i,MC.isHotkey=i,MC.isCodeHotkey=function(e,t){return i(e,t)},MC.isKeyHotkey=function(e,t){return i(e,{byKey:!0},t)},MC.parseHotkey=a,MC.compareHotkey=s,MC.toKeyCode=u,MC.toKeyName=l,MC}(),HC={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},zC={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},$C={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},UC=function(e){var t=HC[e],n=zC[e],r=$C[e],o=t&&jC.isKeyHotkey(t),i=n&&jC.isKeyHotkey(n),a=r&&jC.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(xy&&i&&i(e))||!(xy||!a||!a(e)))}},VC={isBold:UC("bold"),isCompose:UC("compose"),isMoveBackward:UC("moveBackward"),isMoveForward:UC("moveForward"),isDeleteBackward:UC("deleteBackward"),isDeleteForward:UC("deleteForward"),isDeleteLineBackward:UC("deleteLineBackward"),isDeleteLineForward:UC("deleteLineForward"),isDeleteWordBackward:UC("deleteWordBackward"),isDeleteWordForward:UC("deleteWordForward"),isExtendBackward:UC("extendBackward"),isExtendForward:UC("extendForward"),isExtendLineBackward:UC("extendLineBackward"),isExtendLineForward:UC("extendLineForward"),isItalic:UC("italic"),isMoveLineBackward:UC("moveLineBackward"),isMoveLineForward:UC("moveLineForward"),isMoveWordBackward:UC("moveWordBackward"),isMoveWordForward:UC("moveWordForward"),isRedo:UC("redo"),isSplitBlock:UC("splitBlock"),isTransposeCharacter:UC("transposeCharacter"),isUndo:UC("undo"),isTab:UC("tab"),isSelectAll:UC("selectAll")};function WC(e){e.preventDefault()}var GC={beforeinput:function(e,t,n){var r=e,o=n.getConfig().readOnly;if(Fy&&!o&&AC(n,r.target)){var i=n.selection,a=r.inputType,s=r.dataTransfer||r.data||void 0;if("insertCompositionText"!==a&&"deleteCompositionText"!==a){if(r.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var u=Qg(r.getTargetRanges(),1)[0];if(u){var l=Iy.toSlateRange(n,u,{exactMatch:!1,suppressThrow:!1});i&&fg.equals(i,l)||jg.select(n,l)}}if(i&&fg.isExpanded(i)){var c=Iy.getSelectedElems(n),d="table"===c[0].type,f="table-cell"!==c[c.length-1].type;if(d&&f)return;if(a.startsWith("delete")){var p=a.endsWith("Backward")?"backward":"forward";return void Kh.deleteFragment(n,{direction:p})}}switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":Kh.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":Kh.deleteForward(n);break;case"deleteContentBackward":Kh.deleteBackward(n);break;case"deleteEntireSoftLine":Kh.deleteBackward(n,{unit:"line"}),Kh.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":Kh.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":Kh.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":Kh.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":Kh.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":Kh.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":Kh.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":Kh.insertBreak(n);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===a&&!Wv.get(n))break;"[object DataTransfer]"===$m(s)?n.insertData(s):"string"==typeof s&&Kh.insertText(n,s)}}}},blur:function(e,t,n){var r=e,o=t.isUpdatingSelection,i=t.latestElement;if(!n.getConfig().readOnly&&!o&&AC(n,r.target)){var a=Iy.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var s=r.relatedTarget;if(!(s===Iy.toDOMNode(n,n)||qm(s)&&s.hasAttribute("data-slate-spacer"))){if(null!=s&&Wm(s)&&Iy.hasDOMNode(n,s)){var u=Iy.toSlateNode(n,s);if($h.isElement(u)&&!n.isVoid(u))return}if(Ny){var l=a.getSelection();null==l||l.removeAllRanges()}$v.delete(n)}}}},focus:function(e,t,n){var r=Iy.toDOMNode(n,n),o=Iy.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,Oy&&e.target!==r?r.focus():$v.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&xC(n,e.target)&&Wm(e.target)){var r=Iy.toSlateNode(n,e.target),o=Iy.findPath(n,r);if(Kh.hasPath(n,o))if(eg.get(n,o)===r){var i=Kh.start(n,o),a=Kh.end(n,o),s=Kh.void(n,{at:i}),u=Kh.void(n,{at:a});if(s&&u&&og.equals(s[1],u[1])){var l=Kh.range(n,i);jg.select(n,l)}}}},compositionstart:function(e,t,n){if(AC(n,e.target)){var r=n.selection;if(r&&fg.isExpanded(r)&&(Kh.deleteFragment(n),Promise.resolve().then(function(){PC(t,n,!0)})),n.selection){var o=Iy.toDOMRange(n,n.selection).startContainer,i=o.textContent||"";_C.set(n,i),LC.set(n,o)}t.isComposing=!0,function(e,t){var n;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}(t,n)}},compositionend:function(e,t,n){var r=e;if(AC(n,r.target)){t.isComposing=!1;var o=n.selection;if(null!=o){(ky||Oy)&&Iy.cleanExposedTexNodeInSelectionBlock(n);for(var i=fg.isBackward(o)?o.focus:o.anchor,a=Qg(Kh.node(n,[i.path[0]]),1)[0],s=0;s<i.path.length;s+=1){var u=Qg(Kh.node(n,i.path.slice(0,s+1)),1)[0];if($h.isElement(u)&&((Ny||Oy)&&"link"===u.type||"code"===u.type)){Iy.setNewKey(a);break}}var l=r.data;if(l){if(n.getConfig().maxLength){var c=Iy.getLeftLengthOfMaxLength(n);if(c<l.length){var d=Iy.toDOMRange(n,o);d.startContainer.nodeType===Node.TEXT_NODE&&(d.startContainer.textContent=_C.get(n)||""),c>0&&Kh.insertText(n,l.slice(0,c)),t.changeViewState()}else Kh.insertText(n,l)}else{var f=Iy.findDocumentOrShadowRoot(n).getSelection();f&&function(e,t){if(fg.isCollapsed(t)){var n=t.anchor,r=t.focus;if([2,3].includes(n.path.length)&&[2,3].includes(r.path.length)&&(0===n.offset||0===r.offset)){var o=Kh.node(e,n.path),i=0===n.offset?n.path:r.path,a=[i[0],i[1]-1];if(0===i[1])return!1;var s=Kh.node(e,a);if(Cg.isText(s[0])&&Cg.isText(o[0]))return!0}}}(n,o)&&(n.selection=Iy.toSlateRange(n,f,{exactMatch:!1,suppressThrow:!1})),Kh.insertText(n,l)}Ny||setTimeout(function(){var e=n.selection;if(null!=e){var t=LC.get(n);if(null!=t)Iy.toDOMRange(n,e).startContainer!==t&&(t.textContent=_C.get(n)||"")}})}}}},compositionupdate:function(e,t,n){AC(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&AC(n,r.target)){if(function(e,t){var n=Dv.get(e),r=n&&n.getMenus(),o=Av.get(e),i=o&&o.getMenus(),a=Yg(Yg({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&jC.isHotkey(l,t)&&!u.isDisabled(e)){var c=u.getValue(e);u.exec(e,c)}}}(n,r),VC.isTab(r))return WC(r),void n.handleTab();if(VC.isRedo(r))return WC(r),void("function"==typeof n.redo&&n.redo());if(VC.isUndo(r))return WC(r),void("function"==typeof n.undo&&n.undo());if(VC.isMoveLineBackward(r))return WC(r),void jg.move(n,{unit:"line",reverse:!0});if(VC.isMoveLineForward(r))return WC(r),void jg.move(n,{unit:"line"});if(VC.isExtendLineBackward(r))return WC(r),void jg.move(n,{unit:"line",edge:"focus",reverse:!0});if(VC.isExtendLineForward(r))return WC(r),void jg.move(n,{unit:"line",edge:"focus"});if(VC.isMoveBackward(r))return WC(r),void(o&&fg.isCollapsed(o)?jg.move(n,{reverse:!0}):jg.collapse(n,{edge:"start"}));if(VC.isMoveForward(r))return WC(r),void(o&&fg.isCollapsed(o)?jg.move(n):jg.collapse(n,{edge:"end"}));if(VC.isMoveWordBackward(r))return WC(r),o&&fg.isExpanded(o)&&jg.collapse(n,{edge:"focus"}),void jg.move(n,{unit:"word",reverse:!0});if(VC.isMoveWordForward(r))return WC(r),o&&fg.isExpanded(o)&&jg.collapse(n,{edge:"focus"}),void jg.move(n,{unit:"word"});if(VC.isSelectAll(r))return WC(r),void n.selectAll();if(Fy){if((ky||Ny)&&o&&(VC.isDeleteBackward(r)||VC.isDeleteForward(r))&&fg.isCollapsed(o)){var i=eg.parent(n,o.anchor.path);if($h.isElement(i)&&Kh.isVoid(n,i)&&Kh.isInline(n,i))return r.preventDefault(),void jg.delete(n,{unit:"block"})}}else{if(VC.isBold(r)||VC.isItalic(r)||VC.isTransposeCharacter(r))return void WC(r);if(VC.isSplitBlock(r))return WC(r),void Kh.insertBreak(n);if(VC.isDeleteBackward(r))return WC(r),void(o&&fg.isExpanded(o)?Kh.deleteFragment(n,{direction:"backward"}):Kh.deleteBackward(n));if(VC.isDeleteForward(r))return WC(r),void(o&&fg.isExpanded(o)?Kh.deleteFragment(n,{direction:"forward"}):Kh.deleteForward(n));if(VC.isDeleteLineBackward(r))return WC(r),void(o&&fg.isExpanded(o)?Kh.deleteFragment(n,{direction:"backward"}):Kh.deleteBackward(n,{unit:"line"}));if(VC.isDeleteLineForward(r))return WC(r),void(o&&fg.isExpanded(o)?Kh.deleteFragment(n,{direction:"forward"}):Kh.deleteForward(n,{unit:"line"}));if(VC.isDeleteWordBackward(r))return WC(r),void(o&&fg.isExpanded(o)?Kh.deleteFragment(n,{direction:"backward"}):Kh.deleteBackward(n,{unit:"word"}));if(VC.isDeleteWordForward(r))return WC(r),void(o&&fg.isExpanded(o)?Kh.deleteFragment(n,{direction:"forward"}):Kh.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!Fy&&!n.getConfig().readOnly&&AC(n,e.target)){e.preventDefault();var r=e.key;Kh.insertText(n,r)}},copy:function(e,t,n){var r=e;if(AC(n,r.target)){n.getConfig().readOnly||r.preventDefault();var o=r.clipboardData;if(null!=o){n.setFragmentData(o);var i=n.getConfig().customCopy;i&&i(n,r)}}},cut:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&(r.preventDefault(),AC(n,r.target))){var i=r.clipboardData;if(null!=i&&(n.setFragmentData(i),o))if(fg.isExpanded(o))Kh.deleteFragment(n);else{var a=eg.parent(n,o.anchor.path);Kh.isVoid(n,a)&&jg.delete(n)}}},paste:function(e,t,n){Wv.set(n,!0);var r=e;if(!n.getConfig().readOnly&&AC(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void Wv.set(n,!1);if(Ny||!Fy||function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length}(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,t,n){if(xC(n,e.target)){var r=Iy.toSlateNode(n,e.target);Kh.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(xC(n,r.target)&&!n.getConfig().readOnly){var o=Iy.toSlateNode(n,r.target),i=Iy.findPath(n,o);if(Kh.isVoid(n,o)||Kh.void(n,{at:i,voids:!0})){var a=Kh.range(n,i);jg.select(n,a)}var s=r.dataTransfer;if(null!=s)Iy.getSelectedNodeByType(n,"table")||(t.isDraggingInternally=!0,n.setFragmentData(s))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&xC(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,o=r.dataTransfer;if(!n.getConfig().readOnly&&xC(n,r.target)&&null!=o&&!(Fy&&Ny&&o.files.length>0)){r.preventDefault();var i=n.selection,a=Iy.findEventRange(n,r);jg.select(n,a),t.isDraggingInternally&&(i&&jg.delete(n,{at:i}),t.isDraggingInternally=!1),n.insertData(o),n.isFocused()||n.focus()}}};function qC(e){if(KC(e)){for(;e&&KC(e);){e=YC(e).parent}return null!=e?e:null}return e.parentNode}function KC(e){return 11===e.nodeType}function YC(e,t){var n,r,o;const i=e;return null!==(n=i.parent)&&void 0!==n||(i.parent=null!=t?t:null),null!==(r=i.firstChildNode)&&void 0!==r||(i.firstChildNode=e.firstChild),null!==(o=i.lastChildNode)&&void 0!==o||(i.lastChildNode=e.lastChild),i}const XC={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createDocumentFragment:function(){return YC(document.createDocumentFragment())},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){if(KC(e)){let t=e;for(;t&&KC(t);){t=YC(t).parent}e=null!=t?t:e}KC(t)&&(t=YC(t,e)),n&&KC(n)&&(n=YC(n).firstChildNode),e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){KC(t)&&(t=YC(t,e)),e.appendChild(t)},parentNode:qC,nextSibling:function(e){var t;if(KC(e)){const n=YC(e),r=qC(n);if(r&&n.lastChildNode){const e=Array.from(r.childNodes),o=e.indexOf(n.lastChildNode);return null!==(t=e[o+1])&&void 0!==t?t:null}return null}return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType},isDocumentFragment:KC};function ZC(e,t,n,r,o){return{sel:e,data:t,children:n,text:r,elm:o,key:void 0===t?void 0:t.key}}const JC=Array.isArray;function QC(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}function eD(e){return void 0===e}function tD(e){return void 0!==e}const nD=ZC("",{},[],void 0,void 0);function rD(e,t){var n,r;const o=e.key===t.key,i=(null===(n=e.data)||void 0===n?void 0:n.is)===(null===(r=t.data)||void 0===r?void 0:r.is),a=e.sel===t.sel,s=!(!e.sel&&e.sel===t.sel)||typeof e.text==typeof t.text;return a&&o&&i&&s}function oD(e,t,n){var r;const o={};for(let i=t;i<=n;++i){const t=null===(r=e[i])||void 0===r?void 0:r.key;void 0!==t&&(o[t]=i)}return o}const iD=["create","update","remove","destroy","pre","post"];function aD(e,t,n){const r={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},o=XC;for(const t of iD)for(const n of e){const e=n[t];void 0!==e&&r[t].push(e)}function i(e){const t=e.id?"#"+e.id:"",n=e.getAttribute("class"),r=n?"."+n.split(" ").join("."):"";return ZC(o.tagName(e).toLowerCase()+t+r,{},[],void 0,e)}function a(e){return ZC(void 0,{},[],void 0,e)}function s(e,t){return function(){if(0===--t){const t=o.parentNode(e);null!==t&&o.removeChild(t,e)}}}function u(e,t){var n,i;let a,s=e.data;if(void 0!==s){const t=null===(n=s.hook)||void 0===n?void 0:n.init;tD(t)&&(t(e),s=e.data)}const l=e.children,c=e.sel;if("!"===c)eD(e.text)&&(e.text=""),e.elm=o.createComment(e.text);else if(""===c)e.elm=o.createTextNode(e.text);else if(void 0!==c){const n=c.indexOf("#"),d=c.indexOf(".",n),f=n>0?n:c.length,p=d>0?d:c.length,h=-1!==n||-1!==d?c.slice(0,Math.min(f,p)):c,g=e.elm=tD(s)&&tD(a=s.ns)?o.createElementNS(a,h,s):o.createElement(h,s);for(f<p&&g.setAttribute("id",c.slice(f+1,p)),d>0&&g.setAttribute("class",c.slice(p+1).replace(/\./g," ")),a=0;a<r.create.length;++a)r.create[a](nD,e);if(!QC(e.text)||JC(l)&&0!==l.length||o.appendChild(g,o.createTextNode(e.text)),JC(l))for(a=0;a<l.length;++a){const e=l[a];null!=e&&o.appendChild(g,u(e,t))}const v=e.data.hook;tD(v)&&(null===(i=v.create)||void 0===i||i.call(v,nD,e),v.insert&&t.push(e))}else e.elm=o.createTextNode(e.text);return e.elm}function l(e,t,n,r,i,a){for(;r<=i;++r){const i=n[r];null!=i&&o.insertBefore(e,u(i,a),t)}}function c(e){var t,n;const o=e.data;if(void 0!==o){null===(n=null===(t=null==o?void 0:o.hook)||void 0===t?void 0:t.destroy)||void 0===n||n.call(t,e);for(let t=0;t<r.destroy.length;++t)r.destroy[t](e);if(void 0!==e.children)for(let t=0;t<e.children.length;++t){const n=e.children[t];null!=n&&"string"!=typeof n&&c(n)}}}function d(e,t,n,i){for(var a,u;n<=i;++n){let i,l;const f=t[n];if(null!=f)if(tD(f.sel)){c(f),i=r.remove.length+1,l=s(f.elm,i);for(let e=0;e<r.remove.length;++e)r.remove[e](f,l);const e=null===(u=null===(a=null==f?void 0:f.data)||void 0===a?void 0:a.hook)||void 0===u?void 0:u.remove;tD(e)?e(f,l):l()}else f.children?(c(f),d(e,f.children,0,f.children.length-1)):o.removeChild(e,f.elm)}}function f(e,t,n){var i,a,s,c,p,h,g,v;const m=null===(i=t.data)||void 0===i?void 0:i.hook;null===(a=null==m?void 0:m.prepatch)||void 0===a||a.call(m,e,t);const y=t.elm=e.elm;if(e===t)return;if(void 0!==t.data||tD(t.text)&&t.text!==e.text){null!==(s=t.data)&&void 0!==s||(t.data={}),null!==(c=e.data)&&void 0!==c||(e.data={});for(let n=0;n<r.update.length;++n)r.update[n](e,t);null===(g=null===(h=null===(p=t.data)||void 0===p?void 0:p.hook)||void 0===h?void 0:h.update)||void 0===g||g.call(h,e,t)}const b=e.children,E=t.children;eD(t.text)?tD(b)&&tD(E)?b!==E&&function(e,t,n,r){let i,a,s,c,p=0,h=0,g=t.length-1,v=t[0],m=t[g],y=n.length-1,b=n[0],E=n[y];for(;p<=g&&h<=y;)null==v?v=t[++p]:null==m?m=t[--g]:null==b?b=n[++h]:null==E?E=n[--y]:rD(v,b)?(f(v,b,r),v=t[++p],b=n[++h]):rD(m,E)?(f(m,E,r),m=t[--g],E=n[--y]):rD(v,E)?(f(v,E,r),o.insertBefore(e,v.elm,o.nextSibling(m.elm)),v=t[++p],E=n[--y]):rD(m,b)?(f(m,b,r),o.insertBefore(e,m.elm,v.elm),m=t[--g],b=n[++h]):(void 0===i&&(i=oD(t,p,g)),a=i[b.key],eD(a)?(o.insertBefore(e,u(b,r),v.elm),b=n[++h]):eD(i[E.key])?(o.insertBefore(e,u(E,r),o.nextSibling(m.elm)),E=n[--y]):(s=t[a],s.sel!==b.sel?o.insertBefore(e,u(b,r),v.elm):(f(s,b,r),t[a]=void 0,o.insertBefore(e,s.elm,v.elm)),b=n[++h]));h<=y&&(c=null==n[y+1]?null:n[y+1].elm,l(e,c,n,h,y,r)),p<=g&&d(e,t,p,g)}(y,b,E,n):tD(E)?(tD(e.text)&&o.setTextContent(y,""),l(y,null,E,0,E.length-1,n)):tD(b)?d(y,b,0,b.length-1):tD(e.text)&&o.setTextContent(y,""):e.text!==t.text&&(tD(b)&&d(y,b,0,b.length-1),o.setTextContent(y,t.text)),null===(v=null==m?void 0:m.postpatch)||void 0===v||v.call(m,e,t)}return function(e,t){let n,s,l;const c=[];for(n=0;n<r.pre.length;++n)r.pre[n]();for(!function(e,t){return e.isElement(t)}(o,e)?function(e,t){return e.isDocumentFragment(t)}(o,e)&&(e=a(e)):e=i(e),rD(e,t)?f(e,t,c):(s=e.elm,l=o.parentNode(s),u(t,c),null!==l&&(o.insertBefore(l,t.elm,o.nextSibling(s)),d(l,[e],0,0))),n=0;n<c.length;++n)c[n].data.hook.insert(c[n]);for(n=0;n<r.post.length;++n)r.post[n]();return t}}function sD(e,t,n){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==n&&void 0!==t)for(let e=0;e<t.length;++e){const n=t[e];if("string"==typeof n)continue;const r=n.data;void 0!==r&&sD(r,n.children,n.sel)}}function uD(e,t,n){let r,o,i,a={};if(void 0!==n?(null!==t&&(a=t),JC(n)?r=n:QC(n)?o=n.toString():n&&n.sel&&(r=[n])):null!=t&&(JC(t)?r=t:QC(t)?o=t.toString():t&&t.sel?r=[t]:a=t),void 0!==r)for(i=0;i<r.length;++i)QC(r[i])&&(r[i]=ZC(void 0,void 0,void 0,r[i],void 0));return!e.startsWith("svg")||3!==e.length&&"."!==e[3]&&"#"!==e[3]||sD(a,r,e),ZC(e,a,r,o,void 0)}function lD(e,t){let n;const r=t.elm;let o=e.data.attrs,i=t.data.attrs;if((o||i)&&o!==i){for(n in o=o||{},i=i||{},i){const e=i[n];o[n]!==e&&(!0===e?r.setAttribute(n,""):!1===e?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,e):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,e):58===n.charCodeAt(5)?109===n.charCodeAt(1)?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,e):r.setAttributeNS("http://www.w3.org/1999/xlink",n,e):r.setAttribute(n,e))}for(n in o)n in i||r.removeAttribute(n)}}const cD={create:lD,update:lD};function dD(e,t){let n,r;const o=t.elm;let i=e.data.class,a=t.data.class;if((i||a)&&i!==a){for(r in i=i||{},a=a||{},i)i[r]&&!Object.prototype.hasOwnProperty.call(a,r)&&o.classList.remove(r);for(r in a)n=a[r],n!==i[r]&&o.classList[n?"add":"remove"](r)}}const fD={create:dD,update:dD},pD=/[A-Z]/g;function hD(e,t){const n=t.elm;let r,o=e.data.dataset,i=t.data.dataset;if(!o&&!i)return;if(o===i)return;o=o||{},i=i||{};const a=n.dataset;for(r in o)r in i||(a?r in a&&delete a[r]:n.removeAttribute("data-"+r.replace(pD,"-$&").toLowerCase()));for(r in i)o[r]!==i[r]&&(a?a[r]=i[r]:n.setAttribute("data-"+r.replace(pD,"-$&").toLowerCase(),i[r]))}const gD={create:hD,update:hD};function vD(e,t,n){if("function"==typeof e)e.call(t,n,t);else if("object"==typeof e)for(let r=0;r<e.length;r++)vD(e[r],t,n)}function mD(e,t){const n=e.type,r=t.data.on;r&&r[n]&&vD(r[n],t,e)}function yD(e,t){const n=e.data.on,r=e.listener,o=e.elm,i=t&&t.data.on,a=t&&t.elm;let s;if(n!==i){if(n&&r)if(i)for(s in n)i[s]||o.removeEventListener(s,r,!1);else for(s in n)o.removeEventListener(s,r,!1);if(i){const r=t.listener=e.listener||function e(t){mD(t,e.vnode)};if(r.vnode=t,n)for(s in i)n[s]||a.addEventListener(s,r,!1);else for(s in i)a.addEventListener(s,r,!1)}}}const bD={create:yD,update:yD,destroy:yD};function ED(e,t){let n,r,o;const i=t.elm;let a=e.data.props,s=t.data.props;if((a||s)&&a!==s)for(n in a=a||{},s=s||{},s)r=s[n],o=a[n],o===r||"value"===n&&i[n]===r||(i[n]=r)}const CD={create:ED,update:ED},DD="function"==typeof(null===window||void 0===window?void 0:window.requestAnimationFrame)?window.requestAnimationFrame.bind(window):setTimeout;let wD=!1;function AD(e,t,n){!function(e){DD(function(){DD(e)})}(function(){e[t]=n})}function SD(e,t){let n,r;const o=t.elm;let i=e.data.style,a=t.data.style;if(!i&&!a)return;if(i===a)return;i=i||{},a=a||{};const s="delayed"in i;for(r in i)r in a||("-"===r[0]&&"-"===r[1]?o.style.removeProperty(r):o.style[r]="");for(r in a)if(n=a[r],"delayed"===r&&a.delayed)for(const e in a.delayed)n=a.delayed[e],s&&n===i.delayed[e]||AD(o.style,e,n);else"remove"!==r&&n!==i[r]&&("-"===r[0]&&"-"===r[1]?o.style.setProperty(r,n):o.style[r]=n)}const xD={pre:function(){wD=!1},create:SD,update:SD,destroy:function(e){let t,n;const r=e.elm,o=e.data.style;if(o&&(t=o.destroy))for(n in t)r.style[n]=t[n]},remove:function(e,t){const n=e.data.style;if(!n||!n.remove)return void t();let r;wD||(e.elm.offsetLeft,wD=!0);const o=e.elm;let i=0;const a=n.remove;let s=0;const u=[];for(r in a)u.push(r),o.style[r]=a[r];const l=getComputedStyle(o)["transition-property"].split(", ");for(;i<l.length;++i)-1!==u.indexOf(l[i])&&s++;o.addEventListener("transitionend",function(e){e.target===o&&--s,0===s&&t()})}};function OD(e,t){for(const n of e)null!=n&&!1!==n&&""!==n&&(Array.isArray(n)?OD(n,t):"string"==typeof n||"number"==typeof n||"boolean"==typeof n?t.push(ZC(void 0,void 0,void 0,String(n),void 0)):t.push(n));return t}function ND(e,t,...n){const r=OD(n,[]);return"function"==typeof e?e(t,r):1===r.length&&!r[0].sel&&r[0].text?uD(e,t,r[0].text):uD(e,t,r)}var BD=[];var TD,kD,FD={};function ID(e,t,n){return ND(n.isInline(e)?"span":"div",null,t)}function PD(e,t){var n,r=Iy.findKey(t,e),o=t.isInline(e),i=Kh.isVoid(t,e),a=gy(e.type,r.id),s={id:a,key:r.id,"data-slate-node":"element","data-slate-inline":o},u=e.type,l=e.children,c=void 0===l?[]:l,d=function(e){return FD[e]||ID}(u);n=i?null:c.map(function(n,r){return MD(n,r,e,t)});var f=d(e,n,t);if(i){s["data-slate-void"]=!0;var p=o?"span":"div",h=Qg(eg.texts(e),1),g=Qg(h[0],1)[0],v=ND(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},MD(g,0,e,t));f=ND(p,{style:{position:"relative"}},f,v),Pv.set(g,0),_v.set(g,e)}return null==f.data&&(f.data={}),Object.assign(f.data,s),i||o||(f=function(e,t){var n=t;return BD.forEach(function(r){n=r(e,t)}),n}(e,f)),Hm(function(){var t=Xm(a);null!=t&&(Mv.set(r,t),jv.set(e,t),Rv.set(t,e))}),f}function _D(e,t){return void 0===t&&(t=!1),ND("span",{"data-slate-string":!0},t?e+"\n":e)}function LD(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),ND("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?ND("br",null):null)}function RD(e,t,n){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=Iy.findKey(n,e),o=n.getConfig().decorate;if(null==o)throw new Error("Can not get config.decorate");var i,a=Iy.findPath(n,e),s=o([e,a]),u=Cg.decorations(e,s),l=u.map(function(r,o){var i=function(e,t,n,r,o){void 0===t&&(t=!1);var i=e.text,a=Iy.findPath(o,n),s=og.parent(a);if(Kh.isEditor(r))throw new Error("Text node ".concat(JSON.stringify(n)," parent is Editor"));return o.isVoid(r)?LD(eg.string(r).length):""!==i||r.children[r.children.length-1]!==n||o.isInline(r)||""!==Kh.string(o,s)?""===i?LD():t&&"\n"===i.slice(-1)?_D(i,!0):_D(i):LD(0,!0)}(r,o===u.length-1,e,t,n);return i=function(e,t){var n=t;return BD.forEach(function(t){n=t(e,n)}),n}(r,i),ND("span",{"data-slate-leaf":!0},i)}),c=(i=r.id,"w-e-text-".concat(i)),d=ND("span",{"data-slate-node":"text",id:c,key:r.id},l);return Hm(function(){var t=Xm(c);null!=t&&(Mv.set(r,t),jv.set(e,t),Rv.set(t,e))}),d}function MD(e,t,n,r){return Pv.set(e,t),_v.set(e,n),$h.isElement(e)?PD(e,r):RD(e,n,r)}var jD=function(){if(kD)return TD;kD=1;var e,t="[object Symbol]",n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o="\\ud800-\\udfff",i="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",s="\\u2700-\\u27bf",u="a-z\\xdf-\\xf6\\xf8-\\xff",l="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",d="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",f="['’]",p="["+o+"]",h="["+d+"]",g="["+i+a+"]",v="\\d+",m="["+s+"]",b="["+u+"]",E="[^"+o+d+v+s+u+l+"]",C="\\ud83c[\\udffb-\\udfff]",D="[^"+o+"]",w="(?:\\ud83c[\\udde6-\\uddff]){2}",A="[\\ud800-\\udbff][\\udc00-\\udfff]",S="["+l+"]",x="\\u200d",O="(?:"+b+"|"+E+")",N="(?:"+S+"|"+E+")",B="(?:['’](?:d|ll|m|re|s|t|ve))?",T="(?:['’](?:D|LL|M|RE|S|T|VE))?",k="(?:"+g+"|"+C+")"+"?",F="["+c+"]?",I=F+k+("(?:"+x+"(?:"+[D,w,A].join("|")+")"+F+k+")*"),P="(?:"+[m,w,A].join("|")+")"+I,_="(?:"+[D+g+"?",g,w,A,p].join("|")+")",L=RegExp(f,"g"),R=RegExp(g,"g"),M=RegExp(C+"(?="+C+")|"+_+I,"g"),j=RegExp([S+"?"+b+"+"+B+"(?="+[h,S,"$"].join("|")+")",N+"+"+T+"(?="+[h,S+O,"$"].join("|")+")",S+"?"+O+"+"+B,S+"+"+T,v,P].join("|"),"g"),H=RegExp("["+x+o+i+a+c+"]"),z=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$="object"==typeof y&&y&&y.Object===Object&&y,U="object"==typeof self&&self&&self.Object===Object&&self,V=$||U||Function("return this")(),W=(e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(t){return null==e?void 0:e[t]});function G(e){return H.test(e)}function q(e){return G(e)?function(e){return e.match(M)||[]}(e):function(e){return e.split("")}(e)}var K=Object.prototype.toString,Y=V.Symbol,X=Y?Y.prototype:void 0,Z=X?X.toString:void 0;function J(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&K.call(e)==t}(e))return Z?Z.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}function Q(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function ee(e){return null==e?"":J(e)}var te,ne,re=(te=function(e,t,n){return t=t.toLowerCase(),e+(n?oe(ee(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)n=t(n,e[r],r,e);return n}(function(e,t){return e=ee(e),void 0===t?function(e){return z.test(e)}(e)?function(e){return e.match(j)||[]}(e):function(e){return e.match(n)||[]}(e):e.match(t)||[]}(function(e){return(e=ee(e))&&e.replace(r,W).replace(R,"")}(e).replace(L,"")),te,"")}),oe=(ne="toUpperCase",function(e){var t=G(e=ee(e))?q(e):void 0,n=t?t[0]:e.charAt(0),r=t?Q(t,1).join(""):e.slice(1);return n[ne]()+r});return TD=re}(),HD=b(jD);var zD=["props","attrs","style","dataset","on","hook"];function $D(e){var t=e.data,n=void 0===t?{}:t,r=e.children,o=void 0===r?[]:r;Object.keys(n).forEach(function(t){var r,o,i=n[t];if("key"!==t){if(!zD.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=HD(a),function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.dataset&&(n.dataset={});Object.assign(n.dataset,t)}(e,((r={})[a]=i,r)),void delete n[t]}!function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={});Object.assign(n.props,t)}(e,(o={},o[t]=i,o)),delete n[t]}}else e.key=i}),o.length>0&&o.forEach(function(e){"string"!=typeof e&&$D(e)})}function UD(e,t){var n,r,o=e.$scroll,i=(n=e.id,"w-e-textarea-".concat(n)),a=t.getConfig(),s=a.readOnly,u=a.autoFocus,l=function(e,t){return void 0===t&&(t=!1),uD("div#".concat(e),{props:{contentEditable:!t}})}(i,s),c=t.children||[];l.children=c.map(function(e,n){if(Fv.has(e)){var r=Fv.get(e);if(r){var o=Qg(r,2),i=o[0],a=o[1];if(a)return i!==n&&(Pv.set(e,n),Fv.set(e,[n,a])),a}}var s=MD(e,n,t,t);$D(s);var u=t.getConfig().skipCacheTypes,l=void 0===u?["list-item"]:u;return $h.isElement(e)&&l.includes(e.type)||Fv.set(e,[n,s]),s});var d=Bv.get(e);if(null==d&&(d=!0),d){var f=function(e){return om('<div\n id="'.concat(e,'"\n data-slate-editor\n data-slate-node="value"\n suppressContentEditableWarning\n role="textarea"\n spellCheck="true"\n autoCorrect="true"\n autoCapitalize="true"\n ></div>'))}(i);o.append(f),e.$textArea=f,r=f[0],(h=aD([fD,CD,xD,gD,bD,cD]))(r,l),Bv.set(e,!1),Tv.set(e,h)}else{var p=kv.get(e),h=Tv.get(e);if(null==p||null==h)return;r=p.elm,h(p,l)}if(null!=r||null!=(r=Xm(i))){var g;if((d?u:t.isFocused())&&r.focus({preventScroll:!0}),d){var v=(g=r)&&g.ownerDocument&&g.ownerDocument.defaultView||null;v&&zv.set(t,v)}Lv.set(t,r),jv.set(t,r),Rv.set(r,t),kv.set(e,l)}}var VD=1,WD=function(){function e(e){var t=this;this.id=VD++,this.$textArea=null,this.$progressBar=om('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=om('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=wC(function(){var e=t.editorInstance;!function(e,t){var n=e.isComposing,r=e.isUpdatingSelection,o=e.isDraggingInternally;if(!(t.getConfig().readOnly||n||r||o)){var i=Iy.findDocumentOrShadowRoot(t),a=i.activeElement,s=Iy.toDOMNode(t,t),u=i.getSelection();if(a!==s)return $v.delete(t),void jg.deselect(t);if(e.latestElement=a,$v.set(t,!0),!u)return jg.deselect(t);var l=u.anchorNode,c=u.focusNode,d=AC(t,l)||SC(t,l),f=AC(t,c)||SC(t,c);if(d&&f){var p=Iy.toSlateRange(t,u,{exactMatch:!1,suppressThrow:!1});jg.select(t,p)}}}(t,e)},100);var n=om(e);if(0===n.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=n;var r=om('<div class="w-e-text-container"></div>');r.append(this.$progressBar),r.append(this.$maxLengthInfo),n.append(r);var o=om('<div class="w-e-scroll"></div>');r.append(o),this.$scroll=o,this.$textAreaContainer=r,Hm(function(){var e=t.editorInstance,o=Iy.getWindow(e);o.document.addEventListener("selectionchange",t.onDOMSelectionChange),e.on(fv,function(){o.document.removeEventListener("selectionchange",t.onDOMSelectionChange)}),r.on("click",function(){return e.hidePanelOrModal()}),e.on(pv,t.changeViewState.bind(t));var i=e.getConfig(),a=i.onChange,s=i.scroll;a&&e.on(pv,function(){return a(e)}),s||(n.css("position","relative"),r.addClass("no-scroll")),t.onFocusAndOnBlur(),e.on(pv,t.changeMaxLengthInfo.bind(t)),t.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=Ev.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(lv(GC,function(n,o){t.on(o,function(t){n(t,e,r)})}),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",wC(function(){r.emit("scroll")},100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on(pv,function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout(function(){return o&&o(t)}):null!=e.latestEditorSelection&&null==t.selection&&setTimeout(function(){return r&&r(t)}),e.latestEditorSelection=t.selection})},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-Iy.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(t)}},e.prototype.changeProgress=function(e){var t=this.$progressBar;t.css("width","".concat(e,"%")),e>=100&&setTimeout(function(){t.hide(),t.css("width","0"),t.show()},1e3)},e.prototype.changeViewState=function(){var e=this,t=this.editorInstance;UD(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var o=t.isEmpty();if(o&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var i=om('<div class="w-e-text-placeholder">'.concat(r,"</div>"));e.$textAreaContainer.append(i),e.$placeholder=i}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!o&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),Hm(function(){PC(e,t)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function GD(e,t,n,r){if(Pv.set(e,t),_v.set(e,n),$h.isElement(e)){var o=e.children;if((void 0===o?[]:o).forEach(function(t,n){return GD(t,n,e,r)}),Kh.isVoid(r,e)){var i=Qg(eg.texts(e),1),a=Qg(i[0],1)[0];Pv.set(a,0),_v.set(a,e)}}}var qD={en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"};function KD(e){var t=e.selector,n=void 0===t?"":t,r=e.config,o=void 0===r?{}:r,i=e.content,a=e.html,s=e.plugins,u=void 0===s?[]:s,l=function(e){return[Wb,Ob,Gv,Sb,Qb,Vb,Gb,Vg].reduce(function(e,t){return t(e)},e)}((()=>{var e={children:[],operations:[],selection:null,marks:null,isInline:()=>!1,isVoid:()=>!1,onChange:()=>{},apply:t=>{for(var n of Kh.pathRefs(e))ig.transform(n,t);for(var r of Kh.pointRefs(e))lg.transform(r,t);for(var o of Kh.rangeRefs(e))pg.transform(o,t);var i,a,s=oh.get(e)||[],u=ih.get(e)||new Set,l=e=>{if(e){var t=e.join(",");a.has(t)||(a.add(t),i.push(e))}};if(og.operationCanTransformPath(t))for(var c of(i=[],a=new Set,s))l(og.transform(c,t));else i=s,a=u;var d=e.getDirtyPaths(t);for(var f of d)l(f);oh.set(e,i),ih.set(e,a),jg.transform(e,t),e.operations.push(t),Kh.normalize(e),"set_selection"===t.type&&(e.marks=null),ah.get(e)||(ah.set(e,!0),Promise.resolve().then(()=>{ah.set(e,!1),e.onChange(),e.operations=[]}))},addMark:(t,n)=>{var{selection:r}=e;if(r)if(fg.isExpanded(r))jg.setNodes(e,{[t]:n},{match:Cg.isText,split:!0});else{var o=fh(fh({},Kh.marks(e)||{}),{},{[t]:n});e.marks=o,ah.get(e)||e.onChange()}},deleteBackward:t=>{var{selection:n}=e;n&&fg.isCollapsed(n)&&jg.delete(e,{unit:t,reverse:!0})},deleteForward:t=>{var{selection:n}=e;n&&fg.isCollapsed(n)&&jg.delete(e,{unit:t})},deleteFragment:t=>{var{selection:n}=e;n&&fg.isExpanded(n)&&jg.delete(e,{reverse:"backward"===t})},getFragment:()=>{var{selection:t}=e;return t?eg.fragment(e,t):[]},insertBreak:()=>{jg.splitNodes(e,{always:!0})},insertSoftBreak:()=>{jg.splitNodes(e,{always:!0})},insertFragment:t=>{jg.insertFragment(e,t)},insertNode:t=>{jg.insertNodes(e,t)},insertText:t=>{var{selection:n,marks:r}=e;if(n){if(r){var o=fh({text:t},r);jg.insertNodes(e,o)}else jg.insertText(e,t);e.marks=null}},normalizeNode:t=>{var[n,r]=t;if(!Cg.isText(n))if($h.isElement(n)&&0===n.children.length)jg.insertNodes(e,{text:""},{at:r.concat(0),voids:!0});else for(var o=!Kh.isEditor(n)&&$h.isElement(n)&&(e.isInline(n)||0===n.children.length||Cg.isText(n.children[0])||e.isInline(n.children[0])),i=0,a=0;a<n.children.length;a++,i++){var s=eg.get(e,r);if(!Cg.isText(s)){var u=n.children[a],l=s.children[i-1],c=a===n.children.length-1;(Cg.isText(u)||$h.isElement(u)&&e.isInline(u))!==o?(jg.removeNodes(e,{at:r.concat(i),voids:!0}),i--):$h.isElement(u)?e.isInline(u)&&(null!=l&&Cg.isText(l)?c&&(jg.insertNodes(e,{text:""},{at:r.concat(i+1),voids:!0}),i++):(jg.insertNodes(e,{text:""},{at:r.concat(i),voids:!0}),i++)):null!=l&&Cg.isText(l)&&(Cg.equals(u,l,{loose:!0})?(jg.mergeNodes(e,{at:r.concat(i),voids:!0}),i--):""===l.text?(jg.removeNodes(e,{at:r.concat(i-1),voids:!0}),i--):""===u.text&&(jg.removeNodes(e,{at:r.concat(i),voids:!0}),i--))}}},removeMark:t=>{var{selection:n}=e;if(n)if(fg.isExpanded(n))jg.unsetNodes(e,t,{match:Cg.isText,split:!0});else{var r=fh({},Kh.marks(e)||{});delete r[t],e.marks=r,ah.get(e)||e.onChange()}},getDirtyPaths:e=>{switch(e.type){case"insert_text":case"remove_text":case"set_node":var{path:t}=e;return og.levels(t);case"insert_node":var{node:n,path:r}=e,o=og.levels(r),i=Cg.isText(n)?[]:Array.from(eg.nodes(n),e=>{var[,t]=e;return r.concat(t)});return[...o,...i];case"merge_node":var{path:a}=e;return[...og.ancestors(a),og.previous(a)];case"move_node":var{path:s,newPath:u}=e;if(og.equals(s,u))return[];var l=[],c=[];for(var d of og.ancestors(s)){var f=og.transform(d,e);l.push(f)}for(var p of og.ancestors(u)){var h=og.transform(p,e);c.push(h)}var g=c[c.length-1],v=u[u.length-1],m=g.concat(v);return[...l,...c,m];case"remove_node":var{path:y}=e;return[...og.ancestors(y)];case"split_node":var{path:b}=e;return[...og.levels(b),og.next(b)];default:return[]}}};return e})());if(n&&function(e,t){return py(e,"data-w-e-textarea",t)}(l,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var c=function(e){void 0===e&&(e={});var t=sv(cv),n={},r=e.MENU_CONF,o=void 0===r?{}:r;return lv(t,function(e,t){n[t]=Yg(Yg({},e),o[t]||{})}),delete e.MENU_CONF,Yg({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(o);Nv.set(l,c);var d=c.hoverbarKeys,f=void 0===d?{}:d;if(u.forEach(function(e){l=e(l)}),function(e,t){var n=t.html,r=t.content;null!=n&&(e.children=hy(e,n)),r&&r.length&&(e.children=r),0===e.children.length&&(e.children=[{type:"paragraph",children:[{text:""}]}])}(l,{html:a,content:i}),n){var p=new WD(n);bv.set(l,p),Ev.set(p,l),p.changeViewState(),Hm(function(){var e=p.$scroll;null!=e&&e.height()<300&&console.warn("".concat(qD.zh,"\n").concat(qD.en),{element:e,height:e.height()})});var h=void 0;Object.keys(f).length>0&&(h=new CC,wv.set(h,l),Av.set(l,h)),l.on(pv,function(){l.hidePanelOrModal()}),l.on(hv,function(){l.hidePanelOrModal()})}else l.children.forEach(function(e,t){return GD(e,t,l,l)});var g=c.onCreated,v=c.onDestroyed;return g&&l.on(dv,function(){return g(l)}),v&&l.on(fv,function(){return v(l)}),Hm(function(){return l.emit("created")}),l}var YD=function(){function e(e,t){var n=this;this.$toolbar=om('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=tE(function(){n.toolbarItems.forEach(function(e){e.changeMenuState()})},200),this.config=t;var r=om(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var o=this.$toolbar;o.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),r.append(o),Hm(function(){n.initToolbar(),n.lngListen=XE(function(){return n.initToolbar()}),n.getEditorInstance().on(pv,n.changeToolbarState)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.initToolbar=function(){this.menus={};var e=this.$toolbar;null==e||e.empty(),this.registerItems(),this.changeToolbarState()},e.prototype.registerItems=function(){var e=this,t="",n=this.$toolbar,r=this.config,o=r.toolbarKeys,i=void 0===o?[]:o,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=r.excludeKeys,l=void 0===u?[]:u,c=sv(i);s.keys.length>0&&("string"==typeof s.keys&&(s.keys=[s.keys]),s.keys.forEach(function(e,t){c.splice(s.index+t,0,e)}));var d=c.filter(function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)}),f=d.length;d.forEach(function(r,o){if("|"===r){if(0===o)return;if(o+1===f)return;if("|"===t)return;var i=eC();return n.append(i),void(t=r)}if("string"==typeof r)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t="group"})},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new hC(e)}(e),o=e.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach(function(e){s.includes(e)||t.registerSingleItem(e,r)}),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof hC,o=this.menus,i=o[e];if(null==i){var a=mv[e];if(null==a)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));i=a(),o[e]=i}else console.warn("Duplicated toolbar menu key '".concat(e,"'\n重复注册了菜单栏 menu '").concat(e,"'"));var s=n.getMenuConfig(e);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=mC(e,i,r);(this.toolbarItems.push(u),Sv.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=Cv.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.destroy=function(){var e;this.$toolbar.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.toolbarItems=[]},e}();function XD(e,t){if(null==e)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,o=void 0===r?{}:r;if(function(e,t){return py(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=Yg({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new YD(n,i);return Cv.set(a,e),Dv.set(e,a),a}var ZD,JD,QD,ew,tw,nw={exports:{}},rw={};function ow(){if(QD)return rw;QD=1,Object.defineProperty(rw,"__esModule",{value:!0}),rw.justErrorsLogger=rw.debugLogger=void 0;const e=function(){if(JD)return ZD;function e(e){return e<10?`0${e}`:e.toString()}return JD=1,ZD=function(){const t=new Date;return`${e(t.getHours())}:${e(t.getMinutes())}:${e(t.getSeconds())}`}}(),t={debug:()=>{},warn:()=>{},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};rw.justErrorsLogger=t;const n={debug:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.debug(`[Uppy] [${e()}]`,...n)},warn:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.warn(`[Uppy] [${e()}]`,...n)},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};return rw.debugLogger=n,rw}function iw(){if(tw)return ew;tw=1;return ew={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=0|n;for(;o--;)r+=e[Math.random()*e.length|0];return r}},ew}var aw,sw,uw,lw,cw,dw,fw,pw,hw,gw,vw,mw,yw,bw,Ew,Cw,Dw,ww,Aw,Sw,xw,Ow,Nw,Bw,Tw,kw,Fw,Iw,Pw,_w,Lw,Rw={};function Mw(){return sw?aw:(sw=1,aw=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var o=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o})}function jw(){if(lw)return uw;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return lw=1,e.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<i;t++)"*"!==o[t]&&(r=t<n.length&&o[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var a in r={},e)this.match(a)&&(r[a]=e[a]);return r},uw=function(t,n,r){var o=new e(t,r||/[\/\.]/);return void 0!==n?o.match(n):o},uw}function Hw(){if(fw)return Rw;fw=1,Object.defineProperty(Rw,"__esModule",{value:!0}),Rw.defaultOptions=Rw.RestrictionError=Rw.Restricter=void 0;const e=Mw(),t=function(){if(dw)return cw;dw=1;var e=jw(),t=/[\/\+\.]/;return cw=function(n,r){function o(r){var o=e(r,n,t);return o&&o.length>=2}return r?o(r.split(";")[0]):o}}();Rw.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class n extends Error{constructor(){super(...arguments),this.isRestriction=!0}}Rw.RestrictionError=n,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});return Rw.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(r,o){const{maxFileSize:i,minFileSize:a,maxTotalFileSize:s,maxNumberOfFiles:u,allowedFileTypes:l}=this.getOpts().restrictions;if(u){const e=o.filter(e=>!e.isGhost);if(e.length+1>u)throw new n(`${this.i18n("youCanOnlyUploadX",{smart_count:u})}`)}if(l){if(!l.some(e=>e.includes("/")?!!r.type&&t(r.type.replace(/;.*?$/,""),e):!("."!==e[0]||!r.extension)&&r.extension.toLowerCase()===e.slice(1).toLowerCase())){const e=l.join(", ");throw new n(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(s&&null!=r.size){const t=o.reduce((e,t)=>e+t.size,r.size);if(t>s)throw new n(this.i18n("exceedsSize",{size:e(s),file:r.name}))}if(i&&null!=r.size&&r.size>i)throw new n(this.i18n("exceedsSize",{size:e(i),file:r.name}));if(a&&null!=r.size&&r.size<a)throw new n(this.i18n("inferiorSize",{size:e(a)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new n(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new n(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:r}=this.getOpts().restrictions,o=Object.prototype.hasOwnProperty,i=[];for(const t of r)o.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}},Rw}function zw(){if(hw)return pw;return hw=1,pw=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}function $w(){if(vw)return gw;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}vw=1;var t=0;function n(e){return"__private_"+t+++"_"+e}const r=zw();function o(e,t,n){const r=[];return e.forEach(e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(n)})),r}
|
|
8
8
|
/**
|
|
9
9
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
10
10
|
* and replaces it with values from options `{smart_count: 5}`
|
|
@@ -15,7 +15,7 @@ var e,t,n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y="undefined"!=typeof globalThis?globalT
|
|
|
15
15
|
* @param {string} phrase that needs interpolation, with placeholders
|
|
16
16
|
* @param {object} options with values that will be used to replace placeholders
|
|
17
17
|
* @returns {any[]} interpolated
|
|
18
|
-
*/function i(e,t){const n=/\$/g;let r=[e];if(null==t)return r;for(const e of Object.keys(t))if("_"!==e){let i=t[e];"string"==typeof i&&(i=n[Symbol.replace](i,"$$$$")),r=o(r,new RegExp(`%\\{${e}\\}`,"g"),i)}return r}var a=n("apply");function s(e){if(null==e||!e.strings)return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}return YD=class{constructor(t){Object.defineProperty(this,a,{value:s}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(t)?t.forEach(e(this,a)[a],this):e(this,a)[a](t)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!r(this.locale.strings,e))throw new Error(`missing string: ${e}`);const n=this.locale.strings[e];if("object"==typeof n){if(t&&void 0!==t.smart_count){return i(n[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return i(n,t)}},YD}function ww(){return JD||(JD=1,ZD=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,o,i,a,s){var u=function(e){var n=t[e]?t[e]:[],r=e.indexOf(":"),o=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],i=Object.keys(t),a=0,s=i.length;for(;a<s;a++){var u=i[a];if("*"===u&&(n=n.concat(t[u])),2===o.length&&o[0]===u){n=n.concat(t[u]);break}}return n}(e);u.length&&function(e,t,n){var r=0,o=t.length;for(;r<o&&t[r];r++)t[r].event=e,t[r].apply(t[r],n)}(e,u,[n,r,o,i,a,s])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,(function r(){n.apply(this,arguments),e.off(t,r)}))},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],o=0,i=r?r.length:0;o<i;o++)r[o]!==t&&n.push(r[o]);n.length?this._fns[e]=n:delete this._fns[e]},e}),ZD}function Aw(){if(ew)return QD;ew=1;var e=0;function t(t){return"__private_"+e+++"_"+t}var n=t("publish");class r{constructor(){Object.defineProperty(this,n,{value:o}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},r={...this.state,...e};this.state=r,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,n)[n](t,r,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach((e=>{e(...t)}))}return r.VERSION="2.1.1",QD=function(){return new r}}function Sw(){if(nw)return tw;return nw=1,tw=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}}function xw(){return ow?rw:(ow=1,rw={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"})}function Ow(){if(vw)return gw;vw=1;var e=jD(),t=MD(),n=Ew();let r,o;function i(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var a=0;function s(e){return"__private_"+a+++"_"+e}const u=Dw(),l=ww(),c=eC(),d=Aw(),f=function(){if(aw)return iw;aw=1;const e=Sw(),t=xw();return iw=function(n){var r;if(n.type)return n.type;const o=n.name?null==(r=e(n.name).extension)?void 0:r.toLowerCase():null;return o&&o in t?t[o]:"application/octet-stream"}}(),p=Sw(),h=function(){if(uw)return sw;function e(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}return uw=1,sw=function(t){let n="uppy";return"string"==typeof t.name&&(n+=`-${e(t.name.toLowerCase())}`),void 0!==t.type&&(n+=`-${t.type}`),t.meta&&"string"==typeof t.meta.relativePath&&(n+=`-${e(t.meta.relativePath.toLowerCase())}`),void 0!==t.data.size&&(n+=`-${t.data.size}`),void 0!==t.data.lastModified&&(n+=`-${t.data.lastModified}`),n}}(),g=(cw||(cw=1,lw=function(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[r,o]=n.split(".");return r=parseInt(r,10),o=parseInt(o,10),r<15||15===r&&o<15063||r>18||18===r&&o>=18218}),lw),v=fw?dw:(fw=1,dw=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}),m=hw?pw:(hw=1,pw={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}});var y=s("plugins"),b=s("restricter"),E=s("storeUnsubscribe"),C=s("emitter"),D=s("preProcessors"),w=s("uploaders"),A=s("postProcessors"),S=s("informAndEmit"),x=s("checkRequiredMetaFieldsOnFile"),O=s("checkRequiredMetaFields"),N=s("assertNewUploadAllowed"),B=s("checkAndCreateFileStateObject"),T=s("startIfAutoProceed"),k=s("addListeners"),F=s("updateOnlineStatus"),I=s("createUpload"),P=s("getUpload"),L=s("removeUpload"),R=s("runUpload");r=Symbol.for("uppy test: getPlugins"),o=Symbol.for("uppy test: createUpload");class _{constructor(e){Object.defineProperty(this,R,{value:K}),Object.defineProperty(this,L,{value:q}),Object.defineProperty(this,P,{value:W}),Object.defineProperty(this,I,{value:G}),Object.defineProperty(this,k,{value:V}),Object.defineProperty(this,T,{value:U}),Object.defineProperty(this,B,{value:$}),Object.defineProperty(this,N,{value:z}),Object.defineProperty(this,O,{value:H}),Object.defineProperty(this,x,{value:j}),Object.defineProperty(this,S,{value:M}),Object.defineProperty(this,y,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,E,{writable:!0,value:void 0}),Object.defineProperty(this,C,{writable:!0,value:l()}),Object.defineProperty(this,D,{writable:!0,value:new Set}),Object.defineProperty(this,w,{writable:!0,value:new Set}),Object.defineProperty(this,A,{writable:!0,value:new Set}),Object.defineProperty(this,F,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=m;const r={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:n.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:d(),logger:t.justErrorsLogger,infoTimeout:5e3};this.opts={...r,...e,restrictions:{...r.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=t.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=c(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:g(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),i(this,b)[b]=new n.Restricter((()=>this.opts),this.i18n),i(this,E)[E]=this.store.subscribe(((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),i(this,k)[k]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i(this,C)[C].emit(e,...n)}on(e,t){return i(this,C)[C].on(e,t),this}once(e,t){return i(this,C)[C].once(e,t),this}off(e,t){return i(this,C)[C].off(e,t),this}updateAll(e){this.iteratePlugins((t=>{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new u([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((e=>{e.setOptions()})),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach((r=>{const o={...t[r]};o.progress={...o.progress,...e},n[r]=o})),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){i(this,D)[D].add(e)}removePreProcessor(e){return i(this,D)[D].delete(e)}addPostProcessor(e){i(this,A)[A].add(e)}removePostProcessor(e){return i(this,A)[A].delete(e)}addUploader(e){i(this,w)[w].add(e)}removeUploader(e){return i(this,w)[w].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach((t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),o=r.filter((e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted})),i=r.filter((e=>!e.progress.uploadStarted)),a=r.filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess)),s=r.filter((e=>e.progress.uploadStarted)),u=r.filter((e=>e.isPaused)),l=r.filter((e=>e.progress.uploadComplete)),c=r.filter((e=>e.error)),d=o.filter((e=>!e.isPaused)),f=r.filter((e=>e.progress.preprocess||e.progress.postprocess));return{newFiles:i,startedFiles:a,uploadStartedFiles:s,pausedFiles:u,completeFiles:l,erroredFiles:c,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:f,isUploadStarted:s.length>0,isAllComplete:100===t&&l.length===r.length&&0===f.length,isAllErrored:!!n&&c.length===r.length,isAllPaused:0!==o.length&&u.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:r.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return i(this,b)[b].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){i(this,N)[N](e);const{files:t}=this.getState();let n=i(this,B)[B](t,e);return t[n.id]&&t[n.id].isGhost&&(n={...t[n.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...t,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),i(this,T)[T](),n.id}addFiles(e){i(this,N)[N]();const t={...this.getState().files},n=[],r=[];for(let o=0;o<e.length;o++)try{let r=i(this,B)[B](t,e[o]);t[r.id]&&t[r.id].isGhost&&(r={...t[r.id],data:e[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${r.name}, ${r.id}`)),t[r.id]=r,n.push(r)}catch(e){e.isRestriction||r.push(e)}if(this.setState({files:t}),n.forEach((e=>{this.emit("file-added",e)})),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach((e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)})),n.length>0&&i(this,T)[T](),r.length>0){let e="Multiple errors occurred while adding files:\n";if(r.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(r,e);{const t=new Error(e);throw t.errors=r,t}}}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),o={...n},i={...r},a=Object.create(null);function s(e){return void 0===a[e]}e.forEach((e=>{n[e]&&(a[e]=n[e],delete o[e])})),Object.keys(i).forEach((e=>{const t=r[e].fileIDs.filter(s);if(0===t.length)return void delete i[e];const{capabilities:n}=this.getState();if(t.length!==r[e].fileIDs.length&&!n.individualCancellation)throw new Error("individualCancellation is disabled");i[e]={...r[e],fileIDs:t}}));const u={currentUploads:i,files:o};0===Object.keys(o).length&&(u.allowNewUpload=!0,u.error=null,u.recoveredState=null),this.setState(u),this.calculateTotalProgress();const l=Object.keys(a);l.forEach((e=>{this.emit("file-removed",a[e],t)})),l.length>5?this.log(`Removed ${l.length} files`):this.log(`Removed files: ${l.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!0};e[t]=n})),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=i(this,I)[I](t,{forceAllowNewUpload:!0});return i(this,R)[R](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=i(this,I)[I]([e],{forceAllowNewUpload:!0});return i(this,R)[R](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins((e=>{e.provider&&e.provider.logout&&e.provider.logout()}))}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),n=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,r=n.reduce(((e,t)=>e+t.progress.percentage),0),o=Math.round(r/t*100);return void this.setState({totalProgress:o})}let r=t.reduce(((e,t)=>e+t.progress.bytesTotal),0);const o=r/t.length;r+=o*n.length;let i=0;t.forEach((e=>{i+=e.progress.bytesUploaded})),n.forEach((e=>{i+=o*(e.progress.percentage||0)/100}));let a=0===r?0:Math.round(i/r*100);a>100&&(a=100),this.setState({totalProgress:a}),this.emit("progress",a)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`)}const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(r);if(o){const e=`Already found a plugin named '${o.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in i(this,y)[y]?i(this,y)[y][n.type].push(n):i(this,y)[y][n.type]=[n],n.install(),this}getPlugin(e){for(const t of Object.values(i(this,y)[y])){const n=t.find((t=>t.id===e));if(null!=n)return n}}[r](e){return i(this,y)[y][e]}iteratePlugins(e){Object.values(i(this,y)[y]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=i(this,y)[y][e.type],n=t.findIndex((t=>t.id===e.id));-1!==n&&t.splice(n,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),i(this,E)[E](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",i(this,F)[F]),window.removeEventListener("offline",i(this,F)[F]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout((()=>this.hideInfo()),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?i(this,R)[R](e):(i(this,L)[L](e),Promise.reject(new Error("Nonexistent upload")))}[o](){return i(this,I)[I](...arguments)}addResultData(e,t){if(!i(this,P)[P](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=i(this,y)[y].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const r=this.opts.onBeforeUpload(t);return!1===r?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&"object"==typeof r&&(t=r,this.setState({files:t})),Promise.resolve().then((()=>i(this,b)[b].validateMinNumberOfFiles(t))).catch((e=>{throw i(this,S)[S](e),e})).then((()=>{if(!i(this,O)[O](t))throw new n.RestrictionError(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap((e=>e.fileIDs)),r=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)}));const o=i(this,I)[I](r);return i(this,R)[R](o)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function M(e,t){const{message:n,details:r=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:n,details:r},"error",this.opts.infoTimeout),this.log(`${n} ${r}`.trim(),"error")}function j(e){const{missingFields:t,error:n}=i(this,b)[b].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),!1)}function H(e){let t=!0;for(const n of Object.values(e))i(this,x)[x](n)||(t=!1);return t}function z(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new n.RestrictionError(this.i18n("noMoreFilesAllowed"));throw i(this,S)[S](t,e),t}}function $(e,t){const r=f(t),o=v(r,t),a=p(o).extension,s=Boolean(t.isRemote),u=h({...t,type:r});if(this.checkIfFileAlreadyExists(u)){const e=new n.RestrictionError(this.i18n("noDuplicates",{fileName:o}));throw i(this,S)[S](e,t),e}const l=t.meta||{};l.name=o,l.type=r;const c=Number.isFinite(t.data.size)?t.data.size:null;let d={source:t.source||"",id:u,name:o,extension:a||"",meta:{...this.getState().meta,...l},type:r,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isRemote:s,remote:t.remote||"",preview:t.preview};const g=this.opts.onBeforeFileAdded(d,e);if(!1===g){const e=new n.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof g&&null!==g&&(d=g);try{const t=Object.keys(e).map((t=>e[t]));i(this,b)[b].validate(d,t)}catch(e){throw i(this,S)[S](e,d),e}return d}function U(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((e=>{e.isRestriction||this.log(e.stack||e.message||e)}))}),4))}function V(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",((t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){const e=new Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),i(this,S)[S](e)}else i(this,S)[S](n)})),this.on("upload",(()=>{this.setState({error:null})})),this.on("upload-started",(e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:i(this,A)[A].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("preprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})})),this.on("postprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("postprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&i(this,x)[x](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",i(this,F)[F]),window.addEventListener("offline",i(this,F)[F]),setTimeout(i(this,F)[F],3e3))}function G(t,n){void 0===n&&(n={});const{forceAllowNewUpload:r=!1}=n,{allowNewUpload:o,currentUploads:i}=this.getState();if(!o&&!r)throw new Error("Cannot create a new upload: already uploading.");const a=(0,e.nanoid)();return this.emit("upload",{id:a,fileIDs:t}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...i,[a]:{fileIDs:t,step:0,result:{}}}}),a}function W(e){const{currentUploads:t}=this.getState();return t[e]}function q(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function K(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,o=[...i(this,D)[D],...i(this,w)[w],...i(this,A)[A]];try{for(let i=r;i<o.length&&n;i++){const r=o[i],a={...n,step:i};this.setState({currentUploads:{...t,[e]:a}}),await r(a.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(t){throw i(this,L)[L](e),t}if(n){n.fileIDs.forEach((e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const r=n.fileIDs.map((e=>this.getFile(e))),o=r.filter((e=>!e.error)),i=r.filter((e=>e.error));await this.addResultData(e,{successful:o,failed:i,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let a;return n&&(a=n.result,this.emit("complete",a),i(this,L)[L](e)),null==a&&this.log(`Not setting result for an upload that has been removed: ${e}`),a}return _.VERSION="2.3.4",gw=_}var Nw,Bw,Tw,kw,Fw,Iw,Pw,Lw,Rw={},_w=[],Mw=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function jw(e,t){for(var n in t)e[n]=t[n];return e}function Hw(e){var t=e.parentNode;t&&t.removeChild(e)}function zw(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Nw.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return $w(e,a,r,o,null)}function $w(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++Tw:o};return null==o&&null!=Bw.vnode&&Bw.vnode(i),i}function Uw(e){return e.children}function Vw(e,t){this.props=e,this.context=t}function Gw(e,t){if(null==t)return e.__?Gw(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?Gw(e):null}function Ww(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return Ww(e)}}function qw(e){(!e.__d&&(e.__d=!0)&&Fw.push(e)&&!Kw.__r++||Pw!==Bw.debounceRendering)&&((Pw=Bw.debounceRendering)||Iw)(Kw)}function Kw(){for(var e;Kw.__r=Fw.length;)e=Fw.sort((function(e,t){return e.__v.__b-t.__v.__b})),Fw=[],e.some((function(e){var t,n,r,o,i,a;e.__d&&(i=(o=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=jw({},o)).__v=o.__v+1,nA(a,o,r,t.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?Gw(o):i,o.__h),rA(n,o),o.__e!=i&&Ww(o)))}))}function Yw(e,t,n,r,o,i,a,s,u,l){var c,d,f,p,h,g,v,m=r&&r.__k||_w,y=m.length;for(n.__k=[],c=0;c<t.length;c++)if(null!=(p=n.__k[c]=null==(p=t[c])||"boolean"==typeof p?null:"string"==typeof p||"number"==typeof p||"bigint"==typeof p?$w(null,p,null,null,p):Array.isArray(p)?$w(Uw,{children:p},null,null,null):p.__b>0?$w(p.type,p.props,p.key,null,p.__v):p)){if(p.__=n,p.__b=n.__b+1,null===(f=m[c])||f&&p.key==f.key&&p.type===f.type)m[c]=void 0;else for(d=0;d<y;d++){if((f=m[d])&&p.key==f.key&&p.type===f.type){m[d]=void 0;break}f=null}nA(e,p,f=f||Rw,o,i,a,s,u,l),h=p.__e,(d=p.ref)&&f.ref!=d&&(v||(v=[]),f.ref&&v.push(f.ref,null,p),v.push(d,p.__c||h,p)),null!=h?(null==g&&(g=h),"function"==typeof p.type&&p.__k===f.__k?p.__d=u=Xw(p,u,e):u=Zw(e,p,f,m,h,u),"function"==typeof n.type&&(n.__d=u)):u&&f.__e==u&&u.parentNode!=e&&(u=Gw(f))}for(n.__e=g,c=y;c--;)null!=m[c]&&("function"==typeof n.type&&null!=m[c].__e&&m[c].__e==n.__d&&(n.__d=Gw(r,c+1)),aA(m[c],m[c]));if(v)for(c=0;c<v.length;c++)iA(v[c],v[++c],v[++c])}function Xw(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?Xw(r,t,n):Zw(n,r,r,o,r.__e,t));return t}function Zw(e,t,n,r,o,i){var a,s,u;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),a=null;else{for(s=i,u=0;(s=s.nextSibling)&&u<r.length;u+=2)if(s==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function Jw(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||Mw.test(t)?n:n+"px"}function Qw(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Jw(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Jw(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?tA:eA,i):e.removeEventListener(t,i?tA:eA,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function eA(e){this.l[e.type+!1](Bw.event?Bw.event(e):e)}function tA(e){this.l[e.type+!0](Bw.event?Bw.event(e):e)}function nA(e,t,n,r,o,i,a,s,u){var l,c,d,f,p,h,g,v,m,y,b,E=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,s=t.__e=n.__e,t.__h=null,i=[s]),(l=Bw.__b)&&l(t);try{e:if("function"==typeof E){if(v=t.props,m=(l=E.contextType)&&r[l.__c],y=l?m?m.props.value:l.__:r,n.__c?g=(c=t.__c=n.__c).__=c.__E:("prototype"in E&&E.prototype.render?t.__c=c=new E(v,y):(t.__c=c=new Vw(v,y),c.constructor=E,c.render=sA),m&&m.sub(c),c.props=v,c.state||(c.state={}),c.context=y,c.__n=r,d=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=E.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=jw({},c.__s)),jw(c.__s,E.getDerivedStateFromProps(v,c.__s))),f=c.props,p=c.state,d)null==E.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==E.getDerivedStateFromProps&&v!==f&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(v,y),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(v,c.__s,y)||t.__v===n.__v){c.props=v,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),c.__h.length&&a.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(v,c.__s,y),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(f,p,h)}))}c.context=y,c.props=v,c.state=c.__s,(l=Bw.__r)&&l(t),c.__d=!1,c.__v=t,c.__P=e,l=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=jw(jw({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(f,p)),b=null!=l&&l.type===Uw&&null==l.key?l.props.children:l,Yw(e,Array.isArray(b)?b:[b],t,n,r,o,i,a,s,u),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),g&&(c.__E=c.__=null),c.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=oA(n.__e,t,n,r,o,i,a,u);(l=Bw.diffed)&&l(t)}catch(e){t.__v=null,(u||null!=i)&&(t.__e=s,t.__h=!!u,i[i.indexOf(s)]=null),Bw.__e(e,t,n)}}function rA(e,t){Bw.__c&&Bw.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Bw.__e(e,t.__v)}}))}function oA(e,t,n,r,o,i,a,s){var u,l,c,d=n.props,f=t.props,p=t.type,h=0;if("svg"===p&&(o=!0),null!=i)for(;h<i.length;h++)if((u=i[h])&&"setAttribute"in u==!!p&&(p?u.localName===p:3===u.nodeType)){e=u,i[h]=null;break}if(null==e){if(null===p)return document.createTextNode(f);e=o?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,f.is&&f),i=null,s=!1}if(null===p)d===f||s&&e.data===f||(e.data=f);else{if(i=i&&Nw.call(e.childNodes),l=(d=n.props||Rw).dangerouslySetInnerHTML,c=f.dangerouslySetInnerHTML,!s){if(null!=i)for(d={},h=0;h<e.attributes.length;h++)d[e.attributes[h].name]=e.attributes[h].value;(c||l)&&(c&&(l&&c.__html==l.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||Qw(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||Qw(e,i,t[i],n[i],r)}(e,f,d,o,s),c)t.__k=[];else if(h=t.props.children,Yw(e,Array.isArray(h)?h:[h],t,n,r,o&&"foreignObject"!==p,i,a,i?i[0]:n.__k&&Gw(n,0),s),null!=i)for(h=i.length;h--;)null!=i[h]&&Hw(i[h]);s||("value"in f&&void 0!==(h=f.value)&&(h!==d.value||h!==e.value||"progress"===p&&!h)&&Qw(e,"value",h,d.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==e.checked&&Qw(e,"checked",h,d.checked,!1))}return e}function iA(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Bw.__e(e,n)}}function aA(e,t,n){var r,o;if(Bw.unmount&&Bw.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||iA(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Bw.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&aA(r[o],t,"function"!=typeof e.type);n||null==e.__e||Hw(e.__e),e.__e=e.__d=void 0}function sA(e,t,n){return this.constructor(e,n)}function uA(e,t,n){var r,o,i;Bw.__&&Bw.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],nA(t,e=(!r&&n||t).__k=zw(Uw,null,[e]),o||Rw,Rw,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?Nw.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),rA(i,e)}Nw=_w.slice,Bw={__e:function(e,t){for(var n,r,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),o=n.__d),o)return n.__E=n}catch(t){e=t}throw e}},Tw=0,kw=function(e){return null!=e&&void 0===e.constructor},Vw.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=jw({},this.state),"function"==typeof e&&(e=e(jw({},n),this.props)),e&&jw(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),qw(this))},Vw.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),qw(this))},Vw.prototype.render=Uw,Fw=[],Iw="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Kw.__r=0,Lw=0;var lA,cA,dA,fA,pA,hA,gA,vA,mA,yA,bA,EA=Object.freeze({__proto__:null,Component:Vw,Fragment:Uw,cloneElement:function(e,t,n){var r,o,i,a=jw({},e.props);for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];return arguments.length>2&&(a.children=arguments.length>3?Nw.call(arguments,2):n),$w(e.type,a,r||e.key,o||e.ref,null)},createContext:function(e,t){var n={__c:t="__cC"+Lw++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(qw)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},createElement:zw,createRef:function(){return{current:null}},h:zw,hydrate:function e(t,n){uA(t,n,e)},get isValidElement(){return kw},get options(){return Bw},render:uA,toChildArray:function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){e(t,n)})):n.push(t)),n}}),CA=E(EA);function DA(){if(fA)return dA;fA=1;const e=cA?lA:(cA=1,lA=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE});return dA=function(t,n){return void 0===n&&(n=document),"string"==typeof t?n.querySelector(t):e(t)?t:null}}function wA(){if(vA)return gA;vA=1;const e=Dw();return gA=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new e([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}}}function AA(){if(yA)return mA;yA=1;var e=CA;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function r(e){return"__private_"+n+++"_"+e}const o=DA(),i=hA?pA:(hA=1,pA=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir}),a=wA();var s=r("updateUI");class u extends a{constructor(){super(...arguments),Object.defineProperty(this,s,{writable:!0,value:void 0})}mount(n,r){const a=r.id,l=o(n);if(l){this.isTargetDOMEl=!0;const r=document.createElement("div");return r.classList.add("uppy-Root"),t(this,s)[s]=function(e){let t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=o,t||(t=Promise.resolve().then((()=>(t=null,e(...n))))),t}}((t=>{this.uppy.getPlugin(this.id)&&((0,e.render)(this.render(t),r),this.afterUpdate())})),this.uppy.log(`Installing ${a} to a DOM element '${n}'`),this.opts.replaceTargetContent&&(l.innerHTML=""),(0,e.render)(this.render(this.uppy.getState()),r),this.el=r,l.appendChild(r),r.dir=this.opts.direction||i(r)||"ltr",this.onMount(),this.el}let c;if("object"==typeof n&&n instanceof u)c=n;else if("function"==typeof n){const e=n;this.uppy.iteratePlugins((t=>{t instanceof e&&(c=t)}))}if(c)return this.uppy.log(`Installing ${a} to ${c.id}`),this.parent=c,this.el=c.addTarget(r),this.onMount(),this.el;this.uppy.log(`Not installing ${a}`);let d=`Invalid target option given to ${a}.`;throw d+="function"==typeof n?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(d)}update(e){var n,r;null!=this.el&&(null==(n=(r=t(this,s))[s])||n.call(r,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove());this.onUnmount()}onMount(){}onUnmount(){}}return mA=u}var SA,xA,OA=(bA||(bA=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return n.debugLogger}});var n=MD();e.exports=Ow();const r=AA();t.UIPlugin=r;const o=wA();t.BasePlugin=o;const i=Ow();t.Uppy=i;const a=AA(),s=wA();i.Uppy=i,i.UIPlugin=a,i.BasePlugin=s,i.debugLogger=n.debugLogger}(RD,RD.exports)),RD.exports),NA=b(OA);function BA(){if(xA)return SA;xA=1;return SA={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=0|n;for(;o--;)r+=e[Math.random()*e.length|0];return r}},SA}var TA,kA,FA,IA,PA,LA,RA,_A,MA,jA,HA={};function zA(){if(kA)return TA;kA=1;class e extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}return TA=e}function $A(){if(jA)return MA;let e;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}jA=1;var n=0;function r(e){return"__private_"+n+++"_"+e}const o=function(){if(IA)return FA;IA=1;const e=zA();return FA=function(){return fetch(...arguments).catch((t=>{throw"AbortError"===t.name?t:new e(t)}))},FA}(),i=function(){if(LA)return PA;LA=1;const e=Cw();class t extends Error{constructor(t,n){void 0===n&&(n={}),super(t),this.cause=n.cause,this.cause&&e(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}}return PA=t}(),a=function(){if(_A)return RA;_A=1;class e extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}return RA=e}();async function s(e){if(401===e.status)throw new a;const t=e.json();if(e.status<200||e.status>300){let n=`Failed request with status: ${e.status}. ${e.statusText}`;try{const e=await t;n=e.message?`${n} message: ${e.message}`:n,n=e.requestId?`${n} request-Id: ${e.requestId}`:n}finally{throw new Error(n)}}return t}var u=r("companionHeaders"),l=r("getPostResponseFunc"),c=r("getUrl"),d=r("errorHandler");e=Symbol.for("uppy test: getCompanionHeaders");class f{constructor(e,n){Object.defineProperty(this,d,{value:h}),Object.defineProperty(this,c,{value:p}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:e=>t=>e?t:this.onReceiveResponse(t)}),this.uppy=e,this.opts=n,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,t(this,u)[u]=null==n?void 0:n.companionHeaders}setCompanionHeaders(e){t(this,u)[u]=e}[e](){return t(this,u)[u]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}headers(){return Promise.resolve({...f.defaultHeaders,...t(this,u)[u]})}onReceiveResponse(e){const t=this.uppy.getState().companion||{},n=this.opts.companionUrl,{headers:r}=e;return r.has("i-am")&&r.get("i-am")!==t[n]&&this.uppy.setState({companion:{...t,[n]:r.get("i-am")}}),e}preflight(e){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(t(this,c)[c](e),{method:"OPTIONS"}).then((e=>(e.headers.has("access-control-allow-headers")&&(this.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map((e=>e.trim().toLowerCase()))),this.preflightDone=!0,this.allowedHeaders.slice()))).catch((e=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${e}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice())))}preflightAndHeaders(e){return Promise.all([this.preflight(e),this.headers()]).then((e=>{let[t,n]=e;return Object.keys(n).forEach((e=>{t.includes(e.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${e}`),delete n[e])})),n}))}get(e,n){return this.preflightAndHeaders(e).then((n=>o(t(this,c)[c](e),{method:"get",headers:n,credentials:this.opts.companionCookiesRule||"same-origin"}))).then(t(this,l)[l](n)).then(s).catch(t(this,d)[d]("get",e))}post(e,n,r){const i="post";return this.preflightAndHeaders(e).then((r=>o(t(this,c)[c](e),{method:i,headers:r,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(n)}))).then(t(this,l)[l](r)).then(s).catch(t(this,d)[d](i,e))}delete(e,n,r){const i="delete";return this.preflightAndHeaders(e).then((t=>o(`${this.hostname}/${e}`,{method:i,headers:t,credentials:this.opts.companionCookiesRule||"same-origin",body:n?JSON.stringify(n):null}))).then(t(this,l)[l](r)).then(s).catch(t(this,d)[d](i,e))}}function p(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function h(e,n){return r=>{var o;return null!=(o=r)&&o.isAuthError||(r=new i(`Could not ${e} ${t(this,c)[c](n)}`,{cause:r})),Promise.reject(r)}}return f.VERSION="2.2.2",f.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${f.VERSION}`},MA=f}var UA,VA,GA,WA,qA,KA,YA,XA,ZA={};function JA(){if(UA)return ZA;return UA=1,Object.defineProperty(ZA,"__esModule",{value:!0}),ZA.getItem=function(e){return Promise.resolve(localStorage.getItem(e))},ZA.removeItem=function(e){return new Promise((t=>{localStorage.removeItem(e),t()}))},ZA.setItem=function(e,t){return new Promise((n=>{localStorage.setItem(e,t),n()}))},ZA}function QA(){if(XA)return HA;XA=1,Object.defineProperty(HA,"__esModule",{value:!0}),HA.Socket=HA.SearchProvider=HA.RequestClient=HA.Provider=void 0;const e=$A();HA.RequestClient=e;const t=function(){if(GA)return VA;GA=1;var e=JA();const t=$A();return VA=class extends t{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then((e=>{let[t,n]=e;const r={};return n&&(r["uppy-auth-token"]=n),this.companionKeysParams&&(r["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...t,...r}}))}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),n=t.getPluginState().authenticated?401!==e.status:e.status<400;return t.setPluginState({authenticated:n}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(e){void 0===e&&(e={});const t=new URLSearchParams(e);return this.preAuthToken&&t.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${t}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const e=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=e.token}catch(e){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then((e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)]))).then((e=>{let[t]=e;return t}))}static initPlugin(t,n,r){if(t.type="acquirer",t.files=[],r&&(t.opts={...r,...n}),n.serverUrl||n.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(n.companionAllowedHosts){const e=n.companionAllowedHosts;if(!("string"==typeof e||Array.isArray(e)||e instanceof RegExp))throw new TypeError(`${t.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);t.opts.companionAllowedHosts=e}else/^(?!https?:\/\/).*$/i.test(n.companionUrl)?t.opts.companionAllowedHosts=`https://${n.companionUrl.replace(/^\/\//,"")}`:t.opts.companionAllowedHosts=new URL(n.companionUrl).origin;t.storage=t.opts.storage||e}},VA}();HA.Provider=t;const n=function(){if(qA)return WA;qA=1;const e=$A();return WA=class extends e{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t?`&${t}`:""}`)}},WA}();HA.SearchProvider=n;const r=function(){if(YA)return KA;let e,t;function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}YA=1;var r=0;function o(e){return"__private_"+r+++"_"+e}const i=ww();var a=o("queued"),s=o("emitter"),u=o("isOpen"),l=o("socket"),c=o("handleMessage");return e=Symbol.for("uppy test: getSocket"),t=Symbol.for("uppy test: getQueued"),KA=class{constructor(e){Object.defineProperty(this,a,{writable:!0,value:[]}),Object.defineProperty(this,s,{writable:!0,value:i()}),Object.defineProperty(this,u,{writable:!0,value:!1}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,c,{writable:!0,value:e=>{try{const t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}}}),this.opts=e,e&&!1===e.autoOpen||this.open()}get isOpen(){return n(this,u)[u]}[e](){return n(this,l)[l]}[t](){return n(this,a)[a]}open(){n(this,l)[l]=new WebSocket(this.opts.target),n(this,l)[l].onopen=()=>{for(n(this,u)[u]=!0;n(this,a)[a].length>0&&n(this,u)[u];){const e=n(this,a)[a].shift();this.send(e.action,e.payload)}},n(this,l)[l].onclose=()=>{n(this,u)[u]=!1},n(this,l)[l].onmessage=n(this,c)[c]}close(){var e;null==(e=n(this,l)[l])||e.close()}send(e,t){n(this,u)[u]?n(this,l)[l].send(JSON.stringify({action:e,payload:t})):n(this,a)[a].push({action:e,payload:t})}on(e,t){n(this,s)[s].on(e,t)}emit(e,t){n(this,s)[s].emit(e,t)}once(e,t){n(this,s)[s].once(e,t)}},KA}();return HA.Socket=r,HA}var eS,tS,nS,rS,oS,iS,aS,sS,uS,lS,cS,dS,fS,pS,hS,gS,vS,mS={};function yS(){if(eS)return mS;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}eS=1,Object.defineProperty(mS,"__esModule",{value:!0}),mS.internalRateLimitedQueue=mS.RateLimitedQueue=void 0;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("activeRequests"),o=n("queuedHandlers"),i=n("paused"),a=n("pauseTimer"),s=n("downLimit"),u=n("upperLimit"),l=n("rateLimitingTimer"),c=n("call"),d=n("queueNext"),f=n("next"),p=n("queue"),h=n("dequeue"),g=n("resume"),v=n("increaseLimit");function m(t){e(this,r)[r]+=1;let n,o=!1;try{n=t()}catch(t){throw e(this,r)[r]-=1,t}return{abort:()=>{o||(o=!0,e(this,r)[r]-=1,n(),e(this,d)[d]())},done:()=>{o||(o=!0,e(this,r)[r]-=1,e(this,d)[d]())}}}function y(){queueMicrotask((()=>e(this,f)[f]()))}function b(){if(e(this,i)[i]||e(this,r)[r]>=this.limit)return;if(0===e(this,o)[o].length)return;const t=e(this,o)[o].shift(),n=e(this,c)[c](t.fn);t.abort=n.abort,t.done=n.done}function E(t,n){void 0===n&&(n={});const r={fn:t,priority:n.priority||0,abort:()=>{e(this,h)[h](r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},i=e(this,o)[o].findIndex((e=>r.priority>e.priority));return-1===i?e(this,o)[o].push(r):e(this,o)[o].splice(i,0,r),r}function C(t){const n=e(this,o)[o].indexOf(t);-1!==n&&e(this,o)[o].splice(n,1)}mS.RateLimitedQueue=class{constructor(t){Object.defineProperty(this,h,{value:C}),Object.defineProperty(this,p,{value:E}),Object.defineProperty(this,f,{value:b}),Object.defineProperty(this,d,{value:y}),Object.defineProperty(this,c,{value:m}),Object.defineProperty(this,r,{writable:!0,value:0}),Object.defineProperty(this,o,{writable:!0,value:[]}),Object.defineProperty(this,i,{writable:!0,value:!1}),Object.defineProperty(this,a,{writable:!0,value:void 0}),Object.defineProperty(this,s,{writable:!0,value:1}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,g,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,v,{writable:!0,value:()=>{if(e(this,i)[i])e(this,l)[l]=setTimeout(e(this,v)[v],0);else{e(this,s)[s]=this.limit,this.limit=Math.ceil((e(this,u)[u]+e(this,s)[s])/2);for(let t=e(this,s)[s];t<=this.limit;t++)e(this,d)[d]();e(this,u)[u]-e(this,s)[s]>3?e(this,l)[l]=setTimeout(e(this,v)[v],2e3):e(this,s)[s]=Math.floor(e(this,s)[s]/2)}}}),this.limit="number"!=typeof t||0===t?1/0:t}run(t,n){return!e(this,i)[i]&&e(this,r)[r]<this.limit?e(this,c)[c](t):e(this,p)[p](t,n)}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];let a;const s=new Promise(((r,i)=>{a=n.run((()=>{let t,n;try{n=Promise.resolve(e(...o))}catch(e){n=Promise.reject(e)}return n.then((e=>{t?i(t):(a.done(),r(e))}),(e=>{t?i(t):(a.done(),i(e))})),()=>{t=new Error("Cancelled")}}),t)}));return s.abort=()=>{a.abort()},s}}resume(){e(this,i)[i]=!1,clearTimeout(e(this,a)[a]);for(let t=0;t<this.limit;t++)e(this,d)[d]()}pause(t){void 0===t&&(t=null),e(this,i)[i]=!0,clearTimeout(e(this,a)[a]),null!=t&&(e(this,a)[a]=setTimeout(e(this,g)[g],t))}rateLimit(t){clearTimeout(e(this,l)[l]),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(e(this,u)[u]=this.limit-1,this.limit=e(this,s)[s],e(this,l)[l]=setTimeout(e(this,v)[v],t))}get isPaused(){return e(this,i)[i]}};const D=Symbol("__queue");return mS.internalRateLimitedQueue=D,mS}function bS(){return hS?pS:(hS=1,pS={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}})}var ES=function(){if(vS)return gS;vS=1;var e=BA(),t=QA(),n=yS();const r=wA(),o=function(){if(nS)return tS;nS=1;const e=eC();return tS=e((function(e,t,n){const{progress:r,bytesUploaded:o,bytesTotal:i}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:o,bytesTotal:i}))}),300,{leading:!0,trailing:!0})}(),i=oS?rS:(oS=1,rS=function(e){const t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${t}`}),a=aS?iS:(aS=1,iS=function(e){const t=[],n=[];function r(e){t.push(e)}function o(e){n.push(e)}return Promise.all(e.map((e=>e.then(r,o)))).then((()=>({successful:t,failed:n})))}),s=function(){if(uS)return sS;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}uS=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("emitter"),o=n("events");return sS=class{constructor(t){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:[]}),e(this,r)[r]=t}on(t,n){return e(this,o)[o].push([t,n]),e(this,r)[r].on(t,n)}remove(){for(const[t,n]of e(this,o)[o].splice(0))e(this,r)[r].off(t,n)}},sS}(),u=function(){if(cS)return lS;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}cS=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("aliveTimer"),o=n("isDone"),i=n("onTimedOut"),a=n("timeout");return lS=class{constructor(t,n){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:!1}),Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),e(this,a)[a]=t,e(this,i)[i]=n}progress(){e(this,o)[o]||e(this,a)[a]>0&&(clearTimeout(e(this,r)[r]),e(this,r)[r]=setTimeout(e(this,i)[i],e(this,a)[a]))}done(){e(this,o)[o]||(clearTimeout(e(this,r)[r]),e(this,r)[r]=null,e(this,o)[o]=!0)}}}(),l=zA(),c=fS?dS:(fS=1,dS=function(e){return!!e&&(0!==e.readyState&&4!==e.readyState||0===e.status)}),d=bS();function f(e,t){let n=t;return n||(n=new Error("Upload error")),"string"==typeof n&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),c(e)?(n=new l(n,e),n):(n.request=e,n)}function p(e){return e.data.slice(0,e.data.size,e.meta.type)}class h extends r{constructor(e,t){super(e,t),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=d;const r={formData:!0,fieldName:t.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(t){let n={};try{n=JSON.parse(t)}catch(t){e.log(t)}return n},getResponseError(e,t){let n=new Error("Upload error");return c(t)&&(n=new l(n,t)),n},validateStatus:e=>e>=200&&e<300};if(this.opts={...r,...t},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),n.internalRateLimitedQueue in this.opts?this.requests=this.opts[n.internalRateLimitedQueue]:this.requests=new n.RateLimitedQueue(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(e){const t=this.uppy.getState().xhrUpload,{headers:n}=this.opts,r={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return"function"==typeof n?r.headers=n(e):Object.assign(r.headers,this.opts.headers),t&&Object.assign(r.headers,t.headers),e.xhrUpload&&Object.assign(r.headers,e.xhrUpload.headers),r}addMetadata(e,t,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(t)).forEach((n=>{e.append(n,t[n])}))}createFormDataUpload(e,t){const n=new FormData;this.addMetadata(n,e.meta,t);const r=p(e);return e.name?n.append(t.fieldName,r,e.meta.name):n.append(t.fieldName,r),n}createBundledUpload(e,t){const n=new FormData,{meta:r}=this.uppy.getState();return this.addMetadata(n,r,t),e.forEach((e=>{const t=this.getOptions(e),r=p(e);e.name?n.append(t.fieldName,r,e.name):n.append(t.fieldName,r)})),n}upload(t,n,r){const o=this.getOptions(t);return this.uppy.log(`uploading ${n} of ${r}`),new Promise(((n,r)=>{this.uppy.emit("upload-started",t);const i=o.formData?this.createFormDataUpload(t,o):t.data,a=new XMLHttpRequest;let l;this.uploaderEvents[t.id]=new s(this.uppy);const c=new u(o.timeout,(()=>{a.abort(),l.done();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(o.timeout/1e3)}));this.uppy.emit("upload-error",t,e),r(e)})),d=(0,e.nanoid)();a.upload.addEventListener("loadstart",(()=>{this.uppy.log(`[XHRUpload] ${d} started`)})),a.upload.addEventListener("progress",(e=>{this.uppy.log(`[XHRUpload] ${d} progress: ${e.loaded} / ${e.total}`),c.progress(),e.lengthComputable&&this.uppy.emit("upload-progress",t,{uploader:this,bytesUploaded:e.loaded,bytesTotal:e.total})})),a.addEventListener("load",(()=>{if(this.uppy.log(`[XHRUpload] ${d} finished`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),o.validateStatus(a.status,a.responseText,a)){const e=o.getResponseData(a.responseText,a),r=e[o.responseUrlFieldName],i={status:a.status,body:e,uploadURL:r};return this.uppy.emit("upload-success",t,i),r&&this.uppy.log(`Download ${t.name} from ${r}`),n(t)}const e=o.getResponseData(a.responseText,a),i=f(a,o.getResponseError(a.responseText,a)),s={status:a.status,body:e};return this.uppy.emit("upload-error",t,i,s),r(i)})),a.addEventListener("error",(()=>{this.uppy.log(`[XHRUpload] ${d} errored`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null);const e=f(a,o.getResponseError(a.responseText,a));return this.uppy.emit("upload-error",t,e),r(e)})),a.open(o.method.toUpperCase(),o.endpoint,!0),a.withCredentials=o.withCredentials,""!==o.responseType&&(a.responseType=o.responseType),l=this.requests.run((()=>{this.uppy.emit("upload-started",t);const e=this.getOptions(t);return Object.keys(e.headers).forEach((t=>{a.setRequestHeader(t,e.headers[t])})),a.send(i),()=>{c.done(),a.abort()}})),this.onFileRemove(t.id,(()=>{l.abort(),r(new Error("File removed"))})),this.onCancelAll(t.id,(e=>{let{reason:t}=e;"user"===t&&l.abort(),r(new Error("Upload cancelled"))}))}))}uploadRemote(e){const n=this.getOptions(e);return new Promise(((r,a)=>{this.uppy.emit("upload-started",e);const u={};(Array.isArray(n.metaFields)?n.metaFields:Object.keys(e.meta)).forEach((t=>{u[t]=e.meta[t]}));new(e.remote.providerOptions.provider?t.Provider:t.RequestClient)(this.uppy,e.remote.providerOptions).post(e.remote.url,{...e.remote.body,endpoint:n.endpoint,size:e.data.size,fieldname:n.fieldName,metadata:u,httpMethod:n.method,useFormData:n.formData,headers:n.headers}).then((u=>{const{token:l}=u,c=i(e.remote.companionUrl),d=new t.Socket({target:`${c}/api/${l}`,autoOpen:!1});let f;this.uploaderEvents[e.id]=new s(this.uppy),this.onFileRemove(e.id,(()=>{d.send("cancel",{}),f.abort(),r(`upload ${e.id} was removed`)})),this.onCancelAll(e.id,(function(t){let{reason:n}=void 0===t?{}:t;"user"===n&&(d.send("cancel",{}),f.abort()),r(`upload ${e.id} was canceled`)})),this.onRetry(e.id,(()=>{d.send("pause",{}),d.send("resume",{})})),this.onRetryAll(e.id,(()=>{d.send("pause",{}),d.send("resume",{})})),d.on("progress",(t=>o(this,t,e))),d.on("success",(t=>{const o=n.getResponseData(t.response.responseText,t.response),i=o[n.responseUrlFieldName],a={status:t.response.status,body:o,uploadURL:i};return this.uppy.emit("upload-success",e,a),f.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),r()})),d.on("error",(t=>{const r=t.response,o=r?n.getResponseError(r.responseText,r):Object.assign(new Error(t.error.message),{cause:t.error});this.uppy.emit("upload-error",e,o),f.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),a(o)})),f=this.requests.run((()=>(d.open(),e.isPaused&&d.send("pause",{}),()=>d.close())))})).catch((t=>{this.uppy.emit("upload-error",e,t),a(t)}))}))}uploadBundle(e){return new Promise(((t,n)=>{const{endpoint:r}=this.opts,{method:o}=this.opts,i=this.uppy.getState().xhrUpload,a=this.createBundledUpload(e,{...this.opts,...i||{}}),s=new XMLHttpRequest,l=t=>{e.forEach((e=>{this.uppy.emit("upload-error",e,t)}))},c=new u(this.opts.timeout,(()=>{s.abort();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));l(e),n(e)}));s.upload.addEventListener("loadstart",(()=>{this.uppy.log("[XHRUpload] started uploading bundle"),c.progress()})),s.upload.addEventListener("progress",(t=>{c.progress(),t.lengthComputable&&e.forEach((e=>{this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})}))})),s.addEventListener("load",(r=>{if(c.done(),this.opts.validateStatus(r.target.status,s.responseText,s)){const n=this.opts.getResponseData(s.responseText,s),o={status:r.target.status,body:n};return e.forEach((e=>{this.uppy.emit("upload-success",e,o)})),t()}const o=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return o.request=s,l(o),n(o)})),s.addEventListener("error",(()=>{c.done();const e=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return l(e),n(e)})),this.uppy.on("cancel-all",(function(e){let{reason:t}=void 0===e?{}:e;"user"===t&&(c.done(),s.abort())})),s.open(o.toUpperCase(),r,!0),s.withCredentials=this.opts.withCredentials,""!==this.opts.responseType&&(s.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach((e=>{s.setRequestHeader(e,this.opts.headers[e])})),s.send(a),e.forEach((e=>{this.uppy.emit("upload-started",e)}))}))}uploadFiles(e){const t=e.map(((t,n)=>{const r=parseInt(n,10)+1,o=e.length;return t.error?Promise.reject(new Error(t.error)):t.isRemote?this.uploadRemote(t,r,o):this.upload(t,r,o)}));return a(t)}onFileRemove(e,t){this.uploaderEvents[e].on("file-removed",(n=>{e===n.id&&t(n.id)}))}onRetry(e,t){this.uploaderEvents[e].on("upload-retry",(n=>{e===n&&t()}))}onRetryAll(e,t){this.uploaderEvents[e].on("retry-all",(()=>{this.uppy.getFile(e)&&t()}))}onCancelAll(e,t){var n=this;this.uploaderEvents[e].on("cancel-all",(function(){n.uppy.getFile(e)&&t(...arguments)}))}handleUpload(e){if(0===e.length)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();0!==this.opts.limit||this.opts[n.internalRateLimitedQueue]||this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const t=e.map((e=>this.uppy.getFile(e)));if(this.opts.bundle){if(t.some((e=>e.isRemote)))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if("function"==typeof this.opts.headers)throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(t)}return this.uploadFiles(t).then((()=>null))}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}}return h.VERSION="2.1.3",gS=h}(),CS=b(ES);function DS(e){var t=e.server,n=void 0===t?"":t,r=e.fieldName,o=void 0===r?"":r,i=e.maxFileSize,a=void 0===i?10485760:i,s=e.maxNumberOfFiles,u=void 0===s?100:s,l=e.meta,c=void 0===l?{}:l,d=e.metaWithUrl,f=void 0!==d&&d,p=e.headers,h=void 0===p?{}:p,g=e.withCredentials,v=void 0!==g&&g,m=e.timeout,y=void 0===m?1e4:m,b=e.onBeforeUpload,E=void 0===b?function(e){return e}:b,C=e.onSuccess,D=void 0===C?function(e,t){}:C,w=e.onError,A=void 0===w?function(e,t,n){console.error("".concat(e.name," upload error"),t,n)}:w,S=e.onProgress,x=void 0===S?function(e){}:S;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!o)throw new Error("Cannot get fieldName\n没有配置 fieldName");var O=n;f&&(O=function(e,t){var n=zg(e.split("#"),2),r=n[0],o=n[1],i=[];Zg(t,(function(e,t){i.push("".concat(t,"=").concat(e))}));var a=i.join("&");return r=r.indexOf("?")>0?"".concat(r,"&").concat(a):"".concat(r,"?").concat(a),o?"".concat(r,"#").concat(o):r}(O,c));var N=new NA(_g({onBeforeUpload:E,restrictions:{maxFileSize:a,maxNumberOfFiles:u},meta:c},e.uppyConfig)).use(CS,_g({endpoint:O,headers:h,formData:!0,fieldName:o,bundle:!0,withCredentials:v,timeout:y},e.xhrConfig));return N.on("complete",(function(e){var t=e.successful[0],n=t.response,r=(null!=n?n:{}).body,o=void 0===r?{}:r;try{D(t,o)}catch(e){console.error("wangEditor upload file - onSuccess error",e)}})),N.on("progress",(function(e){e<1||x(e)})),N.on("upload-error",(function(e,t,n){try{A(e,t,n)}catch(e){console.error("wangEditor upload file - onError error",e)}})),N.on("restriction-failed",(function(e,t){try{A(e,t)}catch(e){console.error("wangEditor upload file - onError error",e)}})),N}SE("en",{editor:{more:"More",justify:"Justify",indent:"Indent",image:"Image",video:"Video"}}),SE("zh-CN",{editor:{more:"更多",justify:"对齐",indent:"缩进",image:"图片",video:"视频"}});var wS,AS,SS,xS,OS,NS,BS,TS,kS,FS,IS,PS,LS,RS,_S,MS={};function jS(){if(AS)return wS;AS=1;var e=A();return wS=Array.isArray||function(t){return"Array"===e(t)}}function HS(){if(xS)return SS;xS=1;var e=w(),t=C(),n=me(),r=Tr(),o=zt(),i=Sn(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return f.sham=!0,SS=!s||t((function(){var e;return d(d.call)||!d(Object)||!d((function(){e=!0}))||e}))?f:d}function zS(){if(NS)return OS;NS=1;var e=jS(),t=HS(),n=ye(),r=ve()("species"),o=Array;return OS=function(i){var a;return e(i)&&(a=i.constructor,(t(a)&&(a===o||e(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a},OS}function $S(){if(TS)return BS;TS=1;var e=zS();return BS=function(t,n){return new(e(t))(0===n?0:n)}}function US(){if(PS)return IS;PS=1;var e=C();return IS=function(t,n){var r=[][t];return!!r&&e((function(){r.call(null,n||function(){return 1},1)}))}}function VS(){if(RS)return LS;RS=1;var e=function(){if(FS)return kS;FS=1;var e=zo(),t=w(),n=S(),r=ce(),o=Jt(),i=$S(),a=t([].push),s=function(t){var s=1===t,u=2===t,l=3===t,c=4===t,d=6===t,f=7===t,p=5===t||d;return function(h,g,v,m){for(var y,b,E=r(h),C=n(E),D=o(C),w=e(g,v),A=0,S=m||i,x=s?S(h,D):u||f?S(h,0):void 0;D>A;A++)if((p||A in C)&&(b=w(y=C[A],A,E),t))if(s)x[A]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:a(x,y)}else switch(t){case 4:return!1;case 7:a(x,y)}return d?-1:l||c?c:x}};return kS={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}().forEach,t=US()("forEach");return LS=t?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},LS}!function(){if(_S)return MS;_S=1;var e=B(),t=ii(),n=ai(),r=VS(),o=ln(),i=function(e){if(e&&e.forEach!==r)try{o(e,"forEach",r)}catch(t){e.forEach=r}};for(var a in t)t[a]&&i(e[a]&&e[a].prototype);i(n)}();SE("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",cancelTitle:"Cancel full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",editSize:"Edit size",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link",ok:"Ok",width:"Width",height:"Height"},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"},formatPainter:{title:"Format Painter"}}),SE("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:"全屏",cancelTitle:"取消全屏"},header:{title:"标题",text:"正文"},image:{netImage:"网络图片",delete:"删除图片",edit:"编辑图片",editSize:"修改尺寸",viewLink:"查看链接",src:"图片地址",desc:"图片描述",link:"图片链接",ok:"确定",width:"宽度",height:"高度"},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:"待办"},formatPainter:{title:"格式刷"}});var GS={type:"blockquote",elemToHtml:function(e,t){return"<blockquote>".concat(t,"</blockquote>")}},WS='<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>',qS='<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>',KS='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>',YS=function(){function e(){this.title=BE("blockQuote.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!py.getSelectedNodeByType(e,"blockquote")},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=zg(Mh.nodes(e,{match:function(e){var t=py.getNodeType(e);return"paragraph"===t||"blockquote"===t},universal:!0,mode:"highest"}),1);return!t[0]},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.isActive(e)?"paragraph":"blockquote";Og.setNodes(e,{type:n},{mode:"highest"})}},e}(),XS={key:"blockquote",factory:function(){return new YS}};function ZS(e){return 0===Mv("<div>".concat(e,"</div>")).children().filter((function(e){return"BR"!==e.tagName})).length}function JS(e){return 0===e.length?"":e[0].outerHTML}function QS(e){return e.length?e[0].tagName.toLowerCase():""}function ex(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}em&&(Mv.fn.css=em),am&&(Mv.fn.append=am),sm&&(Mv.fn.prepend=sm),jv&&(Mv.fn.addClass=jv),Hv&&(Mv.fn.removeClass=Hv),zv&&(Mv.fn.hasClass=zv),qv&&(Mv.fn.on=qv),Kv&&(Mv.fn.off=Kv),mm&&(Mv.fn.focus=mm),$v&&(Mv.fn.attr=$v),Uv&&(Mv.fn.removeAttr=Uv),Jv&&(Mv.fn.hide=Jv),Qv&&(Mv.fn.show=Qv),lm&&(Mv.fn.parents=lm),Gv&&(Mv.fn.dataset=Gv),Wv&&(Mv.fn.val=Wv),om&&(Mv.fn.text=om),rm&&(Mv.fn.html=rm),dm&&(Mv.fn.children=dm),fm&&(Mv.fn.remove=fm),cm&&(Mv.fn.find=cm),Yv&&(Mv.fn.width=Yv),Xv&&(Mv.fn.height=Xv),nm&&(Mv.fn.filter=nm),pm&&(Mv.fn.empty=pm);var tx={selector:"blockquote:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Mv(e);return 0===(t=t.filter((function(e){return!!lg.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"blockquote",children:t}}};function nx(e){e.deleteBackward("character");Og.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var rx={type:"blockquote",renderElem:function(e,t,n){return sD("blockquote",null,t)}},ox={renderElems:[rx],elemsToHtml:[GS],parseElemsHtml:[tx],menus:[XS],editorPlugin:function(e){var t=e.insertBreak,n=e.insertText,r=e;return r.insertBreak=function(){var o=r.selection;if(null==o)return t();var i=zg(Mh.nodes(e,{match:function(e){return py.checkNodeType(e,"blockquote")},universal:!0}),1),a=i[0];if(!a)return t();var s=a[0];if(py.getParentNode(e,s)){var u=py.findPath(e,s),l=Mh.end(e,u);if(Jh.equals(l,o.focus)){var c=Vh.string(s);if(c&&"\n"===c.slice(-1))return void nx(r)}n("\n")}else nx(r)},r}};var ix={type:"code",elemToHtml:function(e,t){return"<code>".concat(t,"</code>")}};var ax={type:"pre",elemToHtml:function(e,t){return"<pre>".concat(t,"</pre>")}},sx=function(){function e(){this.title=BE("codeBlock.title"),this.iconSvg='<svg viewBox="0 0 1280 1024"><path d="M832 736l96 96 320-320L928 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224zM701.312 150.528l69.472 18.944-192 704.032-69.472-18.944 192-704.032z"></path></svg>',this.tag="button"}return e.prototype.getSelectCodeElem=function(e){var t=py.getSelectedNodeByType(e,"code");if(null==t)return null;var n=py.getParentNode(e,t);return null==n||"pre"!==py.getNodeType(n)?null:t},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);return null==t?"":t.language||""},e.prototype.isActive=function(e){return!!this.getSelectCodeElem(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=py.getSelectedElems(e);return!!t.some((function(t){return e.isVoid(t)}))||!t.some((function(e){var t=py.getNodeType(e);return"pre"===t||"paragraph"===t}))},e.prototype.exec=function(e,t){this.isActive(e)?this.changeToPlainText(e):this.changeToCodeBlock(e,t.toString())},e.prototype.changeToPlainText=function(e){var t=this.getSelectCodeElem(e);if(null!=t){var n=Vh.string(t);Og.removeNodes(e,{mode:"highest"});var r=n.split("\n").map((function(e){return{type:"paragraph",children:[{text:e}]}}));Og.insertNodes(e,r,{mode:"highest"})}},e.prototype.changeToCodeBlock=function(e,t){var n,r,o=[],i=Mh.nodes(e,{match:function(t){return e.children.includes(t)},universal:!0});try{for(var a=Hg(i),s=a.next();!s.done;s=a.next()){var u=zg(s.value,1)[0];u&&o.push(Vh.string(u))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}Og.removeNodes(e,{mode:"highest"});var l={type:"pre",children:[{type:"code",language:t,children:[{text:o.join("\n")}]}]};Og.insertNodes(e,l,{mode:"highest"})},e}();var ux={selector:"pre:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Mv(e);return 0===(t=t.filter((function(e){return"code"===py.getNodeType(e)}))).length&&(t=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:t.filter((function(e){return"code"===py.getNodeType(e)}))}}};var lx={type:"pre",renderElem:function(e,t,n){return sD("pre",null,t)}},cx={type:"code",renderElem:function(e,t,n){return sD("code",null,t)}},dx={menus:[{key:"codeBlock",factory:function(){return new sx}}],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData,o=e.handleTab,i=e;return i.insertBreak=function(){var e=py.getSelectedNodeByType(i,"code");if(null!=e){var n=function(e,t){var n=t.selection;if(null==n)return"";var r=Vh.string(e),o=n.anchor.offset,i=r.slice(0,o).split("\n"),a=i.length;return 0===a?"":i[a-1]}(e,i);if(n){var r=n.match(/^\s+/);if(null!=r&&null!=r[0]){var o=r[0];return void i.insertText("\n".concat(o))}}i.insertText("\n")}else t()},e.handleTab=function(){var t=e.selection;if(t){var n=py.getSelectedNodeByType(e,"code");if(n&&!ng.isCollapsed(t)){var r=zg([t.anchor,t.focus].sort((function(e,t){return e.offset-t.offset})),2),i=r[0],a=r[1],s=n.children[0].text,u=s.split("\n"),l=s.slice(0,i.offset).split("\n").length-1,c=s.slice(0,a.offset).split("\n").length-1,d=u.map((function(e,t){return t>=l&&t<=c?" ".concat(e):e})),f=d.join("\n"),p={anchor:{path:i.path,offset:i.offset+2},focus:{path:a.path,offset:a.offset+2}};Og.insertText(e,f,{at:{anchor:{path:i.path,offset:0},focus:{path:a.path,offset:s.length}}}),Og.select(e,p)}else o()}},i.normalizeNode=function(e){var t=zg(e,2),r=t[0],o=t[1],a=py.getNodeType(r);("code"===a&&o.length<=1&&Og.setNodes(i,{type:"paragraph"},{at:o}),"pre"===a)&&(py.isLastNode(i,r)&&Og.insertNodes(i,py.genEmptyParagraph(),{at:[o[0]+1]}),"code"!==py.getNodeType(r.children[0])&&(Og.unwrapNodes(i),Og.setNodes(i,{type:"paragraph"},{mode:"highest"})));return n([r,o])},i.insertData=function(e){if(null!=py.getSelectedNodeByType(i,"code")){var t=e.getData("text/plain");Mh.insertText(i,t)}else r(e)},i},renderElems:[lx,cx],elemsToHtml:[ix,ax],preParseHtml:[{selector:"pre>code",preParseHtml:function(e){var t=Mv(e);if("code"!==QS(t))return e;var n=t.find("xmp");if(0===n.length)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:"pre:not([data-w-e-type])>code",parseElemHtml:function(e,t,n){return{type:"code",language:"",children:[{text:Mv(e)[0].textContent||""}]}}},ux]},fx=function(){function e(){this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){var t=this.mark,n=Mh.marks(e);return n&&n[t]?n[t]:""},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=zg(Mh.nodes(e,{match:function(t){return"pre"===py.getNodeType(t)||!!Mh.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){var t=this.mark;if(null==this.$content){var n=Mv('<ul class="w-e-panel-content-color"></ul>');n.on("click","li",(function(n){var r=n.target;if(null!=r&&(n.preventDefault(),null!=e.selection)){var o=Mv(r).attr("data-value");"0"===o?Mh.removeMark(e,t):Mh.addMark(e,t,o)}})),this.$content=n}var r=this.$content;if(null==r)return document.createElement("ul");r.empty();var o=this.getValue(e),i=e.getMenuConfig(t).colors;(void 0===i?[]:i).forEach((function(e){var t=Mv('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=Mv('<li data-value="'.concat(e,'"></li>'));o===e&&n.addClass("active"),n.append(t),r.append(n)}));var a="";"color"===t&&(a=BE("color.default")),"bgColor"===t&&(a=BE("color.clear"));var s=Mv('\n <li data-value="0" class="clear">\n '.concat('<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 ").concat(a,"\n </li>\n "));return r.prepend(s),r[0]},e}(),px=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title=BE("color.bgColor"),t.iconSvg='<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>',t.mark="bgColor",t}return Rg(t,e),t}(fx),hx=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title=BE("color.color"),t.iconSvg='<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>',t.mark="color",t}return Rg(t,e),t}(fx),gx=["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 vx={selector:"font",preParseHtml:function(e){var t=Mv(e);if("font"!==QS(t))return e;var n=t.attr("color")||"";return n&&(t.removeAttr("color"),t.css("color",n)),t[0]}};function mx(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var yx={renderStyle:function(e,t){var n=e,r=n.color,o=n.bgColor,i=t;return r&&mx(i,{color:r}),o&&mx(i,{backgroundColor:o}),i},styleToHtml:function(e,t){if(!lg.isText(e))return t;var n,r=e,o=r.color,i=r.bgColor;return o||i?((ZS(t)||"span"!==QS(n=Mv(t)))&&(n=Mv("<span>".concat(t,"</span>"))),o&&n.css("color",o),i&&n.css("background-color",i),JS(n)):t},preParseHtml:[vx],parseStyleHtml:function(e,t,n){var r=Mv(e);if(!lg.isText(t))return t;var o=t,i=ex(r,"color");i&&(o.color=i);var a=ex(r,"background-color");return a||(a=ex(r,"background")),a&&(o.bgColor=a),o},menus:[{key:"color",factory:function(){return new hx},config:{colors:gx}},{key:"bgColor",factory:function(){return new px},config:{colors:gx}}]},bx=function(){function e(){this.title=BE("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!!ng.isExpanded(t)},e.prototype.exec=function(e,t){var n=e.selection;if(null!=n){var r=[n.anchor.path[0]];Og.insertNodes(e,{type:"paragraph",children:[{text:""}]},{at:r}),e.select(Mh.start(e,r))}},e}(),Ex={menus:[{key:"enter",factory:function(){return new bx}}]};var Cx={type:"divider",elemToHtml:function(e,t){return"<hr/>"}},Dx=function(){function e(){this.title=BE("divider.title"),this.iconSvg='<svg viewBox="0 0 1092 1024"><path d="M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!py.getSelectedElems(e).some((function(t){if(e.isVoid(t))return!0;var n=py.getNodeType(t);return"table"===n||"pre"===n}))},e.prototype.exec=function(e,t){py.isSelectedEmptyParagraph(e)&&Og.removeNodes(e,{mode:"highest"}),Og.insertNodes(e,{type:"divider",children:[{text:""}]},{mode:"highest"})},e}();var wx={renderElems:[{type:"divider",renderElem:function(e,t,n){return HC("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:py.isNodeSelected(n,e)?"true":""},style:{},on:{mousedown:function(e){return e.preventDefault()}}},[HC("hr")])}}],elemsToHtml:[Cx],parseElemsHtml:[{selector:"hr:not([data-w-e-type])",parseElemHtml:function(e,t,n){return{type:"divider",children:[{text:""}]}}}],menus:[{key:"divider",factory:function(){return new Dx}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"divider"===e.type||t(e)},r.normalizeNode=function(e){var t=zg(e,2),o=t[0],i=t[1];if("divider"!==py.getNodeType(o))return n([o,i]);py.isLastNode(r,o)&&Og.insertNodes(r,py.genEmptyParagraph(),{at:[i[0]+1]})},r}};var Ax=function(){function e(){this.title=BE("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=zg(Mh.nodes(e,{match:function(t){return"pre"===py.getNodeType(t)||!!Mh.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){if(null==this.$content){var t=Mv('<ul class="w-e-panel-content-emotion"></ul>');t.on("click","li",(function(t){var n=t.target;if(null!=n){t.preventDefault();var r=Mv(n).text();e.insertText(r)}})),this.$content=t}var n=this.$content;if(null==n)return document.createElement("ul");n.empty();var r=e.getMenuConfig("emotion").emotions;return(void 0===r?[]:r).forEach((function(e){var t=Mv("<li>".concat(e,"</li>"));n.append(t)})),n[0]},e}(),Sx={menus:[{key:"emotion",factory:function(){return new Ax},config:{emotions:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(" ")}}]};var xx=function(){function e(){this.tag="select",this.width=80}return e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.mark,n=Mh.marks(e);return n&&n[t]?n[t]:""},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=zg(Mh.nodes(e,{match:function(t){return"pre"===py.getNodeType(t)||!!Mh.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.exec=function(e,t){var n=this.mark;t?e.addMark(n,t):e.removeMark(n)},e}(),Ox=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title=BE("fontFamily.title"),t.iconSvg='<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>',t.mark="fontFamily",t.selectPanelWidth=150,t}return Rg(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontFamilyList,r=void 0===n?[]:n;t.push({text:BE("fontFamily.default"),value:""}),r.forEach((function(e){if("string"==typeof e)t.push({text:e,value:e,styleForRenderMenuList:{"font-family":e}});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r,styleForRenderMenuList:{"font-family":r}})}}));var o=this.getValue(e),i=!1;return t.forEach((function(e){e.value===o?(i=!0,e.selected=!0):e.selected=void 0})),i||"string"!=typeof o||t.push({text:o,value:o,selected:!0}),t},t}(xx),Nx=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title=BE("fontSize.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',t.mark="fontSize",t}return Rg(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontSizeList,r=void 0===n?[]:n;t.push({text:BE("fontSize.default"),value:""}),r.forEach((function(e){if("string"==typeof e)t.push({text:e,value:e});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r})}}));var o=this.getValue(e),i=!1;return t.forEach((function(e){e.value===o?(i=!0,e.selected=!0):e.selected=void 0})),i||"string"!=typeof o||t.push({text:o,value:o,selected:!0}),t},t}(xx);var Bx={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"};var Tx={renderStyle:function(e,t){var n=e,r=n.fontSize,o=n.fontFamily,i=t;return r&&mx(i,{fontSize:r}),o&&mx(i,{fontFamily:o}),i},styleToHtml:function(e,t){if(!lg.isText(e))return t;var n,r=e,o=r.fontSize,i=r.fontFamily;return o||i?((ZS(t)||"span"!==QS(n=Mv(t)))&&(n=Mv("<span>".concat(t,"</span>"))),o&&n.css("font-size",o),i&&n.css("font-family",i),JS(n)):t},preParseHtml:[{selector:"font",preParseHtml:function(e){var t=Mv(e);if("font"!==QS(t))return e;var n=t.attr("size")||"";n&&(t.removeAttr("size"),t.css("font-size",Bx[n]));var r=t.attr("face")||"";return r&&(t.removeAttr("face"),t.css("font-family",r)),t[0]}}],parseStyleHtml:function(e,t,n){var r=Mv(e);if(!lg.isText(t))return t;var o=t,i=ex(r,"font-size");i&&(o.fontSize=i);var a=ex(r,"font-family").replace(/"/g,"");return a&&(o.fontFamily=a),o},menus:[{key:"fontSize",factory:function(){return new Nx},config:{fontSizeList:["12px",{name:"13px",value:"13px"},"14px","15px","16px","19px",{name:"22px",value:"22px"},"24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new Ox},config:{fontFamilyList:["黑体",{name:"仿宋",value:"仿宋"},"楷体","标楷体","华文仿宋","华文楷体",{name:"宋体",value:"宋体"},"微软雅黑","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]};var kx=function(){function e(){this.title=BE("formatPainter.title"),this.iconSvg='<svg viewBox="0 0 24 24"><path d="M8 19.997v-5h2v5h9v-7H5v7zm-4-9h16v-3h-6v-4h-4v4H4zm-1 10v-8H2v-6a1 1 0 0 1 1-1h5v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v3h5a1 1 0 0 1 1 1v6h-1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(t){return e.attrs.isSelect},e.prototype.isDisabled=function(e){return!1},e.prototype.setFormatHtml=function(t){var n,r;if(t.getSelectionText().length){if(e.attrs.formatStyle){!function(e){var t=Mh.marks(e);t&&Object.keys(t).forEach((function(t){e.removeMark(t)}))}(t);try{for(var o=Hg(Object.entries(e.attrs.formatStyle)),i=o.next();!i.done;i=o.next()){var a=zg(i.value,2),s=a[0],u=a[1];t.addMark(s,u)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}e.attrs.formatStyle=null,e.attrs.isSelect=!1}},e.prototype.exec=function(t){e.attrs.isSelect?(e.attrs.isSelect=!1,e.attrs.formatStyle=null):t.getSelectionText().length&&(e.attrs.formatStyle=Mh.marks(t),e.attrs.isSelect=!0);t.blur(),t.focus()},e.attrs={isSelect:!1,formatStyle:null},e}();var Fx={menus:[{key:"formatPainter",factory:function(){return new kx}}],editorPlugin:function(e){var t=new kx,n=e.onChange,r=e,o=function(){t.setFormatHtml(r),document.removeEventListener("mouseup",o)};return r.onChange=function(){n(),kx.attrs.isSelect&&(document.removeEventListener("mouseup",o),document.addEventListener("mouseup",o))},r}},Ix=function(){function e(){this.title=BE("fullScreen.title"),this.iconSvg=KS,this.tag="button",this.alwaysEnable=!0}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return e.isFullScreen},e.prototype.isDisabled=function(e){return!1},e.prototype.getIcon=function(e){return e.isFullScreen?KS:'<svg t="1723361745825" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8705" width="200" height="200"><path d="M703.926857 362.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V128a42.642286 42.642286 0 1 1 85.357715 0v149.357714h149.357714c21.211429 0 38.765714 15.433143 42.057143 35.693715l0.585143 6.948571a42.642286 42.642286 0 0 1-42.642286 42.642286H703.926857zM703.926857 938.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V704c0-23.552 19.090286-42.642286 42.642286-42.642286h192.073143a42.642286 42.642286 0 1 1 0 85.284572l-149.357714 0.073143v149.284571c0 21.211429-15.506286 38.765714-35.84 42.130286l-6.875429 0.512zM319.853714 938.642286a42.642286 42.642286 0 0 1-42.642285-42.642286v-149.284571H127.853714a42.642286 42.642286 0 0 1-42.130285-35.84l-0.585143-6.875429c0-23.552 19.163429-42.642286 42.715428-42.642286h192c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286zM127.853714 362.642286a42.642286 42.642286 0 1 1 0-85.284572H277.211429V128c0-21.211429 15.433143-38.765714 35.766857-42.130286l6.875428-0.512c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286H127.853714z" fill="#333333" p-id="8706"></path></svg>'},e.prototype.getTitle=function(e){return e.isFullScreen?BE("fullScreen.title"):BE("fullScreen.cancelTitle")},e.prototype.exec=function(e,t){e.isFullScreen?e.unFullScreen():e.fullScreen()},e}(),Px={menus:[{key:"fullScreen",factory:function(){return new Ix}}]};function Lx(e){return function(t,n){return"<h".concat(e,">").concat(n,"</h").concat(e,">")}}var Rx={type:"header1",elemToHtml:Lx(1)},_x={type:"header2",elemToHtml:Lx(2)},Mx={type:"header3",elemToHtml:Lx(3)},jx={type:"header4",elemToHtml:Lx(4)},Hx={type:"header5",elemToHtml:Lx(5)},zx={type:"header6",elemToHtml:Lx(6)};function $x(e){var t=zg(Mh.nodes(e,{match:function(e){return py.getNodeType(e).startsWith("header")},universal:!0}),1),n=t[0];if(null==n)return"paragraph";var r=zg(n,1)[0];return py.getNodeType(r)}function Ux(e){if(null==e.selection)return!0;var t=zg(Mh.nodes(e,{match:function(e){var t=py.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1);return!t[0]}function Vx(e,t){t&&Og.setNodes(e,{type:t})}var Gx=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return $x(e)},e.prototype.isActive=function(e){return this.getValue(e)===this.type},e.prototype.isDisabled=function(e){return Ux(e)},e.prototype.exec=function(e,t){var n=this.type;Vx(e,t===n?"paragraph":n)},e}(),Wx=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title="H1",t.type="header1",t}return Rg(t,e),t}(Gx),qx=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title="H2",t.type="header2",t}return Rg(t,e),t}(Gx),Kx=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title="H3",t.type="header3",t}return Rg(t,e),t}(Gx),Yx=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title="H4",t.type="header4",t}return Rg(t,e),t}(Gx),Xx=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title="H5",t.type="header5",t}return Rg(t,e),t}(Gx),Zx=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title="H6",t.type="header6",t}return Rg(t,e),t}(Gx),Jx=function(){function e(){this.title=BE("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 e.prototype.getOptions=function(e){var t=[{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:"header6",text:"H6",styleForRenderMenuList:{"font-size":"11px","font-weight":"bold"}},{value:"paragraph",text:BE("header.text")}],n=this.getValue(e).toString();return t.forEach((function(e){e.value===n?e.selected=!0:e.selected=void 0})),t},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){return $x(e)},e.prototype.isDisabled=function(e){return Ux(e)},e.prototype.exec=function(e,t){Vx(e,t.toString())},e}(),Qx={key:"headerSelect",factory:function(){return new Jx}},eO={key:"header1",factory:function(){return new Wx}},tO={key:"header2",factory:function(){return new qx}},nO={key:"header3",factory:function(){return new Kx}},rO={key:"header4",factory:function(){return new Yx}},oO={key:"header5",factory:function(){return new Xx}},iO={key:"header6",factory:function(){return new Zx}};function aO(e){return function(t,n,r){var o=Mv(t);return 0===(n=n.filter((function(e){return!!lg.isText(e)||!!r.isInline(e)}))).length&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"header".concat(e),children:n}}}var sO={selector:"h1:not([data-w-e-type])",parseElemHtml:aO(1)},uO={selector:"h2:not([data-w-e-type])",parseElemHtml:aO(2)},lO={selector:"h3:not([data-w-e-type])",parseElemHtml:aO(3)},cO={selector:"h4:not([data-w-e-type])",parseElemHtml:aO(4)},dO={selector:"h5:not([data-w-e-type])",parseElemHtml:aO(5)},fO={selector:"h6:not([data-w-e-type])",parseElemHtml:aO(6)};function pO(e){return function(t,n,r){return sD("h".concat(e),null,n)}}var hO={renderElems:[{type:"header1",renderElem:pO(1)},{type:"header2",renderElem:pO(2)},{type:"header3",renderElem:pO(3)},{type:"header4",renderElem:pO(4)},{type:"header5",renderElem:pO(5)},{type:"header6",renderElem:pO(6)}],elemsToHtml:[Rx,_x,Mx,jx,Hx,zx],parseElemsHtml:[sO,uO,lO,cO,dO,fO],menus:[Qx,eO,tO,nO,rO,oO,iO],editorPlugin:function(e){var t=e.insertBreak,n=e;return n.insertBreak=function(){var r=zg(Mh.nodes(n,{match:function(e){return py.getNodeType(e).startsWith("header")},universal:!0}),1),o=r[0];if(o)if(py.isSelectionAtLineEnd(e,o[1])){Og.insertNodes(n,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}else t();else t()},n}};var gO={type:"image",elemToHtml:function(e,t){var n=e,r=n.src,o=n.alt,i=void 0===o?"":o,a=n.href,s=void 0===a?"":a,u=n.width,l=void 0===u?"":u,c=n.height,d=void 0===c?"":c,f=n.style,p=void 0===f?{}:f,h=p.width,g=void 0===h?"":h,v=p.height,m=void 0===v?"":v,y="";return g&&(y+="width: ".concat(g,";")),m&&(y+="height: ".concat(m,";")),'<img src="'.concat(r,'" alt="').concat(i,'" data-href="').concat(s,'" width="').concat(l,'" height="').concat(d,'" style="').concat(y,'"/>')}};var vO=function(){function e(){this.title=BE("image.delete"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==py.getSelectedNodeByType(e,"image")},e.prototype.exec=function(e,t){this.isDisabled(e)||Og.removeNodes(e,{match:function(e){return py.checkNodeType(e,"image")}})},e}();function mO(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(bm())}function yO(e){return e.replace(/</g,"<").replace(/>/g,">")}function bO(e){var t=e.selection;if(null==t)return!0;if(!ng.isCollapsed(t))return!0;var n=zg(Mh.nodes(e,{match:function(t){var n=py.getNodeType(t);return"code"===n||("pre"===n||("link"===n||("list-item"===n||(!!n.startsWith("header")||("blockquote"===n||!!Mh.isVoid(e,t))))))},universal:!0}),1);return!!n[0]}function EO(e,t,n){return Mg(this,arguments,void 0,(function(e,t,n,r,o){var i,a;return void 0===r&&(r=""),void 0===o&&(o=""),jg(this,(function(s){switch(s.label){case 0:return(i=t.getMenuConfig(e).checkImage)?[4,i(n,r,o)]:[3,2];case 1:if("string"==typeof(a=s.sent()))return t.alert(a,"error"),[2,!1];if(null==a)return[2,!1];s.label=2;case 2:return[2,!0]}}))}))}function CO(e,t,n){return Mg(this,void 0,void 0,(function(){var r;return jg(this,(function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseImageSrc)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}}))}))}function DO(e,t){return Mg(this,arguments,void 0,(function(e,t,n,r){var o,i,a;return void 0===n&&(n=""),void 0===r&&(r=""),jg(this,(function(s){switch(s.label){case 0:return[4,EO("insertImage",e,t,n,r)];case 1:return s.sent()?[4,CO("insertImage",e,t)]:[2];case 2:return o=s.sent(),i={type:"image",src:yO(o),href:r,alt:n,style:{},children:[{text:""}]},null===e.selection&&e.restoreSelection(),py.getSelectedNodeByType(e,"image")&&e.move(1),bO(e)?[2]:(Og.insertNodes(e,i),(a=e.getMenuConfig("insertImage").onInsertedImage)&&a(i),[2])}}))}))}function wO(){return mO("w-e-edit-image")}var AO=function(){function e(){this.title=BE("image.edit"),this.iconSvg=WS,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=wO(),this.altInputId=wO(),this.hrefInputId=wO(),this.buttonId=wO()}return e.prototype.getValue=function(e){return""},e.prototype.getImageNode=function(e){return py.getSelectedNodeByType(e,"image")},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ng.isCollapsed(t)||null==py.getSelectedNodeByType(e,"image"))},e.prototype.getModalPositionNode=function(e){return this.getImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,s=this.getImageNode(e);if(null==s)throw new Error("Not found selected image node");var u=zg(HE(BE("image.src"),r),2),l=u[0],c=Mv(u[1]),d=zg(HE(BE("image.desc"),o),2),f=d[0],p=Mv(d[1]),h=zg(HE(BE("image.link"),i),2),g=h[0],v=Mv(h[1]),m=zg($E(a,BE("common.ok")),1)[0];if(null==this.$content){var y=Mv("<div></div>");y.on("click","#".concat(a),(function(n){n.preventDefault();var a=y.find("#".concat(r)).val(),s=y.find("#".concat(o)).val(),u=y.find("#".concat(i)).val();t.updateImage(e,a,s,u),e.hidePanelOrModal()})),this.$content=y}var b=this.$content;b.empty(),b.append(l),b.append(f),b.append(g),b.append(m);var E=s,C=E.src,D=E.alt,w=void 0===D?"":D,A=E.href,S=void 0===A?"":A;return c.val(C),p.val(w),v.val(S),setTimeout((function(){c.focus()})),b[0]},e.prototype.updateImage=function(e,t,n,r,o){void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),t&&(e.restoreSelection(),this.isDisabled(e)||function(e,t){Mg(this,arguments,void 0,(function(e,t,n,r,o){var i,a,s,u,l,c;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),jg(this,(function(d){switch(d.label){case 0:return[4,EO("editImage",e,t,n,r)];case 1:return d.sent()?[4,CO("editImage",e,t)]:[2];case 2:return i=d.sent(),null==(a=py.getSelectedNodeByType(e,"image"))||(s=a.style,u={src:i,alt:n,href:r,style:_g(_g({},void 0===s?{}:s),o)},Og.setNodes(e,u,{match:function(e){return py.checkNodeType(e,"image")}}),l=py.getSelectedNodeByType(e,"image"),(c=e.getMenuConfig("editImage").onUpdatedImage)&&c(l)),[2]}}))}))}(e,t,n,r,o))},e}();function SO(){return mO("w-e-insert-image")}var xO=function(){function e(){this.title=BE("image.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=SO(),this.heightInputId=SO(),this.buttonId=SO()}return e.prototype.getSelectedImageNode=function(e){return py.getSelectedNodeByType(e,"image")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedImageNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=zg(HE(BE("image.width"),n,"auto"),2),a=i[0],s=Mv(i[1]),u=zg(HE(BE("image.height"),r,"auto"),2),l=u[0],c=Mv(u[1]),d=zg($E(o,BE("image.ok")),1)[0],f=this.getSelectedImageNode(e);if(null==this.$content){var p=Mv("<div></div>");p.on("click","#".concat(o),(function(t){t.preventDefault();var o=p.find("#".concat(n)).val().trim(),i=p.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u=function(e){return/^\d+(\.\d+)?px$/.test(e)},l="auto",c="auto";a(o)?l=o:s(o)?l="".concat(parseInt(o,10),"px"):u(o)&&(l=o),a(i)?c=i:s(i)?c="".concat(parseInt(i,10),"px"):u(i)&&(c=i);var d=f.style,h=void 0===d?{}:d;e.restoreSelection();var g=_g(_g({},h),{style:{width:l,height:c}});Og.setNodes(e,g,{match:function(e){return py.checkNodeType(e,"image")}}),e.hidePanelOrModal()})),this.$content=p}var h=this.$content;if(h.empty(),h.append(a),h.append(l),h.append(d),null==f)return h[0];var g=f.style,v=void 0===g?{}:g,m=v.width,y=void 0===m?"auto":m,b=v.height,E=void 0===b?"auto":b;return s.val(y),c.val(E),setTimeout((function(){s.focus()})),h[0]},e}();function OO(){return mO("w-e-insert-image")}var NO=function(){function e(){this.title=BE("image.netImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=OO(),this.altInputId=OO(),this.hrefInputId=OO(),this.buttonId=OO()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return bO(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,s=zg(HE(BE("image.src"),r),2),u=s[0],l=Mv(s[1]),c=zg(HE(BE("image.desc"),o),2),d=c[0],f=Mv(c[1]),p=zg(HE(BE("image.link"),i),2),h=p[0],g=Mv(p[1]),v=zg($E(a,BE("common.ok")),1)[0];if(null==this.$content){var m=Mv("<div></div>");m.on("click","#".concat(a),(function(n){n.preventDefault();var a=m.find("#".concat(r)).val().trim(),s=m.find("#".concat(o)).val().trim(),u=m.find("#".concat(i)).val().trim();t.insertImage(e,a,s,u),e.hidePanelOrModal()})),this.$content=m}var y=this.$content;return y.empty(),y.append(u),y.append(d),y.append(h),y.append(v),l.val(""),f.val(""),g.val(""),setTimeout((function(){l.focus()})),y[0]},e.prototype.insertImage=function(e,t,n,r){void 0===n&&(n=""),void 0===r&&(r=""),t&&(e.restoreSelection(),this.isDisabled(e)||DO(e,t,n,r))},e}(),BO=function(){function e(){this.title=BE("image.viewLink"),this.iconSvg=qS,this.tag="button"}return e.prototype.getValue=function(e){var t=py.getSelectedNodeByType(e,"image");return t&&t.href||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!this.getValue(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View image link failed, image.href is '".concat(t,"'"));window.open(t,"_blank")}},e}(),TO=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.getSelectedNode=function(e){return py.getSelectedNodeByType(e,"image")},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedNode(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.getSelectedNode(e);if(null!=n){var r=py.getHoverbar(e);r&&r.hideAndClean();var o=n.style,i={style:_g(_g({},void 0===o?{}:o),{width:this.value,height:""})};Og.setNodes(e,i,{match:function(e){return py.checkNodeType(e,"image")}})}}},e}(),kO=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title="30%",t.value="30%",t}return Rg(t,e),t}(TO),FO=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title="50%",t.value="50%",t}return Rg(t,e),t}(TO),IO=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title="100%",t.value="100%",t}return Rg(t,e),t}(TO),PO={onInsertedImage:function(e){},onUpdatedImage:function(e){},checkImage:function(e,t,n){return!0},parseImageSrc:function(e){return e}};function LO(e,t){var n=py.findKey(e,t).id;return"w-e-image-container-".concat(n)}function RO(e,t,n,r){var o=Mv("body"),i=LO(e,t),a=r.width,s=r.height,u=0,l=0,c=0,d=0,f=!1,p=null;var h=tC((function(e){e.preventDefault();var t=e.clientX,n=l+(f?u-t:t-u),r=c*(n/l);n>d-6||null!=p&&(n<=15||r<=15||(p.css("width","".concat(n,"px")),p.css("height","".concat(r,"px"))))}),100);function g(n){if(o.off("mousemove",h),null!=p){var r=p.width().toFixed(2),i=p.height().toFixed(2),a={style:_g(_g({},t.style),{width:"".concat(r,"px"),height:"".concat(i,"px")})};Og.setNodes(e,a,{at:py.findPath(e,t)}),o.off("mouseup",g)}}function v(t,n){p=function(){var e=Mv("#".concat(i));if(0===e.length)throw new Error("Cannot find image container elem");return e}(),u=t,d=n;var r=p.find("img");if(0===r.length)throw new Error("Cannot find image elem");l=r.width(),c=r.height(),o.on("mousemove",h),o.on("mouseup",g);var a=py.getHoverbar(e);a&&a.hideAndClean()}var m={};return a&&(m.width=a),s&&(m.height=s),m.boxShadow="0 0 0 1px #B4D5FF",sD("div",{id:i,style:m,className:"w-e-image-container w-e-selected-image-container",on:{mousedown:function(n){var r=Mv(n.target);if(r.hasClass("w-e-image-dragger")){n.preventDefault(),(r.hasClass("left-top")||r.hasClass("left-bottom"))&&(f=!0);var o=py.getParentNode(e,t);if(null!=o){var i=py.toDOMNode(e,o),a=i.getBoundingClientRect?i.getBoundingClientRect():{width:0},s=window.getComputedStyle(i),u=parseFloat(s.paddingLeft),l=parseFloat(s.paddingRight),c=parseFloat(s.borderLeftWidth),d=parseFloat(s.borderRightWidth);v(n.clientX,a.width-u-l-c-d)}}}}},n,sD("div",{className:"w-e-image-dragger left-top"}),sD("div",{className:"w-e-image-dragger right-top"}),sD("div",{className:"w-e-image-dragger left-bottom"}),sD("div",{className:"w-e-image-dragger right-bottom"}))}var _O={type:"image",renderElem:function(e,t,n){var r=e,o=r.src,i=r.alt,a=void 0===i?"":i,s=r.href,u=void 0===s?"":s,l=r.style,c=void 0===l?{}:l,d=c.width,f=void 0===d?"":d,p=c.height,h=void 0===p?"":p,g=py.isNodeSelected(n,e),v={maxWidth:"100%"};f&&(v.width="100%"),h&&(v.height="100%");var m=sD("img",{style:v,src:o,alt:a,"data-href":u}),y=n.isDisabled();return g&&!y?RO(n,e,m,{width:f,height:h}):function(e,t,n,r){var o=r.width,i=r.height,a={};return o&&(a.width=o),i&&(a.height=i),sD("div",{id:LO(e,t),style:a,className:"w-e-image-container"},n)}(n,e,m,{width:f,height:h})}},MO={renderElems:[_O],elemsToHtml:[gO],parseElemsHtml:[{selector:"img:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Mv(e),o=r.attr("data-href")||"";return o=decodeURIComponent(o),{type:"image",src:r.attr("src")||"",alt:r.attr("alt")||"",href:o,style:{width:ex(r,"width"),height:ex(r,"height")},width:r.attr("width")||"",height:r.attr("height")||"",children:[{text:""}]}}}],menus:[{key:"insertImage",factory:function(){return new NO},config:PO},{key:"deleteImage",factory:function(){return new vO}},{key:"editImage",factory:function(){return new AO},config:PO},{key:"viewImageLink",factory:function(){return new BO}},{key:"imageWidth30",factory:function(){return new kO}},{key:"imageWidth50",factory:function(){return new FO}},{key:"imageWidth100",factory:function(){return new IO}},{key:"editorImageSizeMenu",factory:function(){return new xO}}],editorPlugin:function(e){var t=e.isInline,n=e.isVoid,r=e;return r.isInline=function(e){return"image"===e.type||t(e)},r.isVoid=function(e){return"image"===e.type||n(e)},r}},jO=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){var t=zg(Mh.nodes(e,{match:function(e){return!!e.indent},universal:!0}),1),n=t[0];return null==n?"":zg(n,1)[0].indent||""},e.prototype.isActive=function(e){return!1},e.prototype.getMatchNode=function(e){var t=zg(Mh.nodes(e,{match:function(e){var t=py.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e}(),HO=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title=BE("indent.decrease"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',t}return Rg(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!t.indent},t.prototype.exec=function(e,t){Og.setNodes(e,{indent:null},{match:function(e){return Fh.isElement(e)}})},t}(jO),zO=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title=BE("indent.increase"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',t.DEFAULT_INDENT_VALUE="2em",t}return Rg(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!!t.indent},t.prototype.getIndentValue=function(e){var t=this.getMatchNode(e);if(!t)return this.DEFAULT_INDENT_VALUE;var n=t.children.filter(lg.isText)[0];if(!n||!n.fontSize)return this.DEFAULT_INDENT_VALUE;var r=n.fontSize,o=parseInt(n.fontSize,10),i=r.replace("".concat(o),"");return"".concat(2*o).concat(i)},t.prototype.exec=function(e,t){var n=this.getIndentValue(e);Og.setNodes(e,{indent:n},{match:function(e){return Fh.isElement(e)},mode:"highest"})},t}(jO);var $O={renderStyle:function(e,t){if(!Fh.isElement(e))return t;var n=e.indent,r=t;return n&&mx(r,{textIndent:n}),r},styleToHtml:function(e,t){if(!Fh.isElement(e))return t;var n=e.indent;if(!n)return t;var r=Mv(t);return r.css("text-indent",n),JS(r)},preParseHtml:[{selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(e){var t=Mv(e),n=ex(t,"padding-left");return/\dem/.test(n)&&t.css("text-indent","2em"),/\dpx/.test(n)&&parseInt(n,10)%32==0&&t.css("text-indent","2em"),t[0]}}],parseStyleHtml:function(e,t,n){var r=Mv(e);if(!Fh.isElement(t))return t;var o=t,i=ex(r,"text-indent"),a=parseInt(i,10);return i&&a>0&&(o.indent=i),o},menus:[{key:"indent",factory:function(){return new zO}},{key:"delIndent",factory:function(){return new HO}}]},UO=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!py.getSelectedElems(e).some((function(t){var n=t.type;return!(!Mh.isVoid(e,t)||!Mh.isBlock(e,t)||"video"===n)||!!["pre","code"].includes(n)}))},e}(),VO=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title=BE("justify.center"),t.iconSvg='<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>',t}return Rg(t,e),t.prototype.exec=function(e,t){Og.setNodes(e,{textAlign:"center"},{match:function(t){return Fh.isElement(t)&&!e.isInline(t)}})},t}(UO),GO=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title=BE("justify.justify"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',t}return Rg(t,e),t.prototype.exec=function(e,t){Og.setNodes(e,{textAlign:"justify"},{match:function(t){return Fh.isElement(t)&&!e.isInline(t)}})},t}(UO),WO=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title=BE("justify.left"),t.iconSvg='<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>',t}return Rg(t,e),t.prototype.exec=function(e,t){Og.setNodes(e,{textAlign:"left"},{match:function(t){return Fh.isElement(t)&&!e.isInline(t)}})},t}(UO),qO=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title=BE("justify.right"),t.iconSvg='<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>',t}return Rg(t,e),t.prototype.exec=function(e,t){Og.setNodes(e,{textAlign:"right"},{match:function(t){return Fh.isElement(t)&&!e.isInline(t)}})},t}(UO);var KO={renderStyle:function(e,t){if(!Fh.isElement(e))return t;var n=e.textAlign,r=t;return n&&mx(r,{textAlign:n}),r},styleToHtml:function(e,t){if(!Fh.isElement(e))return t;var n=e.textAlign;if(!n)return t;var r=Mv(t);return r.css("text-align",n),JS(r)},parseStyleHtml:function(e,t,n){var r=Mv(e);if(!Fh.isElement(t))return t;var o=t,i=ex(r,"text-align");return i&&(o.textAlign=i),o},menus:[{key:"justifyLeft",factory:function(){return new WO}},{key:"justifyRight",factory:function(){return new qO}},{key:"justifyCenter",factory:function(){return new VO}},{key:"justifyJustify",factory:function(){return new GO}}]};var YO=function(){function e(){this.title=BE("lineHeight.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M964 788a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526zM198.93 144.306c6.668-5.798 16.774-5.094 22.573 1.574l122.26 140.582a16 16 0 0 1 3.927 10.5c0 8.836-7.164 16-16 16h-61.8a8 8 0 0 0-8 8v390.077h69.819a16 16 0 0 1 10.502 3.928c6.666 5.8 7.37 15.906 1.57 22.573L221.476 878.123a16 16 0 0 1-1.57 1.57c-6.668 5.8-16.774 5.097-22.574-1.57L75.051 737.538a16 16 0 0 1-3.928-10.5c0-8.837 7.163-16 16-16h69.822V312.96H87.127a16 16 0 0 1-10.502-3.928c-6.666-5.8-7.37-15.906-1.57-22.573l122.303-140.582a16 16 0 0 1 1.572-1.572zM964 465a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z m0-323a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z"></path></svg>',this.tag="select",this.width=80}return e.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig("lineHeight").lineHeightList,r=void 0===n?[]:n;t.push({text:BE("lineHeight.default"),value:""}),r.forEach((function(e){t.push({text:e,value:e})}));var o=this.getValue(e);return t.forEach((function(e){e.value===o?e.selected=!0:e.selected=void 0})),t},e.prototype.getMatchNode=function(e){var t=zg(Mh.nodes(e,{match:function(e){var t=py.getNodeType(e);return!!t.startsWith("header")||!!["paragraph","blockquote","list-item"].includes(t)},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getMatchNode(e);return null==t?"":Fh.isElement(t)&&t.lineHeight||""},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getMatchNode(e)},e.prototype.exec=function(e,t){Og.setNodes(e,{lineHeight:t.toString()},{mode:"highest"})},e}();var XO={renderStyle:function(e,t){if(!Fh.isElement(e))return t;var n=e.lineHeight,r=t;return n&&mx(r,{lineHeight:n}),r},styleToHtml:function(e,t){if(!Fh.isElement(e))return t;var n=e.lineHeight;if(!n)return t;var r=Mv(t);return r.css("line-height",n),JS(r)},parseStyleHtml:function(e,t,n){var r=Mv(e);if(!Fh.isElement(t))return t;var o=t,i=n.getMenuConfig("lineHeight").lineHeightList,a=void 0===i?[]:i,s=ex(r,"line-height");return s&&a.includes(s)&&(o.lineHeight=s),o},menus:[{key:"lineHeight",factory:function(){return new YO},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]};var ZO={type:"link",elemToHtml:function(e,t){var n=e,r=n.url,o=n.target,i=void 0===o?"_blank":o;return'<a href="'.concat(r,'" target="').concat(i,'">').concat(t,"</a>")}};function JO(e,t,n,r){return Mg(this,void 0,void 0,(function(){var o,i;return jg(this,(function(a){switch(a.label){case 0:return(o=t.getMenuConfig(e).checkLink)?[4,o(n,r)]:[3,2];case 1:if("string"==typeof(i=a.sent()))return t.alert(i,"error"),[2,!1];if(null==i)return[2,!1];a.label=2;case 2:return[2,!0]}}))}))}function QO(e,t,n){return Mg(this,void 0,void 0,(function(){var r;return jg(this,(function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}}))}))}function eN(e){return null==e.selection||!!py.getSelectedElems(e).some((function(t){var n=t.type;return!!e.isVoid(t)||!!["pre","code","link"].includes(n)}))}function tN(e,t){return{type:"link",url:yO(e),children:t?[{text:t}]:[]}}function nN(e,t,n){return Mg(this,void 0,void 0,(function(){var r,o,i,a,s;return jg(this,(function(u){switch(u.label){case 0:return n?(t||(t=n),e.restoreSelection(),eN(e)?[2]:[4,JO("insertLink",e,t,n)]):[2];case 1:return u.sent()?[4,QO("insertLink",e,n)]:[2];case 2:if(r=u.sent(),null==(o=e.selection))return[2];if(ng.isCollapsed(o)){if((a=py.getLeftLengthOfMaxLength(e))<=0)return[2];e.insertText(" "),a<t.length+1&&(t=t.slice(0,a-1)),s=tN(r,t),Og.insertNodes(e,s),e.insertFragment([{text:" "}])}else if((i=Mh.string(e,o))!==t){if((a=py.getLeftLengthOfMaxLength(e))<=0)return[2];a<i.length-t.length&&(t=t.slice(0,a)),e.deleteFragment(),s=tN(r,t),Og.insertNodes(e,s)}else s=tN(r),Og.wrapNodes(e,s,{split:!0}),Og.collapse(e,{edge:"end"});return[2]}}))}))}function rN(){return mO("w-e-update-link")}var oN=function(){function e(){this.title=BE("link.edit"),this.iconSvg=WS,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=rN(),this.buttonId=rN()}return e.prototype.getSelectedLinkElem=function(e){var t=py.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.getModalPositionNode=function(e){return py.getSelectedNodeByType(e,"link")},e.prototype.getModalContentElem=function(e){var t=this.urlInputId,n=this.buttonId,r=zg(HE(BE("link.url"),t),2),o=r[0],i=Mv(r[1]),a=zg($E(n,BE("common.ok")),1)[0];if(null==this.$content){var s=Mv("<div></div>");s.on("click","#".concat(n),(function(n){n.preventDefault(),e.restoreSelection();var r=py.getSelectedNodeByType(e,"link"),o=r?Vh.string(r):"",i=s.find("#".concat(t)).val();!function(e,t,n){Mg(this,void 0,void 0,(function(){var r,o;return jg(this,(function(i){switch(i.label){case 0:return n?[4,JO("editLink",e,t,n)]:[2];case 1:return i.sent()?[4,QO("editLink",e,n)]:[2];case 2:return r=i.sent(),o={url:yO(r)},Og.setNodes(e,o,{match:function(e){return py.checkNodeType(e,"link")}}),[2]}}))}))}(e,o,i),e.hidePanelOrModal()})),this.$content=s}var u=this.$content;u.empty(),u.append(o),u.append(a);var l=this.getValue(e);return i.val(l),setTimeout((function(){i.focus()})),u[0]},e}();function iN(){return mO("w-e-insert-link")}var aN=function(){function e(){this.title=BE("link.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=iN(),this.urlInputId=iN(),this.buttonId=iN()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return eN(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=e.selection,n=this,r=n.textInputId,o=n.urlInputId,i=n.buttonId,a=zg(HE(BE("link.text"),r),2),s=a[0],u=Mv(a[1]),l=zg(HE(BE("link.url"),o),2),c=l[0],d=Mv(l[1]),f=zg($E(i,BE("common.ok")),1)[0];if(null==this.$content){var p=Mv("<div></div>");p.on("click","#".concat(i),(function(t){t.preventDefault();var n=p.find("#".concat(r)).val(),i=p.find("#".concat(o)).val();nN(e,n,i),e.hidePanelOrModal()})),this.$content=p}var h=this.$content;if(h.empty(),h.append(s),h.append(c),h.append(f),null==t||ng.isCollapsed(t))u.val("");else{var g=Mh.string(e,t);u.val(g)}return d.val(""),setTimeout((function(){u.focus()})),h[0]},e}(),sN=function(){function e(){this.title=BE("link.unLink"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M608.16328 811.815036c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.347563 89.347564c-118.525421 118.523421-311.38448 118.531421-429.919901 0-118.527421-118.529421-118.527421-311.39048 0-429.917901l89.349564-89.349563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.195613 79.195613c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.349563 89.347564c-56.143726 56.145726-56.143726 147.49928 0 203.645005 56.143726 56.143726 147.49928 56.145726 203.647005 0l89.347564-89.347563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.193613 79.195613z m-113.135447-520.429459c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.347564-89.347564c56.143726-56.149726 147.49928-56.145726 203.647006 0 56.143726 56.145726 56.143726 147.49928 0 203.645006l-89.349564 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.195613 79.195613c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.349564-89.349563c118.529421-118.529421 118.529421-311.38848 0-429.917901-118.531421-118.527421-311.38848-118.527421-429.919901 0l-89.347563 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.193613 79.195613z m469.653707 718.556492l45.253779-45.253779c18.745908-18.745908 18.745908-49.13776 0-67.881669L127.195629 14.062931c-18.745908-18.745908-49.13776-18.745908-67.881669 0L14.058181 59.31871c-18.745908 18.745908-18.745908 49.13776 0 67.881669l882.74169 882.74169c18.745908 18.743908 49.13776 18.743908 67.881669 0z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==py.getSelectedNodeByType(e,"link")},e.prototype.exec=function(e,t){this.isDisabled(e)||Og.unwrapNodes(e,{match:function(e){return py.checkNodeType(e,"link")}})},e}(),uN=function(){function e(){this.title=BE("link.view"),this.iconSvg=qS,this.tag="button"}return e.prototype.getSelectedLinkElem=function(e){var t=py.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View link failed, link url is '".concat(t,"'"));window.open(t,"_blank")}},e}(),lN={checkLink:function(e,t){return!0},parseLinkUrl:function(e){return e}},cN={key:"insertLink",factory:function(){return new aN},config:lN},dN={key:"editLink",factory:function(){return new oN},config:lN},fN={key:"unLink",factory:function(){return new sN}},pN={key:"viewLink",factory:function(){return new uN}};var hN,gN,vN={selector:"a:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Mv(e);return 0===(t=t.filter((function(e){return!!lg.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"link",url:r.attr("href")||"",target:r.attr("target")||"",children:t}}};var mN=b(function(){if(gN)return hN;gN=1,hN=function(r){if("string"!=typeof r)return!1;var o=r.match(e);if(!o)return!1;var i=o[1];if(!i)return!1;if(t.test(i)||n.test(i))return!0;return!1};var e=/^(?:\w+:)?\/\/(\S+)$/,t=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,n=/^[^\s\.]+\.\S{2,}$/;return hN}());var yN={type:"link",renderElem:function(e,t,n){var r=e,o=r.url,i=r.target;return sD("a",{href:o,target:void 0===i?"_blank":i},t)}},bN={renderElems:[yN],elemsToHtml:[ZO],parseElemsHtml:[vN],menus:[cN,dN,fN,pN],editorPlugin:function(e){var t=e.isInline,n=e.insertData,r=e.normalizeNode,o=e;return o.isInline=function(e){return"link"===e.type||t(e)},o.insertData=function(e){var t=e.getData("text/plain");if(mN(t)){if(/<img[^>]+>/.test(e.getData("text/html")))n(e);else if(!eN(o)){var r=o.selection;if(null!=r){var i=Mh.string(o,r);nN(o,i,t)}}}else n(e)},o.normalizeNode=function(e){var t=zg(e,2),n=t[0],i=t[1];return"link"!==py.getNodeType(n)?r([n,i]):""===Vh.string(n)?Og.removeNodes(o,{at:i}):r([n,i])},o}};var EN={selector:"p:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Mv(e);return 0===(t=t.filter((function(e){return!!lg.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:t}}};function CN(e){var t=zg(Mh.nodes(e,{match:function(t){return e.children[0]===t},mode:"highest"}),1),n=t[0];if(null==n)return!1;var r=n[0];if(!Fh.isElement(r))return!1;if("paragraph"===r.type)return!1;if(""!==Vh.string(r))return!1;var o=r.children,i=void 0===o?[]:o;return!!lg.isText(i[0])&&(Og.setNodes(e,{type:"paragraph"}),!0)}var DN={type:"paragraph",renderElem:function(e,t,n){return sD("p",null,t)}},wN={renderElems:[DN],elemsToHtml:[{type:"paragraph",elemToHtml:function(e,t){return""===t?"<p><br></p>":"<p>".concat(t,"</p>")}}],parseElemsHtml:[EN],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward,r=e;return r.deleteBackward=function(e){CN(r)||t(e)},r.deleteForward=function(e){CN(r)||n(e)},r}};function AN(e,t){if(null==e.selection)return!0;var n=zg(Mh.nodes(e,{match:function(t){return"pre"===py.getNodeType(t)||!!Mh.isVoid(e,t)},universal:!0}),1);return!!n[0]}function SN(e,t){Object.keys(t).forEach((function(t){"text"!==t&&Mh.removeMark(e,t)}))}var xN=function(){function e(){this.marksNeedToRemove=[],this.tag="button"}return e.prototype.getValue=function(e){var t=this.mark,n=Mh.marks(e);if(n)return n[t];var r=zg(Mh.nodes(e,{match:function(e){return!0===e[t]}}),1);return!!r[0]},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){return AN(e,this.mark)},e.prototype.exec=function(e,t){var n=this.mark,r=this.marksNeedToRemove;t?e.removeMark(n):(e.addMark(n,!0),r&&r.forEach((function(t){return e.removeMark(t)})))},e}(),ON=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.mark="bold",t.title=BE("textStyle.bold"),t.iconSvg='<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>',t.hotkey="mod+b",t}return Rg(t,e),t}(xN),NN=function(){function e(){this.title=BE("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 e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return AN(e)},e.prototype.exec=function(e,t){var n,r,o=Mh.nodes(e,{match:function(e){return lg.isText(e)},universal:!0});try{for(var i=Hg(o),a=i.next();!a.done;a=i.next()){SN(e,a.value[0])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e}(),BN=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.mark="code",t.title=BE("textStyle.code"),t.iconSvg='<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>',t.hotkey="mod+e",t}return Rg(t,e),t}(xN),TN=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.mark="italic",t.title=BE("textStyle.italic"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',t.hotkey="mod+i",t}return Rg(t,e),t}(xN),kN=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.mark="sub",t.marksNeedToRemove=["sup"],t.title=BE("textStyle.sub"),t.iconSvg='<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>',t.hotkey="",t}return Rg(t,e),t}(xN),FN=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.mark="sup",t.marksNeedToRemove=["sub"],t.title=BE("textStyle.sup"),t.iconSvg='<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>',t.hotkey="",t}return Rg(t,e),t}(xN),IN=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.mark="through",t.title=BE("textStyle.through"),t.iconSvg='<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>',t.hotkey="mod+shift+x",t}return Rg(t,e),t}(xN),PN=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.mark="underline",t.title=BE("textStyle.underline"),t.iconSvg='<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>',t.hotkey="mod+u",t}return Rg(t,e),t}(xN);function LN(e,t){return 0!==e.length&&(!!e[0].matches(t)||e.find(t).length>0)}function RN(e,t){var n=t,r=e,o=r.bold,i=r.italic,a=r.underline,s=r.code,u=r.through,l=r.sub,c=r.sup;return o&&(n="<strong>".concat(n,"</strong>")),s&&(n="<code>".concat(n,"</code>")),i&&(n="<em>".concat(n,"</em>")),a&&(n="<u>".concat(n,"</u>")),u&&(n="<s>".concat(n,"</s>")),l&&(n="<sub>".concat(n,"</sub>")),c&&(n="<sup>".concat(n,"</sup>")),n}var _N={renderStyle:function(e,t){var n=e,r=n.bold,o=n.italic,i=n.underline,a=n.code,s=n.through,u=n.sub,l=n.sup,c=t;return r&&(c=sD("strong",null,c)),a&&(c=sD("code",null,c)),o&&(c=sD("em",null,c)),i&&(c=sD("u",null,c)),s&&(c=sD("s",null,c)),u&&(c=sD("sub",null,c)),l&&(c=sD("sup",null,c)),c},menus:[{key:"bold",factory:function(){return new ON}},{key:"underline",factory:function(){return new PN}},{key:"italic",factory:function(){return new TN}},{key:"through",factory:function(){return new IN}},{key:"code",factory:function(){return new BN}},{key:"sub",factory:function(){return new kN}},{key:"sup",factory:function(){return new FN}},{key:"clearStyle",factory:function(){return new NN}}],styleToHtml:function(e,t){if(!lg.isText(e))return t;if(ZS(t))return RN(e,t);var n=Mv(t),r=n.html();return r=RN(e,r),n.html(r),JS(n)},parseStyleHtml:function(e,t,n){var r=Mv(e);if(!lg.isText(t))return t;var o=t;return LN(r,"b,strong")&&(o.bold=!0),LN(r,"i,em")&&(o.italic=!0),LN(r,"u")&&(o.underline=!0),LN(r,"s,strike")&&(o.through=!0),LN(r,"sub")&&(o.sub=!0),LN(r,"sup")&&(o.sup=!0),LN(r,"code")&&(o.code=!0),o}};var MN={type:"todo",elemToHtml:function(e,t){var n=e.checked;return'<div data-w-e-type="todo"><input type="checkbox" disabled '.concat(n?"checked":"",">").concat(t,"</div>")}},jN=function(){function e(){this.title=BE("todo.todo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M278.755556 403.911111l-79.644445 79.644445L455.111111 739.555556l568.888889-568.888889-79.644444-79.644445L455.111111 580.266667l-176.355555-176.355556zM910.222222 910.222222H113.777778V113.777778h568.888889V0H113.777778C51.2 0 0 51.2 0 113.777778v796.444444c0 62.577778 51.2 113.777778 113.777778 113.777778h796.444444c62.577778 0 113.777778-51.2 113.777778-113.777778V455.111111h-113.777778v455.111111z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!py.getSelectedNodeByType(e,"todo")},e.prototype.isDisabled=function(e){return null==e.selection||!!py.getSelectedElems(e).some((function(t){if(Mh.isVoid(e,t)&&Mh.isBlock(e,t))return!0;var n=t.type;return!!["pre","table","list-item"].includes(n)}))},e.prototype.exec=function(e,t){var n=this.isActive(e);Og.setNodes(e,{type:n?"paragraph":"todo"})},e}();var HN={selector:'div[data-w-e-type="todo"]',parseElemHtml:function(e,t,n){var r=Mv(e);0===(t=t.filter((function(e){return!!lg.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=!1;return null!=r.find('input[type="checkbox"]').attr("checked")&&(o=!0),{type:"todo",checked:o,children:t}}};var zN={type:"todo",renderElem:function(e,t,n){var r=!1;n.isDisabled()&&(r=!0);var o=sD("div",{style:{margin:"5px 0"}},sD("span",{contentEditable:!1,style:{marginRight:"0.5em"}},sD("input",{type:"checkbox",checked:e.checked,disabled:r,on:{change:function(t){var r=py.findPath(n,e),o={checked:t.target.checked};Og.setNodes(n,o,{at:r})}}})),sD("span",null,t));return o}},$N={renderElems:[zN],elemsToHtml:[MN],preParseHtml:[{selector:"ul.w-e-todo",preParseHtml:function(e){var t=Mv(e).find("li"),n=Mv('<div data-w-e-type="todo"></div>'),r=t.find("input[type]");return n.append(r),t.children()[0].remove(),n[0].innerHTML+=t[0].innerHTML,n[0]}}],parseElemsHtml:[HN],menus:[{key:"todo",factory:function(){return new jN}}],editorPlugin:function(e){var t=e.deleteBackward,n=e;return n.deleteBackward=function(n){var r=e.selection;if(r&&ng.isCollapsed(r)){var o=py.getSelectedNodeByType(e,"todo");if(o&&0===Vh.string(o).length)return void Og.setNodes(e,{type:"paragraph"},{mode:"highest"})}t(n)},n}},UN=function(){function e(){this.title=BE("undo.redo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.redo&&e.redo()},e}(),VN=function(){function e(){this.title=BE("undo.undo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.undo&&e.undo()},e}(),GN=[_N,yx,Tx,$O,KO,XO,MO,wx,Sx,bN,dx,ox,hO,wN,$N,Fx,{menus:[{key:"redo",factory:function(){return new UN}},{key:"undo",factory:function(){return new VN}}]},Px,Ex];SE("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),SE("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var WN=new WeakMap;function qN(e){var t,n=e.children||[],r=n.length;if(0===r)return"";for(var o=0;o<r&&!t;o+=1){var i=n[o];lg.isText(i)&&(t=i)}return null==t?"":t.color||""}function KN(e,t,n){for(var r=t.type,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["type"]),i=void 0!==n?n:o.level||0,a=py.findPath(e,t),s=a;;){if(0===s.length||0===a[a.length-1])return null;s=Kh.previous(s);var u=Mh.node(e,s);if(!u)return null;var l=zg(u,1)[0],c=l.level,d=void 0===c?0:c;if(py.getNodeType(l)!==r)return null;if(d===i)return l}}function YN(e,t,n){var r=KN(e,t,n);return!!r&&r.ordered===t.ordered}var XN=[];var ZN={type:"list-item",elemToHtml:function(e,t){var n="",r="",o=e.ordered,i=void 0!==o&&o?"ol":"ul",a=function(e){var t=WN.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=py.findPath(t,e);if(0===u[0])return s+1;var l=Kh.previous(u),c=Mh.node(t,l);if(!c)return 0;var d=zg(c,1)[0];if(py.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?s-v:v>s?YN(t,e)?0:1:v===s?h===i?0:1:0}(e);if(a>0)for(var s=0;s<a;s+=1)n+="<".concat(i,">"),XN.push(i);var u=function(e){var t=WN.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=py.findPath(t,e);if(u[0]===t.children.length-1)return s+1;var l=Kh.next(u),c=Mh.node(t,l);if(!c)return 0;var d=zg(c,1)[0];if(py.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?YN(t,d)?s-v:s-v+1:v>s?0:v===s?h===i?0:1:0}(e);if(u>0)for(s=0;s<u;s+=1){var l=XN.pop();r+="</".concat(l,">")}var c=qN(e),d=c?' style="color:'.concat(c,'"'):"";return{html:"<li".concat(d,">").concat(t,"</li>"),prefix:n,suffix:r}}},JN=function(){function e(){this.type="list-item",this.tag="button"}return e.prototype.getListNode=function(e){var t=this.type;return py.getSelectedNodeByType(e,t)},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){var t=this.getListNode(e);if(null==t)return!1;var n=t.ordered;return(void 0!==n&&n)===this.ordered},e.prototype.isDisabled=function(e){return null==e.selection||!!py.getSelectedElems(e).some((function(t){if(Mh.isVoid(e,t)&&Mh.isBlock(e,t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)}))},e.prototype.exec=function(e,t){this.isActive(e)?Og.setNodes(e,{type:"paragraph",ordered:void 0,level:void 0}):Og.setNodes(e,{type:"list-item",ordered:this.ordered,indent:void 0})},e}(),QN=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.ordered=!1,t.title=BE("listModule.unOrderedList"),t.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>',t}return Rg(t,e),t}(JN),eB=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.ordered=!0,t.title=BE("listModule.orderedList"),t.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>',t}return Rg(t,e),t}(JN),tB={key:"bulletedList",factory:function(){return new QN}},nB={key:"numberedList",factory:function(){return new eB}};function rB(e){return e.length?e[0].tagName.toLowerCase():""}am&&(Mv.fn.append=am),$v&&(Mv.fn.attr=$v),um&&(Mv.fn.parent=um);var oB={selector:"li:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Mv(e);0===(t=t.filter((function(e){return!!lg.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=function(e){return"ol"===rB(e.parent())}(r),i=function(e){for(var t=0,n=e.parent(),r=rB(n);"ul"===r||"ol"===r;)r=rB(n=n.parent()),t+=1;return t-1}(r);return{type:"list-item",ordered:o,level:i,children:t}}};var iB={selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(e,t,n){return t.flat(1/0)}};function aB(e){return Mh.nodes(e,{at:e.selection||void 0,match:function(t){return 1===py.findPath(e,t).length}})}var sB={type:"list-item",renderElem:function(e,t,n){WN.set(e,n);var r=e,o=r.level,i=void 0===o?0:o,a=r.ordered,s=void 0!==a&&a,u={margin:"5px 0 5px ".concat(20*i,"px"),display:"flex",alignItems:"flex-start"},l="";if(s){var c=function(e,t){var n=t,r=n.type,o=n.level,i=void 0===o?0:o,a=n.ordered,s=void 0!==a&&a,u=1,l=t,c=py.findPath(e,l);if(0===c[0])return 1;for(;c[0]>0;){var d=Kh.previous(c),f=Mh.node(e,d);if(null==f)break;var p=f[0],h=p.level,g=void 0===h?0:h,v=p.type,m=p.ordered;if(v!==r)break;if(g<i)break;if(g===i){if(m!==s)break;u+=1}l=p,c=d}return u}(n,e);l="".concat(c,".")}else l=function(e){void 0===e&&(e=0);var t="";switch(e){case 0:t="•";break;case 1:t="◦";break;default:t="▪"}return t}(i);return sD("div",{style:u},sD("span",{contentEditable:!1,style:{marginRight:"0.5em",color:qN(e)},"data-w-e-reserve":!0},l),sD("span",{style:{flex:"1",wordBreak:"break-word"}},t))}},uB={renderElems:[sB],editorPlugin:function(e){var t=e.deleteBackward,n=e.handleTab,r=e.normalizeNode,o=e.insertBreak,i=e;return i.insertBreak=function(){var t=zg(Mh.nodes(e,{match:function(e){return py.checkNodeType(e,"list-item")},universal:!0}),1),n=t[0];return n?""!==n[0].children[0].text?o():void Og.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0}):o()},i.deleteBackward=function(n){var r=i.selection;if(null!=r)if(ng.isExpanded(r))t(n);else{var o=py.getSelectedNodeByType(i,"list-item");if(null!=o)if(0!==r.focus.offset)t(n);else{var a=o,s=a.level,u=void 0===s?0:s,l=a.ordered,c=void 0!==l&&l;if(u>0){var d=KN(e,o,u-1);d&&d.ordered!==c?Og.setNodes(i,{level:u-1,ordered:!c}):Og.setNodes(i,{level:u-1})}else Og.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0})}else t(n)}else t(n)},i.handleTab=function(){var e,t,r,o,a=i.selection;if(null!=a){if(ng.isCollapsed(a)){var s=py.getSelectedNodeByType(i,"list-item");if(null==s)return void n();if(0===a.focus.offset){var u=s.level,l=void 0===u?0:u;return void Og.setNodes(i,{level:l+1})}}if(ng.isExpanded(a)){var c=0,d=!1;try{for(var f=Hg(aB(i)),p=f.next();!p.done;p=f.next()){var h=zg(p.value,1)[0];"list-item"===py.getNodeType(h)?c+=1:d=!0}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}if(d||c<=1)return void n();try{for(var g=Hg(aB(i)),v=g.next();!v.done;v=g.next()){var m=zg(v.value,2),y=(h=m[0],m[1]),b=h.level;l=void 0===b?0:b;Og.setNodes(i,{level:l+1},{at:y})}}catch(e){r={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}}else n()}else n()},i.normalizeNode=function(e){var t=zg(e,2),n=t[0],o=t[1],a=py.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||Og.unwrapNodes(i,{at:o}),r([n,o])},i},menus:[tB,nB],elemsToHtml:[ZN],parseElemsHtml:[iB,oB]};SE("en",{tableModule:{modal:{border:"Border",borderWidth:"Width",bgColor:"Back color",align:"Text Align",ok:"OK"},color:{default:"Default color",clear:"Clear back color"},borderStyle:{none:"None",solid:"Solid",dotted:"Dotted",dashed:"Dashed",double:"Double",groove:"Groove",ridge:"Ridge",inset:"Inset",outset:"Outset"},deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Width auto",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header",mergeCell:"merge cell",splitCell:"split cell",tableProperty:"Table property",cellProperty:"Cell property"}}),SE("zh-CN",{tableModule:{modal:{border:"边框",borderWidth:"宽度",bgColor:"背景色",align:"对齐方式",ok:"确定"},color:{default:"默认颜色",clear:"清除背景色"},borderStyle:{none:"无样式",solid:"实线",dotted:"点状虚线",dashed:"虚线",double:"双线",groove:"凹槽边框",ridge:"菱形边框",inset:"凹边框",outset:"凸边框"},deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"宽度自适应",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头",mergeCell:"合并单元格",splitCell:"拆分单元格",tableProperty:"表格属性",cellProperty:"单元格属性"}});var lB={type:"table",elemToHtml:function(e,t){var n=e,r=n.width,o=void 0===r?"auto":r,i=n.columnWidths,a=n.height,s=void 0===a?"auto":a,u=null==i?void 0:i.map((function(e){return"<col width=".concat(e,"></col>")})).join(""),l=u?'<colgroup contentEditable="false">'.concat(u,"</colgroup>"):"";return'<table style="width: '.concat(o,";table-layout: fixed;height:").concat(s,'">').concat(l,"<tbody>").concat(t,"</tbody></table>")}},cB={type:"table-row",elemToHtml:function(e,t){return"<tr>".concat(t,"</tr>")}},dB={type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,o=void 0===r?1:r,i=n.rowSpan,a=void 0===i?1:i,s=n.isHeader,u=void 0!==s&&s,l=n.width,c=void 0===l?"auto":l,d=n.hidden,f=u?"th":"td",p=void 0!==d&&d?"display:none":"";return"<".concat(f,' colSpan="').concat(o,'" rowSpan="').concat(a,'" width="').concat(c,'" style="').concat(p,'">').concat(t,"</").concat(f,">")}},fB='<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>',pB={blocks:{td:"table-cell",th:"table-cell",content:"paragraph",tr:"table-row",table:"table",tbody:"table-body"}};function hB(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=pB,o=t.map((function(e){var t;return null===(t=null==r?void 0:r.blocks)||void 0===t?void 0:t[e]}));return function(e){return function(e){return!Mh.isEditor(e)&&Fh.isElement(e)&&"type"in e}(e)&&o.includes(e.type)}}function gB(e,t){for(var n=zg(t,2),r=n[0],o=n[1],i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=zg(Vh.common(e,r,o),2),u=s[0],l=s[1];return!!hB.apply(void 0,$g([e],zg(i),!1))(u,l)||!!Mh.above(e,{match:hB.apply(void 0,$g([e],zg(i),!1)),at:l})}function vB(e,t){var n,r;void 0===t&&(t={});var o=[];try{for(var i=Hg(function(e,t){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y,b;return void 0===t&&(t={}),jg(this,(function(E){switch(E.label){case 0:if(n=zg(Mh.nodes(e,{match:hB(e,"table"),at:t.at}),1),!(r=n[0]))return[2,[]];o=zg(r,2),i=o[1],E.label=1;case 1:E.trys.push([1,6,7,8]),a=Hg(Mh.nodes(e,{match:hB(e,"table"),at:i})),s=a.next(),E.label=2;case 2:if(s.done)return[3,5];u=zg(s.value,2),l=u[1],c=[];try{for(y=void 0,d=Hg(Mh.nodes(e,{match:hB(e,"tr"),at:l})),f=d.next();!f.done;f=d.next())p=zg(f.value,2),h=p[1],c.push($g([],zg(Mh.nodes(e,{match:hB(e,"th","td"),at:h})),!1))}catch(e){y={error:e}}finally{try{f&&!f.done&&(b=d.return)&&b.call(d)}finally{if(y)throw y.error}}return[4,c];case 3:E.sent(),E.label=4;case 4:return s=a.next(),[3,2];case 5:return[3,8];case 6:return g=E.sent(),v={error:g},[3,8];case 7:try{s&&!s.done&&(m=a.return)&&m.call(a)}finally{if(v)throw v.error}return[7];case 8:return[2]}}))}(e,{at:t.at})),a=i.next();!a.done;a=i.next()){for(var s=a.value,u=[],l=0;l<s.length;l+=1){u[l]||(u[l]=[]);for(var c=0;c<s[l].length;c+=1)for(var d=zg(s[l][c],1)[0],f=d.rowSpan,p=void 0===f?1:f,h=d.colSpan,g=void 0===h?1:h,v=0;v<g+0;v+=1)for(var m=0;m<p;m+=1)u[l+m]||(u[l+m]=[]),u[l+m][c+v]||(u[l+m][c+v]=[s[l+m][c+v],{rtl:v-0+1,ltr:g-v+0,ttb:m+1,btt:p-m}])}o.push.apply(o,$g([],zg(u),!1))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}var mB=function(){function e(e,t){this.x=e,this.y=t}return e.valueOf=function(e,t){return new this(e,t)},e.equals=function(e,t){return e.x===t.x&&e.y===t.y},e}();function yB(e){return e.length?e[0].tagName.toLowerCase():""}function bB(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}am&&Mv.fn&&(Mv.fn.append=am),qv&&Mv.fn&&(Mv.fn.on=qv),mm&&Mv.fn&&(Mv.fn.focus=mm),$v&&Mv.fn&&(Mv.fn.attr=$v),Wv&&Mv.fn&&(Mv.fn.val=Wv),rm&&Mv.fn&&(Mv.fn.html=rm),Gv&&Mv.fn&&(Mv.fn.dataset=Gv),jv&&Mv.fn&&(Mv.fn.addClass=jv),Hv&&Mv.fn&&(Mv.fn.removeClass=Hv),dm&&Mv.fn&&(Mv.fn.children=dm),tm&&Mv.fn&&(Mv.fn.each=tm),cm&&Mv.fn&&(Mv.fn.find=cm),Vv&&Mv.fn&&(Mv.fn.data=Vv),Jv&&Mv.fn&&(Mv.fn.hide=Jv),Qv&&Mv.fn&&(Mv.fn.show=Qv);var EB=new WeakMap,CB=new WeakMap,DB=function(){function e(){this.title=BE("tableModule.tableProperty"),this.iconSvg='<svg viewBox="0 0 20 20"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.menu="table",this.borderStyle=[{value:"none",label:BE("tableModule.borderStyle.none")},{value:"solid",label:BE("tableModule.borderStyle.solid")},{value:"dotted",label:BE("tableModule.borderStyle.dotted")},{value:"dashed",label:BE("tableModule.borderStyle.dashed")},{value:"double",label:BE("tableModule.borderStyle.double")},{value:"groove",label:BE("tableModule.borderStyle.groove")},{value:"ridge",label:BE("tableModule.borderStyle.ridge")},{value:"inset",label:BE("tableModule.borderStyle.inset")},{value:"outset",label:BE("tableModule.borderStyle.outset")}],this.textAlignOptions=[{value:"left",label:BE("justify.left"),svg:'<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>'},{value:"center",label:BE("justify.center"),svg:'<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>'},{value:"right",label:BE("justify.right"),svg:'<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>'},{value:"justify",label:BE("justify.justify"),svg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>'}]}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==py.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){},e.prototype.getModalContentNode=function(e){return zg(Mh.nodes(e,{match:hB(e,"table")}),1)[0]},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this.getModalContentNode(e);if(!n)return null;var r=zg(n,2),o=r[0],i=r[1],a=Mv('<div>\n <label class="babel-container">\n <span>'.concat(BE("tableModule.modal.border"),'</span>\n <span class="babel-container-border">\n <select name="borderStyle">\n ').concat(this.borderStyle.map((function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")})).join(""),'\n </select>\n <span class="color-group" data-mark="color">\n <span class="color-group-block"></span>\n <input name="borderColor" type="hidden">\n </span>\n <input name="borderWidth" type="number" placeholder="').concat(BE("tableModule.modal.borderWidth"),'">\n </span>\n </label>\n <div class="babel-container">\n <span>').concat(BE("tableModule.modal.bgColor"),'</span>\n <span class="babel-container-background">\n <span class="color-group" data-mark="bgColor">\n <span class="color-group-block"></span>\n <input name="backgroundColor" type="hidden">\n </span>\n </span>\n </div>\n <label class="babel-container">\n <span>').concat(BE("tableModule.modal.align"),'</span>\n <span class="babel-container-align">\n <select name="textAlign">\n ').concat(this.textAlignOptions.map((function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")})).join(""),'\n </select>\n </span>\n </label>\n <div class="button-container">\n <button type="button">').concat(BE("tableModule.modal.ok"),"</button>\n </div>\n </div>"));a.find("[name]").each((function(e){Mv(e).val(o[Mv(e).attr("name")])}));var s=function(e,t){t?Mv(".color-group-block",e).css("background-color",t).empty():Mv(".color-group-block",e).css("background-color","").html(fB)};return a.find(".color-group").each((function(n){var r=Mv('[type="hidden"]',n).val()||"";s(n,r);var o=Mv(n);o.on("click",(function(){a.find(".color-group .w-e-drop-panel").hide();var i=o.data("panel");i?i.show():(i=t.getPanelContentElem(e,{mark:o.data("mark"),selectedColor:r,callback:function(e){Mv('[type="hidden"]',n).val(e||""),s(n,e),i.hide()}}),o.append(i),o.data("panel",i))}))})),a.find("button").on("click",(function(){var n=Array.from(a.find("[name]")).reduce((function(e,t){return e[Mv(t).attr("name")]=Mv(t).val(),e}),{}),r=EB.get(e);"cell"===t.menu&&(null==r?void 0:r.length)?r.forEach((function(t){t.forEach((function(t){Og.setNodes(e,n,{at:t[0][1]})}))})):Og.setNodes(e,n,{at:i}),setTimeout((function(){e.focus()}))})),a[0]},e.prototype.getPanelContentElem=function(e,t){var n=t.mark,r=t.selectedColor,o=t.callback,i=Mv('<ul class="w-e-panel-content-color"></ul>');i.on("click","li",(function(e){var t=e.target;if(t){e.preventDefault(),e.stopPropagation();var n=Mv(t).attr("data-value");o(n)}}));var a=e.getMenuConfig(n).colors;(void 0===a?[]:a).forEach((function(e){var t=Mv('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=Mv('<li data-value="'.concat(e,'"></li>'));r===e&&n.addClass("active"),n.append(t),i.append(n)}));var s="";"color"===n&&(s=BE("tableModule.color.default")),"bgColor"===n&&(s=BE("tableModule.color.clear"));var u=Mv('\n <li data-value="" class="clear">\n '.concat(fB,"\n ").concat(s,"\n </li>\n "));i.prepend(u);var l=Mv('<div class="w-e-drop-panel"></div>');return l.append(i),l},e}(),wB=function(e){function t(){var t=e.apply(this,$g([],zg(arguments),!1))||this;return t.title=BE("tableModule.cellProperty"),t.iconSvg='<svg viewBox="0 0 20 20"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',t.tag="button",t.showModal=!0,t.modalWidth=300,t.menu="cell",t}return Rg(t,e),t.prototype.getModalContentNode=function(e){return zg(Mh.nodes(e,{match:hB(e,"td")}),1)[0]},t}(DB),AB=function(){function e(){this.title=BE("tableModule.deleteCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 510.976L393.216 445.44v-13.1072L327.68 366.7968V510.976z m327.68-78.4384l65.536-65.536V507.904L655.36 442.368v-9.8304z m393.216 484.9664V0H0v917.504h1048.576z m-65.536-131.072h-262.144v-52.4288l-13.1072 13.1072-52.4288-52.4288v91.7504H393.216v-91.7504l-52.4288 52.4288-13.1072-13.1072v52.4288H65.536V65.536H327.68v121.2416l36.0448-36.0448 29.4912 29.4912V62.2592h262.144V180.224l49.152-49.152 16.384 16.384V62.2592h262.144V786.432z m-294.912-108.1344l-160.5632-160.5632-167.1168 167.1168-78.6432-78.6432 167.1168-167.1168L288.3584 278.528l78.6432-78.6432 160.5632 160.5632 163.84-163.84 78.6432 78.6432-163.84 163.84 160.5632 160.5632-78.6432 78.6432z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ng.isCollapsed(t)||null==py.getSelectedNodeByType(e,"table-cell"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=zg(Mh.nodes(e,{match:function(e){return py.checkNodeType(e,"table-cell")},universal:!0}),1),r=zg(n[0],2),o=r[0],i=r[1],a=py.getParentNode(e,o),s=(null==a?void 0:a.children.length)||0;if(!a||s<=1)Og.removeNodes(e,{mode:"highest"});else if(null!=py.getParentNode(e,a)){var u=vB(e),l=0;e:for(var c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=zg(u[c][d],1),p=zg(f[0],2)[1];if(Kh.equals(i,p)){l=d;break e}}Mh.withoutNormalizing(e,(function(){for(var t,n,r=0;r<u.length;r+=1){var o=zg(u[r][l],2),i=zg(o[0],1)[0].hidden,a=o[1],s=a.rtl,c=a.ltr;if(s>1||c>1){var d=zg(u[r][l-(s-1)],1),f=zg(d[0],2),p=f[0],h=p.rowSpan,g=void 0===h?1:h,v=p.colSpan,m=void 0===v?1:v,y=f[1];if(i)Og.setNodes(e,{rowSpan:g,colSpan:Math.max(m-1,1)},{at:y});else{var b=zg(u[r][l+1],1),E=zg(b[0],2)[1];Og.setNodes(e,{rowSpan:g,colSpan:m-1,hidden:!1},{at:E});try{for(var C=(t=void 0,Hg(Vh.children(e,y,{reverse:!0}))),D=C.next();!D.done;D=C.next()){var w=zg(D.value,2)[1];Og.moveNodes(e,{to:$g($g([],zg(E),!1),[0],!1),at:w})}}catch(e){t={error:e}}finally{try{D&&!D.done&&(n=C.return)&&n.call(C)}finally{if(t)throw t.error}}}}}for(r=0;r<u.length;r+=1){var A=zg(u[r][l],1);y=zg(A[0],2)[1];Og.removeNodes(e,{at:y})}var S=zg(Mh.nodes(e,{match:function(e){return py.checkNodeType(e,"table")},universal:!0}),1),x=S[0];if(x){var O=zg(x,2),N=O[0],B=O[1],T=N.columnWidths,k=$g([],zg(void 0===T?[]:T),!1);k.splice(l,1),Og.setNodes(e,{columnWidths:k},{at:B})}}))}}},e}(),SB=function(){function e(){this.title=BE("tableModule.deleteRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M907.6736 586.5472L747.1104 425.984l163.84-163.84-78.6432-78.6432-163.84 163.84L507.904 186.7776 429.2608 262.144l163.84 163.84-167.1168 167.1168 78.6432 78.6432 167.1168-167.1168 160.5632 160.5632 75.3664-78.6432zM0 917.504V0h1048.576v917.504H0z m983.04-327.68h-22.9376l-65.536-65.536H983.04V327.68h-91.7504l65.536-65.536h26.2144V65.536H65.536v196.608h317.8496l65.536 65.536H65.536v196.608h380.1088l-65.536 65.536H65.536v196.608H983.04v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ng.isCollapsed(t)||null==py.getSelectedNodeByType(e,"table-row"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=zg(Mh.nodes(e,{match:function(e){return py.checkNodeType(e,"table-row")},universal:!0}),1),r=zg(n[0],2),o=r[0],i=r[1],a=py.getParentNode(e,o);if(((null==a?void 0:a.children.length)||0)<=1)Og.removeNodes(e,{mode:"highest"});else{var s=zg(Mh.nodes(e,{match:function(e){return py.checkNodeType(e,"table-cell")},universal:!0}),1),u=zg(s[0],2)[1],l=vB(e),c=0;e:for(var d=0;d<l.length;d+=1)for(var f=0;f<l[d].length;f+=1){var p=zg(l[d][f],1),h=zg(p[0],2)[1];if(Kh.equals(u,h)){c=d;break e}}Mh.withoutNormalizing(e,(function(){for(var t,n,r=0;r<l[c].length;r+=1){var o=zg(l[c][r],2),a=zg(o[0],1)[0].hidden,s=o[1],u=s.ttb,d=s.btt;if(u>1||d>1){var f=zg(l[c-(u-1)][r],1),p=zg(f[0],2),h=p[0],g=h.rowSpan,v=void 0===g?1:g,m=h.colSpan,y=void 0===m?1:m,b=p[1];if(a)Og.setNodes(e,{rowSpan:Math.max(v-1,1),colSpan:y},{at:b});else{var E=zg(l[c+1][r],1),C=zg(E[0],2)[1];Og.setNodes(e,{rowSpan:v-1,colSpan:y,hidden:!1},{at:C});try{for(var D=(t=void 0,Hg(Vh.children(e,b,{reverse:!0}))),w=D.next();!w.done;w=D.next()){var A=zg(w.value,2)[1];Og.moveNodes(e,{to:$g($g([],zg(C),!1),[0],!1),at:A})}}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=D.return)&&n.call(D)}finally{if(t)throw t.error}}}}}Og.removeNodes(e,{at:i})}))}}},e}(),xB=function(){function e(){this.title=BE("tableModule.deleteTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==py.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){this.isDisabled(e)||Og.removeNodes(e,{mode:"highest"})},e}(),OB=function(){function e(){this.title=BE("tableModule.widthAuto"),this.iconSvg='<svg viewBox="0 0 1228 1024"><path d="M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=py.getSelectedNodeByType(e,"table");return null!=t&&"100%"===t.width},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ng.isCollapsed(t)||null==py.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n={width:t?"auto":"100%"};Og.setNodes(e,n,{mode:"highest"})}},e}();function NB(e){var t=e.children||[];return 0===t.length?[]:(t[0]||{}).children||[]}function BB(e){return NB(e).every((function(e){return!!e.isHeader}))}var TB=function(){function e(){this.title=BE("tableModule.insertCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 193.3312v186.7776H140.9024v91.7504H327.68v186.7776h88.4736V471.8592h190.0544V380.1088H416.1536V193.3312zM0 917.504V0h1048.576v917.504H0zM655.36 65.536H65.536v720.896H655.36V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 262.144h-262.144v196.608h262.144V327.68z m0 262.144h-262.144v196.608h262.144v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ng.isCollapsed(t)||null==py.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=zg(Mh.nodes(e,{match:function(e){return py.checkNodeType(e,"table-cell")},universal:!0}),1),r=zg(n[0],2),o=r[0],i=r[1],a=py.getParentNode(e,o);if(null!=a){var s=py.getParentNode(e,a);if(null!=s){for(var u=vB(e),l=0,c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=zg(u[c][d],1),p=zg(f[0],2)[1];if(Kh.equals(i,p)){l=d;break}}Mh.withoutNormalizing(e,(function(){for(var t=[],n=0;n<u.length;n+=1){var r=zg(u[n][l],2)[1],o=r.ltr,i=r.rtl;if(o>1||i>1){if(1===i)continue;var a=zg(u[n][l-(i-1)],1),c=zg(a[0],2),d=c[0],f=c[1],p=d.colSpan||1;t.push(n),d.hidden||Og.setNodes(e,{colSpan:p+1},{at:f})}}for(n=0;n<u.length;n+=1){var h={type:"table-cell",hidden:t.includes(n),children:[{text:""}]};0===n&&BB(s)&&(h.isHeader=!0);var g=zg(u[n][l],1),v=zg(g[0],2)[1];Og.insertNodes(e,h,{at:v})}var m=zg(Mh.nodes(e,{match:function(e){return py.checkNodeType(e,"table")},universal:!0}),1),y=m[0];if(y){var b=zg(y,2),E=b[0],C=b[1],D=E.columnWidths,w=$g([],zg(void 0===D?[]:D),!1),A=e.getMenuConfig("insertTable").minWidth,S=void 0===A?60:A;w.splice(l,0,parseInt(S,10)||60),Og.setNodes(e,{columnWidths:w},{at:C})}}))}}}},e}(),kB=function(){function e(){this.title=BE("tableModule.insertRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M707.7888 521.0112h-147.456v-147.456H488.2432v147.456h-147.456v68.8128h147.456v147.456h72.0896v-147.456h147.456zM0 917.504V0h1048.576v917.504H0zM327.68 65.536H65.536v196.608H327.68V65.536z m327.68 0H393.216v196.608h262.144V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 258.8672H65.536v462.0288H983.04V324.4032z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ng.isCollapsed(t)||null==py.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=zg(Mh.nodes(e,{match:function(e){return py.checkNodeType(e,"table-cell")},universal:!0}),1),r=zg(n[0],2),o=r[0],i=r[1],a=py.getParentNode(e,o),s=(null==a?void 0:a.children.length)||0;if(0!==s){var u=vB(e),l=0;e:for(var c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=zg(u[c][d],1),p=zg(f[0],2)[1];if(Kh.equals(i,p)){l=c;break e}}Mh.withoutNormalizing(e,(function(){for(var t=l+1,n=t>=0&&t<u.length,r=[],o=0;n&&o<u[l].length;o+=1){var a=zg(u[l][o],2)[1],c=a.ttb,d=a.btt;if(c>1||d>1){if(1===d)continue;var f=zg(u[l-(c-1)][o],1),p=zg(f[0],2),h=p[0],g=p[1],v=h.rowSpan||1;r.push(o),h.hidden||Og.setNodes(e,{rowSpan:v+1},{at:g})}}for(var m={type:"table-row",children:[]},y=0;y<s;y+=1){var b={type:"table-cell",hidden:r.includes(y),children:[{text:""}]};m.children.push(b)}var E=Kh.parent(i),C=Kh.next(E);Og.insertNodes(e,m,{at:C})}))}}},e}();var FB=function(){function e(){this.title=BE("tableModule.insertTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ng.isCollapsed(t)||!!py.getSelectedElems(e).some((function(t){var n=py.getNodeType(t);return"pre"===n||("table"===n||("list-item"===n||!!e.isVoid(t)))})))},e.prototype.getPanelContentElem=function(e){var t=this;if(this.$content)return this.$content[0];for(var n=Mv('<div class="w-e-panel-content-table"></div>'),r=Mv("<span>0 × 0</span>"),o=Mv("<table></table>"),i=0;i<10;i+=1){for(var a=Mv("<tr></tr>"),s=0;s<10;s+=1){var u=Mv("<td></td>");u.attr("data-x",s.toString()),u.attr("data-y",i.toString()),a.append(u),u.on("mouseenter",(function(e){var t=e.target;if(null!=t){var n=Mv(t).dataset(),i=n.x,a=n.y;r[0].innerHTML="".concat(i+1," × ").concat(a+1),o.children().each((function(e){Mv(e).children().each((function(e){var t=Mv(e),n=t.dataset(),r=n.x,o=n.y;r<=i&&o<=a?t.addClass("active"):t.removeClass("active")}))}))}})),u.on("click",(function(n){n.preventDefault();var r=n.target;if(null!=r){var o=Mv(r).dataset(),i=o.x,a=o.y;t.insertTable(e,a+1,i+1)}}))}o.append(a)}return n.append(o),n.append(r),this.$content=n,n[0]},e.prototype.insertTable=function(e,t,n){var r=parseInt(t,10),o=parseInt(n,10);if(r&&o&&!(r<=0||o<=0)){if(py.isSelectedEmptyParagraph(e)&&Og.removeNodes(e,{mode:"highest"}),0===e.children.length){Og.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var i=function(e,t,n){for(var r,o=[],i=e.getMenuConfig("insertTable"),a=i.minWidth,s=void 0===a?60:a,u=i.tableFullWidth,l=i.tableHeader,c=Array(n).fill(parseInt(s,10)||60),d=0;d<t;d+=1){for(var f=[],p=0;p<n;p+=1){var h={type:"table-cell",children:[{text:""}]};0===d&&(h.isHeader=null===(r=null==l?void 0:l.selected)||void 0===r||r),f.push(h)}o.push({type:"table-row",children:f})}return{type:"table",width:(null==u?void 0:u.selected)?"100%":"auto",children:o,columnWidths:c}}(e,r,o);Og.insertNodes(e,i,{mode:"highest"})}},e}(),IB={isInTable:function(e,t){return void 0===t&&(t={}),!!zg(Mh.nodes(e,{match:hB(e,"table"),at:t.at}),1)[0]},selection:function(e){var t,n,r,o,i,a,s,u;return jg(this,(function(l){switch(l.label){case 0:t=EB.get(e),n=0,l.label=1;case 1:if(!(t&&n<t.length))return[3,4];for(r=[],o=0;o<t[n].length;o+=1)i=zg(t[n][o],2),a=i[0],s=i[1],u=s.ltr,1===s.ttb&&r.push(a),o+=u-1;return[4,r];case 2:l.sent(),l.label=3;case 3:return n+=1,[3,1];case 4:return[2]}}))},unselect:function(e){CB.delete(e),EB.delete(e)},isSelected:function(e,t){var n=CB.get(e);return!!n&&n.has(t)}},PB=function(){function e(){this.title=BE("tableModule.mergeCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M482.2 508.4 331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4c2.4-1.8 2.4-5.4 0-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4c-2.3 1.8-2.3 5.3 0 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"/></svg>',this.tag="button"}return e.prototype.needKeepCell=function(e,t){var n=zg(Vh.children(e,t),2)[1],r=Mh.parent(e,t)[0].children.length>1;return!!n||r},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return!this.canMerge(e)},e.prototype.exec=function(e,t){this.isDisabled(e)||(this.merge(e),IB.unselect(e))},e.prototype.canMerge=function(e){var t=EB.get(e);if(!t||!t.length)return!1;var n=zg(t[t.length-1][t[t.length-1].length-1],1),r=zg(n[0],2)[1],o=zg(t[0][0],1);return!!gB(e,[zg(o[0],2)[1],r],"table")},e.prototype.merge=function(e){var t=this;if(this.canMerge(e)){var n=EB.get(e);if(n&&n.length){var r=zg(n[0][0],1),o=zg(r[0],2)[1],i=zg(Vh.children(e,o,{reverse:!0}),1),a=zg(i[0],2)[1];Mh.withoutNormalizing(e,(function(){for(var r,i,s=0,u=0,l=n.length-1;l>=0;l-=1,s+=1){u=0;for(var c=n[l].length-1;c>=0;c-=1,u+=1){var d=zg(n[l][c],2),f=zg(d[0],2)[1],p=d[1].ttb;if(!(Kh.equals(o,f)||p>1)){try{for(var h=(r=void 0,Hg(Vh.children(e,f,{reverse:!0}))),g=h.next();!g.done;g=h.next()){var v=zg(g.value,2)[1];Og.moveNodes(e,{to:Kh.next(a),at:v})}}catch(e){r={error:e}}finally{try{g&&!g.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}var m=zg(Mh.nodes(e,{match:hB(e,"tr"),at:f}),1),y=zg(m[0],2)[1];t.needKeepCell(e,y)&&Og.setNodes(e,{hidden:!0},{at:f})}}}Og.setNodes(e,{rowSpan:s,colSpan:u},{at:o})}))}}},e}(),LB=function(){function e(){this.title=BE("tableModule.splitCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M362.667 494.933v53.334l25.6-25.6zm0-241.066L460.8 352V78.933H57.6v98.134h305.067zm0 535.466v57.6H57.6v98.134h403.2V691.2zM661.333 494.933v53.334l-25.6-25.6zm0-241.066L563.2 352V78.933h403.2v98.134H661.333zm0 535.466v57.6H966.4v98.134H563.2V691.2z"/><path d="M753.067 341.333 693.333 281.6 512 460.8 330.667 281.6l-59.734 59.733 181.334 181.334L270.933 704l59.734 59.733L512 582.4l181.333 181.333L753.067 704 571.733 522.667z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=zg(Mh.nodes(e,{match:hB(e,"td")}),1),n=zg(t[0],1)[0],r=n.rowSpan,o=void 0===r?1:r,i=n.colSpan;return!(o>1||(void 0===i?1:i)>1)},e.prototype.exec=function(e,t){this.isDisabled(e)||this.split(e)},e.prototype.split=function(e,t){void 0===t&&(t={});var n=zg(Mh.nodes(e,{match:hB(e,"table","th","td"),at:t.at}),2),r=n[0],o=n[1];if(r&&o){var i=EB.get(e)||[],a=vB(e,{at:t.at});Mh.withoutNormalizing(e,(function(){for(var n=a.length-1;n>=0;n-=1)for(var r=a[n].length-1;r>=0;r-=1){var s=zg(a[n][r],2),u=zg(s[0],2)[1],l=s[1],c=l.ltr,d=l.rtl,f=l.btt,p=l.ttb;if(d>1)r-=d-2;else if(!(p>1||1===f&&1===c)){var h=!!t.all;if(i.length)e:for(var g=0;!t.all&&g<i.length;g+=1)for(var v=0;v<i[g].length;v+=1){var m=zg(i[g][v],1),y=zg(m[0],2)[1];if(Kh.equals(y,u)){h=!0;break e}}else{y=zg(o,2)[1];Kh.equals(y,u)&&(h=!0)}if(h){e:for(var b=1;b<f;b+=1)for(g=r;g>=0;g-=1){if(1!==zg(a[n+b][g],2)[1].ttb){for(var E=0;E<c;E+=1){var C=zg(a[n+b][g+E],1),D=zg(C[0],2)[1];Og.unsetNodes(e,["hidden","colSpan","rowSpan"],{at:D})}continue e}}for(E=1;E<c;E+=1){var w=zg(a[n][r+E],1);D=zg(w[0],2)[1];Og.unsetNodes(e,["hidden","colSpan","rowSpan"],{at:D})}Og.setNodes(e,{rowSpan:1,colSpan:1},{at:u})}}}}))}},e}(),RB=function(){function e(){this.title=BE("tableModule.header"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 128l-64 0L384 128 320 128 0 128l0 256 0 64 0 192 0 64 0 256 320 0 64 0 256 0 64 0 320 0 0-256 0-64L1024 448 1024 384 1024 128 704 128zM640 640 384 640 384 448l256 0L640 640zM64 448l256 0 0 192L64 640 64 448zM320 896 64 896l0-192 256 0L320 896zM640 896 384 896l0-192 256 0L640 896zM960 896l-256 0 0-192 256 0L960 896zM960 640l-256 0L704 448l256 0L960 640z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=py.getSelectedNodeByType(e,"table");return null!=t&&BB(t)},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ng.isCollapsed(t)||null==py.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=!t,r=py.getSelectedNodeByType(e,"table");if(null!=r)NB(r).forEach((function(t){return Og.setNodes(e,{isHeader:n},{at:py.findPath(e,t)})}))}},e}(),_B={key:"insertTable",factory:function(){return new FB}},MB={key:"deleteTable",factory:function(){return new xB}},jB={key:"insertTableRow",factory:function(){return new kB}},HB={key:"deleteTableRow",factory:function(){return new SB}},zB={key:"insertTableCol",factory:function(){return new TB}},$B={key:"deleteTableCol",factory:function(){return new AB}},UB={key:"tableHeader",factory:function(){return new RB}},VB={key:"tableFullWidth",factory:function(){return new OB}},GB={key:"mergeTableCell",factory:function(){return new PB}},WB={key:"splitTableCell",factory:function(){return new LB}},qB={key:"setTableProperty",factory:function(){return new DB}},KB={key:"setTableCellProperty",factory:function(){return new wB}};var YB={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Mv(e);0===(t=t.filter((function(e){return"paragraph"===py.getNodeType(e)||(!!lg.isText(e)||!!n.isInline(e))}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=parseInt(r.attr("colSpan")||"1",10),i=parseInt(r.attr("rowSpan")||"1",10),a="none"===bB(r,"display"),s=r.attr("width")||"auto";return{type:"table-cell",isHeader:"th"===yB(r),colSpan:o,rowSpan:i,width:s,children:t,hidden:a}}};var XB={selector:"tr:not([data-w-e-type])",parseElemHtml:function(e,t,n){for(var r=[],o=0;o<t.length;o+=1){var i=t[o];if("table-cell"===py.getNodeType(i)){var a=i,s=a.colSpan||1;r.push(a);for(var u=1;u<s;u+=1){var l=t[o+u];l&&"table-cell"===py.getNodeType(l)&&l.hidden||r.push({type:"table-cell",children:[{text:""}],hidden:!0})}}}return{type:"table-row",children:r}}};var ZB,JB={selector:"table:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r,o,i=Mv(e),a="auto";"100%"===bB(i,"width")&&(a="100%"),"100%"===i.attr("width")&&(a="100%");var s={type:"table",width:a,height:parseInt(bB(i,"height")||"0",10),children:t.filter((function(e){return"table-row"===py.getNodeType(e)}))},u=(null===(r=i.find("tr")[0])||void 0===r?void 0:r.children)||[],l=(null===(o=i.find("colgroup")[0])||void 0===o?void 0:o.children)||null,c=t[t.length-1].children.length;if(l&&l.length===c)s.columnWidths=Array.from(l).map((function(e){return parseInt(e.getAttribute("width"),10)}));else if(u.length>0){var d=[];Array.from(u).forEach((function(e){var t=parseInt(Mv(e).attr("colSpan")||"1",10),n=parseInt(bB(Mv(e),"width")||"90",10);d.push(n);for(var r=1;r<t;r+=1)d.push(90)})),s.columnWidths=d}return s}},QB=null===(ZB=null===window||void 0===window?void 0:window.getComputedStyle(document.documentElement))||void 0===ZB?void 0:ZB.getPropertyValue("--w-e-textarea-border-color");function eT(e){var t=e.selection;if(null==t)return!1;var n=zg(Mh.nodes(e,{match:function(e){return py.checkNodeType(e,"table-cell")}}),1),r=n[0];if(r){var o=zg(r,2)[1],i=Mh.start(e,o);if(Jh.equals(t.anchor,i))return!0}return!1}function tT(e,t){var n=t.offset;if(0===n)return!1;var r=Mh.node(e,t);if(!lg.isText(r[0]))return!1;var o=Vh.string(r[0]);return!(n>=o.length)&&("\n"===o[n-1]&&"\r"===o[n])}function nT(e,t,n){var r=e.selection;if(null==r||"line"===t)return!1;var o=zg(Mh.nodes(e,{match:function(e){return py.checkNodeType(e,"table-cell")}}),1),i=o[0],a=r.anchor;if("backward"===n&&0===r.anchor.offset&&(a=Mh.before(e,r)),"forward"===n&&Mh.isEnd(e,r.anchor,r.anchor.path)&&(a=Mh.after(e,r)),null==a)return!1;var s=Mh.above(e,{at:a,match:function(e){return py.checkNodeType(e,"table-cell")}});if(null==s||null==i||!Kh.equals(s[1],i[1]))return!1;var u=Mh.node(e,a);if(!lg.isText(u[0])||u[0].text.length<2)return!1;var l="backward"===n?[a.offset-2,a.offset]:[a.offset,a.offset+2],c=Vh.string(u[0]);return"\n\r"===c.slice.apply(c,$g([],zg(l),!1))?(Og.insertText(e,c.slice(0,l[0])+c.slice(l[1]),{at:{anchor:Mh.start(e,a.path),focus:Mh.end(e,a.path)}}),!0):!!tT(e,a)&&(Og.insertText(e,c.slice(0,r.anchor.offset-1)+c.slice(r.anchor.offset+1),{at:{anchor:Mh.start(e,a.path),focus:Mh.end(e,a.path)}}),!0)}function rT(e,t){var n=Mh.nodes(e,{at:t,match:function(e){return"table"===py.getNodeType(e)}});return!!$g([],zg(n),!1).find((function(){return!0}))}var oT={selector:"table",preParseHtml:function(e){var t=Mv(e);if("table"!==yB(t))return e;var n=t.find("tbody");if(0===n.length)return e;var r=t.find("tr");return t.append(r),n.remove(),t[0]}};function iT(e){var t,n,r=[],o=e.reduce((function(e,t){return e+t}),0);try{for(var i=Hg(e),a=i.next();!a.done;a=i.next()){var s=a.value;r.push(s/o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var aT=null;var sT=!1,uT=!1,lT=0,cT=0,dT=null,fT=Mv(window);fT.on("mousedown",(function(e){var t=e.target;if(t.closest('[data-block-type="table-cell"]'))sT=!0;else if("DIV"===t.tagName&&t.closest(".column-resizer-item")){if(null===dT)return;var n=zg(Mh.nodes(dT,{match:hB(dT,"table")}),1),r=zg(n[0],1)[0],o=r.columnWidths,i=void 0===o?[]:o,a=r.resizingIndex,s=void 0===a?-1:a;uT=!0;var u=e.clientX;lT=u,cT=i[s],document.body.style.cursor="col-resize",e.preventDefault()}fT.on("mousemove",pT),fT.on("mouseup",hT)}));var pT=tC((function(e){if(uT&&null!==dT){e.preventDefault();var t=e.clientX,n=cT+(t-lT);(n=Math.floor(100*n)/100)<30&&(n=30);var r=zg(Mh.nodes(dT,{match:hB(dT,"table")}),1),o=zg(r[0],1)[0],i=o.columnWidths,a=void 0===i?[]:i,s=o.resizingIndex,u=void 0===s?-1:s,l=a.reduce((function(e,t){return e+t}),0),c=l-a[u],d=document.querySelector(".table-container");d&&n>cT&&c+n>d.clientWidth&&(n=Math.max(30,cT));var f=$g([],zg(a),!1).map((function(e){return Math.floor(e)}));f[u]=n,Og.setNodes(dT,{columnWidths:f},{mode:"highest"})}}),100);function hT(e){sT=!1,uT=!1,dT=null,document.body.style.cursor="",fT.off("mousemove",pT),fT.off("mouseup",hT)}function gT(e,t,n,r){if(!e.isDisabled()&&!sT&&!uT){var o=t,i=o.width,a=void 0===i?"auto":i,s=o.columnWidths,u=void 0===s?[]:s,l=o.isHoverCellBorder,c=o.resizingIndex,d=n.clientX,f=n.target;if(Am(f))if(d>(g=f.getBoundingClientRect()).x+5&&d<g.x+g.width-5)return void(l&&Og.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"}));if(Am(f)){var p=f.closest(".table");if(p)for(var h=n.clientX,g=p.getBoundingClientRect(),v="100%"===a?iT(u).map((function(e){return e*r})):u,m=function(e){var t,n,r=[],o=0;try{for(var i=Hg(e),a=i.next();!a.done;a=i.next())o+=a.value,r.push(o)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(v),y=0;y<m.length;y+=1)if(h-g.x>=m[y]-5&&h-g.x<m[y]+5){if(c===y)return;return void Og.setNodes(e,{isHoverCellBorder:!0,resizingIndex:y},{mode:"highest"})}}!0===l&&Og.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"})}}function vT(e,t){"mouseenter"===t.type?Og.setNodes(e,{isResizing:!0},{mode:"highest"}):Og.setNodes(e,{isResizing:!1},{mode:"highest"})}var mT={type:"table",renderElem:function(e,t,n){var r=function(e,t){if(e.isDisabled())return!1;var n=e.selection;if(null==n)return!0;if(ng.isCollapsed(n))return!0;var r=n.anchor,o=n.focus,i=py.findPath(e,t),a=Mh.start(e,i),s=Mh.end(e,i),u=Jh.compare(r,s)<=0&&Jh.compare(r,a)>=0,l=Jh.compare(o,s)<=0&&Jh.compare(o,a)>=0;return!!(u&&l&&Kh.equals(r.path.slice(0,3),o.path.slice(0,3)))}(n,e),o=e,i=o.width,a=void 0===i?"auto":i,s=o.height,u=o.columnWidths,l=void 0===u?[]:u,c=o.scrollWidth,d=void 0===c?0:c,f=o.isHoverCellBorder,p=o.resizingIndex,h=o.isResizing,g=py.isNodeSelected(n,e),v=zg(IB.selection(n),1)[0],m=iT(l),y=sD("div",{className:"table-container","data-selected":g,on:{mousedown:function(t){if("DIV"===t.target.tagName&&t.preventDefault(),!n.isDisabled()){t.target.closest('[data-block-type="table-cell"]')&&IB.unselect(n);var r=py.findPath(n,e),o=Mh.start(n,r),i=n.selection;if(null!=i)i.anchor.path[0]!==r[0]&&"DIV"===t.target.tagName&&n.select(o);else n.select(o)}}}},sD("table",{width:a,contentEditable:r,className:"table ".concat(v?"table-selection-none":""),style:{width:"100%"===a?a:"".concat(l.reduce((function(e,t){return e+t}),0),"px")},on:{mousemove:Pb((function(t){return gT(n,e,t,d)}),25)}},sD("colgroup",{contentEditable:!1},l.map((function(e){return sD("col",{width:e})}))),sD("tbody",null,t)),sD("div",{className:"column-resizer",contentEditable:!1},l.map((function(e,t){var r=e;return"100%"===a&&(r=m[t]*d),sD("div",{className:"column-resizer-item",style:{minWidth:"".concat(r,"px")}},sD("div",{className:"resizer-line-hotzone ".concat(f&&t===p?"visible ":"").concat(h&&t===p?"highlight":""),style:{height:"".concat(s,"px")},on:{mouseenter:function(e){return vT(n,e)},mouseleave:function(e){return vT(n,e)},mousedown:function(e){return function(e){uT||(dT=e)}(n)}}},sD("div",{className:"resizer-line"})))})))),b=HC("div",{hook:{insert:function(e){var t=e.elm;return function(e,t){if(Am(t)){var n=t.querySelector("table");n&&(aT=new ResizeObserver((function(t){var n=zg(t,1)[0].contentRect;Og.setNodes(e,{scrollWidth:n.width,height:n.height},{mode:"highest"})})),aT.observe(n))}}(n,t)},destroy:function(){aT&&(null==aT||aT.disconnect(),aT=null)}}},y);return b}},yT={type:"table-row",renderElem:function(e,t,n){return sD("tr",null,t)}},bT={type:"table-cell",renderElem:function(e,t,n){var r=function(e,t){var n=py.getParentNode(e,t);if(null==n)return!1;var r=py.getParentNode(e,n);return null!=r&&NB(r).some((function(e){return e===t}))}(n,e),o=e,i=o.colSpan,a=void 0===i?1:i,s=o.rowSpan,u=void 0===s?1:s,l=o.isHeader,c=void 0!==l&&l,d=o.hidden,f=void 0!==d&&d,p=IB.isSelected(n,e);return sD(r&&c?"th":"td",{colSpan:a,rowSpan:u,"data-block-type":"table-cell",className:p?"w-e-selected":"",style:{display:f?"none":""}},t)}};function ET(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var CT={renderStyle:function(e,t){var n,r;if(!Fh.isElement(e))return t;var o=e,i=o.backgroundColor,a=o.borderWidth,s=o.borderStyle,u=o.borderColor,l=o.textAlign,c={};i&&(c.backgroundColor=i),a&&(c.borderWidth="".concat(a,"px")),s&&(c.borderStyle="none"===s?"":s),u&&(c.borderColor=u),l&&(c.textAlign=l);var d=t;return"table"===e.type?ET(null===(r=(null===(n=d.children)||void 0===n?void 0:n[0]).children)||void 0===r?void 0:r[0],c):ET(d,c),d},styleToHtml:function(e,t){if("table"!==e.type&&"table-cell"!==e.type)return t;var n=e.backgroundColor,r=e.borderWidth,o=e.borderStyle,i=e.borderColor,a=e.textAlign;if(!(n||r||o||i||a))return t;var s=Mv(t);return n&&s.css("background-color",n),r&&s.css("border-width","".concat(r,"px")),o&&s.css("border-style","none"===o?"":o),i&&s.css("border-color",i),a&&s.css("text-align",a),function(e){return 0===e.length?"":e[0].outerHTML}(s)},parseStyleHtml:function(e,t,n){if(!["TABLE","TD","TH"].includes(e.tagName))return t;var r=Mv(e),o=t,i=bB(r,"background-color");i||(i=bB(r,"background")),i&&(o.backgroundColor=i);var a=bB(r,"border");a||"TD"!==e.tagName||(a="1px solid ".concat(QB));var s=zg((null==a?void 0:a.split(" "))||[],3),u=s[0],l=s[1],c=s[2];(u=bB(r,"border-width")||u)&&(o.borderWidth=u.replace(/[^\d]/g,"")),(l=bB(r,"border-style")||l)&&(o.borderStyle="none"===l?"":l),(c=bB(r,"border-color")||c)&&(o.borderColor=c);var d=bB(r,"text-align");return(d=bB(r,"text-align")||d)&&(o.textAlign=d),t},renderElems:[mT,yT,bT],elemsToHtml:[lB,cB,dB],preParseHtml:[oT],parseElemsHtml:[YB,XB,JB],menus:[_B,MB,jB,HB,zB,$B,UB,VB,GB,WB,qB,KB],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward,r=e.deleteForward,o=e.deleteFragment,i=e.normalizeNode,a=e.insertData,s=e.handleTab,u=e.selectAll,l=e;return l.insertBreak=function(){null==py.getSelectedNodeByType(l,"table")?t():l.insertText("\n\r")},l.deleteBackward=function(e){if(!eT(l)&&!nT(l,e,"backward")){var t=l.selection;if(t){var r=Mh.before(l,t),o=Mh.above(l,{at:t,match:function(e){return py.checkNodeType(e,"table-cell")}});if(r){var i=rT(l,r);if(!o&&i&&py.getSelectedNodeByType(l,"paragraph"))return}}n(e)}},l.handleTab=function(){var t;if(py.getSelectedNodeByType(l,"table")){var n=Mh.above(e);py.checkNodeType(n[0],"table-cell")&&Og.select(e,n[1]);var r=Mh.next(e);if(r)r[0]&&r[0].text&&(r=null!==(t=Mh.above(e,{at:r[1]}))&&void 0!==t?t:r),Og.select(e,r[1]);else{var o=l.children||[],i=o.length;if(py.checkNodeType(o[i-1],"table")){var a=py.genEmptyParagraph();Og.insertNodes(l,a,{at:[i]}),l.handleTab()}}}else s()},l.deleteForward=function(e){if(!eT(l)&&!nT(l,e,"forward")){var t=l.selection;if(t){var n=Mh.after(l,t),o=Mh.above(l,{at:t,match:function(e){return py.checkNodeType(e,"table-cell")}});if(n){var i=rT(l,n);if(!o&&i&&py.getSelectedNodeByType(l,"paragraph"))return}}r(e)}},l.deleteFragment=function(e){var t=l.selection;if(t){var n,r=!1,i={anchor:t.anchor,focus:t.focus},a=Jh.isBefore(i.anchor,i.focus);if(tT(l,t.anchor))(n=Mh[a?"before":"after"](l,t.anchor))&&(i.anchor=n),r=!0;if(tT(l,t.focus))(n=Mh[a?"after":"before"](l,t.focus))&&(i.focus=n),r=!0;r&&Og.setSelection(l,i),o(e)}},l.normalizeNode=function(e){var t=zg(e,2),n=t[0],r=t[1];if("table"!==py.getNodeType(n))return i([n,r]);if(py.isLastNode(l,n)){var o=py.genEmptyParagraph();Og.insertNodes(l,o,{at:[r[0]+1]})}},l.insertData=function(e){if(null!=py.getSelectedNodeByType(l,"table")){var t=e.getData("text/plain");"\n"===t||/<img[^>]+>/.test(e.getData("text/html"))?a(e):Mh.insertText(l,t)}else a(e)},l.selectAll=function(){var e=l.selection;if(null!=e){var t=py.getSelectedNodeByType(l,"table-cell");if(null!=t){var n=e.anchor,r=e.focus;if(Kh.equals(n.path.slice(0,3),r.path.slice(0,3)))if(0!==Vh.string(t).length){var o=py.findPath(l,t),i={anchor:Mh.start(l,o),focus:Mh.end(l,o)};l.select(i)}else u();else u()}else u()}else u()},function(e){var t=e.apply;e.apply=function(n){if(!qh.isSelectionOperation(n)||!n.newProperties)return t(n);var r=_g(_g({},e.selection),n.newProperties);if(!ng.isRange(r))return IB.unselect(e),t(n);var o=zg(Mh.nodes(e,{match:hB(e,"th","td"),at:ng.start(r)}),1)[0],i=zg(Mh.nodes(e,{match:hB(e,"th","td"),at:ng.end(r)}),1)[0];if(!o||!i)return IB.unselect(e),t(n);var a=zg(o,2)[1],s=zg(i,2)[1];if(Kh.equals(a,s)||!gB(e,[a,s],"table"))return IB.unselect(e),t(n);for(var u=vB(e,{at:a}),l=mB.valueOf(0,0),c=mB.valueOf(0,0),d=0;d<u.length;d+=1)for(var f=0;f<u[d].length;f+=1){var p=zg(u[d][f],1),h=zg(p[0],2)[1];if(Kh.equals(a,h)&&(l.x=d,l.y=f),Kh.equals(s,h)){c.x=d,c.y=f;break}}for(var g=mB.valueOf(Math.min(l.x,c.x),Math.min(l.y,c.y)),v=mB.valueOf(Math.max(l.x,c.x),Math.max(l.y,c.y));;){var m=mB.valueOf(g.x,g.y),y=mB.valueOf(v.x,v.y);for(d=m.x;d<=y.x;d+=1)for(f=m.y;f<=y.y;f+=1){var b=zg(u[d][f],2)[1],E=b.rtl,C=b.ltr,D=b.btt,w=b.ttb;m.x=Math.min(m.x,d-(w-1)),m.y=Math.min(m.y,f-(E-1)),y.x=Math.max(y.x,d+(D-1)),y.y=Math.max(y.y,f+(C-1))}if(mB.equals(g,m)&&mB.equals(v,y))break;g=m,v=y}var A=[],S=new WeakSet;for(d=g.x;d<=v.x;d+=1){var x=[];for(f=g.y;f<=v.y;f+=1){var O=zg(u[d][f],1),N=zg(O[0],1)[0];S.add(N),x.push(u[d][f])}A.push(x)}EB.set(e,A),CB.set(e,S),t(n)}}(l),l}};function DT(e){return e.length?e[0].tagName.toLowerCase():""}function wT(e,t,n,r){void 0===t&&(t="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=Mv(e),i=r.width,a=void 0===i?"":i,s=r.height,u=void 0===s?"":s,l="";return a&&(l+="width: ".concat(a,";")),u&&(l+="height: ".concat(u,";")),o.attr("width",t),o.attr("height",n),o.attr("style",l),o[0].outerHTML}SE("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),SE("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}}),am&&(Mv.fn.append=am),qv&&(Mv.fn.on=qv),mm&&(Mv.fn.focus=mm),$v&&(Mv.fn.attr=$v),Wv&&(Mv.fn.val=Wv),rm&&(Mv.fn.html=rm),um&&(Mv.fn.parent=um),zv&&(Mv.fn.hasClass=zv),pm&&(Mv.fn.empty=pm);var AT={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,o=void 0===r?"":r,i=n.poster,a=void 0===i?"":i,s=n.width,u=void 0===s?"auto":s,l=n.height,c=void 0===l?"auto":l,d=n.style,f=void 0===d?{}:d,p=n.textAlign,h='<div data-w-e-type="video" data-w-e-is-void style="text-align: '.concat(void 0===p?"center":p,';">\n');if(0===o.trim().indexOf("<iframe ")){h+=wT(o,u,c,f)}else{var g=f.width,v=void 0===g?"":g,m=f.height,y=void 0===m?"":m,b="";v&&(b+="width: ".concat(v,";")),y&&(b+="height: ".concat(y,";")),h+='<video poster="'.concat(a,'" controls="true" width="').concat(u,'" height="').concat(c,'" style="').concat(b,'"><source src="').concat(o,'" type="video/mp4"/></video>')}return h+="\n</div>"}};function ST(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(bm())}function xT(e){var t={};return e.trim().split(";").forEach((function(e){if(e){var n=zg(e.split(":"),2),r=n[0],o=n[1];r&&o&&(t[r.trim()]=o.trim())}})),t}function OT(){return ST("w-e-insert-video")}var NT=function(){function e(){this.title=BE("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=OT(),this.heightInputId=OT(),this.buttonId=OT()}return e.prototype.getSelectedVideoNode=function(e){return py.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=zg(HE(BE("videoModule.width"),n,"auto"),2),a=i[0],s=Mv(i[1]),u=zg(HE(BE("videoModule.height"),r,"auto"),2),l=u[0],c=Mv(u[1]),d=zg($E(o,BE("videoModule.ok")),1)[0],f=this.getSelectedVideoNode(e);if(null==this.$content){var p=Mv("<div></div>");p.on("click","#".concat(o),(function(t){t.preventDefault();var o=p.find("#".concat(n)).val().trim(),i=p.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u="auto",l="auto";a(o)?u=o:s(o)&&(u="".concat(parseInt(o,10),"px")),a(i)?l=i:s(i)&&(l="".concat(parseInt(i,10),"px"));var c=f.style,d=void 0===c?{}:c;e.restoreSelection();var h={style:_g(_g({},d),{width:u,height:l})};Og.setNodes(e,h,{match:function(e){return py.checkNodeType(e,"video")}}),e.hidePanelOrModal()})),this.$content=p}var h=this.$content;if(h.empty(),h.append(a),h.append(l),h.append(d),null==f)return h[0];var g=f.style,v=void 0===g?{}:g,m=v.width,y=void 0===m?"":m,b=v.height,E=void 0===b?"":b;return s.val(y),c.val(E),setTimeout((function(){s.focus()})),h[0]},e}();function BT(){return ST("w-e-edit-video")}var TT=function(){function e(){this.title=BE("videoModule.edit"),this.iconSvg='<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>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=BT(),this.posterInputId=BT(),this.buttonId=BT()}return e.prototype.getSelectedVideoNode=function(e){return py.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=zg(HE(BE("videoModule.videoSrc"),r,BE("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=zg(HE(BE("videoModule.videoPoster"),o,BE("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=Mv(u),p=Mv(d),h=zg($E(i,BE("videoModule.ok")),1)[0];if(null==this.$content){var g=Mv("<div></div>");g.on("click","#".concat(i),(function(n){return Mg(t,void 0,void 0,(function(){var t,i,a,s;return jg(this,(function(u){return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),a=ST("video-"),s={src:t,poster:i,key:a},e.restoreSelection(),Og.setNodes(e,s,{match:function(e){return py.checkNodeType(e,"video")}}),e.hidePanelOrModal(),[2]}))}))})),this.$content=g}var v=this.$content;v.empty(),v.append(s),v.append(c),v.append(h);var m=this.getSelectedVideoNode(e);if(null==m)return v[0];var y=m.src,b=void 0===y?"":y,E=m.poster,C=void 0===E?"":E;return f.val(b),p.val(C),setTimeout((function(){f.focus()})),v[0]},e}();function kT(e,t){return Mg(this,arguments,void 0,(function(e,t,n,r,o){var i,a,s,u,l,c,d;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o=""),jg(this,(function(f){switch(f.label){case 0:return t?(e.restoreSelection(),i=e.getMenuConfig("insertVideo"),a=i.onInsertedVideo,s=i.checkVideo,u=i.parseVideoSrc,[4,s(t,n)]):[2];case 1:return"string"==typeof(l=f.sent())?(e.alert(l,"error"),[2]):null==l?[2]:[4,u(t)];case 2:return 0!==(c=f.sent()).trim().indexOf("<iframe ")&&(c=function(e){return e.replace(/</g,"<").replace(/>/g,">")}(c)),d={type:"video",src:c,poster:n,children:[{text:""}],style:{width:r,height:o}},Promise.resolve().then((function(){py.isSelectedEmptyParagraph(e)&&Og.removeNodes(e,{mode:"highest"}),Og.insertNodes(e,d,{mode:"highest"})})),a(d),[2]}}))}))}function FT(){return ST("w-e-insert-video")}var IT=function(){function e(){this.title=BE("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=FT(),this.posterInputId=FT(),this.buttonId=FT()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ng.isCollapsed(t)||!!py.getSelectedElems(e).some((function(t){var n=py.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))})))},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=zg(HE(BE("videoModule.videoSrc"),r,BE("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=zg(HE(BE("videoModule.videoPoster"),o,BE("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=Mv(u),p=Mv(d),h=zg($E(i,BE("videoModule.ok")),1)[0];if(null==this.$content){var g=Mv("<div></div>");g.on("click","#".concat(i),(function(n){return Mg(t,void 0,void 0,(function(){var t,i;return jg(this,(function(a){switch(a.label){case 0:return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),[4,kT(e,t,i)];case 1:return a.sent(),e.hidePanelOrModal(),[2]}}))}))})),this.$content=g}var v=this.$content;return v.empty(),v.append(s),v.append(c),v.append(h),f.val(""),p.val(""),setTimeout((function(){f.focus()})),v[0]},e}();function PT(e){return e.getMenuConfig("uploadVideo")}var LT=new WeakMap;function RT(e,t){return Mg(this,void 0,void 0,(function(){var n,r;return jg(this,(function(o){switch(o.label){case 0:return n=function(e){var t=LT.get(e);if(null!=t)return t;var n=PT(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=DS(_g(_g({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,(function(t,n){return kT(e,t,n)})),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){var c=l.url,d=void 0===c?"":c,f=l.poster;kT(e,d,void 0===f?"":f),r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),LT.set(e,t),t}(e),r=t.map((function(e){return{name:e.name,type:e.type,size:e.size,data:e}})),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}}))}))}var _T=function(){function e(){this.title=BE("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i((function(t,n){return kT(e,t,n)}));else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=Mv("body"),u=Mv('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",(function(){var t=u[0].files;!function(e,t){Mg(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,l,c,d,f,p;return jg(this,(function(h){switch(h.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=[],o=PT(e).customUpload,h.label=1;case 1:h.trys.push([1,8,9,14]),i=!0,a=Ug(n),h.label=2;case 2:return[4,a.next()];case 3:return s=h.sent(),(c=s.done)?[3,7]:(p=s.value,i=!1,u=p,o?[4,o(u,(function(t,n){return kT(e,t,n)}))]:[3,5]);case 4:return h.sent(),[3,6];case 5:r.push(u),h.label=6;case 6:return i=!0,[3,2];case 7:return[3,14];case 8:return l=h.sent(),d={error:l},[3,14];case 9:return h.trys.push([9,,12,13]),i||c||!(f=a.return)?[3,11]:[4,f.call(a)];case 10:h.sent(),h.label=11;case 11:return[3,13];case 12:if(d)throw d.error;return[7];case 13:return[7];case 14:return r.length>0?[4,RT(e,r)]:[3,16];case 15:h.sent(),h.label=16;case 16:return[2]}}))}))}(e,t)}))}},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ng.isCollapsed(t)||!!py.getSelectedElems(e).some((function(t){var n=py.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))})))},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadVideo")},e}();function MT(e,t,n,r,o,i){return void 0===t&&(t=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),void 0===i&&(i="center"),{type:"video",src:e,poster:t,width:n,height:r,style:o,children:[{text:""}],textAlign:i}}var jT={selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=Mv(e),o="",i="",a="auto",s="auto",u={},l=r.find("iframe");if(l.length>0)return a=l.attr("width")||"auto",s=l.attr("height")||"auto",u=xT(u=l.attr("style")||""),MT(o=l[0].outerHTML,i,a,s,u,xT(r.attr("style")||"")["text-align"]||"center");var c=r.find("video");return(o=c.attr("src")||"")||c.length>0&&(o=c.find("source").attr("src")||""),a=c.attr("width")||"auto",s=c.attr("height")||"auto",MT(o,i=c.attr("poster")||"",a,s,u=xT(u=c.attr("style")||""),xT(r.attr("style")||"")["text-align"]||"center")}};var HT={selector:"iframe,video,p",preParseHtml:function(e){var t=Mv(e),n=t;if("p"===DT(t)){var r=t.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=Mv(o))}}var a=DT(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var s=Mv('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return s.append(n),s[0]}};var zT={type:"video",renderElem:function(e,t,n){var r,o=e,i=o.src,a=void 0===i?"":i,s=o.poster,u=void 0===s?"":s,l=o.key,c=void 0===l?"":l,d=o.width,f=void 0===d?"auto":d,p=o.height,h=void 0===p?"auto":p,g=o.style,v=void 0===g?{}:g,m=o.textAlign,y=void 0===m?"center":m,b=py.isNodeSelected(n,e);if(0===a.trim().indexOf("<iframe ")){r=sD("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y},innerHTML:wT(a,f,h,v)})}else{var E=sD("video",{key:c,poster:u,controls:!0,style:v},sD("source",{src:a,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==f&&(E.data.width=f),"auto"!==h&&(E.data.height=h),r=sD("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y}},E)}var C=HC("div",{props:{contentEditable:!1},on:{mousedown:function(e){return e.preventDefault()}}},r);return C}},$T={renderElems:[zT],elemsToHtml:[AT],preParseHtml:[HT],parseElemsHtml:[jT],menus:[{key:"insertVideo",factory:function(){return new IT},config:{onInsertedVideo:function(e){},checkVideo:function(e,t){return!0},parseVideoSrc:function(e){return e}}},{key:"uploadVideo",factory:function(){return new _T},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name," upload error"),t,n)}}},{key:"editVideoSize",factory:function(){return new NT}},{key:"editVideoSrc",factory:function(){return new TT}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"video"===e.type||t(e)},r.normalizeNode=function(e){var t=zg(e,2),o=t[0],i=t[1];"video"===py.getNodeType(o)&&(py.isLastNode(r,o)&&Og.insertNodes(r,py.genEmptyParagraph(),{at:[i[0]+1]}));return n([o,i])},r}};SE("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),SE("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});am&&(Mv.fn.append=am),qv&&(Mv.fn.on=qv),fm&&(Mv.fn.remove=fm),Wv&&(Mv.fn.val=Wv),vm&&(Mv.fn.click=vm),Jv&&(Mv.fn.hide=Jv);var UT=new WeakMap;function VT(e){return e.getMenuConfig("uploadImage")}function GT(e,t){return Mg(this,void 0,void 0,(function(){return jg(this,(function(n){return[2,new Promise((function(n){var r=new FileReader;r.readAsDataURL(t),r.onload=function(){var o=r.result;if(o){var i=o.toString(),a=0===i.indexOf("data:image")?"":i;DO(e,i,t.name,a),n("ok")}}}))]}))}))}function WT(e,t){return Mg(this,void 0,void 0,(function(){var n,r;return jg(this,(function(o){switch(o.label){case 0:return n=function(e){var t=UT.get(e);if(null!=t)return t;var n=VT(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=DS(_g(_g({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,(function(t,n,r){return DO(e,t,n,r)})),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){if(Array.isArray(l))l.forEach((function(t){var n=t.url,r=void 0===n?"":n,o=t.alt,i=void 0===o?"":o,a=t.href;DO(e,r,i,void 0===a?"":a)}));else{var c=l.url,d=void 0===c?"":c,f=l.alt,p=void 0===f?"":f,h=l.href;DO(e,d,p,void 0===h?"":h)}r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),UT.set(e,t),t}(e),r=t.map((function(e){return{name:e.name,type:e.type,size:e.size,data:e}})),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}}))}))}function qT(e,t){return Mg(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v;return jg(this,(function(m){switch(m.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=VT(e),o=r.customUpload,i=r.base64LimitSize,a=[],m.label=1;case 1:m.trys.push([1,10,11,16]),s=!0,u=Ug(n),m.label=2;case 2:return[4,u.next()];case 3:return l=m.sent(),(p=l.done)?[3,9]:(v=l.value,s=!1,d=(c=v).size,i&&d<=i?[4,GT(e,c)]:[3,5]);case 4:return m.sent(),[3,8];case 5:return o?[4,o(c,(function(t,n,r){return DO(e,t,n,r)}))]:[3,7];case 6:return m.sent(),[3,8];case 7:a.push(c),m.label=8;case 8:return s=!0,[3,2];case 9:return[3,16];case 10:return f=m.sent(),h={error:f},[3,16];case 11:return m.trys.push([11,,14,15]),s||p||!(g=u.return)?[3,13]:[4,g.call(u)];case 12:m.sent(),m.label=13;case 13:return[3,15];case 14:if(h)throw h.error;return[7];case 15:return[7];case 16:return a.length>0?[4,WT(e,a)]:[3,18];case 17:m.sent(),m.label=18;case 18:return[2]}}))}))}var KT=function(){function e(){this.title=BE("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return bO(e)},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadImage")},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i((function(t,n,r){return DO(e,t,n,r)}));else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=Mv("body"),u=Mv('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",(function(){var t=u[0].files;qT(e,t)}))}},e}();var YT={menus:[{key:"uploadImage",factory:function(){return new KT},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name,"' upload error"),n)},base64LimitSize:0}}],editorPlugin:function(e){var t=e.insertData,n=e;return n.insertData=function(r){if(bO(n))t(r);else if(r.getData("text/plain"))t(r);else{var o=r.files;if(o.length<=0)t(r);else Array.prototype.slice.call(o).some((function(e){return"image"===zg(e.type.split("/"),1)[0]}))?qT(e,o):t(r)}},n}};SE("en",{highLightModule:{selectLang:"Language"}}),SE("zh-CN",{highLightModule:{selectLang:"选择语言"}});var XT,ZT={exports:{}};var JT=(XT||(XT=1,function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},o.util.type(t)){case"Object":if(i=o.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=o.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e],a={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var u in n)n.hasOwnProperty(u)&&(a[u]=n[u]);n.hasOwnProperty(s)||(a[s]=i[s])}var l=r[e];return r[e]=a,o.languages.DFS(o.languages,(function(t,n){n===l&&t!=e&&(this[t]=a)})),a},DFS:function e(t,n,r,i){i=i||{};var a=o.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var u=t[s],l=o.util.type(u);"Object"!==l||i[a(u)]?"Array"!==l||i[a(u)]||(i[a(u)]=!0,e(u,n,s,i)):(i[a(u)]=!0,e(u,n,null,i))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,a=0;i=r.elements[a++];)o.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=o.util.getLanguage(t),a=o.languages[i];o.util.setLanguage(t,i);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&o.util.setLanguage(s,i);var u={element:t,language:i,grammar:a,code:t.textContent};function l(e){u.highlightedCode=e,o.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,o.hooks.run("after-highlight",u),o.hooks.run("complete",u),r&&r.call(u.element)}if(o.hooks.run("before-sanity-check",u),(s=u.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!u.code)return o.hooks.run("complete",u),void(r&&r.call(u.element));if(o.hooks.run("before-highlight",u),u.grammar)if(n&&e.Worker){var c=new Worker(o.filename);c.onmessage=function(e){l(e.data)},c.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else l(o.highlight(u.code,u.grammar,u.language));else l(o.util.encode(u.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new u;return l(o,o.head,e),s(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function s(e,t,n,r,u,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var h=0;h<p.length;++h){if(d&&d.cause==f+","+h)return;var g=p[h],v=g.inside,m=!!g.lookbehind,y=!!g.greedy,b=g.alias;if(y&&!g.pattern.global){var E=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,E+"g")}for(var C=g.pattern||g,D=r.next,w=u;D!==t.tail&&!(d&&w>=d.reach);w+=D.value.length,D=D.next){var A=D.value;if(t.length>e.length)return;if(!(A instanceof i)){var S,x=1;if(y){if(!(S=a(C,w,e,m))||S.index>=e.length)break;var O=S.index,N=S.index+S[0].length,B=w;for(B+=D.value.length;O>=B;)B+=(D=D.next).value.length;if(w=B-=D.value.length,D.value instanceof i)continue;for(var T=D;T!==t.tail&&(B<N||"string"==typeof T.value);T=T.next)x++,B+=T.value.length;x--,A=e.slice(w,B),S.index-=w}else if(!(S=a(C,0,A,m)))continue;O=S.index;var k=S[0],F=A.slice(0,O),I=A.slice(O+k.length),P=w+A.length;d&&P>d.reach&&(d.reach=P);var L=D.prev;if(F&&(L=l(t,L,F),w+=F.length),c(t,L,x),D=l(t,L,new i(f,v?o.tokenize(k,v):k,b,k)),I&&l(t,D,I),x>1){var R={cause:f+","+h,reach:P};s(e,t,n,D.prev,w,R),d&&R.reach>d.reach&&(d.reach=R.reach)}}}}}}function u(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var s="";for(var u in i.attributes)s+=" "+u+'="'+(i.attributes[u]||"").replace(/"/g,""")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+s+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,a=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),a&&e.close()}),!1),o):o;var d=o.util.currentScript();function f(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
18
|
+
*/function i(e,t){const n=/\$/g;let r=[e];if(null==t)return r;for(const e of Object.keys(t))if("_"!==e){let i=t[e];"string"==typeof i&&(i=n[Symbol.replace](i,"$$$$")),r=o(r,new RegExp(`%\\{${e}\\}`,"g"),i)}return r}var a=n("apply");function s(e){if(null==e||!e.strings)return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}return gw=class{constructor(t){Object.defineProperty(this,a,{value:s}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(t)?t.forEach(e(this,a)[a],this):e(this,a)[a](t)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!r(this.locale.strings,e))throw new Error(`missing string: ${e}`);const n=this.locale.strings[e];if("object"==typeof n){if(t&&void 0!==t.smart_count){return i(n[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return i(n,t)}},gw}function Uw(){return yw||(yw=1,mw=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,o,i,a,s){var u=function(e){var n=t[e]?t[e]:[],r=e.indexOf(":"),o=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],i=Object.keys(t),a=0,s=i.length;for(;a<s;a++){var u=i[a];if("*"===u&&(n=n.concat(t[u])),2===o.length&&o[0]===u){n=n.concat(t[u]);break}}return n}(e);u.length&&function(e,t,n){var r=0,o=t.length;for(;r<o&&t[r];r++)t[r].event=e,t[r].apply(t[r],n)}(e,u,[n,r,o,i,a,s])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,function r(){n.apply(this,arguments),e.off(t,r)})},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],o=0,i=r?r.length:0;o<i;o++)r[o]!==t&&n.push(r[o]);n.length?this._fns[e]=n:delete this._fns[e]},e}),mw}function Vw(){if(Ew)return bw;Ew=1;var e=0;function t(t){return"__private_"+e+++"_"+t}var n=t("publish");class r{constructor(){Object.defineProperty(this,n,{value:o}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},r={...this.state,...e};this.state=r,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,n)[n](t,r,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach(e=>{e(...t)})}return r.VERSION="2.1.1",bw=function(){return new r}}function Ww(){if(Dw)return Cw;return Dw=1,Cw=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}}function Gw(){return Aw?ww:(Aw=1,ww={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"})}function qw(){if(Lw)return _w;Lw=1;var e=iw(),t=ow(),n=Hw();let r,o;function i(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var a=0;function s(e){return"__private_"+a+++"_"+e}const u=$w(),l=Uw(),c=DC(),d=Vw(),f=function(){if(xw)return Sw;xw=1;const e=Ww(),t=Gw();return Sw=function(n){var r;if(n.type)return n.type;const o=n.name?null==(r=e(n.name).extension)?void 0:r.toLowerCase():null;return o&&o in t?t[o]:"application/octet-stream"}}(),p=Ww(),h=function(){if(Nw)return Ow;function e(e){let t="";return e.replace(/[^A-Z0-9]/gi,e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/"))+t}return Nw=1,Ow=function(t){let n="uppy";return"string"==typeof t.name&&(n+=`-${e(t.name.toLowerCase())}`),void 0!==t.type&&(n+=`-${t.type}`),t.meta&&"string"==typeof t.meta.relativePath&&(n+=`-${e(t.meta.relativePath.toLowerCase())}`),void 0!==t.data.size&&(n+=`-${t.data.size}`),void 0!==t.data.lastModified&&(n+=`-${t.data.lastModified}`),n}}(),g=(Tw||(Tw=1,Bw=function(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[r,o]=n.split(".");return r=parseInt(r,10),o=parseInt(o,10),r<15||15===r&&o<15063||r>18||18===r&&o>=18218}),Bw),v=Fw?kw:(Fw=1,kw=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}),m=Pw?Iw:(Pw=1,Iw={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}});var y=s("plugins"),b=s("restricter"),E=s("storeUnsubscribe"),C=s("emitter"),D=s("preProcessors"),w=s("uploaders"),A=s("postProcessors"),S=s("informAndEmit"),x=s("checkRequiredMetaFieldsOnFile"),O=s("checkRequiredMetaFields"),N=s("assertNewUploadAllowed"),B=s("checkAndCreateFileStateObject"),T=s("startIfAutoProceed"),k=s("addListeners"),F=s("updateOnlineStatus"),I=s("createUpload"),P=s("getUpload"),_=s("removeUpload"),L=s("runUpload");r=Symbol.for("uppy test: getPlugins"),o=Symbol.for("uppy test: createUpload");class R{constructor(e){Object.defineProperty(this,L,{value:K}),Object.defineProperty(this,_,{value:q}),Object.defineProperty(this,P,{value:G}),Object.defineProperty(this,I,{value:W}),Object.defineProperty(this,k,{value:V}),Object.defineProperty(this,T,{value:U}),Object.defineProperty(this,B,{value:$}),Object.defineProperty(this,N,{value:z}),Object.defineProperty(this,O,{value:H}),Object.defineProperty(this,x,{value:j}),Object.defineProperty(this,S,{value:M}),Object.defineProperty(this,y,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,E,{writable:!0,value:void 0}),Object.defineProperty(this,C,{writable:!0,value:l()}),Object.defineProperty(this,D,{writable:!0,value:new Set}),Object.defineProperty(this,w,{writable:!0,value:new Set}),Object.defineProperty(this,A,{writable:!0,value:new Set}),Object.defineProperty(this,F,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=m;const r={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:n.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:d(),logger:t.justErrorsLogger,infoTimeout:5e3};this.opts={...r,...e,restrictions:{...r.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=t.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=c(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:g(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),i(this,b)[b]=new n.Restricter(()=>this.opts,this.i18n),i(this,E)[E]=this.store.subscribe((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)}),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),i(this,k)[k]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i(this,C)[C].emit(e,...n)}on(e,t){return i(this,C)[C].on(e,t),this}once(e,t){return i(this,C)[C].once(e,t),this}off(e,t){return i(this,C)[C].off(e,t),this}updateAll(e){this.iteratePlugins(t=>{t.update(e)})}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new u([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins(e=>{e.setOptions()}),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach(r=>{const o={...t[r]};o.progress={...o.progress,...e},n[r]=o}),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){i(this,D)[D].add(e)}removePreProcessor(e){return i(this,D)[D].delete(e)}addPostProcessor(e){i(this,A)[A].add(e)}removePostProcessor(e){return i(this,A)[A].delete(e)}addUploader(e){i(this,w)[w].add(e)}removeUploader(e){return i(this,w)[w].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach(t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}}),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),o=r.filter(e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted}),i=r.filter(e=>!e.progress.uploadStarted),a=r.filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess),s=r.filter(e=>e.progress.uploadStarted),u=r.filter(e=>e.isPaused),l=r.filter(e=>e.progress.uploadComplete),c=r.filter(e=>e.error),d=o.filter(e=>!e.isPaused),f=r.filter(e=>e.progress.preprocess||e.progress.postprocess);return{newFiles:i,startedFiles:a,uploadStartedFiles:s,pausedFiles:u,completeFiles:l,erroredFiles:c,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:f,isUploadStarted:s.length>0,isAllComplete:100===t&&l.length===r.length&&0===f.length,isAllErrored:!!n&&c.length===r.length,isAllPaused:0!==o.length&&u.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:r.some(e=>e.isGhost)}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return i(this,b)[b].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){i(this,N)[N](e);const{files:t}=this.getState();let n=i(this,B)[B](t,e);return t[n.id]&&t[n.id].isGhost&&(n={...t[n.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...t,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),i(this,T)[T](),n.id}addFiles(e){i(this,N)[N]();const t={...this.getState().files},n=[],r=[];for(let o=0;o<e.length;o++)try{let r=i(this,B)[B](t,e[o]);t[r.id]&&t[r.id].isGhost&&(r={...t[r.id],data:e[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${r.name}, ${r.id}`)),t[r.id]=r,n.push(r)}catch(e){e.isRestriction||r.push(e)}if(this.setState({files:t}),n.forEach(e=>{this.emit("file-added",e)}),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach(e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)}),n.length>0&&i(this,T)[T](),r.length>0){let e="Multiple errors occurred while adding files:\n";if(r.forEach(t=>{e+=`\n * ${t.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(r,e);{const t=new Error(e);throw t.errors=r,t}}}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),o={...n},i={...r},a=Object.create(null);function s(e){return void 0===a[e]}e.forEach(e=>{n[e]&&(a[e]=n[e],delete o[e])}),Object.keys(i).forEach(e=>{const t=r[e].fileIDs.filter(s);if(0===t.length)return void delete i[e];const{capabilities:n}=this.getState();if(t.length!==r[e].fileIDs.length&&!n.individualCancellation)throw new Error("individualCancellation is disabled");i[e]={...r[e],fileIDs:t}});const u={currentUploads:i,files:o};0===Object.keys(o).length&&(u.allowNewUpload=!0,u.error=null,u.recoveredState=null),this.setState(u),this.calculateTotalProgress();const l=Object.keys(a);l.forEach(e=>{this.emit("file-removed",a[e],t)}),l.length>5?this.log(`Removed ${l.length} files`):this.log(`Removed files: ${l.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n={...e[t],isPaused:!0};e[t]=n}),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter(t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted).forEach(t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter(t=>e[t].error);if(t.forEach(t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n}),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=i(this,I)[I](t,{forceAllowNewUpload:!0});return i(this,L)[L](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=i(this,I)[I]([e],{forceAllowNewUpload:!0});return i(this,L)[L](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins(e=>{e.provider&&e.provider.logout&&e.provider.logout()})}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter(e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess);if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter(e=>null!=e.progress.bytesTotal),n=e.filter(e=>null==e.progress.bytesTotal);if(0===t.length){const t=100*e.length,r=n.reduce((e,t)=>e+t.progress.percentage,0),o=Math.round(r/t*100);return void this.setState({totalProgress:o})}let r=t.reduce((e,t)=>e+t.progress.bytesTotal,0);const o=r/t.length;r+=o*n.length;let i=0;t.forEach(e=>{i+=e.progress.bytesUploaded}),n.forEach(e=>{i+=o*(e.progress.percentage||0)/100});let a=0===r?0:Math.round(i/r*100);a>100&&(a=100),this.setState({totalProgress:a}),this.emit("progress",a)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`)}const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(r);if(o){const e=`Already found a plugin named '${o.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in i(this,y)[y]?i(this,y)[y][n.type].push(n):i(this,y)[y][n.type]=[n],n.install(),this}getPlugin(e){for(const t of Object.values(i(this,y)[y])){const n=t.find(t=>t.id===e);if(null!=n)return n}}[r](e){return i(this,y)[y][e]}iteratePlugins(e){Object.values(i(this,y)[y]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=i(this,y)[y][e.type],n=t.findIndex(t=>t.id===e.id);-1!==n&&t.splice(n,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),i(this,E)[E](),this.iteratePlugins(e=>{this.removePlugin(e)}),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",i(this,F)[F]),window.removeEventListener("offline",i(this,F)[F]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout(()=>this.hideInfo(),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?i(this,L)[L](e):(i(this,_)[_](e),Promise.reject(new Error("Nonexistent upload")))}[o](){return i(this,I)[I](...arguments)}addResultData(e,t){if(!i(this,P)[P](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=i(this,y)[y].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const r=this.opts.onBeforeUpload(t);return!1===r?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&"object"==typeof r&&(t=r,this.setState({files:t})),Promise.resolve().then(()=>i(this,b)[b].validateMinNumberOfFiles(t)).catch(e=>{throw i(this,S)[S](e),e}).then(()=>{if(!i(this,O)[O](t))throw new n.RestrictionError(this.i18n("missingRequiredMetaField"))}).catch(e=>{throw e}).then(()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap(e=>e.fileIDs),r=[];Object.keys(t).forEach(e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)});const o=i(this,I)[I](r);return i(this,L)[L](o)}).catch(e=>{throw this.emit("error",e),this.log(e,"error"),e}))}}function M(e,t){const{message:n,details:r=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:n,details:r},"error",this.opts.infoTimeout),this.log(`${n} ${r}`.trim(),"error")}function j(e){const{missingFields:t,error:n}=i(this,b)[b].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),!1)}function H(e){let t=!0;for(const n of Object.values(e))i(this,x)[x](n)||(t=!1);return t}function z(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new n.RestrictionError(this.i18n("noMoreFilesAllowed"));throw i(this,S)[S](t,e),t}}function $(e,t){const r=f(t),o=v(r,t),a=p(o).extension,s=Boolean(t.isRemote),u=h({...t,type:r});if(this.checkIfFileAlreadyExists(u)){const e=new n.RestrictionError(this.i18n("noDuplicates",{fileName:o}));throw i(this,S)[S](e,t),e}const l=t.meta||{};l.name=o,l.type=r;const c=Number.isFinite(t.data.size)?t.data.size:null;let d={source:t.source||"",id:u,name:o,extension:a||"",meta:{...this.getState().meta,...l},type:r,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isRemote:s,remote:t.remote||"",preview:t.preview};const g=this.opts.onBeforeFileAdded(d,e);if(!1===g){const e=new n.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof g&&null!==g&&(d=g);try{const t=Object.keys(e).map(t=>e[t]);i(this,b)[b].validate(d,t)}catch(e){throw i(this,S)[S](e,d),e}return d}function U(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout(()=>{this.scheduledAutoProceed=null,this.upload().catch(e=>{e.isRestriction||this.log(e.stack||e.message||e)})},4))}function V(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",(t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){const e=new Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),i(this,S)[S](e)}else i(this,S)[S](n)}),this.on("upload",()=>{this.setState({error:null})}),this.on("upload-started",e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("upload-progress",this.calculateProgress),this.on("upload-success",(e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:i(this,A)[A].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()}),this.on("preprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("preprocess-complete",e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})}),this.on("postprocess-progress",(e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)}),this.on("postprocess-complete",e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})}),this.on("restored",()=>{this.calculateTotalProgress()}),this.on("dashboard:file-edit-complete",e=>{e&&i(this,x)[x](e)}),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",i(this,F)[F]),window.addEventListener("offline",i(this,F)[F]),setTimeout(i(this,F)[F],3e3))}function W(t,n){void 0===n&&(n={});const{forceAllowNewUpload:r=!1}=n,{allowNewUpload:o,currentUploads:i}=this.getState();if(!o&&!r)throw new Error("Cannot create a new upload: already uploading.");const a=(0,e.nanoid)();return this.emit("upload",{id:a,fileIDs:t}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...i,[a]:{fileIDs:t,step:0,result:{}}}}),a}function G(e){const{currentUploads:t}=this.getState();return t[e]}function q(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function K(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,o=[...i(this,D)[D],...i(this,w)[w],...i(this,A)[A]];try{for(let i=r;i<o.length&&n;i++){const r=o[i],a={...n,step:i};this.setState({currentUploads:{...t,[e]:a}}),await r(a.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(t){throw i(this,_)[_](e),t}if(n){n.fileIDs.forEach(e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)});const r=n.fileIDs.map(e=>this.getFile(e)),o=r.filter(e=>!e.error),i=r.filter(e=>e.error);await this.addResultData(e,{successful:o,failed:i,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let a;return n&&(a=n.result,this.emit("complete",a),i(this,_)[_](e)),null==a&&this.log(`Not setting result for an upload that has been removed: ${e}`),a}return R.VERSION="2.3.4",_w=R}var Kw,Yw,Xw,Zw,Jw,Qw,eA,tA,nA,rA,oA,iA,aA,sA={},uA=[],lA=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cA=Array.isArray;function dA(e,t){for(var n in t)e[n]=t[n];return e}function fA(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function pA(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Kw.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return hA(e,a,r,o,null)}function hA(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++Xw:o,__i:-1,__u:0};return null==o&&null!=Yw.vnode&&Yw.vnode(i),i}function gA(e){return e.children}function vA(e,t){this.props=e,this.context=t}function mA(e,t){if(null==t)return e.__?mA(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?mA(e):null}function yA(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return yA(e)}}function bA(e){(!e.__d&&(e.__d=!0)&&Jw.push(e)&&!EA.__r++||Qw!=Yw.debounceRendering)&&((Qw=Yw.debounceRendering)||eA)(EA)}function EA(){for(var e,t,n,r,o,i,a,s=1;Jw.length;)Jw.length>s&&Jw.sort(tA),e=Jw.shift(),s=Jw.length,e.__d&&(n=void 0,o=(r=(t=e).__v).__e,i=[],a=[],t.__P&&((n=dA({},r)).__v=r.__v+1,Yw.vnode&&Yw.vnode(n),NA(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[o]:null,i,null==o?mA(r):o,!!(32&r.__u),a),n.__v=r.__v,n.__.__k[n.__i]=n,BA(i,n,a),n.__e!=o&&yA(n)));EA.__r=0}function CA(e,t,n,r,o,i,a,s,u,l,c){var d,f,p,h,g,v,m=r&&r.__k||uA,y=t.length;for(u=DA(n,t,m,u,y),d=0;d<y;d++)null!=(p=n.__k[d])&&(f=-1==p.__i?sA:m[p.__i]||sA,p.__i=d,v=NA(e,p,f,o,i,a,s,u,l,c),h=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&FA(f.ref,null,p),c.push(p.ref,p.__c||h,p)),null==g&&null!=h&&(g=h),4&p.__u||f.__k===p.__k?u=wA(p,u,e):"function"==typeof p.type&&void 0!==v?u=v:h&&(u=h.nextSibling),p.__u&=-7);return n.__e=g,u}function DA(e,t,n,r,o){var i,a,s,u,l,c=n.length,d=c,f=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(a=t[i])&&"boolean"!=typeof a&&"function"!=typeof a?(u=i+f,(a=e.__k[i]="string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?hA(null,a,null,null,null):cA(a)?hA(gA,{children:a},null,null,null):null==a.constructor&&a.__b>0?hA(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,s=null,-1!=(l=a.__i=AA(a,n,u,d))&&(d--,(s=n[l])&&(s.__u|=2)),null==s||null==s.__v?(-1==l&&(o>c?f--:o<c&&f++),"function"!=typeof a.type&&(a.__u|=4)):l!=u&&(l==u-1?f--:l==u+1?f++:(l>u?f--:f++,a.__u|=4))):e.__k[i]=null;if(d)for(i=0;i<c;i++)null!=(s=n[i])&&!(2&s.__u)&&(s.__e==r&&(r=mA(s)),IA(s,s));return r}function wA(e,t,n){var r,o;if("function"==typeof e.type){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=wA(r[o],t,n));return t}e.__e!=t&&(t&&e.type&&!n.contains(t)&&(t=mA(e)),n.insertBefore(e.__e,t||null),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function AA(e,t,n,r){var o,i,a=e.key,s=e.type,u=t[n];if(null===u&&null==e.key||u&&a==u.key&&s==u.type&&!(2&u.__u))return n;if(r>(null==u||2&u.__u?0:1))for(o=n-1,i=n+1;o>=0||i<t.length;){if(o>=0){if((u=t[o])&&!(2&u.__u)&&a==u.key&&s==u.type)return o;o--}if(i<t.length){if((u=t[i])&&!(2&u.__u)&&a==u.key&&s==u.type)return i;i++}}return-1}function SA(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||lA.test(t)?n:n+"px"}function xA(e,t,n,r,o){var i,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||SA(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||SA(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(nA,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=rA,e.addEventListener(t,i?iA:oA,i)):e.removeEventListener(t,i?iA:oA,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function OA(e){return function(t){if(this.l){var n=this.l[t.type+e];if(null==t.t)t.t=rA++;else if(t.t<n.u)return;return n(Yw.event?Yw.event(t):t)}}}function NA(e,t,n,r,o,i,a,s,u,l){var c,d,f,p,h,g,v,m,y,b,E,C,D,w,A,S,x,O=t.type;if(null!=t.constructor)return null;128&n.__u&&(u=!!(32&n.__u),i=[s=t.__e=n.__e]),(c=Yw.__b)&&c(t);e:if("function"==typeof O)try{if(m=t.props,y="prototype"in O&&O.prototype.render,b=(c=O.contextType)&&r[c.__c],E=c?b?b.props.value:c.__:r,n.__c?v=(d=t.__c=n.__c).__=d.__E:(y?t.__c=d=new O(m,E):(t.__c=d=new vA(m,E),d.constructor=O,d.render=PA),b&&b.sub(d),d.props=m,d.state||(d.state={}),d.context=E,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),y&&null==d.__s&&(d.__s=d.state),y&&null!=O.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=dA({},d.__s)),dA(d.__s,O.getDerivedStateFromProps(m,d.__s))),p=d.props,h=d.state,d.__v=t,f)y&&null==O.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),y&&null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(y&&null==O.getDerivedStateFromProps&&m!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(m,E),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(m,d.__s,E)||t.__v==n.__v){for(t.__v!=n.__v&&(d.props=m,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[],d.__h.length&&a.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(m,d.__s,E),y&&null!=d.componentDidUpdate&&d.__h.push(function(){d.componentDidUpdate(p,h,g)})}if(d.context=E,d.props=m,d.__P=e,d.__e=!1,D=Yw.__r,w=0,y){for(d.state=d.__s,d.__d=!1,D&&D(t),c=d.render(d.props,d.state,d.context),A=0;A<d._sb.length;A++)d.__h.push(d._sb[A]);d._sb=[]}else do{d.__d=!1,D&&D(t),c=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++w<25);d.state=d.__s,null!=d.getChildContext&&(r=dA(dA({},r),d.getChildContext())),y&&!f&&null!=d.getSnapshotBeforeUpdate&&(g=d.getSnapshotBeforeUpdate(p,h)),S=c,null!=c&&c.type===gA&&null==c.key&&(S=TA(c.props.children)),s=CA(e,cA(S)?S:[S],t,n,r,o,i,a,s,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),v&&(d.__E=d.__=null)}catch(e){if(t.__v=null,u||null!=i)if(e.then){for(t.__u|=u?160:128;s&&8==s.nodeType&&s.nextSibling;)s=s.nextSibling;i[i.indexOf(s)]=null,t.__e=s}else for(x=i.length;x--;)fA(i[x]);else t.__e=n.__e,t.__k=n.__k;Yw.__e(e,t,n)}else null==i&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=kA(n.__e,t,n,r,o,i,a,u,l);return(c=Yw.diffed)&&c(t),128&t.__u?void 0:s}function BA(e,t,n){for(var r=0;r<n.length;r++)FA(n[r],n[++r],n[++r]);Yw.__c&&Yw.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){Yw.__e(e,t.__v)}})}function TA(e){return"object"!=typeof e||null==e||e.__b&&e.__b>0?e:cA(e)?e.map(TA):dA({},e)}function kA(e,t,n,r,o,i,a,s,u){var l,c,d,f,p,h,g,v=n.props,m=t.props,y=t.type;if("svg"==y?o="http://www.w3.org/2000/svg":"math"==y?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=i)for(l=0;l<i.length;l++)if((p=i[l])&&"setAttribute"in p==!!y&&(y?p.localName==y:3==p.nodeType)){e=p,i[l]=null;break}if(null==e){if(null==y)return document.createTextNode(m);e=document.createElementNS(o,y,m.is&&m),s&&(Yw.__m&&Yw.__m(t,i),s=!1),i=null}if(null==y)v===m||s&&e.data==m||(e.data=m);else{if(i=i&&Kw.call(e.childNodes),v=n.props||sA,!s&&null!=i)for(v={},l=0;l<e.attributes.length;l++)v[(p=e.attributes[l]).name]=p.value;for(l in v)if(p=v[l],"children"==l);else if("dangerouslySetInnerHTML"==l)d=p;else if(!(l in m)){if("value"==l&&"defaultValue"in m||"checked"==l&&"defaultChecked"in m)continue;xA(e,l,null,p,o)}for(l in m)p=m[l],"children"==l?f=p:"dangerouslySetInnerHTML"==l?c=p:"value"==l?h=p:"checked"==l?g=p:s&&"function"!=typeof p||v[l]===p||xA(e,l,p,v[l],o);if(c)s||d&&(c.__html==d.__html||c.__html==e.innerHTML)||(e.innerHTML=c.__html),t.__k=[];else if(d&&(e.innerHTML=""),CA("template"==t.type?e.content:e,cA(f)?f:[f],t,n,r,"foreignObject"==y?"http://www.w3.org/1999/xhtml":o,i,a,i?i[0]:n.__k&&mA(n,0),s,u),null!=i)for(l=i.length;l--;)fA(i[l]);s||(l="value","progress"==y&&null==h?e.removeAttribute("value"):null!=h&&(h!==e[l]||"progress"==y&&!h||"option"==y&&h!=v[l])&&xA(e,l,h,v[l],o),l="checked",null!=g&&g!=e[l]&&xA(e,l,g,v[l],o))}return e}function FA(e,t,n){try{if("function"==typeof e){var r="function"==typeof e.__u;r&&e.__u(),r&&null==t||(e.__u=e(t))}else e.current=t}catch(e){Yw.__e(e,n)}}function IA(e,t,n){var r,o;if(Yw.unmount&&Yw.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||FA(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Yw.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&IA(r[o],t,n||"function"!=typeof e.type);n||fA(e.__e),e.__c=e.__=e.__e=void 0}function PA(e,t,n){return this.constructor(e,n)}function _A(e,t,n){var r,o,i,a;t==document&&(t=document.documentElement),Yw.__&&Yw.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],a=[],NA(t,e=(!r&&n||t).__k=pA(gA,null,[e]),o||sA,sA,t.namespaceURI,!r&&n?[n]:o?null:t.firstChild?Kw.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r,a),BA(i,e,a)}Kw=uA.slice,Yw={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(t){e=t}throw e}},Xw=0,Zw=function(e){return null!=e&&null==e.constructor},vA.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=dA({},this.state),"function"==typeof e&&(e=e(dA({},n),this.props)),e&&dA(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),bA(this))},vA.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),bA(this))},vA.prototype.render=gA,Jw=[],eA="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tA=function(e,t){return e.__v.__b-t.__v.__b},EA.__r=0,nA=/(PointerCapture)$|Capture$/i,rA=0,oA=OA(!1),iA=OA(!0),aA=0;var LA,RA,MA,jA,HA,zA,$A,UA,VA,WA,GA,qA=Object.freeze({__proto__:null,Component:vA,Fragment:gA,cloneElement:function(e,t,n){var r,o,i,a,s=dA({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)"key"==i?r=t[i]:"ref"==i?o=t[i]:s[i]=void 0===t[i]&&null!=a?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?Kw.call(arguments,2):n),hA(e.type,s,r||e.key,o||e.ref,null)},createContext:function(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,bA(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+aA++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t},createElement:pA,createRef:function(){return{current:null}},h:pA,hydrate:function e(t,n){_A(t,n,e)},get isValidElement(){return Zw},get options(){return Yw},render:_A,toChildArray:function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(cA(t)?t.some(function(t){e(t,n)}):n.push(t)),n}}),KA=E(qA);function YA(){if(jA)return MA;jA=1;const e=RA?LA:(RA=1,LA=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE});return MA=function(t,n){return void 0===n&&(n=document),"string"==typeof t?n.querySelector(t):e(t)?t:null}}function XA(){if(UA)return $A;UA=1;const e=$w();return $A=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new e([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}}}function ZA(){if(WA)return VA;WA=1;var e=KA;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function r(e){return"__private_"+n+++"_"+e}const o=YA(),i=zA?HA:(zA=1,HA=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir}),a=XA();var s=r("updateUI");class u extends a{constructor(){super(...arguments),Object.defineProperty(this,s,{writable:!0,value:void 0})}mount(n,r){const a=r.id,l=o(n);if(l){this.isTargetDOMEl=!0;const r=document.createElement("div");return r.classList.add("uppy-Root"),t(this,s)[s]=function(e){let t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=o,t||(t=Promise.resolve().then(()=>(t=null,e(...n)))),t}}(t=>{this.uppy.getPlugin(this.id)&&((0,e.render)(this.render(t),r),this.afterUpdate())}),this.uppy.log(`Installing ${a} to a DOM element '${n}'`),this.opts.replaceTargetContent&&(l.innerHTML=""),(0,e.render)(this.render(this.uppy.getState()),r),this.el=r,l.appendChild(r),r.dir=this.opts.direction||i(r)||"ltr",this.onMount(),this.el}let c;if("object"==typeof n&&n instanceof u)c=n;else if("function"==typeof n){const e=n;this.uppy.iteratePlugins(t=>{t instanceof e&&(c=t)})}if(c)return this.uppy.log(`Installing ${a} to ${c.id}`),this.parent=c,this.el=c.addTarget(r),this.onMount(),this.el;this.uppy.log(`Not installing ${a}`);let d=`Invalid target option given to ${a}.`;throw d+="function"==typeof n?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(d)}update(e){var n,r;null!=this.el&&(null==(n=(r=t(this,s))[s])||n.call(r,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove());this.onUnmount()}onMount(){}onUnmount(){}}return VA=u}var JA,QA,eS,tS,nS,rS,oS,iS,aS,sS,uS=(GA||(GA=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return n.debugLogger}});var n=ow();e.exports=qw();const r=ZA();t.UIPlugin=r;const o=XA();t.BasePlugin=o;const i=qw();t.Uppy=i;const a=ZA(),s=XA();i.Uppy=i,i.UIPlugin=a,i.BasePlugin=s,i.debugLogger=n.debugLogger}(nw,nw.exports)),nw.exports),lS=b(uS),cS={};function dS(){if(QA)return JA;QA=1;class e extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}return JA=e}function fS(){if(sS)return aS;let e;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}sS=1;var n=0;function r(e){return"__private_"+n+++"_"+e}const o=function(){if(tS)return eS;tS=1;const e=dS();return eS=function(){return fetch(...arguments).catch(t=>{throw"AbortError"===t.name?t:new e(t)})},eS}(),i=function(){if(rS)return nS;rS=1;const e=zw();class t extends Error{constructor(t,n){void 0===n&&(n={}),super(t),this.cause=n.cause,this.cause&&e(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}}return nS=t}(),a=function(){if(iS)return oS;iS=1;class e extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}return oS=e}();async function s(e){if(401===e.status)throw new a;const t=e.json();if(e.status<200||e.status>300){let n=`Failed request with status: ${e.status}. ${e.statusText}`;try{const e=await t;n=e.message?`${n} message: ${e.message}`:n,n=e.requestId?`${n} request-Id: ${e.requestId}`:n}finally{throw new Error(n)}}return t}var u=r("companionHeaders"),l=r("getPostResponseFunc"),c=r("getUrl"),d=r("errorHandler");e=Symbol.for("uppy test: getCompanionHeaders");class f{constructor(e,n){Object.defineProperty(this,d,{value:h}),Object.defineProperty(this,c,{value:p}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:e=>t=>e?t:this.onReceiveResponse(t)}),this.uppy=e,this.opts=n,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,t(this,u)[u]=null==n?void 0:n.companionHeaders}setCompanionHeaders(e){t(this,u)[u]=e}[e](){return t(this,u)[u]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}headers(){return Promise.resolve({...f.defaultHeaders,...t(this,u)[u]})}onReceiveResponse(e){const t=this.uppy.getState().companion||{},n=this.opts.companionUrl,{headers:r}=e;return r.has("i-am")&&r.get("i-am")!==t[n]&&this.uppy.setState({companion:{...t,[n]:r.get("i-am")}}),e}preflight(e){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(t(this,c)[c](e),{method:"OPTIONS"}).then(e=>(e.headers.has("access-control-allow-headers")&&(this.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map(e=>e.trim().toLowerCase())),this.preflightDone=!0,this.allowedHeaders.slice())).catch(e=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${e}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice()))}preflightAndHeaders(e){return Promise.all([this.preflight(e),this.headers()]).then(e=>{let[t,n]=e;return Object.keys(n).forEach(e=>{t.includes(e.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${e}`),delete n[e])}),n})}get(e,n){return this.preflightAndHeaders(e).then(n=>o(t(this,c)[c](e),{method:"get",headers:n,credentials:this.opts.companionCookiesRule||"same-origin"})).then(t(this,l)[l](n)).then(s).catch(t(this,d)[d]("get",e))}post(e,n,r){const i="post";return this.preflightAndHeaders(e).then(r=>o(t(this,c)[c](e),{method:i,headers:r,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(n)})).then(t(this,l)[l](r)).then(s).catch(t(this,d)[d](i,e))}delete(e,n,r){const i="delete";return this.preflightAndHeaders(e).then(t=>o(`${this.hostname}/${e}`,{method:i,headers:t,credentials:this.opts.companionCookiesRule||"same-origin",body:n?JSON.stringify(n):null})).then(t(this,l)[l](r)).then(s).catch(t(this,d)[d](i,e))}}function p(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function h(e,n){return r=>{var o;return null!=(o=r)&&o.isAuthError||(r=new i(`Could not ${e} ${t(this,c)[c](n)}`,{cause:r})),Promise.reject(r)}}return f.VERSION="2.2.2",f.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${f.VERSION}`},aS=f}var pS,hS,gS,vS,mS,yS,bS,ES,CS={};function DS(){if(pS)return CS;return pS=1,Object.defineProperty(CS,"__esModule",{value:!0}),CS.getItem=function(e){return Promise.resolve(localStorage.getItem(e))},CS.removeItem=function(e){return new Promise(t=>{localStorage.removeItem(e),t()})},CS.setItem=function(e,t){return new Promise(n=>{localStorage.setItem(e,t),n()})},CS}function wS(){if(ES)return cS;ES=1,Object.defineProperty(cS,"__esModule",{value:!0}),cS.Socket=cS.SearchProvider=cS.RequestClient=cS.Provider=void 0;const e=fS();cS.RequestClient=e;const t=function(){if(gS)return hS;gS=1;var e=DS();const t=fS();return hS=class extends t{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then(e=>{let[t,n]=e;const r={};return n&&(r["uppy-auth-token"]=n),this.companionKeysParams&&(r["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...t,...r}})}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),n=t.getPluginState().authenticated?401!==e.status:e.status<400;return t.setPluginState({authenticated:n}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(e){void 0===e&&(e={});const t=new URLSearchParams(e);return this.preAuthToken&&t.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${t}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const e=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=e.token}catch(e){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then(e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)])).then(e=>{let[t]=e;return t})}static initPlugin(t,n,r){if(t.type="acquirer",t.files=[],r&&(t.opts={...r,...n}),n.serverUrl||n.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(n.companionAllowedHosts){const e=n.companionAllowedHosts;if(!("string"==typeof e||Array.isArray(e)||e instanceof RegExp))throw new TypeError(`${t.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);t.opts.companionAllowedHosts=e}else/^(?!https?:\/\/).*$/i.test(n.companionUrl)?t.opts.companionAllowedHosts=`https://${n.companionUrl.replace(/^\/\//,"")}`:t.opts.companionAllowedHosts=new URL(n.companionUrl).origin;t.storage=t.opts.storage||e}},hS}();cS.Provider=t;const n=function(){if(mS)return vS;mS=1;const e=fS();return vS=class extends e{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t?`&${t}`:""}`)}},vS}();cS.SearchProvider=n;const r=function(){if(bS)return yS;let e,t;function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}bS=1;var r=0;function o(e){return"__private_"+r+++"_"+e}const i=Uw();var a=o("queued"),s=o("emitter"),u=o("isOpen"),l=o("socket"),c=o("handleMessage");return e=Symbol.for("uppy test: getSocket"),t=Symbol.for("uppy test: getQueued"),yS=class{constructor(e){Object.defineProperty(this,a,{writable:!0,value:[]}),Object.defineProperty(this,s,{writable:!0,value:i()}),Object.defineProperty(this,u,{writable:!0,value:!1}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,c,{writable:!0,value:e=>{try{const t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}}}),this.opts=e,e&&!1===e.autoOpen||this.open()}get isOpen(){return n(this,u)[u]}[e](){return n(this,l)[l]}[t](){return n(this,a)[a]}open(){n(this,l)[l]=new WebSocket(this.opts.target),n(this,l)[l].onopen=()=>{for(n(this,u)[u]=!0;n(this,a)[a].length>0&&n(this,u)[u];){const e=n(this,a)[a].shift();this.send(e.action,e.payload)}},n(this,l)[l].onclose=()=>{n(this,u)[u]=!1},n(this,l)[l].onmessage=n(this,c)[c]}close(){var e;null==(e=n(this,l)[l])||e.close()}send(e,t){n(this,u)[u]?n(this,l)[l].send(JSON.stringify({action:e,payload:t})):n(this,a)[a].push({action:e,payload:t})}on(e,t){n(this,s)[s].on(e,t)}emit(e,t){n(this,s)[s].emit(e,t)}once(e,t){n(this,s)[s].once(e,t)}},yS}();return cS.Socket=r,cS}var AS,SS,xS,OS,NS,BS,TS,kS,FS,IS,PS,_S,LS,RS,MS,jS,HS,zS={};function $S(){if(AS)return zS;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}AS=1,Object.defineProperty(zS,"__esModule",{value:!0}),zS.internalRateLimitedQueue=zS.RateLimitedQueue=void 0;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("activeRequests"),o=n("queuedHandlers"),i=n("paused"),a=n("pauseTimer"),s=n("downLimit"),u=n("upperLimit"),l=n("rateLimitingTimer"),c=n("call"),d=n("queueNext"),f=n("next"),p=n("queue"),h=n("dequeue"),g=n("resume"),v=n("increaseLimit");function m(t){e(this,r)[r]+=1;let n,o=!1;try{n=t()}catch(t){throw e(this,r)[r]-=1,t}return{abort:()=>{o||(o=!0,e(this,r)[r]-=1,n(),e(this,d)[d]())},done:()=>{o||(o=!0,e(this,r)[r]-=1,e(this,d)[d]())}}}function y(){queueMicrotask(()=>e(this,f)[f]())}function b(){if(e(this,i)[i]||e(this,r)[r]>=this.limit)return;if(0===e(this,o)[o].length)return;const t=e(this,o)[o].shift(),n=e(this,c)[c](t.fn);t.abort=n.abort,t.done=n.done}function E(t,n){void 0===n&&(n={});const r={fn:t,priority:n.priority||0,abort:()=>{e(this,h)[h](r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},i=e(this,o)[o].findIndex(e=>r.priority>e.priority);return-1===i?e(this,o)[o].push(r):e(this,o)[o].splice(i,0,r),r}function C(t){const n=e(this,o)[o].indexOf(t);-1!==n&&e(this,o)[o].splice(n,1)}zS.RateLimitedQueue=class{constructor(t){Object.defineProperty(this,h,{value:C}),Object.defineProperty(this,p,{value:E}),Object.defineProperty(this,f,{value:b}),Object.defineProperty(this,d,{value:y}),Object.defineProperty(this,c,{value:m}),Object.defineProperty(this,r,{writable:!0,value:0}),Object.defineProperty(this,o,{writable:!0,value:[]}),Object.defineProperty(this,i,{writable:!0,value:!1}),Object.defineProperty(this,a,{writable:!0,value:void 0}),Object.defineProperty(this,s,{writable:!0,value:1}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,g,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,v,{writable:!0,value:()=>{if(e(this,i)[i])e(this,l)[l]=setTimeout(e(this,v)[v],0);else{e(this,s)[s]=this.limit,this.limit=Math.ceil((e(this,u)[u]+e(this,s)[s])/2);for(let t=e(this,s)[s];t<=this.limit;t++)e(this,d)[d]();e(this,u)[u]-e(this,s)[s]>3?e(this,l)[l]=setTimeout(e(this,v)[v],2e3):e(this,s)[s]=Math.floor(e(this,s)[s]/2)}}}),this.limit="number"!=typeof t||0===t?1/0:t}run(t,n){return!e(this,i)[i]&&e(this,r)[r]<this.limit?e(this,c)[c](t):e(this,p)[p](t,n)}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];let a;const s=new Promise((r,i)=>{a=n.run(()=>{let t,n;try{n=Promise.resolve(e(...o))}catch(e){n=Promise.reject(e)}return n.then(e=>{t?i(t):(a.done(),r(e))},e=>{t?i(t):(a.done(),i(e))}),()=>{t=new Error("Cancelled")}},t)});return s.abort=()=>{a.abort()},s}}resume(){e(this,i)[i]=!1,clearTimeout(e(this,a)[a]);for(let t=0;t<this.limit;t++)e(this,d)[d]()}pause(t){void 0===t&&(t=null),e(this,i)[i]=!0,clearTimeout(e(this,a)[a]),null!=t&&(e(this,a)[a]=setTimeout(e(this,g)[g],t))}rateLimit(t){clearTimeout(e(this,l)[l]),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(e(this,u)[u]=this.limit-1,this.limit=e(this,s)[s],e(this,l)[l]=setTimeout(e(this,v)[v],t))}get isPaused(){return e(this,i)[i]}};const D=Symbol("__queue");return zS.internalRateLimitedQueue=D,zS}function US(){return MS?RS:(MS=1,RS={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}})}var VS=function(){if(HS)return jS;HS=1;var e=iw(),t=wS(),n=$S();const r=XA(),o=function(){if(xS)return SS;xS=1;const e=DC();return SS=e(function(e,t,n){const{progress:r,bytesUploaded:o,bytesTotal:i}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:o,bytesTotal:i}))},300,{leading:!0,trailing:!0})}(),i=NS?OS:(NS=1,OS=function(e){const t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${t}`}),a=TS?BS:(TS=1,BS=function(e){const t=[],n=[];function r(e){t.push(e)}function o(e){n.push(e)}return Promise.all(e.map(e=>e.then(r,o))).then(()=>({successful:t,failed:n}))}),s=function(){if(FS)return kS;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}FS=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("emitter"),o=n("events");return kS=class{constructor(t){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:[]}),e(this,r)[r]=t}on(t,n){return e(this,o)[o].push([t,n]),e(this,r)[r].on(t,n)}remove(){for(const[t,n]of e(this,o)[o].splice(0))e(this,r)[r].off(t,n)}},kS}(),u=function(){if(PS)return IS;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}PS=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("aliveTimer"),o=n("isDone"),i=n("onTimedOut"),a=n("timeout");return IS=class{constructor(t,n){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:!1}),Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),e(this,a)[a]=t,e(this,i)[i]=n}progress(){e(this,o)[o]||e(this,a)[a]>0&&(clearTimeout(e(this,r)[r]),e(this,r)[r]=setTimeout(e(this,i)[i],e(this,a)[a]))}done(){e(this,o)[o]||(clearTimeout(e(this,r)[r]),e(this,r)[r]=null,e(this,o)[o]=!0)}}}(),l=dS(),c=LS?_S:(LS=1,_S=function(e){return!!e&&(0!==e.readyState&&4!==e.readyState||0===e.status)}),d=US();function f(e,t){let n=t;return n||(n=new Error("Upload error")),"string"==typeof n&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),c(e)?(n=new l(n,e),n):(n.request=e,n)}function p(e){return e.data.slice(0,e.data.size,e.meta.type)}class h extends r{constructor(e,t){super(e,t),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=d;const r={formData:!0,fieldName:t.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(t){let n={};try{n=JSON.parse(t)}catch(t){e.log(t)}return n},getResponseError(e,t){let n=new Error("Upload error");return c(t)&&(n=new l(n,t)),n},validateStatus:e=>e>=200&&e<300};if(this.opts={...r,...t},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),n.internalRateLimitedQueue in this.opts?this.requests=this.opts[n.internalRateLimitedQueue]:this.requests=new n.RateLimitedQueue(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(e){const t=this.uppy.getState().xhrUpload,{headers:n}=this.opts,r={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return"function"==typeof n?r.headers=n(e):Object.assign(r.headers,this.opts.headers),t&&Object.assign(r.headers,t.headers),e.xhrUpload&&Object.assign(r.headers,e.xhrUpload.headers),r}addMetadata(e,t,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(t)).forEach(n=>{e.append(n,t[n])})}createFormDataUpload(e,t){const n=new FormData;this.addMetadata(n,e.meta,t);const r=p(e);return e.name?n.append(t.fieldName,r,e.meta.name):n.append(t.fieldName,r),n}createBundledUpload(e,t){const n=new FormData,{meta:r}=this.uppy.getState();return this.addMetadata(n,r,t),e.forEach(e=>{const t=this.getOptions(e),r=p(e);e.name?n.append(t.fieldName,r,e.name):n.append(t.fieldName,r)}),n}upload(t,n,r){const o=this.getOptions(t);return this.uppy.log(`uploading ${n} of ${r}`),new Promise((n,r)=>{this.uppy.emit("upload-started",t);const i=o.formData?this.createFormDataUpload(t,o):t.data,a=new XMLHttpRequest;let l;this.uploaderEvents[t.id]=new s(this.uppy);const c=new u(o.timeout,()=>{a.abort(),l.done();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(o.timeout/1e3)}));this.uppy.emit("upload-error",t,e),r(e)}),d=(0,e.nanoid)();a.upload.addEventListener("loadstart",()=>{this.uppy.log(`[XHRUpload] ${d} started`)}),a.upload.addEventListener("progress",e=>{this.uppy.log(`[XHRUpload] ${d} progress: ${e.loaded} / ${e.total}`),c.progress(),e.lengthComputable&&this.uppy.emit("upload-progress",t,{uploader:this,bytesUploaded:e.loaded,bytesTotal:e.total})}),a.addEventListener("load",()=>{if(this.uppy.log(`[XHRUpload] ${d} finished`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),o.validateStatus(a.status,a.responseText,a)){const e=o.getResponseData(a.responseText,a),r=e[o.responseUrlFieldName],i={status:a.status,body:e,uploadURL:r};return this.uppy.emit("upload-success",t,i),r&&this.uppy.log(`Download ${t.name} from ${r}`),n(t)}const e=o.getResponseData(a.responseText,a),i=f(a,o.getResponseError(a.responseText,a)),s={status:a.status,body:e};return this.uppy.emit("upload-error",t,i,s),r(i)}),a.addEventListener("error",()=>{this.uppy.log(`[XHRUpload] ${d} errored`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null);const e=f(a,o.getResponseError(a.responseText,a));return this.uppy.emit("upload-error",t,e),r(e)}),a.open(o.method.toUpperCase(),o.endpoint,!0),a.withCredentials=o.withCredentials,""!==o.responseType&&(a.responseType=o.responseType),l=this.requests.run(()=>{this.uppy.emit("upload-started",t);const e=this.getOptions(t);return Object.keys(e.headers).forEach(t=>{a.setRequestHeader(t,e.headers[t])}),a.send(i),()=>{c.done(),a.abort()}}),this.onFileRemove(t.id,()=>{l.abort(),r(new Error("File removed"))}),this.onCancelAll(t.id,e=>{let{reason:t}=e;"user"===t&&l.abort(),r(new Error("Upload cancelled"))})})}uploadRemote(e){const n=this.getOptions(e);return new Promise((r,a)=>{this.uppy.emit("upload-started",e);const u={};(Array.isArray(n.metaFields)?n.metaFields:Object.keys(e.meta)).forEach(t=>{u[t]=e.meta[t]});new(e.remote.providerOptions.provider?t.Provider:t.RequestClient)(this.uppy,e.remote.providerOptions).post(e.remote.url,{...e.remote.body,endpoint:n.endpoint,size:e.data.size,fieldname:n.fieldName,metadata:u,httpMethod:n.method,useFormData:n.formData,headers:n.headers}).then(u=>{const{token:l}=u,c=i(e.remote.companionUrl),d=new t.Socket({target:`${c}/api/${l}`,autoOpen:!1});let f;this.uploaderEvents[e.id]=new s(this.uppy),this.onFileRemove(e.id,()=>{d.send("cancel",{}),f.abort(),r(`upload ${e.id} was removed`)}),this.onCancelAll(e.id,function(t){let{reason:n}=void 0===t?{}:t;"user"===n&&(d.send("cancel",{}),f.abort()),r(`upload ${e.id} was canceled`)}),this.onRetry(e.id,()=>{d.send("pause",{}),d.send("resume",{})}),this.onRetryAll(e.id,()=>{d.send("pause",{}),d.send("resume",{})}),d.on("progress",t=>o(this,t,e)),d.on("success",t=>{const o=n.getResponseData(t.response.responseText,t.response),i=o[n.responseUrlFieldName],a={status:t.response.status,body:o,uploadURL:i};return this.uppy.emit("upload-success",e,a),f.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),r()}),d.on("error",t=>{const r=t.response,o=r?n.getResponseError(r.responseText,r):Object.assign(new Error(t.error.message),{cause:t.error});this.uppy.emit("upload-error",e,o),f.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),a(o)}),f=this.requests.run(()=>(d.open(),e.isPaused&&d.send("pause",{}),()=>d.close()))}).catch(t=>{this.uppy.emit("upload-error",e,t),a(t)})})}uploadBundle(e){return new Promise((t,n)=>{const{endpoint:r}=this.opts,{method:o}=this.opts,i=this.uppy.getState().xhrUpload,a=this.createBundledUpload(e,{...this.opts,...i||{}}),s=new XMLHttpRequest,l=t=>{e.forEach(e=>{this.uppy.emit("upload-error",e,t)})},c=new u(this.opts.timeout,()=>{s.abort();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));l(e),n(e)});s.upload.addEventListener("loadstart",()=>{this.uppy.log("[XHRUpload] started uploading bundle"),c.progress()}),s.upload.addEventListener("progress",t=>{c.progress(),t.lengthComputable&&e.forEach(e=>{this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})})}),s.addEventListener("load",r=>{if(c.done(),this.opts.validateStatus(r.target.status,s.responseText,s)){const n=this.opts.getResponseData(s.responseText,s),o={status:r.target.status,body:n};return e.forEach(e=>{this.uppy.emit("upload-success",e,o)}),t()}const o=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return o.request=s,l(o),n(o)}),s.addEventListener("error",()=>{c.done();const e=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return l(e),n(e)}),this.uppy.on("cancel-all",function(e){let{reason:t}=void 0===e?{}:e;"user"===t&&(c.done(),s.abort())}),s.open(o.toUpperCase(),r,!0),s.withCredentials=this.opts.withCredentials,""!==this.opts.responseType&&(s.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach(e=>{s.setRequestHeader(e,this.opts.headers[e])}),s.send(a),e.forEach(e=>{this.uppy.emit("upload-started",e)})})}uploadFiles(e){const t=e.map((t,n)=>{const r=parseInt(n,10)+1,o=e.length;return t.error?Promise.reject(new Error(t.error)):t.isRemote?this.uploadRemote(t,r,o):this.upload(t,r,o)});return a(t)}onFileRemove(e,t){this.uploaderEvents[e].on("file-removed",n=>{e===n.id&&t(n.id)})}onRetry(e,t){this.uploaderEvents[e].on("upload-retry",n=>{e===n&&t()})}onRetryAll(e,t){this.uploaderEvents[e].on("retry-all",()=>{this.uppy.getFile(e)&&t()})}onCancelAll(e,t){var n=this;this.uploaderEvents[e].on("cancel-all",function(){n.uppy.getFile(e)&&t(...arguments)})}handleUpload(e){if(0===e.length)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();0!==this.opts.limit||this.opts[n.internalRateLimitedQueue]||this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const t=e.map(e=>this.uppy.getFile(e));if(this.opts.bundle){if(t.some(e=>e.isRemote))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if("function"==typeof this.opts.headers)throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(t)}return this.uploadFiles(t).then(()=>null)}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}}return h.VERSION="2.1.3",jS=h}(),WS=b(VS);function GS(e){var t=e.server,n=void 0===t?"":t,r=e.fieldName,o=void 0===r?"":r,i=e.maxFileSize,a=void 0===i?10485760:i,s=e.maxNumberOfFiles,u=void 0===s?100:s,l=e.meta,c=void 0===l?{}:l,d=e.metaWithUrl,f=void 0!==d&&d,p=e.headers,h=void 0===p?{}:p,g=e.withCredentials,v=void 0!==g&&g,m=e.timeout,y=void 0===m?1e4:m,b=e.onBeforeUpload,E=void 0===b?function(e){return e}:b,C=e.onSuccess,D=void 0===C?function(e,t){}:C,w=e.onError,A=void 0===w?function(e,t,n){console.error("".concat(e.name," upload error"),t,n)}:w,S=e.onProgress,x=void 0===S?function(e){}:S;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!o)throw new Error("Cannot get fieldName\n没有配置 fieldName");var O=n;f&&(O=function(e,t){var n=Qg(e.split("#"),2),r=n[0],o=n[1],i=[];lv(t,function(e,t){i.push("".concat(t,"=").concat(e))});var a=i.join("&");return r=r.indexOf("?")>0?"".concat(r,"&").concat(a):"".concat(r,"?").concat(a),o?"".concat(r,"#").concat(o):r}(O,c));var N=new lS(Yg({onBeforeUpload:E,restrictions:{maxFileSize:a,maxNumberOfFiles:u},meta:c},e.uppyConfig)).use(WS,Yg({endpoint:O,headers:h,formData:!0,fieldName:o,bundle:!0,withCredentials:v,timeout:y},e.xhrConfig));return N.on("complete",function(e){var t=e.successful[0],n=t.response,r=(null!=n?n:{}).body,o=void 0===r?{}:r;try{D(t,o)}catch(e){console.error("wangEditor upload file - onSuccess error",e)}}),N.on("progress",function(e){e<1||x(e)}),N.on("upload-error",function(e,t,n){try{A(e,t,n)}catch(e){console.error("wangEditor upload file - onError error",e)}}),N.on("restriction-failed",function(e,t){try{A(e,t)}catch(e){console.error("wangEditor upload file - onError error",e)}}),N}qE("en",{editor:{more:"More",justify:"Justify",indent:"Indent",image:"Image",video:"Video"}}),qE("zh-CN",{editor:{more:"更多",justify:"对齐",indent:"缩进",image:"图片",video:"视频"}});var qS,KS,YS,XS,ZS,JS,QS,ex,tx,nx,rx,ox,ix,ax,sx,ux={};function lx(){if(KS)return qS;KS=1;var e=A();return qS=Array.isArray||function(t){return"Array"===e(t)}}function cx(){if(XS)return YS;XS=1;var e=w(),t=C(),n=me(),r=Tr(),o=zt(),i=Sn(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return f.sham=!0,YS=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d}function dx(){if(JS)return ZS;JS=1;var e=lx(),t=cx(),n=ye(),r=ve()("species"),o=Array;return ZS=function(i){var a;return e(i)&&(a=i.constructor,(t(a)&&(a===o||e(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a},ZS}function fx(){if(ex)return QS;ex=1;var e=dx();return QS=function(t,n){return new(e(t))(0===n?0:n)}}function px(){if(ox)return rx;ox=1;var e=C();return rx=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})}}function hx(){if(ax)return ix;ax=1;var e=function(){if(nx)return tx;nx=1;var e=Go(),t=w(),n=S(),r=ce(),o=Jt(),i=fx(),a=t([].push),s=function(t){var s=1===t,u=2===t,l=3===t,c=4===t,d=6===t,f=7===t,p=5===t||d;return function(h,g,v,m){for(var y,b,E=r(h),C=n(E),D=o(C),w=e(g,v),A=0,S=m||i,x=s?S(h,D):u||f?S(h,0):void 0;D>A;A++)if((p||A in C)&&(b=w(y=C[A],A,E),t))if(s)x[A]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:a(x,y)}else switch(t){case 4:return!1;case 7:a(x,y)}return d?-1:l||c?c:x}};return tx={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}().forEach,t=px()("forEach");return ix=t?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},ix}!function(){if(sx)return ux;sx=1;var e=B(),t=ci(),n=di(),r=hx(),o=ln(),i=function(e){if(e&&e.forEach!==r)try{o(e,"forEach",r)}catch(t){e.forEach=r}};for(var a in t)t[a]&&i(e[a]&&e[a].prototype);i(n)}();qE("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",cancelTitle:"Cancel full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",editSize:"Edit size",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link",ok:"Ok",width:"Width",height:"Height"},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"},formatPainter:{title:"Format Painter"}}),qE("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:"全屏",cancelTitle:"取消全屏"},header:{title:"标题",text:"正文"},image:{netImage:"网络图片",delete:"删除图片",edit:"编辑图片",editSize:"修改尺寸",viewLink:"查看链接",src:"图片地址",desc:"图片描述",link:"图片链接",ok:"确定",width:"宽度",height:"高度"},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:"待办"},formatPainter:{title:"格式刷"}});var gx={type:"blockquote",elemToHtml:function(e,t){return"<blockquote>".concat(t,"</blockquote>")}},vx='<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>',mx='<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>',yx='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>',bx=function(){function e(){this.title=ZE("blockQuote.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!Iy.getSelectedNodeByType(e,"blockquote")},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Qg(Kh.nodes(e,{match:function(e){var t=Iy.getNodeType(e);return"paragraph"===t||"blockquote"===t},universal:!0,mode:"highest"}),1);return!t[0]},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.isActive(e)?"paragraph":"blockquote";jg.setNodes(e,{type:n},{mode:"highest"})}},e}(),Ex={key:"blockquote",factory:function(){return new bx}};function Cx(e){return 0===om("<div>".concat(e,"</div>")).children().filter(function(e){return"BR"!==e.tagName}).length}function Dx(e){return 0===e.length?"":e[0].outerHTML}function wx(e){return e.length?e[0].tagName.toLowerCase():""}function Ax(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}Em&&(om.fn.css=Em),xm&&(om.fn.append=xm),Om&&(om.fn.prepend=Om),im&&(om.fn.addClass=im),am&&(om.fn.removeClass=am),sm&&(om.fn.hasClass=sm),pm&&(om.fn.on=pm),hm&&(om.fn.off=hm),Rm&&(om.fn.focus=Rm),um&&(om.fn.attr=um),lm&&(om.fn.removeAttr=lm),ym&&(om.fn.hide=ym),bm&&(om.fn.show=bm),Bm&&(om.fn.parents=Bm),dm&&(om.fn.dataset=dm),fm&&(om.fn.val=fm),Am&&(om.fn.text=Am),wm&&(om.fn.html=wm),km&&(om.fn.children=km),Fm&&(om.fn.remove=Fm),Tm&&(om.fn.find=Tm),gm&&(om.fn.width=gm),vm&&(om.fn.height=vm),Dm&&(om.fn.filter=Dm),Im&&(om.fn.empty=Im);var Sx={selector:"blockquote:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=om(e);return 0===(t=t.filter(function(e){return!!Cg.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"blockquote",children:t}}};function xx(e){e.deleteBackward("character");jg.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var Ox={type:"blockquote",renderElem:function(e,t,n){return ND("blockquote",null,t)}},Nx={renderElems:[Ox],elemsToHtml:[gx],parseElemsHtml:[Sx],menus:[Ex],editorPlugin:function(e){var t=e.insertBreak,n=e.insertText,r=e;return r.insertBreak=function(){var o=r.selection;if(null==o)return t();var i=Qg(Kh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"blockquote")},universal:!0}),1),a=i[0];if(!a)return t();var s=a[0];if(Iy.getParentNode(e,s)){var u=Iy.findPath(e,s),l=Kh.end(e,u);if(ug.equals(l,o.focus)){var c=eg.string(s);if(c&&"\n"===c.slice(-1))return void xx(r)}n("\n")}else xx(r)},r}};var Bx={type:"code",elemToHtml:function(e,t){return"<code>".concat(t,"</code>")}};var Tx={type:"pre",elemToHtml:function(e,t){return"<pre>".concat(t,"</pre>")}},kx=function(){function e(){this.title=ZE("codeBlock.title"),this.iconSvg='<svg viewBox="0 0 1280 1024"><path d="M832 736l96 96 320-320L928 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224zM701.312 150.528l69.472 18.944-192 704.032-69.472-18.944 192-704.032z"></path></svg>',this.tag="button"}return e.prototype.getSelectCodeElem=function(e){var t=Iy.getSelectedNodeByType(e,"code");if(null==t)return null;var n=Iy.getParentNode(e,t);return null==n||"pre"!==Iy.getNodeType(n)?null:t},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);return null==t?"":t.language||""},e.prototype.isActive=function(e){return!!this.getSelectCodeElem(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Iy.getSelectedElems(e);return!!t.some(function(t){return e.isVoid(t)})||!t.some(function(e){var t=Iy.getNodeType(e);return"pre"===t||"paragraph"===t})},e.prototype.exec=function(e,t){this.isActive(e)?this.changeToPlainText(e):this.changeToCodeBlock(e,t.toString())},e.prototype.changeToPlainText=function(e){var t=this.getSelectCodeElem(e);if(null!=t){var n=eg.string(t);jg.removeNodes(e,{mode:"highest"});var r=n.split("\n").map(function(e){return{type:"paragraph",children:[{text:e}]}});jg.insertNodes(e,r,{mode:"highest"})}},e.prototype.changeToCodeBlock=function(e,t){var n,r,o=[],i=Kh.nodes(e,{match:function(t){return e.children.includes(t)},universal:!0});try{for(var a=Jg(i),s=a.next();!s.done;s=a.next()){var u=Qg(s.value,1)[0];u&&o.push(eg.string(u))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}jg.removeNodes(e,{mode:"highest"});var l={type:"pre",children:[{type:"code",language:t,children:[{text:o.join("\n")}]}]};jg.insertNodes(e,l,{mode:"highest"})},e}();var Fx={selector:"pre:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=om(e);return 0===(t=t.filter(function(e){return"code"===Iy.getNodeType(e)})).length&&(t=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:t.filter(function(e){return"code"===Iy.getNodeType(e)})}}};var Ix={type:"pre",renderElem:function(e,t,n){return ND("pre",null,t)}},Px={type:"code",renderElem:function(e,t,n){return ND("code",null,t)}},_x={menus:[{key:"codeBlock",factory:function(){return new kx}}],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData,o=e.handleTab,i=e;return i.insertBreak=function(){var e=Iy.getSelectedNodeByType(i,"code");if(null!=e){var n=function(e,t){var n=t.selection;if(null==n)return"";var r=eg.string(e),o=n.anchor.offset,i=r.slice(0,o).split("\n"),a=i.length;return 0===a?"":i[a-1]}(e,i);if(n){var r=n.match(/^\s+/);if(null!=r&&null!=r[0]){var o=r[0];return void i.insertText("\n".concat(o))}}i.insertText("\n")}else t()},e.handleTab=function(){var t=e.selection;if(t){var n=Iy.getSelectedNodeByType(e,"code");if(n&&!fg.isCollapsed(t)){var r=Qg([t.anchor,t.focus].sort(function(e,t){return e.offset-t.offset}),2),i=r[0],a=r[1],s=n.children[0].text,u=s.split("\n"),l=s.slice(0,i.offset).split("\n").length-1,c=s.slice(0,a.offset).split("\n").length-1,d=u.map(function(e,t){return t>=l&&t<=c?" ".concat(e):e}),f=d.join("\n"),p={anchor:{path:i.path,offset:i.offset+2},focus:{path:a.path,offset:a.offset+2}};jg.insertText(e,f,{at:{anchor:{path:i.path,offset:0},focus:{path:a.path,offset:s.length}}}),jg.select(e,p)}else o()}},i.normalizeNode=function(e){var t=Qg(e,2),r=t[0],o=t[1],a=Iy.getNodeType(r);("code"===a&&o.length<=1&&jg.setNodes(i,{type:"paragraph"},{at:o}),"pre"===a)&&(Iy.isLastNode(i,r)&&jg.insertNodes(i,Iy.genEmptyParagraph(),{at:[o[0]+1]}),"code"!==Iy.getNodeType(r.children[0])&&(jg.unwrapNodes(i),jg.setNodes(i,{type:"paragraph"},{mode:"highest"})));return n([r,o])},i.insertData=function(e){if(null!=Iy.getSelectedNodeByType(i,"code")){var t=e.getData("text/plain");Kh.insertText(i,t)}else r(e)},i},renderElems:[Ix,Px],elemsToHtml:[Bx,Tx],preParseHtml:[{selector:"pre>code",preParseHtml:function(e){var t=om(e);if("code"!==wx(t))return e;var n=t.find("xmp");if(0===n.length)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:"pre:not([data-w-e-type])>code",parseElemHtml:function(e,t,n){return{type:"code",language:"",children:[{text:om(e)[0].textContent||""}]}}},Fx]},Lx=function(){function e(){this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){var t=this.mark,n=Kh.marks(e);return n&&n[t]?n[t]:""},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Qg(Kh.nodes(e,{match:function(t){return"pre"===Iy.getNodeType(t)||!!Kh.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){var t=this.mark;if(null==this.$content){var n=om('<ul class="w-e-panel-content-color"></ul>');n.on("click","li",function(n){var r=n.target;if(null!=r&&(n.preventDefault(),null!=e.selection)){var o=om(r).attr("data-value");"0"===o?Kh.removeMark(e,t):Kh.addMark(e,t,o)}}),this.$content=n}var r=this.$content;if(null==r)return document.createElement("ul");r.empty();var o=this.getValue(e),i=e.getMenuConfig(t).colors;(void 0===i?[]:i).forEach(function(e){var t=om('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=om('<li data-value="'.concat(e,'"></li>'));o===e&&n.addClass("active"),n.append(t),r.append(n)});var a="";"color"===t&&(a=ZE("color.default")),"bgColor"===t&&(a=ZE("color.clear"));var s=om('\n <li data-value="0" class="clear">\n '.concat('<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 ").concat(a,"\n </li>\n "));return r.prepend(s),r[0]},e}(),Rx=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title=ZE("color.bgColor"),t.iconSvg='<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>',t.mark="bgColor",t}return Kg(t,e),t}(Lx),Mx=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title=ZE("color.color"),t.iconSvg='<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>',t.mark="color",t}return Kg(t,e),t}(Lx),jx=["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 Hx={selector:"font",preParseHtml:function(e){var t=om(e);if("font"!==wx(t))return e;var n=t.attr("color")||"";return n&&(t.removeAttr("color"),t.css("color",n)),t[0]}};function zx(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var $x={renderStyle:function(e,t){var n=e,r=n.color,o=n.bgColor,i=t;return r&&zx(i,{color:r}),o&&zx(i,{backgroundColor:o}),i},styleToHtml:function(e,t){if(!Cg.isText(e))return t;var n,r=e,o=r.color,i=r.bgColor;return o||i?((Cx(t)||"span"!==wx(n=om(t)))&&(n=om("<span>".concat(t,"</span>"))),o&&n.css("color",o),i&&n.css("background-color",i),Dx(n)):t},preParseHtml:[Hx],parseStyleHtml:function(e,t,n){var r=om(e);if(!Cg.isText(t))return t;var o=t,i=Ax(r,"color");i&&(o.color=i);var a=Ax(r,"background-color");return a||(a=Ax(r,"background")),a&&(o.bgColor=a),o},menus:[{key:"color",factory:function(){return new Mx},config:{colors:jx}},{key:"bgColor",factory:function(){return new Rx},config:{colors:jx}}]},Ux=function(){function e(){this.title=ZE("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!!fg.isExpanded(t)},e.prototype.exec=function(e,t){var n=e.selection;if(null!=n){var r=[n.anchor.path[0]];jg.insertNodes(e,{type:"paragraph",children:[{text:""}]},{at:r}),e.select(Kh.start(e,r))}},e}(),Vx={menus:[{key:"enter",factory:function(){return new Ux}}]};var Wx={type:"divider",elemToHtml:function(e,t){return"<hr/>"}},Gx=function(){function e(){this.title=ZE("divider.title"),this.iconSvg='<svg viewBox="0 0 1092 1024"><path d="M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!Iy.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=Iy.getNodeType(t);return"table"===n||"pre"===n})},e.prototype.exec=function(e,t){Iy.isSelectedEmptyParagraph(e)&&jg.removeNodes(e,{mode:"highest"}),jg.insertNodes(e,{type:"divider",children:[{text:""}]},{mode:"highest"})},e}();var qx={renderElems:[{type:"divider",renderElem:function(e,t,n){return uD("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:Iy.isNodeSelected(n,e)?"true":""},style:{},on:{mousedown:function(e){return e.preventDefault()}}},[uD("hr")])}}],elemsToHtml:[Wx],parseElemsHtml:[{selector:"hr:not([data-w-e-type])",parseElemHtml:function(e,t,n){return{type:"divider",children:[{text:""}]}}}],menus:[{key:"divider",factory:function(){return new Gx}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"divider"===e.type||t(e)},r.normalizeNode=function(e){var t=Qg(e,2),o=t[0],i=t[1];if("divider"!==Iy.getNodeType(o))return n([o,i]);Iy.isLastNode(r,o)&&jg.insertNodes(r,Iy.genEmptyParagraph(),{at:[i[0]+1]})},r}};var Kx=function(){function e(){this.title=ZE("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Qg(Kh.nodes(e,{match:function(t){return"pre"===Iy.getNodeType(t)||!!Kh.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){if(null==this.$content){var t=om('<ul class="w-e-panel-content-emotion"></ul>');t.on("click","li",function(t){var n=t.target;if(null!=n){t.preventDefault();var r=om(n).text();e.insertText(r)}}),this.$content=t}var n=this.$content;if(null==n)return document.createElement("ul");n.empty();var r=e.getMenuConfig("emotion").emotions;return(void 0===r?[]:r).forEach(function(e){var t=om("<li>".concat(e,"</li>"));n.append(t)}),n[0]},e}(),Yx={menus:[{key:"emotion",factory:function(){return new Kx},config:{emotions:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(" ")}}]};var Xx=function(){function e(){this.tag="select",this.width=80}return e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.mark,n=Kh.marks(e);return n&&n[t]?n[t]:""},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=Qg(Kh.nodes(e,{match:function(t){return"pre"===Iy.getNodeType(t)||!!Kh.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.exec=function(e,t){var n=this.mark;t?e.addMark(n,t):e.removeMark(n)},e}(),Zx=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title=ZE("fontFamily.title"),t.iconSvg='<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>',t.mark="fontFamily",t.selectPanelWidth=150,t}return Kg(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontFamilyList,r=void 0===n?[]:n;t.push({text:ZE("fontFamily.default"),value:""}),r.forEach(function(e){if("string"==typeof e)t.push({text:e,value:e,styleForRenderMenuList:{"font-family":e}});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r,styleForRenderMenuList:{"font-family":r}})}});var o=this.getValue(e),i=!1;return t.forEach(function(e){e.value===o?(i=!0,e.selected=!0):e.selected=void 0}),i||"string"!=typeof o||t.push({text:o,value:o,selected:!0}),t},t}(Xx),Jx=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title=ZE("fontSize.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',t.mark="fontSize",t}return Kg(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontSizeList,r=void 0===n?[]:n;t.push({text:ZE("fontSize.default"),value:""}),r.forEach(function(e){if("string"==typeof e)t.push({text:e,value:e});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r})}});var o=this.getValue(e),i=!1;return t.forEach(function(e){e.value===o?(i=!0,e.selected=!0):e.selected=void 0}),i||"string"!=typeof o||t.push({text:o,value:o,selected:!0}),t},t}(Xx);var Qx={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"};var eO={renderStyle:function(e,t){var n=e,r=n.fontSize,o=n.fontFamily,i=t;return r&&zx(i,{fontSize:r}),o&&zx(i,{fontFamily:o}),i},styleToHtml:function(e,t){if(!Cg.isText(e))return t;var n,r=e,o=r.fontSize,i=r.fontFamily;return o||i?((Cx(t)||"span"!==wx(n=om(t)))&&(n=om("<span>".concat(t,"</span>"))),o&&n.css("font-size",o),i&&n.css("font-family",i),Dx(n)):t},preParseHtml:[{selector:"font",preParseHtml:function(e){var t=om(e);if("font"!==wx(t))return e;var n=t.attr("size")||"";n&&(t.removeAttr("size"),t.css("font-size",Qx[n]));var r=t.attr("face")||"";return r&&(t.removeAttr("face"),t.css("font-family",r)),t[0]}}],parseStyleHtml:function(e,t,n){var r=om(e);if(!Cg.isText(t))return t;var o=t,i=Ax(r,"font-size");i&&(o.fontSize=i);var a=Ax(r,"font-family").replace(/"/g,"");return a&&(o.fontFamily=a),o},menus:[{key:"fontSize",factory:function(){return new Jx},config:{fontSizeList:["12px",{name:"13px",value:"13px"},"14px","15px","16px","19px",{name:"22px",value:"22px"},"24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new Zx},config:{fontFamilyList:["黑体",{name:"仿宋",value:"仿宋"},"楷体","标楷体","华文仿宋","华文楷体",{name:"宋体",value:"宋体"},"微软雅黑","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]};var tO=function(){function e(){this.title=ZE("formatPainter.title"),this.iconSvg='<svg viewBox="0 0 24 24"><path d="M8 19.997v-5h2v5h9v-7H5v7zm-4-9h16v-3h-6v-4h-4v4H4zm-1 10v-8H2v-6a1 1 0 0 1 1-1h5v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v3h5a1 1 0 0 1 1 1v6h-1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(t){return e.attrs.isSelect},e.prototype.isDisabled=function(e){return!1},e.prototype.setFormatHtml=function(t){var n,r;if(t.getSelectionText().length){if(e.attrs.formatStyle){!function(e){var t=Kh.marks(e);t&&Object.keys(t).forEach(function(t){e.removeMark(t)})}(t);try{for(var o=Jg(Object.entries(e.attrs.formatStyle)),i=o.next();!i.done;i=o.next()){var a=Qg(i.value,2),s=a[0],u=a[1];t.addMark(s,u)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}e.attrs.formatStyle=null,e.attrs.isSelect=!1}},e.prototype.exec=function(t){e.attrs.isSelect?(e.attrs.isSelect=!1,e.attrs.formatStyle=null):t.getSelectionText().length&&(e.attrs.formatStyle=Kh.marks(t),e.attrs.isSelect=!0);t.blur(),t.focus()},e.attrs={isSelect:!1,formatStyle:null},e}();var nO={menus:[{key:"formatPainter",factory:function(){return new tO}}],editorPlugin:function(e){var t=new tO,n=e.onChange,r=e,o=function(){t.setFormatHtml(r),document.removeEventListener("mouseup",o)};return r.onChange=function(){n(),tO.attrs.isSelect&&(document.removeEventListener("mouseup",o),document.addEventListener("mouseup",o))},r}},rO=function(){function e(){this.title=ZE("fullScreen.title"),this.iconSvg=yx,this.tag="button",this.alwaysEnable=!0}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return e.isFullScreen},e.prototype.isDisabled=function(e){return!1},e.prototype.getIcon=function(e){return e.isFullScreen?yx:'<svg t="1723361745825" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8705" width="200" height="200"><path d="M703.926857 362.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V128a42.642286 42.642286 0 1 1 85.357715 0v149.357714h149.357714c21.211429 0 38.765714 15.433143 42.057143 35.693715l0.585143 6.948571a42.642286 42.642286 0 0 1-42.642286 42.642286H703.926857zM703.926857 938.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V704c0-23.552 19.090286-42.642286 42.642286-42.642286h192.073143a42.642286 42.642286 0 1 1 0 85.284572l-149.357714 0.073143v149.284571c0 21.211429-15.506286 38.765714-35.84 42.130286l-6.875429 0.512zM319.853714 938.642286a42.642286 42.642286 0 0 1-42.642285-42.642286v-149.284571H127.853714a42.642286 42.642286 0 0 1-42.130285-35.84l-0.585143-6.875429c0-23.552 19.163429-42.642286 42.715428-42.642286h192c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286zM127.853714 362.642286a42.642286 42.642286 0 1 1 0-85.284572H277.211429V128c0-21.211429 15.433143-38.765714 35.766857-42.130286l6.875428-0.512c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286H127.853714z" fill="#333333" p-id="8706"></path></svg>'},e.prototype.getTitle=function(e){return e.isFullScreen?ZE("fullScreen.title"):ZE("fullScreen.cancelTitle")},e.prototype.exec=function(e,t){e.isFullScreen?e.unFullScreen():e.fullScreen()},e}(),oO={menus:[{key:"fullScreen",factory:function(){return new rO}}]};function iO(e){return function(t,n){return"<h".concat(e,">").concat(n,"</h").concat(e,">")}}var aO={type:"header1",elemToHtml:iO(1)},sO={type:"header2",elemToHtml:iO(2)},uO={type:"header3",elemToHtml:iO(3)},lO={type:"header4",elemToHtml:iO(4)},cO={type:"header5",elemToHtml:iO(5)},dO={type:"header6",elemToHtml:iO(6)};function fO(e){var t=Qg(Kh.nodes(e,{match:function(e){return Iy.getNodeType(e).startsWith("header")},universal:!0}),1),n=t[0];if(null==n)return"paragraph";var r=Qg(n,1)[0];return Iy.getNodeType(r)}function pO(e){if(null==e.selection)return!0;var t=Qg(Kh.nodes(e,{match:function(e){var t=Iy.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1);return!t[0]}function hO(e,t){t&&jg.setNodes(e,{type:t})}var gO=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return fO(e)},e.prototype.isActive=function(e){return this.getValue(e)===this.type},e.prototype.isDisabled=function(e){return pO(e)},e.prototype.exec=function(e,t){var n=this.type;hO(e,t===n?"paragraph":n)},e}(),vO=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title="H1",t.type="header1",t}return Kg(t,e),t}(gO),mO=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title="H2",t.type="header2",t}return Kg(t,e),t}(gO),yO=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title="H3",t.type="header3",t}return Kg(t,e),t}(gO),bO=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title="H4",t.type="header4",t}return Kg(t,e),t}(gO),EO=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title="H5",t.type="header5",t}return Kg(t,e),t}(gO),CO=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title="H6",t.type="header6",t}return Kg(t,e),t}(gO),DO=function(){function e(){this.title=ZE("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 e.prototype.getOptions=function(e){var t=[{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:"header6",text:"H6",styleForRenderMenuList:{"font-size":"11px","font-weight":"bold"}},{value:"paragraph",text:ZE("header.text")}],n=this.getValue(e).toString();return t.forEach(function(e){e.value===n?e.selected=!0:e.selected=void 0}),t},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){return fO(e)},e.prototype.isDisabled=function(e){return pO(e)},e.prototype.exec=function(e,t){hO(e,t.toString())},e}(),wO={key:"headerSelect",factory:function(){return new DO}},AO={key:"header1",factory:function(){return new vO}},SO={key:"header2",factory:function(){return new mO}},xO={key:"header3",factory:function(){return new yO}},OO={key:"header4",factory:function(){return new bO}},NO={key:"header5",factory:function(){return new EO}},BO={key:"header6",factory:function(){return new CO}};function TO(e){return function(t,n,r){var o=om(t);return 0===(n=n.filter(function(e){return!!Cg.isText(e)||!!r.isInline(e)})).length&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"header".concat(e),children:n}}}var kO={selector:"h1:not([data-w-e-type])",parseElemHtml:TO(1)},FO={selector:"h2:not([data-w-e-type])",parseElemHtml:TO(2)},IO={selector:"h3:not([data-w-e-type])",parseElemHtml:TO(3)},PO={selector:"h4:not([data-w-e-type])",parseElemHtml:TO(4)},_O={selector:"h5:not([data-w-e-type])",parseElemHtml:TO(5)},LO={selector:"h6:not([data-w-e-type])",parseElemHtml:TO(6)};function RO(e){return function(t,n,r){return ND("h".concat(e),null,n)}}var MO={renderElems:[{type:"header1",renderElem:RO(1)},{type:"header2",renderElem:RO(2)},{type:"header3",renderElem:RO(3)},{type:"header4",renderElem:RO(4)},{type:"header5",renderElem:RO(5)},{type:"header6",renderElem:RO(6)}],elemsToHtml:[aO,sO,uO,lO,cO,dO],parseElemsHtml:[kO,FO,IO,PO,_O,LO],menus:[wO,AO,SO,xO,OO,NO,BO],editorPlugin:function(e){var t=e.insertBreak,n=e;return n.insertBreak=function(){var r=Qg(Kh.nodes(n,{match:function(e){return Iy.getNodeType(e).startsWith("header")},universal:!0}),1),o=r[0];if(o)if(Iy.isSelectionAtLineEnd(e,o[1])){jg.insertNodes(n,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}else t();else t()},n}};var jO={type:"image",elemToHtml:function(e,t){var n=e,r=n.src,o=n.alt,i=void 0===o?"":o,a=n.href,s=void 0===a?"":a,u=n.width,l=void 0===u?"":u,c=n.height,d=void 0===c?"":c,f=n.style,p=void 0===f?{}:f,h=p.width,g=void 0===h?"":h,v=p.height,m=void 0===v?"":v,y="";return g&&(y+="width: ".concat(g,";")),m&&(y+="height: ".concat(m,";")),'<img src="'.concat(r,'" alt="').concat(i,'" data-href="').concat(s,'" width="').concat(l,'" height="').concat(d,'" style="').concat(y,'"/>')}};var HO=function(){function e(){this.title=ZE("image.delete"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==Iy.getSelectedNodeByType(e,"image")},e.prototype.exec=function(e,t){this.isDisabled(e)||jg.removeNodes(e,{match:function(e){return Iy.checkNodeType(e,"image")}})},e}();function zO(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(jm())}function $O(e){return e.replace(/</g,"<").replace(/>/g,">")}function UO(e){var t=e.selection;if(null==t)return!0;if(!fg.isCollapsed(t))return!0;var n=Qg(Kh.nodes(e,{match:function(t){var n=Iy.getNodeType(t);return"code"===n||("pre"===n||("link"===n||("list-item"===n||(!!n.startsWith("header")||("blockquote"===n||!!Kh.isVoid(e,t))))))},universal:!0}),1);return!!n[0]}function VO(e,t,n){return Xg(this,arguments,void 0,function(e,t,n,r,o){var i,a;return void 0===r&&(r=""),void 0===o&&(o=""),Zg(this,function(s){switch(s.label){case 0:return(i=t.getMenuConfig(e).checkImage)?[4,i(n,r,o)]:[3,2];case 1:if("string"==typeof(a=s.sent()))return t.alert(a,"error"),[2,!1];if(null==a)return[2,!1];s.label=2;case 2:return[2,!0]}})})}function WO(e,t,n){return Xg(this,void 0,void 0,function(){var r;return Zg(this,function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseImageSrc)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}})})}function GO(e,t){return Xg(this,arguments,void 0,function(e,t,n,r){var o,i,a;return void 0===n&&(n=""),void 0===r&&(r=""),Zg(this,function(s){switch(s.label){case 0:return[4,VO("insertImage",e,t,n,r)];case 1:return s.sent()?[4,WO("insertImage",e,t)]:[2];case 2:return o=s.sent(),i={type:"image",src:$O(o),href:r,alt:n,style:{},children:[{text:""}]},null===e.selection&&e.restoreSelection(),Iy.getSelectedNodeByType(e,"image")&&e.move(1),UO(e)?[2]:(jg.insertNodes(e,i),(a=e.getMenuConfig("insertImage").onInsertedImage)&&a(i),[2])}})})}function qO(){return zO("w-e-edit-image")}var KO=function(){function e(){this.title=ZE("image.edit"),this.iconSvg=vx,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=qO(),this.altInputId=qO(),this.hrefInputId=qO(),this.buttonId=qO()}return e.prototype.getValue=function(e){return""},e.prototype.getImageNode=function(e){return Iy.getSelectedNodeByType(e,"image")},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!fg.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"image"))},e.prototype.getModalPositionNode=function(e){return this.getImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,s=this.getImageNode(e);if(null==s)throw new Error("Not found selected image node");var u=Qg(uC(ZE("image.src"),r),2),l=u[0],c=om(u[1]),d=Qg(uC(ZE("image.desc"),o),2),f=d[0],p=om(d[1]),h=Qg(uC(ZE("image.link"),i),2),g=h[0],v=om(h[1]),m=Qg(cC(a,ZE("common.ok")),1)[0];if(null==this.$content){var y=om("<div></div>");y.on("click","#".concat(a),function(n){n.preventDefault();var a=y.find("#".concat(r)).val(),s=y.find("#".concat(o)).val(),u=y.find("#".concat(i)).val();t.updateImage(e,a,s,u),e.hidePanelOrModal()}),this.$content=y}var b=this.$content;b.empty(),b.append(l),b.append(f),b.append(g),b.append(m);var E=s,C=E.src,D=E.alt,w=void 0===D?"":D,A=E.href,S=void 0===A?"":A;return c.val(C),p.val(w),v.val(S),setTimeout(function(){c.focus()}),b[0]},e.prototype.updateImage=function(e,t,n,r,o){void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),t&&(e.restoreSelection(),this.isDisabled(e)||function(e,t){Xg(this,arguments,void 0,function(e,t,n,r,o){var i,a,s,u,l,c;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),Zg(this,function(d){switch(d.label){case 0:return[4,VO("editImage",e,t,n,r)];case 1:return d.sent()?[4,WO("editImage",e,t)]:[2];case 2:return i=d.sent(),null==(a=Iy.getSelectedNodeByType(e,"image"))||(s=a.style,u={src:i,alt:n,href:r,style:Yg(Yg({},void 0===s?{}:s),o)},jg.setNodes(e,u,{match:function(e){return Iy.checkNodeType(e,"image")}}),l=Iy.getSelectedNodeByType(e,"image"),(c=e.getMenuConfig("editImage").onUpdatedImage)&&c(l)),[2]}})})}(e,t,n,r,o))},e}();function YO(){return zO("w-e-insert-image")}var XO=function(){function e(){this.title=ZE("image.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=YO(),this.heightInputId=YO(),this.buttonId=YO()}return e.prototype.getSelectedImageNode=function(e){return Iy.getSelectedNodeByType(e,"image")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedImageNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=Qg(uC(ZE("image.width"),n,"auto"),2),a=i[0],s=om(i[1]),u=Qg(uC(ZE("image.height"),r,"auto"),2),l=u[0],c=om(u[1]),d=Qg(cC(o,ZE("image.ok")),1)[0],f=this.getSelectedImageNode(e);if(null==this.$content){var p=om("<div></div>");p.on("click","#".concat(o),function(t){t.preventDefault();var o=p.find("#".concat(n)).val().trim(),i=p.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u=function(e){return/^\d+(\.\d+)?px$/.test(e)},l="auto",c="auto";a(o)?l=o:s(o)?l="".concat(parseInt(o,10),"px"):u(o)&&(l=o),a(i)?c=i:s(i)?c="".concat(parseInt(i,10),"px"):u(i)&&(c=i);var d=f.style,h=void 0===d?{}:d;e.restoreSelection();var g=Yg(Yg({},h),{style:{width:l,height:c}});jg.setNodes(e,g,{match:function(e){return Iy.checkNodeType(e,"image")}}),e.hidePanelOrModal()}),this.$content=p}var h=this.$content;if(h.empty(),h.append(a),h.append(l),h.append(d),null==f)return h[0];var g=f.style,v=void 0===g?{}:g,m=v.width,y=void 0===m?"auto":m,b=v.height,E=void 0===b?"auto":b;return s.val(y),c.val(E),setTimeout(function(){s.focus()}),h[0]},e}();function ZO(){return zO("w-e-insert-image")}var JO=function(){function e(){this.title=ZE("image.netImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=ZO(),this.altInputId=ZO(),this.hrefInputId=ZO(),this.buttonId=ZO()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return UO(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,s=Qg(uC(ZE("image.src"),r),2),u=s[0],l=om(s[1]),c=Qg(uC(ZE("image.desc"),o),2),d=c[0],f=om(c[1]),p=Qg(uC(ZE("image.link"),i),2),h=p[0],g=om(p[1]),v=Qg(cC(a,ZE("common.ok")),1)[0];if(null==this.$content){var m=om("<div></div>");m.on("click","#".concat(a),function(n){n.preventDefault();var a=m.find("#".concat(r)).val().trim(),s=m.find("#".concat(o)).val().trim(),u=m.find("#".concat(i)).val().trim();t.insertImage(e,a,s,u),e.hidePanelOrModal()}),this.$content=m}var y=this.$content;return y.empty(),y.append(u),y.append(d),y.append(h),y.append(v),l.val(""),f.val(""),g.val(""),setTimeout(function(){l.focus()}),y[0]},e.prototype.insertImage=function(e,t,n,r){void 0===n&&(n=""),void 0===r&&(r=""),t&&(e.restoreSelection(),this.isDisabled(e)||GO(e,t,n,r))},e}(),QO=function(){function e(){this.title=ZE("image.viewLink"),this.iconSvg=mx,this.tag="button"}return e.prototype.getValue=function(e){var t=Iy.getSelectedNodeByType(e,"image");return t&&t.href||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!this.getValue(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View image link failed, image.href is '".concat(t,"'"));window.open(t,"_blank")}},e}(),eN=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.getSelectedNode=function(e){return Iy.getSelectedNodeByType(e,"image")},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedNode(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.getSelectedNode(e);if(null!=n){var r=Iy.getHoverbar(e);r&&r.hideAndClean();var o=n.style,i={style:Yg(Yg({},void 0===o?{}:o),{width:this.value,height:""})};jg.setNodes(e,i,{match:function(e){return Iy.checkNodeType(e,"image")}})}}},e}(),tN=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title="30%",t.value="30%",t}return Kg(t,e),t}(eN),nN=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title="50%",t.value="50%",t}return Kg(t,e),t}(eN),rN=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title="100%",t.value="100%",t}return Kg(t,e),t}(eN),oN={onInsertedImage:function(e){},onUpdatedImage:function(e){},checkImage:function(e,t,n){return!0},parseImageSrc:function(e){return e}};function iN(e,t){var n=Iy.findKey(e,t).id;return"w-e-image-container-".concat(n)}function aN(e,t,n,r){var o=om("body"),i=iN(e,t),a=r.width,s=r.height,u=0,l=0,c=0,d=0,f=!1,p=null;var h=wC(function(e){e.preventDefault();var t=e.clientX,n=l+(f?u-t:t-u),r=c*(n/l);n>d-6||null!=p&&(n<=15||r<=15||(p.css("width","".concat(n,"px")),p.css("height","".concat(r,"px"))))},100);function g(n){if(o.off("mousemove",h),null!=p){var r=p.width().toFixed(2),i=p.height().toFixed(2),a={style:Yg(Yg({},t.style),{width:"".concat(r,"px"),height:"".concat(i,"px")})};jg.setNodes(e,a,{at:Iy.findPath(e,t)}),o.off("mouseup",g)}}function v(t,n){p=function(){var e=om("#".concat(i));if(0===e.length)throw new Error("Cannot find image container elem");return e}(),u=t,d=n;var r=p.find("img");if(0===r.length)throw new Error("Cannot find image elem");l=r.width(),c=r.height(),o.on("mousemove",h),o.on("mouseup",g);var a=Iy.getHoverbar(e);a&&a.hideAndClean()}var m={};return a&&(m.width=a),s&&(m.height=s),m.boxShadow="0 0 0 1px #B4D5FF",ND("div",{id:i,style:m,className:"w-e-image-container w-e-selected-image-container",on:{mousedown:function(n){var r=om(n.target);if(r.hasClass("w-e-image-dragger")){n.preventDefault(),(r.hasClass("left-top")||r.hasClass("left-bottom"))&&(f=!0);var o=Iy.getParentNode(e,t);if(null!=o){var i=Iy.toDOMNode(e,o),a=i.getBoundingClientRect?i.getBoundingClientRect():{width:0},s=window.getComputedStyle(i),u=parseFloat(s.paddingLeft),l=parseFloat(s.paddingRight),c=parseFloat(s.borderLeftWidth),d=parseFloat(s.borderRightWidth);v(n.clientX,a.width-u-l-c-d)}}}}},n,ND("div",{className:"w-e-image-dragger left-top"}),ND("div",{className:"w-e-image-dragger right-top"}),ND("div",{className:"w-e-image-dragger left-bottom"}),ND("div",{className:"w-e-image-dragger right-bottom"}))}var sN={type:"image",renderElem:function(e,t,n){var r=e,o=r.src,i=r.alt,a=void 0===i?"":i,s=r.href,u=void 0===s?"":s,l=r.style,c=void 0===l?{}:l,d=c.width,f=void 0===d?"":d,p=c.height,h=void 0===p?"":p,g=Iy.isNodeSelected(n,e),v={maxWidth:"100%"};f&&(v.width="100%"),h&&(v.height="100%");var m=ND("img",{style:v,src:o,alt:a,"data-href":u}),y=n.isDisabled();return g&&!y?aN(n,e,m,{width:f,height:h}):function(e,t,n,r){var o=r.width,i=r.height,a={};return o&&(a.width=o),i&&(a.height=i),ND("div",{id:iN(e,t),style:a,className:"w-e-image-container"},n)}(n,e,m,{width:f,height:h})}},uN={renderElems:[sN],elemsToHtml:[jO],parseElemsHtml:[{selector:"img:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=om(e),o=r.attr("data-href")||"";return o=decodeURIComponent(o),{type:"image",src:r.attr("src")||"",alt:r.attr("alt")||"",href:o,style:{width:Ax(r,"width"),height:Ax(r,"height")},width:r.attr("width")||"",height:r.attr("height")||"",children:[{text:""}]}}}],menus:[{key:"insertImage",factory:function(){return new JO},config:oN},{key:"deleteImage",factory:function(){return new HO}},{key:"editImage",factory:function(){return new KO},config:oN},{key:"viewImageLink",factory:function(){return new QO}},{key:"imageWidth30",factory:function(){return new tN}},{key:"imageWidth50",factory:function(){return new nN}},{key:"imageWidth100",factory:function(){return new rN}},{key:"editorImageSizeMenu",factory:function(){return new XO}}],editorPlugin:function(e){var t=e.isInline,n=e.isVoid,r=e;return r.isInline=function(e){return"image"===e.type||t(e)},r.isVoid=function(e){return"image"===e.type||n(e)},r}},lN=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){var t=Qg(Kh.nodes(e,{match:function(e){return!!e.indent},universal:!0}),1),n=t[0];return null==n?"":Qg(n,1)[0].indent||""},e.prototype.isActive=function(e){return!1},e.prototype.getMatchNode=function(e){var t=Qg(Kh.nodes(e,{match:function(e){var t=Iy.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e}(),cN=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title=ZE("indent.decrease"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',t}return Kg(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!t.indent},t.prototype.exec=function(e,t){jg.setNodes(e,{indent:null},{match:function(e){return $h.isElement(e)}})},t}(lN),dN=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title=ZE("indent.increase"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',t.DEFAULT_INDENT_VALUE="2em",t}return Kg(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!!t.indent},t.prototype.getIndentValue=function(e){var t=this.getMatchNode(e);if(!t)return this.DEFAULT_INDENT_VALUE;var n=t.children.filter(Cg.isText)[0];if(!n||!n.fontSize)return this.DEFAULT_INDENT_VALUE;var r=n.fontSize,o=parseInt(n.fontSize,10),i=r.replace("".concat(o),"");return"".concat(2*o).concat(i)},t.prototype.exec=function(e,t){var n=this.getIndentValue(e);jg.setNodes(e,{indent:n},{match:function(e){return $h.isElement(e)},mode:"highest"})},t}(lN);var fN={renderStyle:function(e,t){if(!$h.isElement(e))return t;var n=e.indent,r=t;return n&&zx(r,{textIndent:n}),r},styleToHtml:function(e,t){if(!$h.isElement(e))return t;var n=e.indent;if(!n)return t;var r=om(t);return r.css("text-indent",n),Dx(r)},preParseHtml:[{selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(e){var t=om(e),n=Ax(t,"padding-left");return/\dem/.test(n)&&t.css("text-indent","2em"),/\dpx/.test(n)&&parseInt(n,10)%32==0&&t.css("text-indent","2em"),t[0]}}],parseStyleHtml:function(e,t,n){var r=om(e);if(!$h.isElement(t))return t;var o=t,i=Ax(r,"text-indent"),a=parseInt(i,10);return i&&a>0&&(o.indent=i),o},menus:[{key:"indent",factory:function(){return new dN}},{key:"delIndent",factory:function(){return new cN}}]},pN=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!Iy.getSelectedElems(e).some(function(t){var n=t.type;return!(!Kh.isVoid(e,t)||!Kh.isBlock(e,t)||"video"===n)||!!["pre","code"].includes(n)})},e}(),hN=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title=ZE("justify.center"),t.iconSvg='<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>',t}return Kg(t,e),t.prototype.exec=function(e,t){jg.setNodes(e,{textAlign:"center"},{match:function(t){return $h.isElement(t)&&!e.isInline(t)}})},t}(pN),gN=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title=ZE("justify.justify"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',t}return Kg(t,e),t.prototype.exec=function(e,t){jg.setNodes(e,{textAlign:"justify"},{match:function(t){return $h.isElement(t)&&!e.isInline(t)}})},t}(pN),vN=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title=ZE("justify.left"),t.iconSvg='<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>',t}return Kg(t,e),t.prototype.exec=function(e,t){jg.setNodes(e,{textAlign:"left"},{match:function(t){return $h.isElement(t)&&!e.isInline(t)}})},t}(pN),mN=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title=ZE("justify.right"),t.iconSvg='<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>',t}return Kg(t,e),t.prototype.exec=function(e,t){jg.setNodes(e,{textAlign:"right"},{match:function(t){return $h.isElement(t)&&!e.isInline(t)}})},t}(pN);var yN={renderStyle:function(e,t){if(!$h.isElement(e))return t;var n=e.textAlign,r=t;return n&&zx(r,{textAlign:n}),r},styleToHtml:function(e,t){if(!$h.isElement(e))return t;var n=e.textAlign;if(!n)return t;var r=om(t);return r.css("text-align",n),Dx(r)},parseStyleHtml:function(e,t,n){var r=om(e);if(!$h.isElement(t))return t;var o=t,i=Ax(r,"text-align");return i&&(o.textAlign=i),o},menus:[{key:"justifyLeft",factory:function(){return new vN}},{key:"justifyRight",factory:function(){return new mN}},{key:"justifyCenter",factory:function(){return new hN}},{key:"justifyJustify",factory:function(){return new gN}}]};var bN=function(){function e(){this.title=ZE("lineHeight.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M964 788a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526zM198.93 144.306c6.668-5.798 16.774-5.094 22.573 1.574l122.26 140.582a16 16 0 0 1 3.927 10.5c0 8.836-7.164 16-16 16h-61.8a8 8 0 0 0-8 8v390.077h69.819a16 16 0 0 1 10.502 3.928c6.666 5.8 7.37 15.906 1.57 22.573L221.476 878.123a16 16 0 0 1-1.57 1.57c-6.668 5.8-16.774 5.097-22.574-1.57L75.051 737.538a16 16 0 0 1-3.928-10.5c0-8.837 7.163-16 16-16h69.822V312.96H87.127a16 16 0 0 1-10.502-3.928c-6.666-5.8-7.37-15.906-1.57-22.573l122.303-140.582a16 16 0 0 1 1.572-1.572zM964 465a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z m0-323a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z"></path></svg>',this.tag="select",this.width=80}return e.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig("lineHeight").lineHeightList,r=void 0===n?[]:n;t.push({text:ZE("lineHeight.default"),value:""}),r.forEach(function(e){t.push({text:e,value:e})});var o=this.getValue(e);return t.forEach(function(e){e.value===o?e.selected=!0:e.selected=void 0}),t},e.prototype.getMatchNode=function(e){var t=Qg(Kh.nodes(e,{match:function(e){var t=Iy.getNodeType(e);return!!t.startsWith("header")||!!["paragraph","blockquote","list-item"].includes(t)},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getMatchNode(e);return null==t?"":$h.isElement(t)&&t.lineHeight||""},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getMatchNode(e)},e.prototype.exec=function(e,t){jg.setNodes(e,{lineHeight:t.toString()},{mode:"highest"})},e}();var EN={renderStyle:function(e,t){if(!$h.isElement(e))return t;var n=e.lineHeight,r=t;return n&&zx(r,{lineHeight:n}),r},styleToHtml:function(e,t){if(!$h.isElement(e))return t;var n=e.lineHeight;if(!n)return t;var r=om(t);return r.css("line-height",n),Dx(r)},parseStyleHtml:function(e,t,n){var r=om(e);if(!$h.isElement(t))return t;var o=t,i=n.getMenuConfig("lineHeight").lineHeightList,a=void 0===i?[]:i,s=Ax(r,"line-height");return s&&a.includes(s)&&(o.lineHeight=s),o},menus:[{key:"lineHeight",factory:function(){return new bN},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]};var CN={type:"link",elemToHtml:function(e,t){var n=e,r=n.url,o=n.target,i=void 0===o?"_blank":o;return'<a href="'.concat(r,'" target="').concat(i,'">').concat(t,"</a>")}};function DN(e,t,n,r){return Xg(this,void 0,void 0,function(){var o,i;return Zg(this,function(a){switch(a.label){case 0:return(o=t.getMenuConfig(e).checkLink)?[4,o(n,r)]:[3,2];case 1:if("string"==typeof(i=a.sent()))return t.alert(i,"error"),[2,!1];if(null==i)return[2,!1];a.label=2;case 2:return[2,!0]}})})}function wN(e,t,n){return Xg(this,void 0,void 0,function(){var r;return Zg(this,function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}})})}function AN(e){return null==e.selection||!!Iy.getSelectedElems(e).some(function(t){var n=t.type;return!!e.isVoid(t)||!!["pre","code","link"].includes(n)})}function SN(e,t){return{type:"link",url:$O(e),children:t?[{text:t}]:[]}}function xN(e,t,n){return Xg(this,void 0,void 0,function(){var r,o,i,a,s;return Zg(this,function(u){switch(u.label){case 0:return n?(t||(t=n),e.restoreSelection(),AN(e)?[2]:[4,DN("insertLink",e,t,n)]):[2];case 1:return u.sent()?[4,wN("insertLink",e,n)]:[2];case 2:if(r=u.sent(),null==(o=e.selection))return[2];if(fg.isCollapsed(o)){if((a=Iy.getLeftLengthOfMaxLength(e))<=0)return[2];e.insertText(" "),a<t.length+1&&(t=t.slice(0,a-1)),s=SN(r,t),jg.insertNodes(e,s),e.insertFragment([{text:" "}])}else if((i=Kh.string(e,o))!==t){if((a=Iy.getLeftLengthOfMaxLength(e))<=0)return[2];a<i.length-t.length&&(t=t.slice(0,a)),e.deleteFragment(),s=SN(r,t),jg.insertNodes(e,s)}else s=SN(r),jg.wrapNodes(e,s,{split:!0}),jg.collapse(e,{edge:"end"});return[2]}})})}function ON(){return zO("w-e-update-link")}var NN=function(){function e(){this.title=ZE("link.edit"),this.iconSvg=vx,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=ON(),this.buttonId=ON()}return e.prototype.getSelectedLinkElem=function(e){var t=Iy.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.getModalPositionNode=function(e){return Iy.getSelectedNodeByType(e,"link")},e.prototype.getModalContentElem=function(e){var t=this.urlInputId,n=this.buttonId,r=Qg(uC(ZE("link.url"),t),2),o=r[0],i=om(r[1]),a=Qg(cC(n,ZE("common.ok")),1)[0];if(null==this.$content){var s=om("<div></div>");s.on("click","#".concat(n),function(n){n.preventDefault(),e.restoreSelection();var r=Iy.getSelectedNodeByType(e,"link"),o=r?eg.string(r):"",i=s.find("#".concat(t)).val();!function(e,t,n){Xg(this,void 0,void 0,function(){var r,o;return Zg(this,function(i){switch(i.label){case 0:return n?[4,DN("editLink",e,t,n)]:[2];case 1:return i.sent()?[4,wN("editLink",e,n)]:[2];case 2:return r=i.sent(),o={url:$O(r)},jg.setNodes(e,o,{match:function(e){return Iy.checkNodeType(e,"link")}}),[2]}})})}(e,o,i),e.hidePanelOrModal()}),this.$content=s}var u=this.$content;u.empty(),u.append(o),u.append(a);var l=this.getValue(e);return i.val(l),setTimeout(function(){i.focus()}),u[0]},e}();function BN(){return zO("w-e-insert-link")}var TN=function(){function e(){this.title=ZE("link.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=BN(),this.urlInputId=BN(),this.buttonId=BN()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return AN(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=e.selection,n=this,r=n.textInputId,o=n.urlInputId,i=n.buttonId,a=Qg(uC(ZE("link.text"),r),2),s=a[0],u=om(a[1]),l=Qg(uC(ZE("link.url"),o),2),c=l[0],d=om(l[1]),f=Qg(cC(i,ZE("common.ok")),1)[0];if(null==this.$content){var p=om("<div></div>");p.on("click","#".concat(i),function(t){t.preventDefault();var n=p.find("#".concat(r)).val(),i=p.find("#".concat(o)).val();xN(e,n,i),e.hidePanelOrModal()}),this.$content=p}var h=this.$content;if(h.empty(),h.append(s),h.append(c),h.append(f),null==t||fg.isCollapsed(t))u.val("");else{var g=Kh.string(e,t);u.val(g)}return d.val(""),setTimeout(function(){u.focus()}),h[0]},e}(),kN=function(){function e(){this.title=ZE("link.unLink"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M608.16328 811.815036c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.347563 89.347564c-118.525421 118.523421-311.38448 118.531421-429.919901 0-118.527421-118.529421-118.527421-311.39048 0-429.917901l89.349564-89.349563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.195613 79.195613c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.349563 89.347564c-56.143726 56.145726-56.143726 147.49928 0 203.645005 56.143726 56.143726 147.49928 56.145726 203.647005 0l89.347564-89.347563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.193613 79.195613z m-113.135447-520.429459c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.347564-89.347564c56.143726-56.149726 147.49928-56.145726 203.647006 0 56.143726 56.145726 56.143726 147.49928 0 203.645006l-89.349564 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.195613 79.195613c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.349564-89.349563c118.529421-118.529421 118.529421-311.38848 0-429.917901-118.531421-118.527421-311.38848-118.527421-429.919901 0l-89.347563 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.193613 79.195613z m469.653707 718.556492l45.253779-45.253779c18.745908-18.745908 18.745908-49.13776 0-67.881669L127.195629 14.062931c-18.745908-18.745908-49.13776-18.745908-67.881669 0L14.058181 59.31871c-18.745908 18.745908-18.745908 49.13776 0 67.881669l882.74169 882.74169c18.745908 18.743908 49.13776 18.743908 67.881669 0z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==Iy.getSelectedNodeByType(e,"link")},e.prototype.exec=function(e,t){this.isDisabled(e)||jg.unwrapNodes(e,{match:function(e){return Iy.checkNodeType(e,"link")}})},e}(),FN=function(){function e(){this.title=ZE("link.view"),this.iconSvg=mx,this.tag="button"}return e.prototype.getSelectedLinkElem=function(e){var t=Iy.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View link failed, link url is '".concat(t,"'"));window.open(t,"_blank")}},e}(),IN={checkLink:function(e,t){return!0},parseLinkUrl:function(e){return e}},PN={key:"insertLink",factory:function(){return new TN},config:IN},_N={key:"editLink",factory:function(){return new NN},config:IN},LN={key:"unLink",factory:function(){return new kN}},RN={key:"viewLink",factory:function(){return new FN}};var MN,jN,HN={selector:"a:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=om(e);return 0===(t=t.filter(function(e){return!!Cg.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"link",url:r.attr("href")||"",target:r.attr("target")||"",children:t}}};var zN=b(function(){if(jN)return MN;jN=1,MN=function(r){if("string"!=typeof r)return!1;var o=r.match(e);if(!o)return!1;var i=o[1];if(!i)return!1;if(t.test(i)||n.test(i))return!0;return!1};var e=/^(?:\w+:)?\/\/(\S+)$/,t=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,n=/^[^\s\.]+\.\S{2,}$/;return MN}());var $N={type:"link",renderElem:function(e,t,n){var r=e,o=r.url,i=r.target;return ND("a",{href:o,target:void 0===i?"_blank":i},t)}},UN={renderElems:[$N],elemsToHtml:[CN],parseElemsHtml:[HN],menus:[PN,_N,LN,RN],editorPlugin:function(e){var t=e.isInline,n=e.insertData,r=e.normalizeNode,o=e;return o.isInline=function(e){return"link"===e.type||t(e)},o.insertData=function(e){var t=e.getData("text/plain");if(zN(t)){if(/<img[^>]+>/.test(e.getData("text/html")))n(e);else if(!AN(o)){var r=o.selection;if(null!=r){var i=Kh.string(o,r);xN(o,i,t)}}}else n(e)},o.normalizeNode=function(e){var t=Qg(e,2),n=t[0],i=t[1];return"link"!==Iy.getNodeType(n)?r([n,i]):""===eg.string(n)?jg.removeNodes(o,{at:i}):r([n,i])},o}};var VN={selector:"p:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=om(e);return 0===(t=t.filter(function(e){return!!Cg.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:t}}};function WN(e){var t=Qg(Kh.nodes(e,{match:function(t){return e.children[0]===t},mode:"highest"}),1),n=t[0];if(null==n)return!1;var r=n[0];if(!$h.isElement(r))return!1;if("paragraph"===r.type)return!1;if(""!==eg.string(r))return!1;var o=r.children,i=void 0===o?[]:o;return!!Cg.isText(i[0])&&(jg.setNodes(e,{type:"paragraph"}),!0)}var GN={type:"paragraph",renderElem:function(e,t,n){return ND("p",null,t)}},qN={renderElems:[GN],elemsToHtml:[{type:"paragraph",elemToHtml:function(e,t){return""===t?"<p><br></p>":"<p>".concat(t,"</p>")}}],parseElemsHtml:[VN],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward,r=e;return r.deleteBackward=function(e){WN(r)||t(e)},r.deleteForward=function(e){WN(r)||n(e)},r}};function KN(e,t){if(null==e.selection)return!0;var n=Qg(Kh.nodes(e,{match:function(t){return"pre"===Iy.getNodeType(t)||!!Kh.isVoid(e,t)},universal:!0}),1);return!!n[0]}function YN(e,t){Object.keys(t).forEach(function(t){"text"!==t&&Kh.removeMark(e,t)})}var XN=function(){function e(){this.marksNeedToRemove=[],this.tag="button"}return e.prototype.getValue=function(e){var t=this.mark,n=Kh.marks(e);if(n)return n[t];var r=Qg(Kh.nodes(e,{match:function(e){return!0===e[t]}}),1);return!!r[0]},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){return KN(e,this.mark)},e.prototype.exec=function(e,t){var n=this.mark,r=this.marksNeedToRemove;t?e.removeMark(n):(e.addMark(n,!0),r&&r.forEach(function(t){return e.removeMark(t)}))},e}(),ZN=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.mark="bold",t.title=ZE("textStyle.bold"),t.iconSvg='<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>',t.hotkey="mod+b",t}return Kg(t,e),t}(XN),JN=function(){function e(){this.title=ZE("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 e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return KN(e)},e.prototype.exec=function(e,t){var n,r,o=Kh.nodes(e,{match:function(e){return Cg.isText(e)},universal:!0});try{for(var i=Jg(o),a=i.next();!a.done;a=i.next()){YN(e,a.value[0])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e}(),QN=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.mark="code",t.title=ZE("textStyle.code"),t.iconSvg='<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>',t.hotkey="mod+e",t}return Kg(t,e),t}(XN),eB=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.mark="italic",t.title=ZE("textStyle.italic"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',t.hotkey="mod+i",t}return Kg(t,e),t}(XN),tB=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.mark="sub",t.marksNeedToRemove=["sup"],t.title=ZE("textStyle.sub"),t.iconSvg='<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>',t.hotkey="",t}return Kg(t,e),t}(XN),nB=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.mark="sup",t.marksNeedToRemove=["sub"],t.title=ZE("textStyle.sup"),t.iconSvg='<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>',t.hotkey="",t}return Kg(t,e),t}(XN),rB=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.mark="through",t.title=ZE("textStyle.through"),t.iconSvg='<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>',t.hotkey="mod+shift+x",t}return Kg(t,e),t}(XN),oB=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.mark="underline",t.title=ZE("textStyle.underline"),t.iconSvg='<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>',t.hotkey="mod+u",t}return Kg(t,e),t}(XN);function iB(e,t){return 0!==e.length&&(!!e[0].matches(t)||e.find(t).length>0)}function aB(e,t){var n=t,r=e,o=r.bold,i=r.italic,a=r.underline,s=r.code,u=r.through,l=r.sub,c=r.sup;return o&&(n="<strong>".concat(n,"</strong>")),s&&(n="<code>".concat(n,"</code>")),i&&(n="<em>".concat(n,"</em>")),a&&(n="<u>".concat(n,"</u>")),u&&(n="<s>".concat(n,"</s>")),l&&(n="<sub>".concat(n,"</sub>")),c&&(n="<sup>".concat(n,"</sup>")),n}var sB={renderStyle:function(e,t){var n=e,r=n.bold,o=n.italic,i=n.underline,a=n.code,s=n.through,u=n.sub,l=n.sup,c=t;return r&&(c=ND("strong",null,c)),a&&(c=ND("code",null,c)),o&&(c=ND("em",null,c)),i&&(c=ND("u",null,c)),s&&(c=ND("s",null,c)),u&&(c=ND("sub",null,c)),l&&(c=ND("sup",null,c)),c},menus:[{key:"bold",factory:function(){return new ZN}},{key:"underline",factory:function(){return new oB}},{key:"italic",factory:function(){return new eB}},{key:"through",factory:function(){return new rB}},{key:"code",factory:function(){return new QN}},{key:"sub",factory:function(){return new tB}},{key:"sup",factory:function(){return new nB}},{key:"clearStyle",factory:function(){return new JN}}],styleToHtml:function(e,t){if(!Cg.isText(e))return t;if(Cx(t))return aB(e,t);var n=om(t),r=n.html();return r=aB(e,r),n.html(r),Dx(n)},parseStyleHtml:function(e,t,n){var r=om(e);if(!Cg.isText(t))return t;var o=t;return iB(r,"b,strong")&&(o.bold=!0),iB(r,"i,em")&&(o.italic=!0),iB(r,"u")&&(o.underline=!0),iB(r,"s,strike")&&(o.through=!0),iB(r,"sub")&&(o.sub=!0),iB(r,"sup")&&(o.sup=!0),iB(r,"code")&&(o.code=!0),o}};var uB={type:"todo",elemToHtml:function(e,t){var n=e.checked;return'<div data-w-e-type="todo"><input type="checkbox" disabled '.concat(n?"checked":"",">").concat(t,"</div>")}},lB=function(){function e(){this.title=ZE("todo.todo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M278.755556 403.911111l-79.644445 79.644445L455.111111 739.555556l568.888889-568.888889-79.644444-79.644445L455.111111 580.266667l-176.355555-176.355556zM910.222222 910.222222H113.777778V113.777778h568.888889V0H113.777778C51.2 0 0 51.2 0 113.777778v796.444444c0 62.577778 51.2 113.777778 113.777778 113.777778h796.444444c62.577778 0 113.777778-51.2 113.777778-113.777778V455.111111h-113.777778v455.111111z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!Iy.getSelectedNodeByType(e,"todo")},e.prototype.isDisabled=function(e){return null==e.selection||!!Iy.getSelectedElems(e).some(function(t){if(Kh.isVoid(e,t)&&Kh.isBlock(e,t))return!0;var n=t.type;return!!["pre","table","list-item"].includes(n)})},e.prototype.exec=function(e,t){var n=this.isActive(e);jg.setNodes(e,{type:n?"paragraph":"todo"})},e}();var cB={selector:'div[data-w-e-type="todo"]',parseElemHtml:function(e,t,n){var r=om(e);0===(t=t.filter(function(e){return!!Cg.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=!1;return null!=r.find('input[type="checkbox"]').attr("checked")&&(o=!0),{type:"todo",checked:o,children:t}}};var dB={type:"todo",renderElem:function(e,t,n){var r=!1;n.isDisabled()&&(r=!0);var o=ND("div",{style:{margin:"5px 0"}},ND("span",{contentEditable:!1,style:{marginRight:"0.5em"}},ND("input",{type:"checkbox",checked:e.checked,disabled:r,on:{change:function(t){var r=Iy.findPath(n,e),o={checked:t.target.checked};jg.setNodes(n,o,{at:r})}}})),ND("span",null,t));return o}},fB={renderElems:[dB],elemsToHtml:[uB],preParseHtml:[{selector:"ul.w-e-todo",preParseHtml:function(e){var t=om(e).find("li"),n=om('<div data-w-e-type="todo"></div>'),r=t.find("input[type]");return n.append(r),t.children()[0].remove(),n[0].innerHTML+=t[0].innerHTML,n[0]}}],parseElemsHtml:[cB],menus:[{key:"todo",factory:function(){return new lB}}],editorPlugin:function(e){var t=e.deleteBackward,n=e;return n.deleteBackward=function(n){var r=e.selection;if(r&&fg.isCollapsed(r)){var o=Iy.getSelectedNodeByType(e,"todo");if(o&&0===eg.string(o).length)return void jg.setNodes(e,{type:"paragraph"},{mode:"highest"})}t(n)},n}},pB=function(){function e(){this.title=ZE("undo.redo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.redo&&e.redo()},e}(),hB=function(){function e(){this.title=ZE("undo.undo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.undo&&e.undo()},e}(),gB=[sB,$x,eO,fN,yN,EN,uN,qx,Yx,UN,_x,Nx,MO,qN,fB,nO,{menus:[{key:"redo",factory:function(){return new pB}},{key:"undo",factory:function(){return new hB}}]},oO,Vx];qE("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),qE("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var vB=new WeakMap;function mB(e){var t,n=e.children||[],r=n.length;if(0===r)return"";for(var o=0;o<r&&!t;o+=1){var i=n[o];Cg.isText(i)&&(t=i)}return null==t?"":t.color||""}function yB(e,t,n){for(var r=t.type,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["type"]),i=void 0!==n?n:o.level||0,a=Iy.findPath(e,t),s=a;;){if(0===s.length||0===a[a.length-1])return null;s=og.previous(s);var u=Kh.node(e,s);if(!u)return null;var l=Qg(u,1)[0],c=l.level,d=void 0===c?0:c;if(Iy.getNodeType(l)!==r)return null;if(d===i)return l}}function bB(e,t,n){var r=yB(e,t,n);return!!r&&r.ordered===t.ordered}var EB=[];var CB={type:"list-item",elemToHtml:function(e,t){var n="",r="",o=e.ordered,i=void 0!==o&&o?"ol":"ul",a=function(e){var t=vB.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=Iy.findPath(t,e);if(0===u[0])return s+1;var l=og.previous(u),c=Kh.node(t,l);if(!c)return 0;var d=Qg(c,1)[0];if(Iy.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?s-v:v>s?bB(t,e)?0:1:v===s?h===i?0:1:0}(e);if(a>0)for(var s=0;s<a;s+=1)n+="<".concat(i,">"),EB.push(i);var u=function(e){var t=vB.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=Iy.findPath(t,e);if(u[0]===t.children.length-1)return s+1;var l=og.next(u),c=Kh.node(t,l);if(!c)return 0;var d=Qg(c,1)[0];if(Iy.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?bB(t,d)?s-v:s-v+1:v>s?0:v===s?h===i?0:1:0}(e);if(u>0)for(s=0;s<u;s+=1){var l=EB.pop();r+="</".concat(l,">")}var c=mB(e),d=c?' style="color:'.concat(c,'"'):"";return{html:"<li".concat(d,">").concat(t,"</li>"),prefix:n,suffix:r}}},DB=function(){function e(){this.type="list-item",this.tag="button"}return e.prototype.getListNode=function(e){var t=this.type;return Iy.getSelectedNodeByType(e,t)},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){var t=this.getListNode(e);if(null==t)return!1;var n=t.ordered;return(void 0!==n&&n)===this.ordered},e.prototype.isDisabled=function(e){return null==e.selection||!!Iy.getSelectedElems(e).some(function(t){if(Kh.isVoid(e,t)&&Kh.isBlock(e,t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)})},e.prototype.exec=function(e,t){this.isActive(e)?jg.setNodes(e,{type:"paragraph",ordered:void 0,level:void 0}):jg.setNodes(e,{type:"list-item",ordered:this.ordered,indent:void 0})},e}(),wB=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.ordered=!1,t.title=ZE("listModule.unOrderedList"),t.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>',t}return Kg(t,e),t}(DB),AB=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.ordered=!0,t.title=ZE("listModule.orderedList"),t.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>',t}return Kg(t,e),t}(DB),SB={key:"bulletedList",factory:function(){return new wB}},xB={key:"numberedList",factory:function(){return new AB}};function OB(e){return e.length?e[0].tagName.toLowerCase():""}xm&&(om.fn.append=xm),um&&(om.fn.attr=um),Nm&&(om.fn.parent=Nm);var NB={selector:"li:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=om(e);0===(t=t.filter(function(e){return!!Cg.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=function(e){return"ol"===OB(e.parent())}(r),i=function(e){for(var t=0,n=e.parent(),r=OB(n);"ul"===r||"ol"===r;)r=OB(n=n.parent()),t+=1;return t-1}(r);return{type:"list-item",ordered:o,level:i,children:t}}};var BB={selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(e,t,n){return t.flat(1/0)}};function TB(e){return Kh.nodes(e,{at:e.selection||void 0,match:function(t){return 1===Iy.findPath(e,t).length}})}var kB={type:"list-item",renderElem:function(e,t,n){vB.set(e,n);var r=e,o=r.level,i=void 0===o?0:o,a=r.ordered,s=void 0!==a&&a,u={margin:"5px 0 5px ".concat(20*i,"px"),display:"flex",alignItems:"flex-start"},l="";if(s){var c=function(e,t){var n=t,r=n.type,o=n.level,i=void 0===o?0:o,a=n.ordered,s=void 0!==a&&a,u=1,l=t,c=Iy.findPath(e,l);if(0===c[0])return 1;for(;c[0]>0;){var d=og.previous(c),f=Kh.node(e,d);if(null==f)break;var p=f[0],h=p.level,g=void 0===h?0:h,v=p.type,m=p.ordered;if(v!==r)break;if(g<i)break;if(g===i){if(m!==s)break;u+=1}l=p,c=d}return u}(n,e);l="".concat(c,".")}else l=function(e){void 0===e&&(e=0);var t="";switch(e){case 0:t="•";break;case 1:t="◦";break;default:t="▪"}return t}(i);return ND("div",{style:u},ND("span",{contentEditable:!1,style:{marginRight:"0.5em",color:mB(e)},"data-w-e-reserve":!0},l),ND("span",{style:{flex:"1",wordBreak:"break-word"}},t))}},FB={renderElems:[kB],editorPlugin:function(e){var t=e.deleteBackward,n=e.handleTab,r=e.normalizeNode,o=e.insertBreak,i=e;return i.insertBreak=function(){var t=Qg(Kh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"list-item")},universal:!0}),1),n=t[0];return n?""!==n[0].children[0].text?o():void jg.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0}):o()},i.deleteBackward=function(n){var r=i.selection;if(null!=r)if(fg.isExpanded(r))t(n);else{var o=Iy.getSelectedNodeByType(i,"list-item");if(null!=o)if(0!==r.focus.offset)t(n);else{var a=o,s=a.level,u=void 0===s?0:s,l=a.ordered,c=void 0!==l&&l;if(u>0){var d=yB(e,o,u-1);d&&d.ordered!==c?jg.setNodes(i,{level:u-1,ordered:!c}):jg.setNodes(i,{level:u-1})}else jg.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0})}else t(n)}else t(n)},i.handleTab=function(){var e,t,r,o,a=i.selection;if(null!=a){if(fg.isCollapsed(a)){var s=Iy.getSelectedNodeByType(i,"list-item");if(null==s)return void n();if(0===a.focus.offset){var u=s.level,l=void 0===u?0:u;return void jg.setNodes(i,{level:l+1})}}if(fg.isExpanded(a)){var c=0,d=!1;try{for(var f=Jg(TB(i)),p=f.next();!p.done;p=f.next()){var h=Qg(p.value,1)[0];"list-item"===Iy.getNodeType(h)?c+=1:d=!0}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}if(d||c<=1)return void n();try{for(var g=Jg(TB(i)),v=g.next();!v.done;v=g.next()){var m=Qg(v.value,2),y=(h=m[0],m[1]),b=h.level;l=void 0===b?0:b;jg.setNodes(i,{level:l+1},{at:y})}}catch(e){r={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}}else n()}else n()},i.normalizeNode=function(e){var t=Qg(e,2),n=t[0],o=t[1],a=Iy.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||jg.unwrapNodes(i,{at:o}),r([n,o])},i},menus:[SB,xB],elemsToHtml:[CB],parseElemsHtml:[BB,NB]};qE("en",{tableModule:{modal:{border:"Border",borderWidth:"Width",bgColor:"Back color",align:"Text Align",ok:"OK"},color:{default:"Default color",clear:"Clear back color"},borderStyle:{none:"None",solid:"Solid",dotted:"Dotted",dashed:"Dashed",double:"Double",groove:"Groove",ridge:"Ridge",inset:"Inset",outset:"Outset"},deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Width auto",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header",mergeCell:"merge cell",splitCell:"split cell",tableProperty:"Table property",cellProperty:"Cell property"}}),qE("zh-CN",{tableModule:{modal:{border:"边框",borderWidth:"宽度",bgColor:"背景色",align:"对齐方式",ok:"确定"},color:{default:"默认颜色",clear:"清除背景色"},borderStyle:{none:"无样式",solid:"实线",dotted:"点状虚线",dashed:"虚线",double:"双线",groove:"凹槽边框",ridge:"菱形边框",inset:"凹边框",outset:"凸边框"},deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"宽度自适应",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头",mergeCell:"合并单元格",splitCell:"拆分单元格",tableProperty:"表格属性",cellProperty:"单元格属性"}});var IB={type:"table",elemToHtml:function(e,t){var n=e,r=n.width,o=void 0===r?"auto":r,i=n.columnWidths,a=n.height,s=void 0===a?"auto":a,u=null==i?void 0:i.map(function(e){return"<col width=".concat(e,"></col>")}).join(""),l=u?'<colgroup contentEditable="false">'.concat(u,"</colgroup>"):"";return'<table style="width: '.concat(o,";table-layout: fixed;height:").concat(s,'">').concat(l,"<tbody>").concat(t,"</tbody></table>")}},PB={type:"table-row",elemToHtml:function(e,t){return"<tr>".concat(t,"</tr>")}},_B={type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,o=void 0===r?1:r,i=n.rowSpan,a=void 0===i?1:i,s=n.isHeader,u=void 0!==s&&s,l=n.width,c=void 0===l?"auto":l,d=n.hidden,f=u?"th":"td",p=void 0!==d&&d?"display:none":"";return"<".concat(f,' colSpan="').concat(o,'" rowSpan="').concat(a,'" width="').concat(c,'" style="').concat(p,'">').concat(t,"</").concat(f,">")}},LB='<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>',RB={blocks:{td:"table-cell",th:"table-cell",content:"paragraph",tr:"table-row",table:"table",tbody:"table-body"}};function MB(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=RB,o=t.map(function(e){var t;return null===(t=null==r?void 0:r.blocks)||void 0===t?void 0:t[e]});return function(e){return function(e){return!Kh.isEditor(e)&&$h.isElement(e)&&"type"in e}(e)&&o.includes(e.type)}}function jB(e,t){for(var n=Qg(t,2),r=n[0],o=n[1],i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=Qg(eg.common(e,r,o),2),u=s[0],l=s[1];return!!MB.apply(void 0,ev([e],Qg(i),!1))(u,l)||!!Kh.above(e,{match:MB.apply(void 0,ev([e],Qg(i),!1)),at:l})}function HB(e,t){var n,r;void 0===t&&(t={});var o=[];try{for(var i=Jg(function(e,t){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y,b;return void 0===t&&(t={}),Zg(this,function(E){switch(E.label){case 0:if(n=Qg(Kh.nodes(e,{match:MB(e,"table"),at:t.at}),1),!(r=n[0]))return[2,[]];o=Qg(r,2),i=o[1],E.label=1;case 1:E.trys.push([1,6,7,8]),a=Jg(Kh.nodes(e,{match:MB(e,"table"),at:i})),s=a.next(),E.label=2;case 2:if(s.done)return[3,5];u=Qg(s.value,2),l=u[1],c=[];try{for(y=void 0,d=Jg(Kh.nodes(e,{match:MB(e,"tr"),at:l})),f=d.next();!f.done;f=d.next())p=Qg(f.value,2),h=p[1],c.push(ev([],Qg(Kh.nodes(e,{match:MB(e,"th","td"),at:h})),!1))}catch(e){y={error:e}}finally{try{f&&!f.done&&(b=d.return)&&b.call(d)}finally{if(y)throw y.error}}return[4,c];case 3:E.sent(),E.label=4;case 4:return s=a.next(),[3,2];case 5:return[3,8];case 6:return g=E.sent(),v={error:g},[3,8];case 7:try{s&&!s.done&&(m=a.return)&&m.call(a)}finally{if(v)throw v.error}return[7];case 8:return[2]}})}(e,{at:t.at})),a=i.next();!a.done;a=i.next()){for(var s=a.value,u=[],l=0;l<s.length;l+=1){u[l]||(u[l]=[]);for(var c=0;c<s[l].length;c+=1)for(var d=Qg(s[l][c],1)[0],f=d.rowSpan,p=void 0===f?1:f,h=d.colSpan,g=void 0===h?1:h,v=0;v<g+0;v+=1)for(var m=0;m<p;m+=1)u[l+m]||(u[l+m]=[]),u[l+m][c+v]||(u[l+m][c+v]=[s[l+m][c+v],{rtl:v-0+1,ltr:g-v+0,ttb:m+1,btt:p-m}])}o.push.apply(o,ev([],Qg(u),!1))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}var zB=function(){function e(e,t){this.x=e,this.y=t}return e.valueOf=function(e,t){return new this(e,t)},e.equals=function(e,t){return e.x===t.x&&e.y===t.y},e}();function $B(e){return e.length?e[0].tagName.toLowerCase():""}function UB(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}xm&&om.fn&&(om.fn.append=xm),pm&&om.fn&&(om.fn.on=pm),Rm&&om.fn&&(om.fn.focus=Rm),um&&om.fn&&(om.fn.attr=um),fm&&om.fn&&(om.fn.val=fm),wm&&om.fn&&(om.fn.html=wm),dm&&om.fn&&(om.fn.dataset=dm),im&&om.fn&&(om.fn.addClass=im),am&&om.fn&&(om.fn.removeClass=am),km&&om.fn&&(om.fn.children=km),Cm&&om.fn&&(om.fn.each=Cm),Tm&&om.fn&&(om.fn.find=Tm),cm&&om.fn&&(om.fn.data=cm),ym&&om.fn&&(om.fn.hide=ym),bm&&om.fn&&(om.fn.show=bm);var VB=new WeakMap,WB=new WeakMap,GB=function(){function e(){this.title=ZE("tableModule.tableProperty"),this.iconSvg='<svg viewBox="0 0 20 20"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.menu="table",this.borderStyle=[{value:"none",label:ZE("tableModule.borderStyle.none")},{value:"solid",label:ZE("tableModule.borderStyle.solid")},{value:"dotted",label:ZE("tableModule.borderStyle.dotted")},{value:"dashed",label:ZE("tableModule.borderStyle.dashed")},{value:"double",label:ZE("tableModule.borderStyle.double")},{value:"groove",label:ZE("tableModule.borderStyle.groove")},{value:"ridge",label:ZE("tableModule.borderStyle.ridge")},{value:"inset",label:ZE("tableModule.borderStyle.inset")},{value:"outset",label:ZE("tableModule.borderStyle.outset")}],this.textAlignOptions=[{value:"left",label:ZE("justify.left"),svg:'<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>'},{value:"center",label:ZE("justify.center"),svg:'<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>'},{value:"right",label:ZE("justify.right"),svg:'<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>'},{value:"justify",label:ZE("justify.justify"),svg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>'}]}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==Iy.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){},e.prototype.getModalContentNode=function(e){return Qg(Kh.nodes(e,{match:MB(e,"table")}),1)[0]},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this.getModalContentNode(e);if(!n)return null;var r=Qg(n,2),o=r[0],i=r[1],a=om('<div>\n <label class="babel-container">\n <span>'.concat(ZE("tableModule.modal.border"),'</span>\n <span class="babel-container-border">\n <select name="borderStyle">\n ').concat(this.borderStyle.map(function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")}).join(""),'\n </select>\n <span class="color-group" data-mark="color">\n <span class="color-group-block"></span>\n <input name="borderColor" type="hidden">\n </span>\n <input name="borderWidth" type="number" placeholder="').concat(ZE("tableModule.modal.borderWidth"),'">\n </span>\n </label>\n <div class="babel-container">\n <span>').concat(ZE("tableModule.modal.bgColor"),'</span>\n <span class="babel-container-background">\n <span class="color-group" data-mark="bgColor">\n <span class="color-group-block"></span>\n <input name="backgroundColor" type="hidden">\n </span>\n </span>\n </div>\n <label class="babel-container">\n <span>').concat(ZE("tableModule.modal.align"),'</span>\n <span class="babel-container-align">\n <select name="textAlign">\n ').concat(this.textAlignOptions.map(function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")}).join(""),'\n </select>\n </span>\n </label>\n <div class="button-container">\n <button type="button">').concat(ZE("tableModule.modal.ok"),"</button>\n </div>\n </div>"));a.find("[name]").each(function(e){om(e).val(o[om(e).attr("name")])});var s=function(e,t){t?om(".color-group-block",e).css("background-color",t).empty():om(".color-group-block",e).css("background-color","").html(LB)};return a.find(".color-group").each(function(n){var r=om('[type="hidden"]',n).val()||"";s(n,r);var o=om(n);o.on("click",function(){a.find(".color-group .w-e-drop-panel").hide();var i=o.data("panel");i?i.show():(i=t.getPanelContentElem(e,{mark:o.data("mark"),selectedColor:r,callback:function(e){om('[type="hidden"]',n).val(e||""),s(n,e),i.hide()}}),o.append(i),o.data("panel",i))})}),a.find("button").on("click",function(){var n=Array.from(a.find("[name]")).reduce(function(e,t){return e[om(t).attr("name")]=om(t).val(),e},{}),r=VB.get(e);"cell"===t.menu&&(null==r?void 0:r.length)?r.forEach(function(t){t.forEach(function(t){jg.setNodes(e,n,{at:t[0][1]})})}):jg.setNodes(e,n,{at:i}),setTimeout(function(){e.focus()})}),a[0]},e.prototype.getPanelContentElem=function(e,t){var n=t.mark,r=t.selectedColor,o=t.callback,i=om('<ul class="w-e-panel-content-color"></ul>');i.on("click","li",function(e){var t=e.target;if(t){e.preventDefault(),e.stopPropagation();var n=om(t).attr("data-value");o(n)}});var a=e.getMenuConfig(n).colors;(void 0===a?[]:a).forEach(function(e){var t=om('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=om('<li data-value="'.concat(e,'"></li>'));r===e&&n.addClass("active"),n.append(t),i.append(n)});var s="";"color"===n&&(s=ZE("tableModule.color.default")),"bgColor"===n&&(s=ZE("tableModule.color.clear"));var u=om('\n <li data-value="" class="clear">\n '.concat(LB,"\n ").concat(s,"\n </li>\n "));i.prepend(u);var l=om('<div class="w-e-drop-panel"></div>');return l.append(i),l},e}(),qB=function(e){function t(){var t=e.apply(this,ev([],Qg(arguments),!1))||this;return t.title=ZE("tableModule.cellProperty"),t.iconSvg='<svg viewBox="0 0 20 20"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',t.tag="button",t.showModal=!0,t.modalWidth=300,t.menu="cell",t}return Kg(t,e),t.prototype.getModalContentNode=function(e){return Qg(Kh.nodes(e,{match:MB(e,"td")}),1)[0]},t}(GB),KB=function(){function e(){this.title=ZE("tableModule.deleteCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 510.976L393.216 445.44v-13.1072L327.68 366.7968V510.976z m327.68-78.4384l65.536-65.536V507.904L655.36 442.368v-9.8304z m393.216 484.9664V0H0v917.504h1048.576z m-65.536-131.072h-262.144v-52.4288l-13.1072 13.1072-52.4288-52.4288v91.7504H393.216v-91.7504l-52.4288 52.4288-13.1072-13.1072v52.4288H65.536V65.536H327.68v121.2416l36.0448-36.0448 29.4912 29.4912V62.2592h262.144V180.224l49.152-49.152 16.384 16.384V62.2592h262.144V786.432z m-294.912-108.1344l-160.5632-160.5632-167.1168 167.1168-78.6432-78.6432 167.1168-167.1168L288.3584 278.528l78.6432-78.6432 160.5632 160.5632 163.84-163.84 78.6432 78.6432-163.84 163.84 160.5632 160.5632-78.6432 78.6432z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!fg.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table-cell"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Qg(Kh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),r=Qg(n[0],2),o=r[0],i=r[1],a=Iy.getParentNode(e,o),s=(null==a?void 0:a.children.length)||0;if(!a||s<=1)jg.removeNodes(e,{mode:"highest"});else if(null!=Iy.getParentNode(e,a)){var u=HB(e),l=0;e:for(var c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=Qg(u[c][d],1),p=Qg(f[0],2)[1];if(og.equals(i,p)){l=d;break e}}Kh.withoutNormalizing(e,function(){for(var t,n,r=0;r<u.length;r+=1){var o=Qg(u[r][l],2),i=Qg(o[0],1)[0].hidden,a=o[1],s=a.rtl,c=a.ltr;if(s>1||c>1){var d=Qg(u[r][l-(s-1)],1),f=Qg(d[0],2),p=f[0],h=p.rowSpan,g=void 0===h?1:h,v=p.colSpan,m=void 0===v?1:v,y=f[1];if(i)jg.setNodes(e,{rowSpan:g,colSpan:Math.max(m-1,1)},{at:y});else{var b=Qg(u[r][l+1],1),E=Qg(b[0],2)[1];jg.setNodes(e,{rowSpan:g,colSpan:m-1,hidden:!1},{at:E});try{for(var C=(t=void 0,Jg(eg.children(e,y,{reverse:!0}))),D=C.next();!D.done;D=C.next()){var w=Qg(D.value,2)[1];jg.moveNodes(e,{to:ev(ev([],Qg(E),!1),[0],!1),at:w})}}catch(e){t={error:e}}finally{try{D&&!D.done&&(n=C.return)&&n.call(C)}finally{if(t)throw t.error}}}}}for(r=0;r<u.length;r+=1){var A=Qg(u[r][l],1);y=Qg(A[0],2)[1];jg.removeNodes(e,{at:y})}var S=Qg(Kh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table")},universal:!0}),1),x=S[0];if(x){var O=Qg(x,2),N=O[0],B=O[1],T=N.columnWidths,k=ev([],Qg(void 0===T?[]:T),!1);k.splice(l,1),jg.setNodes(e,{columnWidths:k},{at:B})}})}}},e}(),YB=function(){function e(){this.title=ZE("tableModule.deleteRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M907.6736 586.5472L747.1104 425.984l163.84-163.84-78.6432-78.6432-163.84 163.84L507.904 186.7776 429.2608 262.144l163.84 163.84-167.1168 167.1168 78.6432 78.6432 167.1168-167.1168 160.5632 160.5632 75.3664-78.6432zM0 917.504V0h1048.576v917.504H0z m983.04-327.68h-22.9376l-65.536-65.536H983.04V327.68h-91.7504l65.536-65.536h26.2144V65.536H65.536v196.608h317.8496l65.536 65.536H65.536v196.608h380.1088l-65.536 65.536H65.536v196.608H983.04v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!fg.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table-row"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Qg(Kh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-row")},universal:!0}),1),r=Qg(n[0],2),o=r[0],i=r[1],a=Iy.getParentNode(e,o);if(((null==a?void 0:a.children.length)||0)<=1)jg.removeNodes(e,{mode:"highest"});else{var s=Qg(Kh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),u=Qg(s[0],2)[1],l=HB(e),c=0;e:for(var d=0;d<l.length;d+=1)for(var f=0;f<l[d].length;f+=1){var p=Qg(l[d][f],1),h=Qg(p[0],2)[1];if(og.equals(u,h)){c=d;break e}}Kh.withoutNormalizing(e,function(){for(var t,n,r=0;r<l[c].length;r+=1){var o=Qg(l[c][r],2),a=Qg(o[0],1)[0].hidden,s=o[1],u=s.ttb,d=s.btt;if(u>1||d>1){var f=Qg(l[c-(u-1)][r],1),p=Qg(f[0],2),h=p[0],g=h.rowSpan,v=void 0===g?1:g,m=h.colSpan,y=void 0===m?1:m,b=p[1];if(a)jg.setNodes(e,{rowSpan:Math.max(v-1,1),colSpan:y},{at:b});else{var E=Qg(l[c+1][r],1),C=Qg(E[0],2)[1];jg.setNodes(e,{rowSpan:v-1,colSpan:y,hidden:!1},{at:C});try{for(var D=(t=void 0,Jg(eg.children(e,b,{reverse:!0}))),w=D.next();!w.done;w=D.next()){var A=Qg(w.value,2)[1];jg.moveNodes(e,{to:ev(ev([],Qg(C),!1),[0],!1),at:A})}}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=D.return)&&n.call(D)}finally{if(t)throw t.error}}}}}jg.removeNodes(e,{at:i})})}}},e}(),XB=function(){function e(){this.title=ZE("tableModule.deleteTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==Iy.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){this.isDisabled(e)||jg.removeNodes(e,{mode:"highest"})},e}(),ZB=function(){function e(){this.title=ZE("tableModule.widthAuto"),this.iconSvg='<svg viewBox="0 0 1228 1024"><path d="M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=Iy.getSelectedNodeByType(e,"table");return null!=t&&"100%"===t.width},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!fg.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n={width:t?"auto":"100%"};jg.setNodes(e,n,{mode:"highest"})}},e}();function JB(e){var t=e.children||[];return 0===t.length?[]:(t[0]||{}).children||[]}function QB(e){return JB(e).every(function(e){return!!e.isHeader})}var eT=function(){function e(){this.title=ZE("tableModule.insertCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 193.3312v186.7776H140.9024v91.7504H327.68v186.7776h88.4736V471.8592h190.0544V380.1088H416.1536V193.3312zM0 917.504V0h1048.576v917.504H0zM655.36 65.536H65.536v720.896H655.36V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 262.144h-262.144v196.608h262.144V327.68z m0 262.144h-262.144v196.608h262.144v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!fg.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Qg(Kh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),r=Qg(n[0],2),o=r[0],i=r[1],a=Iy.getParentNode(e,o);if(null!=a){var s=Iy.getParentNode(e,a);if(null!=s){for(var u=HB(e),l=0,c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=Qg(u[c][d],1),p=Qg(f[0],2)[1];if(og.equals(i,p)){l=d;break}}Kh.withoutNormalizing(e,function(){for(var t=[],n=0;n<u.length;n+=1){var r=Qg(u[n][l],2)[1],o=r.ltr,i=r.rtl;if(o>1||i>1){if(1===i)continue;var a=Qg(u[n][l-(i-1)],1),c=Qg(a[0],2),d=c[0],f=c[1],p=d.colSpan||1;t.push(n),d.hidden||jg.setNodes(e,{colSpan:p+1},{at:f})}}for(n=0;n<u.length;n+=1){var h={type:"table-cell",hidden:t.includes(n),children:[{text:""}]};0===n&&QB(s)&&(h.isHeader=!0);var g=Qg(u[n][l],1),v=Qg(g[0],2)[1];jg.insertNodes(e,h,{at:v})}var m=Qg(Kh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table")},universal:!0}),1),y=m[0];if(y){var b=Qg(y,2),E=b[0],C=b[1],D=E.columnWidths,w=ev([],Qg(void 0===D?[]:D),!1),A=e.getMenuConfig("insertTable").minWidth,S=void 0===A?60:A;w.splice(l,0,parseInt(S,10)||60),jg.setNodes(e,{columnWidths:w},{at:C})}})}}}},e}(),tT=function(){function e(){this.title=ZE("tableModule.insertRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M707.7888 521.0112h-147.456v-147.456H488.2432v147.456h-147.456v68.8128h147.456v147.456h72.0896v-147.456h147.456zM0 917.504V0h1048.576v917.504H0zM327.68 65.536H65.536v196.608H327.68V65.536z m327.68 0H393.216v196.608h262.144V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 258.8672H65.536v462.0288H983.04V324.4032z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!fg.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Qg(Kh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),r=Qg(n[0],2),o=r[0],i=r[1],a=Iy.getParentNode(e,o),s=(null==a?void 0:a.children.length)||0;if(0!==s){var u=HB(e),l=0;e:for(var c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=Qg(u[c][d],1),p=Qg(f[0],2)[1];if(og.equals(i,p)){l=c;break e}}Kh.withoutNormalizing(e,function(){for(var t=l+1,n=t>=0&&t<u.length,r=[],o=0;n&&o<u[l].length;o+=1){var a=Qg(u[l][o],2)[1],c=a.ttb,d=a.btt;if(c>1||d>1){if(1===d)continue;var f=Qg(u[l-(c-1)][o],1),p=Qg(f[0],2),h=p[0],g=p[1],v=h.rowSpan||1;r.push(o),h.hidden||jg.setNodes(e,{rowSpan:v+1},{at:g})}}for(var m={type:"table-row",children:[]},y=0;y<s;y+=1){var b={type:"table-cell",hidden:r.includes(y),children:[{text:""}]};m.children.push(b)}var E=og.parent(i),C=og.next(E);jg.insertNodes(e,m,{at:C})})}}},e}();var nT=function(){function e(){this.title=ZE("tableModule.insertTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!fg.isCollapsed(t)||!!Iy.getSelectedElems(e).some(function(t){var n=Iy.getNodeType(t);return"pre"===n||("table"===n||("list-item"===n||!!e.isVoid(t)))}))},e.prototype.getPanelContentElem=function(e){var t=this;if(this.$content)return this.$content[0];for(var n=om('<div class="w-e-panel-content-table"></div>'),r=om("<span>0 × 0</span>"),o=om("<table></table>"),i=0;i<10;i+=1){for(var a=om("<tr></tr>"),s=0;s<10;s+=1){var u=om("<td></td>");u.attr("data-x",s.toString()),u.attr("data-y",i.toString()),a.append(u),u.on("mouseenter",function(e){var t=e.target;if(null!=t){var n=om(t).dataset(),i=n.x,a=n.y;r[0].innerHTML="".concat(i+1," × ").concat(a+1),o.children().each(function(e){om(e).children().each(function(e){var t=om(e),n=t.dataset(),r=n.x,o=n.y;r<=i&&o<=a?t.addClass("active"):t.removeClass("active")})})}}),u.on("click",function(n){n.preventDefault();var r=n.target;if(null!=r){var o=om(r).dataset(),i=o.x,a=o.y;t.insertTable(e,a+1,i+1)}})}o.append(a)}return n.append(o),n.append(r),this.$content=n,n[0]},e.prototype.insertTable=function(e,t,n){var r=parseInt(t,10),o=parseInt(n,10);if(r&&o&&!(r<=0||o<=0)){if(Iy.isSelectedEmptyParagraph(e)&&jg.removeNodes(e,{mode:"highest"}),0===e.children.length){jg.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var i=function(e,t,n){for(var r,o=[],i=e.getMenuConfig("insertTable"),a=i.minWidth,s=void 0===a?60:a,u=i.tableFullWidth,l=i.tableHeader,c=Array(n).fill(parseInt(s,10)||60),d=0;d<t;d+=1){for(var f=[],p=0;p<n;p+=1){var h={type:"table-cell",children:[{text:""}]};0===d&&(h.isHeader=null===(r=null==l?void 0:l.selected)||void 0===r||r),f.push(h)}o.push({type:"table-row",children:f})}return{type:"table",width:(null==u?void 0:u.selected)?"100%":"auto",children:o,columnWidths:c}}(e,r,o);jg.insertNodes(e,i,{mode:"highest"})}},e}(),rT={isInTable:function(e,t){return void 0===t&&(t={}),!!Qg(Kh.nodes(e,{match:MB(e,"table"),at:t.at}),1)[0]},selection:function(e){var t,n,r,o,i,a,s,u;return Zg(this,function(l){switch(l.label){case 0:t=VB.get(e),n=0,l.label=1;case 1:if(!(t&&n<t.length))return[3,4];for(r=[],o=0;o<t[n].length;o+=1)i=Qg(t[n][o],2),a=i[0],s=i[1],u=s.ltr,1===s.ttb&&r.push(a),o+=u-1;return[4,r];case 2:l.sent(),l.label=3;case 3:return n+=1,[3,1];case 4:return[2]}})},unselect:function(e){WB.delete(e),VB.delete(e)},isSelected:function(e,t){var n=WB.get(e);return!!n&&n.has(t)}},oT=function(){function e(){this.title=ZE("tableModule.mergeCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M482.2 508.4 331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4c2.4-1.8 2.4-5.4 0-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4c-2.3 1.8-2.3 5.3 0 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"/></svg>',this.tag="button"}return e.prototype.needKeepCell=function(e,t){var n=Qg(eg.children(e,t),2)[1],r=Kh.parent(e,t)[0].children.length>1;return!!n||r},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return!this.canMerge(e)},e.prototype.exec=function(e,t){this.isDisabled(e)||(this.merge(e),rT.unselect(e))},e.prototype.canMerge=function(e){var t=VB.get(e);if(!t||!t.length)return!1;var n=Qg(t[t.length-1][t[t.length-1].length-1],1),r=Qg(n[0],2)[1],o=Qg(t[0][0],1);return!!jB(e,[Qg(o[0],2)[1],r],"table")},e.prototype.merge=function(e){var t=this;if(this.canMerge(e)){var n=VB.get(e);if(n&&n.length){var r=Qg(n[0][0],1),o=Qg(r[0],2)[1],i=Qg(eg.children(e,o,{reverse:!0}),1),a=Qg(i[0],2)[1];Kh.withoutNormalizing(e,function(){for(var r,i,s=0,u=0,l=n.length-1;l>=0;l-=1,s+=1){u=0;for(var c=n[l].length-1;c>=0;c-=1,u+=1){var d=Qg(n[l][c],2),f=Qg(d[0],2)[1],p=d[1].ttb;if(!(og.equals(o,f)||p>1)){try{for(var h=(r=void 0,Jg(eg.children(e,f,{reverse:!0}))),g=h.next();!g.done;g=h.next()){var v=Qg(g.value,2)[1];jg.moveNodes(e,{to:og.next(a),at:v})}}catch(e){r={error:e}}finally{try{g&&!g.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}var m=Qg(Kh.nodes(e,{match:MB(e,"tr"),at:f}),1),y=Qg(m[0],2)[1];t.needKeepCell(e,y)&&jg.setNodes(e,{hidden:!0},{at:f})}}}jg.setNodes(e,{rowSpan:s,colSpan:u},{at:o})})}}},e}(),iT=function(){function e(){this.title=ZE("tableModule.splitCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M362.667 494.933v53.334l25.6-25.6zm0-241.066L460.8 352V78.933H57.6v98.134h305.067zm0 535.466v57.6H57.6v98.134h403.2V691.2zM661.333 494.933v53.334l-25.6-25.6zm0-241.066L563.2 352V78.933h403.2v98.134H661.333zm0 535.466v57.6H966.4v98.134H563.2V691.2z"/><path d="M753.067 341.333 693.333 281.6 512 460.8 330.667 281.6l-59.734 59.733 181.334 181.334L270.933 704l59.734 59.733L512 582.4l181.333 181.333L753.067 704 571.733 522.667z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=Qg(Kh.nodes(e,{match:MB(e,"td")}),1),n=Qg(t[0],1)[0],r=n.rowSpan,o=void 0===r?1:r,i=n.colSpan;return!(o>1||(void 0===i?1:i)>1)},e.prototype.exec=function(e,t){this.isDisabled(e)||this.split(e)},e.prototype.split=function(e,t){void 0===t&&(t={});var n=Qg(Kh.nodes(e,{match:MB(e,"table","th","td"),at:t.at}),2),r=n[0],o=n[1];if(r&&o){var i=VB.get(e)||[],a=HB(e,{at:t.at});Kh.withoutNormalizing(e,function(){for(var n=a.length-1;n>=0;n-=1)for(var r=a[n].length-1;r>=0;r-=1){var s=Qg(a[n][r],2),u=Qg(s[0],2)[1],l=s[1],c=l.ltr,d=l.rtl,f=l.btt,p=l.ttb;if(d>1)r-=d-2;else if(!(p>1||1===f&&1===c)){var h=!!t.all;if(i.length)e:for(var g=0;!t.all&&g<i.length;g+=1)for(var v=0;v<i[g].length;v+=1){var m=Qg(i[g][v],1),y=Qg(m[0],2)[1];if(og.equals(y,u)){h=!0;break e}}else{y=Qg(o,2)[1];og.equals(y,u)&&(h=!0)}if(h){e:for(var b=1;b<f;b+=1)for(g=r;g>=0;g-=1){if(1!==Qg(a[n+b][g],2)[1].ttb){for(var E=0;E<c;E+=1){var C=Qg(a[n+b][g+E],1),D=Qg(C[0],2)[1];jg.unsetNodes(e,["hidden","colSpan","rowSpan"],{at:D})}continue e}}for(E=1;E<c;E+=1){var w=Qg(a[n][r+E],1);D=Qg(w[0],2)[1];jg.unsetNodes(e,["hidden","colSpan","rowSpan"],{at:D})}jg.setNodes(e,{rowSpan:1,colSpan:1},{at:u})}}}})}},e}(),aT=function(){function e(){this.title=ZE("tableModule.header"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 128l-64 0L384 128 320 128 0 128l0 256 0 64 0 192 0 64 0 256 320 0 64 0 256 0 64 0 320 0 0-256 0-64L1024 448 1024 384 1024 128 704 128zM640 640 384 640 384 448l256 0L640 640zM64 448l256 0 0 192L64 640 64 448zM320 896 64 896l0-192 256 0L320 896zM640 896 384 896l0-192 256 0L640 896zM960 896l-256 0 0-192 256 0L960 896zM960 640l-256 0L704 448l256 0L960 640z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=Iy.getSelectedNodeByType(e,"table");return null!=t&&QB(t)},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!fg.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=!t,r=Iy.getSelectedNodeByType(e,"table");if(null!=r)JB(r).forEach(function(t){return jg.setNodes(e,{isHeader:n},{at:Iy.findPath(e,t)})})}},e}(),sT={key:"insertTable",factory:function(){return new nT}},uT={key:"deleteTable",factory:function(){return new XB}},lT={key:"insertTableRow",factory:function(){return new tT}},cT={key:"deleteTableRow",factory:function(){return new YB}},dT={key:"insertTableCol",factory:function(){return new eT}},fT={key:"deleteTableCol",factory:function(){return new KB}},pT={key:"tableHeader",factory:function(){return new aT}},hT={key:"tableFullWidth",factory:function(){return new ZB}},gT={key:"mergeTableCell",factory:function(){return new oT}},vT={key:"splitTableCell",factory:function(){return new iT}},mT={key:"setTableProperty",factory:function(){return new GB}},yT={key:"setTableCellProperty",factory:function(){return new qB}};var bT={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=om(e);0===(t=t.filter(function(e){return"paragraph"===Iy.getNodeType(e)||(!!Cg.isText(e)||!!n.isInline(e))})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=parseInt(r.attr("colSpan")||"1",10),i=parseInt(r.attr("rowSpan")||"1",10),a="none"===UB(r,"display"),s=r.attr("width")||"auto";return{type:"table-cell",isHeader:"th"===$B(r),colSpan:o,rowSpan:i,width:s,children:t,hidden:a}}};var ET={selector:"tr:not([data-w-e-type])",parseElemHtml:function(e,t,n){for(var r=[],o=0;o<t.length;o+=1){var i=t[o];if("table-cell"===Iy.getNodeType(i)){var a=i,s=a.colSpan||1;r.push(a);for(var u=1;u<s;u+=1){var l=t[o+u];l&&"table-cell"===Iy.getNodeType(l)&&l.hidden||r.push({type:"table-cell",children:[{text:""}],hidden:!0})}}}return{type:"table-row",children:r}}};var CT,DT={selector:"table:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r,o,i=om(e),a="auto";"100%"===UB(i,"width")&&(a="100%"),"100%"===i.attr("width")&&(a="100%");var s={type:"table",width:a,height:parseInt(UB(i,"height")||"0",10),children:t.filter(function(e){return"table-row"===Iy.getNodeType(e)})},u=(null===(r=i.find("tr")[0])||void 0===r?void 0:r.children)||[],l=(null===(o=i.find("colgroup")[0])||void 0===o?void 0:o.children)||null,c=t[t.length-1].children.length;if(l&&l.length===c)s.columnWidths=Array.from(l).map(function(e){return parseInt(e.getAttribute("width"),10)});else if(u.length>0){var d=[];Array.from(u).forEach(function(e){var t=parseInt(om(e).attr("colSpan")||"1",10),n=parseInt(UB(om(e),"width")||"90",10);d.push(n);for(var r=1;r<t;r+=1)d.push(90)}),s.columnWidths=d}return s}},wT=null===(CT=null===window||void 0===window?void 0:window.getComputedStyle(document.documentElement))||void 0===CT?void 0:CT.getPropertyValue("--w-e-textarea-border-color");function AT(e){var t=e.selection;if(null==t)return!1;var n=Qg(Kh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")}}),1),r=n[0];if(r){var o=Qg(r,2)[1],i=Kh.start(e,o);if(ug.equals(t.anchor,i))return!0}return!1}function ST(e,t){var n=t.offset;if(0===n)return!1;var r=Kh.node(e,t);if(!Cg.isText(r[0]))return!1;var o=eg.string(r[0]);return!(n>=o.length)&&("\n"===o[n-1]&&"\r"===o[n])}function xT(e,t,n){var r=e.selection;if(null==r||"line"===t)return!1;var o=Qg(Kh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")}}),1),i=o[0],a=r.anchor;if("backward"===n&&0===r.anchor.offset&&(a=Kh.before(e,r)),"forward"===n&&Kh.isEnd(e,r.anchor,r.anchor.path)&&(a=Kh.after(e,r)),null==a)return!1;var s=Kh.above(e,{at:a,match:function(e){return Iy.checkNodeType(e,"table-cell")}});if(null==s||null==i||!og.equals(s[1],i[1]))return!1;var u=Kh.node(e,a);if(!Cg.isText(u[0])||u[0].text.length<2)return!1;var l="backward"===n?[a.offset-2,a.offset]:[a.offset,a.offset+2],c=eg.string(u[0]);return"\n\r"===c.slice.apply(c,ev([],Qg(l),!1))?(jg.insertText(e,c.slice(0,l[0])+c.slice(l[1]),{at:{anchor:Kh.start(e,a.path),focus:Kh.end(e,a.path)}}),!0):!!ST(e,a)&&(jg.insertText(e,c.slice(0,r.anchor.offset-1)+c.slice(r.anchor.offset+1),{at:{anchor:Kh.start(e,a.path),focus:Kh.end(e,a.path)}}),!0)}function OT(e,t){var n=Kh.nodes(e,{at:t,match:function(e){return"table"===Iy.getNodeType(e)}});return!!ev([],Qg(n),!1).find(function(){return!0})}var NT={selector:"table",preParseHtml:function(e){var t=om(e);if("table"!==$B(t))return e;var n=t.find("tbody");if(0===n.length)return e;var r=t.find("tr");return t.append(r),n.remove(),t[0]}};function BT(e){var t,n,r=[],o=e.reduce(function(e,t){return e+t},0);try{for(var i=Jg(e),a=i.next();!a.done;a=i.next()){var s=a.value;r.push(s/o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var TT=null;var kT=!1,FT=!1,IT=0,PT=0,_T=null,LT=om(window);LT.on("mousedown",function(e){var t=e.target;if(t.closest('[data-block-type="table-cell"]'))kT=!0;else if("DIV"===t.tagName&&t.closest(".column-resizer-item")){if(null===_T)return;var n=Qg(Kh.nodes(_T,{match:MB(_T,"table")}),1),r=Qg(n[0],1)[0],o=r.columnWidths,i=void 0===o?[]:o,a=r.resizingIndex,s=void 0===a?-1:a;FT=!0;var u=e.clientX;IT=u,PT=i[s],document.body.style.cursor="col-resize",e.preventDefault()}LT.on("mousemove",RT),LT.on("mouseup",MT)});var RT=wC(function(e){if(FT&&null!==_T){e.preventDefault();var t=e.clientX,n=PT+(t-IT);(n=Math.floor(100*n)/100)<30&&(n=30);var r=Qg(Kh.nodes(_T,{match:MB(_T,"table")}),1),o=Qg(r[0],1)[0],i=o.columnWidths,a=void 0===i?[]:i,s=o.resizingIndex,u=void 0===s?-1:s,l=a.reduce(function(e,t){return e+t},0),c=l-a[u],d=document.querySelector(".table-container");d&&n>PT&&c+n>d.clientWidth&&(n=Math.max(30,PT));var f=ev([],Qg(a),!1).map(function(e){return Math.floor(e)});f[u]=n,jg.setNodes(_T,{columnWidths:f},{mode:"highest"})}},100);function MT(e){kT=!1,FT=!1,_T=null,document.body.style.cursor="",LT.off("mousemove",RT),LT.off("mouseup",MT)}function jT(e,t,n,r){if(!e.isDisabled()&&!kT&&!FT){var o=t,i=o.width,a=void 0===i?"auto":i,s=o.columnWidths,u=void 0===s?[]:s,l=o.isHoverCellBorder,c=o.resizingIndex,d=n.clientX,f=n.target;if(Vm(f))if(d>(g=f.getBoundingClientRect()).x+5&&d<g.x+g.width-5)return void(l&&jg.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"}));if(Vm(f)){var p=f.closest(".table");if(p)for(var h=n.clientX,g=p.getBoundingClientRect(),v="100%"===a?BT(u).map(function(e){return e*r}):u,m=function(e){var t,n,r=[],o=0;try{for(var i=Jg(e),a=i.next();!a.done;a=i.next())o+=a.value,r.push(o)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(v),y=0;y<m.length;y+=1)if(h-g.x>=m[y]-5&&h-g.x<m[y]+5){if(c===y)return;return void jg.setNodes(e,{isHoverCellBorder:!0,resizingIndex:y},{mode:"highest"})}}!0===l&&jg.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"})}}function HT(e,t){"mouseenter"===t.type?jg.setNodes(e,{isResizing:!0},{mode:"highest"}):jg.setNodes(e,{isResizing:!1},{mode:"highest"})}var zT={type:"table",renderElem:function(e,t,n){var r=function(e,t){if(e.isDisabled())return!1;var n=e.selection;if(null==n)return!0;if(fg.isCollapsed(n))return!0;var r=n.anchor,o=n.focus,i=Iy.findPath(e,t),a=Kh.start(e,i),s=Kh.end(e,i),u=ug.compare(r,s)<=0&&ug.compare(r,a)>=0,l=ug.compare(o,s)<=0&&ug.compare(o,a)>=0;return!!(u&&l&&og.equals(r.path.slice(0,3),o.path.slice(0,3)))}(n,e),o=e,i=o.width,a=void 0===i?"auto":i,s=o.height,u=o.columnWidths,l=void 0===u?[]:u,c=o.scrollWidth,d=void 0===c?0:c,f=o.isHoverCellBorder,p=o.resizingIndex,h=o.isResizing,g=Iy.isNodeSelected(n,e),v=Qg(rT.selection(n),1)[0],m=BT(l),y=ND("div",{className:"table-container","data-selected":g,on:{mousedown:function(t){if("DIV"===t.target.tagName&&t.preventDefault(),!n.isDisabled()){t.target.closest('[data-block-type="table-cell"]')&&rT.unselect(n);var r=Iy.findPath(n,e),o=Kh.start(n,r),i=n.selection;if(null!=i)i.anchor.path[0]!==r[0]&&"DIV"===t.target.tagName&&n.select(o);else n.select(o)}}}},ND("table",{width:a,contentEditable:r,className:"table ".concat(v?"table-selection-none":""),style:{width:"100%"===a?a:"".concat(l.reduce(function(e,t){return e+t},0),"px")},on:{mousemove:tE(function(t){return jT(n,e,t,d)},25)}},ND("colgroup",{contentEditable:!1},l.map(function(e){return ND("col",{width:e})})),ND("tbody",null,t)),ND("div",{className:"column-resizer",contentEditable:!1},l.map(function(e,t){var r=e;return"100%"===a&&(r=m[t]*d),ND("div",{className:"column-resizer-item",style:{minWidth:"".concat(r,"px")}},ND("div",{className:"resizer-line-hotzone ".concat(f&&t===p?"visible ":"").concat(h&&t===p?"highlight":""),style:{height:"".concat(s,"px")},on:{mouseenter:function(e){return HT(n,e)},mouseleave:function(e){return HT(n,e)},mousedown:function(e){return function(e){FT||(_T=e)}(n)}}},ND("div",{className:"resizer-line"})))}))),b=uD("div",{hook:{insert:function(e){var t=e.elm;return function(e,t){if(Vm(t)){var n=t.querySelector("table");n&&(TT=new ResizeObserver(function(t){var n=Qg(t,1)[0].contentRect;jg.setNodes(e,{scrollWidth:n.width,height:n.height},{mode:"highest"})}),TT.observe(n))}}(n,t)},destroy:function(){TT&&(null==TT||TT.disconnect(),TT=null)}}},y);return b}},$T={type:"table-row",renderElem:function(e,t,n){return ND("tr",null,t)}},UT={type:"table-cell",renderElem:function(e,t,n){var r=function(e,t){var n=Iy.getParentNode(e,t);if(null==n)return!1;var r=Iy.getParentNode(e,n);return null!=r&&JB(r).some(function(e){return e===t})}(n,e),o=e,i=o.colSpan,a=void 0===i?1:i,s=o.rowSpan,u=void 0===s?1:s,l=o.isHeader,c=void 0!==l&&l,d=o.hidden,f=void 0!==d&&d,p=rT.isSelected(n,e);return ND(r&&c?"th":"td",{colSpan:a,rowSpan:u,"data-block-type":"table-cell",className:p?"w-e-selected":"",style:{display:f?"none":""}},t)}};function VT(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var WT={renderStyle:function(e,t){var n,r;if(!$h.isElement(e))return t;var o=e,i=o.backgroundColor,a=o.borderWidth,s=o.borderStyle,u=o.borderColor,l=o.textAlign,c={};i&&(c.backgroundColor=i),a&&(c.borderWidth="".concat(a,"px")),s&&(c.borderStyle="none"===s?"":s),u&&(c.borderColor=u),l&&(c.textAlign=l);var d=t;return"table"===e.type?VT(null===(r=(null===(n=d.children)||void 0===n?void 0:n[0]).children)||void 0===r?void 0:r[0],c):VT(d,c),d},styleToHtml:function(e,t){if("table"!==e.type&&"table-cell"!==e.type)return t;var n=e.backgroundColor,r=e.borderWidth,o=e.borderStyle,i=e.borderColor,a=e.textAlign;if(!(n||r||o||i||a))return t;var s=om(t);return n&&s.css("background-color",n),r&&s.css("border-width","".concat(r,"px")),o&&s.css("border-style","none"===o?"":o),i&&s.css("border-color",i),a&&s.css("text-align",a),function(e){return 0===e.length?"":e[0].outerHTML}(s)},parseStyleHtml:function(e,t,n){if(!["TABLE","TD","TH"].includes(e.tagName))return t;var r=om(e),o=t,i=UB(r,"background-color");i||(i=UB(r,"background")),i&&(o.backgroundColor=i);var a=UB(r,"border");a||"TD"!==e.tagName||(a="1px solid ".concat(wT));var s=Qg((null==a?void 0:a.split(" "))||[],3),u=s[0],l=s[1],c=s[2];(u=UB(r,"border-width")||u)&&(o.borderWidth=u.replace(/[^\d]/g,"")),(l=UB(r,"border-style")||l)&&(o.borderStyle="none"===l?"":l),(c=UB(r,"border-color")||c)&&(o.borderColor=c);var d=UB(r,"text-align");return(d=UB(r,"text-align")||d)&&(o.textAlign=d),t},renderElems:[zT,$T,UT],elemsToHtml:[IB,PB,_B],preParseHtml:[NT],parseElemsHtml:[bT,ET,DT],menus:[sT,uT,lT,cT,dT,fT,pT,hT,gT,vT,mT,yT],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward,r=e.deleteForward,o=e.deleteFragment,i=e.normalizeNode,a=e.insertData,s=e.handleTab,u=e.selectAll,l=e;l.insertBreak=function(){null==Iy.getSelectedNodeByType(l,"table")?t():l.insertText("\n\r")},l.deleteBackward=function(e){if(!AT(l)&&!xT(l,e,"backward")){var t=l.selection;if(t){var r=Kh.before(l,t),o=Kh.above(l,{at:t,match:function(e){return Iy.checkNodeType(e,"table-cell")}});if(r){var i=OT(l,r);if(!o&&i&&Iy.getSelectedNodeByType(l,"paragraph"))return}}n(e)}},l.handleTab=function(){var t;if(Iy.getSelectedNodeByType(l,"table")){var n=Kh.above(e);Iy.checkNodeType(n[0],"table-cell")&&jg.select(e,n[1]);var r=Kh.next(e);if(r)r[0]&&r[0].text&&(r=null!==(t=Kh.above(e,{at:r[1]}))&&void 0!==t?t:r),jg.select(e,r[1]);else{var o=l.children||[],i=o.length;if(Iy.checkNodeType(o[i-1],"table")){var a=Iy.genEmptyParagraph();jg.insertNodes(l,a,{at:[i]}),l.handleTab()}}}else s()},l.deleteForward=function(e){if(!AT(l)&&!xT(l,e,"forward")){var t=l.selection;if(t){var n=Kh.after(l,t),o=Kh.above(l,{at:t,match:function(e){return Iy.checkNodeType(e,"table-cell")}});if(n){var i=OT(l,n);if(!o&&i&&Iy.getSelectedNodeByType(l,"paragraph"))return}}r(e)}},l.deleteFragment=function(e){var t=l.selection;if(t){var n,r=!1,i={anchor:t.anchor,focus:t.focus},a=ug.isBefore(i.anchor,i.focus);if(ST(l,t.anchor))(n=Kh[a?"before":"after"](l,t.anchor))&&(i.anchor=n),r=!0;if(ST(l,t.focus))(n=Kh[a?"after":"before"](l,t.focus))&&(i.focus=n),r=!0;r&&jg.setSelection(l,i),o(e)}},l.normalizeNode=function(e){var t=Qg(e,2),n=t[0],r=t[1];if("table"!==Iy.getNodeType(n))return i([n,r]);if(Iy.isLastNode(l,n)){var o=Iy.genEmptyParagraph();jg.insertNodes(l,o,{at:[r[0]+1]})}},l.insertData=function(e){if(null!=Iy.getSelectedNodeByType(l,"table")){var t=e.getData("text/plain");"\n"===t||/<img[^>]+>/.test(e.getData("text/html"))?a(e):Kh.insertText(l,t)}else a(e)},l.selectAll=function(){var e=l.selection;if(null!=e){var t=Iy.getSelectedNodeByType(l,"table-cell");if(null!=t){var n=e.anchor,r=e.focus;if(og.equals(n.path.slice(0,3),r.path.slice(0,3)))if(0!==eg.string(t).length){var o=Iy.findPath(l,t),i={anchor:Kh.start(l,o),focus:Kh.end(l,o)};l.select(i)}else u();else u()}else u()}else u()},function(e){var t=e.apply;e.apply=function(n){if(!rg.isSelectionOperation(n)||!n.newProperties)return t(n);var r=Yg(Yg({},e.selection),n.newProperties);if(!fg.isRange(r))return rT.unselect(e),t(n);var o=Qg(Kh.nodes(e,{match:MB(e,"th","td"),at:fg.start(r)}),1)[0],i=Qg(Kh.nodes(e,{match:MB(e,"th","td"),at:fg.end(r)}),1)[0];if(!o||!i)return rT.unselect(e),t(n);var a=Qg(o,2)[1],s=Qg(i,2)[1];if(og.equals(a,s)||!jB(e,[a,s],"table"))return rT.unselect(e),t(n);for(var u=HB(e,{at:a}),l=zB.valueOf(0,0),c=zB.valueOf(0,0),d=0;d<u.length;d+=1)for(var f=0;f<u[d].length;f+=1){var p=Qg(u[d][f],1),h=Qg(p[0],2)[1];if(og.equals(a,h)&&(l.x=d,l.y=f),og.equals(s,h)){c.x=d,c.y=f;break}}for(var g=zB.valueOf(Math.min(l.x,c.x),Math.min(l.y,c.y)),v=zB.valueOf(Math.max(l.x,c.x),Math.max(l.y,c.y));;){var m=zB.valueOf(g.x,g.y),y=zB.valueOf(v.x,v.y);for(d=m.x;d<=y.x;d+=1)for(f=m.y;f<=y.y;f+=1){var b=Qg(u[d][f],2)[1],E=b.rtl,C=b.ltr,D=b.btt,w=b.ttb;m.x=Math.min(m.x,d-(w-1)),m.y=Math.min(m.y,f-(E-1)),y.x=Math.max(y.x,d+(D-1)),y.y=Math.max(y.y,f+(C-1))}if(zB.equals(g,m)&&zB.equals(v,y))break;g=m,v=y}var A=[],S=new WeakSet;for(d=g.x;d<=v.x;d+=1){var x=[];for(f=g.y;f<=v.y;f+=1){var O=Qg(u[d][f],1),N=Qg(O[0],1)[0];S.add(N),x.push(u[d][f])}A.push(x)}VB.set(e,A),WB.set(e,S),t(n)}}(l),l.getTableSelection=function(){return VB.get(l)||null};var c=l.addMark,d=l.removeMark,f=Yg({},jg);return l.addMark=function(e,t){var n=VB.get(l);if(n&&n.length>0){var r=l.selection;n.forEach(function(n){n.forEach(function(n){var r=Qg(n[0],2)[1],o=Kh.start(l,r),i=Kh.end(l,r);jg.select(l,{anchor:o,focus:i}),c(e,t)})}),r&&jg.select(l,r)}else c(e,t)},l.removeMark=function(e){var t=VB.get(l);if(t&&t.length>0){var n=l.selection;t.forEach(function(t){t.forEach(function(t){var n=Qg(t[0],2)[1],r=Kh.start(l,n),o=Kh.end(l,n);jg.select(l,{anchor:r,focus:o}),d(e)})}),n&&jg.select(l,n)}else d(e)},jg.setNodes=function(e,t,n){if(void 0===n&&(n={}),e===l){var r=VB.get(l);if(r&&r.length>0)return void r.forEach(function(r){r.forEach(function(r){var o=Qg(r[0],2)[1];f.setNodes(e,t,Yg(Yg({},n),{at:o}))})})}f.setNodes(e,t,n)},l}};function GT(e){return e.length?e[0].tagName.toLowerCase():""}function qT(e,t,n,r){void 0===t&&(t="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=om(e),i=r.width,a=void 0===i?"":i,s=r.height,u=void 0===s?"":s,l="";return a&&(l+="width: ".concat(a,";")),u&&(l+="height: ".concat(u,";")),o.attr("width",t),o.attr("height",n),o.attr("style",l),o[0].outerHTML}qE("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),qE("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}}),xm&&(om.fn.append=xm),pm&&(om.fn.on=pm),Rm&&(om.fn.focus=Rm),um&&(om.fn.attr=um),fm&&(om.fn.val=fm),wm&&(om.fn.html=wm),Nm&&(om.fn.parent=Nm),sm&&(om.fn.hasClass=sm),Im&&(om.fn.empty=Im);var KT={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,o=void 0===r?"":r,i=n.poster,a=void 0===i?"":i,s=n.width,u=void 0===s?"auto":s,l=n.height,c=void 0===l?"auto":l,d=n.style,f=void 0===d?{}:d,p=n.textAlign,h='<div data-w-e-type="video" data-w-e-is-void style="text-align: '.concat(void 0===p?"center":p,';">\n');if(0===o.trim().indexOf("<iframe ")){h+=qT(o,u,c,f)}else{var g=f.width,v=void 0===g?"":g,m=f.height,y=void 0===m?"":m,b="";v&&(b+="width: ".concat(v,";")),y&&(b+="height: ".concat(y,";")),h+='<video poster="'.concat(a,'" controls="true" width="').concat(u,'" height="').concat(c,'" style="').concat(b,'"><source src="').concat(o,'" type="video/mp4"/></video>')}return h+="\n</div>"}};function YT(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(jm())}function XT(e){var t={};return e.trim().split(";").forEach(function(e){if(e){var n=Qg(e.split(":"),2),r=n[0],o=n[1];r&&o&&(t[r.trim()]=o.trim())}}),t}function ZT(){return YT("w-e-insert-video")}var JT=function(){function e(){this.title=ZE("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=ZT(),this.heightInputId=ZT(),this.buttonId=ZT()}return e.prototype.getSelectedVideoNode=function(e){return Iy.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=Qg(uC(ZE("videoModule.width"),n,"auto"),2),a=i[0],s=om(i[1]),u=Qg(uC(ZE("videoModule.height"),r,"auto"),2),l=u[0],c=om(u[1]),d=Qg(cC(o,ZE("videoModule.ok")),1)[0],f=this.getSelectedVideoNode(e);if(null==this.$content){var p=om("<div></div>");p.on("click","#".concat(o),function(t){t.preventDefault();var o=p.find("#".concat(n)).val().trim(),i=p.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u="auto",l="auto";a(o)?u=o:s(o)&&(u="".concat(parseInt(o,10),"px")),a(i)?l=i:s(i)&&(l="".concat(parseInt(i,10),"px"));var c=f.style,d=void 0===c?{}:c;e.restoreSelection();var h={style:Yg(Yg({},d),{width:u,height:l})};jg.setNodes(e,h,{match:function(e){return Iy.checkNodeType(e,"video")}}),e.hidePanelOrModal()}),this.$content=p}var h=this.$content;if(h.empty(),h.append(a),h.append(l),h.append(d),null==f)return h[0];var g=f.style,v=void 0===g?{}:g,m=v.width,y=void 0===m?"":m,b=v.height,E=void 0===b?"":b;return s.val(y),c.val(E),setTimeout(function(){s.focus()}),h[0]},e}();function QT(){return YT("w-e-edit-video")}var ek=function(){function e(){this.title=ZE("videoModule.edit"),this.iconSvg='<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>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=QT(),this.posterInputId=QT(),this.buttonId=QT()}return e.prototype.getSelectedVideoNode=function(e){return Iy.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=Qg(uC(ZE("videoModule.videoSrc"),r,ZE("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=Qg(uC(ZE("videoModule.videoPoster"),o,ZE("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=om(u),p=om(d),h=Qg(cC(i,ZE("videoModule.ok")),1)[0];if(null==this.$content){var g=om("<div></div>");g.on("click","#".concat(i),function(n){return Xg(t,void 0,void 0,function(){var t,i,a,s;return Zg(this,function(u){return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),a=YT("video-"),s={src:t,poster:i,key:a},e.restoreSelection(),jg.setNodes(e,s,{match:function(e){return Iy.checkNodeType(e,"video")}}),e.hidePanelOrModal(),[2]})})}),this.$content=g}var v=this.$content;v.empty(),v.append(s),v.append(c),v.append(h);var m=this.getSelectedVideoNode(e);if(null==m)return v[0];var y=m.src,b=void 0===y?"":y,E=m.poster,C=void 0===E?"":E;return f.val(b),p.val(C),setTimeout(function(){f.focus()}),v[0]},e}();function tk(e,t){return Xg(this,arguments,void 0,function(e,t,n,r,o){var i,a,s,u,l,c,d;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o=""),Zg(this,function(f){switch(f.label){case 0:return t?(e.restoreSelection(),i=e.getMenuConfig("insertVideo"),a=i.onInsertedVideo,s=i.checkVideo,u=i.parseVideoSrc,[4,s(t,n)]):[2];case 1:return"string"==typeof(l=f.sent())?(e.alert(l,"error"),[2]):null==l?[2]:[4,u(t)];case 2:return 0!==(c=f.sent()).trim().indexOf("<iframe ")&&(c=function(e){return e.replace(/</g,"<").replace(/>/g,">")}(c)),d={type:"video",src:c,poster:n,children:[{text:""}],style:{width:r,height:o}},Promise.resolve().then(function(){Iy.isSelectedEmptyParagraph(e)&&jg.removeNodes(e,{mode:"highest"}),jg.insertNodes(e,d,{mode:"highest"})}),a(d),[2]}})})}function nk(){return YT("w-e-insert-video")}var rk=function(){function e(){this.title=ZE("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=nk(),this.posterInputId=nk(),this.buttonId=nk()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!fg.isCollapsed(t)||!!Iy.getSelectedElems(e).some(function(t){var n=Iy.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))}))},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=Qg(uC(ZE("videoModule.videoSrc"),r,ZE("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=Qg(uC(ZE("videoModule.videoPoster"),o,ZE("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=om(u),p=om(d),h=Qg(cC(i,ZE("videoModule.ok")),1)[0];if(null==this.$content){var g=om("<div></div>");g.on("click","#".concat(i),function(n){return Xg(t,void 0,void 0,function(){var t,i;return Zg(this,function(a){switch(a.label){case 0:return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),[4,tk(e,t,i)];case 1:return a.sent(),e.hidePanelOrModal(),[2]}})})}),this.$content=g}var v=this.$content;return v.empty(),v.append(s),v.append(c),v.append(h),f.val(""),p.val(""),setTimeout(function(){f.focus()}),v[0]},e}();function ok(e){return e.getMenuConfig("uploadVideo")}var ik=new WeakMap;function ak(e,t){return Xg(this,void 0,void 0,function(){var n,r;return Zg(this,function(o){switch(o.label){case 0:return n=function(e){var t=ik.get(e);if(null!=t)return t;var n=ok(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=GS(Yg(Yg({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n){return tk(e,t,n)}),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){var c=l.url,d=void 0===c?"":c,f=l.poster;tk(e,d,void 0===f?"":f),r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),ik.set(e,t),t}(e),r=t.map(function(e){return{name:e.name,type:e.type,size:e.size,data:e}}),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}})})}var sk=function(){function e(){this.title=ZE("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i(function(t,n){return tk(e,t,n)});else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=om("body"),u=om('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",function(){var t=u[0].files;!function(e,t){Xg(this,void 0,void 0,function(){var n,r,o,i,a,s,u,l,c,d,f,p;return Zg(this,function(h){switch(h.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=[],o=ok(e).customUpload,h.label=1;case 1:h.trys.push([1,8,9,14]),i=!0,a=tv(n),h.label=2;case 2:return[4,a.next()];case 3:return s=h.sent(),(c=s.done)?[3,7]:(p=s.value,i=!1,u=p,o?[4,o(u,function(t,n){return tk(e,t,n)})]:[3,5]);case 4:return h.sent(),[3,6];case 5:r.push(u),h.label=6;case 6:return i=!0,[3,2];case 7:return[3,14];case 8:return l=h.sent(),d={error:l},[3,14];case 9:return h.trys.push([9,,12,13]),i||c||!(f=a.return)?[3,11]:[4,f.call(a)];case 10:h.sent(),h.label=11;case 11:return[3,13];case 12:if(d)throw d.error;return[7];case 13:return[7];case 14:return r.length>0?[4,ak(e,r)]:[3,16];case 15:h.sent(),h.label=16;case 16:return[2]}})})}(e,t)})}},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!fg.isCollapsed(t)||!!Iy.getSelectedElems(e).some(function(t){var n=Iy.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))}))},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadVideo")},e}();function uk(e,t,n,r,o,i){return void 0===t&&(t=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),void 0===i&&(i="center"),{type:"video",src:e,poster:t,width:n,height:r,style:o,children:[{text:""}],textAlign:i}}var lk={selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=om(e),o="",i="",a="auto",s="auto",u={},l=r.find("iframe");if(l.length>0)return a=l.attr("width")||"auto",s=l.attr("height")||"auto",u=XT(u=l.attr("style")||""),uk(o=l[0].outerHTML,i,a,s,u,XT(r.attr("style")||"")["text-align"]||"center");var c=r.find("video");return(o=c.attr("src")||"")||c.length>0&&(o=c.find("source").attr("src")||""),a=c.attr("width")||"auto",s=c.attr("height")||"auto",uk(o,i=c.attr("poster")||"",a,s,u=XT(u=c.attr("style")||""),XT(r.attr("style")||"")["text-align"]||"center")}};var ck={selector:"iframe,video,p",preParseHtml:function(e){var t=om(e),n=t;if("p"===GT(t)){var r=t.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=om(o))}}var a=GT(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var s=om('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return s.append(n),s[0]}};var dk={type:"video",renderElem:function(e,t,n){var r,o=e,i=o.src,a=void 0===i?"":i,s=o.poster,u=void 0===s?"":s,l=o.key,c=void 0===l?"":l,d=o.width,f=void 0===d?"auto":d,p=o.height,h=void 0===p?"auto":p,g=o.style,v=void 0===g?{}:g,m=o.textAlign,y=void 0===m?"center":m,b=Iy.isNodeSelected(n,e);if(0===a.trim().indexOf("<iframe ")){r=ND("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y},innerHTML:qT(a,f,h,v)})}else{var E=ND("video",{key:c,poster:u,controls:!0,style:v},ND("source",{src:a,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==f&&(E.data.width=f),"auto"!==h&&(E.data.height=h),r=ND("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y}},E)}var C=uD("div",{props:{contentEditable:!1},on:{mousedown:function(e){return e.preventDefault()}}},r);return C}},fk={renderElems:[dk],elemsToHtml:[KT],preParseHtml:[ck],parseElemsHtml:[lk],menus:[{key:"insertVideo",factory:function(){return new rk},config:{onInsertedVideo:function(e){},checkVideo:function(e,t){return!0},parseVideoSrc:function(e){return e}}},{key:"uploadVideo",factory:function(){return new sk},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name," upload error"),t,n)}}},{key:"editVideoSize",factory:function(){return new JT}},{key:"editVideoSrc",factory:function(){return new ek}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"video"===e.type||t(e)},r.normalizeNode=function(e){var t=Qg(e,2),o=t[0],i=t[1];"video"===Iy.getNodeType(o)&&(Iy.isLastNode(r,o)&&jg.insertNodes(r,Iy.genEmptyParagraph(),{at:[i[0]+1]}));return n([o,i])},r}};qE("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),qE("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});xm&&(om.fn.append=xm),pm&&(om.fn.on=pm),Fm&&(om.fn.remove=Fm),fm&&(om.fn.val=fm),Lm&&(om.fn.click=Lm),ym&&(om.fn.hide=ym);var pk=new WeakMap;function hk(e){return e.getMenuConfig("uploadImage")}function gk(e,t){return Xg(this,void 0,void 0,function(){return Zg(this,function(n){return[2,new Promise(function(n){var r=new FileReader;r.readAsDataURL(t),r.onload=function(){var o=r.result;if(o){var i=o.toString(),a=0===i.indexOf("data:image")?"":i;GO(e,i,t.name,a),n("ok")}}})]})})}function vk(e,t){return Xg(this,void 0,void 0,function(){var n,r;return Zg(this,function(o){switch(o.label){case 0:return n=function(e){var t=pk.get(e);if(null!=t)return t;var n=hk(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=GS(Yg(Yg({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n,r){return GO(e,t,n,r)}),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){if(Array.isArray(l))l.forEach(function(t){var n=t.url,r=void 0===n?"":n,o=t.alt,i=void 0===o?"":o,a=t.href;GO(e,r,i,void 0===a?"":a)});else{var c=l.url,d=void 0===c?"":c,f=l.alt,p=void 0===f?"":f,h=l.href;GO(e,d,p,void 0===h?"":h)}r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),pk.set(e,t),t}(e),r=t.map(function(e){return{name:e.name,type:e.type,size:e.size,data:e}}),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}})})}function mk(e,t){return Xg(this,void 0,void 0,function(){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v;return Zg(this,function(m){switch(m.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=hk(e),o=r.customUpload,i=r.base64LimitSize,a=[],m.label=1;case 1:m.trys.push([1,10,11,16]),s=!0,u=tv(n),m.label=2;case 2:return[4,u.next()];case 3:return l=m.sent(),(p=l.done)?[3,9]:(v=l.value,s=!1,d=(c=v).size,i&&d<=i?[4,gk(e,c)]:[3,5]);case 4:return m.sent(),[3,8];case 5:return o?[4,o(c,function(t,n,r){return GO(e,t,n,r)})]:[3,7];case 6:return m.sent(),[3,8];case 7:a.push(c),m.label=8;case 8:return s=!0,[3,2];case 9:return[3,16];case 10:return f=m.sent(),h={error:f},[3,16];case 11:return m.trys.push([11,,14,15]),s||p||!(g=u.return)?[3,13]:[4,g.call(u)];case 12:m.sent(),m.label=13;case 13:return[3,15];case 14:if(h)throw h.error;return[7];case 15:return[7];case 16:return a.length>0?[4,vk(e,a)]:[3,18];case 17:m.sent(),m.label=18;case 18:return[2]}})})}var yk=function(){function e(){this.title=ZE("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return UO(e)},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadImage")},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i(function(t,n,r){return GO(e,t,n,r)});else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=om("body"),u=om('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",function(){var t=u[0].files;mk(e,t)})}},e}();var bk={menus:[{key:"uploadImage",factory:function(){return new yk},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name,"' upload error"),n)},base64LimitSize:0}}],editorPlugin:function(e){var t=e.insertData,n=e;return n.insertData=function(r){if(UO(n))t(r);else if(r.getData("text/plain"))t(r);else{var o=r.files;if(o.length<=0)t(r);else Array.prototype.slice.call(o).some(function(e){return"image"===Qg(e.type.split("/"),1)[0]})?mk(e,o):t(r)}},n}};qE("en",{highLightModule:{selectLang:"Language"}}),qE("zh-CN",{highLightModule:{selectLang:"选择语言"}});var Ek,Ck={exports:{}};var Dk=(Ek||(Ek=1,function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},o.util.type(t)){case"Object":if(i=o.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=o.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach(function(t,o){r[o]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e],a={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var u in n)n.hasOwnProperty(u)&&(a[u]=n[u]);n.hasOwnProperty(s)||(a[s]=i[s])}var l=r[e];return r[e]=a,o.languages.DFS(o.languages,function(t,n){n===l&&t!=e&&(this[t]=a)}),a},DFS:function e(t,n,r,i){i=i||{};var a=o.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var u=t[s],l=o.util.type(u);"Object"!==l||i[a(u)]?"Array"!==l||i[a(u)]||(i[a(u)]=!0,e(u,n,s,i)):(i[a(u)]=!0,e(u,n,null,i))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,a=0;i=r.elements[a++];)o.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=o.util.getLanguage(t),a=o.languages[i];o.util.setLanguage(t,i);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&o.util.setLanguage(s,i);var u={element:t,language:i,grammar:a,code:t.textContent};function l(e){u.highlightedCode=e,o.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,o.hooks.run("after-highlight",u),o.hooks.run("complete",u),r&&r.call(u.element)}if(o.hooks.run("before-sanity-check",u),(s=u.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!u.code)return o.hooks.run("complete",u),void(r&&r.call(u.element));if(o.hooks.run("before-highlight",u),u.grammar)if(n&&e.Worker){var c=new Worker(o.filename);c.onmessage=function(e){l(e.data)},c.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else l(o.highlight(u.code,u.grammar,u.language));else l(o.util.encode(u.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new u;return l(o,o.head,e),s(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function s(e,t,n,r,u,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var h=0;h<p.length;++h){if(d&&d.cause==f+","+h)return;var g=p[h],v=g.inside,m=!!g.lookbehind,y=!!g.greedy,b=g.alias;if(y&&!g.pattern.global){var E=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,E+"g")}for(var C=g.pattern||g,D=r.next,w=u;D!==t.tail&&!(d&&w>=d.reach);w+=D.value.length,D=D.next){var A=D.value;if(t.length>e.length)return;if(!(A instanceof i)){var S,x=1;if(y){if(!(S=a(C,w,e,m))||S.index>=e.length)break;var O=S.index,N=S.index+S[0].length,B=w;for(B+=D.value.length;O>=B;)B+=(D=D.next).value.length;if(w=B-=D.value.length,D.value instanceof i)continue;for(var T=D;T!==t.tail&&(B<N||"string"==typeof T.value);T=T.next)x++,B+=T.value.length;x--,A=e.slice(w,B),S.index-=w}else if(!(S=a(C,0,A,m)))continue;O=S.index;var k=S[0],F=A.slice(0,O),I=A.slice(O+k.length),P=w+A.length;d&&P>d.reach&&(d.reach=P);var _=D.prev;if(F&&(_=l(t,_,F),w+=F.length),c(t,_,x),D=l(t,_,new i(f,v?o.tokenize(k,v):k,b,k)),I&&l(t,D,I),x>1){var L={cause:f+","+h,reach:P};s(e,t,n,D.prev,w,L),d&&L.reach>d.reach&&(d.reach=L.reach)}}}}}}function u(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach(function(t){r+=e(t,n)}),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var s="";for(var u in i.attributes)s+=" "+u+'="'+(i.attributes[u]||"").replace(/"/g,""")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+s+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,a=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),a&&e.close()},!1),o):o;var d=o.util.currentScript();function f(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
19
19
|
/**
|
|
20
20
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
21
21
|
*
|
|
@@ -23,5 +23,5 @@ var e,t,n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y="undefined"!=typeof globalThis?globalT
|
|
|
23
23
|
* @author Lea Verou <https://lea.verou.me>
|
|
24
24
|
* @namespace
|
|
25
25
|
* @public
|
|
26
|
-
*/e.exports&&(e.exports=t),void 0!==y&&(y.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",i="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",(function(e){e.selector+=", "+i})),t.hooks.add("before-sanity-check",(function(a){var s=a.element;if(s.matches(i)){a.code="",s.setAttribute(n,r);var u=s.appendChild(document.createElement("CODE"));u.textContent="Loading…";var l=s.getAttribute("data-src"),c=a.language;if("none"===c){var d=(/\.(\w+)$/.exec(l)||[,"none"])[1];c=e[d]||d}t.util.setLanguage(u,c),t.util.setLanguage(s,c);var f=t.plugins.autoloader;f&&f.loadLanguages(c),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(l,(function(e){s.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(r){var i=e.split(/\r\n?|\n/g),a=r[0],l=null==r[1]?i.length:r[1];a<0&&(a+=i.length),a=Math.max(0,Math.min(a-1,i.length)),l<0&&(l+=i.length),l=Math.max(0,Math.min(l,i.length)),e=i.slice(a,l).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}u.textContent=e,t.highlightElement(u)}),(function(e){s.setAttribute(n,"failed"),u.textContent=e}))}})),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(i),o=0;n=r[o++];)t.highlightElement(n)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(ZT)),ZT.exports),QT=b(JT);!function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return o})),RegExp(e,t)}o=i(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var a=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(a).join(""):""},s=function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===a(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:a(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var u=a(o);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(u+=a(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(u=a(t[r-1])+u,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",u,null,u)}o.content&&"string"!=typeof o.content&&s(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(Prism);var ek;ek||(ek=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];var tk;tk||(tk=1,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(Prism)),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean;var nk;nk||(nk=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python);var rk;rk||(rk=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism));var ok;ok||(ok=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism));var ik;ik||(ik=1,function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function u(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var l=u(i),c=RegExp(u(o+" "+i+" "+a+" "+s)),d=u(i+" "+a+" "+s),f=u(o+" "+i+" "+s),p=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,v=t(/<<0>>(?:\s*<<1>>)?/.source,[g,p]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,v]),y=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),E=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,h,y]),C=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[E]),D=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[C,m,y]),w={keyword:c,punctuation:/[<>()?,.:[\]]/},A=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,x=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[x]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,D]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[l,v]),lookbehind:!0,inside:w},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:w},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:w},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[D,f,g]),inside:w}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[D,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[D]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,p]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(p),alias:"class-name",inside:w}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,v,g,D,c.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[v,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(D),greedy:!0,inside:w},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var O=S+"|"+A,N=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[O]),B=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),T=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,k=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,B]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[T,k]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[T]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[B]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var F=/:[^}\r\n]+/.source,I=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[I,F]),L=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[O]),2),R=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[L,F]);function _(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,F]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:_(P,I)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[R]),lookbehind:!0,greedy:!0,inside:_(R,L)}],char:{pattern:RegExp(A),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)),Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};var ak;ak||(ak=1,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift})),function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,a=0;a<o.length;a++)i[o[a]]=e.languages.bash[o[a]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],a=o.content[3];if(i&&a&&"code-language"===i.type&&"code-block"===a.type&&"string"==typeof i.content){var s=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),u="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,u]:a.alias.push(u):a.alias=[u]}}else e(o.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],l=/language-(.+)/.exec(i);if(l){n=l[1];break}}var c=e.languages[n];if(c)t.content=e.highlight(function(e){var t=e.replace(a,"");return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),u(n);var r=s[t];return r||e})),t}(t.content),c,n);else if(n&&"none"!==n&&e.plugins.autoloader){var d="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=d,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(d);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(e){var t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.groovy}(Prism),Prism.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/};var sk=["comment","prolog","doctype","cdata","punctuation","namespace","property","tag","boolean","number","constant","symbol","deleted","selector","attr-name","string","builtin","inserted","operator","entity","url","string","atrule","attr-value","keyword","function","class-name","regex","important","variable","bold","italic","entity","char"];function uk(e){return"string"==typeof e?e.length:"string"==typeof e.content?e.content.length:e.content.reduce((function(e,t){return e+uk(t)}),0)}var lk=function(e){var t,n,r,o=zg(e,2),i=o[0],a=o[1],s=[],u=function(e){if(!lg.isText(e))return null;var t=py.getParentNode(null,e);if(t&&"code"===py.getNodeType(t)){var n=py.getParentNode(null,t);if(n&&"pre"===py.getNodeType(n))return t}return null}(i);if(null==u)return s;var l=u.language,c=void 0===l?"":l;if(!c)return s;var d=function(e,t){if(!t)return[];var n=QT.languages[t];return n?QT.tokenize(e.text,n):[]}(i,c),f=0;try{for(var p=Hg(d),h=p.next();!h.done;h=p.next()){var g=h.value,v=f+uk(g);"string"!=typeof g&&s.push(((r={})[g.type]=!0,r.anchor={path:a,offset:f},r.focus={path:a,offset:v},r)),f=v}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return s};var ck={type:"code",elemToHtml:function(e,t){var n=e.language,r=void 0===n?"":n,o=r?'class="language-'.concat(r,'"'):"";return"<code ".concat(o,">").concat(t,"</code>")}};var dk=function(){function e(){this.title=BE("highLightModule.selectLang"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 64v896h896V64H64z m487.6 698.8c0 87.2-51.2 127-125.8 127-67.4 0-106.4-34.8-126.4-77l68.6-41.4c13.2 23.4 25.2 43.2 54.2 43.2 27.6 0 45.2-10.8 45.2-53V475.4h84.2v287.4z m199.2 127c-78.2 0-128.8-37.2-153.4-86l68.6-39.6c18 29.4 41.6 51.2 83 51.2 34.8 0 57.2-17.4 57.2-41.6 0-28.8-22.8-39-61.4-56l-21-9c-60.8-25.8-101-58.4-101-127 0-63.2 48.2-111.2 123.2-111.2 53.6 0 92 18.6 119.6 67.4L800 580c-14.4-25.8-30-36-54.2-36-24.6 0-40.2 15.6-40.2 36 0 25.2 15.6 35.4 51.8 51.2l21 9c71.6 30.6 111.8 62 111.8 132.4 0 75.6-59.6 117.2-139.4 117.2z"></path></svg>',this.tag="select",this.width=95,this.selectPanelWidth=115,this.defaultCodeLang=""}return e.prototype.getOptions=function(e){var t=this,n=[],r=e.getMenuConfig("codeSelectLang").codeLangs,o=void 0===r?[]:r;n.push({text:"plain text",value:""}),o.forEach((function(e){var r=e.text,o=e.value;e.selected&&(t.defaultCodeLang=o),n.push({text:r,value:o})}));var i=this.getValue(e);return n.forEach((function(e){e.value===i?e.selected=!0:e.selected=void 0})),n},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);if(null==t)return this.defaultCodeLang;if(!Fh.isElement(t))return this.defaultCodeLang;var n=t.language.toString(),r=e.getMenuConfig("codeSelectLang").codeLangs;return(void 0===r?[]:r).some((function(e){return e.value===n}))?n:this.defaultCodeLang},e.prototype.isDisabled=function(e){return null==e.selection||!this.getSelectCodeElem(e)},e.prototype.exec=function(e,t){if(null!=this.getSelectCodeElem(e)){var n={language:t.toString()};Og.setNodes(e,n,{match:function(e){return py.checkNodeType(e,"code")}})}},e.prototype.getSelectCodeElem=function(e){var t=py.getSelectedNodeByType(e,"code");if(null==t)return null;var n=py.getParentNode(e,t);return Fh.isElement(n)?"pre"!==n.type?null:t:null},e}(),fk={key:"codeSelectLang",factory:function(){return new dk},config:{codeLangs:[{text:"CSS",value:"css"},{text:"HTML",value:"html"},{text:"XML",value:"xml"},{text:"Javascript",value:"javascript"},{text:"Typescript",value:"typescript"},{text:"JSX",value:"jsx"},{text:"Go",value:"go"},{text:"PHP",value:"php"},{text:"C",value:"c"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C++",value:"cpp"},{text:"C#",value:"csharp"},{text:"Visual Basic",value:"visual-basic"},{text:"SQL",value:"sql"},{text:"Ruby",value:"ruby"},{text:"Swift",value:"swift"},{text:"Bash",value:"bash"},{text:"Lua",value:"lua"},{text:"Groovy",value:"groovy"},{text:"Markdown",value:"markdown"},{text:"ABAP",value:"abap"}]}};$v&&(Mv.fn.attr=$v);var pk={renderStyle:function(e,t){var n=e,r=t,o="";return sk.forEach((function(e){n[e]&&(o=e)})),o&&function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={}),Object.assign(n.props,{className:t})}(r,o="token ".concat(o)),r},parseStyleHtml:function(e,t,n){var r=Mv(e);if(!Fh.isElement(t))return t;if("code"!==py.getNodeType(t))return t;var o=t,i=r.attr("class")||"";return 0===i.indexOf("language-")?o.language=i.split("-")[1]||"":o.language=i.toLowerCase(),o},menus:[fk],elemsToHtml:[ck]},hk=function(){function e(){throw new Error("不能实例化\nCan not construct a instance")}return e.setEditorConfig=function(e){void 0===e&&(e={}),this.editorConfig=_g(_g({},this.editorConfig),e)},e.setSimpleEditorConfig=function(e){void 0===e&&(e={}),this.simpleEditorConfig=_g(_g({},this.simpleEditorConfig),e)},e.setToolbarConfig=function(e){void 0===e&&(e={}),this.toolbarConfig=_g(_g({},this.toolbarConfig),e)},e.setSimpleToolbarConfig=function(e){void 0===e&&(e={}),this.simpleToolbarConfig=_g(_g({},this.simpleToolbarConfig),e)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerMenu=function(e,t){tv(e,t)},e.registerRenderElem=function(e){var t,n,r;n=(t=e).type,r=t.renderElem,gD[n||""]=r},e.registerRenderStyle=function(e){!function(e){hD.push(e)}(e)},e.registerElemToHtml=function(e){!function(e){var t=e.type,n=e.elemToHtml;Qm[t||""]=n}(e)},e.registerStyleToHtml=function(e){!function(e){Xm.push(e)}(e)},e.registerPreParseHtml=function(e){var t;t=e,jm.push(t)},e.registerParseElemHtml=function(e){!function(e){var t=e.selector,n=e.parseElemHtml;zm[t]=n}(e)},e.registerParseStyleHtml=function(e){!function(e){Hm.push(e)}(e)},e.registerModule=function(e){gk(e)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function gk(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,o=e.elemsToHtml,i=e.styleToHtml,a=e.preParseHtml,s=e.parseElemsHtml,u=e.parseStyleHtml,l=e.editorPlugin;t&&t.forEach((function(e){return hk.registerMenu(e)})),n&&n.forEach((function(e){return hk.registerRenderElem(e)})),r&&hk.registerRenderStyle(r),o&&o.forEach((function(e){return hk.registerElemToHtml(e)})),i&&hk.registerStyleToHtml(i),a&&a.forEach((function(e){return hk.registerPreParseHtml(e)})),s&&s.forEach((function(e){return hk.registerParseElemHtml(e)})),u&&hk.registerParseStyleHtml(u),l&&hk.registerPlugin(l)}GN.forEach((function(e){return gk(e)})),gk(uB),gk(CT),gk($T),gk(YT),gk(pk);var vk='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',mk='<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>',yk='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',bk='<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',Ek='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>';var Ck={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editorImageSizeMenu","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable","mergeTableCell","splitTableCell","setTableProperty","setTableCellProperty"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize","editVideoSrc"]}};var Dk={hoverbarKeys:_g(_g({},Ck),{text:{menuKeys:["formatPainter","headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};hk.setEditorConfig(_g(_g({},Dk),{decorate:lk}));var wk={hoverbarKeys:Ck};hk.setSimpleEditorConfig(_g(_g({},wk),{decorate:lk}));var Ak={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:BE("editor.more"),iconSvg:bk,menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:BE("editor.justify"),iconSvg:mk,menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:BE("editor.indent"),iconSvg:vk,menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:BE("editor.image"),iconSvg:yk,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:BE("editor.video"),iconSvg:Ek,menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","formatPainter","fullScreen"]};hk.setToolbarConfig(Ak);var Sk={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:BE("editor.image"),iconSvg:yk,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};function xk(e){void 0===e&&(e={});var t=e.selector,n=void 0===t?"":t,r=e.content,o=void 0===r?[]:r,i=e.html,a=e.config,s=void 0===a?{}:a,u=e.mode,l="simple"===(void 0===u?"default":u)?hk.simpleEditorConfig:hk.editorConfig,c=_g(_g({},l.hoverbarKeys||{}),s.hoverbarKeys||{});return ND({selector:n,config:_g(_g(_g({},l),s),{hoverbarKeys:c}),content:o,html:i,plugins:hk.plugins})}function Ok(e){var t=e.selector,n=e.editor,r=e.config,o=void 0===r?{}:r,i=e.mode,a=void 0===i?"default":i;if(!t)throw new Error("Cannot find 'selector' when create toolbar");var s="simple"===a?hk.simpleToolbarConfig:hk.toolbarConfig;return TD(n,{selector:t,config:_g(_g({},s),o)})}hk.setSimpleToolbarConfig(Sk);var Nk={};export{hk as Boot,py as DomEditor,Mh as SlateEditor,Fh as SlateElement,jh as SlateLocation,Vh as SlateNode,Kh as SlatePath,Jh as SlatePoint,ng as SlateRange,lg as SlateText,Og as SlateTransforms,BD as Toolbar,xk as createEditor,Ok as createToolbar,DS as createUploader,Nk as default,$E as genModalButtonElems,HE as genModalInputElems,zE as genModalTextareaElems,SE as i18nAddResources,xE as i18nChangeLanguage,OE as i18nGetResources,BE as t};
|
|
26
|
+
*/e.exports&&(e.exports=t),void 0!==y&&(y.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",i="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",function(e){e.selector+=", "+i}),t.hooks.add("before-sanity-check",function(a){var s=a.element;if(s.matches(i)){a.code="",s.setAttribute(n,r);var u=s.appendChild(document.createElement("CODE"));u.textContent="Loading…";var l=s.getAttribute("data-src"),c=a.language;if("none"===c){var d=(/\.(\w+)$/.exec(l)||[,"none"])[1];c=e[d]||d}t.util.setLanguage(u,c),t.util.setLanguage(s,c);var f=t.plugins.autoloader;f&&f.loadLanguages(c),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(l,function(e){s.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(r){var i=e.split(/\r\n?|\n/g),a=r[0],l=null==r[1]?i.length:r[1];a<0&&(a+=i.length),a=Math.max(0,Math.min(a-1,i.length)),l<0&&(l+=i.length),l=Math.max(0,Math.min(l,i.length)),e=i.slice(a,l).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}u.textContent=e,t.highlightElement(u)},function(e){s.setAttribute(n,"failed"),u.textContent=e})}}),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(i),o=0;n=r[o++];)t.highlightElement(n)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(Ck)),Ck.exports),wk=b(Dk);!function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return o}),RegExp(e,t)}o=i(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var a=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(a).join(""):""},s=function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===a(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:a(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var u=a(o);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(u+=a(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(u=a(t[r-1])+u,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",u,null,u)}o.content&&"string"!=typeof o.content&&s(o.content)}};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)})}(Prism);var Ak;Ak||(Ak=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];var Sk;Sk||(Sk=1,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")})}(Prism)),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean;var xk;xk||(xk=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python);var Ok;Ok||(Ok=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism));var Nk;Nk||(Nk=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism));var Bk;Bk||(Bk=1,function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,r){return RegExp(t(e,n),"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function u(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var l=u(i),c=RegExp(u(o+" "+i+" "+a+" "+s)),d=u(i+" "+a+" "+s),f=u(o+" "+i+" "+s),p=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,v=t(/<<0>>(?:\s*<<1>>)?/.source,[g,p]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,v]),y=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),E=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,h,y]),C=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[E]),D=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[C,m,y]),w={keyword:c,punctuation:/[<>()?,.:[\]]/},A=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,x=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[x]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,D]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[l,v]),lookbehind:!0,inside:w},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:w},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:w},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[D,f,g]),inside:w}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[D,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[D]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,p]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(p),alias:"class-name",inside:w}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,v,g,D,c.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[v,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(D),greedy:!0,inside:w},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var O=S+"|"+A,N=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[O]),B=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),T=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,k=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,B]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[T,k]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[T]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[B]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var F=/:[^}\r\n]+/.source,I=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[I,F]),_=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[O]),2),L=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[_,F]);function R(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,F]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:R(P,I)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:R(L,_)}],char:{pattern:RegExp(A),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)),Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};var Tk;Tk||(Tk=1,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}),function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,a=0;a<o.length;a++)i[o[a]]=e.languages.bash[o[a]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],a=o.content[3];if(i&&a&&"code-language"===i.type&&"code-block"===a.type&&"string"==typeof i.content){var s=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),u="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,u]:a.alias.push(u):a.alias=[u]}}else e(o.content)}}(e.tokens)}),e.hooks.add("wrap",function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],l=/language-(.+)/.exec(i);if(l){n=l[1];break}}var c=e.languages[n];if(c)t.content=e.highlight(function(e){var t=e.replace(a,"");return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),u(n);var r=s[t];return r||e}),t}(t.content),c,n);else if(n&&"none"!==n&&e.plugins.autoloader){var d="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=d,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(d);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(e){var t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.groovy}(Prism),Prism.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/};var kk=["comment","prolog","doctype","cdata","punctuation","namespace","property","tag","boolean","number","constant","symbol","deleted","selector","attr-name","string","builtin","inserted","operator","entity","url","string","atrule","attr-value","keyword","function","class-name","regex","important","variable","bold","italic","entity","char"];function Fk(e){return"string"==typeof e?e.length:"string"==typeof e.content?e.content.length:e.content.reduce(function(e,t){return e+Fk(t)},0)}var Ik=function(e){var t,n,r,o=Qg(e,2),i=o[0],a=o[1],s=[],u=function(e){if(!Cg.isText(e))return null;var t=Iy.getParentNode(null,e);if(t&&"code"===Iy.getNodeType(t)){var n=Iy.getParentNode(null,t);if(n&&"pre"===Iy.getNodeType(n))return t}return null}(i);if(null==u)return s;var l=u.language,c=void 0===l?"":l;if(!c)return s;var d=function(e,t){if(!t)return[];var n=wk.languages[t];return n?wk.tokenize(e.text,n):[]}(i,c),f=0;try{for(var p=Jg(d),h=p.next();!h.done;h=p.next()){var g=h.value,v=f+Fk(g);"string"!=typeof g&&s.push(((r={})[g.type]=!0,r.anchor={path:a,offset:f},r.focus={path:a,offset:v},r)),f=v}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return s};var Pk={type:"code",elemToHtml:function(e,t){var n=e.language,r=void 0===n?"":n,o=r?'class="language-'.concat(r,'"'):"";return"<code ".concat(o,">").concat(t,"</code>")}};var _k=function(){function e(){this.title=ZE("highLightModule.selectLang"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 64v896h896V64H64z m487.6 698.8c0 87.2-51.2 127-125.8 127-67.4 0-106.4-34.8-126.4-77l68.6-41.4c13.2 23.4 25.2 43.2 54.2 43.2 27.6 0 45.2-10.8 45.2-53V475.4h84.2v287.4z m199.2 127c-78.2 0-128.8-37.2-153.4-86l68.6-39.6c18 29.4 41.6 51.2 83 51.2 34.8 0 57.2-17.4 57.2-41.6 0-28.8-22.8-39-61.4-56l-21-9c-60.8-25.8-101-58.4-101-127 0-63.2 48.2-111.2 123.2-111.2 53.6 0 92 18.6 119.6 67.4L800 580c-14.4-25.8-30-36-54.2-36-24.6 0-40.2 15.6-40.2 36 0 25.2 15.6 35.4 51.8 51.2l21 9c71.6 30.6 111.8 62 111.8 132.4 0 75.6-59.6 117.2-139.4 117.2z"></path></svg>',this.tag="select",this.width=95,this.selectPanelWidth=115,this.defaultCodeLang=""}return e.prototype.getOptions=function(e){var t=this,n=[],r=e.getMenuConfig("codeSelectLang").codeLangs,o=void 0===r?[]:r;n.push({text:"plain text",value:""}),o.forEach(function(e){var r=e.text,o=e.value;e.selected&&(t.defaultCodeLang=o),n.push({text:r,value:o})});var i=this.getValue(e);return n.forEach(function(e){e.value===i?e.selected=!0:e.selected=void 0}),n},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);if(null==t)return this.defaultCodeLang;if(!$h.isElement(t))return this.defaultCodeLang;var n=t.language.toString(),r=e.getMenuConfig("codeSelectLang").codeLangs;return(void 0===r?[]:r).some(function(e){return e.value===n})?n:this.defaultCodeLang},e.prototype.isDisabled=function(e){return null==e.selection||!this.getSelectCodeElem(e)},e.prototype.exec=function(e,t){if(null!=this.getSelectCodeElem(e)){var n={language:t.toString()};jg.setNodes(e,n,{match:function(e){return Iy.checkNodeType(e,"code")}})}},e.prototype.getSelectCodeElem=function(e){var t=Iy.getSelectedNodeByType(e,"code");if(null==t)return null;var n=Iy.getParentNode(e,t);return $h.isElement(n)?"pre"!==n.type?null:t:null},e}(),Lk={key:"codeSelectLang",factory:function(){return new _k},config:{codeLangs:[{text:"CSS",value:"css"},{text:"HTML",value:"html"},{text:"XML",value:"xml"},{text:"Javascript",value:"javascript"},{text:"Typescript",value:"typescript"},{text:"JSX",value:"jsx"},{text:"Go",value:"go"},{text:"PHP",value:"php"},{text:"C",value:"c"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C++",value:"cpp"},{text:"C#",value:"csharp"},{text:"Visual Basic",value:"visual-basic"},{text:"SQL",value:"sql"},{text:"Ruby",value:"ruby"},{text:"Swift",value:"swift"},{text:"Bash",value:"bash"},{text:"Lua",value:"lua"},{text:"Groovy",value:"groovy"},{text:"Markdown",value:"markdown"},{text:"ABAP",value:"abap"}]}};um&&(om.fn.attr=um);var Rk={renderStyle:function(e,t){var n=e,r=t,o="";return kk.forEach(function(e){n[e]&&(o=e)}),o&&function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={}),Object.assign(n.props,{className:t})}(r,o="token ".concat(o)),r},parseStyleHtml:function(e,t,n){var r=om(e);if(!$h.isElement(t))return t;if("code"!==Iy.getNodeType(t))return t;var o=t,i=r.attr("class")||"";return 0===i.indexOf("language-")?o.language=i.split("-")[1]||"":o.language=i.toLowerCase(),o},menus:[Lk],elemsToHtml:[Pk]},Mk=function(){function e(){throw new Error("不能实例化\nCan not construct a instance")}return e.setEditorConfig=function(e){void 0===e&&(e={}),this.editorConfig=Yg(Yg({},this.editorConfig),e)},e.setSimpleEditorConfig=function(e){void 0===e&&(e={}),this.simpleEditorConfig=Yg(Yg({},this.simpleEditorConfig),e)},e.setToolbarConfig=function(e){void 0===e&&(e={}),this.toolbarConfig=Yg(Yg({},this.toolbarConfig),e)},e.setSimpleToolbarConfig=function(e){void 0===e&&(e={}),this.simpleToolbarConfig=Yg(Yg({},this.simpleToolbarConfig),e)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerMenu=function(e,t){yv(e,t)},e.registerRenderElem=function(e){var t,n,r;n=(t=e).type,r=t.renderElem,FD[n||""]=r},e.registerRenderStyle=function(e){!function(e){BD.push(e)}(e)},e.registerElemToHtml=function(e){!function(e){var t=e.type,n=e.elemToHtml;by[t||""]=n}(e)},e.registerStyleToHtml=function(e){!function(e){vy.push(e)}(e)},e.registerPreParseHtml=function(e){var t;t=e,iy.push(t)},e.registerParseElemHtml=function(e){!function(e){var t=e.selector,n=e.parseElemHtml;sy[t]=n}(e)},e.registerParseStyleHtml=function(e){!function(e){ay.push(e)}(e)},e.registerModule=function(e){jk(e)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function jk(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,o=e.elemsToHtml,i=e.styleToHtml,a=e.preParseHtml,s=e.parseElemsHtml,u=e.parseStyleHtml,l=e.editorPlugin;t&&t.forEach(function(e){return Mk.registerMenu(e)}),n&&n.forEach(function(e){return Mk.registerRenderElem(e)}),r&&Mk.registerRenderStyle(r),o&&o.forEach(function(e){return Mk.registerElemToHtml(e)}),i&&Mk.registerStyleToHtml(i),a&&a.forEach(function(e){return Mk.registerPreParseHtml(e)}),s&&s.forEach(function(e){return Mk.registerParseElemHtml(e)}),u&&Mk.registerParseStyleHtml(u),l&&Mk.registerPlugin(l)}gB.forEach(function(e){return jk(e)}),jk(FB),jk(WT),jk(fk),jk(bk),jk(Rk);var Hk='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>';var zk={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editorImageSizeMenu","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable","mergeTableCell","splitTableCell","setTableProperty","setTableCellProperty"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize","editVideoSrc"]}};var $k={hoverbarKeys:Yg(Yg({},zk),{text:{menuKeys:["formatPainter","headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};Mk.setEditorConfig(Yg(Yg({},$k),{decorate:Ik}));var Uk={hoverbarKeys:zk};Mk.setSimpleEditorConfig(Yg(Yg({},Uk),{decorate:Ik}));var Vk={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:ZE("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:ZE("editor.justify"),iconSvg:'<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>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:ZE("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:ZE("editor.image"),iconSvg:Hk,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:ZE("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","formatPainter","fullScreen"]};Mk.setToolbarConfig(Vk);var Wk={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:ZE("editor.image"),iconSvg:Hk,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};function Gk(e){void 0===e&&(e={});var t=e.selector,n=void 0===t?"":t,r=e.content,o=void 0===r?[]:r,i=e.html,a=e.config,s=void 0===a?{}:a,u=e.mode,l="simple"===(void 0===u?"default":u)?Mk.simpleEditorConfig:Mk.editorConfig,c=Yg(Yg({},l.hoverbarKeys||{}),s.hoverbarKeys||{});return KD({selector:n,config:Yg(Yg(Yg({},l),s),{hoverbarKeys:c}),content:o,html:i,plugins:Mk.plugins})}function qk(e){var t=e.selector,n=e.editor,r=e.config,o=void 0===r?{}:r,i=e.mode,a=void 0===i?"default":i;if(!t)throw new Error("Cannot find 'selector' when create toolbar");var s="simple"===a?Mk.simpleToolbarConfig:Mk.toolbarConfig;return XD(n,{selector:t,config:Yg(Yg({},s),o)})}Mk.setSimpleToolbarConfig(Wk);var Kk={};export{Mk as Boot,Iy as DomEditor,Kh as SlateEditor,$h as SlateElement,Yh as SlateLocation,eg as SlateNode,og as SlatePath,ug as SlatePoint,fg as SlateRange,Cg as SlateText,jg as SlateTransforms,YD as Toolbar,Gk as createEditor,qk as createToolbar,GS as createUploader,Kk as default,cC as genModalButtonElems,uC as genModalInputElems,lC as genModalTextareaElems,qE as i18nAddResources,KE as i18nChangeLanguage,YE as i18nGetResources,ZE as t};
|
|
27
27
|
//# sourceMappingURL=index.mjs.map
|