@wangeditor-next/core 1.7.44 → 1.7.45
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/core/src/parse-html/index.d.ts +0 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("slate"),require("lodash.clonedeep"),require("lodash.foreach"),require("dom7"),require("nanoid"),require("lodash.toarray"),require("lodash.debounce"),require("lodash.throttle"),require("is-hotkey"),require("snabbdom"),require("lodash.camelcase"),require("@uppy/core"),require("@uppy/xhr-upload")):"function"==typeof define&&define.amd?define(["exports","slate","lodash.clonedeep","lodash.foreach","dom7","nanoid","lodash.toarray","lodash.debounce","lodash.throttle","is-hotkey","snabbdom","lodash.camelcase","@uppy/core","@uppy/xhr-upload"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).WangEditorCore={},e.require$$1,e.cloneDeep,e.forEach,e.$,null,e.toArray,e.debounce,e.throttle,e.isHotkey,e.snabbdom,e.camelCase,e.Uppy,e.XHRUpload)}(this,function(e,t,n,r,o,i,a,s,u,l,c,f,d,h){"use strict";var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var v,m,y={};function b(){if(m)return v;m=1;var e=function(e){return e&&e.Math===Math&&e};return v=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof p&&p)||e("object"==typeof v&&v)||function(){return this}()||Function("return this")()}var w,x,E,S,O,C,k,T,N={};function R(){return x?w:(x=1,w=function(e){try{return!!e()}catch(e){return!0}})}function L(){if(S)return E;S=1;var e=R();return E=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function M(){if(C)return O;C=1;var e=R();return O=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function P(){if(T)return k;T=1;var e=M(),t=Function.prototype.call;return k=e?t.bind(t):function(){return t.apply(t,arguments)},k}var D,A,j,I,$,F,_,B,W,H,U,V,z,K,q,J,G,Y,X,Q,Z,ee,te,ne,re,oe,ie,ae,se,ue,le,ce,fe,de,he,pe,ge,ve,me,ye,be,we={};function xe(){if(D)return we;D=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return we.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,we}function Ee(){return j?A:(j=1,A=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Se(){if($)return I;$=1;var e=M(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return I=e?r:function(e){return function(){return n.apply(e,arguments)}},I}function Oe(){if(_)return F;_=1;var e=Se(),t=e({}.toString),n=e("".slice);return F=function(e){return n(t(e),8,-1)}}function Ce(){if(W)return B;W=1;var e=Se(),t=R(),n=Oe(),r=Object,o=e("".split);return B=t(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function ke(){return U?H:(U=1,H=function(e){return null==e})}function Te(){if(z)return V;z=1;var e=ke(),t=TypeError;return V=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function Ne(){if(q)return K;q=1;var e=Ce(),t=Te();return K=function(n){return e(t(n))}}function Re(){if(G)return J;G=1;var e="object"==typeof document&&document.all;return J=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function Le(){if(X)return Y;X=1;var e=Re();return Y=function(t){return"object"==typeof t?null!==t:e(t)}}function Me(){if(Z)return Q;Z=1;var e=b(),t=Re();return Q=function(n,r){return arguments.length<2?(o=e[n],t(o)?o:void 0):e[n]&&e[n][r];var o},Q}function Pe(){if(te)return ee;te=1;var e=Se();return ee=e({}.isPrototypeOf)}function De(){if(re)return ne;re=1;var e=b().navigator,t=e&&e.userAgent;return ne=t?String(t):""}function Ae(){if(ie)return oe;ie=1;var e,t,n=b(),r=De(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),oe=t}function je(){if(se)return ae;se=1;var e=Ae(),t=R(),n=b().String;return ae=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41})}function Ie(){if(le)return ue;le=1;var e=je();return ue=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function $e(){if(fe)return ce;fe=1;var e=Me(),t=Re(),n=Pe(),r=Ie(),o=Object;return ce=r?function(e){return"symbol"==typeof e}:function(r){var i=e("Symbol");return t(i)&&n(i.prototype,o(r))}}function Fe(){if(he)return de;he=1;var e=String;return de=function(t){try{return e(t)}catch(e){return"Object"}}}function _e(){if(ge)return pe;ge=1;var e=Re(),t=Fe(),n=TypeError;return pe=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function Be(){if(me)return ve;me=1;var e=_e(),t=ke();return ve=function(n,r){var o=n[r];return t(o)?void 0:e(o)}}function We(){if(be)return ye;be=1;var e=P(),t=Re(),n=Le(),r=TypeError;return ye=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")}}var He,Ue,Ve,ze,Ke,qe,Je,Ge,Ye,Xe,Qe,Ze,et,tt,nt,rt,ot,it,at,st,ut,lt,ct,ft,dt={exports:{}};function ht(){return Ue?He:(Ue=1,He=!1)}function pt(){if(ze)return Ve;ze=1;var e=b(),t=Object.defineProperty;return Ve=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function gt(){if(Ke)return dt.exports;Ke=1;var e=ht(),t=b(),n=pt(),r="__core-js_shared__",o=dt.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.45.1",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"}),dt.exports}function vt(){if(Je)return qe;Je=1;var e=gt();return qe=function(t,n){return e[t]||(e[t]=n||{})}}function mt(){if(Ye)return Ge;Ye=1;var e=Te(),t=Object;return Ge=function(n){return t(e(n))}}function yt(){if(Qe)return Xe;Qe=1;var e=Se(),t=mt(),n=e({}.hasOwnProperty);return Xe=Object.hasOwn||function(e,r){return n(t(e),r)}}function bt(){if(et)return Ze;et=1;var e=Se(),t=0,n=Math.random(),r=e(1.1.toString);return Ze=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function wt(){if(nt)return tt;nt=1;var e=b(),t=vt(),n=yt(),r=bt(),o=je(),i=Ie(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return tt=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function xt(){if(ot)return rt;ot=1;var e=P(),t=Le(),n=$e(),r=Be(),o=We(),i=wt(),a=TypeError,s=i("toPrimitive");return rt=function(i,u){if(!t(i)||n(i))return i;var l,c=r(i,s);if(c){if(void 0===u&&(u="default"),l=e(c,i,u),!t(l)||n(l))return l;throw new a("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(i,u)}}function Et(){if(at)return it;at=1;var e=xt(),t=$e();return it=function(n){var r=e(n,"string");return t(r)?r:r+""}}function St(){if(ut)return st;ut=1;var e=b(),t=Le(),n=e.document,r=t(n)&&t(n.createElement);return st=function(e){return r?n.createElement(e):{}}}function Ot(){if(ct)return lt;ct=1;var e=L(),t=R(),n=St();return lt=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Ct(){if(ft)return N;ft=1;var e=L(),t=P(),n=xe(),r=Ee(),o=Ne(),i=Et(),a=yt(),s=Ot(),u=Object.getOwnPropertyDescriptor;return N.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},N}var kt,Tt,Nt,Rt,Lt,Mt,Pt,Dt={};function At(){if(Tt)return kt;Tt=1;var e=L(),t=R();return kt=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}function jt(){if(Rt)return Nt;Rt=1;var e=Le(),t=String,n=TypeError;return Nt=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function It(){if(Lt)return Dt;Lt=1;var e=L(),t=Ot(),n=At(),r=jt(),o=Et(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Dt.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},Dt}function $t(){if(Pt)return Mt;Pt=1;var e=L(),t=It(),n=Ee();return Mt=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}var Ft,_t,Bt,Wt,Ht,Ut,Vt,zt,Kt,qt,Jt,Gt,Yt,Xt,Qt,Zt={exports:{}};function en(){if(_t)return Ft;_t=1;var e=L(),t=yt(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&r(n,"name").configurable);return Ft={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function tn(){if(Wt)return Bt;Wt=1;var e=Se(),t=Re(),n=gt(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),Bt=n.inspectSource}function nn(){if(Ut)return Ht;Ut=1;var e=b(),t=Re(),n=e.WeakMap;return Ht=t(n)&&/native code/.test(String(n))}function rn(){if(zt)return Vt;zt=1;var e=vt(),t=bt(),n=e("keys");return Vt=function(e){return n[e]||(n[e]=t(e))}}function on(){return qt?Kt:(qt=1,Kt={})}function an(){if(Gt)return Jt;Gt=1;var e,t,n,r=nn(),o=b(),i=Le(),a=$t(),s=yt(),u=gt(),l=rn(),c=on(),f="Object already initialized",d=o.TypeError,h=o.WeakMap;if(r||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 d(f);return t.facade=e,p.set(e,t),t},t=function(e){return p.get(e)||{}},n=function(e){return p.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new d(f);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return Jt={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new d("Incompatible receiver, "+e+" required");return r}}}}function sn(){if(Yt)return Zt.exports;Yt=1;var e=Se(),t=R(),n=Re(),r=yt(),o=L(),i=en().CONFIGURABLE,a=tn(),s=an(),u=s.enforce,l=s.get,c=String,f=Object.defineProperty,d=e("".slice),h=e("".replace),p=e([].join),g=o&&!t(function(){return 8!==f(function(){},"length",{value:8}).length}),v=String(String).split("String"),m=Zt.exports=function(e,t,n){"Symbol("===d(c(t),0,7)&&(t="["+h(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||i&&e.name!==t)&&(o?f(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&f(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=u(e);return r(a,"source")||(a.source=p(v,"string"==typeof t?t:"")),e};return Function.prototype.toString=m(function(){return n(this)&&l(this).source||a(this)},"toString"),Zt.exports}function un(){if(Qt)return Xt;Qt=1;var e=Re(),t=It(),n=sn(),r=pt();return Xt=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(e(a)&&n(a,l,s),s.global)u?o[i]=a:r(i,a);else{try{s.unsafe?o[i]&&(u=!0):delete o[i]}catch(e){}u?o[i]=a:t.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o}}var ln,cn,fn,dn,hn,pn,gn,vn,mn,yn,bn,wn,xn,En,Sn,On,Cn,kn={};function Tn(){if(dn)return fn;dn=1;var e=function(){if(cn)return ln;cn=1;var e=Math.ceil,t=Math.floor;return ln=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},ln}();return fn=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Nn(){if(pn)return hn;pn=1;var e=Tn(),t=Math.max,n=Math.min;return hn=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)}}function Rn(){if(vn)return gn;vn=1;var e=Tn(),t=Math.min;return gn=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Ln(){if(yn)return mn;yn=1;var e=Rn();return mn=function(t){return e(t.length)}}function Mn(){if(wn)return bn;wn=1;var e=Ne(),t=Nn(),n=Ln(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return bn={includes:r(!0),indexOf:r(!1)}}function Pn(){if(En)return xn;En=1;var e=Se(),t=yt(),n=Ne(),r=Mn().indexOf,o=on(),i=e([].push);return xn=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c}}function Dn(){return On?Sn:(On=1,Sn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function An(){if(Cn)return kn;Cn=1;var e=Pn(),t=Dn().concat("length","prototype");return kn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},kn}var jn,In,$n,Fn,_n,Bn,Wn,Hn,Un,Vn,zn,Kn,qn,Jn,Gn,Yn,Xn,Qn,Zn,er,tr,nr,rr,or,ir,ar,sr,ur,lr={};function cr(){return jn||(jn=1,lr.f=Object.getOwnPropertySymbols),lr}function fr(){if($n)return In;$n=1;var e=Me(),t=Se(),n=An(),r=cr(),o=jt(),i=t([].concat);return In=e("Reflect","ownKeys")||function(e){var t=n.f(o(e)),a=r.f;return a?i(t,a(e)):t},In}function dr(){if(_n)return Fn;_n=1;var e=yt(),t=fr(),n=Ct(),r=It();return Fn=function(o,i,a){for(var s=t(i),u=r.f,l=n.f,c=0;c<s.length;c++){var f=s[c];e(o,f)||a&&e(a,f)||u(o,f,l(i,f))}},Fn}function hr(){if(Wn)return Bn;Wn=1;var e=R(),t=Re(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return Bn=r}function pr(){if(Un)return Hn;Un=1;var e=b(),t=Ct().f,n=$t(),r=un(),o=pt(),i=dr(),a=hr();return Hn=function(s,u){var l,c,f,d,h,p=s.target,g=s.global,v=s.stat;if(l=g?e:v?e[p]||o(p,{}):e[p]&&e[p].prototype)for(c in u){if(d=u[c],f=s.dontCallGetSet?(h=t(l,c))&&h.value:l[c],!a(g?c:p+(v?".":"#")+c,s.forced)&&void 0!==f){if(typeof d==typeof f)continue;i(d,f)}(s.sham||f&&f.sham)&&n(d,"sham",!0),r(l,c,d,s)}}}function gr(){if(zn)return Vn;zn=1;var e=Oe();return Vn=Array.isArray||function(t){return"Array"===e(t)}}function vr(){if(qn)return Kn;qn=1;var e=TypeError;return Kn=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}}function mr(){if(Gn)return Jn;Gn=1;var e=L(),t=It(),n=Ee();return Jn=function(r,o,i){e?t.f(r,o,n(0,i)):r[o]=i}}function yr(){if(Xn)return Yn;Xn=1;var e={};return e[wt()("toStringTag")]="z",Yn="[object z]"===String(e)}function br(){if(Zn)return Qn;Zn=1;var e=yr(),t=Re(),n=Oe(),r=wt()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return Qn=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u}}function wr(){if(tr)return er;tr=1;var e=Se(),t=R(),n=Re(),r=br(),o=Me(),i=tn(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),f=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},d=function(e){if(!n(e))return!1;switch(r(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return d.sham=!0,er=!s||t(function(){var e;return f(f.call)||!f(Object)||!f(function(){e=!0})||e})?d:f}function xr(){if(rr)return nr;rr=1;var e=gr(),t=wr(),n=Le(),r=wt()("species"),o=Array;return nr=function(i){var a;return e(i)&&(a=i.constructor,(t(a)&&(a===o||e(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a}}function Er(){if(ir)return or;ir=1;var e=xr();return or=function(t,n){return new(e(t))(0===n?0:n)}}function Sr(){if(sr)return ar;sr=1;var e=R(),t=wt(),n=Ae(),r=t("species");return ar=function(t){return n>=51||!e(function(){var e=[];return(e.constructor={})[r]=function(){return{foo:1}},1!==e[t](Boolean).foo})}}!function(){if(ur)return y;ur=1;var e=pr(),t=R(),n=gr(),r=Le(),o=mt(),i=Ln(),a=vr(),s=mr(),u=Er(),l=Sr(),c=wt(),f=Ae(),d=c("isConcatSpreadable"),h=f>=51||!t(function(){var e=[];return e[d]=!1,e.concat()[0]!==e}),p=function(e){if(!r(e))return!1;var t=e[d];return void 0!==t?!!t:n(e)};e({target:"Array",proto:!0,arity:1,forced:!h||!l("concat")},{concat:function(e){var t,n,r,l,c,f=o(this),d=u(f,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(p(c=-1===t?f:arguments[t]))for(l=i(c),a(h+l),n=0;n<l;n++,h++)n in c&&s(d,h,c[n]);else a(h+1),s(d,h++,c);return d.length=h,d}})}();var Or,Cr,kr,Tr={};function Nr(){if(Cr)return Or;Cr=1;var e=Pn(),t=Dn();return Or=Object.keys||function(n){return e(n,t)}}!function(){if(kr)return Tr;kr=1;var e=pr(),t=mt(),n=Nr();e({target:"Object",stat:!0,forced:R()(function(){n(1)})},{keys:function(e){return n(t(e))}})}();var Rr,Lr,Mr,Pr={};!function(){if(Mr)return Pr;Mr=1;var e=yr(),t=un(),n=function(){if(Lr)return Rr;Lr=1;var e=yr(),t=br();return Rr=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",n,{unsafe:!0})}();var Dr,Ar,jr,Ir,$r,Fr,_r,Br,Wr,Hr,Ur,Vr,zr,Kr,qr,Jr={};function Gr(){return Ar?Dr:(Ar=1,Dr={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 Yr(){if(Ir)return jr;Ir=1;var e=St()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return jr=t===Object.prototype?void 0:t}function Xr(){if(Fr)return $r;Fr=1;var e=Oe(),t=Se();return $r=function(n){if("Function"===e(n))return t(n)}}function Qr(){if(Br)return _r;Br=1;var e=Xr(),t=_e(),n=M(),r=e(e.bind);return _r=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},_r}function Zr(){if(Hr)return Wr;Hr=1;var e=Qr(),t=Se(),n=Ce(),r=mt(),o=Ln(),i=Er(),a=t([].push),s=function(t){var s=1===t,u=2===t,l=3===t,c=4===t,f=6===t,d=7===t,h=5===t||f;return function(p,g,v,m){for(var y,b,w=r(p),x=n(w),E=o(x),S=e(g,v),O=0,C=m||i,k=s?C(p,E):u||d?C(p,0):void 0;E>O;O++)if((h||O in x)&&(b=S(y=x[O],O,w),t))if(s)k[O]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return O;case 2:a(k,y)}else switch(t){case 4:return!1;case 7:a(k,y)}return f?-1:l||c?c:k}};return Wr={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}function eo(){if(Vr)return Ur;Vr=1;var e=R();return Ur=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})}}!function(){if(qr)return Jr;qr=1;var e=b(),t=Gr(),n=Yr(),r=function(){if(Kr)return zr;Kr=1;var e=Zr().forEach,t=eo()("forEach");return zr=t?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},zr}(),o=$t(),i=function(e){if(e&&e.forEach!==r)try{o(e,"forEach",r)}catch(t){e.forEach=r}};for(var a in t)t[a]&&i(e[a]&&e[a].prototype);i(n)}();var to,no,ro={},oo={};function io(){if(to)return oo;
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("slate"),require("lodash.clonedeep"),require("lodash.foreach"),require("dom7"),require("nanoid"),require("lodash.toarray"),require("lodash.debounce"),require("lodash.throttle"),require("is-hotkey"),require("snabbdom"),require("lodash.camelcase"),require("@uppy/core"),require("@uppy/xhr-upload")):"function"==typeof define&&define.amd?define(["exports","slate","lodash.clonedeep","lodash.foreach","dom7","nanoid","lodash.toarray","lodash.debounce","lodash.throttle","is-hotkey","snabbdom","lodash.camelcase","@uppy/core","@uppy/xhr-upload"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorCore={},t.require$$1,t.cloneDeep,t.forEach,t.$,null,t.toArray,t.debounce,t.throttle,t.isHotkey,t.snabbdom,t.camelCase,t.Uppy,t.XHRUpload)}(this,function(t,e,n,r,o,i,a,s,u,l,c,f,d,h){"use strict";var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function g(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var v,m,y={};function b(){if(m)return v;m=1;var t=function(t){return t&&t.Math===Math&&t};return v=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof p&&p)||t("object"==typeof v&&v)||function(){return this}()||Function("return this")()}var w,x,E,S,O,C,k,T,N={};function R(){return x?w:(x=1,w=function(t){try{return!!t()}catch(t){return!0}})}function L(){if(S)return E;S=1;var t=R();return E=!t(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function M(){if(C)return O;C=1;var t=R();return O=!t(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})}function P(){if(T)return k;T=1;var t=M(),e=Function.prototype.call;return k=t?e.bind(e):function(){return e.apply(e,arguments)},k}var D,A,j,I,$,F,_,B,W,H,U,V,z,K,q,J,G,Y,X,Q,Z,tt,et,nt,rt,ot,it,at,st,ut,lt,ct,ft,dt,ht,pt,gt,vt,mt,yt,bt,wt={};function xt(){if(D)return wt;D=1;var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,n=e&&!t.call({1:2},1);return wt.f=n?function(t){var n=e(this,t);return!!n&&n.enumerable}:t,wt}function Et(){return j?A:(j=1,A=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}})}function St(){if($)return I;$=1;var t=M(),e=Function.prototype,n=e.call,r=t&&e.bind.bind(n,n);return I=t?r:function(t){return function(){return n.apply(t,arguments)}},I}function Ot(){if(_)return F;_=1;var t=St(),e=t({}.toString),n=t("".slice);return F=function(t){return n(e(t),8,-1)}}function Ct(){if(W)return B;W=1;var t=St(),e=R(),n=Ot(),r=Object,o=t("".split);return B=e(function(){return!r("z").propertyIsEnumerable(0)})?function(t){return"String"===n(t)?o(t,""):r(t)}:r}function kt(){return U?H:(U=1,H=function(t){return null==t})}function Tt(){if(z)return V;z=1;var t=kt(),e=TypeError;return V=function(n){if(t(n))throw new e("Can't call method on "+n);return n}}function Nt(){if(q)return K;q=1;var t=Ct(),e=Tt();return K=function(n){return t(e(n))}}function Rt(){if(G)return J;G=1;var t="object"==typeof document&&document.all;return J=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(t){return"function"==typeof t}}function Lt(){if(X)return Y;X=1;var t=Rt();return Y=function(e){return"object"==typeof e?null!==e:t(e)}}function Mt(){if(Z)return Q;Z=1;var t=b(),e=Rt();return Q=function(n,r){return arguments.length<2?(o=t[n],e(o)?o:void 0):t[n]&&t[n][r];var o},Q}function Pt(){if(et)return tt;et=1;var t=St();return tt=t({}.isPrototypeOf)}function Dt(){if(rt)return nt;rt=1;var t=b().navigator,e=t&&t.userAgent;return nt=e?String(e):""}function At(){if(it)return ot;it=1;var t,e,n=b(),r=Dt(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(e=(t=s.split("."))[0]>0&&t[0]<4?1:+(t[0]+t[1])),!e&&r&&(!(t=r.match(/Edge\/(\d+)/))||t[1]>=74)&&(t=r.match(/Chrome\/(\d+)/))&&(e=+t[1]),ot=e}function jt(){if(st)return at;st=1;var t=At(),e=R(),n=b().String;return at=!!Object.getOwnPropertySymbols&&!e(function(){var e=Symbol("symbol detection");return!n(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&t&&t<41})}function It(){if(lt)return ut;lt=1;var t=jt();return ut=t&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function $t(){if(ft)return ct;ft=1;var t=Mt(),e=Rt(),n=Pt(),r=It(),o=Object;return ct=r?function(t){return"symbol"==typeof t}:function(r){var i=t("Symbol");return e(i)&&n(i.prototype,o(r))}}function Ft(){if(ht)return dt;ht=1;var t=String;return dt=function(e){try{return t(e)}catch(t){return"Object"}}}function _t(){if(gt)return pt;gt=1;var t=Rt(),e=Ft(),n=TypeError;return pt=function(r){if(t(r))return r;throw new n(e(r)+" is not a function")}}function Bt(){if(mt)return vt;mt=1;var t=_t(),e=kt();return vt=function(n,r){var o=n[r];return e(o)?void 0:t(o)}}function Wt(){if(bt)return yt;bt=1;var t=P(),e=Rt(),n=Lt(),r=TypeError;return yt=function(o,i){var a,s;if("string"===i&&e(a=o.toString)&&!n(s=t(a,o)))return s;if(e(a=o.valueOf)&&!n(s=t(a,o)))return s;if("string"!==i&&e(a=o.toString)&&!n(s=t(a,o)))return s;throw new r("Can't convert object to primitive value")}}var Ht,Ut,Vt,zt,Kt,qt,Jt,Gt,Yt,Xt,Qt,Zt,te,ee,ne,re,oe,ie,ae,se,ue,le,ce,fe,de={exports:{}};function he(){return Ut?Ht:(Ut=1,Ht=!1)}function pe(){if(zt)return Vt;zt=1;var t=b(),e=Object.defineProperty;return Vt=function(n,r){try{e(t,n,{value:r,configurable:!0,writable:!0})}catch(e){t[n]=r}return r}}function ge(){if(Kt)return de.exports;Kt=1;var t=he(),e=b(),n=pe(),r="__core-js_shared__",o=de.exports=e[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.45.1",mode:t?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.45.1/LICENSE",source:"https://github.com/zloirock/core-js"}),de.exports}function ve(){if(Jt)return qt;Jt=1;var t=ge();return qt=function(e,n){return t[e]||(t[e]=n||{})}}function me(){if(Yt)return Gt;Yt=1;var t=Tt(),e=Object;return Gt=function(n){return e(t(n))}}function ye(){if(Qt)return Xt;Qt=1;var t=St(),e=me(),n=t({}.hasOwnProperty);return Xt=Object.hasOwn||function(t,r){return n(e(t),r)}}function be(){if(te)return Zt;te=1;var t=St(),e=0,n=Math.random(),r=t(1.1.toString);return Zt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++e+n,36)}}function we(){if(ne)return ee;ne=1;var t=b(),e=ve(),n=ye(),r=be(),o=jt(),i=It(),a=t.Symbol,s=e("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return ee=function(t){return n(s,t)||(s[t]=o&&n(a,t)?a[t]:u("Symbol."+t)),s[t]}}function xe(){if(oe)return re;oe=1;var t=P(),e=Lt(),n=$t(),r=Bt(),o=Wt(),i=we(),a=TypeError,s=i("toPrimitive");return re=function(i,u){if(!e(i)||n(i))return i;var l,c=r(i,s);if(c){if(void 0===u&&(u="default"),l=t(c,i,u),!e(l)||n(l))return l;throw new a("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(i,u)}}function Ee(){if(ae)return ie;ae=1;var t=xe(),e=$t();return ie=function(n){var r=t(n,"string");return e(r)?r:r+""}}function Se(){if(ue)return se;ue=1;var t=b(),e=Lt(),n=t.document,r=e(n)&&e(n.createElement);return se=function(t){return r?n.createElement(t):{}}}function Oe(){if(ce)return le;ce=1;var t=L(),e=R(),n=Se();return le=!t&&!e(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Ce(){if(fe)return N;fe=1;var t=L(),e=P(),n=xt(),r=Et(),o=Nt(),i=Ee(),a=ye(),s=Oe(),u=Object.getOwnPropertyDescriptor;return N.f=t?u:function(t,l){if(t=o(t),l=i(l),s)try{return u(t,l)}catch(t){}if(a(t,l))return r(!e(n.f,t,l),t[l])},N}var ke,Te,Ne,Re,Le,Me,Pe,De={};function Ae(){if(Te)return ke;Te=1;var t=L(),e=R();return ke=t&&e(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}function je(){if(Re)return Ne;Re=1;var t=Lt(),e=String,n=TypeError;return Ne=function(r){if(t(r))return r;throw new n(e(r)+" is not an object")}}function Ie(){if(Le)return De;Le=1;var t=L(),e=Oe(),n=Ae(),r=je(),o=Ee(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return De.f=t?n?function(t,e,n){if(r(t),e=o(e),r(n),"function"==typeof t&&"prototype"===e&&"value"in n&&c in n&&!n[c]){var i=s(t,e);i&&i[c]&&(t[e]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(t,e,n)}:a:function(t,n,s){if(r(t),n=o(n),r(s),e)try{return a(t,n,s)}catch(t){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(t[n]=s.value),t},De}function $e(){if(Pe)return Me;Pe=1;var t=L(),e=Ie(),n=Et();return Me=t?function(t,r,o){return e.f(t,r,n(1,o))}:function(t,e,n){return t[e]=n,t}}var Fe,_e,Be,We,He,Ue,Ve,ze,Ke,qe,Je,Ge,Ye,Xe,Qe,Ze={exports:{}};function tn(){if(_e)return Fe;_e=1;var t=L(),e=ye(),n=Function.prototype,r=t&&Object.getOwnPropertyDescriptor,o=e(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!t||t&&r(n,"name").configurable);return Fe={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function en(){if(We)return Be;We=1;var t=St(),e=Rt(),n=ge(),r=t(Function.toString);return e(n.inspectSource)||(n.inspectSource=function(t){return r(t)}),Be=n.inspectSource}function nn(){if(Ue)return He;Ue=1;var t=b(),e=Rt(),n=t.WeakMap;return He=e(n)&&/native code/.test(String(n))}function rn(){if(ze)return Ve;ze=1;var t=ve(),e=be(),n=t("keys");return Ve=function(t){return n[t]||(n[t]=e(t))}}function on(){return qe?Ke:(qe=1,Ke={})}function an(){if(Ge)return Je;Ge=1;var t,e,n,r=nn(),o=b(),i=Lt(),a=$e(),s=ye(),u=ge(),l=rn(),c=on(),f="Object already initialized",d=o.TypeError,h=o.WeakMap;if(r||u.state){var p=u.state||(u.state=new h);p.get=p.get,p.has=p.has,p.set=p.set,t=function(t,e){if(p.has(t))throw new d(f);return e.facade=t,p.set(t,e),e},e=function(t){return p.get(t)||{}},n=function(t){return p.has(t)}}else{var g=l("state");c[g]=!0,t=function(t,e){if(s(t,g))throw new d(f);return e.facade=t,a(t,g,e),e},e=function(t){return s(t,g)?t[g]:{}},n=function(t){return s(t,g)}}return Je={set:t,get:e,has:n,enforce:function(r){return n(r)?e(r):t(r,{})},getterFor:function(t){return function(n){var r;if(!i(n)||(r=e(n)).type!==t)throw new d("Incompatible receiver, "+t+" required");return r}}}}function sn(){if(Ye)return Ze.exports;Ye=1;var t=St(),e=R(),n=Rt(),r=ye(),o=L(),i=tn().CONFIGURABLE,a=en(),s=an(),u=s.enforce,l=s.get,c=String,f=Object.defineProperty,d=t("".slice),h=t("".replace),p=t([].join),g=o&&!e(function(){return 8!==f(function(){},"length",{value:8}).length}),v=String(String).split("String"),m=Ze.exports=function(t,e,n){"Symbol("===d(c(e),0,7)&&(e="["+h(c(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!r(t,"name")||i&&t.name!==e)&&(o?f(t,"name",{value:e,configurable:!0}):t.name=e),g&&n&&r(n,"arity")&&t.length!==n.arity&&f(t,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var a=u(t);return r(a,"source")||(a.source=p(v,"string"==typeof e?e:"")),t};return Function.prototype.toString=m(function(){return n(this)&&l(this).source||a(this)},"toString"),Ze.exports}function un(){if(Qe)return Xe;Qe=1;var t=Rt(),e=Ie(),n=sn(),r=pe();return Xe=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(t(a)&&n(a,l,s),s.global)u?o[i]=a:r(i,a);else{try{s.unsafe?o[i]&&(u=!0):delete o[i]}catch(t){}u?o[i]=a:e.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o}}var ln,cn,fn,dn,hn,pn,gn,vn,mn,yn,bn,wn,xn,En,Sn,On,Cn,kn={};function Tn(){if(dn)return fn;dn=1;var t=function(){if(cn)return ln;cn=1;var t=Math.ceil,e=Math.floor;return ln=Math.trunc||function(n){var r=+n;return(r>0?e:t)(r)},ln}();return fn=function(e){var n=+e;return n!=n||0===n?0:t(n)}}function Nn(){if(pn)return hn;pn=1;var t=Tn(),e=Math.max,n=Math.min;return hn=function(r,o){var i=t(r);return i<0?e(i+o,0):n(i,o)}}function Rn(){if(vn)return gn;vn=1;var t=Tn(),e=Math.min;return gn=function(n){var r=t(n);return r>0?e(r,9007199254740991):0}}function Ln(){if(yn)return mn;yn=1;var t=Rn();return mn=function(e){return t(e.length)}}function Mn(){if(wn)return bn;wn=1;var t=Nt(),e=Nn(),n=Ln(),r=function(r){return function(o,i,a){var s=t(o),u=n(s);if(0===u)return!r&&-1;var l,c=e(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return bn={includes:r(!0),indexOf:r(!1)}}function Pn(){if(En)return xn;En=1;var t=St(),e=ye(),n=Nt(),r=Mn().indexOf,o=on(),i=t([].push);return xn=function(t,a){var s,u=n(t),l=0,c=[];for(s in u)!e(o,s)&&e(u,s)&&i(c,s);for(;a.length>l;)e(u,s=a[l++])&&(~r(c,s)||i(c,s));return c}}function Dn(){return On?Sn:(On=1,Sn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function An(){if(Cn)return kn;Cn=1;var t=Pn(),e=Dn().concat("length","prototype");return kn.f=Object.getOwnPropertyNames||function(n){return t(n,e)},kn}var jn,In,$n,Fn,_n,Bn,Wn,Hn,Un,Vn,zn,Kn,qn,Jn,Gn,Yn,Xn,Qn,Zn,tr,er,nr,rr,or,ir,ar,sr,ur,lr={};function cr(){return jn||(jn=1,lr.f=Object.getOwnPropertySymbols),lr}function fr(){if($n)return In;$n=1;var t=Mt(),e=St(),n=An(),r=cr(),o=je(),i=e([].concat);return In=t("Reflect","ownKeys")||function(t){var e=n.f(o(t)),a=r.f;return a?i(e,a(t)):e},In}function dr(){if(_n)return Fn;_n=1;var t=ye(),e=fr(),n=Ce(),r=Ie();return Fn=function(o,i,a){for(var s=e(i),u=r.f,l=n.f,c=0;c<s.length;c++){var f=s[c];t(o,f)||a&&t(a,f)||u(o,f,l(i,f))}},Fn}function hr(){if(Wn)return Bn;Wn=1;var t=R(),e=Rt(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(e(r)?t(r):!!r)},o=r.normalize=function(t){return String(t).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return Bn=r}function pr(){if(Un)return Hn;Un=1;var t=b(),e=Ce().f,n=$e(),r=un(),o=pe(),i=dr(),a=hr();return Hn=function(s,u){var l,c,f,d,h,p=s.target,g=s.global,v=s.stat;if(l=g?t:v?t[p]||o(p,{}):t[p]&&t[p].prototype)for(c in u){if(d=u[c],f=s.dontCallGetSet?(h=e(l,c))&&h.value:l[c],!a(g?c:p+(v?".":"#")+c,s.forced)&&void 0!==f){if(typeof d==typeof f)continue;i(d,f)}(s.sham||f&&f.sham)&&n(d,"sham",!0),r(l,c,d,s)}}}function gr(){if(zn)return Vn;zn=1;var t=Ot();return Vn=Array.isArray||function(e){return"Array"===t(e)}}function vr(){if(qn)return Kn;qn=1;var t=TypeError;return Kn=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}}function mr(){if(Gn)return Jn;Gn=1;var t=L(),e=Ie(),n=Et();return Jn=function(r,o,i){t?e.f(r,o,n(0,i)):r[o]=i}}function yr(){if(Xn)return Yn;Xn=1;var t={};return t[we()("toStringTag")]="z",Yn="[object z]"===String(t)}function br(){if(Zn)return Qn;Zn=1;var t=yr(),e=Rt(),n=Ot(),r=we()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return Qn=t?n:function(t){var a,s,u;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(s=function(t,e){try{return t[e]}catch(t){}}(a=o(t),r))?s:i?n(a):"Object"===(u=n(a))&&e(a.callee)?"Arguments":u}}function wr(){if(er)return tr;er=1;var t=St(),e=R(),n=Rt(),r=br(),o=Mt(),i=en(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=t(u.exec),c=!u.test(a),f=function(t){if(!n(t))return!1;try{return s(a,[],t),!0}catch(t){return!1}},d=function(t){if(!n(t))return!1;switch(r(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(t))}catch(t){return!0}};return d.sham=!0,tr=!s||e(function(){var t;return f(f.call)||!f(Object)||!f(function(){t=!0})||t})?d:f}function xr(){if(rr)return nr;rr=1;var t=gr(),e=wr(),n=Lt(),r=we()("species"),o=Array;return nr=function(i){var a;return t(i)&&(a=i.constructor,(e(a)&&(a===o||t(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a}}function Er(){if(ir)return or;ir=1;var t=xr();return or=function(e,n){return new(t(e))(0===n?0:n)}}function Sr(){if(sr)return ar;sr=1;var t=R(),e=we(),n=At(),r=e("species");return ar=function(e){return n>=51||!t(function(){var t=[];return(t.constructor={})[r]=function(){return{foo:1}},1!==t[e](Boolean).foo})}}!function(){if(ur)return y;ur=1;var t=pr(),e=R(),n=gr(),r=Lt(),o=me(),i=Ln(),a=vr(),s=mr(),u=Er(),l=Sr(),c=we(),f=At(),d=c("isConcatSpreadable"),h=f>=51||!e(function(){var t=[];return t[d]=!1,t.concat()[0]!==t}),p=function(t){if(!r(t))return!1;var e=t[d];return void 0!==e?!!e:n(t)};t({target:"Array",proto:!0,arity:1,forced:!h||!l("concat")},{concat:function(t){var e,n,r,l,c,f=o(this),d=u(f,0),h=0;for(e=-1,r=arguments.length;e<r;e++)if(p(c=-1===e?f:arguments[e]))for(l=i(c),a(h+l),n=0;n<l;n++,h++)n in c&&s(d,h,c[n]);else a(h+1),s(d,h++,c);return d.length=h,d}})}();var Or,Cr,kr,Tr={};function Nr(){if(Cr)return Or;Cr=1;var t=Pn(),e=Dn();return Or=Object.keys||function(n){return t(n,e)}}!function(){if(kr)return Tr;kr=1;var t=pr(),e=me(),n=Nr();t({target:"Object",stat:!0,forced:R()(function(){n(1)})},{keys:function(t){return n(e(t))}})}();var Rr,Lr,Mr,Pr={};!function(){if(Mr)return Pr;Mr=1;var t=yr(),e=un(),n=function(){if(Lr)return Rr;Lr=1;var t=yr(),e=br();return Rr=t?{}.toString:function(){return"[object "+e(this)+"]"}}();t||e(Object.prototype,"toString",n,{unsafe:!0})}();var Dr,Ar,jr,Ir,$r,Fr,_r,Br,Wr,Hr,Ur,Vr,zr,Kr,qr,Jr={};function Gr(){return Ar?Dr:(Ar=1,Dr={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 Yr(){if(Ir)return jr;Ir=1;var t=Se()("span").classList,e=t&&t.constructor&&t.constructor.prototype;return jr=e===Object.prototype?void 0:e}function Xr(){if(Fr)return $r;Fr=1;var t=Ot(),e=St();return $r=function(n){if("Function"===t(n))return e(n)}}function Qr(){if(Br)return _r;Br=1;var t=Xr(),e=_t(),n=M(),r=t(t.bind);return _r=function(t,o){return e(t),void 0===o?t:n?r(t,o):function(){return t.apply(o,arguments)}},_r}function Zr(){if(Hr)return Wr;Hr=1;var t=Qr(),e=St(),n=Ct(),r=me(),o=Ln(),i=Er(),a=e([].push),s=function(e){var s=1===e,u=2===e,l=3===e,c=4===e,f=6===e,d=7===e,h=5===e||f;return function(p,g,v,m){for(var y,b,w=r(p),x=n(w),E=o(x),S=t(g,v),O=0,C=m||i,k=s?C(p,E):u||d?C(p,0):void 0;E>O;O++)if((h||O in x)&&(b=S(y=x[O],O,w),e))if(s)k[O]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return O;case 2:a(k,y)}else switch(e){case 4:return!1;case 7:a(k,y)}return f?-1:l||c?c:k}};return Wr={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}function to(){if(Vr)return Ur;Vr=1;var t=R();return Ur=function(e,n){var r=[][e];return!!r&&t(function(){r.call(null,n||function(){return 1},1)})}}!function(){if(qr)return Jr;qr=1;var t=b(),e=Gr(),n=Yr(),r=function(){if(Kr)return zr;Kr=1;var t=Zr().forEach,e=to()("forEach");return zr=e?[].forEach:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)},zr}(),o=$e(),i=function(t){if(t&&t.forEach!==r)try{o(t,"forEach",r)}catch(e){t.forEach=r}};for(var a in e)e[a]&&i(t[a]&&t[a].prototype);i(n)}();var eo,no,ro={},oo={};function io(){if(eo)return oo;
|
|
2
2
|
/*!
|
|
3
3
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
6
6
|
* Released under the MIT License.
|
|
7
7
|
*/
|
|
8
|
-
function e(e){return"[object Object]"===Object.prototype.toString.call(e)}return to=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.isPlainObject=function(t){var n,r;return!1!==e(t)&&(void 0===(n=t.constructor)||!1!==e(r=n.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},oo}function ao(){if(no)return ro;no=1;var e=io(),n=t,r={isHistory:function(t){return e.isPlainObject(t)&&Array.isArray(t.redos)&&Array.isArray(t.undos)&&(0===t.redos.length||n.Operation.isOperationList(t.redos[0].operations))&&(0===t.undos.length||n.Operation.isOperationList(t.undos[0].operations))}},o=new WeakMap,i=new WeakMap,a=new WeakMap,s={isHistoryEditor:function(e){return r.isHistory(e.history)&&n.Editor.isEditor(e)},isMerging:function(e){return a.get(e)},isSaving:function(e){return i.get(e)},redo:function(e){e.redo()},undo:function(e){e.undo()},withMerging:function(e,t){var n=s.isMerging(e);a.set(e,!0),t(),a.set(e,n)},withoutMerging:function(e,t){var n=s.isMerging(e);a.set(e,!1),t(),a.set(e,n)},withoutSaving:function(e,t){var n=s.isSaving(e);i.set(e,!1),t(),i.set(e,n)}};function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},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(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var c=function(e,t){return!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!n.Path.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!n.Path.equals(e.path,t.path))},f=function(e,t){return"set_selection"!==e.type};return ro.HISTORY=o,ro.History=r,ro.HistoryEditor=s,ro.MERGING=a,ro.SAVING=i,ro.withHistory=function(e){var t=e,r=t.apply;return t.history={undos:[],redos:[]},t.redo=function(){var e=t.history,r=e.redos;if(r.length>0){var o=r[r.length-1];o.selectionBefore&&n.Transforms.setSelection(t,o.selectionBefore),s.withoutSaving(t,function(){n.Editor.withoutNormalizing(t,function(){var e,n=u(o.operations);try{for(n.s();!(e=n.n()).done;){var r=e.value;t.apply(r)}}catch(e){n.e(e)}finally{n.f()}})}),e.redos.pop(),t.writeHistory("undos",o)}},t.undo=function(){var e=t.history,r=e.undos;if(r.length>0){var o=r[r.length-1];s.withoutSaving(t,function(){n.Editor.withoutNormalizing(t,function(){var e,r=u(o.operations.map(n.Operation.inverse).reverse());try{for(r.s();!(e=r.n()).done;){var i=e.value;t.apply(i)}}catch(e){r.e(e)}finally{r.f()}o.selectionBefore&&n.Transforms.setSelection(t,o.selectionBefore)})}),t.writeHistory("redos",o),e.undos.pop()}},t.apply=function(e){var n=t.operations,o=t.history,i=o.undos,a=i[i.length-1],u=a&&a.operations[a.operations.length-1],l=s.isSaving(t),d=s.isMerging(t);if(null==l&&(l=f(e)),l){if(null==d&&(d=null!=a&&(0!==n.length||c(e,u))),a&&d)a.operations.push(e);else{var h={operations:[e],selectionBefore:t.selection};t.writeHistory("undos",h)}for(;i.length>100;)i.shift();o.redos=[]}r(e)},t.writeHistory=function(e,n){t.history[e].push(n)},t},ro}var so=ao(),uo=function(e,t){return uo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},uo(e,t)};function lo(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}uo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var co=function(){return co=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},co.apply(this,arguments)};function fo(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ho(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function po(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var go={};var vo="created",mo="destroyed",yo="change",bo="scroll",wo="fullscreen",xo="unFullScreen",Eo="modalOrPanelShow",So="modalOrPanelHide",Oo={};var Co,ko,To,No,Ro,Lo,Mo,Po,Do,Ao,jo,Io,$o,Fo,_o,Bo,Wo,Ho,Uo,Vo,zo,Ko,qo,Jo,Go,Yo,Xo,Qo,Zo,ei,ti,ni,ri,oi={};function ii(){if(To)return ko;To=1;var e=Me();return ko=e("document","documentElement")}function ai(){if(Ro)return No;Ro=1;var e,t=jt(),n=function(){if(Co)return oi;Co=1;var e=L(),t=At(),n=It(),r=jt(),o=Ne(),i=Nr();return oi.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},oi}(),r=Dn(),o=on(),i=ii(),a=St(),s=rn(),u="prototype",l="script",c=s("IE_PROTO"),f=function(){},d=function(e){return"<"+l+">"+e+"</"+l+">"},h=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;p="undefined"!=typeof document?document.domain&&e?h(e):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):h(e);for(var s=r.length;s--;)delete p[u][r[s]];return p()};return o[c]=!0,No=Object.create||function(e,r){var o;return null!==e?(f[u]=t(e),o=new f,f[u]=null,o[c]=e):o=p(),void 0===r?o:n.f(o,r)}}function si(){if(Mo)return Lo;Mo=1;var e=wt(),t=ai(),n=It().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),Lo=function(e){o[r][e]=!0}}function ui(){return Do?Po:(Do=1,Po={})}function li(){if($o)return Io;$o=1;var e=yt(),t=Re(),n=mt(),r=rn(),o=function(){if(jo)return Ao;jo=1;var e=R();return Ao=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return Io=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null}}function ci(){if(_o)return Fo;_o=1;var e,t,n,r=R(),o=Re(),i=Le(),a=ai(),s=li(),u=un(),l=wt(),c=ht(),f=l("iterator"),d=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):d=!0),!i(e)||r(function(){var t={};return e[f].call(t)!==t})?e={}:c&&(e=a(e)),o(e[f])||u(e,f,function(){return this}),Fo={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:d}}function fi(){if(Wo)return Bo;Wo=1;var e=It().f,t=yt(),n=wt()("toStringTag");return Bo=function(r,o,i){r&&!i&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function di(){if(qo)return Ko;qo=1;var e=Le();return Ko=function(t){return e(t)||null===t}}function hi(){if(Go)return Jo;Go=1;var e=di(),t=String,n=TypeError;return Jo=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function pi(){if(Xo)return Yo;Xo=1;var e=function(){if(zo)return Vo;zo=1;var e=Se(),t=_e();return Vo=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=Le(),n=Te(),r=hi();return Yo=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0)}function gi(){if(Zo)return Qo;Zo=1;var e=pr(),t=P(),n=ht(),r=en(),o=Re(),i=function(){if(Uo)return Ho;Uo=1;var e=ci().IteratorPrototype,t=ai(),n=Ee(),r=fi(),o=ui(),i=function(){return this};return Ho=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}(),a=li(),s=pi(),u=fi(),l=$t(),c=un(),f=wt(),d=ui(),h=ci(),p=r.PROPER,g=r.CONFIGURABLE,v=h.IteratorPrototype,m=h.BUGGY_SAFARI_ITERATORS,y=f("iterator"),b="keys",w="values",x="entries",E=function(){return this};return Qo=function(r,f,h,S,O,C,k){i(h,f,S);var T,N,R,L=function(e){if(e===O&&j)return j;if(!m&&e&&e in D)return D[e];switch(e){case b:case w:case x:return function(){return new h(this,e)}}return function(){return new h(this)}},M=f+" Iterator",P=!1,D=r.prototype,A=D[y]||D["@@iterator"]||O&&D[O],j=!m&&A||L(O),I="Array"===f&&D.entries||A;if(I&&(T=a(I.call(new r)))!==Object.prototype&&T.next&&(n||a(T)===v||(s?s(T,v):o(T[y])||c(T,y,E)),u(T,M,!0,!0),n&&(d[M]=E)),p&&O===w&&A&&A.name!==w&&(!n&&g?l(D,"name",w):(P=!0,j=function(){return t(A,this)})),O)if(N={values:L(w),keys:C?j:L(b),entries:L(x)},k)for(R in N)(m||P||!(R in D))&&c(D,R,N[R]);else e({target:f,proto:!0,forced:m||P},N);return n&&!k||D[y]===j||c(D,y,j,{name:O}),d[f]=j,N}}function vi(){return ti?ei:(ti=1,ei=function(e,t){return{value:e,done:t}})}function mi(){if(ri)return ni;ri=1;var e=Ne(),t=si(),n=ui(),r=an(),o=It().f,i=gi(),a=vi(),s=ht(),u=L(),l="Array Iterator",c=r.set,f=r.getterFor(l);ni=i(Array,"Array",function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=f(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)},"values");var d=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==d.name)try{o(d,"name",{value:"values"})}catch(e){}return ni}mi();var yi,bi,wi,xi,Ei,Si={};function Oi(){if(bi)return yi;bi=1;var e=br(),t=String;return yi=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function Ci(){if(xi)return wi;xi=1;var e=Se(),t=Tn(),n=Oi(),r=Te(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,f=n(r(s)),d=t(u),h=f.length;return d<0||d>=h?e?"":void 0:(l=i(f,d))<55296||l>56319||d+1===h||(c=i(f,d+1))<56320||c>57343?e?o(f,d):l:e?a(f,d,d+2):c-56320+(l-55296<<10)+65536}};return wi={codeAt:s(!1),charAt:s(!0)}}!function(){if(Ei)return Si;Ei=1;var e=Ci().charAt,t=Oi(),n=an(),r=gi(),o=vi(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))})}();var ki,Ti,Ni,Ri,Li={};function Mi(){if(Ti)return ki;Ti=1;var e=R();return ki=!e(function(){return Object.isExtensible(Object.preventExtensions({}))})}function Pi(){if(Ri)return Ni;Ri=1;var e=un();return Ni=function(t,n,r){for(var o in n)e(t,o,n[o],r);return t}}var Di,Ai,ji,Ii,$i,Fi,_i,Bi,Wi,Hi,Ui,Vi,zi,Ki,qi,Ji,Gi,Yi,Xi,Qi,Zi,ea,ta,na,ra,oa,ia,aa,sa,ua,la={exports:{}},ca={};function fa(){if(Ai)return Di;Ai=1;var e=Se();return Di=e([].slice)}function da(){if(ji)return ca;ji=1;var e=Oe(),t=Ne(),n=An().f,r=fa(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return ca.f=function(i){return o&&"Window"===e(i)?function(e){try{return n(e)}catch(e){return r(o)}}(i):n(t(i))},ca}function ha(){if(_i)return Fi;_i=1;var e=R(),t=Le(),n=Oe(),r=function(){if($i)return Ii;$i=1;var e=R();return Ii=e(function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})}(),o=Object.isExtensible,i=e(function(){});return Fi=i||r?function(e){return!!t(e)&&((!r||"ArrayBuffer"!==n(e))&&(!o||o(e)))}:o}function pa(){if(Bi)return la.exports;Bi=1;var e=pr(),t=Se(),n=on(),r=Le(),o=yt(),i=It().f,a=An(),s=da(),u=ha(),l=bt(),c=Mi(),f=!1,d=l("meta"),h=0,p=function(e){i(e,d,{value:{objectID:"O"+h++,weakData:{}}})},g=la.exports={enable:function(){g.enable=function(){},f=!0;var n=a.f,r=t([].splice),o={};o[d]=1,n(o).length&&(a.f=function(e){for(var t=n(e),o=0,i=t.length;o<i;o++)if(t[o]===d){r(t,o,1);break}return t},e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!o(e,d)){if(!u(e))return"F";if(!t)return"E";p(e)}return e[d].objectID},getWeakData:function(e,t){if(!o(e,d)){if(!u(e))return!0;if(!t)return!1;p(e)}return e[d].weakData},onFreeze:function(e){return c&&f&&u(e)&&!o(e,d)&&p(e),e}};return n[d]=!0,la.exports}function ga(){if(Hi)return Wi;Hi=1;var e=wt(),t=ui(),n=e("iterator"),r=Array.prototype;return Wi=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function va(){if(Vi)return Ui;Vi=1;var e=br(),t=Be(),n=ke(),r=ui(),o=wt()("iterator");return Ui=function(i){if(!n(i))return t(i,o)||t(i,"@@iterator")||r[e(i)]}}function ma(){if(Ki)return zi;Ki=1;var e=P(),t=_e(),n=jt(),r=Fe(),o=va(),i=TypeError;return zi=function(a,s){var u=arguments.length<2?o(a):s;if(t(u))return n(e(u,a));throw new i(r(a)+" is not iterable")},zi}function ya(){if(Ji)return qi;Ji=1;var e=P(),t=jt(),n=Be();return qi=function(r,o,i){var a,s;t(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=e(a,r)}catch(e){s=!0,a=e}if("throw"===o)throw i;if(s)throw a;return t(a),i}}function ba(){if(Yi)return Gi;Yi=1;var e=Qr(),t=P(),n=jt(),r=Fe(),o=ga(),i=Ln(),a=Pe(),s=ma(),u=va(),l=ya(),c=TypeError,f=function(e,t){this.stopped=e,this.result=t},d=f.prototype;return Gi=function(h,p,g){var v,m,y,b,w,x,E,S=g&&g.that,O=!(!g||!g.AS_ENTRIES),C=!(!g||!g.IS_RECORD),k=!(!g||!g.IS_ITERATOR),T=!(!g||!g.INTERRUPTED),N=e(p,S),R=function(e){return v&&l(v,"normal"),new f(!0,e)},L=function(e){return O?(n(e),T?N(e[0],e[1],R):N(e[0],e[1])):T?N(e,R):N(e)};if(C)v=h.iterator;else if(k)v=h;else{if(!(m=u(h)))throw new c(r(h)+" is not iterable");if(o(m)){for(y=0,b=i(h);b>y;y++)if((w=L(h[y]))&&a(d,w))return w;return new f(!1)}v=s(h,m)}for(x=C?h.next:v.next;!(E=t(x,v)).done;){try{w=L(E.value)}catch(e){l(v,"throw",e)}if("object"==typeof w&&w&&a(d,w))return w}return new f(!1)}}function wa(){if(Qi)return Xi;Qi=1;var e=Pe(),t=TypeError;return Xi=function(n,r){if(e(r,n))return n;throw new t("Incorrect invocation")}}function xa(){if(ea)return Zi;ea=1;var e=wt()("iterator"),t=!1;try{var n=0,r={next:function(){return{done:!!n++}},return:function(){t=!0}};r[e]=function(){return this},Array.from(r,function(){throw 2})}catch(e){}return Zi=function(n,r){try{if(!r&&!t)return!1}catch(e){return!1}var o=!1;try{var i={};i[e]=function(){return{next:function(){return{done:o=!0}}}},n(i)}catch(e){}return o}}function Ea(){if(na)return ta;na=1;var e=Re(),t=Le(),n=pi();return ta=function(r,o,i){var a,s;return n&&e(a=o.constructor)&&a!==i&&t(s=a.prototype)&&s!==i.prototype&&n(r,s),r}}function Sa(){if(oa)return ra;oa=1;var e=pr(),t=b(),n=Se(),r=hr(),o=un(),i=pa(),a=ba(),s=wa(),u=Re(),l=ke(),c=Le(),f=R(),d=xa(),h=fi(),p=Ea();return ra=function(g,v,m){var y=-1!==g.indexOf("Map"),b=-1!==g.indexOf("Weak"),w=y?"set":"add",x=t[g],E=x&&x.prototype,S=x,O={},C=function(e){var t=n(E[e]);o(E,e,"add"===e?function(e){return t(this,0===e?0:e),this}:"delete"===e?function(e){return!(b&&!c(e))&&t(this,0===e?0:e)}:"get"===e?function(e){return b&&!c(e)?void 0:t(this,0===e?0:e)}:"has"===e?function(e){return!(b&&!c(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(r(g,!u(x)||!(b||E.forEach&&!f(function(){(new x).entries().next()}))))S=m.getConstructor(v,g,y,w),i.enable();else if(r(g,!0)){var k=new S,T=k[w](b?{}:-0,1)!==k,N=f(function(){k.has(1)}),R=d(function(e){new x(e)}),L=!b&&f(function(){for(var e=new x,t=5;t--;)e[w](t,t);return!e.has(-0)});R||((S=v(function(e,t){s(e,E);var n=p(new x,e,S);return l(t)||a(t,n[w],{that:n,AS_ENTRIES:y}),n})).prototype=E,E.constructor=S),(N||L)&&(C("delete"),C("has"),y&&C("get")),(L||T)&&C(w),b&&E.clear&&delete E.clear}return O[g]=S,e({global:!0,constructor:!0,forced:S!==x},O),h(S,g),b||m.setStrong(S,g,y),S},ra}function Oa(){if(aa)return ia;aa=1;var e=Se(),t=Pi(),n=pa().getWeakData,r=wa(),o=jt(),i=ke(),a=Le(),s=ba(),u=Zr(),l=yt(),c=an(),f=c.set,d=c.getterFor,h=u.find,p=u.findIndex,g=e([].splice),v=0,m=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return h(e.entries,function(e){return e[0]===t})};return y.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=p(this.entries,function(t){return t[0]===e});return~t&&g(this.entries,t,1),!!~t}},ia={getConstructor:function(e,u,c,h){var p=e(function(e,t){r(e,g),f(e,{type:u,id:v++,frozen:null}),i(t)||s(t,e[h],{that:e,AS_ENTRIES:c})}),g=p.prototype,y=d(u),b=function(e,t,r){var i=y(e),a=n(o(t),!0);return!0===a?m(i).set(t,r):a[i.id]=r,e};return t(g,{delete:function(e){var t=y(this);if(!a(e))return!1;var r=n(e);return!0===r?m(t).delete(e):r&&l(r,t.id)&&delete r[t.id]},has:function(e){var t=y(this);if(!a(e))return!1;var r=n(e);return!0===r?m(t).has(e):r&&l(r,t.id)}}),t(g,c?{get:function(e){var t=y(this);if(a(e)){var r=n(e);if(!0===r)return m(t).get(e);if(r)return r[t.id]}},set:function(e,t){return b(this,e,t)}}:{add:function(e){return b(this,e,!0)}}),p}}}ua||(ua=1,function(){if(sa)return Li;sa=1;var e,t=Mi(),n=b(),r=Se(),o=Pi(),i=pa(),a=Sa(),s=Oa(),u=Le(),l=an().enforce,c=R(),f=nn(),d=Object,h=Array.isArray,p=d.isExtensible,g=d.isFrozen,v=d.isSealed,m=d.freeze,y=d.seal,w=!n.ActiveXObject&&"ActiveXObject"in n,x=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},E=a("WeakMap",x,s),S=E.prototype,O=r(S.set);if(f)if(w){e=s.getConstructor(x,"WeakMap",!0),i.enable();var C=r(S.delete),k=r(S.has),T=r(S.get);o(S,{delete:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),C(this,t)||n.frozen.delete(t)}return C(this,t)},has:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),k(this,t)||n.frozen.has(t)}return k(this,t)},get:function(t){if(u(t)&&!p(t)){var n=l(this);return n.frozen||(n.frozen=new e),k(this,t)?T(this,t):n.frozen.get(t)}return T(this,t)},set:function(t,n){if(u(t)&&!p(t)){var r=l(this);r.frozen||(r.frozen=new e),k(this,t)?O(this,t,n):r.frozen.set(t,n)}else O(this,t,n);return this}})}else t&&c(function(){var e=m([]);return O(new E,e,1),!g(e)})&&o(S,{set:function(e,t){var n;return h(e)&&(g(e)?n=m:v(e)&&(n=y)),O(this,e,t),n&&n(e),this}})}());var Ca,ka={};!function(){if(Ca)return ka;Ca=1;var e=b(),t=Gr(),n=Yr(),r=mi(),o=$t(),i=fi(),a=wt()("iterator"),s=r.values,u=function(e,n){if(e){if(e[a]!==s)try{o(e,a,s)}catch(t){e[a]=s}if(i(e,n,!0),t[n])for(var u in r)if(e[u]!==r[u])try{o(e,u,r[u])}catch(t){e[u]=r[u]}}};for(var l in t)u(e[l]&&e[l].prototype,l);u(n,"DOMTokenList")}();var Ta,Na=new WeakMap,Ra=new WeakMap,La=new WeakMap,Ma=new WeakMap,Pa=new WeakMap,Da=new WeakMap,Aa=new WeakMap,ja=new WeakMap,Ia=new WeakMap,$a=new WeakMap,Fa=new WeakMap,_a=new WeakMap,Ba=new WeakMap,Wa=new WeakMap,Ha=new WeakMap,Ua=new WeakMap,Va=new WeakMap,za=new WeakMap,Ka=new WeakMap,qa=new WeakMap,Ja=new WeakMap,Ga=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,Qa=new WeakMap,Za=new WeakMap,es=new WeakMap,ts=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in Oo)e.push(t);return e},t.getConfig=function(){var e=$a.get(t);if(null==e)throw new Error("Can not get editor config");return e},t.getMenuConfig=function(e){var n=t.getConfig().MENU_CONF;return(void 0===n?{}:n)[e]||{}},t.alert=function(e,n){void 0===n&&(n="info");var r=t.getConfig().customAlert;r&&r(e,n)},t},ns={};!function(){if(Ta)return ns;Ta=1;var e=pr(),t=Zr().filter;e({target:"Array",proto:!0,forced:!Sr()("filter")},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}();var rs,os,is,as,ss,us={};function ls(){if(os)return rs;os=1;var e=jt(),t=ya();return rs=function(n,r,o,i){try{return i?r(e(o)[0],o[1]):r(o)}catch(e){t(n,"throw",e)}}}!function(){if(ss)return us;ss=1;var e=pr(),t=function(){if(as)return is;as=1;var e=Qr(),t=P(),n=mt(),r=ls(),o=ga(),i=wr(),a=Ln(),s=mr(),u=ma(),l=va(),c=Array;return is=function(f){var d=n(f),h=i(this),p=arguments.length,g=p>1?arguments[1]:void 0,v=void 0!==g;v&&(g=e(g,p>2?arguments[2]:void 0));var m,y,b,w,x,E,S=l(d),O=0;if(!S||this===c&&o(S))for(m=a(d),y=h?new this(m):c(m);m>O;O++)E=v?g(d[O],O):d[O],s(y,O,E);else for(y=h?new this:[],x=(w=u(d,S)).next;!(b=t(x,w)).done;O++)E=v?r(w,g,[b.value,O],!0):b.value,s(y,O,E);return y.length=O,y},is}();e({target:"Array",stat:!0,forced:!xa()(function(e){Array.from(e)})},{from:t})}();var cs,fs={};!function(){if(cs)return fs;cs=1;var e=pr(),t=Mn().includes,n=R(),r=si();e({target:"Array",proto:!0,forced:n(function(){return!Array(1).includes()})},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r("includes")}();var ds,hs={};!function(){if(ds)return hs;ds=1;var e=pr(),t=Se(),n=Ce(),r=Ne(),o=eo(),i=t([].join);e({target:"Array",proto:!0,forced:n!==Object||!o("join",",")},{join:function(e){return i(r(this),void 0===e?",":e)}})}();var ps,gs={};!function(){if(ps)return gs;ps=1;var e=pr(),t=Zr().map;e({target:"Array",proto:!0,forced:!Sr()("map")},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}})}();var vs,ms,ys,bs,ws,xs,Es,Ss={};function Os(){if(ms)return vs;ms=1;var e=Le(),t=Oe(),n=wt()("match");return vs=function(r){var o;return e(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===t(r))}}function Cs(){if(bs)return ys;bs=1;var e=Os(),t=TypeError;return ys=function(n){if(e(n))throw new t("The method doesn't accept regular expressions");return n}}function ks(){if(xs)return ws;xs=1;var e=wt()("match");return ws=function(t){var n=/./;try{"/./"[t](n)}catch(r){try{return n[e]=!1,"/./"[t](n)}catch(e){}}return!1}}!function(){if(Es)return Ss;Es=1;var e=pr(),t=Se(),n=Cs(),r=Te(),o=Oi(),i=ks(),a=t("".indexOf);e({target:"String",proto:!0,forced:!i("includes")},{includes:function(e){return!!~a(o(r(this)),o(n(e)),arguments.length>1?arguments[1]:void 0)}})}();var Ts,Ns,Rs,Ls,Ms,Ps,Ds,As={};function js(){return Ns?Ts:(Ns=1,Ts="\t\n\v\f\r \u2028\u2029\ufeff")}!function(){if(Ds)return As;Ds=1;var e=pr(),t=function(){if(Ls)return Rs;Ls=1;var e=Se(),t=Te(),n=Oi(),r=js(),o=e("".replace),i=RegExp("^["+r+"]+"),a=RegExp("(^|[^"+r+"])["+r+"]+$"),s=function(e){return function(r){var s=n(t(r));return 1&e&&(s=o(s,i,"")),2&e&&(s=o(s,a,"$1")),s}};return Rs={start:s(1),end:s(2),trim:s(3)}}().trim,n=function(){if(Ps)return Ms;Ps=1;var e=en().PROPER,t=R(),n=js();return Ms=function(r){return t(function(){return!!n[r]()||"
"!=="
"[r]()||e&&n[r].name!==r})}}();e({target:"String",proto:!0,forced:n("trim")},{trim:function(){return t(this)}})}();var Is,$s,Fs,_s,Bs,Ws={};!function(){if(Bs)return Ws;Bs=1;var e=pr(),t=function(){if($s)return Is;$s=1;var e=Se(),t=Te(),n=Oi(),r=/"/g,o=e("".replace);return Is=function(e,i,a,s){var u=n(t(e)),l="<"+i;return""!==a&&(l+=" "+a+'="'+o(n(s),r,""")+'"'),l+">"+u+"</"+i+">"}}(),n=function(){if(_s)return Fs;_s=1;var e=R();return Fs=function(t){return e(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})}}();e({target:"String",proto:!0,forced:n("anchor")},{anchor:function(e){return t(this,"a","name",e)}})}();var Hs,Us,Vs,zs,Ks,qs,Js,Gs;function Ys(){if(Us)return Hs;Us=1;var e=sn(),t=It();return Hs=function(n,r,o){return o.get&&e(o.get,r,{getter:!0}),o.set&&e(o.set,r,{setter:!0}),t.f(n,r,o)}}function Xs(){if(zs)return Vs;zs=1;var e=Me(),t=Ys(),n=wt(),r=L(),o=n("species");return Vs=function(n){var i=e(n);r&&i&&!i[o]&&t(i,o,{configurable:!0,get:function(){return this}})}}Gs||(Gs=1,Js||(Js=1,Sa()("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},function(){if(qs)return Ks;qs=1;var e=ai(),t=Ys(),n=Pi(),r=Qr(),o=wa(),i=ke(),a=ba(),s=gi(),u=vi(),l=Xs(),c=L(),f=pa().fastKey,d=an(),h=d.set,p=d.getterFor;return Ks={getConstructor:function(s,u,l,d){var g=s(function(t,n){o(t,v),h(t,{type:u,index:e(null),first:null,last:null,size:0}),c||(t.size=0),i(n)||a(n,t[d],{that:t,AS_ENTRIES:l})}),v=g.prototype,m=p(u),y=function(e,t,n){var r,o,i=m(e),a=b(e,t);return a?a.value=n:(i.last=a={index:o=f(t,!0),key:t,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=a),r&&(r.next=a),c?i.size++:e.size++,"F"!==o&&(i.index[o]=a)),e},b=function(e,t){var n,r=m(e),o=f(t);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===t)return n};return n(v,{clear:function(){for(var t=m(this),n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=null),n=n.next;t.first=t.last=null,t.index=e(null),c?t.size=0:this.size=0},delete:function(e){var t=this,n=m(t),r=b(t,e);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first===r&&(n.first=o),n.last===r&&(n.last=i),c?n.size--:t.size--}return!!r},forEach:function(e){for(var t,n=m(this),o=r(e,arguments.length>1?arguments[1]:void 0);t=t?t.next:n.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!b(this,e)}}),n(v,l?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,0===e?0:e,t)}}:{add:function(e){return y(this,e=0===e?0:e,e)}}),c&&t(v,"size",{configurable:!0,get:function(){return m(this).size}}),g},setStrong:function(e,t,n){var r=t+" Iterator",o=p(t),i=p(r);s(e,t,function(e,t){h(this,{type:r,target:e,state:o(e),kind:t,last:null})},function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?u("keys"===t?n.key:"values"===t?n.value:[n.key,n.value],!1):(e.target=null,u(void 0,!0))},n?"entries":"values",!n,!0),l(t)}},Ks}())));var Qs,Zs,eu,tu,nu,ru,ou,iu,au,su,uu,lu=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),cu={};function fu(){if(Zs)return Qs;Zs=1;var e=jt();return Qs=function(){var t=e(this),n="";return t.hasIndices&&(n+="d"),t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),t.sticky&&(n+="y"),n}}function du(){if(tu)return eu;tu=1;var e=R(),t=b().RegExp,n=e(function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),r=n||e(function(){return!t("a","y").sticky}),o=n||e(function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")});return eu={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}function hu(){if(ru)return nu;ru=1;var e=R(),t=b().RegExp;return nu=e(function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})}function pu(){if(iu)return ou;iu=1;var e=R(),t=b().RegExp;return ou=e(function(){var e=t("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})}function gu(){if(su)return au;su=1;var e,t,n=P(),r=Se(),o=Oi(),i=fu(),a=du(),s=vt(),u=ai(),l=an().get,c=hu(),f=pu(),d=s("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(t=/b*/g,n(h,e=/a/,"a"),n(h,t,"a"),0!==e.lastIndex||0!==t.lastIndex),w=a.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];return(b||x||w||c||f)&&(p=function(e){var t,r,a,s,c,f,E,S=this,O=l(S),C=o(e),k=O.raw;if(k)return k.lastIndex=S.lastIndex,t=n(p,k,C),S.lastIndex=k.lastIndex,t;var T=O.groups,N=w&&S.sticky,R=n(i,S),L=S.source,M=0,P=C;if(N&&(R=m(R,"y",""),-1===v(R,"g")&&(R+="g"),P=y(C,S.lastIndex),S.lastIndex>0&&(!S.multiline||S.multiline&&"\n"!==g(C,S.lastIndex-1))&&(L="(?: "+L+")",P=" "+P,M++),r=new RegExp("^(?:"+L+")",R)),x&&(r=new RegExp("^"+L+"$(?!\\s)",R)),b&&(a=S.lastIndex),s=n(h,N?r:S,P),N?s?(s.input=y(s.input,M),s[0]=y(s[0],M),s.index=S.lastIndex,S.lastIndex+=s[0].length):S.lastIndex=0:b&&s&&(S.lastIndex=S.global?s.index+s[0].length:a),x&&s&&s.length>1&&n(d,s[0],r,function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)}),s&&T)for(s.groups=f=u(null),c=0;c<T.length;c++)f[(E=T[c])[0]]=s[E[1]];return s}),au=p}function vu(){if(uu)return cu;uu=1;var e=pr(),t=gu();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),cu}vu();var mu,yu,bu,wu,xu,Eu,Su,Ou,Cu,ku,Tu,Nu={};function Ru(){if(yu)return mu;yu=1,vu();var e=P(),t=un(),n=gu(),r=R(),o=wt(),i=$t(),a=o("species"),s=RegExp.prototype;return mu=function(u,l,c,f){var d=o(u),h=!r(function(){var e={};return e[d]=function(){return 7},7!==""[u](e)}),p=h&&!r(function(){var e=!1,t=/a/;return"split"===u&&((t={}).constructor={},t.constructor[a]=function(){return t},t.flags="",t[d]=/./[d]),t.exec=function(){return e=!0,null},t[d](""),!e});if(!h||!p||c){var g=/./[d],v=l(d,""[u],function(t,r,o,i,a){var u=r.exec;return u===n||u===s.exec?h&&!a?{done:!0,value:e(g,r,o,i)}:{done:!0,value:e(t,o,r,i)}:{done:!1}});t(String.prototype,u,v[0]),t(s,d,v[1])}f&&i(s[d],"sham",!0)},mu}function Lu(){if(wu)return bu;wu=1;var e=wr(),t=Fe(),n=TypeError;return bu=function(r){if(e(r))return r;throw new n(t(r)+" is not a constructor")}}function Mu(){if(Eu)return xu;Eu=1;var e=jt(),t=Lu(),n=ke(),r=wt()("species");return xu=function(o,i){var a,s=e(o).constructor;return void 0===s||n(a=e(s)[r])?i:t(a)}}function Pu(){if(Ou)return Su;Ou=1;var e=Ci().charAt;return Su=function(t,n,r){return n+(r?e(t,n).length:1)}}function Du(){if(ku)return Cu;ku=1;var e=P(),t=jt(),n=Re(),r=Oe(),o=gu(),i=TypeError;return Cu=function(a,s){var u=a.exec;if(n(u)){var l=e(u,a,s);return null!==l&&t(l),l}if("RegExp"===r(a))return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")}}!function(){if(Tu)return Nu;Tu=1;var e=P(),t=Se(),n=Ru(),r=jt(),o=Le(),i=Te(),a=Mu(),s=Pu(),u=Rn(),l=Oi(),c=Be(),f=Du(),d=du(),h=R(),p=d.UNSUPPORTED_Y,g=Math.min,v=t([].push),m=t("".slice),y=!h(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),b="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;n("split",function(t,n,d){var h="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e(n,this,t,r)}:n;return[function(n,r){var a=i(this),s=o(n)?c(n,t):void 0;return s?e(s,n,a,r):e(h,l(a),n,r)},function(e,t){var o=r(this),i=l(e);if(!b){var c=d(h,o,i,t,h!==n);if(c.done)return c.value}var y=a(o,RegExp),w=o.unicode,x=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(p?"g":"y"),E=new y(p?"^(?:"+o.source+")":o,x),S=void 0===t?4294967295:t>>>0;if(0===S)return[];if(0===i.length)return null===f(E,i)?[i]:[];for(var O=0,C=0,k=[];C<i.length;){E.lastIndex=p?0:C;var T,N=f(E,p?m(i,C):i);if(null===N||(T=g(u(E.lastIndex+(p?C:0)),i.length))===O)C=s(i,C,w);else{if(v(k,m(i,O,C)),k.length===S)return k;for(var R=1;R<=N.length-1;R++)if(v(k,N[R]),k.length===S)return k;C=O=T}}return v(k,m(i,O)),k}]},b||!y,p)}();var Au,ju={};!function(){if(Au)return ju;Au=1;var e=pr(),t=Zr().find,n=si(),r="find",o=!0;r in[]&&Array(1)[r](function(){o=!1}),e({target:"Array",proto:!0,forced:o},{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n(r)}();var Iu,$u,Fu,_u={};!function(){if(Fu)return _u;Fu=1;var e=pr(),t=function(){if($u)return Iu;$u=1;var e=gr(),t=Ln(),n=vr(),r=Qr(),o=function(i,a,s,u,l,c,f,d){for(var h,p,g=l,v=0,m=!!f&&r(f,d);v<u;)v in s&&(h=m?m(s[v],v,a):s[v],c>0&&e(h)?(p=t(h),g=o(i,a,h,p,g,c-1)-1):(n(g+1),i[g]=h),g++),v++;return g};return Iu=o}(),n=_e(),r=mt(),o=Ln(),i=Er();e({target:"Array",proto:!0},{flatMap:function(e){var a,s=r(this),u=o(s);return n(e),(a=i(s,0)).length=t(a,s,s,u,0,1,e,arguments.length>1?arguments[1]:void 0),a}})}();var Bu;Bu||(Bu=1,si()("flatMap"));var Wu,Hu,Uu={};Hu||(Hu=1,function(){if(Wu)return Uu;Wu=1;var e=pr(),t=b();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());const Vu=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var zu,Ku,qu,Ju,Gu,Yu,Xu,Qu,Zu,el,tl,nl,rl,ol,il,al,sl,ul,ll,cl,fl,dl,hl,pl,gl,vl,ml,yl,bl,wl,xl,El,Sl={};function Ol(){if(Ku)return zu;Ku=1;var e=b(),t=De(),n=Oe(),r=function(e){return t.slice(0,e.length)===e};return zu=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":e.Bun&&"string"==typeof Bun.version?"BUN":e.Deno&&"object"==typeof Deno.version?"DENO":"process"===n(e.process)?"NODE":e.window&&e.document?"BROWSER":"REST"}function Cl(){if(Ju)return qu;Ju=1;var e=Ol();return qu="NODE"===e}function kl(){if(Yu)return Gu;Yu=1;var e=b();return Gu=e}function Tl(){if(Qu)return Xu;Qu=1;var e=M(),t=Function.prototype,n=t.apply,r=t.call;return Xu="object"==typeof Reflect&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),Xu}function Nl(){if(el)return Zu;el=1;var e=TypeError;return Zu=function(t,n){if(t<n)throw new e("Not enough arguments");return t}}function Rl(){if(nl)return tl;nl=1;var e=De();return tl=/(?:ipad|iphone|ipod).*applewebkit/i.test(e)}function Ll(){if(ol)return rl;ol=1;var e,t,n,r,o=b(),i=Tl(),a=Qr(),s=Re(),u=yt(),l=R(),c=ii(),f=fa(),d=St(),h=Nl(),p=Rl(),g=Cl(),v=o.setImmediate,m=o.clearImmediate,y=o.process,w=o.Dispatch,x=o.Function,E=o.MessageChannel,S=o.String,O=0,C={},k="onreadystatechange";l(function(){e=o.location});var T=function(e){if(u(C,e)){var t=C[e];delete C[e],t()}},N=function(e){return function(){T(e)}},L=function(e){T(e.data)},M=function(t){o.postMessage(S(t),e.protocol+"//"+e.host)};return v&&m||(v=function(e){h(arguments.length,1);var n=s(e)?e:x(e),r=f(arguments,1);return C[++O]=function(){i(n,void 0,r)},t(O),O},m=function(e){delete C[e]},g?t=function(e){y.nextTick(N(e))}:w&&w.now?t=function(e){w.now(N(e))}:E&&!p?(r=(n=new E).port2,n.port1.onmessage=L,t=a(r.postMessage,r)):o.addEventListener&&s(o.postMessage)&&!o.importScripts&&e&&"file:"!==e.protocol&&!l(M)?(t=M,o.addEventListener("message",L,!1)):t=k in d("script")?function(e){c.appendChild(d("script"))[k]=function(){c.removeChild(this),T(e)}}:function(e){setTimeout(N(e),0)}),rl={set:v,clear:m}}function Ml(){if(al)return il;al=1;var e=b(),t=L(),n=Object.getOwnPropertyDescriptor;return il=function(r){if(!t)return e[r];var o=n(e,r);return o&&o.value}}function Pl(){if(ul)return sl;ul=1;var e=function(){this.head=null,this.tail=null};return e.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},sl=e}function Dl(){if(pl)return hl;pl=1;var e,t,n,r,o,i=b(),a=Ml(),s=Qr(),u=Ll().set,l=Pl(),c=Rl(),f=function(){if(cl)return ll;cl=1;var e=De();return ll=/ipad|iphone|ipod/i.test(e)&&"undefined"!=typeof Pebble}(),d=function(){if(dl)return fl;dl=1;var e=De();return fl=/web0s(?!.*chrome)/i.test(e)}(),h=Cl(),p=i.MutationObserver||i.WebKitMutationObserver,g=i.document,v=i.process,m=i.Promise,y=a("queueMicrotask");if(!y){var w=new l,x=function(){var t,n;for(h&&(t=v.domain)&&t.exit();n=w.get();)try{n()}catch(t){throw w.head&&e(),t}t&&t.enter()};c||h||d||!p||!g?!f&&m&&m.resolve?((r=m.resolve(void 0)).constructor=m,o=s(r.then,r),e=function(){o(x)}):h?e=function(){v.nextTick(x)}:(u=s(u,i),e=function(){u(x)}):(t=!0,n=g.createTextNode(""),new p(x).observe(n,{characterData:!0}),e=function(){n.data=t=!t}),y=function(t){w.head||e(),w.add(t)}}return hl=y}function Al(){return vl||(vl=1,gl=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}),gl}function jl(){return yl?ml:(yl=1,ml=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}})}function Il(){if(wl)return bl;wl=1;var e=b();return bl=e.Promise}function $l(){if(El)return xl;El=1;var e=b(),t=Il(),n=Re(),r=hr(),o=tn(),i=wt(),a=Ol(),s=ht(),u=Ae(),l=t&&t.prototype,c=i("species"),f=!1,d=n(e.PromiseRejectionEvent),h=r("Promise",function(){var e=o(t),n=e!==String(t);if(!n&&66===u)return!0;if(s&&(!l.catch||!l.finally))return!0;if(!u||u<51||!/native code/.test(e)){var r=new t(function(e){e(1)}),i=function(e){e(function(){},function(){})};if((r.constructor={})[c]=i,!(f=r.then(function(){})instanceof i))return!0}return!(n||"BROWSER"!==a&&"DENO"!==a||d)});return xl={CONSTRUCTOR:h,REJECTION_EVENT:d,SUBCLASSING:f}}var Fl,_l,Bl={};function Wl(){if(Fl)return Bl;Fl=1;var e=_e(),t=TypeError,n=function(n){var r,o;this.promise=new n(function(e,n){if(void 0!==r||void 0!==o)throw new t("Bad Promise constructor");r=e,o=n}),this.resolve=e(r),this.reject=e(o)};return Bl.f=function(e){return new n(e)},Bl}var Hl,Ul,Vl,zl={};function Kl(){if(Ul)return Hl;Ul=1;var e=Il(),t=xa(),n=$l().CONSTRUCTOR;return Hl=n||!t(function(t){e.all(t).then(void 0,function(){})})}var ql,Jl={};var Gl,Yl={};var Xl,Ql={};var Zl,ec,tc,nc,rc={};function oc(){if(ec)return Zl;ec=1;var e=jt(),t=Le(),n=Wl();return Zl=function(r,o){if(e(r),t(o)&&o.constructor===r)return o;var i=n.f(r);return(0,i.resolve)(o),i.promise}}nc||(nc=1,function(){if(_l)return Sl;_l=1;var e,t,n,r,o=pr(),i=ht(),a=Cl(),s=b(),u=kl(),l=P(),c=un(),f=pi(),d=fi(),h=Xs(),p=_e(),g=Re(),v=Le(),m=wa(),y=Mu(),w=Ll().set,x=Dl(),E=Al(),S=jl(),O=Pl(),C=an(),k=Il(),T=$l(),N=Wl(),R="Promise",L=T.CONSTRUCTOR,M=T.REJECTION_EVENT,D=T.SUBCLASSING,A=C.getterFor(R),j=C.set,I=k&&k.prototype,$=k,F=I,_=s.TypeError,B=s.document,W=s.process,H=N.f,U=H,V=!!(B&&B.createEvent&&s.dispatchEvent),z="unhandledrejection",K=function(e){var t;return!(!v(e)||!g(t=e.then))&&t},q=function(e,t){var n,r,o,i=t.value,a=1===t.state,s=a?e.ok:e.fail,u=e.resolve,c=e.reject,f=e.domain;try{s?(a||(2===t.rejection&&Q(t),t.rejection=1),!0===s?n=i:(f&&f.enter(),n=s(i),f&&(f.exit(),o=!0)),n===e.promise?c(new _("Promise-chain cycle")):(r=K(n))?l(r,n,u,c):u(n)):c(i)}catch(e){f&&!o&&f.exit(),c(e)}},J=function(e,t){e.notified||(e.notified=!0,x(function(){for(var n,r=e.reactions;n=r.get();)q(n,e);e.notified=!1,t&&!e.rejection&&Y(e)}))},G=function(e,t,n){var r,o;V?((r=B.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),s.dispatchEvent(r)):r={promise:t,reason:n},!M&&(o=s["on"+e])?o(r):e===z&&E("Unhandled promise rejection",n)},Y=function(e){l(w,s,function(){var t,n=e.facade,r=e.value;if(X(e)&&(t=S(function(){a?W.emit("unhandledRejection",r,n):G(z,n,r)}),e.rejection=a||X(e)?2:1,t.error))throw t.value})},X=function(e){return 1!==e.rejection&&!e.parent},Q=function(e){l(w,s,function(){var t=e.facade;a?W.emit("rejectionHandled",t):G("rejectionhandled",t,e.value)})},Z=function(e,t,n){return function(r){e(t,r,n)}},ee=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,J(e,!0))},te=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new _("Promise can't be resolved itself");var r=K(t);r?x(function(){var n={done:!1};try{l(r,t,Z(te,n,e),Z(ee,n,e))}catch(t){ee(n,t,e)}}):(e.value=t,e.state=1,J(e,!1))}catch(t){ee({done:!1},t,e)}}};if(L&&(F=($=function(t){m(this,F),p(t),l(e,this);var n=A(this);try{t(Z(te,n),Z(ee,n))}catch(e){ee(n,e)}}).prototype,(e=function(e){j(this,{type:R,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:null})}).prototype=c(F,"then",function(e,t){var n=A(this),r=H(y(this,$));return n.parent=!0,r.ok=!g(e)||e,r.fail=g(t)&&t,r.domain=a?W.domain:void 0,0===n.state?n.reactions.add(r):x(function(){q(r,n)}),r.promise}),t=function(){var t=new e,n=A(t);this.promise=t,this.resolve=Z(te,n),this.reject=Z(ee,n)},N.f=H=function(e){return e===$||e===n?new t(e):U(e)},!i&&g(k)&&I!==Object.prototype)){r=I.then,D||c(I,"then",function(e,t){var n=this;return new $(function(e,t){l(r,n,e,t)}).then(e,t)},{unsafe:!0});try{delete I.constructor}catch(e){}f&&f(I,F)}o({global:!0,constructor:!0,wrap:!0,forced:L},{Promise:$}),n=u.Promise,d($,R,!1,!0),h(R)}(),function(){if(Vl)return zl;Vl=1;var e=pr(),t=P(),n=_e(),r=Wl(),o=jl(),i=ba();e({target:"Promise",stat:!0,forced:Kl()},{all:function(e){var a=this,s=r.f(a),u=s.resolve,l=s.reject,c=o(function(){var r=n(a.resolve),o=[],s=0,c=1;i(e,function(e){var n=s++,i=!1;c++,t(r,a,e).then(function(e){i||(i=!0,o[n]=e,--c||u(o))},l)}),--c||u(o)});return c.error&&l(c.value),s.promise}})}(),function(){if(ql)return Jl;ql=1;var e=pr(),t=ht(),n=$l().CONSTRUCTOR,r=Il(),o=Me(),i=Re(),a=un(),s=r&&r.prototype;if(e({target:"Promise",proto:!0,forced:n,real:!0},{catch:function(e){return this.then(void 0,e)}}),!t&&i(r)){var u=o("Promise").prototype.catch;s.catch!==u&&a(s,"catch",u,{unsafe:!0})}}(),function(){if(Gl)return Yl;Gl=1;var e=pr(),t=P(),n=_e(),r=Wl(),o=jl(),i=ba();e({target:"Promise",stat:!0,forced:Kl()},{race:function(e){var a=this,s=r.f(a),u=s.reject,l=o(function(){var r=n(a.resolve);i(e,function(e){t(r,a,e).then(s.resolve,u)})});return l.error&&u(l.value),s.promise}})}(),function(){if(Xl)return Ql;Xl=1;var e=pr(),t=Wl();e({target:"Promise",stat:!0,forced:$l().CONSTRUCTOR},{reject:function(e){var n=t.f(this);return(0,n.reject)(e),n.promise}})}(),function(){if(tc)return rc;tc=1;var e=pr(),t=Me(),n=ht(),r=Il(),o=$l().CONSTRUCTOR,i=oc(),a=t("Promise"),s=n&&!o;e({target:"Promise",stat:!0,forced:n||o},{resolve:function(e){return i(s&&this===a?r:this,e)}})}());var ic,ac,sc,uc,lc,cc={};function fc(){if(uc)return sc;uc=1;var e=P(),t=yt(),n=Pe(),r=function(){if(ac)return ic;ac=1;var e=b(),t=R(),n=e.RegExp,r=!t(function(){var e=!0;try{n(".","d")}catch(t){e=!1}var t={},r="",o=e?"dgimsy":"gimsy",i=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(a.hasIndices="d"),a)i(s,a[s]);return Object.getOwnPropertyDescriptor(n.prototype,"flags").get.call(t)!==o||r!==o});return ic={correct:r}}(),o=fu(),i=RegExp.prototype;return sc=r.correct?function(e){return e.flags}:function(a){return r.correct||!n(i,a)||t(a,"flags")?a.flags:e(o,a)}}!function(){if(lc)return cc;lc=1;var e=en().PROPER,t=un(),n=jt(),r=Oi(),o=R(),i=fc(),a="toString",s=RegExp.prototype,u=s[a],l=o(function(){return"/a/b"!==u.call({source:"a",flags:"b"})}),c=e&&u.name!==a;(l||c)&&t(s,a,function(){var e=n(this);return"/"+r(e.source)+"/"+r(i(e))},{unsafe:!0})}();var dc,hc,pc,gc={};function vc(){if(hc)return dc;hc=1;var e=Se(),t=mt(),n=Math.floor,r=e("".charAt),o=e("".replace),i=e("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return dc=function(e,u,l,c,f,d){var h=l+e.length,p=c.length,g=s;return void 0!==f&&(f=t(f),g=a),o(d,g,function(t,o){var a;switch(r(o,0)){case"$":return"$";case"&":return e;case"`":return i(u,0,l);case"'":return i(u,h);case"<":a=f[i(o,1,-1)];break;default:var s=+o;if(0===s)return t;if(s>p){var d=n(s/10);return 0===d?t:d<=p?void 0===c[d-1]?r(o,1):c[d-1]+r(o,1):t}a=c[s-1]}return void 0===a?"":a})},dc}function mc(e){Promise.resolve().then(e)}!function(){if(pc)return gc;pc=1;var e=Tl(),t=P(),n=Se(),r=Ru(),o=R(),i=jt(),a=Re(),s=Le(),u=Tn(),l=Rn(),c=Oi(),f=Te(),d=Pu(),h=Be(),p=vc(),g=fc(),v=Du(),m=wt()("replace"),y=Math.max,b=Math.min,w=n([].concat),x=n([].push),E=n("".indexOf),S=n("".slice),O=function(e){return void 0===e?e:String(e)},C="$0"==="a".replace(/./,"$0"),k=!!/./[m]&&""===/./[m]("a","$0");r("replace",function(n,r,o){var C=k?"$":"$0";return[function(e,n){var o=f(this),i=s(e)?h(e,m):void 0;return i?t(i,e,o,n):t(r,c(o),e,n)},function(t,n){var s=i(this),f=c(t);if("string"==typeof n&&-1===E(n,C)&&-1===E(n,"$<")){var h=o(r,s,f,n);if(h.done)return h.value}var m=a(n);m||(n=c(n));var k,T=c(g(s)),N=-1!==E(T,"g");N&&(k=-1!==E(T,"u"),s.lastIndex=0);for(var R,L=[];null!==(R=v(s,f))&&(x(L,R),N);){""===c(R[0])&&(s.lastIndex=d(f,l(s.lastIndex),k))}for(var M="",P=0,D=0;D<L.length;D++){for(var A,j=c((R=L[D])[0]),I=y(b(u(R.index),f.length),0),$=[],F=1;F<R.length;F++)x($,O(R[F]));var _=R.groups;if(m){var B=w([j],$,I,f);void 0!==_&&x(B,_),A=c(e(n,void 0,B))}else A=p(j,f,I,$,_,n);I>=P&&(M+=S(f,P,I)+A,P=I+j.length)}return M+S(f,P)}]},!!o(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})||!C||k)}();var yc,bc=function(e){return Object.prototype.toString.call(e)},wc=globalThis.Node,xc=globalThis.Comment,Ec=globalThis.Element,Sc=globalThis.Text,Oc=globalThis.Range,Cc=globalThis.Selection,kc=globalThis.StaticRange;o.css&&(o.fn.css=o.css),o.append&&(o.fn.append=o.append),o.addClass&&(o.fn.addClass=o.addClass),o.removeClass&&(o.fn.removeClass=o.removeClass),o.hasClass&&(o.fn.hasClass=o.hasClass),o.on&&(o.fn.on=o.on),o.focus&&(o.fn.focus=o.focus),o.attr&&(o.fn.attr=o.attr),o.removeAttr&&(o.fn.removeAttr=o.removeAttr),o.hide&&(o.fn.hide=o.hide),o.show&&(o.fn.show=o.show),o.offset&&(o.fn.offset=o.offset),o.width&&(o.fn.width=o.width),o.height&&(o.fn.height=o.height),o.parent&&(o.fn.parent=o.parent),o.parents&&(o.fn.parents=o.parents),o.is&&(o.fn.is=o.is),o.dataset&&(o.fn.dataset=o.dataset),o.val&&(o.fn.val=o.val),o.text&&(o.fn.text=o.text),o.html&&(o.fn.html=o.html),o.children&&(o.fn.children=o.children),o.remove&&(o.fn.remove=o.remove),o.find&&(o.fn.find=o.find),o.each&&(o.fn.each=o.each),o.empty&&(o.fn.empty=o.empty),e.NodeType=void 0,(yc=e.NodeType||(e.NodeType={}))[yc.ELEMENT_NODE=1]="ELEMENT_NODE",yc[yc.TEXT_NODE=3]="TEXT_NODE",yc[yc.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",yc[yc.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",yc[yc.COMMENT_NODE=8]="COMMENT_NODE",yc[yc.DOCUMENT_NODE=9]="DOCUMENT_NODE",yc[yc.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",yc[yc.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";var Tc=function(e){return"[object HTMLDocument]"===bc(e)},Nc=function(e){return"[object ShadowRoot]"===bc(e)},Rc=function(e){return"[object DataTransfer]"===bc(e)},Lc=/\[object HTML([A-Z][a-z]*)*Element\]/,Mc=function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")},Pc=function(e){return Lc.test(bc(e))},Dc=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},Ac=function(e){return null!=e&&"number"==typeof e.nodeType},jc=function(t){return Ac(t)&&t.nodeType===e.NodeType.COMMENT_NODE},Ic=function(t){return Ac(t)&&t.nodeType===e.NodeType.ELEMENT_NODE},$c=function(e){return"[object Selection]"===bc(e)},Fc=function(t){return Ac(t)&&t.nodeType===e.NodeType.TEXT_NODE},_c=function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length},Bc=function(e){var t,n=ho(e,2),r=n[0],o=n[1];if(Ic(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=ho(Uc(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;Ic(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=Vc(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},Wc=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},Hc=function(e){var t,n,r;return null!==(t=window&&window.document.getElementById(e))&&void 0!==t?t:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},Uc=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(jc(o)||Ic(o)&&0===o.childNodes.length||Ic(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=t-1,n="backward"):i<0?(s=!0,i=t+1,n="forward"):(o=r[i],t=i,i+="forward"===n?1:-1);return[o,t]},Vc=function(e,t,n){return ho(Uc(e,t,n),1)[0]},zc=function(e){var t,n,r="";if(Fc(e)&&e.nodeValue)return e.nodeValue;if(Ic(e)){try{for(var o=fo(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=zc(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}var s=getComputedStyle(e).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==e.tagName||(r+="\n")}return r};function Kc(t){var n=[];n.push(t);for(var r=0;n.length>0;){var o=n.pop();if(null==o)break;if((r+=1)>1e4)break;var i=o.nodeName;if(o.nodeType===e.NodeType.ELEMENT_NODE){var a=i.toLowerCase();if(Vu.includes(a)||"iframe"===a||"video"===a)return o;var s=o.children||[],u=s.length;if(u)for(var l=u-1;l>=0;l-=1)n.push(s[l])}}return null}function qc(t,n){if(!Pc(t)||"true"!==t.dataset.slateVoid)for(var r=t.childNodes,o=r.length;o-=1;){var i=r[o],a=i.nodeType;Fc(i)?n(i,t):[e.NodeType.ELEMENT_NODE,e.NodeType.DOCUMENT_NODE,e.NodeType.DOCUMENT_FRAGMENT_NODE].includes(a)&&qc(i,n)}}function Jc(t){if(0===t.length)return"";var n=t[0];return n.nodeType!==e.NodeType.ELEMENT_NODE?"":n.tagName.toLowerCase()}var Gc,Yc,Xc,Qc={};function Zc(){if(Yc)return Gc;Yc=1;var e=It().f;return Gc=function(t,n,r){r in t||e(t,r,{configurable:!0,get:function(){return n[r]},set:function(e){n[r]=e}})}}!function(){if(Xc)return Qc;Xc=1;var e=L(),t=b(),n=Se(),r=hr(),o=Ea(),i=$t(),a=ai(),s=An().f,u=Pe(),l=Os(),c=Oi(),f=fc(),d=du(),h=Zc(),p=un(),g=R(),v=yt(),m=an().enforce,y=Xs(),w=wt(),x=hu(),E=pu(),S=w("match"),O=t.RegExp,C=O.prototype,k=t.SyntaxError,T=n(C.exec),N=n("".charAt),M=n("".replace),P=n("".indexOf),D=n("".slice),A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,j=/a/g,I=/a/g,$=new O(j)!==j,F=d.MISSED_STICKY,_=d.UNSUPPORTED_Y,B=e&&(!$||F||x||E||g(function(){return I[S]=!1,O(j)!==j||O(I)===I||"/a/i"!==String(O(j,"i"))}));if(r("RegExp",B)){for(var W=function(e,t){var n,r,s,d,h,p,g=u(C,this),y=l(e),b=void 0===t,w=[],S=e;if(!g&&y&&b&&e.constructor===W)return e;if((y||u(C,e))&&(e=e.source,b&&(t=f(S))),e=void 0===e?"":c(e),t=void 0===t?"":c(t),S=e,x&&"dotAll"in j&&(r=!!t&&P(t,"s")>-1)&&(t=M(t,/s/g,"")),n=t,F&&"sticky"in j&&(s=!!t&&P(t,"y")>-1)&&_&&(t=M(t,/y/g,"")),E&&(d=function(e){for(var t,n=e.length,r=0,o="",i=[],s=a(null),u=!1,l=!1,c=0,f="";r<=n;r++){if("\\"===(t=N(e,r)))t+=N(e,++r);else if("]"===t)u=!1;else if(!u)switch(!0){case"["===t:u=!0;break;case"("===t:if(o+=t,"?:"===D(e,r+1,r+3))continue;T(A,D(e,r+1))&&(r+=2,l=!0),c++;continue;case">"===t&&l:if(""===f||v(s,f))throw new k("Invalid capture group name");s[f]=!0,i[i.length]=[f,c],l=!1,f="";continue}l?f+=t:o+=t}return[o,i]}(e),e=d[0],w=d[1]),h=o(O(e,t),g?this:C,W),(r||s||w.length)&&(p=m(h),r&&(p.dotAll=!0,p.raw=W(function(e){for(var t,n=e.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(t=N(e,r))?i||"."!==t?("["===t?i=!0:"]"===t&&(i=!1),o+=t):o+="[\\s\\S]":o+=t+N(e,++r);return o}(e),n)),s&&(p.sticky=!0),w.length&&(p.groups=w)),e!==S)try{i(h,"source",""===S?"(?:)":S)}catch(e){}return h},H=s(O),U=0;H.length>U;)h(W,O,H[U++]);C.constructor=W,W.prototype=C,p(t,"RegExp",W,{constructor:!0})}y("RegExp")}();var ef=new RegExp(String.fromCharCode(160),"g");function tf(e){return e.replace(ef," ")}var nf=["span","b","strong","i","em","s","strike","u","font","sub","sup"],rf=["a","img","video","iframe"],of=[];var af=[];var sf={};function uf(e,n){var r=e.length;if(r){var o=e[r-1];if(t.Text.isText(o)){var i=Object.keys(o);if(1===i.length&&"text"===i[0])return o.text+=n,!0}}return!1}function lf(e,t,n){return{type:"paragraph",children:t.length?t:[{text:o(e).text().replace(/\s+/gm," ")}]}}function cf(e,n){var r=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach(function(e){if(Ic(e)){if("BR"===e.nodeName)return void(uf(n,"\n")||n.push({text:"\n"}));var r=df(o(e),t);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}else if(Fc(e)){var i=e.textContent||"";if(""===i.trim()&&i.indexOf("\n")>=0)return;i&&(i=tf(i),uf(n,i)||n.push({text:i}))}}),n)}(e,n),i=function(e){for(var t in sf)if(e[0].matches(t))return sf[t];return lf}(e),a=i(e[0],r,n);return Array.isArray(a)||(a=[a]),a.forEach(function(o){t.Editor.isVoid(n,o)||(0===r.length&&(o.children=[{text:e.text().replace(/\s+/gm," ")}]),af.forEach(function(t){o=t(e[0],o,n)}))}),a}function ff(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,"\n"));var n=e[0].textContent||"";n=function(e){return e.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}(n);var r={text:n=tf(n)};return af.forEach(function(n){r=n(e[0],r,t)}),r}function df(e,t){of.forEach(function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=o(r(e[0])))});var n=Jc(e);if("span"===n){if(e.attr("data-w-e-type"))return cf(e,t);if(rf.find(function(t){return e.find(t).length>0}))return cf(e,t);if(e[0].childNodes.length>1){var r=e[0].childNodes,i=function(e,t){var n={text:""};return af.forEach(function(r){n=r(e[0],n,t)}),n}(o(e[0]),t);return Array.from(r).flatMap(function(e){var n=function(e,t,n){var r=e[0];if(Ic(r)){var o=df(e,n);return delete t.text,Array.isArray(o)?o.map(function(e){return co(co({},t),e)}):[co(co({},t),o)]}if(jc(r))return null;var i=Fc(r)?{text:r.textContent||""}:ff(e,n);return[co(co({},t),i)]}(o(e),i,t);return n||[]})}return ff(e,t)}if("code"===n)return"pre"===Jc(e.parent())?cf(e,t):ff(e,t);if(nf.includes(n)){if(e[0].childNodes.length>0&&e[0].childNodes[0].nodeType!==Node.TEXT_NODE){r=e[0].childNodes;return co(co({},df(o(r[0]),t)),ff(e,t))}return ff(e,t)}return cf(e,t)}function hf(e,t,n){var r=o(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(mo,function(){r.removeAttr(t)}),!1)}function pf(e,t){void 0===t&&(t="");var n=[];""===t&&(t="<p><br></p>"),0!==t.indexOf("<")&&(t=t.split(/\n/).map(function(e){return"<p>".concat(e,"</p>")}).join(""));var r=o("<div>".concat(t,"</div>"));return Array.from(r.children()).forEach(function(t){var r=df(o(t),e);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}),n}function gf(e,t){return"w-e-element-".concat(e,"-").concat(t)}var vf=[];var mf={};function yf(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function bf(e,n){var r=e.type,o=void 0===r?"":r,i=e.children,a=void 0===i?[]:i,s=t.Editor.isVoid(n,e),u="";s||(u=a.map(function(e){return $f(e,n)}).join(""));var l=function(e){return mf[e]||yf}(o),c=l(e,u,n),f="";if(f="string"==typeof c?c:c.html||"",s||vf.forEach(function(t){return f=t(e,f)}),"string"==typeof c)return f;var d=c.prefix,h=void 0===d?"":d,p=c.suffix,g=void 0===p?"":p;return h&&(f=h+f),g&&(f+=g),f}var wf,xf,Ef,Sf={};function Of(){if(xf)return wf;xf=1;var e=yt();return wf=function(t){return void 0!==t&&(e(t,"value")||e(t,"writable"))}}!function(){if(Ef)return Sf;Ef=1;var e=pr(),t=P(),n=Le(),r=jt(),o=Of(),i=Ct(),a=li();e({target:"Reflect",stat:!0},{get:function e(s,u){var l,c,f=arguments.length<3?s:arguments[2];return r(s)===f?s[u]:(l=i.f(s,u))?o(l)?l.value:void 0===l.get?void 0:t(l.get,f):n(c=a(s))?e(c,u,f):void 0}})}();var Cf,kf={};!function(){if(Cf)return kf;Cf=1;var e,t=pr(),n=Xr(),r=Ct().f,o=Rn(),i=Oi(),a=Cs(),s=Te(),u=ks(),l=ht(),c=n("".slice),f=Math.min,d=u("endsWith");t({target:"String",proto:!0,forced:!!(l||d||(e=r(String.prototype,"endsWith"),!e||e.writable))&&!d},{endsWith:function(e){var t=i(s(this));a(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,u=void 0===n?r:f(o(n),r),l=i(e);return c(t,u-l.length,u)===l}})}();var Tf=0,Nf=function(){this.id="".concat(Tf++)},Rf="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Lf="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Mf="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Pf="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Df="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Af="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),jf=!Df&&!Pf&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,If={getWindow:function(e){var t=Ya.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var n=Ga.get(t);return n||(n=new Nf,Ga.set(t,n)),n},setNewKey:function(e){var t=new Nf;Ga.set(e,t)},findPath:function(e,n){for(var r=[],o=n;;){var i=Va.get(o);if(null==i){if(t.Editor.isEditor(o))return r;break}var a=Ua.get(o);if(null==a)break;r.unshift(a),o=i}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(n)))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=If.toDOMNode(e,e),n=t.getRootNode();return(Tc(n)||Nc(n))&&null!=Reflect.get(n,"getSelection")?n:t.ownerDocument},getParentNode:function(e,t){return Va.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=If.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,n){var r=[If.findPath(e,n)[0]];return t.Node.get(e,r)},toDOMNode:function(e,n){var r;if(t.Editor.isEditor(n))r=za.get(e);else{var o=If.findKey(e,n);r=qa.get(o)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(n)));return r},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=If.toDOMNode(e,e);try{r=Ic(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(e,n){var r=n.anchor,o=n.focus,i=t.Range.isBackward(n),a=If.toDOMPoint(e,r),s=t.Range.isCollapsed(n)?a:If.toDOMPoint(e,o),u=If.getWindow(e).document.createRange(),l=ho(i?s:a,2),c=l[0],f=l[1],d=ho(i?a:s,2),h=d[0],p=d[1],g=!!(Ic(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(Ic(h)?h:h.parentElement).getAttribute("data-slate-zero-width");return u.setStart(c,g?1:f),u.setEnd(h,v?1:p),u},toDOMPoint:function(e,n){var r,o,i,a=ho(t.Editor.node(e,n.path),1)[0],s=If.toDOMNode(e,a);t.Editor.void(e,{at:n})&&(n={path:n.path,offset:0});var u=Array.from(s.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),l=0;try{for(var c=fo(u),f=c.next();!f.done;f=c.next()){var d=f.value,h=d.childNodes[0];if(null!=h&&null!=h.textContent){var p=h.textContent.length,g=d.getAttribute("data-slate-length"),v=l+(null==g?p:parseInt(g,10));if(n.offset<=v){i=[h,Math.min(p,Math.max(0,n.offset-l))];break}l=v}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(n)));return i},toSlateNode:function(e,t){var n=Ic(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Ka.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(e,n){"nativeEvent"in n&&(n=n.nativeEvent);var r=n.clientX,o=n.clientY,i=n.target;if(null==r||null==o)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));var a,s=If.toSlateNode(e,n.target),u=If.findPath(e,s);if(t.Editor.isVoid(e,s)){var l=i.getBoundingClientRect(),c=e.isInline(s)?r-l.left<l.left+l.width-r:o-l.top<l.top+l.height-o,f=t.Editor.point(e,u,{edge:c?"start":"end"}),d=c?t.Editor.before(e,f):t.Editor.after(e,f);if(d)return t.Editor.range(e,d)}var h=this.getWindow(e).document;if(h.caretRangeFromPoint)a=h.caretRangeFromPoint(r,o);else{var p=h.caretPositionFromPoint(r,o);p&&((a=h.createRange()).setStart(p.offsetNode,p.offset),a.setEnd(p.offsetNode,p.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return If.toSlateRange(e,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,n,r){var o,i,a,s,u,l=r.exactMatch,c=r.suppressThrow;if(($c(n)?n.anchorNode:n.startContainer)&&($c(n)?(o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,s=n.focusOffset,u=Af&&Wc()?n.anchorNode===n.focusNode&&n.anchorOffset===n.focusOffset:n.isCollapsed):(o=n.startContainer,i=n.startOffset,a=n.endContainer,s=n.endOffset,u=n.collapsed)),null==o||null==a||null==i||null==s)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(n));var f=If.toSlatePoint(e,[o,i],{exactMatch:l,suppressThrow:c});if(!f)return null;var d=u?f:If.toSlatePoint(e,[a,s],{exactMatch:l,suppressThrow:c});if(!d)return null;var h={anchor:f,focus:d};return t.Range.isExpanded(h)&&t.Range.isForward(h)&&Ic(a)&&t.Editor.void(e,{at:h.focus,mode:"highest"})&&(h=t.Editor.unhangRange(e,h,{voids:!0})),h},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,s=ho(o?t:Bc(t),2),u=s[0],l=s[1],c=u.parentNode,f=null,d=0;if(c){var h=c.closest('[data-slate-void="true"]'),p=c.closest("[data-slate-leaf]"),g=null,v=If.getWindow(e);if(p&&v.document.createRange){f=p.closest('[data-slate-node="text"]');var m=v.document.createRange();m.setStart(f,0),m.setEnd(u,l);var y=m.cloneContents();po(po([],ho(a(y.querySelectorAll("[data-slate-zero-width]"))),!1),ho(a(y.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(e){e.parentNode.removeChild(e)}),d=y.textContent.length,g=f}else h&&((p=h.querySelector("[data-slate-leaf]"))?(f=p.closest('[data-slate-node="text"]'),d=(g=p).textContent.length,g.querySelectorAll("[data-slate-zero-width]").forEach(function(e){d-=e.textContent.length})):d=1);g&&d===g.textContent.length&&(c.hasAttribute("data-slate-zero-width")||Lf&&(null===(r=g.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(d-=1)}if(!f){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var b=If.toSlateNode(e,f);return{path:If.findPath(e,b),offset:d}},hasRange:function(e,n){var r=n.anchor,o=n.focus;return t.Editor.hasPath(e,r.path)&&t.Editor.hasPath(e,o.path)},getNodeType:function(e){return t.Element.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(e){return t.Node.string(e)}).join("")},getSelectedElems:function(e){var n,r,o=[],i=t.Editor.nodes(e,{universal:!0});try{for(var a=fo(i),s=a.next();!s.done;s=a.next()){var u=ho(s.value,1)[0];t.Element.isElement(u)&&o.push(u)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(e,n){var r=this,o=ho(t.Editor.nodes(e,{match:function(e){return r.checkNodeType(e,n)},universal:!0}),1),i=o[0];return null==i?null:i[0]},getSelectedTextNode:function(e){var n=ho(t.Editor.nodes(e,{match:function(e){return t.Text.isText(e)},universal:!0}),1),r=n[0];return null==r?null:r[0]},isNodeSelected:function(e,n){var r=ho(t.Editor.nodes(e,{match:function(e){return e===n},universal:!0}),1),o=r[0];return null!=o&&ho(o,1)[0]===n},isSelectionAtLineEnd:function(e,n){var r=e.selection;return!!r&&(t.Editor.isEnd(e,r.anchor,n)||t.Editor.isEnd(e,r.focus,n))},getTextarea:function(e){var t=Na.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return Ma.get(e)||null},getHoverbar:function(e){return Da.get(e)||null},normalizeContent:function(e){e.children.forEach(function(t,n){e.normalizeNode([t,[n]])})},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-e.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var n,r,i,a,s=If.getTextarea(e).$textArea,u=null==s?void 0:s[0].childNodes;if(u)try{for(var l=fo(Array.from(u)),c=l.next();!c.done;c=l.next()){var f=c.value;if(!Fc(f))break;f.remove()}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}var d=t.Editor.nodes(e,{match:function(n){return!(!t.Element.isElement(n)||e.isInline(n))},universal:!0});try{for(var h=fo(d),p=h.next();!p.done;p=h.next()){var g=p.value;if(null!=g){var v=g[0];qc(If.toDOMNode(e,v),function(e,t){var n=o(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)})}}}catch(e){i={error:e}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var n,r,o=t.Editor.nodes(e,{match:function(t){return e.isVoid(t)}}),i=0;try{for(var a=fo(o),s=a.next();!s.done;s=a.next()){s.value&&(i+=1)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i>0},isSelectedEmptyParagraph:function(e){var n=e.selection;if(null==n)return!1;if(t.Range.isExpanded(n))return!1;var r=If.getSelectedNodeByType(e,"paragraph");if(null===r)return!1;var o=r.children;return 1===o.length&&(""===o[0].text||void 0)},isEmptyPath:function(e,n){var r=t.Editor.node(e,n);if(null==r)return!1;var o=ho(r,1)[0].children;if(1===o.length&&""===o[0].text)return!0;return!1}};function $f(e,n){return t.Element.isElement(e)?bf(e,n):function(e,t){var n=e.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=n;r=function(e){return e.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=If.getParentsNodes(t,e).some(function(e){return"pre"===If.getNodeType(e)});if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=If.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return vf.forEach(function(t){return r=t(e,r)}),r}(e,n)}var Ff=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},_f=function(e,t,n){var r=If.toDOMRange(e,t).getBoundingClientRect(),o=If.toDOMRange(e,n).getBoundingClientRect();return Ff(r,o)&&Ff(o,r)},Bf=function(e,n){var r,o,i=[];try{for(var a=fo(t.Editor.levels(e,{at:n})),s=a.next();!s.done;s=a.next()){var u=ho(s.value,2),l=u[0],c=u[1],f=If.findKey(e,l);i.push([c,f])}}catch(e){r={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i};function Wf(e,n){e.isInline(n)?(e.insertNode(n),"link"===n.type&&e.insertFragment([{text:""}])):t.Transforms.insertNodes(e,n,{mode:"highest"})}var Hf,Uf,Vf,zf,Kf,qf,Jf,Gf,Yf,Xf,Qf,Zf,ed,td,nd,rd,od,id,ad,sd,ud,ld,cd,fd,dd,hd,pd,gd,vd,md,yd,bd,wd,xd,Ed,Sd,Od,Cd,kd,Td,Nd=function(e){var n=e,r=n.onChange,i=n.insertText,a=n.apply,s=n.deleteBackward;return n.insertText=function(e){n.getConfig().readOnly||i(e)},n.apply=function(e){var r,o,i,s,u,l,c,f,d=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":case"split_node":d.push.apply(d,po([],ho(Bf(n,e.path)),!1));break;case"insert_node":case"remove_node":d.push.apply(d,po([],ho(Bf(n,t.Path.parent(e.path))),!1));break;case"merge_node":var h=t.Path.previous(e.path);d.push.apply(d,po([],ho(Bf(n,h)),!1));break;case"move_node":var p=t.Path.common(t.Path.parent(e.path),t.Path.parent(e.newPath));d.push.apply(d,po([],ho(Bf(n,p)),!1));break;case"set_selection":(null===(s=null===(i=e.newProperties)||void 0===i?void 0:i.focus)||void 0===s?void 0:s.path)&&(d.push.apply(d,po([],ho(Bf(n,null===(l=null===(u=e.newProperties)||void 0===u?void 0:u.focus)||void 0===l?void 0:l.path)),!1)),d.push.apply(d,po([],ho(Bf(n,null===(f=null===(c=e.properties)||void 0===c?void 0:c.focus)||void 0===f?void 0:f.path)),!1)))}a(e);try{for(var g=fo(d),v=g.next();!v.done;v=g.next()){var m=ho(v.value,2),y=m[0],b=m[1],w=ho(t.Editor.node(n,y),1)[0];Ga.set(w,b),"type"in w&&(Wa.has(w)&&Wa.delete(w),Ha.has(w)&&Ha.delete(w))}}catch(e){r={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}},n.deleteBackward=function(r){if("line"!==r)return s(r);if(e.selection&&t.Range.isCollapsed(e.selection)){var o=t.Editor.above(e,{match:function(n){return t.Editor.isBlock(e,n)},at:e.selection});if(o){var i=ho(o,2)[1],a=t.Editor.range(e,i,e.selection.anchor),u=function(e,n){var r=t.Editor.range(e,t.Range.end(n)),o=Array.from(t.Editor.positions(e,{at:n})),i=0,a=o.length,s=Math.floor(a/2);if(_f(e,t.Editor.range(e,o[i]),r))return t.Editor.range(e,o[i],r);if(o.length<2)return t.Editor.range(e,o[o.length-1],r);for(;s!==o.length&&s!==i;)_f(e,t.Editor.range(e,o[s]),r)?a=s:i=s,s=Math.floor((i+a)/2);return t.Editor.range(e,o[a],r)}(n,a);t.Range.isCollapsed(u)||t.Transforms.delete(e,{at:u})}}},n.onChange=function(){var e=n.selection;null!=e&&Qa.set(n,e),n.emit(yo),r()},n.handleTab=function(){n.insertText(" ")},n.getHtml=function(){var e=n.children,t=void 0===e?[]:e,r=n.getConfig().skipCacheTypes,o=void 0===r?["list-item"]:r;return t.map(function(e){var t=If.getNodeType(e);if(o.includes(t))return $f(e,n);var r=Ha.get(e);if(r)return r;var i=$f(e,n);return Ha.set(e,i),i}).join("")},n.getText=function(){var e=n.children;return(void 0===e?[]:e).map(function(e){return t.Node.string(e)}).join("\n")},n.getSelectionText=function(){var r=n.selection;return null==r?"":t.Editor.string(e,r)},n.getElemsByType=function(e,r){var o,i;void 0===r&&(r=!1);var a=[],s=t.Editor.nodes(n,{at:[],universal:!0});try{for(var u=fo(s),l=u.next();!l.done;l=u.next()){var c=ho(l.value,1)[0];if(t.Element.isElement(c))if(r?c.type.indexOf(e)>=0:c.type===e){var f=If.findKey(n,c),d=gf(c.type,f.id);a.push(co(co({},c),{id:d}))}}}catch(e){o={error:e}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a},n.getElemsByTypePrefix=function(e){return n.getElemsByType(e,!0)},n.isEmpty=function(){var e=n.children,r=void 0===e?[]:e;if(r.length>1)return!1;var o=r[0];if(null==o)return!0;if(!t.Element.isElement(o)||"paragraph"!==o.type)return!1;var i=o.children,a=void 0===i?[]:i;if(a.length>1)return!1;var s=a[0];return null==s||t.Text.isText(s)&&""===s.text},n.clear=function(){t.Transforms.delete(n,{at:{anchor:t.Editor.start(n,[]),focus:t.Editor.end(n,[])}}),0===n.children.length&&t.Transforms.insertNodes(n,[{type:"paragraph",children:[{text:""}]}])},n.getParentNode=function(e){return If.getParentNode(n,e)},n.dangerouslyInsertHtml=function(e,r){if(void 0===e&&(e=""),void 0===r&&(r=!1),e){var i=document.createElement("div");i.innerHTML=e;var a=Array.from(i.childNodes);if(a=a.filter(function(e){var t=e.nodeName;return!!Fc(e)||!!Ic(e)&&!lu.has(t.toLowerCase())}),0!==a.length){var s=n.selection;if(null!=s){var u=null;if(If.isSelectedEmptyParagraph(n)&&!r)u=[s.focus.path[0]];i.setAttribute("hidden","true"),document.body.appendChild(i);var l=0;a.forEach(function(e,t){var r=e.nodeName,i=e.textContent,s=void 0===i?"":i;if(Fc(e)){if(!s||!s.trim())return;n.insertNode({text:s})}else if("BR"!==r){var u=e,c=!1;if(nf.includes(r.toLowerCase()))c=!0;else for(var f in sf)if(u.matches(f)){c=!0;break}if(c){var d=df(o(u),n);return Array.isArray(d)?(d.forEach(function(e){return Wf(n,e)}),l+=1):(Wf(n,d),l+=1),void(If.isSelectedVoidNode(n)&&n.move(1))}var h=window.getComputedStyle(u).display;if(!If.isSelectedEmptyParagraph(n)&&h.indexOf("inline")<0){if(t>=1){var p=a[t-1];Mc(p)&&n.insertBreak()}n.insertBreak()}n.dangerouslyInsertHtml(u.innerHTML,!0)}else n.insertText("\n")}),l&&u&&If.isEmptyPath(n,u)&&t.Transforms.removeNodes(n,{at:u}),i.remove()}}}},n.setHtml=function(e){void 0===e&&(e="");var r=n.isDisabled(),o=n.isFocused(),i=JSON.stringify(n.selection);n.enable(),n.focus(),n.clear();var a=pf(n,null==e?"":e);if(t.Transforms.insertFragment(n,a),o||(n.deselect(),n.blur()),r&&(n.deselect(),n.disable()),n.isFocused())try{n.select(JSON.parse(i))}catch(e){n.select(t.Editor.start(n,[]))}},n},Rd=1,Ld=function(e){var n=e;return n.id="wangEditor-".concat(Rd),Rd+=1,n.isDestroyed=!1,n.isFullScreen=!1,n.focus=function(e){if(If.toDOMNode(n,n).focus({preventScroll:!0}),Xa.set(n,!0),e){var r=t.Editor.end(n,[]);t.Transforms.select(n,r)}else{var o=Qa.get(n);o?t.Transforms.select(n,o):t.Transforms.select(n,t.Editor.start(n,[]))}},n.isFocused=function(){return!!Xa.get(n)},n.blur=function(){If.toDOMNode(n,n).blur(),t.Transforms.deselect(n),Xa.set(n,!1)},n.updateView=function(){If.getTextarea(n).changeViewState();var e=If.getToolbar(n);e&&e.changeToolbarState();var t=If.getHoverbar(n);t&&t.changeHoverbarState()},n.destroy=function(){if(!n.isDestroyed){var e=If.getTextarea(n);e.destroy(),Na.delete(n),Ra.delete(e);var t=If.getToolbar(n);t&&(t.destroy(),Ma.delete(n),La.delete(t));var r=If.getHoverbar(n);r&&(r.destroy(),Da.delete(n),Pa.delete(r)),n.isDestroyed=!0,n.emit(mo)}},n.scrollToElem=function(e){if(!n.getConfig().scroll){var t="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return t+="\nYou has disabled editor scroll, please do this yourself",void console.warn(t)}var r=o("#".concat(e));if(0!==r.length){var i=r[0];if(!If.hasDOMNode(n,i)){t="Element (found by id is '".concat(e,"') is not in editor DOM");return t+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(t,i)}var a=If.getTextarea(n),s=a.$textAreaContainer,u=a.$scroll,l=r.offset().top,c=s.offset().top;u[0].scrollBy({top:l-c,behavior:"smooth"})}},n.showProgressBar=function(e){e<1||If.getTextarea(n).changeProgress(e)},n.hidePanelOrModal=function(){var e=ja.get(n);null!=e&&e.forEach(function(e){return e.hide()})},n.enable=function(){n.getConfig().readOnly=!1,n.updateView()},n.disable=function(){n.getConfig().readOnly=!0,n.updateView()},n.isDisabled=function(){return n.getConfig().readOnly},n.toDOMNode=function(e){return If.toDOMNode(n,e)},n.fullScreen=function(){if(!n.isFullScreen){var e=null,t=If.getToolbar(n);t&&(e=t.$box);var r=If.getTextarea(n).$box.parent();if(e&&e.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),n.isFullScreen=!0,n.emit(wo)}},n.unFullScreen=function(){if(n.isFullScreen){var e=If.getTextarea(n).$box.parent();setTimeout(function(){e.removeClass("w-e-full-screen-container"),n.isFullScreen=!1,n.emit(xo)},200)}},n.getEditableContainer=function(){return If.getTextarea(n).$textAreaContainer[0]},n},Md={exports:{}},Pd={exports:{}};function Dd(){if(Uf)return Hf;Uf=1;return Hf=function(e){return null!=e}}function Ad(){if(qf)return Kf;qf=1;var e=function(){if(zf)return Vf;zf=1;var e=Dd(),t={object:!0,function:!0,undefined:!0};return Vf=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return Kf=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function jd(){if(Xf)return Yf;Xf=1;var e=function(){if(Gf)return Jf;Gf=1;var e=Ad();return Jf=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(e){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,n=Function.prototype.toString;return Yf=function(r){return!!e(r)&&!t.test(n.call(r))}}function Id(){if(id)return od;id=1;var e=(rd?nd:(rd=1,nd=function(){}))();return od=function(t){return t!==e&&null!==t}}function $d(){return ld||(ld=1,ud=(td?ed:(td=1,ed=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(sd)return ad;sd=1;var e=Id(),t=Object.keys;return ad=function(n){return t(e(n)?Object(n):n)}}()),ud}function Fd(){if(hd)return dd;hd=1;var e=$d(),t=function(){if(fd)return cd;fd=1;var e=Id();return cd=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return dd=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(t(r)),s=function(e){try{r[e]=o[e]}catch(e){i||(i=e)}},a=1;a<u;++a)e(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},dd}function _d(){return gd?pd:(gd=1,pd=(Zf||(Zf=1,Qf=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")}),Qf)()?Object.assign:Fd())}function Bd(){return Sd||(Sd=1,Ed=function(){if(bd)return yd;bd=1;var e="razdwatrzy";return yd=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(xd)return wd;xd=1;var e=String.prototype.indexOf;return wd=function(t){return e.call(this,t,arguments[1])>-1},wd}()),Ed}function Wd(){if(Od)return Pd.exports;Od=1;var e=Dd(),t=jd(),n=_d(),r=function(){if(md)return vd;md=1;var e=Id(),t=Array.prototype.forEach,n=Object.create;return vd=function(r){var o=n(null);return t.call(arguments,function(t){e(t)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(t),o)}),o},vd}(),o=Bd(),i=Pd.exports=function(t,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof t?(l=i,i=t,t=null):l=arguments[2],e(t)?(a=o.call(t,"c"),s=o.call(t,"e"),u=o.call(t,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,f;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),f={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),f):f},Pd.exports}var Hd=(Td||(Td=1,function(e,t){var n,r,o,i,a,s,u,l=Wd(),c=kd?Cd:(kd=1,Cd=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),f=Function.prototype.apply,d=Function.prototype.call,h=Object.create,p=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),f.call(t,this,arguments)}),r.__eeOnceListener__=t,this},i=function(e){var t,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)f.call(r,this,i)}else switch(arguments.length){case 1:d.call(o,this);break;case 2:d.call(o,this,arguments[1]);break;case 3:d.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];f.call(o,this,i)}},a={on:n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=h(null),p(this,"__ee__",m),m.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o=function(e,t){var n,r,o,i;if(c(t),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?h(u):g(Object(e),s)},t.methods=a}(Md,Md.exports)),Md.exports),Ud=g(Hd);function Vd(e){var t=Za.get(e);return null==t&&(t=Ud(),Za.set(e,t)),t}var zd=new WeakMap;function Kd(e,t){var n=zd.get(e);null==n&&(n=new Set,zd.set(e,n)),n.add(t)}var qd,Jd=function(e){var t=e;return t.on=function(e,n){var r=Vd(t);if(r.on(e,n),"destroyed"===e&&Kd(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),Kd(t,o)}},t.once=function(e,n){Vd(t).once(e,n)},t.off=function(e,n){Vd(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Vd(t);if(o.emit.apply(o,po([e],ho(n),!1)),"destroyed"===e){var i=function(e){return zd.get(e)||new Set}(t);i.forEach(function(e){return o.off("destroyed",e)}),function(e){zd.set(e,new Set)}(t)}},t},Gd=function(e){var n=e;return n.setFragmentData=function(e){var r=n.selection;if(r){var o=ho(t.Range.edges(r),2),i=o[0],a=o[1],s=t.Editor.void(n,{at:i.path}),u=t.Editor.void(n,{at:a.path});if(!t.Range.isCollapsed(r)||s){var l=If.toDOMRange(n,r),c=l.cloneContents(),f=c.childNodes[0];if(c.childNodes.forEach(function(e){e.textContent&&""!==e.textContent.trim()&&(f=e)}),u){var d=ho(u,1)[0],h=l.cloneRange(),p=If.toDOMNode(n,d);h.setEndAfter(p),c=h.cloneContents()}if(s&&(f=c.querySelector("[data-slate-spacer]")),Array.from(c.querySelectorAll("[data-slate-zero-width]")).forEach(function(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""}),Fc(f)){var g=f.ownerDocument.createElement("span");g.style.whiteSpace="pre",g.appendChild(f),c.appendChild(g),f=g}var v=n.getFragment(),m=JSON.stringify(v),y=window.btoa(encodeURIComponent(m));f.setAttribute("data-slate-fragment",y),e.setData("application/x-slate-fragment",y);var b=c.ownerDocument.createElement("div");return b.appendChild(c),b.setAttribute("hidden","true"),c.ownerDocument.body.appendChild(b),e.setData("text/html",b.innerHTML),e.setData("text/plain",zc(b)),c.ownerDocument.body.removeChild(b),e}}},n.insertData=function(e){var r,o,i=e.getData("application/x-slate-fragment");if(i){var a=decodeURIComponent(window.atob(i)),s=JSON.parse(a);n.insertFragment(s)}else{var u=e.getData("text/plain"),l=e.getData("text/html");if(l)n.dangerouslyInsertHtml(l);else if(u){var c=u.split(/\n\r|\r\n|\r|\n/),f=!1;try{for(var d=fo(c),h=d.next();!h.done;h=d.next()){var p=h.value,g=If.getLeftLengthOfMaxLength(n);f&&g>0&&t.Transforms.splitNodes(n,{always:!0}),n.insertText(p),f=!0}}catch(e){r={error:e}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}}}},n},Yd={};!function(){if(qd)return Yd;qd=1;var e=pr(),t=gr(),n=wr(),r=Le(),o=Nn(),i=Ln(),a=Ne(),s=mr(),u=wt(),l=Sr(),c=fa(),f=l("slice"),d=u("species"),h=Array,p=Math.max;e({target:"Array",proto:!0,forced:!f},{slice:function(e,u){var l,f,g,v=a(this),m=i(v),y=o(e,m),b=o(void 0===u?m:u,m);if(t(v)&&(l=v.constructor,(n(l)&&(l===h||t(l.prototype))||r(l)&&null===(l=l[d]))&&(l=void 0),l===h||void 0===l))return c(v,y,b);for(f=new(void 0===l?h:l)(p(b-y,0)),g=0;y<b;y++,g++)y in v&&s(f,g,v[y]);return f.length=g,f}})}();var Xd=function(e){var n=e,r=n.insertText,o=n.insertNode,i=n.insertFragment,a=n.dangerouslyInsertHtml;return n.insertText=function(e){if(n.getConfig().maxLength){var t=If.getLeftLengthOfMaxLength(n);t<=0||(t<e.length?r(e.slice(0,t)):r(e))}else r(e)},n.insertNode=function(e){if(n.getConfig().maxLength){var r=If.getLeftLengthOfMaxLength(n);if(!(r<=0))r<t.Node.string(e).length||o(e)}else o(e)},n.insertFragment=function(e){if(n.getConfig().maxLength){if(e.length>0){var r=e[0];if(If.getLeftLengthOfMaxLength(n)<t.Node.string(r).length)return;i([r]);for(var o=1;o<e.length;o+=1)n.insertNode(e[o])}}else i(e)},n.dangerouslyInsertHtml=function(e,t){if(void 0===e&&(e=""),void 0===t&&(t=!1),e)if(n.getConfig().maxLength){var r=If.getLeftLengthOfMaxLength(n);if(!(r<=0)){var o=document.createElement("div");o.innerHTML=e,r<Array.from(o.childNodes).reduce(function(e,t){var n=t.nodeName;return t?Fc(t)?e+(t.textContent||""):Ic(t)?lu.has(n.toLowerCase())?e:e+(t.textContent||""):e:e},"").length||a(e,t)}}else a(e,t)},n};function Qd(e){var t=If.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function Zd(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=Qd(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,u=If.toDOMRange(e,n).getClientRects(),l=u?u[0]:null;if(null==l)return t;var c={},f=l.top-o,d=l.left-i;if(d>a/2){var h=a-d;c.right="".concat(h+5,"px")}else c.left="".concat(d+5,"px");if(f>s/2){var p=s-f;c.bottom="".concat(p+5,"px")}else{var g=u[u.length-1],v=g.top-o+g.height;v<0&&(v=0),c.top="".concat(v+5,"px")}return c}function eh(e,n,r){void 0===r&&(r="modal");var o={top:"0",left:"0"};if(null==e.selection)return o;var i=t.Element.isElement(n)&&e.isVoid(n),a=t.Element.isElement(n)&&e.isInline(n),s=Ja.get(n);if(null==s)return o;var u=s.getBoundingClientRect(),l=u.top,c=u.left,f=u.height,d=u.width;if(i){var h=Kc(s);if(null!=h){var p=h.getBoundingClientRect();l=p.top,f=p.height}}var g=Qd(e);if(null==g)return o;var v=g.top,m=g.left,y=g.width,b=g.height,w={},x=l-v,E=c-m;if("bar"===r)return w.left="".concat(E,"px"),x>40?w.bottom="".concat(b-x+5,"px"):w.top="".concat(x+f+5,"px"),w;if("modal"===r){if(i?a?E>(y-d)/2?w.right="".concat(y-E+5,"px"):w.left="".concat(E+d+5,"px"):w.left="20px":w.left="".concat(E,"px"),i)(S=x)<0&&(S=0),w.top="".concat(S,"px");else if(x>(b-f)/2)w.bottom="".concat(b-x+5,"px");else{var S;(S=x+f)<0&&(S=0),w.top="".concat(S+5,"px")}return w}throw new Error("type '".concat(r,"' is invalid"))}function th(e,t){mc(function(){var n=Qd(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=t.offset(),l=u.top,c=u.left,f=t.width(),d=t.height(),h=l-o,p=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=h+d-s)>0){var v=t.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),t.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=t.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=p+f-a)>0){var w=t.css("left"),x=parseInt(w.toString(),10)-r;x<0&&(x=0),t.css("left","".concat(x,"px"))}if(g.indexOf("right")>=0&&c<0){var E=t.css("right"),S=parseInt(E.toString(),10)-Math.abs(c);t.css("right","".concat(S,"px"))}}})}var nh,rh=function(e){var n=e;return n.select=function(e){t.Transforms.select(n,e)},n.deselect=function(){var r=n.selection,o=If.findDocumentOrShadowRoot(n).getSelection();o&&o.rangeCount>0&&o.removeAllRanges(),r&&t.Transforms.deselect(e)},n.move=function(n,r){void 0===r&&(r=!1),n&&(n<0||t.Transforms.move(e,{distance:n,unit:"character",reverse:r}))},n.moveReverse=function(e){n.move(e,!0)},n.restoreSelection=function(){var e=Qa.get(n);null!=e&&(n.focus(),t.Transforms.select(n,e))},n.getSelectionPosition=function(){return Zd(n)},n.getNodePosition=function(e){return eh(n,e)},n.isSelectedAll=function(){var e=n.selection;if(null==e)return!1;var r=ho(t.Range.edges(e),2),o=r[0],i=r[1],a=ho(t.Editor.edges(n,[]),2),s=a[0],u=a[1];return!(!t.Point.equals(o,s)||!t.Point.equals(i,u))},n.selectAll=function(){var e=t.Editor.start(n,[]),r=t.Editor.end(n,[]);t.Transforms.select(n,{anchor:e,focus:r})},n},oh={};!function(){if(nh)return oh;nh=1;var e=P(),t=Se(),n=Ru(),r=jt(),o=Le(),i=Rn(),a=Oi(),s=Te(),u=Be(),l=Pu(),c=fc(),f=Du(),d=t("".indexOf);n("match",function(t,n,h){return[function(n){var r=s(this),i=o(n)?u(n,t):void 0;return i?e(i,n,r):new RegExp(n)[t](a(r))},function(e){var t=r(this),o=a(e),s=h(n,t,o);if(s.done)return s.value;var u=a(c(t));if(-1===d(u,"g"))return f(t,o);var p=-1!==d(u,"u");t.lastIndex=0;for(var g,v=[],m=0;null!==(g=f(t,o));){var y=a(g[0]);v[m]=y,""===y&&(t.lastIndex=l(o,i(t.lastIndex),p)),m++}return 0===m?null:v}]})}();const ih=e=>"string"==typeof e,ah=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},sh=e=>null==e?"":""+e,uh=/###/g,lh=e=>e&&e.indexOf("###")>-1?e.replace(uh,"."):e,ch=e=>!e||ih(e),fh=(e,t,n)=>{const r=ih(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(ch(e))return{};const t=lh(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return ch(e)?{}:{obj:e,k:lh(r[o])}},dh=(e,t,n)=>{const{obj:r,k:o}=fh(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=fh(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=fh(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},hh=(e,t)=>{const{obj:n,k:r}=fh(e,t);if(n)return n[r]},ph=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?ih(e[r])||e[r]instanceof String||ih(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):ph(e[r],t[r],n):e[r]=t[r]);return e},gh=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var vh={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const mh=e=>ih(e)?e.replace(/[&<>"'\/]/g,e=>vh[e]):e;const yh=[" ",",","?","!",";"],bh=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),wh=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},xh=e=>e&&e.replace("_","-"),Eh={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 Sh{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||Eh,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(ih(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Sh(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Sh(this.logger,e)}}var Oh=new Sh;class Ch{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(t=>{let[r,o]=t;for(let t=0;t<o;t++)r.apply(r,[e,...n])})}}}class kh extends Ch{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):ih(n)&&o?a.push(...n.split(o)):a.push(n)));const s=hh(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&ih(n)?wh(this.data&&this.data[e]&&this.data[e][t],n,o):s}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),dh(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)(ih(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=hh(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?ph(s,n,o):s={...s,...n},dh(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var Th={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))}),t}};const Nh={};class Rh extends Ch{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Oh.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=yh.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=bh.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:ih(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:ih(o)?[o]:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);let f=c&&c.res;const d=c&&c.usedKey||i,h=c&&c.exactUsedKey||i,p=Object.prototype.toString.apply(f),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,m=!ih(f)&&"boolean"!=typeof f&&"number"!=typeof f;if(!(v&&f&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0)||ih(g)&&Array.isArray(f))if(v&&ih(g)&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&!ih(t.count),d=Rh.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(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${h}`]||t[`defaultValue${p}`]||t.defaultValue;!this.isValidLookup(f)&&d&&(r=!0,f=v),this.isValidLookup(f)||(a=!0,f=i);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:f,y=d&&v!==f&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:f),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=d&&r!==f?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach(e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{r([e],i+n,t[`defaultValue${n}`]||v)})}):r(e,i,v))}f=this.extendTranslation(f,e,t,c,n),a&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?f:void 0):this.options.parseMissingKeyHandler(f))}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(d,f,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(f),n=e?[]:{},r=e?h:d;for(const e in f)if(Object.prototype.hasOwnProperty.call(f,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=f[e])}f=n}}return r?(c.res=f,c.usedParams=this.getUsedParamsDetails(t),c):f}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=ih(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&!ih(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):i.translate(...r,t)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s=ih(a)?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=Th.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ih(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&!ih(a.count),f=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&(ih(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,!Nh[`${h[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Nh[`${h[0]}-${e}`]=!0,this.logger.warn(`key "${n}" 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(n=>{if(this.isValidLookup(t))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(r)&&i.push(u+e.replace(r,this.options.pluralSeparator)),f&&i.push(u+t)),d){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),f&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))}))})}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!ih(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const Lh=e=>e.charAt(0).toUpperCase()+e.slice(1);class Mh{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Oh.create("languageUtils")}getScriptPartFromCode(e){if(!(e=xh(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=xh(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(ih(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Lh(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Lh(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Lh(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),ih(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return ih(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))):ih(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}let Ph=[{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}],Dh={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 Ah=["v1","v2","v3"],jh=["v4"],Ih={zero:0,one:1,two:2,few:3,many:4,other:5};class $h{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Oh.create("pluralResolver"),this.options.compatibilityJSON&&!jh.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 Ph.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:Dh[t.fc]}})}),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const n=xh("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!e.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>Ih[e]-Ih[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Ah.includes(this.options.compatibilityJSON)}}const Fh=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=hh(e,n);return void 0!==r?r:hh(t,n)})(e,t,n);return!i&&o&&ih(n)&&(i=wh(e,n,r),void 0===i&&(i=wh(t,n,r))),i},_h=e=>e.replace(/\$/g,"$$$$");class Bh{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Oh.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:f,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:mh,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?gh(o):i||"{{",this.suffix=a?gh(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?gh(f):d||gh("$t("),this.nestingSuffix=h?gh(h):p||gh(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const o=Fh(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(Fh(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>_h(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?_h(this.escape(e)):_h(e)}].forEach(t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const t=l(e,o,r);i=ih(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else ih(i)||this.useRawValueToEscape||(i=sh(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&!ih(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&!ih(r))return r;ih(r)||(r=sh(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=s.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const Wh=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(xh(r),o),t[a]=s),s(n)}};class Hh{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Oh.create("formatter"),this.options=e,this.formats={number:Wh((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:Wh((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:Wh((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:Wh((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:Wh((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Wh(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class Uh extends Ch{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Oh.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=fh(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();ih(e)&&(e=this.languageUtils.toResolveHierarchy(e)),ih(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(e,t,n,r,s):u(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const Vh=()=>({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]),ih(e[1])&&(t.defaultValue=e[1]),ih(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),zh=e=>(ih(e.ns)&&(e.ns=[e.ns]),ih(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),ih(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),Kh=()=>{};class qh extends Ch{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=zh(e),this.services={},this.logger=Oh,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(ih(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=Vh();this.options={...r,...this.options,...zh(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?Oh.init(o(this.modules.logger),this.options):Oh.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=Hh);const n=new Mh(this.options);this.store=new kh(this.options.resources,this.options);const i=this.services;i.logger=Oh,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new $h(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new Bh(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Uh(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)}),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Rh(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Kh),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=ah(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Kh;const n=ih(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>r(e))}this.options.preload&&this.options.preload.forEach(e=>r(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){const r=ah();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=Kh),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Th.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=ah();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=ih(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let c;return c=i.keyPrefix&&Array.isArray(e)?e.map(e=>`${i.keyPrefix}${l}${e}`):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(c,i)};return ih(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=ah();return this.options.ns?(ih(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ah();ih(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new Mh(Vh());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 qh(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]:Kh;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new qh(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new kh(this.store.data,r),o.services.resourceStore=o.store),o.translator=new Rh(o.services,r),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit(e,...n)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Jh=qh.createInstance();Jh.createInstance=qh.createInstance,Jh.createInstance,Jh.dir,Jh.init,Jh.loadResources,Jh.reloadResources,Jh.use,Jh.changeLanguage,Jh.getFixedT,Jh.t,Jh.exists,Jh.setDefaultNamespace,Jh.hasLoadedNamespace,Jh.loadNamespaces,Jh.loadLanguages;var Gh="translation";function Yh(e){return Jh.on("languageChanged",e),function(){return Jh.off("languageChanged",e)}}Jh.init({lng:"zh-CN",resources:{}});var Xh=Jh.t.bind(Jh);function Qh(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&&Qh(t)}}function Zh(){return o('<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 ep(){return o('<div class="w-e-bar-divider"></div>')}function tp(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=Rf?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(e.attr("data-tooltip",r),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var np=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button"></button>'),this.disabled=!1,this.menu=t;var i=t.tag,a=t.width;if("button"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'button'"));var s=t.title,u=t.hotkey,l=void 0===u?"":u,c=t.iconSvg,f=void 0===c?"":c,d=this.$button;if(f){var h=o(f);Qh(h),d.append(h)}else d.text(s);tp(d,f,s,l,n),n&&f&&d.append(o('<span class="title">'.concat(s,"</span>"))),a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",e),this.$elem.append(d),mc(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(t){t.preventDefault(),hp(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())})},e.prototype.exec=function(){var e=hp(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=hp(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=hp(this),t=this.$button,n=this.menu.isDisabled(e);(null==e.selection||e.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?t.addClass(r):t.removeClass(r),this.disabled=n},e.prototype.setIcon=function(){var e=hp(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=o(n);Qh(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=hp(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&tp(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),rp=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return lo(t,e),t.prototype.onButtonClick=function(){},t}(np),op=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=ja.get(e);null==t&&(t=new Set,ja.set(e,t)),t.add(this),Ia.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var n=this.genSelfElem();n&&t.append(n)},e.prototype.appendTo=function(e){var t=this.$elem;e.append(t)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=Ia.get(this);e&&e.emit(Eo,this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=Ia.get(this);e&&e.emit(So)}},e}(),ip=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=o('<div class="w-e-drop-panel"></div>'),n}return lo(t,e),t.prototype.genSelfElem=function(){return null},t}(op),ap=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=Zh();o.$button.append(i)}return o}return lo(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=hp(this);if(null==this.dropPanel){var n=new ip(t),r=e.getPanelContentElem(t);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=e.getPanelContentElem(t);o.renderContent(r),o.show()}}var i=this.dropPanel;if(i.isShow){var a=this.$elem,s=a.offset().left,u=a.parents(".w-e-bar");s-u.offset().left>=u.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},t}(np),sp=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=o('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var i=r.$elem;return i.on("click",function(e){return e.stopPropagation()}),i.on("keyup",function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())}),r}return lo(t,e),t.prototype.genSelfElem=function(){var e=this,t=o('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),n=Ia.get(this);return t.on("click",function(){e.hide(),null==n||n.restoreSelection()}),t},t.prototype.setStyle=function(e){var t=this.width,n=this.$elem;n.attr("style",""),t&&n.css("width","".concat(t,"px")),n.css(e)},t}(op);var up=function(e){function n(t,n,r){void 0===r&&(r=!1);var i=e.call(this,t,n,r)||this;return i.$body=o("body"),i.modal=null,i.menu=n,i}return lo(n,e),n.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},n.prototype.getPosition=function(){var e=hp(this),n=this.menu.getModalPositionNode(e);return t.Element.isElement(n)?eh(e,n,"modal"):Zd(e)},n.prototype.handleModal=function(){var e=hp(this),t=this.menu;if(null==this.modal){var n=new sp(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},n.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var n=hp(this),r=this.menu;if(null!=r.getModalContentElem){var o=If.getTextarea(n),i=If.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(e.renderContent(s),a)e.setStyle({left:"0",right:"0"});else{var u=this.getPosition();e.setStyle(u)}t&&(a?e.appendTo(this.$body):e.appendTo(o.$textAreaContainer)),e.show(),a||th(n,e.$elem),setTimeout(function(){n.blur()})}},n}(np);var lp=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=o('<div class="w-e-select-list"></div>'),n&&r.$elem.css("width","".concat(n,"px")),r.$elem.on("click",function(e){e.stopPropagation()}),r}return lo(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=o("<ul></ul>");e.forEach(function(e){var t=e.value,r=e.text,i=e.selected,a=e.styleForRenderMenuList,s=o('<li data-value="'.concat(t,'"></li>'));if(a&&s.css(a),i){var u=o('<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>');s.append(u),s.addClass("selected")}s.append(o('<span data-value="'.concat(t,'">').concat(r,"</span>"))),s.attr("title",r),n.append(s)}),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(op);var cp=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var i=t.tag,a=t.title,s=t.width,u=t.iconSvg,l=void 0===u?"":u,c=t.hotkey,f=void 0===c?"":c;if("select"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'select'"));var d=this.$button;s&&d.css("width","".concat(s,"px")),d.attr("data-menu-key",e),tp(d,l,a,f,n),this.$elem.append(d),this.menu=t,mc(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",function(t){t.preventDefault(),hp(e).hidePanelOrModal(),e.trigger()})},e.prototype.trigger=function(){var e=this,t=hp(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new lp(t,n.selectPanelWidth);var r=this.selectList,i=n.getOptions(t);r.renderList(i),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",function(t){var n=t.target;if(null!=n){t.preventDefault();var r=o(n).attr("data-value");e.onChange(r)}})}else{if((r=this.selectList).isShow)r.hide();else{i=n.getOptions(t);r.renderList(i),r.show()}}}},e.prototype.onChange=function(e){var t=hp(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=hp(this),t=this.menu,n=t.getValue(e),r=function(e,t){for(var n=e.length,r="",o=0;o<n;o++){var i=e[o];if(i.value===t){r=i.text;break}}return r}(t.getOptions(e),n.toString()),o=this.$button,i=Zh();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=hp(this),t=this.menu.isDisabled(e),n=this.$button;(null==e.selection||e.isDisabled())&&(t=!0);var r="disabled";t?n.addClass(r):n.removeClass(r),this.disabled=t},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),fp=function(){function e(e){this.$elem=o('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=o('<div class="w-e-bar-item-menus-container"></div>'),this.$button=o('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,i=this.$elem,a=this.$button;if(n){var s=o(n);Qh(s),a.append(s)}else a.text(r);a.attr("data-menu-key",t);var u=Zh();a.append(u),i.append(a);var l=this.$container;i.append(l);var c=this.createObserver();this.observe(c)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver(function(){var i=t.find("button"),a=i.length;if(0!==a){var s=0;i.each(function(e){o(e).hasClass("disabled")&&s++}),r.disconnect(),s===a?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}});return r},e}(),dp=new WeakMap;function hp(e){var t=Aa.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function pp(e,t,n){void 0===n&&(n=!1);var r=dp.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new ap(e,t,n):a?new up(e,t,n):new rp(e,t,n)}if("select"===o&&(r=new cp(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return dp.set(t,r),r}function gp(e,n){var r=e.selection;return null!=r&&(!t.Range.isCollapsed(r)&&(!If.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)})&&!!t.Text.isText(n)))}var vp,mp=function(){function e(){var e=this;this.$elem=o('<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=s(function(){var n=e.isShow,r=e.getSelectedNodeAndMenuKeys()||{},o=r.node,i=void 0===o?null:o,a=r.menuKeys,s=void 0===a?[]:a,u=e.getEditorInstance();if(null!=i&&e.changeItemsState(),i&&t.Element.isElement(i)&&n){var l=e.isSamePath(i,e.prevSelectedNode);if(!t.Editor.isBlock(u,i)&&l)return}e.hideAndClean(),null!=i&&(e.registerItems(s),e.setPosition(i),e.show()),e.prevSelectedNode=i},200),mc(function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),If.getTextarea(t).$textAreaContainer.append(n),t.on(yo,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(bo,r),t.on(wo,r),t.on(xo,r)}),this.lngListen=Yh(function(){e.menus={},e.hideAndClean(),e.getEditorInstance().deselect()})}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var e=this.$elem;e.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],e.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var e=this.$elem,t=!1,n="undefined"!=typeof window?window.innerHeight:null;n&&n>=360&&(n-e[0].getBoundingClientRect().bottom<360&&(t=!0));t?e.addClass("w-e-bar-bottom"):e.removeClass("w-e-bar-bottom")},e.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},e.prototype.changeItemsState=function(){var e=this;mc(function(){e.hoverbarItems.forEach(function(e){e.changeMenuState()})})},e.prototype.registerItems=function(e){var t=this,n=this.$elem;e.forEach(function(e){if("|"!==e)t.registerSingleItem(e);else{var r=ep();n.append(r)}})},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=Oo[e];if(null==o)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));r=o(),n[e]=r}var i=t.getMenuConfig(e);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=pp(e,r);this.hoverbarItems.push(a),Aa.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var n=this.getEditorInstance(),r=this.$elem;if(r.attr("style",""),t.Element.isElement(e)){var o=eh(n,e,"bar");return r.css(o),void th(n,r)}if(t.Text.isText(e)){o=Zd(n);return r.css(o),void th(n,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 n=this.getHoverbarKeysConf(),r=null,o=[],i=function(i){var a=n[i],s=a.match,u=a.menuKeys,l=void 0===u?[]:u,c=s||function(e,t){return If.checkNodeType(t,i)},f=ho(t.Editor.nodes(e,{match:function(t){return c(e,t)},universal:!0}),1),d=f[0];if(null!=d)return r=d[0],o=l,"break"};for(var a in n){if("break"===i(a))break}return null==r||0===o.length?null:{node:r,menuKeys:o}},e.prototype.getEditorInstance=function(){var e=Pa.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.getHoverbarKeysConf=function(){var e=this.getEditorInstance().getConfig().hoverbarKeys,t=void 0===e?{}:e,n=t.text;return n&&null==n.match&&(n.match=gp),t},e.prototype.isSamePath=function(e,n){if(null==e||null==n)return!1;var r=If.findPath(null,e),o=If.findPath(null,n);return t.Path.equals(r,o)},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}(),yp={};function bp(e,t){return Ac(t)&&If.hasDOMNode(e,t,{editable:!0})}function wp(e,n){if(e.getConfig().readOnly)return!1;var r=xp(e,n)&&If.toSlateNode(e,n);return t.Editor.isVoid(e,r)}function xp(e,t){return Ac(t)&&If.hasDOMNode(e,t)}!function(){if(vp)return yp;vp=1;var e,t=pr(),n=Xr(),r=Ct().f,o=Rn(),i=Oi(),a=Cs(),s=Te(),u=ks(),l=ht(),c=n("".slice),f=Math.min,d=u("startsWith");t({target:"String",proto:!0,forced:!!(l||d||(e=r(String.prototype,"startsWith"),!e||e.writable))&&!d},{startsWith:function(e){var t=i(s(this));a(e);var n=o(f(arguments.length>1?arguments[1]:void 0,t.length)),r=i(e);return c(t,n,n+r.length)===r}})}();const Ep=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Sp=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,Op=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Sp(n.overflowY,t)||Sp(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Cp=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,kp=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},Tp=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,f="function"==typeof l?l:e=>e!==l;if(!Ep(e))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=e;for(;Ep(p)&&f(p);){if(p=kp(p),p===d){h.push(p);break}null!=p&&p===document.body&&Op(p)&&!Op(document.documentElement)||null!=p&&Op(p,c)&&h.push(p)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:w,top:x,right:E,bottom:S,left:O}=e.getBoundingClientRect(),{top:C,right:k,bottom:T,left:N}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let R="start"===s||"nearest"===s?x-C:"end"===s?S+T:x+b/2-C+T,L="center"===u?O+w/2-N+k:"end"===u?E+k:O-N;const M=[];for(let e=0;e<h.length;e++){const t=h[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&x>=0&&O>=0&&S<=v&&E<=g&&(t===d&&!Op(t)||x>=o&&S<=l&&O>=c&&E<=i))return M;const f=getComputedStyle(t),p=parseInt(f.borderLeftWidth,10),C=parseInt(f.borderTopWidth,10),k=parseInt(f.borderRightWidth,10),T=parseInt(f.borderBottomWidth,10);let N=0,P=0;const D="offsetWidth"in t?t.offsetWidth-t.clientWidth-p-k:0,A="offsetHeight"in t?t.offsetHeight-t.clientHeight-C-T:0,j="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,I="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(d===t)N="start"===s?R:"end"===s?R-v:"nearest"===s?Cp(y,y+v,v,C,T,y+R,y+R+b,b):R-v/2,P="start"===u?L:"center"===u?L-g/2:"end"===u?L-g:Cp(m,m+g,g,p,k,m+L,m+L+w,w),N=Math.max(0,N+y),P=Math.max(0,P+m);else{N="start"===s?R-o-C:"end"===s?R-l+T+A:"nearest"===s?Cp(o,l,n,C,T+A,R,R+b,b):R-(o+n/2)+A/2,P="start"===u?L-c-p:"center"===u?L-(c+r/2)+D/2:"end"===u?L-i+k+D:Cp(c,i,r,p,k+D,L,L+w,w);const{scrollLeft:e,scrollTop:a}=t;N=0===I?0:Math.max(0,Math.min(a+N/I,t.scrollHeight-n/I+A)),P=0===j?0:Math.max(0,Math.min(e+P/j,t.scrollWidth-r/j+D)),R+=a-N,L+=e-P}M.push({el:t,top:N,left:P})}return M};function Np(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(Tp(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of Tp(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}function Rp(e,n,r){void 0===r&&(r=!1);var o=n.selection,i=n.getConfig(),a=If.findDocumentOrShadowRoot(n).getSelection();if(a&&(!e.isComposing||r)&&n.isFocused()){var s="None"!==a.type;if(o||s){var u=za.get(n),l=!1;if(u.contains(a.anchorNode)&&u.contains(a.focusNode)&&(l=!0),s&&l&&o){var c=If.toSlateRange(n,a,{exactMatch:!0,suppressThrow:!0});if(c&&t.Range.equals(c,o)){var f=!0;if(t.Range.isCollapsed(o)){var d=a.anchorNode,h=a.anchorOffset;if(d===u){var p=u.childNodes,g=void 0;(g=p[h])&&g.matches("table")&&(f=!1),(g=p[h-1])&&g.matches("table")&&(f=!1)}}if(f)return}}if(!o||If.hasRange(n,o)){e.isUpdatingSelection=!0;var v=o&&If.toDOMRange(n,o);if(v){t.Range.isBackward(o)?a.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):a.setBaseAndExtent(v.startContainer,v.startOffset,v.endContainer,v.endOffset);var m=v.startContainer.parentElement;if(!m.closest("[data-slate-spacer]")&&v.getBoundingClientRect){m.getBoundingClientRect=v.getBoundingClientRect.bind(v);var y=document.body;Np(m,{scrollMode:"if-needed",boundary:i.scroll?u.parentElement:y,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else a.removeAllRanges();setTimeout(function(){v&&Lf&&u.focus(),e.isUpdatingSelection=!1})}else n.selection=If.toSlateRange(n,a,{exactMatch:!1,suppressThrow:!1})}}}var Lp=new WeakMap,Mp=new WeakMap;var Pp={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"},Dp={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"},Ap={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},jp=function(e){var t=Pp[e],n=Dp[e],r=Ap[e],o=t&&l.isKeyHotkey(t),i=n&&l.isKeyHotkey(n),a=r&&l.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(Rf&&i&&i(e))||!(Rf||!a||!a(e)))}},Ip={isBold:jp("bold"),isCompose:jp("compose"),isMoveBackward:jp("moveBackward"),isMoveForward:jp("moveForward"),isDeleteBackward:jp("deleteBackward"),isDeleteForward:jp("deleteForward"),isDeleteLineBackward:jp("deleteLineBackward"),isDeleteLineForward:jp("deleteLineForward"),isDeleteWordBackward:jp("deleteWordBackward"),isDeleteWordForward:jp("deleteWordForward"),isExtendBackward:jp("extendBackward"),isExtendForward:jp("extendForward"),isExtendLineBackward:jp("extendLineBackward"),isExtendLineForward:jp("extendLineForward"),isItalic:jp("italic"),isMoveLineBackward:jp("moveLineBackward"),isMoveLineForward:jp("moveLineForward"),isMoveWordBackward:jp("moveWordBackward"),isMoveWordForward:jp("moveWordForward"),isRedo:jp("redo"),isSplitBlock:jp("splitBlock"),isTransposeCharacter:jp("transposeCharacter"),isUndo:jp("undo"),isTab:jp("tab"),isSelectAll:jp("selectAll")};function $p(e){e.preventDefault()}var Fp,_p,Bp,Wp={beforeinput:function(e,n,r){var o=e,i=r.getConfig().readOnly;if(jf&&!i&&bp(r,o.target)){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=ho(o.getTargetRanges(),1)[0];if(l){var c=If.toSlateRange(r,l,{exactMatch:!1,suppressThrow:!1});a&&t.Range.equals(a,c)||t.Transforms.select(r,c)}}if(a&&t.Range.isExpanded(a)){var f=If.getSelectedElems(r),d="table"===f[0].type,h="table-cell"!==f[f.length-1].type;if(d&&h)return;if(s.startsWith("delete")){var p=s.endsWith("Backward")?"backward":"forward";return void t.Editor.deleteFragment(r,{direction:p})}}switch(s){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":t.Editor.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":t.Editor.deleteForward(r);break;case"deleteContentBackward":t.Editor.deleteBackward(r);break;case"deleteEntireSoftLine":t.Editor.deleteBackward(r,{unit:"line"}),t.Editor.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":t.Editor.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":t.Editor.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":t.Editor.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":t.Editor.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":t.Editor.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":t.Editor.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":t.Editor.insertBreak(r);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===s&&!es.get(r))break;Rc(u)?r.insertData(u):"string"==typeof u&&t.Editor.insertText(r,u)}}}},blur:function(e,n,r){var o=e,i=n.isUpdatingSelection,a=n.latestElement;if(!r.getConfig().readOnly&&!i&&bp(r,o.target)){var s=If.findDocumentOrShadowRoot(r);if(a!==s.activeElement){var u=o.relatedTarget;if(!(u===If.toDOMNode(r,r)||Ic(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&Ac(u)&&If.hasDOMNode(r,u)){var l=If.toSlateNode(r,u);if(t.Element.isElement(l)&&!r.isVoid(l))return}if(Mf){var c=s.getSelection();null==c||c.removeAllRanges()}Xa.delete(r)}}}},focus:function(e,t,n){var r=If.toDOMNode(n,n),o=If.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,Lf&&e.target!==r?r.focus():Xa.set(n,!0)},click:function(e,n,r){if(!r.getConfig().readOnly&&xp(r,e.target)&&Ac(e.target)){var o=If.toSlateNode(r,e.target),i=If.findPath(r,o);if(t.Editor.hasPath(r,i))if(t.Node.get(r,i)===o){var a=t.Editor.start(r,i),s=t.Editor.end(r,i),u=t.Editor.void(r,{at:a}),l=t.Editor.void(r,{at:s});if(u&&l&&t.Path.equals(u[1],l[1])){var c=t.Editor.range(r,a);t.Transforms.select(r,c)}}}},compositionstart:function(e,n,r){if(bp(r,e.target)){var o=r.selection;if(o&&t.Range.isExpanded(o)&&(t.Editor.deleteFragment(r),Promise.resolve().then(function(){Rp(n,r,!0)})),r.selection){var i=If.toDOMRange(r,r.selection).startContainer,a=i.textContent||"";Lp.set(r,a),Mp.set(r,i)}n.isComposing=!0,function(e,t){var n;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}(n,r)}},compositionend:function(e,n,r){var o=e;if(bp(r,o.target)){n.isComposing=!1;var i=r.selection;if(null!=i){(Af||Lf)&&If.cleanExposedTexNodeInSelectionBlock(r);for(var a=t.Range.isBackward(i)?i.focus:i.anchor,s=ho(t.Editor.node(r,[a.path[0]]),1)[0],u=0;u<a.path.length;u+=1){var l=ho(t.Editor.node(r,a.path.slice(0,u+1)),1)[0];if(t.Element.isElement(l)&&((Mf||Lf)&&"link"===l.type||"code"===l.type)){If.setNewKey(s);break}}var c=o.data;if(c){if(r.getConfig().maxLength){var f=If.getLeftLengthOfMaxLength(r);if(f<c.length){var d=If.toDOMRange(r,i);d.startContainer.nodeType===Node.TEXT_NODE&&(d.startContainer.textContent=Lp.get(r)||""),f>0&&t.Editor.insertText(r,c.slice(0,f)),n.changeViewState()}else t.Editor.insertText(r,c)}else{var h=If.findDocumentOrShadowRoot(r).getSelection();h&&function(e,n){if(t.Range.isCollapsed(n)){var r=n.anchor,o=n.focus;if([2,3].includes(r.path.length)&&[2,3].includes(o.path.length)&&(0===r.offset||0===o.offset)){var i=t.Editor.node(e,r.path),a=0===r.offset?r.path:o.path,s=[a[0],a[1]-1];if(0===a[1])return!1;var u=t.Editor.node(e,s);if(t.Text.isText(u[0])&&t.Text.isText(i[0]))return!0}}}(r,i)&&(r.selection=If.toSlateRange(r,h,{exactMatch:!1,suppressThrow:!1})),t.Editor.insertText(r,c)}Mf||setTimeout(function(){var e=r.selection;if(null!=e){var t=Mp.get(r);if(null!=t)If.toDOMRange(r,e).startContainer!==t&&(t.textContent=Lp.get(r)||"")}})}}}},compositionupdate:function(e,t,n){bp(n,e.target)&&(t.isComposing=!0)},keydown:function(e,n,r){var o=e,i=r.selection;if(!r.getConfig().readOnly&&!n.isComposing&&bp(r,o.target)){if(function(e,t){var n=Ma.get(e),r=n&&n.getMenus(),o=Da.get(e),i=o&&o.getMenus(),a=co(co({},r),i);for(var s in a){var u=a[s],c=u.hotkey;if(c&&l.isHotkey(c,t)&&!u.isDisabled(e)){var f=u.getValue(e);u.exec(e,f)}}}(r,o),Ip.isTab(o))return $p(o),void r.handleTab();if(Ip.isRedo(o))return $p(o),void("function"==typeof r.redo&&r.redo());if(Ip.isUndo(o))return $p(o),void("function"==typeof r.undo&&r.undo());if(Ip.isMoveLineBackward(o))return $p(o),void t.Transforms.move(r,{unit:"line",reverse:!0});if(Ip.isMoveLineForward(o))return $p(o),void t.Transforms.move(r,{unit:"line"});if(Ip.isExtendLineBackward(o))return $p(o),void t.Transforms.move(r,{unit:"line",edge:"focus",reverse:!0});if(Ip.isExtendLineForward(o))return $p(o),void t.Transforms.move(r,{unit:"line",edge:"focus"});if(Ip.isMoveBackward(o))return $p(o),void(i&&t.Range.isCollapsed(i)?t.Transforms.move(r,{reverse:!0}):t.Transforms.collapse(r,{edge:"start"}));if(Ip.isMoveForward(o))return $p(o),void(i&&t.Range.isCollapsed(i)?t.Transforms.move(r):t.Transforms.collapse(r,{edge:"end"}));if(Ip.isMoveWordBackward(o))return $p(o),i&&t.Range.isExpanded(i)&&t.Transforms.collapse(r,{edge:"focus"}),void t.Transforms.move(r,{unit:"word",reverse:!0});if(Ip.isMoveWordForward(o))return $p(o),i&&t.Range.isExpanded(i)&&t.Transforms.collapse(r,{edge:"focus"}),void t.Transforms.move(r,{unit:"word"});if(Ip.isSelectAll(o))return $p(o),void r.selectAll();if(jf){if((Af||Mf)&&i&&(Ip.isDeleteBackward(o)||Ip.isDeleteForward(o))&&t.Range.isCollapsed(i)){var a=t.Node.parent(r,i.anchor.path);if(t.Element.isElement(a)&&t.Editor.isVoid(r,a)&&t.Editor.isInline(r,a))return o.preventDefault(),void t.Transforms.delete(r,{unit:"block"})}}else{if(Ip.isBold(o)||Ip.isItalic(o)||Ip.isTransposeCharacter(o))return void $p(o);if(Ip.isSplitBlock(o))return $p(o),void t.Editor.insertBreak(r);if(Ip.isDeleteBackward(o))return $p(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r));if(Ip.isDeleteForward(o))return $p(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"forward"}):t.Editor.deleteForward(r));if(Ip.isDeleteLineBackward(o))return $p(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r,{unit:"line"}));if(Ip.isDeleteLineForward(o))return $p(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"forward"}):t.Editor.deleteForward(r,{unit:"line"}));if(Ip.isDeleteWordBackward(o))return $p(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"backward"}):t.Editor.deleteBackward(r,{unit:"word"}));if(Ip.isDeleteWordForward(o))return $p(o),void(i&&t.Range.isExpanded(i)?t.Editor.deleteFragment(r,{direction:"forward"}):t.Editor.deleteForward(r,{unit:"word"}))}}},keypress:function(e,n,r){if(!jf&&!r.getConfig().readOnly&&bp(r,e.target)){e.preventDefault();var o=e.key;t.Editor.insertText(r,o)}},copy:function(e,t,n){var r=e;if(bp(n,r.target)){n.getConfig().readOnly||r.preventDefault();var o=r.clipboardData;if(null!=o){n.setFragmentData(o);var i=n.getConfig().customCopy;i&&i(n,r)}}},cut:function(e,n,r){var o=e,i=r.selection;if(!r.getConfig().readOnly&&(o.preventDefault(),bp(r,o.target))){var a=o.clipboardData;if(null!=a&&(r.setFragmentData(a),i))if(t.Range.isExpanded(i))t.Editor.deleteFragment(r);else{var s=t.Node.parent(r,i.anchor.path);t.Editor.isVoid(r,s)&&t.Transforms.delete(r)}}},paste:function(e,t,n){es.set(n,!0);var r=e;if(!n.getConfig().readOnly&&bp(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void es.set(n,!1);if(Mf||!jf||_c(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,n,r){if(xp(r,e.target)){var o=If.toSlateNode(r,e.target);t.Editor.isVoid(r,o)&&e.preventDefault()}},dragstart:function(e,n,r){var o=e;if(xp(r,o.target)&&!r.getConfig().readOnly){var i=If.toSlateNode(r,o.target),a=If.findPath(r,i);if(t.Editor.isVoid(r,i)||t.Editor.void(r,{at:a,voids:!0})){var s=t.Editor.range(r,a);t.Transforms.select(r,s)}var u=o.dataTransfer;if(null!=u)If.getSelectedNodeByType(r,"table")||(n.isDraggingInternally=!0,r.setFragmentData(u))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&xp(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,n,r){var o=e,i=o.dataTransfer;if(!r.getConfig().readOnly&&xp(r,o.target)&&null!=i&&!(jf&&Mf&&i.files.length>0)){o.preventDefault();var a=r.selection,s=If.findEventRange(r,o);t.Transforms.select(r,s),n.isDraggingInternally&&(a&&t.Transforms.delete(r,{at:a}),n.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},Hp={};!function(){if(Bp)return Hp;Bp=1;var e=pr(),t=function(){if(_p)return Fp;_p=1;var e=L(),t=Se(),n=P(),r=R(),o=Nr(),i=cr(),a=xe(),s=mt(),u=Ce(),l=Object.assign,c=Object.defineProperty,f=t([].concat);return Fp=!l||r(function(){if(e&&1!==l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},n={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return t[r]=7,i.split("").forEach(function(e){n[e]=e}),7!==l({},t)[r]||o(l({},n)).join("")!==i})?function(t,r){for(var l=s(t),c=arguments.length,d=1,h=i.f,p=a.f;c>d;)for(var g,v=u(arguments[d++]),m=h?f(o(v),h(v)):o(v),y=m.length,b=0;y>b;)g=m[b++],e&&!n(p,v,g)||(l[g]=v[g]);return l}:l,Fp}();e({target:"Object",stat:!0,arity:2,forced:Object.assign!==t},{assign:t})}();var Up=[];var Vp={};function zp(e,t,n){var r=n.isInline(e)?"span":"div";return c.jsx(r,null,t)}function Kp(e,n){var r,o=If.findKey(n,e),i=n.isInline(e),a=t.Editor.isVoid(n,e),s=gf(e.type,o.id),u={id:s,key:o.id,"data-slate-node":"element","data-slate-inline":i},l=e.type,f=e.children,d=void 0===f?[]:f,h=function(e){return Vp[e]||zp}(l);r=a?null:d.map(function(t,r){return Yp(t,r,e,n)});var p=h(e,r,n);if(a){u["data-slate-void"]=!0;var g=i?"span":"div",v=ho(t.Node.texts(e),1),m=ho(v[0],1)[0],y=Yp(m,0,e,n),b=c.jsx(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},y);p=c.jsx(g,{style:{position:"relative"}},p,b),Ua.set(m,0),Va.set(m,e)}return null==p.data&&(p.data={}),Object.assign(p.data,u),a||i||(p=function(e,t){var n=t;return Up.forEach(function(r){n=r(e,t)}),n}(e,p)),mc(function(){var t=Hc(s);null!=t&&(qa.set(o,t),Ja.set(e,t),Ka.set(t,e))}),p}function qp(e,t){return void 0===t&&(t=!1),c.jsx("span",{"data-slate-string":!0},t?e+"\n":e)}function Jp(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),c.jsx("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?c.jsx("br",null):null)}function Gp(e,n,r){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var o=If.findKey(r,e),i=r.getConfig().decorate;if(null==i)throw new Error("Can not get config.decorate");var a,s=If.findPath(r,e),u=i([e,s]),l=t.Text.decorations(e,u),f=l.map(function(o,i){var a=function(e,n,r,o,i){void 0===n&&(n=!1);var a=e.text,s=If.findPath(i,r),u=t.Path.parent(s);if(t.Editor.isEditor(o))throw new Error("Text node ".concat(JSON.stringify(r)," parent is Editor"));return i.isVoid(o)?Jp(t.Node.string(o).length):""!==a||o.children[o.children.length-1]!==r||i.isInline(o)||""!==t.Editor.string(i,u)?""===a?Jp():n&&"\n"===a.slice(-1)?qp(a,!0):qp(a):Jp(0,!0)}(o,i===l.length-1,e,n,r);return a=function(e,t){var n=t;return Up.forEach(function(t){n=t(e,n)}),n}(o,a),c.jsx("span",{"data-slate-leaf":!0},a)}),d=(a=o.id,"w-e-text-".concat(a)),h=c.jsx("span",{"data-slate-node":"text",id:d,key:o.id},f);return mc(function(){var t=Hc(d);null!=t&&(qa.set(o,t),Ja.set(e,t),Ka.set(t,e))}),h}function Yp(e,n,r,o){return Ua.set(e,n),Va.set(e,r),t.Element.isElement(e)?Kp(e,o):Gp(e,r,o)}var Xp=["props","attrs","style","dataset","on","hook"];function Qp(e){var t=e.data,n=void 0===t?{}:t,r=e.children,o=void 0===r?[]:r;Object.keys(n).forEach(function(t){var r,o,i=n[t];if("key"!==t){if(!Xp.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=f(a),function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.dataset&&(n.dataset={});Object.assign(n.dataset,t)}(e,((r={})[a]=i,r)),void delete n[t]}!function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={});Object.assign(n.props,t)}(e,(o={},o[t]=i,o)),delete n[t]}}else e.key=i}),o.length>0&&o.forEach(function(e){"string"!=typeof e&&Qp(e)})}function Zp(e,n){var r,i,a=e.$scroll,s=(r=e.id,"w-e-textarea-".concat(r)),u=n.getConfig(),l=u.readOnly,f=u.autoFocus,d=function(e,t){return void 0===t&&(t=!1),c.h("div#".concat(e),{props:{contentEditable:!t}})}(s,l),h=n.children||[];d.children=h.map(function(e,r){if(Wa.has(e)){var o=Wa.get(e);if(o){var i=ho(o,2),a=i[0],s=i[1];if(s)return a!==r&&(Ua.set(e,r),Wa.set(e,[r,s])),s}}var u=Yp(e,r,n,n);Qp(u);var l=n.getConfig().skipCacheTypes,c=void 0===l?["list-item"]:l;return t.Element.isElement(e)&&c.includes(e.type)||Wa.set(e,[r,u]),u});var p=Fa.get(e);if(null==p&&(p=!0),p){var g=function(e){return o('<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>'))}(s);a.append(g),e.$textArea=g,i=g[0],(m=c.init([c.classModule,c.propsModule,c.styleModule,c.datasetModule,c.eventListenersModule,c.attributesModule]))(i,d),Fa.set(e,!1),_a.set(e,m)}else{var v=Ba.get(e),m=_a.get(e);if(null==v||null==m)return;i=v.elm,m(v,d)}if(null!=i||null!=(i=Hc(s))){if((p?f:n.isFocused())&&i.focus({preventScroll:!0}),p){var y=Dc(i);y&&Ya.set(n,y)}za.set(n,i),Ja.set(n,i),Ka.set(i,n),Ba.set(e,d)}}var eg=1,tg=function(){function e(e){var n=this;this.id=eg++,this.$textArea=null,this.$progressBar=o('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=o('<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=u(function(){var e=n.editorInstance;!function(e,n){var r=e.isComposing,o=e.isUpdatingSelection,i=e.isDraggingInternally;if(!(n.getConfig().readOnly||r||o||i)){var a=If.findDocumentOrShadowRoot(n),s=a.activeElement,u=If.toDOMNode(n,n),l=a.getSelection();if(s!==u)return Xa.delete(n),void t.Transforms.deselect(n);if(e.latestElement=s,Xa.set(n,!0),!l)return t.Transforms.deselect(n);var c=l.anchorNode,f=l.focusNode,d=bp(n,c)||wp(n,c),h=bp(n,f)||wp(n,f);if(d&&h){var p=If.toSlateRange(n,l,{exactMatch:!1,suppressThrow:!1});t.Transforms.select(n,p)}}}(n,e)},100);var r=o(e);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=r;var i=o('<div class="w-e-text-container"></div>');i.append(this.$progressBar),i.append(this.$maxLengthInfo),r.append(i);var a=o('<div class="w-e-scroll"></div>');i.append(a),this.$scroll=a,this.$textAreaContainer=i,mc(function(){var e=n.editorInstance,t=If.getWindow(e);t.document.addEventListener("selectionchange",n.onDOMSelectionChange),e.on(mo,function(){t.document.removeEventListener("selectionchange",n.onDOMSelectionChange)}),i.on("click",function(){return e.hidePanelOrModal()}),e.on(yo,n.changeViewState.bind(n));var o=e.getConfig(),a=o.onChange,s=o.scroll;a&&e.on(yo,function(){return a(e)}),s||(r.css("position","relative"),i.addClass("no-scroll")),n.onFocusAndOnBlur(),e.on(yo,n.changeMaxLengthInfo.bind(n)),n.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=Ra.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,o=this.editorInstance;null!=t&&(r(Wp,function(n,r){t.on(r,function(t){n(t,e,o)})}),o.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",u(function(){o.emit(bo)},100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on(yo,function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout(function(){return o&&o(t)}):null!=e.latestEditorSelection&&null==t.selection&&setTimeout(function(){return r&&r(t)}),e.latestEditorSelection=t.selection})},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-If.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(t)}},e.prototype.changeProgress=function(e){var t=this.$progressBar;t.css("width","".concat(e,"%")),e>=100&&setTimeout(function(){t.hide(),t.css("width","0"),t.show()},1e3)},e.prototype.changeViewState=function(){var e=this,t=this.editorInstance;Zp(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var i=t.isEmpty();if(i&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var a=o('<div class="w-e-text-placeholder">'.concat(r,"</div>"));e.$textAreaContainer.append(a),e.$placeholder=a}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!i&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),mc(function(){Rp(e,t)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function ng(e,n,r,o){if(Ua.set(e,n),Va.set(e,r),t.Element.isElement(e)){var i=e.children;if((void 0===i?[]:i).forEach(function(t,n){return ng(t,n,e,o)}),t.Editor.isVoid(o,e)){var a=ho(t.Node.texts(e),1),s=ho(a[0],1)[0];Ua.set(s,0),Va.set(s,e)}}}var rg={en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"};var og,ig,ag,sg,ug,lg={};function cg(){if(sg)return ag;sg=1;var e=Fe(),t=TypeError;return ag=function(n,r){if(!delete n[r])throw new t("Cannot delete property "+e(r)+" of "+e(n))}}!function(){if(ug)return lg;ug=1;var e=pr(),t=mt(),n=Nn(),r=Tn(),o=Ln(),i=function(){if(ig)return og;ig=1;var e=L(),t=gr(),n=TypeError,r=Object.getOwnPropertyDescriptor,o=e&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();return og=o?function(e,o){if(t(e)&&!r(e,"length").writable)throw new n("Cannot set read only .length");return e.length=o}:function(e,t){return e.length=t}}(),a=vr(),s=Er(),u=mr(),l=cg(),c=Sr()("splice"),f=Math.max,d=Math.min;e({target:"Array",proto:!0,forced:!c},{splice:function(e,c){var h,p,g,v,m,y,b=t(this),w=o(b),x=n(e,w),E=arguments.length;for(0===E?h=p=0:1===E?(h=0,p=w-x):(h=E-2,p=d(f(r(c),0),w-x)),a(w+h-p),g=s(b,p),v=0;v<p;v++)(m=x+v)in b&&u(g,v,b[m]);if(g.length=p,h<p){for(v=x;v<w-p;v++)y=v+h,(m=v+p)in b?b[y]=b[m]:l(b,y);for(v=w;v>w-p+h;v--)l(b,v-1)}else if(h>p)for(v=w-p;v>x;v--)y=v+h-1,(m=v+p-1)in b?b[y]=b[m]:l(b,y);for(v=0;v<h;v++)b[v+x]=arguments[v+2];return i(b,w-p+h),g}})}();var fg=function(){function e(e,t){var n=this;this.$toolbar=o('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=s(function(){n.toolbarItems.forEach(function(e){e.changeMenuState()})},200),this.config=t;var r=o(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var i=this.$toolbar;i.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),r.append(i),mc(function(){n.initToolbar(),n.lngListen=Yh(function(){return n.initToolbar()}),n.getEditorInstance().on(yo,n.changeToolbarState)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.initToolbar=function(){this.menus={};var e=this.$toolbar;null==e||e.empty(),this.registerItems(),this.changeToolbarState()},e.prototype.registerItems=function(){var e=this,t="",r=this.$toolbar,o=this.config,i=o.toolbarKeys,a=void 0===i?[]:i,s=o.insertKeys,u=void 0===s?{index:0,keys:[]}:s,l=o.excludeKeys,c=void 0===l?[]:l,f=n(a),d=[];d=Array.isArray(u)?u:[u];var h=0;d.forEach(function(e){var t=e.index+h;if(e.replaceFn&&f[t]){var n=e.replaceFn(f[t]);if(!n)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");f[t]=n}e.keys.length>0&&("string"==typeof e.keys&&(e.keys=[e.keys]),e.keys.forEach(function(e,n){f.splice(t+n,0,e)}),h+=e.keys.length)});var p=f.filter(function(e){var t="string"==typeof e?e:e.key;return!c.includes(t)}),g=p.length;p.forEach(function(n,o){if("|"===n){if(0===o)return;if(o+1===g)return;if("|"===t)return;var i=ep();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,n=this.$toolbar,r=function(e){return new fp(e)}(e),o=e.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach(function(e){s.includes(e)||t.registerSingleItem(e,r)}),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof fp,o=this.menus,i=o[e];if(null==i){var a=Oo[e];if(null==a)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));i=a(),o[e]=i}else console.warn("Duplicated toolbar menu key '".concat(e,"'\n重复注册了菜单栏 menu '").concat(e,"'"));var s=n.getMenuConfig(e);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=pp(e,i,r);(this.toolbarItems.push(u),Aa.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=La.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}();var dg,hg={};!function(){if(dg)return hg;dg=1;var e=L(),t=en().EXISTS,n=Se(),r=Ys(),o=Function.prototype,i=n(o.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=n(a.exec);e&&!t&&r(o,"name",{configurable:!0,get:function(){try{return s(a,i(this))[1]}catch(e){return""}}})}(),e.DOMComment=xc,e.DOMElement=Ec,e.DOMNode=wc,e.DOMRange=Oc,e.DOMSelection=Cc,e.DOMStaticRange=kc,e.DOMText=Sc,e.DomEditor=If,e.ELEM_TO_HTML_CONF=mf,e.PARSE_ELEM_HTML_CONF=sf,e.PARSE_STYLE_HTML_FN_LIST=af,e.PRE_PARSE_HTML_CONF_LIST=of,e.RENDER_ELEM_CONF=Vp,e.RENDER_STYLE_HANDLER_LIST=Up,e.SPAN_WITH_SPECIAL_TAGS=rf,e.STYLE_TO_HTML_FN_LIST=vf,e.TEXT_TAGS=nf,e.Toolbar=fg,e.coreCreateEditor=function(e){var o=e.selector,i=void 0===o?"":o,a=e.config,s=void 0===a?{}:a,u=e.content,l=e.html,c=e.plugins,f=void 0===c?[]:c,d=function(e){return[Gd,Ld,ts,Nd,rh,Jd,Xd,so.withHistory].reduce(function(e,t){return t(e)},e)}(t.createEditor());if(i&&function(e,t){return hf(e,"data-w-e-textarea",t)}(d,i))throw new Error("Repeated create editor by selector '".concat(i,"'"));var h=function(e){void 0===e&&(e={});var t=n(go),o={},i=e.MENU_CONF,a=void 0===i?{}:i;return r(t,function(e,t){o[t]=co(co({},e),a[t]||{})}),delete e.MENU_CONF,co({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:o,hoverbarKeys:{},customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(s);$a.set(d,h);var p=h.hoverbarKeys,g=void 0===p?{}:p;if(f.forEach(function(e){d=e(d)}),function(e,t){var n=t.html,r=t.content;null!=n?e.children=pf(e,n):r&&r.length&&(e.children=r),0===e.children.length&&(e.children=[{type:"paragraph",children:[{text:""}]}])}(d,{html:l,content:u}),i){var v=new tg(i);Na.set(d,v),Ra.set(v,d),v.changeViewState(),mc(function(){var e=v.$scroll;null!=e&&e.height()<300&&console.warn("".concat(rg.zh,"\n").concat(rg.en),{element:e,height:e.height()})});var m=void 0;Object.keys(g).length>0&&(m=new mp,Pa.set(m,d),Da.set(d,m)),d.on(yo,function(){d.hidePanelOrModal()}),d.on(bo,function(){d.hidePanelOrModal()})}else d.children.forEach(function(e,t){return ng(e,t,d,d)});var y=h.onCreated,b=h.onDestroyed;return y&&d.on(vo,function(){return y(d)}),b&&d.on(mo,function(){return b(d)}),mc(function(){return d.emit(vo)}),d},e.coreCreateToolbar=function(e,t){if(null==e)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,o=void 0===r?{}:r;if(function(e,t){return hf(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=co({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new fg(n,i);return La.set(a,e),Ma.set(e,a),a},e.createUploader=function(e){var t=e.server,n=void 0===t?"":t,o=e.fieldName,i=void 0===o?"":o,a=e.maxFileSize,s=void 0===a?10485760:a,u=e.maxNumberOfFiles,l=void 0===u?100:u,c=e.meta,f=void 0===c?{}:c,p=e.metaWithUrl,g=void 0!==p&&p,v=e.headers,m=void 0===v?{}:v,y=e.withCredentials,b=void 0!==y&&y,w=e.timeout,x=void 0===w?1e4:w,E=e.onBeforeUpload,S=void 0===E?function(e){return e}:E,O=e.onSuccess,C=void 0===O?function(e,t){}:O,k=e.onError,T=void 0===k?function(e,t,n){console.error("".concat(e.name," upload error"),t,n)}:k,N=e.onProgress,R=void 0===N?function(e){}:N;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!i)throw new Error("Cannot get fieldName\n没有配置 fieldName");var L=n;g&&(L=function(e,t){var n=ho(e.split("#"),2),o=n[0],i=n[1],a=[];r(t,function(e,t){a.push("".concat(t,"=").concat(e))});var s=a.join("&");return o=o.indexOf("?")>0?"".concat(o,"&").concat(s):"".concat(o,"?").concat(s),i?"".concat(o,"#").concat(i):o}(L,f));var M=new d(co({onBeforeUpload:S,restrictions:{maxFileSize:s,maxNumberOfFiles:l},meta:f},e.uppyConfig)).use(h,co({endpoint:L,headers:m,formData:!0,fieldName:i,bundle:!0,withCredentials:b,timeout:x},e.xhrConfig));return M.on("complete",function(e){var t=e.successful[0],n=t.response,r=(null!=n?n:{}).body,o=void 0===r?{}:r;try{C(t,o)}catch(e){console.error("wangEditor upload file - onSuccess error",e)}}),M.on("progress",function(e){e<1||R(e)}),M.on("upload-error",function(e,t,n){try{T(e,t,n)}catch(e){console.error("wangEditor upload file - onError error",e)}}),M.on("restriction-failed",function(e,t){try{T(e,t)}catch(e){console.error("wangEditor upload file - onError error",e)}}),M},e.genModalButtonElems=function(e,t){var n=o('<div class="button-container"></div>'),r=o('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return n.append(r),[n[0],r[0]]},e.genModalInputElems=function(e,t,n){var r=o('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var i=o('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(i),[r[0],i[0]]},e.genModalTextareaElems=function(e,t,n){var r=o('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var i=o('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(i),[r[0],i[0]]},e.getDefaultView=Dc,e.getEditableChild=Vc,e.getEditableChildAndIndex=Uc,e.getElementById=Hc,e.getFirstVoidChild=Kc,e.getPlainText=zc,e.getTagName=Jc,e.hasShadowRoot=Wc,e.i18nAddResources=function(e,t){Jh.addResourceBundle(e,Gh,t,!0,!0)},e.i18nChangeLanguage=function(e){Jh.changeLanguage(e)},e.i18nGetResources=function(e){return Jh.getResourceBundle(e,Gh)},e.i18nListenLanguage=Yh,e.isDOMComment=jc,e.isDOMElement=Ic,e.isDOMNode=Ac,e.isDOMSelection=$c,e.isDOMText=Fc,e.isDataTransfer=Rc,e.isDocument=Tc,e.isHTMLElememt=Pc,e.isPlainTextOnlyPaste=_c,e.isShadowRoot=Nc,e.isUnprocessedListElement=Mc,e.normalizeDOMPoint=Bc,e.registerElemToHtmlConf=function(e){var t=e.type,n=e.elemToHtml;mf[t||""]=n},e.registerMenu=function(e,t){var n=e.key,r=e.factory,o=e.config,i=co(co({},o),t||{});if(null!=Oo[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));Oo[n]=r,function(e,t){null!=t&&(go[e]=t)}(n,i)},e.registerParseElemHtmlConf=function(e){var t=e.selector,n=e.parseElemHtml;sf[t]=n},e.registerParseStyleHtmlHandler=function(e){af.push(e)},e.registerPreParseHtmlConf=function(e){of.push(e)},e.registerRenderElemConf=function(e){var t=e.type,n=e.renderElem;Vp[t||""]=n},e.registerStyleHandler=function(e){Up.push(e)},e.registerStyleToHtmlHandler=function(e){vf.push(e)},e.t=Xh,e.walkTextNodes=qc});
|
|
8
|
+
function t(t){return"[object Object]"===Object.prototype.toString.call(t)}return eo=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.isPlainObject=function(e){var n,r;return!1!==t(e)&&(void 0===(n=e.constructor)||!1!==t(r=n.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},oo}function ao(){if(no)return ro;no=1;var t=io(),n=e,r={isHistory:function(e){return t.isPlainObject(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||n.Operation.isOperationList(e.redos[0].operations))&&(0===e.undos.length||n.Operation.isOperationList(e.undos[0].operations))}},o=new WeakMap,i=new WeakMap,a=new WeakMap,s={isHistoryEditor:function(t){return r.isHistory(t.history)&&n.Editor.isEditor(t)},isMerging:function(t){return a.get(t)},isSaving:function(t){return i.get(t)},redo:function(t){t.redo()},undo:function(t){t.undo()},withMerging:function(t,e){var n=s.isMerging(t);a.set(t,!0),e(),a.set(t,n)},withoutMerging:function(t,e){var n=s.isMerging(t);a.set(t,!1),e(),a.set(t,n)},withoutSaving:function(t,e){var n=s.isSaving(t);i.set(t,!1),e(),i.set(t,n)}};function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(t,e)}(t))||e){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var c=function(t,e){return!(!e||"insert_text"!==t.type||"insert_text"!==e.type||t.offset!==e.offset+e.text.length||!n.Path.equals(t.path,e.path))||!(!e||"remove_text"!==t.type||"remove_text"!==e.type||t.offset+t.text.length!==e.offset||!n.Path.equals(t.path,e.path))},f=function(t,e){return"set_selection"!==t.type};return ro.HISTORY=o,ro.History=r,ro.HistoryEditor=s,ro.MERGING=a,ro.SAVING=i,ro.withHistory=function(t){var e=t,r=e.apply;return e.history={undos:[],redos:[]},e.redo=function(){var t=e.history,r=t.redos;if(r.length>0){var o=r[r.length-1];o.selectionBefore&&n.Transforms.setSelection(e,o.selectionBefore),s.withoutSaving(e,function(){n.Editor.withoutNormalizing(e,function(){var t,n=u(o.operations);try{for(n.s();!(t=n.n()).done;){var r=t.value;e.apply(r)}}catch(t){n.e(t)}finally{n.f()}})}),t.redos.pop(),e.writeHistory("undos",o)}},e.undo=function(){var t=e.history,r=t.undos;if(r.length>0){var o=r[r.length-1];s.withoutSaving(e,function(){n.Editor.withoutNormalizing(e,function(){var t,r=u(o.operations.map(n.Operation.inverse).reverse());try{for(r.s();!(t=r.n()).done;){var i=t.value;e.apply(i)}}catch(t){r.e(t)}finally{r.f()}o.selectionBefore&&n.Transforms.setSelection(e,o.selectionBefore)})}),e.writeHistory("redos",o),t.undos.pop()}},e.apply=function(t){var n=e.operations,o=e.history,i=o.undos,a=i[i.length-1],u=a&&a.operations[a.operations.length-1],l=s.isSaving(e),d=s.isMerging(e);if(null==l&&(l=f(t)),l){if(null==d&&(d=null!=a&&(0!==n.length||c(t,u))),a&&d)a.operations.push(t);else{var h={operations:[t],selectionBefore:e.selection};e.writeHistory("undos",h)}for(;i.length>100;)i.shift();o.redos=[]}r(t)},e.writeHistory=function(t,n){e.history[t].push(n)},e},ro}var so=ao(),uo=function(t,e){return uo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},uo(t,e)};function lo(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}uo(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var co=function(){return co=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},co.apply(this,arguments)};function fo(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ho(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function po(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var go={};var vo="created",mo="destroyed",yo="change",bo="scroll",wo="fullscreen",xo="unFullScreen",Eo="modalOrPanelShow",So="modalOrPanelHide",Oo={};var Co,ko,To,No,Ro,Lo,Mo,Po,Do,Ao,jo,Io,$o,Fo,_o,Bo,Wo,Ho,Uo,Vo,zo,Ko,qo,Jo,Go,Yo,Xo,Qo,Zo,ti,ei,ni,ri,oi={};function ii(){if(To)return ko;To=1;var t=Mt();return ko=t("document","documentElement")}function ai(){if(Ro)return No;Ro=1;var t,e=je(),n=function(){if(Co)return oi;Co=1;var t=L(),e=Ae(),n=Ie(),r=je(),o=Nt(),i=Nr();return oi.f=t&&!e?Object.defineProperties:function(t,e){r(t);for(var a,s=o(e),u=i(e),l=u.length,c=0;l>c;)n.f(t,a=u[c++],s[a]);return t},oi}(),r=Dn(),o=on(),i=ii(),a=Se(),s=rn(),u="prototype",l="script",c=s("IE_PROTO"),f=function(){},d=function(t){return"<"+l+">"+t+"</"+l+">"},h=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},p=function(){try{t=new ActiveXObject("htmlfile")}catch(t){}var e,n,o;p="undefined"!=typeof document?document.domain&&t?h(t):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(e=n.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):h(t);for(var s=r.length;s--;)delete p[u][r[s]];return p()};return o[c]=!0,No=Object.create||function(t,r){var o;return null!==t?(f[u]=e(t),o=new f,f[u]=null,o[c]=t):o=p(),void 0===r?o:n.f(o,r)}}function si(){if(Mo)return Lo;Mo=1;var t=we(),e=ai(),n=Ie().f,r=t("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:e(null)}),Lo=function(t){o[r][t]=!0}}function ui(){return Do?Po:(Do=1,Po={})}function li(){if($o)return Io;$o=1;var t=ye(),e=Rt(),n=me(),r=rn(),o=function(){if(jo)return Ao;jo=1;var t=R();return Ao=!t(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return Io=o?a.getPrototypeOf:function(r){var o=n(r);if(t(o,i))return o[i];var u=o.constructor;return e(u)&&o instanceof u?u.prototype:o instanceof a?s:null}}function ci(){if(_o)return Fo;_o=1;var t,e,n,r=R(),o=Rt(),i=Lt(),a=ai(),s=li(),u=un(),l=we(),c=he(),f=l("iterator"),d=!1;return[].keys&&("next"in(n=[].keys())?(e=s(s(n)))!==Object.prototype&&(t=e):d=!0),!i(t)||r(function(){var e={};return t[f].call(e)!==e})?t={}:c&&(t=a(t)),o(t[f])||u(t,f,function(){return this}),Fo={IteratorPrototype:t,BUGGY_SAFARI_ITERATORS:d}}function fi(){if(Wo)return Bo;Wo=1;var t=Ie().f,e=ye(),n=we()("toStringTag");return Bo=function(r,o,i){r&&!i&&(r=r.prototype),r&&!e(r,n)&&t(r,n,{configurable:!0,value:o})}}function di(){if(qo)return Ko;qo=1;var t=Lt();return Ko=function(e){return t(e)||null===e}}function hi(){if(Go)return Jo;Go=1;var t=di(),e=String,n=TypeError;return Jo=function(r){if(t(r))return r;throw new n("Can't set "+e(r)+" as a prototype")}}function pi(){if(Xo)return Yo;Xo=1;var t=function(){if(zo)return Vo;zo=1;var t=St(),e=_t();return Vo=function(n,r,o){try{return t(e(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(t){}}}(),e=Lt(),n=Tt(),r=hi();return Yo=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=t(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(t){}return function(t,a){return n(t),r(a),e(t)?(i?o(t,a):t.__proto__=a,t):t}}():void 0)}function gi(){if(Zo)return Qo;Zo=1;var t=pr(),e=P(),n=he(),r=tn(),o=Rt(),i=function(){if(Uo)return Ho;Uo=1;var t=ci().IteratorPrototype,e=ai(),n=Et(),r=fi(),o=ui(),i=function(){return this};return Ho=function(a,s,u,l){var c=s+" Iterator";return a.prototype=e(t,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a}}(),a=li(),s=pi(),u=fi(),l=$e(),c=un(),f=we(),d=ui(),h=ci(),p=r.PROPER,g=r.CONFIGURABLE,v=h.IteratorPrototype,m=h.BUGGY_SAFARI_ITERATORS,y=f("iterator"),b="keys",w="values",x="entries",E=function(){return this};return Qo=function(r,f,h,S,O,C,k){i(h,f,S);var T,N,R,L=function(t){if(t===O&&j)return j;if(!m&&t&&t in D)return D[t];switch(t){case b:case w:case x:return function(){return new h(this,t)}}return function(){return new h(this)}},M=f+" Iterator",P=!1,D=r.prototype,A=D[y]||D["@@iterator"]||O&&D[O],j=!m&&A||L(O),I="Array"===f&&D.entries||A;if(I&&(T=a(I.call(new r)))!==Object.prototype&&T.next&&(n||a(T)===v||(s?s(T,v):o(T[y])||c(T,y,E)),u(T,M,!0,!0),n&&(d[M]=E)),p&&O===w&&A&&A.name!==w&&(!n&&g?l(D,"name",w):(P=!0,j=function(){return e(A,this)})),O)if(N={values:L(w),keys:C?j:L(b),entries:L(x)},k)for(R in N)(m||P||!(R in D))&&c(D,R,N[R]);else t({target:f,proto:!0,forced:m||P},N);return n&&!k||D[y]===j||c(D,y,j,{name:O}),d[f]=j,N}}function vi(){return ei?ti:(ei=1,ti=function(t,e){return{value:t,done:e}})}function mi(){if(ri)return ni;ri=1;var t=Nt(),e=si(),n=ui(),r=an(),o=Ie().f,i=gi(),a=vi(),s=he(),u=L(),l="Array Iterator",c=r.set,f=r.getterFor(l);ni=i(Array,"Array",function(e,n){c(this,{type:l,target:t(e),index:0,kind:n})},function(){var t=f(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,a(void 0,!0);switch(t.kind){case"keys":return a(n,!1);case"values":return a(e[n],!1)}return a([n,e[n]],!1)},"values");var d=n.Arguments=n.Array;if(e("keys"),e("values"),e("entries"),!s&&u&&"values"!==d.name)try{o(d,"name",{value:"values"})}catch(t){}return ni}mi();var yi,bi,wi,xi,Ei,Si={};function Oi(){if(bi)return yi;bi=1;var t=br(),e=String;return yi=function(n){if("Symbol"===t(n))throw new TypeError("Cannot convert a Symbol value to a string");return e(n)}}function Ci(){if(xi)return wi;xi=1;var t=St(),e=Tn(),n=Oi(),r=Tt(),o=t("".charAt),i=t("".charCodeAt),a=t("".slice),s=function(t){return function(s,u){var l,c,f=n(r(s)),d=e(u),h=f.length;return d<0||d>=h?t?"":void 0:(l=i(f,d))<55296||l>56319||d+1===h||(c=i(f,d+1))<56320||c>57343?t?o(f,d):l:t?a(f,d,d+2):c-56320+(l-55296<<10)+65536}};return wi={codeAt:s(!1),charAt:s(!0)}}!function(){if(Ei)return Si;Ei=1;var t=Ci().charAt,e=Oi(),n=an(),r=gi(),o=vi(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",function(t){a(this,{type:i,string:e(t),index:0})},function(){var e,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(e=t(r,i),n.index+=e.length,o(e,!1))})}();var ki,Ti,Ni,Ri,Li={};function Mi(){if(Ti)return ki;Ti=1;var t=R();return ki=!t(function(){return Object.isExtensible(Object.preventExtensions({}))})}function Pi(){if(Ri)return Ni;Ri=1;var t=un();return Ni=function(e,n,r){for(var o in n)t(e,o,n[o],r);return e}}var Di,Ai,ji,Ii,$i,Fi,_i,Bi,Wi,Hi,Ui,Vi,zi,Ki,qi,Ji,Gi,Yi,Xi,Qi,Zi,ta,ea,na,ra,oa,ia,aa,sa,ua,la={exports:{}},ca={};function fa(){if(Ai)return Di;Ai=1;var t=St();return Di=t([].slice)}function da(){if(ji)return ca;ji=1;var t=Ot(),e=Nt(),n=An().f,r=fa(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return ca.f=function(i){return o&&"Window"===t(i)?function(t){try{return n(t)}catch(t){return r(o)}}(i):n(e(i))},ca}function ha(){if(_i)return Fi;_i=1;var t=R(),e=Lt(),n=Ot(),r=function(){if($i)return Ii;$i=1;var t=R();return Ii=t(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})}(),o=Object.isExtensible,i=t(function(){});return Fi=i||r?function(t){return!!e(t)&&((!r||"ArrayBuffer"!==n(t))&&(!o||o(t)))}:o}function pa(){if(Bi)return la.exports;Bi=1;var t=pr(),e=St(),n=on(),r=Lt(),o=ye(),i=Ie().f,a=An(),s=da(),u=ha(),l=be(),c=Mi(),f=!1,d=l("meta"),h=0,p=function(t){i(t,d,{value:{objectID:"O"+h++,weakData:{}}})},g=la.exports={enable:function(){g.enable=function(){},f=!0;var n=a.f,r=e([].splice),o={};o[d]=1,n(o).length&&(a.f=function(t){for(var e=n(t),o=0,i=e.length;o<i;o++)if(e[o]===d){r(e,o,1);break}return e},t({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:s.f}))},fastKey:function(t,e){if(!r(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,d)){if(!u(t))return"F";if(!e)return"E";p(t)}return t[d].objectID},getWeakData:function(t,e){if(!o(t,d)){if(!u(t))return!0;if(!e)return!1;p(t)}return t[d].weakData},onFreeze:function(t){return c&&f&&u(t)&&!o(t,d)&&p(t),t}};return n[d]=!0,la.exports}function ga(){if(Hi)return Wi;Hi=1;var t=we(),e=ui(),n=t("iterator"),r=Array.prototype;return Wi=function(t){return void 0!==t&&(e.Array===t||r[n]===t)}}function va(){if(Vi)return Ui;Vi=1;var t=br(),e=Bt(),n=kt(),r=ui(),o=we()("iterator");return Ui=function(i){if(!n(i))return e(i,o)||e(i,"@@iterator")||r[t(i)]}}function ma(){if(Ki)return zi;Ki=1;var t=P(),e=_t(),n=je(),r=Ft(),o=va(),i=TypeError;return zi=function(a,s){var u=arguments.length<2?o(a):s;if(e(u))return n(t(u,a));throw new i(r(a)+" is not iterable")},zi}function ya(){if(Ji)return qi;Ji=1;var t=P(),e=je(),n=Bt();return qi=function(r,o,i){var a,s;e(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=t(a,r)}catch(t){s=!0,a=t}if("throw"===o)throw i;if(s)throw a;return e(a),i}}function ba(){if(Yi)return Gi;Yi=1;var t=Qr(),e=P(),n=je(),r=Ft(),o=ga(),i=Ln(),a=Pt(),s=ma(),u=va(),l=ya(),c=TypeError,f=function(t,e){this.stopped=t,this.result=e},d=f.prototype;return Gi=function(h,p,g){var v,m,y,b,w,x,E,S=g&&g.that,O=!(!g||!g.AS_ENTRIES),C=!(!g||!g.IS_RECORD),k=!(!g||!g.IS_ITERATOR),T=!(!g||!g.INTERRUPTED),N=t(p,S),R=function(t){return v&&l(v,"normal"),new f(!0,t)},L=function(t){return O?(n(t),T?N(t[0],t[1],R):N(t[0],t[1])):T?N(t,R):N(t)};if(C)v=h.iterator;else if(k)v=h;else{if(!(m=u(h)))throw new c(r(h)+" is not iterable");if(o(m)){for(y=0,b=i(h);b>y;y++)if((w=L(h[y]))&&a(d,w))return w;return new f(!1)}v=s(h,m)}for(x=C?h.next:v.next;!(E=e(x,v)).done;){try{w=L(E.value)}catch(t){l(v,"throw",t)}if("object"==typeof w&&w&&a(d,w))return w}return new f(!1)}}function wa(){if(Qi)return Xi;Qi=1;var t=Pt(),e=TypeError;return Xi=function(n,r){if(t(r,n))return n;throw new e("Incorrect invocation")}}function xa(){if(ta)return Zi;ta=1;var t=we()("iterator"),e=!1;try{var n=0,r={next:function(){return{done:!!n++}},return:function(){e=!0}};r[t]=function(){return this},Array.from(r,function(){throw 2})}catch(t){}return Zi=function(n,r){try{if(!r&&!e)return!1}catch(t){return!1}var o=!1;try{var i={};i[t]=function(){return{next:function(){return{done:o=!0}}}},n(i)}catch(t){}return o}}function Ea(){if(na)return ea;na=1;var t=Rt(),e=Lt(),n=pi();return ea=function(r,o,i){var a,s;return n&&t(a=o.constructor)&&a!==i&&e(s=a.prototype)&&s!==i.prototype&&n(r,s),r}}function Sa(){if(oa)return ra;oa=1;var t=pr(),e=b(),n=St(),r=hr(),o=un(),i=pa(),a=ba(),s=wa(),u=Rt(),l=kt(),c=Lt(),f=R(),d=xa(),h=fi(),p=Ea();return ra=function(g,v,m){var y=-1!==g.indexOf("Map"),b=-1!==g.indexOf("Weak"),w=y?"set":"add",x=e[g],E=x&&x.prototype,S=x,O={},C=function(t){var e=n(E[t]);o(E,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(b&&!c(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return b&&!c(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(b&&!c(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(r(g,!u(x)||!(b||E.forEach&&!f(function(){(new x).entries().next()}))))S=m.getConstructor(v,g,y,w),i.enable();else if(r(g,!0)){var k=new S,T=k[w](b?{}:-0,1)!==k,N=f(function(){k.has(1)}),R=d(function(t){new x(t)}),L=!b&&f(function(){for(var t=new x,e=5;e--;)t[w](e,e);return!t.has(-0)});R||((S=v(function(t,e){s(t,E);var n=p(new x,t,S);return l(e)||a(e,n[w],{that:n,AS_ENTRIES:y}),n})).prototype=E,E.constructor=S),(N||L)&&(C("delete"),C("has"),y&&C("get")),(L||T)&&C(w),b&&E.clear&&delete E.clear}return O[g]=S,t({global:!0,constructor:!0,forced:S!==x},O),h(S,g),b||m.setStrong(S,g,y),S},ra}function Oa(){if(aa)return ia;aa=1;var t=St(),e=Pi(),n=pa().getWeakData,r=wa(),o=je(),i=kt(),a=Lt(),s=ba(),u=Zr(),l=ye(),c=an(),f=c.set,d=c.getterFor,h=u.find,p=u.findIndex,g=t([].splice),v=0,m=function(t){return t.frozen||(t.frozen=new y)},y=function(){this.entries=[]},b=function(t,e){return h(t.entries,function(t){return t[0]===e})};return y.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=p(this.entries,function(e){return e[0]===t});return~e&&g(this.entries,e,1),!!~e}},ia={getConstructor:function(t,u,c,h){var p=t(function(t,e){r(t,g),f(t,{type:u,id:v++,frozen:null}),i(e)||s(e,t[h],{that:t,AS_ENTRIES:c})}),g=p.prototype,y=d(u),b=function(t,e,r){var i=y(t),a=n(o(e),!0);return!0===a?m(i).set(e,r):a[i.id]=r,t};return e(g,{delete:function(t){var e=y(this);if(!a(t))return!1;var r=n(t);return!0===r?m(e).delete(t):r&&l(r,e.id)&&delete r[e.id]},has:function(t){var e=y(this);if(!a(t))return!1;var r=n(t);return!0===r?m(e).has(t):r&&l(r,e.id)}}),e(g,c?{get:function(t){var e=y(this);if(a(t)){var r=n(t);if(!0===r)return m(e).get(t);if(r)return r[e.id]}},set:function(t,e){return b(this,t,e)}}:{add:function(t){return b(this,t,!0)}}),p}}}ua||(ua=1,function(){if(sa)return Li;sa=1;var t,e=Mi(),n=b(),r=St(),o=Pi(),i=pa(),a=Sa(),s=Oa(),u=Lt(),l=an().enforce,c=R(),f=nn(),d=Object,h=Array.isArray,p=d.isExtensible,g=d.isFrozen,v=d.isSealed,m=d.freeze,y=d.seal,w=!n.ActiveXObject&&"ActiveXObject"in n,x=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},E=a("WeakMap",x,s),S=E.prototype,O=r(S.set);if(f)if(w){t=s.getConstructor(x,"WeakMap",!0),i.enable();var C=r(S.delete),k=r(S.has),T=r(S.get);o(S,{delete:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),C(this,e)||n.frozen.delete(e)}return C(this,e)},has:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),k(this,e)||n.frozen.has(e)}return k(this,e)},get:function(e){if(u(e)&&!p(e)){var n=l(this);return n.frozen||(n.frozen=new t),k(this,e)?T(this,e):n.frozen.get(e)}return T(this,e)},set:function(e,n){if(u(e)&&!p(e)){var r=l(this);r.frozen||(r.frozen=new t),k(this,e)?O(this,e,n):r.frozen.set(e,n)}else O(this,e,n);return this}})}else e&&c(function(){var t=m([]);return O(new E,t,1),!g(t)})&&o(S,{set:function(t,e){var n;return h(t)&&(g(t)?n=m:v(t)&&(n=y)),O(this,t,e),n&&n(t),this}})}());var Ca,ka={};!function(){if(Ca)return ka;Ca=1;var t=b(),e=Gr(),n=Yr(),r=mi(),o=$e(),i=fi(),a=we()("iterator"),s=r.values,u=function(t,n){if(t){if(t[a]!==s)try{o(t,a,s)}catch(e){t[a]=s}if(i(t,n,!0),e[n])for(var u in r)if(t[u]!==r[u])try{o(t,u,r[u])}catch(e){t[u]=r[u]}}};for(var l in e)u(t[l]&&t[l].prototype,l);u(n,"DOMTokenList")}();var Ta,Na=new WeakMap,Ra=new WeakMap,La=new WeakMap,Ma=new WeakMap,Pa=new WeakMap,Da=new WeakMap,Aa=new WeakMap,ja=new WeakMap,Ia=new WeakMap,$a=new WeakMap,Fa=new WeakMap,_a=new WeakMap,Ba=new WeakMap,Wa=new WeakMap,Ha=new WeakMap,Ua=new WeakMap,Va=new WeakMap,za=new WeakMap,Ka=new WeakMap,qa=new WeakMap,Ja=new WeakMap,Ga=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,Qa=new WeakMap,Za=new WeakMap,ts=new WeakMap,es=function(t){var e=t;return e.getAllMenuKeys=function(){var t=[];for(var e in Oo)t.push(e);return t},e.getConfig=function(){var t=$a.get(e);if(null==t)throw new Error("Can not get editor config");return t},e.getMenuConfig=function(t){var n=e.getConfig().MENU_CONF;return(void 0===n?{}:n)[t]||{}},e.alert=function(t,n){void 0===n&&(n="info");var r=e.getConfig().customAlert;r&&r(t,n)},e},ns={};!function(){if(Ta)return ns;Ta=1;var t=pr(),e=Zr().filter;t({target:"Array",proto:!0,forced:!Sr()("filter")},{filter:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var rs,os,is,as,ss,us={};function ls(){if(os)return rs;os=1;var t=je(),e=ya();return rs=function(n,r,o,i){try{return i?r(t(o)[0],o[1]):r(o)}catch(t){e(n,"throw",t)}}}!function(){if(ss)return us;ss=1;var t=pr(),e=function(){if(as)return is;as=1;var t=Qr(),e=P(),n=me(),r=ls(),o=ga(),i=wr(),a=Ln(),s=mr(),u=ma(),l=va(),c=Array;return is=function(f){var d=n(f),h=i(this),p=arguments.length,g=p>1?arguments[1]:void 0,v=void 0!==g;v&&(g=t(g,p>2?arguments[2]:void 0));var m,y,b,w,x,E,S=l(d),O=0;if(!S||this===c&&o(S))for(m=a(d),y=h?new this(m):c(m);m>O;O++)E=v?g(d[O],O):d[O],s(y,O,E);else for(y=h?new this:[],x=(w=u(d,S)).next;!(b=e(x,w)).done;O++)E=v?r(w,g,[b.value,O],!0):b.value,s(y,O,E);return y.length=O,y},is}();t({target:"Array",stat:!0,forced:!xa()(function(t){Array.from(t)})},{from:e})}();var cs,fs={};!function(){if(cs)return fs;cs=1;var t=pr(),e=Mn().includes,n=R(),r=si();t({target:"Array",proto:!0,forced:n(function(){return!Array(1).includes()})},{includes:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),r("includes")}();var ds,hs={};!function(){if(ds)return hs;ds=1;var t=pr(),e=St(),n=Ct(),r=Nt(),o=to(),i=e([].join);t({target:"Array",proto:!0,forced:n!==Object||!o("join",",")},{join:function(t){return i(r(this),void 0===t?",":t)}})}();var ps,gs={};!function(){if(ps)return gs;ps=1;var t=pr(),e=Zr().map;t({target:"Array",proto:!0,forced:!Sr()("map")},{map:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}})}();var vs,ms,ys,bs,ws,xs,Es,Ss={};function Os(){if(ms)return vs;ms=1;var t=Lt(),e=Ot(),n=we()("match");return vs=function(r){var o;return t(r)&&(void 0!==(o=r[n])?!!o:"RegExp"===e(r))}}function Cs(){if(bs)return ys;bs=1;var t=Os(),e=TypeError;return ys=function(n){if(t(n))throw new e("The method doesn't accept regular expressions");return n}}function ks(){if(xs)return ws;xs=1;var t=we()("match");return ws=function(e){var n=/./;try{"/./"[e](n)}catch(r){try{return n[t]=!1,"/./"[e](n)}catch(t){}}return!1}}!function(){if(Es)return Ss;Es=1;var t=pr(),e=St(),n=Cs(),r=Tt(),o=Oi(),i=ks(),a=e("".indexOf);t({target:"String",proto:!0,forced:!i("includes")},{includes:function(t){return!!~a(o(r(this)),o(n(t)),arguments.length>1?arguments[1]:void 0)}})}();var Ts,Ns,Rs,Ls,Ms,Ps,Ds,As={};function js(){return Ns?Ts:(Ns=1,Ts="\t\n\v\f\r \u2028\u2029\ufeff")}!function(){if(Ds)return As;Ds=1;var t=pr(),e=function(){if(Ls)return Rs;Ls=1;var t=St(),e=Tt(),n=Oi(),r=js(),o=t("".replace),i=RegExp("^["+r+"]+"),a=RegExp("(^|[^"+r+"])["+r+"]+$"),s=function(t){return function(r){var s=n(e(r));return 1&t&&(s=o(s,i,"")),2&t&&(s=o(s,a,"$1")),s}};return Rs={start:s(1),end:s(2),trim:s(3)}}().trim,n=function(){if(Ps)return Ms;Ps=1;var t=tn().PROPER,e=R(),n=js();return Ms=function(r){return e(function(){return!!n[r]()||"
"!=="
"[r]()||t&&n[r].name!==r})}}();t({target:"String",proto:!0,forced:n("trim")},{trim:function(){return e(this)}})}();var Is,$s,Fs,_s,Bs,Ws={};!function(){if(Bs)return Ws;Bs=1;var t=pr(),e=function(){if($s)return Is;$s=1;var t=St(),e=Tt(),n=Oi(),r=/"/g,o=t("".replace);return Is=function(t,i,a,s){var u=n(e(t)),l="<"+i;return""!==a&&(l+=" "+a+'="'+o(n(s),r,""")+'"'),l+">"+u+"</"+i+">"}}(),n=function(){if(_s)return Fs;_s=1;var t=R();return Fs=function(e){return t(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})}}();t({target:"String",proto:!0,forced:n("anchor")},{anchor:function(t){return e(this,"a","name",t)}})}();var Hs,Us,Vs,zs,Ks,qs,Js,Gs;function Ys(){if(Us)return Hs;Us=1;var t=sn(),e=Ie();return Hs=function(n,r,o){return o.get&&t(o.get,r,{getter:!0}),o.set&&t(o.set,r,{setter:!0}),e.f(n,r,o)}}function Xs(){if(zs)return Vs;zs=1;var t=Mt(),e=Ys(),n=we(),r=L(),o=n("species");return Vs=function(n){var i=t(n);r&&i&&!i[o]&&e(i,o,{configurable:!0,get:function(){return this}})}}Gs||(Gs=1,Js||(Js=1,Sa()("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},function(){if(qs)return Ks;qs=1;var t=ai(),e=Ys(),n=Pi(),r=Qr(),o=wa(),i=kt(),a=ba(),s=gi(),u=vi(),l=Xs(),c=L(),f=pa().fastKey,d=an(),h=d.set,p=d.getterFor;return Ks={getConstructor:function(s,u,l,d){var g=s(function(e,n){o(e,v),h(e,{type:u,index:t(null),first:null,last:null,size:0}),c||(e.size=0),i(n)||a(n,e[d],{that:e,AS_ENTRIES:l})}),v=g.prototype,m=p(u),y=function(t,e,n){var r,o,i=m(t),a=b(t,e);return a?a.value=n:(i.last=a={index:o=f(e,!0),key:e,value:n,previous:r=i.last,next:null,removed:!1},i.first||(i.first=a),r&&(r.next=a),c?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},b=function(t,e){var n,r=m(t),o=f(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key===e)return n};return n(v,{clear:function(){for(var e=m(this),n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=null),n=n.next;e.first=e.last=null,e.index=t(null),c?e.size=0:this.size=0},delete:function(t){var e=this,n=m(e),r=b(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first===r&&(n.first=o),n.last===r&&(n.last=i),c?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=m(this),o=r(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:n.first;)for(o(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),n(v,l?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),c&&e(v,"size",{configurable:!0,get:function(){return m(this).size}}),g},setStrong:function(t,e,n){var r=e+" Iterator",o=p(e),i=p(r);s(t,e,function(t,e){h(this,{type:r,target:t,state:o(t),kind:e,last:null})},function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?u("keys"===e?n.key:"values"===e?n.value:[n.key,n.value],!1):(t.target=null,u(void 0,!0))},n?"entries":"values",!n,!0),l(e)}},Ks}())));var Qs,Zs,tu,eu,nu,ru,ou,iu,au,su,uu,lu=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),cu={};function fu(){if(Zs)return Qs;Zs=1;var t=je();return Qs=function(){var e=t(this),n="";return e.hasIndices&&(n+="d"),e.global&&(n+="g"),e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.dotAll&&(n+="s"),e.unicode&&(n+="u"),e.unicodeSets&&(n+="v"),e.sticky&&(n+="y"),n}}function du(){if(eu)return tu;eu=1;var t=R(),e=b().RegExp,n=t(function(){var t=e("a","y");return t.lastIndex=2,null!==t.exec("abcd")}),r=n||t(function(){return!e("a","y").sticky}),o=n||t(function(){var t=e("^r","gy");return t.lastIndex=2,null!==t.exec("str")});return tu={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}function hu(){if(ru)return nu;ru=1;var t=R(),e=b().RegExp;return nu=t(function(){var t=e(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})}function pu(){if(iu)return ou;iu=1;var t=R(),e=b().RegExp;return ou=t(function(){var t=e("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})}function gu(){if(su)return au;su=1;var t,e,n=P(),r=St(),o=Oi(),i=fu(),a=du(),s=ve(),u=ai(),l=an().get,c=hu(),f=pu(),d=s("native-string-replace",String.prototype.replace),h=RegExp.prototype.exec,p=h,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(e=/b*/g,n(h,t=/a/,"a"),n(h,e,"a"),0!==t.lastIndex||0!==e.lastIndex),w=a.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];return(b||x||w||c||f)&&(p=function(t){var e,r,a,s,c,f,E,S=this,O=l(S),C=o(t),k=O.raw;if(k)return k.lastIndex=S.lastIndex,e=n(p,k,C),S.lastIndex=k.lastIndex,e;var T=O.groups,N=w&&S.sticky,R=n(i,S),L=S.source,M=0,P=C;if(N&&(R=m(R,"y",""),-1===v(R,"g")&&(R+="g"),P=y(C,S.lastIndex),S.lastIndex>0&&(!S.multiline||S.multiline&&"\n"!==g(C,S.lastIndex-1))&&(L="(?: "+L+")",P=" "+P,M++),r=new RegExp("^(?:"+L+")",R)),x&&(r=new RegExp("^"+L+"$(?!\\s)",R)),b&&(a=S.lastIndex),s=n(h,N?r:S,P),N?s?(s.input=y(s.input,M),s[0]=y(s[0],M),s.index=S.lastIndex,S.lastIndex+=s[0].length):S.lastIndex=0:b&&s&&(S.lastIndex=S.global?s.index+s[0].length:a),x&&s&&s.length>1&&n(d,s[0],r,function(){for(c=1;c<arguments.length-2;c++)void 0===arguments[c]&&(s[c]=void 0)}),s&&T)for(s.groups=f=u(null),c=0;c<T.length;c++)f[(E=T[c])[0]]=s[E[1]];return s}),au=p}function vu(){if(uu)return cu;uu=1;var t=pr(),e=gu();return t({target:"RegExp",proto:!0,forced:/./.exec!==e},{exec:e}),cu}vu();var mu,yu,bu,wu,xu,Eu,Su,Ou,Cu,ku,Tu,Nu={};function Ru(){if(yu)return mu;yu=1,vu();var t=P(),e=un(),n=gu(),r=R(),o=we(),i=$e(),a=o("species"),s=RegExp.prototype;return mu=function(u,l,c,f){var d=o(u),h=!r(function(){var t={};return t[d]=function(){return 7},7!==""[u](t)}),p=h&&!r(function(){var t=!1,e=/a/;return"split"===u&&((e={}).constructor={},e.constructor[a]=function(){return e},e.flags="",e[d]=/./[d]),e.exec=function(){return t=!0,null},e[d](""),!t});if(!h||!p||c){var g=/./[d],v=l(d,""[u],function(e,r,o,i,a){var u=r.exec;return u===n||u===s.exec?h&&!a?{done:!0,value:t(g,r,o,i)}:{done:!0,value:t(e,o,r,i)}:{done:!1}});e(String.prototype,u,v[0]),e(s,d,v[1])}f&&i(s[d],"sham",!0)},mu}function Lu(){if(wu)return bu;wu=1;var t=wr(),e=Ft(),n=TypeError;return bu=function(r){if(t(r))return r;throw new n(e(r)+" is not a constructor")}}function Mu(){if(Eu)return xu;Eu=1;var t=je(),e=Lu(),n=kt(),r=we()("species");return xu=function(o,i){var a,s=t(o).constructor;return void 0===s||n(a=t(s)[r])?i:e(a)}}function Pu(){if(Ou)return Su;Ou=1;var t=Ci().charAt;return Su=function(e,n,r){return n+(r?t(e,n).length:1)}}function Du(){if(ku)return Cu;ku=1;var t=P(),e=je(),n=Rt(),r=Ot(),o=gu(),i=TypeError;return Cu=function(a,s){var u=a.exec;if(n(u)){var l=t(u,a,s);return null!==l&&e(l),l}if("RegExp"===r(a))return t(o,a,s);throw new i("RegExp#exec called on incompatible receiver")}}!function(){if(Tu)return Nu;Tu=1;var t=P(),e=St(),n=Ru(),r=je(),o=Lt(),i=Tt(),a=Mu(),s=Pu(),u=Rn(),l=Oi(),c=Bt(),f=Du(),d=du(),h=R(),p=d.UNSUPPORTED_Y,g=Math.min,v=e([].push),m=e("".slice),y=!h(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}),b="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;n("split",function(e,n,d){var h="0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:t(n,this,e,r)}:n;return[function(n,r){var a=i(this),s=o(n)?c(n,e):void 0;return s?t(s,n,a,r):t(h,l(a),n,r)},function(t,e){var o=r(this),i=l(t);if(!b){var c=d(h,o,i,e,h!==n);if(c.done)return c.value}var y=a(o,RegExp),w=o.unicode,x=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(p?"g":"y"),E=new y(p?"^(?:"+o.source+")":o,x),S=void 0===e?4294967295:e>>>0;if(0===S)return[];if(0===i.length)return null===f(E,i)?[i]:[];for(var O=0,C=0,k=[];C<i.length;){E.lastIndex=p?0:C;var T,N=f(E,p?m(i,C):i);if(null===N||(T=g(u(E.lastIndex+(p?C:0)),i.length))===O)C=s(i,C,w);else{if(v(k,m(i,O,C)),k.length===S)return k;for(var R=1;R<=N.length-1;R++)if(v(k,N[R]),k.length===S)return k;C=O=T}}return v(k,m(i,O)),k}]},b||!y,p)}();var Au,ju={};!function(){if(Au)return ju;Au=1;var t=pr(),e=Zr().find,n=si(),r="find",o=!0;r in[]&&Array(1)[r](function(){o=!1}),t({target:"Array",proto:!0,forced:o},{find:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)}}),n(r)}();var Iu,$u,Fu,_u={};!function(){if(Fu)return _u;Fu=1;var t=pr(),e=function(){if($u)return Iu;$u=1;var t=gr(),e=Ln(),n=vr(),r=Qr(),o=function(i,a,s,u,l,c,f,d){for(var h,p,g=l,v=0,m=!!f&&r(f,d);v<u;)v in s&&(h=m?m(s[v],v,a):s[v],c>0&&t(h)?(p=e(h),g=o(i,a,h,p,g,c-1)-1):(n(g+1),i[g]=h),g++),v++;return g};return Iu=o}(),n=_t(),r=me(),o=Ln(),i=Er();t({target:"Array",proto:!0},{flatMap:function(t){var a,s=r(this),u=o(s);return n(t),(a=i(s,0)).length=e(a,s,s,u,0,1,t,arguments.length>1?arguments[1]:void 0),a}})}();var Bu;Bu||(Bu=1,si()("flatMap"));var Wu,Hu,Uu={};Hu||(Hu=1,function(){if(Wu)return Uu;Wu=1;var t=pr(),e=b();t({global:!0,forced:e.globalThis!==e},{globalThis:e})}());const Vu=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];var zu,Ku,qu,Ju,Gu,Yu,Xu,Qu,Zu,tl,el,nl,rl,ol,il,al,sl,ul,ll,cl,fl,dl,hl,pl,gl,vl,ml,yl,bl,wl,xl,El,Sl={};function Ol(){if(Ku)return zu;Ku=1;var t=b(),e=Dt(),n=Ot(),r=function(t){return e.slice(0,t.length)===t};return zu=r("Bun/")?"BUN":r("Cloudflare-Workers")?"CLOUDFLARE":r("Deno/")?"DENO":r("Node.js/")?"NODE":t.Bun&&"string"==typeof Bun.version?"BUN":t.Deno&&"object"==typeof Deno.version?"DENO":"process"===n(t.process)?"NODE":t.window&&t.document?"BROWSER":"REST"}function Cl(){if(Ju)return qu;Ju=1;var t=Ol();return qu="NODE"===t}function kl(){if(Yu)return Gu;Yu=1;var t=b();return Gu=t}function Tl(){if(Qu)return Xu;Qu=1;var t=M(),e=Function.prototype,n=e.apply,r=e.call;return Xu="object"==typeof Reflect&&Reflect.apply||(t?r.bind(n):function(){return r.apply(n,arguments)}),Xu}function Nl(){if(tl)return Zu;tl=1;var t=TypeError;return Zu=function(e,n){if(e<n)throw new t("Not enough arguments");return e}}function Rl(){if(nl)return el;nl=1;var t=Dt();return el=/(?:ipad|iphone|ipod).*applewebkit/i.test(t)}function Ll(){if(ol)return rl;ol=1;var t,e,n,r,o=b(),i=Tl(),a=Qr(),s=Rt(),u=ye(),l=R(),c=ii(),f=fa(),d=Se(),h=Nl(),p=Rl(),g=Cl(),v=o.setImmediate,m=o.clearImmediate,y=o.process,w=o.Dispatch,x=o.Function,E=o.MessageChannel,S=o.String,O=0,C={},k="onreadystatechange";l(function(){t=o.location});var T=function(t){if(u(C,t)){var e=C[t];delete C[t],e()}},N=function(t){return function(){T(t)}},L=function(t){T(t.data)},M=function(e){o.postMessage(S(e),t.protocol+"//"+t.host)};return v&&m||(v=function(t){h(arguments.length,1);var n=s(t)?t:x(t),r=f(arguments,1);return C[++O]=function(){i(n,void 0,r)},e(O),O},m=function(t){delete C[t]},g?e=function(t){y.nextTick(N(t))}:w&&w.now?e=function(t){w.now(N(t))}:E&&!p?(r=(n=new E).port2,n.port1.onmessage=L,e=a(r.postMessage,r)):o.addEventListener&&s(o.postMessage)&&!o.importScripts&&t&&"file:"!==t.protocol&&!l(M)?(e=M,o.addEventListener("message",L,!1)):e=k in d("script")?function(t){c.appendChild(d("script"))[k]=function(){c.removeChild(this),T(t)}}:function(t){setTimeout(N(t),0)}),rl={set:v,clear:m}}function Ml(){if(al)return il;al=1;var t=b(),e=L(),n=Object.getOwnPropertyDescriptor;return il=function(r){if(!e)return t[r];var o=n(t,r);return o&&o.value}}function Pl(){if(ul)return sl;ul=1;var t=function(){this.head=null,this.tail=null};return t.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},sl=t}function Dl(){if(pl)return hl;pl=1;var t,e,n,r,o,i=b(),a=Ml(),s=Qr(),u=Ll().set,l=Pl(),c=Rl(),f=function(){if(cl)return ll;cl=1;var t=Dt();return ll=/ipad|iphone|ipod/i.test(t)&&"undefined"!=typeof Pebble}(),d=function(){if(dl)return fl;dl=1;var t=Dt();return fl=/web0s(?!.*chrome)/i.test(t)}(),h=Cl(),p=i.MutationObserver||i.WebKitMutationObserver,g=i.document,v=i.process,m=i.Promise,y=a("queueMicrotask");if(!y){var w=new l,x=function(){var e,n;for(h&&(e=v.domain)&&e.exit();n=w.get();)try{n()}catch(e){throw w.head&&t(),e}e&&e.enter()};c||h||d||!p||!g?!f&&m&&m.resolve?((r=m.resolve(void 0)).constructor=m,o=s(r.then,r),t=function(){o(x)}):h?t=function(){v.nextTick(x)}:(u=s(u,i),t=function(){u(x)}):(e=!0,n=g.createTextNode(""),new p(x).observe(n,{characterData:!0}),t=function(){n.data=e=!e}),y=function(e){w.head||t(),w.add(e)}}return hl=y}function Al(){return vl||(vl=1,gl=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}),gl}function jl(){return yl?ml:(yl=1,ml=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}})}function Il(){if(wl)return bl;wl=1;var t=b();return bl=t.Promise}function $l(){if(El)return xl;El=1;var t=b(),e=Il(),n=Rt(),r=hr(),o=en(),i=we(),a=Ol(),s=he(),u=At(),l=e&&e.prototype,c=i("species"),f=!1,d=n(t.PromiseRejectionEvent),h=r("Promise",function(){var t=o(e),n=t!==String(e);if(!n&&66===u)return!0;if(s&&(!l.catch||!l.finally))return!0;if(!u||u<51||!/native code/.test(t)){var r=new e(function(t){t(1)}),i=function(t){t(function(){},function(){})};if((r.constructor={})[c]=i,!(f=r.then(function(){})instanceof i))return!0}return!(n||"BROWSER"!==a&&"DENO"!==a||d)});return xl={CONSTRUCTOR:h,REJECTION_EVENT:d,SUBCLASSING:f}}var Fl,_l,Bl={};function Wl(){if(Fl)return Bl;Fl=1;var t=_t(),e=TypeError,n=function(n){var r,o;this.promise=new n(function(t,n){if(void 0!==r||void 0!==o)throw new e("Bad Promise constructor");r=t,o=n}),this.resolve=t(r),this.reject=t(o)};return Bl.f=function(t){return new n(t)},Bl}var Hl,Ul,Vl,zl={};function Kl(){if(Ul)return Hl;Ul=1;var t=Il(),e=xa(),n=$l().CONSTRUCTOR;return Hl=n||!e(function(e){t.all(e).then(void 0,function(){})})}var ql,Jl={};var Gl,Yl={};var Xl,Ql={};var Zl,tc,ec,nc,rc={};function oc(){if(tc)return Zl;tc=1;var t=je(),e=Lt(),n=Wl();return Zl=function(r,o){if(t(r),e(o)&&o.constructor===r)return o;var i=n.f(r);return(0,i.resolve)(o),i.promise}}nc||(nc=1,function(){if(_l)return Sl;_l=1;var t,e,n,r,o=pr(),i=he(),a=Cl(),s=b(),u=kl(),l=P(),c=un(),f=pi(),d=fi(),h=Xs(),p=_t(),g=Rt(),v=Lt(),m=wa(),y=Mu(),w=Ll().set,x=Dl(),E=Al(),S=jl(),O=Pl(),C=an(),k=Il(),T=$l(),N=Wl(),R="Promise",L=T.CONSTRUCTOR,M=T.REJECTION_EVENT,D=T.SUBCLASSING,A=C.getterFor(R),j=C.set,I=k&&k.prototype,$=k,F=I,_=s.TypeError,B=s.document,W=s.process,H=N.f,U=H,V=!!(B&&B.createEvent&&s.dispatchEvent),z="unhandledrejection",K=function(t){var e;return!(!v(t)||!g(e=t.then))&&e},q=function(t,e){var n,r,o,i=e.value,a=1===e.state,s=a?t.ok:t.fail,u=t.resolve,c=t.reject,f=t.domain;try{s?(a||(2===e.rejection&&Q(e),e.rejection=1),!0===s?n=i:(f&&f.enter(),n=s(i),f&&(f.exit(),o=!0)),n===t.promise?c(new _("Promise-chain cycle")):(r=K(n))?l(r,n,u,c):u(n)):c(i)}catch(t){f&&!o&&f.exit(),c(t)}},J=function(t,e){t.notified||(t.notified=!0,x(function(){for(var n,r=t.reactions;n=r.get();)q(n,t);t.notified=!1,e&&!t.rejection&&Y(t)}))},G=function(t,e,n){var r,o;V?((r=B.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),s.dispatchEvent(r)):r={promise:e,reason:n},!M&&(o=s["on"+t])?o(r):t===z&&E("Unhandled promise rejection",n)},Y=function(t){l(w,s,function(){var e,n=t.facade,r=t.value;if(X(t)&&(e=S(function(){a?W.emit("unhandledRejection",r,n):G(z,n,r)}),t.rejection=a||X(t)?2:1,e.error))throw e.value})},X=function(t){return 1!==t.rejection&&!t.parent},Q=function(t){l(w,s,function(){var e=t.facade;a?W.emit("rejectionHandled",e):G("rejectionhandled",e,t.value)})},Z=function(t,e,n){return function(r){t(e,r,n)}},tt=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,J(t,!0))},et=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new _("Promise can't be resolved itself");var r=K(e);r?x(function(){var n={done:!1};try{l(r,e,Z(et,n,t),Z(tt,n,t))}catch(e){tt(n,e,t)}}):(t.value=e,t.state=1,J(t,!1))}catch(e){tt({done:!1},e,t)}}};if(L&&(F=($=function(e){m(this,F),p(e),l(t,this);var n=A(this);try{e(Z(et,n),Z(tt,n))}catch(t){tt(n,t)}}).prototype,(t=function(t){j(this,{type:R,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:null})}).prototype=c(F,"then",function(t,e){var n=A(this),r=H(y(this,$));return n.parent=!0,r.ok=!g(t)||t,r.fail=g(e)&&e,r.domain=a?W.domain:void 0,0===n.state?n.reactions.add(r):x(function(){q(r,n)}),r.promise}),e=function(){var e=new t,n=A(e);this.promise=e,this.resolve=Z(et,n),this.reject=Z(tt,n)},N.f=H=function(t){return t===$||t===n?new e(t):U(t)},!i&&g(k)&&I!==Object.prototype)){r=I.then,D||c(I,"then",function(t,e){var n=this;return new $(function(t,e){l(r,n,t,e)}).then(t,e)},{unsafe:!0});try{delete I.constructor}catch(t){}f&&f(I,F)}o({global:!0,constructor:!0,wrap:!0,forced:L},{Promise:$}),n=u.Promise,d($,R,!1,!0),h(R)}(),function(){if(Vl)return zl;Vl=1;var t=pr(),e=P(),n=_t(),r=Wl(),o=jl(),i=ba();t({target:"Promise",stat:!0,forced:Kl()},{all:function(t){var a=this,s=r.f(a),u=s.resolve,l=s.reject,c=o(function(){var r=n(a.resolve),o=[],s=0,c=1;i(t,function(t){var n=s++,i=!1;c++,e(r,a,t).then(function(t){i||(i=!0,o[n]=t,--c||u(o))},l)}),--c||u(o)});return c.error&&l(c.value),s.promise}})}(),function(){if(ql)return Jl;ql=1;var t=pr(),e=he(),n=$l().CONSTRUCTOR,r=Il(),o=Mt(),i=Rt(),a=un(),s=r&&r.prototype;if(t({target:"Promise",proto:!0,forced:n,real:!0},{catch:function(t){return this.then(void 0,t)}}),!e&&i(r)){var u=o("Promise").prototype.catch;s.catch!==u&&a(s,"catch",u,{unsafe:!0})}}(),function(){if(Gl)return Yl;Gl=1;var t=pr(),e=P(),n=_t(),r=Wl(),o=jl(),i=ba();t({target:"Promise",stat:!0,forced:Kl()},{race:function(t){var a=this,s=r.f(a),u=s.reject,l=o(function(){var r=n(a.resolve);i(t,function(t){e(r,a,t).then(s.resolve,u)})});return l.error&&u(l.value),s.promise}})}(),function(){if(Xl)return Ql;Xl=1;var t=pr(),e=Wl();t({target:"Promise",stat:!0,forced:$l().CONSTRUCTOR},{reject:function(t){var n=e.f(this);return(0,n.reject)(t),n.promise}})}(),function(){if(ec)return rc;ec=1;var t=pr(),e=Mt(),n=he(),r=Il(),o=$l().CONSTRUCTOR,i=oc(),a=e("Promise"),s=n&&!o;t({target:"Promise",stat:!0,forced:n||o},{resolve:function(t){return i(s&&this===a?r:this,t)}})}());var ic,ac,sc,uc,lc,cc={};function fc(){if(uc)return sc;uc=1;var t=P(),e=ye(),n=Pt(),r=function(){if(ac)return ic;ac=1;var t=b(),e=R(),n=t.RegExp,r=!e(function(){var t=!0;try{n(".","d")}catch(e){t=!1}var e={},r="",o=t?"dgimsy":"gimsy",i=function(t,n){Object.defineProperty(e,t,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in t&&(a.hasIndices="d"),a)i(s,a[s]);return Object.getOwnPropertyDescriptor(n.prototype,"flags").get.call(e)!==o||r!==o});return ic={correct:r}}(),o=fu(),i=RegExp.prototype;return sc=r.correct?function(t){return t.flags}:function(a){return r.correct||!n(i,a)||e(a,"flags")?a.flags:t(o,a)}}!function(){if(lc)return cc;lc=1;var t=tn().PROPER,e=un(),n=je(),r=Oi(),o=R(),i=fc(),a="toString",s=RegExp.prototype,u=s[a],l=o(function(){return"/a/b"!==u.call({source:"a",flags:"b"})}),c=t&&u.name!==a;(l||c)&&e(s,a,function(){var t=n(this);return"/"+r(t.source)+"/"+r(i(t))},{unsafe:!0})}();var dc,hc,pc,gc={};function vc(){if(hc)return dc;hc=1;var t=St(),e=me(),n=Math.floor,r=t("".charAt),o=t("".replace),i=t("".slice),a=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,s=/\$([$&'`]|\d{1,2})/g;return dc=function(t,u,l,c,f,d){var h=l+t.length,p=c.length,g=s;return void 0!==f&&(f=e(f),g=a),o(d,g,function(e,o){var a;switch(r(o,0)){case"$":return"$";case"&":return t;case"`":return i(u,0,l);case"'":return i(u,h);case"<":a=f[i(o,1,-1)];break;default:var s=+o;if(0===s)return e;if(s>p){var d=n(s/10);return 0===d?e:d<=p?void 0===c[d-1]?r(o,1):c[d-1]+r(o,1):e}a=c[s-1]}return void 0===a?"":a})},dc}function mc(t){Promise.resolve().then(t)}!function(){if(pc)return gc;pc=1;var t=Tl(),e=P(),n=St(),r=Ru(),o=R(),i=je(),a=Rt(),s=Lt(),u=Tn(),l=Rn(),c=Oi(),f=Tt(),d=Pu(),h=Bt(),p=vc(),g=fc(),v=Du(),m=we()("replace"),y=Math.max,b=Math.min,w=n([].concat),x=n([].push),E=n("".indexOf),S=n("".slice),O=function(t){return void 0===t?t:String(t)},C="$0"==="a".replace(/./,"$0"),k=!!/./[m]&&""===/./[m]("a","$0");r("replace",function(n,r,o){var C=k?"$":"$0";return[function(t,n){var o=f(this),i=s(t)?h(t,m):void 0;return i?e(i,t,o,n):e(r,c(o),t,n)},function(e,n){var s=i(this),f=c(e);if("string"==typeof n&&-1===E(n,C)&&-1===E(n,"$<")){var h=o(r,s,f,n);if(h.done)return h.value}var m=a(n);m||(n=c(n));var k,T=c(g(s)),N=-1!==E(T,"g");N&&(k=-1!==E(T,"u"),s.lastIndex=0);for(var R,L=[];null!==(R=v(s,f))&&(x(L,R),N);){""===c(R[0])&&(s.lastIndex=d(f,l(s.lastIndex),k))}for(var M="",P=0,D=0;D<L.length;D++){for(var A,j=c((R=L[D])[0]),I=y(b(u(R.index),f.length),0),$=[],F=1;F<R.length;F++)x($,O(R[F]));var _=R.groups;if(m){var B=w([j],$,I,f);void 0!==_&&x(B,_),A=c(t(n,void 0,B))}else A=p(j,f,I,$,_,n);I>=P&&(M+=S(f,P,I)+A,P=I+j.length)}return M+S(f,P)}]},!!o(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})||!C||k)}();var yc,bc=function(t){return Object.prototype.toString.call(t)},wc=globalThis.Node,xc=globalThis.Comment,Ec=globalThis.Element,Sc=globalThis.Text,Oc=globalThis.Range,Cc=globalThis.Selection,kc=globalThis.StaticRange;o.css&&(o.fn.css=o.css),o.append&&(o.fn.append=o.append),o.addClass&&(o.fn.addClass=o.addClass),o.removeClass&&(o.fn.removeClass=o.removeClass),o.hasClass&&(o.fn.hasClass=o.hasClass),o.on&&(o.fn.on=o.on),o.focus&&(o.fn.focus=o.focus),o.attr&&(o.fn.attr=o.attr),o.removeAttr&&(o.fn.removeAttr=o.removeAttr),o.hide&&(o.fn.hide=o.hide),o.show&&(o.fn.show=o.show),o.offset&&(o.fn.offset=o.offset),o.width&&(o.fn.width=o.width),o.height&&(o.fn.height=o.height),o.parent&&(o.fn.parent=o.parent),o.parents&&(o.fn.parents=o.parents),o.is&&(o.fn.is=o.is),o.dataset&&(o.fn.dataset=o.dataset),o.val&&(o.fn.val=o.val),o.text&&(o.fn.text=o.text),o.html&&(o.fn.html=o.html),o.children&&(o.fn.children=o.children),o.remove&&(o.fn.remove=o.remove),o.find&&(o.fn.find=o.find),o.each&&(o.fn.each=o.each),o.empty&&(o.fn.empty=o.empty),t.NodeType=void 0,(yc=t.NodeType||(t.NodeType={}))[yc.ELEMENT_NODE=1]="ELEMENT_NODE",yc[yc.TEXT_NODE=3]="TEXT_NODE",yc[yc.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",yc[yc.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",yc[yc.COMMENT_NODE=8]="COMMENT_NODE",yc[yc.DOCUMENT_NODE=9]="DOCUMENT_NODE",yc[yc.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",yc[yc.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE";var Tc=function(t){return"[object HTMLDocument]"===bc(t)},Nc=function(t){return"[object ShadowRoot]"===bc(t)},Rc=function(t){return"[object DataTransfer]"===bc(t)},Lc=/\[object HTML([A-Z][a-z]*)*Element\]/,Mc=function(t){return"matches"in t&&/^[ou]l$/i.test(t.tagName)&&!t.hasAttribute("data-w-e-type")},Pc=function(t){return Lc.test(bc(t))},Dc=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||null},Ac=function(t){return null!=t&&"number"==typeof t.nodeType},jc=function(e){return Ac(e)&&e.nodeType===t.NodeType.COMMENT_NODE},Ic=function(e){return Ac(e)&&e.nodeType===t.NodeType.ELEMENT_NODE},$c=function(t){return"[object Selection]"===bc(t)},Fc=function(e){return Ac(e)&&e.nodeType===t.NodeType.TEXT_NODE},_c=function(t){return t.clipboardData&&""!==t.clipboardData.getData("text/plain")&&1===t.clipboardData.types.length},Bc=function(t){var e,n=ho(t,2),r=n[0],o=n[1];if(Ic(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(e=ho(Uc(r,a,i?"backward":"forward"),2))[0],i=(a=e[1])<o;Ic(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=Vc(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]},Wc=function(){return!(!window.document.activeElement||!window.document.activeElement.shadowRoot)},Hc=function(t){var e,n,r;return null!==(e=window&&window.document.getElementById(t))&&void 0!==e?e:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(t))||null},Uc=function(t,e,n){for(var r=t.childNodes,o=r[e],i=e,a=!1,s=!1;(jc(o)||Ic(o)&&0===o.childNodes.length||Ic(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=e-1,n="backward"):i<0?(s=!0,i=e+1,n="forward"):(o=r[i],e=i,i+="forward"===n?1:-1);return[o,e]},Vc=function(t,e,n){return ho(Uc(t,e,n),1)[0]},zc=function(t){var e,n,r="";if(Fc(t)&&t.nodeValue)return t.nodeValue;if(Ic(t)){try{for(var o=fo(Array.from(t.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=zc(a)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}var s=getComputedStyle(t).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==t.tagName||(r+="\n")}return r};function Kc(e){var n=[];n.push(e);for(var r=0;n.length>0;){var o=n.pop();if(null==o)break;if((r+=1)>1e4)break;var i=o.nodeName;if(o.nodeType===t.NodeType.ELEMENT_NODE){var a=i.toLowerCase();if(Vu.includes(a)||"iframe"===a||"video"===a)return o;var s=o.children||[],u=s.length;if(u)for(var l=u-1;l>=0;l-=1)n.push(s[l])}}return null}function qc(e,n){if(!Pc(e)||"true"!==e.dataset.slateVoid)for(var r=e.childNodes,o=r.length;o-=1;){var i=r[o],a=i.nodeType;Fc(i)?n(i,e):[t.NodeType.ELEMENT_NODE,t.NodeType.DOCUMENT_NODE,t.NodeType.DOCUMENT_FRAGMENT_NODE].includes(a)&&qc(i,n)}}function Jc(e){if(0===e.length)return"";var n=e[0];return n.nodeType!==t.NodeType.ELEMENT_NODE?"":n.tagName.toLowerCase()}var Gc,Yc,Xc,Qc={};function Zc(){if(Yc)return Gc;Yc=1;var t=Ie().f;return Gc=function(e,n,r){r in e||t(e,r,{configurable:!0,get:function(){return n[r]},set:function(t){n[r]=t}})}}!function(){if(Xc)return Qc;Xc=1;var t=L(),e=b(),n=St(),r=hr(),o=Ea(),i=$e(),a=ai(),s=An().f,u=Pt(),l=Os(),c=Oi(),f=fc(),d=du(),h=Zc(),p=un(),g=R(),v=ye(),m=an().enforce,y=Xs(),w=we(),x=hu(),E=pu(),S=w("match"),O=e.RegExp,C=O.prototype,k=e.SyntaxError,T=n(C.exec),N=n("".charAt),M=n("".replace),P=n("".indexOf),D=n("".slice),A=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,j=/a/g,I=/a/g,$=new O(j)!==j,F=d.MISSED_STICKY,_=d.UNSUPPORTED_Y,B=t&&(!$||F||x||E||g(function(){return I[S]=!1,O(j)!==j||O(I)===I||"/a/i"!==String(O(j,"i"))}));if(r("RegExp",B)){for(var W=function(t,e){var n,r,s,d,h,p,g=u(C,this),y=l(t),b=void 0===e,w=[],S=t;if(!g&&y&&b&&t.constructor===W)return t;if((y||u(C,t))&&(t=t.source,b&&(e=f(S))),t=void 0===t?"":c(t),e=void 0===e?"":c(e),S=t,x&&"dotAll"in j&&(r=!!e&&P(e,"s")>-1)&&(e=M(e,/s/g,"")),n=e,F&&"sticky"in j&&(s=!!e&&P(e,"y")>-1)&&_&&(e=M(e,/y/g,"")),E&&(d=function(t){for(var e,n=t.length,r=0,o="",i=[],s=a(null),u=!1,l=!1,c=0,f="";r<=n;r++){if("\\"===(e=N(t,r)))e+=N(t,++r);else if("]"===e)u=!1;else if(!u)switch(!0){case"["===e:u=!0;break;case"("===e:if(o+=e,"?:"===D(t,r+1,r+3))continue;T(A,D(t,r+1))&&(r+=2,l=!0),c++;continue;case">"===e&&l:if(""===f||v(s,f))throw new k("Invalid capture group name");s[f]=!0,i[i.length]=[f,c],l=!1,f="";continue}l?f+=e:o+=e}return[o,i]}(t),t=d[0],w=d[1]),h=o(O(t,e),g?this:C,W),(r||s||w.length)&&(p=m(h),r&&(p.dotAll=!0,p.raw=W(function(t){for(var e,n=t.length,r=0,o="",i=!1;r<=n;r++)"\\"!==(e=N(t,r))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\s\\S]":o+=e+N(t,++r);return o}(t),n)),s&&(p.sticky=!0),w.length&&(p.groups=w)),t!==S)try{i(h,"source",""===S?"(?:)":S)}catch(t){}return h},H=s(O),U=0;H.length>U;)h(W,O,H[U++]);C.constructor=W,W.prototype=C,p(e,"RegExp",W,{constructor:!0})}y("RegExp")}();var tf=new RegExp(String.fromCharCode(160),"g");function ef(t){return t.replace(tf," ")}var nf=["span","b","strong","i","em","s","strike","u","font","sub","sup"],rf=[];var of=[];var af={};function sf(t,n){var r=t.length;if(r){var o=t[r-1];if(e.Text.isText(o)){var i=Object.keys(o);if(1===i.length&&"text"===i[0])return o.text+=n,!0}}return!1}function uf(t,e,n){return{type:"paragraph",children:[{text:o(t).text().replace(/\s+/gm," ")}]}}function lf(t,n){var r=function(t,e){var n=[];if(null!=t.attr("data-w-e-is-void"))return n;var r=t[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach(function(t){if(Ic(t)){if("BR"===t.nodeName)return void(sf(n,"\n")||n.push({text:"\n"}));var r=ff(o(t),e);Array.isArray(r)?r.forEach(function(t){return n.push(t)}):n.push(r)}else if(Fc(t)){var i=t.textContent||"";if(""===i.trim()&&i.indexOf("\n")>=0)return;i&&(i=ef(i),sf(n,i)||n.push({text:i}))}}),n)}(t,n),i=function(t){for(var e in af)if(t[0].matches(e))return af[e];return uf}(t),a=i(t[0],r,n);return Array.isArray(a)||(a=[a]),a.forEach(function(o){e.Editor.isVoid(n,o)||(0===r.length&&(o.children=[{text:t.text().replace(/\s+/gm," ")}]),of.forEach(function(e){o=e(t[0],o,n)}))}),a}function cf(t,e){0===t.parents("pre").length&&(t[0].innerHTML=t[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,"\n"));var n=t[0].textContent||"";n=function(t){return t.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}(n);var r={text:n=ef(n)};return of.forEach(function(n){r=n(t[0],r,e)}),r}function ff(t,e){rf.forEach(function(e){var n=e.selector,r=e.preParseHtml;t[0].matches(n)&&(t=o(r(t[0])))});var n=Jc(t);if("span"===n){if(t.attr("data-w-e-type"))return lf(t,e);var r=t.find("img, a").length>0;if(t[0].childNodes.length>1||r){var i=t[0].childNodes,a=function(t,e){var n={text:""};return of.forEach(function(r){n=r(t[0],n,e)}),n}(o(t[0]),e);return Array.from(i).flatMap(function(t){var n=function(t,e,n){var r=t[0];if(Ic(r)){var o=ff(t,n);return delete e.text,Array.isArray(o)?o.map(function(t){return co(co({},e),t)}):[co(co({},e),o)]}if(jc(r))return null;var i=Fc(r)?{text:r.textContent||""}:cf(t,n);return[co(co({},e),i)]}(o(t),a,e);return n||[]})}return cf(t,e)}if("code"===n)return"pre"===Jc(t.parent())?lf(t,e):cf(t,e);if(nf.includes(n)){if(t[0].childNodes.length>0&&t[0].childNodes[0].nodeType!==Node.TEXT_NODE){i=t[0].childNodes;return co(co({},ff(o(i[0]),e)),cf(t,e))}return cf(t,e)}return lf(t,e)}function df(t,e,n){var r=o(n);return!!r.attr(e)||(r.attr(e,"true"),t.on(mo,function(){r.removeAttr(e)}),!1)}function hf(t,e){void 0===e&&(e="");var n=[];""===e&&(e="<p><br></p>"),0!==e.indexOf("<")&&(e=e.split(/\n/).map(function(t){return"<p>".concat(t,"</p>")}).join(""));var r=o("<div>".concat(e,"</div>"));return Array.from(r.children()).forEach(function(e){var r=ff(o(e),t);Array.isArray(r)?r.forEach(function(t){return n.push(t)}):n.push(r)}),n}function pf(t,e){return"w-e-element-".concat(t,"-").concat(e)}var gf=[];var vf={};function mf(t,e,n){var r=n.isInline(t)?"span":"div";return"<".concat(r,">").concat(e,"</").concat(r,">")}function yf(t,n){var r=t.type,o=void 0===r?"":r,i=t.children,a=void 0===i?[]:i,s=e.Editor.isVoid(n,t),u="";s||(u=a.map(function(t){return If(t,n)}).join(""));var l=function(t){return vf[t]||mf}(o),c=l(t,u,n),f="";if(f="string"==typeof c?c:c.html||"",s||gf.forEach(function(e){return f=e(t,f)}),"string"==typeof c)return f;var d=c.prefix,h=void 0===d?"":d,p=c.suffix,g=void 0===p?"":p;return h&&(f=h+f),g&&(f+=g),f}var bf,wf,xf,Ef={};function Sf(){if(wf)return bf;wf=1;var t=ye();return bf=function(e){return void 0!==e&&(t(e,"value")||t(e,"writable"))}}!function(){if(xf)return Ef;xf=1;var t=pr(),e=P(),n=Lt(),r=je(),o=Sf(),i=Ce(),a=li();t({target:"Reflect",stat:!0},{get:function t(s,u){var l,c,f=arguments.length<3?s:arguments[2];return r(s)===f?s[u]:(l=i.f(s,u))?o(l)?l.value:void 0===l.get?void 0:e(l.get,f):n(c=a(s))?t(c,u,f):void 0}})}();var Of,Cf={};!function(){if(Of)return Cf;Of=1;var t,e=pr(),n=Xr(),r=Ce().f,o=Rn(),i=Oi(),a=Cs(),s=Tt(),u=ks(),l=he(),c=n("".slice),f=Math.min,d=u("endsWith");e({target:"String",proto:!0,forced:!!(l||d||(t=r(String.prototype,"endsWith"),!t||t.writable))&&!d},{endsWith:function(t){var e=i(s(this));a(t);var n=arguments.length>1?arguments[1]:void 0,r=e.length,u=void 0===n?r:f(o(n),r),l=i(t);return c(e,u-l.length,u)===l}})}();var kf=0,Tf=function(){this.id="".concat(kf++)},Nf="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Rf="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Lf="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Mf="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Pf="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),Df="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),Af=!Pf&&!Mf&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,jf={getWindow:function(t){var e=Ya.get(t);if(!e)throw new Error("Unable to find a host window element for this editor");return e},findKey:function(t,e){var n=Ga.get(e);return n||(n=new Tf,Ga.set(e,n)),n},setNewKey:function(t){var e=new Tf;Ga.set(t,e)},findPath:function(t,n){for(var r=[],o=n;;){var i=Va.get(o);if(null==i){if(e.Editor.isEditor(o))return r;break}var a=Ua.get(o);if(null==a)break;r.unshift(a),o=i}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(n)))},findDocumentOrShadowRoot:function(t){if(t.isDestroyed)return window.document;var e=jf.toDOMNode(t,t),n=e.getRootNode();return(Tc(n)||Nc(n))&&null!=Reflect.get(n,"getSelection")?n:e.ownerDocument},getParentNode:function(t,e){return Va.get(e)||null},getParentsNodes:function(t,e){for(var n=[],r=e;r!==t&&null!=r;){var o=jf.getParentNode(t,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(t,n){var r=[jf.findPath(t,n)[0]];return e.Node.get(t,r)},toDOMNode:function(t,n){var r;if(e.Editor.isEditor(n))r=za.get(t);else{var o=jf.findKey(t,n);r=qa.get(o)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(n)));return r},hasDOMNode:function(t,e,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=jf.toDOMNode(t,t);try{r=Ic(e)?e:e.parentElement}catch(t){if(t instanceof Error&&!t.message.includes('Permission denied to access property "nodeType"'))throw t}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(t,n){var r=n.anchor,o=n.focus,i=e.Range.isBackward(n),a=jf.toDOMPoint(t,r),s=e.Range.isCollapsed(n)?a:jf.toDOMPoint(t,o),u=jf.getWindow(t).document.createRange(),l=ho(i?s:a,2),c=l[0],f=l[1],d=ho(i?a:s,2),h=d[0],p=d[1],g=!!(Ic(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(Ic(h)?h:h.parentElement).getAttribute("data-slate-zero-width");return u.setStart(c,g?1:f),u.setEnd(h,v?1:p),u},toDOMPoint:function(t,n){var r,o,i,a=ho(e.Editor.node(t,n.path),1)[0],s=jf.toDOMNode(t,a);e.Editor.void(t,{at:n})&&(n={path:n.path,offset:0});var u=Array.from(s.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),l=0;try{for(var c=fo(u),f=c.next();!f.done;f=c.next()){var d=f.value,h=d.childNodes[0];if(null!=h&&null!=h.textContent){var p=h.textContent.length,g=d.getAttribute("data-slate-length"),v=l+(null==g?p:parseInt(g,10));if(n.offset<=v){i=[h,Math.min(p,Math.max(0,n.offset-l))];break}l=v}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(n)));return i},toSlateNode:function(t,e){var n=Ic(e)?e:e.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Ka.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(t,n){"nativeEvent"in n&&(n=n.nativeEvent);var r=n.clientX,o=n.clientY,i=n.target;if(null==r||null==o)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));var a,s=jf.toSlateNode(t,n.target),u=jf.findPath(t,s);if(e.Editor.isVoid(t,s)){var l=i.getBoundingClientRect(),c=t.isInline(s)?r-l.left<l.left+l.width-r:o-l.top<l.top+l.height-o,f=e.Editor.point(t,u,{edge:c?"start":"end"}),d=c?e.Editor.before(t,f):e.Editor.after(t,f);if(d)return e.Editor.range(t,d)}var h=this.getWindow(t).document;if(h.caretRangeFromPoint)a=h.caretRangeFromPoint(r,o);else{var p=h.caretPositionFromPoint(r,o);p&&((a=h.createRange()).setStart(p.offsetNode,p.offset),a.setEnd(p.offsetNode,p.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(n));return jf.toSlateRange(t,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(t,n,r){var o,i,a,s,u,l=r.exactMatch,c=r.suppressThrow;if(($c(n)?n.anchorNode:n.startContainer)&&($c(n)?(o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,s=n.focusOffset,u=Df&&Wc()?n.anchorNode===n.focusNode&&n.anchorOffset===n.focusOffset:n.isCollapsed):(o=n.startContainer,i=n.startOffset,a=n.endContainer,s=n.endOffset,u=n.collapsed)),null==o||null==a||null==i||null==s)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(n));var f=jf.toSlatePoint(t,[o,i],{exactMatch:l,suppressThrow:c});if(!f)return null;var d=u?f:jf.toSlatePoint(t,[a,s],{exactMatch:l,suppressThrow:c});if(!d)return null;var h={anchor:f,focus:d};return e.Range.isExpanded(h)&&e.Range.isForward(h)&&Ic(a)&&e.Editor.void(t,{at:h.focus,mode:"highest"})&&(h=e.Editor.unhangRange(t,h,{voids:!0})),h},toSlatePoint:function(t,e,n){var r,o=n.exactMatch,i=n.suppressThrow,s=ho(o?e:Bc(e),2),u=s[0],l=s[1],c=u.parentNode,f=null,d=0;if(c){var h=c.closest('[data-slate-void="true"]'),p=c.closest("[data-slate-leaf]"),g=null,v=jf.getWindow(t);if(p&&v.document.createRange){f=p.closest('[data-slate-node="text"]');var m=v.document.createRange();m.setStart(f,0),m.setEnd(u,l);var y=m.cloneContents();po(po([],ho(a(y.querySelectorAll("[data-slate-zero-width]"))),!1),ho(a(y.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(t){t.parentNode.removeChild(t)}),d=y.textContent.length,g=f}else h&&((p=h.querySelector("[data-slate-leaf]"))?(f=p.closest('[data-slate-node="text"]'),d=(g=p).textContent.length,g.querySelectorAll("[data-slate-zero-width]").forEach(function(t){d-=t.textContent.length})):d=1);g&&d===g.textContent.length&&(c.hasAttribute("data-slate-zero-width")||Rf&&(null===(r=g.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(d-=1)}if(!f){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(e))}var b=jf.toSlateNode(t,f);return{path:jf.findPath(t,b),offset:d}},hasRange:function(t,n){var r=n.anchor,o=n.focus;return e.Editor.hasPath(t,r.path)&&e.Editor.hasPath(t,o.path)},getNodeType:function(t){return e.Element.isElement(t)?t.type:""},checkNodeType:function(t,e){return this.getNodeType(t)===e},getNodesStr:function(t){return t.map(function(t){return e.Node.string(t)}).join("")},getSelectedElems:function(t){var n,r,o=[],i=e.Editor.nodes(t,{universal:!0});try{for(var a=fo(i),s=a.next();!s.done;s=a.next()){var u=ho(s.value,1)[0];e.Element.isElement(u)&&o.push(u)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(t,n){var r=this,o=ho(e.Editor.nodes(t,{match:function(t){return r.checkNodeType(t,n)},universal:!0}),1),i=o[0];return null==i?null:i[0]},getSelectedTextNode:function(t){var n=ho(e.Editor.nodes(t,{match:function(t){return e.Text.isText(t)},universal:!0}),1),r=n[0];return null==r?null:r[0]},isNodeSelected:function(t,n){var r=ho(e.Editor.nodes(t,{match:function(t){return t===n},universal:!0}),1),o=r[0];return null!=o&&ho(o,1)[0]===n},isSelectionAtLineEnd:function(t,n){var r=t.selection;return!!r&&(e.Editor.isEnd(t,r.anchor,n)||e.Editor.isEnd(t,r.focus,n))},getTextarea:function(t){var e=Na.get(t);if(null==e)throw new Error("Cannot find textarea instance by editor");return e},getToolbar:function(t){return Ma.get(t)||null},getHoverbar:function(t){return Da.get(t)||null},normalizeContent:function(t){t.children.forEach(function(e,n){t.normalizeNode([e,[n]])})},getLeftLengthOfMaxLength:function(t){var e=t.getConfig(),n=e.maxLength,r=e.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-t.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&r&&r(t),o},cleanExposedTexNodeInSelectionBlock:function(t){var n,r,i,a,s=jf.getTextarea(t).$textArea,u=null==s?void 0:s[0].childNodes;if(u)try{for(var l=fo(Array.from(u)),c=l.next();!c.done;c=l.next()){var f=c.value;if(!Fc(f))break;f.remove()}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}var d=e.Editor.nodes(t,{match:function(n){return!(!e.Element.isElement(n)||t.isInline(n))},universal:!0});try{for(var h=fo(d),p=h.next();!p.done;p=h.next()){var g=p.value;if(null!=g){var v=g[0];qc(jf.toDOMNode(t,v),function(t,e){var n=o(e);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||e.removeChild(t)})}}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}},isLastNode:function(t,e){var n=t.children||[];return n[n.length-1]===e},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(t){var n,r,o=e.Editor.nodes(t,{match:function(e){return t.isVoid(e)}}),i=0;try{for(var a=fo(o),s=a.next();!s.done;s=a.next()){s.value&&(i+=1)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i>0},isSelectedEmptyParagraph:function(t){var n=t.selection;if(null==n)return!1;if(e.Range.isExpanded(n))return!1;var r=jf.getSelectedNodeByType(t,"paragraph");if(null===r)return!1;var o=r.children;return 1===o.length&&(""===o[0].text||void 0)},isEmptyPath:function(t,n){var r=e.Editor.node(t,n);if(null==r)return!1;var o=ho(r,1)[0].children;if(1===o.length&&""===o[0].text)return!0;return!1}};function If(t,n){return e.Element.isElement(t)?yf(t,n):function(t,e){var n=t.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var r=n;r=function(t){return t.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=jf.getParentsNodes(e,t).some(function(t){return"pre"===jf.getNodeType(t)});if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=jf.getParentNode(null,t);if(!i||0!==i.children.length)return r;r="<br>"}return gf.forEach(function(e){return r=e(t,r)}),r}(t,n)}var $f=function(t,e){var n=(e.top+e.bottom)/2;return t.top<=n&&t.bottom>=n},Ff=function(t,e,n){var r=jf.toDOMRange(t,e).getBoundingClientRect(),o=jf.toDOMRange(t,n).getBoundingClientRect();return $f(r,o)&&$f(o,r)},_f=function(t,n){var r,o,i=[];try{for(var a=fo(e.Editor.levels(t,{at:n})),s=a.next();!s.done;s=a.next()){var u=ho(s.value,2),l=u[0],c=u[1],f=jf.findKey(t,l);i.push([c,f])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i};function Bf(t,n){t.isInline(n)?(t.insertNode(n),"link"===n.type&&t.insertFragment([{text:""}])):e.Transforms.insertNodes(t,n,{mode:"highest"})}var Wf,Hf,Uf,Vf,zf,Kf,qf,Jf,Gf,Yf,Xf,Qf,Zf,td,ed,nd,rd,od,id,ad,sd,ud,ld,cd,fd,dd,hd,pd,gd,vd,md,yd,bd,wd,xd,Ed,Sd,Od,Cd,kd,Td=function(t){var n=t,r=n.onChange,i=n.insertText,a=n.apply,s=n.deleteBackward;return n.insertText=function(t){n.getConfig().readOnly||i(t)},n.apply=function(t){var r,o,i,s,u,l,c,f,d=[];switch(t.type){case"insert_text":case"remove_text":case"set_node":case"split_node":d.push.apply(d,po([],ho(_f(n,t.path)),!1));break;case"insert_node":case"remove_node":d.push.apply(d,po([],ho(_f(n,e.Path.parent(t.path))),!1));break;case"merge_node":var h=e.Path.previous(t.path);d.push.apply(d,po([],ho(_f(n,h)),!1));break;case"move_node":var p=e.Path.common(e.Path.parent(t.path),e.Path.parent(t.newPath));d.push.apply(d,po([],ho(_f(n,p)),!1));break;case"set_selection":(null===(s=null===(i=t.newProperties)||void 0===i?void 0:i.focus)||void 0===s?void 0:s.path)&&(d.push.apply(d,po([],ho(_f(n,null===(l=null===(u=t.newProperties)||void 0===u?void 0:u.focus)||void 0===l?void 0:l.path)),!1)),d.push.apply(d,po([],ho(_f(n,null===(f=null===(c=t.properties)||void 0===c?void 0:c.focus)||void 0===f?void 0:f.path)),!1)))}a(t);try{for(var g=fo(d),v=g.next();!v.done;v=g.next()){var m=ho(v.value,2),y=m[0],b=m[1],w=ho(e.Editor.node(n,y),1)[0];Ga.set(w,b),"type"in w&&(Wa.has(w)&&Wa.delete(w),Ha.has(w)&&Ha.delete(w))}}catch(t){r={error:t}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}},n.deleteBackward=function(r){if("line"!==r)return s(r);if(t.selection&&e.Range.isCollapsed(t.selection)){var o=e.Editor.above(t,{match:function(n){return e.Editor.isBlock(t,n)},at:t.selection});if(o){var i=ho(o,2)[1],a=e.Editor.range(t,i,t.selection.anchor),u=function(t,n){var r=e.Editor.range(t,e.Range.end(n)),o=Array.from(e.Editor.positions(t,{at:n})),i=0,a=o.length,s=Math.floor(a/2);if(Ff(t,e.Editor.range(t,o[i]),r))return e.Editor.range(t,o[i],r);if(o.length<2)return e.Editor.range(t,o[o.length-1],r);for(;s!==o.length&&s!==i;)Ff(t,e.Editor.range(t,o[s]),r)?a=s:i=s,s=Math.floor((i+a)/2);return e.Editor.range(t,o[a],r)}(n,a);e.Range.isCollapsed(u)||e.Transforms.delete(t,{at:u})}}},n.onChange=function(){var t=n.selection;null!=t&&Qa.set(n,t),n.emit(yo),r()},n.handleTab=function(){n.insertText(" ")},n.getHtml=function(){var t=n.children,e=void 0===t?[]:t,r=n.getConfig().skipCacheTypes,o=void 0===r?["list-item"]:r;return e.map(function(t){var e=jf.getNodeType(t);if(o.includes(e))return If(t,n);var r=Ha.get(t);if(r)return r;var i=If(t,n);return Ha.set(t,i),i}).join("")},n.getText=function(){var t=n.children;return(void 0===t?[]:t).map(function(t){return e.Node.string(t)}).join("\n")},n.getSelectionText=function(){var r=n.selection;return null==r?"":e.Editor.string(t,r)},n.getElemsByType=function(t,r){var o,i;void 0===r&&(r=!1);var a=[],s=e.Editor.nodes(n,{at:[],universal:!0});try{for(var u=fo(s),l=u.next();!l.done;l=u.next()){var c=ho(l.value,1)[0];if(e.Element.isElement(c))if(r?c.type.indexOf(t)>=0:c.type===t){var f=jf.findKey(n,c),d=pf(c.type,f.id);a.push(co(co({},c),{id:d}))}}}catch(t){o={error:t}}finally{try{l&&!l.done&&(i=u.return)&&i.call(u)}finally{if(o)throw o.error}}return a},n.getElemsByTypePrefix=function(t){return n.getElemsByType(t,!0)},n.isEmpty=function(){var t=n.children,r=void 0===t?[]:t;if(r.length>1)return!1;var o=r[0];if(null==o)return!0;if(!e.Element.isElement(o)||"paragraph"!==o.type)return!1;var i=o.children,a=void 0===i?[]:i;if(a.length>1)return!1;var s=a[0];return null==s||e.Text.isText(s)&&""===s.text},n.clear=function(){e.Transforms.delete(n,{at:{anchor:e.Editor.start(n,[]),focus:e.Editor.end(n,[])}}),0===n.children.length&&e.Transforms.insertNodes(n,[{type:"paragraph",children:[{text:""}]}])},n.getParentNode=function(t){return jf.getParentNode(n,t)},n.dangerouslyInsertHtml=function(t,r){if(void 0===t&&(t=""),void 0===r&&(r=!1),t){var i=document.createElement("div");i.innerHTML=t;var a=Array.from(i.childNodes);if(a=a.filter(function(t){var e=t.nodeName;return!!Fc(t)||!!Ic(t)&&!lu.has(e.toLowerCase())}),0!==a.length){var s=n.selection;if(null!=s){var u=null;if(jf.isSelectedEmptyParagraph(n)&&!r)u=[s.focus.path[0]];i.setAttribute("hidden","true"),document.body.appendChild(i);var l=0;a.forEach(function(t,e){var r=t.nodeName,i=t.textContent,s=void 0===i?"":i;if(Fc(t)){if(!s||!s.trim())return;n.insertNode({text:s})}else if("BR"!==r){var u=t,c=!1;if(nf.includes(r.toLowerCase()))c=!0;else for(var f in af)if(u.matches(f)){c=!0;break}if(c){var d=ff(o(u),n);return Array.isArray(d)?(d.forEach(function(t){return Bf(n,t)}),l+=1):(Bf(n,d),l+=1),void(jf.isSelectedVoidNode(n)&&n.move(1))}var h=window.getComputedStyle(u).display;if(!jf.isSelectedEmptyParagraph(n)&&h.indexOf("inline")<0){if(e>=1){var p=a[e-1];Mc(p)&&n.insertBreak()}n.insertBreak()}n.dangerouslyInsertHtml(u.innerHTML,!0)}else n.insertText("\n")}),l&&u&&jf.isEmptyPath(n,u)&&e.Transforms.removeNodes(n,{at:u}),i.remove()}}}},n.setHtml=function(t){void 0===t&&(t="");var r=n.isDisabled(),o=n.isFocused(),i=JSON.stringify(n.selection);n.enable(),n.focus(),n.clear();var a=hf(n,null==t?"":t);if(e.Transforms.insertFragment(n,a),o||(n.deselect(),n.blur()),r&&(n.deselect(),n.disable()),n.isFocused())try{n.select(JSON.parse(i))}catch(t){n.select(e.Editor.start(n,[]))}},n},Nd=1,Rd=function(t){var n=t;return n.id="wangEditor-".concat(Nd),Nd+=1,n.isDestroyed=!1,n.isFullScreen=!1,n.focus=function(t){if(jf.toDOMNode(n,n).focus({preventScroll:!0}),Xa.set(n,!0),t){var r=e.Editor.end(n,[]);e.Transforms.select(n,r)}else{var o=Qa.get(n);o?e.Transforms.select(n,o):e.Transforms.select(n,e.Editor.start(n,[]))}},n.isFocused=function(){return!!Xa.get(n)},n.blur=function(){jf.toDOMNode(n,n).blur(),e.Transforms.deselect(n),Xa.set(n,!1)},n.updateView=function(){jf.getTextarea(n).changeViewState();var t=jf.getToolbar(n);t&&t.changeToolbarState();var e=jf.getHoverbar(n);e&&e.changeHoverbarState()},n.destroy=function(){if(!n.isDestroyed){var t=jf.getTextarea(n);t.destroy(),Na.delete(n),Ra.delete(t);var e=jf.getToolbar(n);e&&(e.destroy(),Ma.delete(n),La.delete(e));var r=jf.getHoverbar(n);r&&(r.destroy(),Da.delete(n),Pa.delete(r)),n.isDestroyed=!0,n.emit(mo)}},n.scrollToElem=function(t){if(!n.getConfig().scroll){var e="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return e+="\nYou has disabled editor scroll, please do this yourself",void console.warn(e)}var r=o("#".concat(t));if(0!==r.length){var i=r[0];if(!jf.hasDOMNode(n,i)){e="Element (found by id is '".concat(t,"') is not in editor DOM");return e+="\n 通过 id '".concat(t,"' 找到的 element 不在 editor DOM 之内"),void console.error(e,i)}var a=jf.getTextarea(n),s=a.$textAreaContainer,u=a.$scroll,l=r.offset().top,c=s.offset().top;u[0].scrollBy({top:l-c,behavior:"smooth"})}},n.showProgressBar=function(t){t<1||jf.getTextarea(n).changeProgress(t)},n.hidePanelOrModal=function(){var t=ja.get(n);null!=t&&t.forEach(function(t){return t.hide()})},n.enable=function(){n.getConfig().readOnly=!1,n.updateView()},n.disable=function(){n.getConfig().readOnly=!0,n.updateView()},n.isDisabled=function(){return n.getConfig().readOnly},n.toDOMNode=function(t){return jf.toDOMNode(n,t)},n.fullScreen=function(){if(!n.isFullScreen){var t=null,e=jf.getToolbar(n);e&&(t=e.$box);var r=jf.getTextarea(n).$box.parent();if(t&&t.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),n.isFullScreen=!0,n.emit(wo)}},n.unFullScreen=function(){if(n.isFullScreen){var t=jf.getTextarea(n).$box.parent();setTimeout(function(){t.removeClass("w-e-full-screen-container"),n.isFullScreen=!1,n.emit(xo)},200)}},n.getEditableContainer=function(){return jf.getTextarea(n).$textAreaContainer[0]},n},Ld={exports:{}},Md={exports:{}};function Pd(){if(Hf)return Wf;Hf=1;return Wf=function(t){return null!=t}}function Dd(){if(Kf)return zf;Kf=1;var t=function(){if(Vf)return Uf;Vf=1;var t=Pd(),e={object:!0,function:!0,undefined:!0};return Uf=function(n){return!!t(n)&&hasOwnProperty.call(e,typeof n)}}();return zf=function(e){if(!t(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(t){return!1}}}function Ad(){if(Yf)return Gf;Yf=1;var t=function(){if(Jf)return qf;Jf=1;var t=Dd();return qf=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(t){return!1}return!t(e)}}(),e=/^\s*class[\s{/}]/,n=Function.prototype.toString;return Gf=function(r){return!!t(r)&&!e.test(n.call(r))}}function jd(){if(od)return rd;od=1;var t=(nd?ed:(nd=1,ed=function(){}))();return rd=function(e){return e!==t&&null!==e}}function Id(){return ud||(ud=1,sd=(td?Zf:(td=1,Zf=function(){try{return Object.keys("primitive"),!0}catch(t){return!1}}))()?Object.keys:function(){if(ad)return id;ad=1;var t=jd(),e=Object.keys;return id=function(n){return e(t(n)?Object(n):n)}}()),sd}function $d(){if(dd)return fd;dd=1;var t=Id(),e=function(){if(cd)return ld;cd=1;var t=jd();return ld=function(e){if(!t(e))throw new TypeError("Cannot use null or undefined");return e}}(),n=Math.max;return fd=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(e(r)),s=function(t){try{r[t]=o[t]}catch(t){i||(i=t)}},a=1;a<u;++a)t(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},fd}function Fd(){return pd?hd:(pd=1,hd=(Qf||(Qf=1,Xf=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}),Xf)()?Object.assign:$d())}function _d(){return Ed||(Ed=1,xd=function(){if(yd)return md;yd=1;var t="razdwatrzy";return md=function(){return"function"==typeof t.contains&&!0===t.contains("dwa")&&!1===t.contains("foo")}}()()?String.prototype.contains:function(){if(wd)return bd;wd=1;var t=String.prototype.indexOf;return bd=function(e){return t.call(this,e,arguments[1])>-1},bd}()),xd}function Bd(){if(Sd)return Md.exports;Sd=1;var t=Pd(),e=Ad(),n=Fd(),r=function(){if(vd)return gd;vd=1;var t=jd(),e=Array.prototype.forEach,n=Object.create;return gd=function(r){var o=n(null);return e.call(arguments,function(e){t(e)&&function(t,e){var n;for(n in t)e[n]=t[n]}(Object(e),o)}),o},gd}(),o=_d(),i=Md.exports=function(e,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof e?(l=i,i=e,e=null):l=arguments[2],t(e)?(a=o.call(e,"c"),s=o.call(e,"e"),u=o.call(e,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,f;return"string"!=typeof i?(c=s,s=a,a=i,i=null):c=arguments[3],t(a)?e(a)?t(s)?e(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,t(i)?(u=o.call(i,"c"),l=o.call(i,"e")):(u=!0,l=!1),f={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),f):f},Md.exports}var Wd=(kd||(kd=1,function(t,e){var n,r,o,i,a,s,u,l=Bd(),c=Cd?Od:(Cd=1,Od=function(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return t}),f=Function.prototype.apply,d=Function.prototype.call,h=Object.create,p=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};r=function(t,e){var r,i;return c(e),i=this,n.call(this,t,r=function(){o.call(i,t,r),f.call(e,this,arguments)}),r.__eeOnceListener__=e,this},i=function(t){var e,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[t]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),e=1;e<n;++e)i[e-1]=arguments[e];for(o=o.slice(),e=0;r=o[e];++e)f.call(r,this,i)}else switch(arguments.length){case 1:d.call(o,this);break;case 2:d.call(o,this,arguments[1]);break;case 3:d.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),e=1;e<n;++e)i[e-1]=arguments[e];f.call(o,this,i)}},a={on:n=function(t,e){var n;return c(e),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=h(null),p(this,"__ee__",m),m.value=null),n[t]?"object"==typeof n[t]?n[t].push(e):n[t]=[n[t],e]:n[t]=e,this},once:r,off:o=function(t,e){var n,r,o,i;if(c(e),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[t])return this;if("object"==typeof(r=n[t]))for(i=0;o=r[i];++i)o!==e&&o.__eeOnceListener__!==e||(2===r.length?n[t]=r[i?0:1]:r.splice(i,1));else r!==e&&r.__eeOnceListener__!==e||delete n[t];return this},emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),t.exports=e=function(t){return null==t?h(u):g(Object(t),s)},e.methods=a}(Ld,Ld.exports)),Ld.exports),Hd=g(Wd);function Ud(t){var e=Za.get(t);return null==e&&(e=Hd(),Za.set(t,e)),e}var Vd=new WeakMap;function zd(t,e){var n=Vd.get(t);null==n&&(n=new Set,Vd.set(t,n)),n.add(e)}var Kd,qd=function(t){var e=t;return e.on=function(t,n){var r=Ud(e);if(r.on(t,n),"destroyed"===t&&zd(e,n),"destroyed"!==t){var o=function(){return r.off(t,n)};r.on("destroyed",o),zd(e,o)}},e.once=function(t,n){Ud(e).once(t,n)},e.off=function(t,n){Ud(e).off(t,n)},e.emit=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=Ud(e);if(o.emit.apply(o,po([t],ho(n),!1)),"destroyed"===t){var i=function(t){return Vd.get(t)||new Set}(e);i.forEach(function(t){return o.off("destroyed",t)}),function(t){Vd.set(t,new Set)}(e)}},e},Jd=function(t){var n=t;return n.setFragmentData=function(t){var r=n.selection;if(r){var o=ho(e.Range.edges(r),2),i=o[0],a=o[1],s=e.Editor.void(n,{at:i.path}),u=e.Editor.void(n,{at:a.path});if(!e.Range.isCollapsed(r)||s){var l=jf.toDOMRange(n,r),c=l.cloneContents(),f=c.childNodes[0];if(c.childNodes.forEach(function(t){t.textContent&&""!==t.textContent.trim()&&(f=t)}),u){var d=ho(u,1)[0],h=l.cloneRange(),p=jf.toDOMNode(n,d);h.setEndAfter(p),c=h.cloneContents()}if(s&&(f=c.querySelector("[data-slate-spacer]")),Array.from(c.querySelectorAll("[data-slate-zero-width]")).forEach(function(t){var e="n"===t.getAttribute("data-slate-zero-width");t.textContent=e?"\n":""}),Fc(f)){var g=f.ownerDocument.createElement("span");g.style.whiteSpace="pre",g.appendChild(f),c.appendChild(g),f=g}var v=n.getFragment(),m=JSON.stringify(v),y=window.btoa(encodeURIComponent(m));f.setAttribute("data-slate-fragment",y),t.setData("application/x-slate-fragment",y);var b=c.ownerDocument.createElement("div");return b.appendChild(c),b.setAttribute("hidden","true"),c.ownerDocument.body.appendChild(b),t.setData("text/html",b.innerHTML),t.setData("text/plain",zc(b)),c.ownerDocument.body.removeChild(b),t}}},n.insertData=function(t){var r,o,i=t.getData("application/x-slate-fragment");if(i){var a=decodeURIComponent(window.atob(i)),s=JSON.parse(a);n.insertFragment(s)}else{var u=t.getData("text/plain"),l=t.getData("text/html");if(l)n.dangerouslyInsertHtml(l);else if(u){var c=u.split(/\n\r|\r\n|\r|\n/),f=!1;try{for(var d=fo(c),h=d.next();!h.done;h=d.next()){var p=h.value,g=jf.getLeftLengthOfMaxLength(n);f&&g>0&&e.Transforms.splitNodes(n,{always:!0}),n.insertText(p),f=!0}}catch(t){r={error:t}}finally{try{h&&!h.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}}}},n},Gd={};!function(){if(Kd)return Gd;Kd=1;var t=pr(),e=gr(),n=wr(),r=Lt(),o=Nn(),i=Ln(),a=Nt(),s=mr(),u=we(),l=Sr(),c=fa(),f=l("slice"),d=u("species"),h=Array,p=Math.max;t({target:"Array",proto:!0,forced:!f},{slice:function(t,u){var l,f,g,v=a(this),m=i(v),y=o(t,m),b=o(void 0===u?m:u,m);if(e(v)&&(l=v.constructor,(n(l)&&(l===h||e(l.prototype))||r(l)&&null===(l=l[d]))&&(l=void 0),l===h||void 0===l))return c(v,y,b);for(f=new(void 0===l?h:l)(p(b-y,0)),g=0;y<b;y++,g++)y in v&&s(f,g,v[y]);return f.length=g,f}})}();var Yd=function(t){var n=t,r=n.insertText,o=n.insertNode,i=n.insertFragment,a=n.dangerouslyInsertHtml;return n.insertText=function(t){if(n.getConfig().maxLength){var e=jf.getLeftLengthOfMaxLength(n);e<=0||(e<t.length?r(t.slice(0,e)):r(t))}else r(t)},n.insertNode=function(t){if(n.getConfig().maxLength){var r=jf.getLeftLengthOfMaxLength(n);if(!(r<=0))r<e.Node.string(t).length||o(t)}else o(t)},n.insertFragment=function(t){if(n.getConfig().maxLength){if(t.length>0){var r=t[0];if(jf.getLeftLengthOfMaxLength(n)<e.Node.string(r).length)return;i([r]);for(var o=1;o<t.length;o+=1)n.insertNode(t[o])}}else i(t)},n.dangerouslyInsertHtml=function(t,e){if(void 0===t&&(t=""),void 0===e&&(e=!1),t)if(n.getConfig().maxLength){var r=jf.getLeftLengthOfMaxLength(n);if(!(r<=0)){var o=document.createElement("div");o.innerHTML=t,r<Array.from(o.childNodes).reduce(function(t,e){var n=e.nodeName;return e?Fc(e)?t+(e.textContent||""):Ic(e)?lu.has(n.toLowerCase())?t:t+(e.textContent||""):t:t},"").length||a(t,e)}}else a(t,e)},n};function Xd(t){var e=jf.getTextarea(t).$textAreaContainer,n=e.width(),r=e.height(),o=e.offset();return{top:o.top,left:o.left,width:n,height:r}}function Qd(t){var e={top:"0",left:"0"},n=t.selection;if(null==n)return e;var r=Xd(t);if(null==r)return e;var o=r.top,i=r.left,a=r.width,s=r.height,u=jf.toDOMRange(t,n).getClientRects(),l=u?u[0]:null;if(null==l)return e;var c={},f=l.top-o,d=l.left-i;if(d>a/2){var h=a-d;c.right="".concat(h+5,"px")}else c.left="".concat(d+5,"px");if(f>s/2){var p=s-f;c.bottom="".concat(p+5,"px")}else{var g=u[u.length-1],v=g.top-o+g.height;v<0&&(v=0),c.top="".concat(v+5,"px")}return c}function Zd(t,n,r){void 0===r&&(r="modal");var o={top:"0",left:"0"};if(null==t.selection)return o;var i=e.Element.isElement(n)&&t.isVoid(n),a=e.Element.isElement(n)&&t.isInline(n),s=Ja.get(n);if(null==s)return o;var u=s.getBoundingClientRect(),l=u.top,c=u.left,f=u.height,d=u.width;if(i){var h=Kc(s);if(null!=h){var p=h.getBoundingClientRect();l=p.top,f=p.height}}var g=Xd(t);if(null==g)return o;var v=g.top,m=g.left,y=g.width,b=g.height,w={},x=l-v,E=c-m;if("bar"===r)return w.left="".concat(E,"px"),x>40?w.bottom="".concat(b-x+5,"px"):w.top="".concat(x+f+5,"px"),w;if("modal"===r){if(i?a?E>(y-d)/2?w.right="".concat(y-E+5,"px"):w.left="".concat(E+d+5,"px"):w.left="20px":w.left="".concat(E,"px"),i)(S=x)<0&&(S=0),w.top="".concat(S,"px");else if(x>(b-f)/2)w.bottom="".concat(b-x+5,"px");else{var S;(S=x+f)<0&&(S=0),w.top="".concat(S+5,"px")}return w}throw new Error("type '".concat(r,"' is invalid"))}function th(t,e){mc(function(){var n=Xd(t);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=e.offset(),l=u.top,c=u.left,f=e.width(),d=e.height(),h=l-o,p=c-i,g=e.attr("style");if(g.indexOf("top")>=0)if((r=h+d-s)>0){var v=e.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),e.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=e.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);e.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=p+f-a)>0){var w=e.css("left"),x=parseInt(w.toString(),10)-r;x<0&&(x=0),e.css("left","".concat(x,"px"))}if(g.indexOf("right")>=0&&c<0){var E=e.css("right"),S=parseInt(E.toString(),10)-Math.abs(c);e.css("right","".concat(S,"px"))}}})}var eh,nh=function(t){var n=t;return n.select=function(t){e.Transforms.select(n,t)},n.deselect=function(){var r=n.selection,o=jf.findDocumentOrShadowRoot(n).getSelection();o&&o.rangeCount>0&&o.removeAllRanges(),r&&e.Transforms.deselect(t)},n.move=function(n,r){void 0===r&&(r=!1),n&&(n<0||e.Transforms.move(t,{distance:n,unit:"character",reverse:r}))},n.moveReverse=function(t){n.move(t,!0)},n.restoreSelection=function(){var t=Qa.get(n);null!=t&&(n.focus(),e.Transforms.select(n,t))},n.getSelectionPosition=function(){return Qd(n)},n.getNodePosition=function(t){return Zd(n,t)},n.isSelectedAll=function(){var t=n.selection;if(null==t)return!1;var r=ho(e.Range.edges(t),2),o=r[0],i=r[1],a=ho(e.Editor.edges(n,[]),2),s=a[0],u=a[1];return!(!e.Point.equals(o,s)||!e.Point.equals(i,u))},n.selectAll=function(){var t=e.Editor.start(n,[]),r=e.Editor.end(n,[]);e.Transforms.select(n,{anchor:t,focus:r})},n},rh={};!function(){if(eh)return rh;eh=1;var t=P(),e=St(),n=Ru(),r=je(),o=Lt(),i=Rn(),a=Oi(),s=Tt(),u=Bt(),l=Pu(),c=fc(),f=Du(),d=e("".indexOf);n("match",function(e,n,h){return[function(n){var r=s(this),i=o(n)?u(n,e):void 0;return i?t(i,n,r):new RegExp(n)[e](a(r))},function(t){var e=r(this),o=a(t),s=h(n,e,o);if(s.done)return s.value;var u=a(c(e));if(-1===d(u,"g"))return f(e,o);var p=-1!==d(u,"u");e.lastIndex=0;for(var g,v=[],m=0;null!==(g=f(e,o));){var y=a(g[0]);v[m]=y,""===y&&(e.lastIndex=l(o,i(e.lastIndex),p)),m++}return 0===m?null:v}]})}();const oh=t=>"string"==typeof t,ih=()=>{let t,e;const n=new Promise((n,r)=>{t=n,e=r});return n.resolve=t,n.reject=e,n},ah=t=>null==t?"":""+t,sh=/###/g,uh=t=>t&&t.indexOf("###")>-1?t.replace(sh,"."):t,lh=t=>!t||oh(t),ch=(t,e,n)=>{const r=oh(e)?e.split("."):e;let o=0;for(;o<r.length-1;){if(lh(t))return{};const e=uh(r[o]);!t[e]&&n&&(t[e]=new n),t=Object.prototype.hasOwnProperty.call(t,e)?t[e]:{},++o}return lh(t)?{}:{obj:t,k:uh(r[o])}},fh=(t,e,n)=>{const{obj:r,k:o}=ch(t,e,Object);if(void 0!==r||1===e.length)return void(r[o]=n);let i=e[e.length-1],a=e.slice(0,e.length-1),s=ch(t,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=ch(t,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},dh=(t,e)=>{const{obj:n,k:r}=ch(t,e);if(n)return n[r]},hh=(t,e,n)=>{for(const r in e)"__proto__"!==r&&"constructor"!==r&&(r in t?oh(t[r])||t[r]instanceof String||oh(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):hh(t[r],e[r],n):t[r]=e[r]);return t},ph=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var gh={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const vh=t=>oh(t)?t.replace(/[&<>"'\/]/g,t=>gh[t]):t;const mh=[" ",",","?","!",";"],yh=new class{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const e=this.regExpMap.get(t);if(void 0!==e)return e;const n=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,n),this.regExpQueue.push(t),n}}(20),bh=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let o=t;for(let t=0;t<r.length;){if(!o||"object"!=typeof o)return;let e,i="";for(let a=t;a<r.length;++a)if(a!==t&&(i+=n),i+=r[a],e=o[i],void 0!==e){if(["string","number","boolean"].indexOf(typeof e)>-1&&a<r.length-1)continue;t+=a-t+1;break}o=e}return o},wh=t=>t&&t.replace("_","-"),xh={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class Eh{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(t,e)}init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||xh,this.options=e,this.debug=e.debug}log(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}warn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}error(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}deprecate(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(t,e,n,r){return r&&!this.debug?null:(oh(t[0])&&(t[0]=`${n}${this.prefix} ${t[0]}`),this.logger[e](t))}create(t){return new Eh(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new Eh(this.logger,t)}}var Sh=new Eh;class Oh{constructor(){this.observers={}}on(t,e){return t.split(" ").forEach(t=>{this.observers[t]||(this.observers[t]=new Map);const n=this.observers[t].get(e)||0;this.observers[t].set(e,n+1)}),this}off(t,e){this.observers[t]&&(e?this.observers[t].delete(e):delete this.observers[t])}emit(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(this.observers[t]){Array.from(this.observers[t].entries()).forEach(t=>{let[e,r]=t;for(let t=0;t<r;t++)e(...n)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(e=>{let[r,o]=e;for(let e=0;e<o;e++)r.apply(r,[t,...n])})}}}class Ch extends Oh{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}getResource(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;t.indexOf(".")>-1?a=t.split("."):(a=[t,e],n&&(Array.isArray(n)?a.push(...n):oh(n)&&o?a.push(...n.split(o)):a.push(n)));const s=dh(this.data,a);return!s&&!e&&!n&&t.indexOf(".")>-1&&(t=a[0],e=a[1],n=a.slice(2).join(".")),!s&&i&&oh(n)?bh(this.data&&this.data[t]&&this.data[t][e],n,o):s}addResource(t,e,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[t,e];n&&(a=a.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(a=t.split("."),r=e,e=a[1]),this.addNamespaces(e),fh(this.data,a,r),o.silent||this.emit("added",t,e,n,r)}addResources(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)(oh(n[r])||Array.isArray(n[r]))&&this.addResource(t,e,r,n[r],{silent:!0});r.silent||this.emit("added",t,e,n)}addResourceBundle(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[t,e];t.indexOf(".")>-1&&(a=t.split("."),r=n,n=e,e=a[1]),this.addNamespaces(e);let s=dh(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?hh(s,n,o):s={...s,...n},fh(this.data,a,s),i.silent||this.emit("added",t,e,n)}removeResourceBundle(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}hasResourceBundle(t,e){return void 0!==this.getResource(t,e)}getResourceBundle(t,e){return e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(t,e)}:this.getResource(t,e)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find(t=>e[t]&&Object.keys(e[t]).length>0)}toJSON(){return this.data}}var kh={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,o){return t.forEach(t=>{this.processors[t]&&(e=this.processors[t].process(e,n,r,o))}),e}};const Th={};class Nh extends Oh{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((t,e,n)=>{t.forEach(t=>{e[t]&&(n[t]=e[t])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=e,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=Sh.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==t)return!1;const n=this.resolve(t,e);return n&&void 0!==n.res}extractFromKey(t,e){let n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator;let o=e.ns||this.options.defaultNS||[];const i=n&&t.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||e.keySeparator||this.options.userDefinedNsSeparator||e.nsSeparator||((t,e,n)=>{e=e||"",n=n||"";const r=mh.filter(t=>e.indexOf(t)<0&&n.indexOf(t)<0);if(0===r.length)return!0;const o=yh.getRegExp(`(${r.map(t=>"?"===t?"\\?":t).join("|")})`);let i=!o.test(t);if(!i){const e=t.indexOf(n);e>0&&!o.test(t.substring(0,e))&&(i=!0)}return i})(t,n,r));if(i&&!a){const e=t.match(this.interpolator.nestingRegexp);if(e&&e.length>0)return{key:t,namespaces:oh(o)?[o]:o};const i=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),t=i.join(r)}return{key:t,namespaces:oh(o)?[o]:o}}translate(t,e,n){if("object"!=typeof e&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof e&&(e={...e}),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);const r=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,o=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(t[t.length-1],e),s=a[a.length-1],u=e.lng||this.language,l=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const t=e.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${t}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(e)}:`${s}${t}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(e)}:i}const c=this.resolve(t,e);let f=c&&c.res;const d=c&&c.usedKey||i,h=c&&c.exactUsedKey||i,p=Object.prototype.toString.apply(f),g=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,m=!oh(f)&&"boolean"!=typeof f&&"number"!=typeof f;if(!(v&&f&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(p)<0)||oh(g)&&Array.isArray(f))if(v&&oh(g)&&Array.isArray(f))f=f.join(g),f&&(f=this.extendTranslation(f,t,e,n));else{let r=!1,a=!1;const l=void 0!==e.count&&!oh(e.count),d=Nh.hasDefaultValue(e),h=l?this.pluralResolver.getSuffix(u,e.count,e):"",p=e.ordinal&&l?this.pluralResolver.getSuffix(u,e.count,{ordinal:!1}):"",g=l&&!e.ordinal&&0===e.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&e[`defaultValue${this.options.pluralSeparator}zero`]||e[`defaultValue${h}`]||e[`defaultValue${p}`]||e.defaultValue;!this.isValidLookup(f)&&d&&(r=!0,f=v),this.isValidLookup(f)||(a=!0,f=i);const m=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:f,y=d&&v!==f&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:f),o){const t=this.resolve(i,{...e,keySeparator:!1});t&&t.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 t=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let e=0;e<n.length;e++)t.push(n[e]);else"all"===this.options.saveMissingTo?t=this.languageUtils.toResolveHierarchy(e.lng||this.language):t.push(e.lng||this.language);const r=(t,n,r)=>{const o=d&&r!==f?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(t,s,n,o,y,e):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(t,s,n,o,y,e),this.emit("missingKey",t,s,n,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?t.forEach(t=>{const n=this.pluralResolver.getSuffixes(t,e);g&&e[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{r([t],i+n,e[`defaultValue${n}`]||v)})}):r(t,i,v))}f=this.extendTranslation(f,t,e,c,n),a&&f===i&&this.options.appendNamespaceToMissingKey&&(f=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(f="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?f:void 0):this.options.parseMissingKeyHandler(f))}else{if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const t=this.options.returnedObjectHandler?this.options.returnedObjectHandler(d,f,{...e,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=t,c.usedParams=this.getUsedParamsDetails(e),c):t}if(o){const t=Array.isArray(f),n=t?[]:{},r=t?h:d;for(const t in f)if(Object.prototype.hasOwnProperty.call(f,t)){const i=`${r}${o}${t}`;n[t]=this.translate(i,{...e,joinArrays:!1,ns:a}),n[t]===i&&(n[t]=f[t])}f=n}}return r?(c.res=f,c.usedParams=this.getUsedParamsDetails(e),c):f}extendTranslation(t,e,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=oh(t)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const e=t.match(this.interpolator.nestingRegexp);s=e&&e.length}let u=n.replace&&!oh(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),t=this.interpolator.interpolate(t,u,n.lng||this.language||r.usedLng,n),a){const e=t.match(this.interpolator.nestingRegexp);s<(e&&e.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(t=this.interpolator.nest(t,function(){for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${e[0]}`),null):i.translate(...r,e)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s=oh(a)?[a]:a;return null!=t&&s&&s.length&&!1!==n.applyPostProcessor&&(t=kh.handle(s,t,e,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),t}resolve(t){let e,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return oh(t)&&(t=[t]),t.forEach(t=>{if(this.isValidLookup(e))return;const s=this.extractFromKey(t,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&!oh(a.count),f=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),d=void 0!==a.context&&(oh(a.context)||"number"==typeof a.context)&&""!==a.context,h=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach(t=>{this.isValidLookup(e)||(i=t,!Th[`${h[0]}-${t}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Th[`${h[0]}-${t}`]=!0,this.logger.warn(`key "${n}" 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(n=>{if(this.isValidLookup(e))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,t,a);else{let t;c&&(t=this.pluralResolver.getSuffix(n,a.count,a));const e=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+t),a.ordinal&&0===t.indexOf(r)&&i.push(u+t.replace(r,this.options.pluralSeparator)),f&&i.push(u+e)),d){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+t),a.ordinal&&0===t.indexOf(r)&&i.push(n+t.replace(r,this.options.pluralSeparator)),f&&i.push(n+e))}}let s;for(;s=i.pop();)this.isValidLookup(e)||(r=s,e=this.getResource(n,t,s,a))}))})}),{res:e,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(t){return!(void 0===t||!this.options.returnNull&&null===t||!this.options.returnEmptyString&&""===t)}getResource(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,r):this.resourceStore.getResource(t,e,n,r)}getUsedParamsDetails(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=t.replace&&!oh(t.replace);let r=n?t.replace:t;if(n&&void 0!==t.count&&(r.count=t.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const t of e)delete r[t]}return r}static hasDefaultValue(t){const e="defaultValue";for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e===n.substring(0,12)&&void 0!==t[n])return!0;return!1}}const Rh=t=>t.charAt(0).toUpperCase()+t.slice(1);class Lh{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Sh.create("languageUtils")}getScriptPartFromCode(t){if(!(t=wh(t))||t.indexOf("-")<0)return null;const e=t.split("-");return 2===e.length?null:(e.pop(),"x"===e[e.length-1].toLowerCase()?null:this.formatLanguageCode(e.join("-")))}getLanguagePartFromCode(t){if(!(t=wh(t))||t.indexOf("-")<0)return t;const e=t.split("-");return this.formatLanguageCode(e[0])}formatLanguageCode(t){if(oh(t)&&t.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let e=Intl.getCanonicalLocales(t)[0];if(e&&this.options.lowerCaseLng&&(e=e.toLowerCase()),e)return e}catch(t){}const e=["hans","hant","latn","cyrl","cans","mong","arab"];let n=t.split("-");return this.options.lowerCaseLng?n=n.map(t=>t.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=Rh(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=Rh(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=Rh(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let e;return t.forEach(t=>{if(e)return;const n=this.formatLanguageCode(t);this.options.supportedLngs&&!this.isSupportedCode(n)||(e=n)}),!e&&this.options.supportedLngs&&t.forEach(t=>{if(e)return;const n=this.getLanguagePartFromCode(t);if(this.isSupportedCode(n))return e=n;e=this.options.supportedLngs.find(t=>t===n?t:t.indexOf("-")<0&&n.indexOf("-")<0?void 0:t.indexOf("-")>0&&n.indexOf("-")<0&&t.substring(0,t.indexOf("-"))===n||0===t.indexOf(n)&&n.length>1?t:void 0)}),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e}getFallbackCodes(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),oh(t)&&(t=[t]),Array.isArray(t))return t;if(!e)return t.default||[];let n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}toResolveHierarchy(t,e){const n=this.getFallbackCodes(e||this.options.fallbackLng||[],t),r=[],o=t=>{t&&(this.isSupportedCode(t)?r.push(t):this.logger.warn(`rejecting language code not found in supportedLngs: ${t}`))};return oh(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):oh(t)&&o(this.formatLanguageCode(t)),n.forEach(t=>{r.indexOf(t)<0&&o(this.formatLanguageCode(t))}),r}}let Mh=[{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}],Ph={1:t=>Number(t>1),2:t=>Number(1!=t),3:t=>0,4:t=>Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2),5:t=>Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5),6:t=>Number(1==t?0:t>=2&&t<=4?1:2),7:t=>Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2),8:t=>Number(1==t?0:2==t?1:8!=t&&11!=t?2:3),9:t=>Number(t>=2),10:t=>Number(1==t?0:2==t?1:t<7?2:t<11?3:4),11:t=>Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3),12:t=>Number(t%10!=1||t%100==11),13:t=>Number(0!==t),14:t=>Number(1==t?0:2==t?1:3==t?2:3),15:t=>Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2),16:t=>Number(t%10==1&&t%100!=11?0:0!==t?1:2),17:t=>Number(1==t||t%10==1&&t%100!=11?0:1),18:t=>Number(0==t?0:1==t?1:2),19:t=>Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3),20:t=>Number(1==t?0:0==t||t%100>0&&t%100<20?1:2),21:t=>Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0),22:t=>Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)};const Dh=["v1","v2","v3"],Ah=["v4"],jh={zero:0,one:1,two:2,few:3,many:4,other:5};class Ih{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=t,this.options=e,this.logger=Sh.create("pluralResolver"),this.options.compatibilityJSON&&!Ah.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 t={};return Mh.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Ph[e.fc]}})}),t})(),this.pluralRulesCache={}}addRule(t,e){this.rules[t]=e}clearCache(){this.pluralRulesCache={}}getRule(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const n=wh("dev"===t?"en":t),r=e.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!t.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(t);i=this.getRule(r,e)}return this.pluralRulesCache[o]=i,i}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(t,e);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(t,n).map(t=>`${e}${t}`)}getSuffixes(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(t,e);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((t,e)=>jh[t]-jh[e]).map(t=>`${this.options.prepend}${e.ordinal?`ordinal${this.options.prepend}`:""}${t}`):n.numbers.map(n=>this.getSuffix(t,n,e)):[]}getSuffix(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(e)}`:this.getSuffixRetroCompatible(r,e):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,e){const n=t.noAbs?t.plurals(e):t.plurals(Math.abs(e));let r=t.numbers[n];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!Dh.includes(this.options.compatibilityJSON)}}const $h=function(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((t,e,n)=>{const r=dh(t,n);return void 0!==r?r:dh(e,n)})(t,e,n);return!i&&o&&oh(n)&&(i=bh(t,n,r),void 0===i&&(i=bh(e,n,r))),i},Fh=t=>t.replace(/\$/g,"$$$$");class _h{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Sh.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(t=>t),this.init(t)}init(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:e,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:f,nestingPrefixEscaped:d,nestingSuffix:h,nestingSuffixEscaped:p,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=t.interpolation;this.escape=void 0!==e?e:vh,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?ph(o):i||"{{",this.suffix=a?ph(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=f?ph(f):d||ph("$t("),this.nestingSuffix=h?ph(h):p||ph(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(t,e)=>t&&t.source===e?(t.lastIndex=0,t):new RegExp(e,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,e,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=t=>{if(t.indexOf(this.formatSeparator)<0){const o=$h(e,s,t,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...e,interpolationkey:t}):o}const o=t.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format($h(e,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...e,interpolationkey:i})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:t=>Fh(t)},{regex:this.regexp,safeValue:t=>this.escapeValue?Fh(this.escape(t)):Fh(t)}].forEach(e=>{for(a=0;o=e.regex.exec(t);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const e=l(t,o,r);i=oh(e)?e:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${t}`),i=""}else oh(i)||this.useRawValueToEscape||(i=ah(i));const s=e.safeValue(i);if(t=t.replace(o[0],s),c?(e.regex.lastIndex+=i.length,e.regex.lastIndex-=o[0].length):e.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),t}nest(t,e){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(t,e)=>{const n=this.nestingOptionsSeparator;if(t.indexOf(n)<0)return t;const r=t.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;t=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),e&&(o={...e,...o})}catch(e){return this.logger.warn(`failed parsing options string in nesting for key ${t}`,e),`${t}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,t};for(;n=this.nestingRegexp.exec(t);){let s=[];o={...i},o=o.replace&&!oh(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const t=n[1].split(this.formatSeparator).map(t=>t.trim());n[1]=t.shift(),s=t,u=!0}if(r=e(a.call(this,n[1].trim(),o),o),r&&n[0]===t&&!oh(r))return r;oh(r)||(r=ah(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${t}`),r=""),u&&(r=s.reduce((t,e)=>this.format(t,e,i.lng,{...i,interpolationkey:n[1].trim()}),r.trim())),t=t.replace(n[0],r),this.regexp.lastIndex=0}return t}}const Bh=t=>{const e={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=e[a];return s||(s=t(wh(r),o),e[a]=s),s(n)}};class Wh{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Sh.create("formatter"),this.options=t,this.formats={number:Bh((t,e)=>{const n=new Intl.NumberFormat(t,{...e});return t=>n.format(t)}),currency:Bh((t,e)=>{const n=new Intl.NumberFormat(t,{...e,style:"currency"});return t=>n.format(t)}),datetime:Bh((t,e)=>{const n=new Intl.DateTimeFormat(t,{...e});return t=>n.format(t)}),relativetime:Bh((t,e)=>{const n=new Intl.RelativeTimeFormat(t,{...e});return t=>n.format(t,e.range||"day")}),list:Bh((t,e)=>{const n=new Intl.ListFormat(t,{...e});return t=>n.format(t)})},this.init(t)}init(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=e.interpolation.formatSeparator||","}add(t,e){this.formats[t.toLowerCase().trim()]=e}addCached(t,e){this.formats[t.toLowerCase().trim()]=Bh(e)}format(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=e.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(t=>t.indexOf(")")>-1)){const t=o.findIndex(t=>t.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,t)].join(this.formatSeparator)}const i=o.reduce((t,e)=>{const{formatName:o,formatOptions:i}=(t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===e&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===e&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(t=>{if(t){const[e,...r]=t.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=e.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:e,formatOptions:n}})(e);if(this.formats[o]){let e=t;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;e=this.formats[o](t,s,{...i,...r,...a})}catch(t){this.logger.warn(t)}return e}return this.logger.warn(`there was no format function for ${o}`),t},t);return i}}class Hh extends Oh{constructor(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=t,this.store=e,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Sh.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(t,e,n,r){const o={},i={},a={},s={};return t.forEach(t=>{let r=!0;e.forEach(e=>{const a=`${t}|${e}`;!n.reload&&this.store.hasResourceBundle(t,e)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[e]&&(s[e]=!0)))}),r||(a[t]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(t,e,n){const r=t.split("|"),o=r[0],i=r[1];e&&this.emit("failedLoading",o,i,e),!e&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[t]=e?-1:2,e&&n&&(this.state[t]=0);const a={};this.queue.forEach(n=>{((t,e,n)=>{const{obj:r,k:o}=ch(t,e,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((t,e)=>{void 0!==t.pending[e]&&(delete t.pending[e],t.pendingCount--)})(n,t),e&&n.errors.push(e),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(t=>{a[t]||(a[t]={});const e=n.loaded[t];e.length&&e.forEach(e=>{void 0===a[t][e]&&(a[t][e]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(t=>!t.done)}read(t,e,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!t.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:t,ns:e,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const t=this.waitingReads.shift();this.read(t.lng,t.ns,t.fcName,t.tried,t.wait,t.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,t,e,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(t,e,a);try{const n=s(t,e);n&&"function"==typeof n.then?n.then(t=>a(null,t)).catch(a):a(null,n)}catch(t){a(t)}}prepareLoading(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();oh(t)&&(t=this.languageUtils.toResolveHierarchy(t)),oh(e)&&(e=[e]);const o=this.queueLoad(t,e,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(t=>{this.loadOne(t)})}load(t,e,n){this.prepareLoading(t,e,{},n)}reload(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}loadOne(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=t.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${e}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${e}loaded namespace ${o} for language ${r}`,i),this.loaded(t,n,i)})}saveMissing(t,e,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e))this.logger.warn(`did not save key "${n}" as the namespace "${e}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(t,e,n,r,s):u(t,e,n,r),o&&"function"==typeof o.then?o.then(t=>a(null,t)).catch(a):a(null,o)}catch(t){a(t)}else u(t,e,n,r,a,s)}t&&t[0]&&this.store.addResource(t[0],e,n,r)}}}const Uh=()=>({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:t=>{let e={};if("object"==typeof t[1]&&(e=t[1]),oh(t[1])&&(e.defaultValue=t[1]),oh(t[2])&&(e.tDescription=t[2]),"object"==typeof t[2]||"object"==typeof t[3]){const n=t[3]||t[2];Object.keys(n).forEach(t=>{e[t]=n[t]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Vh=t=>(oh(t.ns)&&(t.ns=[t.ns]),oh(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),oh(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),zh=()=>{};class Kh extends Oh{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=Vh(t),this.services={},this.logger=Sh,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{"function"==typeof n[t]&&(n[t]=n[t].bind(n))}),e&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,e),this;setTimeout(()=>{this.init(t,e)},0)}}init(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof e&&(n=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&(oh(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const r=Uh();this.options={...r,...this.options,...Vh(e)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);const o=t=>t?"function"==typeof t?new t:t:null;if(!this.options.isClone){let e;this.modules.logger?Sh.init(o(this.modules.logger),this.options):Sh.init(null,this.options),this.modules.formatter?e=this.modules.formatter:"undefined"!=typeof Intl&&(e=Wh);const n=new Lh(this.options);this.store=new Ch(this.options.resources,this.options);const i=this.services;i.logger=Sh,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new Ih(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!e||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(e),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new _h(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new Hh(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit(e,...r)}),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new Nh(this.services,this.options),this.translator.on("*",function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t.emit(e,...r)}),this.modules.external.forEach(t=>{t.init&&t.init(this)})}if(this.format=this.options.interpolation.format,n||(n=zh),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const t=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);t.length>0&&"dev"!==t[0]&&(this.options.lng=t[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(e=>{this[e]=function(){return t.store[e](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=function(){return t.store[e](...arguments),t}});const i=ih(),a=()=>{const t=(t,e)=>{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(e),n(t,e)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return t(null,this.t.bind(this));this.changeLanguage(this.options.lng,t)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zh;const n=oh(t)?t:this.language;if("function"==typeof t&&(e=t),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return e();const t=[],r=e=>{if(!e)return;if("cimode"===e)return;this.services.languageUtils.toResolveHierarchy(e).forEach(e=>{"cimode"!==e&&t.indexOf(e)<0&&t.push(e)})};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(t=>r(t))}this.options.preload&&this.options.preload.forEach(t=>r(t)),this.services.backendConnector.load(t,this.options.ns,t=>{t||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),e(t)})}else e(null)}reloadResources(t,e,n){const r=ih();return"function"==typeof t&&(n=t,t=void 0),"function"==typeof e&&(n=e,e=void 0),t||(t=this.languages),e||(e=this.options.ns),n||(n=zh),this.services.backendConnector.reload(t,e,t=>{r.resolve(),n(t)}),r}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&kh.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}setResolvedLanguage(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(let t=0;t<this.languages.length;t++){const e=this.languages[t];if(!(["cimode","dev"].indexOf(e)>-1)&&this.store.hasLanguageSomeTranslations(e)){this.resolvedLanguage=e;break}}}changeLanguage(t,e){var n=this;this.isLanguageChangingTo=t;const r=ih();this.emit("languageChanging",t);const o=t=>{this.language=t,this.languages=this.services.languageUtils.toResolveHierarchy(t),this.resolvedLanguage=void 0,this.setResolvedLanguage(t)},i=(t,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),e&&e(t,function(){return n.t(...arguments)})},a=e=>{t||e||!this.services.languageDetector||(e=[]);const n=oh(e)?e:this.services.languageUtils.getBestMatchFromCodes(e);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,t=>{i(t,n)})};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&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(t):a(this.services.languageDetector.detect()),r}getFixedT(t,e,n){var r=this;const o=function(t,e){let i;if("object"!=typeof e){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([t,e].concat(s))}else i={...e};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let c;return c=i.keyPrefix&&Array.isArray(t)?t.map(t=>`${i.keyPrefix}${l}${t}`):i.keyPrefix?`${i.keyPrefix}${l}${t}`:t,r.t(c,i)};return oh(t)?o.lng=t:o.lngs=t,o.ns=e,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=e.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(t,e)=>{const n=this.services.backendConnector.state[`${t}|${e}`];return-1===n||0===n||2===n};if(e.precheck){const t=e.precheck(this,i);if(void 0!==t)return t}return!!this.hasResourceBundle(n,t)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,t)||r&&!i(o,t)))}loadNamespaces(t,e){const n=ih();return this.options.ns?(oh(t)&&(t=[t]),t.forEach(t=>{this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}),this.loadResources(t=>{n.resolve(),e&&e(t)}),n):(e&&e(),Promise.resolve())}loadLanguages(t,e){const n=ih();oh(t)&&(t=[t]);const r=this.options.preload||[],o=t.filter(t=>r.indexOf(t)<0&&this.services.languageUtils.isSupportedCode(t));return o.length?(this.options.preload=r.concat(o),this.loadResources(t=>{n.resolve(),e&&e(t)}),n):(e&&e(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const e=this.services&&this.services.languageUtils||new Lh(Uh());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(e.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new Kh(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:zh;const n=t.forkResourceStore;n&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},o=new Kh(r);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));return["store","services","language"].forEach(t=>{o[t]=this[t]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new Ch(this.store.data,r),o.services.resourceStore=o.store),o.translator=new Nh(o.services,r),o.translator.on("*",function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];o.emit(t,...n)}),o.init(r,e),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const qh=Kh.createInstance();qh.createInstance=Kh.createInstance,qh.createInstance,qh.dir,qh.init,qh.loadResources,qh.reloadResources,qh.use,qh.changeLanguage,qh.getFixedT,qh.t,qh.exists,qh.setDefaultNamespace,qh.hasLoadedNamespace,qh.loadNamespaces,qh.loadLanguages;var Jh="translation";function Gh(t){return qh.on("languageChanged",t),function(){return qh.off("languageChanged",t)}}qh.init({lng:"zh-CN",resources:{}});var Yh=qh.t.bind(qh);function Xh(t){if(t.removeAttr){t.removeAttr("width"),t.removeAttr("height"),t.removeAttr("fill"),t.removeAttr("class"),t.removeAttr("t"),t.removeAttr("p-id");var e=t.children();e.length&&Xh(e)}}function Qh(){return o('<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 Zh(){return o('<div class="w-e-bar-divider"></div>')}function tp(t,e,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),e){if(r){var i=Nf?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(t.attr("data-tooltip",r),t.addClass("w-e-menu-tooltip-v5"),t.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;t.attr("data-tooltip",a),t.addClass("w-e-menu-tooltip-v5")}}}var ep=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button"></button>'),this.disabled=!1,this.menu=e;var i=e.tag,a=e.width;if("button"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'button'"));var s=e.title,u=e.hotkey,l=void 0===u?"":u,c=e.iconSvg,f=void 0===c?"":c,d=this.$button;if(f){var h=o(f);Xh(h),d.append(h)}else d.text(s);tp(d,f,s,l,n),n&&f&&d.append(o('<span class="title">'.concat(s,"</span>"))),a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",t),this.$elem.append(d),mc(function(){return r.init()})}return t.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(e){e.preventDefault(),dp(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},t.prototype.exec=function(){var t=dp(this),e=this.menu,n=e.getValue(t);this.setIcon(),this.setTooltip(),e.exec(t,n)},t.prototype.setActive=function(){var t=dp(this),e=this.$button,n="active";this.menu.isActive(t)?e.addClass(n):e.removeClass(n)},t.prototype.setDisabled=function(){var t=dp(this),e=this.$button,n=this.menu.isDisabled(t);(null==t.selection||t.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?e.addClass(r):e.removeClass(r),this.disabled=n},t.prototype.setIcon=function(){var t=dp(this),e=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(t);if(n){e.find("svg").remove();var r=o(n);Xh(r),e.append(r)}}},t.prototype.setTooltip=function(){var t=dp(this),e=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(t),r=this.menu.iconSvg;n&&r&&tp(e,r,n)}},t.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},t}(),np=function(t){function e(e,n,r){return void 0===r&&(r=!1),t.call(this,e,n,r)||this}return lo(e,t),e.prototype.onButtonClick=function(){},e}(ep),rp=function(){function t(t){this.isShow=!1,this.showTime=0,this.record(t)}return t.prototype.record=function(t){var e=ja.get(t);null==e&&(e=new Set,ja.set(t,e)),e.add(this),Ia.set(this,t)},t.prototype.renderContent=function(t){var e=this.$elem;e.empty(),e.append(t);var n=this.genSelfElem();n&&e.append(n)},t.prototype.appendTo=function(t){var e=this.$elem;t.append(e)},t.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var t=Ia.get(this);t&&t.emit(Eo,this)}},t.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=Ia.get(this);t&&t.emit(So)}},t}(),op=function(t){function e(e){var n=t.call(this,e)||this;return n.type="dropPanel",n.$elem=o('<div class="w-e-drop-panel"></div>'),n}return lo(e,t),e.prototype.genSelfElem=function(){return null},e}(rp),ip=function(t){function e(e,n,r){void 0===r&&(r=!1);var o=t.call(this,e,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=Qh();o.$button.append(i)}return o}return lo(e,t),e.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},e.prototype.handleDropPanel=function(){var t=this.menu;if(null!=t.getPanelContentElem){var e=dp(this);if(null==this.dropPanel){var n=new op(e),r=t.getPanelContentElem(e);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=t.getPanelContentElem(e);o.renderContent(r),o.show()}}var i=this.dropPanel;if(i.isShow){var a=this.$elem,s=a.offset().left,u=a.parents(".w-e-bar");s-u.offset().left>=u.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},e}(ep),ap=function(t){function e(e,n){void 0===n&&(n=0);var r=t.call(this,e)||this;r.type="modal",r.$elem=o('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var i=r.$elem;return i.on("click",function(t){return t.stopPropagation()}),i.on("keyup",function(t){"Escape"===t.code&&(r.hide(),e.restoreSelection())}),r}return lo(e,t),e.prototype.genSelfElem=function(){var t=this,e=o('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),n=Ia.get(this);return e.on("click",function(){t.hide(),null==n||n.restoreSelection()}),e},e.prototype.setStyle=function(t){var e=this.width,n=this.$elem;n.attr("style",""),e&&n.css("width","".concat(e,"px")),n.css(t)},e}(rp);var sp=function(t){function n(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n,r)||this;return i.$body=o("body"),i.modal=null,i.menu=n,i}return lo(n,t),n.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},n.prototype.getPosition=function(){var t=dp(this),n=this.menu.getModalPositionNode(t);return e.Element.isElement(n)?Zd(t,n,"modal"):Qd(t)},n.prototype.handleModal=function(){var t=dp(this),e=this.menu;if(null==this.modal){var n=new ap(t,e.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},n.prototype.renderAndShowModal=function(t,e){void 0===e&&(e=!1);var n=dp(this),r=this.menu;if(null!=r.getModalContentElem){var o=jf.getTextarea(n),i=jf.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(t.renderContent(s),a)t.setStyle({left:"0",right:"0"});else{var u=this.getPosition();t.setStyle(u)}e&&(a?t.appendTo(this.$body):t.appendTo(o.$textAreaContainer)),t.show(),a||th(n,t.$elem),setTimeout(function(){n.blur()})}},n}(ep);var up=function(t){function e(e,n){var r=t.call(this,e)||this;return r.type="selectList",r.$elem=o('<div class="w-e-select-list"></div>'),n&&r.$elem.css("width","".concat(n,"px")),r.$elem.on("click",function(t){t.stopPropagation()}),r}return lo(e,t),e.prototype.renderList=function(t){var e=this.$elem;e.empty();var n=o("<ul></ul>");t.forEach(function(t){var e=t.value,r=t.text,i=t.selected,a=t.styleForRenderMenuList,s=o('<li data-value="'.concat(e,'"></li>'));if(a&&s.css(a),i){var u=o('<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>');s.append(u),s.addClass("selected")}s.append(o('<span data-value="'.concat(e,'">').concat(r,"</span>"))),s.attr("title",r),n.append(s)}),e.append(n)},e.prototype.genSelfElem=function(){return null},e}(rp);var lp=function(){function t(t,e,n){void 0===n&&(n=!1);var r=this;this.$elem=o('<div class="w-e-bar-item"></div>'),this.$button=o('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var i=e.tag,a=e.title,s=e.width,u=e.iconSvg,l=void 0===u?"":u,c=e.hotkey,f=void 0===c?"":c;if("select"!==i)throw new Error("Invalid tag '".concat(i,"', expected 'select'"));var d=this.$button;s&&d.css("width","".concat(s,"px")),d.attr("data-menu-key",t),tp(d,l,a,f,n),this.$elem.append(d),this.menu=e,mc(function(){return r.init()})}return t.prototype.init=function(){var t=this;this.setSelectedValue(),this.$button.on("click",function(e){e.preventDefault(),dp(t).hidePanelOrModal(),t.trigger()})},t.prototype.trigger=function(){var t=this,e=dp(this);if(!e.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new up(e,n.selectPanelWidth);var r=this.selectList,i=n.getOptions(e);r.renderList(i),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",function(e){var n=e.target;if(null!=n){e.preventDefault();var r=o(n).attr("data-value");t.onChange(r)}})}else{if((r=this.selectList).isShow)r.hide();else{i=n.getOptions(e);r.renderList(i),r.show()}}}},t.prototype.onChange=function(t){var e=dp(this),n=this.menu;n.exec&&n.exec(e,t)},t.prototype.setSelectedValue=function(){var t=dp(this),e=this.menu,n=e.getValue(t),r=function(t,e){for(var n=t.length,r="",o=0;o<n;o++){var i=t[o];if(i.value===e){r=i.text;break}}return r}(e.getOptions(t),n.toString()),o=this.$button,i=Qh();o.empty(),o.text(r),o.append(i)},t.prototype.setDisabled=function(){var t=dp(this),e=this.menu.isDisabled(t),n=this.$button;(null==t.selection||t.isDisabled())&&(e=!0);var r="disabled";e?n.addClass(r):n.removeClass(r),this.disabled=e},t.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},t}(),cp=function(){function t(t){this.$elem=o('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=o('<div class="w-e-bar-item-menus-container"></div>'),this.$button=o('<button type="button"></button>');var e=t.key,n=t.iconSvg,r=t.title,i=this.$elem,a=this.$button;if(n){var s=o(n);Xh(s),a.append(s)}else a.text(r);a.attr("data-menu-key",e);var u=Qh();a.append(u),i.append(a);var l=this.$container;i.append(l);var c=this.createObserver();this.observe(c)}return t.prototype.appendBarItem=function(t){var e=t.$elem;this.$container.append(e)},t.prototype.observe=function(t){var e=this.$container;t.observe(e[0],{childList:!0,subtree:!0,attributes:!0})},t.prototype.createObserver=function(){var t=this,e=this.$container,n=this.$button,r=new MutationObserver(function(){var i=e.find("button"),a=i.length;if(0!==a){var s=0;i.each(function(t){o(t).hasClass("disabled")&&s++}),r.disconnect(),s===a?n.addClass("disabled"):n.removeClass("disabled"),t.observe(r)}});return r},t}(),fp=new WeakMap;function dp(t){var e=Aa.get(t);if(null==e)throw new Error("Can not get editor instance");return e}function hp(t,e,n){void 0===n&&(n=!1);var r=fp.get(e);if(r)return r;var o=e.tag;if("button"===o){var i=e.showDropPanel,a=e.showModal;r=i?new ip(t,e,n):a?new sp(t,e,n):new np(t,e,n)}if("select"===o&&(r=new lp(t,e,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(e)));return fp.set(e,r),r}function pp(t,n){var r=t.selection;return null!=r&&(!e.Range.isCollapsed(r)&&(!jf.getSelectedElems(t).some(function(e){if(t.isVoid(e))return!0;var n=e.type;return!!["pre","code","table"].includes(n)})&&!!e.Text.isText(n)))}var gp,vp=function(){function t(){var t=this;this.$elem=o('<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=s(function(){var n=t.isShow,r=t.getSelectedNodeAndMenuKeys()||{},o=r.node,i=void 0===o?null:o,a=r.menuKeys,s=void 0===a?[]:a,u=t.getEditorInstance();if(null!=i&&t.changeItemsState(),i&&e.Element.isElement(i)&&n){var l=t.isSamePath(i,t.prevSelectedNode);if(!e.Editor.isBlock(u,i)&&l)return}t.hideAndClean(),null!=i&&(t.registerItems(s),t.setPosition(i),t.show()),t.prevSelectedNode=i},200),mc(function(){var e=t.getEditorInstance(),n=t.$elem;n.on("mousedown",function(t){return t.preventDefault()},{passive:!1}),jf.getTextarea(e).$textAreaContainer.append(n),e.on(yo,t.changeHoverbarState);var r=t.hideAndClean.bind(t);e.on(bo,r),e.on(wo,r),e.on(xo,r)}),this.lngListen=Gh(function(){t.menus={},t.hideAndClean(),t.getEditorInstance().deselect()})}return t.prototype.getMenus=function(){return this.menus},t.prototype.hideAndClean=function(){var t=this.$elem;t.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],t.empty(),this.isShow=!1},t.prototype.checkPositionBottom=function(){var t=this.$elem,e=!1,n="undefined"!=typeof window?window.innerHeight:null;n&&n>=360&&(n-t[0].getBoundingClientRect().bottom<360&&(e=!0));e?t.addClass("w-e-bar-bottom"):t.removeClass("w-e-bar-bottom")},t.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},t.prototype.changeItemsState=function(){var t=this;mc(function(){t.hoverbarItems.forEach(function(t){t.changeMenuState()})})},t.prototype.registerItems=function(t){var e=this,n=this.$elem;t.forEach(function(t){if("|"!==t)e.registerSingleItem(t);else{var r=Zh();n.append(r)}})},t.prototype.registerSingleItem=function(t){var e=this.getEditorInstance(),n=this.menus,r=n[t];if(null==r){var o=Oo[t];if(null==o)throw new Error("Not found menu item factory by key '".concat(t,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(t,"') is not a function"));r=o(),n[t]=r}var i=e.getMenuConfig(t);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=hp(t,r);this.hoverbarItems.push(a),Aa.set(a,e),this.$elem.append(a.$elem)},t.prototype.setPosition=function(t){var n=this.getEditorInstance(),r=this.$elem;if(r.attr("style",""),e.Element.isElement(t)){var o=Zd(n,t,"bar");return r.css(o),void th(n,r)}if(e.Text.isText(t)){o=Qd(n);return r.css(o),void th(n,r)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},t.prototype.getSelectedNodeAndMenuKeys=function(){var t=this.getEditorInstance();if(null==t.selection)return null;var n=this.getHoverbarKeysConf(),r=null,o=[],i=function(i){var a=n[i],s=a.match,u=a.menuKeys,l=void 0===u?[]:u,c=s||function(t,e){return jf.checkNodeType(e,i)},f=ho(e.Editor.nodes(t,{match:function(e){return c(t,e)},universal:!0}),1),d=f[0];if(null!=d)return r=d[0],o=l,"break"};for(var a in n){if("break"===i(a))break}return null==r||0===o.length?null:{node:r,menuKeys:o}},t.prototype.getEditorInstance=function(){var t=Pa.get(this);if(null==t)throw new Error("Can not get editor instance");return t},t.prototype.getHoverbarKeysConf=function(){var t=this.getEditorInstance().getConfig().hoverbarKeys,e=void 0===t?{}:t,n=e.text;return n&&null==n.match&&(n.match=pp),e},t.prototype.isSamePath=function(t,n){if(null==t||null==n)return!1;var r=jf.findPath(null,t),o=jf.findPath(null,n);return e.Path.equals(r,o)},t.prototype.destroy=function(){var t;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(t=this.lngListen)||void 0===t||t.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},t}(),mp={};function yp(t,e){return Ac(e)&&jf.hasDOMNode(t,e,{editable:!0})}function bp(t,n){if(t.getConfig().readOnly)return!1;var r=wp(t,n)&&jf.toSlateNode(t,n);return e.Editor.isVoid(t,r)}function wp(t,e){return Ac(e)&&jf.hasDOMNode(t,e)}!function(){if(gp)return mp;gp=1;var t,e=pr(),n=Xr(),r=Ce().f,o=Rn(),i=Oi(),a=Cs(),s=Tt(),u=ks(),l=he(),c=n("".slice),f=Math.min,d=u("startsWith");e({target:"String",proto:!0,forced:!!(l||d||(t=r(String.prototype,"startsWith"),!t||t.writable))&&!d},{startsWith:function(t){var e=i(s(this));a(t);var n=o(f(arguments.length>1?arguments[1]:void 0,e.length)),r=i(t);return c(e,n,n+r.length)===r}})}();const xp=t=>"object"==typeof t&&null!=t&&1===t.nodeType,Ep=(t,e)=>(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t,Sp=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return Ep(n.overflowY,e)||Ep(n.overflowX,e)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return!1},Op=(t,e,n,r,o,i,a,s)=>i<t&&a>e||i>t&&a<e?0:i<=t&&s<=n||a>=e&&s>=n?i-t-r:a>e&&s<n||i<t&&s>n?a-e+o:0,Cp=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},kp=(t,e)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=e,f="function"==typeof l?l:t=>t!==l;if(!xp(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=t;for(;xp(p)&&f(p);){if(p=Cp(p),p===d){h.push(p);break}null!=p&&p===document.body&&Sp(p)&&!Sp(document.documentElement)||null!=p&&Sp(p,c)&&h.push(p)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:w,top:x,right:E,bottom:S,left:O}=t.getBoundingClientRect(),{top:C,right:k,bottom:T,left:N}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(t);let R="start"===s||"nearest"===s?x-C:"end"===s?S+T:x+b/2-C+T,L="center"===u?O+w/2-N+k:"end"===u?E+k:O-N;const M=[];for(let t=0;t<h.length;t++){const e=h[t],{height:n,width:r,top:o,right:i,bottom:l,left:c}=e.getBoundingClientRect();if("if-needed"===a&&x>=0&&O>=0&&S<=v&&E<=g&&(e===d&&!Sp(e)||x>=o&&S<=l&&O>=c&&E<=i))return M;const f=getComputedStyle(e),p=parseInt(f.borderLeftWidth,10),C=parseInt(f.borderTopWidth,10),k=parseInt(f.borderRightWidth,10),T=parseInt(f.borderBottomWidth,10);let N=0,P=0;const D="offsetWidth"in e?e.offsetWidth-e.clientWidth-p-k:0,A="offsetHeight"in e?e.offsetHeight-e.clientHeight-C-T:0,j="offsetWidth"in e?0===e.offsetWidth?0:r/e.offsetWidth:0,I="offsetHeight"in e?0===e.offsetHeight?0:n/e.offsetHeight:0;if(d===e)N="start"===s?R:"end"===s?R-v:"nearest"===s?Op(y,y+v,v,C,T,y+R,y+R+b,b):R-v/2,P="start"===u?L:"center"===u?L-g/2:"end"===u?L-g:Op(m,m+g,g,p,k,m+L,m+L+w,w),N=Math.max(0,N+y),P=Math.max(0,P+m);else{N="start"===s?R-o-C:"end"===s?R-l+T+A:"nearest"===s?Op(o,l,n,C,T+A,R,R+b,b):R-(o+n/2)+A/2,P="start"===u?L-c-p:"center"===u?L-(c+r/2)+D/2:"end"===u?L-i+k+D:Op(c,i,r,p,k+D,L,L+w,w);const{scrollLeft:t,scrollTop:a}=e;N=0===I?0:Math.max(0,Math.min(a+N/I,e.scrollHeight-n/I+A)),P=0===j?0:Math.max(0,Math.min(t+P/j,e.scrollWidth-r/j+D)),R+=a-N,L+=t-P}M.push({el:e,top:N,left:P})}return M};function Tp(t,e){if(!t.isConnected||!(t=>{let e=t;for(;e&&e.parentNode;){if(e.parentNode===document)return!0;e=e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}return!1})(t))return;const n=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(t);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(e))return e.behavior(kp(t,e));const r="boolean"==typeof e||null==e?void 0:e.behavior;for(const{el:o,top:i,left:a}of kp(t,(t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"})(e))){const t=i-n.top+n.bottom,e=a-n.left+n.right;o.scroll({top:t,left:e,behavior:r})}}function Np(t,n,r){void 0===r&&(r=!1);var o=n.selection,i=n.getConfig(),a=jf.findDocumentOrShadowRoot(n).getSelection();if(a&&(!t.isComposing||r)&&n.isFocused()){var s="None"!==a.type;if(o||s){var u=za.get(n),l=!1;if(u.contains(a.anchorNode)&&u.contains(a.focusNode)&&(l=!0),s&&l&&o){var c=jf.toSlateRange(n,a,{exactMatch:!0,suppressThrow:!0});if(c&&e.Range.equals(c,o)){var f=!0;if(e.Range.isCollapsed(o)){var d=a.anchorNode,h=a.anchorOffset;if(d===u){var p=u.childNodes,g=void 0;(g=p[h])&&g.matches("table")&&(f=!1),(g=p[h-1])&&g.matches("table")&&(f=!1)}}if(f)return}}if(!o||jf.hasRange(n,o)){t.isUpdatingSelection=!0;var v=o&&jf.toDOMRange(n,o);if(v){e.Range.isBackward(o)?a.setBaseAndExtent(v.endContainer,v.endOffset,v.startContainer,v.startOffset):a.setBaseAndExtent(v.startContainer,v.startOffset,v.endContainer,v.endOffset);var m=v.startContainer.parentElement;if(!m.closest("[data-slate-spacer]")&&v.getBoundingClientRect){var y=v.getBoundingClientRect.bind(v)();0===y.top&&0===y.right&&0===y.bottom&&0===y.left&&0===y.height&&0===y.width||(m.getBoundingClientRect=v.getBoundingClientRect.bind(v));var b=document.body;Tp(m,{scrollMode:"if-needed",boundary:i.scroll&&u.parentElement||b,block:"end",behavior:"smooth"}),delete m.getBoundingClientRect}}else a.removeAllRanges();setTimeout(function(){v&&Rf&&u.focus(),t.isUpdatingSelection=!1})}else n.selection=jf.toSlateRange(n,a,{exactMatch:!1,suppressThrow:!1})}}}var Rp=new WeakMap,Lp=new WeakMap;var Mp={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"},Pp={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"},Dp={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Ap=function(t){var e=Mp[t],n=Pp[t],r=Dp[t],o=e&&l.isKeyHotkey(e),i=n&&l.isKeyHotkey(n),a=r&&l.isKeyHotkey(r);return function(t){return!(!o||!o(t))||(!!(Nf&&i&&i(t))||!(Nf||!a||!a(t)))}},jp={isBold:Ap("bold"),isCompose:Ap("compose"),isMoveBackward:Ap("moveBackward"),isMoveForward:Ap("moveForward"),isDeleteBackward:Ap("deleteBackward"),isDeleteForward:Ap("deleteForward"),isDeleteLineBackward:Ap("deleteLineBackward"),isDeleteLineForward:Ap("deleteLineForward"),isDeleteWordBackward:Ap("deleteWordBackward"),isDeleteWordForward:Ap("deleteWordForward"),isExtendBackward:Ap("extendBackward"),isExtendForward:Ap("extendForward"),isExtendLineBackward:Ap("extendLineBackward"),isExtendLineForward:Ap("extendLineForward"),isItalic:Ap("italic"),isMoveLineBackward:Ap("moveLineBackward"),isMoveLineForward:Ap("moveLineForward"),isMoveWordBackward:Ap("moveWordBackward"),isMoveWordForward:Ap("moveWordForward"),isRedo:Ap("redo"),isSplitBlock:Ap("splitBlock"),isTransposeCharacter:Ap("transposeCharacter"),isUndo:Ap("undo"),isTab:Ap("tab"),isSelectAll:Ap("selectAll")};function Ip(t){t.preventDefault()}var $p,Fp,_p,Bp={beforeinput:function(t,n,r){var o=t,i=r.getConfig().readOnly;if(Af&&!i&&yp(r,o.target)){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=ho(o.getTargetRanges(),1)[0];if(l){var c=jf.toSlateRange(r,l,{exactMatch:!1,suppressThrow:!1});a&&e.Range.equals(a,c)||e.Transforms.select(r,c)}}if(a&&e.Range.isExpanded(a)){var f=jf.getSelectedElems(r),d="table"===f[0].type,h="table-cell"!==f[f.length-1].type;if(d&&h)return;if(s.startsWith("delete")){var p=s.endsWith("Backward")?"backward":"forward";return void e.Editor.deleteFragment(r,{direction:p})}}switch(s){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":e.Editor.deleteFragment(r);break;case"deleteContent":case"deleteContentForward":e.Editor.deleteForward(r);break;case"deleteContentBackward":e.Editor.deleteBackward(r);break;case"deleteEntireSoftLine":e.Editor.deleteBackward(r,{unit:"line"}),e.Editor.deleteForward(r,{unit:"line"});break;case"deleteHardLineBackward":e.Editor.deleteBackward(r,{unit:"block"});break;case"deleteSoftLineBackward":e.Editor.deleteBackward(r,{unit:"line"});break;case"deleteHardLineForward":e.Editor.deleteForward(r,{unit:"block"});break;case"deleteSoftLineForward":e.Editor.deleteForward(r,{unit:"line"});break;case"deleteWordBackward":e.Editor.deleteBackward(r,{unit:"word"});break;case"deleteWordForward":e.Editor.deleteForward(r,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":e.Editor.insertBreak(r);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===s&&!ts.get(r))break;Rc(u)?r.insertData(u):"string"==typeof u&&e.Editor.insertText(r,u)}}}},blur:function(t,n,r){var o=t,i=n.isUpdatingSelection,a=n.latestElement;if(!r.getConfig().readOnly&&!i&&yp(r,o.target)){var s=jf.findDocumentOrShadowRoot(r);if(a!==s.activeElement){var u=o.relatedTarget;if(!(u===jf.toDOMNode(r,r)||Ic(u)&&u.hasAttribute("data-slate-spacer"))){if(null!=u&&Ac(u)&&jf.hasDOMNode(r,u)){var l=jf.toSlateNode(r,u);if(e.Element.isElement(l)&&!r.isVoid(l))return}if(Lf){var c=s.getSelection();null==c||c.removeAllRanges()}Xa.delete(r)}}}},focus:function(t,e,n){var r=jf.toDOMNode(n,n),o=jf.findDocumentOrShadowRoot(n);e.latestElement=o.activeElement,Rf&&t.target!==r?r.focus():Xa.set(n,!0)},click:function(t,n,r){if(!r.getConfig().readOnly&&wp(r,t.target)&&Ac(t.target)){var o=jf.toSlateNode(r,t.target),i=jf.findPath(r,o);if(e.Editor.hasPath(r,i))if(e.Node.get(r,i)===o){var a=e.Editor.start(r,i),s=e.Editor.end(r,i),u=e.Editor.void(r,{at:a}),l=e.Editor.void(r,{at:s});if(u&&l&&e.Path.equals(u[1],l[1])){var c=e.Editor.range(r,a);e.Transforms.select(r,c)}}}},compositionstart:function(t,n,r){if(yp(r,t.target)){var o=r.selection;if(o&&e.Range.isExpanded(o)&&(e.Editor.deleteFragment(r),Promise.resolve().then(function(){Np(n,r,!0)})),r.selection){var i=jf.toDOMRange(r,r.selection).startContainer,a=i.textContent||"";Rp.set(r,a),Lp.set(r,i)}n.isComposing=!0,function(t,e){var n;e.getConfig().placeholder&&e.isEmpty()&&t.showPlaceholder&&(null===(n=t.$placeholder)||void 0===n||n.hide(),t.showPlaceholder=!1)}(n,r)}},compositionend:function(t,n,r){var o=t;if(yp(r,o.target)){n.isComposing=!1;var i=r.selection;if(null!=i){(Df||Rf)&&jf.cleanExposedTexNodeInSelectionBlock(r);for(var a=e.Range.isBackward(i)?i.focus:i.anchor,s=ho(e.Editor.node(r,[a.path[0]]),1)[0],u=0;u<a.path.length;u+=1){var l=ho(e.Editor.node(r,a.path.slice(0,u+1)),1)[0];if(e.Element.isElement(l)&&((Lf||Rf)&&"link"===l.type||"code"===l.type)){jf.setNewKey(s);break}}var c=o.data;if(c){if(r.getConfig().maxLength){var f=jf.getLeftLengthOfMaxLength(r);if(f<c.length){var d=jf.toDOMRange(r,i);d.startContainer.nodeType===Node.TEXT_NODE&&(d.startContainer.textContent=Rp.get(r)||""),f>0&&e.Editor.insertText(r,c.slice(0,f)),n.changeViewState()}else e.Editor.insertText(r,c)}else{var h=jf.findDocumentOrShadowRoot(r).getSelection();h&&function(t,n){if(e.Range.isCollapsed(n)){var r=n.anchor,o=n.focus;if([2,3].includes(r.path.length)&&[2,3].includes(o.path.length)&&(0===r.offset||0===o.offset)){var i=e.Editor.node(t,r.path),a=0===r.offset?r.path:o.path,s=[a[0],a[1]-1];if(0===a[1])return!1;var u=e.Editor.node(t,s);if(e.Text.isText(u[0])&&e.Text.isText(i[0]))return!0}}}(r,i)&&(r.selection=jf.toSlateRange(r,h,{exactMatch:!1,suppressThrow:!1})),e.Editor.insertText(r,c)}Lf||setTimeout(function(){var t=r.selection;if(null!=t){var e=Lp.get(r);if(null!=e)jf.toDOMRange(r,t).startContainer!==e&&(e.textContent=Rp.get(r)||"")}})}}}},compositionupdate:function(t,e,n){yp(n,t.target)&&(e.isComposing=!0)},keydown:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&!n.isComposing&&yp(r,o.target)){if(function(t,e){var n=Ma.get(t),r=n&&n.getMenus(),o=Da.get(t),i=o&&o.getMenus(),a=co(co({},r),i);for(var s in a){var u=a[s],c=u.hotkey;if(c&&l.isHotkey(c,e)&&!u.isDisabled(t)){var f=u.getValue(t);u.exec(t,f)}}}(r,o),jp.isTab(o))return Ip(o),void r.handleTab();if(jp.isRedo(o))return Ip(o),void("function"==typeof r.redo&&r.redo());if(jp.isUndo(o))return Ip(o),void("function"==typeof r.undo&&r.undo());if(jp.isMoveLineBackward(o))return Ip(o),void e.Transforms.move(r,{unit:"line",reverse:!0});if(jp.isMoveLineForward(o))return Ip(o),void e.Transforms.move(r,{unit:"line"});if(jp.isExtendLineBackward(o))return Ip(o),void e.Transforms.move(r,{unit:"line",edge:"focus",reverse:!0});if(jp.isExtendLineForward(o))return Ip(o),void e.Transforms.move(r,{unit:"line",edge:"focus"});if(jp.isMoveBackward(o))return Ip(o),void(i&&e.Range.isCollapsed(i)?e.Transforms.move(r,{reverse:!0}):e.Transforms.collapse(r,{edge:"start"}));if(jp.isMoveForward(o))return Ip(o),void(i&&e.Range.isCollapsed(i)?e.Transforms.move(r):e.Transforms.collapse(r,{edge:"end"}));if(jp.isMoveWordBackward(o))return Ip(o),i&&e.Range.isExpanded(i)&&e.Transforms.collapse(r,{edge:"focus"}),void e.Transforms.move(r,{unit:"word",reverse:!0});if(jp.isMoveWordForward(o))return Ip(o),i&&e.Range.isExpanded(i)&&e.Transforms.collapse(r,{edge:"focus"}),void e.Transforms.move(r,{unit:"word"});if(jp.isSelectAll(o))return Ip(o),void r.selectAll();if(Af){if((Df||Lf)&&i&&(jp.isDeleteBackward(o)||jp.isDeleteForward(o))&&e.Range.isCollapsed(i)){var a=e.Node.parent(r,i.anchor.path);if(e.Element.isElement(a)&&e.Editor.isVoid(r,a)&&e.Editor.isInline(r,a))return o.preventDefault(),void e.Transforms.delete(r,{unit:"block"})}}else{if(jp.isBold(o)||jp.isItalic(o)||jp.isTransposeCharacter(o))return void Ip(o);if(jp.isSplitBlock(o))return Ip(o),void e.Editor.insertBreak(r);if(jp.isDeleteBackward(o))return Ip(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r));if(jp.isDeleteForward(o))return Ip(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r));if(jp.isDeleteLineBackward(o))return Ip(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r,{unit:"line"}));if(jp.isDeleteLineForward(o))return Ip(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r,{unit:"line"}));if(jp.isDeleteWordBackward(o))return Ip(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"backward"}):e.Editor.deleteBackward(r,{unit:"word"}));if(jp.isDeleteWordForward(o))return Ip(o),void(i&&e.Range.isExpanded(i)?e.Editor.deleteFragment(r,{direction:"forward"}):e.Editor.deleteForward(r,{unit:"word"}))}}},keypress:function(t,n,r){if(!Af&&!r.getConfig().readOnly&&yp(r,t.target)){t.preventDefault();var o=t.key;e.Editor.insertText(r,o)}},copy:function(t,e,n){var r=t;if(yp(n,r.target)){n.getConfig().readOnly||r.preventDefault();var o=r.clipboardData;if(null!=o){n.setFragmentData(o);var i=n.getConfig().customCopy;i&&i(n,r)}}},cut:function(t,n,r){var o=t,i=r.selection;if(!r.getConfig().readOnly&&(o.preventDefault(),yp(r,o.target))){var a=o.clipboardData;if(null!=a&&(r.setFragmentData(a),i))if(e.Range.isExpanded(i))e.Editor.deleteFragment(r);else{var s=e.Node.parent(r,i.anchor.path);e.Editor.isVoid(r,s)&&e.Transforms.delete(r)}}},paste:function(t,e,n){ts.set(n,!0);var r=t;if(!n.getConfig().readOnly&&yp(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void ts.set(n,!1);if(Lf||!Af||_c(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(t,n,r){if(wp(r,t.target)){var o=jf.toSlateNode(r,t.target);e.Editor.isVoid(r,o)&&t.preventDefault()}},dragstart:function(t,n,r){var o=t;if(wp(r,o.target)&&!r.getConfig().readOnly){var i=jf.toSlateNode(r,o.target),a=jf.findPath(r,i);if(e.Editor.isVoid(r,i)||e.Editor.void(r,{at:a,voids:!0})){var s=e.Editor.range(r,a);e.Transforms.select(r,s)}var u=o.dataTransfer;if(null!=u)jf.getSelectedNodeByType(r,"table")||(n.isDraggingInternally=!0,r.setFragmentData(u))}},dragend:function(t,e,n){var r=t;n.getConfig().readOnly||e.isDraggingInternally&&wp(n,r.target)&&(e.isDraggingInternally=!1)},drop:function(t,n,r){var o=t,i=o.dataTransfer;if(!r.getConfig().readOnly&&wp(r,o.target)&&null!=i&&!(Af&&Lf&&i.files.length>0)){o.preventDefault();var a=r.selection,s=jf.findEventRange(r,o);e.Transforms.select(r,s),n.isDraggingInternally&&(a&&e.Transforms.delete(r,{at:a}),n.isDraggingInternally=!1),r.insertData(i),r.isFocused()||r.focus()}}},Wp={};!function(){if(_p)return Wp;_p=1;var t=pr(),e=function(){if(Fp)return $p;Fp=1;var t=L(),e=St(),n=P(),r=R(),o=Nr(),i=cr(),a=xt(),s=me(),u=Ct(),l=Object.assign,c=Object.defineProperty,f=e([].concat);return $p=!l||r(function(){if(t&&1!==l({b:1},l(c({},"a",{enumerable:!0,get:function(){c(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},n={},r=Symbol("assign detection"),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach(function(t){n[t]=t}),7!==l({},e)[r]||o(l({},n)).join("")!==i})?function(e,r){for(var l=s(e),c=arguments.length,d=1,h=i.f,p=a.f;c>d;)for(var g,v=u(arguments[d++]),m=h?f(o(v),h(v)):o(v),y=m.length,b=0;y>b;)g=m[b++],t&&!n(p,v,g)||(l[g]=v[g]);return l}:l,$p}();t({target:"Object",stat:!0,arity:2,forced:Object.assign!==e},{assign:e})}();var Hp=[];var Up={};function Vp(t,e,n){var r=n.isInline(t)?"span":"div";return c.jsx(r,null,e)}function zp(t,n){var r,o=jf.findKey(n,t),i=n.isInline(t),a=e.Editor.isVoid(n,t),s=pf(t.type,o.id),u={id:s,key:o.id,"data-slate-node":"element","data-slate-inline":i},l=t.type,f=t.children,d=void 0===f?[]:f,h=function(t){return Up[t]||Vp}(l);r=a?null:d.map(function(e,r){return Gp(e,r,t,n)});var p=h(t,r,n);if(a){u["data-slate-void"]=!0;var g=i?"span":"div",v=ho(e.Node.texts(t),1),m=ho(v[0],1)[0],y=Gp(m,0,t,n),b=c.jsx(g,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},y);p=c.jsx(g,{style:{position:"relative"}},p,b),Ua.set(m,0),Va.set(m,t)}return null==p.data&&(p.data={}),Object.assign(p.data,u),a||i||(p=function(t,e){var n=e;return Hp.forEach(function(r){n=r(t,e)}),n}(t,p)),mc(function(){var e=Hc(s);null!=e&&(qa.set(o,e),Ja.set(t,e),Ka.set(e,t))}),p}function Kp(t,e){return void 0===e&&(e=!1),c.jsx("span",{"data-slate-string":!0},e?t+"\n":t)}function qp(t,e){return void 0===t&&(t=0),void 0===e&&(e=!1),c.jsx("span",{"data-slate-zero-width":e?"n":"z","data-slate-length":t},"\ufeff",e?c.jsx("br",null):null)}function Jp(t,n,r){if(null==t.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(t)));var o=jf.findKey(r,t),i=r.getConfig().decorate;if(null==i)throw new Error("Can not get config.decorate");var a,s=jf.findPath(r,t),u=i([t,s]),l=e.Text.decorations(t,u),f=l.map(function(o,i){var a=function(t,n,r,o,i){void 0===n&&(n=!1);var a=t.text,s=jf.findPath(i,r),u=e.Path.parent(s);if(e.Editor.isEditor(o))throw new Error("Text node ".concat(JSON.stringify(r)," parent is Editor"));return i.isVoid(o)?qp(e.Node.string(o).length):""!==a||o.children[o.children.length-1]!==r||i.isInline(o)||""!==e.Editor.string(i,u)?""===a?qp():n&&"\n"===a.slice(-1)?Kp(a,!0):Kp(a):qp(0,!0)}(o,i===l.length-1,t,n,r);return a=function(t,e){var n=e;return Hp.forEach(function(e){n=e(t,n)}),n}(o,a),c.jsx("span",{"data-slate-leaf":!0},a)}),d=(a=o.id,"w-e-text-".concat(a)),h=c.jsx("span",{"data-slate-node":"text",id:d,key:o.id},f);return mc(function(){var e=Hc(d);null!=e&&(qa.set(o,e),Ja.set(t,e),Ka.set(e,t))}),h}function Gp(t,n,r,o){return Ua.set(t,n),Va.set(t,r),e.Element.isElement(t)?zp(t,o):Jp(t,r,o)}var Yp=["props","attrs","style","dataset","on","hook"];function Xp(t){var e=t.data,n=void 0===e?{}:e,r=t.children,o=void 0===r?[]:r;Object.keys(n).forEach(function(e){var r,o,i=n[e];if("key"!==e){if(!Yp.includes(e)){if(e.startsWith("data-")){var a=e.slice(5);return a=f(a),function(t,e){null==t.data&&(t.data={});var n=t.data;null==n.dataset&&(n.dataset={});Object.assign(n.dataset,e)}(t,((r={})[a]=i,r)),void delete n[e]}!function(t,e){null==t.data&&(t.data={});var n=t.data;null==n.props&&(n.props={});Object.assign(n.props,e)}(t,(o={},o[e]=i,o)),delete n[e]}}else t.key=i}),o.length>0&&o.forEach(function(t){"string"!=typeof t&&Xp(t)})}function Qp(t,n){var r,i,a=t.$scroll,s=(r=t.id,"w-e-textarea-".concat(r)),u=n.getConfig(),l=u.readOnly,f=u.autoFocus,d=function(t,e){return void 0===e&&(e=!1),c.h("div#".concat(t),{props:{contentEditable:!e}})}(s,l),h=n.children||[];d.children=h.map(function(t,r){if(Wa.has(t)){var o=Wa.get(t);if(o){var i=ho(o,2),a=i[0],s=i[1];if(s)return a!==r&&(Ua.set(t,r),Wa.set(t,[r,s])),s}}var u=Gp(t,r,n,n);Xp(u);var l=n.getConfig().skipCacheTypes,c=void 0===l?["list-item"]:l;return e.Element.isElement(t)&&c.includes(t.type)||Wa.set(t,[r,u]),u});var p=Fa.get(t);if(null==p&&(p=!0),p){var g=function(t){return o('<div\n id="'.concat(t,'"\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>'))}(s);a.append(g),t.$textArea=g,i=g[0],(m=c.init([c.classModule,c.propsModule,c.styleModule,c.datasetModule,c.eventListenersModule,c.attributesModule]))(i,d),Fa.set(t,!1),_a.set(t,m)}else{var v=Ba.get(t),m=_a.get(t);if(null==v||null==m)return;i=v.elm,m(v,d)}if(null!=i||null!=(i=Hc(s))){if((p?f:n.isFocused())&&i.focus({preventScroll:!0}),p){var y=Dc(i);y&&Ya.set(n,y)}za.set(n,i),Ja.set(n,i),Ka.set(i,n),Ba.set(t,d)}}var Zp=1,tg=function(){function t(t){var n=this;this.id=Zp++,this.$textArea=null,this.$progressBar=o('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=o('<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=u(function(){var t=n.editorInstance;!function(t,n){var r=t.isComposing,o=t.isUpdatingSelection,i=t.isDraggingInternally;if(!(n.getConfig().readOnly||r||o||i)){var a=jf.findDocumentOrShadowRoot(n),s=a.activeElement,u=jf.toDOMNode(n,n),l=a.getSelection();if(s!==u)return Xa.delete(n),void e.Transforms.deselect(n);if(t.latestElement=s,Xa.set(n,!0),!l)return e.Transforms.deselect(n);var c=l.anchorNode,f=l.focusNode,d=yp(n,c)||bp(n,c),h=yp(n,f)||bp(n,f);if(d&&h){var p=jf.toSlateRange(n,l,{exactMatch:!1,suppressThrow:!1});e.Transforms.select(n,p)}}}(n,t)},100);var r=o(t);if(0===r.length)throw new Error("Cannot find textarea DOM by selector '".concat(t,"'"));this.$box=r;var i=o('<div class="w-e-text-container"></div>');i.append(this.$progressBar),i.append(this.$maxLengthInfo),r.append(i);var a=o('<div class="w-e-scroll"></div>');i.append(a),this.$scroll=a,this.$textAreaContainer=i,mc(function(){var t=n.editorInstance,e=jf.getWindow(t);e.document.addEventListener("selectionchange",n.onDOMSelectionChange),t.on(mo,function(){e.document.removeEventListener("selectionchange",n.onDOMSelectionChange)}),i.on("click",function(){return t.hidePanelOrModal()}),t.on(yo,n.changeViewState.bind(n));var o=t.getConfig(),a=o.onChange,s=o.scroll;a&&t.on(yo,function(){return a(t)}),s||(r.css("position","relative"),i.addClass("no-scroll")),n.onFocusAndOnBlur(),t.on(yo,n.changeMaxLengthInfo.bind(n)),n.bindEvent()})}return Object.defineProperty(t.prototype,"editorInstance",{get:function(){var t=Ra.get(this);if(null==t)throw new Error("Can not get editor instance");return t},enumerable:!1,configurable:!0}),t.prototype.bindEvent=function(){var t=this,e=this.$textArea,n=this.$scroll,o=this.editorInstance;null!=e&&(r(Bp,function(n,r){e.on(r,function(e){n(e,t,o)})}),o.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",u(function(){o.emit(bo)},100))))},t.prototype.onFocusAndOnBlur=function(){var t=this,e=this.editorInstance,n=e.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=e.selection,e.on(yo,function(){null==t.latestEditorSelection&&null!=e.selection?setTimeout(function(){return o&&o(e)}):null!=t.latestEditorSelection&&null==e.selection&&setTimeout(function(){return r&&r(e)}),t.latestEditorSelection=e.selection})},t.prototype.changeMaxLengthInfo=function(){var t=this.editorInstance,e=t.getConfig().maxLength;if(e){var n=e-jf.getLeftLengthOfMaxLength(t);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(e)}},t.prototype.changeProgress=function(t){var e=this.$progressBar;e.css("width","".concat(t,"%")),t>=100&&setTimeout(function(){e.hide(),e.css("width","0"),e.show()},1e3)},t.prototype.changeViewState=function(){var t=this,e=this.editorInstance;Qp(this,e),function(t,e){var n,r=e.getConfig().placeholder;if(r){var i=e.isEmpty();if(i&&!t.showPlaceholder&&!t.isComposing){if(null==t.$placeholder){var a=o('<div class="w-e-text-placeholder">'.concat(r,"</div>"));t.$textAreaContainer.append(a),t.$placeholder=a}return t.$placeholder.show(),void(t.showPlaceholder=!0)}!i&&t.showPlaceholder&&(null===(n=t.$placeholder)||void 0===n||n.hide(),t.showPlaceholder=!1)}}(this,e),mc(function(){Np(t,e)})},t.prototype.destroy=function(){this.$textAreaContainer.remove()},t}();function eg(t,n,r,o){if(Ua.set(t,n),Va.set(t,r),e.Element.isElement(t)){var i=t.children;if((void 0===i?[]:i).forEach(function(e,n){return eg(e,n,t,o)}),e.Editor.isVoid(o,t)){var a=ho(e.Node.texts(t),1),s=ho(a[0],1)[0];Ua.set(s,0),Va.set(s,t)}}}var ng={en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"};var rg,og,ig,ag,sg,ug={};function lg(){if(ag)return ig;ag=1;var t=Ft(),e=TypeError;return ig=function(n,r){if(!delete n[r])throw new e("Cannot delete property "+t(r)+" of "+t(n))}}!function(){if(sg)return ug;sg=1;var t=pr(),e=me(),n=Nn(),r=Tn(),o=Ln(),i=function(){if(og)return rg;og=1;var t=L(),e=gr(),n=TypeError,r=Object.getOwnPropertyDescriptor,o=t&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();return rg=o?function(t,o){if(e(t)&&!r(t,"length").writable)throw new n("Cannot set read only .length");return t.length=o}:function(t,e){return t.length=e}}(),a=vr(),s=Er(),u=mr(),l=lg(),c=Sr()("splice"),f=Math.max,d=Math.min;t({target:"Array",proto:!0,forced:!c},{splice:function(t,c){var h,p,g,v,m,y,b=e(this),w=o(b),x=n(t,w),E=arguments.length;for(0===E?h=p=0:1===E?(h=0,p=w-x):(h=E-2,p=d(f(r(c),0),w-x)),a(w+h-p),g=s(b,p),v=0;v<p;v++)(m=x+v)in b&&u(g,v,b[m]);if(g.length=p,h<p){for(v=x;v<w-p;v++)y=v+h,(m=v+p)in b?b[y]=b[m]:l(b,y);for(v=w;v>w-p+h;v--)l(b,v-1)}else if(h>p)for(v=w-p;v>x;v--)y=v+h-1,(m=v+p-1)in b?b[y]=b[m]:l(b,y);for(v=0;v<h;v++)b[v+x]=arguments[v+2];return i(b,w-p+h),g}})}();var cg=function(){function t(t,e){var n=this;this.$toolbar=o('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=s(function(){n.toolbarItems.forEach(function(t){t.changeMenuState()})},200),this.config=e;var r=o(t);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(t,"'"));this.$box=r;var i=this.$toolbar;i.on("mousedown",function(t){return t.preventDefault()},{passive:!1}),r.append(i),mc(function(){n.initToolbar(),n.lngListen=Gh(function(){return n.initToolbar()}),n.getEditorInstance().on(yo,n.changeToolbarState)})}return t.prototype.getMenus=function(){return this.menus},t.prototype.getConfig=function(){return this.config},t.prototype.initToolbar=function(){this.menus={};var t=this.$toolbar;null==t||t.empty(),this.registerItems(),this.changeToolbarState()},t.prototype.registerItems=function(){var t=this,e="",r=this.$toolbar,o=this.config,i=o.toolbarKeys,a=void 0===i?[]:i,s=o.insertKeys,u=void 0===s?{index:0,keys:[]}:s,l=o.excludeKeys,c=void 0===l?[]:l,f=n(a),d=[];d=Array.isArray(u)?u:[u];var h=0;d.forEach(function(t){var e=t.index+h;if(t.replaceFn&&f[e]){var n=t.replaceFn(f[e]);if(!n)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");f[e]=n}t.keys.length>0&&("string"==typeof t.keys&&(t.keys=[t.keys]),t.keys.forEach(function(t,n){f.splice(e+n,0,t)}),h+=t.keys.length)});var p=f.filter(function(t){var e="string"==typeof t?t:t.key;return!c.includes(e)}),g=p.length;p.forEach(function(n,o){if("|"===n){if(0===o)return;if(o+1===g)return;if("|"===e)return;var i=Zh();return r.append(i),void(e=n)}if("string"==typeof n)return t.registerSingleItem(n,t),void(e=n);t.registerGroup(n),e="group"})},t.prototype.registerGroup=function(t){var e=this,n=this.$toolbar,r=function(t){return new cp(t)}(t),o=t.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach(function(t){s.includes(t)||e.registerSingleItem(t,r)}),n.append(r.$elem)},t.prototype.registerSingleItem=function(t,e){var n=this.getEditorInstance(),r=e instanceof cp,o=this.menus,i=o[t];if(null==i){var a=Oo[t];if(null==a)throw new Error("Not found menu item factory by key '".concat(t,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(t,"') is not a function"));i=a(),o[t]=i}else console.warn("Duplicated toolbar menu key '".concat(t,"'\n重复注册了菜单栏 menu '").concat(t,"'"));var s=n.getMenuConfig(t);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=hp(t,i,r);(this.toolbarItems.push(u),Aa.set(u,n),r)?e.appendBarItem(u):e.$toolbar.append(u.$elem)},t.prototype.getEditorInstance=function(){var t=La.get(this);if(null==t)throw new Error("Can not get editor instance");return t},t.prototype.destroy=function(){var t;this.$toolbar.remove(),null===(t=this.lngListen)||void 0===t||t.call(this),this.menus={},this.toolbarItems=[]},t}();var fg,dg={};!function(){if(fg)return dg;fg=1;var t=L(),e=tn().EXISTS,n=St(),r=Ys(),o=Function.prototype,i=n(o.toString),a=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,s=n(a.exec);t&&!e&&r(o,"name",{configurable:!0,get:function(){try{return s(a,i(this))[1]}catch(t){return""}}})}(),t.DOMComment=xc,t.DOMElement=Ec,t.DOMNode=wc,t.DOMRange=Oc,t.DOMSelection=Cc,t.DOMStaticRange=kc,t.DOMText=Sc,t.DomEditor=jf,t.ELEM_TO_HTML_CONF=vf,t.PARSE_ELEM_HTML_CONF=af,t.PARSE_STYLE_HTML_FN_LIST=of,t.PRE_PARSE_HTML_CONF_LIST=rf,t.RENDER_ELEM_CONF=Up,t.RENDER_STYLE_HANDLER_LIST=Hp,t.STYLE_TO_HTML_FN_LIST=gf,t.TEXT_TAGS=nf,t.Toolbar=cg,t.coreCreateEditor=function(t){var o=t.selector,i=void 0===o?"":o,a=t.config,s=void 0===a?{}:a,u=t.content,l=t.html,c=t.plugins,f=void 0===c?[]:c,d=function(t){return[Jd,Rd,es,Td,nh,qd,Yd,so.withHistory].reduce(function(t,e){return e(t)},t)}(e.createEditor());if(i&&function(t,e){return df(t,"data-w-e-textarea",e)}(d,i))throw new Error("Repeated create editor by selector '".concat(i,"'"));var h=function(t){void 0===t&&(t={});var e=n(go),o={},i=t.MENU_CONF,a=void 0===i?{}:i;return r(e,function(t,e){o[e]=co(co({},t),a[e]||{})}),delete t.MENU_CONF,co({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:o,hoverbarKeys:{},customAlert:function(t,e){window.alert("".concat(e,":\n").concat(t))}},t)}(s);$a.set(d,h);var p=h.hoverbarKeys,g=void 0===p?{}:p;if(f.forEach(function(t){d=t(d)}),function(t,e){var n=e.html,r=e.content;null!=n?t.children=hf(t,n):r&&r.length&&(t.children=r),0===t.children.length&&(t.children=[{type:"paragraph",children:[{text:""}]}])}(d,{html:l,content:u}),i){var v=new tg(i);Na.set(d,v),Ra.set(v,d),v.changeViewState(),mc(function(){var t=v.$scroll;null!=t&&t.height()<300&&console.warn("".concat(ng.zh,"\n").concat(ng.en),{element:t,height:t.height()})});var m=void 0;Object.keys(g).length>0&&(m=new vp,Pa.set(m,d),Da.set(d,m)),d.on(yo,function(){d.hidePanelOrModal()}),d.on(bo,function(){d.hidePanelOrModal()})}else d.children.forEach(function(t,e){return eg(t,e,d,d)});var y=h.onCreated,b=h.onDestroyed;return y&&d.on(vo,function(){return y(d)}),b&&d.on(mo,function(){return b(d)}),mc(function(){return d.emit(vo)}),d},t.coreCreateToolbar=function(t,e){if(null==t)throw new Error("Cannot create toolbar, because editor is null");var n=e.selector,r=e.config,o=void 0===r?{}:r;if(function(t,e){return df(t,"data-w-e-toolbar",e)}(t,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=co({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new cg(n,i);return La.set(a,t),Ma.set(t,a),a},t.createUploader=function(t){var e=t.server,n=void 0===e?"":e,o=t.fieldName,i=void 0===o?"":o,a=t.maxFileSize,s=void 0===a?10485760:a,u=t.maxNumberOfFiles,l=void 0===u?100:u,c=t.meta,f=void 0===c?{}:c,p=t.metaWithUrl,g=void 0!==p&&p,v=t.headers,m=void 0===v?{}:v,y=t.withCredentials,b=void 0!==y&&y,w=t.timeout,x=void 0===w?1e4:w,E=t.onBeforeUpload,S=void 0===E?function(t){return t}:E,O=t.onSuccess,C=void 0===O?function(t,e){}:O,k=t.onError,T=void 0===k?function(t,e,n){console.error("".concat(t.name," upload error"),e,n)}:k,N=t.onProgress,R=void 0===N?function(t){}:N;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!i)throw new Error("Cannot get fieldName\n没有配置 fieldName");var L=n;g&&(L=function(t,e){var n=ho(t.split("#"),2),o=n[0],i=n[1],a=[];r(e,function(t,e){a.push("".concat(e,"=").concat(t))});var s=a.join("&");return o=o.indexOf("?")>0?"".concat(o,"&").concat(s):"".concat(o,"?").concat(s),i?"".concat(o,"#").concat(i):o}(L,f));var M=new d(co({onBeforeUpload:S,restrictions:{maxFileSize:s,maxNumberOfFiles:l},meta:f},t.uppyConfig)).use(h,co({endpoint:L,headers:m,formData:!0,fieldName:i,bundle:!0,withCredentials:b,timeout:x},t.xhrConfig));return M.on("complete",function(t){var e=t.successful[0],n=e.response,r=(null!=n?n:{}).body,o=void 0===r?{}:r;try{C(e,o)}catch(t){console.error("wangEditor upload file - onSuccess error",t)}}),M.on("progress",function(t){t<1||R(t)}),M.on("upload-error",function(t,e,n){try{T(t,e,n)}catch(t){console.error("wangEditor upload file - onError error",t)}}),M.on("restriction-failed",function(t,e){try{T(t,e)}catch(t){console.error("wangEditor upload file - onError error",t)}}),M},t.genModalButtonElems=function(t,e){var n=o('<div class="button-container"></div>'),r=o('<button type="button" id="'.concat(t,'">').concat(e,"</button>"));return n.append(r),[n[0],r[0]]},t.genModalInputElems=function(t,e,n){var r=o('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var i=o('<input type="text" id="'.concat(e,'" placeholder="').concat(n||"",'">'));return r.append(i),[r[0],i[0]]},t.genModalTextareaElems=function(t,e,n){var r=o('<label class="babel-container"></label>');r.append("<span>".concat(t,"</span>"));var i=o('<textarea type="text" id="'.concat(e,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(i),[r[0],i[0]]},t.getDefaultView=Dc,t.getEditableChild=Vc,t.getEditableChildAndIndex=Uc,t.getElementById=Hc,t.getFirstVoidChild=Kc,t.getPlainText=zc,t.getTagName=Jc,t.hasShadowRoot=Wc,t.i18nAddResources=function(t,e){qh.addResourceBundle(t,Jh,e,!0,!0)},t.i18nChangeLanguage=function(t){qh.changeLanguage(t)},t.i18nGetResources=function(t){return qh.getResourceBundle(t,Jh)},t.i18nListenLanguage=Gh,t.isDOMComment=jc,t.isDOMElement=Ic,t.isDOMNode=Ac,t.isDOMSelection=$c,t.isDOMText=Fc,t.isDataTransfer=Rc,t.isDocument=Tc,t.isHTMLElememt=Pc,t.isPlainTextOnlyPaste=_c,t.isShadowRoot=Nc,t.isUnprocessedListElement=Mc,t.normalizeDOMPoint=Bc,t.registerElemToHtmlConf=function(t){var e=t.type,n=t.elemToHtml;vf[e||""]=n},t.registerMenu=function(t,e){var n=t.key,r=t.factory,o=t.config,i=co(co({},o),e||{});if(null!=Oo[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));Oo[n]=r,function(t,e){null!=e&&(go[t]=e)}(n,i)},t.registerParseElemHtmlConf=function(t){var e=t.selector,n=t.parseElemHtml;af[e]=n},t.registerParseStyleHtmlHandler=function(t){of.push(t)},t.registerPreParseHtmlConf=function(t){rf.push(t)},t.registerRenderElemConf=function(t){var e=t.type,n=t.renderElem;Up[e||""]=n},t.registerStyleHandler=function(t){Hp.push(t)},t.registerStyleToHtmlHandler=function(t){gf.push(t)},t.t=Yh,t.walkTextNodes=qc});
|
|
9
9
|
//# sourceMappingURL=index.js.map
|