@wangeditor-kai/editor 5.6.55-kai.15 → 5.6.55-kai.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).wangEditor={})}(this,function(e){"use strict";var t,r,n,o,i,a,s,u,l,c,d,f,h,p,g,m,v,y,b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function w(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 r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}function x(){return r?t:(r=1,t=function(e){try{return!!e()}catch(e){return!0}})}function S(){if(o)return n;o=1;var e=x();return n=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function C(){if(a)return i;a=1;var e=S(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return i=e?n:function(e){return function(){return r.apply(e,arguments)}},i}function A(){if(u)return s;u=1;var e=C(),t=e({}.toString),r=e("".slice);return s=function(e){return r(t(e),8,-1)}}function D(){if(c)return l;c=1;var e=C(),t=x(),r=A(),n=Object,o=e("".split);return l=t(function(){return!n("z").propertyIsEnumerable(0)})?function(e){return"String"===r(e)?o(e,""):n(e)}:n}function T(){return f?d:(f=1,d=function(e){return null==e})}function k(){if(p)return h;p=1;var e=T(),t=TypeError;return h=function(r){if(e(r))throw new t("Can't call method on "+r);return r}}function N(){if(m)return g;m=1;var e=D(),t=k();return g=function(r){return e(t(r))}}function O(){if(y)return v;y=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 b&&b)||e("object"==typeof v&&v)||function(){return this}()||Function("return this")()}var B,M,F,I,P,R,L,_,z,j,H,$,V,U,q,G,W,Y,K,X,Z,J,Q,ee,te,re,ne,oe,ie,ae={exports:{}};function se(){return M?B:(M=1,B=!1)}function ue(){if(I)return F;I=1;var e=O(),t=Object.defineProperty;return F=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}}function le(){if(P)return ae.exports;P=1;var e=se(),t=O(),r=ue(),n="__core-js_shared__",o=ae.exports=t[n]||r(n,{});return(o.versions||(o.versions=[])).push({version:"3.47.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"}),ae.exports}function ce(){if(L)return R;L=1;var e=le();return R=function(t,r){return e[t]||(e[t]=r||{})}}function de(){if(z)return _;z=1;var e=k(),t=Object;return _=function(r){return t(e(r))}}function fe(){if(H)return j;H=1;var e=C(),t=de(),r=e({}.hasOwnProperty);return j=Object.hasOwn||function(e,n){return r(t(e),n)}}function he(){if(V)return $;V=1;var e=C(),t=0,r=Math.random(),n=e(1.1.toString);return $=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+r,36)}}function pe(){if(W)return G;W=1;var e,t,r=O(),n=function(){if(q)return U;q=1;var e=O().navigator,t=e&&e.userAgent;return U=t?String(t):""}(),o=r.process,i=r.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&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),G=t}function ge(){if(K)return Y;K=1;var e=pe(),t=x(),r=O().String;return Y=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Y}function me(){if(Z)return X;Z=1;var e=ge();return X=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function ve(){if(Q)return J;Q=1;var e=O(),t=ce(),r=fe(),n=he(),o=ge(),i=me(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||n;return J=function(e){return r(s,e)||(s[e]=o&&r(a,e)?a[e]:u("Symbol."+e)),s[e]}}function ye(){if(te)return ee;te=1;var e="object"==typeof document&&document.all;return ee=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function be(){if(ne)return re;ne=1;var e=ye();return re=function(t){return"object"==typeof t?null!==t:e(t)}}function we(){if(ie)return oe;ie=1;var e=be(),t=String,r=TypeError;return oe=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")}}var Ee,xe,Se,Ce,Ae={};function De(){if(xe)return Ee;xe=1;var e=x();return Ee=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function Te(){if(Ce)return Se;Ce=1;var e=De(),t=x();return Se=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}var ke,Ne,Oe,Be,Me,Fe,Ie,Pe,Re,Le,_e,ze,je,He,$e,Ve,Ue,qe,Ge,We,Ye,Ke,Xe,Ze,Je,Qe,et,tt,rt,nt,ot,it,at,st,ut,lt,ct,dt,ft,ht,pt,gt,mt,vt,yt,bt,wt,Et,xt,St,Ct,At,Dt,Tt,kt,Nt,Ot,Bt,Mt,Ft,It,Pt,Rt,Lt,_t={};function zt(){if(Ne)return ke;Ne=1;var e=O(),t=be(),r=e.document,n=t(r)&&t(r.createElement);return ke=function(e){return n?r.createElement(e):{}}}function jt(){if(Be)return Oe;Be=1;var e=De(),t=x(),r=zt();return Oe=!e&&!t(function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})}function Ht(){if(Fe)return Me;Fe=1;var e=S(),t=Function.prototype.call;return Me=e?t.bind(t):function(){return t.apply(t,arguments)},Me}function $t(){if(Pe)return Ie;Pe=1;var e=O(),t=ye();return Ie=function(r,n){return arguments.length<2?(o=e[r],t(o)?o:void 0):e[r]&&e[r][n];var o},Ie}function Vt(){if(Le)return Re;Le=1;var e=C();return Re=e({}.isPrototypeOf)}function Ut(){if(ze)return _e;ze=1;var e=$t(),t=ye(),r=Vt(),n=me(),o=Object;return _e=n?function(e){return"symbol"==typeof e}:function(n){var i=e("Symbol");return t(i)&&r(i.prototype,o(n))}}function qt(){if(He)return je;He=1;var e=String;return je=function(t){try{return e(t)}catch(e){return"Object"}}}function Gt(){if(Ve)return $e;Ve=1;var e=ye(),t=qt(),r=TypeError;return $e=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")}}function Wt(){if(qe)return Ue;qe=1;var e=Gt(),t=T();return Ue=function(r,n){var o=r[n];return t(o)?void 0:e(o)},Ue}function Yt(){if(Ke)return Ye;Ke=1;var e=Ht(),t=be(),r=Ut(),n=Wt(),o=function(){if(We)return Ge;We=1;var e=Ht(),t=ye(),r=be(),n=TypeError;return Ge=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!r(s=e(a,o)))return s;if(t(a=o.valueOf)&&!r(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!r(s=e(a,o)))return s;throw new n("Can't convert object to primitive value")},Ge}(),i=ve(),a=TypeError,s=i("toPrimitive");return Ye=function(i,u){if(!t(i)||r(i))return i;var l,c=n(i,s);if(c){if(void 0===u&&(u="default"),l=e(c,i,u),!t(l)||r(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(Ze)return Xe;Ze=1;var e=Yt(),t=Ut();return Xe=function(r){var n=e(r,"string");return t(n)?n:n+""}}function Xt(){if(Je)return _t;Je=1;var e=De(),t=jt(),r=Te(),n=we(),o=Kt(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return _t.f=e?r?function(e,t,r){if(n(e),t=o(t),n(r),"function"==typeof e&&"prototype"===t&&"value"in r&&c in r&&!r[c]){var i=s(e,t);i&&i[c]&&(e[t]=r.value,r={configurable:l in r?r[l]:i[l],enumerable:u in r?r[u]:i[u],writable:!1})}return a(e,t,r)}:a:function(e,r,s){if(n(e),r=o(r),n(s),t)try{return a(e,r,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[r]=s.value),e},_t}function Zt(){if(rt)return tt;rt=1;var e=function(){if(et)return Qe;et=1;var e=Math.ceil,t=Math.floor;return Qe=Math.trunc||function(r){var n=+r;return(n>0?t:e)(n)},Qe}();return tt=function(t){var r=+t;return r!=r||0===r?0:e(r)}}function Jt(){if(at)return it;at=1;var e=Zt(),t=Math.min;return it=function(r){var n=e(r);return n>0?t(n,9007199254740991):0}}function Qt(){if(ut)return st;ut=1;var e=Jt();return st=function(t){return e(t.length)}}function er(){if(ct)return lt;ct=1;var e=N(),t=function(){if(ot)return nt;ot=1;var e=Zt(),t=Math.max,r=Math.min;return nt=function(n,o){var i=e(n);return i<0?t(i+o,0):r(i,o)},nt}(),r=Qt(),n=function(n){return function(o,i,a){var s=e(o),u=r(s);if(0===u)return!n&&-1;var l,c=t(a,u);if(n&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((n||c in s)&&s[c]===i)return n||c||0;return!n&&-1}};return lt={includes:n(!0),indexOf:n(!1)}}function tr(){return ft?dt:(ft=1,dt={})}function rr(){if(pt)return ht;pt=1;var e=C(),t=fe(),r=N(),n=er().indexOf,o=tr(),i=e([].push);return ht=function(e,a){var s,u=r(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++])&&(~n(c,s)||i(c,s));return c},ht}function nr(){return mt?gt:(mt=1,gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function or(){if(bt)return Ae;bt=1;var e=De(),t=Te(),r=Xt(),n=we(),o=N(),i=function(){if(yt)return vt;yt=1;var e=rr(),t=nr();return vt=Object.keys||function(r){return e(r,t)},vt}();return Ae.f=e&&!t?Object.defineProperties:function(e,t){n(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)r.f(e,a=u[c++],s[a]);return e},Ae}function ir(){if(St)return xt;St=1;var e=ce(),t=he(),r=e("keys");return xt=function(e){return r[e]||(r[e]=t(e))}}function ar(){if(At)return Ct;At=1;var e,t=we(),r=or(),n=nr(),o=tr(),i=function(){if(Et)return wt;Et=1;var e=$t();return wt=e("document","documentElement")}(),a=zt(),s=ir(),u="prototype",l="script",c=s("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+"</"+l+">"},h=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,r,o;p="undefined"!=typeof document?document.domain&&e?h(e):(r=a("iframe"),o="java"+l+":",r.style.display="none",i.appendChild(r),r.src=String(o),(t=r.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):h(e);for(var s=n.length;s--;)delete p[u][n[s]];return p()};return o[c]=!0,Ct=Object.create||function(e,n){var o;return null!==e?(d[u]=t(e),o=new d,d[u]=null,o[c]=e):o=p(),void 0===n?o:r.f(o,n)},Ct}function sr(){return Nt?kt:(Nt=1,kt={})}function ur(){return Ft?Mt:(Ft=1,Mt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function lr(){if(Pt)return It;Pt=1;var e=De(),t=Xt(),r=ur();return It=e?function(e,n,o){return t.f(e,n,r(1,o))}:function(e,t,r){return e[t]=r,e}}function cr(){if(Lt)return Rt;Lt=1;var e,t,r,n=function(){if(Bt)return Ot;Bt=1;var e=O(),t=ye(),r=e.WeakMap;return Ot=t(r)&&/native code/.test(String(r))}(),o=O(),i=be(),a=lr(),s=fe(),u=le(),l=ir(),c=tr(),d="Object already initialized",f=o.TypeError,h=o.WeakMap;if(n||u.state){var p=u.state||(u.state=new h);p.get=p.get,p.has=p.has,p.set=p.set,e=function(e,t){if(p.has(e))throw new f(d);return t.facade=e,p.set(e,t),t},t=function(e){return p.get(e)||{}},r=function(e){return p.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]:{}},r=function(e){return s(e,g)}}return Rt={set:e,get:t,has:r,enforce:function(n){return r(n)?t(n):e(n,{})},getterFor:function(e){return function(r){var n;if(!i(r)||(n=t(r)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}}var dr,fr,hr={},pr={};function gr(){if(fr)return hr;fr=1;var e=De(),t=Ht(),r=function(){if(dr)return pr;dr=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return pr.f=r?function(e){var r=t(this,e);return!!r&&r.enumerable}:e,pr}(),n=ur(),o=N(),i=Kt(),a=fe(),s=jt(),u=Object.getOwnPropertyDescriptor;return hr.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 n(!t(r.f,e,l),e[l])},hr}var mr,vr,yr,br,wr,Er,xr,Sr={exports:{}};function Cr(){if(vr)return mr;vr=1;var e=De(),t=fe(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,o=t(r,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&n(r,"name").configurable);return mr={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Ar(){if(br)return yr;br=1;var e=C(),t=ye(),r=le(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),yr=r.inspectSource}function Dr(){if(wr)return Sr.exports;wr=1;var e=C(),t=x(),r=ye(),n=fe(),o=De(),i=Cr().CONFIGURABLE,a=Ar(),s=cr(),u=s.enforce,l=s.get,c=String,d=Object.defineProperty,f=e("".slice),h=e("".replace),p=e([].join),g=o&&!t(function(){return 8!==d(function(){},"length",{value:8}).length}),m=String(String).split("String"),v=Sr.exports=function(e,t,r){"Symbol("===f(c(t),0,7)&&(t="["+h(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!n(e,"name")||i&&e.name!==t)&&(o?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&r&&n(r,"arity")&&e.length!==r.arity&&d(e,"length",{value:r.arity});try{r&&n(r,"constructor")&&r.constructor?o&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=u(e);return n(a,"source")||(a.source=p(m,"string"==typeof t?t:"")),e};return Function.prototype.toString=v(function(){return r(this)&&l(this).source||a(this)},"toString"),Sr.exports}function Tr(){if(xr)return Er;xr=1;var e=ye(),t=Xt(),r=Dr(),n=ue();return Er=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(e(a)&&r(a,l,s),s.global)u?o[i]=a:n(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},Er}var kr,Nr={};var Or,Br,Mr,Fr,Ir,Pr,Rr,Lr,_r,zr,jr,Hr,$r,Vr,Ur,qr,Gr,Wr,Yr,Kr,Xr,Zr,Jr,Qr,en,tn,rn,nn,on,an,sn,un,ln,cn={};function dn(){if(Mr)return Br;Mr=1;var e=$t(),t=C(),r=function(){if(kr)return Nr;kr=1;var e=rr(),t=nr().concat("length","prototype");return Nr.f=Object.getOwnPropertyNames||function(r){return e(r,t)},Nr}(),n=(Or||(Or=1,cn.f=Object.getOwnPropertySymbols),cn),o=we(),i=t([].concat);return Br=e("Reflect","ownKeys")||function(e){var t=r.f(o(e)),a=n.f;return a?i(t,a(e)):t},Br}function fn(){if(Ir)return Fr;Ir=1;var e=fe(),t=dn(),r=gr(),n=Xt();return Fr=function(o,i,a){for(var s=t(i),u=n.f,l=r.f,c=0;c<s.length;c++){var d=s[c];e(o,d)||a&&e(a,d)||u(o,d,l(i,d))}},Fr}function hn(){if(_r)return Lr;_r=1;var e=O(),t=gr().f,r=lr(),n=Tr(),o=ue(),i=fn(),a=function(){if(Rr)return Pr;Rr=1;var e=x(),t=ye(),r=/#|\.prototype\./,n=function(r,n){var u=i[o(r)];return u===s||u!==a&&(t(n)?e(n):!!n)},o=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},i=n.data={},a=n.NATIVE="N",s=n.POLYFILL="P";return Pr=n}();return Lr=function(s,u){var l,c,d,f,h,p=s.target,g=s.global,m=s.stat;if(l=g?e:m?e[p]||o(p,{}):e[p]&&e[p].prototype)for(c in u){if(f=u[c],d=s.dontCallGetSet?(h=t(l,c))&&h.value:l[c],!a(g?c:p+(m?".":"#")+c,s.forced)&&void 0!==d){if(typeof f==typeof d)continue;i(f,d)}(s.sham||d&&d.sham)&&r(f,"sham",!0),n(l,c,f,s)}}}function pn(){if($r)return Hr;$r=1;var e=fe(),t=ye(),r=de(),n=ir(),o=function(){if(jr)return zr;jr=1;var e=x();return zr=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),zr}(),i=n("IE_PROTO"),a=Object,s=a.prototype;return Hr=o?a.getPrototypeOf:function(n){var o=r(n);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},Hr}function gn(){if(Ur)return Vr;Ur=1;var e,t,r,n=x(),o=ye(),i=be(),a=ar(),s=pn(),u=Tr(),l=ve(),c=se(),d=l("iterator"),f=!1;return[].keys&&("next"in(r=[].keys())?(t=s(s(r)))!==Object.prototype&&(e=t):f=!0),!i(e)||n(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),Vr={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function mn(){if(Gr)return qr;Gr=1;var e=Xt().f,t=fe(),r=ve()("toStringTag");return qr=function(n,o,i){n&&!i&&(n=n.prototype),n&&!t(n,r)&&e(n,r,{configurable:!0,value:o})}}function vn(){if(en)return Qr;en=1;var e=function(){if(Jr)return Zr;Jr=1;var e=be();return Zr=function(t){return e(t)||null===t}}(),t=String,r=TypeError;return Qr=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")}}function yn(){if(rn)return tn;rn=1;var e=function(){if(Xr)return Kr;Xr=1;var e=C(),t=Gt();return Kr=function(r,n,o){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[o]))}catch(e){}}}(),t=be(),r=k(),n=vn();return tn=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 r(e),n(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),tn}function bn(){if(on)return nn;on=1;var e=hn(),t=Ht(),r=se(),n=Cr(),o=ye(),i=function(){if(Yr)return Wr;Yr=1;var e=gn().IteratorPrototype,t=ar(),r=ur(),n=mn(),o=sr(),i=function(){return this};return Wr=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:r(+!l,u)}),n(a,c,!1,!0),o[c]=i,a}}(),a=pn(),s=yn(),u=mn(),l=lr(),c=Tr(),d=ve(),f=sr(),h=gn(),p=n.PROPER,g=n.CONFIGURABLE,m=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",w="values",E="entries",x=function(){return this};return nn=function(n,d,h,S,C,A,D){i(h,d,S);var T,k,N,O=function(e){if(e===C&&P)return P;if(!v&&e&&e in F)return F[e];switch(e){case b:case w:case E:return function(){return new h(this,e)}}return function(){return new h(this)}},B=d+" Iterator",M=!1,F=n.prototype,I=F[y]||F["@@iterator"]||C&&F[C],P=!v&&I||O(C),R="Array"===d&&F.entries||I;if(R&&(T=a(R.call(new n)))!==Object.prototype&&T.next&&(r||a(T)===m||(s?s(T,m):o(T[y])||c(T,y,x)),u(T,B,!0,!0),r&&(f[B]=x)),p&&C===w&&I&&I.name!==w&&(!r&&g?l(F,"name",w):(M=!0,P=function(){return t(I,this)})),C)if(k={values:O(w),keys:A?P:O(b),entries:O(E)},D)for(N in k)(v||M||!(N in F))&&c(F,N,k[N]);else e({target:d,proto:!0,forced:v||M},k);return r&&!D||F[y]===P||c(F,y,P,{name:C}),f[d]=P,k}}function wn(){return sn?an:(sn=1,an=function(e,t){return{value:e,done:t}})}function En(){if(ln)return un;ln=1;var e=N(),t=function(){if(Tt)return Dt;Tt=1;var e=ve(),t=ar(),r=Xt().f,n=e("unscopables"),o=Array.prototype;return void 0===o[n]&&r(o,n,{configurable:!0,value:t(null)}),Dt=function(e){o[n][e]=!0}}(),r=sr(),n=cr(),o=Xt().f,i=bn(),a=wn(),s=se(),u=De(),l="Array Iterator",c=n.set,d=n.getterFor(l);un=i(Array,"Array",function(t,r){c(this,{type:l,target:e(t),index:0,kind:r})},function(){var e=d(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(r,!1);case"values":return a(t[r],!1)}return a([r,t[r]],!1)},"values");var f=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return un}En();var xn,Sn,Cn,An,Dn,Tn,kn,Nn={};function On(){if(Sn)return xn;Sn=1;var e={};return e[ve()("toStringTag")]="z",xn="[object z]"===String(e)}function Bn(){if(An)return Cn;An=1;var e=On(),t=ye(),r=A(),n=ve()("toStringTag"),o=Object,i="Arguments"===r(function(){return arguments}());return Cn=e?r: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),n))?s:i?r(a):"Object"===(u=r(a))&&t(a.callee)?"Arguments":u},Cn}!function(){if(kn)return Nn;kn=1;var e=On(),t=Tr(),r=function(){if(Tn)return Dn;Tn=1;var e=On(),t=Bn();return Dn=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",r,{unsafe:!0})}();var Mn,Fn,In,Pn,Rn,Ln,_n,zn,jn,Hn,$n,Vn,Un,qn={};function Gn(){if(Fn)return Mn;Fn=1;var e=Bn(),t=String;return Mn=function(r){if("Symbol"===e(r))throw new TypeError("Cannot convert a Symbol value to a string");return t(r)}}function Wn(){if(Pn)return In;Pn=1;var e=we();return In=function(){var t=e(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r}}function Yn(){if(Vn)return $n;Vn=1;var e,t,r=Ht(),n=C(),o=Gn(),i=Wn(),a=function(){if(Ln)return Rn;Ln=1;var e=x(),t=O().RegExp,r=e(function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),n=r||e(function(){return!t("a","y").sticky}),o=r||e(function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")});return Rn={BROKEN_CARET:o,MISSED_STICKY:n,UNSUPPORTED_Y:r}}(),s=ce(),u=ar(),l=cr().get,c=function(){if(zn)return _n;zn=1;var e=x(),t=O().RegExp;return _n=e(function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})}(),d=function(){if(Hn)return jn;Hn=1;var e=x(),t=O().RegExp;return jn=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),h=RegExp.prototype.exec,p=h,g=n("".charAt),m=n("".indexOf),v=n("".replace),y=n("".slice),b=(t=/b*/g,r(h,e=/a/,"a"),r(h,t,"a"),0!==e.lastIndex||0!==t.lastIndex),w=a.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];return(b||E||w||c||d)&&(p=function(e){var t,n,a,s,c,d,x,S=this,C=l(S),A=o(e),D=C.raw;if(D)return D.lastIndex=S.lastIndex,t=r(p,D,A),S.lastIndex=D.lastIndex,t;var T=C.groups,k=w&&S.sticky,N=r(i,S),O=S.source,B=0,M=A;if(k&&(N=v(N,"y",""),-1===m(N,"g")&&(N+="g"),M=y(A,S.lastIndex),S.lastIndex>0&&(!S.multiline||S.multiline&&"\n"!==g(A,S.lastIndex-1))&&(O="(?: "+O+")",M=" "+M,B++),n=new RegExp("^(?:"+O+")",N)),E&&(n=new RegExp("^"+O+"$(?!\\s)",N)),b&&(a=S.lastIndex),s=r(h,k?n:S,M),k?s?(s.input=y(s.input,B),s[0]=y(s[0],B),s.index=S.lastIndex,S.lastIndex+=s[0].length):S.lastIndex=0:b&&s&&(S.lastIndex=S.global?s.index+s[0].length:a),E&&s&&s.length>1&&r(f,s[0],n,function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)}),s&&T)for(s.groups=d=u(null),c=0;c<T.length;c++)d[(x=T[c])[0]]=s[x[1]];return s}),$n=p}function Kn(){if(Un)return qn;Un=1;var e=hn(),t=Yn();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),qn}Kn();var Xn,Zn,Jn,Qn={};function eo(){if(Zn)return Xn;Zn=1;var e=C(),t=Zt(),r=Gn(),n=k(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=r(n(s)),f=t(u),h=d.length;return f<0||f>=h?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===h||(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 Xn={codeAt:s(!1),charAt:s(!0)}}!function(){if(Jn)return Qn;Jn=1;var e=eo().charAt,t=Gn(),r=cr(),n=bn(),o=wn(),i="String Iterator",a=r.set,s=r.getterFor(i);n(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,r=s(this),n=r.string,i=r.index;return i>=n.length?o(void 0,!0):(t=e(n,i),r.index+=t.length,o(t,!1))})}();var to,ro,no,oo,io,ao,so,uo,lo,co,fo,ho={};function po(){if(oo)return no;oo=1;var e=eo().charAt;return no=function(t,r,n){return r+(n?e(t,r).length:1)},no}function go(){if(uo)return so;uo=1;var e=Ht(),t=fe(),r=Vt(),n=function(){if(ao)return io;ao=1;var e=O(),t=x(),r=e.RegExp,n=!t(function(){var e=!0;try{r(".","d")}catch(t){e=!1}var t={},n="",o=e?"dgimsy":"gimsy",i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!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(r.prototype,"flags").get.call(t)!==o||n!==o});return io={correct:n}}(),o=Wn(),i=RegExp.prototype;return so=n.correct?function(e){return e.flags}:function(a){return n.correct||!r(i,a)||t(a,"flags")?a.flags:e(o,a)}}!function(){if(fo)return ho;fo=1;var e=Ht(),t=C(),r=function(){if(ro)return to;ro=1,Kn();var e=Ht(),t=Tr(),r=Yn(),n=x(),o=ve(),i=lr(),a=o("species"),s=RegExp.prototype;return to=function(u,l,c,d){var f=o(u),h=!n(function(){var e={};return e[f]=function(){return 7},7!==""[u](e)}),p=h&&!n(function(){var e=!1,t=/a/;if("split"===u){var r={};r[a]=function(){return t},(t={constructor:r,flags:""})[f]=/./[f]}return t.exec=function(){return e=!0,null},t[f](""),!e});if(!h||!p||c){var g=/./[f],m=l(f,""[u],function(t,n,o,i,a){var u=n.exec;return u===r||u===s.exec?h&&!a?{done:!0,value:e(g,n,o,i)}:{done:!0,value:e(t,o,n,i)}:{done:!1}});t(String.prototype,u,m[0]),t(s,f,m[1])}d&&i(s[f],"sham",!0)},to}(),n=we(),o=be(),i=Jt(),a=Gn(),s=k(),u=Wt(),l=po(),c=go(),d=function(){if(co)return lo;co=1;var e=Ht(),t=we(),r=ye(),n=A(),o=Yn(),i=TypeError;return lo=function(a,s){var u=a.exec;if(r(u)){var l=e(u,a,s);return null!==l&&t(l),l}if("RegExp"===n(a))return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")},lo}(),f=t("".indexOf);r("match",function(t,r,h){return[function(r){var n=s(this),i=o(r)?u(r,t):void 0;return i?e(i,r,n):new RegExp(r)[t](a(n))},function(e){var t=n(this),o=a(e),s=h(r,t,o);if(s.done)return s.value;var u=a(c(t));if(-1===f(u,"g"))return d(t,o);var p=-1!==f(u,"u");t.lastIndex=0;for(var g,m=[],v=0;null!==(g=d(t,o));){var y=a(g[0]);m[v]=y,""===y&&(t.lastIndex=l(o,i(t.lastIndex),p)),v++}return 0===v?null:m}]})}();var mo,vo,yo,bo,wo,Eo,xo,So,Co,Ao,Do,To,ko,No,Oo,Bo,Mo,Fo,Io,Po,Ro,Lo,_o,zo,jo,Ho,$o,Vo={},Uo={};function qo(){if(vo)return mo;vo=1;var e=be(),t=lr();return mo=function(r,n){e(n)&&"cause"in n&&t(r,"cause",n.cause)},mo}function Go(){if(So)return xo;So=1;var e=lr(),t=function(){if(bo)return yo;bo=1;var e=C(),t=Error,r=e("".replace),n=String(new t("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(n);return yo=function(e,n){if(i&&"string"==typeof e&&!t.prepareStackTrace)for(;n--;)e=r(e,o,"");return e}}(),r=function(){if(Eo)return wo;Eo=1;var e=x(),t=ur();return wo=!e(function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)})}(),n=Error.captureStackTrace;return xo=function(o,i,a,s){r&&(n?n(o,i):e(o,"stack",t(a,s)))},xo}function Wo(){if(To)return Do;To=1;var e=function(){if(Ao)return Co;Ao=1;var e=A(),t=C();return Co=function(r){if("Function"===e(r))return t(r)}}(),t=Gt(),r=S(),n=e(e.bind);return Do=function(e,o){return t(e),void 0===o?e:r?n(e,o):function(){return e.apply(o,arguments)}},Do}function Yo(){if(No)return ko;No=1;var e=ve(),t=sr(),r=e("iterator"),n=Array.prototype;return ko=function(e){return void 0!==e&&(t.Array===e||n[r]===e)}}function Ko(){if(Bo)return Oo;Bo=1;var e=Bn(),t=Wt(),r=T(),n=sr(),o=ve()("iterator");return Oo=function(i){if(!r(i))return t(i,o)||t(i,"@@iterator")||n[e(i)]}}function Xo(){if(Fo)return Mo;Fo=1;var e=Ht(),t=Gt(),r=we(),n=qt(),o=Ko(),i=TypeError;return Mo=function(a,s){var u=arguments.length<2?o(a):s;if(t(u))return r(e(u,a));throw new i(n(a)+" is not iterable")},Mo}function Zo(){if(Po)return Io;Po=1;var e=Ht(),t=we(),r=Wt();return Io=function(n,o,i){var a,s;t(n);try{if(!(a=r(n,"return"))){if("throw"===o)throw i;return i}a=e(a,n)}catch(e){s=!0,a=e}if("throw"===o)throw i;if(s)throw a;return t(a),i},Io}function Jo(){if(Lo)return Ro;Lo=1;var e=Wo(),t=Ht(),r=we(),n=qt(),o=Yo(),i=Qt(),a=Vt(),s=Xo(),u=Ko(),l=Zo(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return Ro=function(h,p,g){var m,v,y,b,w,E,x,S=g&&g.that,C=!(!g||!g.AS_ENTRIES),A=!(!g||!g.IS_RECORD),D=!(!g||!g.IS_ITERATOR),T=!(!g||!g.INTERRUPTED),k=e(p,S),N=function(e){return m&&l(m,"normal"),new d(!0,e)},O=function(e){return C?(r(e),T?k(e[0],e[1],N):k(e[0],e[1])):T?k(e,N):k(e)};if(A)m=h.iterator;else if(D)m=h;else{if(!(v=u(h)))throw new c(n(h)+" is not iterable");if(o(v)){for(y=0,b=i(h);b>y;y++)if((w=O(h[y]))&&a(f,w))return w;return new d(!1)}m=s(h,v)}for(E=A?h.next:m.next;!(x=t(E,m)).done;){try{w=O(x.value)}catch(e){l(m,"throw",e)}if("object"==typeof w&&w&&a(f,w))return w}return new d(!1)},Ro}function Qo(){if(zo)return _o;zo=1;var e=Gn();return _o=function(t,r){return void 0===t?arguments.length<2?"":r:e(t)},_o}function ei(){return Ho||(Ho=1,function(){if(jo)return Uo;jo=1;var e=hn(),t=Vt(),r=pn(),n=yn(),o=fn(),i=ar(),a=lr(),s=ur(),u=qo(),l=Go(),c=Jo(),d=Qo(),f=ve()("toStringTag"),h=Error,p=[].push,g=function(e,o){var s,v=t(m,this);n?s=n(new h,v?r(this):m):(s=v?this:i(m),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,p,{that:y}),a(s,"errors",y),s};n?n(g,h):o(g,h,{name:!0});var m=g.prototype=i(h.prototype,{constructor:s(1,g),message:s(1,""),name:s(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:g})}()),Vo}$o||($o=1,ei());var ti,ri,ni={};ri||(ri=1,function(){if(ti)return ni;ti=1;var e=hn(),t=O();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());var oi,ii,ai,si,ui,li,ci={};function di(){return ii?oi:(ii=1,oi={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 fi(){if(si)return ai;si=1;var e=zt()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return ai=t===Object.prototype?void 0:t}if(function(){if(ui)return ci;ui=1;var e=O(),t=di(),r=fi(),n=En(),o=lr(),i=mn(),a=ve()("iterator"),s=n.values,u=function(e,r){if(e){if(e[a]!==s)try{o(e,a,s)}catch(t){e[a]=s}if(i(e,r,!0),t[r])for(var u in n)if(e[u]!==n[u])try{o(e,u,n[u])}catch(t){e[u]=n[u]}}};for(var l in t)u(e[l]&&e[l].prototype,l);u(r,"DOMTokenList")}(),"undefined"==typeof global){if("ActiveXObject"in window){console.error("抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器\n Sorry, wangEditor V5+ versions do not support IE browser.")}hi(),pi()}else global&&(null===(li=global.navigator)||void 0===li?void 0:li.userAgent.match("QQBrowser"))&&(hi(),pi());function hi(){"undefined"==typeof globalThis&&(window.globalThis=window)}function pi(){"undefined"==typeof AggregateError&&(window.AggregateError=function(e,t){var r=new Error(t);return r.errors=e,r})}var gi,mi,vi,yi,bi,wi,Ei,xi,Si,Ci,Ai,Di,Ti,ki,Ni,Oi,Bi={};function Mi(){if(mi)return gi;mi=1;var e=function(e){return e&&e.Math===Math&&e};return gi=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof b&&b)||e("object"==typeof gi&&gi)||function(){return this}()||Function("return this")()}function Fi(){return yi?vi:(yi=1,vi=function(e){try{return!!e()}catch(e){return!0}})}function Ii(){return wi?bi:(wi=1,bi=!Fi()(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function Pi(){if(xi)return Ei;xi=1;var e=Ii(),t=Function.prototype,r=t.apply,n=t.call;return Ei="object"==typeof Reflect&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),Ei}function Ri(){if(Ci)return Si;Ci=1;var e=Ii(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Si=e?n:function(e){return function(){return r.apply(e,arguments)}},Si}function Li(){if(Di)return Ai;Di=1;var e=Ri(),t=e({}.toString),r=e("".slice);return Ai=function(e){return r(t(e),8,-1)}}function _i(){if(ki)return Ti;ki=1;var e=Li(),t=Ri();return Ti=function(r){if("Function"===e(r))return t(r)}}function zi(){if(Oi)return Ni;Oi=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,$i,Vi,Ui={};function qi(){return Hi?ji:(Hi=1,ji=!Fi()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Gi(){if(Vi)return $i;Vi=1;var e=Ii(),t=Function.prototype.call;return $i=e?t.bind(t):function(){return t.apply(t,arguments)},$i}var Wi,Yi,Ki,Xi,Zi,Ji,Qi,ea,ta,ra,na,oa,ia,aa,sa,ua,la,ca,da,fa,ha,pa,ga,ma,va,ya,ba,wa,Ea,xa,Sa,Ca,Aa,Da,Ta,ka,Na,Oa={};function Ba(){if(Wi)return Oa;Wi=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Oa.f=r?function(e){var r=t(this,e);return!!r&&r.enumerable}:e,Oa}function Ma(){return Ki?Yi:(Ki=1,Yi=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Fa(){if(Zi)return Xi;Zi=1;var e=Ri(),t=Fi(),r=Li(),n=Object,o=e("".split);return Xi=t(function(){return!n("z").propertyIsEnumerable(0)})?function(e){return"String"===r(e)?o(e,""):n(e)}:n}function Ia(){return Qi?Ji:(Qi=1,Ji=function(e){return null==e})}function Pa(){if(ta)return ea;ta=1;var e=Ia(),t=TypeError;return ea=function(r){if(e(r))throw new t("Can't call method on "+r);return r}}function Ra(){if(na)return ra;na=1;var e=Fa(),t=Pa();return ra=function(r){return e(t(r))}}function La(){if(ia)return oa;ia=1;var e=zi();return oa=function(t){return"object"==typeof t?null!==t:e(t)}}function _a(){return sa?aa:(sa=1,aa={})}function za(){if(la)return ua;la=1;var e=_a(),t=Mi(),r=zi(),n=function(e){return r(e)?e:void 0};return ua=function(r,o){return arguments.length<2?n(e[r])||n(t[r]):e[r]&&e[r][o]||t[r]&&t[r][o]},ua}function ja(){return da?ca:(da=1,ca=Ri()({}.isPrototypeOf))}function Ha(){if(ha)return fa;ha=1;var e=Mi().navigator,t=e&&e.userAgent;return fa=t?String(t):""}function $a(){if(ga)return pa;ga=1;var e,t,r=Mi(),n=Ha(),o=r.process,i=r.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&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),pa=t}function Va(){if(va)return ma;va=1;var e=$a(),t=Fi(),r=Mi().String;return ma=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),ma}function Ua(){return ba?ya:(ba=1,ya=Va()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function qa(){if(Ea)return wa;Ea=1;var e=za(),t=zi(),r=ja(),n=Object;return wa=Ua()?function(e){return"symbol"==typeof e}:function(o){var i=e("Symbol");return t(i)&&r(i.prototype,n(o))}}function Ga(){if(Sa)return xa;Sa=1;var e=String;return xa=function(t){try{return e(t)}catch(e){return"Object"}}}function Wa(){if(Aa)return Ca;Aa=1;var e=zi(),t=Ga(),r=TypeError;return Ca=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")}}function Ya(){if(Ta)return Da;Ta=1;var e=Wa(),t=Ia();return Da=function(r,n){var o=r[n];return t(o)?void 0:e(o)},Da}function Ka(){if(Na)return ka;Na=1;var e=Gi(),t=zi(),r=La(),n=TypeError;return ka=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!r(s=e(a,o)))return s;if(t(a=o.valueOf)&&!r(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!r(s=e(a,o)))return s;throw new n("Can't convert object to primitive value")},ka}var Xa,Za,Ja,Qa,es,ts,rs,ns,os,is,as,ss,us,ls,cs,ds,fs,hs,ps,gs,ms,vs,ys,bs,ws,Es,xs,Ss,Cs={exports:{}};function As(){return Za?Xa:(Za=1,Xa=!0)}function Ds(){if(Qa)return Ja;Qa=1;var e=Mi(),t=Object.defineProperty;return Ja=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}}function Ts(){if(es)return Cs.exports;es=1;var e=As(),t=Mi(),r=Ds(),n="__core-js_shared__",o=Cs.exports=t[n]||r(n,{});return(o.versions||(o.versions=[])).push({version:"3.47.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Cs.exports}function ks(){if(rs)return ts;rs=1;var e=Ts();return ts=function(t,r){return e[t]||(e[t]=r||{})}}function Ns(){if(os)return ns;os=1;var e=Pa(),t=Object;return ns=function(r){return t(e(r))}}function Os(){if(as)return is;as=1;var e=Ri(),t=Ns(),r=e({}.hasOwnProperty);return is=Object.hasOwn||function(e,n){return r(t(e),n)}}function Bs(){if(us)return ss;us=1;var e=Ri(),t=0,r=Math.random(),n=e(1.1.toString);return ss=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+r,36)}}function Ms(){if(cs)return ls;cs=1;var e=Mi(),t=ks(),r=Os(),n=Bs(),o=Va(),i=Ua(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||n;return ls=function(e){return r(s,e)||(s[e]=o&&r(a,e)?a[e]:u("Symbol."+e)),s[e]}}function Fs(){if(fs)return ds;fs=1;var e=Gi(),t=La(),r=qa(),n=Ya(),o=Ka(),i=TypeError,a=Ms()("toPrimitive");return ds=function(s,u){if(!t(s)||r(s))return s;var l,c=n(s,a);if(c){if(void 0===u&&(u="default"),l=e(c,s,u),!t(l)||r(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 hs;ps=1;var e=Fs(),t=qa();return hs=function(r){var n=e(r,"string");return t(n)?n:n+""}}function Ps(){if(ms)return gs;ms=1;var e=Mi(),t=La(),r=e.document,n=t(r)&&t(r.createElement);return gs=function(e){return n?r.createElement(e):{}}}function Rs(){if(ys)return vs;ys=1;var e=qi(),t=Fi(),r=Ps();return vs=!e&&!t(function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})}function Ls(){if(bs)return Ui;bs=1;var e=qi(),t=Gi(),r=Ba(),n=Ma(),o=Ra(),i=Is(),a=Os(),s=Rs(),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 n(!t(r.f,e,l),e[l])},Ui}function _s(){if(Es)return ws;Es=1;var e=Fi(),t=zi(),r=/#|\.prototype\./,n=function(r,n){var u=i[o(r)];return u===s||u!==a&&(t(n)?e(n):!!n)},o=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},i=n.data={},a=n.NATIVE="N",s=n.POLYFILL="P";return ws=n}function zs(){if(Ss)return xs;Ss=1;var e=_i(),t=Wa(),r=Ii(),n=e(e.bind);return xs=function(e,o){return t(e),void 0===o?e:r?n(e,o):function(){return e.apply(o,arguments)}},xs}var js,Hs,$s,Vs,Us,qs,Gs,Ws,Ys,Ks,Xs,Zs,Js,Qs,eu,tu,ru,nu,ou,iu,au,su,uu,lu,cu,du,fu,hu,pu,gu,mu,vu,yu,bu,wu,Eu,xu,Su,Cu={};function Au(){return Hs?js:(Hs=1,js=qi()&&Fi()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function Du(){if(Vs)return $s;Vs=1;var e=La(),t=String,r=TypeError;return $s=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")}}function Tu(){if(Us)return Cu;Us=1;var e=qi(),t=Rs(),r=Au(),n=Du(),o=Is(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Cu.f=e?r?function(e,t,r){if(n(e),t=o(t),n(r),"function"==typeof e&&"prototype"===t&&"value"in r&&c in r&&!r[c]){var i=s(e,t);i&&i[c]&&(e[t]=r.value,r={configurable:l in r?r[l]:i[l],enumerable:u in r?r[u]:i[u],writable:!1})}return a(e,t,r)}:a:function(e,r,s){if(n(e),r=o(r),n(s),t)try{return a(e,r,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[r]=s.value),e},Cu}function ku(){if(Gs)return qs;Gs=1;var e=qi(),t=Tu(),r=Ma();return qs=e?function(e,n,o){return t.f(e,n,r(1,o))}:function(e,t,r){return e[t]=r,e}}function Nu(){if(Ys)return Ws;Ys=1;var e=Mi(),t=Pi(),r=_i(),n=zi(),o=Ls().f,i=_s(),a=_a(),s=zs(),u=ku(),l=Os(),c=function(e){var r=function(n,o,i){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,o)}return new e(n,o,i)}return t(e,this,arguments)};return r.prototype=e.prototype,r};return Ws=function(t,d){var f,h,p,g,m,v,y,b,w,E=t.target,x=t.global,S=t.stat,C=t.proto,A=x?e:S?e[E]:e[E]&&e[E].prototype,D=x?a:a[E]||u(a,E,{})[E],T=D.prototype;for(g in d)h=!(f=i(x?g:E+(S?".":"#")+g,t.forced))&&A&&l(A,g),v=D[g],h&&(y=t.dontCallGetSet?(w=o(A,g))&&w.value:A[g]),m=h&&y?y:d[g],(f||C||typeof v!=typeof m)&&(b=t.bind&&h?s(m,e):t.wrap&&h?c(m):C&&n(m)?r(m):m,(t.sham||m&&m.sham||v&&v.sham)&&u(b,"sham",!0),u(D,g,b),C&&(l(a,p=E+"Prototype")||u(a,p,{}),u(a[p],g,m),t.real&&T&&(f||!T[g])&&u(T,g,m)))}}function Ou(){if(Xs)return Ks;Xs=1;var e=Li();return Ks=Array.isArray||function(t){return"Array"===e(t)}}function Bu(){if(Js)return Zs;Js=1;var e=Math.ceil,t=Math.floor;return Zs=Math.trunc||function(r){var n=+r;return(n>0?t:e)(n)},Zs}function Mu(){if(eu)return Qs;eu=1;var e=Bu();return Qs=function(t){var r=+t;return r!=r||0===r?0:e(r)}}function Fu(){if(ru)return tu;ru=1;var e=Mu(),t=Math.min;return tu=function(r){var n=e(r);return n>0?t(n,9007199254740991):0}}function Iu(){if(ou)return nu;ou=1;var e=Fu();return nu=function(t){return e(t.length)}}function Pu(){if(au)return iu;au=1;var e=TypeError;return iu=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}}function Ru(){if(uu)return su;uu=1;var e=qi(),t=Tu(),r=Ma();return su=function(n,o,i){e?t.f(n,o,r(0,i)):n[o]=i}}function Lu(){if(cu)return lu;cu=1;var e={};return e[Ms()("toStringTag")]="z",lu="[object z]"===String(e)}function _u(){if(fu)return du;fu=1;var e=Lu(),t=zi(),r=Li(),n=Ms()("toStringTag"),o=Object,i="Arguments"===r(function(){return arguments}());return du=e?r: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),n))?s:i?r(a):"Object"===(u=r(a))&&t(a.callee)?"Arguments":u},du}function zu(){if(pu)return hu;pu=1;var e=Ri(),t=zi(),r=Ts(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),hu=r.inspectSource}function ju(){if(mu)return gu;mu=1;var e=Ri(),t=Fi(),r=zi(),n=_u(),o=za(),i=zu(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!r(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=function(e){if(!r(e))return!1;switch(n(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return f.sham=!0,gu=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d}function Hu(){if(yu)return vu;yu=1;var e=Ou(),t=ju(),r=La(),n=Ms()("species"),o=Array;return vu=function(i){var a;return e(i)&&(a=i.constructor,(t(a)&&(a===o||e(a.prototype))||r(a)&&null===(a=a[n]))&&(a=void 0)),void 0===a?o:a},vu}function $u(){if(wu)return bu;wu=1;var e=Hu();return bu=function(t,r){return new(e(t))(0===r?0:r)}}function Vu(){if(xu)return Eu;xu=1;var e=Fi(),t=Ms(),r=$a(),n=t("species");return Eu=function(t){return r>=51||!e(function(){var e=[];return(e.constructor={})[n]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Eu}var Uu,qu,Gu={},Wu={};function Yu(){if(qu)return Uu;qu=1;var e=_u(),t=String;return Uu=function(r){if("Symbol"===e(r))throw new TypeError("Cannot convert a Symbol value to a string");return t(r)}}var Ku,Xu,Zu,Ju,Qu,el,tl,rl,nl,ol,il,al,sl,ul,ll,cl,dl,fl,hl,pl={};function gl(){if(Xu)return Ku;Xu=1;var e=Mu(),t=Math.max,r=Math.min;return Ku=function(n,o){var i=e(n);return i<0?t(i+o,0):r(i,o)},Ku}function ml(){if(Ju)return Zu;Ju=1;var e=Ra(),t=gl(),r=Iu(),n=function(n){return function(o,i,a){var s=e(o),u=r(s);if(0===u)return!n&&-1;var l,c=t(a,u);if(n&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((n||c in s)&&s[c]===i)return n||c||0;return!n&&-1}};return Zu={includes:n(!0),indexOf:n(!1)}}function vl(){return el?Qu:(el=1,Qu={})}function yl(){if(rl)return tl;rl=1;var e=Ri(),t=Os(),r=Ra(),n=ml().indexOf,o=vl(),i=e([].push);return tl=function(e,a){var s,u=r(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++])&&(~n(c,s)||i(c,s));return c},tl}function bl(){return ol?nl:(ol=1,nl=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function wl(){if(al)return il;al=1;var e=yl(),t=bl();return il=Object.keys||function(r){return e(r,t)},il}function El(){if(sl)return pl;sl=1;var e=qi(),t=Au(),r=Tu(),n=Du(),o=Ra(),i=wl();return pl.f=e&&!t?Object.defineProperties:function(e,t){n(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)r.f(e,a=u[c++],s[a]);return e},pl}function xl(){return ll?ul:(ll=1,ul=za()("document","documentElement"))}function Sl(){if(dl)return cl;dl=1;var e=ks(),t=Bs(),r=e("keys");return cl=function(e){return r[e]||(r[e]=t(e))}}function Cl(){if(hl)return fl;hl=1;var e,t=Du(),r=El(),n=bl(),o=vl(),i=xl(),a=Ps(),s="prototype",u="script",l=Sl()("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},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,r,o;h="undefined"!=typeof document?document.domain&&e?f(e):(r=a("iframe"),o="java"+u+":",r.style.display="none",i.appendChild(r),r.src=String(o),(t=r.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):f(e);for(var l=n.length;l--;)delete h[s][n[l]];return h()};return o[l]=!0,fl=Object.create||function(e,n){var o;return null!==e?(c[s]=t(e),o=new c,c[s]=null,o[l]=e):o=h(),void 0===n?o:r.f(o,n)},fl}var Al,Dl={};function Tl(){if(Al)return Dl;Al=1;var e=yl(),t=bl().concat("length","prototype");return Dl.f=Object.getOwnPropertyNames||function(r){return e(r,t)},Dl}var kl,Nl,Ol,Bl={};function Ml(){return Nl?kl:(Nl=1,kl=Ri()([].slice))}function Fl(){if(Ol)return Bl;Ol=1;var e=Li(),t=Ra(),r=Tl().f,n=Ml(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Bl.f=function(i){return o&&"Window"===e(i)?function(e){try{return r(e)}catch(e){return n(o)}}(i):r(t(i))},Bl}var Il,Pl,Rl,Ll,_l,zl={};function jl(){return Il||(Il=1,zl.f=Object.getOwnPropertySymbols),zl}function Hl(){if(Rl)return Pl;Rl=1;var e=ku();return Pl=function(t,r,n,o){return o&&o.enumerable?t[r]=n:e(t,r,n),t}}function $l(){if(_l)return Ll;_l=1;var e=Tu();return Ll=function(t,r,n){return e.f(t,r,n)}}var Vl,Ul,ql,Gl,Wl,Yl,Kl,Xl,Zl,Jl,Ql,ec,tc,rc,nc,oc,ic={};function ac(){if(Vl)return ic;Vl=1;var e=Ms();return ic.f=e,ic}function sc(){if(ql)return Ul;ql=1;var e=_a(),t=Os(),r=ac(),n=Tu().f;return Ul=function(o){var i=e.Symbol||(e.Symbol={});t(i,o)||n(i,o,{value:r.f(o)})}}function uc(){if(Wl)return Gl;Wl=1;var e=Gi(),t=za(),r=Ms(),n=Hl();return Gl=function(){var o=t("Symbol"),i=o&&o.prototype,a=i&&i.valueOf,s=r("toPrimitive");i&&!i[s]&&n(i,s,function(t){return e(a,this)},{arity:1})}}function lc(){if(Kl)return Yl;Kl=1;var e=Lu(),t=_u();return Yl=e?{}.toString:function(){return"[object "+t(this)+"]"}}function cc(){if(Zl)return Xl;Zl=1;var e=Lu(),t=Tu().f,r=ku(),n=Os(),o=lc(),i=Ms()("toStringTag");return Xl=function(a,s,u,l){var c=u?a:a&&a.prototype;c&&(n(c,i)||t(c,i,{configurable:!0,value:s}),l&&!e&&r(c,"toString",o))}}function dc(){if(Ql)return Jl;Ql=1;var e=Mi(),t=zi(),r=e.WeakMap;return Jl=t(r)&&/native code/.test(String(r))}function fc(){if(tc)return ec;tc=1;var e,t,r,n=dc(),o=Mi(),i=La(),a=ku(),s=Os(),u=Ts(),l=Sl(),c=vl(),d="Object already initialized",f=o.TypeError,h=o.WeakMap;if(n||u.state){var p=u.state||(u.state=new h);p.get=p.get,p.has=p.has,p.set=p.set,e=function(e,t){if(p.has(e))throw new f(d);return t.facade=e,p.set(e,t),t},t=function(e){return p.get(e)||{}},r=function(e){return p.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]:{}},r=function(e){return s(e,g)}}return ec={set:e,get:t,has:r,enforce:function(n){return r(n)?t(n):e(n,{})},getterFor:function(e){return function(r){var n;if(!i(r)||(n=t(r)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}}function hc(){if(nc)return rc;nc=1;var e=zs(),t=Ri(),r=Fa(),n=Ns(),o=Iu(),i=$u(),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,h=5===t||d;return function(p,g,m,v){for(var y,b,w=n(p),E=r(w),x=o(E),S=e(g,m),C=0,A=v||i,D=s?A(p,x):u||f?A(p,0):void 0;x>C;C++)if((h||C in E)&&(b=S(y=E[C],C,w),t))if(s)D[C]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return C;case 2:a(D,y)}else switch(t){case 4:return!1;case 7:a(D,y)}return d?-1:l||c?c:D}};return rc={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,gc,mc,vc={};function yc(){return gc?pc:(gc=1,pc=Va()&&!!Symbol.for&&!!Symbol.keyFor)}var bc,wc={};var Ec,xc,Sc,Cc,Ac,Dc,Tc,kc={};function Nc(){if(xc)return Ec;xc=1;var e=La(),t=fc().get;return Ec=function(r){if(!e(r))return!1;var n=t(r);return!!n&&"RawJSON"===n.type},Ec}function Oc(){if(Cc)return Sc;Cc=1;var e=Ri(),t=Os(),r=SyntaxError,n=parseInt,o=String.fromCharCode,i=e("".charAt),a=e("".slice),s=e(/./.exec),u={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},l=/^[\da-f]{4}$/i,c=/^[\u0000-\u001F]$/;return Sc=function(e,d){for(var f=!0,h="";d<e.length;){var p=i(e,d);if("\\"===p){var g=a(e,d,d+2);if(t(u,g))h+=u[g],d+=2;else{if("\\u"!==g)throw new r('Unknown escape sequence: "'+g+'"');var m=a(e,d+=2,d+4);if(!s(l,m))throw new r("Bad Unicode escape at: "+d);h+=o(n(m,16)),d+=4}}else{if('"'===p){f=!1,d++;break}if(s(c,p))throw new r("Bad control character in string literal at: "+d);h+=p,d++}}if(f)throw new r("Unterminated string at: "+d);return{value:h,end:d}},Sc}function Bc(){return Dc?Ac:(Dc=1,Ac=!Fi()(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}))}var Mc,Fc,Ic={};function Pc(){return Fc||(Fc=1,function(){if(oc)return Wu;oc=1;var e=Nu(),t=Mi(),r=Gi(),n=Ri(),o=As(),i=qi(),a=Va(),s=Fi(),u=Os(),l=ja(),c=Du(),d=Ra(),f=Is(),h=Yu(),p=Ma(),g=Cl(),m=wl(),v=Tl(),y=Fl(),b=jl(),w=Ls(),E=Tu(),x=El(),S=Ba(),C=Hl(),A=$l(),D=ks(),T=Sl(),k=vl(),N=Bs(),O=Ms(),B=ac(),M=sc(),F=uc(),I=cc(),P=fc(),R=hc().forEach,L=T("hidden"),_="Symbol",z="prototype",j=P.set,H=P.getterFor(_),$=Object[z],V=t.Symbol,U=V&&V[z],q=t.RangeError,G=t.TypeError,W=t.QObject,Y=w.f,K=E.f,X=y.f,Z=S.f,J=n([].push),Q=D("symbols"),ee=D("op-symbols"),te=D("wks"),re=!W||!W[z]||!W[z].findChild,ne=function(e,t,r){var n=Y($,t);n&&delete $[t],K(e,t,r),n&&e!==$&&K($,t,n)},oe=i&&s(function(){return 7!==g(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a})?ne:K,ie=function(e,t){var r=Q[e]=g(U);return j(r,{type:_,tag:e,description:t}),i||(r.description=t),r},ae=function(e,t,r){e===$&&ae(ee,t,r),c(e);var n=f(t);return c(r),u(Q,n)?(r.enumerable?(u(e,L)&&e[L][n]&&(e[L][n]=!1),r=g(r,{enumerable:p(0,!1)})):(u(e,L)||K(e,L,p(1,g(null))),e[L][n]=!0),oe(e,n,r)):K(e,n,r)},se=function(e,t){c(e);var n=d(t),o=m(n).concat(de(n));return R(o,function(t){i&&!r(ue,n,t)||ae(e,t,n[t])}),e},ue=function(e){var t=f(e),n=r(Z,this,t);return!(this===$&&u(Q,t)&&!u(ee,t))&&(!(n||!u(this,t)||!u(Q,t)||u(this,L)&&this[L][t])||n)},le=function(e,t){var r=d(e),n=f(t);if(r!==$||!u(Q,n)||u(ee,n)){var o=Y(r,n);return!o||!u(Q,n)||u(r,L)&&r[L][n]||(o.enumerable=!0),o}},ce=function(e){var t=X(d(e)),r=[];return R(t,function(e){u(Q,e)||u(k,e)||J(r,e)}),r},de=function(e){var t=e===$,r=X(t?ee:d(e)),n=[];return R(r,function(e){!u(Q,e)||t&&!u($,e)||J(n,Q[e])}),n};a||(V=function(){if(l(U,this))throw new G("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?h(arguments[0]):void 0,n=N(e),o=function(e){var i=void 0===this?t:this;i===$&&r(o,ee,e),u(i,L)&&u(i[L],n)&&(i[L][n]=!1);var a=p(1,e);try{oe(i,n,a)}catch(e){if(!(e instanceof q))throw e;ne(i,n,a)}};return i&&re&&oe($,n,{configurable:!0,set:o}),ie(n,e)},C(U=V[z],"toString",function(){return H(this).tag}),C(V,"withoutSetter",function(e){return ie(N(e),e)}),S.f=ue,E.f=ae,x.f=se,w.f=le,v.f=y.f=ce,b.f=de,B.f=function(e){return ie(O(e),e)},i&&(A(U,"description",{configurable:!0,get:function(){return H(this).description}}),o||C($,"propertyIsEnumerable",ue,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!a,sham:!a},{Symbol:V}),R(m(te),function(e){M(e)}),e({target:_,stat:!0,forced:!a},{useSetter:function(){re=!0},useSimple:function(){re=!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}),F(),I(V,_),k[L]=!0}(),function(){if(mc)return vc;mc=1;var e=Nu(),t=za(),r=Os(),n=Yu(),o=ks(),i=yc(),a=o("string-to-symbol-registry"),s=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{for:function(e){var o=n(e);if(r(a,o))return a[o];var i=t("Symbol")(o);return a[o]=i,s[i]=o,i}})}(),function(){if(bc)return wc;bc=1;var e=Nu(),t=Os(),r=qa(),n=Ga(),o=ks(),i=yc(),a=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{keyFor:function(e){if(!r(e))throw new TypeError(n(e)+" is not a symbol");if(t(a,e))return a[e]}})}(),function(){if(Tc)return kc;Tc=1;var e=Nu(),t=za(),r=Pi(),n=Gi(),o=Ri(),i=Fi(),a=Ou(),s=zi(),u=Nc(),l=qa(),c=Li(),d=Yu(),f=Ml(),h=Oc(),p=Bs(),g=Va(),m=Bc(),v=String,y=t("JSON","stringify"),b=o(/./.exec),w=o("".charAt),E=o("".charCodeAt),x=o("".replace),S=o("".slice),C=o([].push),A=o(1.1.toString),D=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,N=p(),O=N.length,B=!g||i(function(){var e=t("Symbol")("stringify detection");return"[null]"!==y([e])||"{}"!==y({a:e})||"{}"!==y(Object(e))}),M=i(function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")}),F=B?function(e,t){var o=f(arguments),i=P(t);if(s(i)||void 0!==e&&!l(e))return o[1]=function(e,t){if(s(i)&&(t=n(i,this,v(e),t)),!l(t))return t},r(y,null,o)}:y,I=function(e,t,r){var n=w(r,t-1),o=w(r,t+1);return b(T,e)&&!b(k,o)||b(k,e)&&!b(T,n)?"\\u"+A(E(e,0),16):e},P=function(e){if(s(e))return e;if(a(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];"string"==typeof o?C(r,o):"number"!=typeof o&&"Number"!==c(o)&&"String"!==c(o)||C(r,d(o))}var i=r.length,u=!0;return function(e,t){if(u)return u=!1,t;if(a(this))return t;for(var n=0;n<i;n++)if(r[n]===e)return t}}};y&&e({target:"JSON",stat:!0,arity:3,forced:B||M||!m},{stringify:function(e,t,r){var o=P(t),i=[],a=F(e,function(e,t){var r=s(o)?n(o,this,v(e),t):t;return!m&&u(r)?N+(C(i,r.rawJSON)-1):r},r);if("string"!=typeof a)return a;if(M&&(a=x(a,D,I)),m)return a;for(var l="",c=a.length,d=0;d<c;d++){var f=w(a,d);if('"'===f){var p=h(a,++d).end-1,g=S(a,d,p);l+=S(g,0,O)===N?i[S(g,O)]:'"'+g+'"',d=p}else l+=f}return l}})}(),function(){if(Mc)return Ic;Mc=1;var e=Nu(),t=Va(),r=Fi(),n=jl(),o=Ns();e({target:"Object",stat:!0,forced:!t||r(function(){n.f(1)})},{getOwnPropertySymbols:function(e){var t=n.f;return t?t(o(e)):[]}})}()),Gu}var Rc,Lc={};function _c(){return Rc||(Rc=1,sc()("asyncDispose")),Lc}var zc;var jc,Hc={};function $c(){return jc||(jc=1,sc()("dispose")),Hc}var Vc;var Uc;var qc,Gc={};function Wc(){return qc||(qc=1,sc()("iterator")),Gc}var Yc;var Kc;var Xc;var Zc;var Jc;var Qc;var ed,td={};var rd,nd={};var od;var id,ad,sd,ud={};function ld(){return sd?ad:(sd=1,function(){if(Su)return Bi;Su=1;var e=Nu(),t=Fi(),r=Ou(),n=La(),o=Ns(),i=Iu(),a=Pu(),s=Ru(),u=$u(),l=Vu(),c=Ms(),d=$a(),f=c("isConcatSpreadable"),h=d>=51||!t(function(){var e=[];return e[f]=!1,e.concat()[0]!==e}),p=function(e){if(!n(e))return!1;var t=e[f];return void 0!==t?!!t:r(e)};e({target:"Array",proto:!0,arity:1,forced:!h||!l("concat")},{concat:function(e){var t,r,n,l,c,d=o(this),f=u(d,0),h=0;for(t=-1,n=arguments.length;t<n;t++)if(p(c=-1===t?d:arguments[t]))for(l=i(c),a(h+l),r=0;r<l;r++,h++)r in c&&s(f,h,c[r]);else a(h+1),s(f,h++,c);return f.length=h,f}})}(),Pc(),_c(),zc||(zc=1,sc()("asyncIterator")),$c(),Vc||(Vc=1,sc()("hasInstance")),Uc||(Uc=1,sc()("isConcatSpreadable")),Wc(),Yc||(Yc=1,sc()("match")),Kc||(Kc=1,sc()("matchAll")),Xc||(Xc=1,sc()("replace")),Zc||(Zc=1,sc()("search")),Jc||(Jc=1,sc()("species")),Qc||(Qc=1,sc()("split")),function(){if(ed)return td;ed=1;var e=sc(),t=uc();e("toPrimitive"),t()}(),function(){if(rd)return nd;rd=1;var e=za(),t=sc(),r=cc();t("toStringTag"),r(e("Symbol"),"Symbol")}(),od||(od=1,sc()("unscopables")),function(){if(id)return ud;id=1;var e=Mi();cc()(e.JSON,"JSON",!0)}(),ad=_a().Symbol)}var cd,dd,fd,hd,pd,gd,md,vd,yd,bd,wd,Ed,xd,Sd,Cd,Ad,Dd,Td,kd,Nd,Od,Bd,Md,Fd,Id,Pd,Rd,Ld,_d,zd,jd,Hd,$d,Vd={};function Ud(){return dd?cd:(dd=1,cd=function(){})}function qd(){return hd?fd:(hd=1,fd={})}function Gd(){if(gd)return pd;gd=1;var e=qi(),t=Os(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,o=t(r,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&n(r,"name").configurable);return pd={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Wd(){return vd||(vd=1,md=!Fi()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),md}function Yd(){if(bd)return yd;bd=1;var e=Os(),t=zi(),r=Ns(),n=Sl(),o=Wd(),i=n("IE_PROTO"),a=Object,s=a.prototype;return yd=o?a.getPrototypeOf:function(n){var o=r(n);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},yd}function Kd(){if(Ed)return wd;Ed=1;var e,t,r,n=Fi(),o=zi(),i=La(),a=Cl(),s=Yd(),u=Hl(),l=Ms(),c=As(),d=l("iterator"),f=!1;return[].keys&&("next"in(r=[].keys())?(t=s(s(r)))!==Object.prototype&&(e=t):f=!0),!i(e)||n(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),wd={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function Xd(){if(Sd)return xd;Sd=1;var e=Kd().IteratorPrototype,t=Cl(),r=Ma(),n=cc(),o=qd(),i=function(){return this};return xd=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:r(+!l,u)}),n(a,c,!1,!0),o[c]=i,a}}function Zd(){if(Ad)return Cd;Ad=1;var e=Ri(),t=Wa();return Cd=function(r,n,o){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[o]))}catch(e){}}}function Jd(){if(Td)return Dd;Td=1;var e=La();return Dd=function(t){return e(t)||null===t}}function Qd(){if(Nd)return kd;Nd=1;var e=Jd(),t=String,r=TypeError;return kd=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")}}function ef(){if(Bd)return Od;Bd=1;var e=Zd(),t=La(),r=Pa(),n=Qd();return Od=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 r(e),n(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),Od}function tf(){if(Fd)return Md;Fd=1;var e=Nu(),t=Gi(),r=As(),n=Gd(),o=zi(),i=Xd(),a=Yd(),s=ef(),u=cc(),l=ku(),c=Hl(),d=Ms(),f=qd(),h=Kd(),p=n.PROPER,g=n.CONFIGURABLE,m=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",w="values",E="entries",x=function(){return this};return Md=function(n,d,h,S,C,A,D){i(h,d,S);var T,k,N,O=function(e){if(e===C&&P)return P;if(!v&&e&&e in F)return F[e];switch(e){case b:case w:case E:return function(){return new h(this,e)}}return function(){return new h(this)}},B=d+" Iterator",M=!1,F=n.prototype,I=F[y]||F["@@iterator"]||C&&F[C],P=!v&&I||O(C),R="Array"===d&&F.entries||I;if(R&&(T=a(R.call(new n)))!==Object.prototype&&T.next&&(r||a(T)===m||(s?s(T,m):o(T[y])||c(T,y,x)),u(T,B,!0,!0),r&&(f[B]=x)),p&&C===w&&I&&I.name!==w&&(!r&&g?l(F,"name",w):(M=!0,P=function(){return t(I,this)})),C)if(k={values:O(w),keys:A?P:O(b),entries:O(E)},D)for(N in k)(v||M||!(N in F))&&c(F,N,k[N]);else e({target:d,proto:!0,forced:v||M},k);return r&&!D||F[y]===P||c(F,y,P,{name:C}),f[d]=P,k}}function rf(){return Pd?Id:(Pd=1,Id=function(e,t){return{value:e,done:t}})}function nf(){if(Ld)return Rd;Ld=1;var e=Ra(),t=Ud(),r=qd(),n=fc(),o=Tu().f,i=tf(),a=rf(),s=As(),u=qi(),l="Array Iterator",c=n.set,d=n.getterFor(l);Rd=i(Array,"Array",function(t,r){c(this,{type:l,target:e(t),index:0,kind:r})},function(){var e=d(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(r,!1);case"values":return a(t[r],!1)}return a([r,t[r]],!1)},"values");var f=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return Rd}function of(){return zd?_d:(zd=1,_d={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 af(){if(jd)return Vd;jd=1,nf();var e=of(),t=Mi(),r=cc(),n=qd();for(var o in e)r(t[o],o),n[o]=n.Array;return Vd}function sf(){if($d)return Hd;$d=1;var e=ld();return af(),Hd=e}var uf,lf={};var cf;var df;var ff,hf,pf;function gf(){if(pf)return hf;pf=1;var e=sf();return function(){if(uf)return lf;uf=1;var e=Ms(),t=Tu().f,r=e("metadata"),n=Function.prototype;void 0===n[r]&&t(n,r,{value:null})}(),cf||(cf=1,_c()),df||(df=1,$c()),ff||(ff=1,sc()("metadata")),hf=e}var mf,vf,yf;function bf(){if(vf)return mf;vf=1;var e=za(),t=Ri(),r=e("Symbol"),n=r.keyFor,o=t(r.prototype.valueOf);return mf=r.isRegisteredSymbol||function(e){try{return void 0!==n(o(e))}catch(e){return!1}}}var wf,Ef,xf;function Sf(){if(Ef)return wf;Ef=1;for(var e=ks(),t=za(),r=Ri(),n=qa(),o=Ms(),i=t("Symbol"),a=i.isWellKnownSymbol,s=t("Object","getOwnPropertyNames"),u=r(i.prototype.valueOf),l=e("wks"),c=0,d=s(i),f=d.length;c<f;c++)try{var h=d[c];n(i[h])&&o(h)}catch(e){}return wf=function(e){if(a&&a(e))return!0;try{for(var t=u(e),r=0,n=s(l),o=n.length;r<o;r++)if(l[n[r]]==t)return!0}catch(e){}return!1},wf}var Cf;var Af;var Df;var Tf;var kf;var Nf;var Of;var Bf,Mf,Ff,If,Pf;function Rf(){if(Ff)return Mf;Ff=1;var e=gf();return yf||(yf=1,Nu()({target:"Symbol",stat:!0},{isRegisteredSymbol:bf()})),xf||(xf=1,Nu()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Sf()})),Cf||(Cf=1,sc()("customMatcher")),Af||(Af=1,sc()("observable")),Df||(Df=1,Nu()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:bf()})),Tf||(Tf=1,Nu()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Sf()})),kf||(kf=1,sc()("matcher")),Nf||(Nf=1,sc()("metadataKey")),Of||(Of=1,sc()("patternMatch")),Bf||(Bf=1,sc()("replaceAll")),Mf=e}function Lf(){return Pf?If:(Pf=1,If=Rf())}var _f,zf,jf,Hf,$f,Vf,Uf,qf,Gf,Wf,Yf,Kf,Xf,Zf=w(Lf()),Jf={};function Qf(){if(zf)return _f;zf=1;var e=Ri(),t=Mu(),r=Yu(),n=Pa(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=r(n(s)),f=t(u),h=d.length;return f<0||f>=h?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===h||(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 _f={codeAt:s(!1),charAt:s(!0)}}function eh(){return $f?Hf:($f=1,nf(),function(){if(jf)return Jf;jf=1;var e=Qf().charAt,t=Yu(),r=fc(),n=tf(),o=rf(),i="String Iterator",a=r.set,s=r.getterFor(i);n(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,r=s(this),n=r.string,i=r.index;return i>=n.length?o(void 0,!0):(t=e(n,i),r.index+=t.length,o(t,!1))})}(),Wc(),Hf=ac().f("iterator"))}function th(){if(Uf)return Vf;Uf=1;var e=eh();return af(),Vf=e}function rh(){return Gf?qf:(Gf=1,qf=th())}function nh(){return Yf?Wf:(Yf=1,Wf=rh())}function oh(){return Xf?Kf:(Xf=1,Kf=nh())}var ih=w(oh());function ah(e){return ah="function"==typeof Zf&&"symbol"==typeof ih?function(e){return typeof e}:function(e){return e&&"function"==typeof Zf&&e.constructor===Zf&&e!==Zf.prototype?"symbol":typeof e},ah(e)}var sh,uh={};if(function(){if(sh)return uh;sh=1;var e=hn(),t=x(),r=N(),n=gr().f,o=De();e({target:"Object",stat:!0,forced:!o||t(function(){n(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return n(r(e),t)}})}(),"object"===("undefined"==typeof global?"undefined":ah(global))){var lh=Object.getOwnPropertyDescriptor(global,"window");global.window&&!lh.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[]})}var ch,dh={};function fh(){if(ch)return dh;ch=1;var e={transform:function(e,t){var r=e.current,n=e.affinity;if(null!=r){var o=y.transform(r,t,{affinity:n});e.current=o,null==o&&e.unref()}}},t={transform:function(e,t){var r=e.current,n=e.affinity;if(null!=r){var o=Me.transform(r,t,{affinity:n});e.current=o,null==o&&e.unref()}}},r={transform:function(e,t){var r=e.current,n=e.affinity;if(null!=r){var o=I.transform(r,t,{affinity:n});e.current=o,null==o&&e.unref()}}},n=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,s=new WeakMap,u=new WeakMap,l=new WeakMap;function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e,t){return e(t={exports:{}},t.exports),t.exports}var f=d(function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports});c(f);var h=d(function(e){e.exports=function(e){if(Array.isArray(e))return f(e)},e.exports.__esModule=!0,e.exports.default=e.exports});c(h);var p=d(function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports});c(p);var g=d(function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports});c(g);var m=d(function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports});c(m);var v=c(d(function(e){e.exports=function(e){return h(e)||p(e)||g(e)||m()},e.exports.__esModule=!0,e.exports.default=e.exports})),y={ancestors:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.reverse,n=void 0!==r&&r,o=y.levels(e,t);return o=n?o.slice(1):o.slice(0,-1)},common:function(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n];if(o!==t[n])break;r.push(o)}return r},compare:function(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter:function(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return y.equals(n,o)&&i>a},endsAt:function(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return y.equals(n,o)},endsBefore:function(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return y.equals(n,o)&&i<a},equals:function(e,t){return e.length===t.length&&e.every(function(e,r){return e===t[r]})},hasPrevious:function(e){return e[e.length-1]>0},isAfter:function(e,t){return 1===y.compare(e,t)},isAncestor:function(e,t){return e.length<t.length&&0===y.compare(e,t)},isBefore:function(e,t){return-1===y.compare(e,t)},isChild:function(e,t){return e.length===t.length+1&&0===y.compare(e,t)},isCommon:function(e,t){return e.length<=t.length&&0===y.compare(e,t)},isDescendant:function(e,t){return e.length>t.length&&0===y.compare(e,t)},isParent:function(e,t){return e.length+1===t.length&&0===y.compare(e,t)},isPath:function(e){return Array.isArray(e)&&e.every(function(e){return"number"==typeof e})},isSibling:function(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&y.equals(r,n)},levels:function(e){for(var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,r=void 0!==t&&t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next:function(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:function(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:function(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:function(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:function(e,t){if(!y.isAncestor(t,e)&&!y.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:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var n=v(e),o=r.affinity,i=void 0===o?"forward":o;if(0===e.length)return n;switch(t.type){case"insert_node":var a=t.path;(y.equals(a,n)||y.endsBefore(a,n)||y.isAncestor(a,n))&&(n[a.length-1]+=1);break;case"remove_node":var s=t.path;if(y.equals(s,n)||y.isAncestor(s,n))return null;y.endsBefore(s,n)&&(n[s.length-1]-=1);break;case"merge_node":var u=t.path,l=t.position;y.equals(u,n)||y.endsBefore(u,n)?n[u.length-1]-=1:y.isAncestor(u,n)&&(n[u.length-1]-=1,n[u.length]+=l);break;case"split_node":var c=t.path,d=t.position;if(y.equals(c,n)){if("forward"===i)n[n.length-1]+=1;else if("backward"!==i)return null}else y.endsBefore(c,n)?n[c.length-1]+=1:y.isAncestor(c,n)&&e[c.length]>=d&&(n[c.length-1]+=1,n[c.length]-=d);break;case"move_node":var f=t.path,h=t.newPath;if(y.equals(f,h))return n;if(y.isAncestor(f,n)||y.equals(f,n)){var p=h.slice();return y.endsBefore(f,h)&&f.length<h.length&&(p[f.length-1]-=1),p.concat(n.slice(f.length))}y.isSibling(f,h)&&(y.isAncestor(h,n)||y.equals(h,n))?y.endsBefore(f,n)?n[f.length-1]-=1:n[f.length-1]+=1:y.endsBefore(h,n)||y.equals(h,n)||y.isAncestor(h,n)?(y.endsBefore(f,n)&&(n[f.length-1]-=1),n[h.length-1]+=1):y.endsBefore(f,n)&&(y.equals(h,n)&&(n[h.length-1]+=1),n[f.length-1]-=1)}return n}},b=d(function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}),w=c(b),E=d(function(e){var t=b.default;e.exports=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports});c(E);var x=d(function(e){var t=b.default;e.exports=function(e){var r=E(e,"string");return"symbol"===t(r)?r:String(r)},e.exports.__esModule=!0,e.exports.default=e.exports});c(x);var S=c(d(function(e){e.exports=function(e,t,r){return(t=x(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports})),C=d(function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports});c(C);var A=d(function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports});c(A);var D=d(function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports});c(D);var T=d(function(e){e.exports=function(e,t){return C(e)||A(e,t)||g(e,t)||D()},e.exports.__esModule=!0,e.exports.default=e.exports}),k=c(T),N=d(function(e){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.__esModule=!0,e.exports.default=e.exports});c(N);var O=d(function(e){e.exports=function(e,t){if(null==e)return{};var r,n,o=N(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o},e.exports.__esModule=!0,e.exports.default=e.exports}),B=c(O),M=["anchor","focus"];function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var I={edges:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,r=void 0!==t&&t,n=e.anchor,o=e.focus;return I.isBackward(e)===r?[n,o]:[o,n]},end:function(e){var t=I.edges(e),r=k(t,2)[1];return r},equals:function(e,t){return Me.equals(e.anchor,t.anchor)&&Me.equals(e.focus,t.focus)},surrounds:function(e,t){var r=I.intersection(e,t);return!!r&&I.equals(r,t)},includes:function(e,t){if(ke.isRange(t)){if(I.includes(e,t.anchor)||I.includes(e,t.focus))return!0;var r=I.edges(e),n=k(r,2),o=n[0],i=n[1],a=I.edges(t),s=k(a,2),u=s[0],l=s[1];return Me.isBefore(o,u)&&Me.isAfter(i,l)}var c=I.edges(e),d=k(c,2),f=d[0],h=d[1],p=!1,g=!1;return ke.isPoint(t)?(p=Me.compare(t,f)>=0,g=Me.compare(t,h)<=0):(p=y.compare(t,f.path)>=0,g=y.compare(t,h.path)<=0),p&&g},intersection:function(e,t){e.anchor,e.focus;var r=B(e,M),n=I.edges(e),o=k(n,2),i=o[0],a=o[1],s=I.edges(t),u=k(s,2),l=u[0],c=u[1],d=Me.isBefore(i,l)?l:i,f=Me.isBefore(a,c)?a:c;return Me.isBefore(f,d)?null:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({anchor:d,focus:f},r)},isBackward:function(e){var t=e.anchor,r=e.focus;return Me.isAfter(t,r)},isCollapsed:function(e){var t=e.anchor,r=e.focus;return Me.equals(t,r)},isExpanded:function(e){return!I.isCollapsed(e)},isForward:function(e){return!I.isBackward(e)},isRange:function(e){return W(e)&&Me.isPoint(e.anchor)&&Me.isPoint(e.focus)},points:function*(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start:function(e){var t=I.edges(e),r=k(t,1)[0];return r},transform:function(e,t){if(null===e)return null;var r,n,o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,i=void 0===o?"inward":o;if("inward"===i){var a=I.isCollapsed(e);I.isForward(e)?(r="forward",n=a?r:"backward"):(r="backward",n=a?r:"forward")}else"outward"===i?I.isForward(e)?(r="backward",n="forward"):(r="forward",n="backward"):(r=i,n=i);var s=Me.transform(e.anchor,t,{affinity:r}),u=Me.transform(e.focus,t,{affinity:n});return s&&u?{anchor:s,focus:u}:null}},P=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;return!!W(e)&&("function"!=typeof e.apply&&(r?V.isNodeList(e.children):Array.isArray(e.children)))},R={isAncestor:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;return W(e)&&V.isNodeList(e.children,{deep:r})},isElement:P,isElementList:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;return Array.isArray(e)&&e.every(function(e){return R.isElement(e,{deep:r})})},isElementProps:function(e){return void 0!==e.children},isElementType:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return P(e)&&e[r]===t},matches:function(e,t){for(var r in t)if("children"!==r&&e[r]!==t[r])return!1;return!0}},L=["text"],_=["children"];function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function H(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return $(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var V={ancestor:function(e,t){var r=V.get(e,t);if(V.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Ie.stringify(r)));return r},ancestors:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){var n,o=H(y.ancestors(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=[V.ancestor(e,i),i];yield a}}catch(e){o.e(e)}finally{o.f()}}()},child:function(e,t){if(V.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Ie.stringify(e)));var r=e.children[t];if(null==r)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Ie.stringify(e)));return r},children:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n=r.reverse,o=void 0!==n&&n,i=V.ancestor(e,t),a=i.children,s=o?a.length-1:0;o?s>=0:s<a.length;){var u=V.child(i,s),l=t.concat(s);yield[u,l],s=o?s-1:s+1}}()},common:function(e,t,r){var n=y.common(t,r);return[V.get(e,n),n]},descendant:function(e,t){var r=V.get(e,t);if(V.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Ie.stringify(r)));return r},descendants:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r,n=H(V.nodes(e,t));try{for(n.s();!(r=n.n()).done;){var o=k(r.value,2),i=o[0],a=o[1];0!==a.length&&(yield[i,a])}}catch(e){n.e(e)}finally{n.f()}}()},elements:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r,n=H(V.nodes(e,t));try{for(n.s();!(r=n.n()).done;){var o=k(r.value,2),i=o[0],a=o[1];V.isElement(i)&&(yield[i,a])}}catch(e){n.e(e)}finally{n.f()}}()},extractProps:function(e){return V.isText(e)?(e.text,B(e,L)):(e.children,B(e,_))},first:function(e,t){for(var r=t.slice(),n=V.get(e,r);n&&!V.isText(n)&&0!==n.children.length;)n=n.children[0],r.push(0);return[n,r]},fragment:function(e,t){var r,n={children:e.children},o=I.edges(t),i=k(o,2),a=i[0],s=i[1],u=V.nodes(n,{reverse:!0,pass:function(e){var r=k(e,2)[1];return!I.includes(t,r)}}),l=H(u);try{var c=function(){var e=k(r.value,2)[1];if(!I.includes(t,e)){var o=e[e.length-1];Ye(n,y.parent(e),function(e){return Ge(e,o,1)})}y.equals(e,s.path)&&Ke(n,e,function(e){var t=e.text.slice(0,s.offset);return j(j({},e),{},{text:t})}),y.equals(e,a.path)&&Ke(n,e,function(e){var t=e.text.slice(a.offset);return j(j({},e),{},{text:t})})};for(l.s();!(r=l.n()).done;)c()}catch(e){l.e(e)}finally{l.f()}return n.children},get:function(e,t){var r=V.getIf(e,t);if(void 0===r)throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Ie.stringify(e)));return r},getIf:function(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(V.isText(r)||!r.children[o])return;r=r.children[o]}return r},has:function(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(V.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isAncestor:function(e){return!V.isText(e)},isEditor:function(e){return"function"==typeof e.apply},isElement:function(e){return Array.isArray(e.children)&&"function"!=typeof e.apply},isNode:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;return He.isText(e)||R.isElement(e,{deep:r})||Te.isEditor(e,{deep:r})},isNodeList:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;return Array.isArray(e)&&e.every(function(e){return V.isNode(e,{deep:r})})},isText:function(e){return"string"==typeof e.text},last:function(e,t){for(var r=t.slice(),n=V.get(e,r);n&&!V.isText(n)&&0!==n.children.length;){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf:function(e,t){var r=V.get(e,t);if(!V.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Ie.stringify(r)));return r},levels:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){var n,o=H(y.levels(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=V.get(e,i);yield[a,i]}}catch(e){o.e(e)}finally{o.f()}}()},matches:function(e,t){return V.isElement(e)&&R.isElementProps(t)&&R.matches(e,t)||V.isText(e)&&He.isTextProps(t)&&He.matches(e,t)},nodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var r=t.pass,n=t.reverse,o=void 0!==n&&n,i=t.from,a=void 0===i?[]:i,s=t.to,u=new Set,l=[],c=e;!s||!(o?y.isBefore(l,s):y.isAfter(l,s));)if(u.has(c)||(yield[c,l]),u.has(c)||V.isText(c)||0===c.children.length||null!=r&&!1!==r([c,l])){if(0===l.length)break;if(!o){var d=y.next(l);if(V.has(e,d)){l=d,c=V.get(e,l);continue}}if(o&&0!==l[l.length-1])l=y.previous(l),c=V.get(e,l);else l=y.parent(l),c=V.get(e,l),u.add(c)}else{u.add(c);var f=o?c.children.length-1:0;y.isAncestor(l,a)&&(f=a[l.length]),l=l.concat(f),c=V.get(e,l)}}()},parent:function(e,t){var r=y.parent(t),n=V.get(e,r);if(V.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string:function(e){return V.isText(e)?e.text:e.children.map(V.string).join("")},texts:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r,n=H(V.nodes(e,t));try{for(n.s();!(r=n.n()).done;){var o=k(r.value,2),i=o[0],a=o[1];V.isText(i)&&(yield[i,a])}}catch(e){n.e(e)}finally{n.f()}}()}};function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var G={isNodeOperation:function(e){return G.isOperation(e)&&e.type.endsWith("_node")},isOperation:function(e){if(!W(e))return!1;switch(e.type){case"insert_node":case"remove_node":return y.isPath(e.path)&&V.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&y.isPath(e.path);case"merge_node":return"number"==typeof e.position&&y.isPath(e.path)&&W(e.properties);case"move_node":return y.isPath(e.path)&&y.isPath(e.newPath);case"set_node":return y.isPath(e.path)&&W(e.properties)&&W(e.newProperties);case"set_selection":return null===e.properties&&I.isRange(e.newProperties)||null===e.newProperties&&I.isRange(e.properties)||W(e.properties)&&W(e.newProperties);case"split_node":return y.isPath(e.path)&&"number"==typeof e.position&&W(e.properties);default:return!1}},isOperationList:function(e){return Array.isArray(e)&&e.every(function(e){return G.isOperation(e)})},isSelectionOperation:function(e){return G.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation:function(e){return G.isOperation(e)&&e.type.endsWith("_text")},inverse:function(e){switch(e.type){case"insert_node":return q(q({},e),{},{type:"remove_node"});case"insert_text":return q(q({},e),{},{type:"remove_text"});case"merge_node":return q(q({},e),{},{type:"split_node",path:y.previous(e.path)});case"move_node":var t=e.newPath,r=e.path;if(y.equals(t,r))return e;if(y.isSibling(r,t))return q(q({},e),{},{path:t,newPath:r});var n=y.transform(r,e),o=y.transform(y.next(r),e);return q(q({},e),{},{path:n,newPath:o});case"remove_node":return q(q({},e),{},{type:"insert_node"});case"remove_text":return q(q({},e),{},{type:"insert_text"});case"set_node":var i=e.properties,a=e.newProperties;return q(q({},e),{},{properties:a,newProperties:i});case"set_selection":var s=e.properties,u=e.newProperties;return q(q({},e),{},null==s?{properties:u,newProperties:null}:null==u?{properties:null,newProperties:s}:{properties:u,newProperties:s});case"split_node":return q(q({},e),{},{type:"merge_node",path:y.next(e.path)})}}},W=function(e){return"object"===w(e)&&null!==e},Y=function e(t,r){for(var n in t){var o=t[n],i=r[n];if(Array.isArray(o)&&Array.isArray(i)){if(o.length!==i.length)return!1;for(var a=0;a<o.length;a++)if(o[a]!==i[a])return!1}else if(W(o)&&W(i)){if(!e(o,i))return!1}else if(o!==i)return!1}for(var s in r)if(void 0===t[s]&&void 0!==r[s])return!1;return!0},K=function(e){return e.selection?e.selection:e.children.length>0?Te.end(e,[]):[0]},X=function(e,t){var r=Te.node(e,t),n=k(r,1)[0];return function(e){return e===n}};function Z(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Q,ee=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!r,o=r?ae(e):e,i=Q.None,a=Q.None,s=0,u=null,l=Z(o);try{for(l.s();!(t=l.n()).done;){var c=t.value,d=c.codePointAt(0);if(!d)break;var f=ye(c,d),h=k(n?[a,f]:[f,i],2);if(i=h[0],a=h[1],be(i,Q.ZWJ)&&be(a,Q.ExtPict)&&!Se(n?e.substring(0,s):e.substring(0,e.length-s)))break;if(be(i,Q.RI)&&be(a,Q.RI)&&!(u=null!==u?!u:!!n||Ae(e.substring(0,e.length-s))))break;if(i!==Q.None&&a!==Q.None&&Ee(i,a))break;s+=c.length}}catch(e){l.e(e)}finally{l.f()}return s||1},te=/\s/,re=/[\u002B\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]/,ne=/['\u2018\u2019]/,oe=function(e,t,r){if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},ie=function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(te.test(t))return!1;if(ne.test(t)){var o=ee(r,n),i=oe(r,o,n),a=k(i,2);if(e(a[0],a[1],n))return!0}return!re.test(t)},ae=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(ue(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(se(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},se=function(e){return e>=55296&&e<=56319},ue=function(e){return 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"}(Q||(Q={}));var le=/^(?:[\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\u0898-\u089F\u08CA-\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\u0C3C\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-\u0ECE\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\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\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-\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\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\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\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\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\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,ce=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,de=/^(?:[\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])$/,fe=/^[\u1100-\u115F\uA960-\uA97C]$/,he=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,pe=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,ge=/^[\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]$/,me=/^[\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]$/,ve=/^(?:[\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])$/,ye=function(e,t){var r=Q.Any;return-1!==e.search(le)&&(r|=Q.Extend),8205===t&&(r|=Q.ZWJ),t>=127462&&t<=127487&&(r|=Q.RI),-1!==e.search(ce)&&(r|=Q.Prepend),-1!==e.search(de)&&(r|=Q.SpacingMark),-1!==e.search(fe)&&(r|=Q.L),-1!==e.search(he)&&(r|=Q.V),-1!==e.search(pe)&&(r|=Q.T),-1!==e.search(ge)&&(r|=Q.LV),-1!==e.search(me)&&(r|=Q.LVT),-1!==e.search(ve)&&(r|=Q.ExtPict),r};function be(e,t){return 0!==(e&t)}var we=[[Q.L,Q.L|Q.V|Q.LV|Q.LVT],[Q.LV|Q.V,Q.V|Q.T],[Q.LVT|Q.T,Q.T],[Q.Any,Q.Extend|Q.ZWJ],[Q.Any,Q.SpacingMark],[Q.Prepend,Q.Any],[Q.ZWJ,Q.ExtPict],[Q.RI,Q.RI]];function Ee(e,t){return-1===we.findIndex(function(r){return be(e,r[0])&&be(t,r[1])})}var xe=/(?:[\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\u0898-\u089F\u08CA-\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\u0C3C\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-\u0ECE\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\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\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-\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\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\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\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\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\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,Se=function(e){return-1!==e.search(xe)},Ce=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Ae=function(e){var t=e.match(Ce);return null!==t&&t[0].length/2%2==1},De=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;if(!W(e))return!1;var n="function"==typeof e.above&&"function"==typeof e.addMark&&"function"==typeof e.after&&"function"==typeof e.apply&&"function"==typeof e.before&&"function"==typeof e.collapse&&"function"==typeof e.delete&&"function"==typeof e.deleteBackward&&"function"==typeof e.deleteForward&&"function"==typeof e.deleteFragment&&"function"==typeof e.deselect&&"function"==typeof e.edges&&"function"==typeof e.elementReadOnly&&"function"==typeof e.end&&"function"==typeof e.first&&"function"==typeof e.fragment&&"function"==typeof e.getDirtyPaths&&"function"==typeof e.getFragment&&"function"==typeof e.getMarks&&"function"==typeof e.hasBlocks&&"function"==typeof e.hasInlines&&"function"==typeof e.hasPath&&"function"==typeof e.hasTexts&&"function"==typeof e.insertBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertNodes&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertText&&"function"==typeof e.isBlock&&"function"==typeof e.isEdge&&"function"==typeof e.isElementReadOnly&&"function"==typeof e.isEmpty&&"function"==typeof e.isEnd&&"function"==typeof e.isInline&&"function"==typeof e.isNormalizing&&"function"==typeof e.isSelectable&&"function"==typeof e.isStart&&"function"==typeof e.isVoid&&"function"==typeof e.last&&"function"==typeof e.leaf&&"function"==typeof e.levels&&"function"==typeof e.liftNodes&&"function"==typeof e.markableVoid&&"function"==typeof e.mergeNodes&&"function"==typeof e.move&&"function"==typeof e.moveNodes&&"function"==typeof e.next&&"function"==typeof e.node&&"function"==typeof e.nodes&&"function"==typeof e.normalize&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.parent&&"function"==typeof e.path&&"function"==typeof e.pathRef&&"function"==typeof e.pathRefs&&"function"==typeof e.point&&"function"==typeof e.pointRef&&"function"==typeof e.pointRefs&&"function"==typeof e.positions&&"function"==typeof e.previous&&"function"==typeof e.range&&"function"==typeof e.rangeRef&&"function"==typeof e.rangeRefs&&"function"==typeof e.removeMark&&"function"==typeof e.removeNodes&&"function"==typeof e.select&&"function"==typeof e.setNodes&&"function"==typeof e.setNormalizing&&"function"==typeof e.setPoint&&"function"==typeof e.setSelection&&"function"==typeof e.shouldMergeNodesRemovePrevNode&&"function"==typeof e.shouldNormalize&&"function"==typeof e.splitNodes&&"function"==typeof e.start&&"function"==typeof e.string&&"function"==typeof e.unhangRange&&"function"==typeof e.unsetNodes&&"function"==typeof e.unwrapNodes&&"function"==typeof e.void&&"function"==typeof e.withoutNormalizing&&"function"==typeof e.wrapNodes&&(null===e.marks||W(e.marks))&&(null===e.selection||I.isRange(e.selection))&&(r?V.isNodeList(e.children)&&G.isOperationList(e.operations):Array.isArray(e.children)&&Array.isArray(e.operations));return n},Te={above:function(e,t){return e.above(t)},addMark:function(e,t,r){e.addMark(t,r)},after:function(e,t,r){return e.after(t,r)},before:function(e,t,r){return e.before(t,r)},deleteBackward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,r=void 0===t?"character":t;e.deleteBackward(r)},deleteForward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,r=void 0===t?"character":t;e.deleteForward(r)},deleteFragment:function(e,t){e.deleteFragment(t)},edges:function(e,t){return e.edges(t)},elementReadOnly:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.elementReadOnly(t)},end:function(e,t){return e.end(t)},first:function(e,t){return e.first(t)},fragment:function(e,t){return e.fragment(t)},hasBlocks:function(e,t){return e.hasBlocks(t)},hasInlines:function(e,t){return e.hasInlines(t)},hasPath:function(e,t){return e.hasPath(t)},hasTexts:function(e,t){return e.hasTexts(t)},insertBreak:function(e){e.insertBreak()},insertFragment:function(e,t,r){e.insertFragment(t,r)},insertNode:function(e,t){e.insertNode(t)},insertSoftBreak:function(e){e.insertSoftBreak()},insertText:function(e,t){e.insertText(t)},isBlock:function(e,t){return e.isBlock(t)},isEdge:function(e,t,r){return e.isEdge(t,r)},isEditor:De,isElementReadOnly:function(e,t){return e.isElementReadOnly(t)},isEmpty:function(e,t){return e.isEmpty(t)},isEnd:function(e,t,r){return e.isEnd(t,r)},isInline:function(e,t){return e.isInline(t)},isNormalizing:function(e){return e.isNormalizing()},isSelectable:function(e,t){return e.isSelectable(t)},isStart:function(e,t,r){return e.isStart(t,r)},isVoid:function(e,t){return e.isVoid(t)},last:function(e,t){return e.last(t)},leaf:function(e,t,r){return e.leaf(t,r)},levels:function(e,t){return e.levels(t)},marks:function(e){return e.getMarks()},next:function(e,t){return e.next(t)},node:function(e,t,r){return e.node(t,r)},nodes:function(e,t){return e.nodes(t)},normalize:function(e,t){e.normalize(t)},parent:function(e,t,r){return e.parent(t,r)},path:function(e,t,r){return e.path(t,r)},pathRef:function(e,t,r){return e.pathRef(t,r)},pathRefs:function(e){return e.pathRefs()},point:function(e,t,r){return e.point(t,r)},pointRef:function(e,t,r){return e.pointRef(t,r)},pointRefs:function(e){return e.pointRefs()},positions:function(e,t){return e.positions(t)},previous:function(e,t){return e.previous(t)},range:function(e,t,r){return e.range(t,r)},rangeRef:function(e,t,r){return e.rangeRef(t,r)},rangeRefs:function(e){return e.rangeRefs()},removeMark:function(e,t){e.removeMark(t)},setNormalizing:function(e,t){e.setNormalizing(t)},start:function(e,t){return e.start(t)},string:function(e,t,r){return e.string(t,r)},unhangRange:function(e,t,r){return e.unhangRange(t,r)},void:function(e,t){return e.void(t)},withoutNormalizing:function(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:function(e,t,r){return e.shouldMergeNodesRemovePrevNode(t,r)}},ke={isLocation:function(e){return y.isPath(e)||Me.isPoint(e)||I.isRange(e)},isPath:function(e){return Array.isArray(e)},isPoint:function(e){return"offset"in e},isRange:function(e){return"anchor"in e},isSpan:function(e){return Array.isArray(e)&&Array.isArray(e[0])}},Ne={isSpan:function(e){return Array.isArray(e)&&2===e.length&&e.every(y.isPath)}};function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Me={compare:function(e,t){var r=y.compare(e.path,t.path);return 0===r?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter:function(e,t){return 1===Me.compare(e,t)},isBefore:function(e,t){return-1===Me.compare(e,t)},equals:function(e,t){return e.offset===t.offset&&y.equals(e.path,t.path)},isPoint:function(e){return W(e)&&"number"==typeof e.offset&&y.isPath(e.path)},transform:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var n=r.affinity,o=void 0===n?"forward":n,i=e.path,a=e.offset;switch(t.type){case"insert_node":case"move_node":i=y.transform(i,t,r);break;case"insert_text":y.equals(t.path,i)&&(t.offset<a||t.offset===a&&"forward"===o)&&(a+=t.text.length);break;case"merge_node":y.equals(t.path,i)&&(a+=t.position),i=y.transform(i,t,r);break;case"remove_text":y.equals(t.path,i)&&t.offset<=a&&(a-=Math.min(a-t.offset,t.text.length));break;case"remove_node":if(y.equals(t.path,i)||y.isAncestor(t.path,i))return null;i=y.transform(i,t,r);break;case"split_node":if(y.equals(t.path,i)){if(t.position===a&&null==o)return null;(t.position<a||t.position===a&&"forward"===o)&&(a-=t.position,i=y.transform(i,t,Be(Be({},r),{},{affinity:"forward"})))}else i=y.transform(i,t,r);break;default:return e}return{path:i,offset:a}}},Fe=void 0,Ie={setScrubber:function(e){Fe=e},stringify:function(e){return JSON.stringify(e,Fe)}},Pe=["text"],Re=["anchor","focus","merge"];function Le(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return _e(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _e(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ze(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var He={equals:function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).loose,n=void 0!==r&&r;function o(e){return e.text,B(e,Pe)}return Y(n?o(e):e,n?o(t):t)},isText:function(e){return W(e)&&"string"==typeof e.text},isTextList:function(e){return Array.isArray(e)&&e.every(function(e){return He.isText(e)})},isTextProps:function(e){return void 0!==e.text},matches:function(e,t){for(var r in t)if("text"!==r&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations:function(e,t){var r,n=[{leaf:je({},e)}],o=Le(t);try{for(o.s();!(r=o.n()).done;){var i,a=r.value,s=(a.anchor,a.focus,a.merge),u=B(a,Re),l=I.edges(a),c=k(l,2),d=c[0],f=c[1],h=[],p=0,g=d.offset,m=f.offset,v=null!=s?s:Object.assign,y=Le(n);try{for(y.s();!(i=y.n()).done;){var b=i.value.leaf,w=b.text.length,E=p;if(p+=w,g<=E&&p<=m)v(b,u),h.push({leaf:b});else if(g!==m&&(g===p||m===E)||g>p||m<E||m===E&&0!==E)h.push({leaf:b});else{var x=b,S=void 0,C=void 0;if(m<p){var A=m-E;C={leaf:je(je({},x),{},{text:x.text.slice(A)})},x=je(je({},x),{},{text:x.text.slice(0,A)})}if(g>E){var D=g-E;S={leaf:je(je({},x),{},{text:x.text.slice(0,D)})},x=je(je({},x),{},{text:x.text.slice(D)})}v(x,u),S&&h.push(S),h.push({leaf:x}),C&&h.push(C)}}}catch(e){y.e(e)}finally{y.f()}n=h}}catch(e){o.e(e)}finally{o.f()}if(n.length>1){var T,N=0,O=Le(n.entries());try{for(O.s();!(T=O.n()).done;){var M=k(T.value,2),F=M[0],P=M[1],R=N,L=R+P.leaf.text.length,_={start:R,end:L};0===F&&(_.isFirst=!0),F===n.length-1&&(_.isLast=!0),P.position=_,N=L}}catch(e){O.e(e)}finally{O.f()}}return n}};function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$e(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Ue=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return[].concat(v(e.slice(0,t)),n,v(e.slice(t)))},qe=function(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return[].concat(v(e.slice(0,t)),o,v(e.slice(t+r)))},Ge=qe,We=function(e,t,r){if(0===t.length)throw new Error("Cannot modify the editor");for(var n=V.get(e,t),o=t.slice(),i=r(n);o.length>1;){var a=o.pop(),s=V.get(e,o);i=Ve(Ve({},s),{},{children:qe(s.children,a,1,i)})}var u=o.pop();e.children=qe(e.children,u,1,i)},Ye=function(e,t,r){0===t.length?e.children=r(e.children):We(e,t,function(e){if(V.isText(e))throw new Error("Cannot get the element at path [".concat(t,"] because it refers to a leaf node: ").concat(Ie.stringify(e)));return Ve(Ve({},e),{},{children:r(e.children)})})},Ke=function(e,t,r){return We(e,t,function(e){if(!V.isText(e))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Ie.stringify(e)));return r(e)})};function Xe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ze(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ze(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var et={transform:function(e,t){var r=!1;switch(t.type){case"insert_node":var n=t.path,o=t.node;Ye(e,y.parent(n),function(e){var t=n[n.length-1];if(t>e.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));return Ue(e,t,o)}),r=!0;break;case"insert_text":var i=t.path,a=t.offset,s=t.text;if(0===s.length)break;Ke(e,i,function(e){var t=e.text.slice(0,a),r=e.text.slice(a);return Qe(Qe({},e),{},{text:t+s+r})}),r=!0;break;case"merge_node":var u=t.path,l=u[u.length-1],c=y.previous(u),d=c[c.length-1];Ye(e,y.parent(u),function(e){var t,r=e[l],n=e[d];if(V.isText(r)&&V.isText(n))t=Qe(Qe({},n),{},{text:n.text+r.text});else{if(!V.isElement(r)||!V.isElement(n))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(u,"] to nodes of different interfaces: ").concat(Ie.stringify(r)," ").concat(Ie.stringify(n)));t=Qe(Qe({},n),{},{children:n.children.concat(r.children)})}return qe(e,d,2,t)}),r=!0;break;case"move_node":var f=t.path,h=t.newPath,p=f[f.length-1];if(y.isAncestor(f,h))throw new Error("Cannot move a path [".concat(f,"] to new path [").concat(h,"] because the destination is inside itself."));var g=V.get(e,f);Ye(e,y.parent(f),function(e){return Ge(e,p,1)});var m=y.transform(f,t),v=m[m.length-1];Ye(e,y.parent(m),function(e){return Ue(e,v,g)}),r=!0;break;case"remove_node":var b=t.path,w=b[b.length-1];if(Ye(e,y.parent(b),function(e){return Ge(e,w,1)}),e.selection){var E,x=Qe({},e.selection),S=Xe(I.points(x));try{for(S.s();!(E=S.n()).done;){var C=k(E.value,2),A=C[0],D=C[1],T=Me.transform(A,t);if(null!=x&&null!=T)x[D]=T;else{var N,O=void 0,B=void 0,M=Xe(V.texts(e));try{for(M.s();!(N=M.n()).done;){var F=k(N.value,2),P=F[0],R=F[1];if(-1!==y.compare(R,b)){B=[P,R];break}O=[P,R]}}catch(e){M.e(e)}finally{M.f()}var L=!1;O&&B&&(L=!y.isSibling(O[1],b)&&(!!y.equals(B[1],b)||y.common(O[1],b).length<y.common(B[1],b).length)),O&&!L?x[D]={path:O[1],offset:O[0].text.length}:B?x[D]={path:B[1],offset:0}:x=null}}}catch(e){S.e(e)}finally{S.f()}x&&I.equals(x,e.selection)||(e.selection=x)}break;case"remove_text":var _=t.path,z=t.offset,j=t.text;if(0===j.length)break;Ke(e,_,function(e){var t=e.text.slice(0,z),r=e.text.slice(z+j.length);return Qe(Qe({},e),{},{text:t+r})}),r=!0;break;case"set_node":var H=t.path,$=t.properties,U=t.newProperties;if(0===H.length)throw new Error("Cannot set properties on the root node!");We(e,H,function(e){var t=Qe({},e);for(var r in U){if("children"===r||"text"===r)throw new Error('Cannot set the "'.concat(r,'" property of nodes!'));var n=U[r];null==n?delete t[r]:t[r]=n}for(var o in $)U.hasOwnProperty(o)||delete t[o];return t});break;case"set_selection":var q=t.newProperties;if(null==q){e.selection=null;break}if(null==e.selection){if(!q.anchor||!q.focus)throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ie.stringify(q)," when there is no current selection."));e.selection=Qe({},q);break}var G=Qe({},e.selection);for(var W in q){var Y=q[W];if(null==Y){if("anchor"===W||"focus"===W)throw new Error('Cannot remove the "'.concat(W,'" selection property'));delete G[W]}else G[W]=Y}e.selection=G;break;case"split_node":var K=t.path,X=t.position,Z=t.properties,J=K[K.length-1];if(0===K.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(K,"] because the root node cannot be split."));Ye(e,y.parent(K),function(e){var t,r,n=e[J];if(V.isText(n)){var o=n.text.slice(0,X),i=n.text.slice(X);t=Qe(Qe({},n),{},{text:o}),r=Qe(Qe({},Z),{},{text:i})}else{var a=n.children.slice(0,X),s=n.children.slice(X);t=Qe(Qe({},n),{},{children:a}),r=Qe(Qe({},Z),{},{children:s})}return qe(e,J,1,t,r)}),r=!0}if(r&&e.selection){var Q,ee=Qe({},e.selection),te=Xe(I.points(ee));try{for(te.s();!(Q=te.n()).done;){var re=k(Q.value,2),ne=re[0];ee[re[1]]=Me.transform(ne,t)}}catch(e){te.e(e)}finally{te.f()}I.equals(ee,e.selection)||(e.selection=ee)}}},tt={delete:function(e,t){e.delete(t)},insertFragment:function(e,t,r){e.insertFragment(t,r)},insertText:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Te.withoutNormalizing(e,function(){var n=r.voids,o=void 0!==n&&n,i=r.at,a=void 0===i?K(e):i;if(ke.isPath(a)&&(a=Te.range(e,a)),ke.isRange(a))if(I.isCollapsed(a))a=a.anchor;else{var s=I.end(a);if(!o&&Te.void(e,{at:s}))return;var u=I.start(a),l=Te.pointRef(e,u),c=Te.pointRef(e,s);ot.delete(e,{at:a,voids:o});var d=l.unref(),f=c.unref();a=d||f,ot.setSelection(e,{anchor:a,focus:a})}if(!(!o&&Te.void(e,{at:a})||Te.elementReadOnly(e,{at:a}))){var h=a,p=h.path,g=h.offset;t.length>0&&e.apply({type:"insert_text",path:p,offset:g,text:t})}})}};function rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ot=nt(nt(nt(nt({},et),{insertNodes:function(e,t,r){e.insertNodes(t,r)},liftNodes:function(e,t){e.liftNodes(t)},mergeNodes:function(e,t){e.mergeNodes(t)},moveNodes:function(e,t){e.moveNodes(t)},removeNodes:function(e,t){e.removeNodes(t)},setNodes:function(e,t,r){e.setNodes(t,r)},splitNodes:function(e,t){e.splitNodes(t)},unsetNodes:function(e,t,r){e.unsetNodes(t,r)},unwrapNodes:function(e,t){e.unwrapNodes(t)},wrapNodes:function(e,t,r){e.wrapNodes(t,r)}}),{collapse:function(e,t){e.collapse(t)},deselect:function(e){e.deselect()},move:function(e,t){e.move(t)},select:function(e,t){e.select(t)},setPoint:function(e,t,r){e.setPoint(t,r)},setSelection:function(e,t){e.setSelection(t)}}),tt),it=new WeakMap;function at(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return st(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return st(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ut(e,t,r){var i,a,s=n.get(e)||[],u=o.get(e)||new Set,l=function(e){if(e){var t=e.join(",");a.has(t)||(a.add(t),i.push(e))}};if(r){i=[],a=new Set;var c,d=at(s);try{for(d.s();!(c=d.n()).done;){l(r(c.value))}}catch(e){d.e(e)}finally{d.f()}}else i=s,a=u;var f,h=at(t);try{for(h.s();!(f=h.n()).done;){l(f.value)}}catch(e){h.e(e)}finally{h.f()}n.set(e,i),o.set(e,a)}function lt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ct(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ct(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var dt=function(n,o){var a,s=lt(Te.pathRefs(n));try{for(s.s();!(a=s.n()).done;){var u=a.value;e.transform(u,o)}}catch(e){s.e(e)}finally{s.f()}var l,c=lt(Te.pointRefs(n));try{for(c.s();!(l=c.n()).done;){var d=l.value;t.transform(d,o)}}catch(e){c.e(e)}finally{c.f()}var f,h=lt(Te.rangeRefs(n));try{for(h.s();!(f=h.n()).done;){var p=f.value;r.transform(p,o)}}catch(e){h.e(e)}finally{h.f()}if(!function(e){return it.get(e)||!1}(n)){var g=y.operationCanTransformPath(o)?function(e){return y.transform(e,o)}:void 0;ut(n,n.getDirtyPaths(o),g)}ot.transform(n,o),n.operations.push(o),Te.normalize(n,{operation:o}),"set_selection"===o.type&&(n.marks=null),i.get(n)||(i.set(n,!0),Promise.resolve().then(function(){i.set(n,!1),n.onChange({operation:o}),n.operations=[]}))};function ft(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ht(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ht(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var pt=function(e,t){switch(t.type){case"insert_text":case"remove_text":case"set_node":var r=t.path;return y.levels(r);case"insert_node":var n=t.node,o=t.path,i=y.levels(o),a=V.isText(n)?[]:Array.from(V.nodes(n),function(e){var t=k(e,2)[1];return o.concat(t)});return[].concat(v(i),v(a));case"merge_node":var s=t.path,u=y.ancestors(s),l=y.previous(s);return[].concat(v(u),[l]);case"move_node":var c=t.path,d=t.newPath;if(y.equals(c,d))return[];var f,h=[],p=[],g=ft(y.ancestors(c));try{for(g.s();!(f=g.n()).done;){var m=f.value,b=y.transform(m,t);h.push(b)}}catch(e){g.e(e)}finally{g.f()}var w,E=ft(y.ancestors(d));try{for(E.s();!(w=E.n()).done;){var x=w.value,S=y.transform(x,t);p.push(S)}}catch(e){E.e(e)}finally{E.f()}var C=p[p.length-1],A=d[d.length-1],D=C.concat(A);return[].concat(h,p,[D]);case"remove_node":var T=t.path,N=y.ancestors(T);return v(N);case"split_node":var O=t.path,B=y.levels(O),M=y.next(O);return[].concat(v(B),[M]);default:return[]}},gt=function(e){var t=e.selection;return t?V.fragment(e,t):[]},mt=function(e,t,r){var n=k(t,2),o=n[0],i=n[1];if(!V.isText(o)){"children"in o||(o.children=[]);var a=o;if(a!==e&&0===a.children.length){ot.insertNodes(e,{text:""},{at:i.concat(0),voids:!0}),a=V.get(e,i)}if(!(a===e)&&(e.isInline(a)||V.isText(a.children[0])||e.isInline(a.children[0])))for(var s=0;s<a.children.length;s++){var u=a.children[s],l=a.children[s-1];if(V.isText(u))null!=l&&V.isText(l)&&(""===u.text?(ot.removeNodes(e,{at:i.concat(s),voids:!0}),a=V.get(e,i),s--):""===l.text?(ot.removeNodes(e,{at:i.concat(s-1),voids:!0}),a=V.get(e,i),s--):He.equals(u,l,{loose:!0})&&(ot.mergeNodes(e,{at:i.concat(s),voids:!0}),a=V.get(e,i),s--));else if(e.isInline(u)){if(null==l||!V.isText(l)){ot.insertNodes(e,{text:""},{at:i.concat(s),voids:!0}),a=V.get(e,i),s++}if(s===a.children.length-1){ot.insertNodes(e,{text:""},{at:i.concat(s+1),voids:!0}),a=V.get(e,i),s++}}else ot.unwrapNodes(e,{at:i.concat(s),voids:!0}),a=V.get(e,i),s--}else for(var c=0;c<a.children.length;c++){var d=a.children[c];(V.isText(d)||e.isInline(d))&&(null!=r&&r.fallbackElement?ot.wrapNodes(e,r.fallbackElement(),{at:i.concat(c),voids:!0}):ot.removeNodes(e,{at:i.concat(c),voids:!0}),a=V.get(e,i),c--)}}},vt=function(e,t){var r=t.iteration,n=42*t.initialDirtyPathsLength;if(r>n)throw new Error("Could not completely normalize the editor after ".concat(n," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},yt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.voids,n=void 0!==r&&r,o=t.mode,i=void 0===o?"lowest":o,a=t.at,s=void 0===a?e.selection:a,u=t.match;if(s){var l=Te.path(e,s);if(!ke.isRange(s)||y.equals(s.focus.path,s.anchor.path)){if(0===l.length)return;l=y.parent(l)}var c="lowest"===i,d=Te.levels(e,{at:l,voids:n,match:u,reverse:c});return k(d,1)[0]}};function bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Et=function(e,t,r){var n=e.selection;if(n){var o=function(t,r){if(!V.isText(t))return!1;var n=Te.parent(e,r),o=k(n,2),i=o[0];return o[1],!e.isVoid(i)||e.markableVoid(i)},a=I.isExpanded(n),s=!1;if(!a){var u=Te.node(e,n),l=k(u,2),c=l[0],d=l[1];if(c&&o(c,d)){var f=Te.parent(e,d),h=k(f,1)[0];s=h&&e.markableVoid(h)}}if(a||s)ot.setNodes(e,S({},t,r),{match:o,split:!0,voids:!0});else{var p=wt(wt({},Te.marks(e)||{}),{},S({},t,r));e.marks=p,i.get(e)||e.onChange()}}};function xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function St(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ct(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return At(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return At(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function At(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Dt=function(e,t){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:Te.point(e,t,{edge:"end"}),focus:Te.end(e,[])},a=o.distance,s=void 0===a?1:a,u=0,l=Ct(Te.positions(e,St(St({},o),{},{at:i})));try{for(l.s();!(n=l.n()).done;){var c=n.value;if(u>s)break;0!==u&&(r=c),u++}}catch(e){l.e(e)}finally{l.f()}return r};function Tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Nt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ot(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ot(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ot(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Bt=function(e,t){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:Te.start(e,[]),focus:Te.point(e,t,{edge:"start"})},a=o.distance,s=void 0===a?1:a,u=0,l=Nt(Te.positions(e,kt(kt({},o),{},{at:i,reverse:!0})));try{for(l.s();!(n=l.n()).done;){var c=n.value;if(u>s)break;0!==u&&(r=c),u++}}catch(e){l.e(e)}finally{l.f()}return r},Mt=function(e,t){var r=e.selection;r&&I.isCollapsed(r)&&ot.delete(e,{unit:t,reverse:!0})},Ft=function(e,t){var r=e.selection;r&&I.isCollapsed(r)&&ot.delete(e,{unit:t})},It=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).direction,r=void 0===t?"forward":t,n=e.selection;n&&I.isExpanded(n)&&ot.delete(e,{reverse:"backward"===r})},Pt=function(e,t){return[Te.start(e,t),Te.end(e,t)]};function Rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var _t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Te.above(e,Lt(Lt({},t),{},{match:function(t){return V.isElement(t)&&Te.isElementReadOnly(e,t)}}))},zt=function(e,t){return Te.point(e,t,{edge:"end"})},jt=function(e,t){var r=Te.path(e,t,{edge:"start"});return Te.node(e,r)},Ht=function(e,t){var r=Te.range(e,t);return V.fragment(e,r)};function $t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Vt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$t(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$t(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Ut=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Te.above(e,Vt(Vt({},t),{},{match:function(t){return V.isElement(t)&&Te.isVoid(e,t)}}))},qt=function(e,t){return t.children.some(function(t){return V.isElement(t)&&Te.isBlock(e,t)})},Gt=function(e,t){return t.children.some(function(t){return V.isText(t)||Te.isInline(e,t)})},Wt=function(e,t){return V.has(e,t)},Yt=function(e,t){return t.children.every(function(e){return V.isText(e)})},Kt=function(e){ot.splitNodes(e,{always:!0})},Xt=function(e,t,r){ot.insertNodes(e,t,r)},Zt=function(e){ot.splitNodes(e,{always:!0})};function Jt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var Qt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=e.selection,o=e.marks;if(n){if(o){var i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({text:t},o);ot.insertNodes(e,i,{at:r.at,voids:r.voids})}else ot.insertText(e,t,r);e.marks=null}},er=function(e,t){return!e.isInline(t)},tr=function(e,t,r){return Te.isStart(e,t,r)||Te.isEnd(e,t,r)},rr=function(e,t){var r=t.children,n=k(r,1)[0];return 0===r.length||1===r.length&&V.isText(n)&&""===n.text&&!e.isVoid(t)},nr=function(e,t,r){var n=Te.end(e,r);return Me.equals(t,n)},or=function(e){var t=a.get(e);return void 0===t||t},ir=function(e,t,r){if(0!==t.offset)return!1;var n=Te.start(e,r);return Me.equals(t,n)},ar=function(e,t){var r=Te.path(e,t,{edge:"end"});return Te.node(e,r)},sr=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Te.path(e,t,r);return[V.leaf(e,n),n]};function ur(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return lr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r=t.at,n=void 0===r?e.selection:r,o=t.reverse,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.match;if(null==u&&(u=function(){return!0}),n){var l,c=[],d=Te.path(e,n),f=ur(V.levels(e,d));try{for(f.s();!(l=f.n()).done;){var h=k(l.value,2),p=h[0],g=h[1];if(u(p,g)&&(c.push([p,g]),!s&&V.isElement(p)&&Te.isVoid(e,p)))break}}catch(e){f.e(e)}finally{f.f()}i&&c.reverse(),yield*c}}()}var dr=["text"],fr=["text"],hr=function(e){var t=e.marks,r=e.selection;if(!r)return null;var n=r.anchor,o=r.focus;if(t)return t;if(I.isExpanded(r)){if(I.isBackward(r)){var i=[n,o];o=i[0],n=i[1]}if(Te.isEnd(e,n,n.path)){var a=Te.after(e,n);a&&(n=a)}var s=Te.nodes(e,{match:V.isText,at:{anchor:n,focus:o}}),u=k(s,1)[0];if(u){var l=k(u,1)[0];return l.text,B(l,dr)}return{}}var c=n.path,d=Te.leaf(e,c),f=k(d,1)[0];if(0===n.offset){var h=Te.previous(e,{at:c,match:V.isText}),p=Te.above(e,{match:function(t){return V.isElement(t)&&Te.isVoid(e,t)&&e.markableVoid(t)}});if(!p){var g=Te.above(e,{match:function(t){return V.isElement(t)&&Te.isBlock(e,t)}});if(h&&g){var m=k(h,2),v=m[0],b=m[1],w=k(g,2)[1];y.isAncestor(w,b)&&(f=v)}}}var E=f;return E.text,B(E,fr)},pr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.mode,n=void 0===r?"lowest":r,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=Te.after(e,u,{voids:i});if(l){var c=Te.last(e,[]),d=k(c,2)[1],f=[l.path,d];if(ke.isPath(u)&&0===u.length)throw new Error("Cannot get the next node from the root node!");if(null==a)if(ke.isPath(u)){var h=Te.parent(e,u),p=k(h,1)[0];a=function(e){return p.children.includes(e)}}else a=function(){return!0};var g=Te.nodes(e,{at:f,match:a,mode:n,voids:i}),m=k(g,1)[0];return m}}},gr=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Te.path(e,t,r),o=V.get(e,n);return[o,n]};function mr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return vr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function vr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r=t.at,n=void 0===r?e.selection:r,o=t.mode,i=void 0===o?"all":o,a=t.universal,s=void 0!==a&&a,u=t.reverse,l=void 0!==u&&u,c=t.voids,d=void 0!==c&&c,f=t.pass,h=t.match;if(h||(h=function(){return!0}),n){var p,g;if(ke.isSpan(n))p=n[0],g=n[1];else{var m=Te.path(e,n,{edge:"start"}),v=Te.path(e,n,{edge:"end"});p=l?v:m,g=l?m:v}var b,w,E=V.nodes(e,{reverse:l,from:p,to:g,pass:function(t){var r=k(t,2),n=r[0],o=r[1];return!(!f||!f([n,o]))||!!V.isElement(n)&&!(d||!Te.isVoid(e,n)&&!Te.isElementReadOnly(e,n))}}),x=[],S=mr(E);try{for(S.s();!(w=S.n()).done;){var C=k(w.value,2),A=C[0],D=C[1],T=b&&0===y.compare(D,b[1]);if("highest"!==i||!T)if(h(A,D))if("lowest"===i&&T)b=[A,D];else{var N="lowest"===i?b:[A,D];N&&(s?x.push(N):yield N),b=[A,D]}else if(s&&!T&&V.isText(A))return}}catch(e){S.e(e)}finally{S.f()}"lowest"===i&&b&&(s?x.push(b):yield b),s&&(yield*x)}}()}function br(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return wr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function wr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Er=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.force,i=void 0!==r&&r,a=t.operation,s=function(e){return n.get(e)||[]},u=function(e){var t=s(e).pop(),r=t.join(",");return function(e){return o.get(e)||new Set}(e).delete(r),t};if(Te.isNormalizing(e)){if(i){var l=Array.from(V.nodes(e),function(e){return k(e,2)[1]}),c=new Set(l.map(function(e){return e.join(",")}));n.set(e,l),o.set(e,c)}0!==s(e).length&&Te.withoutNormalizing(e,function(){var t,r=br(s(e));try{for(r.s();!(t=r.n()).done;){var n=t.value;if(V.has(e,n)){var o=Te.node(e,n),i=k(o,2),l=i[0];i[1];V.isElement(l)&&0===l.children.length&&e.normalizeNode(o,{operation:a})}}}catch(e){r.e(e)}finally{r.f()}for(var c=s(e),d=c.length,f=0;0!==c.length;){if(!e.shouldNormalize({dirtyPaths:c,iteration:f,initialDirtyPathsLength:d,operation:a}))return;var h=u(e);if(V.has(e,h)){var p=Te.node(e,h);e.normalizeNode(p,{operation:a})}f++,c=s(e)}})}},xr=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Te.path(e,t,r),o=y.parent(n);return Te.node(e,o)},Sr=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,n={current:t,affinity:void 0===r?"forward":r,unref:function(){var t=n.current;return Te.pathRefs(e).delete(n),n.current=null,t}};return Te.pathRefs(e).add(n),n},Cr=function(e){var t=s.get(e);return t||(t=new Set,s.set(e,t)),t},Ar=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.depth,o=r.edge;if(ke.isPath(t))if("start"===o){var i=V.first(e,t);t=k(i,2)[1]}else if("end"===o){var a=V.last(e,t);t=k(a,2)[1]}return ke.isRange(t)&&(t="start"===o?I.start(t):"end"===o?I.end(t):y.common(t.anchor.path,t.focus.path)),ke.isPoint(t)&&(t=t.path),null!=n&&(t=t.slice(0,n)),t},Dr=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,n={current:t,affinity:void 0===r?"forward":r,unref:function(){var t=n.current;return Te.pointRefs(e).delete(n),n.current=null,t}};return Te.pointRefs(e).add(n),n},Tr=function(e){var t=u.get(e);return t||(t=new Set,u.set(e,t)),t},kr=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).edge,n=void 0===r?"start":r;if(ke.isPath(t)){var o;if("end"===n){var i=V.last(e,t);o=k(i,2)[1]}else{var a=V.first(e,t);o=k(a,2)[1]}var s=V.get(e,o);if(!V.isText(s))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:o,offset:"end"===n?s.text.length:0}}if(ke.isRange(t)){var u=I.edges(t),l=k(u,2),c=l[0],d=l[1];return"start"===n?c:d}return t};function Nr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Or(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Or(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Or(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Br(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r=t.at,n=void 0===r?e.selection:r,o=t.unit,i=void 0===o?"offset":o,a=t.reverse,s=void 0!==a&&a,u=t.voids,l=void 0!==u&&u;if(n){var c,d=Te.range(e,n),f=I.edges(d),h=k(f,2),p=h[0],g=h[1],m=s?g:p,v=!1,b="",w=0,E=0,x=0,S=[],C=Nr(Te.nodes(e,{at:n,reverse:s,voids:l}));try{var A=function*(){var t=k(c.value,2),r=t[0],n=t[1],o=S.some(function(e){return y.isAncestor(e,n)});function*a(e){o||(yield e)}if(V.isElement(r)){if(!e.isSelectable(r)){if(S.push(n),s)return y.hasPrevious(n)&&(yield*a(Te.end(e,y.previous(n)))),0;var u=y.next(n);return Te.hasPath(e,u)&&(yield*a(Te.start(e,u))),0}if(!l&&(e.isVoid(r)||e.isElementReadOnly(r)))return yield*a(Te.start(e,n)),0;if(e.isInline(r))return 0;if(Te.hasInlines(e,r)){var d=y.isAncestor(n,g.path)?g:Te.end(e,n),f=y.isAncestor(n,p.path)?p:Te.start(e,n);b=Te.string(e,{anchor:f,focus:d},{voids:l}),v=!0}}if(V.isText(r)){var h=y.equals(n,m.path);for(h?(E=s?m.offset:r.text.length-m.offset,x=m.offset):(E=r.text.length,x=s?E:0),(h||v||"offset"===i)&&(yield*a({path:n,offset:x}),v=!1);;){if(0===w){if(""===b)break;w=D(b,i,s),b=oe(b,w,s)[1]}if(x=s?x-w:x+w,(E-=w)<0){w=-E;break}w=0,yield*a({path:n,offset:x})}}};for(C.s();!(c=C.n()).done;)yield*A()}catch(e){C.e(e)}finally{C.f()}}function D(e,t,r){return"character"===t?ee(e,r):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=0,n=!1;e.length>0;){var o=ee(e,t),i=oe(e,o,t),a=k(i,2),s=a[0],u=a[1];if(ie(s,u,t))n=!0,r+=o;else{if(n)break;r+=o}e=u}return r}(e,r):"line"===t||"block"===t?e.length:1}}()}var Mr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.mode,n=void 0===r?"lowest":r,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=Te.before(e,u,{voids:i});if(l){var c=Te.first(e,[]),d=k(c,2)[1],f=[l.path,d];if(ke.isPath(u)&&0===u.length)throw new Error("Cannot get the previous node from the root node!");if(null==a)if(ke.isPath(u)){var h=Te.parent(e,u),p=k(h,1)[0];a=function(e){return p.children.includes(e)}}else a=function(){return!0};var g=Te.nodes(e,{reverse:!0,at:f,match:a,mode:n,voids:i}),m=k(g,1)[0];return m}}},Fr=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,n={current:t,affinity:void 0===r?"forward":r,unref:function(){var t=n.current;return Te.rangeRefs(e).delete(n),n.current=null,t}};return Te.rangeRefs(e).add(n),n},Ir=function(e){var t=l.get(e);return t||(t=new Set,l.set(e,t)),t},Pr=function(e,t,r){return ke.isRange(t)&&!r?t:{anchor:Te.start(e,t),focus:Te.end(e,r||t)}};function Rr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var Lr=function(e,t){var r=e.selection;if(r){var n=function(t,r){if(!V.isText(t))return!1;var n=Te.parent(e,r),o=k(n,2),i=o[0];return o[1],!e.isVoid(i)||e.markableVoid(i)},o=I.isExpanded(r),a=!1;if(!o){var s=Te.node(e,r),u=k(s,2),l=u[0],c=u[1];if(l&&n(l,c)){var d=Te.parent(e,c),f=k(d,1)[0];a=f&&e.markableVoid(f)}}if(o||a)ot.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var h=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rr(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},Te.marks(e)||{});delete h[t],e.marks=h,i.get(e)||e.onChange()}}},_r=function(e,t){a.set(e,t)},zr=function(e,t){return Te.point(e,t,{edge:"start"})};function jr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Hr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var $r=function(e,t){var r,n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,o=void 0!==n&&n,i=Te.range(e,t),a=I.edges(i),s=k(a,2),u=s[0],l=s[1],c="",d=jr(Te.nodes(e,{at:i,match:V.isText,voids:o}));try{for(d.s();!(r=d.n()).done;){var f=k(r.value,2),h=f[0],p=f[1],g=h.text;y.equals(p,l.path)&&(g=g.slice(0,l.offset)),y.equals(p,u.path)&&(g=g.slice(u.offset)),c+=g}}catch(e){d.e(e)}finally{d.f()}return c};function Vr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ur(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ur(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ur(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var qr=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,n=void 0!==r&&r,o=I.edges(t),i=k(o,2),a=i[0],s=i[1];if(0!==a.offset||0!==s.offset||I.isCollapsed(t)||y.hasPrevious(s.path))return t;var u,l=Te.above(e,{at:s,match:function(t){return V.isElement(t)&&Te.isBlock(e,t)},voids:n}),c=l?l[1]:[],d={anchor:Te.start(e,a),focus:s},f=!0,h=Vr(Te.nodes(e,{at:d,match:V.isText,reverse:!0,voids:n}));try{for(h.s();!(u=h.n()).done;){var p=k(u.value,2),g=p[0],m=p[1];if(f)f=!1;else if(""!==g.text||y.isBefore(m,c)){s={path:m,offset:g.text.length};break}}}catch(e){h.e(e)}finally{h.f()}return{anchor:a,focus:s}},Gr=function(e,t){var r=Te.isNormalizing(e);Te.setNormalizing(e,!1);try{t()}finally{Te.setNormalizing(e,r)}Te.normalize(e)},Wr=function(e,t,r){var n=k(t,2),o=n[0],i=n[1],a=k(r,2);return a[0],a[1],V.isElement(o)&&Te.isEmpty(e,o)||V.isText(o)&&""===o.text&&0!==i[i.length-1]};function Yr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Kr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Kr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Xr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r,n,o=t.reverse,i=void 0!==o&&o,a=t.unit,s=void 0===a?"character":a,u=t.distance,l=void 0===u?1:u,c=t.voids,d=void 0!==c&&c,f=t.at,h=void 0===f?e.selection:f,p=t.hanging,g=void 0!==p&&p;if(h){var m=!1;if(ke.isRange(h)&&I.isCollapsed(h)&&(m=!0,h=h.anchor),ke.isPoint(h)){var v=Te.void(e,{at:h,mode:"highest"});if(!d&&v){h=k(v,2)[1]}else{var b={unit:s,distance:l};h={anchor:h,focus:i?Te.before(e,h,b)||Te.start(e,[]):Te.after(e,h,b)||Te.end(e,[])},g=!0}}if(ke.isPath(h))ot.removeNodes(e,{at:h,voids:d});else if(!I.isCollapsed(h)){if(!g){var w=I.edges(h),E=k(w,2)[1],x=Te.end(e,[]);Me.equals(E,x)||(h=Te.unhangRange(e,h,{voids:d}))}var S=I.edges(h),C=k(S,2),A=C[0],D=C[1],T=Te.above(e,{match:function(t){return V.isElement(t)&&Te.isBlock(e,t)},at:A,voids:d}),N=Te.above(e,{match:function(t){return V.isElement(t)&&Te.isBlock(e,t)},at:D,voids:d}),O=T&&N&&!y.equals(T[1],N[1]),B=y.equals(A.path,D.path),M=d?null:null!==(r=Te.void(e,{at:A,mode:"highest"}))&&void 0!==r?r:Te.elementReadOnly(e,{at:A,mode:"highest"}),F=d?null:null!==(n=Te.void(e,{at:D,mode:"highest"}))&&void 0!==n?n:Te.elementReadOnly(e,{at:D,mode:"highest"});if(M){var P=Te.before(e,A);P&&T&&y.isAncestor(T[1],P.path)&&(A=P)}if(F){var R=Te.after(e,D);R&&N&&y.isAncestor(N[1],R.path)&&(D=R)}var L,_,z=[],j=Yr(Te.nodes(e,{at:h,voids:d}));try{for(j.s();!(_=j.n()).done;){var H=_.value,$=k(H,2),U=$[0],q=$[1];L&&0===y.compare(q,L)||(!d&&V.isElement(U)&&(Te.isVoid(e,U)||Te.isElementReadOnly(e,U))||!y.isCommon(q,A.path)&&!y.isCommon(q,D.path))&&(z.push(H),L=q)}}catch(e){j.e(e)}finally{j.f()}var G=Array.from(z,function(t){var r=k(t,2)[1];return Te.pathRef(e,r)}),W=Te.pointRef(e,A),Y=Te.pointRef(e,D),K="";if(!B&&!M){var X=W.current,Z=Te.leaf(e,X),J=k(Z,1)[0],Q=X.path,ee=A.offset,te=J.text.slice(ee);te.length>0&&(e.apply({type:"remove_text",path:Q,offset:ee,text:te}),K=te)}if(G.reverse().map(function(e){return e.unref()}).filter(function(e){return null!==e}).forEach(function(t){return ot.removeNodes(e,{at:t,voids:d})}),!F){var re=Y.current,ne=Te.leaf(e,re),oe=k(ne,1)[0],ie=re.path,ae=B?A.offset:0,se=oe.text.slice(ae,D.offset);se.length>0&&(e.apply({type:"remove_text",path:ie,offset:ae,text:se}),K=se)}!B&&O&&Y.current&&W.current&&ot.mergeNodes(e,{at:Y.current,hanging:!0,voids:d}),m&&i&&"character"===s&&K.length>1&&K.match(/[\u0980-\u09FF\u0E00-\u0E7F\u1000-\u109F\u0900-\u097F\u1780-\u17FF\u0D00-\u0D7F\u0B00-\u0B7F\u0A00-\u0A7F\u0B80-\u0BFF\u0C00-\u0C7F]+/)&&ot.insertText(e,K.slice(0,K.length-l));var ue=W.unref(),le=Y.unref(),ce=i?ue||le:le||ue;null==t.at&&ce&&ot.select(e,ce)}}})};function Zr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Jr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Qr=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Te.withoutNormalizing(e,function(){var n=r.hanging,o=void 0!==n&&n,i=r.voids,a=void 0!==i&&i,s=r.at,u=void 0===s?K(e):s,l=r.batchDirty,c=void 0===l||l;if(t.length){if(ke.isRange(u))if(o||(u=Te.unhangRange(e,u,{voids:a})),I.isCollapsed(u))u=u.anchor;else{var d=I.edges(u),f=k(d,2)[1];if(!a&&Te.void(e,{at:f}))return;var h=Te.pointRef(e,f);ot.delete(e,{at:u}),u=h.unref()}else ke.isPath(u)&&(u=Te.start(e,u));if(a||!Te.void(e,{at:u})){var p=Te.above(e,{at:u,match:function(t){return V.isElement(t)&&Te.isInline(e,t)},mode:"highest",voids:a});if(p){var g=k(p,2)[1];if(Te.isEnd(e,u,g))u=Te.after(e,g);else if(Te.isStart(e,u,g)){u=Te.before(e,g)}}var m,v=Te.above(e,{match:function(t){return V.isElement(t)&&Te.isBlock(e,t)},at:u,voids:a}),b=k(v,2)[1],w=Te.isStart(e,u,b),E=Te.isEnd(e,u,b),x=w&&E,S=V.first({children:t},[]),C=k(S,2)[1],A=V.last({children:t},[]),D=k(A,2)[1],T=function(t){var r=k(t,2),n=r[0],o=r[1];return!(0===o.length)&&(!!x||!(!w&&y.isAncestor(o,C)&&V.isElement(n)&&!e.isVoid(n)&&!e.isInline(n))&&!(!E&&y.isAncestor(o,D)&&V.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)))},N=!0,O=[],B=[],M=[],F=Zr(V.nodes({children:t},{pass:T}));try{for(F.s();!(m=F.n()).done;){var P=m.value,R=k(P,2),L=R[0],_=R[1];N&&V.isElement(L)&&!e.isInline(L)&&!y.isAncestor(_,C)&&(N=!1),T(P)&&(V.isElement(L)&&!e.isInline(L)?(N=!1,B.push(L)):N?O.push(L):M.push(L))}}catch(e){F.e(e)}finally{F.f()}var z=Te.nodes(e,{at:u,match:function(t){return V.isText(t)||Te.isInline(e,t)},mode:"highest",voids:a}),j=k(z,1)[0],H=k(j,2)[1],$=Te.isStart(e,u,H),U=Te.isEnd(e,u,H),q=Te.pathRef(e,E&&!M.length?y.next(b):b),G=Te.pathRef(e,U?y.next(H):H),W=M.length>0;ot.splitNodes(e,{at:u,match:function(t){return W?V.isElement(t)&&Te.isBlock(e,t):V.isText(t)||Te.isInline(e,t)},mode:W?"lowest":"highest",always:W&&(!w||O.length>0)&&(!E||M.length>0),voids:a});var Y,X=Te.pathRef(e,!$||$&&U?y.next(H):H);if(ot.insertNodes(e,O,{at:X.current,match:function(t){return V.isText(t)||Te.isInline(e,t)},mode:"highest",voids:a,batchDirty:c}),x&&!O.length&&B.length&&!M.length&&ot.delete(e,{at:b,voids:a}),ot.insertNodes(e,B,{at:q.current,match:function(t){return V.isElement(t)&&Te.isBlock(e,t)},mode:"lowest",voids:a,batchDirty:c}),ot.insertNodes(e,M,{at:G.current,match:function(t){return V.isText(t)||Te.isInline(e,t)},mode:"highest",voids:a,batchDirty:c}),!r.at)if(M.length>0&&G.current?Y=y.previous(G.current):B.length>0&&q.current?Y=y.previous(q.current):X.current&&(Y=y.previous(X.current)),Y){var Z=Te.end(e,Y);ot.select(e,Z)}X.unref(),q.unref(),G.unref()}}})},en=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).edge,r=void 0===t?"anchor":t,n=e.selection;if(n)if("anchor"===r)ot.select(e,n.anchor);else if("focus"===r)ot.select(e,n.focus);else if("start"===r){var o=I.edges(n),i=k(o,1)[0];ot.select(e,i)}else if("end"===r){var a=I.edges(n),s=k(a,2)[1];ot.select(e,s)}},tn=function(e){var t=e.selection;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},rn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.selection,n=t.distance,o=void 0===n?1:n,i=t.unit,a=void 0===i?"character":i,s=t.reverse,u=void 0!==s&&s,l=t.edge,c=void 0===l?null:l;if(r){"start"===c&&(c=I.isBackward(r)?"focus":"anchor"),"end"===c&&(c=I.isBackward(r)?"anchor":"focus");var d=r.anchor,f=r.focus,h={distance:o,unit:a},p={};if(null==c||"anchor"===c){var g=u?Te.before(e,d,h):Te.after(e,d,h);g&&(p.anchor=g)}if(null==c||"focus"===c){var m=u?Te.before(e,f,h):Te.after(e,f,h);m&&(p.focus=m)}ot.setSelection(e,p)}},nn=function(e,t){var r=e.selection;if(t=Te.range(e,t),r)ot.setSelection(e,t);else{if(!ke.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(Ie.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})}};function on(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function an(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?on(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):on(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var sn=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=e.selection,o=r.edge,i=void 0===o?"both":o;if(n){"start"===i&&(i=I.isBackward(n)?"focus":"anchor"),"end"===i&&(i=I.isBackward(n)?"anchor":"focus");var a=n.anchor,s=n.focus,u="anchor"===i?a:s;ot.setSelection(e,S({},"anchor"===i?"anchor":"focus",an(an({},u),t)))}},un=function(e,t){var r=e.selection,n={},o={};if(r){for(var i in t)("anchor"===i&&null!=t.anchor&&!Me.equals(t.anchor,r.anchor)||"focus"===i&&null!=t.focus&&!Me.equals(t.focus,r.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==r[i])&&(n[i]=r[i],o[i]=t[i]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:o})}};function ln(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return cn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cn(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var dn=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Te.withoutNormalizing(e,function(){var n=r.hanging,o=void 0!==n&&n,i=r.voids,a=void 0!==i&&i,s=r.mode,u=void 0===s?"lowest":s,l=r.batchDirty,c=void 0===l||l,d=r.at,f=r.match,h=r.select;if(V.isNode(t)&&(t=[t]),0!==t.length){var p=k(t,1)[0];if(d||(d=K(e),!1!==h&&(h=!0)),null==h&&(h=!1),ke.isRange(d))if(o||(d=Te.unhangRange(e,d,{voids:a})),I.isCollapsed(d))d=d.anchor;else{var g=I.edges(d),m=k(g,2)[1],b=Te.pointRef(e,m);ot.delete(e,{at:d}),d=b.unref()}if(ke.isPoint(d)){null==f&&(f=V.isText(p)?function(e){return V.isText(e)}:e.isInline(p)?function(t){return V.isText(t)||Te.isInline(e,t)}:function(t){return V.isElement(t)&&Te.isBlock(e,t)});var w=Te.nodes(e,{at:d.path,match:f,mode:u,voids:a}),E=k(w,1)[0];if(!E)return;var x=k(E,2)[1],S=Te.pathRef(e,x),C=Te.isEnd(e,d,x);ot.splitNodes(e,{at:d,match:f,mode:u,voids:a});var A=S.unref();d=C?y.next(A):A}var D=y.parent(d),T=d[d.length-1];if(a||!Te.void(e,{at:D})){if(c){var N=[],O=y.levels(D);!function(e,t,r){var n=it.get(e)||!1;it.set(e,!0);try{t(),r()}finally{it.set(e,n)}}(e,function(){var r,n=ln(t);try{var o=function(){var t=r.value,n=D.concat(T);T++;var o={type:"insert_node",path:n,node:t};e.apply(o),d=y.next(d),N.push(o),V.isText(t)?O.push(n):O.push.apply(O,v(Array.from(V.nodes(t),function(e){var t=k(e,2)[1];return n.concat(t)})))};for(n.s();!(r=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}},function(){ut(e,O,function(e){for(var t=e,r=0,n=N;r<n.length;r++){var o=n[r];if(y.operationCanTransformPath(o)&&!(t=y.transform(t,o)))return null}return t})})}else{var B,M=ln(t);try{for(M.s();!(B=M.n()).done;){var F=B.value,P=D.concat(T);T++,e.apply({type:"insert_node",path:P,node:F}),d=y.next(d)}}catch(e){M.e(e)}finally{M.f()}}if(d=y.previous(d),h){var R=Te.end(e,d);R&&ot.select(e,R)}}}})},fn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r=t.at,n=void 0===r?e.selection:r,o=t.mode,i=void 0===o?"lowest":o,a=t.voids,s=void 0!==a&&a,u=t.match;if(n){null==u&&(u=ke.isPath(n)?X(e,n):function(t){return V.isElement(t)&&Te.isBlock(e,t)});for(var l=Te.nodes(e,{at:n,match:u,mode:i,voids:s}),c=Array.from(l,function(t){var r=k(t,2)[1];return Te.pathRef(e,r)}),d=0,f=c;d<f.length;d++){var h=f[d].unref();if(h.length<2)throw new Error("Cannot lift node at a path [".concat(h,"] because it has a depth of less than `2`."));var p=Te.node(e,y.parent(h)),g=k(p,2),m=g[0],v=g[1],b=h[h.length-1],w=m.children.length;if(1===w){var E=y.next(v);ot.moveNodes(e,{at:h,to:E,voids:s}),ot.removeNodes(e,{at:v,voids:s})}else if(0===b)ot.moveNodes(e,{at:h,to:v,voids:s});else if(b===w-1){var x=y.next(v);ot.moveNodes(e,{at:h,to:x,voids:s})}else{var S=y.next(h),C=y.next(v);ot.splitNodes(e,{at:S,voids:s}),ot.moveNodes(e,{at:h,to:C,voids:s})}}}})},hn=["text"],pn=["children"],gn=function e(t,r){return r!==t&&(V.isText(r)||Te.isVoid(t,r)||1===r.children.length&&e(t,r.children[0]))},mn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r=t.match,n=t.at,o=void 0===n?e.selection:n,i=t.hanging,a=void 0!==i&&i,s=t.voids,u=void 0!==s&&s,l=t.mode,c=void 0===l?"lowest":l;if(o){if(null==r)if(ke.isPath(o)){var d=Te.parent(e,o),f=k(d,1)[0];r=function(e){return f.children.includes(e)}}else r=function(t){return V.isElement(t)&&Te.isBlock(e,t)};if(!a&&ke.isRange(o)&&(o=Te.unhangRange(e,o,{voids:u})),ke.isRange(o))if(I.isCollapsed(o))o=o.anchor;else{var h=I.edges(o),p=k(h,2)[1],g=Te.pointRef(e,p);ot.delete(e,{at:o}),o=g.unref(),null==t.at&&ot.select(e,o)}var m=Te.nodes(e,{at:o,match:r,voids:u,mode:c}),v=k(m,1)[0],b=Te.previous(e,{at:o,match:r,voids:u,mode:c});if(v&&b){var w=k(v,2),E=w[0],x=w[1],S=k(b,2),C=S[0],A=S[1];if(0!==x.length&&0!==A.length){var D,T,N=y.next(A),O=y.common(x,A),M=y.isSibling(x,A),F=Array.from(Te.levels(e,{at:x}),function(e){return k(e,1)[0]}).slice(O.length).slice(0,-1),P=Te.above(e,{at:x,mode:"highest",match:function(t){return F.includes(t)&&gn(e,t)}}),R=P&&Te.pathRef(e,P[1]);if(V.isText(E)&&V.isText(C)){E.text;var L=B(E,hn);T=C.text.length,D=L}else{if(!V.isElement(E)||!V.isElement(C))throw new Error("Cannot merge the node at path [".concat(x,"] with the previous sibling because it is not the same kind: ").concat(Ie.stringify(E)," ").concat(Ie.stringify(C)));E.children;var _=B(E,pn);T=C.children.length,D=_}M||ot.moveNodes(e,{at:x,to:N,voids:u}),R&&ot.removeNodes(e,{at:R.current,voids:u}),Te.shouldMergeNodesRemovePrevNode(e,b,v)?ot.removeNodes(e,{at:A,voids:u}):e.apply({type:"merge_node",path:N,position:T,properties:D}),R&&R.unref()}}}})},vn=function(e,t){Te.withoutNormalizing(e,function(){var r=t.to,n=t.at,o=void 0===n?e.selection:n,i=t.mode,a=void 0===i?"lowest":i,s=t.voids,u=void 0!==s&&s,l=t.match;if(o){null==l&&(l=ke.isPath(o)?X(e,o):function(t){return V.isElement(t)&&Te.isBlock(e,t)});for(var c=Te.pathRef(e,r),d=Te.nodes(e,{at:o,match:l,mode:a,voids:u}),f=Array.from(d,function(t){var r=k(t,2)[1];return Te.pathRef(e,r)}),h=0,p=f;h<p.length;h++){var g=p[h].unref(),m=c.current;0!==g.length&&e.apply({type:"move_node",path:g,newPath:m}),c.current&&y.isSibling(m,g)&&y.isAfter(m,g)&&(c.current=y.next(c.current))}c.unref()}})},yn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r=t.hanging,n=void 0!==r&&r,o=t.voids,i=void 0!==o&&o,a=t.mode,s=void 0===a?"lowest":a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=ke.isPath(l)?X(e,l):function(t){return V.isElement(t)&&Te.isBlock(e,t)}),!n&&ke.isRange(l)&&(l=Te.unhangRange(e,l,{voids:i}));for(var d=Te.nodes(e,{at:l,match:c,mode:s,voids:i}),f=Array.from(d,function(t){var r=k(t,2)[1];return Te.pathRef(e,r)}),h=0,p=f;h<p.length;h++){var g=p[h].unref();if(g){var m=Te.node(e,g),v=k(m,1)[0];e.apply({type:"remove_node",path:g,node:v})}}}})};function bn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return wn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wn(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var En=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Te.withoutNormalizing(e,function(){var n=r.match,o=r.at,i=void 0===o?e.selection:o,a=r.compare,s=r.merge,u=r.hanging,l=void 0!==u&&u,c=r.mode,d=void 0===c?"lowest":c,f=r.split,h=void 0!==f&&f,p=r.voids,g=void 0!==p&&p;if(i){if(null==n&&(n=ke.isPath(i)?X(e,i):function(t){return V.isElement(t)&&Te.isBlock(e,t)}),!l&&ke.isRange(i)&&(i=Te.unhangRange(e,i,{voids:g})),h&&ke.isRange(i)){if(I.isCollapsed(i)&&Te.leaf(e,i.anchor)[0].text.length>0)return;var m=Te.rangeRef(e,i,{affinity:"inward"}),v=I.edges(i),y=k(v,2),b=y[0],w=y[1],E="lowest"===d?"lowest":"highest",x=Te.isEnd(e,w,w.path);ot.splitNodes(e,{at:w,match:n,mode:E,voids:g,always:!x});var S=Te.isStart(e,b,b.path);ot.splitNodes(e,{at:b,match:n,mode:E,voids:g,always:!S}),i=m.unref(),null==r.at&&ot.select(e,i)}a||(a=function(e,t){return e!==t});var C,A=bn(Te.nodes(e,{at:i,match:n,mode:d,voids:g}));try{for(A.s();!(C=A.n()).done;){var D=k(C.value,2),T=D[0],N=D[1],O={},B={};if(0!==N.length){var M=!1;for(var F in t)"children"!==F&&"text"!==F&&a(t[F],T[F])&&(M=!0,T.hasOwnProperty(F)&&(O[F]=T[F]),s?null!=t[F]&&(B[F]=s(T[F],t[F])):null!=t[F]&&(B[F]=t[F]));M&&e.apply({type:"set_node",path:N,properties:O,newProperties:B})}}}catch(e){A.e(e)}finally{A.f()}}})};function xn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Sn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sn(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Cn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r=t.mode,n=void 0===r?"lowest":r,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s,l=t.height,c=void 0===l?0:l,d=t.always,f=void 0!==d&&d;if(u&&(null==a&&(a=function(t){return V.isElement(t)&&Te.isBlock(e,t)}),!ke.isRange(u)||(u=function(e,t){if(I.isCollapsed(t))return t.anchor;var r=I.edges(t),n=k(r,2)[1],o=Te.pointRef(e,n);return ot.delete(e,{at:t}),o.unref()}(e,u),u))){if(ke.isPath(u)){var h=u,p=Te.point(e,h),g=Te.parent(e,h),m=k(g,1)[0];a=function(e){return e===m},c=p.path.length-h.length+1,u=p,f=!0}var v,b=Te.pointRef(e,u,{affinity:"backward"});try{var w=Te.nodes(e,{at:u,match:a,mode:n,voids:i}),E=k(w,1)[0];if(!E)return;var x=Te.void(e,{at:u,mode:"highest"});if(!i&&x){var S=k(x,2),C=S[0],A=S[1];if(e.isInline(C)){var D=Te.after(e,A);if(!D){var T=y.next(A);ot.insertNodes(e,{text:""},{at:T,voids:i}),D=Te.point(e,T)}u=D,f=!0}c=u.path.length-A.length+1,f=!0}v=Te.pointRef(e,u);var N,O=u.path.length-c,B=k(E,2)[1],M=u.path.slice(0,O),F=0===c?u.offset:u.path[O]+0,P=xn(Te.levels(e,{at:M,reverse:!0,voids:i}));try{for(P.s();!(N=P.n()).done;){var R=k(N.value,2),L=R[0],_=R[1],z=!1;if(_.length<B.length||0===_.length||!i&&V.isElement(L)&&Te.isVoid(e,L))break;var j=b.current,H=Te.isEnd(e,j,_);if(f||!b||!Te.isEdge(e,j,_)){z=!0;var $=V.extractProps(L);e.apply({type:"split_node",path:_,position:F,properties:$})}F=_[_.length-1]+(z||H?1:0)}}catch(e){P.e(e)}finally{P.f()}if(null==t.at){var U=v.current||Te.end(e,[]);ot.select(e,U)}}finally{var q;b.unref(),null===(q=v)||void 0===q||q.unref()}}})};function An(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Dn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Dn(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Tn=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var n,o={},i=An(t);try{for(i.s();!(n=i.n()).done;){o[n.value]=null}}catch(e){i.e(e)}finally{i.f()}ot.setNodes(e,o,r)};function kn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Nn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nn(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var On=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r=t.mode,n=void 0===r?"lowest":r,o=t.split,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=ke.isPath(l)?X(e,l):function(t){return V.isElement(t)&&Te.isBlock(e,t)}),ke.isPath(l)&&(l=Te.range(e,l));var d,f=ke.isRange(l)?Te.rangeRef(e,l):null,h=Te.nodes(e,{at:l,match:c,mode:n,voids:s}),p=Array.from(h,function(t){var r=k(t,2)[1];return Te.pathRef(e,r)}).reverse(),g=kn(p);try{var m=function(){var t=d.value.unref(),r=Te.node(e,t),n=k(r,1)[0],o=Te.range(e,t);i&&f&&(o=I.intersection(f.current,o)),ot.liftNodes(e,{at:o,match:function(e){return!V.isText(n)&&n.children.includes(e)},voids:s})};for(g.s();!(d=g.n()).done;)m()}catch(e){g.e(e)}finally{g.f()}f&&f.unref()}})};function Bn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Mn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bn(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Fn=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Te.withoutNormalizing(e,function(){var n=r.mode,o=void 0===n?"lowest":n,i=r.split,a=void 0!==i&&i,s=r.voids,u=void 0!==s&&s,l=r.match,c=r.at,d=void 0===c?e.selection:c;if(d){if(null==l&&(l=ke.isPath(d)?X(e,d):e.isInline(t)?function(t){return V.isElement(t)&&Te.isInline(e,t)||V.isText(t)}:function(t){return V.isElement(t)&&Te.isBlock(e,t)}),a&&ke.isRange(d)){var f=I.edges(d),h=k(f,2),p=h[0],g=h[1],m=Te.rangeRef(e,d,{affinity:"inward"}),v=function(t){var r=Te.above(e,{at:t,match:function(t){return V.isElement(t)&&Te.isBlock(e,t)}});return r&&Te.isEdge(e,t,r[1])};ot.splitNodes(e,{at:g,match:l,voids:u,always:!v(g)}),ot.splitNodes(e,{at:p,match:l,voids:u,always:!v(p)}),d=m.unref(),null==r.at&&ot.select(e,d)}for(var b=Array.from(Te.nodes(e,{at:d,match:e.isInline(t)?function(t){return V.isElement(t)&&Te.isBlock(e,t)}:function(e){return V.isEditor(e)},mode:"lowest",voids:u})),w=function(){var r=k(x[E],2)[1],n=ke.isRange(d)?I.intersection(d,Te.range(e,r)):d;if(!n)return 0;var i=Array.from(Te.nodes(e,{at:n,match:l,mode:o,voids:u}));if(i.length>0){var a=i[0],s=i[i.length-1],c=k(a,2)[1],f=k(s,2)[1];if(0===c.length&&0===f.length)return 0;var h=y.equals(c,f)?y.parent(c):y.common(c,f),p=Te.range(e,c,f),g=Te.node(e,h),m=k(g,1)[0],v=h.length+1,b=y.next(f.slice(0,v)),w=Mn(Mn({},t),{},{children:[]});ot.insertNodes(e,w,{at:b,voids:u}),ot.moveNodes(e,{at:p,match:function(e){return!V.isText(m)&&m.children.includes(e)},to:b.concat(0),voids:u})}},E=0,x=b;E<x.length;E++)w()}})};return dh.Editor=Te,dh.Element=R,dh.Location=ke,dh.Node=V,dh.Operation=G,dh.Path=y,dh.PathRef=e,dh.Point=Me,dh.PointRef=t,dh.Range=I,dh.RangeRef=r,dh.Scrubber=Ie,dh.Span=Ne,dh.Text=He,dh.Transforms=ot,dh.above=yt,dh.addMark=Et,dh.after=Dt,dh.apply=dt,dh.before=Bt,dh.collapse=en,dh.createEditor=function(){var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:function(){return!1},isInline:function(){return!1},isSelectable:function(){return!0},isVoid:function(){return!1},markableVoid:function(){return!1},onChange:function(){},apply:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dt.apply(void 0,[e].concat(r))},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Et.apply(void 0,[e].concat(r))},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mt.apply(void 0,[e].concat(r))},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ft.apply(void 0,[e].concat(r))},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return It.apply(void 0,[e].concat(r))},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gt.apply(void 0,[e].concat(r))},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Kt.apply(void 0,[e].concat(r))},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zt.apply(void 0,[e].concat(r))},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qr.apply(void 0,[e].concat(r))},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xt.apply(void 0,[e].concat(r))},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qt.apply(void 0,[e].concat(r))},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mt.apply(void 0,[e].concat(r))},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lr.apply(void 0,[e].concat(r))},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return pt.apply(void 0,[e].concat(r))},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vt.apply(void 0,[e].concat(r))},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yt.apply(void 0,[e].concat(r))},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dt.apply(void 0,[e].concat(r))},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Bt.apply(void 0,[e].concat(r))},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return en.apply(void 0,[e].concat(r))},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xr.apply(void 0,[e].concat(r))},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tn.apply(void 0,[e].concat(r))},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Pt.apply(void 0,[e].concat(r))},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _t.apply(void 0,[e].concat(r))},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zt.apply(void 0,[e].concat(r))},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return jt.apply(void 0,[e].concat(r))},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ht.apply(void 0,[e].concat(r))},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hr.apply(void 0,[e].concat(r))},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qt.apply(void 0,[e].concat(r))},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gt.apply(void 0,[e].concat(r))},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wt.apply(void 0,[e].concat(r))},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Yt.apply(void 0,[e].concat(r))},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dn.apply(void 0,[e].concat(r))},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return er.apply(void 0,[e].concat(r))},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tr.apply(void 0,[e].concat(r))},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rr.apply(void 0,[e].concat(r))},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nr.apply(void 0,[e].concat(r))},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return or.apply(void 0,[e].concat(r))},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ir.apply(void 0,[e].concat(r))},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ar.apply(void 0,[e].concat(r))},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sr.apply(void 0,[e].concat(r))},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cr.apply(void 0,[e].concat(r))},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fn.apply(void 0,[e].concat(r))},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mn.apply(void 0,[e].concat(r))},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rn.apply(void 0,[e].concat(r))},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vn.apply(void 0,[e].concat(r))},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return pr.apply(void 0,[e].concat(r))},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gr.apply(void 0,[e].concat(r))},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yr.apply(void 0,[e].concat(r))},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Er.apply(void 0,[e].concat(r))},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xr.apply(void 0,[e].concat(r))},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ar.apply(void 0,[e].concat(r))},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sr.apply(void 0,[e].concat(r))},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cr.apply(void 0,[e].concat(r))},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return kr.apply(void 0,[e].concat(r))},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dr.apply(void 0,[e].concat(r))},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tr.apply(void 0,[e].concat(r))},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Br.apply(void 0,[e].concat(r))},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mr.apply(void 0,[e].concat(r))},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Pr.apply(void 0,[e].concat(r))},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fr.apply(void 0,[e].concat(r))},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ir.apply(void 0,[e].concat(r))},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yn.apply(void 0,[e].concat(r))},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nn.apply(void 0,[e].concat(r))},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return En.apply(void 0,[e].concat(r))},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _r.apply(void 0,[e].concat(r))},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sn.apply(void 0,[e].concat(r))},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return un.apply(void 0,[e].concat(r))},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cn.apply(void 0,[e].concat(r))},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zr.apply(void 0,[e].concat(r))},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $r.apply(void 0,[e].concat(r))},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qr.apply(void 0,[e].concat(r))},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tn.apply(void 0,[e].concat(r))},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return On.apply(void 0,[e].concat(r))},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ut.apply(void 0,[e].concat(r))},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gr.apply(void 0,[e].concat(r))},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fn.apply(void 0,[e].concat(r))},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wr.apply(void 0,[e].concat(r))}};return e},dh.deleteBackward=Mt,dh.deleteForward=Ft,dh.deleteFragment=It,dh.deleteText=Xr,dh.deselect=tn,dh.edges=Pt,dh.elementReadOnly=_t,dh.end=zt,dh.first=jt,dh.fragment=Ht,dh.getDirtyPaths=pt,dh.getFragment=gt,dh.getVoid=Ut,dh.hasBlocks=qt,dh.hasInlines=Gt,dh.hasPath=Wt,dh.hasTexts=Yt,dh.insertBreak=Kt,dh.insertFragment=Qr,dh.insertNode=Xt,dh.insertNodes=dn,dh.insertSoftBreak=Zt,dh.insertText=Qt,dh.isBlock=er,dh.isEdge=tr,dh.isEditor=De,dh.isEmpty=rr,dh.isEnd=nr,dh.isNormalizing=or,dh.isObject=W,dh.isStart=ir,dh.last=ar,dh.leaf=sr,dh.levels=cr,dh.liftNodes=fn,dh.marks=hr,dh.mergeNodes=mn,dh.move=rn,dh.moveNodes=vn,dh.next=pr,dh.node=gr,dh.nodes=yr,dh.normalize=Er,dh.normalizeNode=mt,dh.parent=xr,dh.path=Ar,dh.pathRef=Sr,dh.pathRefs=Cr,dh.point=kr,dh.pointRef=Dr,dh.pointRefs=Tr,dh.positions=Br,dh.previous=Mr,dh.range=Pr,dh.rangeRef=Fr,dh.rangeRefs=Ir,dh.removeMark=Lr,dh.removeNodes=yn,dh.select=nn,dh.setNodes=En,dh.setNormalizing=_r,dh.setPoint=sn,dh.setSelection=un,dh.shouldMergeNodesRemovePrevNode=Wr,dh.shouldNormalize=vt,dh.splitNodes=Cn,dh.start=zr,dh.string=$r,dh.unhangRange=qr,dh.unsetNodes=Tn,dh.unwrapNodes=On,dh.withoutNormalizing=Gr,dh.wrapNodes=Fn,dh}var hh,ph=fh(),gh={};function mh(){if(hh)return gh;hh=1;var e=fh(),t={isHistory:function(t){return e.isObject(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(0===t.redos.length||e.Operation.isOperationList(t.redos[0].operations))&&(0===t.undos.length||e.Operation.isOperationList(t.undos[0].operations))}},r=new WeakMap,n=new WeakMap,o=new WeakMap,i=new WeakMap,a={isHistoryEditor:function(r){return t.isHistory(r.history)&&e.Editor.isEditor(r)},isMerging:function(e){return o.get(e)},isSplittingOnce:function(e){return i.get(e)},setSplittingOnce:function(e,t){i.set(e,t)},isSaving:function(e){return n.get(e)},redo:function(e){e.redo()},undo:function(e){e.undo()},withMerging:function(e,t){var r=a.isMerging(e);o.set(e,!0),t(),o.set(e,r)},withNewBatch:function(e,t){var r=a.isMerging(e);o.set(e,!0),i.set(e,!0),t(),o.set(e,r),i.delete(e)},withoutMerging:function(e,t){var r=a.isMerging(e);o.set(e,!1),t(),o.set(e,r)},withoutSaving:function(e,t){var r=a.isSaving(e);n.set(e,!1);try{t()}finally{n.set(e,r)}}};function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=function(t,r){return!(!r||"insert_text"!==t.type||"insert_text"!==r.type||t.offset!==r.offset+r.text.length||!e.Path.equals(t.path,r.path))||!(!r||"remove_text"!==t.type||"remove_text"!==r.type||t.offset+t.text.length!==r.offset||!e.Path.equals(t.path,r.path))},c=function(e,t){return"set_selection"!==e.type};return gh.HISTORY=r,gh.History=t,gh.HistoryEditor=a,gh.MERGING=o,gh.SAVING=n,gh.SPLITTING_ONCE=i,gh.withHistory=function(t){var r=t,n=r.apply;return r.history={undos:[],redos:[]},r.redo=function(){var t=r.history,n=t.redos;if(n.length>0){var o=n[n.length-1];o.selectionBefore&&e.Transforms.setSelection(r,o.selectionBefore),a.withoutSaving(r,function(){e.Editor.withoutNormalizing(r,function(){var e,t=s(o.operations);try{for(t.s();!(e=t.n()).done;){var n=e.value;r.apply(n)}}catch(e){t.e(e)}finally{t.f()}})}),t.redos.pop(),r.writeHistory("undos",o)}},r.undo=function(){var t=r.history,n=t.undos;if(n.length>0){var o=n[n.length-1];a.withoutSaving(r,function(){e.Editor.withoutNormalizing(r,function(){var t,n=s(o.operations.map(e.Operation.inverse).reverse());try{for(n.s();!(t=n.n()).done;){var i=t.value;r.apply(i)}}catch(e){n.e(e)}finally{n.f()}o.selectionBefore&&e.Transforms.setSelection(r,o.selectionBefore)})}),r.writeHistory("redos",o),t.undos.pop()}},r.apply=function(e){var t=r.operations,o=r.history,i=o.undos,s=i[i.length-1],u=s&&s.operations[s.operations.length-1],d=a.isSaving(r),f=a.isMerging(r);if(null==d&&(d=c(e)),d){if(null==f&&(f=null!=s&&(!!t.includes(u)||l(e,u))),a.isSplittingOnce(r)&&(f=!1,a.setSplittingOnce(r,void 0)),s&&f)s.operations.push(e);else{var h={operations:[e],selectionBefore:r.selection};r.writeHistory("undos",h)}for(;i.length>100;)i.shift();o.redos=[]}n(e)},r.writeHistory=function(e,t){r.history[e].push(t)},r},gh}var vh=mh(),yh=function(e,t){return yh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},yh(e,t)};function bh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}yh(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var wh=function(){return wh=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},wh.apply(this,arguments)};function Eh(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})}function xh(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=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++,n=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],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function Sh(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ch(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function Ah(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function Dh(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=Sh(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)})(n,o,(t=e[r](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError;var Th,kh={exports:{}};var Nh,Oh,Bh=(Th||(Th=1,function(e,t){var r="__lodash_hash_undefined__",n=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]",h="[object RegExp]",p="[object Set]",g="[object String]",m="[object Symbol]",v="[object WeakMap]",y="[object ArrayBuffer]",w="[object DataView]",E="[object Float32Array]",x="[object Float64Array]",S="[object Int8Array]",C="[object Int16Array]",A="[object Int32Array]",D="[object Uint8Array]",T="[object Uint8ClampedArray]",k="[object Uint16Array]",N="[object Uint32Array]",O=/\w*$/,B=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,F={};F[o]=F["[object Array]"]=F[y]=F[w]=F[i]=F[a]=F[E]=F[x]=F[S]=F[C]=F[A]=F[l]=F[c]=F[d]=F[h]=F[p]=F[g]=F[m]=F[D]=F[T]=F[k]=F[N]=!0,F["[object Error]"]=F[s]=F[v]=!1;var I="object"==typeof b&&b&&b.Object===Object&&b,P="object"==typeof self&&self&&self.Object===Object&&self,R=I||P||Function("return this")(),L=t&&!t.nodeType&&t,_=L&&e&&!e.nodeType&&e,z=_&&_.exports===L;function j(e,t){return e.set(t[0],t[1]),e}function H(e,t){return e.add(t),e}function $(e,t,r,n){for(var o=-1,i=e?e.length:0;++o<i;)r=t(r,e[o],o,e);return r}function V(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function U(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function q(e,t){return function(r){return e(t(r))}}function G(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var W=Array.prototype,Y=Function.prototype,K=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=Y.toString,Q=K.hasOwnProperty,ee=K.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=z?R.Buffer:void 0,ne=R.Symbol,oe=R.Uint8Array,ie=q(Object.getPrototypeOf,Object),ae=Object.create,se=K.propertyIsEnumerable,ue=W.splice,le=Object.getOwnPropertySymbols,ce=re?re.isBuffer:void 0,de=q(Object.keys,Object),fe=Le(R,"DataView"),he=Le(R,"Map"),pe=Le(R,"Promise"),ge=Le(R,"Set"),me=Le(R,"WeakMap"),ve=Le(Object,"create"),ye=$e(fe),be=$e(he),we=$e(pe),Ee=$e(ge),xe=$e(me),Se=ne?ne.prototype:void 0,Ce=Se?Se.valueOf:void 0;function Ae(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function De(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Te(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ke(e){this.__data__=new De(e)}function Ne(e,t){var r=Ue(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&qe(e)}(e)&&Q.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,i=!!n;for(var a in e)!Q.call(e,a)||i&&("length"==a||je(a,n))||r.push(a);return r}function Oe(e,t,r){var n=e[t];Q.call(e,t)&&Ve(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function Be(e,t){for(var r=e.length;r--;)if(Ve(e[r][0],t))return r;return-1}function Me(e,t,r,n,f,v,b){var B;if(n&&(B=v?n(e,f,v,b):n(e)),void 0!==B)return B;if(!Ye(e))return e;var M=Ue(e);if(M){if(B=function(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&Q.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!t)return function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(e,B)}else{var I=ze(e),P=I==s||I==u;if(Ge(e))return function(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}(e,t);if(I==d||I==o||P&&!v){if(V(e))return v?e:{};if(B=function(e){return"function"!=typeof e.constructor||He(e)?{}:Ye(t=ie(e))?ae(t):{};var t}(P?{}:e),!t)return function(e,t){return Pe(e,_e(e),t)}(e,function(e,t){return e&&Pe(t,Ke(t),e)}(B,e))}else{if(!F[I])return v?e:{};B=function(e,t,r,n){var o=e.constructor;switch(t){case y:return Ie(e);case i:case a:return new o(+e);case w:return function(e,t){var r=t?Ie(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,n);case E:case x:case S:case C:case A:case D:case T:case k:case N:return function(e,t){var r=t?Ie(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,n);case l:return function(e,t,r){var n=t?r(U(e),!0):U(e);return $(n,j,new e.constructor)}(e,n,r);case c:case g:return new o(e);case h:return function(e){var t=new e.constructor(e.source,O.exec(e));return t.lastIndex=e.lastIndex,t}(e);case p:return function(e,t,r){var n=t?r(G(e),!0):G(e);return $(n,H,new e.constructor)}(e,n,r);case m:return function(e){return Ce?Object(Ce.call(e)):{}}(e)}}(e,I,Me,t)}}b||(b=new ke);var R=b.get(e);if(R)return R;if(b.set(e,B),!M)var L=r?function(e){return function(e,t,r){var n=t(e);return Ue(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Ke,_e)}(e):Ke(e);return function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););}(L||e,function(o,i){L&&(o=e[i=o]),Oe(B,i,Me(o,t,r,n,i,e,b))}),B}function Fe(e){return!(!Ye(e)||(t=e,Z&&Z in t))&&(We(e)||V(e)?te:B).test($e(e));var t}function Ie(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Pe(e,t,r,n){r||(r={});for(var o=-1,i=t.length;++o<i;){var a=t[o];Oe(r,a,e[a])}return r}function Re(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function Le(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Fe(r)?r:void 0}Ae.prototype.clear=function(){this.__data__=ve?ve(null):{}},Ae.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ae.prototype.get=function(e){var t=this.__data__;if(ve){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},Ae.prototype.has=function(e){var t=this.__data__;return ve?void 0!==t[e]:Q.call(t,e)},Ae.prototype.set=function(e,t){return this.__data__[e]=ve&&void 0===t?r:t,this},De.prototype.clear=function(){this.__data__=[]},De.prototype.delete=function(e){var t=this.__data__,r=Be(t,e);return!(r<0||(r==t.length-1?t.pop():ue.call(t,r,1),0))},De.prototype.get=function(e){var t=this.__data__,r=Be(t,e);return r<0?void 0:t[r][1]},De.prototype.has=function(e){return Be(this.__data__,e)>-1},De.prototype.set=function(e,t){var r=this.__data__,n=Be(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Te.prototype.clear=function(){this.__data__={hash:new Ae,map:new(he||De),string:new Ae}},Te.prototype.delete=function(e){return Re(this,e).delete(e)},Te.prototype.get=function(e){return Re(this,e).get(e)},Te.prototype.has=function(e){return Re(this,e).has(e)},Te.prototype.set=function(e,t){return Re(this,e).set(e,t),this},ke.prototype.clear=function(){this.__data__=new De},ke.prototype.delete=function(e){return this.__data__.delete(e)},ke.prototype.get=function(e){return this.__data__.get(e)},ke.prototype.has=function(e){return this.__data__.has(e)},ke.prototype.set=function(e,t){var r=this.__data__;if(r instanceof De){var n=r.__data__;if(!he||n.length<199)return n.push([e,t]),this;r=this.__data__=new Te(n)}return r.set(e,t),this};var _e=le?q(le,Object):function(){return[]},ze=function(e){return ee.call(e)};function je(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||M.test(e))&&e>-1&&e%1==0&&e<t}function He(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||K)}function $e(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ve(e,t){return e===t||e!=e&&t!=t}(fe&&ze(new fe(new ArrayBuffer(1)))!=w||he&&ze(new he)!=l||pe&&ze(pe.resolve())!=f||ge&&ze(new ge)!=p||me&&ze(new me)!=v)&&(ze=function(e){var t=ee.call(e),r=t==d?e.constructor:void 0,n=r?$e(r):void 0;if(n)switch(n){case ye:return w;case be:return l;case we:return f;case Ee:return p;case xe:return v}return t});var Ue=Array.isArray;function qe(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}(e.length)&&!We(e)}var Ge=ce||function(){return!1};function We(e){var t=Ye(e)?ee.call(e):"";return t==s||t==u}function Ye(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ke(e){return qe(e)?Ne(e):function(e){if(!He(e))return de(e);var t=[];for(var r in Object(e))Q.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}e.exports=function(e){return Me(e,!0,!0)}}(kh,kh.exports)),kh.exports),Mh=w(Bh);var Fh=function(){if(Oh)return Nh;Oh=1;var e=9007199254740991,t="[object Arguments]",r="[object Function]",n="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,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 h(e,r){var n=b(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&w(e)}(e)&&l.call(e,"callee")&&(!d.call(e,"callee")||c.call(e)==t)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],o=n.length,i=!!o;for(var a in e)!l.call(e,a)||i&&("length"==a||y(a,o))||n.push(a);return n}var p,g=(p=function(e,t){return e&&m(e,t,E)},function(e,t){if(null==e)return e;if(!w(e))return p(e,t);for(var r=e.length,n=-1,o=Object(e);++n<r&&!1!==t(o[n],n,o););return e}),m=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}return e};function v(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||u,t!==n)return f(e);var t,r,n,o=[];for(var i in Object(e))l.call(e,i)&&"constructor"!=i&&o.push(i);return o}function y(t,r){return!!(r=null==r?e:r)&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<r}var b=Array.isArray;function w(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==r||t==n}(t)}function E(e){return w(e)?h(e):v(e)}function x(e){return e}return Nh=function(e,t){return(b(e)?i:g)(e,"function"==typeof t?t:x)}}(),Ih=w(Fh),Ph=new Set(["base","embed","math","meta","object","script","svg","template"]),Rh=new Set(["href","poster","src","xlink:href"]),Lh=["java","script:"].join("");function _h(e,t,r){var n=function(e){return Array.from(e).filter(function(e){return e>" "}).join("").toLowerCase()}(r);return!n||!n.startsWith(Lh)&&!n.startsWith("vbscript:")&&(!n.startsWith("data:")||"href"!==t&&"xlink:href"!==t&&(("img"===e||"poster"===t)&&n.startsWith("data:image/")))}function zh(e){if(void 0===e&&(e=""),!e)return"";var t=(new DOMParser).parseFromString(e,"text/html");return Array.from(t.body.querySelectorAll("*")).forEach(function(e){var t=e.tagName.toLowerCase();Ph.has(t)?e.remove():Array.from(e.attributes).forEach(function(r){var n=r.name.toLowerCase(),o=r.value||"";("srcdoc"===n||n.startsWith("on")||Rh.has(n)&&!_h(t,n,o))&&e.removeAttribute(r.name)})}),t.body.innerHTML}var jh={};var Hh="created",$h="destroyed",Vh="change",Uh="scroll",qh="fullscreen",Gh="unFullScreen",Wh="modalOrPanelShow",Yh="modalOrPanelHide",Kh={};function Xh(e,t){var r=e.key,n=e.factory,o=e.config,i=wh(wh({},o),t||{});if(null!=Kh[r])throw new Error("Duplicated key '".concat(r,"' in menu items"));Kh[r]=n,function(e,t){null!=t&&(jh[e]=t)}(r,i)}var Zh=new WeakMap,Jh=new WeakMap,Qh=new WeakMap,ep=new WeakMap,tp=new WeakMap,rp=new WeakMap,np=new WeakMap,op=new WeakMap,ip=new WeakMap,ap=new WeakMap,sp=new WeakMap,up=new WeakMap,lp=new WeakMap,cp=new WeakMap,dp=new WeakMap,fp=new WeakMap,hp=new WeakMap,pp=new WeakMap,gp=new WeakMap,mp=new WeakMap,vp=new WeakMap,yp=new WeakMap,bp=new WeakMap,wp=new WeakMap,Ep=new WeakMap,xp=new WeakMap,Sp=new WeakMap,Cp=new WeakMap,Ap=new WeakMap,Dp=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in Kh)e.push(t);return e},t.getConfig=function(){var e=ap.get(t);if(null==e)throw new Error("Can not get editor config");return e},t.getMenuConfig=function(e){var r=t.getConfig().MENU_CONF;return(void 0===r?{}:r)[e]||{}},t.alert=function(e,r){void 0===r&&(r="info");var n=t.getConfig().customAlert;n&&n(e,r)},t},Tp=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function kp(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function Np(e={},t={}){Object.keys(t).forEach(r=>{void 0===e[r]?e[r]=t[r]:kp(t[r])&&kp(e[r])&&Object.keys(t[r]).length>0&&Np(e[r],t[r])})}const Op={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 Bp(){const e="undefined"!=typeof document?document:{};return Np(e,Op),e}const Mp={document:Op,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 Fp(){const e="undefined"!=typeof window?window:{};return Np(e,Mp),e}class Ip 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 Pp(e=[]){const t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...Pp(e)):t.push(e)}),t}function Rp(e,t){return Array.prototype.filter.call(e,t)}function Lp(e){return e.toLowerCase().replace(/-(.)/g,(e,t)=>t.toUpperCase())}function _p(e,t){const r=Fp(),n=Bp();let o=[];if(!t&&e instanceof Ip)return e;if(!e)return new Ip(o);if("string"==typeof e){const r=e.trim();if(r.indexOf("<")>=0&&r.indexOf(">")>=0){let e="div";0===r.indexOf("<li")&&(e="ul"),0===r.indexOf("<tr")&&(e="tbody"),0!==r.indexOf("<td")&&0!==r.indexOf("<th")||(e="tr"),0===r.indexOf("<tbody")&&(e="table"),0===r.indexOf("<option")&&(e="select");const t=n.createElement(e);t.innerHTML=r;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 r=[],n=t.querySelectorAll(e);for(let e=0;e<n.length;e+=1)r.push(n[e]);return r}(e.trim(),t||n)}else if(e.nodeType||e===r||e===n)o.push(e);else if(Array.isArray(e)){if(e instanceof Ip)return e;o=e}return new Ip(function(e){const t=[];for(let r=0;r<e.length;r+=1)-1===t.indexOf(e[r])&&t.push(e[r]);return t}(o))}function zp(...e){const t=Pp(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.add(...t)}),this}function jp(...e){const t=Pp(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.remove(...t)}),this}function Hp(...e){const t=Pp(e.map(e=>e.split(" ")));return Rp(this,e=>t.filter(t=>e.classList.contains(t)).length>0).length>0}function $p(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let r=0;r<this.length;r+=1)if(2===arguments.length)this[r].setAttribute(e,t);else for(const t in e)this[r][t]=e[t],this[r].setAttribute(t,e[t]);return this}function Vp(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function Up(e,t){let r;if(void 0===t){if(r=this[0],!r)return;if(r.dom7ElementDataStorage&&e in r.dom7ElementDataStorage)return r.dom7ElementDataStorage[e];const t=r.getAttribute(`data-${e}`);return t||void 0}for(let n=0;n<this.length;n+=1)r=this[n],r.dom7ElementDataStorage||(r.dom7ElementDataStorage={}),r.dom7ElementDataStorage[e]=t;return this}function qp(){const e=this[0];if(!e)return;const t={};if(e.dataset)for(const r in e.dataset)t[r]=e.dataset[r];else for(let r=0;r<e.attributes.length;r+=1){const n=e.attributes[r];n.name.indexOf("data-")>=0&&(t[Lp(n.name.split("data-")[1])]=n.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 Gp(e){if(void 0===e){const e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){const t=[];for(let r=0;r<e.selectedOptions.length;r+=1)t.push(e.selectedOptions[r].value);return t}return e.value}for(let t=0;t<this.length;t+=1){const r=this[t];if(Array.isArray(e)&&r.multiple&&"select"===r.nodeName.toLowerCase())for(let t=0;t<r.options.length;t+=1)r.options[t].selected=e.indexOf(r.options[t].value)>=0;else r.value=e}return this}function Wp(...e){let[t,r,n,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),_p(t).is(r))n.apply(t,o);else{const e=_p(t).parents();for(let t=0;t<e.length;t+=1)_p(e[t]).is(r)&&n.apply(e[t],o)}}function a(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),n.apply(this,t)}"function"==typeof e[1]&&([t,n,o]=e,r=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(r)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:n,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:n,proxyListener:a}),t.addEventListener(e,a,o)}}return this}function Yp(...e){let[t,r,n,o]=e;"function"==typeof e[1]&&([t,n,o]=e,r=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(!r&&i.dom7Listeners?a=i.dom7Listeners[t]:r&&i.dom7LiveListeners&&(a=i.dom7LiveListeners[t]),a&&a.length)for(let e=a.length-1;e>=0;e-=1){const r=a[e];n&&r.listener===n||n&&r.listener&&r.listener.dom7proxy&&r.listener.dom7proxy===n?(i.removeEventListener(t,r.proxyListener,o),a.splice(e,1)):n||(i.removeEventListener(t,r.proxyListener,o),a.splice(e,1))}}}return this}function Kp(){const e=Fp();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Xp(){const e=Fp();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function Zp(){if(this.length>0){const e=Fp(),t=Bp(),r=this[0],n=r.getBoundingClientRect(),o=t.body,i=r.clientTop||o.clientTop||0,a=r.clientLeft||o.clientLeft||0,s=r===e?e.scrollY:r.scrollTop,u=r===e?e.scrollX:r.scrollLeft;return{top:n.top+s-i,left:n.left+u-a}}return null}function Jp(){for(let e=0;e<this.length;e+=1)this[e].style.display="none";return this}function Qp(){const e=Fp();for(let t=0;t<this.length;t+=1){const r=this[t];"none"===r.style.display&&(r.style.display=""),"none"===e.getComputedStyle(r,null).getPropertyValue("display")&&(r.style.display="block")}return this}function eg(e,t){const r=Fp();let n;if(1===arguments.length){if("string"!=typeof e){for(n=0;n<this.length;n+=1)for(const t in e)this[n].style[t]=e[t];return this}if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(n=0;n<this.length;n+=1)this[n].style[e]=t;return this}return this}function tg(e){return e?(this.forEach((t,r)=>{e.apply(t,[t,r])}),this):this}function rg(e){return _p(Rp(this,e))}function ng(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 og(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 ig(e){const t=Fp(),r=Bp(),n=this[0];let o,i;if(!n||void 0===e)return!1;if("string"==typeof e){if(n.matches)return n.matches(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);for(o=_p(e),i=0;i<o.length;i+=1)if(o[i]===n)return!0;return!1}if(e===r)return n===r;if(e===t)return n===t;if(e.nodeType||e instanceof Ip){for(o=e.nodeType?[e]:e,i=0;i<o.length;i+=1)if(o[i]===n)return!0;return!1}return!1}function ag(...e){let t;const r=Bp();for(let n=0;n<e.length;n+=1){t=e[n];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const n=r.createElement("div");for(n.innerHTML=t;n.firstChild;)this[e].appendChild(n.firstChild)}else if(t instanceof Ip)for(let r=0;r<t.length;r+=1)this[e].appendChild(t[r]);else this[e].appendChild(t)}return this}function sg(e){const t=Bp();let r,n;for(r=0;r<this.length;r+=1)if("string"==typeof e){const o=t.createElement("div");for(o.innerHTML=e,n=o.childNodes.length-1;n>=0;n-=1)this[r].insertBefore(o.childNodes[n],this[r].childNodes[0])}else if(e instanceof Ip)for(n=0;n<e.length;n+=1)this[r].insertBefore(e[n],this[r].childNodes[0]);else this[r].insertBefore(e,this[r].childNodes[0]);return this}function ug(e){const t=[];for(let r=0;r<this.length;r+=1)null!==this[r].parentNode&&(e?_p(this[r].parentNode).is(e)&&t.push(this[r].parentNode):t.push(this[r].parentNode));return _p(t)}function lg(e){const t=[];for(let r=0;r<this.length;r+=1){let n=this[r].parentNode;for(;n;)e?_p(n).is(e)&&t.push(n):t.push(n),n=n.parentNode}return _p(t)}function cg(e){const t=[];for(let r=0;r<this.length;r+=1){const n=this[r].querySelectorAll(e);for(let e=0;e<n.length;e+=1)t.push(n[e])}return _p(t)}function dg(e){const t=[];for(let r=0;r<this.length;r+=1){const n=this[r].children;for(let r=0;r<n.length;r+=1)e&&!_p(n[r]).is(e)||t.push(n[r])}return _p(t)}function fg(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function hg(){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}_p.fn=Ip.prototype;const pg="resize scroll".split(" ");function gg(e){return function(...t){if(void 0===t[0]){for(let t=0;t<this.length;t+=1)pg.indexOf(e)<0&&(e in this[t]?this[t][e]():_p(this[t]).trigger(e));return this}return this.on(e,...t)}}const mg=gg("click"),vg=gg("focus"),yg=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let bg=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&r[e]];return t};function wg(e){Promise.resolve().then(e)}var Eg,xg=function(e){return Object.prototype.toString.call(e)},Sg=globalThis.Node;eg&&(_p.fn.css=eg),ag&&(_p.fn.append=ag),zp&&(_p.fn.addClass=zp),jp&&(_p.fn.removeClass=jp),Hp&&(_p.fn.hasClass=Hp),Wp&&(_p.fn.on=Wp),vg&&(_p.fn.focus=vg),$p&&(_p.fn.attr=$p),Vp&&(_p.fn.removeAttr=Vp),Jp&&(_p.fn.hide=Jp),Qp&&(_p.fn.show=Qp),Zp&&(_p.fn.offset=Zp),Kp&&(_p.fn.width=Kp),Xp&&(_p.fn.height=Xp),ug&&(_p.fn.parent=ug),lg&&(_p.fn.parents=lg),ig&&(_p.fn.is=ig),qp&&(_p.fn.dataset=qp),Gp&&(_p.fn.val=Gp),og&&(_p.fn.text=og),ng&&(_p.fn.html=ng),dg&&(_p.fn.children=dg),fg&&(_p.fn.remove=fg),cg&&(_p.fn.find=cg),tg&&(_p.fn.each=tg),hg&&(_p.fn.empty=hg),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"}(Eg||(Eg={}));var Cg=/\[object HTML([A-Z][a-z]*)*Element\]/,Ag=function(e){return Cg.test(xg(e))},Dg=function(e){return null!=e&&"number"==typeof e.nodeType},Tg=function(e){return Dg(e)&&e.nodeType===Eg.COMMENT_NODE},kg=function(e){return Dg(e)&&e.nodeType===Eg.ELEMENT_NODE},Ng=function(e){return"[object Selection]"===xg(e)},Og=function(e){return Dg(e)&&e.nodeType===Eg.TEXT_NODE},Bg=function(e){var t,r,n;return null!==(t=window&&window.document.getElementById(e))&&void 0!==t?t:window&&(null===(n=null===(r=window.document.activeElement)||void 0===r?void 0:r.shadowRoot)||void 0===n?void 0:n.getElementById(e))||null},Mg=function(e,t,r){for(var n=e.childNodes,o=n[t],i=t,a=!1,s=!1;(Tg(o)||kg(o)&&0===o.childNodes.length||kg(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=n.length?(a=!0,i=t-1,r="backward"):i<0?(s=!0,i=t+1,r="forward"):(o=n[i],t=i,i+="forward"===r?1:-1);return[o,t]},Fg=function(e,t,r){return Ch(Mg(e,t,r),1)[0]},Ig=function(e){var t,r,n="";if(Og(e)&&e.nodeValue)return e.nodeValue;if(kg(e)){try{for(var o=Sh(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;n+=Ig(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}var s=getComputedStyle(e).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==e.tagName||(n+="\n")}return n};function Pg(e,t){if(!Ag(e)||"true"!==e.dataset.slateVoid)for(var r=e.childNodes,n=r.length;n-=1;){var o=r[n],i=o.nodeType;Og(o)?t(o,e):[Eg.ELEMENT_NODE,Eg.DOCUMENT_NODE,Eg.DOCUMENT_FRAGMENT_NODE].includes(i)&&Pg(o,t)}}function Rg(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==Eg.ELEMENT_NODE?"":t.tagName.toLowerCase()}var Lg=new RegExp(String.fromCharCode(160),"g");function _g(e){return e.replace(Lg," ")}var zg=["span","b","strong","i","em","s","strike","u","font","sub","sup"],jg=[];var Hg=[];var $g={};function Vg(e,t){var r=e.length;if(r){var n=e[r-1];if(ph.Text.isText(n)){var o=Object.keys(n);if(1===o.length&&"text"===o[0])return n.text+=t,!0}}return!1}function Ug(e,t,r){return{type:"paragraph",children:t&&t.length>0?t:[{text:_p(e).text().replace(/\s+/gm," ")}]}}function qg(e,t){var r=function(e,t){var r=[];if(null!=e.attr("data-w-e-is-void"))return r;var n=e[0].childNodes;return 1===n.length&&"BR"===n[0].nodeName?(r.push({text:""}),r):(n.forEach(function(e){if(kg(e)){if("BR"===e.nodeName)return void(Vg(r,"\n")||r.push({text:"\n"}));var n=Zg(_p(e),t);Array.isArray(n)?n.forEach(function(e){return r.push(e)}):r.push(n)}else if(Og(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=_g(o),Vg(r,o)||r.push({text:o}))}}),r)}(e,t),n=function(e){for(var t in $g)if(e[0].matches(t))return $g[t];return Ug}(e),o=n(e[0],r,t);return Array.isArray(o)||(o=[o]),o.forEach(function(n){ph.Editor.isVoid(t,n)||(0===r.length&&(n.children=[{text:e.text().replace(/\s+/gm," ")}]),Hg.forEach(function(r){n=r(e[0],n,t)}))}),o}function Gg(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/[\r\n\t]+/g,"").replace(/<br>/g,"\n"));var r=e[0].textContent||"";r=function(e){return e.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&reg;/g,"®").replace(/&copy;/g,"©").replace(/&trade;/g,"™").replace(/&quot;/g,'"')}(r);var n={text:r=_g(r)};return Hg.forEach(function(r){n=r(e[0],n,t)}),n}function Wg(e){var t=Rg(e),r=e.attr&&e.attr("style")||"",n={};return["i","em"].includes(t)&&(n.italic=!0),["b","strong"].includes(t)&&(n.bold=!0),["u"].includes(t)&&(n.underline=!0),["s","strike","del"].includes(t)&&(n.through=!0),["code"].includes(t)&&(n.code=!0),["sub"].includes(t)&&(n.sub=!0),["sup"].includes(t)&&(n.sup=!0),/font-style\s*:\s*italic/i.test(r)&&(n.italic=!0),/vertical-align\s*:\s*sub/i.test(r)&&(n.sub=!0),/vertical-align\s*:\s*super/i.test(r)&&(n.sup=!0),n}function Yg(e){var t=e.attr&&e.attr("style")||"",r={},n=t.match(/font-size\s*:\s*([^;]+)/i);n&&(r.fontSize=n[1].trim());var o=t.match(/font-family\s*:\s*([^;]+)/i);o&&(r.fontFamily=o[1].trim().replace(/["']/g,""));var i=t.match(/line-height\s*:\s*([^;]+)/i);return i&&(r.lineHeight=i[1].trim()),r}function Kg(e,t,r){var n=wh({},e);return Object.keys(r||{}).forEach(function(e){void 0===n[e]&&(n[e]=r[e])}),t&&(t.bold&&!n.bold&&(n.bold=!0),t.italic&&!n.italic&&(n.italic=!0),t.underline&&!n.underline&&(n.underline=!0),t.through&&!n.through&&(n.through=!0),t.code&&!n.code&&(n.code=!0),!t.sub||n.sub||n.sup||(n.sub=!0),!t.sup||n.sup||n.sub||(n.sup=!0)),n}function Xg(e){var t,r,n,o,i=[];try{for(var a=Sh(e),s=a.next();!s.done;s=a.next()){var u=s.value,l=i[i.length-1];if(l&&void 0!==l.text&&void 0!==u.text){var c=Object.keys(l).filter(function(e){return"text"!==e}).sort(),d=Object.keys(u).filter(function(e){return"text"!==e}).sort();if(JSON.stringify(c)===JSON.stringify(d)){var f=!0;try{for(var h=(n=void 0,Sh(c)),p=h.next();!p.done;p=h.next()){var g=p.value;if(JSON.stringify(l[g])!==JSON.stringify(u[g])){f=!1;break}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}if(f){l.text+=u.text;continue}}}i.push(u)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return i}function Zg(e,t,r,n){var o,i,a,s;void 0===r&&(r={}),void 0===n&&(n={});var u=e[0];if(u.nodeType===Node.TEXT_NODE)return Kg({text:N=u.nodeValue||""},r,n);jg.forEach(function(t){var r=t.selector,n=t.preParseHtml;e[0].matches(r)&&(e=_p(n(e[0])))});var l=Rg(e);if(e.attr("data-w-e-type"))return qg(e,t);if("a"===l&&!e.attr("href")){var c=Wg(e),d=Yg(e),f=wh({},r);Object.keys(c).forEach(function(e){c[e]&&(f[e]=!0)});var h=wh(wh({},n||{}),d||{}),p=Array.from(u.childNodes),g=[];try{for(var m=Sh(p),v=m.next();!v.done;v=m.next()){if((k=v.value).nodeType!==Node.TEXT_NODE){var y=Zg(_p(k),t,f,h);Array.isArray(y)?y.forEach(function(e){return g.push(e)}):g.push(y)}else{""!==(N=k.nodeValue||"")&&g.push(Kg({text:N},f,h))}}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}if(0===g.length)return qg(e,t);var b=Xg(g);return 1===b.length?b[0]:b}if("code"===l)return"pre"===Rg(e.parent())?qg(e,t):Gg(e,t);if(!zg.includes(l))return qg(e,t);var w=Wg(e),E=Yg(e),x=wh({},r);Object.keys(w).forEach(function(e){w[e]&&(x[e]=!0)});var S=wh(wh({},n||{}),E||{}),C=Array.from(u.childNodes),A=[];try{for(var D=Sh(C),T=D.next();!T.done;T=D.next()){var k;if((k=T.value).nodeType!==Node.TEXT_NODE){y=Zg(_p(k),t,x,S);Array.isArray(y)?y.forEach(function(e){return A.push(e)}):A.push(y)}else{var N;""!==(N=k.nodeValue||"")&&A.push(Kg({text:N},x,S))}}}catch(e){a={error:e}}finally{try{T&&!T.done&&(s=D.return)&&s.call(D)}finally{if(a)throw a.error}}if(0===A.length)return Gg(e,t);var O=Xg(A);return 1===O.length?O[0]:O}function Jg(e,t,r){var n=_p(r);return!!n.attr(t)||(n.attr(t,"true"),e.on($h,function(){n.removeAttr(t)}),!1)}function Qg(e,t){void 0===t&&(t="");var r=[],n=e.getConfig().sanitizeHtml;""===t&&(t="<p><br></p>"),0!==t.indexOf("<")&&(t=t.split(/\n/).map(function(e){return"<p>".concat(e,"</p>")}).join("")),t=n?n(t):t;var o=_p("<div>".concat(t,"</div>"));return Array.from(o.children()).forEach(function(t){var n=Zg(_p(t),e);Array.isArray(n)?n.forEach(function(e){return r.push(e)}):r.push(n)}),r}function em(e,t){return"w-e-element-".concat(e,"-").concat(t)}var tm=[];var rm,nm,om={};function im(e,t,r){var n=r.isInline(e)?"span":"div";return"<".concat(n,">").concat(t,"</").concat(n,">")}function am(e,t){var r=e.type,n=void 0===r?"":r,o=e.children,i=void 0===o?[]:o,a=ph.Editor.isVoid(t,e),s="";a||(s=i.map(function(e){return Em(e,t)}).join(""));var u=function(e){return om[e]||im}(n),l=u(e,s,t),c="";if(c="string"==typeof l?l:l.html||"",a||tm.forEach(function(t){return c=t(e,c)}),"string"==typeof l)return c;var d=l.prefix,f=void 0===d?"":d,h=l.suffix,p=void 0===h?"":h;return f&&(c=f+c),p&&(c+=p),c}var sm=function(){if(nm)return rm;nm=1;var e=9007199254740991,t="[object Arguments]",r="[object Map]",n="[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",h="["+l+"]",p="["+c+d+"]",g="\\ud83c[\\udffb-\\udfff]",m="[^"+l+"]",v="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",w="\\u200d",E="(?:"+p+"|"+g+")"+"?",x="["+f+"]?",S=x+E+("(?:"+w+"(?:"+[m,v,y].join("|")+")"+x+E+")*"),C="(?:"+[m+p+"?",p,v,y,h].join("|")+")",A=RegExp(g+"(?="+g+")|"+C+S,"g"),D=RegExp("["+w+l+c+d+f+"]"),T="object"==typeof b&&b&&b.Object===Object&&b,k="object"==typeof self&&self&&self.Object===Object&&self,N=T||k||Function("return this")();function O(e,t){return function(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}(t,function(t){return e[t]})}function B(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function M(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function F(e){return function(e){return D.test(e)}(e)?function(e){return e.match(A)||[]}(e):function(e){return e.split("")}(e)}var I,P,R=Function.prototype,L=Object.prototype,_=N["__core-js_shared__"],z=function(){var e=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),j=R.toString,H=L.hasOwnProperty,$=L.toString,V=RegExp("^"+j.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=N.Symbol,q=U?U.iterator:void 0,G=L.propertyIsEnumerable,W=(I=Object.keys,P=Object,function(e){return I(P(e))}),Y=se(N,"DataView"),K=se(N,"Map"),X=se(N,"Promise"),Z=se(N,"Set"),J=se(N,"WeakMap"),Q=ce(Y),ee=ce(K),te=ce(X),re=ce(Z),ne=ce(J);function oe(e,r){var n=de(e)||function(e){return function(e){return ge(e)&&fe(e)}(e)&&H.call(e,"callee")&&(!G.call(e,"callee")||$.call(e)==t)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],o=n.length,i=!!o;for(var a in e)!H.call(e,a)||i&&("length"==a||le(a,o))||n.push(a);return n}function ie(e){if(!pe(e)||function(e){return!!z&&z in e}(e))return!1;var t=he(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?V:s;return t.test(ce(e))}function ae(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||L,t!==n)return W(e);var t,r,n,o=[];for(var i in Object(e))H.call(e,i)&&"constructor"!=i&&o.push(i);return o}function se(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ie(r)?r:void 0}var ue=function(e){return $.call(e)};function le(t,r){return!!(r=null==r?e:r)&&("number"==typeof t||u.test(t))&&t>-1&&t%1==0&&t<r}function ce(e){if(null!=e){try{return j.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(Y&&ue(new Y(new ArrayBuffer(1)))!=a||K&&ue(new K)!=r||X&&ue(X.resolve())!=n||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 r;case te:return n;case re:return o;case ne: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)&&!he(t)}function he(e){var t=pe(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function pe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ge(e){return!!e&&"object"==typeof e}function me(e){return e?O(e,function(e){return fe(e)?oe(e):ae(e)}(e)):[]}return rm=function(e){if(!e)return[];if(fe(e))return function(e){return"string"==typeof e||!de(e)&&ge(e)&&"[object String]"==$.call(e)}(e)?F(e):function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(e);if(q&&e[q])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[q]());var t=ue(e);return(t==r?B:t==o?M:me)(e)},rm}(),um=w(sm),lm=0,cm=function(){this.id="".concat(lm++)},dm="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),fm="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),hm="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),pm="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),gm="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),mm="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),vm=!gm&&!pm&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,ym=function(e,t){return Boolean(e.compareDocumentPosition(t)&Sg.DOCUMENT_POSITION_PRECEDING)},bm=function(e,t){return Boolean(e.compareDocumentPosition(t)&Sg.DOCUMENT_POSITION_FOLLOWING)},wm={getWindow:function(e){var t=bp.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var r=yp.get(t);return r||(r=new cm,yp.set(t,r)),r},setNewKey:function(e){var t=new cm;yp.set(e,t)},findPath:function(e,t){for(var r=[],n=t;;){var o=hp.get(n);if(null==o){if(ph.Editor.isEditor(n))return r;break}var i=fp.get(n);if(null==i)break;r.unshift(i),n=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=wm.toDOMNode(e,e),r=t.getRootNode();return"[object HTMLDocument]"!==xg(r)&&!function(e){return"[object ShadowRoot]"===xg(e)}(r)||null==Reflect.get(r,"getSelection")?t.ownerDocument:r},getParentNode:function(e,t){return hp.get(t)||null},getParentsNodes:function(e,t){for(var r=[],n=t;n!==e&&null!=n;){var o=wm.getParentNode(e,n);if(null==o)break;r.push(o),n=o}return r},getTopNode:function(e,t){var r=[wm.findPath(e,t)[0]];return ph.Node.get(e,r)},toDOMNode:function(e,t){var r;if(ph.Editor.isEditor(t))r=pp.get(e);else{var n=wm.findKey(e,t);r=mp.get(n)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(t)));return r},hasDOMNode:function(e,t,r){void 0===r&&(r={});var n,o=r.editable,i=void 0!==o&&o,a=wm.toDOMNode(e,e);try{n=kg(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!n&&(n.closest("[data-slate-editor]")===a&&(!i||n.isContentEditable||n.closest('[contenteditable="false"]')===a||!!n.getAttribute("data-slate-zero-width"))||!!n.getAttribute("data-slate-string"))},toDOMRange:function(e,t){var r=t.anchor,n=t.focus,o=ph.Range.isBackward(t),i=wm.toDOMPoint(e,r),a=ph.Range.isCollapsed(t)?i:wm.toDOMPoint(e,n),s=wm.getWindow(e).document.createRange(),u=Ch(o?a:i,2),l=u[0],c=u[1],d=Ch(o?i:a,2),f=d[0],h=d[1],p=!!(kg(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!(kg(f)?f:f.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,p?1:c),s.setEnd(f,g?1:h),s},toDOMPoint:function(e,t){var r,n,o,i=Ch(ph.Editor.node(e,t.path),1)[0],a=wm.toDOMNode(e,i);ph.Editor.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=Sh(s),c=l.next();!c.done;c=l.next()){var d=c.value,f=d.childNodes[0];if(null!=f&&null!=f.textContent){var h=f.textContent.length,p=d.getAttribute("data-slate-length"),g=u+(null==p?h:parseInt(p,10));if(t.offset<=g){o=[f,Math.min(h,Math.max(0,t.offset-u))];break}u=g}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.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 r=kg(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?gp.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var r=t.clientX,n=t.clientY,o=t.target;if(null==r||null==n)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i,a=wm.toSlateNode(e,t.target),s=wm.findPath(e,a);if(ph.Element.isElement(a)&&ph.Editor.isVoid(e,a)){var u=o.getBoundingClientRect(),l=e.isInline(a)?r-u.left<u.left+u.width-r:n-u.top<u.top+u.height-n,c=ph.Editor.point(e,s,{edge:l?"start":"end"}),d=l?ph.Editor.before(e,c):ph.Editor.after(e,c);if(d)return ph.Editor.range(e,d)}var f=this.getWindow(e).document;if(f.caretRangeFromPoint)i=f.caretRangeFromPoint(r,n);else{var h=f.caretPositionFromPoint(r,n);h&&((i=f.createRange()).setStart(h.offsetNode,h.offset),i.setEnd(h.offsetNode,h.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));return wm.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,r){var n,o,i,a,s,u=r.exactMatch,l=r.suppressThrow;if((Ng(t)?t.anchorNode:t.startContainer)&&(Ng(t)?(n=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=mm&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(n=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=t.collapsed)),null==n||null==i||null==o||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=wm.toSlatePoint(e,[n,o],{exactMatch:u,suppressThrow:l});if(!c)return null;var d=s?c:wm.toSlatePoint(e,[i,a],{exactMatch:u,suppressThrow:l,searchDirection:ym(n,i)||n===i&&a<o?"forward":"backward"});if(!d)return null;var f={anchor:c,focus:d};return ph.Range.isExpanded(f)&&ph.Range.isForward(f)&&kg(i)&&ph.Editor.void(e,{at:f.focus,mode:"highest"})&&(f=ph.Editor.unhangRange(e,f,{voids:!0})),f},toSlatePoint:function(e,t,r){var n,o,i,a=r.exactMatch,s=r.suppressThrow,u=Ch(a?t:function(e){var t,r=Ch(e,2),n=r[0],o=r[1];if(kg(n)&&n.childNodes.length){var i=o===n.childNodes.length,a=i?o-1:o;for(n=(t=Ch(Mg(n,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;kg(n)&&n.childNodes.length;){var s=i?n.childNodes.length-1:0;n=Fg(n,s,i?"backward":"forward")}o=i&&null!=n.textContent?n.textContent.length:0}return[n,o]}(t),2),l=u[0],c=u[1],d=l.parentNode,f=r.searchDirection,h=null,p=0;if(d){var g=wm.toDOMNode(e,e),m=d.closest('[data-slate-void="true"]'),v=m&&g.contains(m)?m:null,y=d.closest('[contenteditable="false"]'),b=y&&g.contains(y)?y:null,w=d.closest("[data-slate-leaf]"),E=null,x=wm.getWindow(e);if(w&&x.document.createRange){h=w.closest('[data-slate-node="text"]');var S=x.document.createRange();S.setStart(h,0),S.setEnd(l,c);var C=S.cloneContents();Ah(Ah([],Ch(um(C.querySelectorAll("[data-slate-zero-width]"))),!1),Ch(um(C.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(e){e.parentNode.removeChild(e)}),p=C.textContent.length,E=h}else if(v)(w=Array.from(v.querySelectorAll("[data-slate-leaf]")).find(function(t){return wm.hasDOMNode(e,t)})||null)?(h=w.closest('[data-slate-node="text"]'),p=(E=w).textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(function(e){p-=e.textContent.length})):p=1;else if(b){var A=function(t){return t?Array.from(t.querySelectorAll("[data-slate-leaf]")).filter(function(t){return wm.hasDOMNode(e,t)}):[]},D=b.closest('[data-slate-node="element"]');if("backward"===f||!f)for(var T=(N=Ah(Ah([],Ch(A(null==D?void 0:D.previousElementSibling)),!1),Ch(A(D)),!1)).length-1;T>=0;T-=1){var k=N[T];if(ym(b,k)){w=k,f="backward";break}}if(!(w||"forward"!==f&&f)){var N=Ah(Ah([],Ch(A(D)),!1),Ch(A(null==D?void 0:D.nextElementSibling)),!1);try{for(var O=Sh(N),B=O.next();!B.done;B=O.next()){k=B.value;if(bm(b,k)){w=k,f="forward";break}}}catch(e){n={error:e}}finally{try{B&&!B.done&&(o=O.return)&&o.call(O)}finally{if(n)throw n.error}}}w&&(h=w.closest('[data-slate-node="text"]'),E=w,"forward"===f?p=0:(p=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(function(e){p-=e.textContent.length})))}E&&p===E.textContent.length&&(d.hasAttribute("data-slate-zero-width")||fm&&(null===(i=E.textContent)||void 0===i?void 0:i.endsWith("\n")))&&(p-=1)}if(!h){if(s)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var M,F=wm.toSlateNode(e,h);try{M=wm.findPath(e,F)}catch(e){if(s)return null;throw e}return{path:M,offset:p}},hasRange:function(e,t){var r=t.anchor,n=t.focus;return ph.Editor.hasPath(e,r.path)&&ph.Editor.hasPath(e,n.path)},getNodeType:function(e){return ph.Element.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(e){return ph.Node.string(e)}).join("")},getSelectedElems:function(e){var t,r,n=[],o=ph.Editor.nodes(e,{universal:!0});try{for(var i=Sh(o),a=i.next();!a.done;a=i.next()){var s=Ch(a.value,1)[0];ph.Element.isElement(s)&&n.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},getSelectedNodeByType:function(e,t){var r=this,n=Ch(ph.Editor.nodes(e,{match:function(e){return r.checkNodeType(e,t)},universal:!0}),1),o=n[0];return null==o?null:o[0]},getSelectedTextNode:function(e){var t=Ch(ph.Editor.nodes(e,{match:function(e){return ph.Text.isText(e)},universal:!0}),1),r=t[0];return null==r?null:r[0]},isNodeSelected:function(e,t){var r=Ch(ph.Editor.nodes(e,{match:function(e){return e===t},universal:!0}),1),n=r[0];return null!=n&&Ch(n,1)[0]===t},isSelectionAtLineEnd:function(e,t){var r=e.selection;return!!r&&(ph.Editor.isEnd(e,r.anchor,t)||ph.Editor.isEnd(e,r.focus,t))},getTextarea:function(e){var t=Zh.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return ep.get(e)||null},getHoverbar:function(e){return rp.get(e)||null},normalizeContent:function(e){e.children.forEach(function(t,r){e.normalizeNode([t,[r]])})},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),r=t.maxLength,n=t.onMaxLength;if("number"!=typeof r||r<=0)return 1/0;var o=r-e.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&n&&n(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var t,r,n,o,i=wm.getTextarea(e).$textArea,a=null==i?void 0:i[0].childNodes;if(a)try{for(var s=Sh(Array.from(a)),u=s.next();!u.done;u=s.next()){var l=u.value;if(!Og(l))break;l.remove()}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}var c=ph.Editor.nodes(e,{match:function(t){return!(!ph.Element.isElement(t)||e.isInline(t))},universal:!0});try{for(var d=Sh(c),f=d.next();!f.done;f=d.next()){var h=f.value;if(null!=h){var p=h[0];Pg(wm.toDOMNode(e,p),function(e,t){var r=_p(t);r.attr("data-slate-string")||r.attr("data-slate-zero-width")||r.attr("data-w-e-reserve")||t.removeChild(e)})}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}},isLastNode:function(e,t){var r=e.children||[];return r[r.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,r,n=ph.Editor.nodes(e,{match:function(t){return e.isVoid(t)}}),o=0;try{for(var i=Sh(n),a=i.next();!a.done;a=i.next()){a.value&&(o+=1)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return o>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(ph.Range.isExpanded(t))return!1;var r=wm.getSelectedNodeByType(e,"paragraph");if(null===r)return!1;var n=r.children;return 1===n.length&&(""===n[0].text||void 0)},isEmptyPath:function(e,t){var r=ph.Editor.node(e,t);if(null==r)return!1;var n=Ch(r,1)[0].children;if(1===n.length&&""===n[0].text)return!0;return!1}};function Em(e,t){return ph.Element.isElement(e)?am(e,t):function(e,t){var r=e.text;if(null==r)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var n=r;n=function(e){return e.replace(/ {2}/g," &nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/®/g,"&reg;").replace(/©/g,"&copy;").replace(/™/g,"&trade;")}(n);var o=wm.getParentsNodes(t,e).some(function(e){return"pre"===wm.getNodeType(e)});if(o||(n=n.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(n=n.replace(/&nbsp;/g," ")),""===n){var i=wm.getParentNode(null,e);if(!i||0!==i.children.length)return n;n="<br>"}return tm.forEach(function(t){return n=t(e,n)}),n}(e,t)}var xm=function(e,t){var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},Sm=function(e,t,r){var n=wm.toDOMRange(e,t).getBoundingClientRect(),o=wm.toDOMRange(e,r).getBoundingClientRect();return xm(n,o)&&xm(o,n)},Cm=function(e,t){var r,n,o=[];try{for(var i=Sh(ph.Editor.levels(e,{at:t})),a=i.next();!a.done;a=i.next()){var s=Ch(a.value,2),u=s[0],l=s[1],c=wm.findKey(e,u);o.push([l,c])}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o};function Am(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):ph.Transforms.insertNodes(e,t,{mode:"highest"})}var Dm,Tm,km,Nm,Om,Bm,Mm,Fm,Im,Pm,Rm,Lm,_m,zm,jm,Hm,$m,Vm,Um,qm,Gm,Wm,Ym,Km,Xm,Zm,Jm,Qm,ev,tv,rv,nv,ov,iv,av,sv,uv,lv,cv,dv,fv=function(e){var t=e,r=t.onChange,n=t.insertText,o=t.apply,i=t.deleteBackward,a=t.deleteFragment;return t.insertText=function(e){t.getConfig().readOnly||n(e)},t.apply=function(e){var r,n,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,Ah([],Ch(Cm(t,e.path)),!1));break;case"insert_node":case"remove_node":d.push.apply(d,Ah([],Ch(Cm(t,ph.Path.parent(e.path))),!1));break;case"merge_node":var f=ph.Path.previous(e.path);d.push.apply(d,Ah([],Ch(Cm(t,f)),!1));break;case"move_node":var h=ph.Path.common(ph.Path.parent(e.path),ph.Path.parent(e.newPath));d.push.apply(d,Ah([],Ch(Cm(t,h)),!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,Ah([],Ch(Cm(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,Ah([],Ch(Cm(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 p=Sh(d),g=p.next();!g.done;g=p.next()){var m=Ch(g.value,2),v=m[0],y=m[1],b=Ch(ph.Editor.node(t,v),1)[0];yp.set(b,y),"type"in b&&(cp.has(b)&&cp.delete(b),dp.has(b)&&dp.delete(b))}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}},t.deleteBackward=function(r){if("line"!==r)return i(r);if(e.selection&&ph.Range.isCollapsed(e.selection)){var n=ph.Editor.above(e,{match:function(t){return ph.Element.isElement(t)&&ph.Editor.isBlock(e,t)},at:e.selection});if(n){var o=Ch(n,2)[1],a=ph.Editor.range(e,o,e.selection.anchor),s=function(e,t){var r=ph.Editor.range(e,ph.Range.end(t)),n=Array.from(ph.Editor.positions(e,{at:t})),o=0,i=n.length,a=Math.floor(i/2);if(Sm(e,ph.Editor.range(e,n[o]),r))return ph.Editor.range(e,n[o],r);if(n.length<2)return ph.Editor.range(e,n[n.length-1],r);for(;a!==n.length&&a!==o;)Sm(e,ph.Editor.range(e,n[a]),r)?i=a:o=a,a=Math.floor((o+i)/2);return ph.Editor.range(e,n[i],r)}(t,a);ph.Range.isCollapsed(s)||ph.Transforms.delete(e,{at:s})}}},t.deleteFragment=function(e){var r=function(e){var t=e.selection;if(null==t||ph.Range.isCollapsed(t))return!1;var r=Ch(ph.Range.edges(t),2),n=r[0],o=r[1],i=Ch(ph.Editor.edges(e,[]),2),a=i[0],s=i[1];return ph.Point.equals(n,a)&&ph.Point.equals(o,s)}(t);a(e),r&&(!function(e){var t=[{type:"paragraph",children:[{text:""}]}];ph.Editor.withoutNormalizing(e,function(){for(var r=e.children.length-1;r>=0;r-=1)ph.Transforms.removeNodes(e,{at:[r]});ph.Transforms.insertNodes(e,t,{at:[0]})})}(t),t.children.length>0&&ph.Transforms.select(t,ph.Editor.start(t,[])))},t.onChange=function(){var e=t.selection;null!=e&&Ep.set(t,e),t.emit(Vh),r()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children,r=void 0===e?[]:e,n=t.getConfig().skipCacheTypes,o=void 0===n?["list-item"]:n;return r.map(function(e){var r=wm.getNodeType(e);if(o.includes(r))return Em(e,t);var n=dp.get(e);if(n)return n;var i=Em(e,t);return dp.set(e,i),i}).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map(function(e){return ph.Node.string(e)}).join("\n")},t.getSelectionText=function(){var r=t.selection;return null==r?"":ph.Editor.string(e,r)},t.getElemsByType=function(e,r){var n,o;void 0===r&&(r=!1);var i=[],a=ph.Editor.nodes(t,{at:[],universal:!0});try{for(var s=Sh(a),u=s.next();!u.done;u=s.next()){var l=Ch(u.value,1)[0];if(ph.Element.isElement(l))if(r?l.type.indexOf(e)>=0:l.type===e){var c=wm.findKey(t,l),d=em(l.type,c.id);i.push(wh(wh({},l),{id:d}))}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,r=void 0===e?[]:e;if(r.length>1)return!1;var n=r[0];if(null==n)return!0;if(!ph.Element.isElement(n)||"paragraph"!==n.type)return!1;var o=n.children,i=void 0===o?[]:o;if(i.length>1)return!1;var a=i[0];return null==a||ph.Text.isText(a)&&""===a.text},t.clear=function(){ph.Transforms.delete(t,{at:{anchor:ph.Editor.start(t,[]),focus:ph.Editor.end(t,[])}}),0!==t.children.length?function(e){var t=e.children[0];if(1===e.children.length&&ph.Element.isElement(t)&&("paragraph"!==t.type||""!==ph.Node.string(t))&&""===ph.Node.string(t)){var r=[{type:"paragraph",children:[{text:""}]}];ph.Editor.withoutNormalizing(e,function(){ph.Transforms.removeNodes(e,{at:[0]}),ph.Transforms.insertNodes(e,r,{at:[0]})})}}(t):ph.Transforms.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return wm.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,r){if(void 0===e&&(e=""),void 0===r&&(r=!1),e){var n=document.createElement("div");n.innerHTML=e;var o=Array.from(n.childNodes);if(o=o.filter(function(e){var t=e.nodeName;return!!Og(e)||!!kg(e)&&!Tp.has(t.toLowerCase())}),0!==o.length){var i=t.selection;if(null!=i){var a=null;if(wm.isSelectedEmptyParagraph(t)&&!r)a=[i.focus.path[0]];n.setAttribute("hidden","true"),document.body.appendChild(n);var s=0;o.forEach(function(e,r){var n=e.nodeName,i=e.textContent,a=void 0===i?"":i;if(Og(e)){if(!a||!a.trim())return;t.insertNode({text:a})}else if("BR"!==n){var u=e,l=!1;if(zg.includes(n.toLowerCase()))l=!0;else for(var c in $g)if(u.matches(c)){l=!0;break}if(l){var d=Zg(_p(u),t);return Array.isArray(d)?(d.forEach(function(e){return Am(t,e)}),s+=1):(Am(t,d),s+=1),void(wm.isSelectedVoidNode(t)&&t.move(1))}var f=window.getComputedStyle(u).display;if(!wm.isSelectedEmptyParagraph(t)&&f.indexOf("inline")<0){if(r>=1)(function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")})(o[r-1])&&t.insertBreak();t.insertBreak()}t.dangerouslyInsertHtml(u.innerHTML,!0)}else t.insertText("\n")}),s&&a&&wm.isEmptyPath(t,a)&&ph.Transforms.removeNodes(t,{at:a}),n.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var r=t.isDisabled(),n=t.isFocused(),o=JSON.stringify(t.selection);t.enable(),Ep.delete(t),t.focus(),t.clear();var i=Qg(t,null==e?"":e);if(ph.Transforms.insertFragment(t,i),n||(t.deselect(),t.blur()),r&&(t.deselect(),t.disable()),t.isFocused())try{var a=JSON.parse(o);ph.Range.isRange(a)&&wm.hasRange(t,a)?t.select(a):t.select(ph.Editor.start(t,[]))}catch(e){t.select(ph.Editor.start(t,[]))}},t},hv=1,pv=function(e){var t=e;return t.id="wangEditor-".concat(hv),hv+=1,t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(wm.toDOMNode(t,t).focus({preventScroll:!0}),wp.set(t,!0),e){var r=ph.Editor.end(t,[]);ph.Transforms.select(t,r)}else{var n=Ep.get(t);n?ph.Transforms.select(t,n):ph.Transforms.select(t,ph.Editor.start(t,[]))}},t.isFocused=function(){return!!wp.get(t)},t.blur=function(){wm.toDOMNode(t,t).blur(),ph.Transforms.deselect(t),wp.set(t,!1)},t.updateView=function(){wm.getTextarea(t).changeViewState();var e=wm.getToolbar(t);e&&e.changeToolbarState();var r=wm.getHoverbar(t);r&&r.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=wm.getTextarea(t);e.destroy(),Zh.delete(t),Jh.delete(e);var r=wm.getToolbar(t);r&&(r.destroy(),ep.delete(t),Qh.delete(r));var n=wm.getHoverbar(t);n&&(n.destroy(),rp.delete(t),tp.delete(n)),t.isDestroyed=!0,t.emit($h)}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var r="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return r+="\nYou has disabled editor scroll, please do this yourself",void console.warn(r)}var n=_p("#".concat(e));if(0!==n.length){var o=n[0];if(!wm.hasDOMNode(t,o)){r="Element (found by id is '".concat(e,"') is not in editor DOM");return r+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(r,o)}var i=wm.getTextarea(t),a=i.$textAreaContainer,s=i.$scroll,u=n.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||wm.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=op.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 wm.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,r=wm.getToolbar(t);r&&(e=r.$box);var n=wm.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==n[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 父节点不一致")}n.addClass("w-e-full-screen-container");var o=n.css("z-index");n.attr("data-z-index",o.toString()),t.isFullScreen=!0,t.emit(qh)}},t.unFullScreen=function(){if(t.isFullScreen){var e=wm.getTextarea(t).$box.parent();setTimeout(function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit(Gh)},200)}},t.getEditableContainer=function(){return wm.getTextarea(t).$textAreaContainer[0]},t},gv={exports:{}},mv={exports:{}};function vv(){if(Tm)return Dm;Tm=1;return Dm=function(e){return null!=e}}function yv(){if(Bm)return Om;Bm=1;var e=function(){if(Nm)return km;Nm=1;var e=vv(),t={object:!0,function:!0,undefined:!0};return km=function(r){return!!e(r)&&hasOwnProperty.call(t,typeof r)}}();return Om=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function bv(){if(Pm)return Im;Pm=1;var e=function(){if(Fm)return Mm;Fm=1;var e=yv();return Mm=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{/}]/,r=Function.prototype.toString;return Im=function(n){return!!e(n)&&!t.test(r.call(n))}}function wv(){if(Vm)return $m;Vm=1;var e=(Hm?jm:(Hm=1,jm=function(){}))();return $m=function(t){return t!==e&&null!==t},$m}function Ev(){return Wm||(Wm=1,Gm=(zm?_m:(zm=1,_m=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(qm)return Um;qm=1;var e=wv(),t=Object.keys;return Um=function(r){return t(e(r)?Object(r):r)}}()),Gm}function xv(){if(Zm)return Xm;Zm=1;var e=Ev(),t=function(){if(Km)return Ym;Km=1;var e=wv();return Ym=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),r=Math.max;return Xm=function(n,o){var i,a,s,u=r(arguments.length,2);for(n=Object(t(n)),s=function(e){try{n[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 n},Xm}function Sv(){return Qm?Jm:(Qm=1,Jm=(Lm||(Lm=1,Rm=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")}),Rm)()?Object.assign:xv())}function Cv(){return sv||(sv=1,av=function(){if(nv)return rv;nv=1;var e="razdwatrzy";return rv=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(iv)return ov;iv=1;var e=String.prototype.indexOf;return ov=function(t){return e.call(this,t,arguments[1])>-1},ov}()),av}function Av(){if(uv)return mv.exports;uv=1;var e=vv(),t=bv(),r=Sv(),n=function(){if(tv)return ev;tv=1;var e=wv(),t=Array.prototype.forEach,r=Object.create;return ev=function(n){var o=r(null);return t.call(arguments,function(t){e(t)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(t),o)}),o},ev}(),o=Cv(),i=mv.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?r(n(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?r(n(c),d):d},mv.exports}var Dv=(dv||(dv=1,function(e,t){var r,n,o,i,a,s,u,l=Av(),c=cv?lv:(cv=1,lv=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),d=Function.prototype.apply,f=Function.prototype.call,h=Object.create,p=Object.defineProperty,g=Object.defineProperties,m=Object.prototype.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var r;return c(t),m.call(this,"__ee__")?r=this.__ee__:(r=v.value=h(null),p(this,"__ee__",v),v.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},n=function(e,t){var n,i;return c(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),d.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var r,n,o,i;if(c(t),!m.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(i=0;o=n[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===n.length?r[e]=n[i?0:1]:n.splice(i,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},i=function(e){var t,r,n,o,i;if(m.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(r=arguments.length,i=new Array(r-1),t=1;t<r;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;n=o[t];++t)d.call(n,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(r=arguments.length,i=new Array(r-1),t=1;t<r;++t)i[t-1]=arguments[t];d.call(o,this,i)}},a={on:r,once:n,off:o,emit:i},s={on:l(r),once:l(n),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?h(u):g(Object(e),s)},t.methods=a}(gv,gv.exports)),gv.exports),Tv=w(Dv);function kv(e){var t=xp.get(e);return null==t&&(t=Tv(),xp.set(e,t)),t}var Nv=new WeakMap;function Ov(e,t){var r=Nv.get(e);null==r&&(r=new Set,Nv.set(e,r)),r.add(t)}var Bv=function(e){var t=e;return t.on=function(e,r){var n=kv(t);if(n.on(e,r),"destroyed"===e&&Ov(t,r),"destroyed"!==e){var o=function(){return n.off(e,r)};n.on("destroyed",o),Ov(t,o)}},t.once=function(e,r){kv(t).once(e,r)},t.off=function(e,r){kv(t).off(e,r)},t.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=kv(t);if(o.emit.apply(o,Ah([e],Ch(r),!1)),"destroyed"===e){var i=function(e){return Nv.get(e)||new Set}(t);i.forEach(function(e){return o.off("destroyed",e)}),function(e){Nv.set(e,new Set)}(t)}},t};var Mv=function(e){var t=e;return t.setFragmentData=function(e){var r=t.selection;if(r){var n=Ch(ph.Range.edges(r),2),o=n[0],i=n[1],a=ph.Editor.void(t,{at:o.path}),s=ph.Editor.void(t,{at:i.path});if(!ph.Range.isCollapsed(r)||a){var u=wm.toDOMRange(t,r),l=u.cloneContents(),c=l.childNodes[0];if(l.childNodes.forEach(function(e){e.textContent&&""!==e.textContent.trim()&&(c=e)}),s){var d=Ch(s,1)[0],f=u.cloneRange(),h=wm.toDOMNode(t,d);f.setEndAfter(h),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":""}),Og(c)){var p=c.ownerDocument.createElement("span");p.style.whiteSpace="pre",p.appendChild(c),l.appendChild(p),c=p}var g=t.getFragment(),m=JSON.stringify(g),v=window.btoa(encodeURIComponent(m));c.setAttribute("data-slate-fragment",v),e.setData("application/x-slate-fragment",v);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",Ig(y)),l.ownerDocument.body.removeChild(y),e}}},t.insertData=function(e){var r=e.getData("application/x-slate-fragment");if(r){var n=decodeURIComponent(window.atob(r)),o=JSON.parse(n);t.insertFragment(o)}else{var i=e.getData("text/plain"),a=e.getData("text/html");if(a){var s=t.getConfig().sanitizeHtml;t.dangerouslyInsertHtml(s?s(a):a)}else if(i){if(!/[\r\n]/.test(i))return void t.insertText(i);var u=function(e){return e.replace(/\n\r|\r\n|\r/g,"\n").split("\n").map(function(e){return{type:"paragraph",children:[{text:e}]}})}(i);t.insertFragment(u)}}},t};function Fv(e){return e.replace(/\n\r|\r\n|\r|\n/g,"").length}function Iv(e,t){var r,n;if(t<=0)return"";var o=t,i="";try{for(var a=Sh(e),s=a.next();!s.done;s=a.next()){var u=s.value;if(/\r|\n/.test(u))i+=u;else{if(o<=0)break;i+=u,o-=1}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}var Pv=function(e){var t=e,r=t.insertText,n=t.insertNode,o=t.insertFragment,i=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var n=wm.getLeftLengthOfMaxLength(t);n<=0||(n<e.length?r(e.slice(0,n)):r(e))}else r(e)},t.insertNode=function(e){if(t.getConfig().maxLength){var r=wm.getLeftLengthOfMaxLength(t);if(!(r<=0))r<ph.Node.string(e).length||n(e)}else n(e)},t.insertFragment=function(e){if(t.getConfig().maxLength){if(e.length>0){var r=e[0];if(wm.getLeftLengthOfMaxLength(t)<ph.Node.string(r).length)return;o([r]);for(var n=1;n<e.length;n+=1)t.insertNode(e[n])}}else o(e)},t.dangerouslyInsertHtml=function(e,r){if(void 0===e&&(e=""),void 0===r&&(r=!1),e)if(t.getConfig().maxLength){var n=wm.getLeftLengthOfMaxLength(t);if(!(n<=0)){var o=function(e,t){if(t<=0)return"";var r=document.createElement("div");r.innerHTML=e;var n=function(e){e.forEach(function(e){return e.remove()})},o=function(e){for(var r=Array.from(e.childNodes),i=0;i<r.length;i+=1){var a=r[i];if(Og(a)){var s=a.textContent||"",u=Fv(s);if(u<=t){t-=u;continue}return a.textContent=Iv(s,t),t=0,n(r.slice(i+1)),!1}if(kg(a)){if(Tp.has(a.nodeName.toLowerCase())){a.remove();continue}if(!o(a))return n(r.slice(i+1)),!1}else a.remove()}return t>0};return o(r),r.innerHTML}(e,n);o&&i(o,r)}}else i(e,r)},t};function Rv(e){var t=wm.getTextarea(e).$textAreaContainer,r=t.width(),n=t.height(),o=t.offset();return{top:o.top,left:o.left,width:r,height:n}}function Lv(e){var t={top:"0",left:"0"},r=e.selection;if(null==r)return t;var n=Rv(e);if(null==n)return t;var o=n.top,i=n.left,a=n.width,s=n.height,u=wm.toDOMRange(e,r).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 h=a-f;c.right="".concat(h+5,"px")}else c.left="".concat(f+5,"px");if(d>s/2){var p=s-d;c.bottom="".concat(p+5,"px")}else{var g=u[u.length-1],m=g.top-o+g.height;m<0&&(m=0),c.top="".concat(m+5,"px")}return c}function _v(e,t,r){void 0===r&&(r="modal");var n={top:"0",left:"0"};if(null==e.selection)return n;var o=ph.Element.isElement(t)&&e.isVoid(t),i=ph.Element.isElement(t)&&e.isInline(t),a=vp.get(t);if(null==a)return n;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 r=0;t.length>0;){var n=t.pop();if(null==n)break;if((r+=1)>1e4)break;var o=n.nodeName;if(n.nodeType===Eg.ELEMENT_NODE){var i=o.toLowerCase();if(yg.includes(i)||"iframe"===i||"video"===i)return n;var a=n.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 h=f.getBoundingClientRect();u=h.top,c=h.height}}var p=Rv(e);if(null==p)return n;var g=p.top,m=p.left,v=p.width,y=p.height,b={},w=u-g,E=l-m;if("bar"===r)return b.left="".concat(E,"px"),w>40?b.bottom="".concat(y-w+5,"px"):b.top="".concat(w+c+5,"px"),b;if("modal"===r){if(o?i?E>(v-d)/2?b.right="".concat(v-E+5,"px"):b.left="".concat(E+d+5,"px"):b.left="20px":b.left="".concat(E,"px"),o)(x=w)<0&&(x=0),b.top="".concat(x,"px");else if(w>(y-c)/2)b.bottom="".concat(y-w+5,"px");else{var x;(x=w+c)<0&&(x=0),b.top="".concat(x+5,"px")}return b}throw new Error("type '".concat(r,"' is invalid"))}function zv(e,t){wg(function(){var r=Rv(e);if(null!=r){var n,o=r.top,i=r.left,a=r.width,s=r.height,u=t.offset(),l=u.top,c=u.left,d=t.width(),f=t.height(),h=l-o,p=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((n=h+f-s)>0){var m=t.css("top"),v=parseInt(m.toString(),10)-n;v<0&&(v=0),t.css("top","".concat(v,"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((n=p+d-a)>0){var w=t.css("left"),E=parseInt(w.toString(),10)-n;E<0&&(E=0),t.css("left","".concat(E,"px"))}if(g.indexOf("right")>=0&&c<0){var x=t.css("right"),S=parseInt(x.toString(),10)-Math.abs(c);t.css("right","".concat(S,"px"))}}})}var jv,Hv,$v=function(e){var t=e,r=t.select,n=t.deselect,o=t.move;return t.select=function(e){r(e)},t.deselect=function(){var e=t.selection,r=wm.findDocumentOrShadowRoot(t).getSelection();r&&r.rangeCount>0&&wm.hasDOMNode(t,r.anchorNode)&&wm.hasDOMNode(t,r.focusNode)&&r.removeAllRanges(),e&&n()},t.move=function(e,t){void 0===t&&(t=!1),"number"==typeof e?e&&(e<0||o({distance:e,unit:"character",reverse:t})):o(e)},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=Ep.get(t);null!=e&&(t.focus(),r(e))},t.getSelectionPosition=function(){return Lv(t)},t.getNodePosition=function(e){return _v(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var r=Ch(ph.Range.edges(e),2),n=r[0],o=r[1],i=Ch(ph.Editor.edges(t,[]),2),a=i[0],s=i[1];return!(!ph.Point.equals(n,a)||!ph.Point.equals(o,s))},t.selectAll=function(){var e=ph.Editor.start(t,[]),n=ph.Editor.end(t,[]);r({anchor:e,focus:n})},t};var Vv=function(){if(Hv)return jv;Hv=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,n=/^0o[0-7]+$/i,o=parseInt,i="object"==typeof b&&b&&b.Object===Object&&b,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 h(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=r.test(i);return s||n.test(i)?o(i.slice(2),s?2:8):t.test(i)?NaN:+i}return jv=function(e,t,r){var n,o,i,a,s,u,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=n,i=o;return n=o=void 0,p=t,a=e.apply(i,r)}function b(e){var r=e-u;return void 0===u||r>=t||r<0||m&&e-p>=i}function w(){var e=d();if(b(e))return E(e);s=setTimeout(w,function(e){var r=t-(e-u);return m?c(r,i-(e-p)):r}(e))}function E(e){return s=void 0,v&&n?y(e):(n=o=void 0,a)}function x(){var e=d(),r=b(e);if(n=arguments,o=this,u=e,r){if(void 0===s)return function(e){return p=e,s=setTimeout(w,t),g?y(e):a}(u);if(m)return s=setTimeout(w,t),y(u)}return void 0===s&&(s=setTimeout(w,t)),a}return t=h(t)||0,f(r)&&(g=!!r.leading,i=(m="maxWait"in r)?l(h(r.maxWait)||0,t):i,v="trailing"in r?!!r.trailing:v),x.cancel=function(){void 0!==s&&clearTimeout(s),p=0,n=u=o=s=void 0},x.flush=function(){return void 0===s?a:E(d())},x},jv}(),Uv=w(Vv);const qv=e=>"string"==typeof e,Gv=()=>{let e,t;const r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r},Wv=e=>null==e?"":""+e,Yv=/###/g,Kv=e=>e&&e.indexOf("###")>-1?e.replace(Yv,"."):e,Xv=e=>!e||qv(e),Zv=(e,t,r)=>{const n=qv(t)?t.split("."):t;let o=0;for(;o<n.length-1;){if(Xv(e))return{};const t=Kv(n[o]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Xv(e)?{}:{obj:e,k:Kv(n[o])}},Jv=(e,t,r)=>{const{obj:n,k:o}=Zv(e,t,Object);if(void 0!==n||1===t.length)return void(n[o]=r);let i=t[t.length-1],a=t.slice(0,t.length-1),s=Zv(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Zv(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=r},Qv=(e,t)=>{const{obj:r,k:n}=Zv(e,t);if(r)return r[n]},ey=(e,t,r)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?qv(e[n])||e[n]instanceof String||qv(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):ey(e[n],t[n],r):e[n]=t[n]);return e},ty=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ry={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const ny=e=>qv(e)?e.replace(/[&<>"'\/]/g,e=>ry[e]):e;const oy=[" ",",","?","!",";"],iy=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 r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}(20),ay=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let o=e;for(let e=0;e<n.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<n.length;++a)if(a!==e&&(i+=r),i+=n[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<n.length-1)continue;e+=a-e+1;break}o=t}return o},sy=e=>e&&e.replace("_","-"),uy={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 ly{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||uy,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:(qv(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ly(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ly(this.logger,e)}}var cy=new ly;class dy{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const r=this.observers[e].get(t)||0;this.observers[e].set(t,r+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,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(e=>{let[t,n]=e;for(let e=0;e<n;e++)t(...r)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(t=>{let[n,o]=t;for(let t=0;t<o;t++)n.apply(n,[e,...r])})}}}class fy extends dy{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,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],r&&(Array.isArray(r)?a.push(...r):qv(r)&&o?a.push(...r.split(o)):a.push(r)));const s=Qv(this.data,a);return!s&&!t&&!r&&e.indexOf(".")>-1&&(e=a[0],t=a[1],r=a.slice(2).join(".")),!s&&i&&qv(r)?ay(this.data&&this.data[e]&&this.data[e][t],r,o):s}addResource(e,t,r,n){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];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),Jv(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}addResources(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const n in r)(qv(r[n])||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,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("."),n=r,r=t,t=a[1]),this.addNamespaces(t);let s=Qv(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?ey(s,r,o):s={...s,...r},Jv(this.data,a,s),i.silent||this.emit("added",e,t,r)}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 hy={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,o){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,r,n,o))}),t}};const py={};class gy extends dy{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,r)=>{e.forEach(e=>{t[e]&&(r[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=cy.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 r=this.resolve(e,t);return r&&void 0!==r.res}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,r)=>{t=t||"",r=r||"";const n=oy.filter(e=>t.indexOf(e)<0&&r.indexOf(e)<0);if(0===n.length)return!0;const o=iy.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(r);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,r,n));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:qv(o)?[o]:o};const i=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(n)}return{key:e,namespaces:qv(o)?[o]:o}}translate(e,t,r){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 n=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 n?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return n?{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,h=c&&c.exactUsedKey||i,p=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!qv(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(m&&d&&v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0)||qv(g)&&Array.isArray(d))if(m&&qv(g)&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,r));else{let n=!1,a=!1;const l=void 0!==t.count&&!qv(t.count),f=gy.hasDefaultValue(t),h=l?this.pluralResolver.getSuffix(u,t.count,t):"",p=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${h}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(n=!0,d=m),this.isValidLookup(d)||(a=!0,d=i);const v=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=f&&m!==d&&this.options.updateMissing;if(a||n||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?m: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 r=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&r&&r[0])for(let t=0;t<r.length;t++)e.push(r[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const n=(e,r,n)=>{const o=f&&n!==d?n:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,r,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,r,o,y,t),this.emit("missingKey",e,s,r,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach(e=>{const r=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&r.indexOf(`${this.options.pluralSeparator}zero`)<0&&r.push(`${this.options.pluralSeparator}zero`),r.forEach(r=>{n([e],i+r,t[`defaultValue${r}`]||m)})}):n(e,i,m))}d=this.extendTranslation(d,e,t,c,r),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||n)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,n?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 n?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(d),r=e?[]:{},n=e?h:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const i=`${n}${o}${e}`;r[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),r[e]===i&&(r[e]=d[e])}d=r}}return n?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}extendTranslation(e,t,r,n,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const a=qv(e)&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=r.replace&&!qv(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,r.lng||this.language||n.usedLng,r),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(r.nest=!1)}!r.lng&&"v1"!==this.options.compatibilityAPI&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return o&&o[0]===n[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${n[0]} in key: ${t[0]}`),null):i.translate(...n,t)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,s=qv(a)?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=hy.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t,r,n,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return qv(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;r=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&!qv(a.count),d=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&(qv(a.context)||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach(e=>{this.isValidLookup(t)||(i=e,!py[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(py[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${h.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!!!")),h.forEach(r=>{if(this.isValidLookup(t))return;o=r;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,r,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(r,a.count,a));const t=`${this.options.pluralSeparator}zero`,n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(n)&&i.push(u+e.replace(n,this.options.pluralSeparator)),d&&i.push(u+t)),f){const r=`${u}${this.options.contextSeparator}${a.context}`;i.push(r),c&&(i.push(r+e),a.ordinal&&0===e.indexOf(n)&&i.push(r+e.replace(n,this.options.pluralSeparator)),d&&i.push(r+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(n=s,t=this.getResource(r,e,s,a))}))})}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}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"],r=e.replace&&!qv(e.replace);let n=r?e.replace:e;if(r&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!r){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,12)&&void 0!==e[r])return!0;return!1}}const my=e=>e.charAt(0).toUpperCase()+e.slice(1);class vy{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=cy.create("languageUtils")}getScriptPartFromCode(e){if(!(e=sy(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=sy(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(qv(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 r=e.split("-");return this.options.lowerCaseLng?r=r.map(e=>e.toLowerCase()):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=my(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=my(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=my(r[2].toLowerCase()))),r.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 r=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(r)||(t=r)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.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)),qv(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),n=[],o=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return qv(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))):qv(e)&&o(this.formatLanguageCode(e)),r.forEach(e=>{n.indexOf(e)<0&&o(this.formatLanguageCode(e))}),n}}let yy=[{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}],by={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 wy=["v1","v2","v3"],Ey=["v4"],xy={zero:0,one:1,two:2,few:3,many:4,other:5};class Sy{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=cy.create("pluralResolver"),this.options.compatibilityJSON&&!Ey.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 yy.forEach(t=>{t.lngs.forEach(r=>{e[r]={numbers:t.nr,plurals:by[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 r=sy("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:n});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:n})}catch(r){if(!e.match(/-|_/))return;const n=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(n,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 r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getRule(e,t);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((e,t)=>xy[e]-xy[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):r.numbers.map(r=>this.getSuffix(e,r,t)):[]}getSuffix(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:this.getSuffixRetroCompatible(n,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let n=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===n?n="plural":1===n&&(n=""));const o=()=>this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString();return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?`_plural_${n.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!wy.includes(this.options.compatibilityJSON)}}const Cy=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,r)=>{const n=Qv(e,r);return void 0!==n?n:Qv(t,r)})(e,t,r);return!i&&o&&qv(r)&&(i=ay(e,r,n),void 0===i&&(i=ay(t,r,n))),i},Ay=e=>e.replace(/\$/g,"$$$$");class Dy{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=cy.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:r,useRawValueToEscape:n,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:h,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:ny,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=o?ty(o):i||"{{",this.suffix=a?ty(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?ty(d):f||ty("$t("),this.nestingSuffix=h?ty(h):p||ty(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,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,r,n){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=Cy(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,r,{...n,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(Cy(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,r,{...n,...t,interpolationkey:i})};this.resetRegExp();const l=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,c=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,d=[{regex:this.regexpUnescape,safeValue:e=>Ay(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Ay(this.escape(e)):Ay(e)}];return d.forEach(t=>{for(a=0;o=t.regex.exec(e);){const r=o[1].trim();if(i=u(r),void 0===i)if("function"==typeof l){const t=l(e,o,n);i=qv(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),i=""}else qv(i)||this.useRawValueToEscape||(i=Wv(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 r,n,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;const n=e.split(new RegExp(`${r}[ ]*{`));let i=`{${n[1]}`;e=n[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}${r}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&!qv(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){const e=r[1].split(this.formatSeparator).map(e=>e.trim());r[1]=e.shift(),s=e,u=!0}if(n=t(a.call(this,r[1].trim(),o),o),n&&r[0]===e&&!qv(n))return n;qv(n)||(n=Wv(n)),n||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),n=""),u&&(n=s.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:r[1].trim()}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}const Ty=e=>{const t={};return(r,n,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=n+JSON.stringify(i);let s=t[a];return s||(s=e(sy(n),o),t[a]=s),s(r)}};class ky{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=cy.create("formatter"),this.options=e,this.formats={number:Ty((e,t)=>{const r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)}),currency:Ty((e,t)=>{const r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)}),datetime:Ty((e,t)=>{const r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)}),relativetime:Ty((e,t)=>{const r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")}),list:Ty((e,t)=>{const r=new Intl.ListFormat(e,{...t});return e=>r.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()]=Ty(t)}format(e,t,r){let n=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 r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const o=n[1].substring(0,n[1].length-1);"currency"===t&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),o=n.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();r[i]||(r[i]=o),"false"===o&&(r[i]=!1),"true"===o&&(r[i]=!0),isNaN(o)||(r[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:r}})(t);if(this.formats[o]){let t=e;try{const a=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},s=a.locale||a.lng||n.locale||n.lng||r;t=this.formats[o](e,s,{...i,...n,...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 Ny extends dy{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=cy.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,n.backend,n)}queueLoad(e,t,r,n){const o={},i={},a={},s={};return e.forEach(e=>{let n=!0;t.forEach(t=>{const a=`${e}|${t}`;!r.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,n=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,r){const n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),!t&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const a={};this.queue.forEach(r=>{((e,t,r)=>{const{obj:n,k:o}=Zv(e,t,Object);n[o]=n[o]||[],n[o].push(r)})(r.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(e=>{a[e]||(a[e]={});const t=r.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,r){let n=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:r,tried:n,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&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,r,n+1,2*o,i)},o):i(a,s)},s=this.backend[r].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const r=s(e,t);r&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}}prepareLoading(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=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."),n&&n();qv(e)&&(e=this.languageUtils.toResolveHierarchy(e)),qv(t)&&(t=[t]);const o=this.queueLoad(e,t,r,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=e.split("|"),n=r[0],o=r[1];this.read(n,o,"read",void 0,void 0,(r,i)=>{r&&this.logger.warn(`${t}loading namespace ${o} for language ${n} failed`,r),!r&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${n}`,i),this.loaded(e,r,i)})}saveMissing(e,t,r,n,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 "${r}" 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!=r&&""!==r){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,r,n,s):u(e,t,r,n),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,r,n,a,s)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}}const Oy=()=>({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]),qv(e[1])&&(t.defaultValue=e[1]),qv(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const r=e[3]||e[2];Object.keys(r).forEach(e=>{t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),By=e=>(qv(e.ns)&&(e.ns=[e.ns]),qv(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),qv(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),My=()=>{};class Fy extends dy{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var r;if(super(),this.options=By(e),this.services={},this.logger=cy,this.modules={external:[]},r=this,Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(e=>{"function"==typeof r[e]&&(r[e]=r[e].bind(r))}),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]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(qv(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const n=Oy();this.options={...n,...this.options,...By(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...n.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?cy.init(o(this.modules.logger),this.options):cy.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=ky);const r=new vy(this.options);this.store=new fy(this.options.resources,this.options);const i=this.services;i.logger=cy,i.resourceStore=this.store,i.languageUtils=r,i.pluralResolver=new Sy(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==n.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 Dy(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Ny(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit(t,...n)}),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 gy(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit(t,...n)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,r||(r=My),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=Gv(),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),r(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]:My;const r=qv(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],n=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(r)n(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>n(e))}this.options.preload&&this.options.preload.forEach(e=>n(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,r){const n=Gv();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=My),this.services.backendConnector.reload(e,t,e=>{n.resolve(),r(e)}),n}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&&hy.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 r=this;this.isLanguageChangingTo=e;const n=Gv();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,n.resolve(function(){return r.t(...arguments)}),t&&t(e,function(){return r.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);const r=qv(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);r&&(this.language||o(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(r)),this.loadResources(r,e=>{i(e,r)})};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()),n}getFixedT(e,t,r){var n=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=n.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||r||o.keyPrefix);const l=n.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,n.t(c,i)};return qv(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,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 r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;const i=(e,t)=>{const r=this.services.backendConnector.state[`${e}|${t}`];return-1===r||0===r||2===r};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(r,e)||n&&!i(o,e)))}loadNamespaces(e,t){const r=Gv();return this.options.ns?(qv(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=Gv();qv(e)&&(e=[e]);const n=this.options.preload||[],o=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=n.concat(o),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(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 vy(Oy());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 Fy(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]:My;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},o=new Fy(n);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)},r&&(o.store=new fy(this.store.data,n),o.services.resourceStore=o.store),o.translator=new gy(o.services,n),o.translator.on("*",function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit(e,...r)}),o.init(n,t),o.translator.options=n,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 Iy=Fy.createInstance();Iy.createInstance=Fy.createInstance,Iy.createInstance,Iy.dir,Iy.init,Iy.loadResources,Iy.reloadResources,Iy.use,Iy.changeLanguage,Iy.getFixedT,Iy.t,Iy.exists,Iy.setDefaultNamespace,Iy.hasLoadedNamespace,Iy.loadNamespaces,Iy.loadLanguages;var Py="translation";function Ry(e,t){Iy.addResourceBundle(e,Py,t,!0,!0)}function Ly(e){return Iy.on("languageChanged",e),function(){return Iy.off("languageChanged",e)}}Iy.init({lng:"zh-CN",resources:{}});var _y=Iy.t.bind(Iy);function zy(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&&zy(t)}}function jy(){return _p('<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 Hy(){return _p('<div class="w-e-bar-divider"></div>')}function $y(e,t,r,n,o){if(void 0===n&&(n=""),void 0===o&&(o=!1),t){if(n){var i=dm?"cmd":"ctrl";n=n.replace("mod",i)}if(o)n&&(e.attr("data-tooltip",n),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=n?"".concat(r,"\n").concat(n):r;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var Vy=function(){function e(e,t,r){void 0===r&&(r=!1);var n=this;this.$elem=_p('<div class="w-e-bar-item"></div>'),this.$button=_p('<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=_p(c);zy(f),d.append(f)}else d.text(a);$y(d,c,a,u,r),r&&c&&d.append(_p('<span class="title">'.concat(a,"</span>"))),i&&d.css("width","".concat(i,"px")),d.attr("data-menu-key",e),this.$elem.append(d),wg(function(){return n.init()})}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(t){t.preventDefault(),nb(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())})},e.prototype.exec=function(){var e=nb(this),t=this.menu,r=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,r)},e.prototype.setActive=function(){var e=nb(this),t=this.$button,r="active";this.menu.isActive(e)?t.addClass(r):t.removeClass(r)},e.prototype.setDisabled=function(){var e=nb(this),t=this.$button,r=this.menu.isDisabled(e);(null==e.selection||e.isDisabled())&&(r=!0),this.menu.alwaysEnable&&(r=!1);var n="disabled";r?t.addClass(n):t.removeClass(n),this.disabled=r},e.prototype.setIcon=function(){var e=nb(this),t=this.$button;if(this.menu.getIcon){var r=this.menu.getIcon(e);if(r){t.find("svg").remove();var n=_p(r);zy(n),t.append(n)}}},e.prototype.setTooltip=function(){var e=nb(this),t=this.$button;if(this.menu.getTitle){var r=this.menu.getTitle(e),n=this.menu.iconSvg;r&&n&&$y(t,n,r)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),Uy=function(e){function t(t,r,n){return void 0===n&&(n=!1),e.call(this,t,r,n)||this}return bh(t,e),t.prototype.onButtonClick=function(){},t}(Vy),qy=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=op.get(e);null==t&&(t=new Set,op.set(e,t)),t.add(this),ip.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var r=this.genSelfElem();r&&t.append(r)},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=ip.get(this);e&&e.emit(Wh,this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=ip.get(this);e&&e.emit(Yh)}},e}(),Gy=function(e){function t(t){var r=e.call(this,t)||this;return r.type="dropPanel",r.$elem=_p('<div class="w-e-drop-panel"></div>'),r}return bh(t,e),t.prototype.genSelfElem=function(){return null},t}(qy),Wy=function(e){function t(t,r,n){void 0===n&&(n=!1);var o=e.call(this,t,r,n)||this;if(o.dropPanel=null,o.menu=r,r.showDropPanel){var i=jy();o.$button.append(i)}return o}return bh(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=nb(this);if(null==this.dropPanel){var r=new Gy(t),n=e.getPanelContentElem(t);r.renderContent(n),r.appendTo(this.$elem),r.show(),this.dropPanel=r}else{var o=this.dropPanel;if(o.isShow)o.hide();else{n=e.getPanelContentElem(t);o.renderContent(n),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}(Vy),Yy=function(e){function t(t,r){void 0===r&&(r=0);var n=e.call(this,t)||this;n.type="modal",n.$elem=_p('<div class="w-e-modal"></div>'),n.width=0,r&&(n.width=r);var o=n.$elem;return o.on("click",function(e){return e.stopPropagation()}),o.on("keyup",function(e){"Escape"===e.code&&(n.hide(),t.restoreSelection())}),n}return bh(t,e),t.prototype.genSelfElem=function(){var e=this,t=_p('<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>")),r=ip.get(this);return t.on("click",function(){e.hide(),null==r||r.restoreSelection()}),t},t.prototype.setStyle=function(e){var t=this.width,r=this.$elem;r.attr("style",""),t&&r.css("width","".concat(t,"px")),r.css(e)},t}(qy);function Ky(e,t,r){var n=_p('<label class="babel-container"></label>');n.append("<span>".concat(e,"</span>"));var o=_p('<input type="text" id="'.concat(t,'" placeholder="').concat(r||"",'">'));return n.append(o),[n[0],o[0]]}function Xy(e,t,r){var n=_p('<label class="babel-container"></label>');n.append("<span>".concat(e,"</span>"));var o=_p('<textarea type="text" id="'.concat(t,'" placeholder="').concat(r||"",'"></textarea>'));return n.append(o),[n[0],o[0]]}function Zy(e,t){var r=_p('<div class="button-container"></div>'),n=_p('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return r.append(n),[r[0],n[0]]}var Jy=function(e){function t(t,r,n){void 0===n&&(n=!1);var o=e.call(this,t,r,n)||this;return o.$body=_p("body"),o.modal=null,o.menu=r,o}return bh(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=nb(this),t=this.menu.getModalPositionNode(e);return ph.Element.isElement(t)?_v(e,t,"modal"):Lv(e)},t.prototype.handleModal=function(){var e=nb(this),t=this.menu;if(null==this.modal){var r=new Yy(e,t.modalWidth);this.renderAndShowModal(r,!0),this.modal=r}else{(r=this.modal).isShow?r.hide():this.renderAndShowModal(r,!1)}},t.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var r=nb(this),n=this.menu;if(null!=n.getModalContentElem){var o=wm.getTextarea(r),i=wm.getToolbar(r),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=n.getModalContentElem(r);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||zv(r,e.$elem),setTimeout(function(){r.blur()})}},t}(Vy);var Qy=function(e){function t(t,r){var n=e.call(this,t)||this;return n.type="selectList",n.$elem=_p('<div class="w-e-select-list"></div>'),r&&n.$elem.css("width","".concat(r,"px")),n.$elem.on("click",function(e){e.stopPropagation()}),n}return bh(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var r=_p("<ul></ul>");e.forEach(function(e){var t=e.value,n=e.text,o=e.selected,i=e.styleForRenderMenuList,a=_p('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var s=_p('<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(_p('<span data-value="'.concat(t,'">').concat(n,"</span>"))),a.attr("title",n),r.append(a)}),t.append(r)},t.prototype.genSelfElem=function(){return null},t}(qy);var eb=function(){function e(e,t,r){void 0===r&&(r=!1);var n=this;this.$elem=_p('<div class="w-e-bar-item"></div>'),this.$button=_p('<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),$y(d,u,i,c,r),this.$elem.append(d),this.menu=t,wg(function(){return n.init()})}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",function(t){t.preventDefault(),nb(e).hidePanelOrModal(),e.trigger()})},e.prototype.trigger=function(){var e=this,t=nb(this);if(!t.isDisabled()&&!this.disabled){var r=this.menu;if(null==this.selectList){this.selectList=new Qy(t,r.selectPanelWidth);var n=this.selectList,o=r.getOptions(t);n.renderList(o),n.appendTo(this.$elem),n.show(),n.$elem.on("click","li",function(t){var r=t.target;if(null!=r){t.preventDefault();var n=_p(r).attr("data-value");e.onChange(n)}})}else{if((n=this.selectList).isShow)n.hide();else{o=r.getOptions(t);n.renderList(o),n.show()}}}},e.prototype.onChange=function(e){var t=nb(this),r=this.menu;r.exec&&r.exec(t,e)},e.prototype.setSelectedValue=function(){var e=nb(this),t=this.menu,r=t.getValue(e),n=function(e,t){for(var r=e.length,n="",o=0;o<r;o++){var i=e[o];if(i.value===t){n=i.text;break}}return n}(t.getOptions(e),r.toString()),o=this.$button,i=jy();o.empty(),o.text(n),o.append(i)},e.prototype.setDisabled=function(){var e=nb(this),t=this.menu.isDisabled(e),r=this.$button;(null==e.selection||e.isDisabled())&&(t=!0);var n="disabled";t?r.addClass(n):r.removeClass(n),this.disabled=t},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),tb=function(){function e(e){this.$elem=_p('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=_p('<div class="w-e-bar-item-menus-container"></div>'),this.$button=_p('<button type="button"></button>');var t=e.key,r=e.iconSvg,n=e.title,o=this.$elem,i=this.$button;if(r){var a=_p(r);zy(a),i.append(a)}else i.text(n);i.attr("data-menu-key",t);var s=jy();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,r=this.$button,n=new MutationObserver(function(){var o=t.find("button"),i=o.length;if(0!==i){var a=0;o.each(function(e){_p(e).hasClass("disabled")&&a++}),n.disconnect(),a===i?r.addClass("disabled"):r.removeClass("disabled"),e.observe(n)}});return n},e}(),rb=new WeakMap;function nb(e){var t=np.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function ob(e,t,r){void 0===r&&(r=!1);var n=rb.get(t);if(n)return n;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;n=i?new Wy(e,t,r):a?new Jy(e,t,r):new Uy(e,t,r)}if("select"===o&&(n=new eb(e,t,r)),null==n)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return rb.set(t,n),n}function ib(e,t){var r=e.selection;return null!=r&&(!ph.Range.isCollapsed(r)&&(!wm.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var r=t.type;return!!["pre","code","table"].includes(r)})&&!!ph.Text.isText(t)))}var ab,sb,ub=function(){function e(){var e=this;this.$elem=_p('<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=Uv(function(){var t=e.isShow,r=e.getSelectedNodeAndMenuKeys()||{},n=r.node,o=void 0===n?null:n,i=r.menuKeys,a=void 0===i?[]:i,s=e.getEditorInstance();if(null!=o&&e.changeItemsState(),o&&ph.Element.isElement(o)&&t){var u=e.isSamePath(o,e.prevSelectedNode);if(!ph.Editor.isBlock(s,o)&&u)return}e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o},200),wg(function(){var t=e.getEditorInstance(),r=e.$elem;r.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),wm.getTextarea(t).$textAreaContainer.append(r),t.on(Vh,e.changeHoverbarState);var n=e.hideAndClean.bind(e);t.on(Uh,n),t.on(qh,n),t.on(Gh,n)}),this.lngListen=Ly(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,r="undefined"!=typeof window?window.innerHeight:null;r&&r>=360&&(r-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;wg(function(){e.hoverbarItems.forEach(function(e){e.changeMenuState()})})},e.prototype.registerItems=function(e){var t=this,r=this.$elem;e.forEach(function(e){if("|"!==e)t.registerSingleItem(e);else{var n=Hy();r.append(n)}})},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),r=this.menus,n=r[e];if(null==n){var o=Kh[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"));n=o(),r[e]=n}var i=t.getMenuConfig(e);i&&void 0!==i.iconSvg&&(n.iconSvg=i.iconSvg);var a=ob(e,n);this.hoverbarItems.push(a),np.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),r=this.$elem;if(r.attr("style",""),ph.Element.isElement(e)){var n=_v(t,e,"bar");return r.css(n),void zv(t,r)}if(ph.Text.isText(e)){n=Lv(t);return r.css(n),void zv(t,r)}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(),r=null,n=[],o=function(o){var i=t[o],a=i.match,s=i.menuKeys,u=void 0===s?[]:s,l=a||function(e,t){return wm.checkNodeType(t,o)},c=Ch(ph.Editor.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),d=c[0];if(null!=d)return r=d[0],n=u,"break"};for(var i in t){if("break"===o(i))break}return null==r||0===n.length?null:{node:r,menuKeys:n}},e.prototype.getEditorInstance=function(){var e=tp.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,r=t.text;return r&&null==r.match&&(r.match=ib),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var r=wm.findPath(null,e),n=wm.findPath(null,t);return ph.Path.equals(r,n)},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 lb(){if(sb)return ab;sb=1;var e="Expected a function",t=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,o=/^0o[0-7]+$/i,i=parseInt,a="object"==typeof b&&b&&b.Object===Object&&b,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 h(t,r,n){var o,i,a,s,u,l,h=0,m=!1,v=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var r=o,n=i;return o=i=void 0,h=e,s=t.apply(n,r)}function w(e){var t=e-l;return void 0===l||t>=r||t<0||v&&e-h>=a}function E(){var e=f();if(w(e))return x(e);u=setTimeout(E,function(e){var t=r-(e-l);return v?d(t,a-(e-h)):t}(e))}function x(e){return u=void 0,y&&o?b(e):(o=i=void 0,s)}function S(){var e=f(),t=w(e);if(o=arguments,i=this,l=e,t){if(void 0===u)return function(e){return h=e,u=setTimeout(E,r),m?b(e):s}(l);if(v)return u=setTimeout(E,r),b(l)}return void 0===u&&(u=setTimeout(E,r)),s}return r=g(r)||0,p(n)&&(m=!!n.leading,a=(v="maxWait"in n)?c(g(n.maxWait)||0,r):a,y="trailing"in n?!!n.trailing:y),S.cancel=function(){void 0!==u&&clearTimeout(u),h=0,o=l=i=u=void 0},S.flush=function(){return void 0===u?s:x(f())},S}function p(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(p(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=p(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var s=n.test(e);return s||o.test(e)?i(e.slice(2),s?2:8):r.test(e)?NaN:+e}return ab=function(t,r,n){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(e);return p(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),h(t,r,{leading:o,maxWait:r,trailing:i})}}var cb=w(lb());function db(e,t){return Dg(t)&&wm.hasDOMNode(e,t,{editable:!0})}function fb(e,t){return Dg(t)&&wm.hasDOMNode(e,t)}function hb(e,t){return db(e,t)||function(e,t){if(e.getConfig().readOnly)return!1;var r=fb(e,t)&&wm.toSlateNode(e,t);return!!r&&ph.Element.isElement(r)&&ph.Editor.isVoid(e,r)}(e,t)}const pb=e=>"object"==typeof e&&null!=e&&1===e.nodeType,gb=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,mb=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return gb(r.overflowY,t)||gb(r.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},vb=(e,t,r,n,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=r||a>=t&&s>=r?i-e-n:a>t&&s<r||i<e&&s>r?a-t+o:0,yb=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},bb=(e,t)=>{var r,n,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(!pb(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,h=[];let p=e;for(;pb(p)&&d(p);){if(p=yb(p),p===f){h.push(p);break}null!=p&&p===document.body&&mb(p)&&!mb(document.documentElement)||null!=p&&mb(p,c)&&h.push(p)}const g=null!=(n=null==(r=window.visualViewport)?void 0:r.width)?n:innerWidth,m=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:v,scrollY:y}=window,{height:b,width:w,top:E,right:x,bottom:S,left:C}=e.getBoundingClientRect(),{top:A,right:D,bottom:T,left:k}=(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 N="start"===s||"nearest"===s?E-A:"end"===s?S+T:E+b/2-A+T,O="center"===u?C+w/2-k+D:"end"===u?x+D:C-k;const B=[];for(let e=0;e<h.length;e++){const t=h[e],{height:r,width:n,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&E>=0&&C>=0&&S<=m&&x<=g&&(t===f&&!mb(t)||E>=o&&S<=l&&C>=c&&x<=i))return B;const d=getComputedStyle(t),p=parseInt(d.borderLeftWidth,10),A=parseInt(d.borderTopWidth,10),D=parseInt(d.borderRightWidth,10),T=parseInt(d.borderBottomWidth,10);let k=0,M=0;const F="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-D:0,I="offsetHeight"in t?t.offsetHeight-t.clientHeight-A-T:0,P="offsetWidth"in t?0===t.offsetWidth?0:n/t.offsetWidth:0,R="offsetHeight"in t?0===t.offsetHeight?0:r/t.offsetHeight:0;if(f===t)k="start"===s?N:"end"===s?N-m:"nearest"===s?vb(y,y+m,m,A,T,y+N,y+N+b,b):N-m/2,M="start"===u?O:"center"===u?O-g/2:"end"===u?O-g:vb(v,v+g,g,p,D,v+O,v+O+w,w),k=Math.max(0,k+y),M=Math.max(0,M+v);else{k="start"===s?N-o-A:"end"===s?N-l+T+I:"nearest"===s?vb(o,l,r,A,T+I,N,N+b,b):N-(o+r/2)+I/2,M="start"===u?O-c-p:"center"===u?O-(c+n/2)+F/2:"end"===u?O-i+D+F:vb(c,i,n,p,D+F,O,O+w,w);const{scrollLeft:e,scrollTop:a}=t;k=0===R?0:Math.max(0,Math.min(a+k/R,t.scrollHeight-r/R+I)),M=0===P?0:Math.max(0,Math.min(e+M/P,t.scrollWidth-n/P+F)),N+=a-k,O+=e-M}B.push({el:t,top:k,left:M})}return B};function wb(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 r=(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(bb(e,t));const n="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of bb(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-r.top+r.bottom,t=a-r.left+r.right;o.scroll({top:e,left:t,behavior:n})}}function Eb(e){null!=e.selection&&(e.selection=null,e.onChange())}function xb(e,t,r){void 0===r&&(r=!1);var n=t.selection,o=t.getConfig(),i=wm.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||r)&&t.isFocused()){var a="None"!==i.type;if(n||a){var s=pp.get(t),u=!1;if(s.contains(i.anchorNode)&&s.contains(i.focusNode)&&(u=!0),a&&u&&n){var l=wm.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(l&&ph.Range.equals(l,n)){var c=!0;if(ph.Range.isCollapsed(n)){var d=i.anchorNode,f=i.anchorOffset;if(d===s){var h=s.childNodes,p=void 0;(p=h[f])&&p.matches("table")&&(c=!1),(p=h[f-1])&&p.matches("table")&&(c=!1)}}if(c)return}}if(!n||wm.hasRange(t,n)){e.isUpdatingSelection=!0;var g=n&&wm.toDOMRange(t,n);if(g){ph.Range.isBackward(n)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var m=g.startContainer.parentElement;if(!m.closest("[data-slate-spacer]")&&g.getBoundingClientRect){var v=g.getBoundingClientRect.bind(g)();0===v.top&&0===v.right&&0===v.bottom&&0===v.left&&0===v.height&&0===v.width||(m.getBoundingClientRect=g.getBoundingClientRect.bind(g));var y=document.body;wb(m,{scrollMode:"if-needed",boundary:o.scroll&&s.parentElement||y,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else i.removeAllRanges();setTimeout(function(){g&&fm&&s.focus(),e.isUpdatingSelection=!1})}else t.selection=wm.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var Sb=new WeakMap,Cb=new WeakMap;var Ab,Db={};var Tb=function(){if(Ab)return Db;Ab=1,Object.defineProperty(Db,"__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"},r={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"},n={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++)n["f"+o]=111+o;function i(e,t,r){t&&!("byKey"in t)&&(r=t,t=null),Array.isArray(e)||(e=[e]);var n=e.map(function(e){return a(e,t)}),o=function(e){return n.some(function(t){return s(t,e)})};return null==r?o:o(r)}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,h=!1,p=void 0;try{for(var g,m=s[Symbol.iterator]();!(f=(g=m.next()).done);f=!0){var v=g.value,y=v.endsWith("?")&&v.length>1;y&&(v=v.slice(0,-1));var b=l(v),w=t[b];if(v.length>1&&!w&&!r[v]&&!n[b])throw new TypeError('Unknown modifier: "'+v+'"');1!==c&&w||(i?a.key=b:a.which=u(v)),w&&(a[w]=!y||null)}}catch(e){h=!0,p=e}finally{try{!f&&m.return&&m.return()}finally{if(h)throw p}}return a}function s(e,t){for(var r in e){var n=e[r],o=void 0;if(null!=n&&((null!=(o="key"===r&&null!=t.key?t.key.toLowerCase():"which"===r?91===n&&93===t.which?91:t.which:t[r])||!1!==n)&&o!==n))return!1}return!0}function u(e){return e=l(e),n[e]||e.toUpperCase().charCodeAt(0)}function l(e){return e=e.toLowerCase(),e=r[e]||e}return Db.default=i,Db.isHotkey=i,Db.isCodeHotkey=function(e,t){return i(e,t)},Db.isKeyHotkey=function(e,t){return i(e,{byKey:!0},t)},Db.parseHotkey=a,Db.compareHotkey=s,Db.toKeyCode=u,Db.toKeyName=l,Db}(),kb={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"},Nb={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"},Ob={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Bb=function(e){var t=kb[e],r=Nb[e],n=Ob[e],o=t&&Tb.isKeyHotkey(t),i=r&&Tb.isKeyHotkey(r),a=n&&Tb.isKeyHotkey(n);return function(e){return!(!o||!o(e))||(!!(dm&&i&&i(e))||!(dm||!a||!a(e)))}},Mb={isBold:Bb("bold"),isCompose:Bb("compose"),isMoveBackward:Bb("moveBackward"),isMoveForward:Bb("moveForward"),isDeleteBackward:Bb("deleteBackward"),isDeleteForward:Bb("deleteForward"),isDeleteLineBackward:Bb("deleteLineBackward"),isDeleteLineForward:Bb("deleteLineForward"),isDeleteWordBackward:Bb("deleteWordBackward"),isDeleteWordForward:Bb("deleteWordForward"),isExtendBackward:Bb("extendBackward"),isExtendForward:Bb("extendForward"),isExtendLineBackward:Bb("extendLineBackward"),isExtendLineForward:Bb("extendLineForward"),isItalic:Bb("italic"),isMoveLineBackward:Bb("moveLineBackward"),isMoveLineForward:Bb("moveLineForward"),isMoveWordBackward:Bb("moveWordBackward"),isMoveWordForward:Bb("moveWordForward"),isRedo:Bb("redo"),isSplitBlock:Bb("splitBlock"),isTransposeCharacter:Bb("transposeCharacter"),isUndo:Bb("undo"),isTab:Bb("tab"),isSelectAll:Bb("selectAll")};function Fb(e){e.preventDefault()}var Ib={beforeinput:function(e,t,r){var n,o=e,i=r.getConfig().readOnly;if(vm&&!i&&db(r,o.target)){null===(n=t.flushDOMSelectionChange)||void 0===n||n.call(t);var a=r.selection,s=o.inputType,u=o.dataTransfer||o.data||void 0;if("insertCompositionText"!==s&&"deleteCompositionText"!==s){if(o.preventDefault(),!s.startsWith("delete")||s.startsWith("deleteBy")){var l=Ch(o.getTargetRanges(),1)[0];if(l){var c=wm.toSlateRange(r,l,{exactMatch:!1,suppressThrow:!1});a&&ph.Range.equals(a,c)||ph.Transforms.select(r,c)}}if(a&&ph.Range.isExpanded(a)){var d=wm.getSelectedElems(r),f="table"===d[0].type,h="table-cell"!==d[d.length-1].type;if(f&&h)return;if(s.startsWith("delete")){var p=s.endsWith("Backward")?"backward":"forward";return void ph.Editor.deleteFragment(r,{direction:p})}}switch(s){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":ph.Editor.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":ph.Editor.deleteForward(r);break;case"deleteContentBackward":ph.Editor.deleteBackward(r);break;case"deleteEntireSoftLine":ph.Editor.deleteBackward(r,{unit:"line"}),ph.Editor.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":ph.Editor.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":ph.Editor.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":ph.Editor.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":ph.Editor.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":ph.Editor.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":ph.Editor.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":ph.Editor.insertBreak(r);break;case"insertFromDrop":case"insertFromComposition":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromComposition"===s&&(t.isComposing=!1,Cp.set(r,!0)),"insertFromPaste"===s&&!Sp.get(r))break;"[object DataTransfer]"===xg(u)?r.insertData(u):"string"==typeof u&&ph.Editor.insertText(r,u)}}}},blur:function(e,t,r){var n=e,o=t.isUpdatingSelection,i=t.latestElement;if(!r.getConfig().readOnly&&!o&&db(r,n.target)){var a=wm.findDocumentOrShadowRoot(r);if(i!==a.activeElement){var s=n.relatedTarget;if(!(s===wm.toDOMNode(r,r)||kg(s)&&s.hasAttribute("data-slate-spacer"))){if(null!=s&&Dg(s)&&wm.hasDOMNode(r,s)){var u=wm.toSlateNode(r,s);if(ph.Element.isElement(u)&&!r.isVoid(u))return}if(hm){var l=a.getSelection();null==l||l.removeAllRanges()}wp.delete(r)}}}},focus:function(e,t,r){var n=wm.toDOMNode(r,r),o=wm.findDocumentOrShadowRoot(r);t.latestElement=o.activeElement,fm&&e.target!==n?n.focus():wp.set(r,!0)},click:function(e,t,r){if(!r.getConfig().readOnly&&fb(r,e.target)&&Dg(e.target)){var n=wm.toSlateNode(r,e.target),o=wm.findPath(r,n);if(ph.Editor.hasPath(r,o))if(ph.Node.get(r,o)===n){var i=ph.Editor.start(r,o),a=ph.Editor.end(r,o),s=ph.Editor.void(r,{at:i}),u=ph.Editor.void(r,{at:a});if(s&&u&&ph.Path.equals(s[1],u[1])){var l=ph.Editor.range(r,i);ph.Transforms.select(r,l)}}}},compositionstart:function(e,t,r){if(db(r,e.target)){Ap.delete(r);var n=r.selection;if(n&&ph.Range.isExpanded(n)&&(ph.Editor.deleteFragment(r),Promise.resolve().then(function(){xb(t,r,!0)})),r.selection){var o=wm.toDOMRange(r,r.selection).startContainer,i=o.textContent||"";Sb.set(r,i),Cb.set(r,o)}t.isComposing=!0,function(e,t){var r;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(r=e.$placeholder)||void 0===r||r.hide(),e.showPlaceholder=!1)}(t,r)}},compositionend:function(e,t,r){var n=e;if(db(r,n.target)){t.isComposing=!1;var o=!0===Cp.get(r);o?(Cp.delete(r),Ap.delete(r)):Ap.delete(r);var i=r.selection;if(null!=i){(mm||fm)&&wm.cleanExposedTexNodeInSelectionBlock(r);for(var a=ph.Range.isBackward(i)?i.focus:i.anchor,s=Ch(ph.Editor.node(r,[a.path[0]]),1)[0],u=0;u<a.path.length;u+=1){var l=Ch(ph.Editor.node(r,a.path.slice(0,u+1)),1)[0];if(ph.Element.isElement(l)&&((hm||fm)&&"link"===l.type||"code"===l.type)){wm.setNewKey(s);break}}var c=n.data;if(c&&!o){if(r.getConfig().maxLength){var d=wm.getLeftLengthOfMaxLength(r);if(d<c.length){var f=wm.toDOMRange(r,i);f.startContainer.nodeType===Node.TEXT_NODE&&(f.startContainer.textContent=Sb.get(r)||""),d>0&&ph.Editor.insertText(r,c.slice(0,d)),t.changeViewState()}else ph.Editor.insertText(r,c)}else{var h=wm.findDocumentOrShadowRoot(r).getSelection();h&&function(e,t){if(ph.Range.isCollapsed(t)){var r=t.anchor,n=t.focus;if([2,3].includes(r.path.length)&&[2,3].includes(n.path.length)&&(0===r.offset||0===n.offset)){var o=ph.Editor.node(e,r.path),i=0===r.offset?r.path:n.path,a=[i[0],i[1]-1];if(0===i[1])return!1;var s=ph.Editor.node(e,a);if(ph.Text.isText(s[0])&&ph.Text.isText(o[0]))return!0}}}(r,i)&&(r.selection=wm.toSlateRange(r,h,{exactMatch:!1,suppressThrow:!1})),ph.Editor.insertText(r,c)}hm||setTimeout(function(){var e=r.selection;if(null!=e){var t=Cb.get(r);if(null!=t)wm.toDOMRange(r,e).startContainer!==t&&(t.textContent=Sb.get(r)||"")}})}}}},compositionupdate:function(e,t,r){db(r,e.target)&&(t.isComposing=!0)},keydown:function(e,t,r){var n=e,o=r.selection;if(!r.getConfig().readOnly&&!t.isComposing&&db(r,n.target)){if(function(e,t){var r=ep.get(e),n=r&&r.getMenus(),o=rp.get(e),i=o&&o.getMenus(),a=wh(wh({},n),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&Tb.isHotkey(l,t)&&!u.isDisabled(e)){var c=u.getValue(e);u.exec(e,c)}}}(r,n),Mb.isTab(n))return Fb(n),void r.handleTab();if(Mb.isRedo(n))return Fb(n),void("function"==typeof r.redo&&r.redo());if(Mb.isUndo(n))return Fb(n),void("function"==typeof r.undo&&r.undo());if(Mb.isMoveLineBackward(n))return Fb(n),void ph.Transforms.move(r,{unit:"line",reverse:!0});if(Mb.isMoveLineForward(n))return Fb(n),void ph.Transforms.move(r,{unit:"line"});if(Mb.isExtendLineBackward(n))return Fb(n),void ph.Transforms.move(r,{unit:"line",edge:"focus",reverse:!0});if(Mb.isExtendLineForward(n))return Fb(n),void ph.Transforms.move(r,{unit:"line",edge:"focus"});if(Mb.isMoveBackward(n))return Fb(n),void(o&&ph.Range.isCollapsed(o)?ph.Transforms.move(r,{reverse:!0}):ph.Transforms.collapse(r,{edge:"start"}));if(Mb.isMoveForward(n))return Fb(n),void(o&&ph.Range.isCollapsed(o)?ph.Transforms.move(r):ph.Transforms.collapse(r,{edge:"end"}));if(Mb.isMoveWordBackward(n))return Fb(n),o&&ph.Range.isExpanded(o)&&ph.Transforms.collapse(r,{edge:"focus"}),void ph.Transforms.move(r,{unit:"word",reverse:!0});if(Mb.isMoveWordForward(n))return Fb(n),o&&ph.Range.isExpanded(o)&&ph.Transforms.collapse(r,{edge:"focus"}),void ph.Transforms.move(r,{unit:"word"});if(Mb.isSelectAll(n))return Fb(n),void r.selectAll();if(vm){if((mm||hm)&&o&&(Mb.isDeleteBackward(n)||Mb.isDeleteForward(n))&&ph.Range.isCollapsed(o)){var i=ph.Node.parent(r,o.anchor.path);if(ph.Element.isElement(i)&&ph.Editor.isVoid(r,i)&&ph.Editor.isInline(r,i))return n.preventDefault(),void ph.Transforms.delete(r,{unit:"block"})}}else{if(Mb.isBold(n)||Mb.isItalic(n)||Mb.isTransposeCharacter(n))return void Fb(n);if(Mb.isSplitBlock(n))return Fb(n),void ph.Editor.insertBreak(r);if(Mb.isDeleteBackward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"backward"}):ph.Editor.deleteBackward(r));if(Mb.isDeleteForward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"forward"}):ph.Editor.deleteForward(r));if(Mb.isDeleteLineBackward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"backward"}):ph.Editor.deleteBackward(r,{unit:"line"}));if(Mb.isDeleteLineForward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"forward"}):ph.Editor.deleteForward(r,{unit:"line"}));if(Mb.isDeleteWordBackward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"backward"}):ph.Editor.deleteBackward(r,{unit:"word"}));if(Mb.isDeleteWordForward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"forward"}):ph.Editor.deleteForward(r,{unit:"word"}))}}},keypress:function(e,t,r){if(!vm&&!r.getConfig().readOnly&&db(r,e.target)){e.preventDefault();var n=e.key;ph.Editor.insertText(r,n)}},copy:function(e,t,r){var n=e;if(db(r,n.target)){r.getConfig().readOnly||n.preventDefault();var o=n.clipboardData;if(null!=o){r.setFragmentData(o);var i=r.getConfig().customCopy;i&&i(r,n)}}},cut:function(e,t,r){var n=e,o=r.selection;if(!r.getConfig().readOnly&&(n.preventDefault(),db(r,n.target))){var i=n.clipboardData;if(null!=i&&(r.setFragmentData(i),o))if(ph.Range.isExpanded(o))ph.Editor.deleteFragment(r);else{var a=ph.Node.parent(r,o.anchor.path);ph.Element.isElement(a)&&ph.Editor.isVoid(r,a)&&ph.Transforms.delete(r)}}},paste:function(e,t,r){Sp.set(r,!0);var n=e;if(!r.getConfig().readOnly&&db(r,n.target)){var o=r.getConfig().customPaste;if(o)if(!1===o(r,n))return Sp.set(r,!1),void n.preventDefault();if(hm||!vm||function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length}(n)){n.preventDefault();var i=n.clipboardData;null!=i&&r.insertData(i)}}},dragover:function(e,t,r){if(fb(r,e.target)){var n=wm.toSlateNode(r,e.target);ph.Element.isElement(n)&&ph.Editor.isVoid(r,n)&&e.preventDefault()}},dragstart:function(e,t,r){var n=e;if(fb(r,n.target)&&!r.getConfig().readOnly){var o=wm.toSlateNode(r,n.target),i=wm.findPath(r,o);if(ph.Element.isElement(o)&&ph.Editor.isVoid(r,o)||ph.Editor.void(r,{at:i,voids:!0})){var a=ph.Editor.range(r,i);ph.Transforms.select(r,a)}var s=n.dataTransfer;if(null!=s)wm.getSelectedNodeByType(r,"table")||(t.isDraggingInternally=!0,r.setFragmentData(s))}},dragend:function(e,t,r){var n=e;r.getConfig().readOnly||t.isDraggingInternally&&fb(r,n.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,r){var n=e,o=n.dataTransfer;if(!r.getConfig().readOnly&&fb(r,n.target)&&null!=o&&!(vm&&hm&&o.files.length>0)){n.preventDefault();var i=r.selection,a=wm.findEventRange(r,n);ph.Transforms.select(r,a),t.isDraggingInternally&&(i&&ph.Transforms.delete(r,{at:i}),t.isDraggingInternally=!1),r.insertData(o),r.isFocused()||r.focus()}}};function Pb(e){if(Rb(e)){for(;e&&Rb(e);){e=Lb(e).parent}return null!=e?e:null}return e.parentNode}function Rb(e){return 11===e.nodeType}function Lb(e,t){var r,n,o;const i=e;return null!==(r=i.parent)&&void 0!==r||(i.parent=null!=t?t:null),null!==(n=i.firstChildNode)&&void 0!==n||(i.firstChildNode=e.firstChild),null!==(o=i.lastChildNode)&&void 0!==o||(i.lastChildNode=e.lastChild),i}const _b={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,r){return document.createElementNS(e,t,r)},createTextNode:function(e){return document.createTextNode(e)},createDocumentFragment:function(){return Lb(document.createDocumentFragment())},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,r){if(Rb(e)){let t=e;for(;t&&Rb(t);){t=Lb(t).parent}e=null!=t?t:e}Rb(t)&&(t=Lb(t,e)),r&&Rb(r)&&(r=Lb(r).firstChildNode),e.insertBefore(t,r)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){Rb(t)&&(t=Lb(t,e)),e.appendChild(t)},parentNode:Pb,nextSibling:function(e){var t;if(Rb(e)){const r=Lb(e),n=Pb(r);if(n&&r.lastChildNode){const e=Array.from(n.childNodes),o=e.indexOf(r.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:Rb};function zb(e,t,r,n,o){return{sel:e,data:t,children:r,text:n,elm:o,key:void 0===t?void 0:t.key}}const jb=Array.isArray;function Hb(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}const $b=zb("",{},[],void 0,void 0);function Vb(e,t){var r,n;const o=e.key===t.key,i=(null===(r=e.data)||void 0===r?void 0:r.is)===(null===(n=t.data)||void 0===n?void 0:n.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 Ub(e,t,r){var n;const o={};for(let i=t;i<=r;++i){const t=null===(n=e[i])||void 0===n?void 0:n.key;void 0!==t&&(o[t]=i)}return o}const qb=["create","update","remove","destroy","pre","post"];function Gb(e,t,r){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},o=_b;for(const t of qb)for(const r of e){const e=r[t];void 0!==e&&n[t].push(e)}function i(e){const t=e.id?"#"+e.id:"",r=e.getAttribute("class"),n=r?"."+r.split(" ").join("."):"";return zb(o.tagName(e).toLowerCase()+t+n,{},[],void 0,e)}function a(e){return zb(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 r,i,a;let s;const l=e.data,c=null==l?void 0:l.hook;null===(r=null==c?void 0:c.init)||void 0===r||r.call(c,e);const d=e.children,f=e.sel;if("!"===f)null!==(i=e.text)&&void 0!==i||(e.text=""),e.elm=o.createComment(e.text);else if(""===f)e.elm=o.createTextNode(e.text);else if(void 0!==f){const r=f.indexOf("#"),i=f.indexOf(".",r),h=r>0?r:f.length,p=i>0?i:f.length,g=-1!==r||-1!==i?f.slice(0,Math.min(h,p)):f,m=null==l?void 0:l.ns,v=void 0===m?o.createElement(g,l):o.createElementNS(m,g,l);for(e.elm=v,h<p&&v.setAttribute("id",f.slice(h+1,p)),i>0&&v.setAttribute("class",f.slice(p+1).replace(/\./g," ")),s=0;s<n.create.length;++s)n.create[s]($b,e);if(!Hb(e.text)||jb(d)&&0!==d.length||o.appendChild(v,o.createTextNode(e.text)),jb(d))for(s=0;s<d.length;++s){const e=d[s];null!=e&&o.appendChild(v,u(e,t))}void 0!==c&&(null===(a=c.create)||void 0===a||a.call(c,$b,e),void 0!==c.insert&&t.push(e))}else e.elm=o.createTextNode(e.text);return e.elm}function l(e,t,r,n,i,a){for(;n<=i;++n){const i=r[n];null!=i&&o.insertBefore(e,u(i,a),t)}}function c(e){var t,r;const o=e.data;if(void 0!==o){null===(r=null===(t=null==o?void 0:o.hook)||void 0===t?void 0:t.destroy)||void 0===r||r.call(t,e);for(let t=0;t<n.destroy.length;++t)n.destroy[t](e);if(void 0!==e.children)for(let t=0;t<e.children.length;++t){const r=e.children[t];null!=r&&"string"!=typeof r&&c(r)}}}function d(e,t,r,i){for(var a,u;r<=i;++r){let i;const l=t[r];if(null!=l)if(void 0!==l.sel){c(l),i=n.remove.length+1;const e=s(l.elm,i);for(let t=0;t<n.remove.length;++t)n.remove[t](l,e);const t=null===(u=null===(a=null==l?void 0:l.data)||void 0===a?void 0:a.hook)||void 0===u?void 0:u.remove;void 0!==t?t(l,e):e()}else l.children?(c(l),d(e,l.children,0,l.children.length-1)):o.removeChild(e,l.elm)}}function f(e,t,r){var i,a,s,c,h,p,g,m;const v=null===(i=t.data)||void 0===i?void 0:i.hook;null===(a=null==v?void 0:v.prepatch)||void 0===a||a.call(v,e,t);const y=t.elm=e.elm;if(e===t)return;if(void 0!==t.data||void 0!==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 r=0;r<n.update.length;++r)n.update[r](e,t);null===(g=null===(p=null===(h=t.data)||void 0===h?void 0:h.hook)||void 0===p?void 0:p.update)||void 0===g||g.call(p,e,t)}const b=e.children,w=t.children;void 0===t.text?void 0!==b&&void 0!==w?b!==w&&function(e,t,r,n){let i,a,s,c,h=0,p=0,g=t.length-1,m=t[0],v=t[g],y=r.length-1,b=r[0],w=r[y];for(;h<=g&&p<=y;)null==m?m=t[++h]:null==v?v=t[--g]:null==b?b=r[++p]:null==w?w=r[--y]:Vb(m,b)?(f(m,b,n),m=t[++h],b=r[++p]):Vb(v,w)?(f(v,w,n),v=t[--g],w=r[--y]):Vb(m,w)?(f(m,w,n),o.insertBefore(e,m.elm,o.nextSibling(v.elm)),m=t[++h],w=r[--y]):Vb(v,b)?(f(v,b,n),o.insertBefore(e,v.elm,m.elm),v=t[--g],b=r[++p]):(void 0===i&&(i=Ub(t,h,g)),a=i[b.key],void 0===a?(o.insertBefore(e,u(b,n),m.elm),b=r[++p]):void 0===i[w.key]?(o.insertBefore(e,u(w,n),o.nextSibling(v.elm)),w=r[--y]):(s=t[a],s.sel!==b.sel?o.insertBefore(e,u(b,n),m.elm):(f(s,b,n),t[a]=void 0,o.insertBefore(e,s.elm,m.elm)),b=r[++p]));p<=y&&(c=null==r[y+1]?null:r[y+1].elm,l(e,c,r,p,y,n)),h<=g&&d(e,t,h,g)}(y,b,w,r):void 0!==w?(void 0!==e.text&&o.setTextContent(y,""),l(y,null,w,0,w.length-1,r)):void 0!==b?d(y,b,0,b.length-1):void 0!==e.text&&o.setTextContent(y,""):e.text!==t.text&&(void 0!==b&&d(y,b,0,b.length-1),o.setTextContent(y,t.text)),null===(m=null==v?void 0:v.postpatch)||void 0===m||m.call(v,e,t)}return function(e,t){let r,s,l;const c=[];for(r=0;r<n.pre.length;++r)n.pre[r]();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),Vb(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))),r=0;r<c.length;++r)c[r].data.hook.insert(c[r]);for(r=0;r<n.post.length;++r)n.post[r]();return t}}function Wb(e,t,r){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==r&&void 0!==t)for(let e=0;e<t.length;++e){const r=t[e];if("string"==typeof r)continue;const n=r.data;void 0!==n&&Wb(n,r.children,r.sel)}}function Yb(e,t,r){let n,o,i,a={};if(void 0!==r?(null!==t&&(a=t),jb(r)?n=r:Hb(r)?o=r.toString():r&&r.sel&&(n=[r])):null!=t&&(jb(t)?n=t:Hb(t)?o=t.toString():t&&t.sel?n=[t]:a=t),void 0!==n)for(i=0;i<n.length;++i)Hb(n[i])&&(n[i]=zb(void 0,void 0,void 0,n[i],void 0));return!e.startsWith("svg")||3!==e.length&&"."!==e[3]&&"#"!==e[3]||Wb(a,n,e),zb(e,a,n,o,void 0)}function Kb(e,t){let r;const n=t.elm;let o=e.data.attrs,i=t.data.attrs;if((o||i)&&o!==i){for(r in o=o||{},i=i||{},i){const e=i[r];o[r]!==e&&(!0===e?n.setAttribute(r,""):!1===e?n.removeAttribute(r):120!==r.charCodeAt(0)?n.setAttribute(r,e):58===r.charCodeAt(3)?n.setAttributeNS("http://www.w3.org/XML/1998/namespace",r,e):58===r.charCodeAt(5)?109===r.charCodeAt(1)?n.setAttributeNS("http://www.w3.org/2000/xmlns/",r,e):n.setAttributeNS("http://www.w3.org/1999/xlink",r,e):n.setAttribute(r,e))}for(r in o)r in i||n.removeAttribute(r)}}const Xb={create:Kb,update:Kb};function Zb(e,t){let r,n;const o=t.elm;let i=e.data.class,a=t.data.class;if((i||a)&&i!==a){for(n in i=i||{},a=a||{},i)i[n]&&!Object.prototype.hasOwnProperty.call(a,n)&&o.classList.remove(n);for(n in a)r=a[n],r!==i[n]&&o.classList[r?"add":"remove"](n)}}const Jb={create:Zb,update:Zb},Qb=/[A-Z]/g;function ew(e,t){const r=t.elm;let n,o=e.data.dataset,i=t.data.dataset;if(!o&&!i)return;if(o===i)return;o=o||{},i=i||{};const a=r.dataset;for(n in o)n in i||(a?n in a&&delete a[n]:r.removeAttribute("data-"+n.replace(Qb,"-$&").toLowerCase()));for(n in i)o[n]!==i[n]&&(a?a[n]=i[n]:r.setAttribute("data-"+n.replace(Qb,"-$&").toLowerCase(),i[n]))}const tw={create:ew,update:ew};function rw(e,t,r){if("function"==typeof e)e.call(t,r,t);else if("object"==typeof e)for(let n=0;n<e.length;n++)rw(e[n],t,r)}function nw(e,t){const r=e.type,n=t.data.on;n&&n[r]&&rw(n[r],t,e)}function ow(e,t){const r=e.data.on,n=e.listener,o=e.elm,i=t&&t.data.on,a=t&&t.elm;let s;if(r!==i){if(r&&n)if(i)for(s in r)i[s]||o.removeEventListener(s,n,!1);else for(s in r)o.removeEventListener(s,n,!1);if(i){const n=t.listener=e.listener||function e(t){nw(t,e.vnode)};if(n.vnode=t,r)for(s in i)r[s]||a.addEventListener(s,n,!1);else for(s in i)a.addEventListener(s,n,!1)}}}const iw={create:ow,update:ow,destroy:ow};function aw(e,t){let r,n,o;const i=t.elm;let a=e.data.props,s=t.data.props;if((a||s)&&a!==s)for(r in a=a||{},s=s||{},s)n=s[r],o=a[r],o===n||"value"===r&&i[r]===n||(i[r]=n)}const sw={create:aw,update:aw},uw="function"==typeof(null===window||void 0===window?void 0:window.requestAnimationFrame)?window.requestAnimationFrame.bind(window):setTimeout;let lw=!1;function cw(e,t,r){var n;n=()=>{e[t]=r},uw(()=>{uw(n)})}function dw(e,t){let r,n;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(n in i)n in a||("-"===n[0]&&"-"===n[1]?o.style.removeProperty(n):o.style[n]="");for(n in a)if(r=a[n],"delayed"===n&&a.delayed)for(const e in a.delayed)r=a.delayed[e],s&&r===i.delayed[e]||cw(o.style,e,r);else"remove"!==n&&r!==i[n]&&("-"===n[0]&&"-"===n[1]?o.style.setProperty(n,r):o.style[n]=r)}const fw={pre:function(){lw=!1},create:dw,update:dw,destroy:function(e){let t,r;const n=e.elm,o=e.data.style;if(o&&(t=o.destroy))for(r in t)n.style[r]=t[r]},remove:function(e,t){const r=e.data.style;if(!r||!r.remove)return void t();let n;lw||(e.elm.offsetLeft,lw=!0);const o=e.elm;let i=0;const a=r.remove;let s=0;const u=[];for(n in a)u.push(n),o.style[n]=a[n];const l=getComputedStyle(o)["transition-property"].split(", ");for(;i<l.length;++i)-1!==u.indexOf(l[i])&&s++;o.addEventListener("transitionend",e=>{e.target===o&&--s,0===s&&t()})}};function hw(e,t){for(const r of e)null!=r&&!1!==r&&""!==r&&(Array.isArray(r)?hw(r,t):"string"==typeof r||"number"==typeof r||"boolean"==typeof r?t.push(zb(void 0,void 0,void 0,String(r),void 0)):t.push(r));return t}function pw(e,t,...r){const n=hw(r,[]);return"function"==typeof e?e(t,n):1===n.length&&!n[0].sel&&n[0].text?Yb(e,t,n[0].text):Yb(e,t,n)}var gw=[];var mw,vw,yw={};function bw(e,t,r){return pw(r.isInline(e)?"span":"div",null,t)}function ww(e,t){var r,n=wm.findKey(t,e),o=t.isInline(e),i=ph.Editor.isVoid(t,e),a=em(e.type,n.id),s={id:a,key:n.id,"data-slate-node":"element","data-slate-inline":o},u=e.type,l=e.children,c=void 0===l?[]:l,d=function(e){return yw[e]||bw}(u);r=i?null:c.map(function(r,n){return Cw(r,n,e,t)});var f=d(e,r,t);if(i){s["data-slate-void"]=!0;var h=o?"span":"div",p=Ch(ph.Node.texts(e),1),g=Ch(p[0],1)[0],m=pw(h,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},Cw(g,0,e,t));f=pw(h,{style:{position:"relative"}},f,m),fp.set(g,0),hp.set(g,e)}return null==f.data&&(f.data={}),Object.assign(f.data,s),i||o||(f=function(e,t){var r=t;return gw.forEach(function(n){r=n(e,t)}),r}(e,f)),wg(function(){var t=Bg(a);null!=t&&(mp.set(n,t),vp.set(e,t),gp.set(t,e))}),f}function Ew(e,t){return void 0===t&&(t=!1),pw("span",{"data-slate-string":!0},t?e+"\n":e)}function xw(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),pw("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?pw("br",null):null)}function Sw(e,t,r){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var n=wm.findKey(r,e),o=r.getConfig().decorate;if(null==o)throw new Error("Can not get config.decorate");var i,a=wm.findPath(r,e),s=o([e,a]),u=ph.Text.decorations(e,s),l=u.map(function(n){var o,i,a,s=n.leaf,l=n.position,c=function(e,t,r,n,o){void 0===t&&(t=!1);var i=e.text,a=wm.findPath(o,r),s=ph.Path.parent(a);if(ph.Editor.isEditor(n))throw new Error("Text node ".concat(JSON.stringify(r)," parent is Editor"));return o.isVoid(n)?xw(ph.Node.string(n).length):""!==i||n.children[n.children.length-1]!==r||o.isInline(n)||""!==ph.Editor.string(o,s)?""===i?xw():t&&"\n"===i.slice(-1)?Ew(i,!0):Ew(i):xw(0,!0)}(s,null!==(o=null==l?void 0:l.isLast)&&void 0!==o?o:1===u.length,e,t,r);return i=s,a=c,gw.forEach(function(e){a=e(i,a)}),pw("span",{"data-slate-leaf":!0},c=a)}),c=(i=n.id,"w-e-text-".concat(i)),d=pw("span",{"data-slate-node":"text",id:c,key:n.id},l);return wg(function(){var t=Bg(c);null!=t&&(mp.set(n,t),vp.set(e,t),gp.set(t,e))}),d}function Cw(e,t,r,n){return fp.set(e,t),hp.set(e,r),ph.Element.isElement(e)?ww(e,n):Sw(e,r,n)}var Aw=function(){if(vw)return mw;vw=1;var e,t="[object Symbol]",r=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,n=/[\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="['’]",h="["+o+"]",p="["+d+"]",g="["+i+a+"]",m="\\d+",v="["+s+"]",y="["+u+"]",w="[^"+o+d+m+s+u+l+"]",E="\\ud83c[\\udffb-\\udfff]",x="[^"+o+"]",S="(?:\\ud83c[\\udde6-\\uddff]){2}",C="[\\ud800-\\udbff][\\udc00-\\udfff]",A="["+l+"]",D="\\u200d",T="(?:"+y+"|"+w+")",k="(?:"+A+"|"+w+")",N="(?:['’](?:d|ll|m|re|s|t|ve))?",O="(?:['’](?:D|LL|M|RE|S|T|VE))?",B="(?:"+g+"|"+E+")"+"?",M="["+c+"]?",F=M+B+("(?:"+D+"(?:"+[x,S,C].join("|")+")"+M+B+")*"),I="(?:"+[v,S,C].join("|")+")"+F,P="(?:"+[x+g+"?",g,S,C,h].join("|")+")",R=RegExp(f,"g"),L=RegExp(g,"g"),_=RegExp(E+"(?="+E+")|"+P+F,"g"),z=RegExp([A+"?"+y+"+"+N+"(?="+[p,A,"$"].join("|")+")",k+"+"+O+"(?="+[p,A+T,"$"].join("|")+")",A+"?"+T+"+"+N,A+"+"+O,m,I].join("|"),"g"),j=RegExp("["+D+o+i+a+c+"]"),H=/[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 b&&b&&b.Object===Object&&b,V="object"==typeof self&&self&&self.Object===Object&&self,U=$||V||Function("return this")(),q=(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 j.test(e)}function W(e){return G(e)?function(e){return e.match(_)||[]}(e):function(e){return e.split("")}(e)}var Y=Object.prototype.toString,K=U.Symbol,X=K?K.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)&&Y.call(e)==t}(e))return Z?Z.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}function Q(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}(e,t,r)}function ee(e){return null==e?"":J(e)}var te,re,ne=(te=function(e,t,r){return t=t.toLowerCase(),e+(r?oe(ee(t).toLowerCase()):t)},function(e){return function(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)r=t(r,e[n],n,e);return r}(function(e,t){return e=ee(e),void 0===t?function(e){return H.test(e)}(e)?function(e){return e.match(z)||[]}(e):function(e){return e.match(r)||[]}(e):e.match(t)||[]}(function(e){return(e=ee(e))&&e.replace(n,q).replace(L,"")}(e).replace(R,"")),te,"")}),oe=(re="toUpperCase",function(e){var t=G(e=ee(e))?W(e):void 0,r=t?t[0]:e.charAt(0),n=t?Q(t,1).join(""):e.slice(1);return r[re]()+n});return mw=ne}(),Dw=w(Aw);var Tw=["props","attrs","style","dataset","on","hook"];function kw(e){var t=e.data,r=void 0===t?{}:t,n=e.children,o=void 0===n?[]:n;Object.keys(r).forEach(function(t){var n,o,i=r[t];if("key"!==t){if(!Tw.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=Dw(a),function(e,t){null==e.data&&(e.data={});var r=e.data;null==r.dataset&&(r.dataset={});Object.assign(r.dataset,t)}(e,((n={})[a]=i,n)),void delete r[t]}!function(e,t){null==e.data&&(e.data={});var r=e.data;null==r.props&&(r.props={});Object.assign(r.props,t)}(e,(o={},o[t]=i,o)),delete r[t]}}else e.key=i}),o.length>0&&o.forEach(function(e){"string"!=typeof e&&kw(e)})}function Nw(e,t){var r,n,o=e.$scroll,i=(r=e.id,"w-e-textarea-".concat(r)),a=t.getConfig(),s=a.readOnly,u=a.autoFocus,l=function(e,t){return void 0===t&&(t=!1),Yb("div#".concat(e),{props:{contentEditable:!t}})}(i,s),c=t.children||[];l.children=c.map(function(e,r){if(cp.has(e)){var n=cp.get(e);if(n){var o=Ch(n,2),i=o[0],a=o[1];if(a)return i!==r&&(fp.set(e,r),cp.set(e,[r,a])),a}}var s=Cw(e,r,t,t);kw(s);var u=t.getConfig().skipCacheTypes,l=void 0===u?["list-item"]:u;return ph.Element.isElement(e)&&l.includes(e.type)||cp.set(e,[r,s]),s});var d=sp.get(e);if(null==d&&(d=!0),d){var f=function(e){return _p('<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,n=f[0],(p=Gb([Jb,sw,fw,tw,iw,Xb]))(n,l),sp.set(e,!1),up.set(e,p)}else{var h=lp.get(e),p=up.get(e);if(null==h||null==p)return;n=h.elm,p(h,l)}if(null!=n||null!=(n=Bg(i))){var g;if((d?u:t.isFocused())&&n.focus({preventScroll:!0}),d){var m=(g=n)&&g.ownerDocument&&g.ownerDocument.defaultView||null;m&&bp.set(t,m)}pp.set(t,n),vp.set(t,n),gp.set(n,t),lp.set(e,l)}}var Ow=1,Bw=function(){function e(e){var t=this;this.selectionChangeRoot=null,this.destroyed=!1,this.id=Ow++,this.$textArea=null,this.$progressBar=_p('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=_p('<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=cb(function(e){var r=kg(null==e?void 0:e.target)?e.target:null,n=null==r?void 0:r.tagName;if("INPUT"!==n&&"TEXTAREA"!==n){var o=t.getActiveEditor();null!=o&&function(e,t){var r=e.isComposing,n=e.isUpdatingSelection,o=e.isDraggingInternally,i=t.getConfig();if(!n&&!o){var a=wm.findDocumentOrShadowRoot(t),s=a.activeElement,u=wm.toDOMNode(t,t),l=a.getSelection();if(s!==u)return wp.delete(t),void Eb(t);if(e.latestElement=s,wp.set(t,!0),!l)return Eb(t);var c=l.anchorNode,d=l.focusNode,f=hb(t,c),h=fb(t,d);if(!r)if(f&&h){var p=wm.toSlateRange(t,l,{exactMatch:!1,suppressThrow:!0});p&&ph.Transforms.select(t,p)}else i.readOnly&&Eb(t)}}(t,o)}},100);var r=_p(e);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=r;var n=_p('<div class="w-e-text-container"></div>');n.append(this.$progressBar),n.append(this.$maxLengthInfo),r.append(n);var o=_p('<div class="w-e-scroll"></div>');n.append(o),this.$scroll=o,this.$textAreaContainer=n,wg(function(){var e=t.getActiveEditor();if(null!=e){t.bindSelectionChange(e),n.on("click",function(){return e.hidePanelOrModal()}),e.on(Vh,t.changeViewState.bind(t));var o=e.getConfig(),i=o.onChange,a=o.scroll;i&&e.on(Vh,function(){return i(e)}),a||(r.css("position","relative"),n.addClass("no-scroll")),t.onFocusAndOnBlur(),e.on(Vh,t.changeMaxLengthInfo.bind(t)),t.bindEvent()}})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=Jh.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.getActiveEditor=function(){if(this.destroyed)return null;var e=Jh.get(this);return null==e||e.isDestroyed?null:e},e.prototype.bindSelectionChange=function(e,t){var r=this;if(void 0===t&&(t=5),null==this.selectionChangeRoot&&!e.isDestroyed){try{var n=wm.findDocumentOrShadowRoot(e);n.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=n}catch(n){if(t>0)return void setTimeout(function(){return r.bindSelectionChange(e,t-1)},0);window.document.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=window.document}e.on($h,function(){var e;null===(e=r.selectionChangeRoot)||void 0===e||e.removeEventListener("selectionchange",r.onDOMSelectionChange),r.selectionChangeRoot=null})}},e.prototype.flushDOMSelectionChange=function(){this.onDOMSelectionChange.flush()},e.prototype.bindEvent=function(){var e=this,t=this.$textArea,r=this.$scroll,n=this.editorInstance;null!=t&&(Ih(Ib,function(r,o){t.on(o,function(t){r(t,e,n)})}),n.getConfig().scroll&&(r.css("overflow-y","auto"),r.on("scroll",cb(function(){n.emit(Uh)},100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.getActiveEditor();if(null!=t){var r=t.getConfig(),n=r.onBlur,o=r.onFocus;this.latestEditorSelection=t.selection,t.on(Vh,function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout(function(){e.destroyed||t.isDestroyed||o&&o(t)}):null!=e.latestEditorSelection&&null==t.selection&&setTimeout(function(){e.destroyed||t.isDestroyed||n&&n(t)}),e.latestEditorSelection=t.selection})}},e.prototype.changeMaxLengthInfo=function(){var e=this.getActiveEditor();if(null!=e){var t=e.getConfig().maxLength;if(t){var r=t-wm.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(r,"/").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.getActiveEditor();null!=t&&(Nw(this,t),function(e,t){var r,n=t.getConfig().placeholder;if(n){var o=t.isEmpty();if(o&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var i=_p('<div class="w-e-text-placeholder">'.concat(n,"</div>"));e.$textAreaContainer.append(i),e.$placeholder=i}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!o&&e.showPlaceholder&&(null===(r=e.$placeholder)||void 0===r||r.hide(),e.showPlaceholder=!1)}}(this,t),wg(function(){e.destroyed||t.isDestroyed||xb(e,t)}))},e.prototype.destroy=function(){var e;this.destroyed=!0,this.onDOMSelectionChange.cancel(),null===(e=this.selectionChangeRoot)||void 0===e||e.removeEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=null,this.$textAreaContainer.remove()},e}();function Mw(e,t,r,n){if(fp.set(e,t),hp.set(e,r),ph.Element.isElement(e)){var o=e.children;if((void 0===o?[]:o).forEach(function(t,r){return Mw(t,r,e,n)}),ph.Editor.isVoid(n,e)){var i=Ch(ph.Node.texts(e),1),a=Ch(i[0],1)[0];fp.set(a,0),hp.set(a,e)}}}function Fw(e){var t=e.selector,r=void 0===t?"":t,n=e.config,o=void 0===n?{}:n,i=e.content,a=e.html,s=e.plugins,u=void 0===s?[]:s,l=function(e){return[Mv,pv,Dp,fv,$v,Bv,Pv,vh.withHistory].reduce(function(e,t){return t(e)},e)}(ph.createEditor());if(r&&function(e,t){return Jg(e,"data-w-e-textarea",t)}(l,r))throw new Error("Repeated create editor by selector '".concat(r,"'"));var c=function(e){void 0===e&&(e={});var t=Mh(jh),r={},n=e.MENU_CONF,o=void 0===n?{}:n;return Ih(t,function(e,t){r[t]=wh(wh({},e),o[t]||{})}),delete e.MENU_CONF,wh({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:r,hoverbarKeys:{},sanitizeHtml:zh,customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(o);ap.set(l,c);var d=c.hoverbarKeys,f=void 0===d?{}:d;if(u.forEach(function(e){l=e(l)}),function(e,t){var r=t.html,n=t.content;null!=r?e.children=Qg(e,r):n&&n.length&&(e.children=n),0===e.children.length&&(e.children=[{type:"paragraph",children:[{text:""}]}])}(l,{html:a,content:i}),r){var h=new Bw(r);Zh.set(l,h),Jh.set(h,l),h.changeViewState();var p=void 0;Object.keys(f).length>0&&(p=new ub,tp.set(p,l),rp.set(l,p)),l.on(Vh,function(){l.hidePanelOrModal()}),l.on(Uh,function(){l.hidePanelOrModal()})}else l.children.forEach(function(e,t){return Mw(e,t,l,l)});var g=c.onCreated,m=c.onDestroyed;return g&&l.on(Hh,function(){return g(l)}),m&&l.on($h,function(){return m(l)}),wg(function(){return l.emit(Hh)}),l}var Iw=function(){function e(e,t){var r=this;this.$toolbar=_p('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=Uv(function(){r.toolbarItems.forEach(function(e){e.changeMenuState()})},200),this.config=t;var n=_p(e);if(0===n.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=n;var o=this.$toolbar;o.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),n.append(o),wg(function(){r.initToolbar(),r.lngListen=Ly(function(){return r.initToolbar()}),r.getEditorInstance().on(Vh,r.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="",r=this.$toolbar,n=this.config,o=n.toolbarKeys,i=void 0===o?[]:o,a=n.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=n.excludeKeys,l=void 0===u?[]:u,c=Mh(i),d=[];d=Array.isArray(s)?s:[s];var f=0;d.forEach(function(e){var t=e.index+f;if(e.replaceFn&&c[t]){var r=e.replaceFn(c[t]);if(!r)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");c[t]=r}e.keys.length>0&&("string"==typeof e.keys&&(e.keys=[e.keys]),e.keys.forEach(function(e,r){c.splice(t+r,0,e)}),f+=e.keys.length)});var h=c.filter(function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)}),p=h.length;h.forEach(function(n,o){if("|"===n){if(0===o)return;if(o+1===p)return;if("|"===t)return;var i=Hy();return r.append(i),void(t=n)}if("string"==typeof n)return e.registerSingleItem(n,e),void(t=n);e.registerGroup(n),t="group"})},e.prototype.registerGroup=function(e){var t=this,r=this.$toolbar,n=function(e){return new tb(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,n)}),r.append(n.$elem)},e.prototype.registerSingleItem=function(e,t){var r=this.getEditorInstance(),n=t instanceof tb,o=this.menus,i=o[e];if(null==i){var a=Kh[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=r.getMenuConfig(e);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=ob(e,i,n);(this.toolbarItems.push(u),np.set(u,r),n)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=Qh.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 Pw(e,t){if(null==e)throw new Error("Cannot create toolbar, because editor is null");var r=t.selector,n=t.config,o=void 0===n?{}:n;if(function(e,t){return Jg(e,"data-w-e-toolbar",t)}(e,r))throw new Error("Repeated create toolbar by selector '".concat(r,"'"));var i=wh({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new Iw(r,i);return Qh.set(a,e),ep.set(e,a),a}var Rw,Lw,_w,zw,jw,Hw={exports:{}},$w={};function Vw(){if(_w)return $w;_w=1,Object.defineProperty($w,"__esModule",{value:!0}),$w.justErrorsLogger=$w.debugLogger=void 0;const e=function(){if(Lw)return Rw;function e(e){return e<10?`0${e}`:e.toString()}return Lw=1,Rw=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,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return console.error(`[Uppy] [${e()}]`,...r)}};$w.justErrorsLogger=t;const r={debug:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return console.debug(`[Uppy] [${e()}]`,...r)},warn:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return console.warn(`[Uppy] [${e()}]`,...r)},error:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return console.error(`[Uppy] [${e()}]`,...r)}};return $w.debugLogger=r,$w}function Uw(){if(jw)return zw;jw=1;return zw={nanoid:(e=21)=>{let t="",r=0|e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",o=0|r;for(;o--;)n+=e[Math.random()*e.length|0];return n}},zw}var qw,Gw,Ww,Yw,Kw,Xw,Zw,Jw,Qw,eE,tE,rE,nE,oE,iE,aE,sE,uE,lE,cE,dE,fE,hE,pE,gE,mE,vE,yE,bE,wE,EE,xE={};function SE(){return Gw?qw:(Gw=1,qw=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),r.length-1);e=Number(e/Math.pow(1024,n));var o=r[n];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o})}function CE(){if(Yw)return Ww;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return Yw=1,e.prototype.match=function(e){var t,r,n=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(r=(e||"").split(this.separator),t=0;n&&t<i;t++)"*"!==o[t]&&(n=t<r.length&&o[t]===r[t]);n=n&&r}else n=!1;else if("function"==typeof e.splice)for(n=[],t=e.length;t--;)this.match(e[t])&&(n[n.length]=e[t]);else if("object"==typeof e)for(var a in n={},e)this.match(a)&&(n[a]=e[a]);return n},Ww=function(t,r,n){var o=new e(t,n||/[\/\.]/);return void 0!==r?o.match(r):o},Ww}function AE(){if(Zw)return xE;Zw=1,Object.defineProperty(xE,"__esModule",{value:!0}),xE.defaultOptions=xE.RestrictionError=xE.Restricter=void 0;const e=SE(),t=function(){if(Xw)return Kw;Xw=1;var e=CE(),t=/[\/\+\.]/;return Kw=function(r,n){function o(n){var o=e(n,r,t);return o&&o.length>=2}return n?o(n.split(";")[0]):o}}();xE.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class r extends Error{constructor(){super(...arguments),this.isRestriction=!0}}xE.RestrictionError=r,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});return xE.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(n,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 r(`${this.i18n("youCanOnlyUploadX",{smart_count:u})}`)}if(l){if(!l.some(e=>e.includes("/")?!!n.type&&t(n.type.replace(/;.*?$/,""),e):!("."!==e[0]||!n.extension)&&n.extension.toLowerCase()===e.slice(1).toLowerCase())){const e=l.join(", ");throw new r(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(s&&null!=n.size){const t=o.reduce((e,t)=>e+t.size,n.size);if(t>s)throw new r(this.i18n("exceedsSize",{size:e(s),file:n.name}))}if(i&&null!=n.size&&n.size>i)throw new r(this.i18n("exceedsSize",{size:e(i),file:n.name}));if(a&&null!=n.size&&n.size<a)throw new r(this.i18n("inferiorSize",{size:e(a)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new r(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new r(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:n}=this.getOpts().restrictions,o=Object.prototype.hasOwnProperty,i=[];for(const t of n)o.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}},xE}function DE(){if(Qw)return Jw;return Qw=1,Jw=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}function TE(){if(tE)return eE;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}tE=1;var t=0;function r(e){return"__private_"+t+++"_"+e}const n=DE();function o(e,t,r){const n=[];return e.forEach(e=>"string"!=typeof e?n.push(e):t[Symbol.split](e).forEach((e,t,o)=>{""!==e&&n.push(e),t<o.length-1&&n.push(r)})),n}
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).wangEditor={})}(this,function(e){"use strict";var t,r,n,o,i,a,s,u,l,c,d,f,h,p,g,m,v,y,b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function w(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 r=function e(){var r=!1;try{r=this instanceof e}catch{}return r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}function x(){return r?t:(r=1,t=function(e){try{return!!e()}catch(e){return!0}})}function S(){if(o)return n;o=1;var e=x();return n=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function C(){if(a)return i;a=1;var e=S(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return i=e?n:function(e){return function(){return r.apply(e,arguments)}},i}function A(){if(u)return s;u=1;var e=C(),t=e({}.toString),r=e("".slice);return s=function(e){return r(t(e),8,-1)}}function D(){if(c)return l;c=1;var e=C(),t=x(),r=A(),n=Object,o=e("".split);return l=t(function(){return!n("z").propertyIsEnumerable(0)})?function(e){return"String"===r(e)?o(e,""):n(e)}:n}function T(){return f?d:(f=1,d=function(e){return null==e})}function k(){if(p)return h;p=1;var e=T(),t=TypeError;return h=function(r){if(e(r))throw new t("Can't call method on "+r);return r}}function N(){if(m)return g;m=1;var e=D(),t=k();return g=function(r){return e(t(r))}}function O(){if(y)return v;y=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 b&&b)||e("object"==typeof v&&v)||function(){return this}()||Function("return this")()}var B,M,F,I,P,R,L,_,z,j,H,$,V,U,q,G,W,Y,K,X,Z,J,Q,ee,te,re,ne,oe,ie,ae={exports:{}};function se(){return M?B:(M=1,B=!1)}function ue(){if(I)return F;I=1;var e=O(),t=Object.defineProperty;return F=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}}function le(){if(P)return ae.exports;P=1;var e=se(),t=O(),r=ue(),n="__core-js_shared__",o=ae.exports=t[n]||r(n,{});return(o.versions||(o.versions=[])).push({version:"3.47.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"}),ae.exports}function ce(){if(L)return R;L=1;var e=le();return R=function(t,r){return e[t]||(e[t]=r||{})}}function de(){if(z)return _;z=1;var e=k(),t=Object;return _=function(r){return t(e(r))}}function fe(){if(H)return j;H=1;var e=C(),t=de(),r=e({}.hasOwnProperty);return j=Object.hasOwn||function(e,n){return r(t(e),n)}}function he(){if(V)return $;V=1;var e=C(),t=0,r=Math.random(),n=e(1.1.toString);return $=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+r,36)}}function pe(){if(W)return G;W=1;var e,t,r=O(),n=function(){if(q)return U;q=1;var e=O().navigator,t=e&&e.userAgent;return U=t?String(t):""}(),o=r.process,i=r.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&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),G=t}function ge(){if(K)return Y;K=1;var e=pe(),t=x(),r=O().String;return Y=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Y}function me(){if(Z)return X;Z=1;var e=ge();return X=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function ve(){if(Q)return J;Q=1;var e=O(),t=ce(),r=fe(),n=he(),o=ge(),i=me(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||n;return J=function(e){return r(s,e)||(s[e]=o&&r(a,e)?a[e]:u("Symbol."+e)),s[e]}}function ye(){if(te)return ee;te=1;var e="object"==typeof document&&document.all;return ee=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function be(){if(ne)return re;ne=1;var e=ye();return re=function(t){return"object"==typeof t?null!==t:e(t)}}function we(){if(ie)return oe;ie=1;var e=be(),t=String,r=TypeError;return oe=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")}}var Ee,xe,Se,Ce,Ae={};function De(){if(xe)return Ee;xe=1;var e=x();return Ee=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function Te(){if(Ce)return Se;Ce=1;var e=De(),t=x();return Se=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}var ke,Ne,Oe,Be,Me,Fe,Ie,Pe,Re,Le,_e,ze,je,He,$e,Ve,Ue,qe,Ge,We,Ye,Ke,Xe,Ze,Je,Qe,et,tt,rt,nt,ot,it,at,st,ut,lt,ct,dt,ft,ht,pt,gt,mt,vt,yt,bt,wt,Et,xt,St,Ct,At,Dt,Tt,kt,Nt,Ot,Bt,Mt,Ft,It,Pt,Rt,Lt,_t={};function zt(){if(Ne)return ke;Ne=1;var e=O(),t=be(),r=e.document,n=t(r)&&t(r.createElement);return ke=function(e){return n?r.createElement(e):{}}}function jt(){if(Be)return Oe;Be=1;var e=De(),t=x(),r=zt();return Oe=!e&&!t(function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})}function Ht(){if(Fe)return Me;Fe=1;var e=S(),t=Function.prototype.call;return Me=e?t.bind(t):function(){return t.apply(t,arguments)},Me}function $t(){if(Pe)return Ie;Pe=1;var e=O(),t=ye();return Ie=function(r,n){return arguments.length<2?(o=e[r],t(o)?o:void 0):e[r]&&e[r][n];var o},Ie}function Vt(){if(Le)return Re;Le=1;var e=C();return Re=e({}.isPrototypeOf)}function Ut(){if(ze)return _e;ze=1;var e=$t(),t=ye(),r=Vt(),n=me(),o=Object;return _e=n?function(e){return"symbol"==typeof e}:function(n){var i=e("Symbol");return t(i)&&r(i.prototype,o(n))}}function qt(){if(He)return je;He=1;var e=String;return je=function(t){try{return e(t)}catch(e){return"Object"}}}function Gt(){if(Ve)return $e;Ve=1;var e=ye(),t=qt(),r=TypeError;return $e=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")}}function Wt(){if(qe)return Ue;qe=1;var e=Gt(),t=T();return Ue=function(r,n){var o=r[n];return t(o)?void 0:e(o)},Ue}function Yt(){if(Ke)return Ye;Ke=1;var e=Ht(),t=be(),r=Ut(),n=Wt(),o=function(){if(We)return Ge;We=1;var e=Ht(),t=ye(),r=be(),n=TypeError;return Ge=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!r(s=e(a,o)))return s;if(t(a=o.valueOf)&&!r(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!r(s=e(a,o)))return s;throw new n("Can't convert object to primitive value")},Ge}(),i=ve(),a=TypeError,s=i("toPrimitive");return Ye=function(i,u){if(!t(i)||r(i))return i;var l,c=n(i,s);if(c){if(void 0===u&&(u="default"),l=e(c,i,u),!t(l)||r(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(Ze)return Xe;Ze=1;var e=Yt(),t=Ut();return Xe=function(r){var n=e(r,"string");return t(n)?n:n+""}}function Xt(){if(Je)return _t;Je=1;var e=De(),t=jt(),r=Te(),n=we(),o=Kt(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return _t.f=e?r?function(e,t,r){if(n(e),t=o(t),n(r),"function"==typeof e&&"prototype"===t&&"value"in r&&c in r&&!r[c]){var i=s(e,t);i&&i[c]&&(e[t]=r.value,r={configurable:l in r?r[l]:i[l],enumerable:u in r?r[u]:i[u],writable:!1})}return a(e,t,r)}:a:function(e,r,s){if(n(e),r=o(r),n(s),t)try{return a(e,r,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[r]=s.value),e},_t}function Zt(){if(rt)return tt;rt=1;var e=function(){if(et)return Qe;et=1;var e=Math.ceil,t=Math.floor;return Qe=Math.trunc||function(r){var n=+r;return(n>0?t:e)(n)},Qe}();return tt=function(t){var r=+t;return r!=r||0===r?0:e(r)}}function Jt(){if(at)return it;at=1;var e=Zt(),t=Math.min;return it=function(r){var n=e(r);return n>0?t(n,9007199254740991):0}}function Qt(){if(ut)return st;ut=1;var e=Jt();return st=function(t){return e(t.length)}}function er(){if(ct)return lt;ct=1;var e=N(),t=function(){if(ot)return nt;ot=1;var e=Zt(),t=Math.max,r=Math.min;return nt=function(n,o){var i=e(n);return i<0?t(i+o,0):r(i,o)},nt}(),r=Qt(),n=function(n){return function(o,i,a){var s=e(o),u=r(s);if(0===u)return!n&&-1;var l,c=t(a,u);if(n&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((n||c in s)&&s[c]===i)return n||c||0;return!n&&-1}};return lt={includes:n(!0),indexOf:n(!1)}}function tr(){return ft?dt:(ft=1,dt={})}function rr(){if(pt)return ht;pt=1;var e=C(),t=fe(),r=N(),n=er().indexOf,o=tr(),i=e([].push);return ht=function(e,a){var s,u=r(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++])&&(~n(c,s)||i(c,s));return c},ht}function nr(){return mt?gt:(mt=1,gt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function or(){if(bt)return Ae;bt=1;var e=De(),t=Te(),r=Xt(),n=we(),o=N(),i=function(){if(yt)return vt;yt=1;var e=rr(),t=nr();return vt=Object.keys||function(r){return e(r,t)},vt}();return Ae.f=e&&!t?Object.defineProperties:function(e,t){n(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)r.f(e,a=u[c++],s[a]);return e},Ae}function ir(){if(St)return xt;St=1;var e=ce(),t=he(),r=e("keys");return xt=function(e){return r[e]||(r[e]=t(e))}}function ar(){if(At)return Ct;At=1;var e,t=we(),r=or(),n=nr(),o=tr(),i=function(){if(Et)return wt;Et=1;var e=$t();return wt=e("document","documentElement")}(),a=zt(),s=ir(),u="prototype",l="script",c=s("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+"</"+l+">"},h=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,r,o;p="undefined"!=typeof document?document.domain&&e?h(e):(r=a("iframe"),o="java"+l+":",r.style.display="none",i.appendChild(r),r.src=String(o),(t=r.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):h(e);for(var s=n.length;s--;)delete p[u][n[s]];return p()};return o[c]=!0,Ct=Object.create||function(e,n){var o;return null!==e?(d[u]=t(e),o=new d,d[u]=null,o[c]=e):o=p(),void 0===n?o:r.f(o,n)},Ct}function sr(){return Nt?kt:(Nt=1,kt={})}function ur(){return Ft?Mt:(Ft=1,Mt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function lr(){if(Pt)return It;Pt=1;var e=De(),t=Xt(),r=ur();return It=e?function(e,n,o){return t.f(e,n,r(1,o))}:function(e,t,r){return e[t]=r,e}}function cr(){if(Lt)return Rt;Lt=1;var e,t,r,n=function(){if(Bt)return Ot;Bt=1;var e=O(),t=ye(),r=e.WeakMap;return Ot=t(r)&&/native code/.test(String(r))}(),o=O(),i=be(),a=lr(),s=fe(),u=le(),l=ir(),c=tr(),d="Object already initialized",f=o.TypeError,h=o.WeakMap;if(n||u.state){var p=u.state||(u.state=new h);p.get=p.get,p.has=p.has,p.set=p.set,e=function(e,t){if(p.has(e))throw new f(d);return t.facade=e,p.set(e,t),t},t=function(e){return p.get(e)||{}},r=function(e){return p.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]:{}},r=function(e){return s(e,g)}}return Rt={set:e,get:t,has:r,enforce:function(n){return r(n)?t(n):e(n,{})},getterFor:function(e){return function(r){var n;if(!i(r)||(n=t(r)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}}var dr,fr,hr={},pr={};function gr(){if(fr)return hr;fr=1;var e=De(),t=Ht(),r=function(){if(dr)return pr;dr=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return pr.f=r?function(e){var r=t(this,e);return!!r&&r.enumerable}:e,pr}(),n=ur(),o=N(),i=Kt(),a=fe(),s=jt(),u=Object.getOwnPropertyDescriptor;return hr.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 n(!t(r.f,e,l),e[l])},hr}var mr,vr,yr,br,wr,Er,xr,Sr={exports:{}};function Cr(){if(vr)return mr;vr=1;var e=De(),t=fe(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,o=t(r,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&n(r,"name").configurable);return mr={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Ar(){if(br)return yr;br=1;var e=C(),t=ye(),r=le(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),yr=r.inspectSource}function Dr(){if(wr)return Sr.exports;wr=1;var e=C(),t=x(),r=ye(),n=fe(),o=De(),i=Cr().CONFIGURABLE,a=Ar(),s=cr(),u=s.enforce,l=s.get,c=String,d=Object.defineProperty,f=e("".slice),h=e("".replace),p=e([].join),g=o&&!t(function(){return 8!==d(function(){},"length",{value:8}).length}),m=String(String).split("String"),v=Sr.exports=function(e,t,r){"Symbol("===f(c(t),0,7)&&(t="["+h(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!n(e,"name")||i&&e.name!==t)&&(o?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&r&&n(r,"arity")&&e.length!==r.arity&&d(e,"length",{value:r.arity});try{r&&n(r,"constructor")&&r.constructor?o&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=u(e);return n(a,"source")||(a.source=p(m,"string"==typeof t?t:"")),e};return Function.prototype.toString=v(function(){return r(this)&&l(this).source||a(this)},"toString"),Sr.exports}function Tr(){if(xr)return Er;xr=1;var e=ye(),t=Xt(),r=Dr(),n=ue();return Er=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(e(a)&&r(a,l,s),s.global)u?o[i]=a:n(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},Er}var kr,Nr={};var Or,Br,Mr,Fr,Ir,Pr,Rr,Lr,_r,zr,jr,Hr,$r,Vr,Ur,qr,Gr,Wr,Yr,Kr,Xr,Zr,Jr,Qr,en,tn,rn,nn,on,an,sn,un,ln,cn={};function dn(){if(Mr)return Br;Mr=1;var e=$t(),t=C(),r=function(){if(kr)return Nr;kr=1;var e=rr(),t=nr().concat("length","prototype");return Nr.f=Object.getOwnPropertyNames||function(r){return e(r,t)},Nr}(),n=(Or||(Or=1,cn.f=Object.getOwnPropertySymbols),cn),o=we(),i=t([].concat);return Br=e("Reflect","ownKeys")||function(e){var t=r.f(o(e)),a=n.f;return a?i(t,a(e)):t},Br}function fn(){if(Ir)return Fr;Ir=1;var e=fe(),t=dn(),r=gr(),n=Xt();return Fr=function(o,i,a){for(var s=t(i),u=n.f,l=r.f,c=0;c<s.length;c++){var d=s[c];e(o,d)||a&&e(a,d)||u(o,d,l(i,d))}},Fr}function hn(){if(_r)return Lr;_r=1;var e=O(),t=gr().f,r=lr(),n=Tr(),o=ue(),i=fn(),a=function(){if(Rr)return Pr;Rr=1;var e=x(),t=ye(),r=/#|\.prototype\./,n=function(r,n){var u=i[o(r)];return u===s||u!==a&&(t(n)?e(n):!!n)},o=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},i=n.data={},a=n.NATIVE="N",s=n.POLYFILL="P";return Pr=n}();return Lr=function(s,u){var l,c,d,f,h,p=s.target,g=s.global,m=s.stat;if(l=g?e:m?e[p]||o(p,{}):e[p]&&e[p].prototype)for(c in u){if(f=u[c],d=s.dontCallGetSet?(h=t(l,c))&&h.value:l[c],!a(g?c:p+(m?".":"#")+c,s.forced)&&void 0!==d){if(typeof f==typeof d)continue;i(f,d)}(s.sham||d&&d.sham)&&r(f,"sham",!0),n(l,c,f,s)}}}function pn(){if($r)return Hr;$r=1;var e=fe(),t=ye(),r=de(),n=ir(),o=function(){if(jr)return zr;jr=1;var e=x();return zr=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),zr}(),i=n("IE_PROTO"),a=Object,s=a.prototype;return Hr=o?a.getPrototypeOf:function(n){var o=r(n);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},Hr}function gn(){if(Ur)return Vr;Ur=1;var e,t,r,n=x(),o=ye(),i=be(),a=ar(),s=pn(),u=Tr(),l=ve(),c=se(),d=l("iterator"),f=!1;return[].keys&&("next"in(r=[].keys())?(t=s(s(r)))!==Object.prototype&&(e=t):f=!0),!i(e)||n(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),Vr={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function mn(){if(Gr)return qr;Gr=1;var e=Xt().f,t=fe(),r=ve()("toStringTag");return qr=function(n,o,i){n&&!i&&(n=n.prototype),n&&!t(n,r)&&e(n,r,{configurable:!0,value:o})}}function vn(){if(en)return Qr;en=1;var e=function(){if(Jr)return Zr;Jr=1;var e=be();return Zr=function(t){return e(t)||null===t}}(),t=String,r=TypeError;return Qr=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")}}function yn(){if(rn)return tn;rn=1;var e=function(){if(Xr)return Kr;Xr=1;var e=C(),t=Gt();return Kr=function(r,n,o){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[o]))}catch(e){}}}(),t=be(),r=k(),n=vn();return tn=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 r(e),n(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),tn}function bn(){if(on)return nn;on=1;var e=hn(),t=Ht(),r=se(),n=Cr(),o=ye(),i=function(){if(Yr)return Wr;Yr=1;var e=gn().IteratorPrototype,t=ar(),r=ur(),n=mn(),o=sr(),i=function(){return this};return Wr=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:r(+!l,u)}),n(a,c,!1,!0),o[c]=i,a}}(),a=pn(),s=yn(),u=mn(),l=lr(),c=Tr(),d=ve(),f=sr(),h=gn(),p=n.PROPER,g=n.CONFIGURABLE,m=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",w="values",E="entries",x=function(){return this};return nn=function(n,d,h,S,C,A,D){i(h,d,S);var T,k,N,O=function(e){if(e===C&&P)return P;if(!v&&e&&e in F)return F[e];switch(e){case b:case w:case E:return function(){return new h(this,e)}}return function(){return new h(this)}},B=d+" Iterator",M=!1,F=n.prototype,I=F[y]||F["@@iterator"]||C&&F[C],P=!v&&I||O(C),R="Array"===d&&F.entries||I;if(R&&(T=a(R.call(new n)))!==Object.prototype&&T.next&&(r||a(T)===m||(s?s(T,m):o(T[y])||c(T,y,x)),u(T,B,!0,!0),r&&(f[B]=x)),p&&C===w&&I&&I.name!==w&&(!r&&g?l(F,"name",w):(M=!0,P=function(){return t(I,this)})),C)if(k={values:O(w),keys:A?P:O(b),entries:O(E)},D)for(N in k)(v||M||!(N in F))&&c(F,N,k[N]);else e({target:d,proto:!0,forced:v||M},k);return r&&!D||F[y]===P||c(F,y,P,{name:C}),f[d]=P,k}}function wn(){return sn?an:(sn=1,an=function(e,t){return{value:e,done:t}})}function En(){if(ln)return un;ln=1;var e=N(),t=function(){if(Tt)return Dt;Tt=1;var e=ve(),t=ar(),r=Xt().f,n=e("unscopables"),o=Array.prototype;return void 0===o[n]&&r(o,n,{configurable:!0,value:t(null)}),Dt=function(e){o[n][e]=!0}}(),r=sr(),n=cr(),o=Xt().f,i=bn(),a=wn(),s=se(),u=De(),l="Array Iterator",c=n.set,d=n.getterFor(l);un=i(Array,"Array",function(t,r){c(this,{type:l,target:e(t),index:0,kind:r})},function(){var e=d(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(r,!1);case"values":return a(t[r],!1)}return a([r,t[r]],!1)},"values");var f=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return un}En();var xn,Sn,Cn,An,Dn,Tn,kn,Nn={};function On(){if(Sn)return xn;Sn=1;var e={};return e[ve()("toStringTag")]="z",xn="[object z]"===String(e)}function Bn(){if(An)return Cn;An=1;var e=On(),t=ye(),r=A(),n=ve()("toStringTag"),o=Object,i="Arguments"===r(function(){return arguments}());return Cn=e?r: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),n))?s:i?r(a):"Object"===(u=r(a))&&t(a.callee)?"Arguments":u},Cn}!function(){if(kn)return Nn;kn=1;var e=On(),t=Tr(),r=function(){if(Tn)return Dn;Tn=1;var e=On(),t=Bn();return Dn=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",r,{unsafe:!0})}();var Mn,Fn,In,Pn,Rn,Ln,_n,zn,jn,Hn,$n,Vn,Un,qn={};function Gn(){if(Fn)return Mn;Fn=1;var e=Bn(),t=String;return Mn=function(r){if("Symbol"===e(r))throw new TypeError("Cannot convert a Symbol value to a string");return t(r)}}function Wn(){if(Pn)return In;Pn=1;var e=we();return In=function(){var t=e(this),r="";return t.hasIndices&&(r+="d"),t.global&&(r+="g"),t.ignoreCase&&(r+="i"),t.multiline&&(r+="m"),t.dotAll&&(r+="s"),t.unicode&&(r+="u"),t.unicodeSets&&(r+="v"),t.sticky&&(r+="y"),r}}function Yn(){if(Vn)return $n;Vn=1;var e,t,r=Ht(),n=C(),o=Gn(),i=Wn(),a=function(){if(Ln)return Rn;Ln=1;var e=x(),t=O().RegExp,r=e(function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),n=r||e(function(){return!t("a","y").sticky}),o=r||e(function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")});return Rn={BROKEN_CARET:o,MISSED_STICKY:n,UNSUPPORTED_Y:r}}(),s=ce(),u=ar(),l=cr().get,c=function(){if(zn)return _n;zn=1;var e=x(),t=O().RegExp;return _n=e(function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})}(),d=function(){if(Hn)return jn;Hn=1;var e=x(),t=O().RegExp;return jn=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),h=RegExp.prototype.exec,p=h,g=n("".charAt),m=n("".indexOf),v=n("".replace),y=n("".slice),b=(t=/b*/g,r(h,e=/a/,"a"),r(h,t,"a"),0!==e.lastIndex||0!==t.lastIndex),w=a.BROKEN_CARET,E=void 0!==/()??/.exec("")[1];return(b||E||w||c||d)&&(p=function(e){var t,n,a,s,c,d,x,S=this,C=l(S),A=o(e),D=C.raw;if(D)return D.lastIndex=S.lastIndex,t=r(p,D,A),S.lastIndex=D.lastIndex,t;var T=C.groups,k=w&&S.sticky,N=r(i,S),O=S.source,B=0,M=A;if(k&&(N=v(N,"y",""),-1===m(N,"g")&&(N+="g"),M=y(A,S.lastIndex),S.lastIndex>0&&(!S.multiline||S.multiline&&"\n"!==g(A,S.lastIndex-1))&&(O="(?: "+O+")",M=" "+M,B++),n=new RegExp("^(?:"+O+")",N)),E&&(n=new RegExp("^"+O+"$(?!\\s)",N)),b&&(a=S.lastIndex),s=r(h,k?n:S,M),k?s?(s.input=y(s.input,B),s[0]=y(s[0],B),s.index=S.lastIndex,S.lastIndex+=s[0].length):S.lastIndex=0:b&&s&&(S.lastIndex=S.global?s.index+s[0].length:a),E&&s&&s.length>1&&r(f,s[0],n,function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)}),s&&T)for(s.groups=d=u(null),c=0;c<T.length;c++)d[(x=T[c])[0]]=s[x[1]];return s}),$n=p}function Kn(){if(Un)return qn;Un=1;var e=hn(),t=Yn();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),qn}Kn();var Xn,Zn,Jn,Qn={};function eo(){if(Zn)return Xn;Zn=1;var e=C(),t=Zt(),r=Gn(),n=k(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=r(n(s)),f=t(u),h=d.length;return f<0||f>=h?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===h||(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 Xn={codeAt:s(!1),charAt:s(!0)}}!function(){if(Jn)return Qn;Jn=1;var e=eo().charAt,t=Gn(),r=cr(),n=bn(),o=wn(),i="String Iterator",a=r.set,s=r.getterFor(i);n(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,r=s(this),n=r.string,i=r.index;return i>=n.length?o(void 0,!0):(t=e(n,i),r.index+=t.length,o(t,!1))})}();var to,ro,no,oo,io,ao,so,uo,lo,co,fo,ho={};function po(){if(oo)return no;oo=1;var e=eo().charAt;return no=function(t,r,n){return r+(n?e(t,r).length:1)},no}function go(){if(uo)return so;uo=1;var e=Ht(),t=fe(),r=Vt(),n=function(){if(ao)return io;ao=1;var e=O(),t=x(),r=e.RegExp,n=!t(function(){var e=!0;try{r(".","d")}catch(t){e=!1}var t={},n="",o=e?"dgimsy":"gimsy",i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!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(r.prototype,"flags").get.call(t)!==o||n!==o});return io={correct:n}}(),o=Wn(),i=RegExp.prototype;return so=n.correct?function(e){return e.flags}:function(a){return n.correct||!r(i,a)||t(a,"flags")?a.flags:e(o,a)}}!function(){if(fo)return ho;fo=1;var e=Ht(),t=C(),r=function(){if(ro)return to;ro=1,Kn();var e=Ht(),t=Tr(),r=Yn(),n=x(),o=ve(),i=lr(),a=o("species"),s=RegExp.prototype;return to=function(u,l,c,d){var f=o(u),h=!n(function(){var e={};return e[f]=function(){return 7},7!==""[u](e)}),p=h&&!n(function(){var e=!1,t=/a/;if("split"===u){var r={};r[a]=function(){return t},(t={constructor:r,flags:""})[f]=/./[f]}return t.exec=function(){return e=!0,null},t[f](""),!e});if(!h||!p||c){var g=/./[f],m=l(f,""[u],function(t,n,o,i,a){var u=n.exec;return u===r||u===s.exec?h&&!a?{done:!0,value:e(g,n,o,i)}:{done:!0,value:e(t,o,n,i)}:{done:!1}});t(String.prototype,u,m[0]),t(s,f,m[1])}d&&i(s[f],"sham",!0)},to}(),n=we(),o=be(),i=Jt(),a=Gn(),s=k(),u=Wt(),l=po(),c=go(),d=function(){if(co)return lo;co=1;var e=Ht(),t=we(),r=ye(),n=A(),o=Yn(),i=TypeError;return lo=function(a,s){var u=a.exec;if(r(u)){var l=e(u,a,s);return null!==l&&t(l),l}if("RegExp"===n(a))return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")},lo}(),f=t("".indexOf);r("match",function(t,r,h){return[function(r){var n=s(this),i=o(r)?u(r,t):void 0;return i?e(i,r,n):new RegExp(r)[t](a(n))},function(e){var t=n(this),o=a(e),s=h(r,t,o);if(s.done)return s.value;var u=a(c(t));if(-1===f(u,"g"))return d(t,o);var p=-1!==f(u,"u");t.lastIndex=0;for(var g,m=[],v=0;null!==(g=d(t,o));){var y=a(g[0]);m[v]=y,""===y&&(t.lastIndex=l(o,i(t.lastIndex),p)),v++}return 0===v?null:m}]})}();var mo,vo,yo,bo,wo,Eo,xo,So,Co,Ao,Do,To,ko,No,Oo,Bo,Mo,Fo,Io,Po,Ro,Lo,_o,zo,jo,Ho,$o,Vo={},Uo={};function qo(){if(vo)return mo;vo=1;var e=be(),t=lr();return mo=function(r,n){e(n)&&"cause"in n&&t(r,"cause",n.cause)},mo}function Go(){if(So)return xo;So=1;var e=lr(),t=function(){if(bo)return yo;bo=1;var e=C(),t=Error,r=e("".replace),n=String(new t("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(n);return yo=function(e,n){if(i&&"string"==typeof e&&!t.prepareStackTrace)for(;n--;)e=r(e,o,"");return e}}(),r=function(){if(Eo)return wo;Eo=1;var e=x(),t=ur();return wo=!e(function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)})}(),n=Error.captureStackTrace;return xo=function(o,i,a,s){r&&(n?n(o,i):e(o,"stack",t(a,s)))},xo}function Wo(){if(To)return Do;To=1;var e=function(){if(Ao)return Co;Ao=1;var e=A(),t=C();return Co=function(r){if("Function"===e(r))return t(r)}}(),t=Gt(),r=S(),n=e(e.bind);return Do=function(e,o){return t(e),void 0===o?e:r?n(e,o):function(){return e.apply(o,arguments)}},Do}function Yo(){if(No)return ko;No=1;var e=ve(),t=sr(),r=e("iterator"),n=Array.prototype;return ko=function(e){return void 0!==e&&(t.Array===e||n[r]===e)}}function Ko(){if(Bo)return Oo;Bo=1;var e=Bn(),t=Wt(),r=T(),n=sr(),o=ve()("iterator");return Oo=function(i){if(!r(i))return t(i,o)||t(i,"@@iterator")||n[e(i)]}}function Xo(){if(Fo)return Mo;Fo=1;var e=Ht(),t=Gt(),r=we(),n=qt(),o=Ko(),i=TypeError;return Mo=function(a,s){var u=arguments.length<2?o(a):s;if(t(u))return r(e(u,a));throw new i(n(a)+" is not iterable")},Mo}function Zo(){if(Po)return Io;Po=1;var e=Ht(),t=we(),r=Wt();return Io=function(n,o,i){var a,s;t(n);try{if(!(a=r(n,"return"))){if("throw"===o)throw i;return i}a=e(a,n)}catch(e){s=!0,a=e}if("throw"===o)throw i;if(s)throw a;return t(a),i},Io}function Jo(){if(Lo)return Ro;Lo=1;var e=Wo(),t=Ht(),r=we(),n=qt(),o=Yo(),i=Qt(),a=Vt(),s=Xo(),u=Ko(),l=Zo(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return Ro=function(h,p,g){var m,v,y,b,w,E,x,S=g&&g.that,C=!(!g||!g.AS_ENTRIES),A=!(!g||!g.IS_RECORD),D=!(!g||!g.IS_ITERATOR),T=!(!g||!g.INTERRUPTED),k=e(p,S),N=function(e){return m&&l(m,"normal"),new d(!0,e)},O=function(e){return C?(r(e),T?k(e[0],e[1],N):k(e[0],e[1])):T?k(e,N):k(e)};if(A)m=h.iterator;else if(D)m=h;else{if(!(v=u(h)))throw new c(n(h)+" is not iterable");if(o(v)){for(y=0,b=i(h);b>y;y++)if((w=O(h[y]))&&a(f,w))return w;return new d(!1)}m=s(h,v)}for(E=A?h.next:m.next;!(x=t(E,m)).done;){try{w=O(x.value)}catch(e){l(m,"throw",e)}if("object"==typeof w&&w&&a(f,w))return w}return new d(!1)},Ro}function Qo(){if(zo)return _o;zo=1;var e=Gn();return _o=function(t,r){return void 0===t?arguments.length<2?"":r:e(t)},_o}function ei(){return Ho||(Ho=1,function(){if(jo)return Uo;jo=1;var e=hn(),t=Vt(),r=pn(),n=yn(),o=fn(),i=ar(),a=lr(),s=ur(),u=qo(),l=Go(),c=Jo(),d=Qo(),f=ve()("toStringTag"),h=Error,p=[].push,g=function(e,o){var s,v=t(m,this);n?s=n(new h,v?r(this):m):(s=v?this:i(m),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,p,{that:y}),a(s,"errors",y),s};n?n(g,h):o(g,h,{name:!0});var m=g.prototype=i(h.prototype,{constructor:s(1,g),message:s(1,""),name:s(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:g})}()),Vo}$o||($o=1,ei());var ti,ri,ni={};ri||(ri=1,function(){if(ti)return ni;ti=1;var e=hn(),t=O();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());var oi,ii,ai,si,ui,li,ci={};function di(){return ii?oi:(ii=1,oi={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 fi(){if(si)return ai;si=1;var e=zt()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return ai=t===Object.prototype?void 0:t}if(function(){if(ui)return ci;ui=1;var e=O(),t=di(),r=fi(),n=En(),o=lr(),i=mn(),a=ve()("iterator"),s=n.values,u=function(e,r){if(e){if(e[a]!==s)try{o(e,a,s)}catch(t){e[a]=s}if(i(e,r,!0),t[r])for(var u in n)if(e[u]!==n[u])try{o(e,u,n[u])}catch(t){e[u]=n[u]}}};for(var l in t)u(e[l]&&e[l].prototype,l);u(r,"DOMTokenList")}(),"undefined"==typeof global){if("ActiveXObject"in window){console.error("抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器\n Sorry, wangEditor V5+ versions do not support IE browser.")}hi(),pi()}else global&&(null===(li=global.navigator)||void 0===li?void 0:li.userAgent.match("QQBrowser"))&&(hi(),pi());function hi(){"undefined"==typeof globalThis&&(window.globalThis=window)}function pi(){"undefined"==typeof AggregateError&&(window.AggregateError=function(e,t){var r=new Error(t);return r.errors=e,r})}var gi,mi,vi,yi,bi,wi,Ei,xi,Si,Ci,Ai,Di,Ti,ki,Ni,Oi,Bi={};function Mi(){if(mi)return gi;mi=1;var e=function(e){return e&&e.Math===Math&&e};return gi=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof b&&b)||e("object"==typeof gi&&gi)||function(){return this}()||Function("return this")()}function Fi(){return yi?vi:(yi=1,vi=function(e){try{return!!e()}catch(e){return!0}})}function Ii(){return wi?bi:(wi=1,bi=!Fi()(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function Pi(){if(xi)return Ei;xi=1;var e=Ii(),t=Function.prototype,r=t.apply,n=t.call;return Ei="object"==typeof Reflect&&Reflect.apply||(e?n.bind(r):function(){return n.apply(r,arguments)}),Ei}function Ri(){if(Ci)return Si;Ci=1;var e=Ii(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Si=e?n:function(e){return function(){return r.apply(e,arguments)}},Si}function Li(){if(Di)return Ai;Di=1;var e=Ri(),t=e({}.toString),r=e("".slice);return Ai=function(e){return r(t(e),8,-1)}}function _i(){if(ki)return Ti;ki=1;var e=Li(),t=Ri();return Ti=function(r){if("Function"===e(r))return t(r)}}function zi(){if(Oi)return Ni;Oi=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,$i,Vi,Ui={};function qi(){return Hi?ji:(Hi=1,ji=!Fi()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Gi(){if(Vi)return $i;Vi=1;var e=Ii(),t=Function.prototype.call;return $i=e?t.bind(t):function(){return t.apply(t,arguments)},$i}var Wi,Yi,Ki,Xi,Zi,Ji,Qi,ea,ta,ra,na,oa,ia,aa,sa,ua,la,ca,da,fa,ha,pa,ga,ma,va,ya,ba,wa,Ea,xa,Sa,Ca,Aa,Da,Ta,ka,Na,Oa={};function Ba(){if(Wi)return Oa;Wi=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,r=t&&!e.call({1:2},1);return Oa.f=r?function(e){var r=t(this,e);return!!r&&r.enumerable}:e,Oa}function Ma(){return Ki?Yi:(Ki=1,Yi=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Fa(){if(Zi)return Xi;Zi=1;var e=Ri(),t=Fi(),r=Li(),n=Object,o=e("".split);return Xi=t(function(){return!n("z").propertyIsEnumerable(0)})?function(e){return"String"===r(e)?o(e,""):n(e)}:n}function Ia(){return Qi?Ji:(Qi=1,Ji=function(e){return null==e})}function Pa(){if(ta)return ea;ta=1;var e=Ia(),t=TypeError;return ea=function(r){if(e(r))throw new t("Can't call method on "+r);return r}}function Ra(){if(na)return ra;na=1;var e=Fa(),t=Pa();return ra=function(r){return e(t(r))}}function La(){if(ia)return oa;ia=1;var e=zi();return oa=function(t){return"object"==typeof t?null!==t:e(t)}}function _a(){return sa?aa:(sa=1,aa={})}function za(){if(la)return ua;la=1;var e=_a(),t=Mi(),r=zi(),n=function(e){return r(e)?e:void 0};return ua=function(r,o){return arguments.length<2?n(e[r])||n(t[r]):e[r]&&e[r][o]||t[r]&&t[r][o]},ua}function ja(){return da?ca:(da=1,ca=Ri()({}.isPrototypeOf))}function Ha(){if(ha)return fa;ha=1;var e=Mi().navigator,t=e&&e.userAgent;return fa=t?String(t):""}function $a(){if(ga)return pa;ga=1;var e,t,r=Mi(),n=Ha(),o=r.process,i=r.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&&n&&(!(e=n.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=n.match(/Chrome\/(\d+)/))&&(t=+e[1]),pa=t}function Va(){if(va)return ma;va=1;var e=$a(),t=Fi(),r=Mi().String;return ma=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),ma}function Ua(){return ba?ya:(ba=1,ya=Va()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function qa(){if(Ea)return wa;Ea=1;var e=za(),t=zi(),r=ja(),n=Object;return wa=Ua()?function(e){return"symbol"==typeof e}:function(o){var i=e("Symbol");return t(i)&&r(i.prototype,n(o))}}function Ga(){if(Sa)return xa;Sa=1;var e=String;return xa=function(t){try{return e(t)}catch(e){return"Object"}}}function Wa(){if(Aa)return Ca;Aa=1;var e=zi(),t=Ga(),r=TypeError;return Ca=function(n){if(e(n))return n;throw new r(t(n)+" is not a function")}}function Ya(){if(Ta)return Da;Ta=1;var e=Wa(),t=Ia();return Da=function(r,n){var o=r[n];return t(o)?void 0:e(o)},Da}function Ka(){if(Na)return ka;Na=1;var e=Gi(),t=zi(),r=La(),n=TypeError;return ka=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!r(s=e(a,o)))return s;if(t(a=o.valueOf)&&!r(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!r(s=e(a,o)))return s;throw new n("Can't convert object to primitive value")},ka}var Xa,Za,Ja,Qa,es,ts,rs,ns,os,is,as,ss,us,ls,cs,ds,fs,hs,ps,gs,ms,vs,ys,bs,ws,Es,xs,Ss,Cs={exports:{}};function As(){return Za?Xa:(Za=1,Xa=!0)}function Ds(){if(Qa)return Ja;Qa=1;var e=Mi(),t=Object.defineProperty;return Ja=function(r,n){try{t(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}}function Ts(){if(es)return Cs.exports;es=1;var e=As(),t=Mi(),r=Ds(),n="__core-js_shared__",o=Cs.exports=t[n]||r(n,{});return(o.versions||(o.versions=[])).push({version:"3.47.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Cs.exports}function ks(){if(rs)return ts;rs=1;var e=Ts();return ts=function(t,r){return e[t]||(e[t]=r||{})}}function Ns(){if(os)return ns;os=1;var e=Pa(),t=Object;return ns=function(r){return t(e(r))}}function Os(){if(as)return is;as=1;var e=Ri(),t=Ns(),r=e({}.hasOwnProperty);return is=Object.hasOwn||function(e,n){return r(t(e),n)}}function Bs(){if(us)return ss;us=1;var e=Ri(),t=0,r=Math.random(),n=e(1.1.toString);return ss=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++t+r,36)}}function Ms(){if(cs)return ls;cs=1;var e=Mi(),t=ks(),r=Os(),n=Bs(),o=Va(),i=Ua(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||n;return ls=function(e){return r(s,e)||(s[e]=o&&r(a,e)?a[e]:u("Symbol."+e)),s[e]}}function Fs(){if(fs)return ds;fs=1;var e=Gi(),t=La(),r=qa(),n=Ya(),o=Ka(),i=TypeError,a=Ms()("toPrimitive");return ds=function(s,u){if(!t(s)||r(s))return s;var l,c=n(s,a);if(c){if(void 0===u&&(u="default"),l=e(c,s,u),!t(l)||r(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 hs;ps=1;var e=Fs(),t=qa();return hs=function(r){var n=e(r,"string");return t(n)?n:n+""}}function Ps(){if(ms)return gs;ms=1;var e=Mi(),t=La(),r=e.document,n=t(r)&&t(r.createElement);return gs=function(e){return n?r.createElement(e):{}}}function Rs(){if(ys)return vs;ys=1;var e=qi(),t=Fi(),r=Ps();return vs=!e&&!t(function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a})}function Ls(){if(bs)return Ui;bs=1;var e=qi(),t=Gi(),r=Ba(),n=Ma(),o=Ra(),i=Is(),a=Os(),s=Rs(),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 n(!t(r.f,e,l),e[l])},Ui}function _s(){if(Es)return ws;Es=1;var e=Fi(),t=zi(),r=/#|\.prototype\./,n=function(r,n){var u=i[o(r)];return u===s||u!==a&&(t(n)?e(n):!!n)},o=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},i=n.data={},a=n.NATIVE="N",s=n.POLYFILL="P";return ws=n}function zs(){if(Ss)return xs;Ss=1;var e=_i(),t=Wa(),r=Ii(),n=e(e.bind);return xs=function(e,o){return t(e),void 0===o?e:r?n(e,o):function(){return e.apply(o,arguments)}},xs}var js,Hs,$s,Vs,Us,qs,Gs,Ws,Ys,Ks,Xs,Zs,Js,Qs,eu,tu,ru,nu,ou,iu,au,su,uu,lu,cu,du,fu,hu,pu,gu,mu,vu,yu,bu,wu,Eu,xu,Su,Cu={};function Au(){return Hs?js:(Hs=1,js=qi()&&Fi()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function Du(){if(Vs)return $s;Vs=1;var e=La(),t=String,r=TypeError;return $s=function(n){if(e(n))return n;throw new r(t(n)+" is not an object")}}function Tu(){if(Us)return Cu;Us=1;var e=qi(),t=Rs(),r=Au(),n=Du(),o=Is(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Cu.f=e?r?function(e,t,r){if(n(e),t=o(t),n(r),"function"==typeof e&&"prototype"===t&&"value"in r&&c in r&&!r[c]){var i=s(e,t);i&&i[c]&&(e[t]=r.value,r={configurable:l in r?r[l]:i[l],enumerable:u in r?r[u]:i[u],writable:!1})}return a(e,t,r)}:a:function(e,r,s){if(n(e),r=o(r),n(s),t)try{return a(e,r,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[r]=s.value),e},Cu}function ku(){if(Gs)return qs;Gs=1;var e=qi(),t=Tu(),r=Ma();return qs=e?function(e,n,o){return t.f(e,n,r(1,o))}:function(e,t,r){return e[t]=r,e}}function Nu(){if(Ys)return Ws;Ys=1;var e=Mi(),t=Pi(),r=_i(),n=zi(),o=Ls().f,i=_s(),a=_a(),s=zs(),u=ku(),l=Os(),c=function(e){var r=function(n,o,i){if(this instanceof r){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,o)}return new e(n,o,i)}return t(e,this,arguments)};return r.prototype=e.prototype,r};return Ws=function(t,d){var f,h,p,g,m,v,y,b,w,E=t.target,x=t.global,S=t.stat,C=t.proto,A=x?e:S?e[E]:e[E]&&e[E].prototype,D=x?a:a[E]||u(a,E,{})[E],T=D.prototype;for(g in d)h=!(f=i(x?g:E+(S?".":"#")+g,t.forced))&&A&&l(A,g),v=D[g],h&&(y=t.dontCallGetSet?(w=o(A,g))&&w.value:A[g]),m=h&&y?y:d[g],(f||C||typeof v!=typeof m)&&(b=t.bind&&h?s(m,e):t.wrap&&h?c(m):C&&n(m)?r(m):m,(t.sham||m&&m.sham||v&&v.sham)&&u(b,"sham",!0),u(D,g,b),C&&(l(a,p=E+"Prototype")||u(a,p,{}),u(a[p],g,m),t.real&&T&&(f||!T[g])&&u(T,g,m)))}}function Ou(){if(Xs)return Ks;Xs=1;var e=Li();return Ks=Array.isArray||function(t){return"Array"===e(t)}}function Bu(){if(Js)return Zs;Js=1;var e=Math.ceil,t=Math.floor;return Zs=Math.trunc||function(r){var n=+r;return(n>0?t:e)(n)},Zs}function Mu(){if(eu)return Qs;eu=1;var e=Bu();return Qs=function(t){var r=+t;return r!=r||0===r?0:e(r)}}function Fu(){if(ru)return tu;ru=1;var e=Mu(),t=Math.min;return tu=function(r){var n=e(r);return n>0?t(n,9007199254740991):0}}function Iu(){if(ou)return nu;ou=1;var e=Fu();return nu=function(t){return e(t.length)}}function Pu(){if(au)return iu;au=1;var e=TypeError;return iu=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}}function Ru(){if(uu)return su;uu=1;var e=qi(),t=Tu(),r=Ma();return su=function(n,o,i){e?t.f(n,o,r(0,i)):n[o]=i}}function Lu(){if(cu)return lu;cu=1;var e={};return e[Ms()("toStringTag")]="z",lu="[object z]"===String(e)}function _u(){if(fu)return du;fu=1;var e=Lu(),t=zi(),r=Li(),n=Ms()("toStringTag"),o=Object,i="Arguments"===r(function(){return arguments}());return du=e?r: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),n))?s:i?r(a):"Object"===(u=r(a))&&t(a.callee)?"Arguments":u},du}function zu(){if(pu)return hu;pu=1;var e=Ri(),t=zi(),r=Ts(),n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),hu=r.inspectSource}function ju(){if(mu)return gu;mu=1;var e=Ri(),t=Fi(),r=zi(),n=_u(),o=za(),i=zu(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!r(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=function(e){if(!r(e))return!1;switch(n(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return f.sham=!0,gu=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d}function Hu(){if(yu)return vu;yu=1;var e=Ou(),t=ju(),r=La(),n=Ms()("species"),o=Array;return vu=function(i){var a;return e(i)&&(a=i.constructor,(t(a)&&(a===o||e(a.prototype))||r(a)&&null===(a=a[n]))&&(a=void 0)),void 0===a?o:a},vu}function $u(){if(wu)return bu;wu=1;var e=Hu();return bu=function(t,r){return new(e(t))(0===r?0:r)}}function Vu(){if(xu)return Eu;xu=1;var e=Fi(),t=Ms(),r=$a(),n=t("species");return Eu=function(t){return r>=51||!e(function(){var e=[];return(e.constructor={})[n]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Eu}var Uu,qu,Gu={},Wu={};function Yu(){if(qu)return Uu;qu=1;var e=_u(),t=String;return Uu=function(r){if("Symbol"===e(r))throw new TypeError("Cannot convert a Symbol value to a string");return t(r)}}var Ku,Xu,Zu,Ju,Qu,el,tl,rl,nl,ol,il,al,sl,ul,ll,cl,dl,fl,hl,pl={};function gl(){if(Xu)return Ku;Xu=1;var e=Mu(),t=Math.max,r=Math.min;return Ku=function(n,o){var i=e(n);return i<0?t(i+o,0):r(i,o)},Ku}function ml(){if(Ju)return Zu;Ju=1;var e=Ra(),t=gl(),r=Iu(),n=function(n){return function(o,i,a){var s=e(o),u=r(s);if(0===u)return!n&&-1;var l,c=t(a,u);if(n&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((n||c in s)&&s[c]===i)return n||c||0;return!n&&-1}};return Zu={includes:n(!0),indexOf:n(!1)}}function vl(){return el?Qu:(el=1,Qu={})}function yl(){if(rl)return tl;rl=1;var e=Ri(),t=Os(),r=Ra(),n=ml().indexOf,o=vl(),i=e([].push);return tl=function(e,a){var s,u=r(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++])&&(~n(c,s)||i(c,s));return c},tl}function bl(){return ol?nl:(ol=1,nl=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function wl(){if(al)return il;al=1;var e=yl(),t=bl();return il=Object.keys||function(r){return e(r,t)},il}function El(){if(sl)return pl;sl=1;var e=qi(),t=Au(),r=Tu(),n=Du(),o=Ra(),i=wl();return pl.f=e&&!t?Object.defineProperties:function(e,t){n(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)r.f(e,a=u[c++],s[a]);return e},pl}function xl(){return ll?ul:(ll=1,ul=za()("document","documentElement"))}function Sl(){if(dl)return cl;dl=1;var e=ks(),t=Bs(),r=e("keys");return cl=function(e){return r[e]||(r[e]=t(e))}}function Cl(){if(hl)return fl;hl=1;var e,t=Du(),r=El(),n=bl(),o=vl(),i=xl(),a=Ps(),s="prototype",u="script",l=Sl()("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},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,r,o;h="undefined"!=typeof document?document.domain&&e?f(e):(r=a("iframe"),o="java"+u+":",r.style.display="none",i.appendChild(r),r.src=String(o),(t=r.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):f(e);for(var l=n.length;l--;)delete h[s][n[l]];return h()};return o[l]=!0,fl=Object.create||function(e,n){var o;return null!==e?(c[s]=t(e),o=new c,c[s]=null,o[l]=e):o=h(),void 0===n?o:r.f(o,n)},fl}var Al,Dl={};function Tl(){if(Al)return Dl;Al=1;var e=yl(),t=bl().concat("length","prototype");return Dl.f=Object.getOwnPropertyNames||function(r){return e(r,t)},Dl}var kl,Nl,Ol,Bl={};function Ml(){return Nl?kl:(Nl=1,kl=Ri()([].slice))}function Fl(){if(Ol)return Bl;Ol=1;var e=Li(),t=Ra(),r=Tl().f,n=Ml(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Bl.f=function(i){return o&&"Window"===e(i)?function(e){try{return r(e)}catch(e){return n(o)}}(i):r(t(i))},Bl}var Il,Pl,Rl,Ll,_l,zl={};function jl(){return Il||(Il=1,zl.f=Object.getOwnPropertySymbols),zl}function Hl(){if(Rl)return Pl;Rl=1;var e=ku();return Pl=function(t,r,n,o){return o&&o.enumerable?t[r]=n:e(t,r,n),t}}function $l(){if(_l)return Ll;_l=1;var e=Tu();return Ll=function(t,r,n){return e.f(t,r,n)}}var Vl,Ul,ql,Gl,Wl,Yl,Kl,Xl,Zl,Jl,Ql,ec,tc,rc,nc,oc,ic={};function ac(){if(Vl)return ic;Vl=1;var e=Ms();return ic.f=e,ic}function sc(){if(ql)return Ul;ql=1;var e=_a(),t=Os(),r=ac(),n=Tu().f;return Ul=function(o){var i=e.Symbol||(e.Symbol={});t(i,o)||n(i,o,{value:r.f(o)})}}function uc(){if(Wl)return Gl;Wl=1;var e=Gi(),t=za(),r=Ms(),n=Hl();return Gl=function(){var o=t("Symbol"),i=o&&o.prototype,a=i&&i.valueOf,s=r("toPrimitive");i&&!i[s]&&n(i,s,function(t){return e(a,this)},{arity:1})}}function lc(){if(Kl)return Yl;Kl=1;var e=Lu(),t=_u();return Yl=e?{}.toString:function(){return"[object "+t(this)+"]"}}function cc(){if(Zl)return Xl;Zl=1;var e=Lu(),t=Tu().f,r=ku(),n=Os(),o=lc(),i=Ms()("toStringTag");return Xl=function(a,s,u,l){var c=u?a:a&&a.prototype;c&&(n(c,i)||t(c,i,{configurable:!0,value:s}),l&&!e&&r(c,"toString",o))}}function dc(){if(Ql)return Jl;Ql=1;var e=Mi(),t=zi(),r=e.WeakMap;return Jl=t(r)&&/native code/.test(String(r))}function fc(){if(tc)return ec;tc=1;var e,t,r,n=dc(),o=Mi(),i=La(),a=ku(),s=Os(),u=Ts(),l=Sl(),c=vl(),d="Object already initialized",f=o.TypeError,h=o.WeakMap;if(n||u.state){var p=u.state||(u.state=new h);p.get=p.get,p.has=p.has,p.set=p.set,e=function(e,t){if(p.has(e))throw new f(d);return t.facade=e,p.set(e,t),t},t=function(e){return p.get(e)||{}},r=function(e){return p.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]:{}},r=function(e){return s(e,g)}}return ec={set:e,get:t,has:r,enforce:function(n){return r(n)?t(n):e(n,{})},getterFor:function(e){return function(r){var n;if(!i(r)||(n=t(r)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}}function hc(){if(nc)return rc;nc=1;var e=zs(),t=Ri(),r=Fa(),n=Ns(),o=Iu(),i=$u(),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,h=5===t||d;return function(p,g,m,v){for(var y,b,w=n(p),E=r(w),x=o(E),S=e(g,m),C=0,A=v||i,D=s?A(p,x):u||f?A(p,0):void 0;x>C;C++)if((h||C in E)&&(b=S(y=E[C],C,w),t))if(s)D[C]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return C;case 2:a(D,y)}else switch(t){case 4:return!1;case 7:a(D,y)}return d?-1:l||c?c:D}};return rc={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,gc,mc,vc={};function yc(){return gc?pc:(gc=1,pc=Va()&&!!Symbol.for&&!!Symbol.keyFor)}var bc,wc={};var Ec,xc,Sc,Cc,Ac,Dc,Tc,kc={};function Nc(){if(xc)return Ec;xc=1;var e=La(),t=fc().get;return Ec=function(r){if(!e(r))return!1;var n=t(r);return!!n&&"RawJSON"===n.type},Ec}function Oc(){if(Cc)return Sc;Cc=1;var e=Ri(),t=Os(),r=SyntaxError,n=parseInt,o=String.fromCharCode,i=e("".charAt),a=e("".slice),s=e(/./.exec),u={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},l=/^[\da-f]{4}$/i,c=/^[\u0000-\u001F]$/;return Sc=function(e,d){for(var f=!0,h="";d<e.length;){var p=i(e,d);if("\\"===p){var g=a(e,d,d+2);if(t(u,g))h+=u[g],d+=2;else{if("\\u"!==g)throw new r('Unknown escape sequence: "'+g+'"');var m=a(e,d+=2,d+4);if(!s(l,m))throw new r("Bad Unicode escape at: "+d);h+=o(n(m,16)),d+=4}}else{if('"'===p){f=!1,d++;break}if(s(c,p))throw new r("Bad control character in string literal at: "+d);h+=p,d++}}if(f)throw new r("Unterminated string at: "+d);return{value:h,end:d}},Sc}function Bc(){return Dc?Ac:(Dc=1,Ac=!Fi()(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}))}var Mc,Fc,Ic={};function Pc(){return Fc||(Fc=1,function(){if(oc)return Wu;oc=1;var e=Nu(),t=Mi(),r=Gi(),n=Ri(),o=As(),i=qi(),a=Va(),s=Fi(),u=Os(),l=ja(),c=Du(),d=Ra(),f=Is(),h=Yu(),p=Ma(),g=Cl(),m=wl(),v=Tl(),y=Fl(),b=jl(),w=Ls(),E=Tu(),x=El(),S=Ba(),C=Hl(),A=$l(),D=ks(),T=Sl(),k=vl(),N=Bs(),O=Ms(),B=ac(),M=sc(),F=uc(),I=cc(),P=fc(),R=hc().forEach,L=T("hidden"),_="Symbol",z="prototype",j=P.set,H=P.getterFor(_),$=Object[z],V=t.Symbol,U=V&&V[z],q=t.RangeError,G=t.TypeError,W=t.QObject,Y=w.f,K=E.f,X=y.f,Z=S.f,J=n([].push),Q=D("symbols"),ee=D("op-symbols"),te=D("wks"),re=!W||!W[z]||!W[z].findChild,ne=function(e,t,r){var n=Y($,t);n&&delete $[t],K(e,t,r),n&&e!==$&&K($,t,n)},oe=i&&s(function(){return 7!==g(K({},"a",{get:function(){return K(this,"a",{value:7}).a}})).a})?ne:K,ie=function(e,t){var r=Q[e]=g(U);return j(r,{type:_,tag:e,description:t}),i||(r.description=t),r},ae=function(e,t,r){e===$&&ae(ee,t,r),c(e);var n=f(t);return c(r),u(Q,n)?(r.enumerable?(u(e,L)&&e[L][n]&&(e[L][n]=!1),r=g(r,{enumerable:p(0,!1)})):(u(e,L)||K(e,L,p(1,g(null))),e[L][n]=!0),oe(e,n,r)):K(e,n,r)},se=function(e,t){c(e);var n=d(t),o=m(n).concat(de(n));return R(o,function(t){i&&!r(ue,n,t)||ae(e,t,n[t])}),e},ue=function(e){var t=f(e),n=r(Z,this,t);return!(this===$&&u(Q,t)&&!u(ee,t))&&(!(n||!u(this,t)||!u(Q,t)||u(this,L)&&this[L][t])||n)},le=function(e,t){var r=d(e),n=f(t);if(r!==$||!u(Q,n)||u(ee,n)){var o=Y(r,n);return!o||!u(Q,n)||u(r,L)&&r[L][n]||(o.enumerable=!0),o}},ce=function(e){var t=X(d(e)),r=[];return R(t,function(e){u(Q,e)||u(k,e)||J(r,e)}),r},de=function(e){var t=e===$,r=X(t?ee:d(e)),n=[];return R(r,function(e){!u(Q,e)||t&&!u($,e)||J(n,Q[e])}),n};a||(V=function(){if(l(U,this))throw new G("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?h(arguments[0]):void 0,n=N(e),o=function(e){var i=void 0===this?t:this;i===$&&r(o,ee,e),u(i,L)&&u(i[L],n)&&(i[L][n]=!1);var a=p(1,e);try{oe(i,n,a)}catch(e){if(!(e instanceof q))throw e;ne(i,n,a)}};return i&&re&&oe($,n,{configurable:!0,set:o}),ie(n,e)},C(U=V[z],"toString",function(){return H(this).tag}),C(V,"withoutSetter",function(e){return ie(N(e),e)}),S.f=ue,E.f=ae,x.f=se,w.f=le,v.f=y.f=ce,b.f=de,B.f=function(e){return ie(O(e),e)},i&&(A(U,"description",{configurable:!0,get:function(){return H(this).description}}),o||C($,"propertyIsEnumerable",ue,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!a,sham:!a},{Symbol:V}),R(m(te),function(e){M(e)}),e({target:_,stat:!0,forced:!a},{useSetter:function(){re=!0},useSimple:function(){re=!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}),F(),I(V,_),k[L]=!0}(),function(){if(mc)return vc;mc=1;var e=Nu(),t=za(),r=Os(),n=Yu(),o=ks(),i=yc(),a=o("string-to-symbol-registry"),s=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{for:function(e){var o=n(e);if(r(a,o))return a[o];var i=t("Symbol")(o);return a[o]=i,s[i]=o,i}})}(),function(){if(bc)return wc;bc=1;var e=Nu(),t=Os(),r=qa(),n=Ga(),o=ks(),i=yc(),a=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{keyFor:function(e){if(!r(e))throw new TypeError(n(e)+" is not a symbol");if(t(a,e))return a[e]}})}(),function(){if(Tc)return kc;Tc=1;var e=Nu(),t=za(),r=Pi(),n=Gi(),o=Ri(),i=Fi(),a=Ou(),s=zi(),u=Nc(),l=qa(),c=Li(),d=Yu(),f=Ml(),h=Oc(),p=Bs(),g=Va(),m=Bc(),v=String,y=t("JSON","stringify"),b=o(/./.exec),w=o("".charAt),E=o("".charCodeAt),x=o("".replace),S=o("".slice),C=o([].push),A=o(1.1.toString),D=/[\uD800-\uDFFF]/g,T=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,N=p(),O=N.length,B=!g||i(function(){var e=t("Symbol")("stringify detection");return"[null]"!==y([e])||"{}"!==y({a:e})||"{}"!==y(Object(e))}),M=i(function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")}),F=B?function(e,t){var o=f(arguments),i=P(t);if(s(i)||void 0!==e&&!l(e))return o[1]=function(e,t){if(s(i)&&(t=n(i,this,v(e),t)),!l(t))return t},r(y,null,o)}:y,I=function(e,t,r){var n=w(r,t-1),o=w(r,t+1);return b(T,e)&&!b(k,o)||b(k,e)&&!b(T,n)?"\\u"+A(E(e,0),16):e},P=function(e){if(s(e))return e;if(a(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];"string"==typeof o?C(r,o):"number"!=typeof o&&"Number"!==c(o)&&"String"!==c(o)||C(r,d(o))}var i=r.length,u=!0;return function(e,t){if(u)return u=!1,t;if(a(this))return t;for(var n=0;n<i;n++)if(r[n]===e)return t}}};y&&e({target:"JSON",stat:!0,arity:3,forced:B||M||!m},{stringify:function(e,t,r){var o=P(t),i=[],a=F(e,function(e,t){var r=s(o)?n(o,this,v(e),t):t;return!m&&u(r)?N+(C(i,r.rawJSON)-1):r},r);if("string"!=typeof a)return a;if(M&&(a=x(a,D,I)),m)return a;for(var l="",c=a.length,d=0;d<c;d++){var f=w(a,d);if('"'===f){var p=h(a,++d).end-1,g=S(a,d,p);l+=S(g,0,O)===N?i[S(g,O)]:'"'+g+'"',d=p}else l+=f}return l}})}(),function(){if(Mc)return Ic;Mc=1;var e=Nu(),t=Va(),r=Fi(),n=jl(),o=Ns();e({target:"Object",stat:!0,forced:!t||r(function(){n.f(1)})},{getOwnPropertySymbols:function(e){var t=n.f;return t?t(o(e)):[]}})}()),Gu}var Rc,Lc={};function _c(){return Rc||(Rc=1,sc()("asyncDispose")),Lc}var zc;var jc,Hc={};function $c(){return jc||(jc=1,sc()("dispose")),Hc}var Vc;var Uc;var qc,Gc={};function Wc(){return qc||(qc=1,sc()("iterator")),Gc}var Yc;var Kc;var Xc;var Zc;var Jc;var Qc;var ed,td={};var rd,nd={};var od;var id,ad,sd,ud={};function ld(){return sd?ad:(sd=1,function(){if(Su)return Bi;Su=1;var e=Nu(),t=Fi(),r=Ou(),n=La(),o=Ns(),i=Iu(),a=Pu(),s=Ru(),u=$u(),l=Vu(),c=Ms(),d=$a(),f=c("isConcatSpreadable"),h=d>=51||!t(function(){var e=[];return e[f]=!1,e.concat()[0]!==e}),p=function(e){if(!n(e))return!1;var t=e[f];return void 0!==t?!!t:r(e)};e({target:"Array",proto:!0,arity:1,forced:!h||!l("concat")},{concat:function(e){var t,r,n,l,c,d=o(this),f=u(d,0),h=0;for(t=-1,n=arguments.length;t<n;t++)if(p(c=-1===t?d:arguments[t]))for(l=i(c),a(h+l),r=0;r<l;r++,h++)r in c&&s(f,h,c[r]);else a(h+1),s(f,h++,c);return f.length=h,f}})}(),Pc(),_c(),zc||(zc=1,sc()("asyncIterator")),$c(),Vc||(Vc=1,sc()("hasInstance")),Uc||(Uc=1,sc()("isConcatSpreadable")),Wc(),Yc||(Yc=1,sc()("match")),Kc||(Kc=1,sc()("matchAll")),Xc||(Xc=1,sc()("replace")),Zc||(Zc=1,sc()("search")),Jc||(Jc=1,sc()("species")),Qc||(Qc=1,sc()("split")),function(){if(ed)return td;ed=1;var e=sc(),t=uc();e("toPrimitive"),t()}(),function(){if(rd)return nd;rd=1;var e=za(),t=sc(),r=cc();t("toStringTag"),r(e("Symbol"),"Symbol")}(),od||(od=1,sc()("unscopables")),function(){if(id)return ud;id=1;var e=Mi();cc()(e.JSON,"JSON",!0)}(),ad=_a().Symbol)}var cd,dd,fd,hd,pd,gd,md,vd,yd,bd,wd,Ed,xd,Sd,Cd,Ad,Dd,Td,kd,Nd,Od,Bd,Md,Fd,Id,Pd,Rd,Ld,_d,zd,jd,Hd,$d,Vd={};function Ud(){return dd?cd:(dd=1,cd=function(){})}function qd(){return hd?fd:(hd=1,fd={})}function Gd(){if(gd)return pd;gd=1;var e=qi(),t=Os(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,o=t(r,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&n(r,"name").configurable);return pd={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Wd(){return vd||(vd=1,md=!Fi()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),md}function Yd(){if(bd)return yd;bd=1;var e=Os(),t=zi(),r=Ns(),n=Sl(),o=Wd(),i=n("IE_PROTO"),a=Object,s=a.prototype;return yd=o?a.getPrototypeOf:function(n){var o=r(n);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},yd}function Kd(){if(Ed)return wd;Ed=1;var e,t,r,n=Fi(),o=zi(),i=La(),a=Cl(),s=Yd(),u=Hl(),l=Ms(),c=As(),d=l("iterator"),f=!1;return[].keys&&("next"in(r=[].keys())?(t=s(s(r)))!==Object.prototype&&(e=t):f=!0),!i(e)||n(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),wd={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function Xd(){if(Sd)return xd;Sd=1;var e=Kd().IteratorPrototype,t=Cl(),r=Ma(),n=cc(),o=qd(),i=function(){return this};return xd=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:r(+!l,u)}),n(a,c,!1,!0),o[c]=i,a}}function Zd(){if(Ad)return Cd;Ad=1;var e=Ri(),t=Wa();return Cd=function(r,n,o){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[o]))}catch(e){}}}function Jd(){if(Td)return Dd;Td=1;var e=La();return Dd=function(t){return e(t)||null===t}}function Qd(){if(Nd)return kd;Nd=1;var e=Jd(),t=String,r=TypeError;return kd=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")}}function ef(){if(Bd)return Od;Bd=1;var e=Zd(),t=La(),r=Pa(),n=Qd();return Od=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 r(e),n(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),Od}function tf(){if(Fd)return Md;Fd=1;var e=Nu(),t=Gi(),r=As(),n=Gd(),o=zi(),i=Xd(),a=Yd(),s=ef(),u=cc(),l=ku(),c=Hl(),d=Ms(),f=qd(),h=Kd(),p=n.PROPER,g=n.CONFIGURABLE,m=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",w="values",E="entries",x=function(){return this};return Md=function(n,d,h,S,C,A,D){i(h,d,S);var T,k,N,O=function(e){if(e===C&&P)return P;if(!v&&e&&e in F)return F[e];switch(e){case b:case w:case E:return function(){return new h(this,e)}}return function(){return new h(this)}},B=d+" Iterator",M=!1,F=n.prototype,I=F[y]||F["@@iterator"]||C&&F[C],P=!v&&I||O(C),R="Array"===d&&F.entries||I;if(R&&(T=a(R.call(new n)))!==Object.prototype&&T.next&&(r||a(T)===m||(s?s(T,m):o(T[y])||c(T,y,x)),u(T,B,!0,!0),r&&(f[B]=x)),p&&C===w&&I&&I.name!==w&&(!r&&g?l(F,"name",w):(M=!0,P=function(){return t(I,this)})),C)if(k={values:O(w),keys:A?P:O(b),entries:O(E)},D)for(N in k)(v||M||!(N in F))&&c(F,N,k[N]);else e({target:d,proto:!0,forced:v||M},k);return r&&!D||F[y]===P||c(F,y,P,{name:C}),f[d]=P,k}}function rf(){return Pd?Id:(Pd=1,Id=function(e,t){return{value:e,done:t}})}function nf(){if(Ld)return Rd;Ld=1;var e=Ra(),t=Ud(),r=qd(),n=fc(),o=Tu().f,i=tf(),a=rf(),s=As(),u=qi(),l="Array Iterator",c=n.set,d=n.getterFor(l);Rd=i(Array,"Array",function(t,r){c(this,{type:l,target:e(t),index:0,kind:r})},function(){var e=d(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(r,!1);case"values":return a(t[r],!1)}return a([r,t[r]],!1)},"values");var f=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return Rd}function of(){return zd?_d:(zd=1,_d={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 af(){if(jd)return Vd;jd=1,nf();var e=of(),t=Mi(),r=cc(),n=qd();for(var o in e)r(t[o],o),n[o]=n.Array;return Vd}function sf(){if($d)return Hd;$d=1;var e=ld();return af(),Hd=e}var uf,lf={};var cf;var df;var ff,hf,pf;function gf(){if(pf)return hf;pf=1;var e=sf();return function(){if(uf)return lf;uf=1;var e=Ms(),t=Tu().f,r=e("metadata"),n=Function.prototype;void 0===n[r]&&t(n,r,{value:null})}(),cf||(cf=1,_c()),df||(df=1,$c()),ff||(ff=1,sc()("metadata")),hf=e}var mf,vf,yf;function bf(){if(vf)return mf;vf=1;var e=za(),t=Ri(),r=e("Symbol"),n=r.keyFor,o=t(r.prototype.valueOf);return mf=r.isRegisteredSymbol||function(e){try{return void 0!==n(o(e))}catch(e){return!1}}}var wf,Ef,xf;function Sf(){if(Ef)return wf;Ef=1;for(var e=ks(),t=za(),r=Ri(),n=qa(),o=Ms(),i=t("Symbol"),a=i.isWellKnownSymbol,s=t("Object","getOwnPropertyNames"),u=r(i.prototype.valueOf),l=e("wks"),c=0,d=s(i),f=d.length;c<f;c++)try{var h=d[c];n(i[h])&&o(h)}catch(e){}return wf=function(e){if(a&&a(e))return!0;try{for(var t=u(e),r=0,n=s(l),o=n.length;r<o;r++)if(l[n[r]]==t)return!0}catch(e){}return!1},wf}var Cf;var Af;var Df;var Tf;var kf;var Nf;var Of;var Bf,Mf,Ff,If,Pf;function Rf(){if(Ff)return Mf;Ff=1;var e=gf();return yf||(yf=1,Nu()({target:"Symbol",stat:!0},{isRegisteredSymbol:bf()})),xf||(xf=1,Nu()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Sf()})),Cf||(Cf=1,sc()("customMatcher")),Af||(Af=1,sc()("observable")),Df||(Df=1,Nu()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:bf()})),Tf||(Tf=1,Nu()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Sf()})),kf||(kf=1,sc()("matcher")),Nf||(Nf=1,sc()("metadataKey")),Of||(Of=1,sc()("patternMatch")),Bf||(Bf=1,sc()("replaceAll")),Mf=e}function Lf(){return Pf?If:(Pf=1,If=Rf())}var _f,zf,jf,Hf,$f,Vf,Uf,qf,Gf,Wf,Yf,Kf,Xf,Zf=w(Lf()),Jf={};function Qf(){if(zf)return _f;zf=1;var e=Ri(),t=Mu(),r=Yu(),n=Pa(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=r(n(s)),f=t(u),h=d.length;return f<0||f>=h?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===h||(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 _f={codeAt:s(!1),charAt:s(!0)}}function eh(){return $f?Hf:($f=1,nf(),function(){if(jf)return Jf;jf=1;var e=Qf().charAt,t=Yu(),r=fc(),n=tf(),o=rf(),i="String Iterator",a=r.set,s=r.getterFor(i);n(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,r=s(this),n=r.string,i=r.index;return i>=n.length?o(void 0,!0):(t=e(n,i),r.index+=t.length,o(t,!1))})}(),Wc(),Hf=ac().f("iterator"))}function th(){if(Uf)return Vf;Uf=1;var e=eh();return af(),Vf=e}function rh(){return Gf?qf:(Gf=1,qf=th())}function nh(){return Yf?Wf:(Yf=1,Wf=rh())}function oh(){return Xf?Kf:(Xf=1,Kf=nh())}var ih=w(oh());function ah(e){return ah="function"==typeof Zf&&"symbol"==typeof ih?function(e){return typeof e}:function(e){return e&&"function"==typeof Zf&&e.constructor===Zf&&e!==Zf.prototype?"symbol":typeof e},ah(e)}var sh,uh={};if(function(){if(sh)return uh;sh=1;var e=hn(),t=x(),r=N(),n=gr().f,o=De();e({target:"Object",stat:!0,forced:!o||t(function(){n(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return n(r(e),t)}})}(),"object"===("undefined"==typeof global?"undefined":ah(global))){var lh=Object.getOwnPropertyDescriptor(global,"window");global.window&&!lh.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[]})}var ch,dh={};function fh(){if(ch)return dh;ch=1;var e={transform:function(e,t){var r=e.current,n=e.affinity;if(null!=r){var o=y.transform(r,t,{affinity:n});e.current=o,null==o&&e.unref()}}},t={transform:function(e,t){var r=e.current,n=e.affinity;if(null!=r){var o=Me.transform(r,t,{affinity:n});e.current=o,null==o&&e.unref()}}},r={transform:function(e,t){var r=e.current,n=e.affinity;if(null!=r){var o=I.transform(r,t,{affinity:n});e.current=o,null==o&&e.unref()}}},n=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,s=new WeakMap,u=new WeakMap,l=new WeakMap;function c(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e,t){return e(t={exports:{}},t.exports),t.exports}var f=d(function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports});c(f);var h=d(function(e){e.exports=function(e){if(Array.isArray(e))return f(e)},e.exports.__esModule=!0,e.exports.default=e.exports});c(h);var p=d(function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports});c(p);var g=d(function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports});c(g);var m=d(function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports});c(m);var v=c(d(function(e){e.exports=function(e){return h(e)||p(e)||g(e)||m()},e.exports.__esModule=!0,e.exports.default=e.exports})),y={ancestors:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.reverse,n=void 0!==r&&r,o=y.levels(e,t);return o=n?o.slice(1):o.slice(0,-1)},common:function(e,t){for(var r=[],n=0;n<e.length&&n<t.length;n++){var o=e[n];if(o!==t[n])break;r.push(o)}return r},compare:function(e,t){for(var r=Math.min(e.length,t.length),n=0;n<r;n++){if(e[n]<t[n])return-1;if(e[n]>t[n])return 1}return 0},endsAfter:function(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return y.equals(n,o)&&i>a},endsAt:function(e,t){var r=e.length,n=e.slice(0,r),o=t.slice(0,r);return y.equals(n,o)},endsBefore:function(e,t){var r=e.length-1,n=e.slice(0,r),o=t.slice(0,r),i=e[r],a=t[r];return y.equals(n,o)&&i<a},equals:function(e,t){return e.length===t.length&&e.every(function(e,r){return e===t[r]})},hasPrevious:function(e){return e[e.length-1]>0},isAfter:function(e,t){return 1===y.compare(e,t)},isAncestor:function(e,t){return e.length<t.length&&0===y.compare(e,t)},isBefore:function(e,t){return-1===y.compare(e,t)},isChild:function(e,t){return e.length===t.length+1&&0===y.compare(e,t)},isCommon:function(e,t){return e.length<=t.length&&0===y.compare(e,t)},isDescendant:function(e,t){return e.length>t.length&&0===y.compare(e,t)},isParent:function(e,t){return e.length+1===t.length&&0===y.compare(e,t)},isPath:function(e){return Array.isArray(e)&&e.every(function(e){return"number"==typeof e})},isSibling:function(e,t){if(e.length!==t.length)return!1;var r=e.slice(0,-1),n=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&y.equals(r,n)},levels:function(e){for(var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,r=void 0!==t&&t,n=[],o=0;o<=e.length;o++)n.push(e.slice(0,o));return r&&n.reverse(),n},next:function(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:function(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:function(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:function(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:function(e,t){if(!y.isAncestor(t,e)&&!y.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:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var n=v(e),o=r.affinity,i=void 0===o?"forward":o;if(0===e.length)return n;switch(t.type){case"insert_node":var a=t.path;(y.equals(a,n)||y.endsBefore(a,n)||y.isAncestor(a,n))&&(n[a.length-1]+=1);break;case"remove_node":var s=t.path;if(y.equals(s,n)||y.isAncestor(s,n))return null;y.endsBefore(s,n)&&(n[s.length-1]-=1);break;case"merge_node":var u=t.path,l=t.position;y.equals(u,n)||y.endsBefore(u,n)?n[u.length-1]-=1:y.isAncestor(u,n)&&(n[u.length-1]-=1,n[u.length]+=l);break;case"split_node":var c=t.path,d=t.position;if(y.equals(c,n)){if("forward"===i)n[n.length-1]+=1;else if("backward"!==i)return null}else y.endsBefore(c,n)?n[c.length-1]+=1:y.isAncestor(c,n)&&e[c.length]>=d&&(n[c.length-1]+=1,n[c.length]-=d);break;case"move_node":var f=t.path,h=t.newPath;if(y.equals(f,h))return n;if(y.isAncestor(f,n)||y.equals(f,n)){var p=h.slice();return y.endsBefore(f,h)&&f.length<h.length&&(p[f.length-1]-=1),p.concat(n.slice(f.length))}y.isSibling(f,h)&&(y.isAncestor(h,n)||y.equals(h,n))?y.endsBefore(f,n)?n[f.length-1]-=1:n[f.length-1]+=1:y.endsBefore(h,n)||y.equals(h,n)||y.isAncestor(h,n)?(y.endsBefore(f,n)&&(n[f.length-1]-=1),n[h.length-1]+=1):y.endsBefore(f,n)&&(y.equals(h,n)&&(n[h.length-1]+=1),n[f.length-1]-=1)}return n}},b=d(function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}),w=c(b),E=d(function(e){var t=b.default;e.exports=function(e,r){if("object"!==t(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,r||"default");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports});c(E);var x=d(function(e){var t=b.default;e.exports=function(e){var r=E(e,"string");return"symbol"===t(r)?r:String(r)},e.exports.__esModule=!0,e.exports.default=e.exports});c(x);var S=c(d(function(e){e.exports=function(e,t,r){return(t=x(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports})),C=d(function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports});c(C);var A=d(function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],u=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports});c(A);var D=d(function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports});c(D);var T=d(function(e){e.exports=function(e,t){return C(e)||A(e,t)||g(e,t)||D()},e.exports.__esModule=!0,e.exports.default=e.exports}),k=c(T),N=d(function(e){e.exports=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o},e.exports.__esModule=!0,e.exports.default=e.exports});c(N);var O=d(function(e){e.exports=function(e,t){if(null==e)return{};var r,n,o=N(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o},e.exports.__esModule=!0,e.exports.default=e.exports}),B=c(O),M=["anchor","focus"];function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var I={edges:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,r=void 0!==t&&t,n=e.anchor,o=e.focus;return I.isBackward(e)===r?[n,o]:[o,n]},end:function(e){var t=I.edges(e),r=k(t,2)[1];return r},equals:function(e,t){return Me.equals(e.anchor,t.anchor)&&Me.equals(e.focus,t.focus)},surrounds:function(e,t){var r=I.intersection(e,t);return!!r&&I.equals(r,t)},includes:function(e,t){if(ke.isRange(t)){if(I.includes(e,t.anchor)||I.includes(e,t.focus))return!0;var r=I.edges(e),n=k(r,2),o=n[0],i=n[1],a=I.edges(t),s=k(a,2),u=s[0],l=s[1];return Me.isBefore(o,u)&&Me.isAfter(i,l)}var c=I.edges(e),d=k(c,2),f=d[0],h=d[1],p=!1,g=!1;return ke.isPoint(t)?(p=Me.compare(t,f)>=0,g=Me.compare(t,h)<=0):(p=y.compare(t,f.path)>=0,g=y.compare(t,h.path)<=0),p&&g},intersection:function(e,t){e.anchor,e.focus;var r=B(e,M),n=I.edges(e),o=k(n,2),i=o[0],a=o[1],s=I.edges(t),u=k(s,2),l=u[0],c=u[1],d=Me.isBefore(i,l)?l:i,f=Me.isBefore(a,c)?a:c;return Me.isBefore(f,d)?null:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?F(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({anchor:d,focus:f},r)},isBackward:function(e){var t=e.anchor,r=e.focus;return Me.isAfter(t,r)},isCollapsed:function(e){var t=e.anchor,r=e.focus;return Me.equals(t,r)},isExpanded:function(e){return!I.isCollapsed(e)},isForward:function(e){return!I.isBackward(e)},isRange:function(e){return W(e)&&Me.isPoint(e.anchor)&&Me.isPoint(e.focus)},points:function*(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start:function(e){var t=I.edges(e),r=k(t,1)[0];return r},transform:function(e,t){if(null===e)return null;var r,n,o=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,i=void 0===o?"inward":o;if("inward"===i){var a=I.isCollapsed(e);I.isForward(e)?(r="forward",n=a?r:"backward"):(r="backward",n=a?r:"forward")}else"outward"===i?I.isForward(e)?(r="backward",n="forward"):(r="forward",n="backward"):(r=i,n=i);var s=Me.transform(e.anchor,t,{affinity:r}),u=Me.transform(e.focus,t,{affinity:n});return s&&u?{anchor:s,focus:u}:null}},P=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;return!!W(e)&&("function"!=typeof e.apply&&(r?V.isNodeList(e.children):Array.isArray(e.children)))},R={isAncestor:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;return W(e)&&V.isNodeList(e.children,{deep:r})},isElement:P,isElementList:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;return Array.isArray(e)&&e.every(function(e){return R.isElement(e,{deep:r})})},isElementProps:function(e){return void 0!==e.children},isElementType:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return P(e)&&e[r]===t},matches:function(e,t){for(var r in t)if("children"!==r&&e[r]!==t[r])return!1;return!0}},L=["text"],_=["children"];function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function H(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return $(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return $(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var V={ancestor:function(e,t){var r=V.get(e,t);if(V.isText(r))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Ie.stringify(r)));return r},ancestors:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){var n,o=H(y.ancestors(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=[V.ancestor(e,i),i];yield a}}catch(e){o.e(e)}finally{o.f()}}()},child:function(e,t){if(V.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Ie.stringify(e)));var r=e.children[t];if(null==r)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Ie.stringify(e)));return r},children:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var n=r.reverse,o=void 0!==n&&n,i=V.ancestor(e,t),a=i.children,s=o?a.length-1:0;o?s>=0:s<a.length;){var u=V.child(i,s),l=t.concat(s);yield[u,l],s=o?s-1:s+1}}()},common:function(e,t,r){var n=y.common(t,r);return[V.get(e,n),n]},descendant:function(e,t){var r=V.get(e,t);if(V.isEditor(r))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Ie.stringify(r)));return r},descendants:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r,n=H(V.nodes(e,t));try{for(n.s();!(r=n.n()).done;){var o=k(r.value,2),i=o[0],a=o[1];0!==a.length&&(yield[i,a])}}catch(e){n.e(e)}finally{n.f()}}()},elements:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r,n=H(V.nodes(e,t));try{for(n.s();!(r=n.n()).done;){var o=k(r.value,2),i=o[0],a=o[1];V.isElement(i)&&(yield[i,a])}}catch(e){n.e(e)}finally{n.f()}}()},extractProps:function(e){return V.isText(e)?(e.text,B(e,L)):(e.children,B(e,_))},first:function(e,t){for(var r=t.slice(),n=V.get(e,r);n&&!V.isText(n)&&0!==n.children.length;)n=n.children[0],r.push(0);return[n,r]},fragment:function(e,t){var r,n={children:e.children},o=I.edges(t),i=k(o,2),a=i[0],s=i[1],u=V.nodes(n,{reverse:!0,pass:function(e){var r=k(e,2)[1];return!I.includes(t,r)}}),l=H(u);try{var c=function(){var e=k(r.value,2)[1];if(!I.includes(t,e)){var o=e[e.length-1];Ye(n,y.parent(e),function(e){return Ge(e,o,1)})}y.equals(e,s.path)&&Ke(n,e,function(e){var t=e.text.slice(0,s.offset);return j(j({},e),{},{text:t})}),y.equals(e,a.path)&&Ke(n,e,function(e){var t=e.text.slice(a.offset);return j(j({},e),{},{text:t})})};for(l.s();!(r=l.n()).done;)c()}catch(e){l.e(e)}finally{l.f()}return n.children},get:function(e,t){var r=V.getIf(e,t);if(void 0===r)throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Ie.stringify(e)));return r},getIf:function(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(V.isText(r)||!r.children[o])return;r=r.children[o]}return r},has:function(e,t){for(var r=e,n=0;n<t.length;n++){var o=t[n];if(V.isText(r)||!r.children[o])return!1;r=r.children[o]}return!0},isAncestor:function(e){return!V.isText(e)},isEditor:function(e){return"function"==typeof e.apply},isElement:function(e){return Array.isArray(e.children)&&"function"!=typeof e.apply},isNode:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;return He.isText(e)||R.isElement(e,{deep:r})||Te.isEditor(e,{deep:r})},isNodeList:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;return Array.isArray(e)&&e.every(function(e){return V.isNode(e,{deep:r})})},isText:function(e){return"string"==typeof e.text},last:function(e,t){for(var r=t.slice(),n=V.get(e,r);n&&!V.isText(n)&&0!==n.children.length;){var o=n.children.length-1;n=n.children[o],r.push(o)}return[n,r]},leaf:function(e,t){var r=V.get(e,t);if(!V.isText(r))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Ie.stringify(r)));return r},levels:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){var n,o=H(y.levels(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=V.get(e,i);yield[a,i]}}catch(e){o.e(e)}finally{o.f()}}()},matches:function(e,t){return V.isElement(e)&&R.isElementProps(t)&&R.matches(e,t)||V.isText(e)&&He.isTextProps(t)&&He.matches(e,t)},nodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var r=t.pass,n=t.reverse,o=void 0!==n&&n,i=t.from,a=void 0===i?[]:i,s=t.to,u=new Set,l=[],c=e;!s||!(o?y.isBefore(l,s):y.isAfter(l,s));)if(u.has(c)||(yield[c,l]),u.has(c)||V.isText(c)||0===c.children.length||null!=r&&!1!==r([c,l])){if(0===l.length)break;if(!o){var d=y.next(l);if(V.has(e,d)){l=d,c=V.get(e,l);continue}}if(o&&0!==l[l.length-1])l=y.previous(l),c=V.get(e,l);else l=y.parent(l),c=V.get(e,l),u.add(c)}else{u.add(c);var f=o?c.children.length-1:0;y.isAncestor(l,a)&&(f=a[l.length]),l=l.concat(f),c=V.get(e,l)}}()},parent:function(e,t){var r=y.parent(t),n=V.get(e,r);if(V.isText(n))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return n},string:function(e){return V.isText(e)?e.text:e.children.map(V.string).join("")},texts:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r,n=H(V.nodes(e,t));try{for(n.s();!(r=n.n()).done;){var o=k(r.value,2),i=o[0],a=o[1];V.isText(i)&&(yield[i,a])}}catch(e){n.e(e)}finally{n.f()}}()}};function U(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?U(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var G={isNodeOperation:function(e){return G.isOperation(e)&&e.type.endsWith("_node")},isOperation:function(e){if(!W(e))return!1;switch(e.type){case"insert_node":case"remove_node":return y.isPath(e.path)&&V.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&y.isPath(e.path);case"merge_node":return"number"==typeof e.position&&y.isPath(e.path)&&W(e.properties);case"move_node":return y.isPath(e.path)&&y.isPath(e.newPath);case"set_node":return y.isPath(e.path)&&W(e.properties)&&W(e.newProperties);case"set_selection":return null===e.properties&&I.isRange(e.newProperties)||null===e.newProperties&&I.isRange(e.properties)||W(e.properties)&&W(e.newProperties);case"split_node":return y.isPath(e.path)&&"number"==typeof e.position&&W(e.properties);default:return!1}},isOperationList:function(e){return Array.isArray(e)&&e.every(function(e){return G.isOperation(e)})},isSelectionOperation:function(e){return G.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation:function(e){return G.isOperation(e)&&e.type.endsWith("_text")},inverse:function(e){switch(e.type){case"insert_node":return q(q({},e),{},{type:"remove_node"});case"insert_text":return q(q({},e),{},{type:"remove_text"});case"merge_node":return q(q({},e),{},{type:"split_node",path:y.previous(e.path)});case"move_node":var t=e.newPath,r=e.path;if(y.equals(t,r))return e;if(y.isSibling(r,t))return q(q({},e),{},{path:t,newPath:r});var n=y.transform(r,e),o=y.transform(y.next(r),e);return q(q({},e),{},{path:n,newPath:o});case"remove_node":return q(q({},e),{},{type:"insert_node"});case"remove_text":return q(q({},e),{},{type:"insert_text"});case"set_node":var i=e.properties,a=e.newProperties;return q(q({},e),{},{properties:a,newProperties:i});case"set_selection":var s=e.properties,u=e.newProperties;return q(q({},e),{},null==s?{properties:u,newProperties:null}:null==u?{properties:null,newProperties:s}:{properties:u,newProperties:s});case"split_node":return q(q({},e),{},{type:"merge_node",path:y.next(e.path)})}}},W=function(e){return"object"===w(e)&&null!==e},Y=function e(t,r){for(var n in t){var o=t[n],i=r[n];if(Array.isArray(o)&&Array.isArray(i)){if(o.length!==i.length)return!1;for(var a=0;a<o.length;a++)if(o[a]!==i[a])return!1}else if(W(o)&&W(i)){if(!e(o,i))return!1}else if(o!==i)return!1}for(var s in r)if(void 0===t[s]&&void 0!==r[s])return!1;return!0},K=function(e){return e.selection?e.selection:e.children.length>0?Te.end(e,[]):[0]},X=function(e,t){var r=Te.node(e,t),n=k(r,1)[0];return function(e){return e===n}};function Z(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Q,ee=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!r,o=r?ae(e):e,i=Q.None,a=Q.None,s=0,u=null,l=Z(o);try{for(l.s();!(t=l.n()).done;){var c=t.value,d=c.codePointAt(0);if(!d)break;var f=ye(c,d),h=k(n?[a,f]:[f,i],2);if(i=h[0],a=h[1],be(i,Q.ZWJ)&&be(a,Q.ExtPict)&&!Se(n?e.substring(0,s):e.substring(0,e.length-s)))break;if(be(i,Q.RI)&&be(a,Q.RI)&&!(u=null!==u?!u:!!n||Ae(e.substring(0,e.length-s))))break;if(i!==Q.None&&a!==Q.None&&Ee(i,a))break;s+=c.length}}catch(e){l.e(e)}finally{l.f()}return s||1},te=/\s/,re=/[\u002B\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]/,ne=/['\u2018\u2019]/,oe=function(e,t,r){if(r){var n=e.length-t;return[e.slice(n,e.length),e.slice(0,n)]}return[e.slice(0,t),e.slice(t)]},ie=function e(t,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(te.test(t))return!1;if(ne.test(t)){var o=ee(r,n),i=oe(r,o,n),a=k(i,2);if(e(a[0],a[1],n))return!0}return!re.test(t)},ae=function*(e){for(var t=e.length-1,r=0;r<e.length;r++){var n=e.charAt(t-r);if(ue(n.charCodeAt(0))){var o=e.charAt(t-r-1);if(se(o.charCodeAt(0))){yield o+n,r++;continue}}yield n}},se=function(e){return e>=55296&&e<=56319},ue=function(e){return 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"}(Q||(Q={}));var le=/^(?:[\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\u0898-\u089F\u08CA-\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\u0C3C\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-\u0ECE\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\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\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-\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\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\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\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\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\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,ce=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,de=/^(?:[\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])$/,fe=/^[\u1100-\u115F\uA960-\uA97C]$/,he=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,pe=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,ge=/^[\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]$/,me=/^[\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]$/,ve=/^(?:[\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])$/,ye=function(e,t){var r=Q.Any;return-1!==e.search(le)&&(r|=Q.Extend),8205===t&&(r|=Q.ZWJ),t>=127462&&t<=127487&&(r|=Q.RI),-1!==e.search(ce)&&(r|=Q.Prepend),-1!==e.search(de)&&(r|=Q.SpacingMark),-1!==e.search(fe)&&(r|=Q.L),-1!==e.search(he)&&(r|=Q.V),-1!==e.search(pe)&&(r|=Q.T),-1!==e.search(ge)&&(r|=Q.LV),-1!==e.search(me)&&(r|=Q.LVT),-1!==e.search(ve)&&(r|=Q.ExtPict),r};function be(e,t){return 0!==(e&t)}var we=[[Q.L,Q.L|Q.V|Q.LV|Q.LVT],[Q.LV|Q.V,Q.V|Q.T],[Q.LVT|Q.T,Q.T],[Q.Any,Q.Extend|Q.ZWJ],[Q.Any,Q.SpacingMark],[Q.Prepend,Q.Any],[Q.ZWJ,Q.ExtPict],[Q.RI,Q.RI]];function Ee(e,t){return-1===we.findIndex(function(r){return be(e,r[0])&&be(t,r[1])})}var xe=/(?:[\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\u0898-\u089F\u08CA-\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\u0C3C\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-\u0ECE\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\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\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-\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\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\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\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\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\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,Se=function(e){return-1!==e.search(xe)},Ce=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,Ae=function(e){var t=e.match(Ce);return null!==t&&t[0].length/2%2==1},De=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).deep,r=void 0!==t&&t;if(!W(e))return!1;var n="function"==typeof e.above&&"function"==typeof e.addMark&&"function"==typeof e.after&&"function"==typeof e.apply&&"function"==typeof e.before&&"function"==typeof e.collapse&&"function"==typeof e.delete&&"function"==typeof e.deleteBackward&&"function"==typeof e.deleteForward&&"function"==typeof e.deleteFragment&&"function"==typeof e.deselect&&"function"==typeof e.edges&&"function"==typeof e.elementReadOnly&&"function"==typeof e.end&&"function"==typeof e.first&&"function"==typeof e.fragment&&"function"==typeof e.getDirtyPaths&&"function"==typeof e.getFragment&&"function"==typeof e.getMarks&&"function"==typeof e.hasBlocks&&"function"==typeof e.hasInlines&&"function"==typeof e.hasPath&&"function"==typeof e.hasTexts&&"function"==typeof e.insertBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertNodes&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertText&&"function"==typeof e.isBlock&&"function"==typeof e.isEdge&&"function"==typeof e.isElementReadOnly&&"function"==typeof e.isEmpty&&"function"==typeof e.isEnd&&"function"==typeof e.isInline&&"function"==typeof e.isNormalizing&&"function"==typeof e.isSelectable&&"function"==typeof e.isStart&&"function"==typeof e.isVoid&&"function"==typeof e.last&&"function"==typeof e.leaf&&"function"==typeof e.levels&&"function"==typeof e.liftNodes&&"function"==typeof e.markableVoid&&"function"==typeof e.mergeNodes&&"function"==typeof e.move&&"function"==typeof e.moveNodes&&"function"==typeof e.next&&"function"==typeof e.node&&"function"==typeof e.nodes&&"function"==typeof e.normalize&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.parent&&"function"==typeof e.path&&"function"==typeof e.pathRef&&"function"==typeof e.pathRefs&&"function"==typeof e.point&&"function"==typeof e.pointRef&&"function"==typeof e.pointRefs&&"function"==typeof e.positions&&"function"==typeof e.previous&&"function"==typeof e.range&&"function"==typeof e.rangeRef&&"function"==typeof e.rangeRefs&&"function"==typeof e.removeMark&&"function"==typeof e.removeNodes&&"function"==typeof e.select&&"function"==typeof e.setNodes&&"function"==typeof e.setNormalizing&&"function"==typeof e.setPoint&&"function"==typeof e.setSelection&&"function"==typeof e.shouldMergeNodesRemovePrevNode&&"function"==typeof e.shouldNormalize&&"function"==typeof e.splitNodes&&"function"==typeof e.start&&"function"==typeof e.string&&"function"==typeof e.unhangRange&&"function"==typeof e.unsetNodes&&"function"==typeof e.unwrapNodes&&"function"==typeof e.void&&"function"==typeof e.withoutNormalizing&&"function"==typeof e.wrapNodes&&(null===e.marks||W(e.marks))&&(null===e.selection||I.isRange(e.selection))&&(r?V.isNodeList(e.children)&&G.isOperationList(e.operations):Array.isArray(e.children)&&Array.isArray(e.operations));return n},Te={above:function(e,t){return e.above(t)},addMark:function(e,t,r){e.addMark(t,r)},after:function(e,t,r){return e.after(t,r)},before:function(e,t,r){return e.before(t,r)},deleteBackward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,r=void 0===t?"character":t;e.deleteBackward(r)},deleteForward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,r=void 0===t?"character":t;e.deleteForward(r)},deleteFragment:function(e,t){e.deleteFragment(t)},edges:function(e,t){return e.edges(t)},elementReadOnly:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.elementReadOnly(t)},end:function(e,t){return e.end(t)},first:function(e,t){return e.first(t)},fragment:function(e,t){return e.fragment(t)},hasBlocks:function(e,t){return e.hasBlocks(t)},hasInlines:function(e,t){return e.hasInlines(t)},hasPath:function(e,t){return e.hasPath(t)},hasTexts:function(e,t){return e.hasTexts(t)},insertBreak:function(e){e.insertBreak()},insertFragment:function(e,t,r){e.insertFragment(t,r)},insertNode:function(e,t){e.insertNode(t)},insertSoftBreak:function(e){e.insertSoftBreak()},insertText:function(e,t){e.insertText(t)},isBlock:function(e,t){return e.isBlock(t)},isEdge:function(e,t,r){return e.isEdge(t,r)},isEditor:De,isElementReadOnly:function(e,t){return e.isElementReadOnly(t)},isEmpty:function(e,t){return e.isEmpty(t)},isEnd:function(e,t,r){return e.isEnd(t,r)},isInline:function(e,t){return e.isInline(t)},isNormalizing:function(e){return e.isNormalizing()},isSelectable:function(e,t){return e.isSelectable(t)},isStart:function(e,t,r){return e.isStart(t,r)},isVoid:function(e,t){return e.isVoid(t)},last:function(e,t){return e.last(t)},leaf:function(e,t,r){return e.leaf(t,r)},levels:function(e,t){return e.levels(t)},marks:function(e){return e.getMarks()},next:function(e,t){return e.next(t)},node:function(e,t,r){return e.node(t,r)},nodes:function(e,t){return e.nodes(t)},normalize:function(e,t){e.normalize(t)},parent:function(e,t,r){return e.parent(t,r)},path:function(e,t,r){return e.path(t,r)},pathRef:function(e,t,r){return e.pathRef(t,r)},pathRefs:function(e){return e.pathRefs()},point:function(e,t,r){return e.point(t,r)},pointRef:function(e,t,r){return e.pointRef(t,r)},pointRefs:function(e){return e.pointRefs()},positions:function(e,t){return e.positions(t)},previous:function(e,t){return e.previous(t)},range:function(e,t,r){return e.range(t,r)},rangeRef:function(e,t,r){return e.rangeRef(t,r)},rangeRefs:function(e){return e.rangeRefs()},removeMark:function(e,t){e.removeMark(t)},setNormalizing:function(e,t){e.setNormalizing(t)},start:function(e,t){return e.start(t)},string:function(e,t,r){return e.string(t,r)},unhangRange:function(e,t,r){return e.unhangRange(t,r)},void:function(e,t){return e.void(t)},withoutNormalizing:function(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:function(e,t,r){return e.shouldMergeNodesRemovePrevNode(t,r)}},ke={isLocation:function(e){return y.isPath(e)||Me.isPoint(e)||I.isRange(e)},isPath:function(e){return Array.isArray(e)},isPoint:function(e){return"offset"in e},isRange:function(e){return"anchor"in e},isSpan:function(e){return Array.isArray(e)&&Array.isArray(e[0])}},Ne={isSpan:function(e){return Array.isArray(e)&&2===e.length&&e.every(y.isPath)}};function Oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oe(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Me={compare:function(e,t){var r=y.compare(e.path,t.path);return 0===r?e.offset<t.offset?-1:e.offset>t.offset?1:0:r},isAfter:function(e,t){return 1===Me.compare(e,t)},isBefore:function(e,t){return-1===Me.compare(e,t)},equals:function(e,t){return e.offset===t.offset&&y.equals(e.path,t.path)},isPoint:function(e){return W(e)&&"number"==typeof e.offset&&y.isPath(e.path)},transform:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var n=r.affinity,o=void 0===n?"forward":n,i=e.path,a=e.offset;switch(t.type){case"insert_node":case"move_node":i=y.transform(i,t,r);break;case"insert_text":y.equals(t.path,i)&&(t.offset<a||t.offset===a&&"forward"===o)&&(a+=t.text.length);break;case"merge_node":y.equals(t.path,i)&&(a+=t.position),i=y.transform(i,t,r);break;case"remove_text":y.equals(t.path,i)&&t.offset<=a&&(a-=Math.min(a-t.offset,t.text.length));break;case"remove_node":if(y.equals(t.path,i)||y.isAncestor(t.path,i))return null;i=y.transform(i,t,r);break;case"split_node":if(y.equals(t.path,i)){if(t.position===a&&null==o)return null;(t.position<a||t.position===a&&"forward"===o)&&(a-=t.position,i=y.transform(i,t,Be(Be({},r),{},{affinity:"forward"})))}else i=y.transform(i,t,r);break;default:return e}return{path:i,offset:a}}},Fe=void 0,Ie={setScrubber:function(e){Fe=e},stringify:function(e){return JSON.stringify(e,Fe)}},Pe=["text"],Re=["anchor","focus","merge"];function Le(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return _e(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _e(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ze(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ze(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var He={equals:function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).loose,n=void 0!==r&&r;function o(e){return e.text,B(e,Pe)}return Y(n?o(e):e,n?o(t):t)},isText:function(e){return W(e)&&"string"==typeof e.text},isTextList:function(e){return Array.isArray(e)&&e.every(function(e){return He.isText(e)})},isTextProps:function(e){return void 0!==e.text},matches:function(e,t){for(var r in t)if("text"!==r&&(!e.hasOwnProperty(r)||e[r]!==t[r]))return!1;return!0},decorations:function(e,t){var r,n=[{leaf:je({},e)}],o=Le(t);try{for(o.s();!(r=o.n()).done;){var i,a=r.value,s=(a.anchor,a.focus,a.merge),u=B(a,Re),l=I.edges(a),c=k(l,2),d=c[0],f=c[1],h=[],p=0,g=d.offset,m=f.offset,v=null!=s?s:Object.assign,y=Le(n);try{for(y.s();!(i=y.n()).done;){var b=i.value.leaf,w=b.text.length,E=p;if(p+=w,g<=E&&p<=m)v(b,u),h.push({leaf:b});else if(g!==m&&(g===p||m===E)||g>p||m<E||m===E&&0!==E)h.push({leaf:b});else{var x=b,S=void 0,C=void 0;if(m<p){var A=m-E;C={leaf:je(je({},x),{},{text:x.text.slice(A)})},x=je(je({},x),{},{text:x.text.slice(0,A)})}if(g>E){var D=g-E;S={leaf:je(je({},x),{},{text:x.text.slice(0,D)})},x=je(je({},x),{},{text:x.text.slice(D)})}v(x,u),S&&h.push(S),h.push({leaf:x}),C&&h.push(C)}}}catch(e){y.e(e)}finally{y.f()}n=h}}catch(e){o.e(e)}finally{o.f()}if(n.length>1){var T,N=0,O=Le(n.entries());try{for(O.s();!(T=O.n()).done;){var M=k(T.value,2),F=M[0],P=M[1],R=N,L=R+P.leaf.text.length,_={start:R,end:L};0===F&&(_.isFirst=!0),F===n.length-1&&(_.isLast=!0),P.position=_,N=L}}catch(e){O.e(e)}finally{O.f()}}return n}};function $e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Ve(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$e(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$e(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Ue=function(e,t){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return[].concat(v(e.slice(0,t)),n,v(e.slice(t)))},qe=function(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];return[].concat(v(e.slice(0,t)),o,v(e.slice(t+r)))},Ge=qe,We=function(e,t,r){if(0===t.length)throw new Error("Cannot modify the editor");for(var n=V.get(e,t),o=t.slice(),i=r(n);o.length>1;){var a=o.pop(),s=V.get(e,o);i=Ve(Ve({},s),{},{children:qe(s.children,a,1,i)})}var u=o.pop();e.children=qe(e.children,u,1,i)},Ye=function(e,t,r){0===t.length?e.children=r(e.children):We(e,t,function(e){if(V.isText(e))throw new Error("Cannot get the element at path [".concat(t,"] because it refers to a leaf node: ").concat(Ie.stringify(e)));return Ve(Ve({},e),{},{children:r(e.children)})})},Ke=function(e,t,r){return We(e,t,function(e){if(!V.isText(e))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Ie.stringify(e)));return r(e)})};function Xe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ze(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ze(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Je(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var et={transform:function(e,t){var r=!1;switch(t.type){case"insert_node":var n=t.path,o=t.node;Ye(e,y.parent(n),function(e){var t=n[n.length-1];if(t>e.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(n,"] because the destination is past the end of the node."));return Ue(e,t,o)}),r=!0;break;case"insert_text":var i=t.path,a=t.offset,s=t.text;if(0===s.length)break;Ke(e,i,function(e){var t=e.text.slice(0,a),r=e.text.slice(a);return Qe(Qe({},e),{},{text:t+s+r})}),r=!0;break;case"merge_node":var u=t.path,l=u[u.length-1],c=y.previous(u),d=c[c.length-1];Ye(e,y.parent(u),function(e){var t,r=e[l],n=e[d];if(V.isText(r)&&V.isText(n))t=Qe(Qe({},n),{},{text:n.text+r.text});else{if(!V.isElement(r)||!V.isElement(n))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(u,"] to nodes of different interfaces: ").concat(Ie.stringify(r)," ").concat(Ie.stringify(n)));t=Qe(Qe({},n),{},{children:n.children.concat(r.children)})}return qe(e,d,2,t)}),r=!0;break;case"move_node":var f=t.path,h=t.newPath,p=f[f.length-1];if(y.isAncestor(f,h))throw new Error("Cannot move a path [".concat(f,"] to new path [").concat(h,"] because the destination is inside itself."));var g=V.get(e,f);Ye(e,y.parent(f),function(e){return Ge(e,p,1)});var m=y.transform(f,t),v=m[m.length-1];Ye(e,y.parent(m),function(e){return Ue(e,v,g)}),r=!0;break;case"remove_node":var b=t.path,w=b[b.length-1];if(Ye(e,y.parent(b),function(e){return Ge(e,w,1)}),e.selection){var E,x=Qe({},e.selection),S=Xe(I.points(x));try{for(S.s();!(E=S.n()).done;){var C=k(E.value,2),A=C[0],D=C[1],T=Me.transform(A,t);if(null!=x&&null!=T)x[D]=T;else{var N,O=void 0,B=void 0,M=Xe(V.texts(e));try{for(M.s();!(N=M.n()).done;){var F=k(N.value,2),P=F[0],R=F[1];if(-1!==y.compare(R,b)){B=[P,R];break}O=[P,R]}}catch(e){M.e(e)}finally{M.f()}var L=!1;O&&B&&(L=!y.isSibling(O[1],b)&&(!!y.equals(B[1],b)||y.common(O[1],b).length<y.common(B[1],b).length)),O&&!L?x[D]={path:O[1],offset:O[0].text.length}:B?x[D]={path:B[1],offset:0}:x=null}}}catch(e){S.e(e)}finally{S.f()}x&&I.equals(x,e.selection)||(e.selection=x)}break;case"remove_text":var _=t.path,z=t.offset,j=t.text;if(0===j.length)break;Ke(e,_,function(e){var t=e.text.slice(0,z),r=e.text.slice(z+j.length);return Qe(Qe({},e),{},{text:t+r})}),r=!0;break;case"set_node":var H=t.path,$=t.properties,U=t.newProperties;if(0===H.length)throw new Error("Cannot set properties on the root node!");We(e,H,function(e){var t=Qe({},e);for(var r in U){if("children"===r||"text"===r)throw new Error('Cannot set the "'.concat(r,'" property of nodes!'));var n=U[r];null==n?delete t[r]:t[r]=n}for(var o in $)U.hasOwnProperty(o)||delete t[o];return t});break;case"set_selection":var q=t.newProperties;if(null==q){e.selection=null;break}if(null==e.selection){if(!q.anchor||!q.focus)throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Ie.stringify(q)," when there is no current selection."));e.selection=Qe({},q);break}var G=Qe({},e.selection);for(var W in q){var Y=q[W];if(null==Y){if("anchor"===W||"focus"===W)throw new Error('Cannot remove the "'.concat(W,'" selection property'));delete G[W]}else G[W]=Y}e.selection=G;break;case"split_node":var K=t.path,X=t.position,Z=t.properties,J=K[K.length-1];if(0===K.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(K,"] because the root node cannot be split."));Ye(e,y.parent(K),function(e){var t,r,n=e[J];if(V.isText(n)){var o=n.text.slice(0,X),i=n.text.slice(X);t=Qe(Qe({},n),{},{text:o}),r=Qe(Qe({},Z),{},{text:i})}else{var a=n.children.slice(0,X),s=n.children.slice(X);t=Qe(Qe({},n),{},{children:a}),r=Qe(Qe({},Z),{},{children:s})}return qe(e,J,1,t,r)}),r=!0}if(r&&e.selection){var Q,ee=Qe({},e.selection),te=Xe(I.points(ee));try{for(te.s();!(Q=te.n()).done;){var re=k(Q.value,2),ne=re[0];ee[re[1]]=Me.transform(ne,t)}}catch(e){te.e(e)}finally{te.f()}I.equals(ee,e.selection)||(e.selection=ee)}}},tt={delete:function(e,t){e.delete(t)},insertFragment:function(e,t,r){e.insertFragment(t,r)},insertText:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Te.withoutNormalizing(e,function(){var n=r.voids,o=void 0!==n&&n,i=r.at,a=void 0===i?K(e):i;if(ke.isPath(a)&&(a=Te.range(e,a)),ke.isRange(a))if(I.isCollapsed(a))a=a.anchor;else{var s=I.end(a);if(!o&&Te.void(e,{at:s}))return;var u=I.start(a),l=Te.pointRef(e,u),c=Te.pointRef(e,s);ot.delete(e,{at:a,voids:o});var d=l.unref(),f=c.unref();a=d||f,ot.setSelection(e,{anchor:a,focus:a})}if(!(!o&&Te.void(e,{at:a})||Te.elementReadOnly(e,{at:a}))){var h=a,p=h.path,g=h.offset;t.length>0&&e.apply({type:"insert_text",path:p,offset:g,text:t})}})}};function rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function nt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var ot=nt(nt(nt(nt({},et),{insertNodes:function(e,t,r){e.insertNodes(t,r)},liftNodes:function(e,t){e.liftNodes(t)},mergeNodes:function(e,t){e.mergeNodes(t)},moveNodes:function(e,t){e.moveNodes(t)},removeNodes:function(e,t){e.removeNodes(t)},setNodes:function(e,t,r){e.setNodes(t,r)},splitNodes:function(e,t){e.splitNodes(t)},unsetNodes:function(e,t,r){e.unsetNodes(t,r)},unwrapNodes:function(e,t){e.unwrapNodes(t)},wrapNodes:function(e,t,r){e.wrapNodes(t,r)}}),{collapse:function(e,t){e.collapse(t)},deselect:function(e){e.deselect()},move:function(e,t){e.move(t)},select:function(e,t){e.select(t)},setPoint:function(e,t,r){e.setPoint(t,r)},setSelection:function(e,t){e.setSelection(t)}}),tt),it=new WeakMap;function at(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return st(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return st(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function ut(e,t,r){var i,a,s=n.get(e)||[],u=o.get(e)||new Set,l=function(e){if(e){var t=e.join(",");a.has(t)||(a.add(t),i.push(e))}};if(r){i=[],a=new Set;var c,d=at(s);try{for(d.s();!(c=d.n()).done;){l(r(c.value))}}catch(e){d.e(e)}finally{d.f()}}else i=s,a=u;var f,h=at(t);try{for(h.s();!(f=h.n()).done;){l(f.value)}}catch(e){h.e(e)}finally{h.f()}n.set(e,i),o.set(e,a)}function lt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ct(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ct(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var dt=function(n,o){var a,s=lt(Te.pathRefs(n));try{for(s.s();!(a=s.n()).done;){var u=a.value;e.transform(u,o)}}catch(e){s.e(e)}finally{s.f()}var l,c=lt(Te.pointRefs(n));try{for(c.s();!(l=c.n()).done;){var d=l.value;t.transform(d,o)}}catch(e){c.e(e)}finally{c.f()}var f,h=lt(Te.rangeRefs(n));try{for(h.s();!(f=h.n()).done;){var p=f.value;r.transform(p,o)}}catch(e){h.e(e)}finally{h.f()}if(!function(e){return it.get(e)||!1}(n)){var g=y.operationCanTransformPath(o)?function(e){return y.transform(e,o)}:void 0;ut(n,n.getDirtyPaths(o),g)}ot.transform(n,o),n.operations.push(o),Te.normalize(n,{operation:o}),"set_selection"===o.type&&(n.marks=null),i.get(n)||(i.set(n,!0),Promise.resolve().then(function(){i.set(n,!1),n.onChange({operation:o}),n.operations=[]}))};function ft(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return ht(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ht(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var pt=function(e,t){switch(t.type){case"insert_text":case"remove_text":case"set_node":var r=t.path;return y.levels(r);case"insert_node":var n=t.node,o=t.path,i=y.levels(o),a=V.isText(n)?[]:Array.from(V.nodes(n),function(e){var t=k(e,2)[1];return o.concat(t)});return[].concat(v(i),v(a));case"merge_node":var s=t.path,u=y.ancestors(s),l=y.previous(s);return[].concat(v(u),[l]);case"move_node":var c=t.path,d=t.newPath;if(y.equals(c,d))return[];var f,h=[],p=[],g=ft(y.ancestors(c));try{for(g.s();!(f=g.n()).done;){var m=f.value,b=y.transform(m,t);h.push(b)}}catch(e){g.e(e)}finally{g.f()}var w,E=ft(y.ancestors(d));try{for(E.s();!(w=E.n()).done;){var x=w.value,S=y.transform(x,t);p.push(S)}}catch(e){E.e(e)}finally{E.f()}var C=p[p.length-1],A=d[d.length-1],D=C.concat(A);return[].concat(h,p,[D]);case"remove_node":var T=t.path,N=y.ancestors(T);return v(N);case"split_node":var O=t.path,B=y.levels(O),M=y.next(O);return[].concat(v(B),[M]);default:return[]}},gt=function(e){var t=e.selection;return t?V.fragment(e,t):[]},mt=function(e,t,r){var n=k(t,2),o=n[0],i=n[1];if(!V.isText(o)){"children"in o||(o.children=[]);var a=o;if(a!==e&&0===a.children.length){ot.insertNodes(e,{text:""},{at:i.concat(0),voids:!0}),a=V.get(e,i)}if(!(a===e)&&(e.isInline(a)||V.isText(a.children[0])||e.isInline(a.children[0])))for(var s=0;s<a.children.length;s++){var u=a.children[s],l=a.children[s-1];if(V.isText(u))null!=l&&V.isText(l)&&(""===u.text?(ot.removeNodes(e,{at:i.concat(s),voids:!0}),a=V.get(e,i),s--):""===l.text?(ot.removeNodes(e,{at:i.concat(s-1),voids:!0}),a=V.get(e,i),s--):He.equals(u,l,{loose:!0})&&(ot.mergeNodes(e,{at:i.concat(s),voids:!0}),a=V.get(e,i),s--));else if(e.isInline(u)){if(null==l||!V.isText(l)){ot.insertNodes(e,{text:""},{at:i.concat(s),voids:!0}),a=V.get(e,i),s++}if(s===a.children.length-1){ot.insertNodes(e,{text:""},{at:i.concat(s+1),voids:!0}),a=V.get(e,i),s++}}else ot.unwrapNodes(e,{at:i.concat(s),voids:!0}),a=V.get(e,i),s--}else for(var c=0;c<a.children.length;c++){var d=a.children[c];(V.isText(d)||e.isInline(d))&&(null!=r&&r.fallbackElement?ot.wrapNodes(e,r.fallbackElement(),{at:i.concat(c),voids:!0}):ot.removeNodes(e,{at:i.concat(c),voids:!0}),a=V.get(e,i),c--)}}},vt=function(e,t){var r=t.iteration,n=42*t.initialDirtyPathsLength;if(r>n)throw new Error("Could not completely normalize the editor after ".concat(n," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0},yt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.voids,n=void 0!==r&&r,o=t.mode,i=void 0===o?"lowest":o,a=t.at,s=void 0===a?e.selection:a,u=t.match;if(s){var l=Te.path(e,s);if(!ke.isRange(s)||y.equals(s.focus.path,s.anchor.path)){if(0===l.length)return;l=y.parent(l)}var c="lowest"===i,d=Te.levels(e,{at:l,voids:n,match:u,reverse:c});return k(d,1)[0]}};function bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Et=function(e,t,r){var n=e.selection;if(n){var o=function(t,r){if(!V.isText(t))return!1;var n=Te.parent(e,r),o=k(n,2),i=o[0];return o[1],!e.isVoid(i)||e.markableVoid(i)},a=I.isExpanded(n),s=!1;if(!a){var u=Te.node(e,n),l=k(u,2),c=l[0],d=l[1];if(c&&o(c,d)){var f=Te.parent(e,d),h=k(f,1)[0];s=h&&e.markableVoid(h)}}if(a||s)ot.setNodes(e,S({},t,r),{match:o,split:!0,voids:!0});else{var p=wt(wt({},Te.marks(e)||{}),{},S({},t,r));e.marks=p,i.get(e)||e.onChange()}}};function xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function St(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Ct(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return At(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return At(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function At(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Dt=function(e,t){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:Te.point(e,t,{edge:"end"}),focus:Te.end(e,[])},a=o.distance,s=void 0===a?1:a,u=0,l=Ct(Te.positions(e,St(St({},o),{},{at:i})));try{for(l.s();!(n=l.n()).done;){var c=n.value;if(u>s)break;0!==u&&(r=c),u++}}catch(e){l.e(e)}finally{l.f()}return r};function Tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Tt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Nt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ot(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ot(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ot(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Bt=function(e,t){var r,n,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:Te.start(e,[]),focus:Te.point(e,t,{edge:"start"})},a=o.distance,s=void 0===a?1:a,u=0,l=Nt(Te.positions(e,kt(kt({},o),{},{at:i,reverse:!0})));try{for(l.s();!(n=l.n()).done;){var c=n.value;if(u>s)break;0!==u&&(r=c),u++}}catch(e){l.e(e)}finally{l.f()}return r},Mt=function(e,t){var r=e.selection;r&&I.isCollapsed(r)&&ot.delete(e,{unit:t,reverse:!0})},Ft=function(e,t){var r=e.selection;r&&I.isCollapsed(r)&&ot.delete(e,{unit:t})},It=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).direction,r=void 0===t?"forward":t,n=e.selection;n&&I.isExpanded(n)&&ot.delete(e,{reverse:"backward"===r})},Pt=function(e,t){return[Te.start(e,t),Te.end(e,t)]};function Rt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var _t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Te.above(e,Lt(Lt({},t),{},{match:function(t){return V.isElement(t)&&Te.isElementReadOnly(e,t)}}))},zt=function(e,t){return Te.point(e,t,{edge:"end"})},jt=function(e,t){var r=Te.path(e,t,{edge:"start"});return Te.node(e,r)},Ht=function(e,t){var r=Te.range(e,t);return V.fragment(e,r)};function $t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Vt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$t(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$t(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Ut=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Te.above(e,Vt(Vt({},t),{},{match:function(t){return V.isElement(t)&&Te.isVoid(e,t)}}))},qt=function(e,t){return t.children.some(function(t){return V.isElement(t)&&Te.isBlock(e,t)})},Gt=function(e,t){return t.children.some(function(t){return V.isText(t)||Te.isInline(e,t)})},Wt=function(e,t){return V.has(e,t)},Yt=function(e,t){return t.children.every(function(e){return V.isText(e)})},Kt=function(e){ot.splitNodes(e,{always:!0})},Xt=function(e,t,r){ot.insertNodes(e,t,r)},Zt=function(e){ot.splitNodes(e,{always:!0})};function Jt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var Qt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=e.selection,o=e.marks;if(n){if(o){var i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Jt(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jt(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({text:t},o);ot.insertNodes(e,i,{at:r.at,voids:r.voids})}else ot.insertText(e,t,r);e.marks=null}},er=function(e,t){return!e.isInline(t)},tr=function(e,t,r){return Te.isStart(e,t,r)||Te.isEnd(e,t,r)},rr=function(e,t){var r=t.children,n=k(r,1)[0];return 0===r.length||1===r.length&&V.isText(n)&&""===n.text&&!e.isVoid(t)},nr=function(e,t,r){var n=Te.end(e,r);return Me.equals(t,n)},or=function(e){var t=a.get(e);return void 0===t||t},ir=function(e,t,r){if(0!==t.offset)return!1;var n=Te.start(e,r);return Me.equals(t,n)},ar=function(e,t){var r=Te.path(e,t,{edge:"end"});return Te.node(e,r)},sr=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Te.path(e,t,r);return[V.leaf(e,n),n]};function ur(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return lr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function lr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r=t.at,n=void 0===r?e.selection:r,o=t.reverse,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.match;if(null==u&&(u=function(){return!0}),n){var l,c=[],d=Te.path(e,n),f=ur(V.levels(e,d));try{for(f.s();!(l=f.n()).done;){var h=k(l.value,2),p=h[0],g=h[1];if(u(p,g)&&(c.push([p,g]),!s&&V.isElement(p)&&Te.isVoid(e,p)))break}}catch(e){f.e(e)}finally{f.f()}i&&c.reverse(),yield*c}}()}var dr=["text"],fr=["text"],hr=function(e){var t=e.marks,r=e.selection;if(!r)return null;var n=r.anchor,o=r.focus;if(t)return t;if(I.isExpanded(r)){if(I.isBackward(r)){var i=[n,o];o=i[0],n=i[1]}if(Te.isEnd(e,n,n.path)){var a=Te.after(e,n);a&&(n=a)}var s=Te.nodes(e,{match:V.isText,at:{anchor:n,focus:o}}),u=k(s,1)[0];if(u){var l=k(u,1)[0];return l.text,B(l,dr)}return{}}var c=n.path,d=Te.leaf(e,c),f=k(d,1)[0];if(0===n.offset){var h=Te.previous(e,{at:c,match:V.isText}),p=Te.above(e,{match:function(t){return V.isElement(t)&&Te.isVoid(e,t)&&e.markableVoid(t)}});if(!p){var g=Te.above(e,{match:function(t){return V.isElement(t)&&Te.isBlock(e,t)}});if(h&&g){var m=k(h,2),v=m[0],b=m[1],w=k(g,2)[1];y.isAncestor(w,b)&&(f=v)}}}var E=f;return E.text,B(E,fr)},pr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.mode,n=void 0===r?"lowest":r,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=Te.after(e,u,{voids:i});if(l){var c=Te.last(e,[]),d=k(c,2)[1],f=[l.path,d];if(ke.isPath(u)&&0===u.length)throw new Error("Cannot get the next node from the root node!");if(null==a)if(ke.isPath(u)){var h=Te.parent(e,u),p=k(h,1)[0];a=function(e){return p.children.includes(e)}}else a=function(){return!0};var g=Te.nodes(e,{at:f,match:a,mode:n,voids:i}),m=k(g,1)[0];return m}}},gr=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Te.path(e,t,r),o=V.get(e,n);return[o,n]};function mr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return vr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return vr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function vr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function yr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r=t.at,n=void 0===r?e.selection:r,o=t.mode,i=void 0===o?"all":o,a=t.universal,s=void 0!==a&&a,u=t.reverse,l=void 0!==u&&u,c=t.voids,d=void 0!==c&&c,f=t.pass,h=t.match;if(h||(h=function(){return!0}),n){var p,g;if(ke.isSpan(n))p=n[0],g=n[1];else{var m=Te.path(e,n,{edge:"start"}),v=Te.path(e,n,{edge:"end"});p=l?v:m,g=l?m:v}var b,w,E=V.nodes(e,{reverse:l,from:p,to:g,pass:function(t){var r=k(t,2),n=r[0],o=r[1];return!(!f||!f([n,o]))||!!V.isElement(n)&&!(d||!Te.isVoid(e,n)&&!Te.isElementReadOnly(e,n))}}),x=[],S=mr(E);try{for(S.s();!(w=S.n()).done;){var C=k(w.value,2),A=C[0],D=C[1],T=b&&0===y.compare(D,b[1]);if("highest"!==i||!T)if(h(A,D))if("lowest"===i&&T)b=[A,D];else{var N="lowest"===i?b:[A,D];N&&(s?x.push(N):yield N),b=[A,D]}else if(s&&!T&&V.isText(A))return}}catch(e){S.e(e)}finally{S.f()}"lowest"===i&&b&&(s?x.push(b):yield b),s&&(yield*x)}}()}function br(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return wr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function wr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Er=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.force,i=void 0!==r&&r,a=t.operation,s=function(e){return n.get(e)||[]},u=function(e){var t=s(e).pop(),r=t.join(",");return function(e){return o.get(e)||new Set}(e).delete(r),t};if(Te.isNormalizing(e)){if(i){var l=Array.from(V.nodes(e),function(e){return k(e,2)[1]}),c=new Set(l.map(function(e){return e.join(",")}));n.set(e,l),o.set(e,c)}0!==s(e).length&&Te.withoutNormalizing(e,function(){var t,r=br(s(e));try{for(r.s();!(t=r.n()).done;){var n=t.value;if(V.has(e,n)){var o=Te.node(e,n),i=k(o,2),l=i[0];i[1];V.isElement(l)&&0===l.children.length&&e.normalizeNode(o,{operation:a})}}}catch(e){r.e(e)}finally{r.f()}for(var c=s(e),d=c.length,f=0;0!==c.length;){if(!e.shouldNormalize({dirtyPaths:c,iteration:f,initialDirtyPathsLength:d,operation:a}))return;var h=u(e);if(V.has(e,h)){var p=Te.node(e,h);e.normalizeNode(p,{operation:a})}f++,c=s(e)}})}},xr=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=Te.path(e,t,r),o=y.parent(n);return Te.node(e,o)},Sr=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,n={current:t,affinity:void 0===r?"forward":r,unref:function(){var t=n.current;return Te.pathRefs(e).delete(n),n.current=null,t}};return Te.pathRefs(e).add(n),n},Cr=function(e){var t=s.get(e);return t||(t=new Set,s.set(e,t)),t},Ar=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.depth,o=r.edge;if(ke.isPath(t))if("start"===o){var i=V.first(e,t);t=k(i,2)[1]}else if("end"===o){var a=V.last(e,t);t=k(a,2)[1]}return ke.isRange(t)&&(t="start"===o?I.start(t):"end"===o?I.end(t):y.common(t.anchor.path,t.focus.path)),ke.isPoint(t)&&(t=t.path),null!=n&&(t=t.slice(0,n)),t},Dr=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,n={current:t,affinity:void 0===r?"forward":r,unref:function(){var t=n.current;return Te.pointRefs(e).delete(n),n.current=null,t}};return Te.pointRefs(e).add(n),n},Tr=function(e){var t=u.get(e);return t||(t=new Set,u.set(e,t)),t},kr=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).edge,n=void 0===r?"start":r;if(ke.isPath(t)){var o;if("end"===n){var i=V.last(e,t);o=k(i,2)[1]}else{var a=V.first(e,t);o=k(a,2)[1]}var s=V.get(e,o);if(!V.isText(s))throw new Error("Cannot get the ".concat(n," point in the node at path [").concat(t,"] because it has no ").concat(n," text node."));return{path:o,offset:"end"===n?s.text.length:0}}if(ke.isRange(t)){var u=I.edges(t),l=k(u,2),c=l[0],d=l[1];return"start"===n?c:d}return t};function Nr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Or(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Or(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Or(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Br(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var r=t.at,n=void 0===r?e.selection:r,o=t.unit,i=void 0===o?"offset":o,a=t.reverse,s=void 0!==a&&a,u=t.voids,l=void 0!==u&&u;if(n){var c,d=Te.range(e,n),f=I.edges(d),h=k(f,2),p=h[0],g=h[1],m=s?g:p,v=!1,b="",w=0,E=0,x=0,S=[],C=Nr(Te.nodes(e,{at:n,reverse:s,voids:l}));try{var A=function*(){var t=k(c.value,2),r=t[0],n=t[1],o=S.some(function(e){return y.isAncestor(e,n)});function*a(e){o||(yield e)}if(V.isElement(r)){if(!e.isSelectable(r)){if(S.push(n),s)return y.hasPrevious(n)&&(yield*a(Te.end(e,y.previous(n)))),0;var u=y.next(n);return Te.hasPath(e,u)&&(yield*a(Te.start(e,u))),0}if(!l&&(e.isVoid(r)||e.isElementReadOnly(r)))return yield*a(Te.start(e,n)),0;if(e.isInline(r))return 0;if(Te.hasInlines(e,r)){var d=y.isAncestor(n,g.path)?g:Te.end(e,n),f=y.isAncestor(n,p.path)?p:Te.start(e,n);b=Te.string(e,{anchor:f,focus:d},{voids:l}),v=!0}}if(V.isText(r)){var h=y.equals(n,m.path);for(h?(E=s?m.offset:r.text.length-m.offset,x=m.offset):(E=r.text.length,x=s?E:0),(h||v||"offset"===i)&&(yield*a({path:n,offset:x}),v=!1);;){if(0===w){if(""===b)break;w=D(b,i,s),b=oe(b,w,s)[1]}if(x=s?x-w:x+w,(E-=w)<0){w=-E;break}w=0,yield*a({path:n,offset:x})}}};for(C.s();!(c=C.n()).done;)yield*A()}catch(e){C.e(e)}finally{C.f()}}function D(e,t,r){return"character"===t?ee(e,r):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=0,n=!1;e.length>0;){var o=ee(e,t),i=oe(e,o,t),a=k(i,2),s=a[0],u=a[1];if(ie(s,u,t))n=!0,r+=o;else{if(n)break;r+=o}e=u}return r}(e,r):"line"===t||"block"===t?e.length:1}}()}var Mr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.mode,n=void 0===r?"lowest":r,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=Te.before(e,u,{voids:i});if(l){var c=Te.first(e,[]),d=k(c,2)[1],f=[l.path,d];if(ke.isPath(u)&&0===u.length)throw new Error("Cannot get the previous node from the root node!");if(null==a)if(ke.isPath(u)){var h=Te.parent(e,u),p=k(h,1)[0];a=function(e){return p.children.includes(e)}}else a=function(){return!0};var g=Te.nodes(e,{reverse:!0,at:f,match:a,mode:n,voids:i}),m=k(g,1)[0];return m}}},Fr=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,n={current:t,affinity:void 0===r?"forward":r,unref:function(){var t=n.current;return Te.rangeRefs(e).delete(n),n.current=null,t}};return Te.rangeRefs(e).add(n),n},Ir=function(e){var t=l.get(e);return t||(t=new Set,l.set(e,t)),t},Pr=function(e,t,r){return ke.isRange(t)&&!r?t:{anchor:Te.start(e,t),focus:Te.end(e,r||t)}};function Rr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}var Lr=function(e,t){var r=e.selection;if(r){var n=function(t,r){if(!V.isText(t))return!1;var n=Te.parent(e,r),o=k(n,2),i=o[0];return o[1],!e.isVoid(i)||e.markableVoid(i)},o=I.isExpanded(r),a=!1;if(!o){var s=Te.node(e,r),u=k(s,2),l=u[0],c=u[1];if(l&&n(l,c)){var d=Te.parent(e,c),f=k(d,1)[0];a=f&&e.markableVoid(f)}}if(o||a)ot.unsetNodes(e,t,{match:n,split:!0,voids:!0});else{var h=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rr(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rr(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},Te.marks(e)||{});delete h[t],e.marks=h,i.get(e)||e.onChange()}}},_r=function(e,t){a.set(e,t)},zr=function(e,t){return Te.point(e,t,{edge:"start"})};function jr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Hr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Hr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var $r=function(e,t){var r,n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,o=void 0!==n&&n,i=Te.range(e,t),a=I.edges(i),s=k(a,2),u=s[0],l=s[1],c="",d=jr(Te.nodes(e,{at:i,match:V.isText,voids:o}));try{for(d.s();!(r=d.n()).done;){var f=k(r.value,2),h=f[0],p=f[1],g=h.text;y.equals(p,l.path)&&(g=g.slice(0,l.offset)),y.equals(p,u.path)&&(g=g.slice(u.offset)),c+=g}}catch(e){d.e(e)}finally{d.f()}return c};function Vr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Ur(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ur(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Ur(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var qr=function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,n=void 0!==r&&r,o=I.edges(t),i=k(o,2),a=i[0],s=i[1];if(0!==a.offset||0!==s.offset||I.isCollapsed(t)||y.hasPrevious(s.path))return t;var u,l=Te.above(e,{at:s,match:function(t){return V.isElement(t)&&Te.isBlock(e,t)},voids:n}),c=l?l[1]:[],d={anchor:Te.start(e,a),focus:s},f=!0,h=Vr(Te.nodes(e,{at:d,match:V.isText,reverse:!0,voids:n}));try{for(h.s();!(u=h.n()).done;){var p=k(u.value,2),g=p[0],m=p[1];if(f)f=!1;else if(""!==g.text||y.isBefore(m,c)){s={path:m,offset:g.text.length};break}}}catch(e){h.e(e)}finally{h.f()}return{anchor:a,focus:s}},Gr=function(e,t){var r=Te.isNormalizing(e);Te.setNormalizing(e,!1);try{t()}finally{Te.setNormalizing(e,r)}Te.normalize(e)},Wr=function(e,t,r){var n=k(t,2),o=n[0],i=n[1],a=k(r,2);return a[0],a[1],V.isElement(o)&&Te.isEmpty(e,o)||V.isText(o)&&""===o.text&&0!==i[i.length-1]};function Yr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Kr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Kr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Xr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r,n,o=t.reverse,i=void 0!==o&&o,a=t.unit,s=void 0===a?"character":a,u=t.distance,l=void 0===u?1:u,c=t.voids,d=void 0!==c&&c,f=t.at,h=void 0===f?e.selection:f,p=t.hanging,g=void 0!==p&&p;if(h){var m=!1;if(ke.isRange(h)&&I.isCollapsed(h)&&(m=!0,h=h.anchor),ke.isPoint(h)){var v=Te.void(e,{at:h,mode:"highest"});if(!d&&v){h=k(v,2)[1]}else{var b={unit:s,distance:l};h={anchor:h,focus:i?Te.before(e,h,b)||Te.start(e,[]):Te.after(e,h,b)||Te.end(e,[])},g=!0}}if(ke.isPath(h))ot.removeNodes(e,{at:h,voids:d});else if(!I.isCollapsed(h)){if(!g){var w=I.edges(h),E=k(w,2)[1],x=Te.end(e,[]);Me.equals(E,x)||(h=Te.unhangRange(e,h,{voids:d}))}var S=I.edges(h),C=k(S,2),A=C[0],D=C[1],T=Te.above(e,{match:function(t){return V.isElement(t)&&Te.isBlock(e,t)},at:A,voids:d}),N=Te.above(e,{match:function(t){return V.isElement(t)&&Te.isBlock(e,t)},at:D,voids:d}),O=T&&N&&!y.equals(T[1],N[1]),B=y.equals(A.path,D.path),M=d?null:null!==(r=Te.void(e,{at:A,mode:"highest"}))&&void 0!==r?r:Te.elementReadOnly(e,{at:A,mode:"highest"}),F=d?null:null!==(n=Te.void(e,{at:D,mode:"highest"}))&&void 0!==n?n:Te.elementReadOnly(e,{at:D,mode:"highest"});if(M){var P=Te.before(e,A);P&&T&&y.isAncestor(T[1],P.path)&&(A=P)}if(F){var R=Te.after(e,D);R&&N&&y.isAncestor(N[1],R.path)&&(D=R)}var L,_,z=[],j=Yr(Te.nodes(e,{at:h,voids:d}));try{for(j.s();!(_=j.n()).done;){var H=_.value,$=k(H,2),U=$[0],q=$[1];L&&0===y.compare(q,L)||(!d&&V.isElement(U)&&(Te.isVoid(e,U)||Te.isElementReadOnly(e,U))||!y.isCommon(q,A.path)&&!y.isCommon(q,D.path))&&(z.push(H),L=q)}}catch(e){j.e(e)}finally{j.f()}var G=Array.from(z,function(t){var r=k(t,2)[1];return Te.pathRef(e,r)}),W=Te.pointRef(e,A),Y=Te.pointRef(e,D),K="";if(!B&&!M){var X=W.current,Z=Te.leaf(e,X),J=k(Z,1)[0],Q=X.path,ee=A.offset,te=J.text.slice(ee);te.length>0&&(e.apply({type:"remove_text",path:Q,offset:ee,text:te}),K=te)}if(G.reverse().map(function(e){return e.unref()}).filter(function(e){return null!==e}).forEach(function(t){return ot.removeNodes(e,{at:t,voids:d})}),!F){var re=Y.current,ne=Te.leaf(e,re),oe=k(ne,1)[0],ie=re.path,ae=B?A.offset:0,se=oe.text.slice(ae,D.offset);se.length>0&&(e.apply({type:"remove_text",path:ie,offset:ae,text:se}),K=se)}!B&&O&&Y.current&&W.current&&ot.mergeNodes(e,{at:Y.current,hanging:!0,voids:d}),m&&i&&"character"===s&&K.length>1&&K.match(/[\u0980-\u09FF\u0E00-\u0E7F\u1000-\u109F\u0900-\u097F\u1780-\u17FF\u0D00-\u0D7F\u0B00-\u0B7F\u0A00-\u0A7F\u0B80-\u0BFF\u0C00-\u0C7F]+/)&&ot.insertText(e,K.slice(0,K.length-l));var ue=W.unref(),le=Y.unref(),ce=i?ue||le:le||ue;null==t.at&&ce&&ot.select(e,ce)}}})};function Zr(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Jr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Jr(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Jr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Qr=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Te.withoutNormalizing(e,function(){var n=r.hanging,o=void 0!==n&&n,i=r.voids,a=void 0!==i&&i,s=r.at,u=void 0===s?K(e):s,l=r.batchDirty,c=void 0===l||l;if(t.length){if(ke.isRange(u))if(o||(u=Te.unhangRange(e,u,{voids:a})),I.isCollapsed(u))u=u.anchor;else{var d=I.edges(u),f=k(d,2)[1];if(!a&&Te.void(e,{at:f}))return;var h=Te.pointRef(e,f);ot.delete(e,{at:u}),u=h.unref()}else ke.isPath(u)&&(u=Te.start(e,u));if(a||!Te.void(e,{at:u})){var p=Te.above(e,{at:u,match:function(t){return V.isElement(t)&&Te.isInline(e,t)},mode:"highest",voids:a});if(p){var g=k(p,2)[1];if(Te.isEnd(e,u,g))u=Te.after(e,g);else if(Te.isStart(e,u,g)){u=Te.before(e,g)}}var m,v=Te.above(e,{match:function(t){return V.isElement(t)&&Te.isBlock(e,t)},at:u,voids:a}),b=k(v,2)[1],w=Te.isStart(e,u,b),E=Te.isEnd(e,u,b),x=w&&E,S=V.first({children:t},[]),C=k(S,2)[1],A=V.last({children:t},[]),D=k(A,2)[1],T=function(t){var r=k(t,2),n=r[0],o=r[1];return!(0===o.length)&&(!!x||!(!w&&y.isAncestor(o,C)&&V.isElement(n)&&!e.isVoid(n)&&!e.isInline(n))&&!(!E&&y.isAncestor(o,D)&&V.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)))},N=!0,O=[],B=[],M=[],F=Zr(V.nodes({children:t},{pass:T}));try{for(F.s();!(m=F.n()).done;){var P=m.value,R=k(P,2),L=R[0],_=R[1];N&&V.isElement(L)&&!e.isInline(L)&&!y.isAncestor(_,C)&&(N=!1),T(P)&&(V.isElement(L)&&!e.isInline(L)?(N=!1,B.push(L)):N?O.push(L):M.push(L))}}catch(e){F.e(e)}finally{F.f()}var z=Te.nodes(e,{at:u,match:function(t){return V.isText(t)||Te.isInline(e,t)},mode:"highest",voids:a}),j=k(z,1)[0],H=k(j,2)[1],$=Te.isStart(e,u,H),U=Te.isEnd(e,u,H),q=Te.pathRef(e,E&&!M.length?y.next(b):b),G=Te.pathRef(e,U?y.next(H):H),W=M.length>0;ot.splitNodes(e,{at:u,match:function(t){return W?V.isElement(t)&&Te.isBlock(e,t):V.isText(t)||Te.isInline(e,t)},mode:W?"lowest":"highest",always:W&&(!w||O.length>0)&&(!E||M.length>0),voids:a});var Y,X=Te.pathRef(e,!$||$&&U?y.next(H):H);if(ot.insertNodes(e,O,{at:X.current,match:function(t){return V.isText(t)||Te.isInline(e,t)},mode:"highest",voids:a,batchDirty:c}),x&&!O.length&&B.length&&!M.length&&ot.delete(e,{at:b,voids:a}),ot.insertNodes(e,B,{at:q.current,match:function(t){return V.isElement(t)&&Te.isBlock(e,t)},mode:"lowest",voids:a,batchDirty:c}),ot.insertNodes(e,M,{at:G.current,match:function(t){return V.isText(t)||Te.isInline(e,t)},mode:"highest",voids:a,batchDirty:c}),!r.at)if(M.length>0&&G.current?Y=y.previous(G.current):B.length>0&&q.current?Y=y.previous(q.current):X.current&&(Y=y.previous(X.current)),Y){var Z=Te.end(e,Y);ot.select(e,Z)}X.unref(),q.unref(),G.unref()}}})},en=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).edge,r=void 0===t?"anchor":t,n=e.selection;if(n)if("anchor"===r)ot.select(e,n.anchor);else if("focus"===r)ot.select(e,n.focus);else if("start"===r){var o=I.edges(n),i=k(o,1)[0];ot.select(e,i)}else if("end"===r){var a=I.edges(n),s=k(a,2)[1];ot.select(e,s)}},tn=function(e){var t=e.selection;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},rn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.selection,n=t.distance,o=void 0===n?1:n,i=t.unit,a=void 0===i?"character":i,s=t.reverse,u=void 0!==s&&s,l=t.edge,c=void 0===l?null:l;if(r){"start"===c&&(c=I.isBackward(r)?"focus":"anchor"),"end"===c&&(c=I.isBackward(r)?"anchor":"focus");var d=r.anchor,f=r.focus,h={distance:o,unit:a},p={};if(null==c||"anchor"===c){var g=u?Te.before(e,d,h):Te.after(e,d,h);g&&(p.anchor=g)}if(null==c||"focus"===c){var m=u?Te.before(e,f,h):Te.after(e,f,h);m&&(p.focus=m)}ot.setSelection(e,p)}},nn=function(e,t){var r=e.selection;if(t=Te.range(e,t),r)ot.setSelection(e,t);else{if(!ke.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(Ie.stringify(t)));e.apply({type:"set_selection",properties:r,newProperties:t})}};function on(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function an(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?on(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):on(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var sn=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=e.selection,o=r.edge,i=void 0===o?"both":o;if(n){"start"===i&&(i=I.isBackward(n)?"focus":"anchor"),"end"===i&&(i=I.isBackward(n)?"anchor":"focus");var a=n.anchor,s=n.focus,u="anchor"===i?a:s;ot.setSelection(e,S({},"anchor"===i?"anchor":"focus",an(an({},u),t)))}},un=function(e,t){var r=e.selection,n={},o={};if(r){for(var i in t)("anchor"===i&&null!=t.anchor&&!Me.equals(t.anchor,r.anchor)||"focus"===i&&null!=t.focus&&!Me.equals(t.focus,r.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==r[i])&&(n[i]=r[i],o[i]=t[i]);Object.keys(n).length>0&&e.apply({type:"set_selection",properties:n,newProperties:o})}};function ln(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return cn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cn(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var dn=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Te.withoutNormalizing(e,function(){var n=r.hanging,o=void 0!==n&&n,i=r.voids,a=void 0!==i&&i,s=r.mode,u=void 0===s?"lowest":s,l=r.batchDirty,c=void 0===l||l,d=r.at,f=r.match,h=r.select;if(V.isNode(t)&&(t=[t]),0!==t.length){var p=k(t,1)[0];if(d||(d=K(e),!1!==h&&(h=!0)),null==h&&(h=!1),ke.isRange(d))if(o||(d=Te.unhangRange(e,d,{voids:a})),I.isCollapsed(d))d=d.anchor;else{var g=I.edges(d),m=k(g,2)[1],b=Te.pointRef(e,m);ot.delete(e,{at:d}),d=b.unref()}if(ke.isPoint(d)){null==f&&(f=V.isText(p)?function(e){return V.isText(e)}:e.isInline(p)?function(t){return V.isText(t)||Te.isInline(e,t)}:function(t){return V.isElement(t)&&Te.isBlock(e,t)});var w=Te.nodes(e,{at:d.path,match:f,mode:u,voids:a}),E=k(w,1)[0];if(!E)return;var x=k(E,2)[1],S=Te.pathRef(e,x),C=Te.isEnd(e,d,x);ot.splitNodes(e,{at:d,match:f,mode:u,voids:a});var A=S.unref();d=C?y.next(A):A}var D=y.parent(d),T=d[d.length-1];if(a||!Te.void(e,{at:D})){if(c){var N=[],O=y.levels(D);!function(e,t,r){var n=it.get(e)||!1;it.set(e,!0);try{t(),r()}finally{it.set(e,n)}}(e,function(){var r,n=ln(t);try{var o=function(){var t=r.value,n=D.concat(T);T++;var o={type:"insert_node",path:n,node:t};e.apply(o),d=y.next(d),N.push(o),V.isText(t)?O.push(n):O.push.apply(O,v(Array.from(V.nodes(t),function(e){var t=k(e,2)[1];return n.concat(t)})))};for(n.s();!(r=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}},function(){ut(e,O,function(e){for(var t=e,r=0,n=N;r<n.length;r++){var o=n[r];if(y.operationCanTransformPath(o)&&!(t=y.transform(t,o)))return null}return t})})}else{var B,M=ln(t);try{for(M.s();!(B=M.n()).done;){var F=B.value,P=D.concat(T);T++,e.apply({type:"insert_node",path:P,node:F}),d=y.next(d)}}catch(e){M.e(e)}finally{M.f()}}if(d=y.previous(d),h){var R=Te.end(e,d);R&&ot.select(e,R)}}}})},fn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r=t.at,n=void 0===r?e.selection:r,o=t.mode,i=void 0===o?"lowest":o,a=t.voids,s=void 0!==a&&a,u=t.match;if(n){null==u&&(u=ke.isPath(n)?X(e,n):function(t){return V.isElement(t)&&Te.isBlock(e,t)});for(var l=Te.nodes(e,{at:n,match:u,mode:i,voids:s}),c=Array.from(l,function(t){var r=k(t,2)[1];return Te.pathRef(e,r)}),d=0,f=c;d<f.length;d++){var h=f[d].unref();if(h.length<2)throw new Error("Cannot lift node at a path [".concat(h,"] because it has a depth of less than `2`."));var p=Te.node(e,y.parent(h)),g=k(p,2),m=g[0],v=g[1],b=h[h.length-1],w=m.children.length;if(1===w){var E=y.next(v);ot.moveNodes(e,{at:h,to:E,voids:s}),ot.removeNodes(e,{at:v,voids:s})}else if(0===b)ot.moveNodes(e,{at:h,to:v,voids:s});else if(b===w-1){var x=y.next(v);ot.moveNodes(e,{at:h,to:x,voids:s})}else{var S=y.next(h),C=y.next(v);ot.splitNodes(e,{at:S,voids:s}),ot.moveNodes(e,{at:h,to:C,voids:s})}}}})},hn=["text"],pn=["children"],gn=function e(t,r){return r!==t&&(V.isText(r)||Te.isVoid(t,r)||1===r.children.length&&e(t,r.children[0]))},mn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r=t.match,n=t.at,o=void 0===n?e.selection:n,i=t.hanging,a=void 0!==i&&i,s=t.voids,u=void 0!==s&&s,l=t.mode,c=void 0===l?"lowest":l;if(o){if(null==r)if(ke.isPath(o)){var d=Te.parent(e,o),f=k(d,1)[0];r=function(e){return f.children.includes(e)}}else r=function(t){return V.isElement(t)&&Te.isBlock(e,t)};if(!a&&ke.isRange(o)&&(o=Te.unhangRange(e,o,{voids:u})),ke.isRange(o))if(I.isCollapsed(o))o=o.anchor;else{var h=I.edges(o),p=k(h,2)[1],g=Te.pointRef(e,p);ot.delete(e,{at:o}),o=g.unref(),null==t.at&&ot.select(e,o)}var m=Te.nodes(e,{at:o,match:r,voids:u,mode:c}),v=k(m,1)[0],b=Te.previous(e,{at:o,match:r,voids:u,mode:c});if(v&&b){var w=k(v,2),E=w[0],x=w[1],S=k(b,2),C=S[0],A=S[1];if(0!==x.length&&0!==A.length){var D,T,N=y.next(A),O=y.common(x,A),M=y.isSibling(x,A),F=Array.from(Te.levels(e,{at:x}),function(e){return k(e,1)[0]}).slice(O.length).slice(0,-1),P=Te.above(e,{at:x,mode:"highest",match:function(t){return F.includes(t)&&gn(e,t)}}),R=P&&Te.pathRef(e,P[1]);if(V.isText(E)&&V.isText(C)){E.text;var L=B(E,hn);T=C.text.length,D=L}else{if(!V.isElement(E)||!V.isElement(C))throw new Error("Cannot merge the node at path [".concat(x,"] with the previous sibling because it is not the same kind: ").concat(Ie.stringify(E)," ").concat(Ie.stringify(C)));E.children;var _=B(E,pn);T=C.children.length,D=_}M||ot.moveNodes(e,{at:x,to:N,voids:u}),R&&ot.removeNodes(e,{at:R.current,voids:u}),Te.shouldMergeNodesRemovePrevNode(e,b,v)?ot.removeNodes(e,{at:A,voids:u}):e.apply({type:"merge_node",path:N,position:T,properties:D}),R&&R.unref()}}}})},vn=function(e,t){Te.withoutNormalizing(e,function(){var r=t.to,n=t.at,o=void 0===n?e.selection:n,i=t.mode,a=void 0===i?"lowest":i,s=t.voids,u=void 0!==s&&s,l=t.match;if(o){null==l&&(l=ke.isPath(o)?X(e,o):function(t){return V.isElement(t)&&Te.isBlock(e,t)});for(var c=Te.pathRef(e,r),d=Te.nodes(e,{at:o,match:l,mode:a,voids:u}),f=Array.from(d,function(t){var r=k(t,2)[1];return Te.pathRef(e,r)}),h=0,p=f;h<p.length;h++){var g=p[h].unref(),m=c.current;0!==g.length&&e.apply({type:"move_node",path:g,newPath:m}),c.current&&y.isSibling(m,g)&&y.isAfter(m,g)&&(c.current=y.next(c.current))}c.unref()}})},yn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r=t.hanging,n=void 0!==r&&r,o=t.voids,i=void 0!==o&&o,a=t.mode,s=void 0===a?"lowest":a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=ke.isPath(l)?X(e,l):function(t){return V.isElement(t)&&Te.isBlock(e,t)}),!n&&ke.isRange(l)&&(l=Te.unhangRange(e,l,{voids:i}));for(var d=Te.nodes(e,{at:l,match:c,mode:s,voids:i}),f=Array.from(d,function(t){var r=k(t,2)[1];return Te.pathRef(e,r)}),h=0,p=f;h<p.length;h++){var g=p[h].unref();if(g){var m=Te.node(e,g),v=k(m,1)[0];e.apply({type:"remove_node",path:g,node:v})}}}})};function bn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return wn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wn(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var En=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Te.withoutNormalizing(e,function(){var n=r.match,o=r.at,i=void 0===o?e.selection:o,a=r.compare,s=r.merge,u=r.hanging,l=void 0!==u&&u,c=r.mode,d=void 0===c?"lowest":c,f=r.split,h=void 0!==f&&f,p=r.voids,g=void 0!==p&&p;if(i){if(null==n&&(n=ke.isPath(i)?X(e,i):function(t){return V.isElement(t)&&Te.isBlock(e,t)}),!l&&ke.isRange(i)&&(i=Te.unhangRange(e,i,{voids:g})),h&&ke.isRange(i)){if(I.isCollapsed(i)&&Te.leaf(e,i.anchor)[0].text.length>0)return;var m=Te.rangeRef(e,i,{affinity:"inward"}),v=I.edges(i),y=k(v,2),b=y[0],w=y[1],E="lowest"===d?"lowest":"highest",x=Te.isEnd(e,w,w.path);ot.splitNodes(e,{at:w,match:n,mode:E,voids:g,always:!x});var S=Te.isStart(e,b,b.path);ot.splitNodes(e,{at:b,match:n,mode:E,voids:g,always:!S}),i=m.unref(),null==r.at&&ot.select(e,i)}a||(a=function(e,t){return e!==t});var C,A=bn(Te.nodes(e,{at:i,match:n,mode:d,voids:g}));try{for(A.s();!(C=A.n()).done;){var D=k(C.value,2),T=D[0],N=D[1],O={},B={};if(0!==N.length){var M=!1;for(var F in t)"children"!==F&&"text"!==F&&a(t[F],T[F])&&(M=!0,T.hasOwnProperty(F)&&(O[F]=T[F]),s?null!=t[F]&&(B[F]=s(T[F],t[F])):null!=t[F]&&(B[F]=t[F]));M&&e.apply({type:"set_node",path:N,properties:O,newProperties:B})}}}catch(e){A.e(e)}finally{A.f()}}})};function xn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Sn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Sn(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Cn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r=t.mode,n=void 0===r?"lowest":r,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s,l=t.height,c=void 0===l?0:l,d=t.always,f=void 0!==d&&d;if(u&&(null==a&&(a=function(t){return V.isElement(t)&&Te.isBlock(e,t)}),!ke.isRange(u)||(u=function(e,t){if(I.isCollapsed(t))return t.anchor;var r=I.edges(t),n=k(r,2)[1],o=Te.pointRef(e,n);return ot.delete(e,{at:t}),o.unref()}(e,u),u))){if(ke.isPath(u)){var h=u,p=Te.point(e,h),g=Te.parent(e,h),m=k(g,1)[0];a=function(e){return e===m},c=p.path.length-h.length+1,u=p,f=!0}var v,b=Te.pointRef(e,u,{affinity:"backward"});try{var w=Te.nodes(e,{at:u,match:a,mode:n,voids:i}),E=k(w,1)[0];if(!E)return;var x=Te.void(e,{at:u,mode:"highest"});if(!i&&x){var S=k(x,2),C=S[0],A=S[1];if(e.isInline(C)){var D=Te.after(e,A);if(!D){var T=y.next(A);ot.insertNodes(e,{text:""},{at:T,voids:i}),D=Te.point(e,T)}u=D,f=!0}c=u.path.length-A.length+1,f=!0}v=Te.pointRef(e,u);var N,O=u.path.length-c,B=k(E,2)[1],M=u.path.slice(0,O),F=0===c?u.offset:u.path[O]+0,P=xn(Te.levels(e,{at:M,reverse:!0,voids:i}));try{for(P.s();!(N=P.n()).done;){var R=k(N.value,2),L=R[0],_=R[1],z=!1;if(_.length<B.length||0===_.length||!i&&V.isElement(L)&&Te.isVoid(e,L))break;var j=b.current,H=Te.isEnd(e,j,_);if(f||!b||!Te.isEdge(e,j,_)){z=!0;var $=V.extractProps(L);e.apply({type:"split_node",path:_,position:F,properties:$})}F=_[_.length-1]+(z||H?1:0)}}catch(e){P.e(e)}finally{P.f()}if(null==t.at){var U=v.current||Te.end(e,[]);ot.select(e,U)}}finally{var q;b.unref(),null===(q=v)||void 0===q||q.unref()}}})};function An(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Dn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Dn(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Tn=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var n,o={},i=An(t);try{for(i.s();!(n=i.n()).done;){o[n.value]=null}}catch(e){i.e(e)}finally{i.f()}ot.setNodes(e,o,r)};function kn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return Nn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Nn(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var On=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Te.withoutNormalizing(e,function(){var r=t.mode,n=void 0===r?"lowest":r,o=t.split,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=ke.isPath(l)?X(e,l):function(t){return V.isElement(t)&&Te.isBlock(e,t)}),ke.isPath(l)&&(l=Te.range(e,l));var d,f=ke.isRange(l)?Te.rangeRef(e,l):null,h=Te.nodes(e,{at:l,match:c,mode:n,voids:s}),p=Array.from(h,function(t){var r=k(t,2)[1];return Te.pathRef(e,r)}).reverse(),g=kn(p);try{var m=function(){var t=d.value.unref(),r=Te.node(e,t),n=k(r,1)[0],o=Te.range(e,t);i&&f&&(o=I.intersection(f.current,o)),ot.liftNodes(e,{at:o,match:function(e){return!V.isText(n)&&n.children.includes(e)},voids:s})};for(g.s();!(d=g.n()).done;)m()}catch(e){g.e(e)}finally{g.f()}f&&f.unref()}})};function Bn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Mn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Bn(Object(r),!0).forEach(function(t){S(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bn(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var Fn=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Te.withoutNormalizing(e,function(){var n=r.mode,o=void 0===n?"lowest":n,i=r.split,a=void 0!==i&&i,s=r.voids,u=void 0!==s&&s,l=r.match,c=r.at,d=void 0===c?e.selection:c;if(d){if(null==l&&(l=ke.isPath(d)?X(e,d):e.isInline(t)?function(t){return V.isElement(t)&&Te.isInline(e,t)||V.isText(t)}:function(t){return V.isElement(t)&&Te.isBlock(e,t)}),a&&ke.isRange(d)){var f=I.edges(d),h=k(f,2),p=h[0],g=h[1],m=Te.rangeRef(e,d,{affinity:"inward"}),v=function(t){var r=Te.above(e,{at:t,match:function(t){return V.isElement(t)&&Te.isBlock(e,t)}});return r&&Te.isEdge(e,t,r[1])};ot.splitNodes(e,{at:g,match:l,voids:u,always:!v(g)}),ot.splitNodes(e,{at:p,match:l,voids:u,always:!v(p)}),d=m.unref(),null==r.at&&ot.select(e,d)}for(var b=Array.from(Te.nodes(e,{at:d,match:e.isInline(t)?function(t){return V.isElement(t)&&Te.isBlock(e,t)}:function(e){return V.isEditor(e)},mode:"lowest",voids:u})),w=function(){var r=k(x[E],2)[1],n=ke.isRange(d)?I.intersection(d,Te.range(e,r)):d;if(!n)return 0;var i=Array.from(Te.nodes(e,{at:n,match:l,mode:o,voids:u}));if(i.length>0){var a=i[0],s=i[i.length-1],c=k(a,2)[1],f=k(s,2)[1];if(0===c.length&&0===f.length)return 0;var h=y.equals(c,f)?y.parent(c):y.common(c,f),p=Te.range(e,c,f),g=Te.node(e,h),m=k(g,1)[0],v=h.length+1,b=y.next(f.slice(0,v)),w=Mn(Mn({},t),{},{children:[]});ot.insertNodes(e,w,{at:b,voids:u}),ot.moveNodes(e,{at:p,match:function(e){return!V.isText(m)&&m.children.includes(e)},to:b.concat(0),voids:u})}},E=0,x=b;E<x.length;E++)w()}})};return dh.Editor=Te,dh.Element=R,dh.Location=ke,dh.Node=V,dh.Operation=G,dh.Path=y,dh.PathRef=e,dh.Point=Me,dh.PointRef=t,dh.Range=I,dh.RangeRef=r,dh.Scrubber=Ie,dh.Span=Ne,dh.Text=He,dh.Transforms=ot,dh.above=yt,dh.addMark=Et,dh.after=Dt,dh.apply=dt,dh.before=Bt,dh.collapse=en,dh.createEditor=function(){var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:function(){return!1},isInline:function(){return!1},isSelectable:function(){return!0},isVoid:function(){return!1},markableVoid:function(){return!1},onChange:function(){},apply:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dt.apply(void 0,[e].concat(r))},addMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Et.apply(void 0,[e].concat(r))},deleteBackward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mt.apply(void 0,[e].concat(r))},deleteForward:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ft.apply(void 0,[e].concat(r))},deleteFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return It.apply(void 0,[e].concat(r))},getFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gt.apply(void 0,[e].concat(r))},insertBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Kt.apply(void 0,[e].concat(r))},insertSoftBreak:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Zt.apply(void 0,[e].concat(r))},insertFragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qr.apply(void 0,[e].concat(r))},insertNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xt.apply(void 0,[e].concat(r))},insertText:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Qt.apply(void 0,[e].concat(r))},normalizeNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mt.apply(void 0,[e].concat(r))},removeMark:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Lr.apply(void 0,[e].concat(r))},getDirtyPaths:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return pt.apply(void 0,[e].concat(r))},shouldNormalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vt.apply(void 0,[e].concat(r))},above:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yt.apply(void 0,[e].concat(r))},after:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dt.apply(void 0,[e].concat(r))},before:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Bt.apply(void 0,[e].concat(r))},collapse:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return en.apply(void 0,[e].concat(r))},delete:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Xr.apply(void 0,[e].concat(r))},deselect:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tn.apply(void 0,[e].concat(r))},edges:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Pt.apply(void 0,[e].concat(r))},elementReadOnly:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _t.apply(void 0,[e].concat(r))},end:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zt.apply(void 0,[e].concat(r))},first:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return jt.apply(void 0,[e].concat(r))},fragment:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ht.apply(void 0,[e].concat(r))},getMarks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return hr.apply(void 0,[e].concat(r))},hasBlocks:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qt.apply(void 0,[e].concat(r))},hasInlines:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gt.apply(void 0,[e].concat(r))},hasPath:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wt.apply(void 0,[e].concat(r))},hasTexts:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Yt.apply(void 0,[e].concat(r))},insertNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return dn.apply(void 0,[e].concat(r))},isBlock:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return er.apply(void 0,[e].concat(r))},isEdge:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return tr.apply(void 0,[e].concat(r))},isEmpty:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rr.apply(void 0,[e].concat(r))},isEnd:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nr.apply(void 0,[e].concat(r))},isNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return or.apply(void 0,[e].concat(r))},isStart:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ir.apply(void 0,[e].concat(r))},last:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ar.apply(void 0,[e].concat(r))},leaf:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sr.apply(void 0,[e].concat(r))},levels:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return cr.apply(void 0,[e].concat(r))},liftNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return fn.apply(void 0,[e].concat(r))},mergeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return mn.apply(void 0,[e].concat(r))},move:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return rn.apply(void 0,[e].concat(r))},moveNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return vn.apply(void 0,[e].concat(r))},next:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return pr.apply(void 0,[e].concat(r))},node:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return gr.apply(void 0,[e].concat(r))},nodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yr.apply(void 0,[e].concat(r))},normalize:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Er.apply(void 0,[e].concat(r))},parent:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return xr.apply(void 0,[e].concat(r))},path:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ar.apply(void 0,[e].concat(r))},pathRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Sr.apply(void 0,[e].concat(r))},pathRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cr.apply(void 0,[e].concat(r))},point:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return kr.apply(void 0,[e].concat(r))},pointRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Dr.apply(void 0,[e].concat(r))},pointRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tr.apply(void 0,[e].concat(r))},positions:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Br.apply(void 0,[e].concat(r))},previous:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Mr.apply(void 0,[e].concat(r))},range:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Pr.apply(void 0,[e].concat(r))},rangeRef:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fr.apply(void 0,[e].concat(r))},rangeRefs:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ir.apply(void 0,[e].concat(r))},removeNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return yn.apply(void 0,[e].concat(r))},select:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return nn.apply(void 0,[e].concat(r))},setNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return En.apply(void 0,[e].concat(r))},setNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return _r.apply(void 0,[e].concat(r))},setPoint:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return sn.apply(void 0,[e].concat(r))},setSelection:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return un.apply(void 0,[e].concat(r))},splitNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Cn.apply(void 0,[e].concat(r))},start:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return zr.apply(void 0,[e].concat(r))},string:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return $r.apply(void 0,[e].concat(r))},unhangRange:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return qr.apply(void 0,[e].concat(r))},unsetNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Tn.apply(void 0,[e].concat(r))},unwrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return On.apply(void 0,[e].concat(r))},void:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Ut.apply(void 0,[e].concat(r))},withoutNormalizing:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Gr.apply(void 0,[e].concat(r))},wrapNodes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Fn.apply(void 0,[e].concat(r))},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Wr.apply(void 0,[e].concat(r))}};return e},dh.deleteBackward=Mt,dh.deleteForward=Ft,dh.deleteFragment=It,dh.deleteText=Xr,dh.deselect=tn,dh.edges=Pt,dh.elementReadOnly=_t,dh.end=zt,dh.first=jt,dh.fragment=Ht,dh.getDirtyPaths=pt,dh.getFragment=gt,dh.getVoid=Ut,dh.hasBlocks=qt,dh.hasInlines=Gt,dh.hasPath=Wt,dh.hasTexts=Yt,dh.insertBreak=Kt,dh.insertFragment=Qr,dh.insertNode=Xt,dh.insertNodes=dn,dh.insertSoftBreak=Zt,dh.insertText=Qt,dh.isBlock=er,dh.isEdge=tr,dh.isEditor=De,dh.isEmpty=rr,dh.isEnd=nr,dh.isNormalizing=or,dh.isObject=W,dh.isStart=ir,dh.last=ar,dh.leaf=sr,dh.levels=cr,dh.liftNodes=fn,dh.marks=hr,dh.mergeNodes=mn,dh.move=rn,dh.moveNodes=vn,dh.next=pr,dh.node=gr,dh.nodes=yr,dh.normalize=Er,dh.normalizeNode=mt,dh.parent=xr,dh.path=Ar,dh.pathRef=Sr,dh.pathRefs=Cr,dh.point=kr,dh.pointRef=Dr,dh.pointRefs=Tr,dh.positions=Br,dh.previous=Mr,dh.range=Pr,dh.rangeRef=Fr,dh.rangeRefs=Ir,dh.removeMark=Lr,dh.removeNodes=yn,dh.select=nn,dh.setNodes=En,dh.setNormalizing=_r,dh.setPoint=sn,dh.setSelection=un,dh.shouldMergeNodesRemovePrevNode=Wr,dh.shouldNormalize=vt,dh.splitNodes=Cn,dh.start=zr,dh.string=$r,dh.unhangRange=qr,dh.unsetNodes=Tn,dh.unwrapNodes=On,dh.withoutNormalizing=Gr,dh.wrapNodes=Fn,dh}var hh,ph=fh(),gh={};function mh(){if(hh)return gh;hh=1;var e=fh(),t={isHistory:function(t){return e.isObject(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(0===t.redos.length||e.Operation.isOperationList(t.redos[0].operations))&&(0===t.undos.length||e.Operation.isOperationList(t.undos[0].operations))}},r=new WeakMap,n=new WeakMap,o=new WeakMap,i=new WeakMap,a={isHistoryEditor:function(r){return t.isHistory(r.history)&&e.Editor.isEditor(r)},isMerging:function(e){return o.get(e)},isSplittingOnce:function(e){return i.get(e)},setSplittingOnce:function(e,t){i.set(e,t)},isSaving:function(e){return n.get(e)},redo:function(e){e.redo()},undo:function(e){e.undo()},withMerging:function(e,t){var r=a.isMerging(e);o.set(e,!0),t(),o.set(e,r)},withNewBatch:function(e,t){var r=a.isMerging(e);o.set(e,!0),i.set(e,!0),t(),o.set(e,r),i.delete(e)},withoutMerging:function(e,t){var r=a.isMerging(e);o.set(e,!1),t(),o.set(e,r)},withoutSaving:function(e,t){var r=a.isSaving(e);n.set(e,!1);try{t()}finally{n.set(e,r)}}};function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}(e))||t){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var l=function(t,r){return!(!r||"insert_text"!==t.type||"insert_text"!==r.type||t.offset!==r.offset+r.text.length||!e.Path.equals(t.path,r.path))||!(!r||"remove_text"!==t.type||"remove_text"!==r.type||t.offset+t.text.length!==r.offset||!e.Path.equals(t.path,r.path))},c=function(e,t){return"set_selection"!==e.type};return gh.HISTORY=r,gh.History=t,gh.HistoryEditor=a,gh.MERGING=o,gh.SAVING=n,gh.SPLITTING_ONCE=i,gh.withHistory=function(t){var r=t,n=r.apply;return r.history={undos:[],redos:[]},r.redo=function(){var t=r.history,n=t.redos;if(n.length>0){var o=n[n.length-1];o.selectionBefore&&e.Transforms.setSelection(r,o.selectionBefore),a.withoutSaving(r,function(){e.Editor.withoutNormalizing(r,function(){var e,t=s(o.operations);try{for(t.s();!(e=t.n()).done;){var n=e.value;r.apply(n)}}catch(e){t.e(e)}finally{t.f()}})}),t.redos.pop(),r.writeHistory("undos",o)}},r.undo=function(){var t=r.history,n=t.undos;if(n.length>0){var o=n[n.length-1];a.withoutSaving(r,function(){e.Editor.withoutNormalizing(r,function(){var t,n=s(o.operations.map(e.Operation.inverse).reverse());try{for(n.s();!(t=n.n()).done;){var i=t.value;r.apply(i)}}catch(e){n.e(e)}finally{n.f()}o.selectionBefore&&e.Transforms.setSelection(r,o.selectionBefore)})}),r.writeHistory("redos",o),t.undos.pop()}},r.apply=function(e){var t=r.operations,o=r.history,i=o.undos,s=i[i.length-1],u=s&&s.operations[s.operations.length-1],d=a.isSaving(r),f=a.isMerging(r);if(null==d&&(d=c(e)),d){if(null==f&&(f=null!=s&&(!!t.includes(u)||l(e,u))),a.isSplittingOnce(r)&&(f=!1,a.setSplittingOnce(r,void 0)),s&&f)s.operations.push(e);else{var h={operations:[e],selectionBefore:r.selection};r.writeHistory("undos",h)}for(;i.length>100;)i.shift();o.redos=[]}n(e)},r.writeHistory=function(e,t){r.history[e].push(t)},r},gh}var vh=mh(),yh=function(e,t){return yh=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},yh(e,t)};function bh(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}yh(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var wh=function(){return wh=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},wh.apply(this,arguments)};function Eh(e,t,r,n){return new(r||(r=Promise))(function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,s)}u((n=n.apply(e,t||[])).next())})}function xh(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&s[0]?n.return:s[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,s[1])).done)return o;switch(n=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++,n=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],n=0}finally{r=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function Sh(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ch(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function Ah(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function Dh(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=Sh(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){(function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)})(n,o,(t=e[r](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError;var Th,kh={exports:{}};var Nh,Oh,Bh=(Th||(Th=1,function(e,t){var r="__lodash_hash_undefined__",n=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]",h="[object RegExp]",p="[object Set]",g="[object String]",m="[object Symbol]",v="[object WeakMap]",y="[object ArrayBuffer]",w="[object DataView]",E="[object Float32Array]",x="[object Float64Array]",S="[object Int8Array]",C="[object Int16Array]",A="[object Int32Array]",D="[object Uint8Array]",T="[object Uint8ClampedArray]",k="[object Uint16Array]",N="[object Uint32Array]",O=/\w*$/,B=/^\[object .+?Constructor\]$/,M=/^(?:0|[1-9]\d*)$/,F={};F[o]=F["[object Array]"]=F[y]=F[w]=F[i]=F[a]=F[E]=F[x]=F[S]=F[C]=F[A]=F[l]=F[c]=F[d]=F[h]=F[p]=F[g]=F[m]=F[D]=F[T]=F[k]=F[N]=!0,F["[object Error]"]=F[s]=F[v]=!1;var I="object"==typeof b&&b&&b.Object===Object&&b,P="object"==typeof self&&self&&self.Object===Object&&self,R=I||P||Function("return this")(),L=t&&!t.nodeType&&t,_=L&&e&&!e.nodeType&&e,z=_&&_.exports===L;function j(e,t){return e.set(t[0],t[1]),e}function H(e,t){return e.add(t),e}function $(e,t,r,n){for(var o=-1,i=e?e.length:0;++o<i;)r=t(r,e[o],o,e);return r}function V(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function U(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function q(e,t){return function(r){return e(t(r))}}function G(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var W=Array.prototype,Y=Function.prototype,K=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=Y.toString,Q=K.hasOwnProperty,ee=K.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),re=z?R.Buffer:void 0,ne=R.Symbol,oe=R.Uint8Array,ie=q(Object.getPrototypeOf,Object),ae=Object.create,se=K.propertyIsEnumerable,ue=W.splice,le=Object.getOwnPropertySymbols,ce=re?re.isBuffer:void 0,de=q(Object.keys,Object),fe=Le(R,"DataView"),he=Le(R,"Map"),pe=Le(R,"Promise"),ge=Le(R,"Set"),me=Le(R,"WeakMap"),ve=Le(Object,"create"),ye=$e(fe),be=$e(he),we=$e(pe),Ee=$e(ge),xe=$e(me),Se=ne?ne.prototype:void 0,Ce=Se?Se.valueOf:void 0;function Ae(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function De(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Te(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ke(e){this.__data__=new De(e)}function Ne(e,t){var r=Ue(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&qe(e)}(e)&&Q.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,i=!!n;for(var a in e)!Q.call(e,a)||i&&("length"==a||je(a,n))||r.push(a);return r}function Oe(e,t,r){var n=e[t];Q.call(e,t)&&Ve(n,r)&&(void 0!==r||t in e)||(e[t]=r)}function Be(e,t){for(var r=e.length;r--;)if(Ve(e[r][0],t))return r;return-1}function Me(e,t,r,n,f,v,b){var B;if(n&&(B=v?n(e,f,v,b):n(e)),void 0!==B)return B;if(!Ye(e))return e;var M=Ue(e);if(M){if(B=function(e){var t=e.length,r=e.constructor(t);return t&&"string"==typeof e[0]&&Q.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!t)return function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(e,B)}else{var I=ze(e),P=I==s||I==u;if(Ge(e))return function(e,t){if(t)return e.slice();var r=new e.constructor(e.length);return e.copy(r),r}(e,t);if(I==d||I==o||P&&!v){if(V(e))return v?e:{};if(B=function(e){return"function"!=typeof e.constructor||He(e)?{}:Ye(t=ie(e))?ae(t):{};var t}(P?{}:e),!t)return function(e,t){return Pe(e,_e(e),t)}(e,function(e,t){return e&&Pe(t,Ke(t),e)}(B,e))}else{if(!F[I])return v?e:{};B=function(e,t,r,n){var o=e.constructor;switch(t){case y:return Ie(e);case i:case a:return new o(+e);case w:return function(e,t){var r=t?Ie(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,n);case E:case x:case S:case C:case A:case D:case T:case k:case N:return function(e,t){var r=t?Ie(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}(e,n);case l:return function(e,t,r){var n=t?r(U(e),!0):U(e);return $(n,j,new e.constructor)}(e,n,r);case c:case g:return new o(e);case h:return function(e){var t=new e.constructor(e.source,O.exec(e));return t.lastIndex=e.lastIndex,t}(e);case p:return function(e,t,r){var n=t?r(G(e),!0):G(e);return $(n,H,new e.constructor)}(e,n,r);case m:return function(e){return Ce?Object(Ce.call(e)):{}}(e)}}(e,I,Me,t)}}b||(b=new ke);var R=b.get(e);if(R)return R;if(b.set(e,B),!M)var L=r?function(e){return function(e,t,r){var n=t(e);return Ue(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Ke,_e)}(e):Ke(e);return function(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,e););}(L||e,function(o,i){L&&(o=e[i=o]),Oe(B,i,Me(o,t,r,n,i,e,b))}),B}function Fe(e){return!(!Ye(e)||(t=e,Z&&Z in t))&&(We(e)||V(e)?te:B).test($e(e));var t}function Ie(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Pe(e,t,r,n){r||(r={});for(var o=-1,i=t.length;++o<i;){var a=t[o];Oe(r,a,e[a])}return r}function Re(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function Le(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Fe(r)?r:void 0}Ae.prototype.clear=function(){this.__data__=ve?ve(null):{}},Ae.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Ae.prototype.get=function(e){var t=this.__data__;if(ve){var n=t[e];return n===r?void 0:n}return Q.call(t,e)?t[e]:void 0},Ae.prototype.has=function(e){var t=this.__data__;return ve?void 0!==t[e]:Q.call(t,e)},Ae.prototype.set=function(e,t){return this.__data__[e]=ve&&void 0===t?r:t,this},De.prototype.clear=function(){this.__data__=[]},De.prototype.delete=function(e){var t=this.__data__,r=Be(t,e);return!(r<0||(r==t.length-1?t.pop():ue.call(t,r,1),0))},De.prototype.get=function(e){var t=this.__data__,r=Be(t,e);return r<0?void 0:t[r][1]},De.prototype.has=function(e){return Be(this.__data__,e)>-1},De.prototype.set=function(e,t){var r=this.__data__,n=Be(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Te.prototype.clear=function(){this.__data__={hash:new Ae,map:new(he||De),string:new Ae}},Te.prototype.delete=function(e){return Re(this,e).delete(e)},Te.prototype.get=function(e){return Re(this,e).get(e)},Te.prototype.has=function(e){return Re(this,e).has(e)},Te.prototype.set=function(e,t){return Re(this,e).set(e,t),this},ke.prototype.clear=function(){this.__data__=new De},ke.prototype.delete=function(e){return this.__data__.delete(e)},ke.prototype.get=function(e){return this.__data__.get(e)},ke.prototype.has=function(e){return this.__data__.has(e)},ke.prototype.set=function(e,t){var r=this.__data__;if(r instanceof De){var n=r.__data__;if(!he||n.length<199)return n.push([e,t]),this;r=this.__data__=new Te(n)}return r.set(e,t),this};var _e=le?q(le,Object):function(){return[]},ze=function(e){return ee.call(e)};function je(e,t){return!!(t=null==t?n:t)&&("number"==typeof e||M.test(e))&&e>-1&&e%1==0&&e<t}function He(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||K)}function $e(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ve(e,t){return e===t||e!=e&&t!=t}(fe&&ze(new fe(new ArrayBuffer(1)))!=w||he&&ze(new he)!=l||pe&&ze(pe.resolve())!=f||ge&&ze(new ge)!=p||me&&ze(new me)!=v)&&(ze=function(e){var t=ee.call(e),r=t==d?e.constructor:void 0,n=r?$e(r):void 0;if(n)switch(n){case ye:return w;case be:return l;case we:return f;case Ee:return p;case xe:return v}return t});var Ue=Array.isArray;function qe(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}(e.length)&&!We(e)}var Ge=ce||function(){return!1};function We(e){var t=Ye(e)?ee.call(e):"";return t==s||t==u}function Ye(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ke(e){return qe(e)?Ne(e):function(e){if(!He(e))return de(e);var t=[];for(var r in Object(e))Q.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}e.exports=function(e){return Me(e,!0,!0)}}(kh,kh.exports)),kh.exports),Mh=w(Bh);var Fh=function(){if(Oh)return Nh;Oh=1;var e=9007199254740991,t="[object Arguments]",r="[object Function]",n="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var r=-1,n=e?e.length:0;++r<n&&!1!==t(e[r],r,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 h(e,r){var n=b(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&w(e)}(e)&&l.call(e,"callee")&&(!d.call(e,"callee")||c.call(e)==t)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],o=n.length,i=!!o;for(var a in e)!l.call(e,a)||i&&("length"==a||y(a,o))||n.push(a);return n}var p,g=(p=function(e,t){return e&&m(e,t,E)},function(e,t){if(null==e)return e;if(!w(e))return p(e,t);for(var r=e.length,n=-1,o=Object(e);++n<r&&!1!==t(o[n],n,o););return e}),m=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[++n];if(!1===t(o[s],s,o))break}return e};function v(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||u,t!==n)return f(e);var t,r,n,o=[];for(var i in Object(e))l.call(e,i)&&"constructor"!=i&&o.push(i);return o}function y(t,r){return!!(r=null==r?e:r)&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<r}var b=Array.isArray;function w(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==r||t==n}(t)}function E(e){return w(e)?h(e):v(e)}function x(e){return e}return Nh=function(e,t){return(b(e)?i:g)(e,"function"==typeof t?t:x)}}(),Ih=w(Fh),Ph=new Set(["base","embed","math","meta","object","script","svg","template"]),Rh=new Set(["href","poster","src","xlink:href"]),Lh=["java","script:"].join("");function _h(e,t,r){var n=function(e){return Array.from(e).filter(function(e){return e>" "}).join("").toLowerCase()}(r);return!n||!n.startsWith(Lh)&&!n.startsWith("vbscript:")&&(!n.startsWith("data:")||"href"!==t&&"xlink:href"!==t&&(("img"===e||"poster"===t)&&n.startsWith("data:image/")))}function zh(e){if(void 0===e&&(e=""),!e)return"";var t=(new DOMParser).parseFromString(e,"text/html");return Array.from(t.body.querySelectorAll("*")).forEach(function(e){var t=e.tagName.toLowerCase();Ph.has(t)?e.remove():Array.from(e.attributes).forEach(function(r){var n=r.name.toLowerCase(),o=r.value||"";("srcdoc"===n||n.startsWith("on")||Rh.has(n)&&!_h(t,n,o))&&e.removeAttribute(r.name)})}),t.body.innerHTML}var jh={};var Hh="created",$h="destroyed",Vh="change",Uh="scroll",qh="fullscreen",Gh="unFullScreen",Wh="modalOrPanelShow",Yh="modalOrPanelHide",Kh={};function Xh(e,t){var r=e.key,n=e.factory,o=e.config,i=wh(wh({},o),t||{});if(null!=Kh[r])throw new Error("Duplicated key '".concat(r,"' in menu items"));Kh[r]=n,function(e,t){null!=t&&(jh[e]=t)}(r,i)}var Zh=new WeakMap,Jh=new WeakMap,Qh=new WeakMap,ep=new WeakMap,tp=new WeakMap,rp=new WeakMap,np=new WeakMap,op=new WeakMap,ip=new WeakMap,ap=new WeakMap,sp=new WeakMap,up=new WeakMap,lp=new WeakMap,cp=new WeakMap,dp=new WeakMap,fp=new WeakMap,hp=new WeakMap,pp=new WeakMap,gp=new WeakMap,mp=new WeakMap,vp=new WeakMap,yp=new WeakMap,bp=new WeakMap,wp=new WeakMap,Ep=new WeakMap,xp=new WeakMap,Sp=new WeakMap,Cp=new WeakMap,Ap=new WeakMap,Dp=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in Kh)e.push(t);return e},t.getConfig=function(){var e=ap.get(t);if(null==e)throw new Error("Can not get editor config");return e},t.getMenuConfig=function(e){var r=t.getConfig().MENU_CONF;return(void 0===r?{}:r)[e]||{}},t.alert=function(e,r){void 0===r&&(r="info");var n=t.getConfig().customAlert;n&&n(e,r)},t},Tp=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function kp(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function Np(e={},t={}){Object.keys(t).forEach(r=>{void 0===e[r]?e[r]=t[r]:kp(t[r])&&kp(e[r])&&Object.keys(t[r]).length>0&&Np(e[r],t[r])})}const Op={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 Bp(){const e="undefined"!=typeof document?document:{};return Np(e,Op),e}const Mp={document:Op,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 Fp(){const e="undefined"!=typeof window?window:{};return Np(e,Mp),e}class Ip 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 Pp(e=[]){const t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...Pp(e)):t.push(e)}),t}function Rp(e,t){return Array.prototype.filter.call(e,t)}function Lp(e){return e.toLowerCase().replace(/-(.)/g,(e,t)=>t.toUpperCase())}function _p(e,t){const r=Fp(),n=Bp();let o=[];if(!t&&e instanceof Ip)return e;if(!e)return new Ip(o);if("string"==typeof e){const r=e.trim();if(r.indexOf("<")>=0&&r.indexOf(">")>=0){let e="div";0===r.indexOf("<li")&&(e="ul"),0===r.indexOf("<tr")&&(e="tbody"),0!==r.indexOf("<td")&&0!==r.indexOf("<th")||(e="tr"),0===r.indexOf("<tbody")&&(e="table"),0===r.indexOf("<option")&&(e="select");const t=n.createElement(e);t.innerHTML=r;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 r=[],n=t.querySelectorAll(e);for(let e=0;e<n.length;e+=1)r.push(n[e]);return r}(e.trim(),t||n)}else if(e.nodeType||e===r||e===n)o.push(e);else if(Array.isArray(e)){if(e instanceof Ip)return e;o=e}return new Ip(function(e){const t=[];for(let r=0;r<e.length;r+=1)-1===t.indexOf(e[r])&&t.push(e[r]);return t}(o))}function zp(...e){const t=Pp(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.add(...t)}),this}function jp(...e){const t=Pp(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.remove(...t)}),this}function Hp(...e){const t=Pp(e.map(e=>e.split(" ")));return Rp(this,e=>t.filter(t=>e.classList.contains(t)).length>0).length>0}function $p(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let r=0;r<this.length;r+=1)if(2===arguments.length)this[r].setAttribute(e,t);else for(const t in e)this[r][t]=e[t],this[r].setAttribute(t,e[t]);return this}function Vp(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function Up(e,t){let r;if(void 0===t){if(r=this[0],!r)return;if(r.dom7ElementDataStorage&&e in r.dom7ElementDataStorage)return r.dom7ElementDataStorage[e];const t=r.getAttribute(`data-${e}`);return t||void 0}for(let n=0;n<this.length;n+=1)r=this[n],r.dom7ElementDataStorage||(r.dom7ElementDataStorage={}),r.dom7ElementDataStorage[e]=t;return this}function qp(){const e=this[0];if(!e)return;const t={};if(e.dataset)for(const r in e.dataset)t[r]=e.dataset[r];else for(let r=0;r<e.attributes.length;r+=1){const n=e.attributes[r];n.name.indexOf("data-")>=0&&(t[Lp(n.name.split("data-")[1])]=n.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 Gp(e){if(void 0===e){const e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){const t=[];for(let r=0;r<e.selectedOptions.length;r+=1)t.push(e.selectedOptions[r].value);return t}return e.value}for(let t=0;t<this.length;t+=1){const r=this[t];if(Array.isArray(e)&&r.multiple&&"select"===r.nodeName.toLowerCase())for(let t=0;t<r.options.length;t+=1)r.options[t].selected=e.indexOf(r.options[t].value)>=0;else r.value=e}return this}function Wp(...e){let[t,r,n,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),_p(t).is(r))n.apply(t,o);else{const e=_p(t).parents();for(let t=0;t<e.length;t+=1)_p(e[t]).is(r)&&n.apply(e[t],o)}}function a(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),n.apply(this,t)}"function"==typeof e[1]&&([t,n,o]=e,r=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(r)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:n,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:n,proxyListener:a}),t.addEventListener(e,a,o)}}return this}function Yp(...e){let[t,r,n,o]=e;"function"==typeof e[1]&&([t,n,o]=e,r=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(!r&&i.dom7Listeners?a=i.dom7Listeners[t]:r&&i.dom7LiveListeners&&(a=i.dom7LiveListeners[t]),a&&a.length)for(let e=a.length-1;e>=0;e-=1){const r=a[e];n&&r.listener===n||n&&r.listener&&r.listener.dom7proxy&&r.listener.dom7proxy===n?(i.removeEventListener(t,r.proxyListener,o),a.splice(e,1)):n||(i.removeEventListener(t,r.proxyListener,o),a.splice(e,1))}}}return this}function Kp(){const e=Fp();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function Xp(){const e=Fp();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function Zp(){if(this.length>0){const e=Fp(),t=Bp(),r=this[0],n=r.getBoundingClientRect(),o=t.body,i=r.clientTop||o.clientTop||0,a=r.clientLeft||o.clientLeft||0,s=r===e?e.scrollY:r.scrollTop,u=r===e?e.scrollX:r.scrollLeft;return{top:n.top+s-i,left:n.left+u-a}}return null}function Jp(){for(let e=0;e<this.length;e+=1)this[e].style.display="none";return this}function Qp(){const e=Fp();for(let t=0;t<this.length;t+=1){const r=this[t];"none"===r.style.display&&(r.style.display=""),"none"===e.getComputedStyle(r,null).getPropertyValue("display")&&(r.style.display="block")}return this}function eg(e,t){const r=Fp();let n;if(1===arguments.length){if("string"!=typeof e){for(n=0;n<this.length;n+=1)for(const t in e)this[n].style[t]=e[t];return this}if(this[0])return r.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(n=0;n<this.length;n+=1)this[n].style[e]=t;return this}return this}function tg(e){return e?(this.forEach((t,r)=>{e.apply(t,[t,r])}),this):this}function rg(e){return _p(Rp(this,e))}function ng(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 og(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 ig(e){const t=Fp(),r=Bp(),n=this[0];let o,i;if(!n||void 0===e)return!1;if("string"==typeof e){if(n.matches)return n.matches(e);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(e);if(n.msMatchesSelector)return n.msMatchesSelector(e);for(o=_p(e),i=0;i<o.length;i+=1)if(o[i]===n)return!0;return!1}if(e===r)return n===r;if(e===t)return n===t;if(e.nodeType||e instanceof Ip){for(o=e.nodeType?[e]:e,i=0;i<o.length;i+=1)if(o[i]===n)return!0;return!1}return!1}function ag(...e){let t;const r=Bp();for(let n=0;n<e.length;n+=1){t=e[n];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const n=r.createElement("div");for(n.innerHTML=t;n.firstChild;)this[e].appendChild(n.firstChild)}else if(t instanceof Ip)for(let r=0;r<t.length;r+=1)this[e].appendChild(t[r]);else this[e].appendChild(t)}return this}function sg(e){const t=Bp();let r,n;for(r=0;r<this.length;r+=1)if("string"==typeof e){const o=t.createElement("div");for(o.innerHTML=e,n=o.childNodes.length-1;n>=0;n-=1)this[r].insertBefore(o.childNodes[n],this[r].childNodes[0])}else if(e instanceof Ip)for(n=0;n<e.length;n+=1)this[r].insertBefore(e[n],this[r].childNodes[0]);else this[r].insertBefore(e,this[r].childNodes[0]);return this}function ug(e){const t=[];for(let r=0;r<this.length;r+=1)null!==this[r].parentNode&&(e?_p(this[r].parentNode).is(e)&&t.push(this[r].parentNode):t.push(this[r].parentNode));return _p(t)}function lg(e){const t=[];for(let r=0;r<this.length;r+=1){let n=this[r].parentNode;for(;n;)e?_p(n).is(e)&&t.push(n):t.push(n),n=n.parentNode}return _p(t)}function cg(e){const t=[];for(let r=0;r<this.length;r+=1){const n=this[r].querySelectorAll(e);for(let e=0;e<n.length;e+=1)t.push(n[e])}return _p(t)}function dg(e){const t=[];for(let r=0;r<this.length;r+=1){const n=this[r].children;for(let r=0;r<n.length;r+=1)e&&!_p(n[r]).is(e)||t.push(n[r])}return _p(t)}function fg(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function hg(){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}_p.fn=Ip.prototype;const pg="resize scroll".split(" ");function gg(e){return function(...t){if(void 0===t[0]){for(let t=0;t<this.length;t+=1)pg.indexOf(e)<0&&(e in this[t]?this[t][e]():_p(this[t]).trigger(e));return this}return this.on(e,...t)}}const mg=gg("click"),vg=gg("focus"),yg=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let bg=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&r[e]];return t};function wg(e){Promise.resolve().then(e)}var Eg,xg=function(e){return Object.prototype.toString.call(e)},Sg=globalThis.Node;eg&&(_p.fn.css=eg),ag&&(_p.fn.append=ag),zp&&(_p.fn.addClass=zp),jp&&(_p.fn.removeClass=jp),Hp&&(_p.fn.hasClass=Hp),Wp&&(_p.fn.on=Wp),vg&&(_p.fn.focus=vg),$p&&(_p.fn.attr=$p),Vp&&(_p.fn.removeAttr=Vp),Jp&&(_p.fn.hide=Jp),Qp&&(_p.fn.show=Qp),Zp&&(_p.fn.offset=Zp),Kp&&(_p.fn.width=Kp),Xp&&(_p.fn.height=Xp),ug&&(_p.fn.parent=ug),lg&&(_p.fn.parents=lg),ig&&(_p.fn.is=ig),qp&&(_p.fn.dataset=qp),Gp&&(_p.fn.val=Gp),og&&(_p.fn.text=og),ng&&(_p.fn.html=ng),dg&&(_p.fn.children=dg),fg&&(_p.fn.remove=fg),cg&&(_p.fn.find=cg),tg&&(_p.fn.each=tg),hg&&(_p.fn.empty=hg),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"}(Eg||(Eg={}));var Cg=/\[object HTML([A-Z][a-z]*)*Element\]/,Ag=function(e){return Cg.test(xg(e))},Dg=function(e){return null!=e&&"number"==typeof e.nodeType},Tg=function(e){return Dg(e)&&e.nodeType===Eg.COMMENT_NODE},kg=function(e){return Dg(e)&&e.nodeType===Eg.ELEMENT_NODE},Ng=function(e){return"[object Selection]"===xg(e)},Og=function(e){return Dg(e)&&e.nodeType===Eg.TEXT_NODE},Bg=function(e){var t,r,n;return null!==(t=window&&window.document.getElementById(e))&&void 0!==t?t:window&&(null===(n=null===(r=window.document.activeElement)||void 0===r?void 0:r.shadowRoot)||void 0===n?void 0:n.getElementById(e))||null},Mg=function(e,t,r){for(var n=e.childNodes,o=n[t],i=t,a=!1,s=!1;(Tg(o)||kg(o)&&0===o.childNodes.length||kg(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=n.length?(a=!0,i=t-1,r="backward"):i<0?(s=!0,i=t+1,r="forward"):(o=n[i],t=i,i+="forward"===r?1:-1);return[o,t]},Fg=function(e,t,r){return Ch(Mg(e,t,r),1)[0]},Ig=function(e){var t,r,n="";if(Og(e)&&e.nodeValue)return e.nodeValue;if(kg(e)){try{for(var o=Sh(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;n+=Ig(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}var s=getComputedStyle(e).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==e.tagName||(n+="\n")}return n};function Pg(e,t){if(!Ag(e)||"true"!==e.dataset.slateVoid)for(var r=e.childNodes,n=r.length;n-=1;){var o=r[n],i=o.nodeType;Og(o)?t(o,e):[Eg.ELEMENT_NODE,Eg.DOCUMENT_NODE,Eg.DOCUMENT_FRAGMENT_NODE].includes(i)&&Pg(o,t)}}function Rg(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==Eg.ELEMENT_NODE?"":t.tagName.toLowerCase()}var Lg=new RegExp(String.fromCharCode(160),"g");function _g(e){return e.replace(Lg," ")}var zg=["span","b","strong","i","em","s","strike","u","font","sub","sup"],jg=[];var Hg=[];var $g={};function Vg(e,t){var r=e.length;if(r){var n=e[r-1];if(ph.Text.isText(n)){var o=Object.keys(n);if(1===o.length&&"text"===o[0])return n.text+=t,!0}}return!1}function Ug(e,t,r){return{type:"paragraph",children:t&&t.length>0?t:[{text:_p(e).text().replace(/\s+/gm," ")}]}}function qg(e,t){var r=function(e,t){var r=[];if(null!=e.attr("data-w-e-is-void"))return r;var n=e[0].childNodes;return 1===n.length&&"BR"===n[0].nodeName?(r.push({text:""}),r):(n.forEach(function(e){if(kg(e)){if("BR"===e.nodeName)return void(Vg(r,"\n")||r.push({text:"\n"}));var n=Zg(_p(e),t);Array.isArray(n)?n.forEach(function(e){return r.push(e)}):r.push(n)}else if(Og(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=_g(o),Vg(r,o)||r.push({text:o}))}}),r)}(e,t),n=function(e){for(var t in $g)if(e[0].matches(t))return $g[t];return Ug}(e),o=n(e[0],r,t);return Array.isArray(o)||(o=[o]),o.forEach(function(n){ph.Editor.isVoid(t,n)||(0===r.length&&(n.children=[{text:e.text().replace(/\s+/gm," ")}]),Hg.forEach(function(r){n=r(e[0],n,t)}))}),o}function Gg(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/[\r\n\t]+/g,"").replace(/<br>/g,"\n"));var r=e[0].textContent||"";r=function(e){return e.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&reg;/g,"®").replace(/&copy;/g,"©").replace(/&trade;/g,"™").replace(/&quot;/g,'"')}(r);var n={text:r=_g(r)};return Hg.forEach(function(r){n=r(e[0],n,t)}),n}function Wg(e){var t=Rg(e),r=e.attr&&e.attr("style")||"",n={};return["i","em"].includes(t)&&(n.italic=!0),["b","strong"].includes(t)&&(n.bold=!0),["u"].includes(t)&&(n.underline=!0),["s","strike","del"].includes(t)&&(n.through=!0),["code"].includes(t)&&(n.code=!0),["sub"].includes(t)&&(n.sub=!0),["sup"].includes(t)&&(n.sup=!0),/font-style\s*:\s*italic/i.test(r)&&(n.italic=!0),/vertical-align\s*:\s*sub/i.test(r)&&(n.sub=!0),/vertical-align\s*:\s*super/i.test(r)&&(n.sup=!0),n}function Yg(e){var t=e.attr&&e.attr("style")||"",r={},n=t.match(/font-size\s*:\s*([^;]+)/i);n&&(r.fontSize=n[1].trim());var o=t.match(/font-family\s*:\s*([^;]+)/i);o&&(r.fontFamily=o[1].trim().replace(/["']/g,""));var i=t.match(/line-height\s*:\s*([^;]+)/i);i&&(r.lineHeight=i[1].trim());var a=t.match(/(?:^|;)\s*color\s*:\s*([^;]+)/i);a&&(r.color=a[1].trim());var s=t.match(/background-color\s*:\s*([^;]+)/i);return s&&(r.bgColor=s[1].trim()),r}function Kg(e,t,r){var n=wh({},e);return Object.keys(r||{}).forEach(function(e){void 0===n[e]&&(n[e]=r[e])}),t&&(t.bold&&!n.bold&&(n.bold=!0),t.italic&&!n.italic&&(n.italic=!0),t.underline&&!n.underline&&(n.underline=!0),t.through&&!n.through&&(n.through=!0),t.code&&!n.code&&(n.code=!0),!t.sub||n.sub||n.sup||(n.sub=!0),!t.sup||n.sup||n.sub||(n.sup=!0)),n}function Xg(e){var t,r,n,o,i=[];try{for(var a=Sh(e),s=a.next();!s.done;s=a.next()){var u=s.value,l=i[i.length-1];if(l&&void 0!==l.text&&void 0!==u.text){var c=Object.keys(l).filter(function(e){return"text"!==e}).sort(),d=Object.keys(u).filter(function(e){return"text"!==e}).sort();if(JSON.stringify(c)===JSON.stringify(d)){var f=!0;try{for(var h=(n=void 0,Sh(c)),p=h.next();!p.done;p=h.next()){var g=p.value;if(JSON.stringify(l[g])!==JSON.stringify(u[g])){f=!1;break}}}catch(e){n={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}if(f){l.text+=u.text;continue}}}i.push(u)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return i}function Zg(e,t,r,n){var o,i,a,s;void 0===r&&(r={}),void 0===n&&(n={});var u=e[0];if(u.nodeType===Node.TEXT_NODE)return Kg({text:N=u.nodeValue||""},r,n);jg.forEach(function(t){var r=t.selector,n=t.preParseHtml;e[0].matches(r)&&(e=_p(n(e[0])))});var l=Rg(e);if(e.attr("data-w-e-type"))return qg(e,t);if("a"===l&&!e.attr("href")){var c=Wg(e),d=Yg(e),f=wh({},r);Object.keys(c).forEach(function(e){c[e]&&(f[e]=!0)});var h=wh(wh({},n||{}),d||{}),p=Array.from(u.childNodes),g=[];try{for(var m=Sh(p),v=m.next();!v.done;v=m.next()){if((k=v.value).nodeType!==Node.TEXT_NODE){var y=Zg(_p(k),t,f,h);Array.isArray(y)?y.forEach(function(e){return g.push(e)}):g.push(y)}else{""!==(N=k.nodeValue||"")&&g.push(Kg({text:N},f,h))}}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(o)throw o.error}}if(0===g.length)return qg(e,t);var b=Xg(g);return 1===b.length?b[0]:b}if("code"===l)return"pre"===Rg(e.parent())?qg(e,t):Gg(e,t);if(!zg.includes(l))return qg(e,t);var w=Wg(e),E=Yg(e),x=wh({},r);Object.keys(w).forEach(function(e){w[e]&&(x[e]=!0)});var S=wh(wh({},n||{}),E||{}),C=Array.from(u.childNodes),A=[];try{for(var D=Sh(C),T=D.next();!T.done;T=D.next()){var k;if((k=T.value).nodeType!==Node.TEXT_NODE){y=Zg(_p(k),t,x,S);Array.isArray(y)?y.forEach(function(e){return A.push(e)}):A.push(y)}else{var N;""!==(N=k.nodeValue||"")&&A.push(Kg({text:N},x,S))}}}catch(e){a={error:e}}finally{try{T&&!T.done&&(s=D.return)&&s.call(D)}finally{if(a)throw a.error}}if(0===A.length)return Gg(e,t);var O=Xg(A);return 1===O.length?O[0]:O}function Jg(e,t,r){var n=_p(r);return!!n.attr(t)||(n.attr(t,"true"),e.on($h,function(){n.removeAttr(t)}),!1)}function Qg(e,t){void 0===t&&(t="");var r=[],n=e.getConfig().sanitizeHtml;""===t&&(t="<p><br></p>"),0!==t.indexOf("<")&&(t=t.split(/\n/).map(function(e){return"<p>".concat(e,"</p>")}).join("")),t=n?n(t):t;var o=_p("<div>".concat(t,"</div>"));return Array.from(o.children()).forEach(function(t){var n=Zg(_p(t),e);Array.isArray(n)?n.forEach(function(e){return r.push(e)}):r.push(n)}),r}function em(e,t){return"w-e-element-".concat(e,"-").concat(t)}var tm=[];var rm,nm,om={};function im(e,t,r){var n=r.isInline(e)?"span":"div";return"<".concat(n,">").concat(t,"</").concat(n,">")}function am(e,t){var r=e.type,n=void 0===r?"":r,o=e.children,i=void 0===o?[]:o,a=ph.Editor.isVoid(t,e),s="";a||(s=i.map(function(e){return Em(e,t)}).join(""));var u=function(e){return om[e]||im}(n),l=u(e,s,t),c="";if(c="string"==typeof l?l:l.html||"",a||tm.forEach(function(t){return c=t(e,c)}),"string"==typeof l)return c;var d=l.prefix,f=void 0===d?"":d,h=l.suffix,p=void 0===h?"":h;return f&&(c=f+c),p&&(c+=p),c}var sm=function(){if(nm)return rm;nm=1;var e=9007199254740991,t="[object Arguments]",r="[object Map]",n="[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",h="["+l+"]",p="["+c+d+"]",g="\\ud83c[\\udffb-\\udfff]",m="[^"+l+"]",v="(?:\\ud83c[\\udde6-\\uddff]){2}",y="[\\ud800-\\udbff][\\udc00-\\udfff]",w="\\u200d",E="(?:"+p+"|"+g+")"+"?",x="["+f+"]?",S=x+E+("(?:"+w+"(?:"+[m,v,y].join("|")+")"+x+E+")*"),C="(?:"+[m+p+"?",p,v,y,h].join("|")+")",A=RegExp(g+"(?="+g+")|"+C+S,"g"),D=RegExp("["+w+l+c+d+f+"]"),T="object"==typeof b&&b&&b.Object===Object&&b,k="object"==typeof self&&self&&self.Object===Object&&self,N=T||k||Function("return this")();function O(e,t){return function(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}(t,function(t){return e[t]})}function B(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function M(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}function F(e){return function(e){return D.test(e)}(e)?function(e){return e.match(A)||[]}(e):function(e){return e.split("")}(e)}var I,P,R=Function.prototype,L=Object.prototype,_=N["__core-js_shared__"],z=function(){var e=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),j=R.toString,H=L.hasOwnProperty,$=L.toString,V=RegExp("^"+j.call(H).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=N.Symbol,q=U?U.iterator:void 0,G=L.propertyIsEnumerable,W=(I=Object.keys,P=Object,function(e){return I(P(e))}),Y=se(N,"DataView"),K=se(N,"Map"),X=se(N,"Promise"),Z=se(N,"Set"),J=se(N,"WeakMap"),Q=ce(Y),ee=ce(K),te=ce(X),re=ce(Z),ne=ce(J);function oe(e,r){var n=de(e)||function(e){return function(e){return ge(e)&&fe(e)}(e)&&H.call(e,"callee")&&(!G.call(e,"callee")||$.call(e)==t)}(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],o=n.length,i=!!o;for(var a in e)!H.call(e,a)||i&&("length"==a||le(a,o))||n.push(a);return n}function ie(e){if(!pe(e)||function(e){return!!z&&z in e}(e))return!1;var t=he(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?V:s;return t.test(ce(e))}function ae(e){if(r=(t=e)&&t.constructor,n="function"==typeof r&&r.prototype||L,t!==n)return W(e);var t,r,n,o=[];for(var i in Object(e))H.call(e,i)&&"constructor"!=i&&o.push(i);return o}function se(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ie(r)?r:void 0}var ue=function(e){return $.call(e)};function le(t,r){return!!(r=null==r?e:r)&&("number"==typeof t||u.test(t))&&t>-1&&t%1==0&&t<r}function ce(e){if(null!=e){try{return j.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(Y&&ue(new Y(new ArrayBuffer(1)))!=a||K&&ue(new K)!=r||X&&ue(X.resolve())!=n||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 r;case te:return n;case re:return o;case ne: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)&&!he(t)}function he(e){var t=pe(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function pe(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ge(e){return!!e&&"object"==typeof e}function me(e){return e?O(e,function(e){return fe(e)?oe(e):ae(e)}(e)):[]}return rm=function(e){if(!e)return[];if(fe(e))return function(e){return"string"==typeof e||!de(e)&&ge(e)&&"[object String]"==$.call(e)}(e)?F(e):function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(e);if(q&&e[q])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[q]());var t=ue(e);return(t==r?B:t==o?M:me)(e)},rm}(),um=w(sm),lm=0,cm=function(){this.id="".concat(lm++)},dm="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),fm="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),hm="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),pm="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),gm="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),mm="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),vm=!gm&&!pm&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,ym=function(e,t){return Boolean(e.compareDocumentPosition(t)&Sg.DOCUMENT_POSITION_PRECEDING)},bm=function(e,t){return Boolean(e.compareDocumentPosition(t)&Sg.DOCUMENT_POSITION_FOLLOWING)},wm={getWindow:function(e){var t=bp.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var r=yp.get(t);return r||(r=new cm,yp.set(t,r)),r},setNewKey:function(e){var t=new cm;yp.set(e,t)},findPath:function(e,t){for(var r=[],n=t;;){var o=hp.get(n);if(null==o){if(ph.Editor.isEditor(n))return r;break}var i=fp.get(n);if(null==i)break;r.unshift(i),n=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=wm.toDOMNode(e,e),r=t.getRootNode();return"[object HTMLDocument]"!==xg(r)&&!function(e){return"[object ShadowRoot]"===xg(e)}(r)||null==Reflect.get(r,"getSelection")?t.ownerDocument:r},getParentNode:function(e,t){return hp.get(t)||null},getParentsNodes:function(e,t){for(var r=[],n=t;n!==e&&null!=n;){var o=wm.getParentNode(e,n);if(null==o)break;r.push(o),n=o}return r},getTopNode:function(e,t){var r=[wm.findPath(e,t)[0]];return ph.Node.get(e,r)},toDOMNode:function(e,t){var r;if(ph.Editor.isEditor(t))r=pp.get(e);else{var n=wm.findKey(e,t);r=mp.get(n)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(t)));return r},hasDOMNode:function(e,t,r){void 0===r&&(r={});var n,o=r.editable,i=void 0!==o&&o,a=wm.toDOMNode(e,e);try{n=kg(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!n&&(n.closest("[data-slate-editor]")===a&&(!i||n.isContentEditable||n.closest('[contenteditable="false"]')===a||!!n.getAttribute("data-slate-zero-width"))||!!n.getAttribute("data-slate-string"))},toDOMRange:function(e,t){var r=t.anchor,n=t.focus,o=ph.Range.isBackward(t),i=wm.toDOMPoint(e,r),a=ph.Range.isCollapsed(t)?i:wm.toDOMPoint(e,n),s=wm.getWindow(e).document.createRange(),u=Ch(o?a:i,2),l=u[0],c=u[1],d=Ch(o?i:a,2),f=d[0],h=d[1],p=!!(kg(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!(kg(f)?f:f.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,p?1:c),s.setEnd(f,g?1:h),s},toDOMPoint:function(e,t){var r,n,o,i=Ch(ph.Editor.node(e,t.path),1)[0],a=wm.toDOMNode(e,i);ph.Editor.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=Sh(s),c=l.next();!c.done;c=l.next()){var d=c.value,f=d.childNodes[0];if(null!=f&&null!=f.textContent){var h=f.textContent.length,p=d.getAttribute("data-slate-length"),g=u+(null==p?h:parseInt(p,10));if(t.offset<=g){o=[f,Math.min(h,Math.max(0,t.offset-u))];break}u=g}}}catch(e){r={error:e}}finally{try{c&&!c.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.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 r=kg(t)?t:t.parentElement;r&&!r.hasAttribute("data-slate-node")&&(r=r.closest("[data-slate-node]"));var n=r?gp.get(r):null;if(!n)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(r));return n},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var r=t.clientX,n=t.clientY,o=t.target;if(null==r||null==n)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i,a=wm.toSlateNode(e,t.target),s=wm.findPath(e,a);if(ph.Element.isElement(a)&&ph.Editor.isVoid(e,a)){var u=o.getBoundingClientRect(),l=e.isInline(a)?r-u.left<u.left+u.width-r:n-u.top<u.top+u.height-n,c=ph.Editor.point(e,s,{edge:l?"start":"end"}),d=l?ph.Editor.before(e,c):ph.Editor.after(e,c);if(d)return ph.Editor.range(e,d)}var f=this.getWindow(e).document;if(f.caretRangeFromPoint)i=f.caretRangeFromPoint(r,n);else{var h=f.caretPositionFromPoint(r,n);h&&((i=f.createRange()).setStart(h.offsetNode,h.offset),i.setEnd(h.offsetNode,h.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));return wm.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,r){var n,o,i,a,s,u=r.exactMatch,l=r.suppressThrow;if((Ng(t)?t.anchorNode:t.startContainer)&&(Ng(t)?(n=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=mm&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(n=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=t.collapsed)),null==n||null==i||null==o||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=wm.toSlatePoint(e,[n,o],{exactMatch:u,suppressThrow:l});if(!c)return null;var d=s?c:wm.toSlatePoint(e,[i,a],{exactMatch:u,suppressThrow:l,searchDirection:ym(n,i)||n===i&&a<o?"forward":"backward"});if(!d)return null;var f={anchor:c,focus:d};return ph.Range.isExpanded(f)&&ph.Range.isForward(f)&&kg(i)&&ph.Editor.void(e,{at:f.focus,mode:"highest"})&&(f=ph.Editor.unhangRange(e,f,{voids:!0})),f},toSlatePoint:function(e,t,r){var n,o,i,a=r.exactMatch,s=r.suppressThrow,u=Ch(a?t:function(e){var t,r=Ch(e,2),n=r[0],o=r[1];if(kg(n)&&n.childNodes.length){var i=o===n.childNodes.length,a=i?o-1:o;for(n=(t=Ch(Mg(n,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;kg(n)&&n.childNodes.length;){var s=i?n.childNodes.length-1:0;n=Fg(n,s,i?"backward":"forward")}o=i&&null!=n.textContent?n.textContent.length:0}return[n,o]}(t),2),l=u[0],c=u[1],d=l.parentNode,f=r.searchDirection,h=null,p=0;if(d){var g=wm.toDOMNode(e,e),m=d.closest('[data-slate-void="true"]'),v=m&&g.contains(m)?m:null,y=d.closest('[contenteditable="false"]'),b=y&&g.contains(y)?y:null,w=d.closest("[data-slate-leaf]"),E=null,x=wm.getWindow(e);if(w&&x.document.createRange){h=w.closest('[data-slate-node="text"]');var S=x.document.createRange();S.setStart(h,0),S.setEnd(l,c);var C=S.cloneContents();Ah(Ah([],Ch(um(C.querySelectorAll("[data-slate-zero-width]"))),!1),Ch(um(C.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(e){e.parentNode.removeChild(e)}),p=C.textContent.length,E=h}else if(v)(w=Array.from(v.querySelectorAll("[data-slate-leaf]")).find(function(t){return wm.hasDOMNode(e,t)})||null)?(h=w.closest('[data-slate-node="text"]'),p=(E=w).textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(function(e){p-=e.textContent.length})):p=1;else if(b){var A=function(t){return t?Array.from(t.querySelectorAll("[data-slate-leaf]")).filter(function(t){return wm.hasDOMNode(e,t)}):[]},D=b.closest('[data-slate-node="element"]');if("backward"===f||!f)for(var T=(N=Ah(Ah([],Ch(A(null==D?void 0:D.previousElementSibling)),!1),Ch(A(D)),!1)).length-1;T>=0;T-=1){var k=N[T];if(ym(b,k)){w=k,f="backward";break}}if(!(w||"forward"!==f&&f)){var N=Ah(Ah([],Ch(A(D)),!1),Ch(A(null==D?void 0:D.nextElementSibling)),!1);try{for(var O=Sh(N),B=O.next();!B.done;B=O.next()){k=B.value;if(bm(b,k)){w=k,f="forward";break}}}catch(e){n={error:e}}finally{try{B&&!B.done&&(o=O.return)&&o.call(O)}finally{if(n)throw n.error}}}w&&(h=w.closest('[data-slate-node="text"]'),E=w,"forward"===f?p=0:(p=E.textContent.length,E.querySelectorAll("[data-slate-zero-width]").forEach(function(e){p-=e.textContent.length})))}E&&p===E.textContent.length&&(d.hasAttribute("data-slate-zero-width")||fm&&(null===(i=E.textContent)||void 0===i?void 0:i.endsWith("\n")))&&(p-=1)}if(!h){if(s)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var M,F=wm.toSlateNode(e,h);try{M=wm.findPath(e,F)}catch(e){if(s)return null;throw e}return{path:M,offset:p}},hasRange:function(e,t){var r=t.anchor,n=t.focus;return ph.Editor.hasPath(e,r.path)&&ph.Editor.hasPath(e,n.path)},getNodeType:function(e){return ph.Element.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(e){return ph.Node.string(e)}).join("")},getSelectedElems:function(e){var t,r,n=[],o=ph.Editor.nodes(e,{universal:!0});try{for(var i=Sh(o),a=i.next();!a.done;a=i.next()){var s=Ch(a.value,1)[0];ph.Element.isElement(s)&&n.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},getSelectedNodeByType:function(e,t){var r=this,n=Ch(ph.Editor.nodes(e,{match:function(e){return r.checkNodeType(e,t)},universal:!0}),1),o=n[0];return null==o?null:o[0]},getSelectedTextNode:function(e){var t=Ch(ph.Editor.nodes(e,{match:function(e){return ph.Text.isText(e)},universal:!0}),1),r=t[0];return null==r?null:r[0]},isNodeSelected:function(e,t){var r=Ch(ph.Editor.nodes(e,{match:function(e){return e===t},universal:!0}),1),n=r[0];return null!=n&&Ch(n,1)[0]===t},isSelectionAtLineEnd:function(e,t){var r=e.selection;return!!r&&(ph.Editor.isEnd(e,r.anchor,t)||ph.Editor.isEnd(e,r.focus,t))},getTextarea:function(e){var t=Zh.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return ep.get(e)||null},getHoverbar:function(e){return rp.get(e)||null},normalizeContent:function(e){e.children.forEach(function(t,r){e.normalizeNode([t,[r]])})},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),r=t.maxLength,n=t.onMaxLength;if("number"!=typeof r||r<=0)return 1/0;var o=r-e.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&n&&n(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var t,r,n,o,i=wm.getTextarea(e).$textArea,a=null==i?void 0:i[0].childNodes;if(a)try{for(var s=Sh(Array.from(a)),u=s.next();!u.done;u=s.next()){var l=u.value;if(!Og(l))break;l.remove()}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}var c=ph.Editor.nodes(e,{match:function(t){return!(!ph.Element.isElement(t)||e.isInline(t))},universal:!0});try{for(var d=Sh(c),f=d.next();!f.done;f=d.next()){var h=f.value;if(null!=h){var p=h[0];Pg(wm.toDOMNode(e,p),function(e,t){var r=_p(t);r.attr("data-slate-string")||r.attr("data-slate-zero-width")||r.attr("data-w-e-reserve")||t.removeChild(e)})}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}},isLastNode:function(e,t){var r=e.children||[];return r[r.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,r,n=ph.Editor.nodes(e,{match:function(t){return e.isVoid(t)}}),o=0;try{for(var i=Sh(n),a=i.next();!a.done;a=i.next()){a.value&&(o+=1)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return o>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(ph.Range.isExpanded(t))return!1;var r=wm.getSelectedNodeByType(e,"paragraph");if(null===r)return!1;var n=r.children;return 1===n.length&&(""===n[0].text||void 0)},isEmptyPath:function(e,t){var r=ph.Editor.node(e,t);if(null==r)return!1;var n=Ch(r,1)[0].children;if(1===n.length&&""===n[0].text)return!0;return!1}};function Em(e,t){return ph.Element.isElement(e)?am(e,t):function(e,t){var r=e.text;if(null==r)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var n=r;n=function(e){return e.replace(/ {2}/g," &nbsp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/®/g,"&reg;").replace(/©/g,"&copy;").replace(/™/g,"&trade;")}(n);var o=wm.getParentsNodes(t,e).some(function(e){return"pre"===wm.getNodeType(e)});if(o||(n=n.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(n=n.replace(/&nbsp;/g," ")),""===n){var i=wm.getParentNode(null,e);if(!i||0!==i.children.length)return n;n="<br>"}return tm.forEach(function(t){return n=t(e,n)}),n}(e,t)}var xm=function(e,t){var r=(t.top+t.bottom)/2;return e.top<=r&&e.bottom>=r},Sm=function(e,t,r){var n=wm.toDOMRange(e,t).getBoundingClientRect(),o=wm.toDOMRange(e,r).getBoundingClientRect();return xm(n,o)&&xm(o,n)},Cm=function(e,t){var r,n,o=[];try{for(var i=Sh(ph.Editor.levels(e,{at:t})),a=i.next();!a.done;a=i.next()){var s=Ch(a.value,2),u=s[0],l=s[1],c=wm.findKey(e,u);o.push([l,c])}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o};function Am(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):ph.Transforms.insertNodes(e,t,{mode:"highest"})}var Dm,Tm,km,Nm,Om,Bm,Mm,Fm,Im,Pm,Rm,Lm,_m,zm,jm,Hm,$m,Vm,Um,qm,Gm,Wm,Ym,Km,Xm,Zm,Jm,Qm,ev,tv,rv,nv,ov,iv,av,sv,uv,lv,cv,dv,fv=function(e){var t=e,r=t.onChange,n=t.insertText,o=t.apply,i=t.deleteBackward,a=t.deleteFragment;return t.insertText=function(e){t.getConfig().readOnly||n(e)},t.apply=function(e){var r,n,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,Ah([],Ch(Cm(t,e.path)),!1));break;case"insert_node":case"remove_node":d.push.apply(d,Ah([],Ch(Cm(t,ph.Path.parent(e.path))),!1));break;case"merge_node":var f=ph.Path.previous(e.path);d.push.apply(d,Ah([],Ch(Cm(t,f)),!1));break;case"move_node":var h=ph.Path.common(ph.Path.parent(e.path),ph.Path.parent(e.newPath));d.push.apply(d,Ah([],Ch(Cm(t,h)),!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,Ah([],Ch(Cm(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,Ah([],Ch(Cm(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 p=Sh(d),g=p.next();!g.done;g=p.next()){var m=Ch(g.value,2),v=m[0],y=m[1],b=Ch(ph.Editor.node(t,v),1)[0];yp.set(b,y),"type"in b&&(cp.has(b)&&cp.delete(b),dp.has(b)&&dp.delete(b))}}catch(e){r={error:e}}finally{try{g&&!g.done&&(n=p.return)&&n.call(p)}finally{if(r)throw r.error}}},t.deleteBackward=function(r){if("line"!==r)return i(r);if(e.selection&&ph.Range.isCollapsed(e.selection)){var n=ph.Editor.above(e,{match:function(t){return ph.Element.isElement(t)&&ph.Editor.isBlock(e,t)},at:e.selection});if(n){var o=Ch(n,2)[1],a=ph.Editor.range(e,o,e.selection.anchor),s=function(e,t){var r=ph.Editor.range(e,ph.Range.end(t)),n=Array.from(ph.Editor.positions(e,{at:t})),o=0,i=n.length,a=Math.floor(i/2);if(Sm(e,ph.Editor.range(e,n[o]),r))return ph.Editor.range(e,n[o],r);if(n.length<2)return ph.Editor.range(e,n[n.length-1],r);for(;a!==n.length&&a!==o;)Sm(e,ph.Editor.range(e,n[a]),r)?i=a:o=a,a=Math.floor((o+i)/2);return ph.Editor.range(e,n[i],r)}(t,a);ph.Range.isCollapsed(s)||ph.Transforms.delete(e,{at:s})}}},t.deleteFragment=function(e){var r=function(e){var t=e.selection;if(null==t||ph.Range.isCollapsed(t))return!1;var r=Ch(ph.Range.edges(t),2),n=r[0],o=r[1],i=Ch(ph.Editor.edges(e,[]),2),a=i[0],s=i[1];return ph.Point.equals(n,a)&&ph.Point.equals(o,s)}(t);a(e),r&&(!function(e){var t=[{type:"paragraph",children:[{text:""}]}];ph.Editor.withoutNormalizing(e,function(){for(var r=e.children.length-1;r>=0;r-=1)ph.Transforms.removeNodes(e,{at:[r]});ph.Transforms.insertNodes(e,t,{at:[0]})})}(t),t.children.length>0&&ph.Transforms.select(t,ph.Editor.start(t,[])))},t.onChange=function(){var e=t.selection;null!=e&&Ep.set(t,e),t.emit(Vh),r()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children,r=void 0===e?[]:e,n=t.getConfig().skipCacheTypes,o=void 0===n?["list-item"]:n;return r.map(function(e){var r=wm.getNodeType(e);if(o.includes(r))return Em(e,t);var n=dp.get(e);if(n)return n;var i=Em(e,t);return dp.set(e,i),i}).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map(function(e){return ph.Node.string(e)}).join("\n")},t.getSelectionText=function(){var r=t.selection;return null==r?"":ph.Editor.string(e,r)},t.getElemsByType=function(e,r){var n,o;void 0===r&&(r=!1);var i=[],a=ph.Editor.nodes(t,{at:[],universal:!0});try{for(var s=Sh(a),u=s.next();!u.done;u=s.next()){var l=Ch(u.value,1)[0];if(ph.Element.isElement(l))if(r?l.type.indexOf(e)>=0:l.type===e){var c=wm.findKey(t,l),d=em(l.type,c.id);i.push(wh(wh({},l),{id:d}))}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}return i},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,r=void 0===e?[]:e;if(r.length>1)return!1;var n=r[0];if(null==n)return!0;if(!ph.Element.isElement(n)||"paragraph"!==n.type)return!1;var o=n.children,i=void 0===o?[]:o;if(i.length>1)return!1;var a=i[0];return null==a||ph.Text.isText(a)&&""===a.text},t.clear=function(){ph.Transforms.delete(t,{at:{anchor:ph.Editor.start(t,[]),focus:ph.Editor.end(t,[])}}),0!==t.children.length?function(e){var t=e.children[0];if(1===e.children.length&&ph.Element.isElement(t)&&("paragraph"!==t.type||""!==ph.Node.string(t))&&""===ph.Node.string(t)){var r=[{type:"paragraph",children:[{text:""}]}];ph.Editor.withoutNormalizing(e,function(){ph.Transforms.removeNodes(e,{at:[0]}),ph.Transforms.insertNodes(e,r,{at:[0]})})}}(t):ph.Transforms.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return wm.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,r){if(void 0===e&&(e=""),void 0===r&&(r=!1),e){var n=document.createElement("div");n.innerHTML=e;var o=Array.from(n.childNodes);if(o=o.filter(function(e){var t=e.nodeName;return!!Og(e)||!!kg(e)&&!Tp.has(t.toLowerCase())}),0!==o.length){var i=t.selection;if(null!=i){var a=null;if(wm.isSelectedEmptyParagraph(t)&&!r)a=[i.focus.path[0]];n.setAttribute("hidden","true"),document.body.appendChild(n);var s=0;o.forEach(function(e,r){var n=e.nodeName,i=e.textContent,a=void 0===i?"":i;if(Og(e)){if(!a||!a.trim())return;t.insertNode({text:a})}else if("BR"!==n){var u=e,l=!1;if(zg.includes(n.toLowerCase()))l=!0;else for(var c in $g)if(u.matches(c)){l=!0;break}if(l){var d=Zg(_p(u),t);return Array.isArray(d)?(d.forEach(function(e){return Am(t,e)}),s+=1):(Am(t,d),s+=1),void(wm.isSelectedVoidNode(t)&&t.move(1))}var f=window.getComputedStyle(u).display;if(!wm.isSelectedEmptyParagraph(t)&&f.indexOf("inline")<0){if(r>=1)(function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")})(o[r-1])&&t.insertBreak();t.insertBreak()}t.dangerouslyInsertHtml(u.innerHTML,!0)}else t.insertText("\n")}),s&&a&&wm.isEmptyPath(t,a)&&ph.Transforms.removeNodes(t,{at:a}),n.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var r=t.isDisabled(),n=t.isFocused(),o=JSON.stringify(t.selection);t.enable(),Ep.delete(t),t.focus(),t.clear();var i=Qg(t,null==e?"":e);if(ph.Transforms.insertFragment(t,i),n||(t.deselect(),t.blur()),r&&(t.deselect(),t.disable()),t.isFocused())try{var a=JSON.parse(o);ph.Range.isRange(a)&&wm.hasRange(t,a)?t.select(a):t.select(ph.Editor.start(t,[]))}catch(e){t.select(ph.Editor.start(t,[]))}},t},hv=1,pv=function(e){var t=e;return t.id="wangEditor-".concat(hv),hv+=1,t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(wm.toDOMNode(t,t).focus({preventScroll:!0}),wp.set(t,!0),e){var r=ph.Editor.end(t,[]);ph.Transforms.select(t,r)}else{var n=Ep.get(t);n?ph.Transforms.select(t,n):ph.Transforms.select(t,ph.Editor.start(t,[]))}},t.isFocused=function(){return!!wp.get(t)},t.blur=function(){wm.toDOMNode(t,t).blur(),ph.Transforms.deselect(t),wp.set(t,!1)},t.updateView=function(){wm.getTextarea(t).changeViewState();var e=wm.getToolbar(t);e&&e.changeToolbarState();var r=wm.getHoverbar(t);r&&r.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=wm.getTextarea(t);e.destroy(),Zh.delete(t),Jh.delete(e);var r=wm.getToolbar(t);r&&(r.destroy(),ep.delete(t),Qh.delete(r));var n=wm.getHoverbar(t);n&&(n.destroy(),rp.delete(t),tp.delete(n)),t.isDestroyed=!0,t.emit($h)}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var r="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return r+="\nYou has disabled editor scroll, please do this yourself",void console.warn(r)}var n=_p("#".concat(e));if(0!==n.length){var o=n[0];if(!wm.hasDOMNode(t,o)){r="Element (found by id is '".concat(e,"') is not in editor DOM");return r+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(r,o)}var i=wm.getTextarea(t),a=i.$textAreaContainer,s=i.$scroll,u=n.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||wm.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=op.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 wm.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,r=wm.getToolbar(t);r&&(e=r.$box);var n=wm.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==n[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 父节点不一致")}n.addClass("w-e-full-screen-container");var o=n.css("z-index");n.attr("data-z-index",o.toString()),t.isFullScreen=!0,t.emit(qh)}},t.unFullScreen=function(){if(t.isFullScreen){var e=wm.getTextarea(t).$box.parent();setTimeout(function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit(Gh)},200)}},t.getEditableContainer=function(){return wm.getTextarea(t).$textAreaContainer[0]},t},gv={exports:{}},mv={exports:{}};function vv(){if(Tm)return Dm;Tm=1;return Dm=function(e){return null!=e}}function yv(){if(Bm)return Om;Bm=1;var e=function(){if(Nm)return km;Nm=1;var e=vv(),t={object:!0,function:!0,undefined:!0};return km=function(r){return!!e(r)&&hasOwnProperty.call(t,typeof r)}}();return Om=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function bv(){if(Pm)return Im;Pm=1;var e=function(){if(Fm)return Mm;Fm=1;var e=yv();return Mm=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{/}]/,r=Function.prototype.toString;return Im=function(n){return!!e(n)&&!t.test(r.call(n))}}function wv(){if(Vm)return $m;Vm=1;var e=(Hm?jm:(Hm=1,jm=function(){}))();return $m=function(t){return t!==e&&null!==t},$m}function Ev(){return Wm||(Wm=1,Gm=(zm?_m:(zm=1,_m=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(qm)return Um;qm=1;var e=wv(),t=Object.keys;return Um=function(r){return t(e(r)?Object(r):r)}}()),Gm}function xv(){if(Zm)return Xm;Zm=1;var e=Ev(),t=function(){if(Km)return Ym;Km=1;var e=wv();return Ym=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),r=Math.max;return Xm=function(n,o){var i,a,s,u=r(arguments.length,2);for(n=Object(t(n)),s=function(e){try{n[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 n},Xm}function Sv(){return Qm?Jm:(Qm=1,Jm=(Lm||(Lm=1,Rm=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")}),Rm)()?Object.assign:xv())}function Cv(){return sv||(sv=1,av=function(){if(nv)return rv;nv=1;var e="razdwatrzy";return rv=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(iv)return ov;iv=1;var e=String.prototype.indexOf;return ov=function(t){return e.call(this,t,arguments[1])>-1},ov}()),av}function Av(){if(uv)return mv.exports;uv=1;var e=vv(),t=bv(),r=Sv(),n=function(){if(tv)return ev;tv=1;var e=wv(),t=Array.prototype.forEach,r=Object.create;return ev=function(n){var o=r(null);return t.call(arguments,function(t){e(t)&&function(e,t){var r;for(r in e)t[r]=e[r]}(Object(t),o)}),o},ev}(),o=Cv(),i=mv.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?r(n(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?r(n(c),d):d},mv.exports}var Dv=(dv||(dv=1,function(e,t){var r,n,o,i,a,s,u,l=Av(),c=cv?lv:(cv=1,lv=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),d=Function.prototype.apply,f=Function.prototype.call,h=Object.create,p=Object.defineProperty,g=Object.defineProperties,m=Object.prototype.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var r;return c(t),m.call(this,"__ee__")?r=this.__ee__:(r=v.value=h(null),p(this,"__ee__",v),v.value=null),r[e]?"object"==typeof r[e]?r[e].push(t):r[e]=[r[e],t]:r[e]=t,this},n=function(e,t){var n,i;return c(t),i=this,r.call(this,e,n=function(){o.call(i,e,n),d.call(t,this,arguments)}),n.__eeOnceListener__=t,this},o=function(e,t){var r,n,o,i;if(c(t),!m.call(this,"__ee__"))return this;if(!(r=this.__ee__)[e])return this;if("object"==typeof(n=r[e]))for(i=0;o=n[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===n.length?r[e]=n[i?0:1]:n.splice(i,1));else n!==t&&n.__eeOnceListener__!==t||delete r[e];return this},i=function(e){var t,r,n,o,i;if(m.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(r=arguments.length,i=new Array(r-1),t=1;t<r;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;n=o[t];++t)d.call(n,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(r=arguments.length,i=new Array(r-1),t=1;t<r;++t)i[t-1]=arguments[t];d.call(o,this,i)}},a={on:r,once:n,off:o,emit:i},s={on:l(r),once:l(n),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?h(u):g(Object(e),s)},t.methods=a}(gv,gv.exports)),gv.exports),Tv=w(Dv);function kv(e){var t=xp.get(e);return null==t&&(t=Tv(),xp.set(e,t)),t}var Nv=new WeakMap;function Ov(e,t){var r=Nv.get(e);null==r&&(r=new Set,Nv.set(e,r)),r.add(t)}var Bv=function(e){var t=e;return t.on=function(e,r){var n=kv(t);if(n.on(e,r),"destroyed"===e&&Ov(t,r),"destroyed"!==e){var o=function(){return n.off(e,r)};n.on("destroyed",o),Ov(t,o)}},t.once=function(e,r){kv(t).once(e,r)},t.off=function(e,r){kv(t).off(e,r)},t.emit=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=kv(t);if(o.emit.apply(o,Ah([e],Ch(r),!1)),"destroyed"===e){var i=function(e){return Nv.get(e)||new Set}(t);i.forEach(function(e){return o.off("destroyed",e)}),function(e){Nv.set(e,new Set)}(t)}},t};var Mv=function(e){var t=e;return t.setFragmentData=function(e){var r=t.selection;if(r){var n=Ch(ph.Range.edges(r),2),o=n[0],i=n[1],a=ph.Editor.void(t,{at:o.path}),s=ph.Editor.void(t,{at:i.path});if(!ph.Range.isCollapsed(r)||a){var u=wm.toDOMRange(t,r),l=u.cloneContents(),c=l.childNodes[0];if(l.childNodes.forEach(function(e){e.textContent&&""!==e.textContent.trim()&&(c=e)}),s){var d=Ch(s,1)[0],f=u.cloneRange(),h=wm.toDOMNode(t,d);f.setEndAfter(h),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":""}),Og(c)){var p=c.ownerDocument.createElement("span");p.style.whiteSpace="pre",p.appendChild(c),l.appendChild(p),c=p}var g=t.getFragment(),m=JSON.stringify(g),v=window.btoa(encodeURIComponent(m));c.setAttribute("data-slate-fragment",v),e.setData("application/x-slate-fragment",v);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",Ig(y)),l.ownerDocument.body.removeChild(y),e}}},t.insertData=function(e){var r=e.getData("application/x-slate-fragment");if(r){var n=decodeURIComponent(window.atob(r)),o=JSON.parse(n);t.insertFragment(o)}else{var i=e.getData("text/plain"),a=e.getData("text/html");if(a){var s=t.getConfig().sanitizeHtml;t.dangerouslyInsertHtml(s?s(a):a)}else if(i){if(!/[\r\n]/.test(i))return void t.insertText(i);var u=function(e){return e.replace(/\n\r|\r\n|\r/g,"\n").split("\n").map(function(e){return{type:"paragraph",children:[{text:e}]}})}(i);t.insertFragment(u)}}},t};function Fv(e){return e.replace(/\n\r|\r\n|\r|\n/g,"").length}function Iv(e,t){var r,n;if(t<=0)return"";var o=t,i="";try{for(var a=Sh(e),s=a.next();!s.done;s=a.next()){var u=s.value;if(/\r|\n/.test(u))i+=u;else{if(o<=0)break;i+=u,o-=1}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return i}var Pv=function(e){var t=e,r=t.insertText,n=t.insertNode,o=t.insertFragment,i=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var n=wm.getLeftLengthOfMaxLength(t);n<=0||(n<e.length?r(e.slice(0,n)):r(e))}else r(e)},t.insertNode=function(e){if(t.getConfig().maxLength){var r=wm.getLeftLengthOfMaxLength(t);if(!(r<=0))r<ph.Node.string(e).length||n(e)}else n(e)},t.insertFragment=function(e){if(t.getConfig().maxLength){if(e.length>0){var r=e[0];if(wm.getLeftLengthOfMaxLength(t)<ph.Node.string(r).length)return;o([r]);for(var n=1;n<e.length;n+=1)t.insertNode(e[n])}}else o(e)},t.dangerouslyInsertHtml=function(e,r){if(void 0===e&&(e=""),void 0===r&&(r=!1),e)if(t.getConfig().maxLength){var n=wm.getLeftLengthOfMaxLength(t);if(!(n<=0)){var o=function(e,t){if(t<=0)return"";var r=document.createElement("div");r.innerHTML=e;var n=function(e){e.forEach(function(e){return e.remove()})},o=function(e){for(var r=Array.from(e.childNodes),i=0;i<r.length;i+=1){var a=r[i];if(Og(a)){var s=a.textContent||"",u=Fv(s);if(u<=t){t-=u;continue}return a.textContent=Iv(s,t),t=0,n(r.slice(i+1)),!1}if(kg(a)){if(Tp.has(a.nodeName.toLowerCase())){a.remove();continue}if(!o(a))return n(r.slice(i+1)),!1}else a.remove()}return t>0};return o(r),r.innerHTML}(e,n);o&&i(o,r)}}else i(e,r)},t};function Rv(e){var t=wm.getTextarea(e).$textAreaContainer,r=t.width(),n=t.height(),o=t.offset();return{top:o.top,left:o.left,width:r,height:n}}function Lv(e){var t={top:"0",left:"0"},r=e.selection;if(null==r)return t;var n=Rv(e);if(null==n)return t;var o=n.top,i=n.left,a=n.width,s=n.height,u=wm.toDOMRange(e,r).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 h=a-f;c.right="".concat(h+5,"px")}else c.left="".concat(f+5,"px");if(d>s/2){var p=s-d;c.bottom="".concat(p+5,"px")}else{var g=u[u.length-1],m=g.top-o+g.height;m<0&&(m=0),c.top="".concat(m+5,"px")}return c}function _v(e,t,r){void 0===r&&(r="modal");var n={top:"0",left:"0"};if(null==e.selection)return n;var o=ph.Element.isElement(t)&&e.isVoid(t),i=ph.Element.isElement(t)&&e.isInline(t),a=vp.get(t);if(null==a)return n;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 r=0;t.length>0;){var n=t.pop();if(null==n)break;if((r+=1)>1e4)break;var o=n.nodeName;if(n.nodeType===Eg.ELEMENT_NODE){var i=o.toLowerCase();if(yg.includes(i)||"iframe"===i||"video"===i)return n;var a=n.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 h=f.getBoundingClientRect();u=h.top,c=h.height}}var p=Rv(e);if(null==p)return n;var g=p.top,m=p.left,v=p.width,y=p.height,b={},w=u-g,E=l-m;if("bar"===r)return b.left="".concat(E,"px"),w>40?b.bottom="".concat(y-w+5,"px"):b.top="".concat(w+c+5,"px"),b;if("modal"===r){if(o?i?E>(v-d)/2?b.right="".concat(v-E+5,"px"):b.left="".concat(E+d+5,"px"):b.left="20px":b.left="".concat(E,"px"),o)(x=w)<0&&(x=0),b.top="".concat(x,"px");else if(w>(y-c)/2)b.bottom="".concat(y-w+5,"px");else{var x;(x=w+c)<0&&(x=0),b.top="".concat(x+5,"px")}return b}throw new Error("type '".concat(r,"' is invalid"))}function zv(e,t){wg(function(){var r=Rv(e);if(null!=r){var n,o=r.top,i=r.left,a=r.width,s=r.height,u=t.offset(),l=u.top,c=u.left,d=t.width(),f=t.height(),h=l-o,p=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((n=h+f-s)>0){var m=t.css("top"),v=parseInt(m.toString(),10)-n;v<0&&(v=0),t.css("top","".concat(v,"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((n=p+d-a)>0){var w=t.css("left"),E=parseInt(w.toString(),10)-n;E<0&&(E=0),t.css("left","".concat(E,"px"))}if(g.indexOf("right")>=0&&c<0){var x=t.css("right"),S=parseInt(x.toString(),10)-Math.abs(c);t.css("right","".concat(S,"px"))}}})}var jv,Hv,$v=function(e){var t=e,r=t.select,n=t.deselect,o=t.move;return t.select=function(e){r(e)},t.deselect=function(){var e=t.selection,r=wm.findDocumentOrShadowRoot(t).getSelection();r&&r.rangeCount>0&&wm.hasDOMNode(t,r.anchorNode)&&wm.hasDOMNode(t,r.focusNode)&&r.removeAllRanges(),e&&n()},t.move=function(e,t){void 0===t&&(t=!1),"number"==typeof e?e&&(e<0||o({distance:e,unit:"character",reverse:t})):o(e)},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=Ep.get(t);null!=e&&(t.focus(),r(e))},t.getSelectionPosition=function(){return Lv(t)},t.getNodePosition=function(e){return _v(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var r=Ch(ph.Range.edges(e),2),n=r[0],o=r[1],i=Ch(ph.Editor.edges(t,[]),2),a=i[0],s=i[1];return!(!ph.Point.equals(n,a)||!ph.Point.equals(o,s))},t.selectAll=function(){var e=ph.Editor.start(t,[]),n=ph.Editor.end(t,[]);r({anchor:e,focus:n})},t};var Vv=function(){if(Hv)return jv;Hv=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,n=/^0o[0-7]+$/i,o=parseInt,i="object"==typeof b&&b&&b.Object===Object&&b,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 h(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=r.test(i);return s||n.test(i)?o(i.slice(2),s?2:8):t.test(i)?NaN:+i}return jv=function(e,t,r){var n,o,i,a,s,u,p=0,g=!1,m=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var r=n,i=o;return n=o=void 0,p=t,a=e.apply(i,r)}function b(e){var r=e-u;return void 0===u||r>=t||r<0||m&&e-p>=i}function w(){var e=d();if(b(e))return E(e);s=setTimeout(w,function(e){var r=t-(e-u);return m?c(r,i-(e-p)):r}(e))}function E(e){return s=void 0,v&&n?y(e):(n=o=void 0,a)}function x(){var e=d(),r=b(e);if(n=arguments,o=this,u=e,r){if(void 0===s)return function(e){return p=e,s=setTimeout(w,t),g?y(e):a}(u);if(m)return s=setTimeout(w,t),y(u)}return void 0===s&&(s=setTimeout(w,t)),a}return t=h(t)||0,f(r)&&(g=!!r.leading,i=(m="maxWait"in r)?l(h(r.maxWait)||0,t):i,v="trailing"in r?!!r.trailing:v),x.cancel=function(){void 0!==s&&clearTimeout(s),p=0,n=u=o=s=void 0},x.flush=function(){return void 0===s?a:E(d())},x},jv}(),Uv=w(Vv);const qv=e=>"string"==typeof e,Gv=()=>{let e,t;const r=new Promise((r,n)=>{e=r,t=n});return r.resolve=e,r.reject=t,r},Wv=e=>null==e?"":""+e,Yv=/###/g,Kv=e=>e&&e.indexOf("###")>-1?e.replace(Yv,"."):e,Xv=e=>!e||qv(e),Zv=(e,t,r)=>{const n=qv(t)?t.split("."):t;let o=0;for(;o<n.length-1;){if(Xv(e))return{};const t=Kv(n[o]);!e[t]&&r&&(e[t]=new r),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Xv(e)?{}:{obj:e,k:Kv(n[o])}},Jv=(e,t,r)=>{const{obj:n,k:o}=Zv(e,t,Object);if(void 0!==n||1===t.length)return void(n[o]=r);let i=t[t.length-1],a=t.slice(0,t.length-1),s=Zv(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Zv(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=r},Qv=(e,t)=>{const{obj:r,k:n}=Zv(e,t);if(r)return r[n]},ey=(e,t,r)=>{for(const n in t)"__proto__"!==n&&"constructor"!==n&&(n in e?qv(e[n])||e[n]instanceof String||qv(t[n])||t[n]instanceof String?r&&(e[n]=t[n]):ey(e[n],t[n],r):e[n]=t[n]);return e},ty=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var ry={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const ny=e=>qv(e)?e.replace(/[&<>"'\/]/g,e=>ry[e]):e;const oy=[" ",",","?","!",";"],iy=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 r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}(20),ay=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const n=t.split(r);let o=e;for(let e=0;e<n.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<n.length;++a)if(a!==e&&(i+=r),i+=n[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<n.length-1)continue;e+=a-e+1;break}o=t}return o},sy=e=>e&&e.replace("_","-"),uy={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 ly{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||uy,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,n){return n&&!this.debug?null:(qv(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ly(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new ly(this.logger,e)}}var cy=new ly;class dy{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const r=this.observers[e].get(t)||0;this.observers[e].set(t,r+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,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(e=>{let[t,n]=e;for(let e=0;e<n;e++)t(...r)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(t=>{let[n,o]=t;for(let t=0;t<o;t++)n.apply(n,[e,...r])})}}}class fy extends dy{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,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==n.keySeparator?n.keySeparator:this.options.keySeparator,i=void 0!==n.ignoreJSONStructure?n.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],r&&(Array.isArray(r)?a.push(...r):qv(r)&&o?a.push(...r.split(o)):a.push(r)));const s=Qv(this.data,a);return!s&&!t&&!r&&e.indexOf(".")>-1&&(e=a[0],t=a[1],r=a.slice(2).join(".")),!s&&i&&qv(r)?ay(this.data&&this.data[e]&&this.data[e][t],r,o):s}addResource(e,t,r,n){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];r&&(a=a.concat(i?r.split(i):r)),e.indexOf(".")>-1&&(a=e.split("."),n=t,t=a[1]),this.addNamespaces(t),Jv(this.data,a,n),o.silent||this.emit("added",e,t,r,n)}addResources(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const n in r)(qv(r[n])||Array.isArray(r[n]))&&this.addResource(e,t,n,r[n],{silent:!0});n.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,n,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("."),n=r,r=t,t=a[1]),this.addNamespaces(t);let s=Qv(this.data,a)||{};i.skipCopy||(r=JSON.parse(JSON.stringify(r))),n?ey(s,r,o):s={...s,...r},Jv(this.data,a,s),i.silent||this.emit("added",e,t,r)}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 hy={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,r,n,o){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,r,n,o))}),t}};const py={};class gy extends dy{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,r)=>{e.forEach(e=>{t[e]&&(r[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=cy.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 r=this.resolve(e,t);return r&&void 0!==r.res}extractFromKey(e,t){let r=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===r&&(r=":");const n=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=r&&e.indexOf(r)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,r)=>{t=t||"",r=r||"";const n=oy.filter(e=>t.indexOf(e)<0&&r.indexOf(e)<0);if(0===n.length)return!0;const o=iy.getRegExp(`(${n.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(r);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,r,n));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:qv(o)?[o]:o};const i=e.split(r);(r!==n||r===n&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(n)}return{key:e,namespaces:qv(o)?[o]:o}}translate(e,t,r){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 n=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 n?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return n?{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,h=c&&c.exactUsedKey||i,p=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject,v=!qv(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(m&&d&&v&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0)||qv(g)&&Array.isArray(d))if(m&&qv(g)&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,r));else{let n=!1,a=!1;const l=void 0!==t.count&&!qv(t.count),f=gy.hasDefaultValue(t),h=l?this.pluralResolver.getSuffix(u,t.count,t):"",p=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),m=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${h}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(n=!0,d=m),this.isValidLookup(d)||(a=!0,d=i);const v=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=f&&m!==d&&this.options.updateMissing;if(a||n||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?m: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 r=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&r&&r[0])for(let t=0;t<r.length;t++)e.push(r[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const n=(e,r,n)=>{const o=f&&n!==d?n:v;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,r,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,r,o,y,t),this.emit("missingKey",e,s,r,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach(e=>{const r=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&r.indexOf(`${this.options.pluralSeparator}zero`)<0&&r.push(`${this.options.pluralSeparator}zero`),r.forEach(r=>{n([e],i+r,t[`defaultValue${r}`]||m)})}):n(e,i,m))}d=this.extendTranslation(d,e,t,c,r),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||n)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,n?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 n?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(d),r=e?[]:{},n=e?h:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const i=`${n}${o}${e}`;r[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),r[e]===i&&(r[e]=d[e])}d=r}}return n?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}extendTranslation(e,t,r,n,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||n.usedLng,n.usedNS,n.usedKey,{resolved:n});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const a=qv(e)&&(r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=r.replace&&!qv(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,r.lng||this.language||n.usedLng,r),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(r.nest=!1)}!r.lng&&"v1"!==this.options.compatibilityAPI&&n&&n.res&&(r.lng=this.language||n.usedLng),!1!==r.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return o&&o[0]===n[0]&&!r.context?(i.logger.warn(`It seems you are nesting recursively key: ${n[0]} in key: ${t[0]}`),null):i.translate(...n,t)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,s=qv(a)?[a]:a;return null!=e&&s&&s.length&&!1!==r.applyPostProcessor&&(e=hy.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...n,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t,r,n,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return qv(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;r=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&!qv(a.count),d=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&(qv(a.context)||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach(e=>{this.isValidLookup(t)||(i=e,!py[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(py[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${h.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!!!")),h.forEach(r=>{if(this.isValidLookup(t))return;o=r;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,r,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(r,a.count,a));const t=`${this.options.pluralSeparator}zero`,n=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(n)&&i.push(u+e.replace(n,this.options.pluralSeparator)),d&&i.push(u+t)),f){const r=`${u}${this.options.contextSeparator}${a.context}`;i.push(r),c&&(i.push(r+e),a.ordinal&&0===e.indexOf(n)&&i.push(r+e.replace(n,this.options.pluralSeparator)),d&&i.push(r+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(n=s,t=this.getResource(r,e,s,a))}))})}),{res:t,usedKey:r,exactUsedKey:n,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,r,n):this.resourceStore.getResource(e,t,r,n)}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"],r=e.replace&&!qv(e.replace);let n=r?e.replace:e;if(r&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!r){n={...n};for(const e of t)delete n[e]}return n}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,12)&&void 0!==e[r])return!0;return!1}}const my=e=>e.charAt(0).toUpperCase()+e.slice(1);class vy{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=cy.create("languageUtils")}getScriptPartFromCode(e){if(!(e=sy(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=sy(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(qv(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 r=e.split("-");return this.options.lowerCaseLng?r=r.map(e=>e.toLowerCase()):2===r.length?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=my(r[1].toLowerCase()))):3===r.length&&(r[0]=r[0].toLowerCase(),2===r[1].length&&(r[1]=r[1].toUpperCase()),"sgn"!==r[0]&&2===r[2].length&&(r[2]=r[2].toUpperCase()),t.indexOf(r[1].toLowerCase())>-1&&(r[1]=my(r[1].toLowerCase())),t.indexOf(r[2].toLowerCase())>-1&&(r[2]=my(r[2].toLowerCase()))),r.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 r=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(r)||(t=r)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:e.indexOf("-")>0&&r.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.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)),qv(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),n=[],o=e=>{e&&(this.isSupportedCode(e)?n.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return qv(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))):qv(e)&&o(this.formatLanguageCode(e)),r.forEach(e=>{n.indexOf(e)<0&&o(this.formatLanguageCode(e))}),n}}let yy=[{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}],by={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 wy=["v1","v2","v3"],Ey=["v4"],xy={zero:0,one:1,two:2,few:3,many:4,other:5};class Sy{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=cy.create("pluralResolver"),this.options.compatibilityJSON&&!Ey.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 yy.forEach(t=>{t.lngs.forEach(r=>{e[r]={numbers:t.nr,plurals:by[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 r=sy("dev"===e?"en":e),n=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:n});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(r,{type:n})}catch(r){if(!e.match(/-|_/))return;const n=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(n,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 r=this.getRule(e,t);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,r).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=this.getRule(e,t);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((e,t)=>xy[e]-xy[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):r.numbers.map(r=>this.getSuffix(e,r,t)):[]}getSuffix(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.getRule(e,r);return n?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${n.select(t)}`:this.getSuffixRetroCompatible(n,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let n=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===n?n="plural":1===n&&(n=""));const o=()=>this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString();return"v1"===this.options.compatibilityJSON?1===n?"":"number"==typeof n?`_plural_${n.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!wy.includes(this.options.compatibilityJSON)}}const Cy=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,r)=>{const n=Qv(e,r);return void 0!==n?n:Qv(t,r)})(e,t,r);return!i&&o&&qv(r)&&(i=ay(e,r,n),void 0===i&&(i=ay(t,r,n))),i},Ay=e=>e.replace(/\$/g,"$$$$");class Dy{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=cy.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:r,useRawValueToEscape:n,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:h,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:m,alwaysFormat:v}=e.interpolation;this.escape=void 0!==t?t:ny,this.escapeValue=void 0===r||r,this.useRawValueToEscape=void 0!==n&&n,this.prefix=o?ty(o):i||"{{",this.suffix=a?ty(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?ty(d):f||ty("$t("),this.nestingSuffix=h?ty(h):p||ty(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=m||1e3,this.alwaysFormat=void 0!==v&&v,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,r,n){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=Cy(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,r,{...n,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(Cy(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,r,{...n,...t,interpolationkey:i})};this.resetRegExp();const l=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler,c=n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,d=[{regex:this.regexpUnescape,safeValue:e=>Ay(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?Ay(this.escape(e)):Ay(e)}];return d.forEach(t=>{for(a=0;o=t.regex.exec(e);){const r=o[1].trim();if(i=u(r),void 0===i)if("function"==typeof l){const t=l(e,o,n);i=qv(t)?t:""}else if(n&&Object.prototype.hasOwnProperty.call(n,r))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${r} for interpolating ${e}`),i=""}else qv(i)||this.useRawValueToEscape||(i=Wv(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 r,n,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const r=this.nestingOptionsSeparator;if(e.indexOf(r)<0)return e;const n=e.split(new RegExp(`${r}[ ]*{`));let i=`{${n[1]}`;e=n[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}${r}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&!qv(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==r[0].indexOf(this.formatSeparator)&&!/{.*}/.test(r[1])){const e=r[1].split(this.formatSeparator).map(e=>e.trim());r[1]=e.shift(),s=e,u=!0}if(n=t(a.call(this,r[1].trim(),o),o),n&&r[0]===e&&!qv(n))return n;qv(n)||(n=Wv(n)),n||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),n=""),u&&(n=s.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:r[1].trim()}),n.trim())),e=e.replace(r[0],n),this.regexp.lastIndex=0}return e}}const Ty=e=>{const t={};return(r,n,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=n+JSON.stringify(i);let s=t[a];return s||(s=e(sy(n),o),t[a]=s),s(r)}};class ky{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=cy.create("formatter"),this.options=e,this.formats={number:Ty((e,t)=>{const r=new Intl.NumberFormat(e,{...t});return e=>r.format(e)}),currency:Ty((e,t)=>{const r=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>r.format(e)}),datetime:Ty((e,t)=>{const r=new Intl.DateTimeFormat(e,{...t});return e=>r.format(e)}),relativetime:Ty((e,t)=>{const r=new Intl.RelativeTimeFormat(e,{...t});return e=>r.format(e,t.range||"day")}),list:Ty((e,t)=>{const r=new Intl.ListFormat(e,{...t});return e=>r.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()]=Ty(t)}format(e,t,r){let n=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 r={};if(e.indexOf("(")>-1){const n=e.split("(");t=n[0].toLowerCase().trim();const o=n[1].substring(0,n[1].length-1);"currency"===t&&o.indexOf(":")<0?r.currency||(r.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?r.range||(r.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...n]=e.split(":"),o=n.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();r[i]||(r[i]=o),"false"===o&&(r[i]=!1),"true"===o&&(r[i]=!0),isNaN(o)||(r[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:r}})(t);if(this.formats[o]){let t=e;try{const a=n&&n.formatParams&&n.formatParams[n.interpolationkey]||{},s=a.locale||a.lng||n.locale||n.lng||r;t=this.formats[o](e,s,{...i,...n,...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 Ny extends dy{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=n,this.logger=cy.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=n.maxParallelReads||10,this.readingCalls=0,this.maxRetries=n.maxRetries>=0?n.maxRetries:5,this.retryTimeout=n.retryTimeout>=1?n.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,n.backend,n)}queueLoad(e,t,r,n){const o={},i={},a={},s={};return e.forEach(e=>{let n=!0;t.forEach(t=>{const a=`${e}|${t}`;!r.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,n=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),n||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:n}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,r){const n=e.split("|"),o=n[0],i=n[1];t&&this.emit("failedLoading",o,i,t),!t&&r&&this.store.addResourceBundle(o,i,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const a={};this.queue.forEach(r=>{((e,t,r)=>{const{obj:n,k:o}=Zv(e,t,Object);n[o]=n[o]||[],n[o].push(r)})(r.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(r,e),t&&r.errors.push(t),0!==r.pendingCount||r.done||(Object.keys(r.loaded).forEach(e=>{a[e]||(a[e]={});const t=r.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,r){let n=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:r,tried:n,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&&n<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,r,n+1,2*o,i)},o):i(a,s)},s=this.backend[r].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const r=s(e,t);r&&"function"==typeof r.then?r.then(e=>a(null,e)).catch(a):a(null,r)}catch(e){a(e)}}prepareLoading(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=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."),n&&n();qv(e)&&(e=this.languageUtils.toResolveHierarchy(e)),qv(t)&&(t=[t]);const o=this.queueLoad(e,t,r,n);if(!o.toLoad.length)return o.pending.length||n(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=e.split("|"),n=r[0],o=r[1];this.read(n,o,"read",void 0,void 0,(r,i)=>{r&&this.logger.warn(`${t}loading namespace ${o} for language ${n} failed`,r),!r&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${n}`,i),this.loaded(e,r,i)})}saveMissing(e,t,r,n,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 "${r}" 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!=r&&""!==r){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,r,n,s):u(e,t,r,n),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,r,n,a,s)}e&&e[0]&&this.store.addResource(e[0],t,r,n)}}}const Oy=()=>({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]),qv(e[1])&&(t.defaultValue=e[1]),qv(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const r=e[3]||e[2];Object.keys(r).forEach(e=>{t[e]=r[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),By=e=>(qv(e.ns)&&(e.ns=[e.ns]),qv(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),qv(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),My=()=>{};class Fy extends dy{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var r;if(super(),this.options=By(e),this.services={},this.logger=cy,this.modules={external:[]},r=this,Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(e=>{"function"==typeof r[e]&&(r[e]=r[e].bind(r))}),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]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(r=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(qv(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const n=Oy();this.options={...n,...this.options,...By(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...n.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?cy.init(o(this.modules.logger),this.options):cy.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=ky);const r=new vy(this.options);this.store=new fy(this.options.resources,this.options);const i=this.services;i.logger=cy,i.resourceStore=this.store,i.languageUtils=r,i.pluralResolver=new Sy(r,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==n.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 Dy(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Ny(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit(t,...n)}),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 gy(this.services,this.options),this.translator.on("*",function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];e.emit(t,...n)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,r||(r=My),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=Gv(),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),r(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]:My;const r=qv(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],n=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(r)n(r);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>n(e))}this.options.preload&&this.options.preload.forEach(e=>n(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,r){const n=Gv();return"function"==typeof e&&(r=e,e=void 0),"function"==typeof t&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=My),this.services.backendConnector.reload(e,t,e=>{n.resolve(),r(e)}),n}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&&hy.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 r=this;this.isLanguageChangingTo=e;const n=Gv();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,n.resolve(function(){return r.t(...arguments)}),t&&t(e,function(){return r.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);const r=qv(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);r&&(this.language||o(r),this.translator.language||this.translator.changeLanguage(r),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(r)),this.loadResources(r,e=>{i(e,r)})};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()),n}getFixedT(e,t,r){var n=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=n.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||r||o.keyPrefix);const l=n.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,n.t(c,i)};return qv(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=r,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 r=t.lng||this.resolvedLanguage||this.languages[0],n=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;const i=(e,t)=>{const r=this.services.backendConnector.state[`${e}|${t}`];return-1===r||0===r||2===r};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(r,e)||n&&!i(o,e)))}loadNamespaces(e,t){const r=Gv();return this.options.ns?(qv(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=Gv();qv(e)&&(e=[e]);const n=this.options.preload||[],o=e.filter(e=>n.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=n.concat(o),this.loadResources(e=>{r.resolve(),t&&t(e)}),r):(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 vy(Oy());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 Fy(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]:My;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const n={...this.options,...e,isClone:!0},o=new Fy(n);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)},r&&(o.store=new fy(this.store.data,n),o.services.resourceStore=o.store),o.translator=new gy(o.services,n),o.translator.on("*",function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];o.emit(e,...r)}),o.init(n,t),o.translator.options=n,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 Iy=Fy.createInstance();Iy.createInstance=Fy.createInstance,Iy.createInstance,Iy.dir,Iy.init,Iy.loadResources,Iy.reloadResources,Iy.use,Iy.changeLanguage,Iy.getFixedT,Iy.t,Iy.exists,Iy.setDefaultNamespace,Iy.hasLoadedNamespace,Iy.loadNamespaces,Iy.loadLanguages;var Py="translation";function Ry(e,t){Iy.addResourceBundle(e,Py,t,!0,!0)}function Ly(e){return Iy.on("languageChanged",e),function(){return Iy.off("languageChanged",e)}}Iy.init({lng:"zh-CN",resources:{}});var _y=Iy.t.bind(Iy);function zy(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&&zy(t)}}function jy(){return _p('<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 Hy(){return _p('<div class="w-e-bar-divider"></div>')}function $y(e,t,r,n,o){if(void 0===n&&(n=""),void 0===o&&(o=!1),t){if(n){var i=dm?"cmd":"ctrl";n=n.replace("mod",i)}if(o)n&&(e.attr("data-tooltip",n),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=n?"".concat(r,"\n").concat(n):r;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var Vy=function(){function e(e,t,r){void 0===r&&(r=!1);var n=this;this.$elem=_p('<div class="w-e-bar-item"></div>'),this.$button=_p('<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=_p(c);zy(f),d.append(f)}else d.text(a);$y(d,c,a,u,r),r&&c&&d.append(_p('<span class="title">'.concat(a,"</span>"))),i&&d.css("width","".concat(i,"px")),d.attr("data-menu-key",e),this.$elem.append(d),wg(function(){return n.init()})}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(t){t.preventDefault(),nb(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())})},e.prototype.exec=function(){var e=nb(this),t=this.menu,r=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,r)},e.prototype.setActive=function(){var e=nb(this),t=this.$button,r="active";this.menu.isActive(e)?t.addClass(r):t.removeClass(r)},e.prototype.setDisabled=function(){var e=nb(this),t=this.$button,r=this.menu.isDisabled(e);(null==e.selection||e.isDisabled())&&(r=!0),this.menu.alwaysEnable&&(r=!1);var n="disabled";r?t.addClass(n):t.removeClass(n),this.disabled=r},e.prototype.setIcon=function(){var e=nb(this),t=this.$button;if(this.menu.getIcon){var r=this.menu.getIcon(e);if(r){t.find("svg").remove();var n=_p(r);zy(n),t.append(n)}}},e.prototype.setTooltip=function(){var e=nb(this),t=this.$button;if(this.menu.getTitle){var r=this.menu.getTitle(e),n=this.menu.iconSvg;r&&n&&$y(t,n,r)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),Uy=function(e){function t(t,r,n){return void 0===n&&(n=!1),e.call(this,t,r,n)||this}return bh(t,e),t.prototype.onButtonClick=function(){},t}(Vy),qy=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=op.get(e);null==t&&(t=new Set,op.set(e,t)),t.add(this),ip.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var r=this.genSelfElem();r&&t.append(r)},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=ip.get(this);e&&e.emit(Wh,this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=ip.get(this);e&&e.emit(Yh)}},e}(),Gy=function(e){function t(t){var r=e.call(this,t)||this;return r.type="dropPanel",r.$elem=_p('<div class="w-e-drop-panel"></div>'),r}return bh(t,e),t.prototype.genSelfElem=function(){return null},t}(qy),Wy=function(e){function t(t,r,n){void 0===n&&(n=!1);var o=e.call(this,t,r,n)||this;if(o.dropPanel=null,o.menu=r,r.showDropPanel){var i=jy();o.$button.append(i)}return o}return bh(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=nb(this);if(null==this.dropPanel){var r=new Gy(t),n=e.getPanelContentElem(t);r.renderContent(n),r.appendTo(this.$elem),r.show(),this.dropPanel=r}else{var o=this.dropPanel;if(o.isShow)o.hide();else{n=e.getPanelContentElem(t);o.renderContent(n),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}(Vy),Yy=function(e){function t(t,r){void 0===r&&(r=0);var n=e.call(this,t)||this;n.type="modal",n.$elem=_p('<div class="w-e-modal"></div>'),n.width=0,r&&(n.width=r);var o=n.$elem;return o.on("click",function(e){return e.stopPropagation()}),o.on("keyup",function(e){"Escape"===e.code&&(n.hide(),t.restoreSelection())}),n}return bh(t,e),t.prototype.genSelfElem=function(){var e=this,t=_p('<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>")),r=ip.get(this);return t.on("click",function(){e.hide(),null==r||r.restoreSelection()}),t},t.prototype.setStyle=function(e){var t=this.width,r=this.$elem;r.attr("style",""),t&&r.css("width","".concat(t,"px")),r.css(e)},t}(qy);function Ky(e,t,r){var n=_p('<label class="babel-container"></label>');n.append("<span>".concat(e,"</span>"));var o=_p('<input type="text" id="'.concat(t,'" placeholder="').concat(r||"",'">'));return n.append(o),[n[0],o[0]]}function Xy(e,t,r){var n=_p('<label class="babel-container"></label>');n.append("<span>".concat(e,"</span>"));var o=_p('<textarea type="text" id="'.concat(t,'" placeholder="').concat(r||"",'"></textarea>'));return n.append(o),[n[0],o[0]]}function Zy(e,t){var r=_p('<div class="button-container"></div>'),n=_p('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return r.append(n),[r[0],n[0]]}var Jy=function(e){function t(t,r,n){void 0===n&&(n=!1);var o=e.call(this,t,r,n)||this;return o.$body=_p("body"),o.modal=null,o.menu=r,o}return bh(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=nb(this),t=this.menu.getModalPositionNode(e);return ph.Element.isElement(t)?_v(e,t,"modal"):Lv(e)},t.prototype.handleModal=function(){var e=nb(this),t=this.menu;if(null==this.modal){var r=new Yy(e,t.modalWidth);this.renderAndShowModal(r,!0),this.modal=r}else{(r=this.modal).isShow?r.hide():this.renderAndShowModal(r,!1)}},t.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var r=nb(this),n=this.menu;if(null!=n.getModalContentElem){var o=wm.getTextarea(r),i=wm.getToolbar(r),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=n.getModalContentElem(r);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||zv(r,e.$elem),setTimeout(function(){r.blur()})}},t}(Vy);var Qy=function(e){function t(t,r){var n=e.call(this,t)||this;return n.type="selectList",n.$elem=_p('<div class="w-e-select-list"></div>'),r&&n.$elem.css("width","".concat(r,"px")),n.$elem.on("click",function(e){e.stopPropagation()}),n}return bh(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var r=_p("<ul></ul>");e.forEach(function(e){var t=e.value,n=e.text,o=e.selected,i=e.styleForRenderMenuList,a=_p('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var s=_p('<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(_p('<span data-value="'.concat(t,'">').concat(n,"</span>"))),a.attr("title",n),r.append(a)}),t.append(r)},t.prototype.genSelfElem=function(){return null},t}(qy);var eb=function(){function e(e,t,r){void 0===r&&(r=!1);var n=this;this.$elem=_p('<div class="w-e-bar-item"></div>'),this.$button=_p('<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),$y(d,u,i,c,r),this.$elem.append(d),this.menu=t,wg(function(){return n.init()})}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",function(t){t.preventDefault(),nb(e).hidePanelOrModal(),e.trigger()})},e.prototype.trigger=function(){var e=this,t=nb(this);if(!t.isDisabled()&&!this.disabled){var r=this.menu;if(null==this.selectList){this.selectList=new Qy(t,r.selectPanelWidth);var n=this.selectList,o=r.getOptions(t);n.renderList(o),n.appendTo(this.$elem),n.show(),n.$elem.on("click","li",function(t){var r=t.target;if(null!=r){t.preventDefault();var n=_p(r).attr("data-value");e.onChange(n)}})}else{if((n=this.selectList).isShow)n.hide();else{o=r.getOptions(t);n.renderList(o),n.show()}}}},e.prototype.onChange=function(e){var t=nb(this),r=this.menu;r.exec&&r.exec(t,e)},e.prototype.setSelectedValue=function(){var e=nb(this),t=this.menu,r=t.getValue(e),n=function(e,t){for(var r=e.length,n="",o=0;o<r;o++){var i=e[o];if(i.value===t){n=i.text;break}}return n}(t.getOptions(e),r.toString()),o=this.$button,i=jy();o.empty(),o.text(n),o.append(i)},e.prototype.setDisabled=function(){var e=nb(this),t=this.menu.isDisabled(e),r=this.$button;(null==e.selection||e.isDisabled())&&(t=!0);var n="disabled";t?r.addClass(n):r.removeClass(n),this.disabled=t},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),tb=function(){function e(e){this.$elem=_p('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=_p('<div class="w-e-bar-item-menus-container"></div>'),this.$button=_p('<button type="button"></button>');var t=e.key,r=e.iconSvg,n=e.title,o=this.$elem,i=this.$button;if(r){var a=_p(r);zy(a),i.append(a)}else i.text(n);i.attr("data-menu-key",t);var s=jy();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,r=this.$button,n=new MutationObserver(function(){var o=t.find("button"),i=o.length;if(0!==i){var a=0;o.each(function(e){_p(e).hasClass("disabled")&&a++}),n.disconnect(),a===i?r.addClass("disabled"):r.removeClass("disabled"),e.observe(n)}});return n},e}(),rb=new WeakMap;function nb(e){var t=np.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function ob(e,t,r){void 0===r&&(r=!1);var n=rb.get(t);if(n)return n;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;n=i?new Wy(e,t,r):a?new Jy(e,t,r):new Uy(e,t,r)}if("select"===o&&(n=new eb(e,t,r)),null==n)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return rb.set(t,n),n}function ib(e,t){var r=e.selection;return null!=r&&(!ph.Range.isCollapsed(r)&&(!wm.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var r=t.type;return!!["pre","code","table"].includes(r)})&&!!ph.Text.isText(t)))}var ab,sb,ub=function(){function e(){var e=this;this.$elem=_p('<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=Uv(function(){var t=e.isShow,r=e.getSelectedNodeAndMenuKeys()||{},n=r.node,o=void 0===n?null:n,i=r.menuKeys,a=void 0===i?[]:i,s=e.getEditorInstance();if(null!=o&&e.changeItemsState(),o&&ph.Element.isElement(o)&&t){var u=e.isSamePath(o,e.prevSelectedNode);if(!ph.Editor.isBlock(s,o)&&u)return}e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o},200),wg(function(){var t=e.getEditorInstance(),r=e.$elem;r.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),wm.getTextarea(t).$textAreaContainer.append(r),t.on(Vh,e.changeHoverbarState);var n=e.hideAndClean.bind(e);t.on(Uh,n),t.on(qh,n),t.on(Gh,n)}),this.lngListen=Ly(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,r="undefined"!=typeof window?window.innerHeight:null;r&&r>=360&&(r-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;wg(function(){e.hoverbarItems.forEach(function(e){e.changeMenuState()})})},e.prototype.registerItems=function(e){var t=this,r=this.$elem;e.forEach(function(e){if("|"!==e)t.registerSingleItem(e);else{var n=Hy();r.append(n)}})},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),r=this.menus,n=r[e];if(null==n){var o=Kh[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"));n=o(),r[e]=n}var i=t.getMenuConfig(e);i&&void 0!==i.iconSvg&&(n.iconSvg=i.iconSvg);var a=ob(e,n);this.hoverbarItems.push(a),np.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),r=this.$elem;if(r.attr("style",""),ph.Element.isElement(e)){var n=_v(t,e,"bar");return r.css(n),void zv(t,r)}if(ph.Text.isText(e)){n=Lv(t);return r.css(n),void zv(t,r)}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(),r=null,n=[],o=function(o){var i=t[o],a=i.match,s=i.menuKeys,u=void 0===s?[]:s,l=a||function(e,t){return wm.checkNodeType(t,o)},c=Ch(ph.Editor.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),d=c[0];if(null!=d)return r=d[0],n=u,"break"};for(var i in t){if("break"===o(i))break}return null==r||0===n.length?null:{node:r,menuKeys:n}},e.prototype.getEditorInstance=function(){var e=tp.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,r=t.text;return r&&null==r.match&&(r.match=ib),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var r=wm.findPath(null,e),n=wm.findPath(null,t);return ph.Path.equals(r,n)},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 lb(){if(sb)return ab;sb=1;var e="Expected a function",t=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,o=/^0o[0-7]+$/i,i=parseInt,a="object"==typeof b&&b&&b.Object===Object&&b,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 h(t,r,n){var o,i,a,s,u,l,h=0,m=!1,v=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var r=o,n=i;return o=i=void 0,h=e,s=t.apply(n,r)}function w(e){var t=e-l;return void 0===l||t>=r||t<0||v&&e-h>=a}function E(){var e=f();if(w(e))return x(e);u=setTimeout(E,function(e){var t=r-(e-l);return v?d(t,a-(e-h)):t}(e))}function x(e){return u=void 0,y&&o?b(e):(o=i=void 0,s)}function S(){var e=f(),t=w(e);if(o=arguments,i=this,l=e,t){if(void 0===u)return function(e){return h=e,u=setTimeout(E,r),m?b(e):s}(l);if(v)return u=setTimeout(E,r),b(l)}return void 0===u&&(u=setTimeout(E,r)),s}return r=g(r)||0,p(n)&&(m=!!n.leading,a=(v="maxWait"in n)?c(g(n.maxWait)||0,r):a,y="trailing"in n?!!n.trailing:y),S.cancel=function(){void 0!==u&&clearTimeout(u),h=0,o=l=i=u=void 0},S.flush=function(){return void 0===u?s:x(f())},S}function p(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(p(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=p(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var s=n.test(e);return s||o.test(e)?i(e.slice(2),s?2:8):r.test(e)?NaN:+e}return ab=function(t,r,n){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(e);return p(n)&&(o="leading"in n?!!n.leading:o,i="trailing"in n?!!n.trailing:i),h(t,r,{leading:o,maxWait:r,trailing:i})}}var cb=w(lb());function db(e,t){return Dg(t)&&wm.hasDOMNode(e,t,{editable:!0})}function fb(e,t){return Dg(t)&&wm.hasDOMNode(e,t)}function hb(e,t){return db(e,t)||function(e,t){if(e.getConfig().readOnly)return!1;var r=fb(e,t)&&wm.toSlateNode(e,t);return!!r&&ph.Element.isElement(r)&&ph.Editor.isVoid(e,r)}(e,t)}const pb=e=>"object"==typeof e&&null!=e&&1===e.nodeType,gb=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,mb=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const r=getComputedStyle(e,null);return gb(r.overflowY,t)||gb(r.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},vb=(e,t,r,n,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=r||a>=t&&s>=r?i-e-n:a>t&&s<r||i<e&&s>r?a-t+o:0,yb=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},bb=(e,t)=>{var r,n,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(!pb(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,h=[];let p=e;for(;pb(p)&&d(p);){if(p=yb(p),p===f){h.push(p);break}null!=p&&p===document.body&&mb(p)&&!mb(document.documentElement)||null!=p&&mb(p,c)&&h.push(p)}const g=null!=(n=null==(r=window.visualViewport)?void 0:r.width)?n:innerWidth,m=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:v,scrollY:y}=window,{height:b,width:w,top:E,right:x,bottom:S,left:C}=e.getBoundingClientRect(),{top:A,right:D,bottom:T,left:k}=(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 N="start"===s||"nearest"===s?E-A:"end"===s?S+T:E+b/2-A+T,O="center"===u?C+w/2-k+D:"end"===u?x+D:C-k;const B=[];for(let e=0;e<h.length;e++){const t=h[e],{height:r,width:n,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&E>=0&&C>=0&&S<=m&&x<=g&&(t===f&&!mb(t)||E>=o&&S<=l&&C>=c&&x<=i))return B;const d=getComputedStyle(t),p=parseInt(d.borderLeftWidth,10),A=parseInt(d.borderTopWidth,10),D=parseInt(d.borderRightWidth,10),T=parseInt(d.borderBottomWidth,10);let k=0,M=0;const F="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-D:0,I="offsetHeight"in t?t.offsetHeight-t.clientHeight-A-T:0,P="offsetWidth"in t?0===t.offsetWidth?0:n/t.offsetWidth:0,R="offsetHeight"in t?0===t.offsetHeight?0:r/t.offsetHeight:0;if(f===t)k="start"===s?N:"end"===s?N-m:"nearest"===s?vb(y,y+m,m,A,T,y+N,y+N+b,b):N-m/2,M="start"===u?O:"center"===u?O-g/2:"end"===u?O-g:vb(v,v+g,g,p,D,v+O,v+O+w,w),k=Math.max(0,k+y),M=Math.max(0,M+v);else{k="start"===s?N-o-A:"end"===s?N-l+T+I:"nearest"===s?vb(o,l,r,A,T+I,N,N+b,b):N-(o+r/2)+I/2,M="start"===u?O-c-p:"center"===u?O-(c+n/2)+F/2:"end"===u?O-i+D+F:vb(c,i,n,p,D+F,O,O+w,w);const{scrollLeft:e,scrollTop:a}=t;k=0===R?0:Math.max(0,Math.min(a+k/R,t.scrollHeight-r/R+I)),M=0===P?0:Math.max(0,Math.min(e+M/P,t.scrollWidth-n/P+F)),N+=a-k,O+=e-M}B.push({el:t,top:k,left:M})}return B};function wb(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 r=(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(bb(e,t));const n="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of bb(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-r.top+r.bottom,t=a-r.left+r.right;o.scroll({top:e,left:t,behavior:n})}}function Eb(e){null!=e.selection&&(e.selection=null,e.onChange())}function xb(e,t,r){void 0===r&&(r=!1);var n=t.selection,o=t.getConfig(),i=wm.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||r)&&t.isFocused()){var a="None"!==i.type;if(n||a){var s=pp.get(t),u=!1;if(s.contains(i.anchorNode)&&s.contains(i.focusNode)&&(u=!0),a&&u&&n){var l=wm.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(l&&ph.Range.equals(l,n)){var c=!0;if(ph.Range.isCollapsed(n)){var d=i.anchorNode,f=i.anchorOffset;if(d===s){var h=s.childNodes,p=void 0;(p=h[f])&&p.matches("table")&&(c=!1),(p=h[f-1])&&p.matches("table")&&(c=!1)}}if(c)return}}if(!n||wm.hasRange(t,n)){e.isUpdatingSelection=!0;var g=n&&wm.toDOMRange(t,n);if(g){ph.Range.isBackward(n)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var m=g.startContainer.parentElement;if(!m.closest("[data-slate-spacer]")&&g.getBoundingClientRect){var v=g.getBoundingClientRect.bind(g)();0===v.top&&0===v.right&&0===v.bottom&&0===v.left&&0===v.height&&0===v.width||(m.getBoundingClientRect=g.getBoundingClientRect.bind(g));var y=document.body;wb(m,{scrollMode:"if-needed",boundary:o.scroll&&s.parentElement||y,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else i.removeAllRanges();setTimeout(function(){g&&fm&&s.focus(),e.isUpdatingSelection=!1})}else t.selection=wm.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var Sb=new WeakMap,Cb=new WeakMap;var Ab,Db={};var Tb=function(){if(Ab)return Db;Ab=1,Object.defineProperty(Db,"__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"},r={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"},n={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++)n["f"+o]=111+o;function i(e,t,r){t&&!("byKey"in t)&&(r=t,t=null),Array.isArray(e)||(e=[e]);var n=e.map(function(e){return a(e,t)}),o=function(e){return n.some(function(t){return s(t,e)})};return null==r?o:o(r)}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,h=!1,p=void 0;try{for(var g,m=s[Symbol.iterator]();!(f=(g=m.next()).done);f=!0){var v=g.value,y=v.endsWith("?")&&v.length>1;y&&(v=v.slice(0,-1));var b=l(v),w=t[b];if(v.length>1&&!w&&!r[v]&&!n[b])throw new TypeError('Unknown modifier: "'+v+'"');1!==c&&w||(i?a.key=b:a.which=u(v)),w&&(a[w]=!y||null)}}catch(e){h=!0,p=e}finally{try{!f&&m.return&&m.return()}finally{if(h)throw p}}return a}function s(e,t){for(var r in e){var n=e[r],o=void 0;if(null!=n&&((null!=(o="key"===r&&null!=t.key?t.key.toLowerCase():"which"===r?91===n&&93===t.which?91:t.which:t[r])||!1!==n)&&o!==n))return!1}return!0}function u(e){return e=l(e),n[e]||e.toUpperCase().charCodeAt(0)}function l(e){return e=e.toLowerCase(),e=r[e]||e}return Db.default=i,Db.isHotkey=i,Db.isCodeHotkey=function(e,t){return i(e,t)},Db.isKeyHotkey=function(e,t){return i(e,{byKey:!0},t)},Db.parseHotkey=a,Db.compareHotkey=s,Db.toKeyCode=u,Db.toKeyName=l,Db}(),kb={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"},Nb={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"},Ob={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Bb=function(e){var t=kb[e],r=Nb[e],n=Ob[e],o=t&&Tb.isKeyHotkey(t),i=r&&Tb.isKeyHotkey(r),a=n&&Tb.isKeyHotkey(n);return function(e){return!(!o||!o(e))||(!!(dm&&i&&i(e))||!(dm||!a||!a(e)))}},Mb={isBold:Bb("bold"),isCompose:Bb("compose"),isMoveBackward:Bb("moveBackward"),isMoveForward:Bb("moveForward"),isDeleteBackward:Bb("deleteBackward"),isDeleteForward:Bb("deleteForward"),isDeleteLineBackward:Bb("deleteLineBackward"),isDeleteLineForward:Bb("deleteLineForward"),isDeleteWordBackward:Bb("deleteWordBackward"),isDeleteWordForward:Bb("deleteWordForward"),isExtendBackward:Bb("extendBackward"),isExtendForward:Bb("extendForward"),isExtendLineBackward:Bb("extendLineBackward"),isExtendLineForward:Bb("extendLineForward"),isItalic:Bb("italic"),isMoveLineBackward:Bb("moveLineBackward"),isMoveLineForward:Bb("moveLineForward"),isMoveWordBackward:Bb("moveWordBackward"),isMoveWordForward:Bb("moveWordForward"),isRedo:Bb("redo"),isSplitBlock:Bb("splitBlock"),isTransposeCharacter:Bb("transposeCharacter"),isUndo:Bb("undo"),isTab:Bb("tab"),isSelectAll:Bb("selectAll")};function Fb(e){e.preventDefault()}var Ib={beforeinput:function(e,t,r){var n,o=e,i=r.getConfig().readOnly;if(vm&&!i&&db(r,o.target)){null===(n=t.flushDOMSelectionChange)||void 0===n||n.call(t);var a=r.selection,s=o.inputType,u=o.dataTransfer||o.data||void 0;if("insertCompositionText"!==s&&"deleteCompositionText"!==s){if(o.preventDefault(),!s.startsWith("delete")||s.startsWith("deleteBy")){var l=Ch(o.getTargetRanges(),1)[0];if(l){var c=wm.toSlateRange(r,l,{exactMatch:!1,suppressThrow:!1});a&&ph.Range.equals(a,c)||ph.Transforms.select(r,c)}}if(a&&ph.Range.isExpanded(a)){var d=wm.getSelectedElems(r),f="table"===d[0].type,h="table-cell"!==d[d.length-1].type;if(f&&h)return;if(s.startsWith("delete")){var p=s.endsWith("Backward")?"backward":"forward";return void ph.Editor.deleteFragment(r,{direction:p})}}switch(s){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":ph.Editor.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":ph.Editor.deleteForward(r);break;case"deleteContentBackward":ph.Editor.deleteBackward(r);break;case"deleteEntireSoftLine":ph.Editor.deleteBackward(r,{unit:"line"}),ph.Editor.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":ph.Editor.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":ph.Editor.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":ph.Editor.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":ph.Editor.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":ph.Editor.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":ph.Editor.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":ph.Editor.insertBreak(r);break;case"insertFromDrop":case"insertFromComposition":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromComposition"===s&&(t.isComposing=!1,Cp.set(r,!0)),"insertFromPaste"===s&&!Sp.get(r))break;"[object DataTransfer]"===xg(u)?r.insertData(u):"string"==typeof u&&ph.Editor.insertText(r,u)}}}},blur:function(e,t,r){var n=e,o=t.isUpdatingSelection,i=t.latestElement;if(!r.getConfig().readOnly&&!o&&db(r,n.target)){var a=wm.findDocumentOrShadowRoot(r);if(i!==a.activeElement){var s=n.relatedTarget;if(!(s===wm.toDOMNode(r,r)||kg(s)&&s.hasAttribute("data-slate-spacer"))){if(null!=s&&Dg(s)&&wm.hasDOMNode(r,s)){var u=wm.toSlateNode(r,s);if(ph.Element.isElement(u)&&!r.isVoid(u))return}if(hm){var l=a.getSelection();null==l||l.removeAllRanges()}wp.delete(r)}}}},focus:function(e,t,r){var n=wm.toDOMNode(r,r),o=wm.findDocumentOrShadowRoot(r);t.latestElement=o.activeElement,fm&&e.target!==n?n.focus():wp.set(r,!0)},click:function(e,t,r){if(!r.getConfig().readOnly&&fb(r,e.target)&&Dg(e.target)){var n=wm.toSlateNode(r,e.target),o=wm.findPath(r,n);if(ph.Editor.hasPath(r,o))if(ph.Node.get(r,o)===n){var i=ph.Editor.start(r,o),a=ph.Editor.end(r,o),s=ph.Editor.void(r,{at:i}),u=ph.Editor.void(r,{at:a});if(s&&u&&ph.Path.equals(s[1],u[1])){var l=ph.Editor.range(r,i);ph.Transforms.select(r,l)}}}},compositionstart:function(e,t,r){if(db(r,e.target)){Ap.delete(r);var n=r.selection;if(n&&ph.Range.isExpanded(n)&&(ph.Editor.deleteFragment(r),Promise.resolve().then(function(){xb(t,r,!0)})),r.selection){var o=wm.toDOMRange(r,r.selection).startContainer,i=o.textContent||"";Sb.set(r,i),Cb.set(r,o)}t.isComposing=!0,function(e,t){var r;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(r=e.$placeholder)||void 0===r||r.hide(),e.showPlaceholder=!1)}(t,r)}},compositionend:function(e,t,r){var n=e;if(db(r,n.target)){t.isComposing=!1;var o=!0===Cp.get(r);o?(Cp.delete(r),Ap.delete(r)):Ap.delete(r);var i=r.selection;if(null!=i){(mm||fm)&&wm.cleanExposedTexNodeInSelectionBlock(r);for(var a=ph.Range.isBackward(i)?i.focus:i.anchor,s=Ch(ph.Editor.node(r,[a.path[0]]),1)[0],u=0;u<a.path.length;u+=1){var l=Ch(ph.Editor.node(r,a.path.slice(0,u+1)),1)[0];if(ph.Element.isElement(l)&&((hm||fm)&&"link"===l.type||"code"===l.type)){wm.setNewKey(s);break}}var c=n.data;if(c&&!o){if(r.getConfig().maxLength){var d=wm.getLeftLengthOfMaxLength(r);if(d<c.length){var f=wm.toDOMRange(r,i);f.startContainer.nodeType===Node.TEXT_NODE&&(f.startContainer.textContent=Sb.get(r)||""),d>0&&ph.Editor.insertText(r,c.slice(0,d)),t.changeViewState()}else ph.Editor.insertText(r,c)}else{var h=wm.findDocumentOrShadowRoot(r).getSelection();h&&function(e,t){if(ph.Range.isCollapsed(t)){var r=t.anchor,n=t.focus;if([2,3].includes(r.path.length)&&[2,3].includes(n.path.length)&&(0===r.offset||0===n.offset)){var o=ph.Editor.node(e,r.path),i=0===r.offset?r.path:n.path,a=[i[0],i[1]-1];if(0===i[1])return!1;var s=ph.Editor.node(e,a);if(ph.Text.isText(s[0])&&ph.Text.isText(o[0]))return!0}}}(r,i)&&(r.selection=wm.toSlateRange(r,h,{exactMatch:!1,suppressThrow:!1})),ph.Editor.insertText(r,c)}hm||setTimeout(function(){var e=r.selection;if(null!=e){var t=Cb.get(r);if(null!=t)wm.toDOMRange(r,e).startContainer!==t&&(t.textContent=Sb.get(r)||"")}})}}}},compositionupdate:function(e,t,r){db(r,e.target)&&(t.isComposing=!0)},keydown:function(e,t,r){var n=e,o=r.selection;if(!r.getConfig().readOnly&&!t.isComposing&&db(r,n.target)){if(function(e,t){var r=ep.get(e),n=r&&r.getMenus(),o=rp.get(e),i=o&&o.getMenus(),a=wh(wh({},n),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&Tb.isHotkey(l,t)&&!u.isDisabled(e)){var c=u.getValue(e);u.exec(e,c)}}}(r,n),Mb.isTab(n))return Fb(n),void r.handleTab();if(Mb.isRedo(n))return Fb(n),void("function"==typeof r.redo&&r.redo());if(Mb.isUndo(n))return Fb(n),void("function"==typeof r.undo&&r.undo());if(Mb.isMoveLineBackward(n))return Fb(n),void ph.Transforms.move(r,{unit:"line",reverse:!0});if(Mb.isMoveLineForward(n))return Fb(n),void ph.Transforms.move(r,{unit:"line"});if(Mb.isExtendLineBackward(n))return Fb(n),void ph.Transforms.move(r,{unit:"line",edge:"focus",reverse:!0});if(Mb.isExtendLineForward(n))return Fb(n),void ph.Transforms.move(r,{unit:"line",edge:"focus"});if(Mb.isMoveBackward(n))return Fb(n),void(o&&ph.Range.isCollapsed(o)?ph.Transforms.move(r,{reverse:!0}):ph.Transforms.collapse(r,{edge:"start"}));if(Mb.isMoveForward(n))return Fb(n),void(o&&ph.Range.isCollapsed(o)?ph.Transforms.move(r):ph.Transforms.collapse(r,{edge:"end"}));if(Mb.isMoveWordBackward(n))return Fb(n),o&&ph.Range.isExpanded(o)&&ph.Transforms.collapse(r,{edge:"focus"}),void ph.Transforms.move(r,{unit:"word",reverse:!0});if(Mb.isMoveWordForward(n))return Fb(n),o&&ph.Range.isExpanded(o)&&ph.Transforms.collapse(r,{edge:"focus"}),void ph.Transforms.move(r,{unit:"word"});if(Mb.isSelectAll(n))return Fb(n),void r.selectAll();if(vm){if((mm||hm)&&o&&(Mb.isDeleteBackward(n)||Mb.isDeleteForward(n))&&ph.Range.isCollapsed(o)){var i=ph.Node.parent(r,o.anchor.path);if(ph.Element.isElement(i)&&ph.Editor.isVoid(r,i)&&ph.Editor.isInline(r,i))return n.preventDefault(),void ph.Transforms.delete(r,{unit:"block"})}}else{if(Mb.isBold(n)||Mb.isItalic(n)||Mb.isTransposeCharacter(n))return void Fb(n);if(Mb.isSplitBlock(n))return Fb(n),void ph.Editor.insertBreak(r);if(Mb.isDeleteBackward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"backward"}):ph.Editor.deleteBackward(r));if(Mb.isDeleteForward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"forward"}):ph.Editor.deleteForward(r));if(Mb.isDeleteLineBackward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"backward"}):ph.Editor.deleteBackward(r,{unit:"line"}));if(Mb.isDeleteLineForward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"forward"}):ph.Editor.deleteForward(r,{unit:"line"}));if(Mb.isDeleteWordBackward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"backward"}):ph.Editor.deleteBackward(r,{unit:"word"}));if(Mb.isDeleteWordForward(n))return Fb(n),void(o&&ph.Range.isExpanded(o)?ph.Editor.deleteFragment(r,{direction:"forward"}):ph.Editor.deleteForward(r,{unit:"word"}))}}},keypress:function(e,t,r){if(!vm&&!r.getConfig().readOnly&&db(r,e.target)){e.preventDefault();var n=e.key;ph.Editor.insertText(r,n)}},copy:function(e,t,r){var n=e;if(db(r,n.target)){r.getConfig().readOnly||n.preventDefault();var o=n.clipboardData;if(null!=o){r.setFragmentData(o);var i=r.getConfig().customCopy;i&&i(r,n)}}},cut:function(e,t,r){var n=e,o=r.selection;if(!r.getConfig().readOnly&&(n.preventDefault(),db(r,n.target))){var i=n.clipboardData;if(null!=i&&(r.setFragmentData(i),o))if(ph.Range.isExpanded(o))ph.Editor.deleteFragment(r);else{var a=ph.Node.parent(r,o.anchor.path);ph.Element.isElement(a)&&ph.Editor.isVoid(r,a)&&ph.Transforms.delete(r)}}},paste:function(e,t,r){Sp.set(r,!0);var n=e;if(!r.getConfig().readOnly&&db(r,n.target)){var o=r.getConfig().customPaste;if(o)if(!1===o(r,n))return Sp.set(r,!1),void n.preventDefault();if(hm||!vm||function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length}(n)){n.preventDefault();var i=n.clipboardData;null!=i&&r.insertData(i)}}},dragover:function(e,t,r){if(fb(r,e.target)){var n=wm.toSlateNode(r,e.target);ph.Element.isElement(n)&&ph.Editor.isVoid(r,n)&&e.preventDefault()}},dragstart:function(e,t,r){var n=e;if(fb(r,n.target)&&!r.getConfig().readOnly){var o=wm.toSlateNode(r,n.target),i=wm.findPath(r,o);if(ph.Element.isElement(o)&&ph.Editor.isVoid(r,o)||ph.Editor.void(r,{at:i,voids:!0})){var a=ph.Editor.range(r,i);ph.Transforms.select(r,a)}var s=n.dataTransfer;if(null!=s)wm.getSelectedNodeByType(r,"table")||(t.isDraggingInternally=!0,r.setFragmentData(s))}},dragend:function(e,t,r){var n=e;r.getConfig().readOnly||t.isDraggingInternally&&fb(r,n.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,r){var n=e,o=n.dataTransfer;if(!r.getConfig().readOnly&&fb(r,n.target)&&null!=o&&!(vm&&hm&&o.files.length>0)){n.preventDefault();var i=r.selection,a=wm.findEventRange(r,n);ph.Transforms.select(r,a),t.isDraggingInternally&&(i&&ph.Transforms.delete(r,{at:i}),t.isDraggingInternally=!1),r.insertData(o),r.isFocused()||r.focus()}}};function Pb(e){if(Rb(e)){for(;e&&Rb(e);){e=Lb(e).parent}return null!=e?e:null}return e.parentNode}function Rb(e){return 11===e.nodeType}function Lb(e,t){var r,n,o;const i=e;return null!==(r=i.parent)&&void 0!==r||(i.parent=null!=t?t:null),null!==(n=i.firstChildNode)&&void 0!==n||(i.firstChildNode=e.firstChild),null!==(o=i.lastChildNode)&&void 0!==o||(i.lastChildNode=e.lastChild),i}const _b={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,r){return document.createElementNS(e,t,r)},createTextNode:function(e){return document.createTextNode(e)},createDocumentFragment:function(){return Lb(document.createDocumentFragment())},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,r){if(Rb(e)){let t=e;for(;t&&Rb(t);){t=Lb(t).parent}e=null!=t?t:e}Rb(t)&&(t=Lb(t,e)),r&&Rb(r)&&(r=Lb(r).firstChildNode),e.insertBefore(t,r)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){Rb(t)&&(t=Lb(t,e)),e.appendChild(t)},parentNode:Pb,nextSibling:function(e){var t;if(Rb(e)){const r=Lb(e),n=Pb(r);if(n&&r.lastChildNode){const e=Array.from(n.childNodes),o=e.indexOf(r.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:Rb};function zb(e,t,r,n,o){return{sel:e,data:t,children:r,text:n,elm:o,key:void 0===t?void 0:t.key}}const jb=Array.isArray;function Hb(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}const $b=zb("",{},[],void 0,void 0);function Vb(e,t){var r,n;const o=e.key===t.key,i=(null===(r=e.data)||void 0===r?void 0:r.is)===(null===(n=t.data)||void 0===n?void 0:n.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 Ub(e,t,r){var n;const o={};for(let i=t;i<=r;++i){const t=null===(n=e[i])||void 0===n?void 0:n.key;void 0!==t&&(o[t]=i)}return o}const qb=["create","update","remove","destroy","pre","post"];function Gb(e,t,r){const n={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},o=_b;for(const t of qb)for(const r of e){const e=r[t];void 0!==e&&n[t].push(e)}function i(e){const t=e.id?"#"+e.id:"",r=e.getAttribute("class"),n=r?"."+r.split(" ").join("."):"";return zb(o.tagName(e).toLowerCase()+t+n,{},[],void 0,e)}function a(e){return zb(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 r,i,a;let s;const l=e.data,c=null==l?void 0:l.hook;null===(r=null==c?void 0:c.init)||void 0===r||r.call(c,e);const d=e.children,f=e.sel;if("!"===f)null!==(i=e.text)&&void 0!==i||(e.text=""),e.elm=o.createComment(e.text);else if(""===f)e.elm=o.createTextNode(e.text);else if(void 0!==f){const r=f.indexOf("#"),i=f.indexOf(".",r),h=r>0?r:f.length,p=i>0?i:f.length,g=-1!==r||-1!==i?f.slice(0,Math.min(h,p)):f,m=null==l?void 0:l.ns,v=void 0===m?o.createElement(g,l):o.createElementNS(m,g,l);for(e.elm=v,h<p&&v.setAttribute("id",f.slice(h+1,p)),i>0&&v.setAttribute("class",f.slice(p+1).replace(/\./g," ")),s=0;s<n.create.length;++s)n.create[s]($b,e);if(!Hb(e.text)||jb(d)&&0!==d.length||o.appendChild(v,o.createTextNode(e.text)),jb(d))for(s=0;s<d.length;++s){const e=d[s];null!=e&&o.appendChild(v,u(e,t))}void 0!==c&&(null===(a=c.create)||void 0===a||a.call(c,$b,e),void 0!==c.insert&&t.push(e))}else e.elm=o.createTextNode(e.text);return e.elm}function l(e,t,r,n,i,a){for(;n<=i;++n){const i=r[n];null!=i&&o.insertBefore(e,u(i,a),t)}}function c(e){var t,r;const o=e.data;if(void 0!==o){null===(r=null===(t=null==o?void 0:o.hook)||void 0===t?void 0:t.destroy)||void 0===r||r.call(t,e);for(let t=0;t<n.destroy.length;++t)n.destroy[t](e);if(void 0!==e.children)for(let t=0;t<e.children.length;++t){const r=e.children[t];null!=r&&"string"!=typeof r&&c(r)}}}function d(e,t,r,i){for(var a,u;r<=i;++r){let i;const l=t[r];if(null!=l)if(void 0!==l.sel){c(l),i=n.remove.length+1;const e=s(l.elm,i);for(let t=0;t<n.remove.length;++t)n.remove[t](l,e);const t=null===(u=null===(a=null==l?void 0:l.data)||void 0===a?void 0:a.hook)||void 0===u?void 0:u.remove;void 0!==t?t(l,e):e()}else l.children?(c(l),d(e,l.children,0,l.children.length-1)):o.removeChild(e,l.elm)}}function f(e,t,r){var i,a,s,c,h,p,g,m;const v=null===(i=t.data)||void 0===i?void 0:i.hook;null===(a=null==v?void 0:v.prepatch)||void 0===a||a.call(v,e,t);const y=t.elm=e.elm;if(e===t)return;if(void 0!==t.data||void 0!==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 r=0;r<n.update.length;++r)n.update[r](e,t);null===(g=null===(p=null===(h=t.data)||void 0===h?void 0:h.hook)||void 0===p?void 0:p.update)||void 0===g||g.call(p,e,t)}const b=e.children,w=t.children;void 0===t.text?void 0!==b&&void 0!==w?b!==w&&function(e,t,r,n){let i,a,s,c,h=0,p=0,g=t.length-1,m=t[0],v=t[g],y=r.length-1,b=r[0],w=r[y];for(;h<=g&&p<=y;)null==m?m=t[++h]:null==v?v=t[--g]:null==b?b=r[++p]:null==w?w=r[--y]:Vb(m,b)?(f(m,b,n),m=t[++h],b=r[++p]):Vb(v,w)?(f(v,w,n),v=t[--g],w=r[--y]):Vb(m,w)?(f(m,w,n),o.insertBefore(e,m.elm,o.nextSibling(v.elm)),m=t[++h],w=r[--y]):Vb(v,b)?(f(v,b,n),o.insertBefore(e,v.elm,m.elm),v=t[--g],b=r[++p]):(void 0===i&&(i=Ub(t,h,g)),a=i[b.key],void 0===a?(o.insertBefore(e,u(b,n),m.elm),b=r[++p]):void 0===i[w.key]?(o.insertBefore(e,u(w,n),o.nextSibling(v.elm)),w=r[--y]):(s=t[a],s.sel!==b.sel?o.insertBefore(e,u(b,n),m.elm):(f(s,b,n),t[a]=void 0,o.insertBefore(e,s.elm,m.elm)),b=r[++p]));p<=y&&(c=null==r[y+1]?null:r[y+1].elm,l(e,c,r,p,y,n)),h<=g&&d(e,t,h,g)}(y,b,w,r):void 0!==w?(void 0!==e.text&&o.setTextContent(y,""),l(y,null,w,0,w.length-1,r)):void 0!==b?d(y,b,0,b.length-1):void 0!==e.text&&o.setTextContent(y,""):e.text!==t.text&&(void 0!==b&&d(y,b,0,b.length-1),o.setTextContent(y,t.text)),null===(m=null==v?void 0:v.postpatch)||void 0===m||m.call(v,e,t)}return function(e,t){let r,s,l;const c=[];for(r=0;r<n.pre.length;++r)n.pre[r]();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),Vb(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))),r=0;r<c.length;++r)c[r].data.hook.insert(c[r]);for(r=0;r<n.post.length;++r)n.post[r]();return t}}function Wb(e,t,r){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==r&&void 0!==t)for(let e=0;e<t.length;++e){const r=t[e];if("string"==typeof r)continue;const n=r.data;void 0!==n&&Wb(n,r.children,r.sel)}}function Yb(e,t,r){let n,o,i,a={};if(void 0!==r?(null!==t&&(a=t),jb(r)?n=r:Hb(r)?o=r.toString():r&&r.sel&&(n=[r])):null!=t&&(jb(t)?n=t:Hb(t)?o=t.toString():t&&t.sel?n=[t]:a=t),void 0!==n)for(i=0;i<n.length;++i)Hb(n[i])&&(n[i]=zb(void 0,void 0,void 0,n[i],void 0));return!e.startsWith("svg")||3!==e.length&&"."!==e[3]&&"#"!==e[3]||Wb(a,n,e),zb(e,a,n,o,void 0)}function Kb(e,t){let r;const n=t.elm;let o=e.data.attrs,i=t.data.attrs;if((o||i)&&o!==i){for(r in o=o||{},i=i||{},i){const e=i[r];o[r]!==e&&(!0===e?n.setAttribute(r,""):!1===e?n.removeAttribute(r):120!==r.charCodeAt(0)?n.setAttribute(r,e):58===r.charCodeAt(3)?n.setAttributeNS("http://www.w3.org/XML/1998/namespace",r,e):58===r.charCodeAt(5)?109===r.charCodeAt(1)?n.setAttributeNS("http://www.w3.org/2000/xmlns/",r,e):n.setAttributeNS("http://www.w3.org/1999/xlink",r,e):n.setAttribute(r,e))}for(r in o)r in i||n.removeAttribute(r)}}const Xb={create:Kb,update:Kb};function Zb(e,t){let r,n;const o=t.elm;let i=e.data.class,a=t.data.class;if((i||a)&&i!==a){for(n in i=i||{},a=a||{},i)i[n]&&!Object.prototype.hasOwnProperty.call(a,n)&&o.classList.remove(n);for(n in a)r=a[n],r!==i[n]&&o.classList[r?"add":"remove"](n)}}const Jb={create:Zb,update:Zb},Qb=/[A-Z]/g;function ew(e,t){const r=t.elm;let n,o=e.data.dataset,i=t.data.dataset;if(!o&&!i)return;if(o===i)return;o=o||{},i=i||{};const a=r.dataset;for(n in o)n in i||(a?n in a&&delete a[n]:r.removeAttribute("data-"+n.replace(Qb,"-$&").toLowerCase()));for(n in i)o[n]!==i[n]&&(a?a[n]=i[n]:r.setAttribute("data-"+n.replace(Qb,"-$&").toLowerCase(),i[n]))}const tw={create:ew,update:ew};function rw(e,t,r){if("function"==typeof e)e.call(t,r,t);else if("object"==typeof e)for(let n=0;n<e.length;n++)rw(e[n],t,r)}function nw(e,t){const r=e.type,n=t.data.on;n&&n[r]&&rw(n[r],t,e)}function ow(e,t){const r=e.data.on,n=e.listener,o=e.elm,i=t&&t.data.on,a=t&&t.elm;let s;if(r!==i){if(r&&n)if(i)for(s in r)i[s]||o.removeEventListener(s,n,!1);else for(s in r)o.removeEventListener(s,n,!1);if(i){const n=t.listener=e.listener||function e(t){nw(t,e.vnode)};if(n.vnode=t,r)for(s in i)r[s]||a.addEventListener(s,n,!1);else for(s in i)a.addEventListener(s,n,!1)}}}const iw={create:ow,update:ow,destroy:ow};function aw(e,t){let r,n,o;const i=t.elm;let a=e.data.props,s=t.data.props;if((a||s)&&a!==s)for(r in a=a||{},s=s||{},s)n=s[r],o=a[r],o===n||"value"===r&&i[r]===n||(i[r]=n)}const sw={create:aw,update:aw},uw="function"==typeof(null===window||void 0===window?void 0:window.requestAnimationFrame)?window.requestAnimationFrame.bind(window):setTimeout;let lw=!1;function cw(e,t,r){var n;n=()=>{e[t]=r},uw(()=>{uw(n)})}function dw(e,t){let r,n;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(n in i)n in a||("-"===n[0]&&"-"===n[1]?o.style.removeProperty(n):o.style[n]="");for(n in a)if(r=a[n],"delayed"===n&&a.delayed)for(const e in a.delayed)r=a.delayed[e],s&&r===i.delayed[e]||cw(o.style,e,r);else"remove"!==n&&r!==i[n]&&("-"===n[0]&&"-"===n[1]?o.style.setProperty(n,r):o.style[n]=r)}const fw={pre:function(){lw=!1},create:dw,update:dw,destroy:function(e){let t,r;const n=e.elm,o=e.data.style;if(o&&(t=o.destroy))for(r in t)n.style[r]=t[r]},remove:function(e,t){const r=e.data.style;if(!r||!r.remove)return void t();let n;lw||(e.elm.offsetLeft,lw=!0);const o=e.elm;let i=0;const a=r.remove;let s=0;const u=[];for(n in a)u.push(n),o.style[n]=a[n];const l=getComputedStyle(o)["transition-property"].split(", ");for(;i<l.length;++i)-1!==u.indexOf(l[i])&&s++;o.addEventListener("transitionend",e=>{e.target===o&&--s,0===s&&t()})}};function hw(e,t){for(const r of e)null!=r&&!1!==r&&""!==r&&(Array.isArray(r)?hw(r,t):"string"==typeof r||"number"==typeof r||"boolean"==typeof r?t.push(zb(void 0,void 0,void 0,String(r),void 0)):t.push(r));return t}function pw(e,t,...r){const n=hw(r,[]);return"function"==typeof e?e(t,n):1===n.length&&!n[0].sel&&n[0].text?Yb(e,t,n[0].text):Yb(e,t,n)}var gw=[];var mw,vw,yw={};function bw(e,t,r){return pw(r.isInline(e)?"span":"div",null,t)}function ww(e,t){var r,n=wm.findKey(t,e),o=t.isInline(e),i=ph.Editor.isVoid(t,e),a=em(e.type,n.id),s={id:a,key:n.id,"data-slate-node":"element","data-slate-inline":o},u=e.type,l=e.children,c=void 0===l?[]:l,d=function(e){return yw[e]||bw}(u);r=i?null:c.map(function(r,n){return Cw(r,n,e,t)});var f=d(e,r,t);if(i){s["data-slate-void"]=!0;var h=o?"span":"div",p=Ch(ph.Node.texts(e),1),g=Ch(p[0],1)[0],m=pw(h,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},Cw(g,0,e,t));f=pw(h,{style:{position:"relative"}},f,m),fp.set(g,0),hp.set(g,e)}return null==f.data&&(f.data={}),Object.assign(f.data,s),i||o||(f=function(e,t){var r=t;return gw.forEach(function(n){r=n(e,t)}),r}(e,f)),wg(function(){var t=Bg(a);null!=t&&(mp.set(n,t),vp.set(e,t),gp.set(t,e))}),f}function Ew(e,t){return void 0===t&&(t=!1),pw("span",{"data-slate-string":!0},t?e+"\n":e)}function xw(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),pw("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?pw("br",null):null)}function Sw(e,t,r){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var n=wm.findKey(r,e),o=r.getConfig().decorate;if(null==o)throw new Error("Can not get config.decorate");var i,a=wm.findPath(r,e),s=o([e,a]),u=ph.Text.decorations(e,s),l=u.map(function(n){var o,i,a,s=n.leaf,l=n.position,c=function(e,t,r,n,o){void 0===t&&(t=!1);var i=e.text,a=wm.findPath(o,r),s=ph.Path.parent(a);if(ph.Editor.isEditor(n))throw new Error("Text node ".concat(JSON.stringify(r)," parent is Editor"));return o.isVoid(n)?xw(ph.Node.string(n).length):""!==i||n.children[n.children.length-1]!==r||o.isInline(n)||""!==ph.Editor.string(o,s)?""===i?xw():t&&"\n"===i.slice(-1)?Ew(i,!0):Ew(i):xw(0,!0)}(s,null!==(o=null==l?void 0:l.isLast)&&void 0!==o?o:1===u.length,e,t,r);return i=s,a=c,gw.forEach(function(e){a=e(i,a)}),pw("span",{"data-slate-leaf":!0},c=a)}),c=(i=n.id,"w-e-text-".concat(i)),d=pw("span",{"data-slate-node":"text",id:c,key:n.id},l);return wg(function(){var t=Bg(c);null!=t&&(mp.set(n,t),vp.set(e,t),gp.set(t,e))}),d}function Cw(e,t,r,n){return fp.set(e,t),hp.set(e,r),ph.Element.isElement(e)?ww(e,n):Sw(e,r,n)}var Aw=function(){if(vw)return mw;vw=1;var e,t="[object Symbol]",r=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,n=/[\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="['’]",h="["+o+"]",p="["+d+"]",g="["+i+a+"]",m="\\d+",v="["+s+"]",y="["+u+"]",w="[^"+o+d+m+s+u+l+"]",E="\\ud83c[\\udffb-\\udfff]",x="[^"+o+"]",S="(?:\\ud83c[\\udde6-\\uddff]){2}",C="[\\ud800-\\udbff][\\udc00-\\udfff]",A="["+l+"]",D="\\u200d",T="(?:"+y+"|"+w+")",k="(?:"+A+"|"+w+")",N="(?:['’](?:d|ll|m|re|s|t|ve))?",O="(?:['’](?:D|LL|M|RE|S|T|VE))?",B="(?:"+g+"|"+E+")"+"?",M="["+c+"]?",F=M+B+("(?:"+D+"(?:"+[x,S,C].join("|")+")"+M+B+")*"),I="(?:"+[v,S,C].join("|")+")"+F,P="(?:"+[x+g+"?",g,S,C,h].join("|")+")",R=RegExp(f,"g"),L=RegExp(g,"g"),_=RegExp(E+"(?="+E+")|"+P+F,"g"),z=RegExp([A+"?"+y+"+"+N+"(?="+[p,A,"$"].join("|")+")",k+"+"+O+"(?="+[p,A+T,"$"].join("|")+")",A+"?"+T+"+"+N,A+"+"+O,m,I].join("|"),"g"),j=RegExp("["+D+o+i+a+c+"]"),H=/[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 b&&b&&b.Object===Object&&b,V="object"==typeof self&&self&&self.Object===Object&&self,U=$||V||Function("return this")(),q=(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 j.test(e)}function W(e){return G(e)?function(e){return e.match(_)||[]}(e):function(e){return e.split("")}(e)}var Y=Object.prototype.toString,K=U.Symbol,X=K?K.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)&&Y.call(e)==t}(e))return Z?Z.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}function Q(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:function(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}(e,t,r)}function ee(e){return null==e?"":J(e)}var te,re,ne=(te=function(e,t,r){return t=t.toLowerCase(),e+(r?oe(ee(t).toLowerCase()):t)},function(e){return function(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)r=t(r,e[n],n,e);return r}(function(e,t){return e=ee(e),void 0===t?function(e){return H.test(e)}(e)?function(e){return e.match(z)||[]}(e):function(e){return e.match(r)||[]}(e):e.match(t)||[]}(function(e){return(e=ee(e))&&e.replace(n,q).replace(L,"")}(e).replace(R,"")),te,"")}),oe=(re="toUpperCase",function(e){var t=G(e=ee(e))?W(e):void 0,r=t?t[0]:e.charAt(0),n=t?Q(t,1).join(""):e.slice(1);return r[re]()+n});return mw=ne}(),Dw=w(Aw);var Tw=["props","attrs","style","dataset","on","hook"];function kw(e){var t=e.data,r=void 0===t?{}:t,n=e.children,o=void 0===n?[]:n;Object.keys(r).forEach(function(t){var n,o,i=r[t];if("key"!==t){if(!Tw.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=Dw(a),function(e,t){null==e.data&&(e.data={});var r=e.data;null==r.dataset&&(r.dataset={});Object.assign(r.dataset,t)}(e,((n={})[a]=i,n)),void delete r[t]}!function(e,t){null==e.data&&(e.data={});var r=e.data;null==r.props&&(r.props={});Object.assign(r.props,t)}(e,(o={},o[t]=i,o)),delete r[t]}}else e.key=i}),o.length>0&&o.forEach(function(e){"string"!=typeof e&&kw(e)})}function Nw(e,t){var r,n,o=e.$scroll,i=(r=e.id,"w-e-textarea-".concat(r)),a=t.getConfig(),s=a.readOnly,u=a.autoFocus,l=function(e,t){return void 0===t&&(t=!1),Yb("div#".concat(e),{props:{contentEditable:!t}})}(i,s),c=t.children||[];l.children=c.map(function(e,r){if(cp.has(e)){var n=cp.get(e);if(n){var o=Ch(n,2),i=o[0],a=o[1];if(a)return i!==r&&(fp.set(e,r),cp.set(e,[r,a])),a}}var s=Cw(e,r,t,t);kw(s);var u=t.getConfig().skipCacheTypes,l=void 0===u?["list-item"]:u;return ph.Element.isElement(e)&&l.includes(e.type)||cp.set(e,[r,s]),s});var d=sp.get(e);if(null==d&&(d=!0),d){var f=function(e){return _p('<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,n=f[0],(p=Gb([Jb,sw,fw,tw,iw,Xb]))(n,l),sp.set(e,!1),up.set(e,p)}else{var h=lp.get(e),p=up.get(e);if(null==h||null==p)return;n=h.elm,p(h,l)}if(null!=n||null!=(n=Bg(i))){var g;if((d?u:t.isFocused())&&n.focus({preventScroll:!0}),d){var m=(g=n)&&g.ownerDocument&&g.ownerDocument.defaultView||null;m&&bp.set(t,m)}pp.set(t,n),vp.set(t,n),gp.set(n,t),lp.set(e,l)}}var Ow=1,Bw=function(){function e(e){var t=this;this.selectionChangeRoot=null,this.destroyed=!1,this.id=Ow++,this.$textArea=null,this.$progressBar=_p('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=_p('<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=cb(function(e){var r=kg(null==e?void 0:e.target)?e.target:null,n=null==r?void 0:r.tagName;if("INPUT"!==n&&"TEXTAREA"!==n){var o=t.getActiveEditor();null!=o&&function(e,t){var r=e.isComposing,n=e.isUpdatingSelection,o=e.isDraggingInternally,i=t.getConfig();if(!n&&!o){var a=wm.findDocumentOrShadowRoot(t),s=a.activeElement,u=wm.toDOMNode(t,t),l=a.getSelection();if(s!==u)return wp.delete(t),void Eb(t);if(e.latestElement=s,wp.set(t,!0),!l)return Eb(t);var c=l.anchorNode,d=l.focusNode,f=hb(t,c),h=fb(t,d);if(!r)if(f&&h){var p=wm.toSlateRange(t,l,{exactMatch:!1,suppressThrow:!0});p&&ph.Transforms.select(t,p)}else i.readOnly&&Eb(t)}}(t,o)}},100);var r=_p(e);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=r;var n=_p('<div class="w-e-text-container"></div>');n.append(this.$progressBar),n.append(this.$maxLengthInfo),r.append(n);var o=_p('<div class="w-e-scroll"></div>');n.append(o),this.$scroll=o,this.$textAreaContainer=n,wg(function(){var e=t.getActiveEditor();if(null!=e){t.bindSelectionChange(e),n.on("click",function(){return e.hidePanelOrModal()}),e.on(Vh,t.changeViewState.bind(t));var o=e.getConfig(),i=o.onChange,a=o.scroll;i&&e.on(Vh,function(){return i(e)}),a||(r.css("position","relative"),n.addClass("no-scroll")),t.onFocusAndOnBlur(),e.on(Vh,t.changeMaxLengthInfo.bind(t)),t.bindEvent()}})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=Jh.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.getActiveEditor=function(){if(this.destroyed)return null;var e=Jh.get(this);return null==e||e.isDestroyed?null:e},e.prototype.bindSelectionChange=function(e,t){var r=this;if(void 0===t&&(t=5),null==this.selectionChangeRoot&&!e.isDestroyed){try{var n=wm.findDocumentOrShadowRoot(e);n.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=n}catch(n){if(t>0)return void setTimeout(function(){return r.bindSelectionChange(e,t-1)},0);window.document.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=window.document}e.on($h,function(){var e;null===(e=r.selectionChangeRoot)||void 0===e||e.removeEventListener("selectionchange",r.onDOMSelectionChange),r.selectionChangeRoot=null})}},e.prototype.flushDOMSelectionChange=function(){this.onDOMSelectionChange.flush()},e.prototype.bindEvent=function(){var e=this,t=this.$textArea,r=this.$scroll,n=this.editorInstance;null!=t&&(Ih(Ib,function(r,o){t.on(o,function(t){r(t,e,n)})}),n.getConfig().scroll&&(r.css("overflow-y","auto"),r.on("scroll",cb(function(){n.emit(Uh)},100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.getActiveEditor();if(null!=t){var r=t.getConfig(),n=r.onBlur,o=r.onFocus;this.latestEditorSelection=t.selection,t.on(Vh,function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout(function(){e.destroyed||t.isDestroyed||o&&o(t)}):null!=e.latestEditorSelection&&null==t.selection&&setTimeout(function(){e.destroyed||t.isDestroyed||n&&n(t)}),e.latestEditorSelection=t.selection})}},e.prototype.changeMaxLengthInfo=function(){var e=this.getActiveEditor();if(null!=e){var t=e.getConfig().maxLength;if(t){var r=t-wm.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(r,"/").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.getActiveEditor();null!=t&&(Nw(this,t),function(e,t){var r,n=t.getConfig().placeholder;if(n){var o=t.isEmpty();if(o&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var i=_p('<div class="w-e-text-placeholder">'.concat(n,"</div>"));e.$textAreaContainer.append(i),e.$placeholder=i}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!o&&e.showPlaceholder&&(null===(r=e.$placeholder)||void 0===r||r.hide(),e.showPlaceholder=!1)}}(this,t),wg(function(){e.destroyed||t.isDestroyed||xb(e,t)}))},e.prototype.destroy=function(){var e;this.destroyed=!0,this.onDOMSelectionChange.cancel(),null===(e=this.selectionChangeRoot)||void 0===e||e.removeEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=null,this.$textAreaContainer.remove()},e}();function Mw(e,t,r,n){if(fp.set(e,t),hp.set(e,r),ph.Element.isElement(e)){var o=e.children;if((void 0===o?[]:o).forEach(function(t,r){return Mw(t,r,e,n)}),ph.Editor.isVoid(n,e)){var i=Ch(ph.Node.texts(e),1),a=Ch(i[0],1)[0];fp.set(a,0),hp.set(a,e)}}}function Fw(e){var t=e.selector,r=void 0===t?"":t,n=e.config,o=void 0===n?{}:n,i=e.content,a=e.html,s=e.plugins,u=void 0===s?[]:s,l=function(e){return[Mv,pv,Dp,fv,$v,Bv,Pv,vh.withHistory].reduce(function(e,t){return t(e)},e)}(ph.createEditor());if(r&&function(e,t){return Jg(e,"data-w-e-textarea",t)}(l,r))throw new Error("Repeated create editor by selector '".concat(r,"'"));var c=function(e){void 0===e&&(e={});var t=Mh(jh),r={},n=e.MENU_CONF,o=void 0===n?{}:n;return Ih(t,function(e,t){r[t]=wh(wh({},e),o[t]||{})}),delete e.MENU_CONF,wh({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:r,hoverbarKeys:{},sanitizeHtml:zh,customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(o);ap.set(l,c);var d=c.hoverbarKeys,f=void 0===d?{}:d;if(u.forEach(function(e){l=e(l)}),function(e,t){var r=t.html,n=t.content;null!=r?e.children=Qg(e,r):n&&n.length&&(e.children=n),0===e.children.length&&(e.children=[{type:"paragraph",children:[{text:""}]}])}(l,{html:a,content:i}),r){var h=new Bw(r);Zh.set(l,h),Jh.set(h,l),h.changeViewState();var p=void 0;Object.keys(f).length>0&&(p=new ub,tp.set(p,l),rp.set(l,p)),l.on(Vh,function(){l.hidePanelOrModal()}),l.on(Uh,function(){l.hidePanelOrModal()})}else l.children.forEach(function(e,t){return Mw(e,t,l,l)});var g=c.onCreated,m=c.onDestroyed;return g&&l.on(Hh,function(){return g(l)}),m&&l.on($h,function(){return m(l)}),wg(function(){return l.emit(Hh)}),l}var Iw=function(){function e(e,t){var r=this;this.$toolbar=_p('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=Uv(function(){r.toolbarItems.forEach(function(e){e.changeMenuState()})},200),this.config=t;var n=_p(e);if(0===n.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=n;var o=this.$toolbar;o.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),n.append(o),wg(function(){r.initToolbar(),r.lngListen=Ly(function(){return r.initToolbar()}),r.getEditorInstance().on(Vh,r.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="",r=this.$toolbar,n=this.config,o=n.toolbarKeys,i=void 0===o?[]:o,a=n.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=n.excludeKeys,l=void 0===u?[]:u,c=Mh(i),d=[];d=Array.isArray(s)?s:[s];var f=0;d.forEach(function(e){var t=e.index+f;if(e.replaceFn&&c[t]){var r=e.replaceFn(c[t]);if(!r)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");c[t]=r}e.keys.length>0&&("string"==typeof e.keys&&(e.keys=[e.keys]),e.keys.forEach(function(e,r){c.splice(t+r,0,e)}),f+=e.keys.length)});var h=c.filter(function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)}),p=h.length;h.forEach(function(n,o){if("|"===n){if(0===o)return;if(o+1===p)return;if("|"===t)return;var i=Hy();return r.append(i),void(t=n)}if("string"==typeof n)return e.registerSingleItem(n,e),void(t=n);e.registerGroup(n),t="group"})},e.prototype.registerGroup=function(e){var t=this,r=this.$toolbar,n=function(e){return new tb(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,n)}),r.append(n.$elem)},e.prototype.registerSingleItem=function(e,t){var r=this.getEditorInstance(),n=t instanceof tb,o=this.menus,i=o[e];if(null==i){var a=Kh[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=r.getMenuConfig(e);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=ob(e,i,n);(this.toolbarItems.push(u),np.set(u,r),n)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=Qh.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 Pw(e,t){if(null==e)throw new Error("Cannot create toolbar, because editor is null");var r=t.selector,n=t.config,o=void 0===n?{}:n;if(function(e,t){return Jg(e,"data-w-e-toolbar",t)}(e,r))throw new Error("Repeated create toolbar by selector '".concat(r,"'"));var i=wh({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new Iw(r,i);return Qh.set(a,e),ep.set(e,a),a}var Rw,Lw,_w,zw,jw,Hw={exports:{}},$w={};function Vw(){if(_w)return $w;_w=1,Object.defineProperty($w,"__esModule",{value:!0}),$w.justErrorsLogger=$w.debugLogger=void 0;const e=function(){if(Lw)return Rw;function e(e){return e<10?`0${e}`:e.toString()}return Lw=1,Rw=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,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return console.error(`[Uppy] [${e()}]`,...r)}};$w.justErrorsLogger=t;const r={debug:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return console.debug(`[Uppy] [${e()}]`,...r)},warn:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return console.warn(`[Uppy] [${e()}]`,...r)},error:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return console.error(`[Uppy] [${e()}]`,...r)}};return $w.debugLogger=r,$w}function Uw(){if(jw)return zw;jw=1;return zw={nanoid:(e=21)=>{let t="",r=0|e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",o=0|r;for(;o--;)n+=e[Math.random()*e.length|0];return n}},zw}var qw,Gw,Ww,Yw,Kw,Xw,Zw,Jw,Qw,eE,tE,rE,nE,oE,iE,aE,sE,uE,lE,cE,dE,fE,hE,pE,gE,mE,vE,yE,bE,wE,EE,xE={};function SE(){return Gw?qw:(Gw=1,qw=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),r.length-1);e=Number(e/Math.pow(1024,n));var o=r[n];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o})}function CE(){if(Yw)return Ww;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return Yw=1,e.prototype.match=function(e){var t,r,n=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(r=(e||"").split(this.separator),t=0;n&&t<i;t++)"*"!==o[t]&&(n=t<r.length&&o[t]===r[t]);n=n&&r}else n=!1;else if("function"==typeof e.splice)for(n=[],t=e.length;t--;)this.match(e[t])&&(n[n.length]=e[t]);else if("object"==typeof e)for(var a in n={},e)this.match(a)&&(n[a]=e[a]);return n},Ww=function(t,r,n){var o=new e(t,n||/[\/\.]/);return void 0!==r?o.match(r):o},Ww}function AE(){if(Zw)return xE;Zw=1,Object.defineProperty(xE,"__esModule",{value:!0}),xE.defaultOptions=xE.RestrictionError=xE.Restricter=void 0;const e=SE(),t=function(){if(Xw)return Kw;Xw=1;var e=CE(),t=/[\/\+\.]/;return Kw=function(r,n){function o(n){var o=e(n,r,t);return o&&o.length>=2}return n?o(n.split(";")[0]):o}}();xE.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class r extends Error{constructor(){super(...arguments),this.isRestriction=!0}}xE.RestrictionError=r,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});return xE.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(n,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 r(`${this.i18n("youCanOnlyUploadX",{smart_count:u})}`)}if(l){if(!l.some(e=>e.includes("/")?!!n.type&&t(n.type.replace(/;.*?$/,""),e):!("."!==e[0]||!n.extension)&&n.extension.toLowerCase()===e.slice(1).toLowerCase())){const e=l.join(", ");throw new r(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(s&&null!=n.size){const t=o.reduce((e,t)=>e+t.size,n.size);if(t>s)throw new r(this.i18n("exceedsSize",{size:e(s),file:n.name}))}if(i&&null!=n.size&&n.size>i)throw new r(this.i18n("exceedsSize",{size:e(i),file:n.name}));if(a&&null!=n.size&&n.size<a)throw new r(this.i18n("inferiorSize",{size:e(a)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new r(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new r(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:n}=this.getOpts().restrictions,o=Object.prototype.hasOwnProperty,i=[];for(const t of n)o.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}},xE}function DE(){if(Qw)return Jw;return Qw=1,Jw=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}function TE(){if(tE)return eE;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}tE=1;var t=0;function r(e){return"__private_"+t+++"_"+e}const n=DE();function o(e,t,r){const n=[];return e.forEach(e=>"string"!=typeof e?n.push(e):t[Symbol.split](e).forEach((e,t,o)=>{""!==e&&n.push(e),t<o.length-1&&n.push(r)})),n}
2
2
  /**
3
3
  * Takes a string with placeholder variables like `%{smart_count} file selected`
4
4
  * and replaces it with values from options `{smart_count: 5}`