@wangeditor-next/editor 5.6.13 → 5.6.14
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/utils/weak-maps.d.ts +6 -7
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
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 qf=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.isPlainObject=function(t){var n,r;return!1!==e(t)&&(void 0===(n=t.constructor)||!1!==e(r=n.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},Yf}var Zf,Jf,Qf,ep={exports:{}},tp={};function np(){if(Zf)return tp;function e(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function t(e){return!!e&&!!e[G]}function n(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===K}(e)||Array.isArray(e)||!!e[W]||!!e.constructor[W]||l(e)||c(e))}function r(e,t,n){void 0===n&&(n=!1),0===o(e)?(n?Object.keys:Y)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function o(e){var t=e[G];return t?t.t>3?t.t-4:t.t:Array.isArray(e)?1:l(e)?2:c(e)?3:0}function i(e,t){return 2===o(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function a(e,t){return 2===o(e)?e.get(t):e[t]}function s(e,t,n){var r=o(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function l(e){return z&&e instanceof Map}function c(e){return $&&e instanceof Set}function d(e){return e.i||e.u}function f(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=X(e);delete t[G];for(var n=Y(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function p(e,i){return void 0===i&&(i=!1),g(e)||t(e)||!n(e)||(o(e)>1&&(e.set=e.add=e.clear=e.delete=h),Object.freeze(e),i&&r(e,(function(e,t){return p(t,!0)}),!0)),e}function h(){e(2)}function g(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(t){var n=Z[t];return n||e(18,t),n}function m(e,t){Z[e]||(Z[e]=t)}function y(){return j}function b(e,t){t&&(v("Patches"),e.o=[],e.v=[],e.s=t)}function E(e){C(e),e.p.forEach(w),e.p=null}function C(e){e===j&&(j=e.l)}function D(e){return j={p:[],l:j,h:e,_:!0,m:0}}function w(e){var t=e[G];0===t.t||1===t.t?t.j():t.O=!0}function A(t,r){r.m=r.p.length;var o=r.p[0],i=void 0!==t&&t!==o;return r.h.S||v("ES5").M(r,t,i),i?(o[G].P&&(E(r),e(4)),n(t)&&(t=S(r,t),r.l||O(r,t)),r.o&&v("Patches").g(o[G],t,r.o,r.v)):t=S(r,o,[]),E(r),r.o&&r.s(r.o,r.v),t!==V?t:void 0}function S(e,t,n){if(g(t))return t;var o=t[G];if(!o)return r(t,(function(r,i){return x(e,o,t,r,i,n)}),!0),t;if(o.A!==e)return t;if(!o.P)return O(e,o.u,!0),o.u;if(!o.R){o.R=!0,o.A.m--;var i=4===o.t||5===o.t?o.i=f(o.k):o.i;r(3===o.t?new Set(i):i,(function(t,r){return x(e,o,i,t,r,n)})),O(e,i,!1),n&&e.o&&v("Patches").F(o,n,e.o,e.v)}return o.i}function x(e,r,o,a,u,l){if(t(u)){var c=S(e,u,l&&r&&3!==r.t&&!i(r.D,a)?l.concat(a):void 0);if(s(o,a,c),!t(c))return;e._=!1}if(n(u)&&!g(u)){if(!e.h.K&&e.m<1)return;S(e,u),r&&r.A.l||O(e,u)}}function O(e,t,n){void 0===n&&(n=!1),e.h.K&&e._&&p(t,n)}function T(e,t){var n=e[G];return(n?d(n):e)[t]}function N(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function B(e){e.P||(e.P=!0,e.l&&B(e.l))}function k(e){e.i||(e.i=f(e.u))}function F(e,t,n){var r=l(t)?v("MapSet").$(t,n):c(t)?v("MapSet").C(t,n):e.S?function(e,t){var n=Array.isArray(e),r={t:n?1:0,A:t?t.A:y(),P:!1,R:!1,D:{},l:t,u:e,k:null,i:null,j:null,I:!1},o=r,i=J;n&&(o=[r],i=Q);var a=Proxy.revocable(o,i),s=a.revoke,u=a.proxy;return r.k=u,r.j=s,u}(t,n):v("ES5").J(t,n);return(n?n.A:y()).p.push(r),r}function P(i){return t(i)||e(22,i),function e(t){if(!n(t))return t;var i,u=t[G],l=o(t);if(u){if(!u.P&&(u.t<4||!v("ES5").N(u)))return u.u;u.R=!0,i=I(t,l),u.R=!1}else i=I(t,l);return r(i,(function(t,n){u&&a(u.u,t)===n||s(i,t,e(n))})),3===l?new Set(i):i}(i)}function I(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return f(e)}function R(){function e(e,t){var n=s[e];return n?n.enumerable=t:s[e]=n={configurable:!0,enumerable:t,get:function(){return J.get(this[G],e)},set:function(t){J.set(this[G],e,t)}},n}function n(e){for(var t=e.length-1;t>=0;t--){var n=e[t][G];if(!n.P)switch(n.t){case 5:a(n)&&B(n);break;case 4:o(n)&&B(n)}}}function o(e){for(var t=e.u,n=e.k,r=Y(n),o=r.length-1;o>=0;o--){var a=r[o];if(a!==G){var s=t[a];if(void 0===s&&!i(t,a))return!0;var l=n[a],c=l&&l[G];if(c?c.u!==s:!u(l,s))return!0}}var d=!!t[G];return r.length!==Y(t).length+(d?0:1)}function a(e){var t=e.k;if(t.length!==e.u.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var s={};m("ES5",{J:function(t,n){var r=Array.isArray(t),o=function(t,n){if(t){for(var r=Array(n.length),o=0;o<n.length;o++)Object.defineProperty(r,""+o,e(o,!0));return r}var i=X(n);delete i[G];for(var a=Y(i),s=0;s<a.length;s++){var u=a[s];i[u]=e(u,t||!!i[u].enumerable)}return Object.create(Object.getPrototypeOf(n),i)}(r,t),i={t:r?5:4,A:n?n.A:y(),P:!1,R:!1,D:{},l:n,u:t,k:o,i:null,O:!1,I:!1};return Object.defineProperty(o,G,{value:i,writable:!0}),o},M:function(e,o,s){s?t(o)&&o[G].A===e&&n(e.p):(e.o&&function e(t){if(t&&"object"==typeof t){var n=t[G];if(n){var o=n.u,s=n.k,u=n.D,l=n.t;if(4===l)r(s,(function(t){t!==G&&(void 0!==o[t]||i(o,t)?u[t]||e(s[t]):(u[t]=!0,B(n)))})),r(o,(function(e){void 0!==s[e]||i(s,e)||(u[e]=!1,B(n))}));else if(5===l){if(a(n)&&(B(n),u.length=!0),s.length<o.length)for(var c=s.length;c<o.length;c++)u[c]=!1;else for(var d=o.length;d<s.length;d++)u[d]=!0;for(var f=Math.min(s.length,o.length),p=0;p<f;p++)void 0===u[p]&&e(s[p])}}}}(e.p[0]),n(e.p))},N:function(e){return 4===e.t?o(e):a(e)}})}function L(){function s(e){if(!n(e))return e;if(Array.isArray(e))return e.map(s);if(l(e))return new Map(Array.from(e.entries()).map((function(e){return[e[0],s(e[1])]})));if(c(e))return new Set(Array.from(e).map(s));var t=Object.create(Object.getPrototypeOf(e));for(var r in e)t[r]=s(e[r]);return i(e,W)&&(t[W]=e[W]),t}function u(e){return t(e)?s(e):e}var d="add";m("Patches",{W:function(t,n){return n.forEach((function(n){for(var r=n.path,i=n.op,u=t,l=0;l<r.length-1;l++){var c=o(u),f=""+r[l];0!==c&&1!==c||"__proto__"!==f&&"constructor"!==f||e(24),"function"==typeof u&&"prototype"===f&&e(24),"object"!=typeof(u=a(u,f))&&e(15,r.join("/"))}var p=o(u),h=s(n.value),g=r[r.length-1];switch(i){case"replace":switch(p){case 2:return u.set(g,h);case 3:e(16);default:return u[g]=h}case d:switch(p){case 1:return"-"===g?u.push(h):u.splice(g,0,h);case 2:return u.set(g,h);case 3:return u.add(h);default:return u[g]=h}case"remove":switch(p){case 1:return u.splice(g,1);case 2:return u.delete(g);case 3:return u.delete(n.value);default:return delete u[g]}default:e(17,i)}})),t},F:function(e,t,n,o){switch(e.t){case 0:case 4:case 2:return function(e,t,n,o){var s=e.u,l=e.i;r(e.D,(function(e,r){var c=a(s,e),f=a(l,e),p=r?i(s,e)?"replace":d:"remove";if(c!==f||"replace"!==p){var h=t.concat(e);n.push("remove"===p?{op:p,path:h}:{op:p,path:h,value:f}),o.push(p===d?{op:"remove",path:h}:"remove"===p?{op:d,path:h,value:u(c)}:{op:"replace",path:h,value:u(c)})}}))}(e,t,n,o);case 5:case 1:return function(e,t,n,r){var o=e.u,i=e.D,a=e.i;if(a.length<o.length){var s=[a,o];o=s[0],a=s[1];var l=[r,n];n=l[0],r=l[1]}for(var c=0;c<o.length;c++)if(i[c]&&a[c]!==o[c]){var f=t.concat([c]);n.push({op:"replace",path:f,value:u(a[c])}),r.push({op:"replace",path:f,value:u(o[c])})}for(var p=o.length;p<a.length;p++){var h=t.concat([p]);n.push({op:d,path:h,value:u(a[p])})}o.length<a.length&&r.push({op:"replace",path:t.concat(["length"]),value:o.length})}(e,t,n,o);case 3:return function(e,t,n,r){var o=e.u,i=e.i,a=0;o.forEach((function(e){if(!i.has(e)){var o=t.concat([a]);n.push({op:"remove",path:o,value:e}),r.unshift({op:d,path:o,value:e})}a++})),a=0,i.forEach((function(e){if(!o.has(e)){var i=t.concat([a]);n.push({op:d,path:i,value:e}),r.unshift({op:"remove",path:i,value:e})}a++}))}(e,t,n,o)}},g:function(e,t,n,r){n.push({op:"replace",path:[],value:t===V?void 0:t}),r.push({op:"replace",path:[],value:e.u})}})}function _(){function t(e,t){function n(){this.constructor=e}s(e,t),e.prototype=(n.prototype=t.prototype,new n)}function o(e){e.i||(e.D=new Map,e.i=new Map(e.u))}function i(e){e.i||(e.i=new Set,e.u.forEach((function(t){if(n(t)){var r=F(e.A.h,t,e);e.p.set(t,r),e.i.add(r)}else e.i.add(t)})))}function a(t){t.O&&e(3,JSON.stringify(d(t)))}var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},u=function(){function e(e,t){return this[G]={t:2,l:t,A:t?t.A:y(),P:!1,R:!1,i:void 0,D:void 0,u:e,k:this,I:!1,O:!1},this}t(e,Map);var i=e.prototype;return Object.defineProperty(i,"size",{get:function(){return d(this[G]).size}}),i.has=function(e){return d(this[G]).has(e)},i.set=function(e,t){var n=this[G];return a(n),d(n).has(e)&&d(n).get(e)===t||(o(n),B(n),n.D.set(e,!0),n.i.set(e,t),n.D.set(e,!0)),this},i.delete=function(e){if(!this.has(e))return!1;var t=this[G];return a(t),o(t),B(t),t.D.set(e,!1),t.i.delete(e),!0},i.clear=function(){var e=this[G];a(e),d(e).size&&(o(e),B(e),e.D=new Map,r(e.u,(function(t){e.D.set(t,!1)})),e.i.clear())},i.forEach=function(e,t){var n=this;d(this[G]).forEach((function(r,o){e.call(t,n.get(o),o,n)}))},i.get=function(e){var t=this[G];a(t);var r=d(t).get(e);if(t.R||!n(r))return r;if(r!==t.u.get(e))return r;var i=F(t.A.h,r,t);return o(t),t.i.set(e,i),i},i.keys=function(){return d(this[G]).keys()},i.values=function(){var e,t=this,n=this.keys();return(e={})[q]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},i.entries=function(){var e,t=this,n=this.keys();return(e={})[q]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},i[q]=function(){return this.entries()},e}(),l=function(){function e(e,t){return this[G]={t:3,l:t,A:t?t.A:y(),P:!1,R:!1,i:void 0,u:e,k:this,p:new Map,O:!1,I:!1},this}t(e,Set);var n=e.prototype;return Object.defineProperty(n,"size",{get:function(){return d(this[G]).size}}),n.has=function(e){var t=this[G];return a(t),t.i?!!t.i.has(e)||!(!t.p.has(e)||!t.i.has(t.p.get(e))):t.u.has(e)},n.add=function(e){var t=this[G];return a(t),this.has(e)||(i(t),B(t),t.i.add(e)),this},n.delete=function(e){if(!this.has(e))return!1;var t=this[G];return a(t),i(t),B(t),t.i.delete(e)||!!t.p.has(e)&&t.i.delete(t.p.get(e))},n.clear=function(){var e=this[G];a(e),d(e).size&&(i(e),B(e),e.i.clear())},n.values=function(){var e=this[G];return a(e),i(e),e.i.values()},n.entries=function(){var e=this[G];return a(e),i(e),e.i.entries()},n.keys=function(){return this.values()},n[q]=function(){return this.values()},n.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},e}();m("MapSet",{$:function(e,t){return new u(e,t)},C:function(e,t){return new l(e,t)}})}var M;Zf=1,Object.defineProperty(tp,"__esModule",{value:!0});var j,H="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),z="undefined"!=typeof Map,$="undefined"!=typeof Set,U="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,V=H?Symbol.for("immer-nothing"):((M={})["immer-nothing"]=!0,M),W=H?Symbol.for("immer-draftable"):"__$immer_draftable",G=H?Symbol.for("immer-state"):"__$immer_state",q="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",K=""+Object.prototype.constructor,Y="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,X=Object.getOwnPropertyDescriptors||function(e){var t={};return Y(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Z={},J={get:function(e,t){if(t===G)return e;var r=d(e);if(!i(r,t))return function(e,t,n){var r,o=N(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,r,t);var o=r[t];return e.R||!n(o)?o:o===T(e.u,t)?(k(e),e.i[t]=F(e.A.h,o,e)):o},has:function(e,t){return t in d(e)},ownKeys:function(e){return Reflect.ownKeys(d(e))},set:function(e,t,n){var r=N(d(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=T(d(e),t),a=null==o?void 0:o[G];if(a&&a.u===n)return e.i[t]=n,e.D[t]=!1,!0;if(u(n,o)&&(void 0!==n||i(e.u,t)))return!0;k(e),B(e)}return e.i[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.i)||(e.i[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==T(e.u,t)||t in e.u?(e.D[t]=!1,k(e),B(e)):delete e.D[t],e.i&&delete e.i[t],!0},getOwnPropertyDescriptor:function(e,t){var n=d(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.t||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){e(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.u)},setPrototypeOf:function(){e(12)}},Q={};r(J,(function(e,t){Q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Q.deleteProperty=function(e,t){return J.deleteProperty.call(this,e[0],t)},Q.set=function(e,t,n){return J.set.call(this,e[0],t,n,e[0])};var ee=function(){function r(t){var r=this;this.S=U,this.K=!0,this.produce=function(t,o,i){if("function"==typeof t&&"function"!=typeof o){var a=o;o=t;var s=r;return function(e){var t=this;void 0===e&&(e=a);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return s.produce(e,(function(e){var n;return(n=o).call.apply(n,[t,e].concat(r))}))}}var u;if("function"!=typeof o&&e(6),void 0!==i&&"function"!=typeof i&&e(7),n(t)){var l=D(r),c=F(r,t,void 0),d=!0;try{u=o(c),d=!1}finally{d?E(l):C(l)}return"undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return b(l,i),A(e,l)}),(function(e){throw E(l),e})):(b(l,i),A(u,l))}if(!t||"object"!=typeof t){if((u=o(t))===V)return;return void 0===u&&(u=t),r.K&&p(u,!0),u}e(21,t)},this.produceWithPatches=function(e,t){return"function"==typeof e?function(t){for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return r.produceWithPatches(t,(function(t){return e.apply(void 0,[t].concat(o))}))}:[r.produce(e,t,(function(e,t){n=e,o=t})),n,o];var n,o},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var o=r.prototype;return o.createDraft=function(r){n(r)||e(8),t(r)&&(r=P(r));var o=D(this),i=F(this,r,void 0);return i[G].I=!0,C(o),i},o.finishDraft=function(e,t){var n=(e&&e[G]).A;return b(n,t),A(void 0,n)},o.setAutoFreeze=function(e){this.K=e},o.setUseProxies=function(t){t&&!U&&e(20),this.S=t},o.applyPatches=function(e,n){var r;for(r=n.length-1;r>=0;r--){var o=n[r];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}r>-1&&(n=n.slice(r+1));var i=v("Patches").W;return t(e)?i(e,n):this.produce(e,(function(e){return i(e,n)}))},r}(),te=new ee,ne=te.produce,re=te.produceWithPatches.bind(te),oe=te.setAutoFreeze.bind(te),ie=te.setUseProxies.bind(te),ae=te.applyPatches.bind(te),se=te.createDraft.bind(te),ue=te.finishDraft.bind(te);return tp.Immer=ee,tp.applyPatches=ae,tp.castDraft=function(e){return e},tp.castImmutable=function(e){return e},tp.createDraft=se,tp.current=P,tp.default=ne,tp.enableAllPlugins=function(){R(),_(),L()},tp.enableES5=R,tp.enableMapSet=_,tp.enablePatches=L,tp.finishDraft=ue,tp.freeze=p,tp.immerable=W,tp.isDraft=t,tp.isDraftable=n,tp.nothing=V,tp.original=function(n){return t(n)||e(23,n),n[G].u},tp.produce=ne,tp.produceWithPatches=re,tp.setAutoFreeze=oe,tp.setUseProxies=ie,tp}function rp(){return Jf||(Jf=1,ep.exports=np()),ep.exports}function op(){if(Qf)return Kf;Qf=1,Object.defineProperty(Kf,"__esModule",{value:!0});var e=Xf(),t=rp();function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,t){return e(t={exports:{}},t.exports),t.exports}var o=r((function(e){e.exports=function(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},e.exports.default=e.exports,e.exports.__esModule=!0}));n(o);var i=r((function(e){e.exports=function(e){if(Array.isArray(e))return o(e)},e.exports.default=e.exports,e.exports.__esModule=!0}));n(i);var a=r((function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0}));n(a);var s=r((function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0}));n(s);var u=r((function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}));n(u);var l=n(r((function(e){e.exports=function(e){return i(e)||a(e)||s(e)||u()},e.exports.default=e.exports,e.exports.__esModule=!0}))),c=r((function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0}));n(c);var d=r((function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0}));n(d);var f=r((function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}));n(f);var p=r((function(e){e.exports=function(e,t){return c(e)||d(e,t)||s(e,t)||f()},e.exports.default=e.exports,e.exports.__esModule=!0})),h=n(p),g=n(r((function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0}))),v=new WeakMap,m=new WeakMap,y=new WeakMap,b=new WeakMap,E=new WeakMap,C=new WeakMap;function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(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 S(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 S(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 S(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 x=function(e){switch(e.type){case"insert_text":case"remove_text":case"set_node":var t=e.path;return xe.levels(t);case"insert_node":var n=e.node,r=e.path,o=xe.levels(r),i=Ue.isText(n)?[]:Array.from(De.nodes(n),(function(e){var t=h(e,2)[1];return r.concat(t)}));return[].concat(l(o),l(i));case"merge_node":var a=e.path,s=xe.ancestors(a),u=xe.previous(a);return[].concat(l(s),[u]);case"move_node":var c=e.path,d=e.newPath;if(xe.equals(c,d))return[];var f,p=[],g=[],v=A(xe.ancestors(c));try{for(v.s();!(f=v.n()).done;){var m=f.value,y=xe.transform(m,e);p.push(y)}}catch(e){v.e(e)}finally{v.f()}var b,E=A(xe.ancestors(d));try{for(E.s();!(b=E.n()).done;){var C=b.value,D=xe.transform(C,e);g.push(D)}}catch(e){E.e(e)}finally{E.f()}var w=g[g.length-1],S=d[d.length-1],x=w.concat(S);return[].concat(p,g,[x]);case"remove_node":var O=e.path,T=xe.ancestors(O);return l(T);case"split_node":var N=e.path,B=xe.levels(N),k=xe.next(N);return[].concat(l(B),[k]);default:return[]}},O=r((function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0}));n(O);var T=r((function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o=O(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.default=e.exports,e.exports.__esModule=!0})),N=n(T);function B(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 k(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 k(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 k(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 F,P=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!n,o=n?j(e):e,i=F.None,a=F.None,s=0,u=null,l=B(o);try{for(l.s();!(t=l.n()).done;){var c=t.value,d=c.codePointAt(0);if(!d)break;var f=Z(c,d),p=h(r?[a,f]:[f,i],2);if(i=p[0],a=p[1],J(i,F.ZWJ)&&J(a,F.ExtPict)&&!ne(r?e.substring(0,s):e.substring(0,e.length-s)))break;if(J(i,F.RI)&&J(a,F.RI)&&!(u=null!==u?!u:!!r||oe(e.substring(0,e.length-s))))break;if(i!==F.None&&a!==F.None&&ee(i,a))break;s+=c.length}}catch(e){l.e(e)}finally{l.f()}return s||1},I=/\s/,R=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,L=/['\u2018\u2019]/,_=function(e,t,n){if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},M=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(I.test(t))return!1;if(L.test(t)){var o=P(n,r),i=_(n,o,r),a=h(i,2);if(e(a[0],a[1],r))return!0}return!R.test(t)},j=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var r=e.charAt(t-n);if(z(r.charCodeAt(0))){var o=e.charAt(t-n-1);if(H(o.charCodeAt(0))){yield o+r,n++;continue}}yield r}},H=function(e){return e>=55296&&e<=56319},z=function(e){return e>=56320&&e<=57343};!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(F||(F={}));var $=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,U=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,V=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,W=/^[\u1100-\u115F\uA960-\uA97C]$/,G=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,q=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,K=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Y=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,X=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,Z=function(e,t){var n=F.Any;return-1!==e.search($)&&(n|=F.Extend),8205===t&&(n|=F.ZWJ),t>=127462&&t<=127487&&(n|=F.RI),-1!==e.search(U)&&(n|=F.Prepend),-1!==e.search(V)&&(n|=F.SpacingMark),-1!==e.search(W)&&(n|=F.L),-1!==e.search(G)&&(n|=F.V),-1!==e.search(q)&&(n|=F.T),-1!==e.search(K)&&(n|=F.LV),-1!==e.search(Y)&&(n|=F.LVT),-1!==e.search(X)&&(n|=F.ExtPict),n};function J(e,t){return!!(e&t)}var Q=[[F.L,F.L|F.V|F.LV|F.LVT],[F.LV|F.V,F.V|F.T],[F.LVT|F.T,F.T],[F.Any,F.Extend|F.ZWJ],[F.Any,F.SpacingMark],[F.Prepend,F.Any],[F.ZWJ,F.ExtPict],[F.RI,F.RI]];function ee(e,t){return-1===Q.findIndex((function(n){return J(e,n[0])&&J(t,n[1])}))}var te=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,ne=function(e){return-1!==e.search(te)},re=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,oe=function(e){var t=e.match(re);return null!==t&&t[0].length/2%2==1},ie=function(t){return e.isPlainObject(t)&&De.isNodeList(t.children)&&!he.isEditor(t)},ae={isAncestor:function(t){return e.isPlainObject(t)&&De.isNodeList(t.children)},isElement:ie,isElementList:function(e){return Array.isArray(e)&&e.every((function(e){return ae.isElement(e)}))},isElementProps:function(e){return void 0!==e.children},isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return ie(e)&&e[n]===t},matches:function(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},se=["text"],ue=["text"];function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(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 fe(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 fe(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 fe(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 pe=new WeakMap,he={above:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.voids,r=void 0!==n&&n,o=t.mode,i=void 0===o?"lowest":o,a=t.at,s=void 0===a?e.selection:a,u=t.match;if(s){var l,c=he.path(e,s),d="lowest"===i,f=de(he.levels(e,{at:c,voids:r,match:u,reverse:d}));try{for(f.s();!(l=f.n()).done;){var p=h(l.value,2),g=p[0],v=p[1];if(!Ue.isText(g)&&!xe.equals(c,v))return[g,v]}}catch(e){f.e(e)}finally{f.f()}}},addMark:function(e,t,n){e.addMark(t,n)},after:function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:he.point(e,t,{edge:"end"}),focus:he.end(e,[])},a=o.distance,s=void 0===a?1:a,u=0,l=de(he.positions(e,ce(ce({},o),{},{at:i})));try{for(l.s();!(r=l.n()).done;){var c=r.value;if(u>s)break;0!==u&&(n=c),u++}}catch(e){l.e(e)}finally{l.f()}return n},before:function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:he.start(e,[]),focus:he.point(e,t,{edge:"start"})},a=o.distance,s=void 0===a?1:a,u=0,l=de(he.positions(e,ce(ce({},o),{},{at:i,reverse:!0})));try{for(l.s();!(r=l.n()).done;){var c=r.value;if(u>s)break;0!==u&&(n=c),u++}}catch(e){l.e(e)}finally{l.f()}return n},deleteBackward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,n=void 0===t?"character":t;e.deleteBackward(n)},deleteForward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,n=void 0===t?"character":t;e.deleteForward(n)},deleteFragment:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).direction,n=void 0===t?"forward":t;e.deleteFragment(n)},edges:function(e,t){return[he.start(e,t),he.end(e,t)]},end:function(e,t){return he.point(e,t,{edge:"end"})},first:function(e,t){var n=he.path(e,t,{edge:"start"});return he.node(e,n)},fragment:function(e,t){var n=he.range(e,t),r=De.fragment(e,n);return r},hasBlocks:function(e,t){return t.children.some((function(t){return he.isBlock(e,t)}))},hasInlines:function(e,t){return t.children.some((function(t){return Ue.isText(t)||he.isInline(e,t)}))},hasTexts:function(e,t){return t.children.every((function(e){return Ue.isText(e)}))},insertBreak:function(e){e.insertBreak()},insertFragment:function(e,t){e.insertFragment(t)},insertNode:function(e,t){e.insertNode(t)},insertText:function(e,t){e.insertText(t)},isBlock:function(e,t){return ae.isElement(t)&&!e.isInline(t)},isEditor:function(t){if(!e.isPlainObject(t))return!1;var n=pe.get(t);if(void 0!==n)return n;var r="function"==typeof t.addMark&&"function"==typeof t.apply&&"function"==typeof t.deleteBackward&&"function"==typeof t.deleteForward&&"function"==typeof t.deleteFragment&&"function"==typeof t.insertBreak&&"function"==typeof t.insertFragment&&"function"==typeof t.insertNode&&"function"==typeof t.insertText&&"function"==typeof t.isInline&&"function"==typeof t.isVoid&&"function"==typeof t.normalizeNode&&"function"==typeof t.onChange&&"function"==typeof t.removeMark&&(null===t.marks||e.isPlainObject(t.marks))&&(null===t.selection||Ie.isRange(t.selection))&&De.isNodeList(t.children)&&Se.isOperationList(t.operations);return pe.set(t,r),r},isEnd:function(e,t,n){var r=he.end(e,n);return Be.equals(t,r)},isEdge:function(e,t,n){return he.isStart(e,t,n)||he.isEnd(e,t,n)},isEmpty:function(e,t){var n=t.children,r=h(n,1)[0];return 0===n.length||1===n.length&&Ue.isText(r)&&""===r.text&&!e.isVoid(t)},isInline:function(e,t){return ae.isElement(t)&&e.isInline(t)},isNormalizing:function(e){var t=y.get(e);return void 0===t||t},isStart:function(e,t,n){if(0!==t.offset)return!1;var r=he.start(e,n);return Be.equals(t,r)},isVoid:function(e,t){return ae.isElement(t)&&e.isVoid(t)},last:function(e,t){var n=he.path(e,t,{edge:"end"});return he.node(e,n)},leaf:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n);return[De.leaf(e,r),r]},levels:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.reverse,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.match;if(null==u&&(u=function(){return!0}),r){var l,c=[],d=he.path(e,r),f=de(De.levels(e,d));try{for(f.s();!(l=f.n()).done;){var p=h(l.value,2),g=p[0],v=p[1];if(u(g,v)&&(c.push([g,v]),!s&&he.isVoid(e,g)))break}}catch(e){f.e(e)}finally{f.f()}i&&c.reverse(),yield*c}},marks:function(e){var t=e.marks,n=e.selection;if(!n)return null;if(t)return t;if(Ie.isExpanded(n)){var r=he.nodes(e,{match:Ue.isText}),o=h(r,1)[0];if(o){var i=h(o,1)[0];return i.text,N(i,se)}return{}}var a=n.anchor,s=a.path,u=he.leaf(e,s),l=h(u,1)[0];if(0===a.offset){var c=he.previous(e,{at:s,match:Ue.isText}),d=he.above(e,{match:function(t){return he.isBlock(e,t)}});if(c&&d){var f=h(c,2),p=f[0],g=f[1],v=h(d,2)[1];xe.isAncestor(v,g)&&(l=p)}}var m=l;return m.text,N(m,ue)},next:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=he.after(e,u,{voids:i});if(l){var c=he.last(e,[]),d=h(c,2)[1],f=[l.path,d];if(xe.isPath(u)&&0===u.length)throw new Error("Cannot get the next node from the root node!");if(null==a)if(xe.isPath(u)){var p=he.parent(e,u),g=h(p,1)[0];a=function(e){return g.children.includes(e)}}else a=function(){return!0};var v=he.nodes(e,{at:f,match:a,mode:r,voids:i}),m=h(v,1)[0];return m}}},node:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n),o=De.get(e,r);return[o,r]},nodes:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.mode,i=void 0===o?"all":o,a=t.universal,s=void 0!==a&&a,u=t.reverse,l=void 0!==u&&u,c=t.voids,d=void 0!==c&&c,f=t.match;if(f||(f=function(){return!0}),r){var p,g;if(ve.isSpan(r))p=r[0],g=r[1];else{var v=he.path(e,r,{edge:"start"}),m=he.path(e,r,{edge:"end"});p=l?m:v,g=l?v:m}var y,b,E=De.nodes(e,{reverse:l,from:p,to:g,pass:function(t){var n=h(t,1)[0];return!d&&he.isVoid(e,n)}}),C=[],D=de(E);try{for(D.s();!(b=D.n()).done;){var w=h(b.value,2),A=w[0],S=w[1],x=y&&0===xe.compare(S,y[1]);if("highest"!==i||!x)if(f(A,S))if("lowest"===i&&x)y=[A,S];else{var O="lowest"===i?y:[A,S];O&&(s?C.push(O):yield O),y=[A,S]}else if(s&&!x&&Ue.isText(A))return}}catch(e){D.e(e)}finally{D.f()}"lowest"===i&&y&&(s?C.push(y):yield y),s&&(yield*C)}},normalize:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).force,n=void 0!==t&&t,r=function(e){return v.get(e)||[]};if(he.isNormalizing(e)){if(n){var o=Array.from(De.nodes(e),(function(e){return h(e,2)[1]}));v.set(e,o)}0!==r(e).length&&he.withoutNormalizing(e,(function(){var t,n=de(r(e));try{for(n.s();!(t=n.n()).done;){var o=t.value;if(De.has(e,o)){var i=he.node(e,o),a=h(i,2),s=a[0];a[1];ae.isElement(s)&&0===s.children.length&&e.normalizeNode(i)}}}catch(e){n.e(e)}finally{n.f()}for(var u=42*r(e).length,l=0;0!==r(e).length;){if(l>u)throw new Error("\n Could not completely normalize the editor after ".concat(u," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.\n "));var c=r(e).pop();if(De.has(e,c)){var d=he.node(e,c);e.normalizeNode(d)}l++}}))}},parent:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n),o=xe.parent(r);return he.node(e,o)},path:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.depth,o=n.edge;if(xe.isPath(t))if("start"===o){var i=De.first(e,t);t=h(i,2)[1]}else if("end"===o){var a=De.last(e,t);t=h(a,2)[1]}return Ie.isRange(t)&&(t="start"===o?Ie.start(t):"end"===o?Ie.end(t):xe.common(t.anchor.path,t.focus.path)),Be.isPoint(t)&&(t=t.path),null!=r&&(t=t.slice(0,r)),t},hasPath:function(e,t){return De.has(e,t)},pathRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.pathRefs(e).delete(r),r.current=null,t}};return he.pathRefs(e).add(r),r},pathRefs:function(e){var t=b.get(e);return t||(t=new Set,b.set(e,t)),t},point:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).edge,r=void 0===n?"start":n;if(xe.isPath(t)){var o;if("end"===r){var i=De.last(e,t);o=h(i,2)[1]}else{var a=De.first(e,t);o=h(a,2)[1]}var s=De.get(e,o);if(!Ue.isText(s))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:o,offset:"end"===r?s.text.length:0}}if(Ie.isRange(t)){var u=Ie.edges(t),l=h(u,2),c=l[0],d=l[1];return"start"===r?c:d}return t},pointRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.pointRefs(e).delete(r),r.current=null,t}};return he.pointRefs(e).add(r),r},pointRefs:function(e){var t=E.get(e);return t||(t=new Set,E.set(e,t)),t},positions:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.unit,i=void 0===o?"offset":o,a=t.reverse,s=void 0!==a&&a,u=t.voids,l=void 0!==u&&u;if(r){var c,d=he.range(e,r),f=Ie.edges(d),p=h(f,2),g=p[0],v=p[1],m=s?v:g,y=!1,b="",E=0,C=0,D=0,w=de(he.nodes(e,{at:r,reverse:s,voids:l}));try{for(w.s();!(c=w.n()).done;){var A=h(c.value,2),S=A[0],x=A[1];if(ae.isElement(S)){if(!l&&e.isVoid(S)){yield he.start(e,x);continue}if(e.isInline(S))continue;if(he.hasInlines(e,S)){var O=xe.isAncestor(x,v.path)?v:he.end(e,x),T=xe.isAncestor(x,g.path)?g:he.start(e,x);b=he.string(e,{anchor:T,focus:O},{voids:l}),y=!0}}if(Ue.isText(S)){var N=xe.equals(x,m.path);for(N?(C=s?m.offset:S.text.length-m.offset,D=m.offset):(C=S.text.length,D=s?C:0),(N||y||"offset"===i)&&(yield{path:x,offset:D},y=!1);;){if(0===E){if(""===b)break;E=B(b,i,s),b=_(b,E,s)[1]}if(D=s?D-E:D+E,(C-=E)<0){E=-C;break}E=0,yield{path:x,offset:D}}}}}catch(e){w.e(e)}finally{w.f()}}function B(e,t,n){return"character"===t?P(e,n):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;e.length>0;){var o=P(e,t),i=_(e,o,t),a=h(i,2),s=a[0],u=a[1];if(M(s,u,t))r=!0,n+=o;else{if(r)break;n+=o}e=u}return n}(e,n):"line"===t||"block"===t?e.length:1}},previous:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=he.before(e,u,{voids:i});if(l){var c=he.first(e,[]),d=h(c,2)[1],f=[l.path,d];if(xe.isPath(u)&&0===u.length)throw new Error("Cannot get the previous node from the root node!");if(null==a)if(xe.isPath(u)){var p=he.parent(e,u),g=h(p,1)[0];a=function(e){return g.children.includes(e)}}else a=function(){return!0};var v=he.nodes(e,{reverse:!0,at:f,match:a,mode:r,voids:i}),m=h(v,1)[0];return m}}},range:function(e,t,n){return Ie.isRange(t)&&!n?t:{anchor:he.start(e,t),focus:he.end(e,n||t)}},rangeRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.rangeRefs(e).delete(r),r.current=null,t}};return he.rangeRefs(e).add(r),r},rangeRefs:function(e){var t=C.get(e);return t||(t=new Set,C.set(e,t)),t},removeMark:function(e,t){e.removeMark(t)},setNormalizing:function(e,t){y.set(e,t)},start:function(e,t){return he.point(e,t,{edge:"start"})},string:function(e,t){var n,r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,o=void 0!==r&&r,i=he.range(e,t),a=Ie.edges(i),s=h(a,2),u=s[0],l=s[1],c="",d=de(he.nodes(e,{at:i,match:Ue.isText,voids:o}));try{for(d.s();!(n=d.n()).done;){var f=h(n.value,2),p=f[0],g=f[1],v=p.text;xe.equals(g,l.path)&&(v=v.slice(0,l.offset)),xe.equals(g,u.path)&&(v=v.slice(u.offset)),c+=v}}catch(e){d.e(e)}finally{d.f()}return c},unhangRange:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,r=void 0!==n&&n,o=Ie.edges(t),i=h(o,2),a=i[0],s=i[1];if(0!==a.offset||0!==s.offset||Ie.isCollapsed(t))return t;var u,l=he.above(e,{at:s,match:function(t){return he.isBlock(e,t)}}),c=l?l[1]:[],d={anchor:he.start(e,[]),focus:s},f=!0,p=de(he.nodes(e,{at:d,match:Ue.isText,reverse:!0,voids:r}));try{for(p.s();!(u=p.n()).done;){var g=h(u.value,2),v=g[0],m=g[1];if(f)f=!1;else if(""!==v.text||xe.isBefore(m,c)){s={path:m,offset:v.text.length};break}}}catch(e){p.e(e)}finally{p.f()}return{anchor:a,focus:s}},void:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return he.above(e,ce(ce({},t),{},{match:function(t){return he.isVoid(e,t)}}))},withoutNormalizing:function(e,t){var n=he.isNormalizing(e);he.setNormalizing(e,!1);try{t()}finally{he.setNormalizing(e,n)}he.normalize(e)}},ge={isLocation:function(e){return xe.isPath(e)||Be.isPoint(e)||Ie.isRange(e)}},ve={isSpan:function(e){return Array.isArray(e)&&2===e.length&&e.every(xe.isPath)}},me=["children"],ye=["text"];function be(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 Ee(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 Ee(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 Ee(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 Ce=new WeakMap,De={ancestor:function(e,t){var n=De.get(e,t);if(Ue.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(n));return n},ancestors:function*(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=be(xe.ancestors(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=[De.ancestor(e,i),i];yield a}}catch(e){o.e(e)}finally{o.f()}},child:function(e,t){if(Ue.isText(e))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(JSON.stringify(e)));return n},children:function*(e,t){for(var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).reverse,r=void 0!==n&&n,o=De.ancestor(e,t),i=o.children,a=r?i.length-1:0;r?a>=0:a<i.length;){var s=De.child(o,a),u=t.concat(a);yield[s,u],a=r?a-1:a+1}},common:function(e,t,n){var r=xe.common(t,n);return[De.get(e,r),r]},descendant:function(e,t){var n=De.get(e,t);if(he.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(n));return n},descendants:function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=be(De.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];0!==a.length&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}},elements:function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=be(De.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];ae.isElement(i)&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}},extractProps:function(e){return ae.isAncestor(e)?(e.children,N(e,me)):(e.text,N(e,ye))},first:function(e,t){for(var n=t.slice(),r=De.get(e,n);r&&!Ue.isText(r)&&0!==r.children.length;)r=r.children[0],n.push(0);return[r,n]},fragment:function(e,n){if(Ue.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var r=t.produce({children:e.children},(function(e){var t,r=Ie.edges(n),o=h(r,2),i=o[0],a=o[1],s=De.nodes(e,{reverse:!0,pass:function(e){var t=h(e,2)[1];return!Ie.includes(n,t)}}),u=be(s);try{for(u.s();!(t=u.n()).done;){var l=h(t.value,2)[1];if(!Ie.includes(n,l)){var c=De.parent(e,l),d=l[l.length-1];c.children.splice(d,1)}if(xe.equals(l,a.path)){var f=De.leaf(e,l);f.text=f.text.slice(0,a.offset)}if(xe.equals(l,i.path)){var p=De.leaf(e,l);p.text=p.text.slice(i.offset)}}}catch(e){u.e(e)}finally{u.f()}he.isEditor(e)&&(e.selection=null)}));return r.children},get:function(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(Ue.isText(n)||!n.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(JSON.stringify(e)));n=n.children[o]}return n},has:function(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(Ue.isText(n)||!n.children[o])return!1;n=n.children[o]}return!0},isNode:function(e){return Ue.isText(e)||ae.isElement(e)||he.isEditor(e)},isNodeList:function(e){if(!Array.isArray(e))return!1;var t=Ce.get(e);if(void 0!==t)return t;var n=e.every((function(e){return De.isNode(e)}));return Ce.set(e,n),n},last:function(e,t){for(var n=t.slice(),r=De.get(e,n);r&&!Ue.isText(r)&&0!==r.children.length;){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf:function(e,t){var n=De.get(e,t);if(!Ue.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(n));return n},levels:function*(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=be(xe.levels(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=De.get(e,i);yield[a,i]}}catch(e){o.e(e)}finally{o.f()}},matches:function(e,t){return ae.isElement(e)&&ae.isElementProps(t)&&ae.matches(e,t)||Ue.isText(e)&&Ue.isTextProps(t)&&Ue.matches(e,t)},nodes:function*(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.pass,r=t.reverse,o=void 0!==r&&r,i=t.from,a=void 0===i?[]:i,s=t.to,u=new Set,l=[],c=e;!s||!(o?xe.isBefore(l,s):xe.isAfter(l,s));)if(u.has(c)||(yield[c,l]),u.has(c)||Ue.isText(c)||0===c.children.length||null!=n&&!1!==n([c,l])){if(0===l.length)break;if(!o){var d=xe.next(l);if(De.has(e,d)){l=d,c=De.get(e,l);continue}}if(o&&0!==l[l.length-1])l=xe.previous(l),c=De.get(e,l);else l=xe.parent(l),c=De.get(e,l),u.add(c)}else{u.add(c);var f=o?c.children.length-1:0;xe.isAncestor(l,a)&&(f=a[l.length]),l=l.concat(f),c=De.get(e,l)}},parent:function(e,t){var n=xe.parent(t),r=De.get(e,n);if(Ue.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:function(e){return Ue.isText(e)?e.text:e.children.map(De.string).join("")},texts:function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=be(De.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];Ue.isText(i)&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}}};function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Se={isNodeOperation:function(e){return Se.isOperation(e)&&e.type.endsWith("_node")},isOperation:function(t){if(!e.isPlainObject(t))return!1;switch(t.type){case"insert_node":case"remove_node":return xe.isPath(t.path)&&De.isNode(t.node);case"insert_text":case"remove_text":return"number"==typeof t.offset&&"string"==typeof t.text&&xe.isPath(t.path);case"merge_node":return"number"==typeof t.position&&xe.isPath(t.path)&&e.isPlainObject(t.properties);case"move_node":return xe.isPath(t.path)&&xe.isPath(t.newPath);case"set_node":return xe.isPath(t.path)&&e.isPlainObject(t.properties)&&e.isPlainObject(t.newProperties);case"set_selection":return null===t.properties&&Ie.isRange(t.newProperties)||null===t.newProperties&&Ie.isRange(t.properties)||e.isPlainObject(t.properties)&&e.isPlainObject(t.newProperties);case"split_node":return xe.isPath(t.path)&&"number"==typeof t.position&&e.isPlainObject(t.properties);default:return!1}},isOperationList:function(e){return Array.isArray(e)&&e.every((function(e){return Se.isOperation(e)}))},isSelectionOperation:function(e){return Se.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation:function(e){return Se.isOperation(e)&&e.type.endsWith("_text")},inverse:function(e){switch(e.type){case"insert_node":return Ae(Ae({},e),{},{type:"remove_node"});case"insert_text":return Ae(Ae({},e),{},{type:"remove_text"});case"merge_node":return Ae(Ae({},e),{},{type:"split_node",path:xe.previous(e.path)});case"move_node":var t=e.newPath,n=e.path;if(xe.equals(t,n))return e;if(xe.isSibling(n,t))return Ae(Ae({},e),{},{path:t,newPath:n});var r=xe.transform(n,e),o=xe.transform(xe.next(n),e);return Ae(Ae({},e),{},{path:r,newPath:o});case"remove_node":return Ae(Ae({},e),{},{type:"insert_node"});case"remove_text":return Ae(Ae({},e),{},{type:"insert_text"});case"set_node":var i=e.properties,a=e.newProperties;return Ae(Ae({},e),{},{properties:a,newProperties:i});case"set_selection":var s=e.properties,u=e.newProperties;return Ae(Ae({},e),{},null==s?{properties:u,newProperties:null}:null==u?{properties:null,newProperties:s}:{properties:u,newProperties:s});case"split_node":return Ae(Ae({},e),{},{type:"merge_node",path:xe.next(e.path)})}}},xe={ancestors:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.reverse,r=void 0!==n&&n,o=xe.levels(e,t);return o=r?o.slice(1):o.slice(0,-1)},common:function(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var o=e[r];if(o!==t[r])break;n.push(o)}return n},compare:function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter:function(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return xe.equals(r,o)&&i>a},endsAt:function(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return xe.equals(r,o)},endsBefore:function(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return xe.equals(r,o)&&i<a},equals:function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))},hasPrevious:function(e){return e[e.length-1]>0},isAfter:function(e,t){return 1===xe.compare(e,t)},isAncestor:function(e,t){return e.length<t.length&&0===xe.compare(e,t)},isBefore:function(e,t){return-1===xe.compare(e,t)},isChild:function(e,t){return e.length===t.length+1&&0===xe.compare(e,t)},isCommon:function(e,t){return e.length<=t.length&&0===xe.compare(e,t)},isDescendant:function(e,t){return e.length>t.length&&0===xe.compare(e,t)},isParent:function(e,t){return e.length+1===t.length&&0===xe.compare(e,t)},isPath:function(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])},isSibling:function(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&xe.equals(n,r)},levels:function(e){for(var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,n=void 0!==t&&t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next:function(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},parent:function(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous:function(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative:function(e,t){if(!xe.isAncestor(t,e)&&!xe.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,(function(t){var o=r.affinity,i=void 0===o?"forward":o;if(e&&0!==(null==e?void 0:e.length)){if(null===t)return null;switch(n.type){case"insert_node":var a=n.path;(xe.equals(a,t)||xe.endsBefore(a,t)||xe.isAncestor(a,t))&&(t[a.length-1]+=1);break;case"remove_node":var s=n.path;if(xe.equals(s,t)||xe.isAncestor(s,t))return null;xe.endsBefore(s,t)&&(t[s.length-1]-=1);break;case"merge_node":var u=n.path,l=n.position;xe.equals(u,t)||xe.endsBefore(u,t)?t[u.length-1]-=1:xe.isAncestor(u,t)&&(t[u.length-1]-=1,t[u.length]+=l);break;case"split_node":var c=n.path,d=n.position;if(xe.equals(c,t)){if("forward"===i)t[t.length-1]+=1;else if("backward"!==i)return null}else xe.endsBefore(c,t)?t[c.length-1]+=1:xe.isAncestor(c,t)&&e[c.length]>=d&&(t[c.length-1]+=1,t[c.length]-=d);break;case"move_node":var f=n.path,p=n.newPath;if(xe.equals(f,p))return;if(xe.isAncestor(f,t)||xe.equals(f,t)){var h=p.slice();return xe.endsBefore(f,p)&&f.length<p.length&&(h[f.length-1]-=1),h.concat(t.slice(f.length))}xe.isSibling(f,p)&&(xe.isAncestor(p,t)||xe.equals(p,t))?xe.endsBefore(f,t)?t[f.length-1]-=1:t[f.length-1]+=1:xe.endsBefore(p,t)||xe.equals(p,t)||xe.isAncestor(p,t)?(xe.endsBefore(f,t)&&(t[f.length-1]-=1),t[p.length-1]+=1):xe.endsBefore(f,t)&&(xe.equals(p,t)&&(t[p.length-1]+=1),t[f.length-1]-=1)}}}))}},Oe={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=xe.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}};function Te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Be={compare:function(e,t){var n=xe.compare(e.path,t.path);return 0===n?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter:function(e,t){return 1===Be.compare(e,t)},isBefore:function(e,t){return-1===Be.compare(e,t)},equals:function(e,t){return e.offset===t.offset&&xe.equals(e.path,t.path)},isPoint:function(t){return e.isPlainObject(t)&&"number"==typeof t.offset&&xe.isPath(t.path)},transform:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,(function(e){if(null===e)return null;var t=r.affinity,o=void 0===t?"forward":t,i=e.path,a=e.offset;switch(n.type){case"insert_node":case"move_node":e.path=xe.transform(i,n,r);break;case"insert_text":xe.equals(n.path,i)&&n.offset<=a&&(e.offset+=n.text.length);break;case"merge_node":xe.equals(n.path,i)&&(e.offset+=n.position),e.path=xe.transform(i,n,r);break;case"remove_text":xe.equals(n.path,i)&&n.offset<=a&&(e.offset-=Math.min(a-n.offset,n.text.length));break;case"remove_node":if(xe.equals(n.path,i)||xe.isAncestor(n.path,i))return null;e.path=xe.transform(i,n,r);break;case"split_node":if(xe.equals(n.path,i)){if(n.position===a&&null==o)return null;(n.position<a||n.position===a&&"forward"===o)&&(e.offset-=n.position,e.path=xe.transform(i,n,Ne(Ne({},r),{},{affinity:"forward"})))}else e.path=xe.transform(i,n,r)}}))}},ke={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=Be.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},Fe=["anchor","focus"];function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ie={edges:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,n=void 0!==t&&t,r=e.anchor,o=e.focus;return Ie.isBackward(e)===n?[r,o]:[o,r]},end:function(e){var t=Ie.edges(e),n=h(t,2)[1];return n},equals:function(e,t){return Be.equals(e.anchor,t.anchor)&&Be.equals(e.focus,t.focus)},includes:function(e,t){if(Ie.isRange(t)){if(Ie.includes(e,t.anchor)||Ie.includes(e,t.focus))return!0;var n=Ie.edges(e),r=h(n,2),o=r[0],i=r[1],a=Ie.edges(t),s=h(a,2),u=s[0],l=s[1];return Be.isBefore(o,u)&&Be.isAfter(i,l)}var c=Ie.edges(e),d=h(c,2),f=d[0],p=d[1],g=!1,v=!1;return Be.isPoint(t)?(g=Be.compare(t,f)>=0,v=Be.compare(t,p)<=0):(g=xe.compare(t,f.path)>=0,v=xe.compare(t,p.path)<=0),g&&v},intersection:function(e,t){e.anchor,e.focus;var n=N(e,Fe),r=Ie.edges(e),o=h(r,2),i=o[0],a=o[1],s=Ie.edges(t),u=h(s,2),l=u[0],c=u[1],d=Be.isBefore(i,l)?l:i,f=Be.isBefore(a,c)?a:c;return Be.isBefore(f,d)?null:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({anchor:d,focus:f},n)},isBackward:function(e){var t=e.anchor,n=e.focus;return Be.isAfter(t,n)},isCollapsed:function(e){var t=e.anchor,n=e.focus;return Be.equals(t,n)},isExpanded:function(e){return!Ie.isCollapsed(e)},isForward:function(e){return!Ie.isBackward(e)},isRange:function(t){return e.isPlainObject(t)&&Be.isPoint(t.anchor)&&Be.isPoint(t.focus)},points:function*(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start:function(e){var t=Ie.edges(e),n=h(t,1)[0];return n},transform:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,(function(e){if(null===e)return null;var t,o,i=r.affinity,a=void 0===i?"inward":i;if("inward"===a){var s=Ie.isCollapsed(e);Ie.isForward(e)?(t="forward",o=s?t:"backward"):(t="backward",o=s?t:"forward")}else"outward"===a?Ie.isForward(e)?(t="backward",o="forward"):(t="forward",o="backward"):(t=a,o=a);var u=Be.transform(e.anchor,n,{affinity:t}),l=Be.transform(e.focus,n,{affinity:o});if(!u||!l)return null;e.anchor=u,e.focus=l}))}},Re={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=Ie.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},Le=function t(n,r){for(var o in n){var i=n[o],a=r[o];if(e.isPlainObject(i)&&e.isPlainObject(a)){if(!t(i,a))return!1}else if(Array.isArray(i)&&Array.isArray(a)){if(i.length!==a.length)return!1;for(var s=0;s<i.length;s++)if(i[s]!==a[s])return!1}else if(i!==a)return!1}for(var u in r)if(void 0===n[u]&&void 0!==r[u])return!1;return!0},_e=["text"],Me=["anchor","focus"];function je(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 He(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 He(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 He(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}function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ue={equals:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).loose,r=void 0!==n&&n;function o(e){return e.text,N(e,_e)}return Le(r?o(e):e,r?o(t):t)},isText:function(t){return e.isPlainObject(t)&&"string"==typeof t.text},isTextList:function(e){return Array.isArray(e)&&e.every((function(e){return Ue.isText(e)}))},isTextProps:function(e){return void 0!==e.text},matches:function(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations:function(e,t){var n,r=[$e({},e)],o=je(t);try{for(o.s();!(n=o.n()).done;){var i,a=n.value,s=(a.anchor,a.focus,N(a,Me)),u=Ie.edges(a),l=h(u,2),c=l[0],d=l[1],f=[],p=0,g=je(r);try{for(g.s();!(i=g.n()).done;){var v=i.value,m=v.text.length,y=p;if(p+=m,c.offset<=y&&d.offset>=p)Object.assign(v,s),f.push(v);else if(c.offset!==d.offset&&(c.offset===p||d.offset===y)||c.offset>p||d.offset<y||d.offset===y&&0!==y)f.push(v);else{var b=v,E=void 0,C=void 0;if(d.offset<p){var D=d.offset-y;C=$e($e({},b),{},{text:b.text.slice(D)}),b=$e($e({},b),{},{text:b.text.slice(0,D)})}if(c.offset>y){var w=c.offset-y;E=$e($e({},b),{},{text:b.text.slice(0,w)}),b=$e($e({},b),{},{text:b.text.slice(w)})}Object.assign(b,s),E&&f.push(E),f.push(b),C&&f.push(C)}}}catch(e){g.e(e)}finally{g.f()}r=f}}catch(e){o.e(e)}finally{o.f()}return r}};function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ge(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 qe(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 qe(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 qe(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 Ke={transform:function(e,n){e.children=t.createDraft(e.children);var r=e.selection&&t.createDraft(e.selection);try{r=function(e,t,n){switch(n.type){case"insert_node":var r=n.path,o=n.node,i=De.parent(e,r),a=r[r.length-1];if(a>i.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(i.children.splice(a,0,o),t){var s,u=Ge(Ie.points(t));try{for(u.s();!(s=u.n()).done;){var c=h(s.value,2),d=c[0];t[c[1]]=Be.transform(d,n)}}catch(e){u.e(e)}finally{u.f()}}break;case"insert_text":var f=n.path,p=n.offset,g=n.text;if(0===g.length)break;var v=De.leaf(e,f),m=v.text.slice(0,p),y=v.text.slice(p);if(v.text=m+g+y,t){var b,E=Ge(Ie.points(t));try{for(E.s();!(b=E.n()).done;){var C=h(b.value,2),D=C[0];t[C[1]]=Be.transform(D,n)}}catch(e){E.e(e)}finally{E.f()}}break;case"merge_node":var w=n.path,A=De.get(e,w),S=xe.previous(w),x=De.get(e,S),O=De.parent(e,w),T=w[w.length-1];if(Ue.isText(A)&&Ue.isText(x))x.text+=A.text;else{if(Ue.isText(A)||Ue.isText(x))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(w,"] to nodes of different interfaces: ").concat(A," ").concat(x));var N;(N=x.children).push.apply(N,l(A.children))}if(O.children.splice(T,1),t){var B,k=Ge(Ie.points(t));try{for(k.s();!(B=k.n()).done;){var F=h(B.value,2),P=F[0];t[F[1]]=Be.transform(P,n)}}catch(e){k.e(e)}finally{k.f()}}break;case"move_node":var I=n.path,R=n.newPath;if(xe.isAncestor(I,R))throw new Error("Cannot move a path [".concat(I,"] to new path [").concat(R,"] because the destination is inside itself."));var L=De.get(e,I),_=De.parent(e,I),M=I[I.length-1];_.children.splice(M,1);var j=xe.transform(I,n),H=De.get(e,xe.parent(j)),z=j[j.length-1];if(H.children.splice(z,0,L),t){var $,U=Ge(Ie.points(t));try{for(U.s();!($=U.n()).done;){var V=h($.value,2),W=V[0];t[V[1]]=Be.transform(W,n)}}catch(e){U.e(e)}finally{U.f()}}break;case"remove_node":var G=n.path,q=G[G.length-1];if(De.parent(e,G).children.splice(q,1),t){var K,Y=Ge(Ie.points(t));try{for(Y.s();!(K=Y.n()).done;){var X=h(K.value,2),Z=X[0],J=X[1],Q=Be.transform(Z,n);if(null!=t&&null!=Q)t[J]=Q;else{var ee,te=void 0,ne=void 0,re=Ge(De.texts(e));try{for(re.s();!(ee=re.n()).done;){var oe=h(ee.value,2),ie=oe[0],ae=oe[1];if(-1!==xe.compare(ae,G)){ne=[ie,ae];break}te=[ie,ae]}}catch(e){re.e(e)}finally{re.f()}var se=!1;te&&ne&&(se=xe.equals(ne[1],G)?!xe.hasPrevious(ne[1]):xe.common(te[1],G).length<xe.common(ne[1],G).length),te&&!se?(Z.path=te[1],Z.offset=te[0].text.length):ne?(Z.path=ne[1],Z.offset=0):t=null}}}catch(e){Y.e(e)}finally{Y.f()}}break;case"remove_text":var ue=n.path,le=n.offset,ce=n.text;if(0===ce.length)break;var de=De.leaf(e,ue),fe=de.text.slice(0,le),pe=de.text.slice(le+ce.length);if(de.text=fe+pe,t){var he,ge=Ge(Ie.points(t));try{for(ge.s();!(he=ge.n()).done;){var ve=h(he.value,2),me=ve[0];t[ve[1]]=Be.transform(me,n)}}catch(e){ge.e(e)}finally{ge.f()}}break;case"set_node":var ye=n.path,be=n.properties,Ee=n.newProperties;if(0===ye.length)throw new Error("Cannot set properties on the root node!");var Ce=De.get(e,ye);for(var we in Ee){if("children"===we||"text"===we)throw new Error('Cannot set the "'.concat(we,'" property of nodes!'));var Ae=Ee[we];null==Ae?delete Ce[we]:Ce[we]=Ae}for(var Se in be)Ee.hasOwnProperty(Se)||delete Ce[Se];break;case"set_selection":var Oe=n.newProperties;if(null==Oe)t=Oe;else{if(null==t){if(!Ie.isRange(Oe))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(Oe)," when there is no current selection."));t=We({},Oe)}for(var Te in Oe){var Ne=Oe[Te];if(null==Ne){if("anchor"===Te||"focus"===Te)throw new Error('Cannot remove the "'.concat(Te,'" selection property'));delete t[Te]}else t[Te]=Ne}}break;case"split_node":var ke=n.path,Fe=n.position,Pe=n.properties;if(0===ke.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(ke,"] because the root node cannot be split."));var Re,Le=De.get(e,ke),_e=De.parent(e,ke),Me=ke[ke.length-1];if(Ue.isText(Le)){var je=Le.text.slice(0,Fe),He=Le.text.slice(Fe);Le.text=je,Re=We(We({},Pe),{},{text:He})}else{var ze=Le.children.slice(0,Fe),$e=Le.children.slice(Fe);Le.children=ze,Re=We(We({},Pe),{},{children:$e})}if(_e.children.splice(Me+1,0,Re),t){var Ve,qe=Ge(Ie.points(t));try{for(qe.s();!(Ve=qe.n()).done;){var Ke=h(Ve.value,2),Ye=Ke[0];t[Ke[1]]=Be.transform(Ye,n)}}catch(e){qe.e(e)}finally{qe.f()}}}return t}(e,r,n)}finally{e.children=t.finishDraft(e.children),e.selection=r?t.isDraft(r)?t.finishDraft(r):r:null}}},Ye=["text"],Xe=["children"];function Ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qe(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 et(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 et(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 et(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 tt={insertNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.hanging,o=void 0!==r&&r,i=n.voids,a=void 0!==i&&i,s=n.mode,u=void 0===s?"lowest":s,l=n.at,c=n.match,d=n.select;if(De.isNode(t)&&(t=[t]),0!==t.length){var f=h(t,1)[0];if(l||(l=e.selection?e.selection:e.children.length>0?he.end(e,[]):[0],d=!0),null==d&&(d=!1),Ie.isRange(l))if(o||(l=he.unhangRange(e,l)),Ie.isCollapsed(l))l=l.anchor;else{var p=Ie.edges(l),g=h(p,2)[1],v=he.pointRef(e,g);pt.delete(e,{at:l}),l=v.unref()}if(Be.isPoint(l)){null==c&&(c=Ue.isText(f)?function(e){return Ue.isText(e)}:e.isInline(f)?function(t){return Ue.isText(t)||he.isInline(e,t)}:function(t){return he.isBlock(e,t)});var m=he.nodes(e,{at:l.path,match:c,mode:u,voids:a}),y=h(m,1)[0];if(!y)return;var b=h(y,2)[1],E=he.pathRef(e,b),C=he.isEnd(e,l,b);pt.splitNodes(e,{at:l,match:c,mode:u,voids:a});var D=E.unref();l=C?xe.next(D):D}var w=xe.parent(l),A=l[l.length-1];if(a||!he.void(e,{at:w})){var S,x=Qe(t);try{for(x.s();!(S=x.n()).done;){var O=S.value,T=w.concat(A);A++,e.apply({type:"insert_node",path:T,node:O}),l=xe.next(l)}}catch(e){x.e(e)}finally{x.f()}if(l=xe.previous(l),d){var N=he.end(e,l);N&&pt.select(e,N)}}}}))},liftNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.at,r=void 0===n?e.selection:n,o=t.mode,i=void 0===o?"lowest":o,a=t.voids,s=void 0!==a&&a,u=t.match;if(null==u&&(u=xe.isPath(r)?ot(e,r):function(t){return he.isBlock(e,t)}),r)for(var l=he.nodes(e,{at:r,match:u,mode:i,voids:s}),c=Array.from(l,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),d=0,f=c;d<f.length;d++){var p=f[d].unref();if(p.length<2)throw new Error("Cannot lift node at a path [".concat(p,"] because it has a depth of less than `2`."));var g=he.node(e,xe.parent(p)),v=h(g,2),m=v[0],y=v[1],b=p[p.length-1],E=m.children.length;if(1===E){var C=xe.next(y);pt.moveNodes(e,{at:p,to:C,voids:s}),pt.removeNodes(e,{at:y,voids:s})}else if(0===b)pt.moveNodes(e,{at:p,to:y,voids:s});else if(b===E-1){var D=xe.next(y);pt.moveNodes(e,{at:p,to:D,voids:s})}else{var w=xe.next(p),A=xe.next(y);pt.splitNodes(e,{at:w,voids:s}),pt.moveNodes(e,{at:p,to:A,voids:s})}}}))},mergeNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.match,r=t.at,o=void 0===r?e.selection:r,i=t.hanging,a=void 0!==i&&i,s=t.voids,u=void 0!==s&&s,l=t.mode,c=void 0===l?"lowest":l;if(o){if(null==n)if(xe.isPath(o)){var d=he.parent(e,o),f=h(d,1)[0];n=function(e){return f.children.includes(e)}}else n=function(t){return he.isBlock(e,t)};if(!a&&Ie.isRange(o)&&(o=he.unhangRange(e,o)),Ie.isRange(o))if(Ie.isCollapsed(o))o=o.anchor;else{var p=Ie.edges(o),g=h(p,2)[1],v=he.pointRef(e,g);pt.delete(e,{at:o}),o=v.unref(),null==t.at&&pt.select(e,o)}var m=he.nodes(e,{at:o,match:n,voids:u,mode:c}),y=h(m,1)[0],b=he.previous(e,{at:o,match:n,voids:u,mode:c});if(y&&b){var E=h(y,2),C=E[0],D=E[1],w=h(b,2),A=w[0],S=w[1];if(0!==D.length&&0!==S.length){var x,O,T=xe.next(S),B=xe.common(D,S),k=xe.isSibling(D,S),F=Array.from(he.levels(e,{at:D}),(function(e){return h(e,1)[0]})).slice(B.length).slice(0,-1),P=he.above(e,{at:D,mode:"highest",match:function(t){return F.includes(t)&&nt(e,t)}}),I=P&&he.pathRef(e,P[1]);if(Ue.isText(C)&&Ue.isText(A)){C.text;var R=N(C,Ye);O=A.text.length,x=R}else{if(!ae.isElement(C)||!ae.isElement(A))throw new Error("Cannot merge the node at path [".concat(D,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(C)," ").concat(JSON.stringify(A)));C.children;var L=N(C,Xe);O=A.children.length,x=L}k||pt.moveNodes(e,{at:D,to:T,voids:u}),I&&pt.removeNodes(e,{at:I.current,voids:u}),ae.isElement(A)&&he.isEmpty(e,A)||Ue.isText(A)&&""===A.text&&0!==S[S.length-1]?pt.removeNodes(e,{at:S,voids:u}):e.apply({type:"merge_node",path:T,position:O,properties:x}),I&&I.unref()}}}}))},moveNodes:function(e,t){he.withoutNormalizing(e,(function(){var n=t.to,r=t.at,o=void 0===r?e.selection:r,i=t.mode,a=void 0===i?"lowest":i,s=t.voids,u=void 0!==s&&s,l=t.match;if(o){null==l&&(l=xe.isPath(o)?ot(e,o):function(t){return he.isBlock(e,t)});for(var c=he.pathRef(e,n),d=he.nodes(e,{at:o,match:l,mode:a,voids:u}),f=Array.from(d,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),p=0,g=f;p<g.length;p++){var v=g[p].unref(),m=c.current;0!==v.length&&e.apply({type:"move_node",path:v,newPath:m}),c.current&&xe.isSibling(m,v)&&xe.isAfter(m,v)&&(c.current=xe.next(c.current))}c.unref()}}))},removeNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.hanging,r=void 0!==n&&n,o=t.voids,i=void 0!==o&&o,a=t.mode,s=void 0===a?"lowest":a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=xe.isPath(l)?ot(e,l):function(t){return he.isBlock(e,t)}),!r&&Ie.isRange(l)&&(l=he.unhangRange(e,l));for(var d=he.nodes(e,{at:l,match:c,mode:s,voids:i}),f=Array.from(d,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),p=0,g=f;p<g.length;p++){var v=g[p].unref();if(v){var m=he.node(e,v),y=h(m,1)[0];e.apply({type:"remove_node",path:v,node:y})}}}}))},setNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.match,o=n.at,i=void 0===o?e.selection:o,a=n.hanging,s=void 0!==a&&a,u=n.mode,l=void 0===u?"lowest":u,c=n.split,d=void 0!==c&&c,f=n.voids,p=void 0!==f&&f;if(i){if(null==r&&(r=xe.isPath(i)?ot(e,i):function(t){return he.isBlock(e,t)}),!s&&Ie.isRange(i)&&(i=he.unhangRange(e,i)),d&&Ie.isRange(i)){if(Ie.isCollapsed(i)&&he.leaf(e,i.anchor)[0].text.length>0)return;var g=he.rangeRef(e,i,{affinity:"inward"}),v=Ie.edges(i),m=h(v,2),y=m[0],b=m[1],E="lowest"===l?"lowest":"highest",C=he.isEnd(e,b,b.path);pt.splitNodes(e,{at:b,match:r,mode:E,voids:p,always:!C});var D=he.isStart(e,y,y.path);pt.splitNodes(e,{at:y,match:r,mode:E,voids:p,always:!D}),i=g.unref(),null==n.at&&pt.select(e,i)}var w,A=Qe(he.nodes(e,{at:i,match:r,mode:l,voids:p}));try{for(A.s();!(w=A.n()).done;){var S=h(w.value,2),x=S[0],O=S[1],T={},N={};if(0!==O.length){var B=!1;for(var k in t)"children"!==k&&"text"!==k&&t[k]!==x[k]&&(B=!0,x.hasOwnProperty(k)&&(T[k]=x[k]),null!=t[k]&&(N[k]=t[k]));B&&e.apply({type:"set_node",path:O,properties:T,newProperties:N})}}}catch(e){A.e(e)}finally{A.f()}}}))},splitNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s,l=t.height,c=void 0===l?0:l,d=t.always,f=void 0!==d&&d;if(null==a&&(a=function(t){return he.isBlock(e,t)}),Ie.isRange(u)&&(u=rt(e,u)),xe.isPath(u)){var p=u,g=he.point(e,p),v=he.parent(e,p),m=h(v,1)[0];a=function(e){return e===m},c=g.path.length-p.length+1,u=g,f=!0}if(u){var y=he.pointRef(e,u,{affinity:"backward"}),b=he.nodes(e,{at:u,match:a,mode:r,voids:i}),E=h(b,1)[0];if(E){var C=he.void(e,{at:u,mode:"highest"});if(!i&&C){var D=h(C,2),w=D[0],A=D[1];if(ae.isElement(w)&&e.isInline(w)){var S=he.after(e,A);if(!S){var x=xe.next(A);pt.insertNodes(e,{text:""},{at:x,voids:i}),S=he.point(e,x)}u=S,f=!0}c=u.path.length-A.length+1,f=!0}var O,T=he.pointRef(e,u),N=u.path.length-c,B=h(E,2)[1],k=u.path.slice(0,N),F=0===c?u.offset:u.path[N]+0,P=Qe(he.levels(e,{at:k,reverse:!0,voids:i}));try{for(P.s();!(O=P.n()).done;){var I=h(O.value,2),R=I[0],L=I[1],_=!1;if(L.length<B.length||0===L.length||!i&&he.isVoid(e,R))break;var M=y.current,j=he.isEnd(e,M,L);if(f||!y||!he.isEdge(e,M,L)){_=!0;var H=De.extractProps(R);e.apply({type:"split_node",path:L,position:F,properties:H})}F=L[L.length-1]+(_||j?1:0)}}catch(e){P.e(e)}finally{P.f()}if(null==t.at){var z=T.current||he.end(e,[]);pt.select(e,z)}y.unref(),T.unref()}}}))},unsetNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var r,o={},i=Qe(t);try{for(i.s();!(r=i.n()).done;){o[r.value]=null}}catch(e){i.e(e)}finally{i.f()}pt.setNodes(e,o,n)},unwrapNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.mode,r=void 0===n?"lowest":n,o=t.split,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=xe.isPath(l)?ot(e,l):function(t){return he.isBlock(e,t)}),xe.isPath(l)&&(l=he.range(e,l));var d,f=Ie.isRange(l)?he.rangeRef(e,l):null,p=he.nodes(e,{at:l,match:c,mode:r,voids:s}),g=Array.from(p,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})).reverse(),v=Qe(g);try{var m=function(){var t=d.value.unref(),n=he.node(e,t),r=h(n,1)[0],o=he.range(e,t);i&&f&&(o=Ie.intersection(f.current,o)),pt.liftNodes(e,{at:o,match:function(e){return ae.isAncestor(r)&&r.children.includes(e)},voids:s})};for(v.s();!(d=v.n()).done;)m()}catch(e){v.e(e)}finally{v.f()}f&&f.unref()}}))},wrapNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.mode,o=void 0===r?"lowest":r,i=n.split,a=void 0!==i&&i,s=n.voids,u=void 0!==s&&s,l=n.match,c=n.at,d=void 0===c?e.selection:c;if(d){if(null==l&&(l=xe.isPath(d)?ot(e,d):e.isInline(t)?function(t){return he.isInline(e,t)||Ue.isText(t)}:function(t){return he.isBlock(e,t)}),a&&Ie.isRange(d)){var f=Ie.edges(d),p=h(f,2),g=p[0],v=p[1],m=he.rangeRef(e,d,{affinity:"inward"});pt.splitNodes(e,{at:v,match:l,voids:u}),pt.splitNodes(e,{at:g,match:l,voids:u}),d=m.unref(),null==n.at&&pt.select(e,d)}for(var y=Array.from(he.nodes(e,{at:d,match:e.isInline(t)?function(t){return he.isBlock(e,t)}:function(e){return he.isEditor(e)},mode:"lowest",voids:u})),b=0,E=y;b<E.length;b++){var C=h(E[b],2)[1],D=Ie.isRange(d)?Ie.intersection(d,he.range(e,C)):d;if(D){var w=Array.from(he.nodes(e,{at:D,match:l,mode:o,voids:u}));if(w.length>0){var A=function(){var n=h(w,1)[0],r=w[w.length-1],o=h(n,2)[1],i=h(r,2)[1];if(0===o.length&&0===i.length)return"continue";var a=xe.equals(o,i)?xe.parent(o):xe.common(o,i),s=he.range(e,o,i),l=he.node(e,a),c=h(l,1)[0],d=a.length+1,f=xe.next(i.slice(0,d)),p=Je(Je({},t),{},{children:[]});pt.insertNodes(e,p,{at:f,voids:u}),pt.moveNodes(e,{at:s,match:function(e){return ae.isAncestor(c)&&c.children.includes(e)},to:f.concat(0),voids:u})}();if("continue"===A)continue}}}}}))}},nt=function e(t,n){if(ae.isElement(n)){var r=n;return!!he.isVoid(t,n)||1===r.children.length&&e(t,r.children[0])}return!he.isEditor(n)},rt=function(e,t){if(Ie.isCollapsed(t))return t.anchor;var n=Ie.edges(t),r=h(n,2)[1],o=he.pointRef(e,r);return pt.delete(e,{at:t}),o.unref()},ot=function(e,t){var n=he.node(e,t),r=h(n,1)[0];return function(e){return e===r}};function it(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function at(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?it(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var st={collapse:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).edge,n=void 0===t?"anchor":t,r=e.selection;if(r)if("anchor"===n)pt.select(e,r.anchor);else if("focus"===n)pt.select(e,r.focus);else if("start"===n){var o=Ie.edges(r),i=h(o,1)[0];pt.select(e,i)}else if("end"===n){var a=Ie.edges(r),s=h(a,2)[1];pt.select(e,s)}},deselect:function(e){var t=e.selection;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.selection,r=t.distance,o=void 0===r?1:r,i=t.unit,a=void 0===i?"character":i,s=t.reverse,u=void 0!==s&&s,l=t.edge,c=void 0===l?null:l;if(n){"start"===c&&(c=Ie.isBackward(n)?"focus":"anchor"),"end"===c&&(c=Ie.isBackward(n)?"anchor":"focus");var d=n.anchor,f=n.focus,p={distance:o,unit:a},h={};if(null==c||"anchor"===c){var g=u?he.before(e,d,p):he.after(e,d,p);g&&(h.anchor=g)}if(null==c||"focus"===c){var v=u?he.before(e,f,p):he.after(e,f,p);v&&(h.focus=v)}pt.setSelection(e,h)}},select:function(e,t){var n=e.selection;if(t=he.range(e,t),n)pt.setSelection(e,t);else{if(!Ie.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}},setPoint:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=n.edge,i=void 0===o?"both":o;if(r){"start"===i&&(i=Ie.isBackward(r)?"focus":"anchor"),"end"===i&&(i=Ie.isBackward(r)?"anchor":"focus");var a=r.anchor,s=r.focus,u="anchor"===i?a:s;pt.setSelection(e,g({},"anchor"===i?"anchor":"focus",at(at({},u),t)))}},setSelection:function(e,t){var n=e.selection,r={},o={};if(n){for(var i in t)("anchor"===i&&null!=t.anchor&&!Be.equals(t.anchor,n.anchor)||"focus"===i&&null!=t.focus&&!Be.equals(t.focus,n.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==n[i])&&(r[i]=n[i],o[i]=t[i]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:o})}}};function ut(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 lt(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 lt(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 lt(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 ct={delete:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.reverse,r=void 0!==n&&n,o=t.unit,i=void 0===o?"character":o,a=t.distance,s=void 0===a?1:a,u=t.voids,l=void 0!==u&&u,c=t.at,d=void 0===c?e.selection:c,f=t.hanging,p=void 0!==f&&f;if(d){if(Ie.isRange(d)&&Ie.isCollapsed(d)&&(d=d.anchor),Be.isPoint(d)){var g=he.void(e,{at:d,mode:"highest"});if(!l&&g){d=h(g,2)[1]}else{var v={unit:i,distance:s};d={anchor:d,focus:r?he.before(e,d,v)||he.start(e,[]):he.after(e,d,v)||he.end(e,[])},p=!0}}if(xe.isPath(d))pt.removeNodes(e,{at:d,voids:l});else if(!Ie.isCollapsed(d)){if(!p){var m=Ie.edges(d),y=h(m,2)[1],b=he.end(e,[]);Be.equals(y,b)||(d=he.unhangRange(e,d,{voids:l}))}var E=Ie.edges(d),C=h(E,2),D=C[0],w=C[1],A=he.above(e,{match:function(t){return he.isBlock(e,t)},at:D,voids:l}),S=he.above(e,{match:function(t){return he.isBlock(e,t)},at:w,voids:l}),x=A&&S&&!xe.equals(A[1],S[1]),O=xe.equals(D.path,w.path),T=l?null:he.void(e,{at:D,mode:"highest"}),N=l?null:he.void(e,{at:w,mode:"highest"});if(T){var B=he.before(e,D);B&&A&&xe.isAncestor(A[1],B.path)&&(D=B)}if(N){var k=he.after(e,w);k&&S&&xe.isAncestor(S[1],k.path)&&(w=k)}var F,P,I=[],R=ut(he.nodes(e,{at:d,voids:l}));try{for(R.s();!(P=R.n()).done;){var L=P.value,_=h(L,2),M=_[0],j=_[1];F&&0===xe.compare(j,F)||(!l&&he.isVoid(e,M)||!xe.isCommon(j,D.path)&&!xe.isCommon(j,w.path))&&(I.push(L),F=j)}}catch(e){R.e(e)}finally{R.f()}var H=Array.from(I,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),z=he.pointRef(e,D),$=he.pointRef(e,w);if(!O&&!T){var U=z.current,V=he.leaf(e,U),W=h(V,1)[0],G=U.path,q=D.offset,K=W.text.slice(q);K.length>0&&e.apply({type:"remove_text",path:G,offset:q,text:K})}for(var Y=0,X=H;Y<X.length;Y++){var Z=X[Y].unref();pt.removeNodes(e,{at:Z,voids:l})}if(!N){var J=$.current,Q=he.leaf(e,J),ee=h(Q,1)[0],te=J.path,ne=O?D.offset:0,re=ee.text.slice(ne,w.offset);re.length>0&&e.apply({type:"remove_text",path:te,offset:ne,text:re})}!O&&x&&$.current&&z.current&&pt.mergeNodes(e,{at:$.current,hanging:!0,voids:l});var oe=r?z.unref()||$.unref():$.unref()||z.unref();null==t.at&&oe&&pt.select(e,oe)}}}))},insertFragment:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.hanging,o=void 0!==r&&r,i=n.voids,a=void 0!==i&&i,s=n.at,u=void 0===s?e.selection:s;if(t.length&&u){if(Ie.isRange(u))if(o||(u=he.unhangRange(e,u)),Ie.isCollapsed(u))u=u.anchor;else{var l=Ie.edges(u),c=h(l,2)[1];if(!a&&he.void(e,{at:c}))return;var d=he.pointRef(e,c);pt.delete(e,{at:u}),u=d.unref()}else xe.isPath(u)&&(u=he.start(e,u));if(a||!he.void(e,{at:u})){var f=he.above(e,{at:u,match:function(t){return he.isInline(e,t)},mode:"highest",voids:a});if(f){var p=h(f,2)[1];if(he.isEnd(e,u,p))u=he.after(e,p);else if(he.isStart(e,u,p)){u=he.before(e,p)}}var g,v=he.above(e,{match:function(t){return he.isBlock(e,t)},at:u,voids:a}),m=h(v,2)[1],y=he.isStart(e,u,m),b=he.isEnd(e,u,m),E=y&&b,C=!y||y&&b,D=!b,w=De.first({children:t},[]),A=h(w,2)[1],S=De.last({children:t},[]),x=h(S,2)[1],O=[],T=function(t){var n=h(t,2),r=n[0],o=n[1];return!(0===o.length)&&(!!E||!(C&&xe.isAncestor(o,A)&&ae.isElement(r)&&!e.isVoid(r)&&!e.isInline(r))&&!(D&&xe.isAncestor(o,x)&&ae.isElement(r)&&!e.isVoid(r)&&!e.isInline(r)))},N=ut(De.nodes({children:t},{pass:T}));try{for(N.s();!(g=N.n()).done;){var B=g.value;T(B)&&O.push(B)}}catch(e){N.e(e)}finally{N.f()}for(var k=[],F=[],P=[],I=!0,R=!1,L=0,_=O;L<_.length;L++){var M=h(_[L],1)[0];ae.isElement(M)&&!e.isInline(M)?(I=!1,R=!0,F.push(M)):I?k.push(M):P.push(M)}var j=he.nodes(e,{at:u,match:function(t){return Ue.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),H=h(j,1)[0],z=h(H,2)[1],$=he.isStart(e,u,z),U=he.isEnd(e,u,z),V=he.pathRef(e,b?xe.next(m):m),W=he.pathRef(e,U?xe.next(z):z),G=he.pathRef(e,m);pt.splitNodes(e,{at:u,match:function(t){return R?he.isBlock(e,t):Ue.isText(t)||he.isInline(e,t)},mode:R?"lowest":"highest",voids:a});var q=he.pathRef(e,!$||$&&U?xe.next(z):z);if(pt.insertNodes(e,k,{at:q.current,match:function(t){return Ue.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),E&&F.length&&pt.delete(e,{at:G.unref(),voids:a}),pt.insertNodes(e,F,{at:V.current,match:function(t){return he.isBlock(e,t)},mode:"lowest",voids:a}),pt.insertNodes(e,P,{at:W.current,match:function(t){return Ue.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),!n.at){var K;K=P.length>0?xe.previous(W.current):F.length>0?xe.previous(V.current):xe.previous(q.current);var Y=he.end(e,K);pt.select(e,Y)}q.unref(),V.unref(),W.unref()}}}))},insertText:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.voids,o=void 0!==r&&r,i=n.at,a=void 0===i?e.selection:i;if(a){if(xe.isPath(a)&&(a=he.range(e,a)),Ie.isRange(a))if(Ie.isCollapsed(a))a=a.anchor;else{var s=Ie.end(a);if(!o&&he.void(e,{at:s}))return;var u=he.pointRef(e,s);pt.delete(e,{at:a,voids:o}),a=u.unref(),pt.setSelection(e,{anchor:a,focus:a})}if(o||!he.void(e,{at:a})){var l=a,c=l.path,d=l.offset;t.length>0&&e.apply({type:"insert_text",path:c,offset:d,text:t})}}}))}};function dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pt=ft(ft(ft(ft({},Ke),tt),st),ct);return Kf.Editor=he,Kf.Element=ae,Kf.Location=ge,Kf.Node=De,Kf.Operation=Se,Kf.Path=xe,Kf.PathRef=Oe,Kf.Point=Be,Kf.PointRef=ke,Kf.Range=Ie,Kf.RangeRef=Re,Kf.Span=ve,Kf.Text=Ue,Kf.Transforms=pt,Kf.createEditor=function(){var e={children:[],operations:[],selection:null,marks:null,isInline:function(){return!1},isVoid:function(){return!1},onChange:function(){},apply:function(t){var n,r=A(he.pathRefs(e));try{for(r.s();!(n=r.n()).done;){var o=n.value;Oe.transform(o,t)}}catch(e){r.e(e)}finally{r.f()}var i,a=A(he.pointRefs(e));try{for(a.s();!(i=a.n()).done;){var s=i.value;ke.transform(s,t)}}catch(e){a.e(e)}finally{a.f()}var u,l=A(he.rangeRefs(e));try{for(l.s();!(u=l.n()).done;){var c=u.value;Re.transform(c,t)}}catch(e){l.e(e)}finally{l.f()}var d,f=new Set,p=[],h=function(e){if(e){var t=e.join(",");f.has(t)||(f.add(t),p.push(e))}},g=v.get(e)||[],y=x(t),b=A(g);try{for(b.s();!(d=b.n()).done;){var E=d.value;h(xe.transform(E,t))}}catch(e){b.e(e)}finally{b.f()}var C,D=A(y);try{for(D.s();!(C=D.n()).done;){h(C.value)}}catch(e){D.e(e)}finally{D.f()}v.set(e,p),pt.transform(e,t),e.operations.push(t),he.normalize(e),"set_selection"===t.type&&(e.marks=null),m.get(e)||(m.set(e,!0),Promise.resolve().then((function(){m.set(e,!1),e.onChange(),e.operations=[]})))},addMark:function(t,n){var r=e.selection;if(r)if(Ie.isExpanded(r))pt.setNodes(e,g({},t,n),{match:Ue.isText,split:!0});else{var o=w(w({},he.marks(e)||{}),{},g({},t,n));e.marks=o,m.get(e)||e.onChange()}},deleteBackward:function(t){var n=e.selection;n&&Ie.isCollapsed(n)&&pt.delete(e,{unit:t,reverse:!0})},deleteForward:function(t){var n=e.selection;n&&Ie.isCollapsed(n)&&pt.delete(e,{unit:t})},deleteFragment:function(t){var n=e.selection;n&&Ie.isExpanded(n)&&pt.delete(e,{reverse:"backward"===t})},getFragment:function(){var t=e.selection;return t?De.fragment(e,t):[]},insertBreak:function(){pt.splitNodes(e,{always:!0})},insertFragment:function(t){pt.insertFragment(e,t)},insertNode:function(t){pt.insertNodes(e,t)},insertText:function(t){var n=e.selection,r=e.marks;if(n){if(r){var o=w({text:t},r);pt.insertNodes(e,o)}else pt.insertText(e,t);e.marks=null}},normalizeNode:function(t){var n=h(t,2),r=n[0],o=n[1];if(!Ue.isText(r))if(ae.isElement(r)&&0===r.children.length){pt.insertNodes(e,{text:""},{at:o.concat(0),voids:!0})}else for(var i=!he.isEditor(r)&&(ae.isElement(r)&&(e.isInline(r)||0===r.children.length||Ue.isText(r.children[0])||e.isInline(r.children[0]))),a=0,s=0;s<r.children.length;s++,a++){var u=De.get(e,o);if(!Ue.isText(u)){var l=r.children[s],c=u.children[a-1],d=s===r.children.length-1;if((Ue.isText(l)||ae.isElement(l)&&e.isInline(l))!==i)pt.removeNodes(e,{at:o.concat(a),voids:!0}),a--;else if(ae.isElement(l)){if(e.isInline(l))if(null!=c&&Ue.isText(c)){if(d){pt.insertNodes(e,{text:""},{at:o.concat(a+1),voids:!0}),a++}}else{pt.insertNodes(e,{text:""},{at:o.concat(a),voids:!0}),a++}}else null!=c&&Ue.isText(c)&&(Ue.equals(l,c,{loose:!0})?(pt.mergeNodes(e,{at:o.concat(a),voids:!0}),a--):""===c.text?(pt.removeNodes(e,{at:o.concat(a-1),voids:!0}),a--):""===l.text&&(pt.removeNodes(e,{at:o.concat(a),voids:!0}),a--))}}},removeMark:function(t){var n=e.selection;if(n)if(Ie.isExpanded(n))pt.unsetNodes(e,t,{match:Ue.isText,split:!0});else{var r=w({},he.marks(e)||{});delete r[t],e.marks=r,m.get(e)||e.onChange()}}};return e},Kf}var ip,ap=op(),sp={};function up(){if(ip)return sp;ip=1;var e=Xf(),t=op(),n={isHistory:function(n){return e.isPlainObject(n)&&Array.isArray(n.redos)&&Array.isArray(n.undos)&&(0===n.redos.length||t.Operation.isOperationList(n.redos[0].operations))&&(0===n.undos.length||t.Operation.isOperationList(n.undos[0].operations))}},r=new WeakMap,o=new WeakMap,i=new WeakMap,a={isHistoryEditor:function(e){return n.isHistory(e.history)&&t.Editor.isEditor(e)},isMerging:function(e){return i.get(e)},isSaving:function(e){return o.get(e)},redo:function(e){e.redo()},undo:function(e){e.undo()},withMerging:function(e,t){var n=a.isMerging(e);i.set(e,!0),t(),i.set(e,n)},withoutMerging:function(e,t){var n=a.isMerging(e);i.set(e,!1),t(),i.set(e,n)},withoutSaving:function(e,t){var n=a.isSaving(e);o.set(e,!1),t(),o.set(e,n)}};function s(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 u(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 u(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 u(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 l=function(e,n){return!(!n||"insert_text"!==e.type||"insert_text"!==n.type||e.offset!==n.offset+n.text.length||!t.Path.equals(e.path,n.path))||!(!n||"remove_text"!==e.type||"remove_text"!==n.type||e.offset+e.text.length!==n.offset||!t.Path.equals(e.path,n.path))},c=function(e,t){return"set_selection"!==e.type};return sp.HISTORY=r,sp.History=n,sp.HistoryEditor=a,sp.MERGING=i,sp.SAVING=o,sp.withHistory=function(e){var n=e,r=n.apply;return n.history={undos:[],redos:[]},n.redo=function(){var e=n.history,r=e.redos;if(r.length>0){var o=r[r.length-1];o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore),a.withoutSaving(n,(function(){t.Editor.withoutNormalizing(n,(function(){var e,t=s(o.operations);try{for(t.s();!(e=t.n()).done;){var r=e.value;n.apply(r)}}catch(e){t.e(e)}finally{t.f()}}))})),e.redos.pop(),n.writeHistory("undos",o)}},n.undo=function(){var e=n.history,r=e.undos;if(r.length>0){var o=r[r.length-1];a.withoutSaving(n,(function(){t.Editor.withoutNormalizing(n,(function(){var e,r=s(o.operations.map(t.Operation.inverse).reverse());try{for(r.s();!(e=r.n()).done;){var i=e.value;n.apply(i)}}catch(e){r.e(e)}finally{r.f()}o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore)}))})),n.writeHistory("redos",o),e.undos.pop()}},n.apply=function(e){var t=n.operations,o=n.history,i=o.undos,s=i[i.length-1],u=s&&s.operations[s.operations.length-1],d=a.isSaving(n),f=a.isMerging(n);if(null==d&&(d=c(e)),d){if(null==f&&(f=null!=s&&(0!==t.length||l(e,u))),s&&f)s.operations.push(e);else{var p={operations:[e],selectionBefore:n.selection};n.writeHistory("undos",p)}for(;i.length>100;)i.shift();o.redos=[]}r(e)},n.writeHistory=function(e,t){n.history[e].push(t)},n},sp}var lp=up(),cp=function(e,t){return cp=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])},cp(e,t)};function dp(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}cp(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var fp=function(){return fp=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},fp.apply(this,arguments)};function pp(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function hp(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function gp(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 vp(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 mp(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 yp(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=gp(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;var bp,Ep={exports:{}};var Cp,Dp,wp=(bp||(bp=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",s="[object Function]",u="[object GeneratorFunction]",l="[object Map]",c="[object Number]",d="[object Object]",f="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",y="[object ArrayBuffer]",E="[object DataView]",C="[object Float32Array]",D="[object Float64Array]",w="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",x="[object Uint8Array]",O="[object Uint8ClampedArray]",T="[object Uint16Array]",N="[object Uint32Array]",B=/\w*$/,k=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,P={};P[o]=P["[object Array]"]=P[y]=P[E]=P[i]=P[a]=P[C]=P[D]=P[w]=P[A]=P[S]=P[l]=P[c]=P[d]=P[p]=P[h]=P[g]=P[v]=P[x]=P[O]=P[T]=P[N]=!0,P["[object Error]"]=P[s]=P[m]=!1;var I="object"==typeof b&&b&&b.Object===Object&&b,R="object"==typeof self&&self&&self.Object===Object&&self,L=I||R||Function("return this")(),_=t&&!t.nodeType&&t,M=_&&e&&!e.nodeType&&e,j=M&&M.exports===_;function H(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function $(e,t,n,r){for(var o=-1,i=e?e.length:0;++o<i;)n=t(n,e[o],o,e);return n}function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var q=Array.prototype,K=Function.prototype,Y=Object.prototype,X=L["__core-js_shared__"],Z=function(){var e=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=K.toString,Q=Y.hasOwnProperty,ee=Y.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=j?L.Buffer:void 0,re=L.Symbol,oe=L.Uint8Array,ie=W(Object.getPrototypeOf,Object),ae=Object.create,se=Y.propertyIsEnumerable,ue=q.splice,le=Object.getOwnPropertySymbols,ce=ne?ne.isBuffer:void 0,de=W(Object.keys,Object),fe=_e(L,"DataView"),pe=_e(L,"Map"),he=_e(L,"Promise"),ge=_e(L,"Set"),ve=_e(L,"WeakMap"),me=_e(Object,"create"),ye=$e(fe),be=$e(pe),Ee=$e(he),Ce=$e(ge),De=$e(ve),we=re?re.prototype:void 0,Ae=we?we.valueOf:void 0;function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){this.__data__=new xe(e)}function Ne(e,t){var n=Ve(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&We(e)}(e)&&Q.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!Q.call(e,a)||i&&("length"==a||He(a,r))||n.push(a);return n}function Be(e,t,n){var r=e[t];Q.call(e,t)&&Ue(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function ke(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function Fe(e,t,n,r,f,m,b){var k;if(r&&(k=m?r(e,f,m,b):r(e)),void 0!==k)return k;if(!Ke(e))return e;var F=Ve(e);if(F){if(k=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Q.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,k)}else{var I=je(e),R=I==s||I==u;if(Ge(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(I==d||I==o||R&&!m){if(U(e))return m?e:{};if(k=function(e){return"function"!=typeof e.constructor||ze(e)?{}:Ke(t=ie(e))?ae(t):{};var t}(R?{}:e),!t)return function(e,t){return Re(e,Me(e),t)}(e,function(e,t){return e&&Re(t,Ye(t),e)}(k,e))}else{if(!P[I])return m?e:{};k=function(e,t,n,r){var o=e.constructor;switch(t){case y:return Ie(e);case i:case a:return new o(+e);case E:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case C:case D:case w:case A:case S:case x:case O:case T:case N:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case l:return function(e,t,n){var r=t?n(V(e),!0):V(e);return $(r,H,new e.constructor)}(e,r,n);case c:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,B.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(G(e),!0):G(e);return $(r,z,new e.constructor)}(e,r,n);case v:return function(e){return Ae?Object(Ae.call(e)):{}}(e)}}(e,I,Fe,t)}}b||(b=new Te);var L=b.get(e);if(L)return L;if(b.set(e,k),!F)var _=n?function(e){return function(e,t,n){var r=t(e);return Ve(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ye,Me)}(e):Ye(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(_||e,(function(o,i){_&&(o=e[i=o]),Be(k,i,Fe(o,t,n,r,i,e,b))})),k}function Pe(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(qe(e)||U(e)?te:k).test($e(e));var t}function Ie(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Re(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o];Be(n,a,e[a])}return n}function Le(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function _e(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Pe(n)?n:void 0}Se.prototype.clear=function(){this.__data__=me?me(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return Q.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0||(n==t.length-1?t.pop():ue.call(t,n,1),0))},xe.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return ke(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Oe.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||xe),string:new Se}},Oe.prototype.delete=function(e){return Le(this,e).delete(e)},Oe.prototype.get=function(e){return Le(this,e).get(e)},Oe.prototype.has=function(e){return Le(this,e).has(e)},Oe.prototype.set=function(e,t){return Le(this,e).set(e,t),this},Te.prototype.clear=function(){this.__data__=new xe},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Oe(r)}return n.set(e,t),this};var Me=le?W(le,Object):function(){return[]},je=function(e){return ee.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||F.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function $e(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(fe&&je(new fe(new ArrayBuffer(1)))!=E||pe&&je(new pe)!=l||he&&je(he.resolve())!=f||ge&&je(new ge)!=h||ve&&je(new ve)!=m)&&(je=function(e){var t=ee.call(e),n=t==d?e.constructor:void 0,r=n?$e(n):void 0;if(r)switch(r){case ye:return E;case be:return l;case Ee:return f;case Ce:return h;case De:return m}return t});var Ve=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!qe(e)}var Ge=ce||function(){return!1};function qe(e){var t=Ke(e)?ee.call(e):"";return t==s||t==u}function Ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return We(e)?Ne(e):function(e){if(!ze(e))return de(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Fe(e,!0,!0)}}(Ep,Ep.exports)),Ep.exports),Ap=E(wp);var Sp=function(){if(Dp)return Cp;Dp=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var a,s,u=Object.prototype,l=u.hasOwnProperty,c=u.toString,d=u.propertyIsEnumerable,f=(a=Object.keys,s=Object,function(e){return a(s(e))});function p(e,n){var r=b(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&E(e)}(e)&&l.call(e,"callee")&&(!d.call(e,"callee")||c.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!l.call(e,a)||i&&("length"==a||y(a,o))||r.push(a);return r}var h,g=(h=function(e,t){return e&&v(e,t,C)},function(e,t){if(null==e)return e;if(!E(e))return h(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),v=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function m(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||u,t!==r)return f(e);var t,n,r,o=[];for(var i in Object(e))l.call(e,i)&&"constructor"!=i&&o.push(i);return o}function y(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<n}var b=Array.isArray;function E(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==n||t==r}(t)}function C(e){return E(e)?p(e):m(e)}function D(e){return e}return Cp=function(e,t){return(b(e)?i:g)(e,"function"==typeof t?t:D)}}(),xp=E(Sp),Op={};var Tp={CREATED:"created",DESTROYED:"destroyed",CHANGE:"change",SCROLL:"scroll",FULLSCREEN:"fullscreen",UNFULLSCREEN:"unFullScreen"},Np={};function Bp(e,t){var n=e.key,r=e.factory,o=e.config,i=fp(fp({},o),t||{});if(null!=Np[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));Np[n]=r,function(e,t){null!=t&&(Op[e]=t)}(n,i)}var kp,Fp,Pp=new WeakMap,Ip=new WeakMap,Rp=new WeakMap,Lp=new WeakMap,_p=new WeakMap,Mp=new WeakMap,jp=new WeakMap,Hp=new WeakMap,zp=new WeakMap,$p=new WeakMap,Up=new WeakMap,Vp=new WeakMap,Wp=new WeakMap,Gp=new WeakMap,qp=new WeakMap,Kp=new WeakMap,Yp=new WeakMap,Xp=new WeakMap,Zp=new WeakMap,Jp=new WeakMap,Qp=new WeakMap,eh=new WeakMap,th=new WeakMap,nh=new WeakMap,rh=new WeakMap,oh=new WeakMap,ih=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in Np)e.push(t);return e},t.getConfig=function(){var e=$p.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},ah=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),sh={},uh={exports:{}};uh.exports;function lh(){return kp||(kp=1,function(e,t){!function(e){function t(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function n(e,r){void 0===e&&(e={}),void 0===r&&(r={}),Object.keys(r).forEach((function(o){void 0===e[o]?e[o]=r[o]:t(r[o])&&t(e[o])&&Object.keys(r[o]).length>0&&n(e[o],r[o])}))}var r={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function o(){var e="undefined"!=typeof document?document:{};return n(e,r),e}var i={document:r,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function a(){var e="undefined"!=typeof window?window:{};return n(e,i),e}e.extend=n,e.getDocument=o,e.getWindow=a,e.ssrDocument=r,e.ssrWindow=i,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,uh.exports)),uh.exports}function ch(){if(Fp)return sh;Fp=1,Object.defineProperty(sh,"__esModule",{value:!0});var e=lh();function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}function r(e,t,o){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return r&&n(i,r.prototype),i},r.apply(null,arguments)}function o(e){var i="function"==typeof Map?new Map:void 0;return o=function(e){if(null===e||(o=e,-1===Function.toString.call(o).indexOf("[native code]")))return e;var o;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(e))return i.get(e);i.set(e,a)}function a(){return r(e,arguments,t(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),n(a,e)},o(e)}var i=function(e){var t,n;function r(t){var n,r,o;return n=e.call.apply(e,[this].concat(t))||this,r=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n),o=r.__proto__,Object.defineProperty(r,"__proto__",{get:function(){return o},set:function(e){o.__proto__=e}}),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(o(Array));function a(e){void 0===e&&(e=[]);var t=[];return e.forEach((function(e){Array.isArray(e)?t.push.apply(t,a(e)):t.push(e)})),t}function s(e,t){return Array.prototype.filter.call(e,t)}function u(t,n){var r=e.getWindow(),o=e.getDocument(),a=[];if(!n&&t instanceof i)return t;if(!t)return new i(a);if("string"==typeof t){var s=t.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){var u="div";0===s.indexOf("<li")&&(u="ul"),0===s.indexOf("<tr")&&(u="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(u="tr"),0===s.indexOf("<tbody")&&(u="table"),0===s.indexOf("<option")&&(u="select");var l=o.createElement(u);l.innerHTML=s;for(var c=0;c<l.childNodes.length;c+=1)a.push(l.childNodes[c])}else a=function(e,t){if("string"!=typeof e)return[e];for(var n=[],r=t.querySelectorAll(e),o=0;o<r.length;o+=1)n.push(r[o]);return n}(t.trim(),n||o)}else if(t.nodeType||t===r||t===o)a.push(t);else if(Array.isArray(t)){if(t instanceof i)return t;a=t}return new i(function(e){for(var t=[],n=0;n<e.length;n+=1)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(a))}u.fn=i.prototype;var l="resize scroll".split(" ");function c(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(void 0===n[0]){for(var o=0;o<this.length;o+=1)l.indexOf(e)<0&&(e in this[o]?this[o][e]():u(this[o]).trigger(e));return this}return this.on.apply(this,[e].concat(n))}}var d=c("click"),f=c("blur"),p=c("focus"),h=c("focusin"),g=c("focusout"),v=c("keyup"),m=c("keydown"),y=c("keypress"),b=c("submit"),E=c("change"),C=c("mousedown"),D=c("mousemove"),w=c("mouseup"),A=c("mouseenter"),S=c("mouseleave"),x=c("mouseout"),O=c("mouseover"),T=c("touchstart"),N=c("touchend"),B=c("touchmove"),k=c("resize"),F=c("scroll");return sh.$=u,sh.add=function(){for(var e,t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(e=0;e<r.length;e+=1){var i=u(r[e]);for(t=0;t<i.length;t+=1)this.push(i[t])}return this},sh.addClass=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a(t.map((function(e){return e.split(" ")})));return this.forEach((function(e){var t;(t=e.classList).add.apply(t,r)})),this},sh.animate=function(t,n){var r,o=e.getWindow(),i=this,a={props:Object.assign({},t),params:Object.assign({duration:300,easing:"swing"},n),elements:i,animating:!1,que:[],easingProgress:function(e,t){return"swing"===e?.5-Math.cos(t*Math.PI)/2:"function"==typeof e?e(t):t},stop:function(){a.frameId&&o.cancelAnimationFrame(a.frameId),a.animating=!1,a.elements.each((function(e){delete e.dom7AnimateInstance})),a.que=[]},done:function(e){if(a.animating=!1,a.elements.each((function(e){delete e.dom7AnimateInstance})),e&&e(i),a.que.length>0){var t=a.que.shift();a.animate(t[0],t[1])}},animate:function(e,t){if(a.animating)return a.que.push([e,t]),a;var n=[];a.elements.each((function(t,r){var i,s,u,l,c;t.dom7AnimateInstance||(a.elements[r].dom7AnimateInstance=a),n[r]={container:t},Object.keys(e).forEach((function(a){i=o.getComputedStyle(t,null).getPropertyValue(a).replace(",","."),s=parseFloat(i),u=i.replace(s,""),l=parseFloat(e[a]),c=e[a]+u,n[r][a]={initialFullValue:i,initialValue:s,unit:u,finalValue:l,finalFullValue:c,currentValue:s}}))}));var r,s,u=null,l=0,c=0,d=!1;return a.animating=!0,a.frameId=o.requestAnimationFrame((function f(){var p,h;r=(new Date).getTime(),d||(d=!0,t.begin&&t.begin(i)),null===u&&(u=r),t.progress&&t.progress(i,Math.max(Math.min((r-u)/t.duration,1),0),u+t.duration-r<0?0:u+t.duration-r,u),n.forEach((function(o){var i=o;s||i.done||Object.keys(e).forEach((function(o){if(!s&&!i.done){p=Math.max(Math.min((r-u)/t.duration,1),0),h=a.easingProgress(t.easing,p);var d=i[o],f=d.initialValue,g=d.finalValue,v=d.unit;i[o].currentValue=f+h*(g-f);var m=i[o].currentValue;(g>f&&m>=g||g<f&&m<=g)&&(i.container.style[o]=g+v,(c+=1)===Object.keys(e).length&&(i.done=!0,l+=1),l===n.length&&(s=!0)),s?a.done(t.complete):i.container.style[o]=m+v}}))})),s||(a.frameId=o.requestAnimationFrame(f))})),a}};if(0===a.elements.length)return i;for(var s=0;s<a.elements.length;s+=1)a.elements[s].dom7AnimateInstance?r=a.elements[s].dom7AnimateInstance:a.elements[s].dom7AnimateInstance=a;return r||(r=a),"stop"===t?r.stop():r.animate(a.props,a.params),i},sh.animationEnd=function(e){var t=this;return e&&t.on("animationend",(function n(r){r.target===this&&(e.call(this,r),t.off("animationend",n))})),this},sh.append=function(){for(var t,n=e.getDocument(),r=0;r<arguments.length;r+=1){t=r<0||arguments.length<=r?void 0:arguments[r];for(var o=0;o<this.length;o+=1)if("string"==typeof t){var a=n.createElement("div");for(a.innerHTML=t;a.firstChild;)this[o].appendChild(a.firstChild)}else if(t instanceof i)for(var s=0;s<t.length;s+=1)this[o].appendChild(t[s]);else this[o].appendChild(t)}return this},sh.appendTo=function(e){return u(e).append(this),this},sh.attr=function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(e,t);else for(var r in e)this[n][r]=e[r],this[n].setAttribute(r,e[r]);return this},sh.blur=f,sh.change=E,sh.children=function(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].children,o=0;o<r.length;o+=1)e&&!u(r[o]).is(e)||t.push(r[o]);return u(t)},sh.click=d,sh.closest=function(e){var t=this;return void 0===e?u([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},sh.css=function(t,n){var r,o=e.getWindow();if(1===arguments.length){if("string"!=typeof t){for(r=0;r<this.length;r+=1)for(var i in t)this[r].style[i]=t[i];return this}if(this[0])return o.getComputedStyle(this[0],null).getPropertyValue(t)}if(2===arguments.length&&"string"==typeof t){for(r=0;r<this.length;r+=1)this[r].style[t]=n;return this}return this},sh.data=function(e,t){var n;if(void 0===t){if(!(n=this[0]))return;if(n.dom7ElementDataStorage&&e in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[e];var r=n.getAttribute("data-"+e);return r||void 0}for(var o=0;o<this.length;o+=1)(n=this[o]).dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[e]=t;return this},sh.dataset=function(){var e=this[0];if(e){var t,n={};if(e.dataset)for(var r in e.dataset)n[r]=e.dataset[r];else for(var o=0;o<e.attributes.length;o+=1){var i=e.attributes[o];i.name.indexOf("data-")>=0&&(n[(t=i.name.split("data-")[1],t.toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=i.value)}for(var a in n)"false"===n[a]?n[a]=!1:"true"===n[a]?n[a]=!0:parseFloat(n[a])===1*n[a]&&(n[a]*=1);return n}},sh.default=u,sh.detach=function(){return this.remove()},sh.each=function(e){return e?(this.forEach((function(t,n){e.apply(t,[t,n])})),this):this},sh.empty=function(){for(var e=0;e<this.length;e+=1){var t=this[e];if(1===t.nodeType){for(var n=0;n<t.childNodes.length;n+=1)t.childNodes[n].parentNode&&t.childNodes[n].parentNode.removeChild(t.childNodes[n]);t.textContent=""}}return this},sh.eq=function(e){if(void 0===e)return this;var t=this.length;if(e>t-1)return u([]);if(e<0){var n=t+e;return u(n<0?[]:[this[n]])}return u([this[e]])},sh.filter=function(e){return u(s(this,e))},sh.find=function(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].querySelectorAll(e),o=0;o<r.length;o+=1)t.push(r[o]);return u(t)},sh.focus=p,sh.focusin=h,sh.focusout=g,sh.hasClass=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a(t.map((function(e){return e.split(" ")})));return s(this,(function(e){return r.filter((function(t){return e.classList.contains(t)})).length>0})).length>0},sh.height=function(){var t=e.getWindow();return this[0]===t?t.innerHeight:this.length>0?parseFloat(this.css("height")):null},sh.hide=function(){for(var e=0;e<this.length;e+=1)this[e].style.display="none";return this},sh.html=function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},sh.index=function(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},sh.insertAfter=function(e){for(var t=u(e),n=0;n<this.length;n+=1)if(1===t.length)t[0].parentNode.insertBefore(this[n],t[0].nextSibling);else if(t.length>1)for(var r=0;r<t.length;r+=1)t[r].parentNode.insertBefore(this[n].cloneNode(!0),t[r].nextSibling)},sh.insertBefore=function(e){for(var t=u(e),n=0;n<this.length;n+=1)if(1===t.length)t[0].parentNode.insertBefore(this[n],t[0]);else if(t.length>1)for(var r=0;r<t.length;r+=1)t[r].parentNode.insertBefore(this[n].cloneNode(!0),t[r])},sh.is=function(t){var n,r,o=e.getWindow(),a=e.getDocument(),s=this[0];if(!s||void 0===t)return!1;if("string"==typeof t){if(s.matches)return s.matches(t);if(s.webkitMatchesSelector)return s.webkitMatchesSelector(t);if(s.msMatchesSelector)return s.msMatchesSelector(t);for(n=u(t),r=0;r<n.length;r+=1)if(n[r]===s)return!0;return!1}if(t===a)return s===a;if(t===o)return s===o;if(t.nodeType||t instanceof i){for(n=t.nodeType?[t]:t,r=0;r<n.length;r+=1)if(n[r]===s)return!0;return!1}return!1},sh.keydown=m,sh.keypress=y,sh.keyup=v,sh.mousedown=C,sh.mouseenter=A,sh.mouseleave=S,sh.mousemove=D,sh.mouseout=x,sh.mouseover=O,sh.mouseup=w,sh.next=function(e){return this.length>0?e?this[0].nextElementSibling&&u(this[0].nextElementSibling).is(e)?u([this[0].nextElementSibling]):u([]):this[0].nextElementSibling?u([this[0].nextElementSibling]):u([]):u([])},sh.nextAll=function(e){var t=[],n=this[0];if(!n)return u([]);for(;n.nextElementSibling;){var r=n.nextElementSibling;e?u(r).is(e)&&t.push(r):t.push(r),n=r}return u(t)},sh.off=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];"function"==typeof t[1]&&(r=t[0],i=t[1],a=t[2],o=void 0),a||(a=!1);for(var s=r.split(" "),u=0;u<s.length;u+=1)for(var l=s[u],c=0;c<this.length;c+=1){var d=this[c],f=void 0;if(!o&&d.dom7Listeners?f=d.dom7Listeners[l]:o&&d.dom7LiveListeners&&(f=d.dom7LiveListeners[l]),f&&f.length)for(var p=f.length-1;p>=0;p-=1){var h=f[p];i&&h.listener===i||i&&h.listener&&h.listener.dom7proxy&&h.listener.dom7proxy===i?(d.removeEventListener(l,h.proxyListener,a),f.splice(p,1)):i||(d.removeEventListener(l,h.proxyListener,a),f.splice(p,1))}}return this},sh.offset=function(){if(this.length>0){var t=e.getWindow(),n=e.getDocument(),r=this[0],o=r.getBoundingClientRect(),i=n.body,a=r.clientTop||i.clientTop||0,s=r.clientLeft||i.clientLeft||0,u=r===t?t.scrollY:r.scrollTop,l=r===t?t.scrollX:r.scrollLeft;return{top:o.top+u-a,left:o.left+l-s}}return null},sh.on=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];function s(e){var t=e.target;if(t){var n=e.target.dom7EventData||[];if(n.indexOf(e)<0&&n.unshift(e),u(t).is(o))i.apply(t,n);else for(var r=u(t).parents(),a=0;a<r.length;a+=1)u(r[a]).is(o)&&i.apply(r[a],n)}}function l(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),i.apply(this,t)}"function"==typeof t[1]&&(r=t[0],i=t[1],a=t[2],o=void 0),a||(a=!1);for(var c,d=r.split(" "),f=0;f<this.length;f+=1){var p=this[f];if(o)for(c=0;c<d.length;c+=1){var h=d[c];p.dom7LiveListeners||(p.dom7LiveListeners={}),p.dom7LiveListeners[h]||(p.dom7LiveListeners[h]=[]),p.dom7LiveListeners[h].push({listener:i,proxyListener:s}),p.addEventListener(h,s,a)}else for(c=0;c<d.length;c+=1){var g=d[c];p.dom7Listeners||(p.dom7Listeners={}),p.dom7Listeners[g]||(p.dom7Listeners[g]=[]),p.dom7Listeners[g].push({listener:i,proxyListener:l}),p.addEventListener(g,l,a)}}return this},sh.once=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0],i=n[1],a=n[2],s=n[3];function u(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];a.apply(this,n),e.off(o,i,u,s),u.dom7proxy&&delete u.dom7proxy}return"function"==typeof n[1]&&(o=n[0],a=n[1],s=n[2],i=void 0),u.dom7proxy=a,e.on(o,i,u,s)},sh.outerHeight=function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},sh.outerWidth=function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},sh.parent=function(e){for(var t=[],n=0;n<this.length;n+=1)null!==this[n].parentNode&&(e?u(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return u(t)},sh.parents=function(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].parentNode;r;)e?u(r).is(e)&&t.push(r):t.push(r),r=r.parentNode;return u(t)},sh.prepend=function(t){var n,r,o=e.getDocument();for(n=0;n<this.length;n+=1)if("string"==typeof t){var a=o.createElement("div");for(a.innerHTML=t,r=a.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(a.childNodes[r],this[n].childNodes[0])}else if(t instanceof i)for(r=0;r<t.length;r+=1)this[n].insertBefore(t[r],this[n].childNodes[0]);else this[n].insertBefore(t,this[n].childNodes[0]);return this},sh.prependTo=function(e){return u(e).prepend(this),this},sh.prev=function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&u(t.previousElementSibling).is(e)?u([t.previousElementSibling]):u([]):t.previousElementSibling?u([t.previousElementSibling]):u([])}return u([])},sh.prevAll=function(e){var t=[],n=this[0];if(!n)return u([]);for(;n.previousElementSibling;){var r=n.previousElementSibling;e?u(r).is(e)&&t.push(r):t.push(r),n=r}return u(t)},sh.prop=function(e,t){if(1!==arguments.length||"string"!=typeof e){for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n][e]=t;else for(var r in e)this[n][r]=e[r];return this}return this[0]?this[0][e]:this},sh.remove=function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},sh.removeAttr=function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},sh.removeClass=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a(t.map((function(e){return e.split(" ")})));return this.forEach((function(e){var t;(t=e.classList).remove.apply(t,r)})),this},sh.removeData=function(e){for(var t=0;t<this.length;t+=1){var n=this[t];n.dom7ElementDataStorage&&n.dom7ElementDataStorage[e]&&(n.dom7ElementDataStorage[e]=null,delete n.dom7ElementDataStorage[e])}},sh.resize=k,sh.scroll=F,sh.scrollLeft=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];3===t.length&&"function"==typeof i&&(r=t[0],o=t[1],a=t[2],i=t[3]);var s=this;return void 0===r?s.length>0?s[0].scrollLeft:null:s.scrollTo(r,void 0,o,i,a)},sh.scrollTo=function(){for(var t=e.getWindow(),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=r[0],a=r[1],s=r[2],u=r[3],l=r[4];return 4===r.length&&"function"==typeof u&&(l=u,i=r[0],a=r[1],s=r[2],l=r[3],u=r[4]),void 0===u&&(u="swing"),this.each((function(){var e,n,r,o,c,d,f,p,h=this,g=a>0||0===a,v=i>0||0===i;if(void 0===u&&(u="swing"),g&&(e=h.scrollTop,s||(h.scrollTop=a)),v&&(n=h.scrollLeft,s||(h.scrollLeft=i)),s){g&&(r=h.scrollHeight-h.offsetHeight,c=Math.max(Math.min(a,r),0)),v&&(o=h.scrollWidth-h.offsetWidth,d=Math.max(Math.min(i,o),0));var m=null;g&&c===e&&(g=!1),v&&d===n&&(v=!1),t.requestAnimationFrame((function r(o){void 0===o&&(o=(new Date).getTime()),null===m&&(m=o);var i,a=Math.max(Math.min((o-m)/s,1),0),y="linear"===u?a:.5-Math.cos(a*Math.PI)/2;g&&(f=e+y*(c-e)),v&&(p=n+y*(d-n)),g&&c>e&&f>=c&&(h.scrollTop=c,i=!0),g&&c<e&&f<=c&&(h.scrollTop=c,i=!0),v&&d>n&&p>=d&&(h.scrollLeft=d,i=!0),v&&d<n&&p<=d&&(h.scrollLeft=d,i=!0),i?l&&l():(g&&(h.scrollTop=f),v&&(h.scrollLeft=p),t.requestAnimationFrame(r))}))}}))},sh.scrollTop=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];3===t.length&&"function"==typeof i&&(r=t[0],o=t[1],a=t[2],i=t[3]);var s=this;return void 0===r?s.length>0?s[0].scrollTop:null:s.scrollTo(void 0,r,o,i,a)},sh.show=function(){for(var t=e.getWindow(),n=0;n<this.length;n+=1){var r=this[n];"none"===r.style.display&&(r.style.display=""),"none"===t.getComputedStyle(r,null).getPropertyValue("display")&&(r.style.display="block")}return this},sh.siblings=function(e){return this.nextAll(e).add(this.prevAll(e))},sh.stop=function(){for(var e=this,t=0;t<e.length;t+=1)e[t].dom7AnimateInstance&&e[t].dom7AnimateInstance.stop()},sh.styles=function(){var t=e.getWindow();return this[0]?t.getComputedStyle(this[0],null):{}},sh.submit=b,sh.text=function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this},sh.toggleClass=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a(t.map((function(e){return e.split(" ")})));this.forEach((function(e){r.forEach((function(t){e.classList.toggle(t)}))}))},sh.touchend=N,sh.touchmove=B,sh.touchstart=T,sh.transform=function(e){for(var t=0;t<this.length;t+=1)this[t].style.transform=e;return this},sh.transition=function(e){for(var t=0;t<this.length;t+=1)this[t].style.transitionDuration="string"!=typeof e?e+"ms":e;return this},sh.transitionEnd=function(e){var t=this;return e&&t.on("transitionend",(function n(r){r.target===this&&(e.call(this,r),t.off("transitionend",n))})),this},sh.trigger=function(){for(var t=e.getWindow(),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i=r[0].split(" "),a=r[1],s=0;s<i.length;s+=1)for(var u=i[s],l=0;l<this.length;l+=1){var c=this[l];if(t.CustomEvent){var d=new t.CustomEvent(u,{detail:a,bubbles:!0,cancelable:!0});c.dom7EventData=r.filter((function(e,t){return t>0})),c.dispatchEvent(d),c.dom7EventData=[],delete c.dom7EventData}}return this},sh.val=function(e){if(void 0===e){var t=this[0];if(!t)return;if(t.multiple&&"select"===t.nodeName.toLowerCase()){for(var n=[],r=0;r<t.selectedOptions.length;r+=1)n.push(t.selectedOptions[r].value);return n}return t.value}for(var o=0;o<this.length;o+=1){var i=this[o];if(Array.isArray(e)&&i.multiple&&"select"===i.nodeName.toLowerCase())for(var a=0;a<i.options.length;a+=1)i.options[a].selected=e.indexOf(i.options[a].value)>=0;else i.value=e}return this},sh.value=function(e){return this.val(e)},sh.width=function(){var t=e.getWindow();return this[0]===t?t.innerWidth:this.length>0?parseFloat(this.css("width")):null},sh}var dh=ch(),fh=E(dh);const ph=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let hh=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"");function gh(e){Promise.resolve().then(e)}var vh,mh=function(e){return Object.prototype.toString.call(e)};dh.css&&(fh.fn.css=dh.css),dh.append&&(fh.fn.append=dh.append),dh.addClass&&(fh.fn.addClass=dh.addClass),dh.removeClass&&(fh.fn.removeClass=dh.removeClass),dh.hasClass&&(fh.fn.hasClass=dh.hasClass),dh.on&&(fh.fn.on=dh.on),dh.focus&&(fh.fn.focus=dh.focus),dh.attr&&(fh.fn.attr=dh.attr),dh.removeAttr&&(fh.fn.removeAttr=dh.removeAttr),dh.hide&&(fh.fn.hide=dh.hide),dh.show&&(fh.fn.show=dh.show),dh.offset&&(fh.fn.offset=dh.offset),dh.width&&(fh.fn.width=dh.width),dh.height&&(fh.fn.height=dh.height),dh.parent&&(fh.fn.parent=dh.parent),dh.parents&&(fh.fn.parents=dh.parents),dh.is&&(fh.fn.is=dh.is),dh.dataset&&(fh.fn.dataset=dh.dataset),dh.val&&(fh.fn.val=dh.val),dh.text&&(fh.fn.text=dh.text),dh.html&&(fh.fn.html=dh.html),dh.children&&(fh.fn.children=dh.children),dh.remove&&(fh.fn.remove=dh.remove),dh.find&&(fh.fn.find=dh.find),dh.each&&(fh.fn.each=dh.each),dh.empty&&(fh.fn.empty=dh.empty),function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(vh||(vh={}));var yh=/\[object HTML([A-Z][a-z]*)*Element\]/,bh=function(e){return yh.test(mh(e))},Eh=function(e){return null!=e&&"number"==typeof e.nodeType},Ch=function(e){return Eh(e)&&e.nodeType===vh.COMMENT_NODE},Dh=function(e){return Eh(e)&&e.nodeType===vh.ELEMENT_NODE},wh=function(e){return"[object Selection]"===mh(e)},Ah=function(e){return Eh(e)&&e.nodeType===vh.TEXT_NODE},Sh=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},xh=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(Ch(o)||Dh(o)&&0===o.childNodes.length||Dh(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]},Oh=function(e,t,n){return vp(xh(e,t,n),1)[0]},Th=function(e){var t,n,r="";if(Ah(e)&&e.nodeValue)return e.nodeValue;if(Dh(e)){try{for(var o=gp(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Th(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 Nh(e,t){if(!bh(e)||"true"!==e.dataset.slateVoid)for(var n=e.childNodes,r=n.length;r-=1;){var o=n[r],i=o.nodeType;Ah(o)?t(o,e):[vh.ELEMENT_NODE,vh.DOCUMENT_NODE,vh.DOCUMENT_FRAGMENT_NODE].includes(i)&&Nh(o,t)}}function Bh(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==vh.ELEMENT_NODE?"":t.tagName.toLowerCase()}var kh=new RegExp(String.fromCharCode(160),"g");function Fh(e){return e.replace(kh," ")}var Ph=["span","b","strong","i","em","s","strike","u","font","sub","sup"],Ih=[];var Rh=[];var Lh={};function _h(e,t){var n=e.length;if(n){var r=e[n-1];if(ap.Text.isText(r)){var o=Object.keys(r);if(1===o.length&&"text"===o[0])return r.text+=t,!0}}return!1}function Mh(e,t,n){return{type:"paragraph",children:[{text:fh(e).text().replace(/\s+/gm," ")}]}}function jh(e,t){var n=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach((function(e){if(Dh(e)){if("BR"===e.nodeName)return void(_h(n,"\n")||n.push({text:"\n"}));var r=zh(fh(e),t);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)}else if(Ah(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=Fh(o),_h(n,o)||n.push({text:o}))}})),n)}(e,t),r=function(e){for(var t in Lh)if(e[0].matches(t))return Lh[t];return Mh}(e),o=r(e[0],n,t);return Array.isArray(o)||(o=[o]),o.forEach((function(r){ap.Editor.isVoid(t,r)||(0===n.length&&(r.children=[{text:e.text().replace(/\s+/gm," ")}]),Rh.forEach((function(n){r=n(e[0],r,t)})))})),o}function Hh(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=Fh(n)};return Rh.forEach((function(n){r=n(e[0],r,t)})),r}function zh(e,t){Ih.forEach((function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=fh(r(e[0])))}));var n=Bh(e);if("span"===n){if(e.attr("data-w-e-type"))return jh(e,t);if(e[0].childNodes.length>1){var r=e[0].childNodes,o=function(e,t){var n={text:""};return Rh.forEach((function(r){n=r(e[0],n,t)})),n}(fh(e[0]),t);return Array.from(r).flatMap((function(e){var n=function(e,t,n){var r=e[0];if(Dh(r)){var o=zh(e,n);return Array.isArray(o)?o.map((function(e){return fp(fp({},t),e)})):[fp(fp({},t),o)]}if(Ch(r))return null;var i=Ah(r)?{text:r.textContent||""}:Hh(e,n);return[fp(fp({},t),i)]}(fh(e),o,t);return n||[]}))}return Hh(e,t)}if("code"===n)return"pre"===Bh(e.parent())?jh(e,t):Hh(e,t);if(Ph.includes(n)){if(e[0].childNodes.length>0&&3!==e[0].childNodes[0].nodeType){r=e[0].childNodes;return fp(fp({},zh(fh(r[0]),t)),Hh(e,t))}return Hh(e,t)}return jh(e,t)}function $h(e,t,n){var r=fh(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(Tp.DESTROYED,(function(){r.removeAttr(t)})),!1)}function Uh(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=fh("<div>".concat(t,"</div>"));return Array.from(r.children()).forEach((function(t){var r=zh(fh(t),e);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)})),n}function Vh(e,t){return"w-e-element-".concat(e,"-").concat(t)}var Wh=[];var Gh,qh,Kh={};function Yh(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function Xh(e,t){var n=e.type,r=void 0===n?"":n,o=e.children,i=void 0===o?[]:o,a=ap.Editor.isVoid(t,e),s="";a||(s=i.map((function(e){return lg(e,t)})).join(""));var u=function(e){return Kh[e]||Yh}(r),l=u(e,s,t),c="";if(c="string"==typeof l?l:l.html||"",a||Wh.forEach((function(t){return c=t(e,c)})),"string"==typeof l)return c;var d=l.prefix,f=void 0===d?"":d,p=l.suffix,h=void 0===p?"":p;return f&&(c=f+c),h&&(c+=h),c}var Zh=function(){if(qh)return Gh;qh=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o="[object Map]",i="[object Promise]",a="[object Set]",s="[object String]",u="[object WeakMap]",l="[object DataView]",c=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,f="\\ud800-\\udfff",p="\\u0300-\\u036f\\ufe20-\\ufe23",h="\\u20d0-\\u20f0",g="\\ufe0e\\ufe0f",v="["+f+"]",m="["+p+h+"]",y="\\ud83c[\\udffb-\\udfff]",E="[^"+f+"]",C="(?:\\ud83c[\\udde6-\\uddff]){2}",D="[\\ud800-\\udbff][\\udc00-\\udfff]",w="\\u200d",A="(?:"+m+"|"+y+")"+"?",S="["+g+"]?",x=S+A+("(?:"+w+"(?:"+[E,C,D].join("|")+")"+S+A+")*"),O="(?:"+[E+m+"?",m,C,D,v].join("|")+")",T=RegExp(y+"(?="+y+")|"+O+x,"g"),N=RegExp("["+w+f+p+h+g+"]"),B="object"==typeof b&&b&&b.Object===Object&&b,k="object"==typeof self&&self&&self.Object===Object&&self,F=B||k||Function("return this")();function P(e,t){return function(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,(function(t){return e[t]}))}function I(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function R(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function L(e){return function(e){return N.test(e)}(e)?function(e){return e.match(T)||[]}(e):function(e){return e.split("")}(e)}var _,M,j=Function.prototype,H=Object.prototype,z=F["__core-js_shared__"],$=function(){var e=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),U=j.toString,V=H.hasOwnProperty,W=H.toString,G=RegExp("^"+U.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=F.Symbol,K=q?q.iterator:void 0,Y=H.propertyIsEnumerable,X=(_=Object.keys,M=Object,function(e){return _(M(e))}),Z=ce(F,"DataView"),J=ce(F,"Map"),Q=ce(F,"Promise"),ee=ce(F,"Set"),te=ce(F,"WeakMap"),ne=pe(Z),re=pe(J),oe=pe(Q),ie=pe(ee),ae=pe(te);function se(e,n){var r=he(e)||function(e){return function(e){return ye(e)&&ge(e)}(e)&&V.call(e,"callee")&&(!Y.call(e,"callee")||W.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!V.call(e,a)||i&&("length"==a||fe(a,o))||r.push(a);return r}function ue(e){if(!me(e)||function(e){return!!$&&$ in e}(e))return!1;var t=ve(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?G:c;return t.test(pe(e))}function le(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||H,t!==r)return X(e);var t,n,r,o=[];for(var i in Object(e))V.call(e,i)&&"constructor"!=i&&o.push(i);return o}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ue(n)?n:void 0}var de=function(e){return W.call(e)};function fe(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||d.test(t))&&t>-1&&t%1==0&&t<n}function pe(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(Z&&de(new Z(new ArrayBuffer(1)))!=l||J&&de(new J)!=o||Q&&de(Q.resolve())!=i||ee&&de(new ee)!=a||te&&de(new te)!=u)&&(de=function(e){var t=W.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?pe(n):void 0;if(r)switch(r){case ne:return l;case re:return o;case oe:return i;case ie:return a;case ae:return u}return t});var he=Array.isArray;function ge(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!ve(t)}function ve(e){var t=me(e)?W.call(e):"";return t==n||t==r}function me(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ye(e){return!!e&&"object"==typeof e}function be(e){return e?P(e,function(e){return ge(e)?se(e):le(e)}(e)):[]}return Gh=function(e){if(!e)return[];if(ge(e))return function(e){return"string"==typeof e||!he(e)&&ye(e)&&W.call(e)==s}(e)?L(e):function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e);if(K&&e[K])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[K]());var t=de(e);return(t==o?I:t==a?R:be)(e)},Gh}(),Jh=E(Zh),Qh=0,eg=function(){this.id="".concat(Qh++)},tg="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),ng="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),rg="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),og="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),ig="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),ag="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),sg=!ig&&!og&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,ug={getWindow:function(e){var t=Qp.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=Jp.get(t);return n||(n=new eg,Jp.set(t,n)),n},setNewKey:function(e){var t=new eg;Jp.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var o=qp.get(r);if(null==o){if(ap.Editor.isEditor(r))return n;break}var i=Gp.get(r);if(null==i)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(t)))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=ug.toDOMNode(e,e),n=t.getRootNode();return"[object HTMLDocument]"!==mh(n)&&!function(e){return"[object ShadowRoot]"===mh(e)}(n)||null==Reflect.get(n,"getSelection")?t.ownerDocument:n},getParentNode:function(e,t){return qp.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=ug.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,t){var n=[ug.findPath(e,t)[0]];return ap.Node.get(e,n)},toDOMNode:function(e,t){var n;if(ap.Editor.isEditor(t))n=Kp.get(e);else{var r=ug.findKey(e,t);n=Xp.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(t)));return n},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=ug.toDOMNode(e,e);try{r=Dh(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,o=ap.Range.isBackward(t),i=ug.toDOMPoint(e,n),a=ap.Range.isCollapsed(t)?i:ug.toDOMPoint(e,r),s=ug.getWindow(e).document.createRange(),u=vp(o?a:i,2),l=u[0],c=u[1],d=vp(o?i:a,2),f=d[0],p=d[1],h=!!(Dh(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!(Dh(f)?f:f.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,h?1:c),s.setEnd(f,g?1:p),s},toDOMPoint:function(e,t){var n,r,o,i=vp(ap.Editor.node(e,t.path),1)[0],a=ug.toDOMNode(e,i);ap.Editor.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var l=gp(s),c=l.next();!c.done;c=l.next()){var d=c.value,f=d.childNodes[0];if(null!=f&&null!=f.textContent){var p=f.textContent.length,h=d.getAttribute("data-slate-length"),g=u+(null==h?p:parseInt(h,10));if(t.offset<=g){o=[f,Math.min(p,Math.max(0,t.offset-u))];break}u=g}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(t)));return o},toSlateNode:function(e,t){var n=Dh(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Yp.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,o=t.target;if(null==n||null==r)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i,a=ug.toSlateNode(e,t.target),s=ug.findPath(e,a);if(ap.Editor.isVoid(e,a)){var u=o.getBoundingClientRect(),l=e.isInline(a)?n-u.left<u.left+u.width-n:r-u.top<u.top+u.height-r,c=ap.Editor.point(e,s,{edge:l?"start":"end"}),d=l?ap.Editor.before(e,c):ap.Editor.after(e,c);if(d)return ap.Editor.range(e,d)}var f=this.getWindow(e).document;if(f.caretRangeFromPoint)i=f.caretRangeFromPoint(n,r);else{var p=f.caretPositionFromPoint(n,r);p&&((i=f.createRange()).setStart(p.offsetNode,p.offset),i.setEnd(p.offsetNode,p.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));return ug.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,n){var r,o,i,a,s,u=n.exactMatch,l=n.suppressThrow;if((wh(t)?t.anchorNode:t.startContainer)&&(wh(t)?(r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=ag&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=t.collapsed)),null==r||null==i||null==o||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=ug.toSlatePoint(e,[r,o],{exactMatch:u,suppressThrow:l});if(!c)return null;var d=s?c:ug.toSlatePoint(e,[i,a],{exactMatch:u,suppressThrow:l});if(!d)return null;var f={anchor:c,focus:d};return ap.Range.isExpanded(f)&&ap.Range.isForward(f)&&Dh(i)&&ap.Editor.void(e,{at:f.focus,mode:"highest"})&&(f=ap.Editor.unhangRange(e,f,{voids:!0})),f},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,a=vp(o?t:function(e){var t,n=vp(e,2),r=n[0],o=n[1];if(Dh(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=vp(xh(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;Dh(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=Oh(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]}(t),2),s=a[0],u=a[1],l=s.parentNode,c=null,d=0;if(l){var f=l.closest('[data-slate-void="true"]'),p=l.closest("[data-slate-leaf]"),h=null,g=ug.getWindow(e);if(p&&g.document.createRange){c=p.closest('[data-slate-node="text"]');var v=g.document.createRange();v.setStart(c,0),v.setEnd(s,u);var m=v.cloneContents();mp(mp([],vp(Jh(m.querySelectorAll("[data-slate-zero-width]"))),!1),vp(Jh(m.querySelectorAll("[contenteditable=false]"))),!1).forEach((function(e){e.parentNode.removeChild(e)})),d=m.textContent.length,h=c}else f&&((p=f.querySelector("[data-slate-leaf]"))?(c=p.closest('[data-slate-node="text"]'),d=(h=p).textContent.length,h.querySelectorAll("[data-slate-zero-width]").forEach((function(e){d-=e.textContent.length}))):d=1);h&&d===h.textContent.length&&(l.hasAttribute("data-slate-zero-width")||ng&&(null===(r=h.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(d-=1)}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var y=ug.toSlateNode(e,c);return{path:ug.findPath(e,y),offset:d}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return ap.Editor.hasPath(e,n.path)&&ap.Editor.hasPath(e,r.path)},getNodeType:function(e){return ap.Element.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map((function(e){return ap.Node.string(e)})).join("")},getSelectedElems:function(e){var t,n,r=[],o=ap.Editor.nodes(e,{universal:!0});try{for(var i=gp(o),a=i.next();!a.done;a=i.next()){var s=vp(a.value,1)[0];ap.Element.isElement(s)&&r.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=vp(ap.Editor.nodes(e,{match:function(e){return n.checkNodeType(e,t)},universal:!0}),1),o=r[0];return null==o?null:o[0]},getSelectedTextNode:function(e){var t=vp(ap.Editor.nodes(e,{match:function(e){return ap.Text.isText(e)},universal:!0}),1),n=t[0];return null==n?null:n[0]},isNodeSelected:function(e,t){var n=vp(ap.Editor.nodes(e,{match:function(e){return e===t},universal:!0}),1),r=n[0];return null!=r&&vp(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(ap.Editor.isEnd(e,n.anchor,t)||ap.Editor.isEnd(e,n.focus,t))},getTextarea:function(e){var t=Pp.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return Lp.get(e)||null},getHoverbar:function(e){return Mp.get(e)||null},normalizeContent:function(e){e.children.forEach((function(t,n){e.normalizeNode([t,[n]])}))},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-e.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var t,n,r,o,i=ug.getTextarea(e).$textArea,a=null==i?void 0:i[0].childNodes;if(a)try{for(var s=gp(Array.from(a)),u=s.next();!u.done;u=s.next()){var l=u.value;if(!Ah(l))break;l.remove()}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}var c=ap.Editor.nodes(e,{match:function(t){return!(!ap.Element.isElement(t)||e.isInline(t))},universal:!0});try{for(var d=gp(c),f=d.next();!f.done;f=d.next()){var p=f.value;if(null!=p){var h=p[0];Nh(ug.toDOMNode(e,h),(function(e,t){var n=fh(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)}))}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,n,r=ap.Editor.nodes(e,{match:function(t){return e.isVoid(t)}}),o=0;try{for(var i=gp(r),a=i.next();!a.done;a=i.next()){a.value&&(o+=1)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(ap.Range.isExpanded(t))return!1;var n=ug.getSelectedNodeByType(e,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(e,t){var n=ap.Editor.node(e,t);if(null==n)return!1;var r=vp(n,1)[0].children;if(1===r.length&&""===r[0].text)return!0;return!1}};function lg(e,t){return ap.Element.isElement(e)?Xh(e,t):function(e,t){var n=e.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=n;r=function(e){return e.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=ug.getParentsNodes(t,e).some((function(e){return"pre"===ug.getNodeType(e)}));if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=ug.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return Wh.forEach((function(t){return r=t(e,r)})),r}(e,t)}var cg=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},dg=function(e,t,n){var r=ug.toDOMRange(e,t).getBoundingClientRect(),o=ug.toDOMRange(e,n).getBoundingClientRect();return cg(r,o)&&cg(o,r)};function fg(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):ap.Transforms.insertNodes(e,t,{mode:"highest"})}var pg,hg,gg,vg,mg,yg,bg,Eg,Cg,Dg,wg,Ag,Sg,xg,Og,Tg,Ng,Bg,kg,Fg,Pg,Ig,Rg,Lg,_g,Mg,jg,Hg,zg,$g,Ug,Vg,Wg,Gg,qg,Kg,Yg,Xg,Zg,Jg,Qg=function(e){var t=e,n=t.onChange,r=t.insertText,o=t.apply,i=t.deleteBackward;return t.insertText=function(e){t.getConfig().readOnly||r(e)},t.apply=function(e){var n,r,i,a,s,u,l,c,d=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":try{for(var f=gp(ap.Editor.levels(t,{at:e.path})),p=f.next();!p.done;p=f.next()){var h=vp(p.value,2),g=h[0],v=h[1],m=ug.findKey(t,g);d.push([v,m])}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var y=gp(ap.Editor.levels(t,{at:ap.Path.parent(e.path)})),b=y.next();!b.done;b=y.next()){var E=vp(b.value,2);g=E[0],v=E[1],m=ug.findKey(t,g);d.push([v,m])}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}break;case"move_node":try{for(var C=gp(ap.Editor.levels(t,{at:ap.Path.common(ap.Path.parent(e.path),ap.Path.parent(e.newPath))})),D=C.next();!D.done;D=C.next()){var w=vp(D.value,2);g=w[0],v=w[1],m=ug.findKey(t,g);d.push([v,m])}}catch(e){s={error:e}}finally{try{D&&!D.done&&(u=C.return)&&u.call(C)}finally{if(s)throw s.error}}}o(e);try{for(var A=gp(d),S=A.next();!S.done;S=A.next()){var x=vp(S.value,2);v=x[0],m=x[1],g=vp(ap.Editor.node(t,v),1)[0];Jp.set(g,m)}}catch(e){l={error:e}}finally{try{S&&!S.done&&(c=A.return)&&c.call(A)}finally{if(l)throw l.error}}},t.deleteBackward=function(n){if("line"!==n)return i(n);if(e.selection&&ap.Range.isCollapsed(e.selection)){var r=ap.Editor.above(e,{match:function(t){return ap.Editor.isBlock(e,t)},at:e.selection});if(r){var o=vp(r,2)[1],a=ap.Editor.range(e,o,e.selection.anchor),s=function(e,t){var n=ap.Editor.range(e,ap.Range.end(t)),r=Array.from(ap.Editor.positions(e,{at:t})),o=0,i=r.length,a=Math.floor(i/2);if(dg(e,ap.Editor.range(e,r[o]),n))return ap.Editor.range(e,r[o],n);if(r.length<2)return ap.Editor.range(e,r[r.length-1],n);for(;a!==r.length&&a!==o;)dg(e,ap.Editor.range(e,r[a]),n)?i=a:o=a,a=Math.floor((o+i)/2);return ap.Editor.range(e,r[i],n)}(t,a);ap.Range.isCollapsed(s)||ap.Transforms.delete(e,{at:s})}}},t.onChange=function(){var e=t.selection;null!=e&&th.set(t,e),t.emit("change"),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children;return(void 0===e?[]:e).map((function(e){return lg(e,t)})).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map((function(e){return ap.Node.string(e)})).join("\n")},t.getSelectionText=function(){var n=t.selection;return null==n?"":ap.Editor.string(e,n)},t.getElemsByType=function(e,n){var r,o;void 0===n&&(n=!1);var i=[],a=ap.Editor.nodes(t,{at:[],universal:!0});try{for(var s=gp(a),u=s.next();!u.done;u=s.next()){var l=vp(u.value,1)[0];if(ap.Element.isElement(l))if(n?l.type.indexOf(e)>=0:l.type===e){var c=ug.findKey(t,l),d=Vh(l.type,c.id);i.push(fp(fp({},l),{id:d}))}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=void 0===e?[]:e;if(n.length>1)return!1;var r=n[0];if(null==r)return!0;if(!ap.Element.isElement(r)||"paragraph"!==r.type)return!1;var o=r.children,i=void 0===o?[]:o;if(i.length>1)return!1;var a=i[0];return null==a||ap.Text.isText(a)&&""===a.text},t.clear=function(){ap.Transforms.delete(t,{at:{anchor:ap.Editor.start(t,[]),focus:ap.Editor.end(t,[])}}),0===t.children.length&&ap.Transforms.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return ug.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e){var r=document.createElement("div");r.innerHTML=e;var o=Array.from(r.childNodes);if(o=o.filter((function(e){var t=e.nodeName;return!!Ah(e)||!!Dh(e)&&!ah.has(t.toLowerCase())})),0!==o.length){var i=t.selection;if(null!=i){var a=null;if(ug.isSelectedEmptyParagraph(t)&&!n)a=[i.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var s=0;o.forEach((function(e,n){var r=e.nodeName,i=e.textContent,a=void 0===i?"":i;if(Ah(e)){if(!a||!a.trim())return;t.insertNode({text:a})}else if("BR"!==r){var u=e,l=!1;if(Ph.includes(r.toLowerCase()))l=!0;else for(var c in Lh)if(u.matches(c)){l=!0;break}if(l){var d=zh(fh(u),t);return Array.isArray(d)?(d.forEach((function(e){return fg(t,e)})),s+=1):(fg(t,d),s+=1),void(ug.isSelectedVoidNode(t)&&t.move(1))}var f=window.getComputedStyle(u).display;if(!ug.isSelectedEmptyParagraph(t)&&f.indexOf("inline")<0){if(n>=1)(function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")})(o[n-1])&&t.insertBreak();t.insertBreak()}t.dangerouslyInsertHtml(u.innerHTML,!0)}else t.insertText("\n")})),s&&a&&ug.isEmptyPath(t,a)&&ap.Transforms.removeNodes(t,{at:a}),r.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var n=t.isDisabled(),r=t.isFocused(),o=JSON.stringify(t.selection);t.enable(),t.focus(),t.clear();var i=Uh(t,null==e?"":e);if(ap.Transforms.insertFragment(t,i),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(o))}catch(e){t.select(ap.Editor.start(t,[]))}},t},ev=1,tv=function(e){var t=e;return t.id="wangEditor-".concat(ev++),t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(ug.toDOMNode(t,t).focus({preventScroll:!0}),eh.set(t,!0),e){var n=ap.Editor.end(t,[]);ap.Transforms.select(t,n)}else{var r=th.get(t);r?ap.Transforms.select(t,r):ap.Transforms.select(t,ap.Editor.start(t,[]))}},t.isFocused=function(){return!!eh.get(t)},t.blur=function(){ug.toDOMNode(t,t).blur(),ap.Transforms.deselect(t),eh.set(t,!1)},t.updateView=function(){ug.getTextarea(t).changeViewState();var e=ug.getToolbar(t);e&&e.changeToolbarState();var n=ug.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=ug.getTextarea(t);e.destroy(),Pp.delete(t),Ip.delete(e);var n=ug.getToolbar(t);n&&(n.destroy(),Lp.delete(t),Rp.delete(n));var r=ug.getHoverbar(t);r&&(r.destroy(),Mp.delete(t),_p.delete(r)),t.isDestroyed=!0,t.emit("destroyed")}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return n+="\nYou has disabled editor scroll, please do this yourself",void console.warn(n)}var r=fh("#".concat(e));if(0!==r.length){var o=r[0];if(!ug.hasDOMNode(t,o)){n="Element (found by id is '".concat(e,"') is not in editor DOM");return n+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(n,o)}var i=ug.getTextarea(t),a=i.$textAreaContainer,s=i.$scroll,u=r.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||ug.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=Hp.get(t);null!=e&&e.forEach((function(e){return e.hide()}))},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return ug.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=ug.getToolbar(t);n&&(e=n.$box);var r=ug.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),t.isFullScreen=!0,t.emit("fullScreen")}},t.unFullScreen=function(){if(t.isFullScreen){var e=ug.getTextarea(t).$box.parent();setTimeout((function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit("unFullScreen")}),200)}},t.getEditableContainer=function(){return ug.getTextarea(t).$textAreaContainer[0]},t},nv={exports:{}},rv={exports:{}};function ov(){if(hg)return pg;hg=1;return pg=function(e){return null!=e}}function iv(){if(yg)return mg;yg=1;var e=function(){if(vg)return gg;vg=1;var e=ov(),t={object:!0,function:!0,undefined:!0};return gg=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return mg=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function av(){if(Dg)return Cg;Dg=1;var e=function(){if(Eg)return bg;Eg=1;var e=iv();return bg=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 Cg=function(r){return!!e(r)&&!t.test(n.call(r))}}function sv(){if(Bg)return Ng;Bg=1;var e=(Tg?Og:(Tg=1,Og=function(){}))();return Ng=function(t){return t!==e&&null!==t}}function uv(){return Ig||(Ig=1,Pg=(xg?Sg:(xg=1,Sg=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(Fg)return kg;Fg=1;var e=sv(),t=Object.keys;return kg=function(n){return t(e(n)?Object(n):n)}}()),Pg}function lv(){if(Mg)return _g;Mg=1;var e=uv(),t=function(){if(Lg)return Rg;Lg=1;var e=sv();return Rg=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return _g=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},_g}function cv(){return Hg?jg:(Hg=1,jg=(Ag||(Ag=1,wg=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")}),wg)()?Object.assign:lv())}function dv(){return Kg||(Kg=1,qg=function(){if(Vg)return Ug;Vg=1;var e="razdwatrzy";return Ug=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(Gg)return Wg;Gg=1;var e=String.prototype.indexOf;return Wg=function(t){return e.call(this,t,arguments[1])>-1},Wg}()),qg}function fv(){if(Yg)return rv.exports;Yg=1;var e=ov(),t=av(),n=cv(),r=function(){if($g)return zg;$g=1;var e=sv(),t=Array.prototype.forEach,n=Object.create;return zg=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},zg}(),o=dv(),i=rv.exports=function(t,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof t?(l=i,i=t,t=null):l=arguments[2],e(t)?(a=o.call(t,"c"),s=o.call(t,"e"),u=o.call(t,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,d;return"string"!=typeof i?(c=s,s=a,a=i,i=null):c=arguments[3],e(a)?t(a)?e(s)?t(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,e(i)?(u=o.call(i,"c"),l=o.call(i,"e")):(u=!0,l=!1),d={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),d):d},rv.exports}var pv=(Jg||(Jg=1,function(e,t){var n,r,o,i,a,s,u,l=fv(),c=Zg?Xg:(Zg=1,Xg=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,h=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),d.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e,t){var n,r,o,i;if(c(t),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},i=function(e){var t,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)d.call(r,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];d.call(o,this,i)}},a={on:n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=p(null),h(this,"__ee__",m),m.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o,emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?p(u):g(Object(e),s)},t.methods=a}(nv,nv.exports)),nv.exports),hv=E(pv);function gv(e){var t=rh.get(e);return null==t&&(t=hv(),rh.set(e,t)),t}var vv=new WeakMap;function mv(e,t){var n=vv.get(e);null==n&&(n=new Set,vv.set(e,n)),n.add(t)}var yv=function(e){var t=e;return t.on=function(e,n){var r=gv(t);if(r.on(e,n),"destroyed"===e&&mv(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),mv(t,o)}},t.once=function(e,n){gv(t).once(e,n)},t.off=function(e,n){gv(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=gv(t);if(o.emit.apply(o,mp([e],vp(n),!1)),"destroyed"===e){var i=function(e){return vv.get(e)||new Set}(t);i.forEach((function(e){return o.off("destroyed",e)})),function(e){vv.set(e,new Set)}(t)}},t};function bv(e){return pp(this,void 0,void 0,(function(){var t,n,r;return hp(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,fetch(e)];case 1:if(!(t=o.sent()).ok)throw new Error("Failed to fetch blob URL");return[4,t.blob()];case 2:return n=o.sent(),[2,new Promise((function(e,t){var r=new FileReader;r.onloadend=function(){e(r.result)},r.onerror=function(){t(new Error("Failed to read blob as data URL"))},r.readAsDataURL(n)}))];case 3:return r=o.sent(),console.error(r),[2,null];case 4:return[2]}}))}))}var Ev=function(e){var t=e;return t.setFragmentData=function(e){var n=t.selection;if(n){var r=vp(ap.Range.edges(n),2),o=r[0],i=r[1],a=ap.Editor.void(t,{at:o.path}),s=ap.Editor.void(t,{at:i.path});if(!ap.Range.isCollapsed(n)||a){var u=ug.toDOMRange(t,n),l=u.cloneContents(),c=l.childNodes[0];if(l.childNodes.forEach((function(e){e.textContent&&""!==e.textContent.trim()&&(c=e)})),s){var d=vp(s,1)[0],f=u.cloneRange(),p=ug.toDOMNode(t,d);f.setEndAfter(p),l=f.cloneContents()}if(a&&(c=l.querySelector("[data-slate-spacer]")),Array.from(l.querySelectorAll("[data-slate-zero-width]")).forEach((function(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""})),Ah(c)){var h=c.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(c),l.appendChild(h),c=h}var g=t.getFragment(),v=JSON.stringify(g),m=window.btoa(encodeURIComponent(v));c.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var y=l.ownerDocument.createElement("div");return y.appendChild(l),y.setAttribute("hidden","true"),l.ownerDocument.body.appendChild(y),e.setData("text/html",y.innerHTML),e.setData("text/plain",Th(y)),l.ownerDocument.body.removeChild(y),e}}},t.insertData=function(e){return pp(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v;return hp(this,(function(m){switch(m.label){case 0:return(n=e.getData("application/x-slate-fragment"))?(r=decodeURIComponent(window.atob(n)),o=JSON.parse(r),t.insertFragment(o),[2]):(i=e.getData("text/plain"),a=e.getData("text/html"),rg?(s=function(e){var t=e.match(/<img[^>]*src=["'](blob:[^"']+)["'][^>]*>/i);return t?t[1]:null}(a),s?[4,bv(s)]:[3,2]):[3,2]);case 1:(u=m.sent())&&(a='<img src="'.concat(u,'" alt="image.png">'),URL.revokeObjectURL(s)),m.label=2;case 2:if(a)return t.dangerouslyInsertHtml(a),[2];if(l=ug.getLeftLengthOfMaxLength(t),i){c=i.split(/\n\r|\r\n|\r|\n/),d=!1;try{for(f=gp(c),p=f.next();!p.done;p=f.next())h=p.value,d&&l>0&&ap.Transforms.splitNodes(t,{always:!0}),t.insertText(h),d=!0}catch(e){g={error:e}}finally{try{p&&!p.done&&(v=f.return)&&v.call(f)}finally{if(g)throw g.error}}}return[2]}}))}))},t},Cv=function(e){var t=e,n=t.insertText,r=t.insertNode,o=t.insertFragment,i=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=ug.getLeftLengthOfMaxLength(t);r<=0||(r<e.length?n(e.slice(0,r)):n(e))}else n(e)},t.insertNode=function(e){if(t.getConfig().maxLength){var n=ug.getLeftLengthOfMaxLength(t);if(!(n<=0))n<ap.Node.string(e).length||r(e)}else r(e)},t.insertFragment=function(e){if(t.getConfig().maxLength){if(e.length>0){var n=e[0];if(ug.getLeftLengthOfMaxLength(t)<ap.Node.string(n).length)return;o([n]);for(var r=1;r<e.length;r+=1)t.insertNode(e[r])}}else o(e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e)if(t.getConfig().maxLength){var r=ug.getLeftLengthOfMaxLength(t);if(!(r<=0)){var o=document.createElement("div");o.innerHTML=e,r<Array.from(o.childNodes).reduce((function(e,t){var n=t.nodeName;return t?Ah(t)?e+(t.textContent||""):Dh(t)?ah.has(n.toLowerCase())?e:e+(t.textContent||""):e:e}),"").length||i(e,n)}}else i(e,n)},t};function Dv(e){var t=ug.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function wv(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=Dv(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,u=ug.toDOMRange(e,n),l=u.getClientRects?u.getClientRects()[0]:null;if(null==l)return t;var c=l.height,d={},f=l.top-o,p=l.left-i;if(p>a/2){var h=a-p;d.right="".concat(h+5,"px")}else d.left="".concat(p+5,"px");if(f>s/2){var g=s-f;d.bottom="".concat(g+5,"px")}else{var v=f+c;v<0&&(v=0),d.top="".concat(v+5,"px")}return d}function Av(e,t,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==e.selection)return r;var o=ap.Element.isElement(t)&&e.isVoid(t),i=ap.Element.isElement(t)&&e.isInline(t),a=Zp.get(t);if(null==a)return r;var s=a.getBoundingClientRect(),u=s.top,l=s.left,c=s.height,d=s.width;if(o){var f=function(e){var t=[];t.push(e);for(var n=0;t.length>0;){var r=t.pop();if(null==r)break;if((n+=1)>1e4)break;var o=r.nodeName;if(r.nodeType===vh.ELEMENT_NODE){var i=o.toLowerCase();if(ph.includes(i)||"iframe"===i||"video"===i)return r;var a=r.children||[],s=a.length;if(s)for(var u=s-1;u>=0;u-=1)t.push(a[u])}}return null}(a);if(null!=f){var p=f.getBoundingClientRect();u=p.top,c=p.height}}var h=Dv(e);if(null==h)return r;var g=h.top,v=h.left,m=h.width,y=h.height,b={},E=u-g,C=l-v;if("bar"===n)return b.left="".concat(C,"px"),E>40?b.bottom="".concat(y-E+5,"px"):b.top="".concat(E+c+5,"px"),b;if("modal"===n){if(o?i?C>(m-d)/2?b.right="".concat(m-C+5,"px"):b.left="".concat(C+d+5,"px"):b.left="20px":b.left="".concat(C,"px"),o)(D=E)<0&&(D=0),b.top="".concat(D,"px");else if(E>(y-c)/2)b.bottom="".concat(y-E+5,"px");else{var D;(D=E+c)<0&&(D=0),b.top="".concat(D+5,"px")}return b}throw new Error("type '".concat(n,"' is invalid"))}function Sv(e,t){gh((function(){var n=Dv(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=t.offset(),l=u.top,c=u.left,d=t.width(),f=t.height(),p=l-o,h=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=p+f-s)>0){var v=t.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),t.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=t.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=h+d-a)>0){var E=t.css("left"),C=parseInt(E.toString(),10)-r;C<0&&(C=0),t.css("left","".concat(C,"px"))}if(g.indexOf("right")>=0&&c<0){var D=t.css("right"),w=parseInt(D.toString(),10)-Math.abs(c);t.css("right","".concat(w,"px"))}}}))}var xv,Ov,Tv=function(e){var t=e;return t.select=function(e){ap.Transforms.select(t,e)},t.deselect=function(){var n=t.selection,r=ug.findDocumentOrShadowRoot(t).getSelection();r&&r.rangeCount>0&&r.removeAllRanges(),n&&ap.Transforms.deselect(e)},t.move=function(t,n){void 0===n&&(n=!1),t&&(t<0||ap.Transforms.move(e,{distance:t,unit:"character",reverse:n}))},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=th.get(t);null!=e&&(t.focus(),ap.Transforms.select(t,e))},t.getSelectionPosition=function(){return wv(t)},t.getNodePosition=function(e){return Av(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var n=vp(ap.Range.edges(e),2),r=n[0],o=n[1],i=vp(ap.Editor.edges(t,[]),2),a=i[0],s=i[1];return!(!ap.Point.equals(r,a)||!ap.Point.equals(o,s))},t.selectAll=function(){var e=ap.Editor.start(t,[]),n=ap.Editor.end(t,[]);ap.Transforms.select(t,{anchor:e,focus:n})},t};var Nv=function(){if(Ov)return xv;Ov=1;var e=NaN,t="[object Symbol]",n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof b&&b&&b.Object===Object&&b,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,d=Math.max,f=Math.min,p=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(s){if("number"==typeof s)return s;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&c.call(e)==t}(s))return e;if(h(s)){var u="function"==typeof s.valueOf?s.valueOf():s;s=h(u)?u+"":u}if("string"!=typeof s)return 0===s?s:+s;s=s.replace(n,"");var l=o.test(s);return l||i.test(s)?a(s.slice(2),l?2:8):r.test(s)?e:+s}return xv=function(e,t,n){var r,o,i,a,s,u,l=0,c=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=o;return r=o=void 0,l=t,a=e.apply(i,n)}function b(e){var n=e-u;return void 0===u||n>=t||n<0||v&&e-l>=i}function E(){var e=p();if(b(e))return C(e);s=setTimeout(E,function(e){var n=t-(e-u);return v?f(n,i-(e-l)):n}(e))}function C(e){return s=void 0,m&&r?y(e):(r=o=void 0,a)}function D(){var e=p(),n=b(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(E,t),c?y(e):a}(u);if(v)return s=setTimeout(E,t),y(u)}return void 0===s&&(s=setTimeout(E,t)),a}return t=g(t)||0,h(n)&&(c=!!n.leading,i=(v="maxWait"in n)?d(g(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),D.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=o=s=void 0},D.flush=function(){return void 0===s?a:C(p())},D},xv}(),Bv=E(Nv);const kv={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 Fv{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||kv,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new Fv(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new Fv(this.logger,e)}}var Pv=new Fv;class Iv{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[r,o]=t;for(let t=0;t<o;t++)r.apply(r,[e,...n])}))}}}const Rv=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},Lv=e=>null==e?"":""+e,_v=/###/g,Mv=e=>e&&e.indexOf("###")>-1?e.replace(_v,"."):e,jv=e=>!e||"string"==typeof e,Hv=(e,t,n)=>{const r="string"!=typeof t?t:t.split(".");let o=0;for(;o<r.length-1;){if(jv(e))return{};const t=Mv(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return jv(e)?{}:{obj:e,k:Mv(r[o])}},zv=(e,t,n)=>{const{obj:r,k:o}=Hv(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=Hv(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Hv(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},$v=(e,t)=>{const{obj:n,k:r}=Hv(e,t);if(n)return n[r]},Uv=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):Uv(e[r],t[r],n):e[r]=t[r]);return e},Vv=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Wv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Gv=e=>"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>Wv[e])):e;const qv=[" ",",","?","!",";"],Kv=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),Yv=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},Xv=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class Zv extends Iv{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):"string"==typeof n&&o?a.push(...n.split(o)):a.push(n)));const s=$v(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),s||!i||"string"!=typeof n?s:Yv(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),zv(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)("string"==typeof n[r]||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=$v(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Uv(s,n,o):s={...s,...n},zv(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 Jv={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 Qv={};class em extends Iv{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=Pv.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=qv.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=Kv.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);let d=c&&c.res;const f=c&&c.usedKey||i,p=c&&c.exactUsedKey||i,h=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&d&&("string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0&&("string"!=typeof g||!Array.isArray(d))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(d),n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=d[e])}d=n}}else if(v&&"string"==typeof g&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&"string"!=typeof t.count,f=em.hasDefaultValue(t),p=l?this.pluralResolver.getSuffix(u,t.count,t):"",h=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=v),this.isValidLookup(d)||(a=!0,d=i);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=f&&v!==d&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=f&&r!==d?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||v)}))})):r(e,i,v))}d=this.extendTranslation(d,e,t,c,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):i.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=Jv.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&"string"!=typeof a.count,d=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach((e=>{this.isValidLookup(t)||(i=e,!Qv[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Qv[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(r)&&i.push(u+e.replace(r,this.options.pluralSeparator)),d&&i.push(u+t)),f){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const tm=e=>e.charAt(0).toUpperCase()+e.slice(1);class nm{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pv.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Xv(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=Xv(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=tm(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]=tm(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=tm(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let rm=[{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}],om={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 im=["v1","v2","v3"],am=["v4"],sm={zero:0,one:1,two:2,few:3,many:4,other:5};class um{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Pv.create("pluralResolver"),this.options.compatibilityJSON&&!am.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 rm.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:om[t.fc]}}))})),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Xv("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(n,{type:r});return this.pluralRulesCache[o]=i,i}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>sm[e]-sm[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!im.includes(this.options.compatibilityJSON)}}const lm=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=$v(e,n);return void 0!==r?r:$v(t,n)})(e,t,n);return!i&&o&&"string"==typeof n&&(i=Yv(e,n,r),void 0===i&&(i=Yv(t,n,r))),i},cm=e=>e.replace(/\$/g,"$$$$");class dm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Pv.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:Gv,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Vv(o):i||"{{",this.suffix=a?Vv(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?Vv(d):f||Vv("$t("),this.nestingSuffix=p?Vv(p):h||Vv(")"),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=lm(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(lm(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=>cm(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?cm(this.escape(e)):cm(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="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=Lv(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&"string"!=typeof o.replace?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Lv(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 fm=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(Xv(r),o),t[a]=s),s(n)}};class pm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Pv.create("formatter"),this.options=e,this.formats={number:fm(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:fm(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:fm(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:fm(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:fm(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=fm(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 hm extends Iv{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=Pv.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}=Hv(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(e,t,n,r,s):u(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const gm=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),vm=e=>("string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),mm=()=>{};class ym extends Iv{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=vm(e),this.services={},this.logger=Pv,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=gm();this.options={...r,...this.options,...vm(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?Pv.init(o(this.modules.logger),this.options):Pv.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=pm);const n=new nm(this.options);this.store=new Zv(this.options.resources,this.options);const i=this.services;i.logger=Pv,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new um(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 dm(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new hm(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 em(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=mm),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=Rv(),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]:mm;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=Rv();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=mm),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&&Jv.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=Rv();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let c;return c=i.keyPrefix&&Array.isArray(e)?e.map((e=>`${i.keyPrefix}${l}${e}`)):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=Rv();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Rv();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new nm(gm());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 ym(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]:mm;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new ym(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 Zv(this.store.data,r),o.services.resourceStore=o.store),o.translator=new em(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 bm=ym.createInstance();bm.createInstance=ym.createInstance,bm.createInstance,bm.dir,bm.init,bm.loadResources,bm.reloadResources,bm.use,bm.changeLanguage,bm.getFixedT,bm.t,bm.exists,bm.setDefaultNamespace,bm.hasLoadedNamespace,bm.loadNamespaces,bm.loadLanguages;var Em="translation";function Cm(e,t){bm.addResourceBundle(e,Em,t,!0,!0)}function Dm(e){return bm.on("languageChanged",e),function(){return bm.off("languageChanged",e)}}bm.init({lng:"zh-CN",resources:{}});var wm=bm.t.bind(bm);function Am(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&&Am(t)}}function Sm(){return fh('<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 xm(){return fh('<div class="w-e-bar-divider"></div>')}function Om(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=tg?"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 Tm=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=fh('<div class="w-e-bar-item"></div>'),this.$button=fh('<button type="button"></button>'),this.disabled=!1,this.menu=t;var o=t.tag,i=t.width;if("button"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'button'"));var a=t.title,s=t.hotkey,u=void 0===s?"":s,l=t.iconSvg,c=void 0===l?"":l,d=this.$button;if(c){var f=fh(c);Am(f),d.append(f)}else d.text(a);Om(d,c,a,u,n),n&&c&&d.append(fh('<span class="title">'.concat(a,"</span>"))),i&&d.css("width","".concat(i,"px")),d.attr("data-menu-key",e),this.$elem.append(d),gh((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(t){t.preventDefault(),zm(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())}))},e.prototype.exec=function(){var e=zm(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=zm(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=zm(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=zm(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=fh(n);Am(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=zm(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&Om(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),Nm=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return dp(t,e),t.prototype.onButtonClick=function(){},t}(Tm),Bm=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=Hp.get(e);null==t&&(t=new Set,Hp.set(e,t)),t.add(this),zp.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=zp.get(this);e&&e.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=zp.get(this);e&&e.emit("modalOrPanelHide")}},e}(),km=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=fh('<div class="w-e-drop-panel"></div>'),n}return dp(t,e),t.prototype.genSelfElem=function(){return null},t}(Bm),Fm=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=Sm();o.$button.append(i)}return o}return dp(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=zm(this);if(null==this.dropPanel){var n=new km(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}(Tm),Pm=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=fh('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var o=r.$elem;return o.on("click",(function(e){return e.stopPropagation()})),o.on("keyup",(function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())})),r}return dp(t,e),t.prototype.genSelfElem=function(){var e=this,t=fh('<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=zp.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}(Bm);function Im(e,t,n){var r=fh('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=fh('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function Rm(e,t){var n=fh('<div class="button-container"></div>'),r=fh('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return n.append(r),[n[0],r[0]]}var Lm=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;return o.$body=fh("body"),o.modal=null,o.menu=n,o}return dp(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=zm(this),t=this.menu.getModalPositionNode(e);return ap.Element.isElement(t)?Av(e,t,"modal"):wv(e)},t.prototype.handleModal=function(){var e=zm(this),t=this.menu;if(null==this.modal){var n=new Pm(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},t.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var n=zm(this),r=this.menu;if(null!=r.getModalContentElem){var o=ug.getTextarea(n),i=ug.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||Sv(n,e.$elem),setTimeout((function(){n.blur()}))}},t}(Tm);var _m=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=fh('<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 dp(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=fh("<ul></ul>");e.forEach((function(e){var t=e.value,r=e.text,o=e.selected,i=e.styleForRenderMenuList,a=fh('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var s=fh('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');a.append(s),a.addClass("selected")}a.append(fh('<span data-value="'.concat(t,'">').concat(r,"</span>"))),a.attr("title",r),n.append(a)})),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(Bm);var Mm=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=fh('<div class="w-e-bar-item"></div>'),this.$button=fh('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var o=t.tag,i=t.title,a=t.width,s=t.iconSvg,u=void 0===s?"":s,l=t.hotkey,c=void 0===l?"":l;if("select"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'select'"));var d=this.$button;a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",e),Om(d,u,i,c,n),this.$elem.append(d),this.menu=t,gh((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",(function(t){t.preventDefault(),zm(e).hidePanelOrModal(),e.trigger()}))},e.prototype.trigger=function(){var e=this,t=zm(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new _m(t,n.selectPanelWidth);var r=this.selectList,o=n.getOptions(t);r.renderList(o),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",(function(t){var n=t.target;if(null!=n){t.preventDefault();var r=fh(n).attr("data-value");e.onChange(r)}}))}else{if((r=this.selectList).isShow)r.hide();else{o=n.getOptions(t);r.renderList(o),r.show()}}}},e.prototype.onChange=function(e){var t=zm(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=zm(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=Sm();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=zm(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}(),jm=function(){function e(e){this.$elem=fh('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=fh('<div class="w-e-bar-item-menus-container"></div>'),this.$button=fh('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,o=this.$elem,i=this.$button;if(n){var a=fh(n);Am(a),i.append(a)}else i.text(r);i.attr("data-menu-key",t);var s=Sm();i.append(s),o.append(i);var u=this.$container;o.append(u);var l=this.createObserver();this.observe(l)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver((function(){var o=t.find("button"),i=o.length;if(0!==i){var a=0;o.each((function(e){fh(e).hasClass("disabled")&&a++})),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}}));return r},e}(),Hm=new WeakMap;function zm(e){var t=jp.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function $m(e,t,n){void 0===n&&(n=!1);var r=Hm.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new Fm(e,t,n):a?new Lm(e,t,n):new Nm(e,t,n)}if("select"===o&&(r=new Mm(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return Hm.set(t,r),r}function Um(e,t){var n=e.selection;return null!=n&&(!ap.Range.isCollapsed(n)&&(!ug.getSelectedElems(e).some((function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)}))&&!!ap.Text.isText(t)))}var Vm,Wm,Gm=function(){function e(){var e=this;this.$elem=fh('<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=Bv((function(){var t=e.isShow,n=e.getSelectedNodeAndMenuKeys()||{},r=n.node,o=void 0===r?null:r,i=n.menuKeys,a=void 0===i?[]:i;if((null!=o&&e.changeItemsState(),o&&ap.Element.isElement(o))&&(t&&e.isSamePath(o,e.prevSelectedNode)))return;e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o}),200),gh((function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),ug.getTextarea(t).$textAreaContainer.append(n),t.on(Tp.CHANGE,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(Tp.SCROLL,r),t.on(Tp.FULLSCREEN,r),t.on(Tp.UNFULLSCREEN,r)})),this.lngListen=Dm((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;gh((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=xm();n.append(r)}}))},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=Np[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=$m(e,r);this.hoverbarItems.push(a),jp.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),ap.Element.isElement(e)){var r=Av(t,e,"bar");return n.css(r),void Sv(t,n)}if(ap.Text.isText(e)){r=wv(t);return n.css(r),void Sv(t,n)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(null==e.selection)return null;var t=this.getHoverbarKeysConf(),n=null,r=[],o=function(o){var i=t[o],a=i.match,s=i.menuKeys,u=void 0===s?[]:s,l=a||function(e,t){return ug.checkNodeType(t,o)},c=vp(ap.Editor.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),d=c[0];if(null!=d)return n=d[0],r=u,"break"};for(var i in t){if("break"===o(i))break}return null==n||0===r.length?null:{node:n,menuKeys:r}},e.prototype.getEditorInstance=function(){var e=_p.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=Um),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var n=ug.findPath(null,e),r=ug.findPath(null,t);return ap.Path.equals(n,r)},e.prototype.destroy=function(){var e;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function qm(){if(Wm)return Vm;Wm=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,u="object"==typeof b&&b&&b.Object===Object&&b,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),d=Object.prototype.toString,f=Math.max,p=Math.min,h=function(){return c.Date.now()};function g(t,n,r){var o,i,a,s,u,l,c=0,d=!1,g=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var n=o,r=i;return o=i=void 0,c=e,s=t.apply(r,n)}function E(e){var t=e-l;return void 0===l||t>=n||t<0||g&&e-c>=a}function C(){var e=h();if(E(e))return D(e);u=setTimeout(C,function(e){var t=n-(e-l);return g?p(t,a-(e-c)):t}(e))}function D(e){return u=void 0,y&&o?b(e):(o=i=void 0,s)}function w(){var e=h(),t=E(e);if(o=arguments,i=this,l=e,t){if(void 0===u)return function(e){return c=e,u=setTimeout(C,n),d?b(e):s}(l);if(g)return u=setTimeout(C,n),b(l)}return void 0===u&&(u=setTimeout(C,n)),s}return n=m(n)||0,v(r)&&(d=!!r.leading,a=(g="maxWait"in r)?f(m(r.maxWait)||0,n):a,y="trailing"in r?!!r.trailing:y),w.cancel=function(){void 0!==u&&clearTimeout(u),c=0,o=l=i=u=void 0},w.flush=function(){return void 0===u?s:D(h())},w}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&d.call(e)==n}(e))return t;if(v(e)){var u="function"==typeof e.valueOf?e.valueOf():e;e=v(u)?u+"":u}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var l=i.test(e);return l||a.test(e)?s(e.slice(2),l?2:8):o.test(e)?t:+e}return Vm=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(e);return v(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),g(t,n,{leading:o,maxWait:n,trailing:i})}}var Km=E(qm());function Ym(e,t){return Eh(t)&&ug.hasDOMNode(e,t,{editable:!0})}function Xm(e,t){if(e.getConfig().readOnly)return!1;var n=Zm(e,t)&&ug.toSlateNode(e,t);return ap.Editor.isVoid(e,n)}function Zm(e,t){return Eh(t)&&ug.hasDOMNode(e,t)}const Jm=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Qm=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,ey=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Qm(n.overflowY,t)||Qm(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},ty=(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,ny=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},ry=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,d="function"==typeof l?l:e=>e!==l;if(!Jm(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;Jm(h)&&d(h);){if(h=ny(h),h===f){p.push(h);break}null!=h&&h===document.body&&ey(h)&&!ey(document.documentElement)||null!=h&&ey(h,c)&&p.push(h)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:E,top:C,right:D,bottom:w,left:A}=e.getBoundingClientRect(),{top:S,right:x,bottom:O,left:T}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let N="start"===s||"nearest"===s?C-S:"end"===s?w+O:C+b/2-S+O,B="center"===u?A+E/2-T+x:"end"===u?D+x:A-T;const k=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&C>=0&&A>=0&&w<=v&&D<=g&&C>=o&&w<=l&&A>=c&&D<=i)return k;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),S=parseInt(d.borderTopWidth,10),x=parseInt(d.borderRightWidth,10),O=parseInt(d.borderBottomWidth,10);let T=0,F=0;const P="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-x:0,I="offsetHeight"in t?t.offsetHeight-t.clientHeight-S-O:0,R="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,L="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)T="start"===s?N:"end"===s?N-v:"nearest"===s?ty(y,y+v,v,S,O,y+N,y+N+b,b):N-v/2,F="start"===u?B:"center"===u?B-g/2:"end"===u?B-g:ty(m,m+g,g,h,x,m+B,m+B+E,E),T=Math.max(0,T+y),F=Math.max(0,F+m);else{T="start"===s?N-o-S:"end"===s?N-l+O+I:"nearest"===s?ty(o,l,n,S,O+I,N,N+b,b):N-(o+n/2)+I/2,F="start"===u?B-c-h:"center"===u?B-(c+r/2)+P/2:"end"===u?B-i+x+P:ty(c,i,r,h,x+P,B,B+E,E);const{scrollLeft:e,scrollTop:a}=t;T=0===L?0:Math.max(0,Math.min(a+T/L,t.scrollHeight-n/L+I)),F=0===R?0:Math.max(0,Math.min(e+F/R,t.scrollWidth-r/R+P)),N+=a-T,B+=e-F}k.push({el:t,top:T,left:F})}return k},oy=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};function iy(e,t,n){void 0===n&&(n=!1);var r=t.selection,o=t.getConfig(),i=ug.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||n)&&t.isFocused()){var a="None"!==i.type;if(r||a){var s=Kp.get(t),u=!1;if(s.contains(i.anchorNode)&&s.contains(i.focusNode)&&(u=!0),a&&u&&r){var l=ug.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(l&&ap.Range.equals(l,r)){var c=!0;if(ap.Range.isCollapsed(r)){var d=i.anchorNode,f=i.anchorOffset;if(d===s){var p=s.childNodes,h=void 0;(h=p[f])&&h.matches("table")&&(c=!1),(h=p[f-1])&&h.matches("table")&&(c=!1)}}if(c)return}}if(!r||ug.hasRange(t,r)){e.isUpdatingSelection=!0;var g=r&&ug.toDOMRange(t,r);if(g){ap.Range.isBackward(r)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")&&g.getBoundingClientRect){v.getBoundingClientRect=g.getBoundingClientRect.bind(g);var m=document.body;!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(ry(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of ry(e,oy(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}(v,{scrollMode:"if-needed",boundary:o.scroll?s.parentElement:m,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else i.removeAllRanges();setTimeout((function(){g&&ng&&s.focus(),e.isUpdatingSelection=!1}))}else t.selection=ug.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var ay=new WeakMap,sy=new WeakMap;var uy,ly={};var cy=function(){if(uy)return ly;uy=1,Object.defineProperty(ly,"__esModule",{value:!0});for(var e="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},n={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},r={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)r["f"+o]=111+o;function i(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return a(e,t)})),o=function(e){return r.some((function(t){return s(t,e)}))};return null==n?o:o(n)}function a(e,o){var i=o&&o.byKey,a={},s=(e=e.replace("++","+add")).split("+"),c=s.length;for(var d in t)a[t[d]]=!1;var f=!0,p=!1,h=void 0;try{for(var g,v=s[Symbol.iterator]();!(f=(g=v.next()).done);f=!0){var m=g.value,y=m.endsWith("?")&&m.length>1;y&&(m=m.slice(0,-1));var b=l(m),E=t[b];if(m.length>1&&!E&&!n[m]&&!r[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==c&&E||(i?a.key=b:a.which=u(m)),E&&(a[E]=!y||null)}}catch(e){p=!0,h=e}finally{try{!f&&v.return&&v.return()}finally{if(p)throw h}}return a}function s(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function u(e){return e=l(e),r[e]||e.toUpperCase().charCodeAt(0)}function l(e){return e=e.toLowerCase(),e=n[e]||e}return ly.default=i,ly.isHotkey=i,ly.isCodeHotkey=function(e,t){return i(e,t)},ly.isKeyHotkey=function(e,t){return i(e,{byKey:!0},t)},ly.parseHotkey=a,ly.compareHotkey=s,ly.toKeyCode=u,ly.toKeyName=l,ly}(),dy={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"},fy={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"},py={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},hy=function(e){var t=dy[e],n=fy[e],r=py[e],o=t&&cy.isKeyHotkey(t),i=n&&cy.isKeyHotkey(n),a=r&&cy.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(tg&&i&&i(e))||!(tg||!a||!a(e)))}},gy={isBold:hy("bold"),isCompose:hy("compose"),isMoveBackward:hy("moveBackward"),isMoveForward:hy("moveForward"),isDeleteBackward:hy("deleteBackward"),isDeleteForward:hy("deleteForward"),isDeleteLineBackward:hy("deleteLineBackward"),isDeleteLineForward:hy("deleteLineForward"),isDeleteWordBackward:hy("deleteWordBackward"),isDeleteWordForward:hy("deleteWordForward"),isExtendBackward:hy("extendBackward"),isExtendForward:hy("extendForward"),isExtendLineBackward:hy("extendLineBackward"),isExtendLineForward:hy("extendLineForward"),isItalic:hy("italic"),isMoveLineBackward:hy("moveLineBackward"),isMoveLineForward:hy("moveLineForward"),isMoveWordBackward:hy("moveWordBackward"),isMoveWordForward:hy("moveWordForward"),isRedo:hy("redo"),isSplitBlock:hy("splitBlock"),isTransposeCharacter:hy("transposeCharacter"),isUndo:hy("undo"),isTab:hy("tab"),isSelectAll:hy("selectAll")};function vy(e){e.preventDefault()}var my,yy={beforeinput:function(e,t,n){var r=e,o=n.getConfig().readOnly;if(sg&&!o&&Ym(n,r.target)){var i=n.selection,a=r.inputType,s=r.dataTransfer||r.data||void 0;if("insertCompositionText"!==a&&"deleteCompositionText"!==a){if(r.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var u=vp(r.getTargetRanges(),1)[0];if(u){var l=ug.toSlateRange(n,u,{exactMatch:!1,suppressThrow:!1});i&&ap.Range.equals(i,l)||ap.Transforms.select(n,l)}}if(i&&ap.Range.isExpanded(i)){var c=ug.getSelectedElems(n),d="table"===c[0].type,f="table-cell"!==c[c.length-1].type;if(d&&f)return;if(a.startsWith("delete")){var p=a.endsWith("Backward")?"backward":"forward";return void ap.Editor.deleteFragment(n,{direction:p})}}switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":ap.Editor.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":ap.Editor.deleteForward(n);break;case"deleteContentBackward":ap.Editor.deleteBackward(n);break;case"deleteEntireSoftLine":ap.Editor.deleteBackward(n,{unit:"line"}),ap.Editor.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":ap.Editor.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":ap.Editor.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":ap.Editor.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":ap.Editor.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":ap.Editor.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":ap.Editor.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":ap.Editor.insertBreak(n);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===a&&!oh.get(n))break;"[object DataTransfer]"===mh(s)?n.insertData(s):"string"==typeof s&&ap.Editor.insertText(n,s)}}}},blur:function(e,t,n){var r=e,o=t.isUpdatingSelection,i=t.latestElement;if(!n.getConfig().readOnly&&!o&&Ym(n,r.target)){var a=ug.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var s=r.relatedTarget;if(!(s===ug.toDOMNode(n,n)||Dh(s)&&s.hasAttribute("data-slate-spacer"))){if(null!=s&&Eh(s)&&ug.hasDOMNode(n,s)){var u=ug.toSlateNode(n,s);if(ap.Element.isElement(u)&&!n.isVoid(u))return}if(rg){var l=a.getSelection();null==l||l.removeAllRanges()}eh.delete(n)}}}},focus:function(e,t,n){var r=ug.toDOMNode(n,n),o=ug.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,ng&&e.target!==r?r.focus():eh.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&Zm(n,e.target)&&Eh(e.target)){var r=ug.toSlateNode(n,e.target),o=ug.findPath(n,r);if(ap.Editor.hasPath(n,o))if(ap.Node.get(n,o)===r){var i=ap.Editor.start(n,o),a=ap.Editor.end(n,o),s=ap.Editor.void(n,{at:i}),u=ap.Editor.void(n,{at:a});if(s&&u&&ap.Path.equals(s[1],u[1])){var l=ap.Editor.range(n,i);ap.Transforms.select(n,l)}}}},compositionstart:function(e,t,n){if(Ym(n,e.target)){var r=n.selection;if(r&&ap.Range.isExpanded(r)&&(ap.Editor.deleteFragment(n),Promise.resolve().then((function(){iy(t,n,!0)}))),n.selection){var o=ug.toDOMRange(n,n.selection).startContainer,i=o.textContent||"";ay.set(n,i),sy.set(n,o)}t.isComposing=!0,function(e,t){var n;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}(t,n)}},compositionend:function(e,t,n){var r=e;if(Ym(n,r.target)){t.isComposing=!1;var o=n.selection;if(null!=o){(ag||ng)&&ug.cleanExposedTexNodeInSelectionBlock(n);for(var i=ap.Range.isBackward(o)?o.focus:o.anchor,a=vp(ap.Editor.node(n,[i.path[0]]),1)[0],s=0;s<i.path.length;s+=1){var u=vp(ap.Editor.node(n,i.path.slice(0,s+1)),1)[0];if(ap.Element.isElement(u)&&((rg||ng)&&"link"===u.type||"code"===u.type)){ug.setNewKey(a);break}}var l=r.data;if(l){if(n.getConfig().maxLength){var c=ug.getLeftLengthOfMaxLength(n);if(c<l.length){var d=ug.toDOMRange(n,o);d.startContainer.nodeType===Node.TEXT_NODE&&(d.startContainer.textContent=ay.get(n)||""),c>0&&ap.Editor.insertText(n,l.slice(0,c)),t.changeViewState()}else ap.Editor.insertText(n,l)}else{var f=ug.findDocumentOrShadowRoot(n).getSelection();f&&function(e,t){if(ap.Range.isCollapsed(t)){var n=t.anchor,r=t.focus;if([2,3].includes(n.path.length)&&[2,3].includes(r.path.length)&&(0===n.offset||0===r.offset)){var o=ap.Editor.node(e,n.path),i=0===n.offset?n.path:r.path,a=[i[0],i[1]-1];if(0===i[1])return!1;var s=ap.Editor.node(e,a);if(ap.Text.isText(s[0])&&ap.Text.isText(o[0]))return!0}}}(n,o)&&(n.selection=ug.toSlateRange(n,f,{exactMatch:!1,suppressThrow:!1})),ap.Editor.insertText(n,l)}rg||setTimeout((function(){var e=n.selection;if(null!=e){var t=sy.get(n);if(null!=t)ug.toDOMRange(n,e).startContainer!==t&&(t.textContent=ay.get(n)||"")}}))}}}},compositionupdate:function(e,t,n){Ym(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&Ym(n,r.target)){if(function(e,t){var n=Lp.get(e),r=n&&n.getMenus(),o=Mp.get(e),i=o&&o.getMenus(),a=fp(fp({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&cy.isHotkey(l,t)&&!u.isDisabled(e)){var c=u.getValue(e);u.exec(e,c)}}}(n,r),gy.isTab(r))return vy(r),void n.handleTab();if(gy.isRedo(r))return vy(r),void("function"==typeof n.redo&&n.redo());if(gy.isUndo(r))return vy(r),void("function"==typeof n.undo&&n.undo());if(gy.isMoveLineBackward(r))return vy(r),void ap.Transforms.move(n,{unit:"line",reverse:!0});if(gy.isMoveLineForward(r))return vy(r),void ap.Transforms.move(n,{unit:"line"});if(gy.isExtendLineBackward(r))return vy(r),void ap.Transforms.move(n,{unit:"line",edge:"focus",reverse:!0});if(gy.isExtendLineForward(r))return vy(r),void ap.Transforms.move(n,{unit:"line",edge:"focus"});if(gy.isMoveBackward(r))return vy(r),void(o&&ap.Range.isCollapsed(o)?ap.Transforms.move(n,{reverse:!0}):ap.Transforms.collapse(n,{edge:"start"}));if(gy.isMoveForward(r))return vy(r),void(o&&ap.Range.isCollapsed(o)?ap.Transforms.move(n):ap.Transforms.collapse(n,{edge:"end"}));if(gy.isMoveWordBackward(r))return vy(r),o&&ap.Range.isExpanded(o)&&ap.Transforms.collapse(n,{edge:"focus"}),void ap.Transforms.move(n,{unit:"word",reverse:!0});if(gy.isMoveWordForward(r))return vy(r),o&&ap.Range.isExpanded(o)&&ap.Transforms.collapse(n,{edge:"focus"}),void ap.Transforms.move(n,{unit:"word"});if(gy.isSelectAll(r))return vy(r),void n.selectAll();if(sg){if((ag||rg)&&o&&(gy.isDeleteBackward(r)||gy.isDeleteForward(r))&&ap.Range.isCollapsed(o)){var i=ap.Node.parent(n,o.anchor.path);if(ap.Element.isElement(i)&&ap.Editor.isVoid(n,i)&&ap.Editor.isInline(n,i))return r.preventDefault(),void ap.Transforms.delete(n,{unit:"block"})}}else{if(gy.isBold(r)||gy.isItalic(r)||gy.isTransposeCharacter(r))return void vy(r);if(gy.isSplitBlock(r))return vy(r),void ap.Editor.insertBreak(n);if(gy.isDeleteBackward(r))return vy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"backward"}):ap.Editor.deleteBackward(n));if(gy.isDeleteForward(r))return vy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"forward"}):ap.Editor.deleteForward(n));if(gy.isDeleteLineBackward(r))return vy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"backward"}):ap.Editor.deleteBackward(n,{unit:"line"}));if(gy.isDeleteLineForward(r))return vy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"forward"}):ap.Editor.deleteForward(n,{unit:"line"}));if(gy.isDeleteWordBackward(r))return vy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"backward"}):ap.Editor.deleteBackward(n,{unit:"word"}));if(gy.isDeleteWordForward(r))return vy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"forward"}):ap.Editor.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!sg&&!n.getConfig().readOnly&&Ym(n,e.target)){e.preventDefault();var r=e.key;ap.Editor.insertText(n,r)}},copy:function(e,t,n){var r=e;if(Ym(n,r.target)){n.getConfig().readOnly||r.preventDefault();var o=r.clipboardData;null!=o&&n.setFragmentData(o)}},cut:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&(r.preventDefault(),Ym(n,r.target))){var i=r.clipboardData;if(null!=i&&(n.setFragmentData(i),o))if(ap.Range.isExpanded(o))ap.Editor.deleteFragment(n);else{var a=ap.Node.parent(n,o.anchor.path);ap.Editor.isVoid(n,a)&&ap.Transforms.delete(n)}}},paste:function(e,t,n){oh.set(n,!0);var r=e;if(!n.getConfig().readOnly&&Ym(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void oh.set(n,!1);if(!sg||function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length}(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,t,n){if(Zm(n,e.target)){var r=ug.toSlateNode(n,e.target);ap.Editor.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(Zm(n,r.target)&&!n.getConfig().readOnly){var o=ug.toSlateNode(n,r.target),i=ug.findPath(n,o);if(ap.Editor.isVoid(n,o)||ap.Editor.void(n,{at:i,voids:!0})){var a=ap.Editor.range(n,i);ap.Transforms.select(n,a)}var s=r.dataTransfer;null!=s&&(t.isDraggingInternally=!0,n.setFragmentData(s))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&Zm(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,o=r.dataTransfer;if(!n.getConfig().readOnly&&Zm(n,r.target)&&null!=o&&!(sg&&rg&&o.files.length>0)){r.preventDefault();var i=n.selection,a=ug.findEventRange(n,r);ap.Transforms.select(n,a),t.isDraggingInternally&&(i&&ap.Transforms.delete(n,{at:i}),t.isDraggingInternally=!1),n.insertData(o),n.isFocused()||n.focus()}}},by={};function Ey(){if(my)return by;my=1,Object.defineProperty(by,"__esModule",{value:!0});const e={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType}};function t(e,t,n,r,o){return{sel:e,data:t,children:n,text:r,elm:o,key:void 0===t?void 0:t.key}}const n=Array.isArray;function r(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}function o(e){return void 0===e}function i(e){return void 0!==e}const a=t("",{},[],void 0,void 0);function s(e,t){var n,r;const o=e.key===t.key,i=(null===(n=e.data)||void 0===n?void 0:n.is)===(null===(r=t.data)||void 0===r?void 0:r.is);return e.sel===t.sel&&o&&i}function u(e,t,n){var r;const o={};for(let i=t;i<=n;++i){const t=null===(r=e[i])||void 0===r?void 0:r.key;void 0!==t&&(o[t]=i)}return o}const l=["create","update","remove","destroy","pre","post"];function c(e,t,n){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==n&&void 0!==t)for(let e=0;e<t.length;++e){const n=t[e].data;void 0!==n&&c(n,t[e].children,t[e].sel)}}function d(e,o,i){let a,s,u,l={};if(void 0!==i?(null!==o&&(l=o),n(i)?a=i:r(i)?s=i.toString():i&&i.sel&&(a=[i])):null!=o&&(n(o)?a=o:r(o)?s=o.toString():o&&o.sel?a=[o]:l=o),void 0!==a)for(u=0;u<a.length;++u)r(a[u])&&(a[u]=t(void 0,void 0,void 0,a[u],void 0));return"s"!==e[0]||"v"!==e[1]||"g"!==e[2]||3!==e.length&&"."!==e[3]&&"#"!==e[3]||c(l,a,e),t(e,l,a,s,void 0)}function f(e,t){e.data.fn=t.data.fn,e.data.args=t.data.args,t.data=e.data,t.children=e.children,t.text=e.text,t.elm=e.elm}function p(e){const t=e.data;f(t.fn(...t.args),e)}function h(e,t){let n;const r=e.data,o=t.data,i=r.args,a=o.args;if(r.fn===o.fn&&i.length===a.length){for(n=0;n<a.length;++n)if(i[n]!==a[n])return void f(o.fn(...a),t);f(e,t)}else f(o.fn(...a),t)}function g(e,t){const n=e.data.attachData;t.data.attachData.placeholder=n.placeholder,t.data.attachData.real=n.real,e.elm=e.data.attachData.real}function v(e,t){t.elm=t.data.attachData.placeholder}function m(e){void 0!==e.elm&&e.elm.parentNode.removeChild(e.elm),e.elm=e.data.attachData.real}function y(e,t){const n=t.elm,r=t.data.attachData,o=document.createElement("span");t.elm=o,r.target.appendChild(n),r.real=n,r.placeholder=o}function b(e,t){let n;const r=t.elm;let o=e.data.attrs,i=t.data.attrs;if((o||i)&&o!==i){for(n in o=o||{},i=i||{},i){const e=i[n];o[n]!==e&&(!0===e?r.setAttribute(n,""):!1===e?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,e):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,e):58===n.charCodeAt(5)?r.setAttributeNS("http://www.w3.org/1999/xlink",n,e):r.setAttribute(n,e))}for(n in o)n in i||r.removeAttribute(n)}}const E={create:b,update:b};function C(e,t){let n,r;const o=t.elm;let i=e.data.class,a=t.data.class;if((i||a)&&i!==a){for(r in i=i||{},a=a||{},i)i[r]&&!Object.prototype.hasOwnProperty.call(a,r)&&o.classList.remove(r);for(r in a)n=a[r],n!==i[r]&&o.classList[n?"add":"remove"](r)}}const D={create:C,update:C},w=/[A-Z]/g;function A(e,t){const n=t.elm;let r,o=e.data.dataset,i=t.data.dataset;if(!o&&!i)return;if(o===i)return;o=o||{},i=i||{};const a=n.dataset;for(r in o)i[r]||(a?r in a&&delete a[r]:n.removeAttribute("data-"+r.replace(w,"-$&").toLowerCase()));for(r in i)o[r]!==i[r]&&(a?a[r]=i[r]:n.setAttribute("data-"+r.replace(w,"-$&").toLowerCase(),i[r]))}const S={create:A,update:A};function x(e,t,n){if("function"==typeof e)e.call(t,n,t);else if("object"==typeof e)for(let r=0;r<e.length;r++)x(e[r],t,n)}function O(e,t){const n=e.type,r=t.data.on;r&&r[n]&&x(r[n],t,e)}function T(e,t){const n=e.data.on,r=e.listener,o=e.elm,i=t&&t.data.on,a=t&&t.elm;let s;if(n!==i){if(n&&r)if(i)for(s in n)i[s]||o.removeEventListener(s,r,!1);else for(s in n)o.removeEventListener(s,r,!1);if(i){const r=t.listener=e.listener||function e(t){O(t,e.vnode)};if(r.vnode=t,n)for(s in i)n[s]||a.addEventListener(s,r,!1);else for(s in i)a.addEventListener(s,r,!1)}}}const N={create:T,update:T,destroy:T};function B(e,t){let n,r,o;const i=t.elm;let a=e.data.props,s=t.data.props;if((a||s)&&a!==s)for(n in a=a||{},s=s||{},s)r=s[n],o=a[n],o===r||"value"===n&&i[n]===r||(i[n]=r)}const k={create:B,update:B},F="undefined"!=typeof window&&window.requestAnimationFrame.bind(window)||setTimeout,P=function(e){F((function(){F(e)}))};let I=!1;function R(e,t,n){P((function(){e[t]=n}))}function L(e,t){let n,r;const o=t.elm;let i=e.data.style,a=t.data.style;if(!i&&!a)return;if(i===a)return;i=i||{},a=a||{};const s="delayed"in i;for(r in i)a[r]||("-"===r[0]&&"-"===r[1]?o.style.removeProperty(r):o.style[r]="");for(r in a)if(n=a[r],"delayed"===r&&a.delayed)for(const e in a.delayed)n=a.delayed[e],s&&n===i.delayed[e]||R(o.style,e,n);else"remove"!==r&&n!==i[r]&&("-"===r[0]&&"-"===r[1]?o.style.setProperty(r,n):o.style[r]=n)}const _={pre:function(){I=!1},create:L,update:L,destroy:function(e){let t,n;const r=e.elm,o=e.data.style;if(o&&(t=o.destroy))for(n in t)r.style[n]=t[n]},remove:function(e,t){const n=e.data.style;if(!n||!n.remove)return void t();let r;I||(e.elm.offsetLeft,I=!0);const o=e.elm;let i=0;const a=n.remove;let s=0;const u=[];for(r in a)u.push(r),o.style[r]=a[r];const l=getComputedStyle(o)["transition-property"].split(", ");for(;i<l.length;++i)-1!==u.indexOf(l[i])&&s++;o.addEventListener("transitionend",(function(e){e.target===o&&--s,0===s&&t()}))}};function M(e,n){for(const r of e)null!=r&&!1!==r&&""!==r&&(Array.isArray(r)?M(r,n):"string"==typeof r||"number"==typeof r||"boolean"==typeof r?n.push(t(void 0,void 0,void 0,String(r),void 0)):n.push(r));return n}function j(e,t,...n){const r=M(n,[]);return"function"==typeof e?e(t,r):1===r.length&&!r[0].sel&&r[0].text?d(e,t,r[0].text):d(e,t,r)}return j||(j={}),by.array=n,by.attachTo=function(e,t){void 0===t.data&&(t.data={}),void 0===t.data.hook&&(t.data.hook={});const n=t.data,r=t.data.hook;return n.attachData={target:e,placeholder:void 0,real:void 0},r.create=y,r.prepatch=g,r.postpatch=v,r.destroy=m,t},by.attributesModule=E,by.classModule=D,by.datasetModule=S,by.eventListenersModule=N,by.h=d,by.htmlDomApi=e,by.init=function(c,d){const f={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},p=void 0!==d?d:e;for(const e of l)for(const t of c){const n=t[e];void 0!==n&&f[e].push(n)}function h(e){const n=e.id?"#"+e.id:"",r=e.getAttribute("class"),o=r?"."+r.split(" ").join("."):"";return t(p.tagName(e).toLowerCase()+n+o,{},[],void 0,e)}function g(e,t){return function(){if(0==--t){const t=p.parentNode(e);p.removeChild(t,e)}}}function v(e,t){var s,u;let l,c=e.data;if(void 0!==c){const t=null===(s=c.hook)||void 0===s?void 0:s.init;i(t)&&(t(e),c=e.data)}const d=e.children,h=e.sel;if("!"===h)o(e.text)&&(e.text=""),e.elm=p.createComment(e.text);else if(void 0!==h){const o=h.indexOf("#"),s=h.indexOf(".",o),g=o>0?o:h.length,m=s>0?s:h.length,y=-1!==o||-1!==s?h.slice(0,Math.min(g,m)):h,b=e.elm=i(c)&&i(l=c.ns)?p.createElementNS(l,y,c):p.createElement(y,c);for(g<m&&b.setAttribute("id",h.slice(g+1,m)),s>0&&b.setAttribute("class",h.slice(m+1).replace(/\./g," ")),l=0;l<f.create.length;++l)f.create[l](a,e);if(n(d))for(l=0;l<d.length;++l){const e=d[l];null!=e&&p.appendChild(b,v(e,t))}else r(e.text)&&p.appendChild(b,p.createTextNode(e.text));const E=e.data.hook;i(E)&&(null===(u=E.create)||void 0===u||u.call(E,a,e),E.insert&&t.push(e))}else e.elm=p.createTextNode(e.text);return e.elm}function m(e,t,n,r,o,i){for(;r<=o;++r){const o=n[r];null!=o&&p.insertBefore(e,v(o,i),t)}}function y(e){var t,n;const r=e.data;if(void 0!==r){null===(n=null===(t=null==r?void 0:r.hook)||void 0===t?void 0:t.destroy)||void 0===n||n.call(t,e);for(let t=0;t<f.destroy.length;++t)f.destroy[t](e);if(void 0!==e.children)for(let t=0;t<e.children.length;++t){const n=e.children[t];null!=n&&"string"!=typeof n&&y(n)}}}function b(e,t,n,r){for(var o,a;n<=r;++n){let r,s;const u=t[n];if(null!=u)if(i(u.sel)){y(u),r=f.remove.length+1,s=g(u.elm,r);for(let e=0;e<f.remove.length;++e)f.remove[e](u,s);const e=null===(a=null===(o=null==u?void 0:u.data)||void 0===o?void 0:o.hook)||void 0===a?void 0:a.remove;i(e)?e(u,s):s()}else p.removeChild(e,u.elm)}}function E(e,t,n){var r,a,l,c,d;const h=null===(r=t.data)||void 0===r?void 0:r.hook;null===(a=null==h?void 0:h.prepatch)||void 0===a||a.call(h,e,t);const g=t.elm=e.elm,y=e.children,C=t.children;if(e!==t){if(void 0!==t.data){for(let n=0;n<f.update.length;++n)f.update[n](e,t);null===(c=null===(l=t.data.hook)||void 0===l?void 0:l.update)||void 0===c||c.call(l,e,t)}o(t.text)?i(y)&&i(C)?y!==C&&function(e,t,n,r){let i,a,l,c,d=0,f=0,h=t.length-1,g=t[0],y=t[h],C=n.length-1,D=n[0],w=n[C];for(;d<=h&&f<=C;)null==g?g=t[++d]:null==y?y=t[--h]:null==D?D=n[++f]:null==w?w=n[--C]:s(g,D)?(E(g,D,r),g=t[++d],D=n[++f]):s(y,w)?(E(y,w,r),y=t[--h],w=n[--C]):s(g,w)?(E(g,w,r),p.insertBefore(e,g.elm,p.nextSibling(y.elm)),g=t[++d],w=n[--C]):s(y,D)?(E(y,D,r),p.insertBefore(e,y.elm,g.elm),y=t[--h],D=n[++f]):(void 0===i&&(i=u(t,d,h)),a=i[D.key],o(a)?p.insertBefore(e,v(D,r),g.elm):(l=t[a],l.sel!==D.sel?p.insertBefore(e,v(D,r),g.elm):(E(l,D,r),t[a]=void 0,p.insertBefore(e,l.elm,g.elm))),D=n[++f]);(d<=h||f<=C)&&(d>h?(c=null==n[C+1]?null:n[C+1].elm,m(e,c,n,f,C,r)):b(e,t,d,h))}(g,y,C,n):i(C)?(i(e.text)&&p.setTextContent(g,""),m(g,null,C,0,C.length-1,n)):i(y)?b(g,y,0,y.length-1):i(e.text)&&p.setTextContent(g,""):e.text!==t.text&&(i(y)&&b(g,y,0,y.length-1),p.setTextContent(g,t.text)),null===(d=null==h?void 0:h.postpatch)||void 0===d||d.call(h,e,t)}}return function(e,t){let n,r,o;const i=[];for(n=0;n<f.pre.length;++n)f.pre[n]();for(function(e){return void 0!==e.sel}(e)||(e=h(e)),s(e,t)?E(e,t,i):(r=e.elm,o=p.parentNode(r),v(t,i),null!==o&&(p.insertBefore(o,t.elm,p.nextSibling(r)),b(o,[e],0,0))),n=0;n<i.length;++n)i[n].data.hook.insert(i[n]);for(n=0;n<f.post.length;++n)f.post[n]();return t}},by.jsx=j,by.primitive=r,by.propsModule=k,by.styleModule=_,by.thunk=function(e,t,n,r){return void 0===r&&(r=n,n=t,t=void 0),d(e,{key:t,hook:{init:p,prepatch:h},fn:n,args:r})},by.toVNode=function n(r,o){const i=void 0!==o?o:e;let a;if(i.isElement(r)){const e=r.id?"#"+r.id:"",a=r.getAttribute("class"),s=a?"."+a.split(" ").join("."):"",u=i.tagName(r).toLowerCase()+e+s,l={},c=[];let d,f,p;const h=r.attributes,g=r.childNodes;for(f=0,p=h.length;f<p;f++)d=h[f].nodeName,"id"!==d&&"class"!==d&&(l[d]=h[f].nodeValue);for(f=0,p=g.length;f<p;f++)c.push(n(g[f],o));return t(u,{attrs:l},c,void 0,r)}return i.isText(r)?(a=i.getTextContent(r),t(void 0,void 0,void 0,a,r)):i.isComment(r)?(a=i.getTextContent(r),t("!",{},[],a,r)):t("",{},[],void 0,r)},by.vnode=t,by}var Cy=Ey(),Dy=[];var wy,Ay,Sy={};function xy(e,t,n){var r=n.isInline(e)?"span":"div";return Cy.jsx(r,null,t)}function Oy(e,t){var n,r=ug.findKey(t,e),o=t.isInline(e),i=ap.Editor.isVoid(t,e),a=Vh(e.type,r.id),s={id:a,key:r.id,"data-slate-node":"element","data-slate-inline":o},u=e.type,l=e.children,c=void 0===l?[]:l,d=function(e){return Sy[e]||xy}(u);n=i?null:c.map((function(n,r){return ky(n,r,e,t)}));var f=d(e,n,t);if(i){s["data-slate-void"]=!0;var p=o?"span":"div",h=vp(ap.Node.texts(e),1),g=vp(h[0],1)[0],v=ky(g,0,e,t),m=Cy.jsx(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},v);f=Cy.jsx(p,{style:{position:"relative"}},f,m),Gp.set(g,0),qp.set(g,e)}return null==f.data&&(f.data={}),Object.assign(f.data,s),i||o||(f=function(e,t){var n=t;return Dy.forEach((function(r){n=r(e,t)})),n}(e,f)),gh((function(){var t=Sh(a);null!=t&&(Xp.set(r,t),Zp.set(e,t),Yp.set(t,e))})),f}function Ty(e,t){return void 0===t&&(t=!1),Cy.jsx("span",{"data-slate-string":!0},t?e+"\n":e)}function Ny(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),Cy.jsx("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?Cy.jsx("br",null):null)}function By(e,t,n){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=ug.findKey(n,e),o=n.getConfig().decorate;if(null==o)throw new Error("Can not get config.decorate");var i,a=ug.findPath(n,e),s=o([e,a]),u=ap.Text.decorations(e,s),l=u.map((function(r,o){var i=function(e,t,n,r,o){void 0===t&&(t=!1);var i=e.text,a=ug.findPath(o,n),s=ap.Path.parent(a);if(ap.Editor.isEditor(r))throw new Error("Text node ".concat(JSON.stringify(n)," parent is Editor"));return o.isVoid(r)?Ny(ap.Node.string(r).length):""!==i||r.children[r.children.length-1]!==n||o.isInline(r)||""!==ap.Editor.string(o,s)?""===i?Ny():t&&"\n"===i.slice(-1)?Ty(i,!0):Ty(i):Ny(0,!0)}(r,o===u.length-1,e,t,n);return i=function(e,t){var n=t;return Dy.forEach((function(t){n=t(e,n)})),n}(r,i),Cy.jsx("span",{"data-slate-leaf":!0},i)})),c=(i=r.id,"w-e-text-".concat(i)),d=Cy.jsx("span",{"data-slate-node":"text",id:c,key:r.id},l);return gh((function(){var t=Sh(c);null!=t&&(Xp.set(r,t),Zp.set(e,t),Yp.set(t,e))})),d}function ky(e,t,n,r){return Gp.set(e,t),qp.set(e,n),ap.Element.isElement(e)?Oy(e,r):By(e,n,r)}var Fy=function(){if(Ay)return wy;Ay=1;var e,t=1/0,n="[object Symbol]",r=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i="\\ud800-\\udfff",a="\\u0300-\\u036f\\ufe20-\\ufe23",s="\\u20d0-\\u20f0",u="\\u2700-\\u27bf",l="a-z\\xdf-\\xf6\\xf8-\\xff",c="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\ufe0e\\ufe0f",f="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="['’]",h="["+i+"]",g="["+f+"]",v="["+a+s+"]",m="\\d+",y="["+u+"]",E="["+l+"]",C="[^"+i+f+m+u+l+c+"]",D="\\ud83c[\\udffb-\\udfff]",w="[^"+i+"]",A="(?:\\ud83c[\\udde6-\\uddff]){2}",S="[\\ud800-\\udbff][\\udc00-\\udfff]",x="["+c+"]",O="\\u200d",T="(?:"+E+"|"+C+")",N="(?:"+x+"|"+C+")",B="(?:['’](?:d|ll|m|re|s|t|ve))?",k="(?:['’](?:D|LL|M|RE|S|T|VE))?",F="(?:"+v+"|"+D+")"+"?",P="["+d+"]?",I=P+F+("(?:"+O+"(?:"+[w,A,S].join("|")+")"+P+F+")*"),R="(?:"+[y,A,S].join("|")+")"+I,L="(?:"+[w+v+"?",v,A,S,h].join("|")+")",_=RegExp(p,"g"),M=RegExp(v,"g"),j=RegExp(D+"(?="+D+")|"+L+I,"g"),H=RegExp([x+"?"+E+"+"+B+"(?="+[g,x,"$"].join("|")+")",N+"+"+k+"(?="+[g,x+T,"$"].join("|")+")",x+"?"+T+"+"+B,x+"+"+k,m,R].join("|"),"g"),z=RegExp("["+O+i+a+s+d+"]"),$=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,U="object"==typeof b&&b&&b.Object===Object&&b,V="object"==typeof self&&self&&self.Object===Object&&self,W=U||V||Function("return this")(),G=(e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(t){return null==e?void 0:e[t]});function q(e){return z.test(e)}function K(e){return q(e)?function(e){return e.match(j)||[]}(e):function(e){return e.split("")}(e)}var Y=Object.prototype.toString,X=W.Symbol,Z=X?X.prototype:void 0,J=Z?Z.toString:void 0;function Q(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Y.call(e)==n}(e))return J?J.call(e):"";var r=e+"";return"0"==r&&1/e==-t?"-0":r}function ee(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function te(e){return null==e?"":Q(e)}var ne,re,oe=(ne=function(e,t,n){return t=t.toLowerCase(),e+(n?ie(te(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)n=t(n,e[r],r,e);return n}(function(e,t){return e=te(e),void 0===t?function(e){return $.test(e)}(e)?function(e){return e.match(H)||[]}(e):function(e){return e.match(r)||[]}(e):e.match(t)||[]}(function(e){return(e=te(e))&&e.replace(o,G).replace(M,"")}(e).replace(_,"")),ne,"")}),ie=(re="toUpperCase",function(e){var t=q(e=te(e))?K(e):void 0,n=t?t[0]:e.charAt(0),r=t?ee(t,1).join(""):e.slice(1);return n[re]()+r});return wy=oe}(),Py=E(Fy);var Iy=["props","attrs","style","dataset","on","hook"];function Ry(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(!Iy.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=Py(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&&Ry(e)}))}function Ly(e,t){var n,r,o=e.$scroll,i=(n=e.id,"w-e-textarea-".concat(n)),a=t.getConfig(),s=a.readOnly,u=a.autoFocus,l=function(e,t){return void 0===t&&(t=!1),Cy.h("div#".concat(e),{props:{contentEditable:!t}})}(i,s),c=t.children||[],d=Wp.get(e),f=nh.get(e);d&&f&&ap.Range.isCollapsed(f)?l.children=function(e,t,n){var r=n.selection;if(!r)return e.children;var o=r.anchor,i=r.focus,a=Math.min(o.path[0],i.path[0]),s=mp([],vp(e.children||[]),!1),u=ky(t[a],a,n,n);return Ry(u),s[a]=u,s}(d,c,t):l.children=c.map((function(e,n){var r=ky(e,n,t,t);return Ry(r),r}));var p=Up.get(e);if(null==p&&(p=!0),p){var h=function(e){return fh('<div\n id="'.concat(e,'"\n data-slate-editor\n data-slate-node="value"\n suppressContentEditableWarning\n role="textarea"\n spellCheck="true"\n autoCorrect="true"\n autoCapitalize="true"\n ></div>'))}(i);o.append(h),e.$textArea=h,r=h[0],(v=Cy.init([Cy.classModule,Cy.propsModule,Cy.styleModule,Cy.datasetModule,Cy.eventListenersModule,Cy.attributesModule]))(r,l),Up.set(e,!1),Vp.set(e,v)}else{var g=Wp.get(e),v=Vp.get(e);if(null==g||null==v)return;r=g.elm,v(g,l)}if(null!=r||null!=(r=Sh(i))){var m;if((p?u:t.isFocused())&&r.focus({preventScroll:!0}),p){var y=(m=r)&&m.ownerDocument&&m.ownerDocument.defaultView||null;y&&Qp.set(t,y)}var b=t.selection;b&&nh.set(e,b),Kp.set(t,r),Zp.set(t,r),Yp.set(r,t),Wp.set(e,l)}}var _y=1,My=function(){function e(e){var t=this;this.id=_y++,this.$textArea=null,this.$progressBar=fh('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=fh('<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=Km((function(){var e=t.editorInstance;!function(e,t){var n=e.isComposing,r=e.isUpdatingSelection,o=e.isDraggingInternally;if(!(t.getConfig().readOnly||n||r||o)){var i=ug.findDocumentOrShadowRoot(t),a=i.activeElement,s=ug.toDOMNode(t,t),u=i.getSelection();if(a!==s)return eh.delete(t),void ap.Transforms.deselect(t);if(e.latestElement=a,eh.set(t,!0),!u)return ap.Transforms.deselect(t);var l=u.anchorNode,c=u.focusNode,d=Ym(t,l)||Xm(t,l),f=Ym(t,c)||Xm(t,c);if(d&&f){var p=ug.toSlateRange(t,u,{exactMatch:!1,suppressThrow:!1});ap.Transforms.select(t,p)}}}(t,e)}),100);var n=fh(e);if(0===n.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=n;var r=fh('<div class="w-e-text-container"></div>');r.append(this.$progressBar),r.append(this.$maxLengthInfo),n.append(r);var o=fh('<div class="w-e-scroll"></div>');r.append(o),this.$scroll=o,this.$textAreaContainer=r,gh((function(){var e=t.editorInstance,o=ug.getWindow(e);o.document.addEventListener("selectionchange",t.onDOMSelectionChange),e.on(Tp.DESTROYED,(function(){o.document.removeEventListener("selectionchange",t.onDOMSelectionChange)})),r.on("click",(function(){return e.hidePanelOrModal()})),e.on(Tp.CHANGE,t.changeViewState.bind(t));var i=e.getConfig(),a=i.onChange,s=i.scroll;a&&e.on(Tp.CHANGE,(function(){return a(e)})),s||(n.css("position","relative"),r.addClass("no-scroll")),t.onFocusAndOnBlur(),e.on(Tp.CHANGE,t.changeMaxLengthInfo.bind(t)),t.bindEvent()}))}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=Ip.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(xp(yy,(function(n,o){t.on(o,(function(t){n(t,e,r)}))})),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",Km((function(){r.emit("scroll")}),100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on(Tp.CHANGE,(function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout((function(){return o&&o(t)})):null!=e.latestEditorSelection&&null==t.selection&&setTimeout((function(){return r&&r(t)})),e.latestEditorSelection=t.selection}))},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-ug.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;Ly(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var o=t.isEmpty();if(o&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var i=fh('<div class="w-e-text-placeholder">'.concat(r,"</div>"));e.$textAreaContainer.append(i),e.$placeholder=i}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!o&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),gh((function(){iy(e,t)}))},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function jy(e,t,n,r){if(Gp.set(e,t),qp.set(e,n),ap.Element.isElement(e)){var o=e.children;if((void 0===o?[]:o).forEach((function(t,n){return jy(t,n,e,r)})),ap.Editor.isVoid(r,e)){var i=vp(ap.Node.texts(e),1),a=vp(i[0],1)[0];Gp.set(a,0),qp.set(a,e)}}}var Hy=300,zy={heightWarning:{en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"}};function $y(e){var t=e.selector,n=void 0===t?"":t,r=e.config,o=void 0===r?{}:r,i=e.content,a=e.html,s=e.plugins,u=void 0===s?[]:s,l=function(e){return[Ev,tv,ih,Qg,Tv,yv,Cv,lp.withHistory].reduce((function(e,t){return t(e)}),e)}(ap.createEditor());if(n&&function(e,t){return $h(e,"data-w-e-textarea",t)}(l,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var c=function(e){void 0===e&&(e={});var t=Ap(Op),n={},r=e.MENU_CONF,o=void 0===r?{}:r;return xp(t,(function(e,t){n[t]=fp(fp({},e),o[t]||{})})),delete e.MENU_CONF,fp({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(o);$p.set(l,c);var d=c.hoverbarKeys,f=void 0===d?{}:d;if(u.forEach((function(e){l=e(l)})),l.children=function(e,t){var n;return null!=t.html?Uh(e,t.html):(null===(n=t.content)||void 0===n?void 0:n.length)?t.content:[{type:"paragraph",children:[{text:""}]}]}(l,{html:a,content:i}),n){var p=new My(n);Pp.set(l,p),Ip.set(p,l),p.changeViewState(),gh((function(){var e=p.$scroll;null!=e&&e.height()<Hy&&console.warn("".concat(zy.heightWarning.zh,"\n").concat(zy.heightWarning.en),{element:e,height:e.height()})}));var h=void 0;Object.keys(f).length>0&&(h=new Gm,_p.set(h,l),Mp.set(l,h)),l.on(Tp.CHANGE,(function(){l.hidePanelOrModal()})),l.on(Tp.SCROLL,(function(){l.hidePanelOrModal()}))}else l.children.forEach((function(e,t){return jy(e,t,l,l)}));var g=c.onCreated,v=c.onDestroyed;return g&&l.on(Tp.CREATED,(function(){return g(l)})),v&&l.on(Tp.DESTROYED,(function(){return v(l)})),gh((function(){return l.emit("created")})),l}var Uy=function(){function e(e,t){var n=this;this.$toolbar=fh('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=Bv((function(){n.toolbarItems.forEach((function(e){e.changeMenuState()}))}),200),this.config=t;var r=fh(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var o=this.$toolbar;o.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),r.append(o),gh((function(){n.initToolbar(),n.lngListen=Dm((function(){return n.initToolbar()})),n.getEditorInstance().on(Tp.CHANGE,n.changeToolbarState)}))}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.initToolbar=function(){this.menus={};var e=this.$toolbar;null==e||e.empty(),this.registerItems(),this.changeToolbarState()},e.prototype.registerItems=function(){var e=this,t="",n=this.$toolbar,r=this.config,o=r.toolbarKeys,i=void 0===o?[]:o,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=r.excludeKeys,l=void 0===u?[]:u,c=Ap(i);s.keys.length>0&&("string"==typeof s.keys&&(s.keys=[s.keys]),s.keys.forEach((function(e,t){c.splice(s.index+t,0,e)})));var d=c.filter((function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)})),f=d.length;d.forEach((function(r,o){if("|"===r){if(0===o)return;if(o+1===f)return;if("|"===t)return;var i=xm();return n.append(i),void(t=r)}if("string"==typeof r)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t="group"}))},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new jm(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 jm,o=this.menus,i=o[e];if(null==i){var a=Np[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=$m(e,i,r);(this.toolbarItems.push(u),jp.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=Rp.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.destroy=function(){var e;this.$toolbar.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.toolbarItems=[]},e}();function Vy(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 $h(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=fp({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new Uy(n,i);return Rp.set(a,e),Lp.set(e,a),a}var Wy,Gy,qy,Ky,Yy,Xy={exports:{}},Zy={};function Jy(){if(qy)return Zy;qy=1,Object.defineProperty(Zy,"__esModule",{value:!0}),Zy.justErrorsLogger=Zy.debugLogger=void 0;const e=function(){if(Gy)return Wy;function e(e){return e<10?`0${e}`:e.toString()}return Gy=1,Wy=function(){const t=new Date;return`${e(t.getHours())}:${e(t.getMinutes())}:${e(t.getSeconds())}`}}(),t={debug:()=>{},warn:()=>{},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};Zy.justErrorsLogger=t;const n={debug:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.debug(`[Uppy] [${e()}]`,...n)},warn:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.warn(`[Uppy] [${e()}]`,...n)},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};return Zy.debugLogger=n,Zy}function Qy(){if(Yy)return Ky;Yy=1;return Ky={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t)=>()=>{let n="",r=t;for(;r--;)n+=e[Math.random()*e.length|0];return n}},Ky}var eb,tb,nb,rb,ob,ib,ab,sb,ub,lb,cb,db,fb,pb,hb,gb,vb,mb,yb,bb,Eb,Cb,Db,wb,Ab,Sb,xb,Ob,Tb,Nb,Bb,kb={};function Fb(){return tb?eb:(tb=1,eb=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var o=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o})}function Pb(){if(rb)return nb;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return rb=1,e.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<i;t++)"*"!==o[t]&&(r=t<n.length&&o[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var a in r={},e)this.match(a)&&(r[a]=e[a]);return r},nb=function(t,n,r){var o=new e(t,r||/[\/\.]/);return void 0!==n?o.match(n):o}}function Ib(){if(ab)return kb;ab=1,Object.defineProperty(kb,"__esModule",{value:!0}),kb.defaultOptions=kb.RestrictionError=kb.Restricter=void 0;const e=Fb(),t=function(){if(ib)return ob;ib=1;var e=Pb(),t=/[\/\+\.]/;return ob=function(n,r){function o(r){var o=e(r,n,t);return o&&o.length>=2}return r?o(r.split(";")[0]):o}}();kb.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class n extends Error{constructor(){super(...arguments),this.isRestriction=!0}}kb.RestrictionError=n,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});return kb.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(r,o){const{maxFileSize:i,minFileSize:a,maxTotalFileSize:s,maxNumberOfFiles:u,allowedFileTypes:l}=this.getOpts().restrictions;if(u){const e=o.filter((e=>!e.isGhost));if(e.length+1>u)throw new n(`${this.i18n("youCanOnlyUploadX",{smart_count:u})}`)}if(l){if(!l.some((e=>e.includes("/")?!!r.type&&t(r.type.replace(/;.*?$/,""),e):!("."!==e[0]||!r.extension)&&r.extension.toLowerCase()===e.slice(1).toLowerCase()))){const e=l.join(", ");throw new n(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(s&&null!=r.size){const t=o.reduce(((e,t)=>e+t.size),r.size);if(t>s)throw new n(this.i18n("exceedsSize",{size:e(s),file:r.name}))}if(i&&null!=r.size&&r.size>i)throw new n(this.i18n("exceedsSize",{size:e(i),file:r.name}));if(a&&null!=r.size&&r.size<a)throw new n(this.i18n("inferiorSize",{size:e(a)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new n(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new n(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:r}=this.getOpts().restrictions,o=Object.prototype.hasOwnProperty,i=[];for(const t of r)o.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}},kb}function Rb(){if(ub)return sb;return ub=1,sb=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}function Lb(){if(cb)return lb;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}cb=1;var t=0;function n(e){return"__private_"+t+++"_"+e}const r=Rb();function o(e,t,n){const r=[];return e.forEach((e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach(((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(n)})))),r}
|
|
8
|
+
function e(e){return"[object Object]"===Object.prototype.toString.call(e)}return qf=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.isPlainObject=function(t){var n,r;return!1!==e(t)&&(void 0===(n=t.constructor)||!1!==e(r=n.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf"))},Yf}var Zf,Jf,Qf,ep={exports:{}},tp={};function np(){if(Zf)return tp;function e(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function t(e){return!!e&&!!e[G]}function n(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===K}(e)||Array.isArray(e)||!!e[W]||!!e.constructor[W]||l(e)||c(e))}function r(e,t,n){void 0===n&&(n=!1),0===o(e)?(n?Object.keys:Y)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function o(e){var t=e[G];return t?t.t>3?t.t-4:t.t:Array.isArray(e)?1:l(e)?2:c(e)?3:0}function i(e,t){return 2===o(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function a(e,t){return 2===o(e)?e.get(t):e[t]}function s(e,t,n){var r=o(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function u(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function l(e){return z&&e instanceof Map}function c(e){return $&&e instanceof Set}function d(e){return e.i||e.u}function f(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=X(e);delete t[G];for(var n=Y(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function p(e,i){return void 0===i&&(i=!1),g(e)||t(e)||!n(e)||(o(e)>1&&(e.set=e.add=e.clear=e.delete=h),Object.freeze(e),i&&r(e,(function(e,t){return p(t,!0)}),!0)),e}function h(){e(2)}function g(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function v(t){var n=Z[t];return n||e(18,t),n}function m(e,t){Z[e]||(Z[e]=t)}function y(){return j}function b(e,t){t&&(v("Patches"),e.o=[],e.v=[],e.s=t)}function E(e){C(e),e.p.forEach(w),e.p=null}function C(e){e===j&&(j=e.l)}function D(e){return j={p:[],l:j,h:e,_:!0,m:0}}function w(e){var t=e[G];0===t.t||1===t.t?t.j():t.O=!0}function A(t,r){r.m=r.p.length;var o=r.p[0],i=void 0!==t&&t!==o;return r.h.S||v("ES5").M(r,t,i),i?(o[G].P&&(E(r),e(4)),n(t)&&(t=S(r,t),r.l||O(r,t)),r.o&&v("Patches").g(o[G],t,r.o,r.v)):t=S(r,o,[]),E(r),r.o&&r.s(r.o,r.v),t!==V?t:void 0}function S(e,t,n){if(g(t))return t;var o=t[G];if(!o)return r(t,(function(r,i){return x(e,o,t,r,i,n)}),!0),t;if(o.A!==e)return t;if(!o.P)return O(e,o.u,!0),o.u;if(!o.R){o.R=!0,o.A.m--;var i=4===o.t||5===o.t?o.i=f(o.k):o.i;r(3===o.t?new Set(i):i,(function(t,r){return x(e,o,i,t,r,n)})),O(e,i,!1),n&&e.o&&v("Patches").F(o,n,e.o,e.v)}return o.i}function x(e,r,o,a,u,l){if(t(u)){var c=S(e,u,l&&r&&3!==r.t&&!i(r.D,a)?l.concat(a):void 0);if(s(o,a,c),!t(c))return;e._=!1}if(n(u)&&!g(u)){if(!e.h.K&&e.m<1)return;S(e,u),r&&r.A.l||O(e,u)}}function O(e,t,n){void 0===n&&(n=!1),e.h.K&&e._&&p(t,n)}function T(e,t){var n=e[G];return(n?d(n):e)[t]}function N(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function B(e){e.P||(e.P=!0,e.l&&B(e.l))}function k(e){e.i||(e.i=f(e.u))}function F(e,t,n){var r=l(t)?v("MapSet").$(t,n):c(t)?v("MapSet").C(t,n):e.S?function(e,t){var n=Array.isArray(e),r={t:n?1:0,A:t?t.A:y(),P:!1,R:!1,D:{},l:t,u:e,k:null,i:null,j:null,I:!1},o=r,i=J;n&&(o=[r],i=Q);var a=Proxy.revocable(o,i),s=a.revoke,u=a.proxy;return r.k=u,r.j=s,u}(t,n):v("ES5").J(t,n);return(n?n.A:y()).p.push(r),r}function P(i){return t(i)||e(22,i),function e(t){if(!n(t))return t;var i,u=t[G],l=o(t);if(u){if(!u.P&&(u.t<4||!v("ES5").N(u)))return u.u;u.R=!0,i=I(t,l),u.R=!1}else i=I(t,l);return r(i,(function(t,n){u&&a(u.u,t)===n||s(i,t,e(n))})),3===l?new Set(i):i}(i)}function I(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return f(e)}function R(){function e(e,t){var n=s[e];return n?n.enumerable=t:s[e]=n={configurable:!0,enumerable:t,get:function(){return J.get(this[G],e)},set:function(t){J.set(this[G],e,t)}},n}function n(e){for(var t=e.length-1;t>=0;t--){var n=e[t][G];if(!n.P)switch(n.t){case 5:a(n)&&B(n);break;case 4:o(n)&&B(n)}}}function o(e){for(var t=e.u,n=e.k,r=Y(n),o=r.length-1;o>=0;o--){var a=r[o];if(a!==G){var s=t[a];if(void 0===s&&!i(t,a))return!0;var l=n[a],c=l&&l[G];if(c?c.u!==s:!u(l,s))return!0}}var d=!!t[G];return r.length!==Y(t).length+(d?0:1)}function a(e){var t=e.k;if(t.length!==e.u.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);return!(!n||n.get)}var s={};m("ES5",{J:function(t,n){var r=Array.isArray(t),o=function(t,n){if(t){for(var r=Array(n.length),o=0;o<n.length;o++)Object.defineProperty(r,""+o,e(o,!0));return r}var i=X(n);delete i[G];for(var a=Y(i),s=0;s<a.length;s++){var u=a[s];i[u]=e(u,t||!!i[u].enumerable)}return Object.create(Object.getPrototypeOf(n),i)}(r,t),i={t:r?5:4,A:n?n.A:y(),P:!1,R:!1,D:{},l:n,u:t,k:o,i:null,O:!1,I:!1};return Object.defineProperty(o,G,{value:i,writable:!0}),o},M:function(e,o,s){s?t(o)&&o[G].A===e&&n(e.p):(e.o&&function e(t){if(t&&"object"==typeof t){var n=t[G];if(n){var o=n.u,s=n.k,u=n.D,l=n.t;if(4===l)r(s,(function(t){t!==G&&(void 0!==o[t]||i(o,t)?u[t]||e(s[t]):(u[t]=!0,B(n)))})),r(o,(function(e){void 0!==s[e]||i(s,e)||(u[e]=!1,B(n))}));else if(5===l){if(a(n)&&(B(n),u.length=!0),s.length<o.length)for(var c=s.length;c<o.length;c++)u[c]=!1;else for(var d=o.length;d<s.length;d++)u[d]=!0;for(var f=Math.min(s.length,o.length),p=0;p<f;p++)void 0===u[p]&&e(s[p])}}}}(e.p[0]),n(e.p))},N:function(e){return 4===e.t?o(e):a(e)}})}function L(){function s(e){if(!n(e))return e;if(Array.isArray(e))return e.map(s);if(l(e))return new Map(Array.from(e.entries()).map((function(e){return[e[0],s(e[1])]})));if(c(e))return new Set(Array.from(e).map(s));var t=Object.create(Object.getPrototypeOf(e));for(var r in e)t[r]=s(e[r]);return i(e,W)&&(t[W]=e[W]),t}function u(e){return t(e)?s(e):e}var d="add";m("Patches",{W:function(t,n){return n.forEach((function(n){for(var r=n.path,i=n.op,u=t,l=0;l<r.length-1;l++){var c=o(u),f=""+r[l];0!==c&&1!==c||"__proto__"!==f&&"constructor"!==f||e(24),"function"==typeof u&&"prototype"===f&&e(24),"object"!=typeof(u=a(u,f))&&e(15,r.join("/"))}var p=o(u),h=s(n.value),g=r[r.length-1];switch(i){case"replace":switch(p){case 2:return u.set(g,h);case 3:e(16);default:return u[g]=h}case d:switch(p){case 1:return"-"===g?u.push(h):u.splice(g,0,h);case 2:return u.set(g,h);case 3:return u.add(h);default:return u[g]=h}case"remove":switch(p){case 1:return u.splice(g,1);case 2:return u.delete(g);case 3:return u.delete(n.value);default:return delete u[g]}default:e(17,i)}})),t},F:function(e,t,n,o){switch(e.t){case 0:case 4:case 2:return function(e,t,n,o){var s=e.u,l=e.i;r(e.D,(function(e,r){var c=a(s,e),f=a(l,e),p=r?i(s,e)?"replace":d:"remove";if(c!==f||"replace"!==p){var h=t.concat(e);n.push("remove"===p?{op:p,path:h}:{op:p,path:h,value:f}),o.push(p===d?{op:"remove",path:h}:"remove"===p?{op:d,path:h,value:u(c)}:{op:"replace",path:h,value:u(c)})}}))}(e,t,n,o);case 5:case 1:return function(e,t,n,r){var o=e.u,i=e.D,a=e.i;if(a.length<o.length){var s=[a,o];o=s[0],a=s[1];var l=[r,n];n=l[0],r=l[1]}for(var c=0;c<o.length;c++)if(i[c]&&a[c]!==o[c]){var f=t.concat([c]);n.push({op:"replace",path:f,value:u(a[c])}),r.push({op:"replace",path:f,value:u(o[c])})}for(var p=o.length;p<a.length;p++){var h=t.concat([p]);n.push({op:d,path:h,value:u(a[p])})}o.length<a.length&&r.push({op:"replace",path:t.concat(["length"]),value:o.length})}(e,t,n,o);case 3:return function(e,t,n,r){var o=e.u,i=e.i,a=0;o.forEach((function(e){if(!i.has(e)){var o=t.concat([a]);n.push({op:"remove",path:o,value:e}),r.unshift({op:d,path:o,value:e})}a++})),a=0,i.forEach((function(e){if(!o.has(e)){var i=t.concat([a]);n.push({op:d,path:i,value:e}),r.unshift({op:"remove",path:i,value:e})}a++}))}(e,t,n,o)}},g:function(e,t,n,r){n.push({op:"replace",path:[],value:t===V?void 0:t}),r.push({op:"replace",path:[],value:e.u})}})}function _(){function t(e,t){function n(){this.constructor=e}s(e,t),e.prototype=(n.prototype=t.prototype,new n)}function o(e){e.i||(e.D=new Map,e.i=new Map(e.u))}function i(e){e.i||(e.i=new Set,e.u.forEach((function(t){if(n(t)){var r=F(e.A.h,t,e);e.p.set(t,r),e.i.add(r)}else e.i.add(t)})))}function a(t){t.O&&e(3,JSON.stringify(d(t)))}var s=function(e,t){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},u=function(){function e(e,t){return this[G]={t:2,l:t,A:t?t.A:y(),P:!1,R:!1,i:void 0,D:void 0,u:e,k:this,I:!1,O:!1},this}t(e,Map);var i=e.prototype;return Object.defineProperty(i,"size",{get:function(){return d(this[G]).size}}),i.has=function(e){return d(this[G]).has(e)},i.set=function(e,t){var n=this[G];return a(n),d(n).has(e)&&d(n).get(e)===t||(o(n),B(n),n.D.set(e,!0),n.i.set(e,t),n.D.set(e,!0)),this},i.delete=function(e){if(!this.has(e))return!1;var t=this[G];return a(t),o(t),B(t),t.D.set(e,!1),t.i.delete(e),!0},i.clear=function(){var e=this[G];a(e),d(e).size&&(o(e),B(e),e.D=new Map,r(e.u,(function(t){e.D.set(t,!1)})),e.i.clear())},i.forEach=function(e,t){var n=this;d(this[G]).forEach((function(r,o){e.call(t,n.get(o),o,n)}))},i.get=function(e){var t=this[G];a(t);var r=d(t).get(e);if(t.R||!n(r))return r;if(r!==t.u.get(e))return r;var i=F(t.A.h,r,t);return o(t),t.i.set(e,i),i},i.keys=function(){return d(this[G]).keys()},i.values=function(){var e,t=this,n=this.keys();return(e={})[q]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},i.entries=function(){var e,t=this,n=this.keys();return(e={})[q]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var r=t.get(e.value);return{done:!1,value:[e.value,r]}},e},i[q]=function(){return this.entries()},e}(),l=function(){function e(e,t){return this[G]={t:3,l:t,A:t?t.A:y(),P:!1,R:!1,i:void 0,u:e,k:this,p:new Map,O:!1,I:!1},this}t(e,Set);var n=e.prototype;return Object.defineProperty(n,"size",{get:function(){return d(this[G]).size}}),n.has=function(e){var t=this[G];return a(t),t.i?!!t.i.has(e)||!(!t.p.has(e)||!t.i.has(t.p.get(e))):t.u.has(e)},n.add=function(e){var t=this[G];return a(t),this.has(e)||(i(t),B(t),t.i.add(e)),this},n.delete=function(e){if(!this.has(e))return!1;var t=this[G];return a(t),i(t),B(t),t.i.delete(e)||!!t.p.has(e)&&t.i.delete(t.p.get(e))},n.clear=function(){var e=this[G];a(e),d(e).size&&(i(e),B(e),e.i.clear())},n.values=function(){var e=this[G];return a(e),i(e),e.i.values()},n.entries=function(){var e=this[G];return a(e),i(e),e.i.entries()},n.keys=function(){return this.values()},n[q]=function(){return this.values()},n.forEach=function(e,t){for(var n=this.values(),r=n.next();!r.done;)e.call(t,r.value,r.value,this),r=n.next()},e}();m("MapSet",{$:function(e,t){return new u(e,t)},C:function(e,t){return new l(e,t)}})}var M;Zf=1,Object.defineProperty(tp,"__esModule",{value:!0});var j,H="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),z="undefined"!=typeof Map,$="undefined"!=typeof Set,U="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,V=H?Symbol.for("immer-nothing"):((M={})["immer-nothing"]=!0,M),W=H?Symbol.for("immer-draftable"):"__$immer_draftable",G=H?Symbol.for("immer-state"):"__$immer_state",q="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",K=""+Object.prototype.constructor,Y="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,X=Object.getOwnPropertyDescriptors||function(e){var t={};return Y(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},Z={},J={get:function(e,t){if(t===G)return e;var r=d(e);if(!i(r,t))return function(e,t,n){var r,o=N(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,r,t);var o=r[t];return e.R||!n(o)?o:o===T(e.u,t)?(k(e),e.i[t]=F(e.A.h,o,e)):o},has:function(e,t){return t in d(e)},ownKeys:function(e){return Reflect.ownKeys(d(e))},set:function(e,t,n){var r=N(d(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=T(d(e),t),a=null==o?void 0:o[G];if(a&&a.u===n)return e.i[t]=n,e.D[t]=!1,!0;if(u(n,o)&&(void 0!==n||i(e.u,t)))return!0;k(e),B(e)}return e.i[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.i)||(e.i[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==T(e.u,t)||t in e.u?(e.D[t]=!1,k(e),B(e)):delete e.D[t],e.i&&delete e.i[t],!0},getOwnPropertyDescriptor:function(e,t){var n=d(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.t||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){e(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.u)},setPrototypeOf:function(){e(12)}},Q={};r(J,(function(e,t){Q[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Q.deleteProperty=function(e,t){return J.deleteProperty.call(this,e[0],t)},Q.set=function(e,t,n){return J.set.call(this,e[0],t,n,e[0])};var ee=function(){function r(t){var r=this;this.S=U,this.K=!0,this.produce=function(t,o,i){if("function"==typeof t&&"function"!=typeof o){var a=o;o=t;var s=r;return function(e){var t=this;void 0===e&&(e=a);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return s.produce(e,(function(e){var n;return(n=o).call.apply(n,[t,e].concat(r))}))}}var u;if("function"!=typeof o&&e(6),void 0!==i&&"function"!=typeof i&&e(7),n(t)){var l=D(r),c=F(r,t,void 0),d=!0;try{u=o(c),d=!1}finally{d?E(l):C(l)}return"undefined"!=typeof Promise&&u instanceof Promise?u.then((function(e){return b(l,i),A(e,l)}),(function(e){throw E(l),e})):(b(l,i),A(u,l))}if(!t||"object"!=typeof t){if((u=o(t))===V)return;return void 0===u&&(u=t),r.K&&p(u,!0),u}e(21,t)},this.produceWithPatches=function(e,t){return"function"==typeof e?function(t){for(var n=arguments.length,o=Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return r.produceWithPatches(t,(function(t){return e.apply(void 0,[t].concat(o))}))}:[r.produce(e,t,(function(e,t){n=e,o=t})),n,o];var n,o},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var o=r.prototype;return o.createDraft=function(r){n(r)||e(8),t(r)&&(r=P(r));var o=D(this),i=F(this,r,void 0);return i[G].I=!0,C(o),i},o.finishDraft=function(e,t){var n=(e&&e[G]).A;return b(n,t),A(void 0,n)},o.setAutoFreeze=function(e){this.K=e},o.setUseProxies=function(t){t&&!U&&e(20),this.S=t},o.applyPatches=function(e,n){var r;for(r=n.length-1;r>=0;r--){var o=n[r];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}r>-1&&(n=n.slice(r+1));var i=v("Patches").W;return t(e)?i(e,n):this.produce(e,(function(e){return i(e,n)}))},r}(),te=new ee,ne=te.produce,re=te.produceWithPatches.bind(te),oe=te.setAutoFreeze.bind(te),ie=te.setUseProxies.bind(te),ae=te.applyPatches.bind(te),se=te.createDraft.bind(te),ue=te.finishDraft.bind(te);return tp.Immer=ee,tp.applyPatches=ae,tp.castDraft=function(e){return e},tp.castImmutable=function(e){return e},tp.createDraft=se,tp.current=P,tp.default=ne,tp.enableAllPlugins=function(){R(),_(),L()},tp.enableES5=R,tp.enableMapSet=_,tp.enablePatches=L,tp.finishDraft=ue,tp.freeze=p,tp.immerable=W,tp.isDraft=t,tp.isDraftable=n,tp.nothing=V,tp.original=function(n){return t(n)||e(23,n),n[G].u},tp.produce=ne,tp.produceWithPatches=re,tp.setAutoFreeze=oe,tp.setUseProxies=ie,tp}function rp(){return Jf||(Jf=1,ep.exports=np()),ep.exports}function op(){if(Qf)return Kf;Qf=1,Object.defineProperty(Kf,"__esModule",{value:!0});var e=Xf(),t=rp();function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,t){return e(t={exports:{}},t.exports),t.exports}var o=r((function(e){e.exports=function(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},e.exports.default=e.exports,e.exports.__esModule=!0}));n(o);var i=r((function(e){e.exports=function(e){if(Array.isArray(e))return o(e)},e.exports.default=e.exports,e.exports.__esModule=!0}));n(i);var a=r((function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0}));n(a);var s=r((function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0}));n(s);var u=r((function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}));n(u);var l=n(r((function(e){e.exports=function(e){return i(e)||a(e)||s(e)||u()},e.exports.default=e.exports,e.exports.__esModule=!0}))),c=r((function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0}));n(c);var d=r((function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){s=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0}));n(d);var f=r((function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}));n(f);var p=r((function(e){e.exports=function(e,t){return c(e)||d(e,t)||s(e,t)||f()},e.exports.default=e.exports,e.exports.__esModule=!0})),h=n(p),g=n(r((function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0}))),v=new WeakMap,m=new WeakMap,y=new WeakMap,b=new WeakMap,E=new WeakMap,C=new WeakMap;function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(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 S(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 S(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 S(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 x=function(e){switch(e.type){case"insert_text":case"remove_text":case"set_node":var t=e.path;return xe.levels(t);case"insert_node":var n=e.node,r=e.path,o=xe.levels(r),i=Ue.isText(n)?[]:Array.from(De.nodes(n),(function(e){var t=h(e,2)[1];return r.concat(t)}));return[].concat(l(o),l(i));case"merge_node":var a=e.path,s=xe.ancestors(a),u=xe.previous(a);return[].concat(l(s),[u]);case"move_node":var c=e.path,d=e.newPath;if(xe.equals(c,d))return[];var f,p=[],g=[],v=A(xe.ancestors(c));try{for(v.s();!(f=v.n()).done;){var m=f.value,y=xe.transform(m,e);p.push(y)}}catch(e){v.e(e)}finally{v.f()}var b,E=A(xe.ancestors(d));try{for(E.s();!(b=E.n()).done;){var C=b.value,D=xe.transform(C,e);g.push(D)}}catch(e){E.e(e)}finally{E.f()}var w=g[g.length-1],S=d[d.length-1],x=w.concat(S);return[].concat(p,g,[x]);case"remove_node":var O=e.path,T=xe.ancestors(O);return l(T);case"split_node":var N=e.path,B=xe.levels(N),k=xe.next(N);return[].concat(l(B),[k]);default:return[]}},O=r((function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.default=e.exports,e.exports.__esModule=!0}));n(O);var T=r((function(e){e.exports=function(e,t){if(null==e)return{};var n,r,o=O(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.default=e.exports,e.exports.__esModule=!0})),N=n(T);function B(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 k(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 k(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 k(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 F,P=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!n,o=n?j(e):e,i=F.None,a=F.None,s=0,u=null,l=B(o);try{for(l.s();!(t=l.n()).done;){var c=t.value,d=c.codePointAt(0);if(!d)break;var f=Z(c,d),p=h(r?[a,f]:[f,i],2);if(i=p[0],a=p[1],J(i,F.ZWJ)&&J(a,F.ExtPict)&&!ne(r?e.substring(0,s):e.substring(0,e.length-s)))break;if(J(i,F.RI)&&J(a,F.RI)&&!(u=null!==u?!u:!!r||oe(e.substring(0,e.length-s))))break;if(i!==F.None&&a!==F.None&&ee(i,a))break;s+=c.length}}catch(e){l.e(e)}finally{l.f()}return s||1},I=/\s/,R=/[\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,L=/['\u2018\u2019]/,_=function(e,t,n){if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},M=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(I.test(t))return!1;if(L.test(t)){var o=P(n,r),i=_(n,o,r),a=h(i,2);if(e(a[0],a[1],r))return!0}return!R.test(t)},j=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var r=e.charAt(t-n);if(z(r.charCodeAt(0))){var o=e.charAt(t-n-1);if(H(o.charCodeAt(0))){yield o+r,n++;continue}}yield r}},H=function(e){return e>=55296&&e<=56319},z=function(e){return e>=56320&&e<=57343};!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(F||(F={}));var $=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,U=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,V=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,W=/^[\u1100-\u115F\uA960-\uA97C]$/,G=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,q=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,K=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,Y=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,X=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,Z=function(e,t){var n=F.Any;return-1!==e.search($)&&(n|=F.Extend),8205===t&&(n|=F.ZWJ),t>=127462&&t<=127487&&(n|=F.RI),-1!==e.search(U)&&(n|=F.Prepend),-1!==e.search(V)&&(n|=F.SpacingMark),-1!==e.search(W)&&(n|=F.L),-1!==e.search(G)&&(n|=F.V),-1!==e.search(q)&&(n|=F.T),-1!==e.search(K)&&(n|=F.LV),-1!==e.search(Y)&&(n|=F.LVT),-1!==e.search(X)&&(n|=F.ExtPict),n};function J(e,t){return!!(e&t)}var Q=[[F.L,F.L|F.V|F.LV|F.LVT],[F.LV|F.V,F.V|F.T],[F.LVT|F.T,F.T],[F.Any,F.Extend|F.ZWJ],[F.Any,F.SpacingMark],[F.Prepend,F.Any],[F.ZWJ,F.ExtPict],[F.RI,F.RI]];function ee(e,t){return-1===Q.findIndex((function(n){return J(e,n[0])&&J(t,n[1])}))}var te=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1AC0\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50]|\uD804[\uDC01\uDC38-\uDC46\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,ne=function(e){return-1!==e.search(te)},re=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,oe=function(e){var t=e.match(re);return null!==t&&t[0].length/2%2==1},ie=function(t){return e.isPlainObject(t)&&De.isNodeList(t.children)&&!he.isEditor(t)},ae={isAncestor:function(t){return e.isPlainObject(t)&&De.isNodeList(t.children)},isElement:ie,isElementList:function(e){return Array.isArray(e)&&e.every((function(e){return ae.isElement(e)}))},isElementProps:function(e){return void 0!==e.children},isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return ie(e)&&e[n]===t},matches:function(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},se=["text"],ue=["text"];function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function de(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 fe(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 fe(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 fe(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 pe=new WeakMap,he={above:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.voids,r=void 0!==n&&n,o=t.mode,i=void 0===o?"lowest":o,a=t.at,s=void 0===a?e.selection:a,u=t.match;if(s){var l,c=he.path(e,s),d="lowest"===i,f=de(he.levels(e,{at:c,voids:r,match:u,reverse:d}));try{for(f.s();!(l=f.n()).done;){var p=h(l.value,2),g=p[0],v=p[1];if(!Ue.isText(g)&&!xe.equals(c,v))return[g,v]}}catch(e){f.e(e)}finally{f.f()}}},addMark:function(e,t,n){e.addMark(t,n)},after:function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:he.point(e,t,{edge:"end"}),focus:he.end(e,[])},a=o.distance,s=void 0===a?1:a,u=0,l=de(he.positions(e,ce(ce({},o),{},{at:i})));try{for(l.s();!(r=l.n()).done;){var c=r.value;if(u>s)break;0!==u&&(n=c),u++}}catch(e){l.e(e)}finally{l.f()}return n},before:function(e,t){var n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i={anchor:he.start(e,[]),focus:he.point(e,t,{edge:"start"})},a=o.distance,s=void 0===a?1:a,u=0,l=de(he.positions(e,ce(ce({},o),{},{at:i,reverse:!0})));try{for(l.s();!(r=l.n()).done;){var c=r.value;if(u>s)break;0!==u&&(n=c),u++}}catch(e){l.e(e)}finally{l.f()}return n},deleteBackward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,n=void 0===t?"character":t;e.deleteBackward(n)},deleteForward:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).unit,n=void 0===t?"character":t;e.deleteForward(n)},deleteFragment:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).direction,n=void 0===t?"forward":t;e.deleteFragment(n)},edges:function(e,t){return[he.start(e,t),he.end(e,t)]},end:function(e,t){return he.point(e,t,{edge:"end"})},first:function(e,t){var n=he.path(e,t,{edge:"start"});return he.node(e,n)},fragment:function(e,t){var n=he.range(e,t),r=De.fragment(e,n);return r},hasBlocks:function(e,t){return t.children.some((function(t){return he.isBlock(e,t)}))},hasInlines:function(e,t){return t.children.some((function(t){return Ue.isText(t)||he.isInline(e,t)}))},hasTexts:function(e,t){return t.children.every((function(e){return Ue.isText(e)}))},insertBreak:function(e){e.insertBreak()},insertFragment:function(e,t){e.insertFragment(t)},insertNode:function(e,t){e.insertNode(t)},insertText:function(e,t){e.insertText(t)},isBlock:function(e,t){return ae.isElement(t)&&!e.isInline(t)},isEditor:function(t){if(!e.isPlainObject(t))return!1;var n=pe.get(t);if(void 0!==n)return n;var r="function"==typeof t.addMark&&"function"==typeof t.apply&&"function"==typeof t.deleteBackward&&"function"==typeof t.deleteForward&&"function"==typeof t.deleteFragment&&"function"==typeof t.insertBreak&&"function"==typeof t.insertFragment&&"function"==typeof t.insertNode&&"function"==typeof t.insertText&&"function"==typeof t.isInline&&"function"==typeof t.isVoid&&"function"==typeof t.normalizeNode&&"function"==typeof t.onChange&&"function"==typeof t.removeMark&&(null===t.marks||e.isPlainObject(t.marks))&&(null===t.selection||Ie.isRange(t.selection))&&De.isNodeList(t.children)&&Se.isOperationList(t.operations);return pe.set(t,r),r},isEnd:function(e,t,n){var r=he.end(e,n);return Be.equals(t,r)},isEdge:function(e,t,n){return he.isStart(e,t,n)||he.isEnd(e,t,n)},isEmpty:function(e,t){var n=t.children,r=h(n,1)[0];return 0===n.length||1===n.length&&Ue.isText(r)&&""===r.text&&!e.isVoid(t)},isInline:function(e,t){return ae.isElement(t)&&e.isInline(t)},isNormalizing:function(e){var t=y.get(e);return void 0===t||t},isStart:function(e,t,n){if(0!==t.offset)return!1;var r=he.start(e,n);return Be.equals(t,r)},isVoid:function(e,t){return ae.isElement(t)&&e.isVoid(t)},last:function(e,t){var n=he.path(e,t,{edge:"end"});return he.node(e,n)},leaf:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n);return[De.leaf(e,r),r]},levels:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.reverse,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.match;if(null==u&&(u=function(){return!0}),r){var l,c=[],d=he.path(e,r),f=de(De.levels(e,d));try{for(f.s();!(l=f.n()).done;){var p=h(l.value,2),g=p[0],v=p[1];if(u(g,v)&&(c.push([g,v]),!s&&he.isVoid(e,g)))break}}catch(e){f.e(e)}finally{f.f()}i&&c.reverse(),yield*c}},marks:function(e){var t=e.marks,n=e.selection;if(!n)return null;if(t)return t;if(Ie.isExpanded(n)){var r=he.nodes(e,{match:Ue.isText}),o=h(r,1)[0];if(o){var i=h(o,1)[0];return i.text,N(i,se)}return{}}var a=n.anchor,s=a.path,u=he.leaf(e,s),l=h(u,1)[0];if(0===a.offset){var c=he.previous(e,{at:s,match:Ue.isText}),d=he.above(e,{match:function(t){return he.isBlock(e,t)}});if(c&&d){var f=h(c,2),p=f[0],g=f[1],v=h(d,2)[1];xe.isAncestor(v,g)&&(l=p)}}var m=l;return m.text,N(m,ue)},next:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=he.after(e,u,{voids:i});if(l){var c=he.last(e,[]),d=h(c,2)[1],f=[l.path,d];if(xe.isPath(u)&&0===u.length)throw new Error("Cannot get the next node from the root node!");if(null==a)if(xe.isPath(u)){var p=he.parent(e,u),g=h(p,1)[0];a=function(e){return g.children.includes(e)}}else a=function(){return!0};var v=he.nodes(e,{at:f,match:a,mode:r,voids:i}),m=h(v,1)[0];return m}}},node:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n),o=De.get(e,r);return[o,r]},nodes:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.mode,i=void 0===o?"all":o,a=t.universal,s=void 0!==a&&a,u=t.reverse,l=void 0!==u&&u,c=t.voids,d=void 0!==c&&c,f=t.match;if(f||(f=function(){return!0}),r){var p,g;if(ve.isSpan(r))p=r[0],g=r[1];else{var v=he.path(e,r,{edge:"start"}),m=he.path(e,r,{edge:"end"});p=l?m:v,g=l?v:m}var y,b,E=De.nodes(e,{reverse:l,from:p,to:g,pass:function(t){var n=h(t,1)[0];return!d&&he.isVoid(e,n)}}),C=[],D=de(E);try{for(D.s();!(b=D.n()).done;){var w=h(b.value,2),A=w[0],S=w[1],x=y&&0===xe.compare(S,y[1]);if("highest"!==i||!x)if(f(A,S))if("lowest"===i&&x)y=[A,S];else{var O="lowest"===i?y:[A,S];O&&(s?C.push(O):yield O),y=[A,S]}else if(s&&!x&&Ue.isText(A))return}}catch(e){D.e(e)}finally{D.f()}"lowest"===i&&y&&(s?C.push(y):yield y),s&&(yield*C)}},normalize:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).force,n=void 0!==t&&t,r=function(e){return v.get(e)||[]};if(he.isNormalizing(e)){if(n){var o=Array.from(De.nodes(e),(function(e){return h(e,2)[1]}));v.set(e,o)}0!==r(e).length&&he.withoutNormalizing(e,(function(){var t,n=de(r(e));try{for(n.s();!(t=n.n()).done;){var o=t.value;if(De.has(e,o)){var i=he.node(e,o),a=h(i,2),s=a[0];a[1];ae.isElement(s)&&0===s.children.length&&e.normalizeNode(i)}}}catch(e){n.e(e)}finally{n.f()}for(var u=42*r(e).length,l=0;0!==r(e).length;){if(l>u)throw new Error("\n Could not completely normalize the editor after ".concat(u," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.\n "));var c=r(e).pop();if(De.has(e,c)){var d=he.node(e,c);e.normalizeNode(d)}l++}}))}},parent:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=he.path(e,t,n),o=xe.parent(r);return he.node(e,o)},path:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.depth,o=n.edge;if(xe.isPath(t))if("start"===o){var i=De.first(e,t);t=h(i,2)[1]}else if("end"===o){var a=De.last(e,t);t=h(a,2)[1]}return Ie.isRange(t)&&(t="start"===o?Ie.start(t):"end"===o?Ie.end(t):xe.common(t.anchor.path,t.focus.path)),Be.isPoint(t)&&(t=t.path),null!=r&&(t=t.slice(0,r)),t},hasPath:function(e,t){return De.has(e,t)},pathRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.pathRefs(e).delete(r),r.current=null,t}};return he.pathRefs(e).add(r),r},pathRefs:function(e){var t=b.get(e);return t||(t=new Set,b.set(e,t)),t},point:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).edge,r=void 0===n?"start":n;if(xe.isPath(t)){var o;if("end"===r){var i=De.last(e,t);o=h(i,2)[1]}else{var a=De.first(e,t);o=h(a,2)[1]}var s=De.get(e,o);if(!Ue.isText(s))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:o,offset:"end"===r?s.text.length:0}}if(Ie.isRange(t)){var u=Ie.edges(t),l=h(u,2),c=l[0],d=l[1];return"start"===r?c:d}return t},pointRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.pointRefs(e).delete(r),r.current=null,t}};return he.pointRefs(e).add(r),r},pointRefs:function(e){var t=E.get(e);return t||(t=new Set,E.set(e,t)),t},positions:function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.at,r=void 0===n?e.selection:n,o=t.unit,i=void 0===o?"offset":o,a=t.reverse,s=void 0!==a&&a,u=t.voids,l=void 0!==u&&u;if(r){var c,d=he.range(e,r),f=Ie.edges(d),p=h(f,2),g=p[0],v=p[1],m=s?v:g,y=!1,b="",E=0,C=0,D=0,w=de(he.nodes(e,{at:r,reverse:s,voids:l}));try{for(w.s();!(c=w.n()).done;){var A=h(c.value,2),S=A[0],x=A[1];if(ae.isElement(S)){if(!l&&e.isVoid(S)){yield he.start(e,x);continue}if(e.isInline(S))continue;if(he.hasInlines(e,S)){var O=xe.isAncestor(x,v.path)?v:he.end(e,x),T=xe.isAncestor(x,g.path)?g:he.start(e,x);b=he.string(e,{anchor:T,focus:O},{voids:l}),y=!0}}if(Ue.isText(S)){var N=xe.equals(x,m.path);for(N?(C=s?m.offset:S.text.length-m.offset,D=m.offset):(C=S.text.length,D=s?C:0),(N||y||"offset"===i)&&(yield{path:x,offset:D},y=!1);;){if(0===E){if(""===b)break;E=B(b,i,s),b=_(b,E,s)[1]}if(D=s?D-E:D+E,(C-=E)<0){E=-C;break}E=0,yield{path:x,offset:D}}}}}catch(e){w.e(e)}finally{w.f()}}function B(e,t,n){return"character"===t?P(e,n):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;e.length>0;){var o=P(e,t),i=_(e,o,t),a=h(i,2),s=a[0],u=a[1];if(M(s,u,t))r=!0,n+=o;else{if(r)break;n+=o}e=u}return n}(e,n):"line"===t||"block"===t?e.length:1}},previous:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s;if(u){var l=he.before(e,u,{voids:i});if(l){var c=he.first(e,[]),d=h(c,2)[1],f=[l.path,d];if(xe.isPath(u)&&0===u.length)throw new Error("Cannot get the previous node from the root node!");if(null==a)if(xe.isPath(u)){var p=he.parent(e,u),g=h(p,1)[0];a=function(e){return g.children.includes(e)}}else a=function(){return!0};var v=he.nodes(e,{reverse:!0,at:f,match:a,mode:r,voids:i}),m=h(v,1)[0];return m}}},range:function(e,t,n){return Ie.isRange(t)&&!n?t:{anchor:he.start(e,t),focus:he.end(e,n||t)}},rangeRef:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).affinity,r={current:t,affinity:void 0===n?"forward":n,unref:function(){var t=r.current;return he.rangeRefs(e).delete(r),r.current=null,t}};return he.rangeRefs(e).add(r),r},rangeRefs:function(e){var t=C.get(e);return t||(t=new Set,C.set(e,t)),t},removeMark:function(e,t){e.removeMark(t)},setNormalizing:function(e,t){y.set(e,t)},start:function(e,t){return he.point(e,t,{edge:"start"})},string:function(e,t){var n,r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,o=void 0!==r&&r,i=he.range(e,t),a=Ie.edges(i),s=h(a,2),u=s[0],l=s[1],c="",d=de(he.nodes(e,{at:i,match:Ue.isText,voids:o}));try{for(d.s();!(n=d.n()).done;){var f=h(n.value,2),p=f[0],g=f[1],v=p.text;xe.equals(g,l.path)&&(v=v.slice(0,l.offset)),xe.equals(g,u.path)&&(v=v.slice(u.offset)),c+=v}}catch(e){d.e(e)}finally{d.f()}return c},unhangRange:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).voids,r=void 0!==n&&n,o=Ie.edges(t),i=h(o,2),a=i[0],s=i[1];if(0!==a.offset||0!==s.offset||Ie.isCollapsed(t))return t;var u,l=he.above(e,{at:s,match:function(t){return he.isBlock(e,t)}}),c=l?l[1]:[],d={anchor:he.start(e,[]),focus:s},f=!0,p=de(he.nodes(e,{at:d,match:Ue.isText,reverse:!0,voids:r}));try{for(p.s();!(u=p.n()).done;){var g=h(u.value,2),v=g[0],m=g[1];if(f)f=!1;else if(""!==v.text||xe.isBefore(m,c)){s={path:m,offset:v.text.length};break}}}catch(e){p.e(e)}finally{p.f()}return{anchor:a,focus:s}},void:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return he.above(e,ce(ce({},t),{},{match:function(t){return he.isVoid(e,t)}}))},withoutNormalizing:function(e,t){var n=he.isNormalizing(e);he.setNormalizing(e,!1);try{t()}finally{he.setNormalizing(e,n)}he.normalize(e)}},ge={isLocation:function(e){return xe.isPath(e)||Be.isPoint(e)||Ie.isRange(e)}},ve={isSpan:function(e){return Array.isArray(e)&&2===e.length&&e.every(xe.isPath)}},me=["children"],ye=["text"];function be(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 Ee(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 Ee(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 Ee(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 Ce=new WeakMap,De={ancestor:function(e,t){var n=De.get(e,t);if(Ue.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(n));return n},ancestors:function*(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=be(xe.ancestors(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=[De.ancestor(e,i),i];yield a}}catch(e){o.e(e)}finally{o.f()}},child:function(e,t){if(Ue.isText(e))throw new Error("Cannot get the child of a text node: ".concat(JSON.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(JSON.stringify(e)));return n},children:function*(e,t){for(var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).reverse,r=void 0!==n&&n,o=De.ancestor(e,t),i=o.children,a=r?i.length-1:0;r?a>=0:a<i.length;){var s=De.child(o,a),u=t.concat(a);yield[s,u],a=r?a-1:a+1}},common:function(e,t,n){var r=xe.common(t,n);return[De.get(e,r),r]},descendant:function(e,t){var n=De.get(e,t);if(he.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(n));return n},descendants:function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=be(De.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];0!==a.length&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}},elements:function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=be(De.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];ae.isElement(i)&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}},extractProps:function(e){return ae.isAncestor(e)?(e.children,N(e,me)):(e.text,N(e,ye))},first:function(e,t){for(var n=t.slice(),r=De.get(e,n);r&&!Ue.isText(r)&&0!==r.children.length;)r=r.children[0],n.push(0);return[r,n]},fragment:function(e,n){if(Ue.isText(e))throw new Error("Cannot get a fragment starting from a root text node: ".concat(JSON.stringify(e)));var r=t.produce({children:e.children},(function(e){var t,r=Ie.edges(n),o=h(r,2),i=o[0],a=o[1],s=De.nodes(e,{reverse:!0,pass:function(e){var t=h(e,2)[1];return!Ie.includes(n,t)}}),u=be(s);try{for(u.s();!(t=u.n()).done;){var l=h(t.value,2)[1];if(!Ie.includes(n,l)){var c=De.parent(e,l),d=l[l.length-1];c.children.splice(d,1)}if(xe.equals(l,a.path)){var f=De.leaf(e,l);f.text=f.text.slice(0,a.offset)}if(xe.equals(l,i.path)){var p=De.leaf(e,l);p.text=p.text.slice(i.offset)}}}catch(e){u.e(e)}finally{u.f()}he.isEditor(e)&&(e.selection=null)}));return r.children},get:function(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(Ue.isText(n)||!n.children[o])throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(JSON.stringify(e)));n=n.children[o]}return n},has:function(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(Ue.isText(n)||!n.children[o])return!1;n=n.children[o]}return!0},isNode:function(e){return Ue.isText(e)||ae.isElement(e)||he.isEditor(e)},isNodeList:function(e){if(!Array.isArray(e))return!1;var t=Ce.get(e);if(void 0!==t)return t;var n=e.every((function(e){return De.isNode(e)}));return Ce.set(e,n),n},last:function(e,t){for(var n=t.slice(),r=De.get(e,n);r&&!Ue.isText(r)&&0!==r.children.length;){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf:function(e,t){var n=De.get(e,t);if(!Ue.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(n));return n},levels:function*(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=be(xe.levels(t,r));try{for(o.s();!(n=o.n()).done;){var i=n.value,a=De.get(e,i);yield[a,i]}}catch(e){o.e(e)}finally{o.f()}},matches:function(e,t){return ae.isElement(e)&&ae.isElementProps(t)&&ae.matches(e,t)||Ue.isText(e)&&Ue.isTextProps(t)&&Ue.matches(e,t)},nodes:function*(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.pass,r=t.reverse,o=void 0!==r&&r,i=t.from,a=void 0===i?[]:i,s=t.to,u=new Set,l=[],c=e;!s||!(o?xe.isBefore(l,s):xe.isAfter(l,s));)if(u.has(c)||(yield[c,l]),u.has(c)||Ue.isText(c)||0===c.children.length||null!=n&&!1!==n([c,l])){if(0===l.length)break;if(!o){var d=xe.next(l);if(De.has(e,d)){l=d,c=De.get(e,l);continue}}if(o&&0!==l[l.length-1])l=xe.previous(l),c=De.get(e,l);else l=xe.parent(l),c=De.get(e,l),u.add(c)}else{u.add(c);var f=o?c.children.length-1:0;xe.isAncestor(l,a)&&(f=a[l.length]),l=l.concat(f),c=De.get(e,l)}},parent:function(e,t){var n=xe.parent(t),r=De.get(e,n);if(Ue.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:function(e){return Ue.isText(e)?e.text:e.children.map(De.string).join("")},texts:function*(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=be(De.nodes(e,n));try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),i=o[0],a=o[1];Ue.isText(i)&&(yield[i,a])}}catch(e){r.e(e)}finally{r.f()}}};function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Se={isNodeOperation:function(e){return Se.isOperation(e)&&e.type.endsWith("_node")},isOperation:function(t){if(!e.isPlainObject(t))return!1;switch(t.type){case"insert_node":case"remove_node":return xe.isPath(t.path)&&De.isNode(t.node);case"insert_text":case"remove_text":return"number"==typeof t.offset&&"string"==typeof t.text&&xe.isPath(t.path);case"merge_node":return"number"==typeof t.position&&xe.isPath(t.path)&&e.isPlainObject(t.properties);case"move_node":return xe.isPath(t.path)&&xe.isPath(t.newPath);case"set_node":return xe.isPath(t.path)&&e.isPlainObject(t.properties)&&e.isPlainObject(t.newProperties);case"set_selection":return null===t.properties&&Ie.isRange(t.newProperties)||null===t.newProperties&&Ie.isRange(t.properties)||e.isPlainObject(t.properties)&&e.isPlainObject(t.newProperties);case"split_node":return xe.isPath(t.path)&&"number"==typeof t.position&&e.isPlainObject(t.properties);default:return!1}},isOperationList:function(e){return Array.isArray(e)&&e.every((function(e){return Se.isOperation(e)}))},isSelectionOperation:function(e){return Se.isOperation(e)&&e.type.endsWith("_selection")},isTextOperation:function(e){return Se.isOperation(e)&&e.type.endsWith("_text")},inverse:function(e){switch(e.type){case"insert_node":return Ae(Ae({},e),{},{type:"remove_node"});case"insert_text":return Ae(Ae({},e),{},{type:"remove_text"});case"merge_node":return Ae(Ae({},e),{},{type:"split_node",path:xe.previous(e.path)});case"move_node":var t=e.newPath,n=e.path;if(xe.equals(t,n))return e;if(xe.isSibling(n,t))return Ae(Ae({},e),{},{path:t,newPath:n});var r=xe.transform(n,e),o=xe.transform(xe.next(n),e);return Ae(Ae({},e),{},{path:r,newPath:o});case"remove_node":return Ae(Ae({},e),{},{type:"insert_node"});case"remove_text":return Ae(Ae({},e),{},{type:"insert_text"});case"set_node":var i=e.properties,a=e.newProperties;return Ae(Ae({},e),{},{properties:a,newProperties:i});case"set_selection":var s=e.properties,u=e.newProperties;return Ae(Ae({},e),{},null==s?{properties:u,newProperties:null}:null==u?{properties:null,newProperties:s}:{properties:u,newProperties:s});case"split_node":return Ae(Ae({},e),{},{type:"merge_node",path:xe.next(e.path)})}}},xe={ancestors:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.reverse,r=void 0!==n&&n,o=xe.levels(e,t);return o=r?o.slice(1):o.slice(0,-1)},common:function(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var o=e[r];if(o!==t[r])break;n.push(o)}return n},compare:function(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter:function(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return xe.equals(r,o)&&i>a},endsAt:function(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return xe.equals(r,o)},endsBefore:function(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return xe.equals(r,o)&&i<a},equals:function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[n]}))},hasPrevious:function(e){return e[e.length-1]>0},isAfter:function(e,t){return 1===xe.compare(e,t)},isAncestor:function(e,t){return e.length<t.length&&0===xe.compare(e,t)},isBefore:function(e,t){return-1===xe.compare(e,t)},isChild:function(e,t){return e.length===t.length+1&&0===xe.compare(e,t)},isCommon:function(e,t){return e.length<=t.length&&0===xe.compare(e,t)},isDescendant:function(e,t){return e.length>t.length&&0===xe.compare(e,t)},isParent:function(e,t){return e.length+1===t.length&&0===xe.compare(e,t)},isPath:function(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])},isSibling:function(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&xe.equals(n,r)},levels:function(e){for(var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,n=void 0!==t&&t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next:function(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},parent:function(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous:function(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative:function(e,t){if(!xe.isAncestor(t,e)&&!xe.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,(function(t){var o=r.affinity,i=void 0===o?"forward":o;if(e&&0!==(null==e?void 0:e.length)){if(null===t)return null;switch(n.type){case"insert_node":var a=n.path;(xe.equals(a,t)||xe.endsBefore(a,t)||xe.isAncestor(a,t))&&(t[a.length-1]+=1);break;case"remove_node":var s=n.path;if(xe.equals(s,t)||xe.isAncestor(s,t))return null;xe.endsBefore(s,t)&&(t[s.length-1]-=1);break;case"merge_node":var u=n.path,l=n.position;xe.equals(u,t)||xe.endsBefore(u,t)?t[u.length-1]-=1:xe.isAncestor(u,t)&&(t[u.length-1]-=1,t[u.length]+=l);break;case"split_node":var c=n.path,d=n.position;if(xe.equals(c,t)){if("forward"===i)t[t.length-1]+=1;else if("backward"!==i)return null}else xe.endsBefore(c,t)?t[c.length-1]+=1:xe.isAncestor(c,t)&&e[c.length]>=d&&(t[c.length-1]+=1,t[c.length]-=d);break;case"move_node":var f=n.path,p=n.newPath;if(xe.equals(f,p))return;if(xe.isAncestor(f,t)||xe.equals(f,t)){var h=p.slice();return xe.endsBefore(f,p)&&f.length<p.length&&(h[f.length-1]-=1),h.concat(t.slice(f.length))}xe.isSibling(f,p)&&(xe.isAncestor(p,t)||xe.equals(p,t))?xe.endsBefore(f,t)?t[f.length-1]-=1:t[f.length-1]+=1:xe.endsBefore(p,t)||xe.equals(p,t)||xe.isAncestor(p,t)?(xe.endsBefore(f,t)&&(t[f.length-1]-=1),t[p.length-1]+=1):xe.endsBefore(f,t)&&(xe.equals(p,t)&&(t[p.length-1]+=1),t[f.length-1]-=1)}}}))}},Oe={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=xe.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}};function Te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Be={compare:function(e,t){var n=xe.compare(e.path,t.path);return 0===n?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter:function(e,t){return 1===Be.compare(e,t)},isBefore:function(e,t){return-1===Be.compare(e,t)},equals:function(e,t){return e.offset===t.offset&&xe.equals(e.path,t.path)},isPoint:function(t){return e.isPlainObject(t)&&"number"==typeof t.offset&&xe.isPath(t.path)},transform:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,(function(e){if(null===e)return null;var t=r.affinity,o=void 0===t?"forward":t,i=e.path,a=e.offset;switch(n.type){case"insert_node":case"move_node":e.path=xe.transform(i,n,r);break;case"insert_text":xe.equals(n.path,i)&&n.offset<=a&&(e.offset+=n.text.length);break;case"merge_node":xe.equals(n.path,i)&&(e.offset+=n.position),e.path=xe.transform(i,n,r);break;case"remove_text":xe.equals(n.path,i)&&n.offset<=a&&(e.offset-=Math.min(a-n.offset,n.text.length));break;case"remove_node":if(xe.equals(n.path,i)||xe.isAncestor(n.path,i))return null;e.path=xe.transform(i,n,r);break;case"split_node":if(xe.equals(n.path,i)){if(n.position===a&&null==o)return null;(n.position<a||n.position===a&&"forward"===o)&&(e.offset-=n.position,e.path=xe.transform(i,n,Ne(Ne({},r),{},{affinity:"forward"})))}else e.path=xe.transform(i,n,r)}}))}},ke={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=Be.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},Fe=["anchor","focus"];function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ie={edges:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).reverse,n=void 0!==t&&t,r=e.anchor,o=e.focus;return Ie.isBackward(e)===n?[r,o]:[o,r]},end:function(e){var t=Ie.edges(e),n=h(t,2)[1];return n},equals:function(e,t){return Be.equals(e.anchor,t.anchor)&&Be.equals(e.focus,t.focus)},includes:function(e,t){if(Ie.isRange(t)){if(Ie.includes(e,t.anchor)||Ie.includes(e,t.focus))return!0;var n=Ie.edges(e),r=h(n,2),o=r[0],i=r[1],a=Ie.edges(t),s=h(a,2),u=s[0],l=s[1];return Be.isBefore(o,u)&&Be.isAfter(i,l)}var c=Ie.edges(e),d=h(c,2),f=d[0],p=d[1],g=!1,v=!1;return Be.isPoint(t)?(g=Be.compare(t,f)>=0,v=Be.compare(t,p)<=0):(g=xe.compare(t,f.path)>=0,v=xe.compare(t,p.path)<=0),g&&v},intersection:function(e,t){e.anchor,e.focus;var n=N(e,Fe),r=Ie.edges(e),o=h(r,2),i=o[0],a=o[1],s=Ie.edges(t),u=h(s,2),l=u[0],c=u[1],d=Be.isBefore(i,l)?l:i,f=Be.isBefore(a,c)?a:c;return Be.isBefore(f,d)?null:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({anchor:d,focus:f},n)},isBackward:function(e){var t=e.anchor,n=e.focus;return Be.isAfter(t,n)},isCollapsed:function(e){var t=e.anchor,n=e.focus;return Be.equals(t,n)},isExpanded:function(e){return!Ie.isCollapsed(e)},isForward:function(e){return!Ie.isBackward(e)},isRange:function(t){return e.isPlainObject(t)&&Be.isPoint(t.anchor)&&Be.isPoint(t.focus)},points:function*(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start:function(e){var t=Ie.edges(e),n=h(t,1)[0];return n},transform:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.produce(e,(function(e){if(null===e)return null;var t,o,i=r.affinity,a=void 0===i?"inward":i;if("inward"===a){var s=Ie.isCollapsed(e);Ie.isForward(e)?(t="forward",o=s?t:"backward"):(t="backward",o=s?t:"forward")}else"outward"===a?Ie.isForward(e)?(t="backward",o="forward"):(t="forward",o="backward"):(t=a,o=a);var u=Be.transform(e.anchor,n,{affinity:t}),l=Be.transform(e.focus,n,{affinity:o});if(!u||!l)return null;e.anchor=u,e.focus=l}))}},Re={transform:function(e,t){var n=e.current,r=e.affinity;if(null!=n){var o=Ie.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},Le=function t(n,r){for(var o in n){var i=n[o],a=r[o];if(e.isPlainObject(i)&&e.isPlainObject(a)){if(!t(i,a))return!1}else if(Array.isArray(i)&&Array.isArray(a)){if(i.length!==a.length)return!1;for(var s=0;s<i.length;s++)if(i[s]!==a[s])return!1}else if(i!==a)return!1}for(var u in r)if(void 0===n[u]&&void 0!==r[u])return!1;return!0},_e=["text"],Me=["anchor","focus"];function je(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 He(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 He(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 He(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}function ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ze(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ue={equals:function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).loose,r=void 0!==n&&n;function o(e){return e.text,N(e,_e)}return Le(r?o(e):e,r?o(t):t)},isText:function(t){return e.isPlainObject(t)&&"string"==typeof t.text},isTextList:function(e){return Array.isArray(e)&&e.every((function(e){return Ue.isText(e)}))},isTextProps:function(e){return void 0!==e.text},matches:function(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations:function(e,t){var n,r=[$e({},e)],o=je(t);try{for(o.s();!(n=o.n()).done;){var i,a=n.value,s=(a.anchor,a.focus,N(a,Me)),u=Ie.edges(a),l=h(u,2),c=l[0],d=l[1],f=[],p=0,g=je(r);try{for(g.s();!(i=g.n()).done;){var v=i.value,m=v.text.length,y=p;if(p+=m,c.offset<=y&&d.offset>=p)Object.assign(v,s),f.push(v);else if(c.offset!==d.offset&&(c.offset===p||d.offset===y)||c.offset>p||d.offset<y||d.offset===y&&0!==y)f.push(v);else{var b=v,E=void 0,C=void 0;if(d.offset<p){var D=d.offset-y;C=$e($e({},b),{},{text:b.text.slice(D)}),b=$e($e({},b),{},{text:b.text.slice(0,D)})}if(c.offset>y){var w=c.offset-y;E=$e($e({},b),{},{text:b.text.slice(0,w)}),b=$e($e({},b),{},{text:b.text.slice(w)})}Object.assign(b,s),E&&f.push(E),f.push(b),C&&f.push(C)}}}catch(e){g.e(e)}finally{g.f()}r=f}}catch(e){o.e(e)}finally{o.f()}return r}};function Ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ge(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 qe(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 qe(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 qe(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 Ke={transform:function(e,n){e.children=t.createDraft(e.children);var r=e.selection&&t.createDraft(e.selection);try{r=function(e,t,n){switch(n.type){case"insert_node":var r=n.path,o=n.node,i=De.parent(e,r),a=r[r.length-1];if(a>i.children.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));if(i.children.splice(a,0,o),t){var s,u=Ge(Ie.points(t));try{for(u.s();!(s=u.n()).done;){var c=h(s.value,2),d=c[0];t[c[1]]=Be.transform(d,n)}}catch(e){u.e(e)}finally{u.f()}}break;case"insert_text":var f=n.path,p=n.offset,g=n.text;if(0===g.length)break;var v=De.leaf(e,f),m=v.text.slice(0,p),y=v.text.slice(p);if(v.text=m+g+y,t){var b,E=Ge(Ie.points(t));try{for(E.s();!(b=E.n()).done;){var C=h(b.value,2),D=C[0];t[C[1]]=Be.transform(D,n)}}catch(e){E.e(e)}finally{E.f()}}break;case"merge_node":var w=n.path,A=De.get(e,w),S=xe.previous(w),x=De.get(e,S),O=De.parent(e,w),T=w[w.length-1];if(Ue.isText(A)&&Ue.isText(x))x.text+=A.text;else{if(Ue.isText(A)||Ue.isText(x))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(w,"] to nodes of different interfaces: ").concat(A," ").concat(x));var N;(N=x.children).push.apply(N,l(A.children))}if(O.children.splice(T,1),t){var B,k=Ge(Ie.points(t));try{for(k.s();!(B=k.n()).done;){var F=h(B.value,2),P=F[0];t[F[1]]=Be.transform(P,n)}}catch(e){k.e(e)}finally{k.f()}}break;case"move_node":var I=n.path,R=n.newPath;if(xe.isAncestor(I,R))throw new Error("Cannot move a path [".concat(I,"] to new path [").concat(R,"] because the destination is inside itself."));var L=De.get(e,I),_=De.parent(e,I),M=I[I.length-1];_.children.splice(M,1);var j=xe.transform(I,n),H=De.get(e,xe.parent(j)),z=j[j.length-1];if(H.children.splice(z,0,L),t){var $,U=Ge(Ie.points(t));try{for(U.s();!($=U.n()).done;){var V=h($.value,2),W=V[0];t[V[1]]=Be.transform(W,n)}}catch(e){U.e(e)}finally{U.f()}}break;case"remove_node":var G=n.path,q=G[G.length-1];if(De.parent(e,G).children.splice(q,1),t){var K,Y=Ge(Ie.points(t));try{for(Y.s();!(K=Y.n()).done;){var X=h(K.value,2),Z=X[0],J=X[1],Q=Be.transform(Z,n);if(null!=t&&null!=Q)t[J]=Q;else{var ee,te=void 0,ne=void 0,re=Ge(De.texts(e));try{for(re.s();!(ee=re.n()).done;){var oe=h(ee.value,2),ie=oe[0],ae=oe[1];if(-1!==xe.compare(ae,G)){ne=[ie,ae];break}te=[ie,ae]}}catch(e){re.e(e)}finally{re.f()}var se=!1;te&&ne&&(se=xe.equals(ne[1],G)?!xe.hasPrevious(ne[1]):xe.common(te[1],G).length<xe.common(ne[1],G).length),te&&!se?(Z.path=te[1],Z.offset=te[0].text.length):ne?(Z.path=ne[1],Z.offset=0):t=null}}}catch(e){Y.e(e)}finally{Y.f()}}break;case"remove_text":var ue=n.path,le=n.offset,ce=n.text;if(0===ce.length)break;var de=De.leaf(e,ue),fe=de.text.slice(0,le),pe=de.text.slice(le+ce.length);if(de.text=fe+pe,t){var he,ge=Ge(Ie.points(t));try{for(ge.s();!(he=ge.n()).done;){var ve=h(he.value,2),me=ve[0];t[ve[1]]=Be.transform(me,n)}}catch(e){ge.e(e)}finally{ge.f()}}break;case"set_node":var ye=n.path,be=n.properties,Ee=n.newProperties;if(0===ye.length)throw new Error("Cannot set properties on the root node!");var Ce=De.get(e,ye);for(var we in Ee){if("children"===we||"text"===we)throw new Error('Cannot set the "'.concat(we,'" property of nodes!'));var Ae=Ee[we];null==Ae?delete Ce[we]:Ce[we]=Ae}for(var Se in be)Ee.hasOwnProperty(Se)||delete Ce[Se];break;case"set_selection":var Oe=n.newProperties;if(null==Oe)t=Oe;else{if(null==t){if(!Ie.isRange(Oe))throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(JSON.stringify(Oe)," when there is no current selection."));t=We({},Oe)}for(var Te in Oe){var Ne=Oe[Te];if(null==Ne){if("anchor"===Te||"focus"===Te)throw new Error('Cannot remove the "'.concat(Te,'" selection property'));delete t[Te]}else t[Te]=Ne}}break;case"split_node":var ke=n.path,Fe=n.position,Pe=n.properties;if(0===ke.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(ke,"] because the root node cannot be split."));var Re,Le=De.get(e,ke),_e=De.parent(e,ke),Me=ke[ke.length-1];if(Ue.isText(Le)){var je=Le.text.slice(0,Fe),He=Le.text.slice(Fe);Le.text=je,Re=We(We({},Pe),{},{text:He})}else{var ze=Le.children.slice(0,Fe),$e=Le.children.slice(Fe);Le.children=ze,Re=We(We({},Pe),{},{children:$e})}if(_e.children.splice(Me+1,0,Re),t){var Ve,qe=Ge(Ie.points(t));try{for(qe.s();!(Ve=qe.n()).done;){var Ke=h(Ve.value,2),Ye=Ke[0];t[Ke[1]]=Be.transform(Ye,n)}}catch(e){qe.e(e)}finally{qe.f()}}}return t}(e,r,n)}finally{e.children=t.finishDraft(e.children),e.selection=r?t.isDraft(r)?t.finishDraft(r):r:null}}},Ye=["text"],Xe=["children"];function Ze(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ze(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ze(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Qe(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 et(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 et(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 et(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 tt={insertNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.hanging,o=void 0!==r&&r,i=n.voids,a=void 0!==i&&i,s=n.mode,u=void 0===s?"lowest":s,l=n.at,c=n.match,d=n.select;if(De.isNode(t)&&(t=[t]),0!==t.length){var f=h(t,1)[0];if(l||(l=e.selection?e.selection:e.children.length>0?he.end(e,[]):[0],d=!0),null==d&&(d=!1),Ie.isRange(l))if(o||(l=he.unhangRange(e,l)),Ie.isCollapsed(l))l=l.anchor;else{var p=Ie.edges(l),g=h(p,2)[1],v=he.pointRef(e,g);pt.delete(e,{at:l}),l=v.unref()}if(Be.isPoint(l)){null==c&&(c=Ue.isText(f)?function(e){return Ue.isText(e)}:e.isInline(f)?function(t){return Ue.isText(t)||he.isInline(e,t)}:function(t){return he.isBlock(e,t)});var m=he.nodes(e,{at:l.path,match:c,mode:u,voids:a}),y=h(m,1)[0];if(!y)return;var b=h(y,2)[1],E=he.pathRef(e,b),C=he.isEnd(e,l,b);pt.splitNodes(e,{at:l,match:c,mode:u,voids:a});var D=E.unref();l=C?xe.next(D):D}var w=xe.parent(l),A=l[l.length-1];if(a||!he.void(e,{at:w})){var S,x=Qe(t);try{for(x.s();!(S=x.n()).done;){var O=S.value,T=w.concat(A);A++,e.apply({type:"insert_node",path:T,node:O}),l=xe.next(l)}}catch(e){x.e(e)}finally{x.f()}if(l=xe.previous(l),d){var N=he.end(e,l);N&&pt.select(e,N)}}}}))},liftNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.at,r=void 0===n?e.selection:n,o=t.mode,i=void 0===o?"lowest":o,a=t.voids,s=void 0!==a&&a,u=t.match;if(null==u&&(u=xe.isPath(r)?ot(e,r):function(t){return he.isBlock(e,t)}),r)for(var l=he.nodes(e,{at:r,match:u,mode:i,voids:s}),c=Array.from(l,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),d=0,f=c;d<f.length;d++){var p=f[d].unref();if(p.length<2)throw new Error("Cannot lift node at a path [".concat(p,"] because it has a depth of less than `2`."));var g=he.node(e,xe.parent(p)),v=h(g,2),m=v[0],y=v[1],b=p[p.length-1],E=m.children.length;if(1===E){var C=xe.next(y);pt.moveNodes(e,{at:p,to:C,voids:s}),pt.removeNodes(e,{at:y,voids:s})}else if(0===b)pt.moveNodes(e,{at:p,to:y,voids:s});else if(b===E-1){var D=xe.next(y);pt.moveNodes(e,{at:p,to:D,voids:s})}else{var w=xe.next(p),A=xe.next(y);pt.splitNodes(e,{at:w,voids:s}),pt.moveNodes(e,{at:p,to:A,voids:s})}}}))},mergeNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.match,r=t.at,o=void 0===r?e.selection:r,i=t.hanging,a=void 0!==i&&i,s=t.voids,u=void 0!==s&&s,l=t.mode,c=void 0===l?"lowest":l;if(o){if(null==n)if(xe.isPath(o)){var d=he.parent(e,o),f=h(d,1)[0];n=function(e){return f.children.includes(e)}}else n=function(t){return he.isBlock(e,t)};if(!a&&Ie.isRange(o)&&(o=he.unhangRange(e,o)),Ie.isRange(o))if(Ie.isCollapsed(o))o=o.anchor;else{var p=Ie.edges(o),g=h(p,2)[1],v=he.pointRef(e,g);pt.delete(e,{at:o}),o=v.unref(),null==t.at&&pt.select(e,o)}var m=he.nodes(e,{at:o,match:n,voids:u,mode:c}),y=h(m,1)[0],b=he.previous(e,{at:o,match:n,voids:u,mode:c});if(y&&b){var E=h(y,2),C=E[0],D=E[1],w=h(b,2),A=w[0],S=w[1];if(0!==D.length&&0!==S.length){var x,O,T=xe.next(S),B=xe.common(D,S),k=xe.isSibling(D,S),F=Array.from(he.levels(e,{at:D}),(function(e){return h(e,1)[0]})).slice(B.length).slice(0,-1),P=he.above(e,{at:D,mode:"highest",match:function(t){return F.includes(t)&&nt(e,t)}}),I=P&&he.pathRef(e,P[1]);if(Ue.isText(C)&&Ue.isText(A)){C.text;var R=N(C,Ye);O=A.text.length,x=R}else{if(!ae.isElement(C)||!ae.isElement(A))throw new Error("Cannot merge the node at path [".concat(D,"] with the previous sibling because it is not the same kind: ").concat(JSON.stringify(C)," ").concat(JSON.stringify(A)));C.children;var L=N(C,Xe);O=A.children.length,x=L}k||pt.moveNodes(e,{at:D,to:T,voids:u}),I&&pt.removeNodes(e,{at:I.current,voids:u}),ae.isElement(A)&&he.isEmpty(e,A)||Ue.isText(A)&&""===A.text&&0!==S[S.length-1]?pt.removeNodes(e,{at:S,voids:u}):e.apply({type:"merge_node",path:T,position:O,properties:x}),I&&I.unref()}}}}))},moveNodes:function(e,t){he.withoutNormalizing(e,(function(){var n=t.to,r=t.at,o=void 0===r?e.selection:r,i=t.mode,a=void 0===i?"lowest":i,s=t.voids,u=void 0!==s&&s,l=t.match;if(o){null==l&&(l=xe.isPath(o)?ot(e,o):function(t){return he.isBlock(e,t)});for(var c=he.pathRef(e,n),d=he.nodes(e,{at:o,match:l,mode:a,voids:u}),f=Array.from(d,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),p=0,g=f;p<g.length;p++){var v=g[p].unref(),m=c.current;0!==v.length&&e.apply({type:"move_node",path:v,newPath:m}),c.current&&xe.isSibling(m,v)&&xe.isAfter(m,v)&&(c.current=xe.next(c.current))}c.unref()}}))},removeNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.hanging,r=void 0!==n&&n,o=t.voids,i=void 0!==o&&o,a=t.mode,s=void 0===a?"lowest":a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=xe.isPath(l)?ot(e,l):function(t){return he.isBlock(e,t)}),!r&&Ie.isRange(l)&&(l=he.unhangRange(e,l));for(var d=he.nodes(e,{at:l,match:c,mode:s,voids:i}),f=Array.from(d,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),p=0,g=f;p<g.length;p++){var v=g[p].unref();if(v){var m=he.node(e,v),y=h(m,1)[0];e.apply({type:"remove_node",path:v,node:y})}}}}))},setNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.match,o=n.at,i=void 0===o?e.selection:o,a=n.hanging,s=void 0!==a&&a,u=n.mode,l=void 0===u?"lowest":u,c=n.split,d=void 0!==c&&c,f=n.voids,p=void 0!==f&&f;if(i){if(null==r&&(r=xe.isPath(i)?ot(e,i):function(t){return he.isBlock(e,t)}),!s&&Ie.isRange(i)&&(i=he.unhangRange(e,i)),d&&Ie.isRange(i)){if(Ie.isCollapsed(i)&&he.leaf(e,i.anchor)[0].text.length>0)return;var g=he.rangeRef(e,i,{affinity:"inward"}),v=Ie.edges(i),m=h(v,2),y=m[0],b=m[1],E="lowest"===l?"lowest":"highest",C=he.isEnd(e,b,b.path);pt.splitNodes(e,{at:b,match:r,mode:E,voids:p,always:!C});var D=he.isStart(e,y,y.path);pt.splitNodes(e,{at:y,match:r,mode:E,voids:p,always:!D}),i=g.unref(),null==n.at&&pt.select(e,i)}var w,A=Qe(he.nodes(e,{at:i,match:r,mode:l,voids:p}));try{for(A.s();!(w=A.n()).done;){var S=h(w.value,2),x=S[0],O=S[1],T={},N={};if(0!==O.length){var B=!1;for(var k in t)"children"!==k&&"text"!==k&&t[k]!==x[k]&&(B=!0,x.hasOwnProperty(k)&&(T[k]=x[k]),null!=t[k]&&(N[k]=t[k]));B&&e.apply({type:"set_node",path:O,properties:T,newProperties:N})}}}catch(e){A.e(e)}finally{A.f()}}}))},splitNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.mode,r=void 0===n?"lowest":n,o=t.voids,i=void 0!==o&&o,a=t.match,s=t.at,u=void 0===s?e.selection:s,l=t.height,c=void 0===l?0:l,d=t.always,f=void 0!==d&&d;if(null==a&&(a=function(t){return he.isBlock(e,t)}),Ie.isRange(u)&&(u=rt(e,u)),xe.isPath(u)){var p=u,g=he.point(e,p),v=he.parent(e,p),m=h(v,1)[0];a=function(e){return e===m},c=g.path.length-p.length+1,u=g,f=!0}if(u){var y=he.pointRef(e,u,{affinity:"backward"}),b=he.nodes(e,{at:u,match:a,mode:r,voids:i}),E=h(b,1)[0];if(E){var C=he.void(e,{at:u,mode:"highest"});if(!i&&C){var D=h(C,2),w=D[0],A=D[1];if(ae.isElement(w)&&e.isInline(w)){var S=he.after(e,A);if(!S){var x=xe.next(A);pt.insertNodes(e,{text:""},{at:x,voids:i}),S=he.point(e,x)}u=S,f=!0}c=u.path.length-A.length+1,f=!0}var O,T=he.pointRef(e,u),N=u.path.length-c,B=h(E,2)[1],k=u.path.slice(0,N),F=0===c?u.offset:u.path[N]+0,P=Qe(he.levels(e,{at:k,reverse:!0,voids:i}));try{for(P.s();!(O=P.n()).done;){var I=h(O.value,2),R=I[0],L=I[1],_=!1;if(L.length<B.length||0===L.length||!i&&he.isVoid(e,R))break;var M=y.current,j=he.isEnd(e,M,L);if(f||!y||!he.isEdge(e,M,L)){_=!0;var H=De.extractProps(R);e.apply({type:"split_node",path:L,position:F,properties:H})}F=L[L.length-1]+(_||j?1:0)}}catch(e){P.e(e)}finally{P.f()}if(null==t.at){var z=T.current||he.end(e,[]);pt.select(e,z)}y.unref(),T.unref()}}}))},unsetNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var r,o={},i=Qe(t);try{for(i.s();!(r=i.n()).done;){o[r.value]=null}}catch(e){i.e(e)}finally{i.f()}pt.setNodes(e,o,n)},unwrapNodes:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.mode,r=void 0===n?"lowest":n,o=t.split,i=void 0!==o&&o,a=t.voids,s=void 0!==a&&a,u=t.at,l=void 0===u?e.selection:u,c=t.match;if(l){null==c&&(c=xe.isPath(l)?ot(e,l):function(t){return he.isBlock(e,t)}),xe.isPath(l)&&(l=he.range(e,l));var d,f=Ie.isRange(l)?he.rangeRef(e,l):null,p=he.nodes(e,{at:l,match:c,mode:r,voids:s}),g=Array.from(p,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})).reverse(),v=Qe(g);try{var m=function(){var t=d.value.unref(),n=he.node(e,t),r=h(n,1)[0],o=he.range(e,t);i&&f&&(o=Ie.intersection(f.current,o)),pt.liftNodes(e,{at:o,match:function(e){return ae.isAncestor(r)&&r.children.includes(e)},voids:s})};for(v.s();!(d=v.n()).done;)m()}catch(e){v.e(e)}finally{v.f()}f&&f.unref()}}))},wrapNodes:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.mode,o=void 0===r?"lowest":r,i=n.split,a=void 0!==i&&i,s=n.voids,u=void 0!==s&&s,l=n.match,c=n.at,d=void 0===c?e.selection:c;if(d){if(null==l&&(l=xe.isPath(d)?ot(e,d):e.isInline(t)?function(t){return he.isInline(e,t)||Ue.isText(t)}:function(t){return he.isBlock(e,t)}),a&&Ie.isRange(d)){var f=Ie.edges(d),p=h(f,2),g=p[0],v=p[1],m=he.rangeRef(e,d,{affinity:"inward"});pt.splitNodes(e,{at:v,match:l,voids:u}),pt.splitNodes(e,{at:g,match:l,voids:u}),d=m.unref(),null==n.at&&pt.select(e,d)}for(var y=Array.from(he.nodes(e,{at:d,match:e.isInline(t)?function(t){return he.isBlock(e,t)}:function(e){return he.isEditor(e)},mode:"lowest",voids:u})),b=0,E=y;b<E.length;b++){var C=h(E[b],2)[1],D=Ie.isRange(d)?Ie.intersection(d,he.range(e,C)):d;if(D){var w=Array.from(he.nodes(e,{at:D,match:l,mode:o,voids:u}));if(w.length>0){var A=function(){var n=h(w,1)[0],r=w[w.length-1],o=h(n,2)[1],i=h(r,2)[1];if(0===o.length&&0===i.length)return"continue";var a=xe.equals(o,i)?xe.parent(o):xe.common(o,i),s=he.range(e,o,i),l=he.node(e,a),c=h(l,1)[0],d=a.length+1,f=xe.next(i.slice(0,d)),p=Je(Je({},t),{},{children:[]});pt.insertNodes(e,p,{at:f,voids:u}),pt.moveNodes(e,{at:s,match:function(e){return ae.isAncestor(c)&&c.children.includes(e)},to:f.concat(0),voids:u})}();if("continue"===A)continue}}}}}))}},nt=function e(t,n){if(ae.isElement(n)){var r=n;return!!he.isVoid(t,n)||1===r.children.length&&e(t,r.children[0])}return!he.isEditor(n)},rt=function(e,t){if(Ie.isCollapsed(t))return t.anchor;var n=Ie.edges(t),r=h(n,2)[1],o=he.pointRef(e,r);return pt.delete(e,{at:t}),o.unref()},ot=function(e,t){var n=he.node(e,t),r=h(n,1)[0];return function(e){return e===r}};function it(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function at(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?it(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var st={collapse:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).edge,n=void 0===t?"anchor":t,r=e.selection;if(r)if("anchor"===n)pt.select(e,r.anchor);else if("focus"===n)pt.select(e,r.focus);else if("start"===n){var o=Ie.edges(r),i=h(o,1)[0];pt.select(e,i)}else if("end"===n){var a=Ie.edges(r),s=h(a,2)[1];pt.select(e,s)}},deselect:function(e){var t=e.selection;t&&e.apply({type:"set_selection",properties:t,newProperties:null})},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.selection,r=t.distance,o=void 0===r?1:r,i=t.unit,a=void 0===i?"character":i,s=t.reverse,u=void 0!==s&&s,l=t.edge,c=void 0===l?null:l;if(n){"start"===c&&(c=Ie.isBackward(n)?"focus":"anchor"),"end"===c&&(c=Ie.isBackward(n)?"anchor":"focus");var d=n.anchor,f=n.focus,p={distance:o,unit:a},h={};if(null==c||"anchor"===c){var g=u?he.before(e,d,p):he.after(e,d,p);g&&(h.anchor=g)}if(null==c||"focus"===c){var v=u?he.before(e,f,p):he.after(e,f,p);v&&(h.focus=v)}pt.setSelection(e,h)}},select:function(e,t){var n=e.selection;if(t=he.range(e,t),n)pt.setSelection(e,t);else{if(!Ie.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(JSON.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}},setPoint:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.selection,o=n.edge,i=void 0===o?"both":o;if(r){"start"===i&&(i=Ie.isBackward(r)?"focus":"anchor"),"end"===i&&(i=Ie.isBackward(r)?"anchor":"focus");var a=r.anchor,s=r.focus,u="anchor"===i?a:s;pt.setSelection(e,g({},"anchor"===i?"anchor":"focus",at(at({},u),t)))}},setSelection:function(e,t){var n=e.selection,r={},o={};if(n){for(var i in t)("anchor"===i&&null!=t.anchor&&!Be.equals(t.anchor,n.anchor)||"focus"===i&&null!=t.focus&&!Be.equals(t.focus,n.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==n[i])&&(r[i]=n[i],o[i]=t[i]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:o})}}};function ut(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 lt(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 lt(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 lt(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 ct={delete:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};he.withoutNormalizing(e,(function(){var n=t.reverse,r=void 0!==n&&n,o=t.unit,i=void 0===o?"character":o,a=t.distance,s=void 0===a?1:a,u=t.voids,l=void 0!==u&&u,c=t.at,d=void 0===c?e.selection:c,f=t.hanging,p=void 0!==f&&f;if(d){if(Ie.isRange(d)&&Ie.isCollapsed(d)&&(d=d.anchor),Be.isPoint(d)){var g=he.void(e,{at:d,mode:"highest"});if(!l&&g){d=h(g,2)[1]}else{var v={unit:i,distance:s};d={anchor:d,focus:r?he.before(e,d,v)||he.start(e,[]):he.after(e,d,v)||he.end(e,[])},p=!0}}if(xe.isPath(d))pt.removeNodes(e,{at:d,voids:l});else if(!Ie.isCollapsed(d)){if(!p){var m=Ie.edges(d),y=h(m,2)[1],b=he.end(e,[]);Be.equals(y,b)||(d=he.unhangRange(e,d,{voids:l}))}var E=Ie.edges(d),C=h(E,2),D=C[0],w=C[1],A=he.above(e,{match:function(t){return he.isBlock(e,t)},at:D,voids:l}),S=he.above(e,{match:function(t){return he.isBlock(e,t)},at:w,voids:l}),x=A&&S&&!xe.equals(A[1],S[1]),O=xe.equals(D.path,w.path),T=l?null:he.void(e,{at:D,mode:"highest"}),N=l?null:he.void(e,{at:w,mode:"highest"});if(T){var B=he.before(e,D);B&&A&&xe.isAncestor(A[1],B.path)&&(D=B)}if(N){var k=he.after(e,w);k&&S&&xe.isAncestor(S[1],k.path)&&(w=k)}var F,P,I=[],R=ut(he.nodes(e,{at:d,voids:l}));try{for(R.s();!(P=R.n()).done;){var L=P.value,_=h(L,2),M=_[0],j=_[1];F&&0===xe.compare(j,F)||(!l&&he.isVoid(e,M)||!xe.isCommon(j,D.path)&&!xe.isCommon(j,w.path))&&(I.push(L),F=j)}}catch(e){R.e(e)}finally{R.f()}var H=Array.from(I,(function(t){var n=h(t,2)[1];return he.pathRef(e,n)})),z=he.pointRef(e,D),$=he.pointRef(e,w);if(!O&&!T){var U=z.current,V=he.leaf(e,U),W=h(V,1)[0],G=U.path,q=D.offset,K=W.text.slice(q);K.length>0&&e.apply({type:"remove_text",path:G,offset:q,text:K})}for(var Y=0,X=H;Y<X.length;Y++){var Z=X[Y].unref();pt.removeNodes(e,{at:Z,voids:l})}if(!N){var J=$.current,Q=he.leaf(e,J),ee=h(Q,1)[0],te=J.path,ne=O?D.offset:0,re=ee.text.slice(ne,w.offset);re.length>0&&e.apply({type:"remove_text",path:te,offset:ne,text:re})}!O&&x&&$.current&&z.current&&pt.mergeNodes(e,{at:$.current,hanging:!0,voids:l});var oe=r?z.unref()||$.unref():$.unref()||z.unref();null==t.at&&oe&&pt.select(e,oe)}}}))},insertFragment:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.hanging,o=void 0!==r&&r,i=n.voids,a=void 0!==i&&i,s=n.at,u=void 0===s?e.selection:s;if(t.length&&u){if(Ie.isRange(u))if(o||(u=he.unhangRange(e,u)),Ie.isCollapsed(u))u=u.anchor;else{var l=Ie.edges(u),c=h(l,2)[1];if(!a&&he.void(e,{at:c}))return;var d=he.pointRef(e,c);pt.delete(e,{at:u}),u=d.unref()}else xe.isPath(u)&&(u=he.start(e,u));if(a||!he.void(e,{at:u})){var f=he.above(e,{at:u,match:function(t){return he.isInline(e,t)},mode:"highest",voids:a});if(f){var p=h(f,2)[1];if(he.isEnd(e,u,p))u=he.after(e,p);else if(he.isStart(e,u,p)){u=he.before(e,p)}}var g,v=he.above(e,{match:function(t){return he.isBlock(e,t)},at:u,voids:a}),m=h(v,2)[1],y=he.isStart(e,u,m),b=he.isEnd(e,u,m),E=y&&b,C=!y||y&&b,D=!b,w=De.first({children:t},[]),A=h(w,2)[1],S=De.last({children:t},[]),x=h(S,2)[1],O=[],T=function(t){var n=h(t,2),r=n[0],o=n[1];return!(0===o.length)&&(!!E||!(C&&xe.isAncestor(o,A)&&ae.isElement(r)&&!e.isVoid(r)&&!e.isInline(r))&&!(D&&xe.isAncestor(o,x)&&ae.isElement(r)&&!e.isVoid(r)&&!e.isInline(r)))},N=ut(De.nodes({children:t},{pass:T}));try{for(N.s();!(g=N.n()).done;){var B=g.value;T(B)&&O.push(B)}}catch(e){N.e(e)}finally{N.f()}for(var k=[],F=[],P=[],I=!0,R=!1,L=0,_=O;L<_.length;L++){var M=h(_[L],1)[0];ae.isElement(M)&&!e.isInline(M)?(I=!1,R=!0,F.push(M)):I?k.push(M):P.push(M)}var j=he.nodes(e,{at:u,match:function(t){return Ue.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),H=h(j,1)[0],z=h(H,2)[1],$=he.isStart(e,u,z),U=he.isEnd(e,u,z),V=he.pathRef(e,b?xe.next(m):m),W=he.pathRef(e,U?xe.next(z):z),G=he.pathRef(e,m);pt.splitNodes(e,{at:u,match:function(t){return R?he.isBlock(e,t):Ue.isText(t)||he.isInline(e,t)},mode:R?"lowest":"highest",voids:a});var q=he.pathRef(e,!$||$&&U?xe.next(z):z);if(pt.insertNodes(e,k,{at:q.current,match:function(t){return Ue.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),E&&F.length&&pt.delete(e,{at:G.unref(),voids:a}),pt.insertNodes(e,F,{at:V.current,match:function(t){return he.isBlock(e,t)},mode:"lowest",voids:a}),pt.insertNodes(e,P,{at:W.current,match:function(t){return Ue.isText(t)||he.isInline(e,t)},mode:"highest",voids:a}),!n.at){var K;K=P.length>0?xe.previous(W.current):F.length>0?xe.previous(V.current):xe.previous(q.current);var Y=he.end(e,K);pt.select(e,Y)}q.unref(),V.unref(),W.unref()}}}))},insertText:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};he.withoutNormalizing(e,(function(){var r=n.voids,o=void 0!==r&&r,i=n.at,a=void 0===i?e.selection:i;if(a){if(xe.isPath(a)&&(a=he.range(e,a)),Ie.isRange(a))if(Ie.isCollapsed(a))a=a.anchor;else{var s=Ie.end(a);if(!o&&he.void(e,{at:s}))return;var u=he.pointRef(e,s);pt.delete(e,{at:a,voids:o}),a=u.unref(),pt.setSelection(e,{anchor:a,focus:a})}if(o||!he.void(e,{at:a})){var l=a,c=l.path,d=l.offset;t.length>0&&e.apply({type:"insert_text",path:c,offset:d,text:t})}}}))}};function dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ft(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dt(Object(n),!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pt=ft(ft(ft(ft({},Ke),tt),st),ct);return Kf.Editor=he,Kf.Element=ae,Kf.Location=ge,Kf.Node=De,Kf.Operation=Se,Kf.Path=xe,Kf.PathRef=Oe,Kf.Point=Be,Kf.PointRef=ke,Kf.Range=Ie,Kf.RangeRef=Re,Kf.Span=ve,Kf.Text=Ue,Kf.Transforms=pt,Kf.createEditor=function(){var e={children:[],operations:[],selection:null,marks:null,isInline:function(){return!1},isVoid:function(){return!1},onChange:function(){},apply:function(t){var n,r=A(he.pathRefs(e));try{for(r.s();!(n=r.n()).done;){var o=n.value;Oe.transform(o,t)}}catch(e){r.e(e)}finally{r.f()}var i,a=A(he.pointRefs(e));try{for(a.s();!(i=a.n()).done;){var s=i.value;ke.transform(s,t)}}catch(e){a.e(e)}finally{a.f()}var u,l=A(he.rangeRefs(e));try{for(l.s();!(u=l.n()).done;){var c=u.value;Re.transform(c,t)}}catch(e){l.e(e)}finally{l.f()}var d,f=new Set,p=[],h=function(e){if(e){var t=e.join(",");f.has(t)||(f.add(t),p.push(e))}},g=v.get(e)||[],y=x(t),b=A(g);try{for(b.s();!(d=b.n()).done;){var E=d.value;h(xe.transform(E,t))}}catch(e){b.e(e)}finally{b.f()}var C,D=A(y);try{for(D.s();!(C=D.n()).done;){h(C.value)}}catch(e){D.e(e)}finally{D.f()}v.set(e,p),pt.transform(e,t),e.operations.push(t),he.normalize(e),"set_selection"===t.type&&(e.marks=null),m.get(e)||(m.set(e,!0),Promise.resolve().then((function(){m.set(e,!1),e.onChange(),e.operations=[]})))},addMark:function(t,n){var r=e.selection;if(r)if(Ie.isExpanded(r))pt.setNodes(e,g({},t,n),{match:Ue.isText,split:!0});else{var o=w(w({},he.marks(e)||{}),{},g({},t,n));e.marks=o,m.get(e)||e.onChange()}},deleteBackward:function(t){var n=e.selection;n&&Ie.isCollapsed(n)&&pt.delete(e,{unit:t,reverse:!0})},deleteForward:function(t){var n=e.selection;n&&Ie.isCollapsed(n)&&pt.delete(e,{unit:t})},deleteFragment:function(t){var n=e.selection;n&&Ie.isExpanded(n)&&pt.delete(e,{reverse:"backward"===t})},getFragment:function(){var t=e.selection;return t?De.fragment(e,t):[]},insertBreak:function(){pt.splitNodes(e,{always:!0})},insertFragment:function(t){pt.insertFragment(e,t)},insertNode:function(t){pt.insertNodes(e,t)},insertText:function(t){var n=e.selection,r=e.marks;if(n){if(r){var o=w({text:t},r);pt.insertNodes(e,o)}else pt.insertText(e,t);e.marks=null}},normalizeNode:function(t){var n=h(t,2),r=n[0],o=n[1];if(!Ue.isText(r))if(ae.isElement(r)&&0===r.children.length){pt.insertNodes(e,{text:""},{at:o.concat(0),voids:!0})}else for(var i=!he.isEditor(r)&&(ae.isElement(r)&&(e.isInline(r)||0===r.children.length||Ue.isText(r.children[0])||e.isInline(r.children[0]))),a=0,s=0;s<r.children.length;s++,a++){var u=De.get(e,o);if(!Ue.isText(u)){var l=r.children[s],c=u.children[a-1],d=s===r.children.length-1;if((Ue.isText(l)||ae.isElement(l)&&e.isInline(l))!==i)pt.removeNodes(e,{at:o.concat(a),voids:!0}),a--;else if(ae.isElement(l)){if(e.isInline(l))if(null!=c&&Ue.isText(c)){if(d){pt.insertNodes(e,{text:""},{at:o.concat(a+1),voids:!0}),a++}}else{pt.insertNodes(e,{text:""},{at:o.concat(a),voids:!0}),a++}}else null!=c&&Ue.isText(c)&&(Ue.equals(l,c,{loose:!0})?(pt.mergeNodes(e,{at:o.concat(a),voids:!0}),a--):""===c.text?(pt.removeNodes(e,{at:o.concat(a-1),voids:!0}),a--):""===l.text&&(pt.removeNodes(e,{at:o.concat(a),voids:!0}),a--))}}},removeMark:function(t){var n=e.selection;if(n)if(Ie.isExpanded(n))pt.unsetNodes(e,t,{match:Ue.isText,split:!0});else{var r=w({},he.marks(e)||{});delete r[t],e.marks=r,m.get(e)||e.onChange()}}};return e},Kf}var ip,ap=op(),sp={};function up(){if(ip)return sp;ip=1;var e=Xf(),t=op(),n={isHistory:function(n){return e.isPlainObject(n)&&Array.isArray(n.redos)&&Array.isArray(n.undos)&&(0===n.redos.length||t.Operation.isOperationList(n.redos[0].operations))&&(0===n.undos.length||t.Operation.isOperationList(n.undos[0].operations))}},r=new WeakMap,o=new WeakMap,i=new WeakMap,a={isHistoryEditor:function(e){return n.isHistory(e.history)&&t.Editor.isEditor(e)},isMerging:function(e){return i.get(e)},isSaving:function(e){return o.get(e)},redo:function(e){e.redo()},undo:function(e){e.undo()},withMerging:function(e,t){var n=a.isMerging(e);i.set(e,!0),t(),i.set(e,n)},withoutMerging:function(e,t){var n=a.isMerging(e);i.set(e,!1),t(),i.set(e,n)},withoutSaving:function(e,t){var n=a.isSaving(e);o.set(e,!1),t(),o.set(e,n)}};function s(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 u(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 u(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 u(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 l=function(e,n){return!(!n||"insert_text"!==e.type||"insert_text"!==n.type||e.offset!==n.offset+n.text.length||!t.Path.equals(e.path,n.path))||!(!n||"remove_text"!==e.type||"remove_text"!==n.type||e.offset+e.text.length!==n.offset||!t.Path.equals(e.path,n.path))},c=function(e,t){return"set_selection"!==e.type};return sp.HISTORY=r,sp.History=n,sp.HistoryEditor=a,sp.MERGING=i,sp.SAVING=o,sp.withHistory=function(e){var n=e,r=n.apply;return n.history={undos:[],redos:[]},n.redo=function(){var e=n.history,r=e.redos;if(r.length>0){var o=r[r.length-1];o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore),a.withoutSaving(n,(function(){t.Editor.withoutNormalizing(n,(function(){var e,t=s(o.operations);try{for(t.s();!(e=t.n()).done;){var r=e.value;n.apply(r)}}catch(e){t.e(e)}finally{t.f()}}))})),e.redos.pop(),n.writeHistory("undos",o)}},n.undo=function(){var e=n.history,r=e.undos;if(r.length>0){var o=r[r.length-1];a.withoutSaving(n,(function(){t.Editor.withoutNormalizing(n,(function(){var e,r=s(o.operations.map(t.Operation.inverse).reverse());try{for(r.s();!(e=r.n()).done;){var i=e.value;n.apply(i)}}catch(e){r.e(e)}finally{r.f()}o.selectionBefore&&t.Transforms.setSelection(n,o.selectionBefore)}))})),n.writeHistory("redos",o),e.undos.pop()}},n.apply=function(e){var t=n.operations,o=n.history,i=o.undos,s=i[i.length-1],u=s&&s.operations[s.operations.length-1],d=a.isSaving(n),f=a.isMerging(n);if(null==d&&(d=c(e)),d){if(null==f&&(f=null!=s&&(0!==t.length||l(e,u))),s&&f)s.operations.push(e);else{var p={operations:[e],selectionBefore:n.selection};n.writeHistory("undos",p)}for(;i.length>100;)i.shift();o.redos=[]}r(e)},n.writeHistory=function(e,t){n.history[e].push(t)},n},sp}var lp=up(),cp=function(e,t){return cp=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])},cp(e,t)};function dp(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}cp(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var fp=function(){return fp=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},fp.apply(this,arguments)};function pp(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function hp(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function gp(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 vp(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 mp(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 yp(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=gp(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;var bp,Ep={exports:{}};var Cp,Dp,wp=(bp||(bp=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",s="[object Function]",u="[object GeneratorFunction]",l="[object Map]",c="[object Number]",d="[object Object]",f="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",y="[object ArrayBuffer]",E="[object DataView]",C="[object Float32Array]",D="[object Float64Array]",w="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",x="[object Uint8Array]",O="[object Uint8ClampedArray]",T="[object Uint16Array]",N="[object Uint32Array]",B=/\w*$/,k=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,P={};P[o]=P["[object Array]"]=P[y]=P[E]=P[i]=P[a]=P[C]=P[D]=P[w]=P[A]=P[S]=P[l]=P[c]=P[d]=P[p]=P[h]=P[g]=P[v]=P[x]=P[O]=P[T]=P[N]=!0,P["[object Error]"]=P[s]=P[m]=!1;var I="object"==typeof b&&b&&b.Object===Object&&b,R="object"==typeof self&&self&&self.Object===Object&&self,L=I||R||Function("return this")(),_=t&&!t.nodeType&&t,M=_&&e&&!e.nodeType&&e,j=M&&M.exports===_;function H(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function $(e,t,n,r){for(var o=-1,i=e?e.length:0;++o<i;)n=t(n,e[o],o,e);return n}function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function W(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var q=Array.prototype,K=Function.prototype,Y=Object.prototype,X=L["__core-js_shared__"],Z=function(){var e=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=K.toString,Q=Y.hasOwnProperty,ee=Y.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=j?L.Buffer:void 0,re=L.Symbol,oe=L.Uint8Array,ie=W(Object.getPrototypeOf,Object),ae=Object.create,se=Y.propertyIsEnumerable,ue=q.splice,le=Object.getOwnPropertySymbols,ce=ne?ne.isBuffer:void 0,de=W(Object.keys,Object),fe=_e(L,"DataView"),pe=_e(L,"Map"),he=_e(L,"Promise"),ge=_e(L,"Set"),ve=_e(L,"WeakMap"),me=_e(Object,"create"),ye=$e(fe),be=$e(pe),Ee=$e(he),Ce=$e(ge),De=$e(ve),we=re?re.prototype:void 0,Ae=we?we.valueOf:void 0;function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){this.__data__=new xe(e)}function Ne(e,t){var n=Ve(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&We(e)}(e)&&Q.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!Q.call(e,a)||i&&("length"==a||He(a,r))||n.push(a);return n}function Be(e,t,n){var r=e[t];Q.call(e,t)&&Ue(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function ke(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function Fe(e,t,n,r,f,m,b){var k;if(r&&(k=m?r(e,f,m,b):r(e)),void 0!==k)return k;if(!Ke(e))return e;var F=Ve(e);if(F){if(k=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Q.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,k)}else{var I=je(e),R=I==s||I==u;if(Ge(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(I==d||I==o||R&&!m){if(U(e))return m?e:{};if(k=function(e){return"function"!=typeof e.constructor||ze(e)?{}:Ke(t=ie(e))?ae(t):{};var t}(R?{}:e),!t)return function(e,t){return Re(e,Me(e),t)}(e,function(e,t){return e&&Re(t,Ye(t),e)}(k,e))}else{if(!P[I])return m?e:{};k=function(e,t,n,r){var o=e.constructor;switch(t){case y:return Ie(e);case i:case a:return new o(+e);case E:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case C:case D:case w:case A:case S:case x:case O:case T:case N:return function(e,t){var n=t?Ie(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case l:return function(e,t,n){var r=t?n(V(e),!0):V(e);return $(r,H,new e.constructor)}(e,r,n);case c:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,B.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(G(e),!0):G(e);return $(r,z,new e.constructor)}(e,r,n);case v:return function(e){return Ae?Object(Ae.call(e)):{}}(e)}}(e,I,Fe,t)}}b||(b=new Te);var L=b.get(e);if(L)return L;if(b.set(e,k),!F)var _=n?function(e){return function(e,t,n){var r=t(e);return Ve(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ye,Me)}(e):Ye(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(_||e,(function(o,i){_&&(o=e[i=o]),Be(k,i,Fe(o,t,n,r,i,e,b))})),k}function Pe(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(qe(e)||U(e)?te:k).test($e(e));var t}function Ie(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Re(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o];Be(n,a,e[a])}return n}function Le(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function _e(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Pe(n)?n:void 0}Se.prototype.clear=function(){this.__data__=me?me(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return Q.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0||(n==t.length-1?t.pop():ue.call(t,n,1),0))},xe.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return ke(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},Oe.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||xe),string:new Se}},Oe.prototype.delete=function(e){return Le(this,e).delete(e)},Oe.prototype.get=function(e){return Le(this,e).get(e)},Oe.prototype.has=function(e){return Le(this,e).has(e)},Oe.prototype.set=function(e,t){return Le(this,e).set(e,t),this},Te.prototype.clear=function(){this.__data__=new xe},Te.prototype.delete=function(e){return this.__data__.delete(e)},Te.prototype.get=function(e){return this.__data__.get(e)},Te.prototype.has=function(e){return this.__data__.has(e)},Te.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new Oe(r)}return n.set(e,t),this};var Me=le?W(le,Object):function(){return[]},je=function(e){return ee.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||F.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function $e(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(fe&&je(new fe(new ArrayBuffer(1)))!=E||pe&&je(new pe)!=l||he&&je(he.resolve())!=f||ge&&je(new ge)!=h||ve&&je(new ve)!=m)&&(je=function(e){var t=ee.call(e),n=t==d?e.constructor:void 0,r=n?$e(n):void 0;if(r)switch(r){case ye:return E;case be:return l;case Ee:return f;case Ce:return h;case De:return m}return t});var Ve=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!qe(e)}var Ge=ce||function(){return!1};function qe(e){var t=Ke(e)?ee.call(e):"";return t==s||t==u}function Ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return We(e)?Ne(e):function(e){if(!ze(e))return de(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Fe(e,!0,!0)}}(Ep,Ep.exports)),Ep.exports),Ap=E(wp);var Sp=function(){if(Dp)return Cp;Dp=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var a,s,u=Object.prototype,l=u.hasOwnProperty,c=u.toString,d=u.propertyIsEnumerable,f=(a=Object.keys,s=Object,function(e){return a(s(e))});function p(e,n){var r=b(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&E(e)}(e)&&l.call(e,"callee")&&(!d.call(e,"callee")||c.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!l.call(e,a)||i&&("length"==a||y(a,o))||r.push(a);return r}var h,g=(h=function(e,t){return e&&v(e,t,C)},function(e,t){if(null==e)return e;if(!E(e))return h(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),v=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function m(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||u,t!==r)return f(e);var t,n,r,o=[];for(var i in Object(e))l.call(e,i)&&"constructor"!=i&&o.push(i);return o}function y(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<n}var b=Array.isArray;function E(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==n||t==r}(t)}function C(e){return E(e)?p(e):m(e)}function D(e){return e}return Cp=function(e,t){return(b(e)?i:g)(e,"function"==typeof t?t:D)}}(),xp=E(Sp),Op={};var Tp={CREATED:"created",DESTROYED:"destroyed",CHANGE:"change",SCROLL:"scroll",FULLSCREEN:"fullscreen",UNFULLSCREEN:"unFullScreen"},Np={};function Bp(e,t){var n=e.key,r=e.factory,o=e.config,i=fp(fp({},o),t||{});if(null!=Np[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));Np[n]=r,function(e,t){null!=t&&(Op[e]=t)}(n,i)}var kp,Fp,Pp=new WeakMap,Ip=new WeakMap,Rp=new WeakMap,Lp=new WeakMap,_p=new WeakMap,Mp=new WeakMap,jp=new WeakMap,Hp=new WeakMap,zp=new WeakMap,$p=new WeakMap,Up=new WeakMap,Vp=new WeakMap,Wp=new WeakMap,Gp=new WeakMap,qp=new WeakMap,Kp=new WeakMap,Yp=new WeakMap,Xp=new WeakMap,Zp=new WeakMap,Jp=new WeakMap,Qp=new WeakMap,eh=new WeakMap,th=new WeakMap,nh=new WeakMap,rh=new WeakMap,oh=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in Np)e.push(t);return e},t.getConfig=function(){var e=$p.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},ih=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),ah={},sh={exports:{}};sh.exports;function uh(){return kp||(kp=1,function(e,t){!function(e){function t(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function n(e,r){void 0===e&&(e={}),void 0===r&&(r={}),Object.keys(r).forEach((function(o){void 0===e[o]?e[o]=r[o]:t(r[o])&&t(e[o])&&Object.keys(r[o]).length>0&&n(e[o],r[o])}))}var r={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function o(){var e="undefined"!=typeof document?document:{};return n(e,r),e}var i={document:r,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}},requestAnimationFrame:function(e){return"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0)},cancelAnimationFrame:function(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function a(){var e="undefined"!=typeof window?window:{};return n(e,i),e}e.extend=n,e.getDocument=o,e.getWindow=a,e.ssrDocument=r,e.ssrWindow=i,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,sh.exports)),sh.exports}function lh(){if(Fp)return ah;Fp=1,Object.defineProperty(ah,"__esModule",{value:!0});var e=uh();function t(e){return t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(e)}function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}function r(e,t,o){return r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return r&&n(i,r.prototype),i},r.apply(null,arguments)}function o(e){var i="function"==typeof Map?new Map:void 0;return o=function(e){if(null===e||(o=e,-1===Function.toString.call(o).indexOf("[native code]")))return e;var o;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==i){if(i.has(e))return i.get(e);i.set(e,a)}function a(){return r(e,arguments,t(this).constructor)}return a.prototype=Object.create(e.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),n(a,e)},o(e)}var i=function(e){var t,n;function r(t){var n,r,o;return n=e.call.apply(e,[this].concat(t))||this,r=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n),o=r.__proto__,Object.defineProperty(r,"__proto__",{get:function(){return o},set:function(e){o.__proto__=e}}),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(o(Array));function a(e){void 0===e&&(e=[]);var t=[];return e.forEach((function(e){Array.isArray(e)?t.push.apply(t,a(e)):t.push(e)})),t}function s(e,t){return Array.prototype.filter.call(e,t)}function u(t,n){var r=e.getWindow(),o=e.getDocument(),a=[];if(!n&&t instanceof i)return t;if(!t)return new i(a);if("string"==typeof t){var s=t.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){var u="div";0===s.indexOf("<li")&&(u="ul"),0===s.indexOf("<tr")&&(u="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(u="tr"),0===s.indexOf("<tbody")&&(u="table"),0===s.indexOf("<option")&&(u="select");var l=o.createElement(u);l.innerHTML=s;for(var c=0;c<l.childNodes.length;c+=1)a.push(l.childNodes[c])}else a=function(e,t){if("string"!=typeof e)return[e];for(var n=[],r=t.querySelectorAll(e),o=0;o<r.length;o+=1)n.push(r[o]);return n}(t.trim(),n||o)}else if(t.nodeType||t===r||t===o)a.push(t);else if(Array.isArray(t)){if(t instanceof i)return t;a=t}return new i(function(e){for(var t=[],n=0;n<e.length;n+=1)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(a))}u.fn=i.prototype;var l="resize scroll".split(" ");function c(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(void 0===n[0]){for(var o=0;o<this.length;o+=1)l.indexOf(e)<0&&(e in this[o]?this[o][e]():u(this[o]).trigger(e));return this}return this.on.apply(this,[e].concat(n))}}var d=c("click"),f=c("blur"),p=c("focus"),h=c("focusin"),g=c("focusout"),v=c("keyup"),m=c("keydown"),y=c("keypress"),b=c("submit"),E=c("change"),C=c("mousedown"),D=c("mousemove"),w=c("mouseup"),A=c("mouseenter"),S=c("mouseleave"),x=c("mouseout"),O=c("mouseover"),T=c("touchstart"),N=c("touchend"),B=c("touchmove"),k=c("resize"),F=c("scroll");return ah.$=u,ah.add=function(){for(var e,t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(e=0;e<r.length;e+=1){var i=u(r[e]);for(t=0;t<i.length;t+=1)this.push(i[t])}return this},ah.addClass=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a(t.map((function(e){return e.split(" ")})));return this.forEach((function(e){var t;(t=e.classList).add.apply(t,r)})),this},ah.animate=function(t,n){var r,o=e.getWindow(),i=this,a={props:Object.assign({},t),params:Object.assign({duration:300,easing:"swing"},n),elements:i,animating:!1,que:[],easingProgress:function(e,t){return"swing"===e?.5-Math.cos(t*Math.PI)/2:"function"==typeof e?e(t):t},stop:function(){a.frameId&&o.cancelAnimationFrame(a.frameId),a.animating=!1,a.elements.each((function(e){delete e.dom7AnimateInstance})),a.que=[]},done:function(e){if(a.animating=!1,a.elements.each((function(e){delete e.dom7AnimateInstance})),e&&e(i),a.que.length>0){var t=a.que.shift();a.animate(t[0],t[1])}},animate:function(e,t){if(a.animating)return a.que.push([e,t]),a;var n=[];a.elements.each((function(t,r){var i,s,u,l,c;t.dom7AnimateInstance||(a.elements[r].dom7AnimateInstance=a),n[r]={container:t},Object.keys(e).forEach((function(a){i=o.getComputedStyle(t,null).getPropertyValue(a).replace(",","."),s=parseFloat(i),u=i.replace(s,""),l=parseFloat(e[a]),c=e[a]+u,n[r][a]={initialFullValue:i,initialValue:s,unit:u,finalValue:l,finalFullValue:c,currentValue:s}}))}));var r,s,u=null,l=0,c=0,d=!1;return a.animating=!0,a.frameId=o.requestAnimationFrame((function f(){var p,h;r=(new Date).getTime(),d||(d=!0,t.begin&&t.begin(i)),null===u&&(u=r),t.progress&&t.progress(i,Math.max(Math.min((r-u)/t.duration,1),0),u+t.duration-r<0?0:u+t.duration-r,u),n.forEach((function(o){var i=o;s||i.done||Object.keys(e).forEach((function(o){if(!s&&!i.done){p=Math.max(Math.min((r-u)/t.duration,1),0),h=a.easingProgress(t.easing,p);var d=i[o],f=d.initialValue,g=d.finalValue,v=d.unit;i[o].currentValue=f+h*(g-f);var m=i[o].currentValue;(g>f&&m>=g||g<f&&m<=g)&&(i.container.style[o]=g+v,(c+=1)===Object.keys(e).length&&(i.done=!0,l+=1),l===n.length&&(s=!0)),s?a.done(t.complete):i.container.style[o]=m+v}}))})),s||(a.frameId=o.requestAnimationFrame(f))})),a}};if(0===a.elements.length)return i;for(var s=0;s<a.elements.length;s+=1)a.elements[s].dom7AnimateInstance?r=a.elements[s].dom7AnimateInstance:a.elements[s].dom7AnimateInstance=a;return r||(r=a),"stop"===t?r.stop():r.animate(a.props,a.params),i},ah.animationEnd=function(e){var t=this;return e&&t.on("animationend",(function n(r){r.target===this&&(e.call(this,r),t.off("animationend",n))})),this},ah.append=function(){for(var t,n=e.getDocument(),r=0;r<arguments.length;r+=1){t=r<0||arguments.length<=r?void 0:arguments[r];for(var o=0;o<this.length;o+=1)if("string"==typeof t){var a=n.createElement("div");for(a.innerHTML=t;a.firstChild;)this[o].appendChild(a.firstChild)}else if(t instanceof i)for(var s=0;s<t.length;s+=1)this[o].appendChild(t[s]);else this[o].appendChild(t)}return this},ah.appendTo=function(e){return u(e).append(this),this},ah.attr=function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(e,t);else for(var r in e)this[n][r]=e[r],this[n].setAttribute(r,e[r]);return this},ah.blur=f,ah.change=E,ah.children=function(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].children,o=0;o<r.length;o+=1)e&&!u(r[o]).is(e)||t.push(r[o]);return u(t)},ah.click=d,ah.closest=function(e){var t=this;return void 0===e?u([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},ah.css=function(t,n){var r,o=e.getWindow();if(1===arguments.length){if("string"!=typeof t){for(r=0;r<this.length;r+=1)for(var i in t)this[r].style[i]=t[i];return this}if(this[0])return o.getComputedStyle(this[0],null).getPropertyValue(t)}if(2===arguments.length&&"string"==typeof t){for(r=0;r<this.length;r+=1)this[r].style[t]=n;return this}return this},ah.data=function(e,t){var n;if(void 0===t){if(!(n=this[0]))return;if(n.dom7ElementDataStorage&&e in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[e];var r=n.getAttribute("data-"+e);return r||void 0}for(var o=0;o<this.length;o+=1)(n=this[o]).dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[e]=t;return this},ah.dataset=function(){var e=this[0];if(e){var t,n={};if(e.dataset)for(var r in e.dataset)n[r]=e.dataset[r];else for(var o=0;o<e.attributes.length;o+=1){var i=e.attributes[o];i.name.indexOf("data-")>=0&&(n[(t=i.name.split("data-")[1],t.toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})))]=i.value)}for(var a in n)"false"===n[a]?n[a]=!1:"true"===n[a]?n[a]=!0:parseFloat(n[a])===1*n[a]&&(n[a]*=1);return n}},ah.default=u,ah.detach=function(){return this.remove()},ah.each=function(e){return e?(this.forEach((function(t,n){e.apply(t,[t,n])})),this):this},ah.empty=function(){for(var e=0;e<this.length;e+=1){var t=this[e];if(1===t.nodeType){for(var n=0;n<t.childNodes.length;n+=1)t.childNodes[n].parentNode&&t.childNodes[n].parentNode.removeChild(t.childNodes[n]);t.textContent=""}}return this},ah.eq=function(e){if(void 0===e)return this;var t=this.length;if(e>t-1)return u([]);if(e<0){var n=t+e;return u(n<0?[]:[this[n]])}return u([this[e]])},ah.filter=function(e){return u(s(this,e))},ah.find=function(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].querySelectorAll(e),o=0;o<r.length;o+=1)t.push(r[o]);return u(t)},ah.focus=p,ah.focusin=h,ah.focusout=g,ah.hasClass=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a(t.map((function(e){return e.split(" ")})));return s(this,(function(e){return r.filter((function(t){return e.classList.contains(t)})).length>0})).length>0},ah.height=function(){var t=e.getWindow();return this[0]===t?t.innerHeight:this.length>0?parseFloat(this.css("height")):null},ah.hide=function(){for(var e=0;e<this.length;e+=1)this[e].style.display="none";return this},ah.html=function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},ah.index=function(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},ah.insertAfter=function(e){for(var t=u(e),n=0;n<this.length;n+=1)if(1===t.length)t[0].parentNode.insertBefore(this[n],t[0].nextSibling);else if(t.length>1)for(var r=0;r<t.length;r+=1)t[r].parentNode.insertBefore(this[n].cloneNode(!0),t[r].nextSibling)},ah.insertBefore=function(e){for(var t=u(e),n=0;n<this.length;n+=1)if(1===t.length)t[0].parentNode.insertBefore(this[n],t[0]);else if(t.length>1)for(var r=0;r<t.length;r+=1)t[r].parentNode.insertBefore(this[n].cloneNode(!0),t[r])},ah.is=function(t){var n,r,o=e.getWindow(),a=e.getDocument(),s=this[0];if(!s||void 0===t)return!1;if("string"==typeof t){if(s.matches)return s.matches(t);if(s.webkitMatchesSelector)return s.webkitMatchesSelector(t);if(s.msMatchesSelector)return s.msMatchesSelector(t);for(n=u(t),r=0;r<n.length;r+=1)if(n[r]===s)return!0;return!1}if(t===a)return s===a;if(t===o)return s===o;if(t.nodeType||t instanceof i){for(n=t.nodeType?[t]:t,r=0;r<n.length;r+=1)if(n[r]===s)return!0;return!1}return!1},ah.keydown=m,ah.keypress=y,ah.keyup=v,ah.mousedown=C,ah.mouseenter=A,ah.mouseleave=S,ah.mousemove=D,ah.mouseout=x,ah.mouseover=O,ah.mouseup=w,ah.next=function(e){return this.length>0?e?this[0].nextElementSibling&&u(this[0].nextElementSibling).is(e)?u([this[0].nextElementSibling]):u([]):this[0].nextElementSibling?u([this[0].nextElementSibling]):u([]):u([])},ah.nextAll=function(e){var t=[],n=this[0];if(!n)return u([]);for(;n.nextElementSibling;){var r=n.nextElementSibling;e?u(r).is(e)&&t.push(r):t.push(r),n=r}return u(t)},ah.off=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];"function"==typeof t[1]&&(r=t[0],i=t[1],a=t[2],o=void 0),a||(a=!1);for(var s=r.split(" "),u=0;u<s.length;u+=1)for(var l=s[u],c=0;c<this.length;c+=1){var d=this[c],f=void 0;if(!o&&d.dom7Listeners?f=d.dom7Listeners[l]:o&&d.dom7LiveListeners&&(f=d.dom7LiveListeners[l]),f&&f.length)for(var p=f.length-1;p>=0;p-=1){var h=f[p];i&&h.listener===i||i&&h.listener&&h.listener.dom7proxy&&h.listener.dom7proxy===i?(d.removeEventListener(l,h.proxyListener,a),f.splice(p,1)):i||(d.removeEventListener(l,h.proxyListener,a),f.splice(p,1))}}return this},ah.offset=function(){if(this.length>0){var t=e.getWindow(),n=e.getDocument(),r=this[0],o=r.getBoundingClientRect(),i=n.body,a=r.clientTop||i.clientTop||0,s=r.clientLeft||i.clientLeft||0,u=r===t?t.scrollY:r.scrollTop,l=r===t?t.scrollX:r.scrollLeft;return{top:o.top+u-a,left:o.left+l-s}}return null},ah.on=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];function s(e){var t=e.target;if(t){var n=e.target.dom7EventData||[];if(n.indexOf(e)<0&&n.unshift(e),u(t).is(o))i.apply(t,n);else for(var r=u(t).parents(),a=0;a<r.length;a+=1)u(r[a]).is(o)&&i.apply(r[a],n)}}function l(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),i.apply(this,t)}"function"==typeof t[1]&&(r=t[0],i=t[1],a=t[2],o=void 0),a||(a=!1);for(var c,d=r.split(" "),f=0;f<this.length;f+=1){var p=this[f];if(o)for(c=0;c<d.length;c+=1){var h=d[c];p.dom7LiveListeners||(p.dom7LiveListeners={}),p.dom7LiveListeners[h]||(p.dom7LiveListeners[h]=[]),p.dom7LiveListeners[h].push({listener:i,proxyListener:s}),p.addEventListener(h,s,a)}else for(c=0;c<d.length;c+=1){var g=d[c];p.dom7Listeners||(p.dom7Listeners={}),p.dom7Listeners[g]||(p.dom7Listeners[g]=[]),p.dom7Listeners[g].push({listener:i,proxyListener:l}),p.addEventListener(g,l,a)}}return this},ah.once=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0],i=n[1],a=n[2],s=n[3];function u(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];a.apply(this,n),e.off(o,i,u,s),u.dom7proxy&&delete u.dom7proxy}return"function"==typeof n[1]&&(o=n[0],a=n[1],s=n[2],i=void 0),u.dom7proxy=a,e.on(o,i,u,s)},ah.outerHeight=function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},ah.outerWidth=function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},ah.parent=function(e){for(var t=[],n=0;n<this.length;n+=1)null!==this[n].parentNode&&(e?u(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return u(t)},ah.parents=function(e){for(var t=[],n=0;n<this.length;n+=1)for(var r=this[n].parentNode;r;)e?u(r).is(e)&&t.push(r):t.push(r),r=r.parentNode;return u(t)},ah.prepend=function(t){var n,r,o=e.getDocument();for(n=0;n<this.length;n+=1)if("string"==typeof t){var a=o.createElement("div");for(a.innerHTML=t,r=a.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(a.childNodes[r],this[n].childNodes[0])}else if(t instanceof i)for(r=0;r<t.length;r+=1)this[n].insertBefore(t[r],this[n].childNodes[0]);else this[n].insertBefore(t,this[n].childNodes[0]);return this},ah.prependTo=function(e){return u(e).prepend(this),this},ah.prev=function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&u(t.previousElementSibling).is(e)?u([t.previousElementSibling]):u([]):t.previousElementSibling?u([t.previousElementSibling]):u([])}return u([])},ah.prevAll=function(e){var t=[],n=this[0];if(!n)return u([]);for(;n.previousElementSibling;){var r=n.previousElementSibling;e?u(r).is(e)&&t.push(r):t.push(r),n=r}return u(t)},ah.prop=function(e,t){if(1!==arguments.length||"string"!=typeof e){for(var n=0;n<this.length;n+=1)if(2===arguments.length)this[n][e]=t;else for(var r in e)this[n][r]=e[r];return this}return this[0]?this[0][e]:this},ah.remove=function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},ah.removeAttr=function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},ah.removeClass=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a(t.map((function(e){return e.split(" ")})));return this.forEach((function(e){var t;(t=e.classList).remove.apply(t,r)})),this},ah.removeData=function(e){for(var t=0;t<this.length;t+=1){var n=this[t];n.dom7ElementDataStorage&&n.dom7ElementDataStorage[e]&&(n.dom7ElementDataStorage[e]=null,delete n.dom7ElementDataStorage[e])}},ah.resize=k,ah.scroll=F,ah.scrollLeft=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];3===t.length&&"function"==typeof i&&(r=t[0],o=t[1],a=t[2],i=t[3]);var s=this;return void 0===r?s.length>0?s[0].scrollLeft:null:s.scrollTo(r,void 0,o,i,a)},ah.scrollTo=function(){for(var t=e.getWindow(),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=r[0],a=r[1],s=r[2],u=r[3],l=r[4];return 4===r.length&&"function"==typeof u&&(l=u,i=r[0],a=r[1],s=r[2],l=r[3],u=r[4]),void 0===u&&(u="swing"),this.each((function(){var e,n,r,o,c,d,f,p,h=this,g=a>0||0===a,v=i>0||0===i;if(void 0===u&&(u="swing"),g&&(e=h.scrollTop,s||(h.scrollTop=a)),v&&(n=h.scrollLeft,s||(h.scrollLeft=i)),s){g&&(r=h.scrollHeight-h.offsetHeight,c=Math.max(Math.min(a,r),0)),v&&(o=h.scrollWidth-h.offsetWidth,d=Math.max(Math.min(i,o),0));var m=null;g&&c===e&&(g=!1),v&&d===n&&(v=!1),t.requestAnimationFrame((function r(o){void 0===o&&(o=(new Date).getTime()),null===m&&(m=o);var i,a=Math.max(Math.min((o-m)/s,1),0),y="linear"===u?a:.5-Math.cos(a*Math.PI)/2;g&&(f=e+y*(c-e)),v&&(p=n+y*(d-n)),g&&c>e&&f>=c&&(h.scrollTop=c,i=!0),g&&c<e&&f<=c&&(h.scrollTop=c,i=!0),v&&d>n&&p>=d&&(h.scrollLeft=d,i=!0),v&&d<n&&p<=d&&(h.scrollLeft=d,i=!0),i?l&&l():(g&&(h.scrollTop=f),v&&(h.scrollLeft=p),t.requestAnimationFrame(r))}))}}))},ah.scrollTop=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],i=t[2],a=t[3];3===t.length&&"function"==typeof i&&(r=t[0],o=t[1],a=t[2],i=t[3]);var s=this;return void 0===r?s.length>0?s[0].scrollTop:null:s.scrollTo(void 0,r,o,i,a)},ah.show=function(){for(var t=e.getWindow(),n=0;n<this.length;n+=1){var r=this[n];"none"===r.style.display&&(r.style.display=""),"none"===t.getComputedStyle(r,null).getPropertyValue("display")&&(r.style.display="block")}return this},ah.siblings=function(e){return this.nextAll(e).add(this.prevAll(e))},ah.stop=function(){for(var e=this,t=0;t<e.length;t+=1)e[t].dom7AnimateInstance&&e[t].dom7AnimateInstance.stop()},ah.styles=function(){var t=e.getWindow();return this[0]?t.getComputedStyle(this[0],null):{}},ah.submit=b,ah.text=function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this},ah.toggleClass=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=a(t.map((function(e){return e.split(" ")})));this.forEach((function(e){r.forEach((function(t){e.classList.toggle(t)}))}))},ah.touchend=N,ah.touchmove=B,ah.touchstart=T,ah.transform=function(e){for(var t=0;t<this.length;t+=1)this[t].style.transform=e;return this},ah.transition=function(e){for(var t=0;t<this.length;t+=1)this[t].style.transitionDuration="string"!=typeof e?e+"ms":e;return this},ah.transitionEnd=function(e){var t=this;return e&&t.on("transitionend",(function n(r){r.target===this&&(e.call(this,r),t.off("transitionend",n))})),this},ah.trigger=function(){for(var t=e.getWindow(),n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];for(var i=r[0].split(" "),a=r[1],s=0;s<i.length;s+=1)for(var u=i[s],l=0;l<this.length;l+=1){var c=this[l];if(t.CustomEvent){var d=new t.CustomEvent(u,{detail:a,bubbles:!0,cancelable:!0});c.dom7EventData=r.filter((function(e,t){return t>0})),c.dispatchEvent(d),c.dom7EventData=[],delete c.dom7EventData}}return this},ah.val=function(e){if(void 0===e){var t=this[0];if(!t)return;if(t.multiple&&"select"===t.nodeName.toLowerCase()){for(var n=[],r=0;r<t.selectedOptions.length;r+=1)n.push(t.selectedOptions[r].value);return n}return t.value}for(var o=0;o<this.length;o+=1){var i=this[o];if(Array.isArray(e)&&i.multiple&&"select"===i.nodeName.toLowerCase())for(var a=0;a<i.options.length;a+=1)i.options[a].selected=e.indexOf(i.options[a].value)>=0;else i.value=e}return this},ah.value=function(e){return this.val(e)},ah.width=function(){var t=e.getWindow();return this[0]===t?t.innerWidth:this.length>0?parseFloat(this.css("width")):null},ah}var ch=lh(),dh=E(ch);const fh=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let ph=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"");function hh(e){Promise.resolve().then(e)}var gh,vh=function(e){return Object.prototype.toString.call(e)};ch.css&&(dh.fn.css=ch.css),ch.append&&(dh.fn.append=ch.append),ch.addClass&&(dh.fn.addClass=ch.addClass),ch.removeClass&&(dh.fn.removeClass=ch.removeClass),ch.hasClass&&(dh.fn.hasClass=ch.hasClass),ch.on&&(dh.fn.on=ch.on),ch.focus&&(dh.fn.focus=ch.focus),ch.attr&&(dh.fn.attr=ch.attr),ch.removeAttr&&(dh.fn.removeAttr=ch.removeAttr),ch.hide&&(dh.fn.hide=ch.hide),ch.show&&(dh.fn.show=ch.show),ch.offset&&(dh.fn.offset=ch.offset),ch.width&&(dh.fn.width=ch.width),ch.height&&(dh.fn.height=ch.height),ch.parent&&(dh.fn.parent=ch.parent),ch.parents&&(dh.fn.parents=ch.parents),ch.is&&(dh.fn.is=ch.is),ch.dataset&&(dh.fn.dataset=ch.dataset),ch.val&&(dh.fn.val=ch.val),ch.text&&(dh.fn.text=ch.text),ch.html&&(dh.fn.html=ch.html),ch.children&&(dh.fn.children=ch.children),ch.remove&&(dh.fn.remove=ch.remove),ch.find&&(dh.fn.find=ch.find),ch.each&&(dh.fn.each=ch.each),ch.empty&&(dh.fn.empty=ch.empty),function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(gh||(gh={}));var mh=/\[object HTML([A-Z][a-z]*)*Element\]/,yh=function(e){return mh.test(vh(e))},bh=function(e){return null!=e&&"number"==typeof e.nodeType},Eh=function(e){return bh(e)&&e.nodeType===gh.COMMENT_NODE},Ch=function(e){return bh(e)&&e.nodeType===gh.ELEMENT_NODE},Dh=function(e){return"[object Selection]"===vh(e)},wh=function(e){return bh(e)&&e.nodeType===gh.TEXT_NODE},Ah=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},Sh=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(Eh(o)||Ch(o)&&0===o.childNodes.length||Ch(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]},xh=function(e,t,n){return vp(Sh(e,t,n),1)[0]},Oh=function(e){var t,n,r="";if(wh(e)&&e.nodeValue)return e.nodeValue;if(Ch(e)){try{for(var o=gp(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Oh(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 Th(e,t){if(!yh(e)||"true"!==e.dataset.slateVoid)for(var n=e.childNodes,r=n.length;r-=1;){var o=n[r],i=o.nodeType;wh(o)?t(o,e):[gh.ELEMENT_NODE,gh.DOCUMENT_NODE,gh.DOCUMENT_FRAGMENT_NODE].includes(i)&&Th(o,t)}}function Nh(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==gh.ELEMENT_NODE?"":t.tagName.toLowerCase()}var Bh=new RegExp(String.fromCharCode(160),"g");function kh(e){return e.replace(Bh," ")}var Fh=["span","b","strong","i","em","s","strike","u","font","sub","sup"],Ph=[];var Ih=[];var Rh={};function Lh(e,t){var n=e.length;if(n){var r=e[n-1];if(ap.Text.isText(r)){var o=Object.keys(r);if(1===o.length&&"text"===o[0])return r.text+=t,!0}}return!1}function _h(e,t,n){return{type:"paragraph",children:[{text:dh(e).text().replace(/\s+/gm," ")}]}}function Mh(e,t){var n=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach((function(e){if(Ch(e)){if("BR"===e.nodeName)return void(Lh(n,"\n")||n.push({text:"\n"}));var r=Hh(dh(e),t);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)}else if(wh(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=kh(o),Lh(n,o)||n.push({text:o}))}})),n)}(e,t),r=function(e){for(var t in Rh)if(e[0].matches(t))return Rh[t];return _h}(e),o=r(e[0],n,t);return Array.isArray(o)||(o=[o]),o.forEach((function(r){ap.Editor.isVoid(t,r)||(0===n.length&&(r.children=[{text:e.text().replace(/\s+/gm," ")}]),Ih.forEach((function(n){r=n(e[0],r,t)})))})),o}function jh(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=kh(n)};return Ih.forEach((function(n){r=n(e[0],r,t)})),r}function Hh(e,t){Ph.forEach((function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=dh(r(e[0])))}));var n=Nh(e);if("span"===n){if(e.attr("data-w-e-type"))return Mh(e,t);if(e[0].childNodes.length>1){var r=e[0].childNodes,o=function(e,t){var n={text:""};return Ih.forEach((function(r){n=r(e[0],n,t)})),n}(dh(e[0]),t);return Array.from(r).flatMap((function(e){var n=function(e,t,n){var r=e[0];if(Ch(r)){var o=Hh(e,n);return Array.isArray(o)?o.map((function(e){return fp(fp({},t),e)})):[fp(fp({},t),o)]}if(Eh(r))return null;var i=wh(r)?{text:r.textContent||""}:jh(e,n);return[fp(fp({},t),i)]}(dh(e),o,t);return n||[]}))}return jh(e,t)}if("code"===n)return"pre"===Nh(e.parent())?Mh(e,t):jh(e,t);if(Fh.includes(n)){if(e[0].childNodes.length>0&&3!==e[0].childNodes[0].nodeType){r=e[0].childNodes;return fp(fp({},Hh(dh(r[0]),t)),jh(e,t))}return jh(e,t)}return Mh(e,t)}function zh(e,t,n){var r=dh(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(Tp.DESTROYED,(function(){r.removeAttr(t)})),!1)}function $h(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=dh("<div>".concat(t,"</div>"));return Array.from(r.children()).forEach((function(t){var r=Hh(dh(t),e);Array.isArray(r)?r.forEach((function(e){return n.push(e)})):n.push(r)})),n}function Uh(e,t){return"w-e-element-".concat(e,"-").concat(t)}var Vh=[];var Wh,Gh,qh={};function Kh(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function Yh(e,t){var n=e.type,r=void 0===n?"":n,o=e.children,i=void 0===o?[]:o,a=ap.Editor.isVoid(t,e),s="";a||(s=i.map((function(e){return ug(e,t)})).join(""));var u=function(e){return qh[e]||Kh}(r),l=u(e,s,t),c="";if(c="string"==typeof l?l:l.html||"",a||Vh.forEach((function(t){return c=t(e,c)})),"string"==typeof l)return c;var d=l.prefix,f=void 0===d?"":d,p=l.suffix,h=void 0===p?"":p;return f&&(c=f+c),h&&(c+=h),c}var Xh=function(){if(Gh)return Wh;Gh=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o="[object Map]",i="[object Promise]",a="[object Set]",s="[object String]",u="[object WeakMap]",l="[object DataView]",c=/^\[object .+?Constructor\]$/,d=/^(?:0|[1-9]\d*)$/,f="\\ud800-\\udfff",p="\\u0300-\\u036f\\ufe20-\\ufe23",h="\\u20d0-\\u20f0",g="\\ufe0e\\ufe0f",v="["+f+"]",m="["+p+h+"]",y="\\ud83c[\\udffb-\\udfff]",E="[^"+f+"]",C="(?:\\ud83c[\\udde6-\\uddff]){2}",D="[\\ud800-\\udbff][\\udc00-\\udfff]",w="\\u200d",A="(?:"+m+"|"+y+")"+"?",S="["+g+"]?",x=S+A+("(?:"+w+"(?:"+[E,C,D].join("|")+")"+S+A+")*"),O="(?:"+[E+m+"?",m,C,D,v].join("|")+")",T=RegExp(y+"(?="+y+")|"+O+x,"g"),N=RegExp("["+w+f+p+h+g+"]"),B="object"==typeof b&&b&&b.Object===Object&&b,k="object"==typeof self&&self&&self.Object===Object&&self,F=B||k||Function("return this")();function P(e,t){return function(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,(function(t){return e[t]}))}function I(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function R(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function L(e){return function(e){return N.test(e)}(e)?function(e){return e.match(T)||[]}(e):function(e){return e.split("")}(e)}var _,M,j=Function.prototype,H=Object.prototype,z=F["__core-js_shared__"],$=function(){var e=/[^.]+$/.exec(z&&z.keys&&z.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),U=j.toString,V=H.hasOwnProperty,W=H.toString,G=RegExp("^"+U.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q=F.Symbol,K=q?q.iterator:void 0,Y=H.propertyIsEnumerable,X=(_=Object.keys,M=Object,function(e){return _(M(e))}),Z=ce(F,"DataView"),J=ce(F,"Map"),Q=ce(F,"Promise"),ee=ce(F,"Set"),te=ce(F,"WeakMap"),ne=pe(Z),re=pe(J),oe=pe(Q),ie=pe(ee),ae=pe(te);function se(e,n){var r=he(e)||function(e){return function(e){return ye(e)&&ge(e)}(e)&&V.call(e,"callee")&&(!Y.call(e,"callee")||W.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!V.call(e,a)||i&&("length"==a||fe(a,o))||r.push(a);return r}function ue(e){if(!me(e)||function(e){return!!$&&$ in e}(e))return!1;var t=ve(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?G:c;return t.test(pe(e))}function le(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||H,t!==r)return X(e);var t,n,r,o=[];for(var i in Object(e))V.call(e,i)&&"constructor"!=i&&o.push(i);return o}function ce(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ue(n)?n:void 0}var de=function(e){return W.call(e)};function fe(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||d.test(t))&&t>-1&&t%1==0&&t<n}function pe(e){if(null!=e){try{return U.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(Z&&de(new Z(new ArrayBuffer(1)))!=l||J&&de(new J)!=o||Q&&de(Q.resolve())!=i||ee&&de(new ee)!=a||te&&de(new te)!=u)&&(de=function(e){var t=W.call(e),n="[object Object]"==t?e.constructor:void 0,r=n?pe(n):void 0;if(r)switch(r){case ne:return l;case re:return o;case oe:return i;case ie:return a;case ae:return u}return t});var he=Array.isArray;function ge(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!ve(t)}function ve(e){var t=me(e)?W.call(e):"";return t==n||t==r}function me(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ye(e){return!!e&&"object"==typeof e}function be(e){return e?P(e,function(e){return ge(e)?se(e):le(e)}(e)):[]}return Wh=function(e){if(!e)return[];if(ge(e))return function(e){return"string"==typeof e||!he(e)&&ye(e)&&W.call(e)==s}(e)?L(e):function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e);if(K&&e[K])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[K]());var t=de(e);return(t==o?I:t==a?R:be)(e)},Wh}(),Zh=E(Xh),Jh=0,Qh=function(){this.id="".concat(Jh++)},eg="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),tg="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),ng="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),rg="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),og="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),ig="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),ag=!og&&!rg&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,sg={getWindow:function(e){var t=Qp.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=Jp.get(t);return n||(n=new Qh,Jp.set(t,n)),n},setNewKey:function(e){var t=new Qh;Jp.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var o=qp.get(r);if(null==o){if(ap.Editor.isEditor(r))return n;break}var i=Gp.get(r);if(null==i)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(t)))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=sg.toDOMNode(e,e),n=t.getRootNode();return"[object HTMLDocument]"!==vh(n)&&!function(e){return"[object ShadowRoot]"===vh(e)}(n)||null==Reflect.get(n,"getSelection")?t.ownerDocument:n},getParentNode:function(e,t){return qp.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=sg.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,t){var n=[sg.findPath(e,t)[0]];return ap.Node.get(e,n)},toDOMNode:function(e,t){var n;if(ap.Editor.isEditor(t))n=Kp.get(e);else{var r=sg.findKey(e,t);n=Xp.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(t)));return n},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=sg.toDOMNode(e,e);try{r=Ch(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,o=ap.Range.isBackward(t),i=sg.toDOMPoint(e,n),a=ap.Range.isCollapsed(t)?i:sg.toDOMPoint(e,r),s=sg.getWindow(e).document.createRange(),u=vp(o?a:i,2),l=u[0],c=u[1],d=vp(o?i:a,2),f=d[0],p=d[1],h=!!(Ch(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!(Ch(f)?f:f.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,h?1:c),s.setEnd(f,g?1:p),s},toDOMPoint:function(e,t){var n,r,o,i=vp(ap.Editor.node(e,t.path),1)[0],a=sg.toDOMNode(e,i);ap.Editor.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var l=gp(s),c=l.next();!c.done;c=l.next()){var d=c.value,f=d.childNodes[0];if(null!=f&&null!=f.textContent){var p=f.textContent.length,h=d.getAttribute("data-slate-length"),g=u+(null==h?p:parseInt(h,10));if(t.offset<=g){o=[f,Math.min(p,Math.max(0,t.offset-u))];break}u=g}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(t)));return o},toSlateNode:function(e,t){var n=Ch(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Yp.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,o=t.target;if(null==n||null==r)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i,a=sg.toSlateNode(e,t.target),s=sg.findPath(e,a);if(ap.Editor.isVoid(e,a)){var u=o.getBoundingClientRect(),l=e.isInline(a)?n-u.left<u.left+u.width-n:r-u.top<u.top+u.height-r,c=ap.Editor.point(e,s,{edge:l?"start":"end"}),d=l?ap.Editor.before(e,c):ap.Editor.after(e,c);if(d)return ap.Editor.range(e,d)}var f=this.getWindow(e).document;if(f.caretRangeFromPoint)i=f.caretRangeFromPoint(n,r);else{var p=f.caretPositionFromPoint(n,r);p&&((i=f.createRange()).setStart(p.offsetNode,p.offset),i.setEnd(p.offsetNode,p.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));return sg.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,n){var r,o,i,a,s,u=n.exactMatch,l=n.suppressThrow;if((Dh(t)?t.anchorNode:t.startContainer)&&(Dh(t)?(r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=ig&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=t.collapsed)),null==r||null==i||null==o||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=sg.toSlatePoint(e,[r,o],{exactMatch:u,suppressThrow:l});if(!c)return null;var d=s?c:sg.toSlatePoint(e,[i,a],{exactMatch:u,suppressThrow:l});if(!d)return null;var f={anchor:c,focus:d};return ap.Range.isExpanded(f)&&ap.Range.isForward(f)&&Ch(i)&&ap.Editor.void(e,{at:f.focus,mode:"highest"})&&(f=ap.Editor.unhangRange(e,f,{voids:!0})),f},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,a=vp(o?t:function(e){var t,n=vp(e,2),r=n[0],o=n[1];if(Ch(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=vp(Sh(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;Ch(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=xh(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]}(t),2),s=a[0],u=a[1],l=s.parentNode,c=null,d=0;if(l){var f=l.closest('[data-slate-void="true"]'),p=l.closest("[data-slate-leaf]"),h=null,g=sg.getWindow(e);if(p&&g.document.createRange){c=p.closest('[data-slate-node="text"]');var v=g.document.createRange();v.setStart(c,0),v.setEnd(s,u);var m=v.cloneContents();mp(mp([],vp(Zh(m.querySelectorAll("[data-slate-zero-width]"))),!1),vp(Zh(m.querySelectorAll("[contenteditable=false]"))),!1).forEach((function(e){e.parentNode.removeChild(e)})),d=m.textContent.length,h=c}else f&&((p=f.querySelector("[data-slate-leaf]"))?(c=p.closest('[data-slate-node="text"]'),d=(h=p).textContent.length,h.querySelectorAll("[data-slate-zero-width]").forEach((function(e){d-=e.textContent.length}))):d=1);h&&d===h.textContent.length&&(l.hasAttribute("data-slate-zero-width")||tg&&(null===(r=h.textContent)||void 0===r?void 0:r.endsWith("\n")))&&(d-=1)}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var y=sg.toSlateNode(e,c);return{path:sg.findPath(e,y),offset:d}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return ap.Editor.hasPath(e,n.path)&&ap.Editor.hasPath(e,r.path)},getNodeType:function(e){return ap.Element.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map((function(e){return ap.Node.string(e)})).join("")},getSelectedElems:function(e){var t,n,r=[],o=ap.Editor.nodes(e,{universal:!0});try{for(var i=gp(o),a=i.next();!a.done;a=i.next()){var s=vp(a.value,1)[0];ap.Element.isElement(s)&&r.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=vp(ap.Editor.nodes(e,{match:function(e){return n.checkNodeType(e,t)},universal:!0}),1),o=r[0];return null==o?null:o[0]},getSelectedTextNode:function(e){var t=vp(ap.Editor.nodes(e,{match:function(e){return ap.Text.isText(e)},universal:!0}),1),n=t[0];return null==n?null:n[0]},isNodeSelected:function(e,t){var n=vp(ap.Editor.nodes(e,{match:function(e){return e===t},universal:!0}),1),r=n[0];return null!=r&&vp(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(ap.Editor.isEnd(e,n.anchor,t)||ap.Editor.isEnd(e,n.focus,t))},getTextarea:function(e){var t=Pp.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return Lp.get(e)||null},getHoverbar:function(e){return Mp.get(e)||null},normalizeContent:function(e){e.children.forEach((function(t,n){e.normalizeNode([t,[n]])}))},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-e.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var t,n,r,o,i=sg.getTextarea(e).$textArea,a=null==i?void 0:i[0].childNodes;if(a)try{for(var s=gp(Array.from(a)),u=s.next();!u.done;u=s.next()){var l=u.value;if(!wh(l))break;l.remove()}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}var c=ap.Editor.nodes(e,{match:function(t){return!(!ap.Element.isElement(t)||e.isInline(t))},universal:!0});try{for(var d=gp(c),f=d.next();!f.done;f=d.next()){var p=f.value;if(null!=p){var h=p[0];Th(sg.toDOMNode(e,h),(function(e,t){var n=dh(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)}))}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,n,r=ap.Editor.nodes(e,{match:function(t){return e.isVoid(t)}}),o=0;try{for(var i=gp(r),a=i.next();!a.done;a=i.next()){a.value&&(o+=1)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(ap.Range.isExpanded(t))return!1;var n=sg.getSelectedNodeByType(e,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(e,t){var n=ap.Editor.node(e,t);if(null==n)return!1;var r=vp(n,1)[0].children;if(1===r.length&&""===r[0].text)return!0;return!1}};function ug(e,t){return ap.Element.isElement(e)?Yh(e,t):function(e,t){var n=e.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=n;r=function(e){return e.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=sg.getParentsNodes(t,e).some((function(e){return"pre"===sg.getNodeType(e)}));if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=sg.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return Vh.forEach((function(t){return r=t(e,r)})),r}(e,t)}var lg=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},cg=function(e,t,n){var r=sg.toDOMRange(e,t).getBoundingClientRect(),o=sg.toDOMRange(e,n).getBoundingClientRect();return lg(r,o)&&lg(o,r)};function dg(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):ap.Transforms.insertNodes(e,t,{mode:"highest"})}var fg,pg,hg,gg,vg,mg,yg,bg,Eg,Cg,Dg,wg,Ag,Sg,xg,Og,Tg,Ng,Bg,kg,Fg,Pg,Ig,Rg,Lg,_g,Mg,jg,Hg,zg,$g,Ug,Vg,Wg,Gg,qg,Kg,Yg,Xg,Zg,Jg=function(e){var t=e,n=t.onChange,r=t.insertText,o=t.apply,i=t.deleteBackward;return t.insertText=function(e){t.getConfig().readOnly||r(e)},t.apply=function(e){var n,r,i,a,s,u,l,c,d=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":try{for(var f=gp(ap.Editor.levels(t,{at:e.path})),p=f.next();!p.done;p=f.next()){var h=vp(p.value,2),g=h[0],v=h[1],m=sg.findKey(t,g);d.push([v,m])}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=f.return)&&r.call(f)}finally{if(n)throw n.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var y=gp(ap.Editor.levels(t,{at:ap.Path.parent(e.path)})),b=y.next();!b.done;b=y.next()){var E=vp(b.value,2);g=E[0],v=E[1],m=sg.findKey(t,g);d.push([v,m])}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}break;case"move_node":try{for(var C=gp(ap.Editor.levels(t,{at:ap.Path.common(ap.Path.parent(e.path),ap.Path.parent(e.newPath))})),D=C.next();!D.done;D=C.next()){var w=vp(D.value,2);g=w[0],v=w[1],m=sg.findKey(t,g);d.push([v,m])}}catch(e){s={error:e}}finally{try{D&&!D.done&&(u=C.return)&&u.call(C)}finally{if(s)throw s.error}}}o(e);try{for(var A=gp(d),S=A.next();!S.done;S=A.next()){var x=vp(S.value,2);v=x[0],m=x[1],g=vp(ap.Editor.node(t,v),1)[0];Jp.set(g,m)}}catch(e){l={error:e}}finally{try{S&&!S.done&&(c=A.return)&&c.call(A)}finally{if(l)throw l.error}}},t.deleteBackward=function(n){if("line"!==n)return i(n);if(e.selection&&ap.Range.isCollapsed(e.selection)){var r=ap.Editor.above(e,{match:function(t){return ap.Editor.isBlock(e,t)},at:e.selection});if(r){var o=vp(r,2)[1],a=ap.Editor.range(e,o,e.selection.anchor),s=function(e,t){var n=ap.Editor.range(e,ap.Range.end(t)),r=Array.from(ap.Editor.positions(e,{at:t})),o=0,i=r.length,a=Math.floor(i/2);if(cg(e,ap.Editor.range(e,r[o]),n))return ap.Editor.range(e,r[o],n);if(r.length<2)return ap.Editor.range(e,r[r.length-1],n);for(;a!==r.length&&a!==o;)cg(e,ap.Editor.range(e,r[a]),n)?i=a:o=a,a=Math.floor((o+i)/2);return ap.Editor.range(e,r[i],n)}(t,a);ap.Range.isCollapsed(s)||ap.Transforms.delete(e,{at:s})}}},t.onChange=function(){var e=t.selection;null!=e&&th.set(t,e),t.emit("change"),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children;return(void 0===e?[]:e).map((function(e){return ug(e,t)})).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map((function(e){return ap.Node.string(e)})).join("\n")},t.getSelectionText=function(){var n=t.selection;return null==n?"":ap.Editor.string(e,n)},t.getElemsByType=function(e,n){var r,o;void 0===n&&(n=!1);var i=[],a=ap.Editor.nodes(t,{at:[],universal:!0});try{for(var s=gp(a),u=s.next();!u.done;u=s.next()){var l=vp(u.value,1)[0];if(ap.Element.isElement(l))if(n?l.type.indexOf(e)>=0:l.type===e){var c=sg.findKey(t,l),d=Uh(l.type,c.id);i.push(fp(fp({},l),{id:d}))}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=void 0===e?[]:e;if(n.length>1)return!1;var r=n[0];if(null==r)return!0;if(!ap.Element.isElement(r)||"paragraph"!==r.type)return!1;var o=r.children,i=void 0===o?[]:o;if(i.length>1)return!1;var a=i[0];return null==a||ap.Text.isText(a)&&""===a.text},t.clear=function(){ap.Transforms.delete(t,{at:{anchor:ap.Editor.start(t,[]),focus:ap.Editor.end(t,[])}}),0===t.children.length&&ap.Transforms.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return sg.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e){var r=document.createElement("div");r.innerHTML=e;var o=Array.from(r.childNodes);if(o=o.filter((function(e){var t=e.nodeName;return!!wh(e)||!!Ch(e)&&!ih.has(t.toLowerCase())})),0!==o.length){var i=t.selection;if(null!=i){var a=null;if(sg.isSelectedEmptyParagraph(t)&&!n)a=[i.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var s=0;o.forEach((function(e,n){var r=e.nodeName,i=e.textContent,a=void 0===i?"":i;if(wh(e)){if(!a||!a.trim())return;t.insertNode({text:a})}else if("BR"!==r){var u=e,l=!1;if(Fh.includes(r.toLowerCase()))l=!0;else for(var c in Rh)if(u.matches(c)){l=!0;break}if(l){var d=Hh(dh(u),t);return Array.isArray(d)?(d.forEach((function(e){return dg(t,e)})),s+=1):(dg(t,d),s+=1),void(sg.isSelectedVoidNode(t)&&t.move(1))}var f=window.getComputedStyle(u).display;if(!sg.isSelectedEmptyParagraph(t)&&f.indexOf("inline")<0){if(n>=1)(function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")})(o[n-1])&&t.insertBreak();t.insertBreak()}t.dangerouslyInsertHtml(u.innerHTML,!0)}else t.insertText("\n")})),s&&a&&sg.isEmptyPath(t,a)&&ap.Transforms.removeNodes(t,{at:a}),r.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var n=t.isDisabled(),r=t.isFocused(),o=JSON.stringify(t.selection);t.enable(),t.focus(),t.clear();var i=$h(t,null==e?"":e);if(ap.Transforms.insertFragment(t,i),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(o))}catch(e){t.select(ap.Editor.start(t,[]))}},t},Qg=1,ev=function(e){var t=e;return t.id="wangEditor-".concat(Qg++),t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(sg.toDOMNode(t,t).focus({preventScroll:!0}),eh.set(t,!0),e){var n=ap.Editor.end(t,[]);ap.Transforms.select(t,n)}else{var r=th.get(t);r?ap.Transforms.select(t,r):ap.Transforms.select(t,ap.Editor.start(t,[]))}},t.isFocused=function(){return!!eh.get(t)},t.blur=function(){sg.toDOMNode(t,t).blur(),ap.Transforms.deselect(t),eh.set(t,!1)},t.updateView=function(){sg.getTextarea(t).changeViewState();var e=sg.getToolbar(t);e&&e.changeToolbarState();var n=sg.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=sg.getTextarea(t);e.destroy(),Pp.delete(t),Ip.delete(e);var n=sg.getToolbar(t);n&&(n.destroy(),Lp.delete(t),Rp.delete(n));var r=sg.getHoverbar(t);r&&(r.destroy(),Mp.delete(t),_p.delete(r)),t.isDestroyed=!0,t.emit("destroyed")}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return n+="\nYou has disabled editor scroll, please do this yourself",void console.warn(n)}var r=dh("#".concat(e));if(0!==r.length){var o=r[0];if(!sg.hasDOMNode(t,o)){n="Element (found by id is '".concat(e,"') is not in editor DOM");return n+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(n,o)}var i=sg.getTextarea(t),a=i.$textAreaContainer,s=i.$scroll,u=r.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||sg.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=Hp.get(t);null!=e&&e.forEach((function(e){return e.hide()}))},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return sg.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=sg.getToolbar(t);n&&(e=n.$box);var r=sg.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),t.isFullScreen=!0,t.emit("fullScreen")}},t.unFullScreen=function(){if(t.isFullScreen){var e=sg.getTextarea(t).$box.parent();setTimeout((function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit("unFullScreen")}),200)}},t.getEditableContainer=function(){return sg.getTextarea(t).$textAreaContainer[0]},t},tv={exports:{}},nv={exports:{}};function rv(){if(pg)return fg;pg=1;return fg=function(e){return null!=e}}function ov(){if(mg)return vg;mg=1;var e=function(){if(gg)return hg;gg=1;var e=rv(),t={object:!0,function:!0,undefined:!0};return hg=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return vg=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function iv(){if(Cg)return Eg;Cg=1;var e=function(){if(bg)return yg;bg=1;var e=ov();return yg=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 Eg=function(r){return!!e(r)&&!t.test(n.call(r))}}function av(){if(Ng)return Tg;Ng=1;var e=(Og?xg:(Og=1,xg=function(){}))();return Tg=function(t){return t!==e&&null!==t}}function sv(){return Pg||(Pg=1,Fg=(Sg?Ag:(Sg=1,Ag=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(kg)return Bg;kg=1;var e=av(),t=Object.keys;return Bg=function(n){return t(e(n)?Object(n):n)}}()),Fg}function uv(){if(_g)return Lg;_g=1;var e=sv(),t=function(){if(Rg)return Ig;Rg=1;var e=av();return Ig=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return Lg=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},Lg}function lv(){return jg?Mg:(jg=1,Mg=(wg||(wg=1,Dg=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")}),Dg)()?Object.assign:uv())}function cv(){return qg||(qg=1,Gg=function(){if(Ug)return $g;Ug=1;var e="razdwatrzy";return $g=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(Wg)return Vg;Wg=1;var e=String.prototype.indexOf;return Vg=function(t){return e.call(this,t,arguments[1])>-1},Vg}()),Gg}function dv(){if(Kg)return nv.exports;Kg=1;var e=rv(),t=iv(),n=lv(),r=function(){if(zg)return Hg;zg=1;var e=av(),t=Array.prototype.forEach,n=Object.create;return Hg=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},Hg}(),o=cv(),i=nv.exports=function(t,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof t?(l=i,i=t,t=null):l=arguments[2],e(t)?(a=o.call(t,"c"),s=o.call(t,"e"),u=o.call(t,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,d;return"string"!=typeof i?(c=s,s=a,a=i,i=null):c=arguments[3],e(a)?t(a)?e(s)?t(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,e(i)?(u=o.call(i,"c"),l=o.call(i,"e")):(u=!0,l=!1),d={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),d):d},nv.exports}var fv=(Zg||(Zg=1,function(e,t){var n,r,o,i,a,s,u,l=dv(),c=Xg?Yg:(Xg=1,Yg=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,h=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};r=function(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),d.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e,t){var n,r,o,i;if(c(t),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},i=function(e){var t,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)d.call(r,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];d.call(o,this,i)}},a={on:n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=p(null),h(this,"__ee__",m),m.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:r,off:o,emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?p(u):g(Object(e),s)},t.methods=a}(tv,tv.exports)),tv.exports),pv=E(fv);function hv(e){var t=nh.get(e);return null==t&&(t=pv(),nh.set(e,t)),t}var gv=new WeakMap;function vv(e,t){var n=gv.get(e);null==n&&(n=new Set,gv.set(e,n)),n.add(t)}var mv=function(e){var t=e;return t.on=function(e,n){var r=hv(t);if(r.on(e,n),"destroyed"===e&&vv(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),vv(t,o)}},t.once=function(e,n){hv(t).once(e,n)},t.off=function(e,n){hv(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=hv(t);if(o.emit.apply(o,mp([e],vp(n),!1)),"destroyed"===e){var i=function(e){return gv.get(e)||new Set}(t);i.forEach((function(e){return o.off("destroyed",e)})),function(e){gv.set(e,new Set)}(t)}},t};function yv(e){return pp(this,void 0,void 0,(function(){var t,n,r;return hp(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,fetch(e)];case 1:if(!(t=o.sent()).ok)throw new Error("Failed to fetch blob URL");return[4,t.blob()];case 2:return n=o.sent(),[2,new Promise((function(e,t){var r=new FileReader;r.onloadend=function(){e(r.result)},r.onerror=function(){t(new Error("Failed to read blob as data URL"))},r.readAsDataURL(n)}))];case 3:return r=o.sent(),console.error(r),[2,null];case 4:return[2]}}))}))}var bv=function(e){var t=e;return t.setFragmentData=function(e){var n=t.selection;if(n){var r=vp(ap.Range.edges(n),2),o=r[0],i=r[1],a=ap.Editor.void(t,{at:o.path}),s=ap.Editor.void(t,{at:i.path});if(!ap.Range.isCollapsed(n)||a){var u=sg.toDOMRange(t,n),l=u.cloneContents(),c=l.childNodes[0];if(l.childNodes.forEach((function(e){e.textContent&&""!==e.textContent.trim()&&(c=e)})),s){var d=vp(s,1)[0],f=u.cloneRange(),p=sg.toDOMNode(t,d);f.setEndAfter(p),l=f.cloneContents()}if(a&&(c=l.querySelector("[data-slate-spacer]")),Array.from(l.querySelectorAll("[data-slate-zero-width]")).forEach((function(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""})),wh(c)){var h=c.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(c),l.appendChild(h),c=h}var g=t.getFragment(),v=JSON.stringify(g),m=window.btoa(encodeURIComponent(v));c.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var y=l.ownerDocument.createElement("div");return y.appendChild(l),y.setAttribute("hidden","true"),l.ownerDocument.body.appendChild(y),e.setData("text/html",y.innerHTML),e.setData("text/plain",Oh(y)),l.ownerDocument.body.removeChild(y),e}}},t.insertData=function(e){return pp(void 0,void 0,void 0,(function(){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v;return hp(this,(function(m){switch(m.label){case 0:return(n=e.getData("application/x-slate-fragment"))?(r=decodeURIComponent(window.atob(n)),o=JSON.parse(r),t.insertFragment(o),[2]):(i=e.getData("text/plain"),a=e.getData("text/html"),ng?(s=function(e){var t=e.match(/<img[^>]*src=["'](blob:[^"']+)["'][^>]*>/i);return t?t[1]:null}(a),s?[4,yv(s)]:[3,2]):[3,2]);case 1:(u=m.sent())&&(a='<img src="'.concat(u,'" alt="image.png">'),URL.revokeObjectURL(s)),m.label=2;case 2:if(a)return t.dangerouslyInsertHtml(a),[2];if(l=sg.getLeftLengthOfMaxLength(t),i){c=i.split(/\n\r|\r\n|\r|\n/),d=!1;try{for(f=gp(c),p=f.next();!p.done;p=f.next())h=p.value,d&&l>0&&ap.Transforms.splitNodes(t,{always:!0}),t.insertText(h),d=!0}catch(e){g={error:e}}finally{try{p&&!p.done&&(v=f.return)&&v.call(f)}finally{if(g)throw g.error}}}return[2]}}))}))},t},Ev=function(e){var t=e,n=t.insertText,r=t.insertNode,o=t.insertFragment,i=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=sg.getLeftLengthOfMaxLength(t);r<=0||(r<e.length?n(e.slice(0,r)):n(e))}else n(e)},t.insertNode=function(e){if(t.getConfig().maxLength){var n=sg.getLeftLengthOfMaxLength(t);if(!(n<=0))n<ap.Node.string(e).length||r(e)}else r(e)},t.insertFragment=function(e){if(t.getConfig().maxLength){if(e.length>0){var n=e[0];if(sg.getLeftLengthOfMaxLength(t)<ap.Node.string(n).length)return;o([n]);for(var r=1;r<e.length;r+=1)t.insertNode(e[r])}}else o(e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e)if(t.getConfig().maxLength){var r=sg.getLeftLengthOfMaxLength(t);if(!(r<=0)){var o=document.createElement("div");o.innerHTML=e,r<Array.from(o.childNodes).reduce((function(e,t){var n=t.nodeName;return t?wh(t)?e+(t.textContent||""):Ch(t)?ih.has(n.toLowerCase())?e:e+(t.textContent||""):e:e}),"").length||i(e,n)}}else i(e,n)},t};function Cv(e){var t=sg.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function Dv(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=Cv(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,u=sg.toDOMRange(e,n),l=u.getClientRects?u.getClientRects()[0]:null;if(null==l)return t;var c=l.height,d={},f=l.top-o,p=l.left-i;if(p>a/2){var h=a-p;d.right="".concat(h+5,"px")}else d.left="".concat(p+5,"px");if(f>s/2){var g=s-f;d.bottom="".concat(g+5,"px")}else{var v=f+c;v<0&&(v=0),d.top="".concat(v+5,"px")}return d}function wv(e,t,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==e.selection)return r;var o=ap.Element.isElement(t)&&e.isVoid(t),i=ap.Element.isElement(t)&&e.isInline(t),a=Zp.get(t);if(null==a)return r;var s=a.getBoundingClientRect(),u=s.top,l=s.left,c=s.height,d=s.width;if(o){var f=function(e){var t=[];t.push(e);for(var n=0;t.length>0;){var r=t.pop();if(null==r)break;if((n+=1)>1e4)break;var o=r.nodeName;if(r.nodeType===gh.ELEMENT_NODE){var i=o.toLowerCase();if(fh.includes(i)||"iframe"===i||"video"===i)return r;var a=r.children||[],s=a.length;if(s)for(var u=s-1;u>=0;u-=1)t.push(a[u])}}return null}(a);if(null!=f){var p=f.getBoundingClientRect();u=p.top,c=p.height}}var h=Cv(e);if(null==h)return r;var g=h.top,v=h.left,m=h.width,y=h.height,b={},E=u-g,C=l-v;if("bar"===n)return b.left="".concat(C,"px"),E>40?b.bottom="".concat(y-E+5,"px"):b.top="".concat(E+c+5,"px"),b;if("modal"===n){if(o?i?C>(m-d)/2?b.right="".concat(m-C+5,"px"):b.left="".concat(C+d+5,"px"):b.left="20px":b.left="".concat(C,"px"),o)(D=E)<0&&(D=0),b.top="".concat(D,"px");else if(E>(y-c)/2)b.bottom="".concat(y-E+5,"px");else{var D;(D=E+c)<0&&(D=0),b.top="".concat(D+5,"px")}return b}throw new Error("type '".concat(n,"' is invalid"))}function Av(e,t){hh((function(){var n=Cv(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=t.offset(),l=u.top,c=u.left,d=t.width(),f=t.height(),p=l-o,h=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=p+f-s)>0){var v=t.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),t.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=t.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=h+d-a)>0){var E=t.css("left"),C=parseInt(E.toString(),10)-r;C<0&&(C=0),t.css("left","".concat(C,"px"))}if(g.indexOf("right")>=0&&c<0){var D=t.css("right"),w=parseInt(D.toString(),10)-Math.abs(c);t.css("right","".concat(w,"px"))}}}))}var Sv,xv,Ov=function(e){var t=e;return t.select=function(e){ap.Transforms.select(t,e)},t.deselect=function(){var n=t.selection,r=sg.findDocumentOrShadowRoot(t).getSelection();r&&r.rangeCount>0&&r.removeAllRanges(),n&&ap.Transforms.deselect(e)},t.move=function(t,n){void 0===n&&(n=!1),t&&(t<0||ap.Transforms.move(e,{distance:t,unit:"character",reverse:n}))},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=th.get(t);null!=e&&(t.focus(),ap.Transforms.select(t,e))},t.getSelectionPosition=function(){return Dv(t)},t.getNodePosition=function(e){return wv(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var n=vp(ap.Range.edges(e),2),r=n[0],o=n[1],i=vp(ap.Editor.edges(t,[]),2),a=i[0],s=i[1];return!(!ap.Point.equals(r,a)||!ap.Point.equals(o,s))},t.selectAll=function(){var e=ap.Editor.start(t,[]),n=ap.Editor.end(t,[]);ap.Transforms.select(t,{anchor:e,focus:n})},t};var Tv=function(){if(xv)return Sv;xv=1;var e=NaN,t="[object Symbol]",n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof b&&b&&b.Object===Object&&b,u="object"==typeof self&&self&&self.Object===Object&&self,l=s||u||Function("return this")(),c=Object.prototype.toString,d=Math.max,f=Math.min,p=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(s){if("number"==typeof s)return s;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&c.call(e)==t}(s))return e;if(h(s)){var u="function"==typeof s.valueOf?s.valueOf():s;s=h(u)?u+"":u}if("string"!=typeof s)return 0===s?s:+s;s=s.replace(n,"");var l=o.test(s);return l||i.test(s)?a(s.slice(2),l?2:8):r.test(s)?e:+s}return Sv=function(e,t,n){var r,o,i,a,s,u,l=0,c=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=o;return r=o=void 0,l=t,a=e.apply(i,n)}function b(e){var n=e-u;return void 0===u||n>=t||n<0||v&&e-l>=i}function E(){var e=p();if(b(e))return C(e);s=setTimeout(E,function(e){var n=t-(e-u);return v?f(n,i-(e-l)):n}(e))}function C(e){return s=void 0,m&&r?y(e):(r=o=void 0,a)}function D(){var e=p(),n=b(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return function(e){return l=e,s=setTimeout(E,t),c?y(e):a}(u);if(v)return s=setTimeout(E,t),y(u)}return void 0===s&&(s=setTimeout(E,t)),a}return t=g(t)||0,h(n)&&(c=!!n.leading,i=(v="maxWait"in n)?d(g(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),D.cancel=function(){void 0!==s&&clearTimeout(s),l=0,r=u=o=s=void 0},D.flush=function(){return void 0===s?a:C(p())},D},Sv}(),Nv=E(Tv);const Bv={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 kv{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||Bv,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new kv(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new kv(this.logger,e)}}var Fv=new kv;class Pv{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach((e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)})),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach((e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)}))}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach((t=>{let[r,o]=t;for(let t=0;t<o;t++)r.apply(r,[e,...n])}))}}}const Iv=()=>{let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n},Rv=e=>null==e?"":""+e,Lv=/###/g,_v=e=>e&&e.indexOf("###")>-1?e.replace(Lv,"."):e,Mv=e=>!e||"string"==typeof e,jv=(e,t,n)=>{const r="string"!=typeof t?t:t.split(".");let o=0;for(;o<r.length-1;){if(Mv(e))return{};const t=_v(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return Mv(e)?{}:{obj:e,k:_v(r[o])}},Hv=(e,t,n)=>{const{obj:r,k:o}=jv(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=jv(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=jv(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},zv=(e,t)=>{const{obj:n,k:r}=jv(e,t);if(n)return n[r]},$v=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):$v(e[r],t[r],n):e[r]=t[r]);return e},Uv=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Vv={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Wv=e=>"string"==typeof e?e.replace(/[&<>"'\/]/g,(e=>Vv[e])):e;const Gv=[" ",",","?","!",";"],qv=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),Kv=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},Yv=e=>e&&e.indexOf("_")>0?e.replace("_","-"):e;class Xv extends Pv{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):"string"==typeof n&&o?a.push(...n.split(o)):a.push(n)));const s=zv(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),s||!i||"string"!=typeof n?s:Kv(this.data&&this.data[e]&&this.data[e][t],n,o)}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),Hv(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)("string"==typeof n[r]||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=zv(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?$v(s,n,o):s={...s,...n},Hv(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 Zv={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 Jv={};class Qv extends Pv{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=Fv.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=Gv.filter((e=>t.indexOf(e)<0&&n.indexOf(e)<0));if(0===r.length)return!0;const o=qv.getRegExp(`(${r.map((e=>"?"===e?"\\?":e)).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);let d=c&&c.res;const f=c&&c.usedKey||i,p=c&&c.exactUsedKey||i,h=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject;if(v&&d&&("string"!=typeof d&&"boolean"!=typeof d&&"number"!=typeof d)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0&&("string"!=typeof g||!Array.isArray(d))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(d),n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=d[e])}d=n}}else if(v&&"string"==typeof g&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&"string"!=typeof t.count,f=Qv.hasDefaultValue(t),p=l?this.pluralResolver.getSuffix(u,t.count,t):"",h=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=v),this.isValidLookup(d)||(a=!0,d=i);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=f&&v!==d&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=f&&r!==d?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach((e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach((n=>{r([e],i+n,t[`defaultValue${n}`]||v)}))})):r(e,i,v))}d=this.extendTranslation(d,e,t,c,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?d:void 0):this.options.parseMissingKeyHandler(d))}return r?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):i.translate(...r,t)}),n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s="string"==typeof a?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=Zv.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&"string"!=typeof a.count,d=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach((e=>{this.isValidLookup(t)||(i=e,!Jv[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(Jv[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((n=>{if(this.isValidLookup(t))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(r)&&i.push(u+e.replace(r,this.options.pluralSeparator)),d&&i.push(u+t)),f){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))})))}))})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&"string"!=typeof e.replace;let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const em=e=>e.charAt(0).toUpperCase()+e.slice(1);class tm{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Fv.create("languageUtils")}getScriptPartFromCode(e){if(!(e=Yv(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=Yv(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if("string"==typeof e&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map((e=>e.toLowerCase())):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=em(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]=em(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=em(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach((e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)})),!t&&this.options.supportedLngs&&e.forEach((e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find((e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0))})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return"string"==typeof e&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),n.forEach((e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))})),r}}let nm=[{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}],rm={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 om=["v1","v2","v3"],im=["v4"],am={zero:0,one:1,two:2,few:3,many:4,other:5};class sm{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Fv.create("pluralResolver"),this.options.compatibilityJSON&&!im.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 nm.forEach((t=>{t.lngs.forEach((n=>{e[n]={numbers:t.nr,plurals:rm[t.fc]}}))})),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{const n=Yv("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];const i=new Intl.PluralRules(n,{type:r});return this.pluralRulesCache[o]=i,i}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((e=>`${t}${e}`))}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort(((e,t)=>am[e]-am[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!om.includes(this.options.compatibilityJSON)}}const um=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=zv(e,n);return void 0!==r?r:zv(t,n)})(e,t,n);return!i&&o&&"string"==typeof n&&(i=Kv(e,n,r),void 0===i&&(i=Kv(t,n,r))),i},lm=e=>e.replace(/\$/g,"$$$$");class cm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Fv.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:Wv,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?Uv(o):i||"{{",this.suffix=a?Uv(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?Uv(d):f||Uv("$t("),this.nestingSuffix=p?Uv(p):h||Uv(")"),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=um(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(um(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=>lm(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?lm(this.escape(e)):lm(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="string"==typeof t?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else"string"==typeof i||this.useRawValueToEscape||(i=Rv(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}})),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&"string"!=typeof o.replace?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map((e=>e.trim()));n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Rv(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 dm=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(Yv(r),o),t[a]=s),s(n)}};class fm{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=Fv.create("formatter"),this.options=e,this.formats={number:dm(((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)})),currency:dm(((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)})),datetime:dm(((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)})),relativetime:dm(((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")})),list:dm(((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)}))},this.init(e)}init(e){const t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=dm(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 pm extends Pv{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=Fv.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}=jv(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach((t=>{void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((e=>!e.done))}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout((()=>{this.read.call(this,e,t,n,r+1,2*o,i)}),o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then((e=>a(null,e))).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach((e=>{this.loadOne(e)}))}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,((n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)}))}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(e,t,n,r,s):u(e,t,n,r),o&&"function"==typeof o.then?o.then((e=>a(null,e))).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const hm=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach((e=>{t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),gm=e=>("string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),vm=()=>{};class mm extends Pv{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=gm(e),this.services={},this.logger=Fv,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))})),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout((()=>{this.init(e,t)}),0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=hm();this.options={...r,...this.options,...gm(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?Fv.init(o(this.modules.logger),this.options):Fv.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=fm);const n=new tm(this.options);this.store=new Xv(this.options.resources,this.options);const i=this.services;i.logger=Fv,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new sm(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 cm(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new pm(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 Qv(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=vm),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=Iv(),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]:vm;const n="string"==typeof e?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach((t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)}))};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e=>r(e)))}this.options.preload&&this.options.preload.forEach((e=>r(e))),this.services.backendConnector.load(e,this.options.ns,(e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)}))}else t(null)}reloadResources(e,t,n){const r=Iv();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=vm),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&&Zv.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=Iv();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve((function(){return n.t(...arguments)})),t&&t(e,(function(){return n.t(...arguments)}))},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n="string"==typeof t?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,(e=>{i(e,n)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let c;return c=i.keyPrefix&&Array.isArray(e)?e.map((e=>`${i.keyPrefix}${l}${e}`)):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(c,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=Iv();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=Iv();"string"==typeof e&&(e=[e]);const r=this.options.preload||[],o=e.filter((e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e)));return o.length?(this.options.preload=r.concat(o),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new tm(hm());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 mm(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]:vm;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new mm(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 Xv(this.store.data,r),o.services.resourceStore=o.store),o.translator=new Qv(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 ym=mm.createInstance();ym.createInstance=mm.createInstance,ym.createInstance,ym.dir,ym.init,ym.loadResources,ym.reloadResources,ym.use,ym.changeLanguage,ym.getFixedT,ym.t,ym.exists,ym.setDefaultNamespace,ym.hasLoadedNamespace,ym.loadNamespaces,ym.loadLanguages;var bm="translation";function Em(e,t){ym.addResourceBundle(e,bm,t,!0,!0)}function Cm(e){return ym.on("languageChanged",e),function(){return ym.off("languageChanged",e)}}ym.init({lng:"zh-CN",resources:{}});var Dm=ym.t.bind(ym);function wm(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&&wm(t)}}function Am(){return dh('<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 Sm(){return dh('<div class="w-e-bar-divider"></div>')}function xm(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=eg?"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 Om=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=dh('<div class="w-e-bar-item"></div>'),this.$button=dh('<button type="button"></button>'),this.disabled=!1,this.menu=t;var o=t.tag,i=t.width;if("button"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'button'"));var a=t.title,s=t.hotkey,u=void 0===s?"":s,l=t.iconSvg,c=void 0===l?"":l,d=this.$button;if(c){var f=dh(c);wm(f),d.append(f)}else d.text(a);xm(d,c,a,u,n),n&&c&&d.append(dh('<span class="title">'.concat(a,"</span>"))),i&&d.css("width","".concat(i,"px")),d.attr("data-menu-key",e),this.$elem.append(d),hh((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",(function(t){t.preventDefault(),Hm(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())}))},e.prototype.exec=function(){var e=Hm(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=Hm(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=Hm(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=Hm(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=dh(n);wm(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=Hm(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&xm(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),Tm=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return dp(t,e),t.prototype.onButtonClick=function(){},t}(Om),Nm=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=Hp.get(e);null==t&&(t=new Set,Hp.set(e,t)),t.add(this),zp.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=zp.get(this);e&&e.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=zp.get(this);e&&e.emit("modalOrPanelHide")}},e}(),Bm=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=dh('<div class="w-e-drop-panel"></div>'),n}return dp(t,e),t.prototype.genSelfElem=function(){return null},t}(Nm),km=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=Am();o.$button.append(i)}return o}return dp(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=Hm(this);if(null==this.dropPanel){var n=new Bm(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}(Om),Fm=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=dh('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var o=r.$elem;return o.on("click",(function(e){return e.stopPropagation()})),o.on("keyup",(function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())})),r}return dp(t,e),t.prototype.genSelfElem=function(){var e=this,t=dh('<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=zp.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}(Nm);function Pm(e,t,n){var r=dh('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=dh('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function Im(e,t){var n=dh('<div class="button-container"></div>'),r=dh('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return n.append(r),[n[0],r[0]]}var Rm=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;return o.$body=dh("body"),o.modal=null,o.menu=n,o}return dp(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=Hm(this),t=this.menu.getModalPositionNode(e);return ap.Element.isElement(t)?wv(e,t,"modal"):Dv(e)},t.prototype.handleModal=function(){var e=Hm(this),t=this.menu;if(null==this.modal){var n=new Fm(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},t.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var n=Hm(this),r=this.menu;if(null!=r.getModalContentElem){var o=sg.getTextarea(n),i=sg.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||Av(n,e.$elem),setTimeout((function(){n.blur()}))}},t}(Om);var Lm=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=dh('<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 dp(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=dh("<ul></ul>");e.forEach((function(e){var t=e.value,r=e.text,o=e.selected,i=e.styleForRenderMenuList,a=dh('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var s=dh('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');a.append(s),a.addClass("selected")}a.append(dh('<span data-value="'.concat(t,'">').concat(r,"</span>"))),a.attr("title",r),n.append(a)})),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(Nm);var _m=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=dh('<div class="w-e-bar-item"></div>'),this.$button=dh('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var o=t.tag,i=t.title,a=t.width,s=t.iconSvg,u=void 0===s?"":s,l=t.hotkey,c=void 0===l?"":l;if("select"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'select'"));var d=this.$button;a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",e),xm(d,u,i,c,n),this.$elem.append(d),this.menu=t,hh((function(){return r.init()}))}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",(function(t){t.preventDefault(),Hm(e).hidePanelOrModal(),e.trigger()}))},e.prototype.trigger=function(){var e=this,t=Hm(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new Lm(t,n.selectPanelWidth);var r=this.selectList,o=n.getOptions(t);r.renderList(o),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",(function(t){var n=t.target;if(null!=n){t.preventDefault();var r=dh(n).attr("data-value");e.onChange(r)}}))}else{if((r=this.selectList).isShow)r.hide();else{o=n.getOptions(t);r.renderList(o),r.show()}}}},e.prototype.onChange=function(e){var t=Hm(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=Hm(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=Am();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=Hm(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}(),Mm=function(){function e(e){this.$elem=dh('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=dh('<div class="w-e-bar-item-menus-container"></div>'),this.$button=dh('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,o=this.$elem,i=this.$button;if(n){var a=dh(n);wm(a),i.append(a)}else i.text(r);i.attr("data-menu-key",t);var s=Am();i.append(s),o.append(i);var u=this.$container;o.append(u);var l=this.createObserver();this.observe(l)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver((function(){var o=t.find("button"),i=o.length;if(0!==i){var a=0;o.each((function(e){dh(e).hasClass("disabled")&&a++})),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}}));return r},e}(),jm=new WeakMap;function Hm(e){var t=jp.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function zm(e,t,n){void 0===n&&(n=!1);var r=jm.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new km(e,t,n):a?new Rm(e,t,n):new Tm(e,t,n)}if("select"===o&&(r=new _m(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return jm.set(t,r),r}function $m(e,t){var n=e.selection;return null!=n&&(!ap.Range.isCollapsed(n)&&(!sg.getSelectedElems(e).some((function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)}))&&!!ap.Text.isText(t)))}var Um,Vm,Wm=function(){function e(){var e=this;this.$elem=dh('<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=Nv((function(){var t=e.isShow,n=e.getSelectedNodeAndMenuKeys()||{},r=n.node,o=void 0===r?null:r,i=n.menuKeys,a=void 0===i?[]:i;if((null!=o&&e.changeItemsState(),o&&ap.Element.isElement(o))&&(t&&e.isSamePath(o,e.prevSelectedNode)))return;e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o}),200),hh((function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),sg.getTextarea(t).$textAreaContainer.append(n),t.on(Tp.CHANGE,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(Tp.SCROLL,r),t.on(Tp.FULLSCREEN,r),t.on(Tp.UNFULLSCREEN,r)})),this.lngListen=Cm((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;hh((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=Sm();n.append(r)}}))},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=Np[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=zm(e,r);this.hoverbarItems.push(a),jp.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),ap.Element.isElement(e)){var r=wv(t,e,"bar");return n.css(r),void Av(t,n)}if(ap.Text.isText(e)){r=Dv(t);return n.css(r),void Av(t,n)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(null==e.selection)return null;var t=this.getHoverbarKeysConf(),n=null,r=[],o=function(o){var i=t[o],a=i.match,s=i.menuKeys,u=void 0===s?[]:s,l=a||function(e,t){return sg.checkNodeType(t,o)},c=vp(ap.Editor.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),d=c[0];if(null!=d)return n=d[0],r=u,"break"};for(var i in t){if("break"===o(i))break}return null==n||0===r.length?null:{node:n,menuKeys:r}},e.prototype.getEditorInstance=function(){var e=_p.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=$m),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var n=sg.findPath(null,e),r=sg.findPath(null,t);return ap.Path.equals(n,r)},e.prototype.destroy=function(){var e;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function Gm(){if(Vm)return Um;Vm=1;var e="Expected a function",t=NaN,n="[object Symbol]",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt,u="object"==typeof b&&b&&b.Object===Object&&b,l="object"==typeof self&&self&&self.Object===Object&&self,c=u||l||Function("return this")(),d=Object.prototype.toString,f=Math.max,p=Math.min,h=function(){return c.Date.now()};function g(t,n,r){var o,i,a,s,u,l,c=0,d=!1,g=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var n=o,r=i;return o=i=void 0,c=e,s=t.apply(r,n)}function E(e){var t=e-l;return void 0===l||t>=n||t<0||g&&e-c>=a}function C(){var e=h();if(E(e))return D(e);u=setTimeout(C,function(e){var t=n-(e-l);return g?p(t,a-(e-c)):t}(e))}function D(e){return u=void 0,y&&o?b(e):(o=i=void 0,s)}function w(){var e=h(),t=E(e);if(o=arguments,i=this,l=e,t){if(void 0===u)return function(e){return c=e,u=setTimeout(C,n),d?b(e):s}(l);if(g)return u=setTimeout(C,n),b(l)}return void 0===u&&(u=setTimeout(C,n)),s}return n=m(n)||0,v(r)&&(d=!!r.leading,a=(g="maxWait"in r)?f(m(r.maxWait)||0,n):a,y="trailing"in r?!!r.trailing:y),w.cancel=function(){void 0!==u&&clearTimeout(u),c=0,o=l=i=u=void 0},w.flush=function(){return void 0===u?s:D(h())},w}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&d.call(e)==n}(e))return t;if(v(e)){var u="function"==typeof e.valueOf?e.valueOf():e;e=v(u)?u+"":u}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var l=i.test(e);return l||a.test(e)?s(e.slice(2),l?2:8):o.test(e)?t:+e}return Um=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(e);return v(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),g(t,n,{leading:o,maxWait:n,trailing:i})}}var qm=E(Gm());function Km(e,t){return bh(t)&&sg.hasDOMNode(e,t,{editable:!0})}function Ym(e,t){if(e.getConfig().readOnly)return!1;var n=Xm(e,t)&&sg.toSlateNode(e,t);return ap.Editor.isVoid(e,n)}function Xm(e,t){return bh(t)&&sg.hasDOMNode(e,t)}const Zm=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Jm=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,Qm=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Jm(n.overflowY,t)||Jm(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},ey=(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,ty=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},ny=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,d="function"==typeof l?l:e=>e!==l;if(!Zm(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;Zm(h)&&d(h);){if(h=ty(h),h===f){p.push(h);break}null!=h&&h===document.body&&Qm(h)&&!Qm(document.documentElement)||null!=h&&Qm(h,c)&&p.push(h)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:E,top:C,right:D,bottom:w,left:A}=e.getBoundingClientRect(),{top:S,right:x,bottom:O,left:T}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let N="start"===s||"nearest"===s?C-S:"end"===s?w+O:C+b/2-S+O,B="center"===u?A+E/2-T+x:"end"===u?D+x:A-T;const k=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&C>=0&&A>=0&&w<=v&&D<=g&&C>=o&&w<=l&&A>=c&&D<=i)return k;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),S=parseInt(d.borderTopWidth,10),x=parseInt(d.borderRightWidth,10),O=parseInt(d.borderBottomWidth,10);let T=0,F=0;const P="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-x:0,I="offsetHeight"in t?t.offsetHeight-t.clientHeight-S-O:0,R="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,L="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)T="start"===s?N:"end"===s?N-v:"nearest"===s?ey(y,y+v,v,S,O,y+N,y+N+b,b):N-v/2,F="start"===u?B:"center"===u?B-g/2:"end"===u?B-g:ey(m,m+g,g,h,x,m+B,m+B+E,E),T=Math.max(0,T+y),F=Math.max(0,F+m);else{T="start"===s?N-o-S:"end"===s?N-l+O+I:"nearest"===s?ey(o,l,n,S,O+I,N,N+b,b):N-(o+n/2)+I/2,F="start"===u?B-c-h:"center"===u?B-(c+r/2)+P/2:"end"===u?B-i+x+P:ey(c,i,r,h,x+P,B,B+E,E);const{scrollLeft:e,scrollTop:a}=t;T=0===L?0:Math.max(0,Math.min(a+T/L,t.scrollHeight-n/L+I)),F=0===R?0:Math.max(0,Math.min(e+F/R,t.scrollWidth-r/R+P)),N+=a-T,B+=e-F}k.push({el:t,top:T,left:F})}return k},ry=e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"};function oy(e,t,n){void 0===n&&(n=!1);var r=t.selection,o=t.getConfig(),i=sg.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||n)&&t.isFocused()){var a="None"!==i.type;if(r||a){var s=Kp.get(t),u=!1;if(s.contains(i.anchorNode)&&s.contains(i.focusNode)&&(u=!0),a&&u&&r){var l=sg.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(l&&ap.Range.equals(l,r)){var c=!0;if(ap.Range.isCollapsed(r)){var d=i.anchorNode,f=i.anchorOffset;if(d===s){var p=s.childNodes,h=void 0;(h=p[f])&&h.matches("table")&&(c=!1),(h=p[f-1])&&h.matches("table")&&(c=!1)}}if(c)return}}if(!r||sg.hasRange(t,r)){e.isUpdatingSelection=!0;var g=r&&sg.toDOMRange(t,r);if(g){ap.Range.isBackward(r)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")&&g.getBoundingClientRect){v.getBoundingClientRect=g.getBoundingClientRect.bind(g);var m=document.body;!function(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(ny(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of ny(e,ry(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}(v,{scrollMode:"if-needed",boundary:o.scroll?s.parentElement:m,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else i.removeAllRanges();setTimeout((function(){g&&tg&&s.focus(),e.isUpdatingSelection=!1}))}else t.selection=sg.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var iy=new WeakMap,ay=new WeakMap;var sy,uy={};var ly=function(){if(sy)return uy;sy=1,Object.defineProperty(uy,"__esModule",{value:!0});for(var e="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},n={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},r={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)r["f"+o]=111+o;function i(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map((function(e){return a(e,t)})),o=function(e){return r.some((function(t){return s(t,e)}))};return null==n?o:o(n)}function a(e,o){var i=o&&o.byKey,a={},s=(e=e.replace("++","+add")).split("+"),c=s.length;for(var d in t)a[t[d]]=!1;var f=!0,p=!1,h=void 0;try{for(var g,v=s[Symbol.iterator]();!(f=(g=v.next()).done);f=!0){var m=g.value,y=m.endsWith("?")&&m.length>1;y&&(m=m.slice(0,-1));var b=l(m),E=t[b];if(m.length>1&&!E&&!n[m]&&!r[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==c&&E||(i?a.key=b:a.which=u(m)),E&&(a[E]=!y||null)}}catch(e){p=!0,h=e}finally{try{!f&&v.return&&v.return()}finally{if(p)throw h}}return a}function s(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function u(e){return e=l(e),r[e]||e.toUpperCase().charCodeAt(0)}function l(e){return e=e.toLowerCase(),e=n[e]||e}return uy.default=i,uy.isHotkey=i,uy.isCodeHotkey=function(e,t){return i(e,t)},uy.isKeyHotkey=function(e,t){return i(e,{byKey:!0},t)},uy.parseHotkey=a,uy.compareHotkey=s,uy.toKeyCode=u,uy.toKeyName=l,uy}(),cy={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"},dy={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"},fy={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},py=function(e){var t=cy[e],n=dy[e],r=fy[e],o=t&&ly.isKeyHotkey(t),i=n&&ly.isKeyHotkey(n),a=r&&ly.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(eg&&i&&i(e))||!(eg||!a||!a(e)))}},hy={isBold:py("bold"),isCompose:py("compose"),isMoveBackward:py("moveBackward"),isMoveForward:py("moveForward"),isDeleteBackward:py("deleteBackward"),isDeleteForward:py("deleteForward"),isDeleteLineBackward:py("deleteLineBackward"),isDeleteLineForward:py("deleteLineForward"),isDeleteWordBackward:py("deleteWordBackward"),isDeleteWordForward:py("deleteWordForward"),isExtendBackward:py("extendBackward"),isExtendForward:py("extendForward"),isExtendLineBackward:py("extendLineBackward"),isExtendLineForward:py("extendLineForward"),isItalic:py("italic"),isMoveLineBackward:py("moveLineBackward"),isMoveLineForward:py("moveLineForward"),isMoveWordBackward:py("moveWordBackward"),isMoveWordForward:py("moveWordForward"),isRedo:py("redo"),isSplitBlock:py("splitBlock"),isTransposeCharacter:py("transposeCharacter"),isUndo:py("undo"),isTab:py("tab"),isSelectAll:py("selectAll")};function gy(e){e.preventDefault()}var vy,my={beforeinput:function(e,t,n){var r=e,o=n.getConfig().readOnly;if(ag&&!o&&Km(n,r.target)){var i=n.selection,a=r.inputType,s=r.dataTransfer||r.data||void 0;if("insertCompositionText"!==a&&"deleteCompositionText"!==a){if(r.preventDefault(),!a.startsWith("delete")||a.startsWith("deleteBy")){var u=vp(r.getTargetRanges(),1)[0];if(u){var l=sg.toSlateRange(n,u,{exactMatch:!1,suppressThrow:!1});i&&ap.Range.equals(i,l)||ap.Transforms.select(n,l)}}if(i&&ap.Range.isExpanded(i)){var c=sg.getSelectedElems(n),d="table"===c[0].type,f="table-cell"!==c[c.length-1].type;if(d&&f)return;if(a.startsWith("delete")){var p=a.endsWith("Backward")?"backward":"forward";return void ap.Editor.deleteFragment(n,{direction:p})}}switch(a){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":ap.Editor.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":ap.Editor.deleteForward(n);break;case"deleteContentBackward":ap.Editor.deleteBackward(n);break;case"deleteEntireSoftLine":ap.Editor.deleteBackward(n,{unit:"line"}),ap.Editor.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":ap.Editor.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":ap.Editor.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":ap.Editor.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":ap.Editor.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":ap.Editor.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":ap.Editor.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":ap.Editor.insertBreak(n);break;case"insertFromDrop":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromPaste"===a&&!rh.get(n))break;"[object DataTransfer]"===vh(s)?n.insertData(s):"string"==typeof s&&ap.Editor.insertText(n,s)}}}},blur:function(e,t,n){var r=e,o=t.isUpdatingSelection,i=t.latestElement;if(!n.getConfig().readOnly&&!o&&Km(n,r.target)){var a=sg.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var s=r.relatedTarget;if(!(s===sg.toDOMNode(n,n)||Ch(s)&&s.hasAttribute("data-slate-spacer"))){if(null!=s&&bh(s)&&sg.hasDOMNode(n,s)){var u=sg.toSlateNode(n,s);if(ap.Element.isElement(u)&&!n.isVoid(u))return}if(ng){var l=a.getSelection();null==l||l.removeAllRanges()}eh.delete(n)}}}},focus:function(e,t,n){var r=sg.toDOMNode(n,n),o=sg.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,tg&&e.target!==r?r.focus():eh.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&Xm(n,e.target)&&bh(e.target)){var r=sg.toSlateNode(n,e.target),o=sg.findPath(n,r);if(ap.Editor.hasPath(n,o))if(ap.Node.get(n,o)===r){var i=ap.Editor.start(n,o),a=ap.Editor.end(n,o),s=ap.Editor.void(n,{at:i}),u=ap.Editor.void(n,{at:a});if(s&&u&&ap.Path.equals(s[1],u[1])){var l=ap.Editor.range(n,i);ap.Transforms.select(n,l)}}}},compositionstart:function(e,t,n){if(Km(n,e.target)){var r=n.selection;if(r&&ap.Range.isExpanded(r)&&(ap.Editor.deleteFragment(n),Promise.resolve().then((function(){oy(t,n,!0)}))),n.selection){var o=sg.toDOMRange(n,n.selection).startContainer,i=o.textContent||"";iy.set(n,i),ay.set(n,o)}t.isComposing=!0,function(e,t){var n;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}(t,n)}},compositionend:function(e,t,n){var r=e;if(Km(n,r.target)){t.isComposing=!1;var o=n.selection;if(null!=o){(ig||tg)&&sg.cleanExposedTexNodeInSelectionBlock(n);for(var i=ap.Range.isBackward(o)?o.focus:o.anchor,a=vp(ap.Editor.node(n,[i.path[0]]),1)[0],s=0;s<i.path.length;s+=1){var u=vp(ap.Editor.node(n,i.path.slice(0,s+1)),1)[0];if(ap.Element.isElement(u)&&((ng||tg)&&"link"===u.type||"code"===u.type)){sg.setNewKey(a);break}}var l=r.data;if(l){if(n.getConfig().maxLength){var c=sg.getLeftLengthOfMaxLength(n);if(c<l.length){var d=sg.toDOMRange(n,o);d.startContainer.nodeType===Node.TEXT_NODE&&(d.startContainer.textContent=iy.get(n)||""),c>0&&ap.Editor.insertText(n,l.slice(0,c)),t.changeViewState()}else ap.Editor.insertText(n,l)}else{var f=sg.findDocumentOrShadowRoot(n).getSelection();f&&function(e,t){if(ap.Range.isCollapsed(t)){var n=t.anchor,r=t.focus;if([2,3].includes(n.path.length)&&[2,3].includes(r.path.length)&&(0===n.offset||0===r.offset)){var o=ap.Editor.node(e,n.path),i=0===n.offset?n.path:r.path,a=[i[0],i[1]-1];if(0===i[1])return!1;var s=ap.Editor.node(e,a);if(ap.Text.isText(s[0])&&ap.Text.isText(o[0]))return!0}}}(n,o)&&(n.selection=sg.toSlateRange(n,f,{exactMatch:!1,suppressThrow:!1})),ap.Editor.insertText(n,l)}ng||setTimeout((function(){var e=n.selection;if(null!=e){var t=ay.get(n);if(null!=t)sg.toDOMRange(n,e).startContainer!==t&&(t.textContent=iy.get(n)||"")}}))}}}},compositionupdate:function(e,t,n){Km(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&Km(n,r.target)){if(function(e,t){var n=Lp.get(e),r=n&&n.getMenus(),o=Mp.get(e),i=o&&o.getMenus(),a=fp(fp({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&ly.isHotkey(l,t)&&!u.isDisabled(e)){var c=u.getValue(e);u.exec(e,c)}}}(n,r),hy.isTab(r))return gy(r),void n.handleTab();if(hy.isRedo(r))return gy(r),void("function"==typeof n.redo&&n.redo());if(hy.isUndo(r))return gy(r),void("function"==typeof n.undo&&n.undo());if(hy.isMoveLineBackward(r))return gy(r),void ap.Transforms.move(n,{unit:"line",reverse:!0});if(hy.isMoveLineForward(r))return gy(r),void ap.Transforms.move(n,{unit:"line"});if(hy.isExtendLineBackward(r))return gy(r),void ap.Transforms.move(n,{unit:"line",edge:"focus",reverse:!0});if(hy.isExtendLineForward(r))return gy(r),void ap.Transforms.move(n,{unit:"line",edge:"focus"});if(hy.isMoveBackward(r))return gy(r),void(o&&ap.Range.isCollapsed(o)?ap.Transforms.move(n,{reverse:!0}):ap.Transforms.collapse(n,{edge:"start"}));if(hy.isMoveForward(r))return gy(r),void(o&&ap.Range.isCollapsed(o)?ap.Transforms.move(n):ap.Transforms.collapse(n,{edge:"end"}));if(hy.isMoveWordBackward(r))return gy(r),o&&ap.Range.isExpanded(o)&&ap.Transforms.collapse(n,{edge:"focus"}),void ap.Transforms.move(n,{unit:"word",reverse:!0});if(hy.isMoveWordForward(r))return gy(r),o&&ap.Range.isExpanded(o)&&ap.Transforms.collapse(n,{edge:"focus"}),void ap.Transforms.move(n,{unit:"word"});if(hy.isSelectAll(r))return gy(r),void n.selectAll();if(ag){if((ig||ng)&&o&&(hy.isDeleteBackward(r)||hy.isDeleteForward(r))&&ap.Range.isCollapsed(o)){var i=ap.Node.parent(n,o.anchor.path);if(ap.Element.isElement(i)&&ap.Editor.isVoid(n,i)&&ap.Editor.isInline(n,i))return r.preventDefault(),void ap.Transforms.delete(n,{unit:"block"})}}else{if(hy.isBold(r)||hy.isItalic(r)||hy.isTransposeCharacter(r))return void gy(r);if(hy.isSplitBlock(r))return gy(r),void ap.Editor.insertBreak(n);if(hy.isDeleteBackward(r))return gy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"backward"}):ap.Editor.deleteBackward(n));if(hy.isDeleteForward(r))return gy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"forward"}):ap.Editor.deleteForward(n));if(hy.isDeleteLineBackward(r))return gy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"backward"}):ap.Editor.deleteBackward(n,{unit:"line"}));if(hy.isDeleteLineForward(r))return gy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"forward"}):ap.Editor.deleteForward(n,{unit:"line"}));if(hy.isDeleteWordBackward(r))return gy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"backward"}):ap.Editor.deleteBackward(n,{unit:"word"}));if(hy.isDeleteWordForward(r))return gy(r),void(o&&ap.Range.isExpanded(o)?ap.Editor.deleteFragment(n,{direction:"forward"}):ap.Editor.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!ag&&!n.getConfig().readOnly&&Km(n,e.target)){e.preventDefault();var r=e.key;ap.Editor.insertText(n,r)}},copy:function(e,t,n){var r=e;if(Km(n,r.target)){n.getConfig().readOnly||r.preventDefault();var o=r.clipboardData;null!=o&&n.setFragmentData(o)}},cut:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&(r.preventDefault(),Km(n,r.target))){var i=r.clipboardData;if(null!=i&&(n.setFragmentData(i),o))if(ap.Range.isExpanded(o))ap.Editor.deleteFragment(n);else{var a=ap.Node.parent(n,o.anchor.path);ap.Editor.isVoid(n,a)&&ap.Transforms.delete(n)}}},paste:function(e,t,n){rh.set(n,!0);var r=e;if(!n.getConfig().readOnly&&Km(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return void rh.set(n,!1);if(!ag||function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length}(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,t,n){if(Xm(n,e.target)){var r=sg.toSlateNode(n,e.target);ap.Editor.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(Xm(n,r.target)&&!n.getConfig().readOnly){var o=sg.toSlateNode(n,r.target),i=sg.findPath(n,o);if(ap.Editor.isVoid(n,o)||ap.Editor.void(n,{at:i,voids:!0})){var a=ap.Editor.range(n,i);ap.Transforms.select(n,a)}var s=r.dataTransfer;null!=s&&(t.isDraggingInternally=!0,n.setFragmentData(s))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&Xm(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,o=r.dataTransfer;if(!n.getConfig().readOnly&&Xm(n,r.target)&&null!=o&&!(ag&&ng&&o.files.length>0)){r.preventDefault();var i=n.selection,a=sg.findEventRange(n,r);ap.Transforms.select(n,a),t.isDraggingInternally&&(i&&ap.Transforms.delete(n,{at:i}),t.isDraggingInternally=!1),n.insertData(o),n.isFocused()||n.focus()}}},yy={};function by(){if(vy)return yy;vy=1,Object.defineProperty(yy,"__esModule",{value:!0});const e={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType}};function t(e,t,n,r,o){return{sel:e,data:t,children:n,text:r,elm:o,key:void 0===t?void 0:t.key}}const n=Array.isArray;function r(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}function o(e){return void 0===e}function i(e){return void 0!==e}const a=t("",{},[],void 0,void 0);function s(e,t){var n,r;const o=e.key===t.key,i=(null===(n=e.data)||void 0===n?void 0:n.is)===(null===(r=t.data)||void 0===r?void 0:r.is);return e.sel===t.sel&&o&&i}function u(e,t,n){var r;const o={};for(let i=t;i<=n;++i){const t=null===(r=e[i])||void 0===r?void 0:r.key;void 0!==t&&(o[t]=i)}return o}const l=["create","update","remove","destroy","pre","post"];function c(e,t,n){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==n&&void 0!==t)for(let e=0;e<t.length;++e){const n=t[e].data;void 0!==n&&c(n,t[e].children,t[e].sel)}}function d(e,o,i){let a,s,u,l={};if(void 0!==i?(null!==o&&(l=o),n(i)?a=i:r(i)?s=i.toString():i&&i.sel&&(a=[i])):null!=o&&(n(o)?a=o:r(o)?s=o.toString():o&&o.sel?a=[o]:l=o),void 0!==a)for(u=0;u<a.length;++u)r(a[u])&&(a[u]=t(void 0,void 0,void 0,a[u],void 0));return"s"!==e[0]||"v"!==e[1]||"g"!==e[2]||3!==e.length&&"."!==e[3]&&"#"!==e[3]||c(l,a,e),t(e,l,a,s,void 0)}function f(e,t){e.data.fn=t.data.fn,e.data.args=t.data.args,t.data=e.data,t.children=e.children,t.text=e.text,t.elm=e.elm}function p(e){const t=e.data;f(t.fn(...t.args),e)}function h(e,t){let n;const r=e.data,o=t.data,i=r.args,a=o.args;if(r.fn===o.fn&&i.length===a.length){for(n=0;n<a.length;++n)if(i[n]!==a[n])return void f(o.fn(...a),t);f(e,t)}else f(o.fn(...a),t)}function g(e,t){const n=e.data.attachData;t.data.attachData.placeholder=n.placeholder,t.data.attachData.real=n.real,e.elm=e.data.attachData.real}function v(e,t){t.elm=t.data.attachData.placeholder}function m(e){void 0!==e.elm&&e.elm.parentNode.removeChild(e.elm),e.elm=e.data.attachData.real}function y(e,t){const n=t.elm,r=t.data.attachData,o=document.createElement("span");t.elm=o,r.target.appendChild(n),r.real=n,r.placeholder=o}function b(e,t){let n;const r=t.elm;let o=e.data.attrs,i=t.data.attrs;if((o||i)&&o!==i){for(n in o=o||{},i=i||{},i){const e=i[n];o[n]!==e&&(!0===e?r.setAttribute(n,""):!1===e?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,e):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,e):58===n.charCodeAt(5)?r.setAttributeNS("http://www.w3.org/1999/xlink",n,e):r.setAttribute(n,e))}for(n in o)n in i||r.removeAttribute(n)}}const E={create:b,update:b};function C(e,t){let n,r;const o=t.elm;let i=e.data.class,a=t.data.class;if((i||a)&&i!==a){for(r in i=i||{},a=a||{},i)i[r]&&!Object.prototype.hasOwnProperty.call(a,r)&&o.classList.remove(r);for(r in a)n=a[r],n!==i[r]&&o.classList[n?"add":"remove"](r)}}const D={create:C,update:C},w=/[A-Z]/g;function A(e,t){const n=t.elm;let r,o=e.data.dataset,i=t.data.dataset;if(!o&&!i)return;if(o===i)return;o=o||{},i=i||{};const a=n.dataset;for(r in o)i[r]||(a?r in a&&delete a[r]:n.removeAttribute("data-"+r.replace(w,"-$&").toLowerCase()));for(r in i)o[r]!==i[r]&&(a?a[r]=i[r]:n.setAttribute("data-"+r.replace(w,"-$&").toLowerCase(),i[r]))}const S={create:A,update:A};function x(e,t,n){if("function"==typeof e)e.call(t,n,t);else if("object"==typeof e)for(let r=0;r<e.length;r++)x(e[r],t,n)}function O(e,t){const n=e.type,r=t.data.on;r&&r[n]&&x(r[n],t,e)}function T(e,t){const n=e.data.on,r=e.listener,o=e.elm,i=t&&t.data.on,a=t&&t.elm;let s;if(n!==i){if(n&&r)if(i)for(s in n)i[s]||o.removeEventListener(s,r,!1);else for(s in n)o.removeEventListener(s,r,!1);if(i){const r=t.listener=e.listener||function e(t){O(t,e.vnode)};if(r.vnode=t,n)for(s in i)n[s]||a.addEventListener(s,r,!1);else for(s in i)a.addEventListener(s,r,!1)}}}const N={create:T,update:T,destroy:T};function B(e,t){let n,r,o;const i=t.elm;let a=e.data.props,s=t.data.props;if((a||s)&&a!==s)for(n in a=a||{},s=s||{},s)r=s[n],o=a[n],o===r||"value"===n&&i[n]===r||(i[n]=r)}const k={create:B,update:B},F="undefined"!=typeof window&&window.requestAnimationFrame.bind(window)||setTimeout,P=function(e){F((function(){F(e)}))};let I=!1;function R(e,t,n){P((function(){e[t]=n}))}function L(e,t){let n,r;const o=t.elm;let i=e.data.style,a=t.data.style;if(!i&&!a)return;if(i===a)return;i=i||{},a=a||{};const s="delayed"in i;for(r in i)a[r]||("-"===r[0]&&"-"===r[1]?o.style.removeProperty(r):o.style[r]="");for(r in a)if(n=a[r],"delayed"===r&&a.delayed)for(const e in a.delayed)n=a.delayed[e],s&&n===i.delayed[e]||R(o.style,e,n);else"remove"!==r&&n!==i[r]&&("-"===r[0]&&"-"===r[1]?o.style.setProperty(r,n):o.style[r]=n)}const _={pre:function(){I=!1},create:L,update:L,destroy:function(e){let t,n;const r=e.elm,o=e.data.style;if(o&&(t=o.destroy))for(n in t)r.style[n]=t[n]},remove:function(e,t){const n=e.data.style;if(!n||!n.remove)return void t();let r;I||(e.elm.offsetLeft,I=!0);const o=e.elm;let i=0;const a=n.remove;let s=0;const u=[];for(r in a)u.push(r),o.style[r]=a[r];const l=getComputedStyle(o)["transition-property"].split(", ");for(;i<l.length;++i)-1!==u.indexOf(l[i])&&s++;o.addEventListener("transitionend",(function(e){e.target===o&&--s,0===s&&t()}))}};function M(e,n){for(const r of e)null!=r&&!1!==r&&""!==r&&(Array.isArray(r)?M(r,n):"string"==typeof r||"number"==typeof r||"boolean"==typeof r?n.push(t(void 0,void 0,void 0,String(r),void 0)):n.push(r));return n}function j(e,t,...n){const r=M(n,[]);return"function"==typeof e?e(t,r):1===r.length&&!r[0].sel&&r[0].text?d(e,t,r[0].text):d(e,t,r)}return j||(j={}),yy.array=n,yy.attachTo=function(e,t){void 0===t.data&&(t.data={}),void 0===t.data.hook&&(t.data.hook={});const n=t.data,r=t.data.hook;return n.attachData={target:e,placeholder:void 0,real:void 0},r.create=y,r.prepatch=g,r.postpatch=v,r.destroy=m,t},yy.attributesModule=E,yy.classModule=D,yy.datasetModule=S,yy.eventListenersModule=N,yy.h=d,yy.htmlDomApi=e,yy.init=function(c,d){const f={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},p=void 0!==d?d:e;for(const e of l)for(const t of c){const n=t[e];void 0!==n&&f[e].push(n)}function h(e){const n=e.id?"#"+e.id:"",r=e.getAttribute("class"),o=r?"."+r.split(" ").join("."):"";return t(p.tagName(e).toLowerCase()+n+o,{},[],void 0,e)}function g(e,t){return function(){if(0==--t){const t=p.parentNode(e);p.removeChild(t,e)}}}function v(e,t){var s,u;let l,c=e.data;if(void 0!==c){const t=null===(s=c.hook)||void 0===s?void 0:s.init;i(t)&&(t(e),c=e.data)}const d=e.children,h=e.sel;if("!"===h)o(e.text)&&(e.text=""),e.elm=p.createComment(e.text);else if(void 0!==h){const o=h.indexOf("#"),s=h.indexOf(".",o),g=o>0?o:h.length,m=s>0?s:h.length,y=-1!==o||-1!==s?h.slice(0,Math.min(g,m)):h,b=e.elm=i(c)&&i(l=c.ns)?p.createElementNS(l,y,c):p.createElement(y,c);for(g<m&&b.setAttribute("id",h.slice(g+1,m)),s>0&&b.setAttribute("class",h.slice(m+1).replace(/\./g," ")),l=0;l<f.create.length;++l)f.create[l](a,e);if(n(d))for(l=0;l<d.length;++l){const e=d[l];null!=e&&p.appendChild(b,v(e,t))}else r(e.text)&&p.appendChild(b,p.createTextNode(e.text));const E=e.data.hook;i(E)&&(null===(u=E.create)||void 0===u||u.call(E,a,e),E.insert&&t.push(e))}else e.elm=p.createTextNode(e.text);return e.elm}function m(e,t,n,r,o,i){for(;r<=o;++r){const o=n[r];null!=o&&p.insertBefore(e,v(o,i),t)}}function y(e){var t,n;const r=e.data;if(void 0!==r){null===(n=null===(t=null==r?void 0:r.hook)||void 0===t?void 0:t.destroy)||void 0===n||n.call(t,e);for(let t=0;t<f.destroy.length;++t)f.destroy[t](e);if(void 0!==e.children)for(let t=0;t<e.children.length;++t){const n=e.children[t];null!=n&&"string"!=typeof n&&y(n)}}}function b(e,t,n,r){for(var o,a;n<=r;++n){let r,s;const u=t[n];if(null!=u)if(i(u.sel)){y(u),r=f.remove.length+1,s=g(u.elm,r);for(let e=0;e<f.remove.length;++e)f.remove[e](u,s);const e=null===(a=null===(o=null==u?void 0:u.data)||void 0===o?void 0:o.hook)||void 0===a?void 0:a.remove;i(e)?e(u,s):s()}else p.removeChild(e,u.elm)}}function E(e,t,n){var r,a,l,c,d;const h=null===(r=t.data)||void 0===r?void 0:r.hook;null===(a=null==h?void 0:h.prepatch)||void 0===a||a.call(h,e,t);const g=t.elm=e.elm,y=e.children,C=t.children;if(e!==t){if(void 0!==t.data){for(let n=0;n<f.update.length;++n)f.update[n](e,t);null===(c=null===(l=t.data.hook)||void 0===l?void 0:l.update)||void 0===c||c.call(l,e,t)}o(t.text)?i(y)&&i(C)?y!==C&&function(e,t,n,r){let i,a,l,c,d=0,f=0,h=t.length-1,g=t[0],y=t[h],C=n.length-1,D=n[0],w=n[C];for(;d<=h&&f<=C;)null==g?g=t[++d]:null==y?y=t[--h]:null==D?D=n[++f]:null==w?w=n[--C]:s(g,D)?(E(g,D,r),g=t[++d],D=n[++f]):s(y,w)?(E(y,w,r),y=t[--h],w=n[--C]):s(g,w)?(E(g,w,r),p.insertBefore(e,g.elm,p.nextSibling(y.elm)),g=t[++d],w=n[--C]):s(y,D)?(E(y,D,r),p.insertBefore(e,y.elm,g.elm),y=t[--h],D=n[++f]):(void 0===i&&(i=u(t,d,h)),a=i[D.key],o(a)?p.insertBefore(e,v(D,r),g.elm):(l=t[a],l.sel!==D.sel?p.insertBefore(e,v(D,r),g.elm):(E(l,D,r),t[a]=void 0,p.insertBefore(e,l.elm,g.elm))),D=n[++f]);(d<=h||f<=C)&&(d>h?(c=null==n[C+1]?null:n[C+1].elm,m(e,c,n,f,C,r)):b(e,t,d,h))}(g,y,C,n):i(C)?(i(e.text)&&p.setTextContent(g,""),m(g,null,C,0,C.length-1,n)):i(y)?b(g,y,0,y.length-1):i(e.text)&&p.setTextContent(g,""):e.text!==t.text&&(i(y)&&b(g,y,0,y.length-1),p.setTextContent(g,t.text)),null===(d=null==h?void 0:h.postpatch)||void 0===d||d.call(h,e,t)}}return function(e,t){let n,r,o;const i=[];for(n=0;n<f.pre.length;++n)f.pre[n]();for(function(e){return void 0!==e.sel}(e)||(e=h(e)),s(e,t)?E(e,t,i):(r=e.elm,o=p.parentNode(r),v(t,i),null!==o&&(p.insertBefore(o,t.elm,p.nextSibling(r)),b(o,[e],0,0))),n=0;n<i.length;++n)i[n].data.hook.insert(i[n]);for(n=0;n<f.post.length;++n)f.post[n]();return t}},yy.jsx=j,yy.primitive=r,yy.propsModule=k,yy.styleModule=_,yy.thunk=function(e,t,n,r){return void 0===r&&(r=n,n=t,t=void 0),d(e,{key:t,hook:{init:p,prepatch:h},fn:n,args:r})},yy.toVNode=function n(r,o){const i=void 0!==o?o:e;let a;if(i.isElement(r)){const e=r.id?"#"+r.id:"",a=r.getAttribute("class"),s=a?"."+a.split(" ").join("."):"",u=i.tagName(r).toLowerCase()+e+s,l={},c=[];let d,f,p;const h=r.attributes,g=r.childNodes;for(f=0,p=h.length;f<p;f++)d=h[f].nodeName,"id"!==d&&"class"!==d&&(l[d]=h[f].nodeValue);for(f=0,p=g.length;f<p;f++)c.push(n(g[f],o));return t(u,{attrs:l},c,void 0,r)}return i.isText(r)?(a=i.getTextContent(r),t(void 0,void 0,void 0,a,r)):i.isComment(r)?(a=i.getTextContent(r),t("!",{},[],a,r)):t("",{},[],void 0,r)},yy.vnode=t,yy}var Ey,Cy,Dy=by();var wy=function(){if(Cy)return Ey;Cy=1;var e,t=1/0,n="[object Symbol]",r=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,o=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i="\\ud800-\\udfff",a="\\u0300-\\u036f\\ufe20-\\ufe23",s="\\u20d0-\\u20f0",u="\\u2700-\\u27bf",l="a-z\\xdf-\\xf6\\xf8-\\xff",c="A-Z\\xc0-\\xd6\\xd8-\\xde",d="\\ufe0e\\ufe0f",f="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",p="['’]",h="["+i+"]",g="["+f+"]",v="["+a+s+"]",m="\\d+",y="["+u+"]",E="["+l+"]",C="[^"+i+f+m+u+l+c+"]",D="\\ud83c[\\udffb-\\udfff]",w="[^"+i+"]",A="(?:\\ud83c[\\udde6-\\uddff]){2}",S="[\\ud800-\\udbff][\\udc00-\\udfff]",x="["+c+"]",O="\\u200d",T="(?:"+E+"|"+C+")",N="(?:"+x+"|"+C+")",B="(?:['’](?:d|ll|m|re|s|t|ve))?",k="(?:['’](?:D|LL|M|RE|S|T|VE))?",F="(?:"+v+"|"+D+")"+"?",P="["+d+"]?",I=P+F+("(?:"+O+"(?:"+[w,A,S].join("|")+")"+P+F+")*"),R="(?:"+[y,A,S].join("|")+")"+I,L="(?:"+[w+v+"?",v,A,S,h].join("|")+")",_=RegExp(p,"g"),M=RegExp(v,"g"),j=RegExp(D+"(?="+D+")|"+L+I,"g"),H=RegExp([x+"?"+E+"+"+B+"(?="+[g,x,"$"].join("|")+")",N+"+"+k+"(?="+[g,x+T,"$"].join("|")+")",x+"?"+T+"+"+B,x+"+"+k,m,R].join("|"),"g"),z=RegExp("["+O+i+a+s+d+"]"),$=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,U="object"==typeof b&&b&&b.Object===Object&&b,V="object"==typeof self&&self&&self.Object===Object&&self,W=U||V||Function("return this")(),G=(e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(t){return null==e?void 0:e[t]});function q(e){return z.test(e)}function K(e){return q(e)?function(e){return e.match(j)||[]}(e):function(e){return e.split("")}(e)}var Y=Object.prototype.toString,X=W.Symbol,Z=X?X.prototype:void 0,J=Z?Z.toString:void 0;function Q(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&Y.call(e)==n}(e))return J?J.call(e):"";var r=e+"";return"0"==r&&1/e==-t?"-0":r}function ee(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function te(e){return null==e?"":Q(e)}var ne,re,oe=(ne=function(e,t,n){return t=t.toLowerCase(),e+(n?ie(te(t).toLowerCase()):t)},function(e){return function(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)n=t(n,e[r],r,e);return n}(function(e,t){return e=te(e),void 0===t?function(e){return $.test(e)}(e)?function(e){return e.match(H)||[]}(e):function(e){return e.match(r)||[]}(e):e.match(t)||[]}(function(e){return(e=te(e))&&e.replace(o,G).replace(M,"")}(e).replace(_,"")),ne,"")}),ie=(re="toUpperCase",function(e){var t=q(e=te(e))?K(e):void 0,n=t?t[0]:e.charAt(0),r=t?ee(t,1).join(""):e.slice(1);return n[re]()+r});return Ey=oe}(),Ay=E(wy);var Sy=["props","attrs","style","dataset","on","hook"];function xy(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(!Sy.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=Ay(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&&xy(e)}))}var Oy=[];var Ty={};function Ny(e,t,n){var r=n.isInline(e)?"span":"div";return Dy.jsx(r,null,t)}function By(e,t){var n,r=sg.findKey(t,e),o=t.isInline(e),i=ap.Editor.isVoid(t,e),a=Uh(e.type,r.id),s={id:a,key:r.id,"data-slate-node":"element","data-slate-inline":o},u=e.type,l=e.children,c=void 0===l?[]:l,d=function(e){return Ty[e]||Ny}(u);n=i?null:c.map((function(n,r){return Iy(n,r,e,t)}));var f=d(e,n,t);if(i){s["data-slate-void"]=!0;var p=o?"span":"div",h=vp(ap.Node.texts(e),1),g=vp(h[0],1)[0],v=Iy(g,0,e,t),m=Dy.jsx(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},v);f=Dy.jsx(p,{style:{position:"relative"}},f,m),Gp.set(g,0),qp.set(g,e)}return null==f.data&&(f.data={}),Object.assign(f.data,s),i||o||(f=function(e,t){var n=t;return Oy.forEach((function(r){n=r(e,t)})),n}(e,f)),hh((function(){var t=Ah(a);null!=t&&(Xp.set(r,t),Zp.set(e,t),Yp.set(t,e))})),f}function ky(e,t){return void 0===t&&(t=!1),Dy.jsx("span",{"data-slate-string":!0},t?e+"\n":e)}function Fy(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),Dy.jsx("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?Dy.jsx("br",null):null)}function Py(e,t,n){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=sg.findKey(n,e),o=n.getConfig().decorate;if(null==o)throw new Error("Can not get config.decorate");var i,a=sg.findPath(n,e),s=o([e,a]),u=ap.Text.decorations(e,s),l=u.map((function(r,o){var i=function(e,t,n,r,o){void 0===t&&(t=!1);var i=e.text,a=sg.findPath(o,n),s=ap.Path.parent(a);if(ap.Editor.isEditor(r))throw new Error("Text node ".concat(JSON.stringify(n)," parent is Editor"));return o.isVoid(r)?Fy(ap.Node.string(r).length):""!==i||r.children[r.children.length-1]!==n||o.isInline(r)||""!==ap.Editor.string(o,s)?""===i?Fy():t&&"\n"===i.slice(-1)?ky(i,!0):ky(i):Fy(0,!0)}(r,o===u.length-1,e,t,n);return i=function(e,t){var n=t;return Oy.forEach((function(t){n=t(e,n)})),n}(r,i),Dy.jsx("span",{"data-slate-leaf":!0},i)})),c=(i=r.id,"w-e-text-".concat(i)),d=Dy.jsx("span",{"data-slate-node":"text",id:c,key:r.id},l);return hh((function(){var t=Ah(c);null!=t&&(Xp.set(r,t),Zp.set(e,t),Yp.set(t,e))})),d}function Iy(e,t,n,r){return Gp.set(e,t),qp.set(e,n),ap.Element.isElement(e)?By(e,r):Py(e,n,r)}function Ry(e,t){var n,r,o=e.$scroll,i=(n=e.id,"w-e-textarea-".concat(n)),a=t.getConfig(),s=a.readOnly,u=a.autoFocus,l=function(e,t){return void 0===t&&(t=!1),Dy.h("div#".concat(e),{props:{contentEditable:!t}})}(i,s),c=t.children||[];l.children=c.map((function(e,n){var r=Iy(e,n,t,t);return xy(r),r}));var d=Up.get(e);if(null==d&&(d=!0),d){var f=function(e){return dh('<div\n id="'.concat(e,'"\n data-slate-editor\n data-slate-node="value"\n suppressContentEditableWarning\n role="textarea"\n spellCheck="true"\n autoCorrect="true"\n autoCapitalize="true"\n ></div>'))}(i);o.append(f),e.$textArea=f,r=f[0],(h=Dy.init([Dy.classModule,Dy.propsModule,Dy.styleModule,Dy.datasetModule,Dy.eventListenersModule,Dy.attributesModule]))(r,l),Up.set(e,!1),Vp.set(e,h)}else{var p=Wp.get(e),h=Vp.get(e);if(null==p||null==h)return;r=p.elm,h(p,l)}if(null!=r||null!=(r=Ah(i))){var g;if((d?u:t.isFocused())&&r.focus({preventScroll:!0}),d){var v=(g=r)&&g.ownerDocument&&g.ownerDocument.defaultView||null;v&&Qp.set(t,v)}Kp.set(t,r),Zp.set(t,r),Yp.set(r,t),Wp.set(e,l)}}var Ly=1,_y=function(){function e(e){var t=this;this.id=Ly++,this.$textArea=null,this.$progressBar=dh('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=dh('<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=qm((function(){var e=t.editorInstance;!function(e,t){var n=e.isComposing,r=e.isUpdatingSelection,o=e.isDraggingInternally;if(!(t.getConfig().readOnly||n||r||o)){var i=sg.findDocumentOrShadowRoot(t),a=i.activeElement,s=sg.toDOMNode(t,t),u=i.getSelection();if(a!==s)return eh.delete(t),void ap.Transforms.deselect(t);if(e.latestElement=a,eh.set(t,!0),!u)return ap.Transforms.deselect(t);var l=u.anchorNode,c=u.focusNode,d=Km(t,l)||Ym(t,l),f=Km(t,c)||Ym(t,c);if(d&&f){var p=sg.toSlateRange(t,u,{exactMatch:!1,suppressThrow:!1});ap.Transforms.select(t,p)}}}(t,e)}),100);var n=dh(e);if(0===n.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=n;var r=dh('<div class="w-e-text-container"></div>');r.append(this.$progressBar),r.append(this.$maxLengthInfo),n.append(r);var o=dh('<div class="w-e-scroll"></div>');r.append(o),this.$scroll=o,this.$textAreaContainer=r,hh((function(){var e=t.editorInstance,o=sg.getWindow(e);o.document.addEventListener("selectionchange",t.onDOMSelectionChange),e.on(Tp.DESTROYED,(function(){o.document.removeEventListener("selectionchange",t.onDOMSelectionChange)})),r.on("click",(function(){return e.hidePanelOrModal()})),e.on(Tp.CHANGE,t.changeViewState.bind(t));var i=e.getConfig(),a=i.onChange,s=i.scroll;a&&e.on(Tp.CHANGE,(function(){return a(e)})),s||(n.css("position","relative"),r.addClass("no-scroll")),t.onFocusAndOnBlur(),e.on(Tp.CHANGE,t.changeMaxLengthInfo.bind(t)),t.bindEvent()}))}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=Ip.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(xp(my,(function(n,o){t.on(o,(function(t){n(t,e,r)}))})),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",qm((function(){r.emit("scroll")}),100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on(Tp.CHANGE,(function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout((function(){return o&&o(t)})):null!=e.latestEditorSelection&&null==t.selection&&setTimeout((function(){return r&&r(t)})),e.latestEditorSelection=t.selection}))},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-sg.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;Ry(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var o=t.isEmpty();if(o&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var i=dh('<div class="w-e-text-placeholder">'.concat(r,"</div>"));e.$textAreaContainer.append(i),e.$placeholder=i}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!o&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),hh((function(){oy(e,t)}))},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function My(e,t,n,r){if(Gp.set(e,t),qp.set(e,n),ap.Element.isElement(e)){var o=e.children;if((void 0===o?[]:o).forEach((function(t,n){return My(t,n,e,r)})),ap.Editor.isVoid(r,e)){var i=vp(ap.Node.texts(e),1),a=vp(i[0],1)[0];Gp.set(a,0),qp.set(a,e)}}}var jy=300,Hy={heightWarning:{en:"Textarea height < 300px. This may cause modal and hoverbar position error",zh:"编辑区域高度 < 300px 这可能会导致 modal hoverbar 定位异常"}};function zy(e){var t=e.selector,n=void 0===t?"":t,r=e.config,o=void 0===r?{}:r,i=e.content,a=e.html,s=e.plugins,u=void 0===s?[]:s,l=function(e){return[bv,ev,oh,Jg,Ov,mv,Ev,lp.withHistory].reduce((function(e,t){return t(e)}),e)}(ap.createEditor());if(n&&function(e,t){return zh(e,"data-w-e-textarea",t)}(l,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var c=function(e){void 0===e&&(e={});var t=Ap(Op),n={},r=e.MENU_CONF,o=void 0===r?{}:r;return xp(t,(function(e,t){n[t]=fp(fp({},e),o[t]||{})})),delete e.MENU_CONF,fp({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(o);$p.set(l,c);var d=c.hoverbarKeys,f=void 0===d?{}:d;if(u.forEach((function(e){l=e(l)})),l.children=function(e,t){var n;return null!=t.html?$h(e,t.html):(null===(n=t.content)||void 0===n?void 0:n.length)?t.content:[{type:"paragraph",children:[{text:""}]}]}(l,{html:a,content:i}),n){var p=new _y(n);Pp.set(l,p),Ip.set(p,l),p.changeViewState(),hh((function(){var e=p.$scroll;null!=e&&e.height()<jy&&console.warn("".concat(Hy.heightWarning.zh,"\n").concat(Hy.heightWarning.en),{element:e,height:e.height()})}));var h=void 0;Object.keys(f).length>0&&(h=new Wm,_p.set(h,l),Mp.set(l,h)),l.on(Tp.CHANGE,(function(){l.hidePanelOrModal()})),l.on(Tp.SCROLL,(function(){l.hidePanelOrModal()}))}else l.children.forEach((function(e,t){return My(e,t,l,l)}));var g=c.onCreated,v=c.onDestroyed;return g&&l.on(Tp.CREATED,(function(){return g(l)})),v&&l.on(Tp.DESTROYED,(function(){return v(l)})),hh((function(){return l.emit("created")})),l}var $y=function(){function e(e,t){var n=this;this.$toolbar=dh('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=Nv((function(){n.toolbarItems.forEach((function(e){e.changeMenuState()}))}),200),this.config=t;var r=dh(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var o=this.$toolbar;o.on("mousedown",(function(e){return e.preventDefault()}),{passive:!1}),r.append(o),hh((function(){n.initToolbar(),n.lngListen=Cm((function(){return n.initToolbar()})),n.getEditorInstance().on(Tp.CHANGE,n.changeToolbarState)}))}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.initToolbar=function(){this.menus={};var e=this.$toolbar;null==e||e.empty(),this.registerItems(),this.changeToolbarState()},e.prototype.registerItems=function(){var e=this,t="",n=this.$toolbar,r=this.config,o=r.toolbarKeys,i=void 0===o?[]:o,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=r.excludeKeys,l=void 0===u?[]:u,c=Ap(i);s.keys.length>0&&("string"==typeof s.keys&&(s.keys=[s.keys]),s.keys.forEach((function(e,t){c.splice(s.index+t,0,e)})));var d=c.filter((function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)})),f=d.length;d.forEach((function(r,o){if("|"===r){if(0===o)return;if(o+1===f)return;if("|"===t)return;var i=Sm();return n.append(i),void(t=r)}if("string"==typeof r)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t="group"}))},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new Mm(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 Mm,o=this.menus,i=o[e];if(null==i){var a=Np[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=zm(e,i,r);(this.toolbarItems.push(u),jp.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=Rp.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.destroy=function(){var e;this.$toolbar.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.toolbarItems=[]},e}();function Uy(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 zh(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=fp({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new $y(n,i);return Rp.set(a,e),Lp.set(e,a),a}var Vy,Wy,Gy,qy,Ky,Yy={exports:{}},Xy={};function Zy(){if(Gy)return Xy;Gy=1,Object.defineProperty(Xy,"__esModule",{value:!0}),Xy.justErrorsLogger=Xy.debugLogger=void 0;const e=function(){if(Wy)return Vy;function e(e){return e<10?`0${e}`:e.toString()}return Wy=1,Vy=function(){const t=new Date;return`${e(t.getHours())}:${e(t.getMinutes())}:${e(t.getSeconds())}`}}(),t={debug:()=>{},warn:()=>{},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};Xy.justErrorsLogger=t;const n={debug:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.debug(`[Uppy] [${e()}]`,...n)},warn:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.warn(`[Uppy] [${e()}]`,...n)},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};return Xy.debugLogger=n,Xy}function Jy(){if(Ky)return qy;Ky=1;return qy={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t)=>()=>{let n="",r=t;for(;r--;)n+=e[Math.random()*e.length|0];return n}},qy}var Qy,eb,tb,nb,rb,ob,ib,ab,sb,ub,lb,cb,db,fb,pb,hb,gb,vb,mb,yb,bb,Eb,Cb,Db,wb,Ab,Sb,xb,Ob,Tb,Nb,Bb={};function kb(){return eb?Qy:(eb=1,Qy=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var o=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o})}function Fb(){if(nb)return tb;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return nb=1,e.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<i;t++)"*"!==o[t]&&(r=t<n.length&&o[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var a in r={},e)this.match(a)&&(r[a]=e[a]);return r},tb=function(t,n,r){var o=new e(t,r||/[\/\.]/);return void 0!==n?o.match(n):o}}function Pb(){if(ib)return Bb;ib=1,Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.defaultOptions=Bb.RestrictionError=Bb.Restricter=void 0;const e=kb(),t=function(){if(ob)return rb;ob=1;var e=Fb(),t=/[\/\+\.]/;return rb=function(n,r){function o(r){var o=e(r,n,t);return o&&o.length>=2}return r?o(r.split(";")[0]):o}}();Bb.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class n extends Error{constructor(){super(...arguments),this.isRestriction=!0}}Bb.RestrictionError=n,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});return Bb.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(r,o){const{maxFileSize:i,minFileSize:a,maxTotalFileSize:s,maxNumberOfFiles:u,allowedFileTypes:l}=this.getOpts().restrictions;if(u){const e=o.filter((e=>!e.isGhost));if(e.length+1>u)throw new n(`${this.i18n("youCanOnlyUploadX",{smart_count:u})}`)}if(l){if(!l.some((e=>e.includes("/")?!!r.type&&t(r.type.replace(/;.*?$/,""),e):!("."!==e[0]||!r.extension)&&r.extension.toLowerCase()===e.slice(1).toLowerCase()))){const e=l.join(", ");throw new n(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(s&&null!=r.size){const t=o.reduce(((e,t)=>e+t.size),r.size);if(t>s)throw new n(this.i18n("exceedsSize",{size:e(s),file:r.name}))}if(i&&null!=r.size&&r.size>i)throw new n(this.i18n("exceedsSize",{size:e(i),file:r.name}));if(a&&null!=r.size&&r.size<a)throw new n(this.i18n("inferiorSize",{size:e(a)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new n(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new n(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:r}=this.getOpts().restrictions,o=Object.prototype.hasOwnProperty,i=[];for(const t of r)o.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}},Bb}function Ib(){if(sb)return ab;return sb=1,ab=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}function Rb(){if(lb)return ub;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}lb=1;var t=0;function n(e){return"__private_"+t+++"_"+e}const r=Ib();function o(e,t,n){const r=[];return e.forEach((e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach(((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(n)})))),r}
|
|
9
9
|
/**
|
|
10
10
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
11
11
|
* and replaces it with values from options `{smart_count: 5}`
|
|
@@ -16,7 +16,7 @@ function e(e){return"[object Object]"===Object.prototype.toString.call(e)}return
|
|
|
16
16
|
* @param {string} phrase that needs interpolation, with placeholders
|
|
17
17
|
* @param {object} options with values that will be used to replace placeholders
|
|
18
18
|
* @returns {any[]} interpolated
|
|
19
|
-
*/function i(e,t){const n=/\$/g;let r=[e];if(null==t)return r;for(const e of Object.keys(t))if("_"!==e){let i=t[e];"string"==typeof i&&(i=n[Symbol.replace](i,"$$$$")),r=o(r,new RegExp(`%\\{${e}\\}`,"g"),i)}return r}var a=n("apply");function s(e){if(null==e||!e.strings)return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}return lb=class{constructor(t){Object.defineProperty(this,a,{value:s}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(t)?t.forEach(e(this,a)[a],this):e(this,a)[a](t)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!r(this.locale.strings,e))throw new Error(`missing string: ${e}`);const n=this.locale.strings[e];if("object"==typeof n){if(t&&void 0!==t.smart_count){return i(n[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return i(n,t)}},lb}function _b(){return fb||(fb=1,db=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,o,i,a,s){var u=function(e){var n=t[e]?t[e]:[],r=e.indexOf(":"),o=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],i=Object.keys(t),a=0,s=i.length;for(;a<s;a++){var u=i[a];if("*"===u&&(n=n.concat(t[u])),2===o.length&&o[0]===u){n=n.concat(t[u]);break}}return n}(e);u.length&&function(e,t,n){var r=0,o=t.length;for(;r<o&&t[r];r++)t[r].event=e,t[r].apply(t[r],n)}(e,u,[n,r,o,i,a,s])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,(function r(){n.apply(this,arguments),e.off(t,r)}))},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],o=0,i=r?r.length:0;o<i;o++)r[o]!==t&&n.push(r[o]);n.length?this._fns[e]=n:delete this._fns[e]},e}),db}function Mb(){if(hb)return pb;hb=1;var e=0;function t(t){return"__private_"+e+++"_"+t}var n=t("publish");class r{constructor(){Object.defineProperty(this,n,{value:o}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},r={...this.state,...e};this.state=r,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,n)[n](t,r,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach((e=>{e(...t)}))}return r.VERSION="2.1.1",pb=function(){return new r}}function jb(){if(vb)return gb;return vb=1,gb=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}}function Hb(){return yb?mb:(yb=1,mb={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"})}function zb(){if(Bb)return Nb;Bb=1;var e=Qy(),t=Jy(),n=Ib();let r,o;function i(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var a=0;function s(e){return"__private_"+a+++"_"+e}const u=Lb(),l=_b(),c=qm(),d=Mb(),f=function(){if(Eb)return bb;Eb=1;const e=jb(),t=Hb();return bb=function(n){var r;if(n.type)return n.type;const o=n.name?null==(r=e(n.name).extension)?void 0:r.toLowerCase():null;return o&&o in t?t[o]:"application/octet-stream"}}(),p=jb(),h=function(){if(Db)return Cb;function e(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}return Db=1,Cb=function(t){let n="uppy";return"string"==typeof t.name&&(n+=`-${e(t.name.toLowerCase())}`),void 0!==t.type&&(n+=`-${t.type}`),t.meta&&"string"==typeof t.meta.relativePath&&(n+=`-${e(t.meta.relativePath.toLowerCase())}`),void 0!==t.data.size&&(n+=`-${t.data.size}`),void 0!==t.data.lastModified&&(n+=`-${t.data.lastModified}`),n}}(),g=(Ab||(Ab=1,wb=function(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[r,o]=n.split(".");return r=parseInt(r,10),o=parseInt(o,10),r<15||15===r&&o<15063||r>18||18===r&&o>=18218}),wb),v=xb?Sb:(xb=1,Sb=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}),m=Tb?Ob:(Tb=1,Ob={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}});var y=s("plugins"),b=s("restricter"),E=s("storeUnsubscribe"),C=s("emitter"),D=s("preProcessors"),w=s("uploaders"),A=s("postProcessors"),S=s("informAndEmit"),x=s("checkRequiredMetaFieldsOnFile"),O=s("checkRequiredMetaFields"),T=s("assertNewUploadAllowed"),N=s("checkAndCreateFileStateObject"),B=s("startIfAutoProceed"),k=s("addListeners"),F=s("updateOnlineStatus"),P=s("createUpload"),I=s("getUpload"),R=s("removeUpload"),L=s("runUpload");r=Symbol.for("uppy test: getPlugins"),o=Symbol.for("uppy test: createUpload");class _{constructor(e){Object.defineProperty(this,L,{value:K}),Object.defineProperty(this,R,{value:q}),Object.defineProperty(this,I,{value:G}),Object.defineProperty(this,P,{value:W}),Object.defineProperty(this,k,{value:V}),Object.defineProperty(this,B,{value:U}),Object.defineProperty(this,N,{value:$}),Object.defineProperty(this,T,{value:z}),Object.defineProperty(this,O,{value:H}),Object.defineProperty(this,x,{value:j}),Object.defineProperty(this,S,{value:M}),Object.defineProperty(this,y,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,E,{writable:!0,value:void 0}),Object.defineProperty(this,C,{writable:!0,value:l()}),Object.defineProperty(this,D,{writable:!0,value:new Set}),Object.defineProperty(this,w,{writable:!0,value:new Set}),Object.defineProperty(this,A,{writable:!0,value:new Set}),Object.defineProperty(this,F,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=m;const r={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:n.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:d(),logger:t.justErrorsLogger,infoTimeout:5e3};this.opts={...r,...e,restrictions:{...r.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=t.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=c(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:g(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),i(this,b)[b]=new n.Restricter((()=>this.opts),this.i18n),i(this,E)[E]=this.store.subscribe(((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),i(this,k)[k]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i(this,C)[C].emit(e,...n)}on(e,t){return i(this,C)[C].on(e,t),this}once(e,t){return i(this,C)[C].once(e,t),this}off(e,t){return i(this,C)[C].off(e,t),this}updateAll(e){this.iteratePlugins((t=>{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new u([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((e=>{e.setOptions()})),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach((r=>{const o={...t[r]};o.progress={...o.progress,...e},n[r]=o})),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){i(this,D)[D].add(e)}removePreProcessor(e){return i(this,D)[D].delete(e)}addPostProcessor(e){i(this,A)[A].add(e)}removePostProcessor(e){return i(this,A)[A].delete(e)}addUploader(e){i(this,w)[w].add(e)}removeUploader(e){return i(this,w)[w].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach((t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),o=r.filter((e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted})),i=r.filter((e=>!e.progress.uploadStarted)),a=r.filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess)),s=r.filter((e=>e.progress.uploadStarted)),u=r.filter((e=>e.isPaused)),l=r.filter((e=>e.progress.uploadComplete)),c=r.filter((e=>e.error)),d=o.filter((e=>!e.isPaused)),f=r.filter((e=>e.progress.preprocess||e.progress.postprocess));return{newFiles:i,startedFiles:a,uploadStartedFiles:s,pausedFiles:u,completeFiles:l,erroredFiles:c,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:f,isUploadStarted:s.length>0,isAllComplete:100===t&&l.length===r.length&&0===f.length,isAllErrored:!!n&&c.length===r.length,isAllPaused:0!==o.length&&u.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:r.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return i(this,b)[b].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){i(this,T)[T](e);const{files:t}=this.getState();let n=i(this,N)[N](t,e);return t[n.id]&&t[n.id].isGhost&&(n={...t[n.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...t,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),i(this,B)[B](),n.id}addFiles(e){i(this,T)[T]();const t={...this.getState().files},n=[],r=[];for(let o=0;o<e.length;o++)try{let r=i(this,N)[N](t,e[o]);t[r.id]&&t[r.id].isGhost&&(r={...t[r.id],data:e[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${r.name}, ${r.id}`)),t[r.id]=r,n.push(r)}catch(e){e.isRestriction||r.push(e)}if(this.setState({files:t}),n.forEach((e=>{this.emit("file-added",e)})),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach((e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)})),n.length>0&&i(this,B)[B](),r.length>0){let e="Multiple errors occurred while adding files:\n";if(r.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(r,e);{const t=new Error(e);throw t.errors=r,t}}}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),o={...n},i={...r},a=Object.create(null);function s(e){return void 0===a[e]}e.forEach((e=>{n[e]&&(a[e]=n[e],delete o[e])})),Object.keys(i).forEach((e=>{const t=r[e].fileIDs.filter(s);if(0===t.length)return void delete i[e];const{capabilities:n}=this.getState();if(t.length!==r[e].fileIDs.length&&!n.individualCancellation)throw new Error("individualCancellation is disabled");i[e]={...r[e],fileIDs:t}}));const u={currentUploads:i,files:o};0===Object.keys(o).length&&(u.allowNewUpload=!0,u.error=null,u.recoveredState=null),this.setState(u),this.calculateTotalProgress();const l=Object.keys(a);l.forEach((e=>{this.emit("file-removed",a[e],t)})),l.length>5?this.log(`Removed ${l.length} files`):this.log(`Removed files: ${l.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!0};e[t]=n})),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=i(this,P)[P](t,{forceAllowNewUpload:!0});return i(this,L)[L](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=i(this,P)[P]([e],{forceAllowNewUpload:!0});return i(this,L)[L](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins((e=>{e.provider&&e.provider.logout&&e.provider.logout()}))}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),n=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,r=n.reduce(((e,t)=>e+t.progress.percentage),0),o=Math.round(r/t*100);return void this.setState({totalProgress:o})}let r=t.reduce(((e,t)=>e+t.progress.bytesTotal),0);const o=r/t.length;r+=o*n.length;let i=0;t.forEach((e=>{i+=e.progress.bytesUploaded})),n.forEach((e=>{i+=o*(e.progress.percentage||0)/100}));let a=0===r?0:Math.round(i/r*100);a>100&&(a=100),this.setState({totalProgress:a}),this.emit("progress",a)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`)}const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(r);if(o){const e=`Already found a plugin named '${o.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in i(this,y)[y]?i(this,y)[y][n.type].push(n):i(this,y)[y][n.type]=[n],n.install(),this}getPlugin(e){for(const t of Object.values(i(this,y)[y])){const n=t.find((t=>t.id===e));if(null!=n)return n}}[r](e){return i(this,y)[y][e]}iteratePlugins(e){Object.values(i(this,y)[y]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=i(this,y)[y][e.type],n=t.findIndex((t=>t.id===e.id));-1!==n&&t.splice(n,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),i(this,E)[E](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",i(this,F)[F]),window.removeEventListener("offline",i(this,F)[F]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout((()=>this.hideInfo()),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?i(this,L)[L](e):(i(this,R)[R](e),Promise.reject(new Error("Nonexistent upload")))}[o](){return i(this,P)[P](...arguments)}addResultData(e,t){if(!i(this,I)[I](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=i(this,y)[y].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const r=this.opts.onBeforeUpload(t);return!1===r?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&"object"==typeof r&&(t=r,this.setState({files:t})),Promise.resolve().then((()=>i(this,b)[b].validateMinNumberOfFiles(t))).catch((e=>{throw i(this,S)[S](e),e})).then((()=>{if(!i(this,O)[O](t))throw new n.RestrictionError(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap((e=>e.fileIDs)),r=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)}));const o=i(this,P)[P](r);return i(this,L)[L](o)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function M(e,t){const{message:n,details:r=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:n,details:r},"error",this.opts.infoTimeout),this.log(`${n} ${r}`.trim(),"error")}function j(e){const{missingFields:t,error:n}=i(this,b)[b].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),!1)}function H(e){let t=!0;for(const n of Object.values(e))i(this,x)[x](n)||(t=!1);return t}function z(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new n.RestrictionError(this.i18n("noMoreFilesAllowed"));throw i(this,S)[S](t,e),t}}function $(e,t){const r=f(t),o=v(r,t),a=p(o).extension,s=Boolean(t.isRemote),u=h({...t,type:r});if(this.checkIfFileAlreadyExists(u)){const e=new n.RestrictionError(this.i18n("noDuplicates",{fileName:o}));throw i(this,S)[S](e,t),e}const l=t.meta||{};l.name=o,l.type=r;const c=Number.isFinite(t.data.size)?t.data.size:null;let d={source:t.source||"",id:u,name:o,extension:a||"",meta:{...this.getState().meta,...l},type:r,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isRemote:s,remote:t.remote||"",preview:t.preview};const g=this.opts.onBeforeFileAdded(d,e);if(!1===g){const e=new n.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof g&&null!==g&&(d=g);try{const t=Object.keys(e).map((t=>e[t]));i(this,b)[b].validate(d,t)}catch(e){throw i(this,S)[S](e,d),e}return d}function U(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((e=>{e.isRestriction||this.log(e.stack||e.message||e)}))}),4))}function V(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",((t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){const e=new Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),i(this,S)[S](e)}else i(this,S)[S](n)})),this.on("upload",(()=>{this.setState({error:null})})),this.on("upload-started",(e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:i(this,A)[A].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("preprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})})),this.on("postprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("postprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&i(this,x)[x](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",i(this,F)[F]),window.addEventListener("offline",i(this,F)[F]),setTimeout(i(this,F)[F],3e3))}function W(t,n){void 0===n&&(n={});const{forceAllowNewUpload:r=!1}=n,{allowNewUpload:o,currentUploads:i}=this.getState();if(!o&&!r)throw new Error("Cannot create a new upload: already uploading.");const a=(0,e.nanoid)();return this.emit("upload",{id:a,fileIDs:t}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...i,[a]:{fileIDs:t,step:0,result:{}}}}),a}function G(e){const{currentUploads:t}=this.getState();return t[e]}function q(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function K(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,o=[...i(this,D)[D],...i(this,w)[w],...i(this,A)[A]];try{for(let i=r;i<o.length&&n;i++){const r=o[i],a={...n,step:i};this.setState({currentUploads:{...t,[e]:a}}),await r(a.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(t){throw i(this,R)[R](e),t}if(n){n.fileIDs.forEach((e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const r=n.fileIDs.map((e=>this.getFile(e))),o=r.filter((e=>!e.error)),i=r.filter((e=>e.error));await this.addResultData(e,{successful:o,failed:i,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let a;return n&&(a=n.result,this.emit("complete",a),i(this,R)[R](e)),null==a&&this.log(`Not setting result for an upload that has been removed: ${e}`),a}return _.VERSION="2.3.4",Nb=_}var $b,Ub,Vb,Wb,Gb,qb,Kb,Yb,Xb={},Zb=[],Jb=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Qb(e,t){for(var n in t)e[n]=t[n];return e}function eE(e){var t=e.parentNode;t&&t.removeChild(e)}function tE(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?$b.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return nE(e,a,r,o,null)}function nE(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++Vb:o};return null==o&&null!=Ub.vnode&&Ub.vnode(i),i}function rE(e){return e.children}function oE(e,t){this.props=e,this.context=t}function iE(e,t){if(null==t)return e.__?iE(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?iE(e):null}function aE(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return aE(e)}}function sE(e){(!e.__d&&(e.__d=!0)&&Gb.push(e)&&!uE.__r++||Kb!==Ub.debounceRendering)&&((Kb=Ub.debounceRendering)||qb)(uE)}function uE(){for(var e;uE.__r=Gb.length;)e=Gb.sort((function(e,t){return e.__v.__b-t.__v.__b})),Gb=[],e.some((function(e){var t,n,r,o,i,a;e.__d&&(i=(o=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=Qb({},o)).__v=o.__v+1,vE(a,o,r,t.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?iE(o):i,o.__h),mE(n,o),o.__e!=i&&aE(o)))}))}function lE(e,t,n,r,o,i,a,s,u,l){var c,d,f,p,h,g,v,m=r&&r.__k||Zb,y=m.length;for(n.__k=[],c=0;c<t.length;c++)if(null!=(p=n.__k[c]=null==(p=t[c])||"boolean"==typeof p?null:"string"==typeof p||"number"==typeof p||"bigint"==typeof p?nE(null,p,null,null,p):Array.isArray(p)?nE(rE,{children:p},null,null,null):p.__b>0?nE(p.type,p.props,p.key,null,p.__v):p)){if(p.__=n,p.__b=n.__b+1,null===(f=m[c])||f&&p.key==f.key&&p.type===f.type)m[c]=void 0;else for(d=0;d<y;d++){if((f=m[d])&&p.key==f.key&&p.type===f.type){m[d]=void 0;break}f=null}vE(e,p,f=f||Xb,o,i,a,s,u,l),h=p.__e,(d=p.ref)&&f.ref!=d&&(v||(v=[]),f.ref&&v.push(f.ref,null,p),v.push(d,p.__c||h,p)),null!=h?(null==g&&(g=h),"function"==typeof p.type&&p.__k===f.__k?p.__d=u=cE(p,u,e):u=dE(e,p,f,m,h,u),"function"==typeof n.type&&(n.__d=u)):u&&f.__e==u&&u.parentNode!=e&&(u=iE(f))}for(n.__e=g,c=y;c--;)null!=m[c]&&("function"==typeof n.type&&null!=m[c].__e&&m[c].__e==n.__d&&(n.__d=iE(r,c+1)),EE(m[c],m[c]));if(v)for(c=0;c<v.length;c++)bE(v[c],v[++c],v[++c])}function cE(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?cE(r,t,n):dE(n,r,r,o,r.__e,t));return t}function dE(e,t,n,r,o,i){var a,s,u;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),a=null;else{for(s=i,u=0;(s=s.nextSibling)&&u<r.length;u+=2)if(s==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function fE(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||Jb.test(t)?n:n+"px"}function pE(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||fE(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||fE(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?gE:hE,i):e.removeEventListener(t,i?gE:hE,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function hE(e){this.l[e.type+!1](Ub.event?Ub.event(e):e)}function gE(e){this.l[e.type+!0](Ub.event?Ub.event(e):e)}function vE(e,t,n,r,o,i,a,s,u){var l,c,d,f,p,h,g,v,m,y,b,E=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,s=t.__e=n.__e,t.__h=null,i=[s]),(l=Ub.__b)&&l(t);try{e:if("function"==typeof E){if(v=t.props,m=(l=E.contextType)&&r[l.__c],y=l?m?m.props.value:l.__:r,n.__c?g=(c=t.__c=n.__c).__=c.__E:("prototype"in E&&E.prototype.render?t.__c=c=new E(v,y):(t.__c=c=new oE(v,y),c.constructor=E,c.render=CE),m&&m.sub(c),c.props=v,c.state||(c.state={}),c.context=y,c.__n=r,d=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=E.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=Qb({},c.__s)),Qb(c.__s,E.getDerivedStateFromProps(v,c.__s))),f=c.props,p=c.state,d)null==E.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==E.getDerivedStateFromProps&&v!==f&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(v,y),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(v,c.__s,y)||t.__v===n.__v){c.props=v,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),c.__h.length&&a.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(v,c.__s,y),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(f,p,h)}))}c.context=y,c.props=v,c.state=c.__s,(l=Ub.__r)&&l(t),c.__d=!1,c.__v=t,c.__P=e,l=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=Qb(Qb({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(f,p)),b=null!=l&&l.type===rE&&null==l.key?l.props.children:l,lE(e,Array.isArray(b)?b:[b],t,n,r,o,i,a,s,u),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),g&&(c.__E=c.__=null),c.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=yE(n.__e,t,n,r,o,i,a,u);(l=Ub.diffed)&&l(t)}catch(e){t.__v=null,(u||null!=i)&&(t.__e=s,t.__h=!!u,i[i.indexOf(s)]=null),Ub.__e(e,t,n)}}function mE(e,t){Ub.__c&&Ub.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){Ub.__e(e,t.__v)}}))}function yE(e,t,n,r,o,i,a,s){var u,l,c,d=n.props,f=t.props,p=t.type,h=0;if("svg"===p&&(o=!0),null!=i)for(;h<i.length;h++)if((u=i[h])&&"setAttribute"in u==!!p&&(p?u.localName===p:3===u.nodeType)){e=u,i[h]=null;break}if(null==e){if(null===p)return document.createTextNode(f);e=o?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,f.is&&f),i=null,s=!1}if(null===p)d===f||s&&e.data===f||(e.data=f);else{if(i=i&&$b.call(e.childNodes),l=(d=n.props||Xb).dangerouslySetInnerHTML,c=f.dangerouslySetInnerHTML,!s){if(null!=i)for(d={},h=0;h<e.attributes.length;h++)d[e.attributes[h].name]=e.attributes[h].value;(c||l)&&(c&&(l&&c.__html==l.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||pE(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||pE(e,i,t[i],n[i],r)}(e,f,d,o,s),c)t.__k=[];else if(h=t.props.children,lE(e,Array.isArray(h)?h:[h],t,n,r,o&&"foreignObject"!==p,i,a,i?i[0]:n.__k&&iE(n,0),s),null!=i)for(h=i.length;h--;)null!=i[h]&&eE(i[h]);s||("value"in f&&void 0!==(h=f.value)&&(h!==d.value||h!==e.value||"progress"===p&&!h)&&pE(e,"value",h,d.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==e.checked&&pE(e,"checked",h,d.checked,!1))}return e}function bE(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){Ub.__e(e,n)}}function EE(e,t,n){var r,o;if(Ub.unmount&&Ub.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||bE(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){Ub.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&EE(r[o],t,"function"!=typeof e.type);n||null==e.__e||eE(e.__e),e.__e=e.__d=void 0}function CE(e,t,n){return this.constructor(e,n)}function DE(e,t,n){var r,o,i;Ub.__&&Ub.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],vE(t,e=(!r&&n||t).__k=tE(rE,null,[e]),o||Xb,Xb,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?$b.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),mE(i,e)}$b=Zb.slice,Ub={__e:function(e,t){for(var n,r,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),o=n.__d),o)return n.__E=n}catch(t){e=t}throw e}},Vb=0,Wb=function(e){return null!=e&&void 0===e.constructor},oE.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Qb({},this.state),"function"==typeof e&&(e=e(Qb({},n),this.props)),e&&Qb(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),sE(this))},oE.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),sE(this))},oE.prototype.render=rE,Gb=[],qb="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,uE.__r=0,Yb=0;var wE,AE,SE,xE,OE,TE,NE,BE,kE,FE,PE,IE=Object.freeze({__proto__:null,Component:oE,Fragment:rE,cloneElement:function(e,t,n){var r,o,i,a=Qb({},e.props);for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];return arguments.length>2&&(a.children=arguments.length>3?$b.call(arguments,2):n),nE(e.type,a,r||e.key,o||e.ref,null)},createContext:function(e,t){var n={__c:t="__cC"+Yb++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(sE)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},createElement:tE,createRef:function(){return{current:null}},h:tE,hydrate:function e(t,n){DE(t,n,e)},get isValidElement(){return Wb},get options(){return Ub},render:DE,toChildArray:function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){e(t,n)})):n.push(t)),n}}),RE=C(IE);function LE(){if(xE)return SE;xE=1;const e=AE?wE:(AE=1,wE=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE});return SE=function(t,n){return void 0===n&&(n=document),"string"==typeof t?n.querySelector(t):e(t)?t:null}}function _E(){if(BE)return NE;BE=1;const e=Lb();return NE=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new e([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}}}function ME(){if(FE)return kE;FE=1;var e=RE;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function r(e){return"__private_"+n+++"_"+e}const o=LE(),i=TE?OE:(TE=1,OE=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir}),a=_E();var s=r("updateUI");class u extends a{constructor(){super(...arguments),Object.defineProperty(this,s,{writable:!0,value:void 0})}mount(n,r){const a=r.id,l=o(n);if(l){this.isTargetDOMEl=!0;const r=document.createElement("div");return r.classList.add("uppy-Root"),t(this,s)[s]=function(e){let t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=o,t||(t=Promise.resolve().then((()=>(t=null,e(...n))))),t}}((t=>{this.uppy.getPlugin(this.id)&&((0,e.render)(this.render(t),r),this.afterUpdate())})),this.uppy.log(`Installing ${a} to a DOM element '${n}'`),this.opts.replaceTargetContent&&(l.innerHTML=""),(0,e.render)(this.render(this.uppy.getState()),r),this.el=r,l.appendChild(r),r.dir=this.opts.direction||i(r)||"ltr",this.onMount(),this.el}let c;if("object"==typeof n&&n instanceof u)c=n;else if("function"==typeof n){const e=n;this.uppy.iteratePlugins((t=>{t instanceof e&&(c=t)}))}if(c)return this.uppy.log(`Installing ${a} to ${c.id}`),this.parent=c,this.el=c.addTarget(r),this.onMount(),this.el;this.uppy.log(`Not installing ${a}`);let d=`Invalid target option given to ${a}.`;throw d+="function"==typeof n?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(d)}update(e){var n,r;null!=this.el&&(null==(n=(r=t(this,s))[s])||n.call(r,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove());this.onUnmount()}onMount(){}onUnmount(){}}return kE=u}var jE,HE,zE=(PE||(PE=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return n.debugLogger}});var n=Jy();e.exports=zb();const r=ME();t.UIPlugin=r;const o=_E();t.BasePlugin=o;const i=zb();t.Uppy=i;const a=ME(),s=_E();i.Uppy=i,i.UIPlugin=a,i.BasePlugin=s,i.debugLogger=n.debugLogger}(Xy,Xy.exports)),Xy.exports),$E=E(zE);function UE(){if(HE)return jE;HE=1;return jE={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t)=>()=>{let n="",r=t;for(;r--;)n+=e[Math.random()*e.length|0];return n}},jE}var VE,WE,GE,qE,KE,YE,XE,ZE,JE,QE,eC={};function tC(){if(WE)return VE;WE=1;class e extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}return VE=e}function nC(){if(QE)return JE;let e;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}QE=1;var n=0;function r(e){return"__private_"+n+++"_"+e}const o=function(){if(qE)return GE;qE=1;const e=tC();return GE=function(){return fetch(...arguments).catch((t=>{throw"AbortError"===t.name?t:new e(t)}))},GE}(),i=function(){if(YE)return KE;YE=1;const e=Rb();class t extends Error{constructor(t,n){void 0===n&&(n={}),super(t),this.cause=n.cause,this.cause&&e(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}}return KE=t}(),a=function(){if(ZE)return XE;ZE=1;class e extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}return XE=e}();async function s(e){if(401===e.status)throw new a;const t=e.json();if(e.status<200||e.status>300){let n=`Failed request with status: ${e.status}. ${e.statusText}`;try{const e=await t;n=e.message?`${n} message: ${e.message}`:n,n=e.requestId?`${n} request-Id: ${e.requestId}`:n}finally{throw new Error(n)}}return t}var u=r("companionHeaders"),l=r("getPostResponseFunc"),c=r("getUrl"),d=r("errorHandler");e=Symbol.for("uppy test: getCompanionHeaders");class f{constructor(e,n){Object.defineProperty(this,d,{value:h}),Object.defineProperty(this,c,{value:p}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:e=>t=>e?t:this.onReceiveResponse(t)}),this.uppy=e,this.opts=n,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,t(this,u)[u]=null==n?void 0:n.companionHeaders}setCompanionHeaders(e){t(this,u)[u]=e}[e](){return t(this,u)[u]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}headers(){return Promise.resolve({...f.defaultHeaders,...t(this,u)[u]})}onReceiveResponse(e){const t=this.uppy.getState().companion||{},n=this.opts.companionUrl,{headers:r}=e;return r.has("i-am")&&r.get("i-am")!==t[n]&&this.uppy.setState({companion:{...t,[n]:r.get("i-am")}}),e}preflight(e){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(t(this,c)[c](e),{method:"OPTIONS"}).then((e=>(e.headers.has("access-control-allow-headers")&&(this.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map((e=>e.trim().toLowerCase()))),this.preflightDone=!0,this.allowedHeaders.slice()))).catch((e=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${e}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice())))}preflightAndHeaders(e){return Promise.all([this.preflight(e),this.headers()]).then((e=>{let[t,n]=e;return Object.keys(n).forEach((e=>{t.includes(e.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${e}`),delete n[e])})),n}))}get(e,n){return this.preflightAndHeaders(e).then((n=>o(t(this,c)[c](e),{method:"get",headers:n,credentials:this.opts.companionCookiesRule||"same-origin"}))).then(t(this,l)[l](n)).then(s).catch(t(this,d)[d]("get",e))}post(e,n,r){const i="post";return this.preflightAndHeaders(e).then((r=>o(t(this,c)[c](e),{method:i,headers:r,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(n)}))).then(t(this,l)[l](r)).then(s).catch(t(this,d)[d](i,e))}delete(e,n,r){const i="delete";return this.preflightAndHeaders(e).then((t=>o(`${this.hostname}/${e}`,{method:i,headers:t,credentials:this.opts.companionCookiesRule||"same-origin",body:n?JSON.stringify(n):null}))).then(t(this,l)[l](r)).then(s).catch(t(this,d)[d](i,e))}}function p(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function h(e,n){return r=>{var o;return null!=(o=r)&&o.isAuthError||(r=new i(`Could not ${e} ${t(this,c)[c](n)}`,{cause:r})),Promise.reject(r)}}return f.VERSION="2.2.2",f.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${f.VERSION}`},JE=f}var rC,oC,iC,aC,sC,uC,lC,cC,dC={};function fC(){if(rC)return dC;return rC=1,Object.defineProperty(dC,"__esModule",{value:!0}),dC.getItem=function(e){return Promise.resolve(localStorage.getItem(e))},dC.removeItem=function(e){return new Promise((t=>{localStorage.removeItem(e),t()}))},dC.setItem=function(e,t){return new Promise((n=>{localStorage.setItem(e,t),n()}))},dC}function pC(){if(cC)return eC;cC=1,Object.defineProperty(eC,"__esModule",{value:!0}),eC.Socket=eC.SearchProvider=eC.RequestClient=eC.Provider=void 0;const e=nC();eC.RequestClient=e;const t=function(){if(iC)return oC;iC=1;var e=fC();const t=nC();return oC=class extends t{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then((e=>{let[t,n]=e;const r={};return n&&(r["uppy-auth-token"]=n),this.companionKeysParams&&(r["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...t,...r}}))}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),n=t.getPluginState().authenticated?401!==e.status:e.status<400;return t.setPluginState({authenticated:n}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(e){void 0===e&&(e={});const t=new URLSearchParams(e);return this.preAuthToken&&t.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${t}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const e=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=e.token}catch(e){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then((e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)]))).then((e=>{let[t]=e;return t}))}static initPlugin(t,n,r){if(t.type="acquirer",t.files=[],r&&(t.opts={...r,...n}),n.serverUrl||n.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(n.companionAllowedHosts){const e=n.companionAllowedHosts;if(!("string"==typeof e||Array.isArray(e)||e instanceof RegExp))throw new TypeError(`${t.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);t.opts.companionAllowedHosts=e}else/^(?!https?:\/\/).*$/i.test(n.companionUrl)?t.opts.companionAllowedHosts=`https://${n.companionUrl.replace(/^\/\//,"")}`:t.opts.companionAllowedHosts=new URL(n.companionUrl).origin;t.storage=t.opts.storage||e}},oC}();eC.Provider=t;const n=function(){if(sC)return aC;sC=1;const e=nC();return aC=class extends e{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t?`&${t}`:""}`)}},aC}();eC.SearchProvider=n;const r=function(){if(lC)return uC;let e,t;function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}lC=1;var r=0;function o(e){return"__private_"+r+++"_"+e}const i=_b();var a=o("queued"),s=o("emitter"),u=o("isOpen"),l=o("socket"),c=o("handleMessage");return e=Symbol.for("uppy test: getSocket"),t=Symbol.for("uppy test: getQueued"),uC=class{constructor(e){Object.defineProperty(this,a,{writable:!0,value:[]}),Object.defineProperty(this,s,{writable:!0,value:i()}),Object.defineProperty(this,u,{writable:!0,value:!1}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,c,{writable:!0,value:e=>{try{const t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}}}),this.opts=e,e&&!1===e.autoOpen||this.open()}get isOpen(){return n(this,u)[u]}[e](){return n(this,l)[l]}[t](){return n(this,a)[a]}open(){n(this,l)[l]=new WebSocket(this.opts.target),n(this,l)[l].onopen=()=>{for(n(this,u)[u]=!0;n(this,a)[a].length>0&&n(this,u)[u];){const e=n(this,a)[a].shift();this.send(e.action,e.payload)}},n(this,l)[l].onclose=()=>{n(this,u)[u]=!1},n(this,l)[l].onmessage=n(this,c)[c]}close(){var e;null==(e=n(this,l)[l])||e.close()}send(e,t){n(this,u)[u]?n(this,l)[l].send(JSON.stringify({action:e,payload:t})):n(this,a)[a].push({action:e,payload:t})}on(e,t){n(this,s)[s].on(e,t)}emit(e,t){n(this,s)[s].emit(e,t)}once(e,t){n(this,s)[s].once(e,t)}},uC}();return eC.Socket=r,eC}var hC,gC,vC,mC,yC,bC,EC,CC,DC,wC,AC,SC,xC,OC,TC,NC,BC,kC={};function FC(){if(hC)return kC;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}hC=1,Object.defineProperty(kC,"__esModule",{value:!0}),kC.internalRateLimitedQueue=kC.RateLimitedQueue=void 0;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("activeRequests"),o=n("queuedHandlers"),i=n("paused"),a=n("pauseTimer"),s=n("downLimit"),u=n("upperLimit"),l=n("rateLimitingTimer"),c=n("call"),d=n("queueNext"),f=n("next"),p=n("queue"),h=n("dequeue"),g=n("resume"),v=n("increaseLimit");function m(t){e(this,r)[r]+=1;let n,o=!1;try{n=t()}catch(t){throw e(this,r)[r]-=1,t}return{abort:()=>{o||(o=!0,e(this,r)[r]-=1,n(),e(this,d)[d]())},done:()=>{o||(o=!0,e(this,r)[r]-=1,e(this,d)[d]())}}}function y(){queueMicrotask((()=>e(this,f)[f]()))}function b(){if(e(this,i)[i]||e(this,r)[r]>=this.limit)return;if(0===e(this,o)[o].length)return;const t=e(this,o)[o].shift(),n=e(this,c)[c](t.fn);t.abort=n.abort,t.done=n.done}function E(t,n){void 0===n&&(n={});const r={fn:t,priority:n.priority||0,abort:()=>{e(this,h)[h](r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},i=e(this,o)[o].findIndex((e=>r.priority>e.priority));return-1===i?e(this,o)[o].push(r):e(this,o)[o].splice(i,0,r),r}function C(t){const n=e(this,o)[o].indexOf(t);-1!==n&&e(this,o)[o].splice(n,1)}kC.RateLimitedQueue=class{constructor(t){Object.defineProperty(this,h,{value:C}),Object.defineProperty(this,p,{value:E}),Object.defineProperty(this,f,{value:b}),Object.defineProperty(this,d,{value:y}),Object.defineProperty(this,c,{value:m}),Object.defineProperty(this,r,{writable:!0,value:0}),Object.defineProperty(this,o,{writable:!0,value:[]}),Object.defineProperty(this,i,{writable:!0,value:!1}),Object.defineProperty(this,a,{writable:!0,value:void 0}),Object.defineProperty(this,s,{writable:!0,value:1}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,g,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,v,{writable:!0,value:()=>{if(e(this,i)[i])e(this,l)[l]=setTimeout(e(this,v)[v],0);else{e(this,s)[s]=this.limit,this.limit=Math.ceil((e(this,u)[u]+e(this,s)[s])/2);for(let t=e(this,s)[s];t<=this.limit;t++)e(this,d)[d]();e(this,u)[u]-e(this,s)[s]>3?e(this,l)[l]=setTimeout(e(this,v)[v],2e3):e(this,s)[s]=Math.floor(e(this,s)[s]/2)}}}),this.limit="number"!=typeof t||0===t?1/0:t}run(t,n){return!e(this,i)[i]&&e(this,r)[r]<this.limit?e(this,c)[c](t):e(this,p)[p](t,n)}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];let a;const s=new Promise(((r,i)=>{a=n.run((()=>{let t,n;try{n=Promise.resolve(e(...o))}catch(e){n=Promise.reject(e)}return n.then((e=>{t?i(t):(a.done(),r(e))}),(e=>{t?i(t):(a.done(),i(e))})),()=>{t=new Error("Cancelled")}}),t)}));return s.abort=()=>{a.abort()},s}}resume(){e(this,i)[i]=!1,clearTimeout(e(this,a)[a]);for(let t=0;t<this.limit;t++)e(this,d)[d]()}pause(t){void 0===t&&(t=null),e(this,i)[i]=!0,clearTimeout(e(this,a)[a]),null!=t&&(e(this,a)[a]=setTimeout(e(this,g)[g],t))}rateLimit(t){clearTimeout(e(this,l)[l]),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(e(this,u)[u]=this.limit-1,this.limit=e(this,s)[s],e(this,l)[l]=setTimeout(e(this,v)[v],t))}get isPaused(){return e(this,i)[i]}};const D=Symbol("__queue");return kC.internalRateLimitedQueue=D,kC}function PC(){return TC?OC:(TC=1,OC={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}})}var IC=function(){if(BC)return NC;BC=1;var e=UE(),t=pC(),n=FC();const r=_E(),o=function(){if(vC)return gC;vC=1;const e=qm();return gC=e((function(e,t,n){const{progress:r,bytesUploaded:o,bytesTotal:i}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:o,bytesTotal:i}))}),300,{leading:!0,trailing:!0})}(),i=yC?mC:(yC=1,mC=function(e){const t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${t}`}),a=EC?bC:(EC=1,bC=function(e){const t=[],n=[];function r(e){t.push(e)}function o(e){n.push(e)}return Promise.all(e.map((e=>e.then(r,o)))).then((()=>({successful:t,failed:n})))}),s=function(){if(DC)return CC;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}DC=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("emitter"),o=n("events");return CC=class{constructor(t){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:[]}),e(this,r)[r]=t}on(t,n){return e(this,o)[o].push([t,n]),e(this,r)[r].on(t,n)}remove(){for(const[t,n]of e(this,o)[o].splice(0))e(this,r)[r].off(t,n)}}}(),u=function(){if(AC)return wC;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}AC=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("aliveTimer"),o=n("isDone"),i=n("onTimedOut"),a=n("timeout");return wC=class{constructor(t,n){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:!1}),Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),e(this,a)[a]=t,e(this,i)[i]=n}progress(){e(this,o)[o]||e(this,a)[a]>0&&(clearTimeout(e(this,r)[r]),e(this,r)[r]=setTimeout(e(this,i)[i],e(this,a)[a]))}done(){e(this,o)[o]||(clearTimeout(e(this,r)[r]),e(this,r)[r]=null,e(this,o)[o]=!0)}}}(),l=tC(),c=xC?SC:(xC=1,SC=function(e){return!!e&&(0!==e.readyState&&4!==e.readyState||0===e.status)}),d=PC();function f(e,t){let n=t;return n||(n=new Error("Upload error")),"string"==typeof n&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),c(e)?(n=new l(n,e),n):(n.request=e,n)}function p(e){return e.data.slice(0,e.data.size,e.meta.type)}class h extends r{constructor(e,t){super(e,t),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=d;const r={formData:!0,fieldName:t.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(t){let n={};try{n=JSON.parse(t)}catch(t){e.log(t)}return n},getResponseError(e,t){let n=new Error("Upload error");return c(t)&&(n=new l(n,t)),n},validateStatus:e=>e>=200&&e<300};if(this.opts={...r,...t},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),n.internalRateLimitedQueue in this.opts?this.requests=this.opts[n.internalRateLimitedQueue]:this.requests=new n.RateLimitedQueue(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(e){const t=this.uppy.getState().xhrUpload,{headers:n}=this.opts,r={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return"function"==typeof n?r.headers=n(e):Object.assign(r.headers,this.opts.headers),t&&Object.assign(r.headers,t.headers),e.xhrUpload&&Object.assign(r.headers,e.xhrUpload.headers),r}addMetadata(e,t,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(t)).forEach((n=>{e.append(n,t[n])}))}createFormDataUpload(e,t){const n=new FormData;this.addMetadata(n,e.meta,t);const r=p(e);return e.name?n.append(t.fieldName,r,e.meta.name):n.append(t.fieldName,r),n}createBundledUpload(e,t){const n=new FormData,{meta:r}=this.uppy.getState();return this.addMetadata(n,r,t),e.forEach((e=>{const t=this.getOptions(e),r=p(e);e.name?n.append(t.fieldName,r,e.name):n.append(t.fieldName,r)})),n}upload(t,n,r){const o=this.getOptions(t);return this.uppy.log(`uploading ${n} of ${r}`),new Promise(((n,r)=>{this.uppy.emit("upload-started",t);const i=o.formData?this.createFormDataUpload(t,o):t.data,a=new XMLHttpRequest;let l;this.uploaderEvents[t.id]=new s(this.uppy);const c=new u(o.timeout,(()=>{a.abort(),l.done();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(o.timeout/1e3)}));this.uppy.emit("upload-error",t,e),r(e)})),d=(0,e.nanoid)();a.upload.addEventListener("loadstart",(()=>{this.uppy.log(`[XHRUpload] ${d} started`)})),a.upload.addEventListener("progress",(e=>{this.uppy.log(`[XHRUpload] ${d} progress: ${e.loaded} / ${e.total}`),c.progress(),e.lengthComputable&&this.uppy.emit("upload-progress",t,{uploader:this,bytesUploaded:e.loaded,bytesTotal:e.total})})),a.addEventListener("load",(()=>{if(this.uppy.log(`[XHRUpload] ${d} finished`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),o.validateStatus(a.status,a.responseText,a)){const e=o.getResponseData(a.responseText,a),r=e[o.responseUrlFieldName],i={status:a.status,body:e,uploadURL:r};return this.uppy.emit("upload-success",t,i),r&&this.uppy.log(`Download ${t.name} from ${r}`),n(t)}const e=o.getResponseData(a.responseText,a),i=f(a,o.getResponseError(a.responseText,a)),s={status:a.status,body:e};return this.uppy.emit("upload-error",t,i,s),r(i)})),a.addEventListener("error",(()=>{this.uppy.log(`[XHRUpload] ${d} errored`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null);const e=f(a,o.getResponseError(a.responseText,a));return this.uppy.emit("upload-error",t,e),r(e)})),a.open(o.method.toUpperCase(),o.endpoint,!0),a.withCredentials=o.withCredentials,""!==o.responseType&&(a.responseType=o.responseType),l=this.requests.run((()=>{this.uppy.emit("upload-started",t);const e=this.getOptions(t);return Object.keys(e.headers).forEach((t=>{a.setRequestHeader(t,e.headers[t])})),a.send(i),()=>{c.done(),a.abort()}})),this.onFileRemove(t.id,(()=>{l.abort(),r(new Error("File removed"))})),this.onCancelAll(t.id,(e=>{let{reason:t}=e;"user"===t&&l.abort(),r(new Error("Upload cancelled"))}))}))}uploadRemote(e){const n=this.getOptions(e);return new Promise(((r,a)=>{this.uppy.emit("upload-started",e);const u={};(Array.isArray(n.metaFields)?n.metaFields:Object.keys(e.meta)).forEach((t=>{u[t]=e.meta[t]}));new(e.remote.providerOptions.provider?t.Provider:t.RequestClient)(this.uppy,e.remote.providerOptions).post(e.remote.url,{...e.remote.body,endpoint:n.endpoint,size:e.data.size,fieldname:n.fieldName,metadata:u,httpMethod:n.method,useFormData:n.formData,headers:n.headers}).then((u=>{const{token:l}=u,c=i(e.remote.companionUrl),d=new t.Socket({target:`${c}/api/${l}`,autoOpen:!1});let f;this.uploaderEvents[e.id]=new s(this.uppy),this.onFileRemove(e.id,(()=>{d.send("cancel",{}),f.abort(),r(`upload ${e.id} was removed`)})),this.onCancelAll(e.id,(function(t){let{reason:n}=void 0===t?{}:t;"user"===n&&(d.send("cancel",{}),f.abort()),r(`upload ${e.id} was canceled`)})),this.onRetry(e.id,(()=>{d.send("pause",{}),d.send("resume",{})})),this.onRetryAll(e.id,(()=>{d.send("pause",{}),d.send("resume",{})})),d.on("progress",(t=>o(this,t,e))),d.on("success",(t=>{const o=n.getResponseData(t.response.responseText,t.response),i=o[n.responseUrlFieldName],a={status:t.response.status,body:o,uploadURL:i};return this.uppy.emit("upload-success",e,a),f.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),r()})),d.on("error",(t=>{const r=t.response,o=r?n.getResponseError(r.responseText,r):Object.assign(new Error(t.error.message),{cause:t.error});this.uppy.emit("upload-error",e,o),f.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),a(o)})),f=this.requests.run((()=>(d.open(),e.isPaused&&d.send("pause",{}),()=>d.close())))})).catch((t=>{this.uppy.emit("upload-error",e,t),a(t)}))}))}uploadBundle(e){return new Promise(((t,n)=>{const{endpoint:r}=this.opts,{method:o}=this.opts,i=this.uppy.getState().xhrUpload,a=this.createBundledUpload(e,{...this.opts,...i||{}}),s=new XMLHttpRequest,l=t=>{e.forEach((e=>{this.uppy.emit("upload-error",e,t)}))},c=new u(this.opts.timeout,(()=>{s.abort();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));l(e),n(e)}));s.upload.addEventListener("loadstart",(()=>{this.uppy.log("[XHRUpload] started uploading bundle"),c.progress()})),s.upload.addEventListener("progress",(t=>{c.progress(),t.lengthComputable&&e.forEach((e=>{this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})}))})),s.addEventListener("load",(r=>{if(c.done(),this.opts.validateStatus(r.target.status,s.responseText,s)){const n=this.opts.getResponseData(s.responseText,s),o={status:r.target.status,body:n};return e.forEach((e=>{this.uppy.emit("upload-success",e,o)})),t()}const o=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return o.request=s,l(o),n(o)})),s.addEventListener("error",(()=>{c.done();const e=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return l(e),n(e)})),this.uppy.on("cancel-all",(function(e){let{reason:t}=void 0===e?{}:e;"user"===t&&(c.done(),s.abort())})),s.open(o.toUpperCase(),r,!0),s.withCredentials=this.opts.withCredentials,""!==this.opts.responseType&&(s.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach((e=>{s.setRequestHeader(e,this.opts.headers[e])})),s.send(a),e.forEach((e=>{this.uppy.emit("upload-started",e)}))}))}uploadFiles(e){const t=e.map(((t,n)=>{const r=parseInt(n,10)+1,o=e.length;return t.error?Promise.reject(new Error(t.error)):t.isRemote?this.uploadRemote(t,r,o):this.upload(t,r,o)}));return a(t)}onFileRemove(e,t){this.uploaderEvents[e].on("file-removed",(n=>{e===n.id&&t(n.id)}))}onRetry(e,t){this.uploaderEvents[e].on("upload-retry",(n=>{e===n&&t()}))}onRetryAll(e,t){this.uploaderEvents[e].on("retry-all",(()=>{this.uppy.getFile(e)&&t()}))}onCancelAll(e,t){var n=this;this.uploaderEvents[e].on("cancel-all",(function(){n.uppy.getFile(e)&&t(...arguments)}))}handleUpload(e){if(0===e.length)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();0!==this.opts.limit||this.opts[n.internalRateLimitedQueue]||this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const t=e.map((e=>this.uppy.getFile(e)));if(this.opts.bundle){if(t.some((e=>e.isRemote)))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if("function"==typeof this.opts.headers)throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(t)}return this.uploadFiles(t).then((()=>null))}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}}return h.VERSION="2.1.3",NC=h}(),RC=E(IC);function LC(e){var t=e.server,n=void 0===t?"":t,r=e.fieldName,o=void 0===r?"":r,i=e.maxFileSize,a=void 0===i?10485760:i,s=e.maxNumberOfFiles,u=void 0===s?100:s,l=e.meta,c=void 0===l?{}:l,d=e.metaWithUrl,f=void 0!==d&&d,p=e.headers,h=void 0===p?{}:p,g=e.withCredentials,v=void 0!==g&&g,m=e.timeout,y=void 0===m?1e4:m,b=e.onBeforeUpload,E=void 0===b?function(e){return e}:b,C=e.onSuccess,D=void 0===C?function(e,t){}:C,w=e.onError,A=void 0===w?function(e,t,n){console.error("".concat(e.name," upload error"),t,n)}:w,S=e.onProgress,x=void 0===S?function(e){}:S;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!o)throw new Error("Cannot get fieldName\n没有配置 fieldName");var O=n;f&&(O=function(e,t){var n=vp(e.split("#"),2),r=n[0],o=n[1],i=[];xp(t,(function(e,t){i.push("".concat(t,"=").concat(e))}));var a=i.join("&");return r=r.indexOf("?")>0?"".concat(r,"&").concat(a):"".concat(r,"?").concat(a),o?"".concat(r,"#").concat(o):r}(O,c));var T=new $E({onBeforeUpload:E,restrictions:{maxFileSize:a,maxNumberOfFiles:u},meta:c}).use(RC,{endpoint:O,headers:h,formData:!0,fieldName:o,bundle:!0,withCredentials:v,timeout:y});return T.on("upload-success",(function(e,t){var n=t.body,r=void 0===n?{}:n;try{D(e,r)}catch(e){console.error("wangEditor upload file - onSuccess error",e)}T.removeFile(e.id)})),T.on("progress",(function(e){e<1||x(e)})),T.on("upload-error",(function(e,t,n){try{A(e,t,n)}catch(e){console.error("wangEditor upload file - onError error",e)}T.removeFile(e.id)})),T.on("restriction-failed",(function(e,t){try{A(e,t)}catch(e){console.error("wangEditor upload file - onError error",e)}T.removeFile(e.id)})),T}Cm("en",{editor:{more:"More",justify:"Justify",indent:"Indent",image:"Image",video:"Video"}}),Cm("zh-CN",{editor:{more:"更多",justify:"对齐",indent:"缩进",image:"图片",video:"视频"}});var _C,MC,jC,HC,zC,$C,UC,VC,WC,GC,qC,KC,YC,XC,ZC,JC={};function QC(){if(MC)return _C;MC=1;var e=S();return _C=Array.isArray||function(t){return"Array"===e(t)}}function eD(){if(HC)return jC;HC=1;var e=A(),t=D(),n=ye(),r=kr(),o=$t(),i=xn(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return f.sham=!0,jC=!s||t((function(){var e;return d(d.call)||!d(Object)||!d((function(){e=!0}))||e}))?f:d}function tD(){if($C)return zC;$C=1;var e=QC(),t=eD(),n=be(),r=me()("species"),o=Array;return zC=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},zC}function nD(){if(VC)return UC;VC=1;var e=tD();return UC=function(t,n){return new(e(t))(0===n?0:n)}}function rD(){if(KC)return qC;KC=1;var e=D();return qC=function(t,n){var r=[][t];return!!r&&e((function(){r.call(null,n||function(){return 1},1)}))}}function oD(){if(XC)return YC;XC=1;var e=function(){if(GC)return WC;GC=1;var e=$o(),t=A(),n=x(),r=de(),o=Qt(),i=nD(),a=t([].push),s=function(t){var s=1===t,u=2===t,l=3===t,c=4===t,d=6===t,f=7===t,p=5===t||d;return function(h,g,v,m){for(var y,b,E=r(h),C=n(E),D=o(C),w=e(g,v),A=0,S=m||i,x=s?S(h,D):u||f?S(h,0):void 0;D>A;A++)if((p||A in C)&&(b=w(y=C[A],A,E),t))if(s)x[A]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:a(x,y)}else switch(t){case 4:return!1;case 7:a(x,y)}return d?-1:l||c?c:x}};return WC={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}().forEach,t=rD()("forEach");return YC=t?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},YC}!function(){if(ZC)return JC;ZC=1;var e=B(),t=ai(),n=si(),r=oD(),o=cn(),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)}();Cm("en",{common:{ok:"OK",delete:"Delete",enter:"Enter"},blockQuote:{title:"Quote"},codeBlock:{title:"Code block"},color:{color:"Font color",bgColor:"Back color",default:"Default color",clear:"Clear back color"},divider:{title:"Divider"},emotion:{title:"Emotion"},fontSize:{title:"Font size",default:"Default"},fontFamily:{title:"Font family",default:"Default"},fullScreen:{title:"Full screen",cancelTitle:"Cancel full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",editSize:"Edit size",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link",ok:"Ok",width:"Width",height:"Height"},indent:{decrease:"Decrease",increase:"Increase"},justify:{left:"Left",right:"Right",center:"Center",justify:"Justify"},lineHeight:{title:"Line height",default:"Default"},link:{insert:"Insert link",text:"Link text",url:"Link source",unLink:"Unlink",edit:"Edit link",view:"View link"},textStyle:{bold:"Bold",clear:"Clear styles",code:"Inline code",italic:"Italic",sub:"Sub",sup:"Sup",through:"Through",underline:"Underline"},undo:{undo:"undo",redo:"Redo"},todo:{todo:"Todo"},formatPainter:{title:"Format Painter"}}),Cm("zh-CN",{common:{ok:"确定",delete:"删除",enter:"回车"},blockQuote:{title:"引用"},codeBlock:{title:"代码块"},color:{color:"文字颜色",bgColor:"背景色",default:"默认颜色",clear:"清除背景色"},divider:{title:"分割线"},emotion:{title:"表情"},fontSize:{title:"字号",default:"默认字号"},fontFamily:{title:"字体",default:"默认字体"},fullScreen:{title:"全屏",cancelTitle:"取消全屏"},header:{title:"标题",text:"正文"},image:{netImage:"网络图片",delete:"删除图片",edit:"编辑图片",editSize:"修改尺寸",viewLink:"查看链接",src:"图片地址",desc:"图片描述",link:"图片链接",ok:"确定",width:"宽度",height:"高度"},indent:{decrease:"减少缩进",increase:"增加缩进"},justify:{left:"左对齐",right:"右对齐",center:"居中对齐",justify:"两端对齐"},lineHeight:{title:"行高",default:"默认行高"},link:{insert:"插入链接",text:"链接文本",url:"链接地址",unLink:"取消链接",edit:"修改链接",view:"查看链接"},textStyle:{bold:"粗体",clear:"清除格式",code:"行内代码",italic:"斜体",sub:"下标",sup:"上标",through:"删除线",underline:"下划线"},undo:{undo:"撤销",redo:"重做"},todo:{todo:"待办"},formatPainter:{title:"格式刷"}});var iD={type:"blockquote",elemToHtml:function(e,t){return"<blockquote>".concat(t,"</blockquote>")}},aD='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',sD='<svg viewBox="0 0 1024 1024"><path d="M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z" p-id="10909"></path><path d="M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z" p-id="10910"></path><path d="M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z"></path></svg>',uD='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>',lD=function(){function e(){this.title=wm("blockQuote.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!ug.getSelectedNodeByType(e,"blockquote")},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=vp(ap.Editor.nodes(e,{match:function(e){var t=ug.getNodeType(e);return"paragraph"===t||"blockquote"===t},universal:!0,mode:"highest"}),1);return!t[0]},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.isActive(e)?"paragraph":"blockquote";ap.Transforms.setNodes(e,{type:n},{mode:"highest"})}},e}(),cD={key:"blockquote",factory:function(){return new lD}};function dD(e){return 0===fh("<div>".concat(e,"</div>")).children().filter((function(e){return"BR"!==e.tagName})).length}function fD(e){return 0===e.length?"":e[0].outerHTML}function pD(e){return e.length?e[0].tagName.toLowerCase():""}function hD(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}function gD(e){e.deleteBackward("character");ap.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}dh.css&&(fh.fn.css=dh.css),dh.append&&(fh.fn.append=dh.append),dh.prepend&&(fh.fn.prepend=dh.prepend),dh.addClass&&(fh.fn.addClass=dh.addClass),dh.removeClass&&(fh.fn.removeClass=dh.removeClass),dh.hasClass&&(fh.fn.hasClass=dh.hasClass),dh.on&&(fh.fn.on=dh.on),dh.off&&(fh.fn.off=dh.off),dh.focus&&(fh.fn.focus=dh.focus),dh.attr&&(fh.fn.attr=dh.attr),dh.removeAttr&&(fh.fn.removeAttr=dh.removeAttr),dh.hide&&(fh.fn.hide=dh.hide),dh.show&&(fh.fn.show=dh.show),dh.parents&&(fh.fn.parents=dh.parents),dh.dataset&&(fh.fn.dataset=dh.dataset),dh.val&&(fh.fn.val=dh.val),dh.text&&(fh.fn.text=dh.text),dh.html&&(fh.fn.html=dh.html),dh.children&&(fh.fn.children=dh.children),dh.remove&&(fh.fn.remove=dh.remove),dh.find&&(fh.fn.find=dh.find),dh.width&&(fh.fn.width=dh.width),dh.height&&(fh.fn.height=dh.height),dh.filter&&(fh.fn.filter=dh.filter),dh.empty&&(fh.fn.empty=dh.empty);var vD={renderElems:[{type:"blockquote",renderElem:function(e,t,n){return Cy.jsx("blockquote",null,t)}}],elemsToHtml:[iD],parseElemsHtml:[{selector:"blockquote:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=fh(e);return 0===(t=t.filter((function(e){return!!ap.Text.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"blockquote",children:t}}}],menus:[cD],editorPlugin:function(e){var t=e.insertBreak,n=e.insertText,r=e;return r.insertBreak=function(){var o=r.selection;if(null==o)return t();var i=vp(ap.Editor.nodes(e,{match:function(e){return ug.checkNodeType(e,"blockquote")},universal:!0}),1),a=i[0];if(!a)return t();var s=a[0];if(ug.getParentNode(e,s)){var u=ug.findPath(e,s),l=ap.Editor.end(e,u);if(ap.Point.equals(l,o.focus)){var c=ap.Node.string(s);if(c&&"\n"===c.slice(-1))return void gD(r)}n("\n")}else gD(r)},r}};var mD={type:"code",elemToHtml:function(e,t){return"<code>".concat(t,"</code>")}};var yD={type:"pre",elemToHtml:function(e,t){return"<pre>".concat(t,"</pre>")}},bD=function(){function e(){this.title=wm("codeBlock.title"),this.iconSvg='<svg viewBox="0 0 1280 1024"><path d="M832 736l96 96 320-320L928 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224zM701.312 150.528l69.472 18.944-192 704.032-69.472-18.944 192-704.032z"></path></svg>',this.tag="button"}return e.prototype.getSelectCodeElem=function(e){var t=ug.getSelectedNodeByType(e,"code");if(null==t)return null;var n=ug.getParentNode(e,t);return null==n||"pre"!==ug.getNodeType(n)?null:t},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);return null==t?"":t.language||""},e.prototype.isActive=function(e){return!!this.getSelectCodeElem(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=ug.getSelectedElems(e);return!!t.some((function(t){return e.isVoid(t)}))||!t.some((function(e){var t=ug.getNodeType(e);return"pre"===t||"paragraph"===t}))},e.prototype.exec=function(e,t){this.isActive(e)?this.changeToPlainText(e):this.changeToCodeBlock(e,t.toString())},e.prototype.changeToPlainText=function(e){var t=this.getSelectCodeElem(e);if(null!=t){var n=ap.Node.string(t);ap.Transforms.removeNodes(e,{mode:"highest"});var r=n.split("\n").map((function(e){return{type:"paragraph",children:[{text:e}]}}));ap.Transforms.insertNodes(e,r,{mode:"highest"})}},e.prototype.changeToCodeBlock=function(e,t){var n,r,o=[],i=ap.Editor.nodes(e,{match:function(t){return e.children.includes(t)},universal:!0});try{for(var a=gp(i),s=a.next();!s.done;s=a.next()){var u=vp(s.value,1)[0];u&&o.push(ap.Node.string(u))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}ap.Transforms.removeNodes(e,{mode:"highest"});var l={type:"pre",children:[{type:"code",language:t,children:[{text:o.join("\n")}]}]};ap.Transforms.insertNodes(e,l,{mode:"highest"})},e}();var ED={menus:[{key:"codeBlock",factory:function(){return new bD}}],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData,o=e;return o.insertBreak=function(){var e=ug.getSelectedNodeByType(o,"code");if(null!=e){var n=function(e,t){var n=t.selection;if(null==n)return"";var r=ap.Node.string(e),o=n.anchor.offset,i=r.slice(0,o).split("\n"),a=i.length;return 0===a?"":i[a-1]}(e,o);if(n){var r=n.match(/^\s+/);if(null!=r&&null!=r[0]){var i=r[0];return void o.insertText("\n".concat(i))}}o.insertText("\n")}else t()},o.normalizeNode=function(e){var t=vp(e,2),r=t[0],i=t[1],a=ug.getNodeType(r);("code"===a&&i.length<=1&&ap.Transforms.setNodes(o,{type:"paragraph"},{at:i}),"pre"===a)&&(ug.isLastNode(o,r)&&ap.Transforms.insertNodes(o,ug.genEmptyParagraph(),{at:[i[0]+1]}),"code"!==ug.getNodeType(r.children[0])&&(ap.Transforms.unwrapNodes(o),ap.Transforms.setNodes(o,{type:"paragraph"},{mode:"highest"})));return n([r,i])},o.insertData=function(e){if(null!=ug.getSelectedNodeByType(o,"code")){var t=e.getData("text/plain");ap.Editor.insertText(o,t)}else r(e)},o},renderElems:[{type:"pre",renderElem:function(e,t,n){return Cy.jsx("pre",null,t)}},{type:"code",renderElem:function(e,t,n){return Cy.jsx("code",null,t)}}],elemsToHtml:[mD,yD],preParseHtml:[{selector:"pre>code",preParseHtml:function(e){var t=fh(e);if("code"!==pD(t))return e;var n=t.find("xmp");if(0===n.length)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:"pre:not([data-w-e-type])>code",parseElemHtml:function(e,t,n){return{type:"code",language:"",children:[{text:fh(e)[0].textContent||""}]}}},{selector:"pre:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=fh(e);return 0===(t=t.filter((function(e){return"code"===ug.getNodeType(e)}))).length&&(t=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:t.filter((function(e){return"code"===ug.getNodeType(e)}))}}}]},CD=function(){function e(){this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){var t=this.mark,n=ap.Editor.marks(e);return n&&n[t]?n[t]:""},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=vp(ap.Editor.nodes(e,{match:function(t){return"pre"===ug.getNodeType(t)||!!ap.Editor.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){var t=this.mark;if(null==this.$content){var n=fh('<ul class="w-e-panel-content-color"></ul>');n.on("click","li",(function(n){var r=n.target;if(null!=r&&(n.preventDefault(),null!=e.selection)){var o=fh(r).attr("data-value");"0"===o?ap.Editor.removeMark(e,t):ap.Editor.addMark(e,t,o)}})),this.$content=n}var r=this.$content;if(null==r)return document.createElement("ul");r.empty();var o=this.getValue(e),i=e.getMenuConfig(t).colors;(void 0===i?[]:i).forEach((function(e){var t=fh('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=fh('<li data-value="'.concat(e,'"></li>'));o===e&&n.addClass("active"),n.append(t),r.append(n)}));var a="";"color"===t&&(a=wm("color.default")),"bgColor"===t&&(a=wm("color.clear"));var s=fh('\n <li data-value="0" class="clear">\n '.concat('<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>',"\n ").concat(a,"\n </li>\n "));return r.prepend(s),r[0]},e}(),DD=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=wm("color.bgColor"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z"></path></svg>',t.mark="bgColor",t}return dp(t,e),t}(CD),wD=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=wm("color.color"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z"></path></svg>',t.mark="color",t}return dp(t,e),t}(CD),AD=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"];var SD={selector:"font",preParseHtml:function(e){var t=fh(e);if("font"!==pD(t))return e;var n=t.attr("color")||"";return n&&(t.removeAttr("color"),t.css("color",n)),t[0]}};function xD(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var OD={renderStyle:function(e,t){var n=e,r=n.color,o=n.bgColor,i=t;return r&&xD(i,{color:r}),o&&xD(i,{backgroundColor:o}),i},styleToHtml:function(e,t){if(!ap.Text.isText(e))return t;var n,r=e,o=r.color,i=r.bgColor;return o||i?((dD(t)||"span"!==pD(n=fh(t)))&&(n=fh("<span>".concat(t,"</span>"))),o&&n.css("color",o),i&&n.css("background-color",i),fD(n)):t},preParseHtml:[SD],parseStyleHtml:function(e,t,n){var r=fh(e);if(!ap.Text.isText(t))return t;var o=t,i=hD(r,"color");i&&(o.color=i);var a=hD(r,"background-color");return a||(a=hD(r,"background")),a&&(o.bgColor=a),o},menus:[{key:"color",factory:function(){return new wD},config:{colors:AD}},{key:"bgColor",factory:function(){return new DD},config:{colors:AD}}]},TD=function(){function e(){this.title=wm("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!!ap.Range.isExpanded(t)},e.prototype.exec=function(e,t){var n=e.selection;if(null!=n){var r=[n.anchor.path[0]];ap.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{at:r}),e.select(ap.Editor.start(e,r))}},e}(),ND={menus:[{key:"enter",factory:function(){return new TD}}]};var BD={type:"divider",elemToHtml:function(e,t){return"<hr/>"}},kD=function(){function e(){this.title=wm("divider.title"),this.iconSvg='<svg viewBox="0 0 1092 1024"><path d="M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!ug.getSelectedElems(e).some((function(t){if(e.isVoid(t))return!0;var n=ug.getNodeType(t);return"table"===n||"pre"===n}))},e.prototype.exec=function(e,t){ug.isSelectedEmptyParagraph(e)&&ap.Transforms.removeNodes(e,{mode:"highest"}),ap.Transforms.insertNodes(e,{type:"divider",children:[{text:""}]},{mode:"highest"})},e}();var FD={renderElems:[{type:"divider",renderElem:function(e,t,n){var r=ug.isNodeSelected(n,e);return Cy.h("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:r?"true":""},style:{},on:{mousedown:function(e){return e.preventDefault()}}},[Cy.h("hr")])}}],elemsToHtml:[BD],parseElemsHtml:[{selector:"hr:not([data-w-e-type])",parseElemHtml:function(e,t,n){return{type:"divider",children:[{text:""}]}}}],menus:[{key:"divider",factory:function(){return new kD}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"divider"===e.type||t(e)},r.normalizeNode=function(e){var t=vp(e,2),o=t[0],i=t[1];if("divider"!==ug.getNodeType(o))return n([o,i]);ug.isLastNode(r,o)&&ap.Transforms.insertNodes(r,ug.genEmptyParagraph(),{at:[i[0]+1]})},r}};var PD=function(){function e(){this.title=wm("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=vp(ap.Editor.nodes(e,{match:function(t){return"pre"===ug.getNodeType(t)||!!ap.Editor.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){if(null==this.$content){var t=fh('<ul class="w-e-panel-content-emotion"></ul>');t.on("click","li",(function(t){var n=t.target;if(null!=n){t.preventDefault();var r=fh(n).text();e.insertText(r)}})),this.$content=t}var n=this.$content;if(null==n)return document.createElement("ul");n.empty();var r=e.getMenuConfig("emotion").emotions;return(void 0===r?[]:r).forEach((function(e){var t=fh("<li>".concat(e,"</li>"));n.append(t)})),n[0]},e}(),ID={menus:[{key:"emotion",factory:function(){return new PD},config:{emotions:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(" ")}}]};var RD=function(){function e(){this.tag="select",this.width=80}return e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.mark,n=ap.Editor.marks(e);return n&&n[t]?n[t]:""},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=vp(ap.Editor.nodes(e,{match:function(t){return"pre"===ug.getNodeType(t)||!!ap.Editor.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.exec=function(e,t){var n=this.mark;t?e.addMark(n,t):e.removeMark(n)},e}(),LD=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=wm("fontFamily.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M956.788364 152.110545h-24.110546l23.924364 9.029819 0.186182 121.018181h-65.070546l-86.574545-130.048H566.551273v650.14691l130.048 64.977454v65.163636h-390.050909v-65.163636l129.954909-64.977454V152.110545H198.283636L111.429818 282.065455H46.545455V69.259636C46.545455 33.792 82.664727 22.062545 98.955636 22.062545h812.683637c23.738182 0 45.056 15.173818 45.056 41.053091V169.425455v-17.221819z"></path></svg>',t.mark="fontFamily",t.selectPanelWidth=150,t}return dp(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontFamilyList,r=void 0===n?[]:n;t.push({text:wm("fontFamily.default"),value:""}),r.forEach((function(e){if("string"==typeof e)t.push({text:e,value:e,styleForRenderMenuList:{"font-family":e}});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r,styleForRenderMenuList:{"font-family":r}})}}));var o=this.getValue(e);return t.forEach((function(e){e.value===o?e.selected=!0:delete e.selected})),t},t}(RD),_D=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=wm("fontSize.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',t.mark="fontSize",t}return dp(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontSizeList,r=void 0===n?[]:n;t.push({text:wm("fontSize.default"),value:""}),r.forEach((function(e){if("string"==typeof e)t.push({text:e,value:e});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r})}}));var o=this.getValue(e);return t.forEach((function(e){e.value===o?e.selected=!0:delete e.selected})),t},t}(RD);var MD={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"};var jD={renderStyle:function(e,t){var n=e,r=n.fontSize,o=n.fontFamily,i=t;return r&&xD(i,{fontSize:r}),o&&xD(i,{fontFamily:o}),i},styleToHtml:function(e,t){if(!ap.Text.isText(e))return t;var n,r=e,o=r.fontSize,i=r.fontFamily;return o||i?((dD(t)||"span"!==pD(n=fh(t)))&&(n=fh("<span>".concat(t,"</span>"))),o&&n.css("font-size",o),i&&n.css("font-family",i),fD(n)):t},preParseHtml:[{selector:"font",preParseHtml:function(e){var t=fh(e);if("font"!==pD(t))return e;var n=t.attr("size")||"";n&&(t.removeAttr("size"),t.css("font-size",MD[n]));var r=t.attr("face")||"";return r&&(t.removeAttr("face"),t.css("font-family",r)),t[0]}}],parseStyleHtml:function(e,t,n){var r=fh(e);if(!ap.Text.isText(t))return t;var o=t,i=hD(r,"font-size");i&&(o.fontSize=i);var a=hD(r,"font-family").replace(/"/g,"");return a&&(o.fontFamily=a),o},menus:[{key:"fontSize",factory:function(){return new _D},config:{fontSizeList:["12px",{name:"13px",value:"13px"},"14px","15px","16px","19px",{name:"22px",value:"22px"},"24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new LD},config:{fontFamilyList:["黑体",{name:"仿宋",value:"仿宋"},"楷体","标楷体","华文仿宋","华文楷体",{name:"宋体",value:"宋体"},"微软雅黑","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]};var HD=function(){function e(){this.title=wm("formatPainter.title"),this.iconSvg='<svg viewBox="0 0 24 24"><path d="M8 19.997v-5h2v5h9v-7H5v7zm-4-9h16v-3h-6v-4h-4v4H4zm-1 10v-8H2v-6a1 1 0 0 1 1-1h5v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v3h5a1 1 0 0 1 1 1v6h-1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(t){return e.attrs.isSelect},e.prototype.isDisabled=function(e){return!1},e.prototype.setFormatHtml=function(t){var n,r;if(t.getSelectionText().length){if(e.attrs.formatStyle){!function(e){var t=ap.Editor.marks(e);t&&Object.keys(t).forEach((function(t){e.removeMark(t)}))}(t);try{for(var o=gp(Object.entries(e.attrs.formatStyle)),i=o.next();!i.done;i=o.next()){var a=vp(i.value,2),s=a[0],u=a[1];t.addMark(s,u)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}e.attrs.formatStyle=null,e.attrs.isSelect=!1}},e.prototype.exec=function(t){e.attrs.isSelect?(e.attrs.isSelect=!1,e.attrs.formatStyle=null):t.getSelectionText().length&&(e.attrs.formatStyle=ap.Editor.marks(t),e.attrs.isSelect=!0);t.blur(),t.focus()},e.attrs={isSelect:!1,formatStyle:null},e}();var zD={menus:[{key:"formatPainter",factory:function(){return new HD}}],editorPlugin:function(e){var t=new HD,n=e.onChange,r=e,o=function(){t.setFormatHtml(r),document.removeEventListener("mouseup",o)};return r.onChange=function(){n(),HD.attrs.isSelect&&(document.removeEventListener("mouseup",o),document.addEventListener("mouseup",o))},r}},$D=function(){function e(){this.title=wm("fullScreen.title"),this.iconSvg=uD,this.tag="button",this.alwaysEnable=!0}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return e.isFullScreen},e.prototype.isDisabled=function(e){return!1},e.prototype.getIcon=function(e){return e.isFullScreen?uD:'<svg t="1723361745825" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8705" width="200" height="200"><path d="M703.926857 362.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V128a42.642286 42.642286 0 1 1 85.357715 0v149.357714h149.357714c21.211429 0 38.765714 15.433143 42.057143 35.693715l0.585143 6.948571a42.642286 42.642286 0 0 1-42.642286 42.642286H703.926857zM703.926857 938.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V704c0-23.552 19.090286-42.642286 42.642286-42.642286h192.073143a42.642286 42.642286 0 1 1 0 85.284572l-149.357714 0.073143v149.284571c0 21.211429-15.506286 38.765714-35.84 42.130286l-6.875429 0.512zM319.853714 938.642286a42.642286 42.642286 0 0 1-42.642285-42.642286v-149.284571H127.853714a42.642286 42.642286 0 0 1-42.130285-35.84l-0.585143-6.875429c0-23.552 19.163429-42.642286 42.715428-42.642286h192c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286zM127.853714 362.642286a42.642286 42.642286 0 1 1 0-85.284572H277.211429V128c0-21.211429 15.433143-38.765714 35.766857-42.130286l6.875428-0.512c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286H127.853714z" fill="#333333" p-id="8706"></path></svg>'},e.prototype.getTitle=function(e){return e.isFullScreen?wm("fullScreen.title"):wm("fullScreen.cancelTitle")},e.prototype.exec=function(e,t){e.isFullScreen?e.unFullScreen():e.fullScreen()},e}(),UD={menus:[{key:"fullScreen",factory:function(){return new $D}}]};function VD(e){return function(t,n){return"<h".concat(e,">").concat(n,"</h").concat(e,">")}}var WD={type:"header1",elemToHtml:VD(1)},GD={type:"header2",elemToHtml:VD(2)},qD={type:"header3",elemToHtml:VD(3)},KD={type:"header4",elemToHtml:VD(4)},YD={type:"header5",elemToHtml:VD(5)},XD={type:"header6",elemToHtml:VD(6)};function ZD(e){var t=vp(ap.Editor.nodes(e,{match:function(e){return ug.getNodeType(e).startsWith("header")},universal:!0}),1),n=t[0];if(null==n)return"paragraph";var r=vp(n,1)[0];return ug.getNodeType(r)}function JD(e){if(null==e.selection)return!0;var t=vp(ap.Editor.nodes(e,{match:function(e){var t=ug.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1);return!t[0]}function QD(e,t){t&&ap.Transforms.setNodes(e,{type:t})}var ew=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return ZD(e)},e.prototype.isActive=function(e){return this.getValue(e)===this.type},e.prototype.isDisabled=function(e){return JD(e)},e.prototype.exec=function(e,t){var n=this.type;QD(e,t===n?"paragraph":n)},e}(),tw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H1",t.type="header1",t}return dp(t,e),t}(ew),nw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H2",t.type="header2",t}return dp(t,e),t}(ew),rw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H3",t.type="header3",t}return dp(t,e),t}(ew),ow=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H4",t.type="header4",t}return dp(t,e),t}(ew),iw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H5",t.type="header5",t}return dp(t,e),t}(ew),aw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H6",t.type="header6",t}return dp(t,e),t}(ew),sw=function(){function e(){this.title=wm("header.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M960 960c-51.2 0-102.4-3.2-153.6-3.2-51.2 0-99.2 3.2-150.4 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 57.6-28.8 86.4-48 19.2-12.8 19.2-60.8 19.2-80v-224-19.2c-9.6-3.2-19.2-3.2-28.8-3.2H320c-9.6 0-19.2 0-28.8 3.2V780.8c0 22.4 0 80 22.4 92.8 28.8 19.2 96-6.4 96 44.8 0 16-9.6 41.6-28.8 41.6-54.4 0-105.6-3.2-160-3.2-48 0-96 3.2-147.2 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 51.2-28.8 80-48 19.2-12.8 19.2-60.8 19.2-83.2V294.4c0-28.8 3.2-115.2-22.4-131.2-25.6-16-86.4 9.6-86.4-41.6 0-16 6.4-41.6 28.8-41.6 51.2 0 105.6 3.2 156.8 3.2 48 0 96-3.2 144-3.2 19.2 0 28.8 22.4 28.8 41.6 0 48-57.6 25.6-83.2 41.6-19.2 12.8-19.2 73.6-19.2 92.8v201.6c6.4 3.2 16 3.2 22.4 3.2h400c6.4 0 12.8 0 22.4-3.2V256c0-22.4 0-80-19.2-92.8-28.8-16-86.4 6.4-86.4-41.6 0-16 9.6-41.6 28.8-41.6 51.2 0 99.2 3.2 150.4 3.2 48 0 99.2-3.2 147.2-3.2 19.2 0 28.8 22.4 28.8 41.6 0 51.2-57.6 25.6-86.4 41.6-19.2 12.8-19.2 70.4-19.2 92.8v537.6c0 19.2 0 67.2 19.2 80 28.8 19.2 89.6-6.4 89.6 44.8 0 19.2-6.4 41.6-28.8 41.6z"></path></svg>',this.tag="select",this.width=60}return e.prototype.getOptions=function(e){var t=[{value:"header1",text:"H1",styleForRenderMenuList:{"font-size":"32px","font-weight":"bold"}},{value:"header2",text:"H2",styleForRenderMenuList:{"font-size":"24px","font-weight":"bold"}},{value:"header3",text:"H3",styleForRenderMenuList:{"font-size":"18px","font-weight":"bold"}},{value:"header4",text:"H4",styleForRenderMenuList:{"font-size":"16px","font-weight":"bold"}},{value:"header5",text:"H5",styleForRenderMenuList:{"font-size":"13px","font-weight":"bold"}},{value:"header6",text:"H6",styleForRenderMenuList:{"font-size":"11px","font-weight":"bold"}},{value:"paragraph",text:wm("header.text")}],n=this.getValue(e).toString();return t.forEach((function(e){e.value===n?e.selected=!0:delete e.selected})),t},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){return ZD(e)},e.prototype.isDisabled=function(e){return JD(e)},e.prototype.exec=function(e,t){QD(e,t.toString())},e}(),uw={key:"headerSelect",factory:function(){return new sw}},lw={key:"header1",factory:function(){return new tw}},cw={key:"header2",factory:function(){return new nw}},dw={key:"header3",factory:function(){return new rw}},fw={key:"header4",factory:function(){return new ow}},pw={key:"header5",factory:function(){return new iw}},hw={key:"header6",factory:function(){return new aw}};function gw(e){return function(t,n,r){var o=fh(t);return 0===(n=n.filter((function(e){return!!ap.Text.isText(e)||!!r.isInline(e)}))).length&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"header".concat(e),children:n}}}var vw={selector:"h1:not([data-w-e-type])",parseElemHtml:gw(1)},mw={selector:"h2:not([data-w-e-type])",parseElemHtml:gw(2)},yw={selector:"h3:not([data-w-e-type])",parseElemHtml:gw(3)},bw={selector:"h4:not([data-w-e-type])",parseElemHtml:gw(4)},Ew={selector:"h5:not([data-w-e-type])",parseElemHtml:gw(5)},Cw={selector:"h6:not([data-w-e-type])",parseElemHtml:gw(6)};function Dw(e){return function(t,n,r){var o="h".concat(e);return Cy.jsx(o,null,n)}}var ww={renderElems:[{type:"header1",renderElem:Dw(1)},{type:"header2",renderElem:Dw(2)},{type:"header3",renderElem:Dw(3)},{type:"header4",renderElem:Dw(4)},{type:"header5",renderElem:Dw(5)},{type:"header6",renderElem:Dw(6)}],elemsToHtml:[WD,GD,qD,KD,YD,XD],parseElemsHtml:[vw,mw,yw,bw,Ew,Cw],menus:[uw,lw,cw,dw,fw,pw,hw],editorPlugin:function(e){var t=e.insertBreak,n=e;return n.insertBreak=function(){var r=vp(ap.Editor.nodes(n,{match:function(e){return ug.getNodeType(e).startsWith("header")},universal:!0}),1),o=r[0];if(o)if(ug.isSelectionAtLineEnd(e,o[1])){ap.Transforms.insertNodes(n,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}else t();else t()},n}};var Aw={type:"image",elemToHtml:function(e,t){var n=e,r=n.src,o=n.alt,i=void 0===o?"":o,a=n.href,s=void 0===a?"":a,u=n.width,l=void 0===u?"":u,c=n.height,d=void 0===c?"":c,f=n.style,p=void 0===f?{}:f,h=p.width,g=void 0===h?"":h,v=p.height,m=void 0===v?"":v,y="";return g&&(y+="width: ".concat(g,";")),m&&(y+="height: ".concat(m,";")),'<img src="'.concat(r,'" alt="').concat(i,'" data-href="').concat(s,'" width="').concat(l,'" height="').concat(d,'" style="').concat(y,'"/>')}};var Sw=function(){function e(){this.title=wm("image.delete"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==ug.getSelectedNodeByType(e,"image")},e.prototype.exec=function(e,t){this.isDisabled(e)||ap.Transforms.removeNodes(e,{match:function(e){return ug.checkNodeType(e,"image")}})},e}();function xw(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(hh())}function Ow(e){return e.replace(/</g,"<").replace(/>/g,">")}function Tw(e){var t=e.selection;if(null==t)return!0;if(!ap.Range.isCollapsed(t))return!0;var n=vp(ap.Editor.nodes(e,{match:function(t){var n=ug.getNodeType(t);return"code"===n||("pre"===n||("link"===n||("list-item"===n||(!!n.startsWith("header")||("blockquote"===n||!!ap.Editor.isVoid(e,t))))))},universal:!0}),1);return!!n[0]}function Nw(e,t,n){return pp(this,arguments,void 0,(function(e,t,n,r,o){var i,a;return void 0===r&&(r=""),void 0===o&&(o=""),hp(this,(function(s){switch(s.label){case 0:return(i=t.getMenuConfig(e).checkImage)?[4,i(n,r,o)]:[3,2];case 1:if("string"==typeof(a=s.sent()))return t.alert(a,"error"),[2,!1];if(null==a)return[2,!1];s.label=2;case 2:return[2,!0]}}))}))}function Bw(e,t,n){return pp(this,void 0,void 0,(function(){var r;return hp(this,(function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseImageSrc)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}}))}))}function kw(e,t){return pp(this,arguments,void 0,(function(e,t,n,r){var o,i,a;return void 0===n&&(n=""),void 0===r&&(r=""),hp(this,(function(s){switch(s.label){case 0:return[4,Nw("insertImage",e,t,n,r)];case 1:return s.sent()?[4,Bw("insertImage",e,t)]:[2];case 2:return o=s.sent(),i={type:"image",src:Ow(o),href:r,alt:n,style:{},children:[{text:""}]},null===e.selection&&e.restoreSelection(),ug.getSelectedNodeByType(e,"image")&&e.move(1),Tw(e)?[2]:(ap.Transforms.insertNodes(e,i),(a=e.getMenuConfig("insertImage").onInsertedImage)&&a(i),[2])}}))}))}function Fw(){return xw("w-e-edit-image")}var Pw=function(){function e(){this.title=wm("image.edit"),this.iconSvg=aD,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=Fw(),this.altInputId=Fw(),this.hrefInputId=Fw(),this.buttonId=Fw()}return e.prototype.getValue=function(e){return""},e.prototype.getImageNode=function(e){return ug.getSelectedNodeByType(e,"image")},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==ug.getSelectedNodeByType(e,"image"))},e.prototype.getModalPositionNode=function(e){return this.getImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,s=this.getImageNode(e);if(null==s)throw new Error("Not found selected image node");var u=vp(Im(wm("image.src"),r),2),l=u[0],c=u[1],d=fh(c),f=vp(Im(wm("image.desc"),o),2),p=f[0],h=f[1],g=fh(h),v=vp(Im(wm("image.link"),i),2),m=v[0],y=v[1],b=fh(y),E=vp(Rm(a,wm("common.ok")),1)[0];if(null==this.$content){var C=fh("<div></div>");C.on("click","#".concat(a),(function(n){n.preventDefault();var a=C.find("#".concat(r)).val(),s=C.find("#".concat(o)).val(),u=C.find("#".concat(i)).val();t.updateImage(e,a,s,u),e.hidePanelOrModal()})),this.$content=C}var D=this.$content;D.empty(),D.append(l),D.append(p),D.append(m),D.append(E);var w=s,A=w.src,S=w.alt,x=void 0===S?"":S,O=w.href,T=void 0===O?"":O;return d.val(A),g.val(x),b.val(T),setTimeout((function(){d.focus()})),D[0]},e.prototype.updateImage=function(e,t,n,r,o){void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),t&&(e.restoreSelection(),this.isDisabled(e)||function(e,t){pp(this,arguments,void 0,(function(e,t,n,r,o){var i,a,s,u,l,c;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),hp(this,(function(d){switch(d.label){case 0:return[4,Nw("editImage",e,t,n,r)];case 1:return d.sent()?[4,Bw("editImage",e,t)]:[2];case 2:return i=d.sent(),null==(a=ug.getSelectedNodeByType(e,"image"))||(s=a.style,u={src:i,alt:n,href:r,style:fp(fp({},void 0===s?{}:s),o)},ap.Transforms.setNodes(e,u,{match:function(e){return ug.checkNodeType(e,"image")}}),l=ug.getSelectedNodeByType(e,"image"),(c=e.getMenuConfig("editImage").onUpdatedImage)&&c(l)),[2]}}))}))}(e,t,n,r,o))},e}();function Iw(){return xw("w-e-insert-image")}var Rw=function(){function e(){this.title=wm("image.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=Iw(),this.heightInputId=Iw(),this.buttonId=Iw()}return e.prototype.getSelectedImageNode=function(e){return ug.getSelectedNodeByType(e,"image")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedImageNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=vp(Im(wm("image.width"),n,"auto"),2),a=i[0],s=i[1],u=fh(s),l=vp(Im(wm("image.height"),r,"auto"),2),c=l[0],d=l[1],f=fh(d),p=vp(Rm(o,wm("image.ok")),1)[0],h=this.getSelectedImageNode(e);if(null==this.$content){var g=fh("<div></div>");g.on("click","#".concat(o),(function(t){t.preventDefault();var o=g.find("#".concat(n)).val().trim(),i=g.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u=function(e){return/^\d+(\.\d+)?px$/.test(e)},l="auto",c="auto";a(o)?l=o:s(o)?l="".concat(parseInt(o,10),"px"):u(o)&&(l=o),a(i)?c=i:s(i)?c="".concat(parseInt(i,10),"px"):u(i)&&(c=i);var d=h.style,f=void 0===d?{}:d;e.restoreSelection();var p=fp(fp({},f),{style:{width:l,height:c}});ap.Transforms.setNodes(e,p,{match:function(e){return ug.checkNodeType(e,"image")}}),e.hidePanelOrModal()})),this.$content=g}var v=this.$content;if(v.empty(),v.append(a),v.append(c),v.append(p),null==h)return v[0];var m=h.style,y=void 0===m?{}:m,b=y.width,E=void 0===b?"auto":b,C=y.height,D=void 0===C?"auto":C;return u.val(E),f.val(D),setTimeout((function(){u.focus()})),v[0]},e}();function Lw(){return xw("w-e-insert-image")}var _w=function(){function e(){this.title=wm("image.netImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=Lw(),this.altInputId=Lw(),this.hrefInputId=Lw(),this.buttonId=Lw()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return Tw(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,s=vp(Im(wm("image.src"),r),2),u=s[0],l=s[1],c=fh(l),d=vp(Im(wm("image.desc"),o),2),f=d[0],p=d[1],h=fh(p),g=vp(Im(wm("image.link"),i),2),v=g[0],m=g[1],y=fh(m),b=vp(Rm(a,wm("common.ok")),1)[0];if(null==this.$content){var E=fh("<div></div>");E.on("click","#".concat(a),(function(n){n.preventDefault();var a=E.find("#".concat(r)).val().trim(),s=E.find("#".concat(o)).val().trim(),u=E.find("#".concat(i)).val().trim();t.insertImage(e,a,s,u),e.hidePanelOrModal()})),this.$content=E}var C=this.$content;return C.empty(),C.append(u),C.append(f),C.append(v),C.append(b),c.val(""),h.val(""),y.val(""),setTimeout((function(){c.focus()})),C[0]},e.prototype.insertImage=function(e,t,n,r){void 0===n&&(n=""),void 0===r&&(r=""),t&&(e.restoreSelection(),this.isDisabled(e)||kw(e,t,n,r))},e}(),Mw=function(){function e(){this.title=wm("image.viewLink"),this.iconSvg=sD,this.tag="button"}return e.prototype.getValue=function(e){var t=ug.getSelectedNodeByType(e,"image");return t&&t.href||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!this.getValue(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View image link failed, image.href is '".concat(t,"'"));window.open(t,"_blank")}},e}(),jw=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.getSelectedNode=function(e){return ug.getSelectedNodeByType(e,"image")},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedNode(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.getSelectedNode(e);if(null!=n){var r=ug.getHoverbar(e);r&&r.hideAndClean();var o=n.style,i={style:fp(fp({},void 0===o?{}:o),{width:this.value,height:""})};ap.Transforms.setNodes(e,i,{match:function(e){return ug.checkNodeType(e,"image")}})}}},e}(),Hw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="30%",t.value="30%",t}return dp(t,e),t}(jw),zw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="50%",t.value="50%",t}return dp(t,e),t}(jw),$w=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="100%",t.value="100%",t}return dp(t,e),t}(jw),Uw={onInsertedImage:function(e){},onUpdatedImage:function(e){},checkImage:function(e,t,n){return!0},parseImageSrc:function(e){return e}};function Vw(e,t){var n=ug.findKey(e,t).id;return"w-e-image-container-".concat(n)}function Ww(e,t,n,r){var o=fh("body"),i=Vw(e,t),a=r.width,s=r.height,u=0,l=0,c=0,d=0,f=!1,p=null;var h=Km((function(e){e.preventDefault();var t=e.clientX,n=l+(f?u-t:t-u),r=c*(n/l);n>d-6||null!=p&&(n<=15||r<=15||(p.css("width","".concat(n,"px")),p.css("height","".concat(r,"px"))))}),100);function g(n){if(o.off("mousemove",h),null!=p){var r=p.width().toFixed(2),i=p.height().toFixed(2),a={style:fp(fp({},t.style),{width:"".concat(r,"px"),height:"".concat(i,"px")})};ap.Transforms.setNodes(e,a,{at:ug.findPath(e,t)}),o.off("mouseup",g)}}function v(t,n){p=function(){var e=fh("#".concat(i));if(0===e.length)throw new Error("Cannot find image container elem");return e}(),u=t,d=n;var r=p.find("img");if(0===r.length)throw new Error("Cannot find image elem");l=r.width(),c=r.height(),o.on("mousemove",h),o.on("mouseup",g);var a=ug.getHoverbar(e);a&&a.hideAndClean()}var m={};return a&&(m.width=a),s&&(m.height=s),m.boxShadow="0 0 0 1px #B4D5FF",Cy.jsx("div",{id:i,style:m,className:"w-e-image-container w-e-selected-image-container",on:{mousedown:function(n){var r=fh(n.target);if(r.hasClass("w-e-image-dragger")){n.preventDefault(),(r.hasClass("left-top")||r.hasClass("left-bottom"))&&(f=!0);var o=ug.getParentNode(e,t);if(null!=o){var i=ug.toDOMNode(e,o),a=i.getBoundingClientRect?i.getBoundingClientRect():{width:0},s=window.getComputedStyle(i),u=parseFloat(s.paddingLeft),l=parseFloat(s.paddingRight),c=parseFloat(s.borderLeftWidth),d=parseFloat(s.borderRightWidth);v(n.clientX,a.width-u-l-c-d)}}}}},n,Cy.jsx("div",{className:"w-e-image-dragger left-top"}),Cy.jsx("div",{className:"w-e-image-dragger right-top"}),Cy.jsx("div",{className:"w-e-image-dragger left-bottom"}),Cy.jsx("div",{className:"w-e-image-dragger right-bottom"}))}var Gw={type:"image",renderElem:function(e,t,n){var r=e,o=r.src,i=r.alt,a=void 0===i?"":i,s=r.href,u=void 0===s?"":s,l=r.style,c=void 0===l?{}:l,d=c.width,f=void 0===d?"":d,p=c.height,h=void 0===p?"":p,g=ug.isNodeSelected(n,e),v={maxWidth:"100%"};f&&(v.width="100%"),h&&(v.height="100%");var m=Cy.jsx("img",{style:v,src:o,alt:a,"data-href":u}),y=n.isDisabled();return g&&!y?Ww(n,e,m,{width:f,height:h}):function(e,t,n,r){var o=r.width,i=r.height,a={};o&&(a.width=o),i&&(a.height=i);var s=Vw(e,t);return Cy.jsx("div",{id:s,style:a,className:"w-e-image-container"},n)}(n,e,m,{width:f,height:h})}},qw={renderElems:[Gw],elemsToHtml:[Aw],parseElemsHtml:[{selector:"img:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=fh(e),o=r.attr("data-href")||"";return o=decodeURIComponent(o),{type:"image",src:r.attr("src")||"",alt:r.attr("alt")||"",href:o,style:{width:hD(r,"width"),height:hD(r,"height")},width:r.attr("width")||"",height:r.attr("height")||"",children:[{text:""}]}}}],menus:[{key:"insertImage",factory:function(){return new _w},config:Uw},{key:"deleteImage",factory:function(){return new Sw}},{key:"editImage",factory:function(){return new Pw},config:Uw},{key:"viewImageLink",factory:function(){return new Mw}},{key:"imageWidth30",factory:function(){return new Hw}},{key:"imageWidth50",factory:function(){return new zw}},{key:"imageWidth100",factory:function(){return new $w}},{key:"editorImageSizeMenu",factory:function(){return new Rw}}],editorPlugin:function(e){var t=e.isInline,n=e.isVoid,r=e;return r.isInline=function(e){return"image"===e.type||t(e)},r.isVoid=function(e){return"image"===e.type||n(e)},r}},Kw=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){var t=vp(ap.Editor.nodes(e,{match:function(e){return!!e.indent},universal:!0}),1),n=t[0];return null==n?"":vp(n,1)[0].indent||""},e.prototype.isActive=function(e){return!1},e.prototype.getMatchNode=function(e){var t=vp(ap.Editor.nodes(e,{match:function(e){var t=ug.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e}(),Yw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=wm("indent.decrease"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',t}return dp(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!t.indent},t.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{indent:null},{match:function(e){return ap.Element.isElement(e)}})},t}(Kw),Xw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=wm("indent.increase"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',t.DEFAULT_INDENT_VALUE="2em",t}return dp(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!!t.indent},t.prototype.getIndentValue=function(e){var t=this.getMatchNode(e);if(!t)return this.DEFAULT_INDENT_VALUE;var n=t.children.filter(ap.Text.isText)[0];if(!n||!n.fontSize)return this.DEFAULT_INDENT_VALUE;var r=n.fontSize,o=parseInt(n.fontSize,10),i=r.replace("".concat(o),"");return"".concat(2*o).concat(i)},t.prototype.exec=function(e,t){var n=this.getIndentValue(e);ap.Transforms.setNodes(e,{indent:n},{match:function(e){return ap.Element.isElement(e)},mode:"highest"})},t}(Kw);var Zw={renderStyle:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.indent,r=t;return n&&xD(r,{textIndent:n}),r},styleToHtml:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.indent;if(!n)return t;var r=fh(t);return r.css("text-indent",n),fD(r)},preParseHtml:[{selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(e){var t=fh(e),n=hD(t,"padding-left");return/\dem/.test(n)&&t.css("text-indent","2em"),/\dpx/.test(n)&&parseInt(n,10)%32==0&&t.css("text-indent","2em"),t[0]}}],parseStyleHtml:function(e,t,n){var r=fh(e);if(!ap.Element.isElement(t))return t;var o=t,i=hD(r,"text-indent"),a=parseInt(i,10);return i&&a>0&&(o.indent=i),o},menus:[{key:"indent",factory:function(){return new Xw}},{key:"delIndent",factory:function(){return new Yw}}]},Jw=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!ug.getSelectedElems(e).some((function(t){var n=t.type;return!(!ap.Editor.isVoid(e,t)||!ap.Editor.isBlock(e,t)||"video"===n)||!!["pre","code"].includes(n)}))},e}(),Qw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=wm("justify.center"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return dp(t,e),t.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{textAlign:"center"},{match:function(t){return ap.Element.isElement(t)&&!e.isInline(t)}})},t}(Jw),eA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=wm("justify.justify"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',t}return dp(t,e),t.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{textAlign:"justify"},{match:function(t){return ap.Element.isElement(t)&&!e.isInline(t)}})},t}(Jw),tA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=wm("justify.left"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return dp(t,e),t.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{textAlign:"left"},{match:function(t){return ap.Element.isElement(t)&&!e.isInline(t)}})},t}(Jw),nA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=wm("justify.right"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return dp(t,e),t.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{textAlign:"right"},{match:function(t){return ap.Element.isElement(t)&&!e.isInline(t)}})},t}(Jw);var rA={renderStyle:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.textAlign,r=t;return n&&xD(r,{textAlign:n}),r},styleToHtml:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.textAlign;if(!n)return t;var r=fh(t);return r.css("text-align",n),fD(r)},parseStyleHtml:function(e,t,n){var r=fh(e);if(!ap.Element.isElement(t))return t;var o=t,i=hD(r,"text-align");return i&&(o.textAlign=i),o},menus:[{key:"justifyLeft",factory:function(){return new tA}},{key:"justifyRight",factory:function(){return new nA}},{key:"justifyCenter",factory:function(){return new Qw}},{key:"justifyJustify",factory:function(){return new eA}}]};var oA=function(){function e(){this.title=wm("lineHeight.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M964 788a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526zM198.93 144.306c6.668-5.798 16.774-5.094 22.573 1.574l122.26 140.582a16 16 0 0 1 3.927 10.5c0 8.836-7.164 16-16 16h-61.8a8 8 0 0 0-8 8v390.077h69.819a16 16 0 0 1 10.502 3.928c6.666 5.8 7.37 15.906 1.57 22.573L221.476 878.123a16 16 0 0 1-1.57 1.57c-6.668 5.8-16.774 5.097-22.574-1.57L75.051 737.538a16 16 0 0 1-3.928-10.5c0-8.837 7.163-16 16-16h69.822V312.96H87.127a16 16 0 0 1-10.502-3.928c-6.666-5.8-7.37-15.906-1.57-22.573l122.303-140.582a16 16 0 0 1 1.572-1.572zM964 465a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z m0-323a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z"></path></svg>',this.tag="select",this.width=80}return e.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig("lineHeight").lineHeightList,r=void 0===n?[]:n;t.push({text:wm("lineHeight.default"),value:""}),r.forEach((function(e){t.push({text:e,value:e})}));var o=this.getValue(e);return t.forEach((function(e){e.value===o?e.selected=!0:delete e.selected})),t},e.prototype.getMatchNode=function(e){var t=vp(ap.Editor.nodes(e,{match:function(e){var t=ug.getNodeType(e);return!!t.startsWith("header")||!!["paragraph","blockquote","list-item"].includes(t)},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getMatchNode(e);return null==t?"":ap.Element.isElement(t)&&t.lineHeight||""},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getMatchNode(e)},e.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{lineHeight:t.toString()},{mode:"highest"})},e}();var iA={renderStyle:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.lineHeight,r=t;return n&&xD(r,{lineHeight:n}),r},styleToHtml:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.lineHeight;if(!n)return t;var r=fh(t);return r.css("line-height",n),fD(r)},parseStyleHtml:function(e,t,n){var r=fh(e);if(!ap.Element.isElement(t))return t;var o=t,i=n.getMenuConfig("lineHeight").lineHeightList,a=void 0===i?[]:i,s=hD(r,"line-height");return s&&a.includes(s)&&(o.lineHeight=s),o},menus:[{key:"lineHeight",factory:function(){return new oA},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]};var aA={type:"link",elemToHtml:function(e,t){var n=e,r=n.url,o=n.target,i=void 0===o?"_blank":o;return'<a href="'.concat(r,'" target="').concat(i,'">').concat(t,"</a>")}};function sA(e,t,n,r){return pp(this,void 0,void 0,(function(){var o,i;return hp(this,(function(a){switch(a.label){case 0:return(o=t.getMenuConfig(e).checkLink)?[4,o(n,r)]:[3,2];case 1:if("string"==typeof(i=a.sent()))return t.alert(i,"error"),[2,!1];if(null==i)return[2,!1];a.label=2;case 2:return[2,!0]}}))}))}function uA(e,t,n){return pp(this,void 0,void 0,(function(){var r;return hp(this,(function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}}))}))}function lA(e){return null==e.selection||!!ug.getSelectedElems(e).some((function(t){var n=t.type;return!!e.isVoid(t)||!!["pre","code","link"].includes(n)}))}function cA(e,t){return{type:"link",url:Ow(e),children:t?[{text:t}]:[]}}function dA(e,t,n){return pp(this,void 0,void 0,(function(){var r,o,i,a,s;return hp(this,(function(u){switch(u.label){case 0:return n?(t||(t=n),e.restoreSelection(),lA(e)?[2]:[4,sA("insertLink",e,t,n)]):[2];case 1:return u.sent()?[4,uA("insertLink",e,n)]:[2];case 2:if(r=u.sent(),null==(o=e.selection))return[2];if(ap.Range.isCollapsed(o)){if((a=ug.getLeftLengthOfMaxLength(e))<=0)return[2];e.insertText(" "),a<t.length+1&&(t=t.slice(0,a-1)),s=cA(r,t),ap.Transforms.insertNodes(e,s),e.insertFragment([{text:" "}])}else if((i=ap.Editor.string(e,o))!==t){if((a=ug.getLeftLengthOfMaxLength(e))<=0)return[2];a<i.length-t.length&&(t=t.slice(0,a)),e.deleteFragment(),s=cA(r,t),ap.Transforms.insertNodes(e,s)}else s=cA(r),ap.Transforms.wrapNodes(e,s,{split:!0}),ap.Transforms.collapse(e,{edge:"end"});return[2]}}))}))}function fA(){return xw("w-e-update-link")}var pA=function(){function e(){this.title=wm("link.edit"),this.iconSvg=aD,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=fA(),this.buttonId=fA()}return e.prototype.getSelectedLinkElem=function(e){var t=ug.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.getModalPositionNode=function(e){return ug.getSelectedNodeByType(e,"link")},e.prototype.getModalContentElem=function(e){var t=this.urlInputId,n=this.buttonId,r=vp(Im(wm("link.url"),t),2),o=r[0],i=r[1],a=fh(i),s=vp(Rm(n,wm("common.ok")),1)[0];if(null==this.$content){var u=fh("<div></div>");u.on("click","#".concat(n),(function(n){n.preventDefault(),e.restoreSelection();var r=ug.getSelectedNodeByType(e,"link"),o=r?ap.Node.string(r):"",i=u.find("#".concat(t)).val();!function(e,t,n){pp(this,void 0,void 0,(function(){var r,o;return hp(this,(function(i){switch(i.label){case 0:return n?[4,sA("editLink",e,t,n)]:[2];case 1:return i.sent()?[4,uA("editLink",e,n)]:[2];case 2:return r=i.sent(),o={url:Ow(r)},ap.Transforms.setNodes(e,o,{match:function(e){return ug.checkNodeType(e,"link")}}),[2]}}))}))}(e,o,i),e.hidePanelOrModal()})),this.$content=u}var l=this.$content;l.empty(),l.append(o),l.append(s);var c=this.getValue(e);return a.val(c),setTimeout((function(){a.focus()})),l[0]},e}();function hA(){return xw("w-e-insert-link")}var gA=function(){function e(){this.title=wm("link.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=hA(),this.urlInputId=hA(),this.buttonId=hA()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return lA(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=e.selection,n=this,r=n.textInputId,o=n.urlInputId,i=n.buttonId,a=vp(Im(wm("link.text"),r),2),s=a[0],u=a[1],l=fh(u),c=vp(Im(wm("link.url"),o),2),d=c[0],f=c[1],p=fh(f),h=vp(Rm(i,wm("common.ok")),1)[0];if(null==this.$content){var g=fh("<div></div>");g.on("click","#".concat(i),(function(t){t.preventDefault();var n=g.find("#".concat(r)).val(),i=g.find("#".concat(o)).val();dA(e,n,i),e.hidePanelOrModal()})),this.$content=g}var v=this.$content;if(v.empty(),v.append(s),v.append(d),v.append(h),null==t||ap.Range.isCollapsed(t))l.val("");else{var m=ap.Editor.string(e,t);l.val(m)}return p.val(""),setTimeout((function(){l.focus()})),v[0]},e}(),vA=function(){function e(){this.title=wm("link.unLink"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M608.16328 811.815036c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.347563 89.347564c-118.525421 118.523421-311.38448 118.531421-429.919901 0-118.527421-118.529421-118.527421-311.39048 0-429.917901l89.349564-89.349563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.195613 79.195613c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.349563 89.347564c-56.143726 56.145726-56.143726 147.49928 0 203.645005 56.143726 56.143726 147.49928 56.145726 203.647005 0l89.347564-89.347563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.193613 79.195613z m-113.135447-520.429459c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.347564-89.347564c56.143726-56.149726 147.49928-56.145726 203.647006 0 56.143726 56.145726 56.143726 147.49928 0 203.645006l-89.349564 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.195613 79.195613c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.349564-89.349563c118.529421-118.529421 118.529421-311.38848 0-429.917901-118.531421-118.527421-311.38848-118.527421-429.919901 0l-89.347563 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.193613 79.195613z m469.653707 718.556492l45.253779-45.253779c18.745908-18.745908 18.745908-49.13776 0-67.881669L127.195629 14.062931c-18.745908-18.745908-49.13776-18.745908-67.881669 0L14.058181 59.31871c-18.745908 18.745908-18.745908 49.13776 0 67.881669l882.74169 882.74169c18.745908 18.743908 49.13776 18.743908 67.881669 0z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==ug.getSelectedNodeByType(e,"link")},e.prototype.exec=function(e,t){this.isDisabled(e)||ap.Transforms.unwrapNodes(e,{match:function(e){return ug.checkNodeType(e,"link")}})},e}(),mA=function(){function e(){this.title=wm("link.view"),this.iconSvg=sD,this.tag="button"}return e.prototype.getSelectedLinkElem=function(e){var t=ug.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View link failed, link url is '".concat(t,"'"));window.open(t,"_blank")}},e}(),yA={checkLink:function(e,t){return!0},parseLinkUrl:function(e){return e}},bA={key:"insertLink",factory:function(){return new gA},config:yA},EA={key:"editLink",factory:function(){return new pA},config:yA},CA={key:"unLink",factory:function(){return new vA}},DA={key:"viewLink",factory:function(){return new mA}};var wA,AA,SA={selector:"a:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=fh(e);return 0===(t=t.filter((function(e){return!!ap.Text.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"link",url:r.attr("href")||"",target:r.attr("target")||"",children:t}}};var xA=E(function(){if(AA)return wA;AA=1,wA=function(r){if("string"!=typeof r)return!1;var o=r.match(e);if(!o)return!1;var i=o[1];if(!i)return!1;if(t.test(i)||n.test(i))return!0;return!1};var e=/^(?:\w+:)?\/\/(\S+)$/,t=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,n=/^[^\s\.]+\.\S{2,}$/;return wA}());var OA={type:"link",renderElem:function(e,t,n){var r=e,o=r.url,i=r.target,a=void 0===i?"_blank":i;return Cy.jsx("a",{href:o,target:a},t)}},TA={renderElems:[OA],elemsToHtml:[aA],parseElemsHtml:[SA],menus:[bA,EA,CA,DA],editorPlugin:function(e){var t=e.isInline,n=e.insertData,r=e.normalizeNode,o=e;return o.isInline=function(e){return"link"===e.type||t(e)},o.insertData=function(e){var t=e.getData("text/plain");if(xA(t)){if(/<img[^>]+>/.test(e.getData("text/html")))n(e);else if(!lA(o)){var r=o.selection;if(null!=r){var i=ap.Editor.string(o,r);dA(o,i,t)}}}else n(e)},o.normalizeNode=function(e){var t=vp(e,2),n=t[0],i=t[1];return"link"!==ug.getNodeType(n)?r([n,i]):""===ap.Node.string(n)?ap.Transforms.removeNodes(o,{at:i}):r([n,i])},o}};function NA(e){var t=vp(ap.Editor.nodes(e,{match:function(t){return e.children[0]===t},mode:"highest"}),1),n=t[0];if(null==n)return!1;var r=n[0];if(!ap.Element.isElement(r))return!1;if("paragraph"===r.type)return!1;if(""!==ap.Node.string(r))return!1;var o=r.children,i=void 0===o?[]:o;return!!ap.Text.isText(i[0])&&(ap.Transforms.setNodes(e,{type:"paragraph"}),!0)}var BA={renderElems:[{type:"paragraph",renderElem:function(e,t,n){return Cy.jsx("p",null,t)}}],elemsToHtml:[{type:"paragraph",elemToHtml:function(e,t){return""===t?"<p><br></p>":"<p>".concat(t,"</p>")}}],parseElemsHtml:[{selector:"p:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=fh(e);return 0===(t=t.filter((function(e){return!!ap.Text.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:t}}}],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward,r=e;return r.deleteBackward=function(e){NA(r)||t(e)},r.deleteForward=function(e){NA(r)||n(e)},r}};function kA(e,t){if(null==e.selection)return!0;var n=vp(ap.Editor.nodes(e,{match:function(t){return"pre"===ug.getNodeType(t)||!!ap.Editor.isVoid(e,t)},universal:!0}),1);return!!n[0]}function FA(e,t){Object.keys(t).forEach((function(t){"text"!==t&&ap.Editor.removeMark(e,t)}))}var PA=function(){function e(){this.marksNeedToRemove=[],this.tag="button"}return e.prototype.getValue=function(e){var t=this.mark,n=ap.Editor.marks(e);if(n)return n[t];var r=vp(ap.Editor.nodes(e,{match:function(e){return!0===e[t]}}),1);return!!r[0]},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){return kA(e,this.mark)},e.prototype.exec=function(e,t){var n=this.mark,r=this.marksNeedToRemove;t?e.removeMark(n):(e.addMark(n,!0),r&&r.forEach((function(t){return e.removeMark(t)})))},e}(),IA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="bold",t.title=wm("textStyle.bold"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z"></path></svg>',t.hotkey="mod+b",t}return dp(t,e),t}(PA),RA=function(){function e(){this.title=wm("textStyle.clear"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M969.382408 288.738615l-319.401123-270.852152a67.074236 67.074236 0 0 0-96.459139 5.74922l-505.931379 574.922021a68.35184 68.35184 0 0 0-17.886463 47.910169 74.101061 74.101061 0 0 0 24.274486 47.910168l156.50655 132.232065h373.060512L975.131628 383.281347a67.074236 67.074236 0 0 0-5.74922-96.459139z m-440.134747 433.746725H264.144729l-90.071117-78.572676c-5.74922-5.74922-12.137243-12.137243-12.137243-17.886463a36.411728 36.411728 0 0 1 5.749221-24.274485l210.804741-240.828447 265.102932 228.691204z m-439.495945 180.781036h843.218964a60.047411 60.047411 0 1 1 0 120.733624H89.751716a60.047411 60.047411 0 1 1 0-120.733624z m0 0"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return kA(e)},e.prototype.exec=function(e,t){var n,r,o=ap.Editor.nodes(e,{match:function(e){return ap.Text.isText(e)},universal:!0});try{for(var i=gp(o),a=i.next();!a.done;a=i.next()){FA(e,a.value[0])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e}(),LA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="code",t.title=wm("textStyle.code"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M576 736l96 96 320-320L672 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224z"></path></svg>',t.hotkey="mod+e",t}return dp(t,e),t}(PA),_A=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="italic",t.title=wm("textStyle.italic"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',t.hotkey="mod+i",t}return dp(t,e),t}(PA),MA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="sub",t.marksNeedToRemove=["sup"],t.title=wm("textStyle.sub"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 910.016v50.016h128v64h-192v-146.016l128-60V768h-128v-64h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',t.hotkey="",t}return dp(t,e),t}(PA),jA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="sup",t.marksNeedToRemove=["sub"],t.title=wm("textStyle.sup"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 206.016v50.016h128v64h-192V174.016l128-60V64h-128V0h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',t.hotkey="",t}return dp(t,e),t}(PA),HA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="through",t.title=wm("textStyle.through"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M1024 512v64h-234.496c27.52 38.496 42.496 82.688 42.496 128 0 70.88-36.672 139.04-100.576 186.976C672.064 935.488 594.144 960 512 960s-160.064-24.512-219.424-69.024C228.64 843.04 192 774.88 192 704h128c0 69.376 87.936 128 192 128s192-58.624 192-128-87.936-128-192-128H0v-64h299.52a385.984 385.984 0 0 1-6.944-5.024C228.64 459.04 192 390.88 192 320s36.672-139.04 100.576-186.976C351.936 88.512 429.856 64 512 64s160.064 24.512 219.424 69.024C795.328 180.96 832 249.12 832 320h-128c0-69.376-87.936-128-192-128s-192 58.624-192 128 87.936 128 192 128c78.976 0 154.048 22.688 212.48 64H1024z"></path></svg>',t.hotkey="mod+shift+x",t}return dp(t,e),t}(PA),zA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="underline",t.title=wm("textStyle.underline"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 64l128 0 0 416c0 159.072-143.264 288-320 288s-320-128.928-320-288l0-416 128 0 0 416c0 40.16 18.24 78.688 51.36 108.512 36.896 33.216 86.848 51.488 140.64 51.488s103.744-18.304 140.64-51.488c33.12-29.792 51.36-68.352 51.36-108.512l0-416zM192 832l640 0 0 128-640 0z"></path></svg>',t.hotkey="mod+u",t}return dp(t,e),t}(PA);function $A(e,t){return 0!==e.length&&(!!e[0].matches(t)||e.find(t).length>0)}function UA(e,t){var n=t,r=e,o=r.bold,i=r.italic,a=r.underline,s=r.code,u=r.through,l=r.sub,c=r.sup;return o&&(n="<strong>".concat(n,"</strong>")),s&&(n="<code>".concat(n,"</code>")),i&&(n="<em>".concat(n,"</em>")),a&&(n="<u>".concat(n,"</u>")),u&&(n="<s>".concat(n,"</s>")),l&&(n="<sub>".concat(n,"</sub>")),c&&(n="<sup>".concat(n,"</sup>")),n}var VA={renderStyle:function(e,t){var n=e,r=n.bold,o=n.italic,i=n.underline,a=n.code,s=n.through,u=n.sub,l=n.sup,c=t;return r&&(c=Cy.jsx("strong",null,c)),a&&(c=Cy.jsx("code",null,c)),o&&(c=Cy.jsx("em",null,c)),i&&(c=Cy.jsx("u",null,c)),s&&(c=Cy.jsx("s",null,c)),u&&(c=Cy.jsx("sub",null,c)),l&&(c=Cy.jsx("sup",null,c)),c},menus:[{key:"bold",factory:function(){return new IA}},{key:"underline",factory:function(){return new zA}},{key:"italic",factory:function(){return new _A}},{key:"through",factory:function(){return new HA}},{key:"code",factory:function(){return new LA}},{key:"sub",factory:function(){return new MA}},{key:"sup",factory:function(){return new jA}},{key:"clearStyle",factory:function(){return new RA}}],styleToHtml:function(e,t){if(!ap.Text.isText(e))return t;if(dD(t))return UA(e,t);var n=fh(t),r=n.html();return r=UA(e,r),n.html(r),fD(n)},parseStyleHtml:function(e,t,n){var r=fh(e);if(!ap.Text.isText(t))return t;var o=t;return $A(r,"b,strong")&&(o.bold=!0),$A(r,"i,em")&&(o.italic=!0),$A(r,"u")&&(o.underline=!0),$A(r,"s,strike")&&(o.through=!0),$A(r,"sub")&&(o.sub=!0),$A(r,"sup")&&(o.sup=!0),$A(r,"code")&&(o.code=!0),o}};var WA={type:"todo",elemToHtml:function(e,t){var n=e.checked;return'<div data-w-e-type="todo"><input type="checkbox" disabled '.concat(n?"checked":"",">").concat(t,"</div>")}},GA=function(){function e(){this.title=wm("todo.todo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M278.755556 403.911111l-79.644445 79.644445L455.111111 739.555556l568.888889-568.888889-79.644444-79.644445L455.111111 580.266667l-176.355555-176.355556zM910.222222 910.222222H113.777778V113.777778h568.888889V0H113.777778C51.2 0 0 51.2 0 113.777778v796.444444c0 62.577778 51.2 113.777778 113.777778 113.777778h796.444444c62.577778 0 113.777778-51.2 113.777778-113.777778V455.111111h-113.777778v455.111111z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!ug.getSelectedNodeByType(e,"todo")},e.prototype.isDisabled=function(e){return null==e.selection||!!ug.getSelectedElems(e).some((function(t){if(ap.Editor.isVoid(e,t)&&ap.Editor.isBlock(e,t))return!0;var n=t.type;return!!["pre","table","list-item"].includes(n)}))},e.prototype.exec=function(e,t){var n=this.isActive(e);ap.Transforms.setNodes(e,{type:n?"paragraph":"todo"})},e}();var qA={type:"todo",renderElem:function(e,t,n){var r=!1;n.isDisabled()&&(r=!0);var o=e.checked,i=Cy.jsx("div",{style:{margin:"5px 0"}},Cy.jsx("span",{contentEditable:!1,style:{marginRight:"0.5em"}},Cy.jsx("input",{type:"checkbox",checked:o,disabled:r,on:{change:function(t){var r=ug.findPath(n,e),o={checked:t.target.checked};ap.Transforms.setNodes(n,o,{at:r})}}})),Cy.jsx("span",null,t));return i}},KA={renderElems:[qA],elemsToHtml:[WA],preParseHtml:[{selector:"ul.w-e-todo",preParseHtml:function(e){var t=fh(e).find("li"),n=fh('<div data-w-e-type="todo"></div>'),r=t.find("input[type]");return n.append(r),t.children()[0].remove(),n[0].innerHTML+=t[0].innerHTML,n[0]}}],parseElemsHtml:[{selector:'div[data-w-e-type="todo"]',parseElemHtml:function(e,t,n){var r=fh(e);0===(t=t.filter((function(e){return!!ap.Text.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=!1;return null!=r.find('input[type="checkbox"]').attr("checked")&&(o=!0),{type:"todo",checked:o,children:t}}}],menus:[{key:"todo",factory:function(){return new GA}}],editorPlugin:function(e){var t=e.deleteBackward,n=e;return n.deleteBackward=function(n){var r=e.selection;if(r&&ap.Range.isCollapsed(r)){var o=ug.getSelectedNodeByType(e,"todo");if(o&&0===ap.Node.string(o).length)return void ap.Transforms.setNodes(e,{type:"paragraph"},{mode:"highest"})}t(n)},n}},YA=function(){function e(){this.title=wm("undo.redo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.redo&&e.redo()},e}(),XA=function(){function e(){this.title=wm("undo.undo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.undo&&e.undo()},e}(),ZA=[VA,OD,jD,Zw,rA,iA,qw,FD,ID,TA,ED,vD,ww,BA,KA,zD,{menus:[{key:"redo",factory:function(){return new YA}},{key:"undo",factory:function(){return new XA}}]},UD,ND];Cm("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),Cm("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var JA=new WeakMap;function QA(e){var t,n=e.children||[],r=n.length;if(0===r)return"";for(var o=0;o<r&&!t;o+=1){var i=n[o];ap.Text.isText(i)&&(t=i)}return null==t?"":t.color||""}function eS(e,t,n){for(var r=t.type,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["type"]),i=void 0!==n?n:o.level||0,a=ug.findPath(e,t),s=a;;){if(0===s.length||0===a[a.length-1])return null;s=ap.Path.previous(s);var u=ap.Editor.node(e,s);if(!u)return null;var l=vp(u,1)[0],c=l.level,d=void 0===c?0:c;if(ug.getNodeType(l)!==r)return null;if(d===i)return l}}function tS(e,t,n){var r=eS(e,t,n);return!!r&&r.ordered===t.ordered}var nS=[];var rS={type:"list-item",elemToHtml:function(e,t){var n="",r="",o=e.ordered,i=void 0!==o&&o?"ol":"ul",a=function(e){var t=JA.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=ug.findPath(t,e);if(0===u[0])return s+1;var l=ap.Path.previous(u),c=ap.Editor.node(t,l);if(!c)return 0;var d=vp(c,1)[0];if(ug.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?s-v:v>s?tS(t,e)?0:1:v===s?h===i?0:1:0}(e);if(a>0)for(var s=0;s<a;s+=1)n+="<".concat(i,">"),nS.push(i);var u=function(e){var t=JA.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=ug.findPath(t,e);if(u[0]===t.children.length-1)return s+1;var l=ap.Path.next(u),c=ap.Editor.node(t,l);if(!c)return 0;var d=vp(c,1)[0];if(ug.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?tS(t,d)?s-v:s-v+1:v>s?0:v===s?h===i?0:1:0}(e);if(u>0)for(s=0;s<u;s+=1){var l=nS.pop();r+="</".concat(l,">")}var c=QA(e),d=c?' style="color:'.concat(c,'"'):"";return{html:"<li".concat(d,">").concat(t,"</li>"),prefix:n,suffix:r}}},oS=function(){function e(){this.type="list-item",this.tag="button"}return e.prototype.getListNode=function(e){var t=this.type;return ug.getSelectedNodeByType(e,t)},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){var t=this.getListNode(e);if(null==t)return!1;var n=t.ordered;return(void 0!==n&&n)===this.ordered},e.prototype.isDisabled=function(e){return null==e.selection||!!ug.getSelectedElems(e).some((function(t){if(ap.Editor.isVoid(e,t)&&ap.Editor.isBlock(e,t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)}))},e.prototype.exec=function(e,t){this.isActive(e)?ap.Transforms.setNodes(e,{type:"paragraph",ordered:void 0,level:void 0}):ap.Transforms.setNodes(e,{type:"list-item",ordered:this.ordered,indent:void 0})},e}(),iS=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.ordered=!1,t.title=wm("listModule.unOrderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',t}return dp(t,e),t}(oS),aS=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.ordered=!0,t.title=wm("listModule.orderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',t}return dp(t,e),t}(oS),sS={key:"bulletedList",factory:function(){return new iS}},uS={key:"numberedList",factory:function(){return new aS}};function lS(e){return e.length?e[0].tagName.toLowerCase():""}function cS(e){return ap.Editor.nodes(e,{at:e.selection||void 0,match:function(t){return 1===ug.findPath(e,t).length}})}dh.append&&(fh.fn.append=dh.append),dh.attr&&(fh.fn.attr=dh.attr),dh.parent&&(fh.fn.parent=dh.parent);var dS={type:"list-item",renderElem:function(e,t,n){JA.set(e,n);var r=e,o=r.level,i=void 0===o?0:o,a=r.ordered,s=void 0!==a&&a,u={margin:"5px 0 5px ".concat(20*i,"px"),display:"flex",alignItems:"flex-start"},l="";if(s){var c=function(e,t){var n=t,r=n.type,o=n.level,i=void 0===o?0:o,a=n.ordered,s=void 0!==a&&a,u=1,l=t,c=ug.findPath(e,l);if(0===c[0])return 1;for(;c[0]>0;){var d=ap.Path.previous(c),f=ap.Editor.node(e,d);if(null==f)break;var p=f[0],h=p.level,g=void 0===h?0:h,v=p.type,m=p.ordered;if(v!==r)break;if(g<i)break;if(g===i){if(m!==s)break;u+=1}l=p,c=d}return u}(n,e);l="".concat(c,".")}else l=function(e){void 0===e&&(e=0);var t="";switch(e){case 0:t="•";break;case 1:t="◦";break;default:t="▪"}return t}(i);var d=QA(e);return Cy.jsx("div",{style:u},Cy.jsx("span",{contentEditable:!1,style:{marginRight:"0.5em",color:d},"data-w-e-reserve":!0},l),Cy.jsx("span",{style:{flex:"1",wordBreak:"break-word"}},t))}},fS={renderElems:[dS],editorPlugin:function(e){var t=e.deleteBackward,n=e.handleTab,r=e.normalizeNode,o=e.insertBreak,i=e;return i.insertBreak=function(){var t=vp(ap.Editor.nodes(e,{match:function(e){return ug.checkNodeType(e,"list-item")},universal:!0}),1),n=t[0];return n?""!==n[0].children[0].text?o():void ap.Transforms.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0}):o()},i.deleteBackward=function(n){var r=i.selection;if(null!=r)if(ap.Range.isExpanded(r))t(n);else{var o=ug.getSelectedNodeByType(i,"list-item");if(null!=o)if(0!==r.focus.offset)t(n);else{var a=o,s=a.level,u=void 0===s?0:s,l=a.ordered,c=void 0!==l&&l;if(u>0){var d=eS(e,o,u-1);d&&d.ordered!==c?ap.Transforms.setNodes(i,{level:u-1,ordered:!c}):ap.Transforms.setNodes(i,{level:u-1})}else ap.Transforms.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0})}else t(n)}else t(n)},i.handleTab=function(){var e,t,r,o,a=i.selection;if(null!=a){if(ap.Range.isCollapsed(a)){var s=ug.getSelectedNodeByType(i,"list-item");if(null==s)return void n();if(0===a.focus.offset){var u=s.level,l=void 0===u?0:u;return void ap.Transforms.setNodes(i,{level:l+1})}}if(ap.Range.isExpanded(a)){var c=0,d=!1;try{for(var f=gp(cS(i)),p=f.next();!p.done;p=f.next()){var h=vp(p.value,1)[0];"list-item"===ug.getNodeType(h)?c+=1:d=!0}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}if(d||c<=1)return void n();try{for(var g=gp(cS(i)),v=g.next();!v.done;v=g.next()){var m=vp(v.value,2),y=(h=m[0],m[1]),b=h.level;l=void 0===b?0:b;ap.Transforms.setNodes(i,{level:l+1},{at:y})}}catch(e){r={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}}else n()}else n()},i.normalizeNode=function(e){var t=vp(e,2),n=t[0],o=t[1],a=ug.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||ap.Transforms.unwrapNodes(i,{at:o}),r([n,o])},i},menus:[sS,uS],elemsToHtml:[rS],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(e,t,n){return t.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=fh(e);0===(t=t.filter((function(e){return!!ap.Text.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=function(e){return"ol"===lS(e.parent())}(r),i=function(e){for(var t=0,n=e.parent(),r=lS(n);"ul"===r||"ol"===r;)r=lS(n=n.parent()),t+=1;return t-1}(r);return{type:"list-item",ordered:o,level:i,children:t}}}]};Cm("en",{tableModule:{modal:{border:"Border",borderWidth:"Width",bgColor:"Back color",align:"Text Align",ok:"OK"},color:{default:"Default color",clear:"Clear back color"},borderStyle:{none:"None",solid:"Solid",dotted:"Dotted",dashed:"Dashed",double:"Double",groove:"Groove",ridge:"Ridge",inset:"Inset",outset:"Outset"},deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Width auto",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header",mergeCell:"merge cell",splitCell:"split cell",tableProperty:"Table property",cellProperty:"Cell property"}}),Cm("zh-CN",{tableModule:{modal:{border:"边框",borderWidth:"宽度",bgColor:"背景色",align:"对齐方式",ok:"确定"},color:{default:"默认颜色",clear:"清除背景色"},borderStyle:{none:"无样式",solid:"实线",dotted:"点状虚线",dashed:"虚线",double:"双线",groove:"凹槽边框",ridge:"菱形边框",inset:"凹边框",outset:"凸边框"},deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"宽度自适应",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头",mergeCell:"合并单元格",splitCell:"拆分单元格",tableProperty:"表格属性",cellProperty:"单元格属性"}});var pS={type:"table",elemToHtml:function(e,t){var n=e,r=n.width,o=void 0===r?"auto":r,i=n.columnWidths,a=n.height,s=void 0===a?"auto":a,u=null==i?void 0:i.map((function(e){return"<col width=".concat(e,"></col>")})).join(""),l=u?'<colgroup contentEditable="false">'.concat(u,"</colgroup>"):"";return'<table style="width: '.concat(o,";table-layout: fixed;height:").concat(s,'">').concat(l,"<tbody>").concat(t,"</tbody></table>")}},hS={type:"table-row",elemToHtml:function(e,t){return"<tr>".concat(t,"</tr>")}},gS={type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,o=void 0===r?1:r,i=n.rowSpan,a=void 0===i?1:i,s=n.isHeader,u=void 0!==s&&s,l=n.width,c=void 0===l?"auto":l,d=n.hidden,f=u?"th":"td",p=void 0!==d&&d?"display:none":"";return"<".concat(f,' colSpan="').concat(o,'" rowSpan="').concat(a,'" width="').concat(c,'" style="').concat(p,'">').concat(t,"</").concat(f,">")}},vS='<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>',mS={blocks:{td:"table-cell",th:"table-cell",content:"paragraph",tr:"table-row",table:"table",tbody:"table-body"}};function yS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=mS,o=t.map((function(e){var t;return null===(t=null==r?void 0:r.blocks)||void 0===t?void 0:t[e]}));return function(e){return function(e){return!ap.Editor.isEditor(e)&&ap.Element.isElement(e)&&"type"in e}(e)&&o.includes(e.type)}}function bS(e,t){for(var n=vp(t,2),r=n[0],o=n[1],i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=vp(ap.Node.common(e,r,o),2),u=s[0],l=s[1];return!!yS.apply(void 0,mp([e],vp(i),!1))(u,l)||!!ap.Editor.above(e,{match:yS.apply(void 0,mp([e],vp(i),!1)),at:l})}function ES(e,t){var n,r;void 0===t&&(t={});var o=[];try{for(var i=gp(function(e,t){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y,b;return void 0===t&&(t={}),hp(this,(function(E){switch(E.label){case 0:if(n=vp(ap.Editor.nodes(e,{match:yS(e,"table"),at:t.at}),1),!(r=n[0]))return[2,[]];o=vp(r,2),i=o[1],E.label=1;case 1:E.trys.push([1,6,7,8]),a=gp(ap.Editor.nodes(e,{match:yS(e,"table"),at:i})),s=a.next(),E.label=2;case 2:if(s.done)return[3,5];u=vp(s.value,2),l=u[1],c=[];try{for(y=void 0,d=gp(ap.Editor.nodes(e,{match:yS(e,"tr"),at:l})),f=d.next();!f.done;f=d.next())p=vp(f.value,2),h=p[1],c.push(mp([],vp(ap.Editor.nodes(e,{match:yS(e,"th","td"),at:h})),!1))}catch(e){y={error:e}}finally{try{f&&!f.done&&(b=d.return)&&b.call(d)}finally{if(y)throw y.error}}return[4,c];case 3:E.sent(),E.label=4;case 4:return s=a.next(),[3,2];case 5:return[3,8];case 6:return g=E.sent(),v={error:g},[3,8];case 7:try{s&&!s.done&&(m=a.return)&&m.call(a)}finally{if(v)throw v.error}return[7];case 8:return[2]}}))}(e,{at:t.at})),a=i.next();!a.done;a=i.next()){for(var s=a.value,u=[],l=0;l<s.length;l+=1){u[l]||(u[l]=[]);for(var c=0;c<s[l].length;c+=1)for(var d=vp(s[l][c],1)[0],f=d.rowSpan,p=void 0===f?1:f,h=d.colSpan,g=void 0===h?1:h,v=0;v<g+0;v+=1)for(var m=0;m<p;m+=1)u[l+m]||(u[l+m]=[]),u[l+m][c+v]||(u[l+m][c+v]=[s[l+m][c+v],{rtl:v-0+1,ltr:g-v+0,ttb:m+1,btt:p-m}])}o.push.apply(o,mp([],vp(u),!1))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}var CS=function(){function e(e,t){this.x=e,this.y=t}return e.valueOf=function(e,t){return new this(e,t)},e.equals=function(e,t){return e.x===t.x&&e.y===t.y},e}();function DS(e){return e.length?e[0].tagName.toLowerCase():""}function wS(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}dh.append&&fh.fn&&(fh.fn.append=dh.append),dh.on&&fh.fn&&(fh.fn.on=dh.on),dh.focus&&fh.fn&&(fh.fn.focus=dh.focus),dh.attr&&fh.fn&&(fh.fn.attr=dh.attr),dh.val&&fh.fn&&(fh.fn.val=dh.val),dh.html&&fh.fn&&(fh.fn.html=dh.html),dh.dataset&&fh.fn&&(fh.fn.dataset=dh.dataset),dh.addClass&&fh.fn&&(fh.fn.addClass=dh.addClass),dh.removeClass&&fh.fn&&(fh.fn.removeClass=dh.removeClass),dh.children&&fh.fn&&(fh.fn.children=dh.children),dh.each&&fh.fn&&(fh.fn.each=dh.each),dh.find&&fh.fn&&(fh.fn.find=dh.find),dh.data&&fh.fn&&(fh.fn.data=dh.data),dh.hide&&fh.fn&&(fh.fn.hide=dh.hide),dh.show&&fh.fn&&(fh.fn.show=dh.show);var AS=function(){function e(){this.title=wm("tableModule.tableProperty"),this.iconSvg='<svg viewBox="0 0 20 20"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.borderStyle=[{value:"none",label:wm("tableModule.borderStyle.none")},{value:"solid",label:wm("tableModule.borderStyle.solid")},{value:"dotted",label:wm("tableModule.borderStyle.dotted")},{value:"dashed",label:wm("tableModule.borderStyle.dashed")},{value:"double",label:wm("tableModule.borderStyle.double")},{value:"groove",label:wm("tableModule.borderStyle.groove")},{value:"ridge",label:wm("tableModule.borderStyle.ridge")},{value:"inset",label:wm("tableModule.borderStyle.inset")},{value:"outset",label:wm("tableModule.borderStyle.outset")}],this.textAlignOptions=[{value:"left",label:wm("justify.left"),svg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"center",label:wm("justify.center"),svg:'<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"right",label:wm("justify.right"),svg:'<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"justify",label:wm("justify.justify"),svg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>'}]}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==ug.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){},e.prototype.getModalContentNode=function(e){return vp(ap.Editor.nodes(e,{match:yS(e,"table")}),1)[0]},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this.getModalContentNode(e);if(!n)return null;var r=vp(n,2),o=r[0],i=r[1],a=fh('<div>\n <label class="babel-container">\n <span>'.concat(wm("tableModule.modal.border"),'</span>\n <span class="babel-container-border">\n <select name="borderStyle">\n ').concat(this.borderStyle.map((function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")})).join(""),'\n </select>\n <span class="color-group" data-mark="color">\n <span class="color-group-block"></span>\n <input name="borderColor" type="hidden">\n </span>\n <input name="borderWidth" type="number" placeholder="').concat(wm("tableModule.modal.borderWidth"),'">\n </span>\n </label>\n <div class="babel-container">\n <span>').concat(wm("tableModule.modal.bgColor"),'</span>\n <span class="babel-container-background">\n <span class="color-group" data-mark="bgColor">\n <span class="color-group-block"></span>\n <input name="backgroundColor" type="hidden">\n </span>\n </span>\n </div>\n <label class="babel-container">\n <span>').concat(wm("tableModule.modal.align"),'</span>\n <span class="babel-container-align">\n <select name="textAlign">\n ').concat(this.textAlignOptions.map((function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")})).join(""),'\n </select>\n </span>\n </label>\n <div class="button-container">\n <button type="button">').concat(wm("tableModule.modal.ok"),"</button>\n </div>\n </div>"));a.find("[name]").each((function(e){fh(e).val(o[fh(e).attr("name")])}));var s=function(e,t){t?fh(".color-group-block",e).css("background-color",t).empty():fh(".color-group-block",e).css("background-color","").html(vS)};return a.find(".color-group").each((function(n){var r=fh('[type="hidden"]',n).val()||"";s(n,r);var o=fh(n);o.on("click",(function(){a.find(".color-group .w-e-drop-panel").hide();var i=o.data("panel");i?i.show():(i=t.getPanelContentElem(e,{mark:o.data("mark"),selectedColor:r,callback:function(e){fh('[type="hidden"]',n).val(e||""),s(n,e),i.hide()}}),o.append(i),o.data("panel",i))}))})),a.find("button").on("click",(function(){var t=Array.from(a.find("[name]")).reduce((function(e,t){return e[fh(t).attr("name")]=fh(t).val(),e}),{});ap.Transforms.setNodes(e,t,{at:i}),setTimeout((function(){e.focus()}))})),a[0]},e.prototype.getPanelContentElem=function(e,t){var n=t.mark,r=t.selectedColor,o=t.callback,i=fh('<ul class="w-e-panel-content-color"></ul>');i.on("click","li",(function(e){var t=e.target;if(t){e.preventDefault(),e.stopPropagation();var n=fh(t).attr("data-value");o(n)}}));var a=e.getMenuConfig(n).colors;(void 0===a?[]:a).forEach((function(e){var t=fh('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=fh('<li data-value="'.concat(e,'"></li>'));r===e&&n.addClass("active"),n.append(t),i.append(n)}));var s="";"color"===n&&(s=wm("tableModule.color.default")),"bgColor"===n&&(s=wm("tableModule.color.clear"));var u=fh('\n <li data-value="" class="clear">\n '.concat(vS,"\n ").concat(s,"\n </li>\n "));i.prepend(u);var l=fh('<div class="w-e-drop-panel"></div>');return l.append(i),l},e}(),SS=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=wm("tableModule.cellProperty"),t.iconSvg='<svg viewBox="0 0 20 20"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',t.tag="button",t.showModal=!0,t.modalWidth=300,t}return dp(t,e),t.prototype.getModalContentNode=function(e){return vp(ap.Editor.nodes(e,{match:yS(e,"td")}),1)[0]},t}(AS),xS=function(){function e(){this.title=wm("tableModule.deleteCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 510.976L393.216 445.44v-13.1072L327.68 366.7968V510.976z m327.68-78.4384l65.536-65.536V507.904L655.36 442.368v-9.8304z m393.216 484.9664V0H0v917.504h1048.576z m-65.536-131.072h-262.144v-52.4288l-13.1072 13.1072-52.4288-52.4288v91.7504H393.216v-91.7504l-52.4288 52.4288-13.1072-13.1072v52.4288H65.536V65.536H327.68v121.2416l36.0448-36.0448 29.4912 29.4912V62.2592h262.144V180.224l49.152-49.152 16.384 16.384V62.2592h262.144V786.432z m-294.912-108.1344l-160.5632-160.5632-167.1168 167.1168-78.6432-78.6432 167.1168-167.1168L288.3584 278.528l78.6432-78.6432 160.5632 160.5632 163.84-163.84 78.6432 78.6432-163.84 163.84 160.5632 160.5632-78.6432 78.6432z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==ug.getSelectedNodeByType(e,"table-cell"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=vp(ap.Editor.nodes(e,{match:function(e){return ug.checkNodeType(e,"table-cell")},universal:!0}),1),r=vp(n[0],2),o=r[0],i=r[1],a=ug.getParentNode(e,o),s=(null==a?void 0:a.children.length)||0;if(!a||s<=1)ap.Transforms.removeNodes(e,{mode:"highest"});else if(null!=ug.getParentNode(e,a)){var u=ES(e),l=0;e:for(var c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=vp(u[c][d],1),p=vp(f[0],2)[1];if(ap.Path.equals(i,p)){l=d;break e}}ap.Editor.withoutNormalizing(e,(function(){for(var t,n,r=0;r<u.length;r+=1){var o=vp(u[r][l],2),i=vp(o[0],1)[0].hidden,a=o[1],s=a.rtl,c=a.ltr;if(s>1||c>1){var d=vp(u[r][l-(s-1)],1),f=vp(d[0],2),p=f[0],h=p.rowSpan,g=void 0===h?1:h,v=p.colSpan,m=void 0===v?1:v,y=f[1];if(i)ap.Transforms.setNodes(e,{rowSpan:g,colSpan:Math.max(m-1,1)},{at:y});else{var b=vp(u[r][l+1],1),E=vp(b[0],2)[1];ap.Transforms.setNodes(e,{rowSpan:g,colSpan:m-1,hidden:!1},{at:E});try{for(var C=(t=void 0,gp(ap.Node.children(e,y,{reverse:!0}))),D=C.next();!D.done;D=C.next()){var w=vp(D.value,2)[1];ap.Transforms.moveNodes(e,{to:mp(mp([],vp(E),!1),[0],!1),at:w})}}catch(e){t={error:e}}finally{try{D&&!D.done&&(n=C.return)&&n.call(C)}finally{if(t)throw t.error}}}}}for(r=0;r<u.length;r+=1){var A=vp(u[r][l],1);y=vp(A[0],2)[1];ap.Transforms.removeNodes(e,{at:y})}var S=vp(ap.Editor.nodes(e,{match:function(e){return ug.checkNodeType(e,"table")},universal:!0}),1),x=S[0];if(x){var O=vp(x,2),T=O[0],N=O[1],B=T.columnWidths,k=mp([],vp(void 0===B?[]:B),!1);k.splice(l,1),ap.Transforms.setNodes(e,{columnWidths:k},{at:N})}}))}}},e}(),OS=function(){function e(){this.title=wm("tableModule.deleteRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M907.6736 586.5472L747.1104 425.984l163.84-163.84-78.6432-78.6432-163.84 163.84L507.904 186.7776 429.2608 262.144l163.84 163.84-167.1168 167.1168 78.6432 78.6432 167.1168-167.1168 160.5632 160.5632 75.3664-78.6432zM0 917.504V0h1048.576v917.504H0z m983.04-327.68h-22.9376l-65.536-65.536H983.04V327.68h-91.7504l65.536-65.536h26.2144V65.536H65.536v196.608h317.8496l65.536 65.536H65.536v196.608h380.1088l-65.536 65.536H65.536v196.608H983.04v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==ug.getSelectedNodeByType(e,"table-row"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=vp(ap.Editor.nodes(e,{match:function(e){return ug.checkNodeType(e,"table-row")},universal:!0}),1),r=vp(n[0],2),o=r[0],i=r[1],a=ug.getParentNode(e,o);if(((null==a?void 0:a.children.length)||0)<=1)ap.Transforms.removeNodes(e,{mode:"highest"});else{var s=vp(ap.Editor.nodes(e,{match:function(e){return ug.checkNodeType(e,"table-cell")},universal:!0}),1),u=vp(s[0],2)[1],l=ES(e),c=0;e:for(var d=0;d<l.length;d+=1)for(var f=0;f<l[d].length;f+=1){var p=vp(l[d][f],1),h=vp(p[0],2)[1];if(ap.Path.equals(u,h)){c=d;break e}}ap.Editor.withoutNormalizing(e,(function(){for(var t,n,r=0;r<l[c].length;r+=1){var o=vp(l[c][r],2),a=vp(o[0],1)[0].hidden,s=o[1],u=s.ttb,d=s.btt;if(u>1||d>1){var f=vp(l[c-(u-1)][r],1),p=vp(f[0],2),h=p[0],g=h.rowSpan,v=void 0===g?1:g,m=h.colSpan,y=void 0===m?1:m,b=p[1];if(a)ap.Transforms.setNodes(e,{rowSpan:Math.max(v-1,1),colSpan:y},{at:b});else{var E=vp(l[c+1][r],1),C=vp(E[0],2)[1];ap.Transforms.setNodes(e,{rowSpan:v-1,colSpan:y,hidden:!1},{at:C});try{for(var D=(t=void 0,gp(ap.Node.children(e,b,{reverse:!0}))),w=D.next();!w.done;w=D.next()){var A=vp(w.value,2)[1];ap.Transforms.moveNodes(e,{to:mp(mp([],vp(C),!1),[0],!1),at:A})}}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=D.return)&&n.call(D)}finally{if(t)throw t.error}}}}}ap.Transforms.removeNodes(e,{at:i})}))}}},e}(),TS=function(){function e(){this.title=wm("tableModule.deleteTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==ug.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){this.isDisabled(e)||ap.Transforms.removeNodes(e,{mode:"highest"})},e}(),NS=function(){function e(){this.title=wm("tableModule.widthAuto"),this.iconSvg='<svg viewBox="0 0 1228 1024"><path d="M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=ug.getSelectedNodeByType(e,"table");return null!=t&&"100%"===t.width},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==ug.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n={width:t?"auto":"100%"};ap.Transforms.setNodes(e,n,{mode:"highest"})}},e}();function BS(e){var t=e.children||[];return 0===t.length?[]:(t[0]||{}).children||[]}function kS(e){return BS(e).every((function(e){return!!e.isHeader}))}var FS=function(){function e(){this.title=wm("tableModule.insertCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 193.3312v186.7776H140.9024v91.7504H327.68v186.7776h88.4736V471.8592h190.0544V380.1088H416.1536V193.3312zM0 917.504V0h1048.576v917.504H0zM655.36 65.536H65.536v720.896H655.36V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 262.144h-262.144v196.608h262.144V327.68z m0 262.144h-262.144v196.608h262.144v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==ug.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=vp(ap.Editor.nodes(e,{match:function(e){return ug.checkNodeType(e,"table-cell")},universal:!0}),1),r=vp(n[0],2),o=r[0],i=r[1],a=ug.getParentNode(e,o);if(null!=a){var s=ug.getParentNode(e,a);if(null!=s){for(var u=ES(e),l=0,c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=vp(u[c][d],1),p=vp(f[0],2)[1];if(ap.Path.equals(i,p)){l=d;break}}ap.Editor.withoutNormalizing(e,(function(){for(var t=[],n=0;n<u.length;n+=1){var r=vp(u[n][l],2)[1],o=r.ltr,i=r.rtl;if(o>1||i>1){if(1===i)continue;var a=vp(u[n][l-(i-1)],1),c=vp(a[0],2),d=c[0],f=c[1],p=d.colSpan||1;t.push(n),d.hidden||ap.Transforms.setNodes(e,{colSpan:p+1},{at:f})}}for(n=0;n<u.length;n+=1){var h={type:"table-cell",hidden:t.includes(n),children:[{text:""}]};0===n&&kS(s)&&(h.isHeader=!0);var g=vp(u[n][l],1),v=vp(g[0],2)[1];ap.Transforms.insertNodes(e,h,{at:v})}var m=vp(ap.Editor.nodes(e,{match:function(e){return ug.checkNodeType(e,"table")},universal:!0}),1),y=m[0];if(y){var b=vp(y,2),E=b[0],C=b[1],D=E.columnWidths,w=mp([],vp(void 0===D?[]:D),!1),A=e.getMenuConfig("insertTable").minWidth,S=void 0===A?60:A;w.splice(l,0,parseInt(S,10)||60),ap.Transforms.setNodes(e,{columnWidths:w},{at:C})}}))}}}},e}(),PS=function(){function e(){this.title=wm("tableModule.insertRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M707.7888 521.0112h-147.456v-147.456H488.2432v147.456h-147.456v68.8128h147.456v147.456h72.0896v-147.456h147.456zM0 917.504V0h1048.576v917.504H0zM327.68 65.536H65.536v196.608H327.68V65.536z m327.68 0H393.216v196.608h262.144V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 258.8672H65.536v462.0288H983.04V324.4032z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==ug.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=vp(ap.Editor.nodes(e,{match:function(e){return ug.checkNodeType(e,"table-cell")},universal:!0}),1),r=vp(n[0],2),o=r[0],i=r[1],a=ug.getParentNode(e,o),s=(null==a?void 0:a.children.length)||0;if(0!==s){var u=ES(e),l=0;e:for(var c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=vp(u[c][d],1),p=vp(f[0],2)[1];if(ap.Path.equals(i,p)){l=c;break e}}ap.Editor.withoutNormalizing(e,(function(){for(var t=l+1,n=t>=0&&t<u.length,r=[],o=0;n&&o<u[l].length;o+=1){var a=vp(u[l][o],2)[1],c=a.ttb,d=a.btt;if(c>1||d>1){if(1===d)continue;var f=vp(u[l-(c-1)][o],1),p=vp(f[0],2),h=p[0],g=p[1],v=h.rowSpan||1;r.push(o),h.hidden||ap.Transforms.setNodes(e,{rowSpan:v+1},{at:g})}}for(var m={type:"table-row",children:[]},y=0;y<s;y+=1){var b={type:"table-cell",hidden:r.includes(y),children:[{text:""}]};m.children.push(b)}var E=ap.Path.parent(i),C=ap.Path.next(E);ap.Transforms.insertNodes(e,m,{at:C})}))}}},e}();var IS=function(){function e(){this.title=wm("tableModule.insertTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||!!ug.getSelectedElems(e).some((function(t){var n=ug.getNodeType(t);return"pre"===n||("table"===n||("list-item"===n||!!e.isVoid(t)))})))},e.prototype.getPanelContentElem=function(e){var t=this;if(this.$content)return this.$content[0];for(var n=fh('<div class="w-e-panel-content-table"></div>'),r=fh("<span>0 × 0</span>"),o=fh("<table></table>"),i=0;i<10;i+=1){for(var a=fh("<tr></tr>"),s=0;s<10;s+=1){var u=fh("<td></td>");u.attr("data-x",s.toString()),u.attr("data-y",i.toString()),a.append(u),u.on("mouseenter",(function(e){var t=e.target;if(null!=t){var n=fh(t).dataset(),i=n.x,a=n.y;r[0].innerHTML="".concat(i+1," × ").concat(a+1),o.children().each((function(e){fh(e).children().each((function(e){var t=fh(e),n=t.dataset(),r=n.x,o=n.y;r<=i&&o<=a?t.addClass("active"):t.removeClass("active")}))}))}})),u.on("click",(function(n){n.preventDefault();var r=n.target;if(null!=r){var o=fh(r).dataset(),i=o.x,a=o.y;t.insertTable(e,a+1,i+1)}}))}o.append(a)}return n.append(o),n.append(r),this.$content=n,n[0]},e.prototype.insertTable=function(e,t,n){var r=parseInt(t,10),o=parseInt(n,10);if(r&&o&&!(r<=0||o<=0)){if(ug.isSelectedEmptyParagraph(e)&&ap.Transforms.removeNodes(e,{mode:"highest"}),0===e.children.length){ap.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var i=function(e,t,n){for(var r,o=[],i=e.getMenuConfig("insertTable"),a=i.minWidth,s=void 0===a?60:a,u=i.tableFullWidth,l=i.tableHeader,c=Array(n).fill(parseInt(s,10)||60),d=0;d<t;d+=1){for(var f=[],p=0;p<n;p+=1){var h={type:"table-cell",children:[{text:""}]};0===d&&(h.isHeader=null===(r=null==l?void 0:l.selected)||void 0===r||r),f.push(h)}o.push({type:"table-row",children:f})}return{type:"table",width:(null==u?void 0:u.selected)?"100%":"auto",children:o,columnWidths:c}}(e,r,o);ap.Transforms.insertNodes(e,i,{mode:"highest"})}},e}(),RS=new WeakMap,LS=new WeakMap,_S={isInTable:function(e,t){return void 0===t&&(t={}),!!vp(ap.Editor.nodes(e,{match:yS(e,"table"),at:t.at}),1)[0]},selection:function(e){var t,n,r,o,i,a,s,u;return hp(this,(function(l){switch(l.label){case 0:t=RS.get(e),n=0,l.label=1;case 1:if(!(t&&n<t.length))return[3,4];for(r=[],o=0;o<t[n].length;o+=1)i=vp(t[n][o],2),a=i[0],s=i[1],u=s.ltr,1===s.ttb&&r.push(a),o+=u-1;return[4,r];case 2:l.sent(),l.label=3;case 3:return n+=1,[3,1];case 4:return[2]}}))},unselect:function(e){LS.delete(e),RS.delete(e)},isSelected:function(e,t){var n=LS.get(e);return!!n&&n.has(t)}},MS=function(){function e(){this.title=wm("tableModule.mergeCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M482.2 508.4 331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4c2.4-1.8 2.4-5.4 0-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4c-2.3 1.8-2.3 5.3 0 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return!this.canMerge(e)},e.prototype.exec=function(e,t){this.isDisabled(e)||(this.merge(e),_S.unselect(e))},e.prototype.canMerge=function(e){var t=RS.get(e);if(!t||!t.length)return!1;var n=vp(t[t.length-1][t[t.length-1].length-1],1),r=vp(n[0],2)[1],o=vp(t[0][0],1);return!!bS(e,[vp(o[0],2)[1],r],"table")},e.prototype.merge=function(e){if(this.canMerge(e)){var t=RS.get(e);if(t&&t.length){var n=vp(t[0][0],1),r=vp(n[0],2)[1],o=vp(ap.Node.children(e,r,{reverse:!0}),1),i=vp(o[0],2)[1];ap.Editor.withoutNormalizing(e,(function(){for(var n,o,a=0,s=0,u=t.length-1;u>=0;u-=1,a+=1){s=0;for(var l=t[u].length-1;l>=0;l-=1,s+=1){var c=vp(t[u][l],2),d=vp(c[0],2)[1],f=c[1].ttb;if(!(ap.Path.equals(r,d)||f>1)){try{for(var p=(n=void 0,gp(ap.Node.children(e,d,{reverse:!0}))),h=p.next();!h.done;h=p.next()){var g=vp(h.value,2)[1];ap.Transforms.moveNodes(e,{to:ap.Path.next(i),at:g})}}catch(e){n={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}var v=vp(ap.Editor.nodes(e,{match:yS(e,"tr"),at:d}),1),m=vp(v[0],2)[1];vp(ap.Node.children(e,m),2)[1]&&ap.Transforms.setNodes(e,{hidden:!0},{at:d})}}}ap.Transforms.setNodes(e,{rowSpan:a,colSpan:s},{at:r})}))}}},e}(),jS=function(){function e(){this.title=wm("tableModule.splitCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M362.667 494.933v53.334l25.6-25.6zm0-241.066L460.8 352V78.933H57.6v98.134h305.067zm0 535.466v57.6H57.6v98.134h403.2V691.2zM661.333 494.933v53.334l-25.6-25.6zm0-241.066L563.2 352V78.933h403.2v98.134H661.333zm0 535.466v57.6H966.4v98.134H563.2V691.2z"/><path d="M753.067 341.333 693.333 281.6 512 460.8 330.667 281.6l-59.734 59.733 181.334 181.334L270.933 704l59.734 59.733L512 582.4l181.333 181.333L753.067 704 571.733 522.667z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=vp(ap.Editor.nodes(e,{match:yS(e,"td")}),1),n=vp(t[0],1)[0],r=n.rowSpan,o=void 0===r?1:r,i=n.colSpan;return!(o>1||(void 0===i?1:i)>1)},e.prototype.exec=function(e,t){this.isDisabled(e)||this.split(e)},e.prototype.split=function(e,t){void 0===t&&(t={});var n=vp(ap.Editor.nodes(e,{match:yS(e,"table","th","td"),at:t.at}),2),r=n[0],o=n[1];if(r&&o){var i=RS.get(e)||[],a=ES(e,{at:t.at});ap.Editor.withoutNormalizing(e,(function(){for(var n=a.length-1;n>=0;n-=1)for(var r=a[n].length-1;r>=0;r-=1){var s=vp(a[n][r],2),u=vp(s[0],2)[1],l=s[1],c=l.ltr,d=l.rtl,f=l.btt,p=l.ttb;if(d>1)r-=d-2;else if(!(p>1||1===f&&1===c)){var h=!!t.all;if(i.length)e:for(var g=0;!t.all&&g<i.length;g+=1)for(var v=0;v<i[g].length;v+=1){var m=vp(i[g][v],1),y=vp(m[0],2)[1];if(ap.Path.equals(y,u)){h=!0;break e}}else{y=vp(o,2)[1];ap.Path.equals(y,u)&&(h=!0)}if(h){e:for(var b=1;b<f;b+=1)for(g=r;g>=0;g-=1){if(1!==vp(a[n+b][g],2)[1].ttb){for(var E=0;E<c;E+=1){var C=vp(a[n+b][g+E],1),D=vp(C[0],2)[1];ap.Transforms.unsetNodes(e,["hidden","colSpan","rowSpan"],{at:D})}continue e}}for(E=1;E<c;E+=1){var w=vp(a[n][r+E],1);D=vp(w[0],2)[1];ap.Transforms.unsetNodes(e,["hidden","colSpan","rowSpan"],{at:D})}ap.Transforms.setNodes(e,{rowSpan:1,colSpan:1},{at:u})}}}}))}},e}(),HS=function(){function e(){this.title=wm("tableModule.header"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 128l-64 0L384 128 320 128 0 128l0 256 0 64 0 192 0 64 0 256 320 0 64 0 256 0 64 0 320 0 0-256 0-64L1024 448 1024 384 1024 128 704 128zM640 640 384 640 384 448l256 0L640 640zM64 448l256 0 0 192L64 640 64 448zM320 896 64 896l0-192 256 0L320 896zM640 896 384 896l0-192 256 0L640 896zM960 896l-256 0 0-192 256 0L960 896zM960 640l-256 0L704 448l256 0L960 640z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=ug.getSelectedNodeByType(e,"table");return null!=t&&kS(t)},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==ug.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=!t,r=ug.getSelectedNodeByType(e,"table");if(null!=r)BS(r).forEach((function(t){return ap.Transforms.setNodes(e,{isHeader:n},{at:ug.findPath(e,t)})}))}},e}(),zS={key:"insertTable",factory:function(){return new IS}},$S={key:"deleteTable",factory:function(){return new TS}},US={key:"insertTableRow",factory:function(){return new PS}},VS={key:"deleteTableRow",factory:function(){return new OS}},WS={key:"insertTableCol",factory:function(){return new FS}},GS={key:"deleteTableCol",factory:function(){return new xS}},qS={key:"tableHeader",factory:function(){return new HS}},KS={key:"tableFullWidth",factory:function(){return new NS}},YS={key:"mergeTableCell",factory:function(){return new MS}},XS={key:"splitTableCell",factory:function(){return new jS}},ZS={key:"setTableProperty",factory:function(){return new AS}},JS={key:"setTableCellProperty",factory:function(){return new SS}};var QS={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=fh(e);0===(t=t.filter((function(e){return"paragraph"===ug.getNodeType(e)||(!!ap.Text.isText(e)||!!n.isInline(e))}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=parseInt(r.attr("colSpan")||"1",10),i=parseInt(r.attr("rowSpan")||"1",10),a="none"===wS(r,"display"),s=r.attr("width")||"auto";return{type:"table-cell",isHeader:"th"===DS(r),colSpan:o,rowSpan:i,width:s,children:t,hidden:a}}};var ex={selector:"tr:not([data-w-e-type])",parseElemHtml:function(e,t,n){for(var r,o=[],i=0;i<t.length;i+=1){var a=t[i];if("table-cell"===ug.getNodeType(a)){var s=a.colSpan||1;o.push(a);for(var u=1;u<s;u+=1){var l=t[i+u];l&&"table-cell"===ug.getNodeType(l)&&"none"===(null===(r=l.style)||void 0===r?void 0:r.display)||o.push({type:"table-cell",children:[{text:""}],hidden:!0})}}}return{type:"table-row",children:o}}};var tx,nx={selector:"table:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r,o,i=fh(e),a="auto";"100%"===wS(i,"width")&&(a="100%"),"100%"===i.attr("width")&&(a="100%");var s={type:"table",width:a,height:parseInt(wS(i,"height")||"0",10),children:t.filter((function(e){return"table-row"===ug.getNodeType(e)}))},u=(null===(r=i.find("tr")[0])||void 0===r?void 0:r.children)||[],l=(null===(o=i.find("colgroup")[0])||void 0===o?void 0:o.children)||null;if(l)s.columnWidths=Array.from(l).map((function(e){return parseInt(e.getAttribute("width"),10)}));else if(u.length>0){var c=[];Array.from(u).forEach((function(e){for(var t=parseInt(fh(e).attr("colSpan")||"1",10),n=parseInt(wS(fh(e),"width")||"180",10),r=0;r<t;r+=1)c.push(n)})),s.columnWidths=c}return s}},rx=null===(tx=null===window||void 0===window?void 0:window.getComputedStyle(document.documentElement))||void 0===tx?void 0:tx.getPropertyValue("--w-e-textarea-border-color");function ox(e){var t=e.selection;if(null==t)return!1;var n=vp(ap.Editor.nodes(e,{match:function(e){return ug.checkNodeType(e,"table-cell")}}),1),r=n[0];if(r){var o=vp(r,2)[1],i=ap.Editor.start(e,o);if(ap.Point.equals(t.anchor,i))return!0}return!1}function ix(e,t){var n=t.offset;if(0===n)return!1;var r=ap.Editor.node(e,t);if(!ap.Text.isText(r[0]))return!1;var o=ap.Node.string(r[0]);return!(n>=o.length)&&("\n"===o[n-1]&&"\r"===o[n])}function ax(e,t,n){var r=e.selection;if(null==r||"line"===t)return!1;var o=vp(ap.Editor.nodes(e,{match:function(e){return ug.checkNodeType(e,"table-cell")}}),1),i=o[0],a=r.anchor;if("backward"===n&&0===r.anchor.offset&&(a=ap.Editor.before(e,r)),"forward"===n&&ap.Editor.isEnd(e,r.anchor,r.anchor.path)&&(a=ap.Editor.after(e,r)),null==a)return!1;var s=ap.Editor.above(e,{at:a,match:function(e){return ug.checkNodeType(e,"table-cell")}});if(null==s||null==i||!ap.Path.equals(s[1],i[1]))return!1;var u=ap.Editor.node(e,a);if(!ap.Text.isText(u[0])||u[0].text.length<2)return!1;var l="backward"===n?[a.offset-2,a.offset]:[a.offset,a.offset+2],c=ap.Node.string(u[0]);return"\n\r"===c.slice.apply(c,mp([],vp(l),!1))?(ap.Transforms.insertText(e,c.slice(0,l[0])+c.slice(l[1]),{at:{anchor:ap.Editor.start(e,a.path),focus:ap.Editor.end(e,a.path)}}),!0):!!ix(e,a)&&(ap.Transforms.insertText(e,c.slice(0,r.anchor.offset-1)+c.slice(r.anchor.offset+1),{at:{anchor:ap.Editor.start(e,a.path),focus:ap.Editor.end(e,a.path)}}),!0)}var sx={selector:"table",preParseHtml:function(e){var t=fh(e);if("table"!==DS(t))return e;var n=t.find("tbody");if(0===n.length)return e;var r=t.find("tr");return t.append(r),n.remove(),t[0]}};function ux(e){var t,n,r=[],o=e.reduce((function(e,t){return e+t}),0);try{for(var i=gp(e),a=i.next();!a.done;a=i.next()){var s=a.value;r.push(s/o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var lx=null;var cx=!1,dx=!1,fx=0,px=0,hx=null,gx=fh(window);gx.on("mousedown",(function(e){var t=e.target;if(t.closest('[data-block-type="table-cell"]'))cx=!0;else if("DIV"===t.tagName&&t.closest(".column-resizer-item")){if(null===hx)return;var n=vp(ap.Editor.nodes(hx,{match:yS(hx,"table")}),1),r=vp(n[0],1)[0],o=r.columnWidths,i=void 0===o?[]:o,a=r.resizingIndex,s=void 0===a?-1:a;dx=!0;var u=e.clientX;fx=u,px=i[s],document.body.style.cursor="col-resize",e.preventDefault()}gx.on("mousemove",vx),gx.on("mouseup",mx)}));var vx=Km((function(e){if(dx&&null!==hx){e.preventDefault();var t=e.clientX,n=px+(t-fx);(n=Math.floor(100*n)/100)<30&&(n=30);var r=vp(ap.Editor.nodes(hx,{match:yS(hx,"table")}),1),o=vp(r[0],1)[0],i=o.columnWidths,a=void 0===i?[]:i,s=o.resizingIndex,u=void 0===s?-1:s,l=a.reduce((function(e,t){return e+t}),0),c=l-a[u],d=document.querySelector(".table-container");if(!(d&&c+n>d.clientWidth)){var f=mp([],vp(a),!1).map((function(e){return Math.floor(e)}));f[u]=n,ap.Transforms.setNodes(hx,{columnWidths:f},{mode:"highest"})}}}),100);function mx(e){cx=!1,dx=!1,hx=null,document.body.style.cursor="",gx.off("mousemove",vx),gx.off("mouseup",mx)}function yx(e,t,n,r){if(!e.isDisabled()&&!cx&&!dx){var o=t,i=o.width,a=void 0===i?"auto":i,s=o.columnWidths,u=void 0===s?[]:s,l=o.isHoverCellBorder,c=o.resizingIndex,d=n.clientX,f=n.target;if(bh(f))if(d>(g=f.getBoundingClientRect()).x+5&&d<g.x+g.width-5)return void(l&&ap.Transforms.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"}));if(bh(f)){var p=f.closest(".table");if(p)for(var h=n.clientX,g=p.getBoundingClientRect(),v="100%"===a?ux(u).map((function(e){return e*r})):u,m=function(e){var t,n,r=[],o=0;try{for(var i=gp(e),a=i.next();!a.done;a=i.next())o+=a.value,r.push(o)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(v),y=0;y<m.length;y+=1)if(h-g.x>=m[y]-5&&h-g.x<m[y]+5){if(c===y)return;return void ap.Transforms.setNodes(e,{isHoverCellBorder:!0,resizingIndex:y},{mode:"highest"})}}!0===l&&ap.Transforms.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"})}}function bx(e,t){"mouseenter"===t.type?ap.Transforms.setNodes(e,{isResizing:!0},{mode:"highest"}):ap.Transforms.setNodes(e,{isResizing:!1},{mode:"highest"})}var Ex={type:"table",renderElem:function(e,t,n){var r=function(e,t){if(e.isDisabled())return!1;var n=e.selection;if(null==n)return!0;if(ap.Range.isCollapsed(n))return!0;var r=n.anchor,o=n.focus,i=ug.findPath(e,t),a=ap.Editor.start(e,i),s=ap.Editor.end(e,i),u=ap.Point.compare(r,s)<=0&&ap.Point.compare(r,a)>=0,l=ap.Point.compare(o,s)<=0&&ap.Point.compare(o,a)>=0;return!!(u&&l&&ap.Path.equals(r.path.slice(0,3),o.path.slice(0,3)))}(n,e),o=e,i=o.width,a=void 0===i?"auto":i,s=o.height,u=o.columnWidths,l=void 0===u?[]:u,c=o.scrollWidth,d=void 0===c?0:c,f=o.isHoverCellBorder,p=o.resizingIndex,h=o.isResizing,g=ug.isNodeSelected(n,e),v=vp(_S.selection(n),1)[0],m=ux(l),y=Cy.jsx("div",{className:"table-container","data-selected":g,on:{mousedown:function(t){if("DIV"===t.target.tagName&&t.preventDefault(),!n.isDisabled()){t.target.closest('[data-block-type="table-cell"]')&&_S.unselect(n);var r=ug.findPath(n,e),o=ap.Editor.start(n,r),i=n.selection;if(null!=i)i.anchor.path[0]!==r[0]&&"DIV"===t.target.tagName&&n.select(o);else n.select(o)}}}},Cy.jsx("table",{width:a,contentEditable:r,className:"table ".concat(v?"table-selection-none":""),style:{width:"100%"===a?a:"".concat(l.reduce((function(e,t){return e+t}),0),"px")},on:{mousemove:Bv((function(t){return yx(n,e,t,d)}),25)}},Cy.jsx("colgroup",{contentEditable:!1},l.map((function(e){return Cy.jsx("col",{width:e})}))),Cy.jsx("tbody",null,t)),Cy.jsx("div",{className:"column-resizer",contentEditable:!1},l.map((function(e,t){var r=e;return"100%"===a&&(r=m[t]*d),Cy.jsx("div",{className:"column-resizer-item",style:{minWidth:"".concat(r,"px")}},Cy.jsx("div",{className:"resizer-line-hotzone ".concat(f&&t===p?"visible ":"").concat(h&&t===p?"highlight":""),style:{height:"".concat(s,"px")},on:{mouseenter:function(e){return bx(n,e)},mouseleave:function(e){return bx(n,e)},mousedown:function(e){return function(e){dx||(hx=e)}(n)}}},Cy.jsx("div",{className:"resizer-line"})))})))),b=Cy.h("div",{hook:{insert:function(e){var t=e.elm;return function(e,t){if(bh(t)){var n=t.querySelector("table");n&&(lx=new ResizeObserver((function(t){var n=vp(t,1)[0].contentRect;ap.Transforms.setNodes(e,{scrollWidth:n.width,height:n.height},{mode:"highest"})})),lx.observe(n))}}(n,t)},destroy:function(){lx&&(null==lx||lx.disconnect(),lx=null)}}},y);return b}},Cx={type:"table-cell",renderElem:function(e,t,n){var r=function(e,t){var n=ug.getParentNode(e,t);if(null==n)return!1;var r=ug.getParentNode(e,n);return null!=r&&BS(r).some((function(e){return e===t}))}(n,e),o=e,i=o.colSpan,a=void 0===i?1:i,s=o.rowSpan,u=void 0===s?1:s,l=o.isHeader,c=void 0!==l&&l,d=o.hidden,f=void 0!==d&&d,p=_S.isSelected(n,e);if(!r)return Cy.jsx("td",{colSpan:a,rowSpan:u,"data-block-type":"table-cell",className:p?"w-e-selected":"",style:{display:f?"none":""}},t);var h=c?"th":"td";return Cy.jsx(h,{colSpan:a,rowSpan:u,"data-block-type":"table-cell",className:p?"w-e-selected":"",style:{display:f?"none":""}},t)}};function Dx(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var wx={renderStyle:function(e,t){var n,r;if(!ap.Element.isElement(e))return t;var o=e,i=o.backgroundColor,a=o.borderWidth,s=o.borderStyle,u=o.borderColor,l=o.textAlign,c={};i&&(c.backgroundColor=i),a&&(c.borderWidth="".concat(a,"px")),s&&(c.borderStyle="none"===s?"":s),u&&(c.borderColor=u),l&&(c.textAlign=l);var d=t;return"table"===e.type?Dx(null===(r=(null===(n=d.children)||void 0===n?void 0:n[0]).children)||void 0===r?void 0:r[0],c):Dx(d,c),d},styleToHtml:function(e,t){if("table"!==e.type&&"table-cell"!==e.type)return t;var n=e.backgroundColor,r=e.borderWidth,o=e.borderStyle,i=e.borderColor,a=e.textAlign;if(!(n||r||o||i||a))return t;var s=fh(t);return n&&s.css("background-color",n),r&&s.css("border-width","".concat(r,"px")),o&&s.css("border-style","none"===o?"":o),i&&s.css("border-color",i),a&&s.css("text-align",a),function(e){return 0===e.length?"":e[0].outerHTML}(s)},parseStyleHtml:function(e,t,n){if("TABLE"!==e.tagName&&"TD"!==e.tagName)return t;var r=fh(e),o=t,i=wS(r,"background-color");i||(i=wS(r,"background")),i&&(o.backgroundColor=i);var a=wS(r,"border");a||"TD"!==e.tagName||(a="1px solid ".concat(rx));var s=vp((null==a?void 0:a.split(" "))||[],3),u=s[0],l=s[1],c=s[2];(u=wS(r,"border-width")||u)&&(o.borderWidth=u.replace(/[^\d]/g,"")),(l=wS(r,"border-style")||l)&&(o.borderStyle="none"===l?"":l),(c=wS(r,"border-color")||c)&&(o.borderColor=c);var d=wS(r,"text-align");return(d=wS(r,"text-align")||d)&&(o.textAlign=d),t},renderElems:[Ex,{type:"table-row",renderElem:function(e,t,n){return Cy.jsx("tr",null,t)}},Cx],elemsToHtml:[pS,hS,gS],preParseHtml:[sx],parseElemsHtml:[QS,ex,nx],menus:[zS,$S,US,VS,WS,GS,qS,KS,YS,XS,ZS,JS],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward,r=e.deleteForward,o=e.deleteFragment,i=e.normalizeNode,a=e.insertData,s=e.handleTab,u=e.selectAll,l=e;return l.insertBreak=function(){null==ug.getSelectedNodeByType(l,"table")?t():l.insertText("\n\r")},l.deleteBackward=function(e){if(!ox(l)&&!ax(l,e,"backward")){var t=l.selection;if(t){var r=ap.Editor.before(l,t),o=ap.Editor.above(l,{at:t,match:function(e){return ug.checkNodeType(e,"table-cell")}});if(r){var i=function(e,t){var n=ap.Editor.nodes(e,{at:t,match:function(e){return"table"===ug.getNodeType(e)}});return!!mp([],vp(n),!1).find((function(){return!0}))}(l,r);if(!o&&i&&ug.getSelectedNodeByType(l,"paragraph"))return}}n(e)}},l.handleTab=function(){var t;if(ug.getSelectedNodeByType(l,"table")){var n=ap.Editor.above(e);ug.checkNodeType(n[0],"table-cell")&&ap.Transforms.select(e,n[1]);var r=ap.Editor.next(e);if(r)r[0]&&r[0].text&&(r=null!==(t=ap.Editor.above(e,{at:r[1]}))&&void 0!==t?t:r),ap.Transforms.select(e,r[1]);else{var o=l.children||[],i=o.length;if(ug.checkNodeType(o[i-1],"table")){var a=ug.genEmptyParagraph();ap.Transforms.insertNodes(l,a,{at:[i]}),l.handleTab()}}}else s()},l.deleteForward=function(e){ox(l)||ax(l,e,"forward")||r(e)},l.deleteFragment=function(e){var t=l.selection;if(t){var n,r=!1,i={anchor:t.anchor,focus:t.focus},a=ap.Point.isBefore(i.anchor,i.focus);if(ix(l,t.anchor))(n=ap.Editor[a?"before":"after"](l,t.anchor))&&(i.anchor=n),r=!0;if(ix(l,t.focus))(n=ap.Editor[a?"after":"before"](l,t.focus))&&(i.focus=n),r=!0;r&&ap.Transforms.setSelection(l,i),o(e)}},l.normalizeNode=function(e){var t=vp(e,2),n=t[0],r=t[1];if("table"!==ug.getNodeType(n))return i([n,r]);if(ug.isLastNode(l,n)){var o=ug.genEmptyParagraph();ap.Transforms.insertNodes(l,o,{at:[r[0]+1]})}},l.insertData=function(e){if(null!=ug.getSelectedNodeByType(l,"table")){var t=e.getData("text/plain");"\n"===t||/<img[^>]+>/.test(e.getData("text/html"))?a(e):ap.Editor.insertText(l,t)}else a(e)},l.selectAll=function(){var e=l.selection;if(null!=e){var t=ug.getSelectedNodeByType(l,"table-cell");if(null!=t){var n=e.anchor,r=e.focus;if(ap.Path.equals(n.path.slice(0,3),r.path.slice(0,3)))if(0!==ap.Node.string(t).length){var o=ug.findPath(l,t),i={anchor:ap.Editor.start(l,o),focus:ap.Editor.end(l,o)};l.select(i)}else u();else u()}else u()}else u()},function(e){var t=e.apply;e.apply=function(n){if(!ap.Operation.isSelectionOperation(n)||!n.newProperties)return t(n);var r=fp(fp({},e.selection),n.newProperties);if(!ap.Range.isRange(r))return _S.unselect(e),t(n);var o=vp(ap.Editor.nodes(e,{match:yS(e,"th","td"),at:ap.Range.start(r)}),1)[0],i=vp(ap.Editor.nodes(e,{match:yS(e,"th","td"),at:ap.Range.end(r)}),1)[0];if(!o||!i)return _S.unselect(e),t(n);var a=vp(o,2)[1],s=vp(i,2)[1];if(ap.Path.equals(a,s)||!bS(e,[a,s],"table"))return _S.unselect(e),t(n);for(var u=ES(e,{at:a}),l=CS.valueOf(0,0),c=CS.valueOf(0,0),d=0;d<u.length;d+=1)for(var f=0;f<u[d].length;f+=1){var p=vp(u[d][f],1),h=vp(p[0],2)[1];if(ap.Path.equals(a,h)&&(l.x=d,l.y=f),ap.Path.equals(s,h)){c.x=d,c.y=f;break}}for(var g=CS.valueOf(Math.min(l.x,c.x),Math.min(l.y,c.y)),v=CS.valueOf(Math.max(l.x,c.x),Math.max(l.y,c.y));;){var m=CS.valueOf(g.x,g.y),y=CS.valueOf(v.x,v.y);for(d=m.x;d<=y.x;d+=1)for(f=m.y;f<=y.y;f+=1){var b=vp(u[d][f],2)[1],E=b.rtl,C=b.ltr,D=b.btt,w=b.ttb;m.x=Math.min(m.x,d-(w-1)),m.y=Math.min(m.y,f-(E-1)),y.x=Math.max(y.x,d+(D-1)),y.y=Math.max(y.y,f+(C-1))}if(CS.equals(g,m)&&CS.equals(v,y))break;g=m,v=y}var A=[],S=new WeakSet;for(d=g.x;d<=v.x;d+=1){var x=[];for(f=g.y;f<=v.y;f+=1){var O=vp(u[d][f],1),T=vp(O[0],1)[0];S.add(T),x.push(u[d][f])}A.push(x)}RS.set(e,A),LS.set(e,S),t(n)}}(l),l}};function Ax(e){return e.length?e[0].tagName.toLowerCase():""}function Sx(e,t,n,r){void 0===t&&(t="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=fh(e),i=r.width,a=void 0===i?"":i,s=r.height,u=void 0===s?"":s,l="";return a&&(l+="width: ".concat(a,";")),u&&(l+="height: ".concat(u,";")),o.attr("width",t),o.attr("height",n),o.attr("style",l),o[0].outerHTML}Cm("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),Cm("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}}),dh.append&&(fh.fn.append=dh.append),dh.on&&(fh.fn.on=dh.on),dh.focus&&(fh.fn.focus=dh.focus),dh.attr&&(fh.fn.attr=dh.attr),dh.val&&(fh.fn.val=dh.val),dh.html&&(fh.fn.html=dh.html),dh.parent&&(fh.fn.parent=dh.parent),dh.hasClass&&(fh.fn.hasClass=dh.hasClass),dh.empty&&(fh.fn.empty=dh.empty);var xx={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,o=void 0===r?"":r,i=n.poster,a=void 0===i?"":i,s=n.width,u=void 0===s?"auto":s,l=n.height,c=void 0===l?"auto":l,d=n.style,f=void 0===d?{}:d,p=n.textAlign,h='<div data-w-e-type="video" data-w-e-is-void style="text-align: '.concat(void 0===p?"center":p,';">\n');if(0===o.trim().indexOf("<iframe ")){h+=Sx(o,u,c,f)}else{var g=f.width,v=void 0===g?"":g,m=f.height,y=void 0===m?"":m,b="";v&&(b+="width: ".concat(v,";")),y&&(b+="height: ".concat(y,";")),h+='<video poster="'.concat(a,'" controls="true" width="').concat(u,'" height="').concat(c,'" style="').concat(b,'"><source src="').concat(o,'" type="video/mp4"/></video>')}return h+="\n</div>"}};function Ox(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(hh())}function Tx(e){var t={};return e.trim().split(";").forEach((function(e){if(e){var n=vp(e.split(":"),2),r=n[0],o=n[1];r&&o&&(t[r.trim()]=o.trim())}})),t}function Nx(){return Ox("w-e-insert-video")}var Bx=function(){function e(){this.title=wm("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=Nx(),this.heightInputId=Nx(),this.buttonId=Nx()}return e.prototype.getSelectedVideoNode=function(e){return ug.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=vp(Im(wm("videoModule.width"),n,"auto"),2),a=i[0],s=i[1],u=fh(s),l=vp(Im(wm("videoModule.height"),r,"auto"),2),c=l[0],d=l[1],f=fh(d),p=vp(Rm(o,wm("videoModule.ok")),1)[0],h=this.getSelectedVideoNode(e);if(null==this.$content){var g=fh("<div></div>");g.on("click","#".concat(o),(function(t){t.preventDefault();var o=g.find("#".concat(n)).val().trim(),i=g.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u="auto",l="auto";a(o)?u=o:s(o)&&(u="".concat(parseInt(o,10),"px")),a(i)?l=i:s(i)&&(l="".concat(parseInt(i,10),"px"));var c=h.style,d=void 0===c?{}:c;e.restoreSelection();var f={style:fp(fp({},d),{width:u,height:l})};ap.Transforms.setNodes(e,f,{match:function(e){return ug.checkNodeType(e,"video")}}),e.hidePanelOrModal()})),this.$content=g}var v=this.$content;if(v.empty(),v.append(a),v.append(c),v.append(p),null==h)return v[0];var m=h.style,y=void 0===m?{}:m,b=y.width,E=void 0===b?"":b,C=y.height,D=void 0===C?"":C;return u.val(E),f.val(D),setTimeout((function(){u.focus()})),v[0]},e}();function kx(){return Ox("w-e-edit-video")}var Fx=function(){function e(){this.title=wm("videoModule.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=kx(),this.posterInputId=kx(),this.buttonId=kx()}return e.prototype.getSelectedVideoNode=function(e){return ug.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=vp(Im(wm("videoModule.videoSrc"),r,wm("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=vp(Im(wm("videoModule.videoPoster"),o,wm("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=fh(u),p=fh(d),h=vp(Rm(i,wm("videoModule.ok")),1)[0];if(null==this.$content){var g=fh("<div></div>");g.on("click","#".concat(i),(function(n){return pp(t,void 0,void 0,(function(){var t,i,a,s;return hp(this,(function(u){return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),a=Ox("video-"),s={src:t,poster:i,key:a},e.restoreSelection(),ap.Transforms.setNodes(e,s,{match:function(e){return ug.checkNodeType(e,"video")}}),e.hidePanelOrModal(),[2]}))}))})),this.$content=g}var v=this.$content;v.empty(),v.append(s),v.append(c),v.append(h);var m=this.getSelectedVideoNode(e);if(null==m)return v[0];var y=m.src,b=void 0===y?"":y,E=m.poster,C=void 0===E?"":E;return f.val(b),p.val(C),setTimeout((function(){f.focus()})),v[0]},e}();function Px(e,t){return pp(this,arguments,void 0,(function(e,t,n,r,o){var i,a,s,u,l,c,d;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o=""),hp(this,(function(f){switch(f.label){case 0:return t?(e.restoreSelection(),i=e.getMenuConfig("insertVideo"),a=i.onInsertedVideo,s=i.checkVideo,u=i.parseVideoSrc,[4,s(t,n)]):[2];case 1:return"string"==typeof(l=f.sent())?(e.alert(l,"error"),[2]):null==l?[2]:[4,u(t)];case 2:return 0!==(c=f.sent()).trim().indexOf("<iframe ")&&(c=function(e){return e.replace(/</g,"<").replace(/>/g,">")}(c)),d={type:"video",src:c,poster:n,children:[{text:""}],style:{width:r,height:o}},Promise.resolve().then((function(){ug.isSelectedEmptyParagraph(e)&&ap.Transforms.removeNodes(e,{mode:"highest"}),ap.Transforms.insertNodes(e,d,{mode:"highest"})})),a(d),[2]}}))}))}function Ix(){return Ox("w-e-insert-video")}var Rx=function(){function e(){this.title=wm("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=Ix(),this.posterInputId=Ix(),this.buttonId=Ix()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||!!ug.getSelectedElems(e).some((function(t){var n=ug.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))})))},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=vp(Im(wm("videoModule.videoSrc"),r,wm("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=vp(Im(wm("videoModule.videoPoster"),o,wm("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=fh(u),p=fh(d),h=vp(Rm(i,wm("videoModule.ok")),1)[0];if(null==this.$content){var g=fh("<div></div>");g.on("click","#".concat(i),(function(n){return pp(t,void 0,void 0,(function(){var t,i;return hp(this,(function(a){switch(a.label){case 0:return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),[4,Px(e,t,i)];case 1:return a.sent(),e.hidePanelOrModal(),[2]}}))}))})),this.$content=g}var v=this.$content;return v.empty(),v.append(s),v.append(c),v.append(h),f.val(""),p.val(""),setTimeout((function(){f.focus()})),v[0]},e}();function Lx(e){return e.getMenuConfig("uploadVideo")}var _x=new WeakMap;function Mx(e,t){return pp(this,void 0,void 0,(function(){var n,r;return hp(this,(function(o){switch(o.label){case 0:return n=function(e){var t=_x.get(e);if(null!=t)return t;var n=Lx(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=LC(fp(fp({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,(function(t,n){return Px(e,t,n)})),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){var c=l.url,d=void 0===c?"":c,f=l.poster;Px(e,d,void 0===f?"":f),r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),_x.set(e,t),t}(e),r=t.map((function(e){return{name:e.name,type:e.type,size:e.size,data:e}})),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}}))}))}var jx=function(){function e(){this.title=wm("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i((function(t,n){return Px(e,t,n)}));else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=fh("body"),u=fh('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",(function(){var t=u[0].files;!function(e,t){pp(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,l,c,d,f,p;return hp(this,(function(h){switch(h.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=[],o=Lx(e).customUpload,h.label=1;case 1:h.trys.push([1,8,9,14]),i=!0,a=yp(n),h.label=2;case 2:return[4,a.next()];case 3:return s=h.sent(),(c=s.done)?[3,7]:(p=s.value,i=!1,u=p,o?[4,o(u,(function(t,n){return Px(e,t,n)}))]:[3,5]);case 4:return h.sent(),[3,6];case 5:r.push(u),h.label=6;case 6:return i=!0,[3,2];case 7:return[3,14];case 8:return l=h.sent(),d={error:l},[3,14];case 9:return h.trys.push([9,,12,13]),i||c||!(f=a.return)?[3,11]:[4,f.call(a)];case 10:h.sent(),h.label=11;case 11:return[3,13];case 12:if(d)throw d.error;return[7];case 13:return[7];case 14:return r.length>0?[4,Mx(e,r)]:[3,16];case 15:h.sent(),h.label=16;case 16:return[2]}}))}))}(e,t)}))}},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||!!ug.getSelectedElems(e).some((function(t){var n=ug.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))})))},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadVideo")},e}();function Hx(e,t,n,r,o){return void 0===t&&(t=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),{type:"video",src:e,poster:t,width:n,height:r,style:o,children:[{text:""}]}}var zx={type:"video",renderElem:function(e,t,n){var r,o=e,i=o.src,a=void 0===i?"":i,s=o.poster,u=void 0===s?"":s,l=o.key,c=void 0===l?"":l,d=o.width,f=void 0===d?"auto":d,p=o.height,h=void 0===p?"auto":p,g=o.style,v=void 0===g?{}:g,m=o.textAlign,y=void 0===m?"center":m,b=ug.isNodeSelected(n,e);if(0===a.trim().indexOf("<iframe ")){var E=Sx(a,f,h,v);r=Cy.jsx("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y},innerHTML:E})}else{var C=Cy.jsx("video",{key:c,poster:u,controls:!0,style:v},Cy.jsx("source",{src:a,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==f&&(C.data.width=f),"auto"!==h&&(C.data.height=h),r=Cy.jsx("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y}},C)}var D=Cy.h("div",{props:{contentEditable:!1},on:{mousedown:function(e){return e.preventDefault()}}},r);return D}},$x={renderElems:[zx],elemsToHtml:[xx],preParseHtml:[{selector:"iframe,video,p",preParseHtml:function(e){var t=fh(e),n=t;if("p"===Ax(t)){var r=t.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=fh(o))}}var a=Ax(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var s=fh('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return s.append(n),s[0]}}],parseElemsHtml:[{selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=fh(e),o="",i="",a="auto",s="auto",u={},l=r.find("iframe");if(l.length>0)return a=l.attr("width")||"auto",s=l.attr("height")||"auto",u=Tx(u=l.attr("style")||""),Hx(o=l[0].outerHTML,i,a,s,u);var c=r.find("video");return(o=c.attr("src")||"")||c.length>0&&(o=c.find("source").attr("src")||""),a=c.attr("width")||"auto",s=c.attr("height")||"auto",Hx(o,i=c.attr("poster")||"",a,s,u=Tx(u=c.attr("style")||""))}}],menus:[{key:"insertVideo",factory:function(){return new Rx},config:{onInsertedVideo:function(e){},checkVideo:function(e,t){return!0},parseVideoSrc:function(e){return e}}},{key:"uploadVideo",factory:function(){return new jx},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name," upload error"),t,n)}}},{key:"editVideoSize",factory:function(){return new Bx}},{key:"editVideoSrc",factory:function(){return new Fx}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"video"===e.type||t(e)},r.normalizeNode=function(e){var t=vp(e,2),o=t[0],i=t[1];"video"===ug.getNodeType(o)&&(ug.isLastNode(r,o)&&ap.Transforms.insertNodes(r,ug.genEmptyParagraph(),{at:[i[0]+1]}));return n([o,i])},r}};Cm("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),Cm("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});dh.append&&(fh.fn.append=dh.append),dh.on&&(fh.fn.on=dh.on),dh.remove&&(fh.fn.remove=dh.remove),dh.val&&(fh.fn.val=dh.val),dh.click&&(fh.fn.click=dh.click),dh.hide&&(fh.fn.hide=dh.hide);var Ux=new WeakMap;function Vx(e){return e.getMenuConfig("uploadImage")}function Wx(e,t){return pp(this,void 0,void 0,(function(){return hp(this,(function(n){return[2,new Promise((function(n){var r=new FileReader;r.readAsDataURL(t),r.onload=function(){var o=r.result;if(o){var i=o.toString(),a=0===i.indexOf("data:image")?"":i;kw(e,i,t.name,a),n("ok")}}}))]}))}))}function Gx(e,t){return pp(this,void 0,void 0,(function(){var n,r;return hp(this,(function(o){switch(o.label){case 0:return n=function(e){var t=Ux.get(e);if(null!=t)return t;var n=Vx(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=LC(fp(fp({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,(function(t,n,r){return kw(e,t,n,r)})),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){if(Array.isArray(l))l.forEach((function(t){var n=t.url,r=void 0===n?"":n,o=t.alt,i=void 0===o?"":o,a=t.href;kw(e,r,i,void 0===a?"":a)}));else{var c=l.url,d=void 0===c?"":c,f=l.alt,p=void 0===f?"":f,h=l.href;kw(e,d,p,void 0===h?"":h)}r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),Ux.set(e,t),t}(e),r=t.map((function(e){return{name:e.name,type:e.type,size:e.size,data:e}})),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}}))}))}function qx(e,t){return pp(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v;return hp(this,(function(m){switch(m.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=Vx(e),o=r.customUpload,i=r.base64LimitSize,a=[],m.label=1;case 1:m.trys.push([1,10,11,16]),s=!0,u=yp(n),m.label=2;case 2:return[4,u.next()];case 3:return l=m.sent(),(p=l.done)?[3,9]:(v=l.value,s=!1,d=(c=v).size,i&&d<=i?[4,Wx(e,c)]:[3,5]);case 4:return m.sent(),[3,8];case 5:return o?[4,o(c,(function(t,n,r){return kw(e,t,n,r)}))]:[3,7];case 6:return m.sent(),[3,8];case 7:a.push(c),m.label=8;case 8:return s=!0,[3,2];case 9:return[3,16];case 10:return f=m.sent(),h={error:f},[3,16];case 11:return m.trys.push([11,,14,15]),s||p||!(g=u.return)?[3,13]:[4,g.call(u)];case 12:m.sent(),m.label=13;case 13:return[3,15];case 14:if(h)throw h.error;return[7];case 15:return[7];case 16:return a.length>0?[4,Gx(e,a)]:[3,18];case 17:m.sent(),m.label=18;case 18:return[2]}}))}))}var Kx=function(){function e(){this.title=wm("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return Tw(e)},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadImage")},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i((function(t,n,r){return kw(e,t,n,r)}));else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=fh("body"),u=fh('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",(function(){var t=u[0].files;qx(e,t)}))}},e}();var Yx={menus:[{key:"uploadImage",factory:function(){return new Kx},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name,"' upload error"),n)},base64LimitSize:0}}],editorPlugin:function(e){var t=e.insertData,n=e;return n.insertData=function(r){if(Tw(n))t(r);else if(r.getData("text/plain"))t(r);else{var o=r.files;if(o.length<=0)t(r);else Array.prototype.slice.call(o).some((function(e){return"image"===vp(e.type.split("/"),1)[0]}))?qx(e,o):t(r)}},n}};Cm("en",{highLightModule:{selectLang:"Language"}}),Cm("zh-CN",{highLightModule:{selectLang:"选择语言"}});var Xx,Zx={exports:{}};var Jx=(Xx||(Xx=1,function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},o.util.type(t)){case"Object":if(i=o.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=o.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e],a={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var u in n)n.hasOwnProperty(u)&&(a[u]=n[u]);n.hasOwnProperty(s)||(a[s]=i[s])}var l=r[e];return r[e]=a,o.languages.DFS(o.languages,(function(t,n){n===l&&t!=e&&(this[t]=a)})),a},DFS:function e(t,n,r,i){i=i||{};var a=o.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var u=t[s],l=o.util.type(u);"Object"!==l||i[a(u)]?"Array"!==l||i[a(u)]||(i[a(u)]=!0,e(u,n,s,i)):(i[a(u)]=!0,e(u,n,null,i))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,a=0;i=r.elements[a++];)o.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=o.util.getLanguage(t),a=o.languages[i];o.util.setLanguage(t,i);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&o.util.setLanguage(s,i);var u={element:t,language:i,grammar:a,code:t.textContent};function l(e){u.highlightedCode=e,o.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,o.hooks.run("after-highlight",u),o.hooks.run("complete",u),r&&r.call(u.element)}if(o.hooks.run("before-sanity-check",u),(s=u.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!u.code)return o.hooks.run("complete",u),void(r&&r.call(u.element));if(o.hooks.run("before-highlight",u),u.grammar)if(n&&e.Worker){var c=new Worker(o.filename);c.onmessage=function(e){l(e.data)},c.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else l(o.highlight(u.code,u.grammar,u.language));else l(o.util.encode(u.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new u;return l(o,o.head,e),s(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function s(e,t,n,r,u,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var h=0;h<p.length;++h){if(d&&d.cause==f+","+h)return;var g=p[h],v=g.inside,m=!!g.lookbehind,y=!!g.greedy,b=g.alias;if(y&&!g.pattern.global){var E=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,E+"g")}for(var C=g.pattern||g,D=r.next,w=u;D!==t.tail&&!(d&&w>=d.reach);w+=D.value.length,D=D.next){var A=D.value;if(t.length>e.length)return;if(!(A instanceof i)){var S,x=1;if(y){if(!(S=a(C,w,e,m))||S.index>=e.length)break;var O=S.index,T=S.index+S[0].length,N=w;for(N+=D.value.length;O>=N;)N+=(D=D.next).value.length;if(w=N-=D.value.length,D.value instanceof i)continue;for(var B=D;B!==t.tail&&(N<T||"string"==typeof B.value);B=B.next)x++,N+=B.value.length;x--,A=e.slice(w,N),S.index-=w}else if(!(S=a(C,0,A,m)))continue;O=S.index;var k=S[0],F=A.slice(0,O),P=A.slice(O+k.length),I=w+A.length;d&&I>d.reach&&(d.reach=I);var R=D.prev;if(F&&(R=l(t,R,F),w+=F.length),c(t,R,x),D=l(t,R,new i(f,v?o.tokenize(k,v):k,b,k)),P&&l(t,D,P),x>1){var L={cause:f+","+h,reach:I};s(e,t,n,D.prev,w,L),d&&L.reach>d.reach&&(d.reach=L.reach)}}}}}}function u(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var s="";for(var u in i.attributes)s+=" "+u+'="'+(i.attributes[u]||"").replace(/"/g,""")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+s+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,a=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),a&&e.close()}),!1),o):o;var d=o.util.currentScript();function f(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
19
|
+
*/function i(e,t){const n=/\$/g;let r=[e];if(null==t)return r;for(const e of Object.keys(t))if("_"!==e){let i=t[e];"string"==typeof i&&(i=n[Symbol.replace](i,"$$$$")),r=o(r,new RegExp(`%\\{${e}\\}`,"g"),i)}return r}var a=n("apply");function s(e){if(null==e||!e.strings)return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}return ub=class{constructor(t){Object.defineProperty(this,a,{value:s}),this.locale={strings:{},pluralize:e=>1===e?0:1},Array.isArray(t)?t.forEach(e(this,a)[a],this):e(this,a)[a](t)}translate(e,t){return this.translateArray(e,t).join("")}translateArray(e,t){if(!r(this.locale.strings,e))throw new Error(`missing string: ${e}`);const n=this.locale.strings[e];if("object"==typeof n){if(t&&void 0!==t.smart_count){return i(n[this.locale.pluralize(t.smart_count)],t)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return i(n,t)}},ub}function Lb(){return db||(db=1,cb=function(){var e={},t=e._fns={};return e.emit=function(e,n,r,o,i,a,s){var u=function(e){var n=t[e]?t[e]:[],r=e.indexOf(":"),o=-1===r?[e]:[e.substring(0,r),e.substring(r+1)],i=Object.keys(t),a=0,s=i.length;for(;a<s;a++){var u=i[a];if("*"===u&&(n=n.concat(t[u])),2===o.length&&o[0]===u){n=n.concat(t[u]);break}}return n}(e);u.length&&function(e,t,n){var r=0,o=t.length;for(;r<o&&t[r];r++)t[r].event=e,t[r].apply(t[r],n)}(e,u,[n,r,o,i,a,s])},e.on=function(e,n){t[e]||(t[e]=[]),t[e].push(n)},e.once=function(t,n){this.on(t,(function r(){n.apply(this,arguments),e.off(t,r)}))},e.off=function(e,t){var n=[];if(e&&t)for(var r=this._fns[e],o=0,i=r?r.length:0;o<i;o++)r[o]!==t&&n.push(r[o]);n.length?this._fns[e]=n:delete this._fns[e]},e}),cb}function _b(){if(pb)return fb;pb=1;var e=0;function t(t){return"__private_"+e+++"_"+t}var n=t("publish");class r{constructor(){Object.defineProperty(this,n,{value:o}),this.state={},this.callbacks=[]}getState(){return this.state}setState(e){const t={...this.state},r={...this.state,...e};this.state=r,function(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}(this,n)[n](t,r,e)}subscribe(e){return this.callbacks.push(e),()=>{this.callbacks.splice(this.callbacks.indexOf(e),1)}}}function o(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.callbacks.forEach((e=>{e(...t)}))}return r.VERSION="2.1.1",fb=function(){return new r}}function Mb(){if(gb)return hb;return gb=1,hb=function(e){const t=e.lastIndexOf(".");return-1===t||t===e.length-1?{name:e,extension:void 0}:{name:e.slice(0,t),extension:e.slice(t+1)}}}function jb(){return mb?vb:(mb=1,vb={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",heic:"image/heic",heif:"image/heif",yaml:"text/yaml",yml:"text/yaml",csv:"text/csv",tsv:"text/tab-separated-values",tab:"text/tab-separated-values",avi:"video/x-msvideo",mks:"video/x-matroska",mkv:"video/x-matroska",mov:"video/quicktime",dicom:"application/dicom",doc:"application/msword",docm:"application/vnd.ms-word.document.macroenabled.12",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",dot:"application/msword",dotm:"application/vnd.ms-word.template.macroenabled.12",dotx:"application/vnd.openxmlformats-officedocument.wordprocessingml.template",xla:"application/vnd.ms-excel",xlam:"application/vnd.ms-excel.addin.macroenabled.12",xlc:"application/vnd.ms-excel",xlf:"application/x-xliff+xml",xlm:"application/vnd.ms-excel",xls:"application/vnd.ms-excel",xlsb:"application/vnd.ms-excel.sheet.binary.macroenabled.12",xlsm:"application/vnd.ms-excel.sheet.macroenabled.12",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",xlt:"application/vnd.ms-excel",xltm:"application/vnd.ms-excel.template.macroenabled.12",xltx:"application/vnd.openxmlformats-officedocument.spreadsheetml.template",xlw:"application/vnd.ms-excel",txt:"text/plain",text:"text/plain",conf:"text/plain",log:"text/plain",pdf:"application/pdf",zip:"application/zip","7z":"application/x-7z-compressed",rar:"application/x-rar-compressed",tar:"application/x-tar",gz:"application/gzip",dmg:"application/x-apple-diskimage"})}function Hb(){if(Nb)return Tb;Nb=1;var e=Jy(),t=Zy(),n=Pb();let r,o;function i(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var a=0;function s(e){return"__private_"+a+++"_"+e}const u=Rb(),l=Lb(),c=Gm(),d=_b(),f=function(){if(bb)return yb;bb=1;const e=Mb(),t=jb();return yb=function(n){var r;if(n.type)return n.type;const o=n.name?null==(r=e(n.name).extension)?void 0:r.toLowerCase():null;return o&&o in t?t[o]:"application/octet-stream"}}(),p=Mb(),h=function(){if(Cb)return Eb;function e(e){let t="";return e.replace(/[^A-Z0-9]/gi,(e=>(t+=`-${function(e){return e.charCodeAt(0).toString(32)}(e)}`,"/")))+t}return Cb=1,Eb=function(t){let n="uppy";return"string"==typeof t.name&&(n+=`-${e(t.name.toLowerCase())}`),void 0!==t.type&&(n+=`-${t.type}`),t.meta&&"string"==typeof t.meta.relativePath&&(n+=`-${e(t.meta.relativePath.toLowerCase())}`),void 0!==t.data.size&&(n+=`-${t.data.size}`),void 0!==t.data.lastModified&&(n+=`-${t.data.lastModified}`),n}}(),g=(wb||(wb=1,Db=function(e){if(null==e&&"undefined"!=typeof navigator&&(e=navigator.userAgent),!e)return!0;const t=/Edge\/(\d+\.\d+)/.exec(e);if(!t)return!0;const n=t[1];let[r,o]=n.split(".");return r=parseInt(r,10),o=parseInt(o,10),r<15||15===r&&o<15063||r>18||18===r&&o>=18218}),Db),v=Sb?Ab:(Sb=1,Ab=function(e,t){return t.name?t.name:"image"===e.split("/")[0]?`${e.split("/")[0]}.${e.split("/")[1]}`:"noname"}),m=Ob?xb:(Ob=1,xb={strings:{addBulkFilesFailed:{0:"Failed to add %{smart_count} file due to an internal error",1:"Failed to add %{smart_count} files due to internal errors"},youCanOnlyUploadX:{0:"You can only upload %{smart_count} file",1:"You can only upload %{smart_count} files"},youHaveToAtLeastSelectX:{0:"You have to select at least %{smart_count} file",1:"You have to select at least %{smart_count} files"},exceedsSize:"%{file} exceeds maximum allowed size of %{size}",missingRequiredMetaField:"Missing required meta fields",missingRequiredMetaFieldOnFile:"Missing required meta fields in %{fileName}",inferiorSize:"This file is smaller than the allowed size of %{size}",youCanOnlyUploadFileTypes:"You can only upload: %{types}",noMoreFilesAllowed:"Cannot add more files",noDuplicates:"Cannot add the duplicate file '%{fileName}', it already exists",companionError:"Connection with Companion failed",authAborted:"Authentication aborted",companionUnauthorizeHint:"To unauthorize to your %{provider} account, please go to %{url}",failedToUpload:"Failed to upload %{file}",noInternetConnection:"No Internet connection",connectedToInternet:"Connected to the Internet",noFilesFound:"You have no files or folders here",selectX:{0:"Select %{smart_count}",1:"Select %{smart_count}"},allFilesFromFolderNamed:"All files from folder %{name}",openFolderNamed:"Open folder %{name}",cancel:"Cancel",logOut:"Log out",filter:"Filter",resetFilter:"Reset filter",loading:"Loading...",authenticateWithTitle:"Please authenticate with %{pluginName} to select files",authenticateWith:"Connect to %{pluginName}",signInWithGoogle:"Sign in with Google",searchImages:"Search for images",enterTextToSearch:"Enter text to search for images",search:"Search",emptyFolderAdded:"No files were added from empty folder",folderAlreadyAdded:'The folder "%{folder}" was already added',folderAdded:{0:"Added %{smart_count} file from %{folder}",1:"Added %{smart_count} files from %{folder}"}}});var y=s("plugins"),b=s("restricter"),E=s("storeUnsubscribe"),C=s("emitter"),D=s("preProcessors"),w=s("uploaders"),A=s("postProcessors"),S=s("informAndEmit"),x=s("checkRequiredMetaFieldsOnFile"),O=s("checkRequiredMetaFields"),T=s("assertNewUploadAllowed"),N=s("checkAndCreateFileStateObject"),B=s("startIfAutoProceed"),k=s("addListeners"),F=s("updateOnlineStatus"),P=s("createUpload"),I=s("getUpload"),R=s("removeUpload"),L=s("runUpload");r=Symbol.for("uppy test: getPlugins"),o=Symbol.for("uppy test: createUpload");class _{constructor(e){Object.defineProperty(this,L,{value:K}),Object.defineProperty(this,R,{value:q}),Object.defineProperty(this,I,{value:G}),Object.defineProperty(this,P,{value:W}),Object.defineProperty(this,k,{value:V}),Object.defineProperty(this,B,{value:U}),Object.defineProperty(this,N,{value:$}),Object.defineProperty(this,T,{value:z}),Object.defineProperty(this,O,{value:H}),Object.defineProperty(this,x,{value:j}),Object.defineProperty(this,S,{value:M}),Object.defineProperty(this,y,{writable:!0,value:Object.create(null)}),Object.defineProperty(this,b,{writable:!0,value:void 0}),Object.defineProperty(this,E,{writable:!0,value:void 0}),Object.defineProperty(this,C,{writable:!0,value:l()}),Object.defineProperty(this,D,{writable:!0,value:new Set}),Object.defineProperty(this,w,{writable:!0,value:new Set}),Object.defineProperty(this,A,{writable:!0,value:new Set}),Object.defineProperty(this,F,{writable:!0,value:this.updateOnlineStatus.bind(this)}),this.defaultLocale=m;const r={id:"uppy",autoProceed:!1,allowMultipleUploads:!0,allowMultipleUploadBatches:!0,debug:!1,restrictions:n.defaultOptions,meta:{},onBeforeFileAdded:e=>e,onBeforeUpload:e=>e,store:d(),logger:t.justErrorsLogger,infoTimeout:5e3};this.opts={...r,...e,restrictions:{...r.restrictions,...e&&e.restrictions}},e&&e.logger&&e.debug?this.log("You are using a custom `logger`, but also set `debug: true`, which uses built-in logger to output logs to console. Ignoring `debug: true` and using your custom `logger`.","warning"):e&&e.debug&&(this.opts.logger=t.debugLogger),this.log(`Using Core v${this.constructor.VERSION}`),this.i18nInit(),this.calculateProgress=c(this.calculateProgress.bind(this),500,{leading:!0,trailing:!0}),this.store=this.opts.store,this.setState({plugins:{},files:{},currentUploads:{},allowNewUpload:!0,capabilities:{uploadProgress:g(),individualCancellation:!0,resumableUploads:!1},totalProgress:0,meta:{...this.opts.meta},info:[],recoveredState:null}),i(this,b)[b]=new n.Restricter((()=>this.opts),this.i18n),i(this,E)[E]=this.store.subscribe(((e,t,n)=>{this.emit("state-update",e,t,n),this.updateAll(t)})),this.opts.debug&&"undefined"!=typeof window&&(window[this.opts.id]=this),i(this,k)[k]()}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i(this,C)[C].emit(e,...n)}on(e,t){return i(this,C)[C].on(e,t),this}once(e,t){return i(this,C)[C].once(e,t),this}off(e,t){return i(this,C)[C].off(e,t),this}updateAll(e){this.iteratePlugins((t=>{t.update(e)}))}setState(e){this.store.setState(e)}getState(){return this.store.getState()}get state(){return this.getState()}setFileState(e,t){if(!this.getState().files[e])throw new Error(`Can’t set state for ${e} (the file could have been removed)`);this.setState({files:{...this.getState().files,[e]:{...this.getState().files[e],...t}}})}i18nInit(){const e=new u([this.defaultLocale,this.opts.locale]);this.i18n=e.translate.bind(e),this.i18nArray=e.translateArray.bind(e),this.locale=e.locale}setOptions(e){this.opts={...this.opts,...e,restrictions:{...this.opts.restrictions,...e&&e.restrictions}},e.meta&&this.setMeta(e.meta),this.i18nInit(),e.locale&&this.iteratePlugins((e=>{e.setOptions()})),this.setState()}resetProgress(){const e={percentage:0,bytesUploaded:0,uploadComplete:!1,uploadStarted:null},t={...this.getState().files},n={};Object.keys(t).forEach((r=>{const o={...t[r]};o.progress={...o.progress,...e},n[r]=o})),this.setState({files:n,totalProgress:0}),this.emit("reset-progress")}addPreProcessor(e){i(this,D)[D].add(e)}removePreProcessor(e){return i(this,D)[D].delete(e)}addPostProcessor(e){i(this,A)[A].add(e)}removePostProcessor(e){return i(this,A)[A].delete(e)}addUploader(e){i(this,w)[w].add(e)}removeUploader(e){return i(this,w)[w].delete(e)}setMeta(e){const t={...this.getState().meta,...e},n={...this.getState().files};Object.keys(n).forEach((t=>{n[t]={...n[t],meta:{...n[t].meta,...e}}})),this.log("Adding metadata:"),this.log(e),this.setState({meta:t,files:n})}setFileMeta(e,t){const n={...this.getState().files};if(!n[e])return void this.log("Was trying to set metadata for a file that has been removed: ",e);const r={...n[e].meta,...t};n[e]={...n[e],meta:r},this.setState({files:n})}getFile(e){return this.getState().files[e]}getFiles(){const{files:e}=this.getState();return Object.values(e)}getObjectOfFilesPerState(){const{files:e,totalProgress:t,error:n}=this.getState(),r=Object.values(e),o=r.filter((e=>{let{progress:t}=e;return!t.uploadComplete&&t.uploadStarted})),i=r.filter((e=>!e.progress.uploadStarted)),a=r.filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess)),s=r.filter((e=>e.progress.uploadStarted)),u=r.filter((e=>e.isPaused)),l=r.filter((e=>e.progress.uploadComplete)),c=r.filter((e=>e.error)),d=o.filter((e=>!e.isPaused)),f=r.filter((e=>e.progress.preprocess||e.progress.postprocess));return{newFiles:i,startedFiles:a,uploadStartedFiles:s,pausedFiles:u,completeFiles:l,erroredFiles:c,inProgressFiles:o,inProgressNotPausedFiles:d,processingFiles:f,isUploadStarted:s.length>0,isAllComplete:100===t&&l.length===r.length&&0===f.length,isAllErrored:!!n&&c.length===r.length,isAllPaused:0!==o.length&&u.length===o.length,isUploadInProgress:o.length>0,isSomeGhost:r.some((e=>e.isGhost))}}validateRestrictions(e,t){void 0===t&&(t=this.getFiles());try{return i(this,b)[b].validate(e,t),{result:!0}}catch(e){return{result:!1,reason:e.message}}}checkIfFileAlreadyExists(e){const{files:t}=this.getState();return!(!t[e]||t[e].isGhost)}addFile(e){i(this,T)[T](e);const{files:t}=this.getState();let n=i(this,N)[N](t,e);return t[n.id]&&t[n.id].isGhost&&(n={...t[n.id],data:e.data,isGhost:!1},this.log(`Replaced the blob in the restored ghost file: ${n.name}, ${n.id}`)),this.setState({files:{...t,[n.id]:n}}),this.emit("file-added",n),this.emit("files-added",[n]),this.log(`Added file: ${n.name}, ${n.id}, mime type: ${n.type}`),i(this,B)[B](),n.id}addFiles(e){i(this,T)[T]();const t={...this.getState().files},n=[],r=[];for(let o=0;o<e.length;o++)try{let r=i(this,N)[N](t,e[o]);t[r.id]&&t[r.id].isGhost&&(r={...t[r.id],data:e[o].data,isGhost:!1},this.log(`Replaced blob in a ghost file: ${r.name}, ${r.id}`)),t[r.id]=r,n.push(r)}catch(e){e.isRestriction||r.push(e)}if(this.setState({files:t}),n.forEach((e=>{this.emit("file-added",e)})),this.emit("files-added",n),n.length>5?this.log(`Added batch of ${n.length} files`):Object.keys(n).forEach((e=>{this.log(`Added file: ${n[e].name}\n id: ${n[e].id}\n type: ${n[e].type}`)})),n.length>0&&i(this,B)[B](),r.length>0){let e="Multiple errors occurred while adding files:\n";if(r.forEach((t=>{e+=`\n * ${t.message}`})),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:r.length}),details:e},"error",this.opts.infoTimeout),"function"==typeof AggregateError)throw new AggregateError(r,e);{const t=new Error(e);throw t.errors=r,t}}}removeFiles(e,t){const{files:n,currentUploads:r}=this.getState(),o={...n},i={...r},a=Object.create(null);function s(e){return void 0===a[e]}e.forEach((e=>{n[e]&&(a[e]=n[e],delete o[e])})),Object.keys(i).forEach((e=>{const t=r[e].fileIDs.filter(s);if(0===t.length)return void delete i[e];const{capabilities:n}=this.getState();if(t.length!==r[e].fileIDs.length&&!n.individualCancellation)throw new Error("individualCancellation is disabled");i[e]={...r[e],fileIDs:t}}));const u={currentUploads:i,files:o};0===Object.keys(o).length&&(u.allowNewUpload=!0,u.error=null,u.recoveredState=null),this.setState(u),this.calculateTotalProgress();const l=Object.keys(a);l.forEach((e=>{this.emit("file-removed",a[e],t)})),l.length>5?this.log(`Removed ${l.length} files`):this.log(`Removed files: ${l.join(", ")}`)}removeFile(e,t){void 0===t&&(t=null),this.removeFiles([e],t)}pauseResume(e){if(!this.getState().capabilities.resumableUploads||this.getFile(e).uploadComplete)return;const t=!(this.getFile(e).isPaused||!1);return this.setFileState(e,{isPaused:t}),this.emit("upload-pause",e,t),t}pauseAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!0};e[t]=n})),this.setState({files:e}),this.emit("pause-all")}resumeAll(){const e={...this.getState().files};Object.keys(e).filter((t=>!e[t].progress.uploadComplete&&e[t].progress.uploadStarted)).forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e}),this.emit("resume-all")}retryAll(){const e={...this.getState().files},t=Object.keys(e).filter((t=>e[t].error));if(t.forEach((t=>{const n={...e[t],isPaused:!1,error:null};e[t]=n})),this.setState({files:e,error:null}),this.emit("retry-all",t),0===t.length)return Promise.resolve({successful:[],failed:[]});const n=i(this,P)[P](t,{forceAllowNewUpload:!0});return i(this,L)[L](n)}cancelAll(e){let{reason:t="user"}=void 0===e?{}:e;if(this.emit("cancel-all",{reason:t}),"user"===t){const{files:e}=this.getState(),t=Object.keys(e);t.length&&this.removeFiles(t,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}}retryUpload(e){this.setFileState(e,{error:null,isPaused:!1}),this.emit("upload-retry",e);const t=i(this,P)[P]([e],{forceAllowNewUpload:!0});return i(this,L)[L](t)}reset(){this.cancelAll(...arguments)}logout(){this.iteratePlugins((e=>{e.provider&&e.provider.logout&&e.provider.logout()}))}calculateProgress(e,t){if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=Number.isFinite(t.bytesTotal)&&t.bytesTotal>0;this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,bytesUploaded:t.bytesUploaded,bytesTotal:t.bytesTotal,percentage:n?Math.round(t.bytesUploaded/t.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const e=this.getFiles().filter((e=>e.progress.uploadStarted||e.progress.preprocess||e.progress.postprocess));if(0===e.length)return this.emit("progress",0),void this.setState({totalProgress:0});const t=e.filter((e=>null!=e.progress.bytesTotal)),n=e.filter((e=>null==e.progress.bytesTotal));if(0===t.length){const t=100*e.length,r=n.reduce(((e,t)=>e+t.progress.percentage),0),o=Math.round(r/t*100);return void this.setState({totalProgress:o})}let r=t.reduce(((e,t)=>e+t.progress.bytesTotal),0);const o=r/t.length;r+=o*n.length;let i=0;t.forEach((e=>{i+=e.progress.bytesUploaded})),n.forEach((e=>{i+=o*(e.progress.percentage||0)/100}));let a=0===r?0:Math.round(i/r*100);a>100&&(a=100),this.setState({totalProgress:a}),this.emit("progress",a)}updateOnlineStatus(){void 0===window.navigator.onLine||window.navigator.onLine?(this.emit("is-online"),this.wasOffline&&(this.emit("back-online"),this.info(this.i18n("connectedToInternet"),"success",3e3),this.wasOffline=!1)):(this.emit("is-offline"),this.info(this.i18n("noInternetConnection"),"error",0),this.wasOffline=!0)}getID(){return this.opts.id}use(e,t){if("function"!=typeof e){throw new TypeError(`Expected a plugin class, but got ${null===e?"null":typeof e}. Please verify that the plugin was imported and spelled correctly.`)}const n=new e(this,t),r=n.id;if(!r)throw new Error("Your plugin must have an id");if(!n.type)throw new Error("Your plugin must have a type");const o=this.getPlugin(r);if(o){const e=`Already found a plugin named '${o.id}'. Tried to use: '${r}'.\nUppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(e)}return e.VERSION&&this.log(`Using ${r} v${e.VERSION}`),n.type in i(this,y)[y]?i(this,y)[y][n.type].push(n):i(this,y)[y][n.type]=[n],n.install(),this}getPlugin(e){for(const t of Object.values(i(this,y)[y])){const n=t.find((t=>t.id===e));if(null!=n)return n}}[r](e){return i(this,y)[y][e]}iteratePlugins(e){Object.values(i(this,y)[y]).flat(1).forEach(e)}removePlugin(e){this.log(`Removing plugin ${e.id}`),this.emit("plugin-remove",e),e.uninstall&&e.uninstall();const t=i(this,y)[y][e.type],n=t.findIndex((t=>t.id===e.id));-1!==n&&t.splice(n,1);const r={plugins:{...this.getState().plugins,[e.id]:void 0}};this.setState(r)}close(e){let{reason:t}=void 0===e?{}:e;this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.cancelAll({reason:t}),i(this,E)[E](),this.iteratePlugins((e=>{this.removePlugin(e)})),"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener("online",i(this,F)[F]),window.removeEventListener("offline",i(this,F)[F]))}hideInfo(){const{info:e}=this.getState();this.setState({info:e.slice(1)}),this.emit("info-hidden")}info(e,t,n){void 0===t&&(t="info"),void 0===n&&(n=3e3);const r="object"==typeof e;this.setState({info:[...this.getState().info,{type:t,message:r?e.message:e,details:r?e.details:null}]}),setTimeout((()=>this.hideInfo()),n),this.emit("info-visible")}log(e,t){const{logger:n}=this.opts;switch(t){case"error":n.error(e);break;case"warning":n.warn(e);break;default:n.debug(e)}}restore(e){return this.log(`Core: attempting to restore upload "${e}"`),this.getState().currentUploads[e]?i(this,L)[L](e):(i(this,R)[R](e),Promise.reject(new Error("Nonexistent upload")))}[o](){return i(this,P)[P](...arguments)}addResultData(e,t){if(!i(this,I)[I](e))return void this.log(`Not setting result for an upload that has been removed: ${e}`);const{currentUploads:n}=this.getState(),r={...n[e],result:{...n[e].result,...t}};this.setState({currentUploads:{...n,[e]:r}})}upload(){var e;null!=(e=i(this,y)[y].uploader)&&e.length||this.log("No uploader type plugins are used","warning");let{files:t}=this.getState();const r=this.opts.onBeforeUpload(t);return!1===r?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&"object"==typeof r&&(t=r,this.setState({files:t})),Promise.resolve().then((()=>i(this,b)[b].validateMinNumberOfFiles(t))).catch((e=>{throw i(this,S)[S](e),e})).then((()=>{if(!i(this,O)[O](t))throw new n.RestrictionError(this.i18n("missingRequiredMetaField"))})).catch((e=>{throw e})).then((()=>{const{currentUploads:e}=this.getState(),n=Object.values(e).flatMap((e=>e.fileIDs)),r=[];Object.keys(t).forEach((e=>{const t=this.getFile(e);t.progress.uploadStarted||-1!==n.indexOf(e)||r.push(t.id)}));const o=i(this,P)[P](r);return i(this,L)[L](o)})).catch((e=>{throw this.emit("error",e),this.log(e,"error"),e})))}}function M(e,t){const{message:n,details:r=""}=e;e.isRestriction?this.emit("restriction-failed",t,e):this.emit("error",e),this.info({message:n,details:r},"error",this.opts.infoTimeout),this.log(`${n} ${r}`.trim(),"error")}function j(e){const{missingFields:t,error:n}=i(this,b)[b].getMissingRequiredMetaFields(e);return!(t.length>0)||(this.setFileState(e.id,{missingRequiredMetaFields:t}),this.log(n.message),this.emit("restriction-failed",e,n),!1)}function H(e){let t=!0;for(const n of Object.values(e))i(this,x)[x](n)||(t=!1);return t}function z(e){const{allowNewUpload:t}=this.getState();if(!1===t){const t=new n.RestrictionError(this.i18n("noMoreFilesAllowed"));throw i(this,S)[S](t,e),t}}function $(e,t){const r=f(t),o=v(r,t),a=p(o).extension,s=Boolean(t.isRemote),u=h({...t,type:r});if(this.checkIfFileAlreadyExists(u)){const e=new n.RestrictionError(this.i18n("noDuplicates",{fileName:o}));throw i(this,S)[S](e,t),e}const l=t.meta||{};l.name=o,l.type=r;const c=Number.isFinite(t.data.size)?t.data.size:null;let d={source:t.source||"",id:u,name:o,extension:a||"",meta:{...this.getState().meta,...l},type:r,data:t.data,progress:{percentage:0,bytesUploaded:0,bytesTotal:c,uploadComplete:!1,uploadStarted:null},size:c,isRemote:s,remote:t.remote||"",preview:t.preview};const g=this.opts.onBeforeFileAdded(d,e);if(!1===g){const e=new n.RestrictionError("Cannot add the file because onBeforeFileAdded returned false.");throw this.emit("restriction-failed",t,e),e}"object"==typeof g&&null!==g&&(d=g);try{const t=Object.keys(e).map((t=>e[t]));i(this,b)[b].validate(d,t)}catch(e){throw i(this,S)[S](e,d),e}return d}function U(){this.opts.autoProceed&&!this.scheduledAutoProceed&&(this.scheduledAutoProceed=setTimeout((()=>{this.scheduledAutoProceed=null,this.upload().catch((e=>{e.isRestriction||this.log(e.stack||e.message||e)}))}),4))}function V(){const e=(e,t,n)=>{let r=e.message||"Unknown error";e.details&&(r+=` ${e.details}`),this.setState({error:r}),null!=t&&t.id in this.getState().files&&this.setFileState(t.id,{error:r,response:n})};this.on("error",e),this.on("upload-error",((t,n,r)=>{if(e(n,t,r),"object"==typeof n&&n.message){const e=new Error(n.message);e.details=n.message,n.details&&(e.details+=` ${n.details}`),e.message=this.i18n("failedToUpload",{file:null==t?void 0:t.name}),i(this,S)[S](e)}else i(this,S)[S](n)})),this.on("upload",(()=>{this.setState({error:null})})),this.on("upload-started",(e=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{uploadStarted:Date.now(),uploadComplete:!1,percentage:0,bytesUploaded:0,bytesTotal:e.size}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("upload-progress",this.calculateProgress),this.on("upload-success",((e,t)=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const n=this.getFile(e.id).progress;this.setFileState(e.id,{progress:{...n,postprocess:i(this,A)[A].size>0?{mode:"indeterminate"}:null,uploadComplete:!0,percentage:100,bytesUploaded:n.bytesTotal},response:t,uploadURL:t.uploadURL,isPaused:!1}),null==e.size&&this.setFileState(e.id,{size:t.bytesUploaded||n.bytesTotal}),this.calculateTotalProgress()})),this.on("preprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getFile(e.id).progress,preprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("preprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.preprocess,this.setState({files:t})})),this.on("postprocess-progress",((e,t)=>{null!=e&&this.getFile(e.id)?this.setFileState(e.id,{progress:{...this.getState().files[e.id].progress,postprocess:t}}):this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`)})),this.on("postprocess-complete",(e=>{if(null==e||!this.getFile(e.id))return void this.log(`Not setting progress for a file that has been removed: ${null==e?void 0:e.id}`);const t={...this.getState().files};t[e.id]={...t[e.id],progress:{...t[e.id].progress}},delete t[e.id].progress.postprocess,this.setState({files:t})})),this.on("restored",(()=>{this.calculateTotalProgress()})),this.on("dashboard:file-edit-complete",(e=>{e&&i(this,x)[x](e)})),"undefined"!=typeof window&&window.addEventListener&&(window.addEventListener("online",i(this,F)[F]),window.addEventListener("offline",i(this,F)[F]),setTimeout(i(this,F)[F],3e3))}function W(t,n){void 0===n&&(n={});const{forceAllowNewUpload:r=!1}=n,{allowNewUpload:o,currentUploads:i}=this.getState();if(!o&&!r)throw new Error("Cannot create a new upload: already uploading.");const a=(0,e.nanoid)();return this.emit("upload",{id:a,fileIDs:t}),this.setState({allowNewUpload:!1!==this.opts.allowMultipleUploadBatches&&!1!==this.opts.allowMultipleUploads,currentUploads:{...i,[a]:{fileIDs:t,step:0,result:{}}}}),a}function G(e){const{currentUploads:t}=this.getState();return t[e]}function q(e){const t={...this.getState().currentUploads};delete t[e],this.setState({currentUploads:t})}async function K(e){let{currentUploads:t}=this.getState(),n=t[e];const r=n.step||0,o=[...i(this,D)[D],...i(this,w)[w],...i(this,A)[A]];try{for(let i=r;i<o.length&&n;i++){const r=o[i],a={...n,step:i};this.setState({currentUploads:{...t,[e]:a}}),await r(a.fileIDs,e),t=this.getState().currentUploads,n=t[e]}}catch(t){throw i(this,R)[R](e),t}if(n){n.fileIDs.forEach((e=>{const t=this.getFile(e);t&&t.progress.postprocess&&this.emit("postprocess-complete",t)}));const r=n.fileIDs.map((e=>this.getFile(e))),o=r.filter((e=>!e.error)),i=r.filter((e=>e.error));await this.addResultData(e,{successful:o,failed:i,uploadID:e}),t=this.getState().currentUploads,n=t[e]}let a;return n&&(a=n.result,this.emit("complete",a),i(this,R)[R](e)),null==a&&this.log(`Not setting result for an upload that has been removed: ${e}`),a}return _.VERSION="2.3.4",Tb=_}var zb,$b,Ub,Vb,Wb,Gb,qb,Kb,Yb={},Xb=[],Zb=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Jb(e,t){for(var n in t)e[n]=t[n];return e}function Qb(e){var t=e.parentNode;t&&t.removeChild(e)}function eE(e,t,n){var r,o,i,a={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?zb.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===a[i]&&(a[i]=e.defaultProps[i]);return tE(e,a,r,o,null)}function tE(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++Ub:o};return null==o&&null!=$b.vnode&&$b.vnode(i),i}function nE(e){return e.children}function rE(e,t){this.props=e,this.context=t}function oE(e,t){if(null==t)return e.__?oE(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?oE(e):null}function iE(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return iE(e)}}function aE(e){(!e.__d&&(e.__d=!0)&&Wb.push(e)&&!sE.__r++||qb!==$b.debounceRendering)&&((qb=$b.debounceRendering)||Gb)(sE)}function sE(){for(var e;sE.__r=Wb.length;)e=Wb.sort((function(e,t){return e.__v.__b-t.__v.__b})),Wb=[],e.some((function(e){var t,n,r,o,i,a;e.__d&&(i=(o=(t=e).__v).__e,(a=t.__P)&&(n=[],(r=Jb({},o)).__v=o.__v+1,gE(a,o,r,t.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?oE(o):i,o.__h),vE(n,o),o.__e!=i&&iE(o)))}))}function uE(e,t,n,r,o,i,a,s,u,l){var c,d,f,p,h,g,v,m=r&&r.__k||Xb,y=m.length;for(n.__k=[],c=0;c<t.length;c++)if(null!=(p=n.__k[c]=null==(p=t[c])||"boolean"==typeof p?null:"string"==typeof p||"number"==typeof p||"bigint"==typeof p?tE(null,p,null,null,p):Array.isArray(p)?tE(nE,{children:p},null,null,null):p.__b>0?tE(p.type,p.props,p.key,null,p.__v):p)){if(p.__=n,p.__b=n.__b+1,null===(f=m[c])||f&&p.key==f.key&&p.type===f.type)m[c]=void 0;else for(d=0;d<y;d++){if((f=m[d])&&p.key==f.key&&p.type===f.type){m[d]=void 0;break}f=null}gE(e,p,f=f||Yb,o,i,a,s,u,l),h=p.__e,(d=p.ref)&&f.ref!=d&&(v||(v=[]),f.ref&&v.push(f.ref,null,p),v.push(d,p.__c||h,p)),null!=h?(null==g&&(g=h),"function"==typeof p.type&&p.__k===f.__k?p.__d=u=lE(p,u,e):u=cE(e,p,f,m,h,u),"function"==typeof n.type&&(n.__d=u)):u&&f.__e==u&&u.parentNode!=e&&(u=oE(f))}for(n.__e=g,c=y;c--;)null!=m[c]&&("function"==typeof n.type&&null!=m[c].__e&&m[c].__e==n.__d&&(n.__d=oE(r,c+1)),bE(m[c],m[c]));if(v)for(c=0;c<v.length;c++)yE(v[c],v[++c],v[++c])}function lE(e,t,n){for(var r,o=e.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=e,t="function"==typeof r.type?lE(r,t,n):cE(n,r,r,o,r.__e,t));return t}function cE(e,t,n,r,o,i){var a,s,u;if(void 0!==t.__d)a=t.__d,t.__d=void 0;else if(null==n||o!=i||null==o.parentNode)e:if(null==i||i.parentNode!==e)e.appendChild(o),a=null;else{for(s=i,u=0;(s=s.nextSibling)&&u<r.length;u+=2)if(s==o)break e;e.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function dE(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||Zb.test(t)?n:n+"px"}function fE(e,t,n,r,o){var i;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||dE(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||dE(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r||e.addEventListener(t,i?hE:pE,i):e.removeEventListener(t,i?hE:pE,i);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function pE(e){this.l[e.type+!1]($b.event?$b.event(e):e)}function hE(e){this.l[e.type+!0]($b.event?$b.event(e):e)}function gE(e,t,n,r,o,i,a,s,u){var l,c,d,f,p,h,g,v,m,y,b,E=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,s=t.__e=n.__e,t.__h=null,i=[s]),(l=$b.__b)&&l(t);try{e:if("function"==typeof E){if(v=t.props,m=(l=E.contextType)&&r[l.__c],y=l?m?m.props.value:l.__:r,n.__c?g=(c=t.__c=n.__c).__=c.__E:("prototype"in E&&E.prototype.render?t.__c=c=new E(v,y):(t.__c=c=new rE(v,y),c.constructor=E,c.render=EE),m&&m.sub(c),c.props=v,c.state||(c.state={}),c.context=y,c.__n=r,d=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=E.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=Jb({},c.__s)),Jb(c.__s,E.getDerivedStateFromProps(v,c.__s))),f=c.props,p=c.state,d)null==E.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==E.getDerivedStateFromProps&&v!==f&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(v,y),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(v,c.__s,y)||t.__v===n.__v){c.props=v,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),c.__h.length&&a.push(c);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(v,c.__s,y),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(f,p,h)}))}c.context=y,c.props=v,c.state=c.__s,(l=$b.__r)&&l(t),c.__d=!1,c.__v=t,c.__P=e,l=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=Jb(Jb({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(f,p)),b=null!=l&&l.type===nE&&null==l.key?l.props.children:l,uE(e,Array.isArray(b)?b:[b],t,n,r,o,i,a,s,u),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),g&&(c.__E=c.__=null),c.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=mE(n.__e,t,n,r,o,i,a,u);(l=$b.diffed)&&l(t)}catch(e){t.__v=null,(u||null!=i)&&(t.__e=s,t.__h=!!u,i[i.indexOf(s)]=null),$b.__e(e,t,n)}}function vE(e,t){$b.__c&&$b.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){$b.__e(e,t.__v)}}))}function mE(e,t,n,r,o,i,a,s){var u,l,c,d=n.props,f=t.props,p=t.type,h=0;if("svg"===p&&(o=!0),null!=i)for(;h<i.length;h++)if((u=i[h])&&"setAttribute"in u==!!p&&(p?u.localName===p:3===u.nodeType)){e=u,i[h]=null;break}if(null==e){if(null===p)return document.createTextNode(f);e=o?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,f.is&&f),i=null,s=!1}if(null===p)d===f||s&&e.data===f||(e.data=f);else{if(i=i&&zb.call(e.childNodes),l=(d=n.props||Yb).dangerouslySetInnerHTML,c=f.dangerouslySetInnerHTML,!s){if(null!=i)for(d={},h=0;h<e.attributes.length;h++)d[e.attributes[h].name]=e.attributes[h].value;(c||l)&&(c&&(l&&c.__html==l.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(function(e,t,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in t||fE(e,i,null,n[i],r);for(i in t)o&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||fE(e,i,t[i],n[i],r)}(e,f,d,o,s),c)t.__k=[];else if(h=t.props.children,uE(e,Array.isArray(h)?h:[h],t,n,r,o&&"foreignObject"!==p,i,a,i?i[0]:n.__k&&oE(n,0),s),null!=i)for(h=i.length;h--;)null!=i[h]&&Qb(i[h]);s||("value"in f&&void 0!==(h=f.value)&&(h!==d.value||h!==e.value||"progress"===p&&!h)&&fE(e,"value",h,d.value,!1),"checked"in f&&void 0!==(h=f.checked)&&h!==e.checked&&fE(e,"checked",h,d.checked,!1))}return e}function yE(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){$b.__e(e,n)}}function bE(e,t,n){var r,o;if($b.unmount&&$b.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||yE(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){$b.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&bE(r[o],t,"function"!=typeof e.type);n||null==e.__e||Qb(e.__e),e.__e=e.__d=void 0}function EE(e,t,n){return this.constructor(e,n)}function CE(e,t,n){var r,o,i;$b.__&&$b.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,i=[],gE(t,e=(!r&&n||t).__k=eE(nE,null,[e]),o||Yb,Yb,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?zb.call(t.childNodes):null,i,!r&&n?n:o?o.__e:t.firstChild,r),vE(i,e)}zb=Xb.slice,$b={__e:function(e,t){for(var n,r,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(e)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e),o=n.__d),o)return n.__E=n}catch(t){e=t}throw e}},Ub=0,Vb=function(e){return null!=e&&void 0===e.constructor},rE.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=Jb({},this.state),"function"==typeof e&&(e=e(Jb({},n),this.props)),e&&Jb(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),aE(this))},rE.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),aE(this))},rE.prototype.render=nE,Wb=[],Gb="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,sE.__r=0,Kb=0;var DE,wE,AE,SE,xE,OE,TE,NE,BE,kE,FE,PE=Object.freeze({__proto__:null,Component:rE,Fragment:nE,cloneElement:function(e,t,n){var r,o,i,a=Jb({},e.props);for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:a[i]=t[i];return arguments.length>2&&(a.children=arguments.length>3?zb.call(arguments,2):n),tE(e.type,a,r||e.key,o||e.ref,null)},createContext:function(e,t){var n={__c:t="__cC"+Kb++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(aE)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n},createElement:eE,createRef:function(){return{current:null}},h:eE,hydrate:function e(t,n){CE(t,n,e)},get isValidElement(){return Vb},get options(){return $b},render:CE,toChildArray:function e(t,n){return n=n||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){e(t,n)})):n.push(t)),n}}),IE=C(PE);function RE(){if(SE)return AE;SE=1;const e=wE?DE:(wE=1,DE=function(e){return(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE});return AE=function(t,n){return void 0===n&&(n=document),"string"==typeof t?n.querySelector(t):e(t)?t:null}}function LE(){if(NE)return TE;NE=1;const e=Rb();return TE=class{constructor(e,t){void 0===t&&(t={}),this.uppy=e,this.opts=t}getPluginState(){const{plugins:e}=this.uppy.getState();return e[this.id]||{}}setPluginState(e){const{plugins:t}=this.uppy.getState();this.uppy.setState({plugins:{...t,[this.id]:{...t[this.id],...e}}})}setOptions(e){this.opts={...this.opts,...e},this.setPluginState(),this.i18nInit()}i18nInit(){const t=new e([this.defaultLocale,this.uppy.locale,this.opts.locale]);this.i18n=t.translate.bind(t),this.i18nArray=t.translateArray.bind(t),this.setPluginState()}addTarget(){throw new Error("Extend the addTarget method to add your plugin to another plugin's target")}install(){}uninstall(){}render(){throw new Error("Extend the render method to add your plugin to a DOM element")}update(){}afterUpdate(){}}}function _E(){if(kE)return BE;kE=1;var e=IE;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var n=0;function r(e){return"__private_"+n+++"_"+e}const o=RE(),i=OE?xE:(OE=1,xE=function(e){for(var t;e&&!e.dir;)e=e.parentNode;return null==(t=e)?void 0:t.dir}),a=LE();var s=r("updateUI");class u extends a{constructor(){super(...arguments),Object.defineProperty(this,s,{writable:!0,value:void 0})}mount(n,r){const a=r.id,l=o(n);if(l){this.isTargetDOMEl=!0;const r=document.createElement("div");return r.classList.add("uppy-Root"),t(this,s)[s]=function(e){let t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return n=o,t||(t=Promise.resolve().then((()=>(t=null,e(...n))))),t}}((t=>{this.uppy.getPlugin(this.id)&&((0,e.render)(this.render(t),r),this.afterUpdate())})),this.uppy.log(`Installing ${a} to a DOM element '${n}'`),this.opts.replaceTargetContent&&(l.innerHTML=""),(0,e.render)(this.render(this.uppy.getState()),r),this.el=r,l.appendChild(r),r.dir=this.opts.direction||i(r)||"ltr",this.onMount(),this.el}let c;if("object"==typeof n&&n instanceof u)c=n;else if("function"==typeof n){const e=n;this.uppy.iteratePlugins((t=>{t instanceof e&&(c=t)}))}if(c)return this.uppy.log(`Installing ${a} to ${c.id}`),this.parent=c,this.el=c.addTarget(r),this.onMount(),this.el;this.uppy.log(`Not installing ${a}`);let d=`Invalid target option given to ${a}.`;throw d+="function"==typeof n?" The given target is not a Plugin class. Please check that you're not specifying a React Component instead of a plugin. If you are using @uppy/* packages directly, make sure you have only 1 version of @uppy/core installed: run `npm ls @uppy/core` on the command line and verify that all the versions match and are deduped correctly.":"If you meant to target an HTML element, please make sure that the element exists. Check that the <script> tag initializing Uppy is right before the closing </body> tag at the end of the page. (see https://github.com/transloadit/uppy/issues/1042)\n\nIf you meant to target a plugin, please confirm that your `import` statements or `require` calls are correct.",new Error(d)}update(e){var n,r;null!=this.el&&(null==(n=(r=t(this,s))[s])||n.call(r,e))}unmount(){var e;this.isTargetDOMEl&&(null==(e=this.el)||e.remove());this.onUnmount()}onMount(){}onUnmount(){}}return BE=u}var ME,jE,HE=(FE||(FE=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Uppy=t.UIPlugin=t.BasePlugin=void 0,Object.defineProperty(t,"debugLogger",{enumerable:!0,get:function(){return n.debugLogger}});var n=Zy();e.exports=Hb();const r=_E();t.UIPlugin=r;const o=LE();t.BasePlugin=o;const i=Hb();t.Uppy=i;const a=_E(),s=LE();i.Uppy=i,i.UIPlugin=a,i.BasePlugin=s,i.debugLogger=n.debugLogger}(Yy,Yy.exports)),Yy.exports),zE=E(HE);function $E(){if(jE)return ME;jE=1;return ME={nanoid:(e=21)=>{let t="",n=e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t)=>()=>{let n="",r=t;for(;r--;)n+=e[Math.random()*e.length|0];return n}},ME}var UE,VE,WE,GE,qE,KE,YE,XE,ZE,JE,QE={};function eC(){if(VE)return UE;VE=1;class e extends Error{constructor(e,t){void 0===t&&(t=null),super("This looks like a network error, the endpoint might be blocked by an internet provider or a firewall."),this.cause=e,this.isNetworkError=!0,this.request=t}}return UE=e}function tC(){if(JE)return ZE;let e;function t(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}JE=1;var n=0;function r(e){return"__private_"+n+++"_"+e}const o=function(){if(GE)return WE;GE=1;const e=eC();return WE=function(){return fetch(...arguments).catch((t=>{throw"AbortError"===t.name?t:new e(t)}))},WE}(),i=function(){if(KE)return qE;KE=1;const e=Ib();class t extends Error{constructor(t,n){void 0===n&&(n={}),super(t),this.cause=n.cause,this.cause&&e(this.cause,"isNetworkError")&&(this.isNetworkError=this.cause.isNetworkError)}}return qE=t}(),a=function(){if(XE)return YE;XE=1;class e extends Error{constructor(){super("Authorization required"),this.name="AuthError",this.isAuthError=!0}}return YE=e}();async function s(e){if(401===e.status)throw new a;const t=e.json();if(e.status<200||e.status>300){let n=`Failed request with status: ${e.status}. ${e.statusText}`;try{const e=await t;n=e.message?`${n} message: ${e.message}`:n,n=e.requestId?`${n} request-Id: ${e.requestId}`:n}finally{throw new Error(n)}}return t}var u=r("companionHeaders"),l=r("getPostResponseFunc"),c=r("getUrl"),d=r("errorHandler");e=Symbol.for("uppy test: getCompanionHeaders");class f{constructor(e,n){Object.defineProperty(this,d,{value:h}),Object.defineProperty(this,c,{value:p}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:e=>t=>e?t:this.onReceiveResponse(t)}),this.uppy=e,this.opts=n,this.onReceiveResponse=this.onReceiveResponse.bind(this),this.allowedHeaders=["accept","content-type","uppy-auth-token"],this.preflightDone=!1,t(this,u)[u]=null==n?void 0:n.companionHeaders}setCompanionHeaders(e){t(this,u)[u]=e}[e](){return t(this,u)[u]}get hostname(){const{companion:e}=this.uppy.getState(),t=this.opts.companionUrl;return(e&&e[t]?e[t]:t).replace(/\/$/,"")}headers(){return Promise.resolve({...f.defaultHeaders,...t(this,u)[u]})}onReceiveResponse(e){const t=this.uppy.getState().companion||{},n=this.opts.companionUrl,{headers:r}=e;return r.has("i-am")&&r.get("i-am")!==t[n]&&this.uppy.setState({companion:{...t,[n]:r.get("i-am")}}),e}preflight(e){return this.preflightDone?Promise.resolve(this.allowedHeaders.slice()):fetch(t(this,c)[c](e),{method:"OPTIONS"}).then((e=>(e.headers.has("access-control-allow-headers")&&(this.allowedHeaders=e.headers.get("access-control-allow-headers").split(",").map((e=>e.trim().toLowerCase()))),this.preflightDone=!0,this.allowedHeaders.slice()))).catch((e=>(this.uppy.log(`[CompanionClient] unable to make preflight request ${e}`,"warning"),this.preflightDone=!0,this.allowedHeaders.slice())))}preflightAndHeaders(e){return Promise.all([this.preflight(e),this.headers()]).then((e=>{let[t,n]=e;return Object.keys(n).forEach((e=>{t.includes(e.toLowerCase())||(this.uppy.log(`[CompanionClient] excluding disallowed header ${e}`),delete n[e])})),n}))}get(e,n){return this.preflightAndHeaders(e).then((n=>o(t(this,c)[c](e),{method:"get",headers:n,credentials:this.opts.companionCookiesRule||"same-origin"}))).then(t(this,l)[l](n)).then(s).catch(t(this,d)[d]("get",e))}post(e,n,r){const i="post";return this.preflightAndHeaders(e).then((r=>o(t(this,c)[c](e),{method:i,headers:r,credentials:this.opts.companionCookiesRule||"same-origin",body:JSON.stringify(n)}))).then(t(this,l)[l](r)).then(s).catch(t(this,d)[d](i,e))}delete(e,n,r){const i="delete";return this.preflightAndHeaders(e).then((t=>o(`${this.hostname}/${e}`,{method:i,headers:t,credentials:this.opts.companionCookiesRule||"same-origin",body:n?JSON.stringify(n):null}))).then(t(this,l)[l](r)).then(s).catch(t(this,d)[d](i,e))}}function p(e){return/^(https?:|)\/\//.test(e)?e:`${this.hostname}/${e}`}function h(e,n){return r=>{var o;return null!=(o=r)&&o.isAuthError||(r=new i(`Could not ${e} ${t(this,c)[c](n)}`,{cause:r})),Promise.reject(r)}}return f.VERSION="2.2.2",f.defaultHeaders={Accept:"application/json","Content-Type":"application/json","Uppy-Versions":`@uppy/companion-client=${f.VERSION}`},ZE=f}var nC,rC,oC,iC,aC,sC,uC,lC,cC={};function dC(){if(nC)return cC;return nC=1,Object.defineProperty(cC,"__esModule",{value:!0}),cC.getItem=function(e){return Promise.resolve(localStorage.getItem(e))},cC.removeItem=function(e){return new Promise((t=>{localStorage.removeItem(e),t()}))},cC.setItem=function(e,t){return new Promise((n=>{localStorage.setItem(e,t),n()}))},cC}function fC(){if(lC)return QE;lC=1,Object.defineProperty(QE,"__esModule",{value:!0}),QE.Socket=QE.SearchProvider=QE.RequestClient=QE.Provider=void 0;const e=tC();QE.RequestClient=e;const t=function(){if(oC)return rC;oC=1;var e=dC();const t=tC();return rC=class extends t{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId,this.tokenKey=`companion-${this.pluginId}-auth-token`,this.companionKeysParams=this.opts.companionKeysParams,this.preAuthToken=null}headers(){return Promise.all([super.headers(),this.getAuthToken()]).then((e=>{let[t,n]=e;const r={};return n&&(r["uppy-auth-token"]=n),this.companionKeysParams&&(r["uppy-credentials-params"]=btoa(JSON.stringify({params:this.companionKeysParams}))),{...t,...r}}))}onReceiveResponse(e){e=super.onReceiveResponse(e);const t=this.uppy.getPlugin(this.pluginId),n=t.getPluginState().authenticated?401!==e.status:e.status<400;return t.setPluginState({authenticated:n}),e}setAuthToken(e){return this.uppy.getPlugin(this.pluginId).storage.setItem(this.tokenKey,e)}getAuthToken(){return this.uppy.getPlugin(this.pluginId).storage.getItem(this.tokenKey)}async ensurePreAuth(){if(this.companionKeysParams&&!this.preAuthToken&&(await this.fetchPreAuthToken(),!this.preAuthToken))throw new Error("Could not load authentication data required for third-party login. Please try again later.")}authUrl(e){void 0===e&&(e={});const t=new URLSearchParams(e);return this.preAuthToken&&t.set("uppyPreAuthToken",this.preAuthToken),`${this.hostname}/${this.id}/connect?${t}`}fileUrl(e){return`${this.hostname}/${this.id}/get/${e}`}async fetchPreAuthToken(){if(this.companionKeysParams)try{const e=await this.post(`${this.id}/preauth/`,{params:this.companionKeysParams});this.preAuthToken=e.token}catch(e){this.uppy.log(`[CompanionClient] unable to fetch preAuthToken ${e}`,"warning")}}list(e){return this.get(`${this.id}/list/${e||""}`)}logout(){return this.get(`${this.id}/logout`).then((e=>Promise.all([e,this.uppy.getPlugin(this.pluginId).storage.removeItem(this.tokenKey)]))).then((e=>{let[t]=e;return t}))}static initPlugin(t,n,r){if(t.type="acquirer",t.files=[],r&&(t.opts={...r,...n}),n.serverUrl||n.serverPattern)throw new Error("`serverUrl` and `serverPattern` have been renamed to `companionUrl` and `companionAllowedHosts` respectively in the 0.30.5 release. Please consult the docs (for example, https://uppy.io/docs/instagram/ for the Instagram plugin) and use the updated options.`");if(n.companionAllowedHosts){const e=n.companionAllowedHosts;if(!("string"==typeof e||Array.isArray(e)||e instanceof RegExp))throw new TypeError(`${t.id}: the option "companionAllowedHosts" must be one of string, Array, RegExp`);t.opts.companionAllowedHosts=e}else/^(?!https?:\/\/).*$/i.test(n.companionUrl)?t.opts.companionAllowedHosts=`https://${n.companionUrl.replace(/^\/\//,"")}`:t.opts.companionAllowedHosts=new URL(n.companionUrl).origin;t.storage=t.opts.storage||e}},rC}();QE.Provider=t;const n=function(){if(aC)return iC;aC=1;const e=tC();return iC=class extends e{constructor(e,t){super(e,t),this.provider=t.provider,this.id=this.provider,this.name=this.opts.name||this.id.split("-").map((e=>e.charAt(0).toUpperCase()+e.slice(1))).join(" "),this.pluginId=this.opts.pluginId}fileUrl(e){return`${this.hostname}/search/${this.id}/get/${e}`}search(e,t){return this.get(`search/${this.id}/list?q=${encodeURIComponent(e)}${t?`&${t}`:""}`)}},iC}();QE.SearchProvider=n;const r=function(){if(uC)return sC;let e,t;function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}uC=1;var r=0;function o(e){return"__private_"+r+++"_"+e}const i=Lb();var a=o("queued"),s=o("emitter"),u=o("isOpen"),l=o("socket"),c=o("handleMessage");return e=Symbol.for("uppy test: getSocket"),t=Symbol.for("uppy test: getQueued"),sC=class{constructor(e){Object.defineProperty(this,a,{writable:!0,value:[]}),Object.defineProperty(this,s,{writable:!0,value:i()}),Object.defineProperty(this,u,{writable:!0,value:!1}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,c,{writable:!0,value:e=>{try{const t=JSON.parse(e.data);this.emit(t.action,t.payload)}catch(e){console.log(e)}}}),this.opts=e,e&&!1===e.autoOpen||this.open()}get isOpen(){return n(this,u)[u]}[e](){return n(this,l)[l]}[t](){return n(this,a)[a]}open(){n(this,l)[l]=new WebSocket(this.opts.target),n(this,l)[l].onopen=()=>{for(n(this,u)[u]=!0;n(this,a)[a].length>0&&n(this,u)[u];){const e=n(this,a)[a].shift();this.send(e.action,e.payload)}},n(this,l)[l].onclose=()=>{n(this,u)[u]=!1},n(this,l)[l].onmessage=n(this,c)[c]}close(){var e;null==(e=n(this,l)[l])||e.close()}send(e,t){n(this,u)[u]?n(this,l)[l].send(JSON.stringify({action:e,payload:t})):n(this,a)[a].push({action:e,payload:t})}on(e,t){n(this,s)[s].on(e,t)}emit(e,t){n(this,s)[s].emit(e,t)}once(e,t){n(this,s)[s].once(e,t)}},sC}();return QE.Socket=r,QE}var pC,hC,gC,vC,mC,yC,bC,EC,CC,DC,wC,AC,SC,xC,OC,TC,NC,BC={};function kC(){if(pC)return BC;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}pC=1,Object.defineProperty(BC,"__esModule",{value:!0}),BC.internalRateLimitedQueue=BC.RateLimitedQueue=void 0;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("activeRequests"),o=n("queuedHandlers"),i=n("paused"),a=n("pauseTimer"),s=n("downLimit"),u=n("upperLimit"),l=n("rateLimitingTimer"),c=n("call"),d=n("queueNext"),f=n("next"),p=n("queue"),h=n("dequeue"),g=n("resume"),v=n("increaseLimit");function m(t){e(this,r)[r]+=1;let n,o=!1;try{n=t()}catch(t){throw e(this,r)[r]-=1,t}return{abort:()=>{o||(o=!0,e(this,r)[r]-=1,n(),e(this,d)[d]())},done:()=>{o||(o=!0,e(this,r)[r]-=1,e(this,d)[d]())}}}function y(){queueMicrotask((()=>e(this,f)[f]()))}function b(){if(e(this,i)[i]||e(this,r)[r]>=this.limit)return;if(0===e(this,o)[o].length)return;const t=e(this,o)[o].shift(),n=e(this,c)[c](t.fn);t.abort=n.abort,t.done=n.done}function E(t,n){void 0===n&&(n={});const r={fn:t,priority:n.priority||0,abort:()=>{e(this,h)[h](r)},done:()=>{throw new Error("Cannot mark a queued request as done: this indicates a bug")}},i=e(this,o)[o].findIndex((e=>r.priority>e.priority));return-1===i?e(this,o)[o].push(r):e(this,o)[o].splice(i,0,r),r}function C(t){const n=e(this,o)[o].indexOf(t);-1!==n&&e(this,o)[o].splice(n,1)}BC.RateLimitedQueue=class{constructor(t){Object.defineProperty(this,h,{value:C}),Object.defineProperty(this,p,{value:E}),Object.defineProperty(this,f,{value:b}),Object.defineProperty(this,d,{value:y}),Object.defineProperty(this,c,{value:m}),Object.defineProperty(this,r,{writable:!0,value:0}),Object.defineProperty(this,o,{writable:!0,value:[]}),Object.defineProperty(this,i,{writable:!0,value:!1}),Object.defineProperty(this,a,{writable:!0,value:void 0}),Object.defineProperty(this,s,{writable:!0,value:1}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,g,{writable:!0,value:()=>this.resume()}),Object.defineProperty(this,v,{writable:!0,value:()=>{if(e(this,i)[i])e(this,l)[l]=setTimeout(e(this,v)[v],0);else{e(this,s)[s]=this.limit,this.limit=Math.ceil((e(this,u)[u]+e(this,s)[s])/2);for(let t=e(this,s)[s];t<=this.limit;t++)e(this,d)[d]();e(this,u)[u]-e(this,s)[s]>3?e(this,l)[l]=setTimeout(e(this,v)[v],2e3):e(this,s)[s]=Math.floor(e(this,s)[s]/2)}}}),this.limit="number"!=typeof t||0===t?1/0:t}run(t,n){return!e(this,i)[i]&&e(this,r)[r]<this.limit?e(this,c)[c](t):e(this,p)[p](t,n)}wrapPromiseFunction(e,t){var n=this;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];let a;const s=new Promise(((r,i)=>{a=n.run((()=>{let t,n;try{n=Promise.resolve(e(...o))}catch(e){n=Promise.reject(e)}return n.then((e=>{t?i(t):(a.done(),r(e))}),(e=>{t?i(t):(a.done(),i(e))})),()=>{t=new Error("Cancelled")}}),t)}));return s.abort=()=>{a.abort()},s}}resume(){e(this,i)[i]=!1,clearTimeout(e(this,a)[a]);for(let t=0;t<this.limit;t++)e(this,d)[d]()}pause(t){void 0===t&&(t=null),e(this,i)[i]=!0,clearTimeout(e(this,a)[a]),null!=t&&(e(this,a)[a]=setTimeout(e(this,g)[g],t))}rateLimit(t){clearTimeout(e(this,l)[l]),this.pause(t),this.limit>1&&Number.isFinite(this.limit)&&(e(this,u)[u]=this.limit-1,this.limit=e(this,s)[s],e(this,l)[l]=setTimeout(e(this,v)[v],t))}get isPaused(){return e(this,i)[i]}};const D=Symbol("__queue");return BC.internalRateLimitedQueue=D,BC}function FC(){return OC?xC:(OC=1,xC={strings:{timedOut:"Upload stalled for %{seconds} seconds, aborting."}})}var PC=function(){if(NC)return TC;NC=1;var e=$E(),t=fC(),n=kC();const r=LE(),o=function(){if(gC)return hC;gC=1;const e=Gm();return hC=e((function(e,t,n){const{progress:r,bytesUploaded:o,bytesTotal:i}=t;r&&(e.uppy.log(`Upload progress: ${r}`),e.uppy.emit("upload-progress",n,{uploader:e,bytesUploaded:o,bytesTotal:i}))}),300,{leading:!0,trailing:!0})}(),i=mC?vC:(mC=1,vC=function(e){const t=/^(?:https?:\/\/|\/\/)?(?:[^@\n]+@)?(?:www\.)?([^\n]+)/i.exec(e)[1];return`${/^http:\/\//i.test(e)?"ws":"wss"}://${t}`}),a=bC?yC:(bC=1,yC=function(e){const t=[],n=[];function r(e){t.push(e)}function o(e){n.push(e)}return Promise.all(e.map((e=>e.then(r,o)))).then((()=>({successful:t,failed:n})))}),s=function(){if(CC)return EC;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}CC=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("emitter"),o=n("events");return EC=class{constructor(t){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:[]}),e(this,r)[r]=t}on(t,n){return e(this,o)[o].push([t,n]),e(this,r)[r].on(t,n)}remove(){for(const[t,n]of e(this,o)[o].splice(0))e(this,r)[r].off(t,n)}}}(),u=function(){if(wC)return DC;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}wC=1;var t=0;function n(e){return"__private_"+t+++"_"+e}var r=n("aliveTimer"),o=n("isDone"),i=n("onTimedOut"),a=n("timeout");return DC=class{constructor(t,n){Object.defineProperty(this,r,{writable:!0,value:void 0}),Object.defineProperty(this,o,{writable:!0,value:!1}),Object.defineProperty(this,i,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),e(this,a)[a]=t,e(this,i)[i]=n}progress(){e(this,o)[o]||e(this,a)[a]>0&&(clearTimeout(e(this,r)[r]),e(this,r)[r]=setTimeout(e(this,i)[i],e(this,a)[a]))}done(){e(this,o)[o]||(clearTimeout(e(this,r)[r]),e(this,r)[r]=null,e(this,o)[o]=!0)}}}(),l=eC(),c=SC?AC:(SC=1,AC=function(e){return!!e&&(0!==e.readyState&&4!==e.readyState||0===e.status)}),d=FC();function f(e,t){let n=t;return n||(n=new Error("Upload error")),"string"==typeof n&&(n=new Error(n)),n instanceof Error||(n=Object.assign(new Error("Upload error"),{data:n})),c(e)?(n=new l(n,e),n):(n.request=e,n)}function p(e){return e.data.slice(0,e.data.size,e.meta.type)}class h extends r{constructor(e,t){super(e,t),this.type="uploader",this.id=this.opts.id||"XHRUpload",this.title="XHRUpload",this.defaultLocale=d;const r={formData:!0,fieldName:t.bundle?"files[]":"file",method:"post",metaFields:null,responseUrlFieldName:"url",bundle:!1,headers:{},timeout:3e4,limit:5,withCredentials:!1,responseType:"",getResponseData(t){let n={};try{n=JSON.parse(t)}catch(t){e.log(t)}return n},getResponseError(e,t){let n=new Error("Upload error");return c(t)&&(n=new l(n,t)),n},validateStatus:e=>e>=200&&e<300};if(this.opts={...r,...t},this.i18nInit(),this.handleUpload=this.handleUpload.bind(this),n.internalRateLimitedQueue in this.opts?this.requests=this.opts[n.internalRateLimitedQueue]:this.requests=new n.RateLimitedQueue(this.opts.limit),this.opts.bundle&&!this.opts.formData)throw new Error("`opts.formData` must be true when `opts.bundle` is enabled.");this.uploaderEvents=Object.create(null)}getOptions(e){const t=this.uppy.getState().xhrUpload,{headers:n}=this.opts,r={...this.opts,...t||{},...e.xhrUpload||{},headers:{}};return"function"==typeof n?r.headers=n(e):Object.assign(r.headers,this.opts.headers),t&&Object.assign(r.headers,t.headers),e.xhrUpload&&Object.assign(r.headers,e.xhrUpload.headers),r}addMetadata(e,t,n){(Array.isArray(n.metaFields)?n.metaFields:Object.keys(t)).forEach((n=>{e.append(n,t[n])}))}createFormDataUpload(e,t){const n=new FormData;this.addMetadata(n,e.meta,t);const r=p(e);return e.name?n.append(t.fieldName,r,e.meta.name):n.append(t.fieldName,r),n}createBundledUpload(e,t){const n=new FormData,{meta:r}=this.uppy.getState();return this.addMetadata(n,r,t),e.forEach((e=>{const t=this.getOptions(e),r=p(e);e.name?n.append(t.fieldName,r,e.name):n.append(t.fieldName,r)})),n}upload(t,n,r){const o=this.getOptions(t);return this.uppy.log(`uploading ${n} of ${r}`),new Promise(((n,r)=>{this.uppy.emit("upload-started",t);const i=o.formData?this.createFormDataUpload(t,o):t.data,a=new XMLHttpRequest;let l;this.uploaderEvents[t.id]=new s(this.uppy);const c=new u(o.timeout,(()=>{a.abort(),l.done();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(o.timeout/1e3)}));this.uppy.emit("upload-error",t,e),r(e)})),d=(0,e.nanoid)();a.upload.addEventListener("loadstart",(()=>{this.uppy.log(`[XHRUpload] ${d} started`)})),a.upload.addEventListener("progress",(e=>{this.uppy.log(`[XHRUpload] ${d} progress: ${e.loaded} / ${e.total}`),c.progress(),e.lengthComputable&&this.uppy.emit("upload-progress",t,{uploader:this,bytesUploaded:e.loaded,bytesTotal:e.total})})),a.addEventListener("load",(()=>{if(this.uppy.log(`[XHRUpload] ${d} finished`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null),o.validateStatus(a.status,a.responseText,a)){const e=o.getResponseData(a.responseText,a),r=e[o.responseUrlFieldName],i={status:a.status,body:e,uploadURL:r};return this.uppy.emit("upload-success",t,i),r&&this.uppy.log(`Download ${t.name} from ${r}`),n(t)}const e=o.getResponseData(a.responseText,a),i=f(a,o.getResponseError(a.responseText,a)),s={status:a.status,body:e};return this.uppy.emit("upload-error",t,i,s),r(i)})),a.addEventListener("error",(()=>{this.uppy.log(`[XHRUpload] ${d} errored`),c.done(),l.done(),this.uploaderEvents[t.id]&&(this.uploaderEvents[t.id].remove(),this.uploaderEvents[t.id]=null);const e=f(a,o.getResponseError(a.responseText,a));return this.uppy.emit("upload-error",t,e),r(e)})),a.open(o.method.toUpperCase(),o.endpoint,!0),a.withCredentials=o.withCredentials,""!==o.responseType&&(a.responseType=o.responseType),l=this.requests.run((()=>{this.uppy.emit("upload-started",t);const e=this.getOptions(t);return Object.keys(e.headers).forEach((t=>{a.setRequestHeader(t,e.headers[t])})),a.send(i),()=>{c.done(),a.abort()}})),this.onFileRemove(t.id,(()=>{l.abort(),r(new Error("File removed"))})),this.onCancelAll(t.id,(e=>{let{reason:t}=e;"user"===t&&l.abort(),r(new Error("Upload cancelled"))}))}))}uploadRemote(e){const n=this.getOptions(e);return new Promise(((r,a)=>{this.uppy.emit("upload-started",e);const u={};(Array.isArray(n.metaFields)?n.metaFields:Object.keys(e.meta)).forEach((t=>{u[t]=e.meta[t]}));new(e.remote.providerOptions.provider?t.Provider:t.RequestClient)(this.uppy,e.remote.providerOptions).post(e.remote.url,{...e.remote.body,endpoint:n.endpoint,size:e.data.size,fieldname:n.fieldName,metadata:u,httpMethod:n.method,useFormData:n.formData,headers:n.headers}).then((u=>{const{token:l}=u,c=i(e.remote.companionUrl),d=new t.Socket({target:`${c}/api/${l}`,autoOpen:!1});let f;this.uploaderEvents[e.id]=new s(this.uppy),this.onFileRemove(e.id,(()=>{d.send("cancel",{}),f.abort(),r(`upload ${e.id} was removed`)})),this.onCancelAll(e.id,(function(t){let{reason:n}=void 0===t?{}:t;"user"===n&&(d.send("cancel",{}),f.abort()),r(`upload ${e.id} was canceled`)})),this.onRetry(e.id,(()=>{d.send("pause",{}),d.send("resume",{})})),this.onRetryAll(e.id,(()=>{d.send("pause",{}),d.send("resume",{})})),d.on("progress",(t=>o(this,t,e))),d.on("success",(t=>{const o=n.getResponseData(t.response.responseText,t.response),i=o[n.responseUrlFieldName],a={status:t.response.status,body:o,uploadURL:i};return this.uppy.emit("upload-success",e,a),f.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),r()})),d.on("error",(t=>{const r=t.response,o=r?n.getResponseError(r.responseText,r):Object.assign(new Error(t.error.message),{cause:t.error});this.uppy.emit("upload-error",e,o),f.done(),this.uploaderEvents[e.id]&&(this.uploaderEvents[e.id].remove(),this.uploaderEvents[e.id]=null),a(o)})),f=this.requests.run((()=>(d.open(),e.isPaused&&d.send("pause",{}),()=>d.close())))})).catch((t=>{this.uppy.emit("upload-error",e,t),a(t)}))}))}uploadBundle(e){return new Promise(((t,n)=>{const{endpoint:r}=this.opts,{method:o}=this.opts,i=this.uppy.getState().xhrUpload,a=this.createBundledUpload(e,{...this.opts,...i||{}}),s=new XMLHttpRequest,l=t=>{e.forEach((e=>{this.uppy.emit("upload-error",e,t)}))},c=new u(this.opts.timeout,(()=>{s.abort();const e=new Error(this.i18n("timedOut",{seconds:Math.ceil(this.opts.timeout/1e3)}));l(e),n(e)}));s.upload.addEventListener("loadstart",(()=>{this.uppy.log("[XHRUpload] started uploading bundle"),c.progress()})),s.upload.addEventListener("progress",(t=>{c.progress(),t.lengthComputable&&e.forEach((e=>{this.uppy.emit("upload-progress",e,{uploader:this,bytesUploaded:t.loaded/t.total*e.size,bytesTotal:e.size})}))})),s.addEventListener("load",(r=>{if(c.done(),this.opts.validateStatus(r.target.status,s.responseText,s)){const n=this.opts.getResponseData(s.responseText,s),o={status:r.target.status,body:n};return e.forEach((e=>{this.uppy.emit("upload-success",e,o)})),t()}const o=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return o.request=s,l(o),n(o)})),s.addEventListener("error",(()=>{c.done();const e=this.opts.getResponseError(s.responseText,s)||new Error("Upload error");return l(e),n(e)})),this.uppy.on("cancel-all",(function(e){let{reason:t}=void 0===e?{}:e;"user"===t&&(c.done(),s.abort())})),s.open(o.toUpperCase(),r,!0),s.withCredentials=this.opts.withCredentials,""!==this.opts.responseType&&(s.responseType=this.opts.responseType),Object.keys(this.opts.headers).forEach((e=>{s.setRequestHeader(e,this.opts.headers[e])})),s.send(a),e.forEach((e=>{this.uppy.emit("upload-started",e)}))}))}uploadFiles(e){const t=e.map(((t,n)=>{const r=parseInt(n,10)+1,o=e.length;return t.error?Promise.reject(new Error(t.error)):t.isRemote?this.uploadRemote(t,r,o):this.upload(t,r,o)}));return a(t)}onFileRemove(e,t){this.uploaderEvents[e].on("file-removed",(n=>{e===n.id&&t(n.id)}))}onRetry(e,t){this.uploaderEvents[e].on("upload-retry",(n=>{e===n&&t()}))}onRetryAll(e,t){this.uploaderEvents[e].on("retry-all",(()=>{this.uppy.getFile(e)&&t()}))}onCancelAll(e,t){var n=this;this.uploaderEvents[e].on("cancel-all",(function(){n.uppy.getFile(e)&&t(...arguments)}))}handleUpload(e){if(0===e.length)return this.uppy.log("[XHRUpload] No files to upload!"),Promise.resolve();0!==this.opts.limit||this.opts[n.internalRateLimitedQueue]||this.uppy.log("[XHRUpload] When uploading multiple files at once, consider setting the `limit` option (to `10` for example), to limit the number of concurrent uploads, which helps prevent memory and network issues: https://uppy.io/docs/xhr-upload/#limit-0","warning"),this.uppy.log("[XHRUpload] Uploading...");const t=e.map((e=>this.uppy.getFile(e)));if(this.opts.bundle){if(t.some((e=>e.isRemote)))throw new Error("Can’t upload remote files when the `bundle: true` option is set");if("function"==typeof this.opts.headers)throw new TypeError("`headers` may not be a function when the `bundle: true` option is set");return this.uploadBundle(t)}return this.uploadFiles(t).then((()=>null))}install(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!1}})}this.uppy.addUploader(this.handleUpload)}uninstall(){if(this.opts.bundle){const{capabilities:e}=this.uppy.getState();this.uppy.setState({capabilities:{...e,individualCancellation:!0}})}this.uppy.removeUploader(this.handleUpload)}}return h.VERSION="2.1.3",TC=h}(),IC=E(PC);function RC(e){var t=e.server,n=void 0===t?"":t,r=e.fieldName,o=void 0===r?"":r,i=e.maxFileSize,a=void 0===i?10485760:i,s=e.maxNumberOfFiles,u=void 0===s?100:s,l=e.meta,c=void 0===l?{}:l,d=e.metaWithUrl,f=void 0!==d&&d,p=e.headers,h=void 0===p?{}:p,g=e.withCredentials,v=void 0!==g&&g,m=e.timeout,y=void 0===m?1e4:m,b=e.onBeforeUpload,E=void 0===b?function(e){return e}:b,C=e.onSuccess,D=void 0===C?function(e,t){}:C,w=e.onError,A=void 0===w?function(e,t,n){console.error("".concat(e.name," upload error"),t,n)}:w,S=e.onProgress,x=void 0===S?function(e){}:S;if(!n)throw new Error("Cannot get upload server address\n没有配置上传地址");if(!o)throw new Error("Cannot get fieldName\n没有配置 fieldName");var O=n;f&&(O=function(e,t){var n=vp(e.split("#"),2),r=n[0],o=n[1],i=[];xp(t,(function(e,t){i.push("".concat(t,"=").concat(e))}));var a=i.join("&");return r=r.indexOf("?")>0?"".concat(r,"&").concat(a):"".concat(r,"?").concat(a),o?"".concat(r,"#").concat(o):r}(O,c));var T=new zE({onBeforeUpload:E,restrictions:{maxFileSize:a,maxNumberOfFiles:u},meta:c}).use(IC,{endpoint:O,headers:h,formData:!0,fieldName:o,bundle:!0,withCredentials:v,timeout:y});return T.on("upload-success",(function(e,t){var n=t.body,r=void 0===n?{}:n;try{D(e,r)}catch(e){console.error("wangEditor upload file - onSuccess error",e)}T.removeFile(e.id)})),T.on("progress",(function(e){e<1||x(e)})),T.on("upload-error",(function(e,t,n){try{A(e,t,n)}catch(e){console.error("wangEditor upload file - onError error",e)}T.removeFile(e.id)})),T.on("restriction-failed",(function(e,t){try{A(e,t)}catch(e){console.error("wangEditor upload file - onError error",e)}T.removeFile(e.id)})),T}Em("en",{editor:{more:"More",justify:"Justify",indent:"Indent",image:"Image",video:"Video"}}),Em("zh-CN",{editor:{more:"更多",justify:"对齐",indent:"缩进",image:"图片",video:"视频"}});var LC,_C,MC,jC,HC,zC,$C,UC,VC,WC,GC,qC,KC,YC,XC,ZC={};function JC(){if(_C)return LC;_C=1;var e=S();return LC=Array.isArray||function(t){return"Array"===e(t)}}function QC(){if(jC)return MC;jC=1;var e=A(),t=D(),n=ye(),r=kr(),o=$t(),i=xn(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return f.sham=!0,MC=!s||t((function(){var e;return d(d.call)||!d(Object)||!d((function(){e=!0}))||e}))?f:d}function eD(){if(zC)return HC;zC=1;var e=JC(),t=QC(),n=be(),r=me()("species"),o=Array;return HC=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},HC}function tD(){if(UC)return $C;UC=1;var e=eD();return $C=function(t,n){return new(e(t))(0===n?0:n)}}function nD(){if(qC)return GC;qC=1;var e=D();return GC=function(t,n){var r=[][t];return!!r&&e((function(){r.call(null,n||function(){return 1},1)}))}}function rD(){if(YC)return KC;YC=1;var e=function(){if(WC)return VC;WC=1;var e=$o(),t=A(),n=x(),r=de(),o=Qt(),i=tD(),a=t([].push),s=function(t){var s=1===t,u=2===t,l=3===t,c=4===t,d=6===t,f=7===t,p=5===t||d;return function(h,g,v,m){for(var y,b,E=r(h),C=n(E),D=o(C),w=e(g,v),A=0,S=m||i,x=s?S(h,D):u||f?S(h,0):void 0;D>A;A++)if((p||A in C)&&(b=w(y=C[A],A,E),t))if(s)x[A]=b;else if(b)switch(t){case 3:return!0;case 5:return y;case 6:return A;case 2:a(x,y)}else switch(t){case 4:return!1;case 7:a(x,y)}return d?-1:l||c?c:x}};return VC={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)}}().forEach,t=nD()("forEach");return KC=t?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},KC}!function(){if(XC)return ZC;XC=1;var e=B(),t=ai(),n=si(),r=rD(),o=cn(),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)}();Em("en",{common:{ok:"OK",delete:"Delete",enter:"Enter"},blockQuote:{title:"Quote"},codeBlock:{title:"Code block"},color:{color:"Font color",bgColor:"Back color",default:"Default color",clear:"Clear back color"},divider:{title:"Divider"},emotion:{title:"Emotion"},fontSize:{title:"Font size",default:"Default"},fontFamily:{title:"Font family",default:"Default"},fullScreen:{title:"Full screen",cancelTitle:"Cancel full screen"},header:{title:"Header",text:"Text"},image:{netImage:"Net image",delete:"Delete image",edit:"Edit image",editSize:"Edit size",viewLink:"View link",src:"Image src",desc:"Description",link:"Image link",ok:"Ok",width:"Width",height:"Height"},indent:{decrease:"Decrease",increase:"Increase"},justify:{left:"Left",right:"Right",center:"Center",justify:"Justify"},lineHeight:{title:"Line height",default:"Default"},link:{insert:"Insert link",text:"Link text",url:"Link source",unLink:"Unlink",edit:"Edit link",view:"View link"},textStyle:{bold:"Bold",clear:"Clear styles",code:"Inline code",italic:"Italic",sub:"Sub",sup:"Sup",through:"Through",underline:"Underline"},undo:{undo:"undo",redo:"Redo"},todo:{todo:"Todo"},formatPainter:{title:"Format Painter"}}),Em("zh-CN",{common:{ok:"确定",delete:"删除",enter:"回车"},blockQuote:{title:"引用"},codeBlock:{title:"代码块"},color:{color:"文字颜色",bgColor:"背景色",default:"默认颜色",clear:"清除背景色"},divider:{title:"分割线"},emotion:{title:"表情"},fontSize:{title:"字号",default:"默认字号"},fontFamily:{title:"字体",default:"默认字体"},fullScreen:{title:"全屏",cancelTitle:"取消全屏"},header:{title:"标题",text:"正文"},image:{netImage:"网络图片",delete:"删除图片",edit:"编辑图片",editSize:"修改尺寸",viewLink:"查看链接",src:"图片地址",desc:"图片描述",link:"图片链接",ok:"确定",width:"宽度",height:"高度"},indent:{decrease:"减少缩进",increase:"增加缩进"},justify:{left:"左对齐",right:"右对齐",center:"居中对齐",justify:"两端对齐"},lineHeight:{title:"行高",default:"默认行高"},link:{insert:"插入链接",text:"链接文本",url:"链接地址",unLink:"取消链接",edit:"修改链接",view:"查看链接"},textStyle:{bold:"粗体",clear:"清除格式",code:"行内代码",italic:"斜体",sub:"下标",sup:"上标",through:"删除线",underline:"下划线"},undo:{undo:"撤销",redo:"重做"},todo:{todo:"待办"},formatPainter:{title:"格式刷"}});var oD={type:"blockquote",elemToHtml:function(e,t){return"<blockquote>".concat(t,"</blockquote>")}},iD='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',aD='<svg viewBox="0 0 1024 1024"><path d="M924.402464 1023.068211H0.679665V99.345412h461.861399v98.909208H99.596867v725.896389h725.896389V561.206811h98.909208z" p-id="10909"></path><path d="M930.805104 22.977336l69.965436 69.965436-453.492405 453.492404-69.965435-69.901489z" p-id="10910"></path><path d="M1022.464381 304.030081h-98.917201V99.345412H709.230573V0.428211h313.233808z"></path></svg>',sD='<svg viewBox="0 0 1024 1024"><path d="M133.705143 335.433143V133.851429h201.581714a29.622857 29.622857 0 0 0 29.622857-29.549715V68.754286a29.622857 29.622857 0 0 0-29.622857-29.622857H61.732571A22.893714 22.893714 0 0 0 38.765714 62.025143V335.725714c0 16.310857 13.238857 29.622857 29.622857 29.622857h35.547429a29.842286 29.842286 0 0 0 29.696-29.842285zM690.980571 133.851429h201.581715v201.654857c0 16.310857 13.238857 29.549714 29.622857 29.549714h35.547428a29.622857 29.622857 0 0 0 29.549715-29.549714V61.952a22.893714 22.893714 0 0 0-22.820572-22.893714h-273.554285a29.622857 29.622857 0 0 0-29.549715 29.622857v35.547428c0 16.310857 13.238857 29.696 29.622857 29.696zM335.286857 892.781714H133.705143V691.2a29.622857 29.622857 0 0 0-29.622857-29.622857H68.534857a29.622857 29.622857 0 0 0-29.549714 29.622857v273.554286c0 12.653714 10.24 22.893714 22.820571 22.893714h273.554286a29.622857 29.622857 0 0 0 29.696-29.622857v-35.547429a29.769143 29.769143 0 0 0-29.769143-29.696z m557.348572-201.581714v201.581714H690.907429a29.622857 29.622857 0 0 0-29.622858 29.622857v35.547429c0 16.310857 13.238857 29.622857 29.622858 29.622857h273.554285c12.580571 0 22.893714-10.313143 22.893715-22.893714V691.2a29.622857 29.622857 0 0 0-29.622858-29.622857h-35.547428a29.622857 29.622857 0 0 0-29.696 29.622857z"></path></svg>',uD=function(){function e(){this.title=Dm("blockQuote.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M894.6 907.1H605.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C752.7 180.4 711.3 315.8 711.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z m-472 0H133.4c-32.6 0-59-26.4-59-59V608.2l-4-14.9c0-315.9 125.5-485.1 376.5-507.5v59.8C280.7 180.4 239.3 315.8 239.3 442.4v41.2l31.5 12.3h151.8c32.6 0 59 26.4 59 59v293.2c0 32.5-26.4 59-59 59z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!sg.getSelectedNodeByType(e,"blockquote")},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=vp(ap.Editor.nodes(e,{match:function(e){var t=sg.getNodeType(e);return"paragraph"===t||"blockquote"===t},universal:!0,mode:"highest"}),1);return!t[0]},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.isActive(e)?"paragraph":"blockquote";ap.Transforms.setNodes(e,{type:n},{mode:"highest"})}},e}(),lD={key:"blockquote",factory:function(){return new uD}};function cD(e){return 0===dh("<div>".concat(e,"</div>")).children().filter((function(e){return"BR"!==e.tagName})).length}function dD(e){return 0===e.length?"":e[0].outerHTML}function fD(e){return e.length?e[0].tagName.toLowerCase():""}function pD(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}function hD(e){e.deleteBackward("character");ap.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}ch.css&&(dh.fn.css=ch.css),ch.append&&(dh.fn.append=ch.append),ch.prepend&&(dh.fn.prepend=ch.prepend),ch.addClass&&(dh.fn.addClass=ch.addClass),ch.removeClass&&(dh.fn.removeClass=ch.removeClass),ch.hasClass&&(dh.fn.hasClass=ch.hasClass),ch.on&&(dh.fn.on=ch.on),ch.off&&(dh.fn.off=ch.off),ch.focus&&(dh.fn.focus=ch.focus),ch.attr&&(dh.fn.attr=ch.attr),ch.removeAttr&&(dh.fn.removeAttr=ch.removeAttr),ch.hide&&(dh.fn.hide=ch.hide),ch.show&&(dh.fn.show=ch.show),ch.parents&&(dh.fn.parents=ch.parents),ch.dataset&&(dh.fn.dataset=ch.dataset),ch.val&&(dh.fn.val=ch.val),ch.text&&(dh.fn.text=ch.text),ch.html&&(dh.fn.html=ch.html),ch.children&&(dh.fn.children=ch.children),ch.remove&&(dh.fn.remove=ch.remove),ch.find&&(dh.fn.find=ch.find),ch.width&&(dh.fn.width=ch.width),ch.height&&(dh.fn.height=ch.height),ch.filter&&(dh.fn.filter=ch.filter),ch.empty&&(dh.fn.empty=ch.empty);var gD={renderElems:[{type:"blockquote",renderElem:function(e,t,n){return Dy.jsx("blockquote",null,t)}}],elemsToHtml:[oD],parseElemsHtml:[{selector:"blockquote:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=dh(e);return 0===(t=t.filter((function(e){return!!ap.Text.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"blockquote",children:t}}}],menus:[lD],editorPlugin:function(e){var t=e.insertBreak,n=e.insertText,r=e;return r.insertBreak=function(){var o=r.selection;if(null==o)return t();var i=vp(ap.Editor.nodes(e,{match:function(e){return sg.checkNodeType(e,"blockquote")},universal:!0}),1),a=i[0];if(!a)return t();var s=a[0];if(sg.getParentNode(e,s)){var u=sg.findPath(e,s),l=ap.Editor.end(e,u);if(ap.Point.equals(l,o.focus)){var c=ap.Node.string(s);if(c&&"\n"===c.slice(-1))return void hD(r)}n("\n")}else hD(r)},r}};var vD={type:"code",elemToHtml:function(e,t){return"<code>".concat(t,"</code>")}};var mD={type:"pre",elemToHtml:function(e,t){return"<pre>".concat(t,"</pre>")}},yD=function(){function e(){this.title=Dm("codeBlock.title"),this.iconSvg='<svg viewBox="0 0 1280 1024"><path d="M832 736l96 96 320-320L928 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224zM701.312 150.528l69.472 18.944-192 704.032-69.472-18.944 192-704.032z"></path></svg>',this.tag="button"}return e.prototype.getSelectCodeElem=function(e){var t=sg.getSelectedNodeByType(e,"code");if(null==t)return null;var n=sg.getParentNode(e,t);return null==n||"pre"!==sg.getNodeType(n)?null:t},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);return null==t?"":t.language||""},e.prototype.isActive=function(e){return!!this.getSelectCodeElem(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=sg.getSelectedElems(e);return!!t.some((function(t){return e.isVoid(t)}))||!t.some((function(e){var t=sg.getNodeType(e);return"pre"===t||"paragraph"===t}))},e.prototype.exec=function(e,t){this.isActive(e)?this.changeToPlainText(e):this.changeToCodeBlock(e,t.toString())},e.prototype.changeToPlainText=function(e){var t=this.getSelectCodeElem(e);if(null!=t){var n=ap.Node.string(t);ap.Transforms.removeNodes(e,{mode:"highest"});var r=n.split("\n").map((function(e){return{type:"paragraph",children:[{text:e}]}}));ap.Transforms.insertNodes(e,r,{mode:"highest"})}},e.prototype.changeToCodeBlock=function(e,t){var n,r,o=[],i=ap.Editor.nodes(e,{match:function(t){return e.children.includes(t)},universal:!0});try{for(var a=gp(i),s=a.next();!s.done;s=a.next()){var u=vp(s.value,1)[0];u&&o.push(ap.Node.string(u))}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}ap.Transforms.removeNodes(e,{mode:"highest"});var l={type:"pre",children:[{type:"code",language:t,children:[{text:o.join("\n")}]}]};ap.Transforms.insertNodes(e,l,{mode:"highest"})},e}();var bD={menus:[{key:"codeBlock",factory:function(){return new yD}}],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData,o=e;return o.insertBreak=function(){var e=sg.getSelectedNodeByType(o,"code");if(null!=e){var n=function(e,t){var n=t.selection;if(null==n)return"";var r=ap.Node.string(e),o=n.anchor.offset,i=r.slice(0,o).split("\n"),a=i.length;return 0===a?"":i[a-1]}(e,o);if(n){var r=n.match(/^\s+/);if(null!=r&&null!=r[0]){var i=r[0];return void o.insertText("\n".concat(i))}}o.insertText("\n")}else t()},o.normalizeNode=function(e){var t=vp(e,2),r=t[0],i=t[1],a=sg.getNodeType(r);("code"===a&&i.length<=1&&ap.Transforms.setNodes(o,{type:"paragraph"},{at:i}),"pre"===a)&&(sg.isLastNode(o,r)&&ap.Transforms.insertNodes(o,sg.genEmptyParagraph(),{at:[i[0]+1]}),"code"!==sg.getNodeType(r.children[0])&&(ap.Transforms.unwrapNodes(o),ap.Transforms.setNodes(o,{type:"paragraph"},{mode:"highest"})));return n([r,i])},o.insertData=function(e){if(null!=sg.getSelectedNodeByType(o,"code")){var t=e.getData("text/plain");ap.Editor.insertText(o,t)}else r(e)},o},renderElems:[{type:"pre",renderElem:function(e,t,n){return Dy.jsx("pre",null,t)}},{type:"code",renderElem:function(e,t,n){return Dy.jsx("code",null,t)}}],elemsToHtml:[vD,mD],preParseHtml:[{selector:"pre>code",preParseHtml:function(e){var t=dh(e);if("code"!==fD(t))return e;var n=t.find("xmp");if(0===n.length)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:"pre:not([data-w-e-type])>code",parseElemHtml:function(e,t,n){return{type:"code",language:"",children:[{text:dh(e)[0].textContent||""}]}}},{selector:"pre:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=dh(e);return 0===(t=t.filter((function(e){return"code"===sg.getNodeType(e)}))).length&&(t=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:t.filter((function(e){return"code"===sg.getNodeType(e)}))}}}]},ED=function(){function e(){this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){var t=this.mark,n=ap.Editor.marks(e);return n&&n[t]?n[t]:""},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=vp(ap.Editor.nodes(e,{match:function(t){return"pre"===sg.getNodeType(t)||!!ap.Editor.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){var t=this.mark;if(null==this.$content){var n=dh('<ul class="w-e-panel-content-color"></ul>');n.on("click","li",(function(n){var r=n.target;if(null!=r&&(n.preventDefault(),null!=e.selection)){var o=dh(r).attr("data-value");"0"===o?ap.Editor.removeMark(e,t):ap.Editor.addMark(e,t,o)}})),this.$content=n}var r=this.$content;if(null==r)return document.createElement("ul");r.empty();var o=this.getValue(e),i=e.getMenuConfig(t).colors;(void 0===i?[]:i).forEach((function(e){var t=dh('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=dh('<li data-value="'.concat(e,'"></li>'));o===e&&n.addClass("active"),n.append(t),r.append(n)}));var a="";"color"===t&&(a=Dm("color.default")),"bgColor"===t&&(a=Dm("color.clear"));var s=dh('\n <li data-value="0" class="clear">\n '.concat('<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>',"\n ").concat(a,"\n </li>\n "));return r.prepend(s),r[0]},e}(),CD=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=Dm("color.bgColor"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M510.030769 315.076923l84.676923 196.923077h-177.230769l76.8-196.923077h15.753846zM945.230769 157.538462v708.923076c0 43.323077-35.446154 78.769231-78.769231 78.769231H157.538462c-43.323077 0-78.769231-35.446154-78.769231-78.769231V157.538462c0-43.323077 35.446154-78.769231 78.769231-78.769231h708.923076c43.323077 0 78.769231 35.446154 78.769231 78.769231z m-108.307692 643.938461L600.615385 216.615385c-5.907692-11.815385-15.753846-19.692308-29.538462-19.692308h-139.815385c-11.815385 0-23.630769 7.876923-27.56923 19.692308l-216.615385 584.861538c-3.938462 11.815385 3.938462 25.6 17.723077 25.6h80.738462c11.815385 0 23.630769-9.846154 27.56923-21.661538l63.015385-175.261539h263.876923l68.923077 175.261539c3.938462 11.815385 15.753846 21.661538 27.569231 21.661538h80.738461c13.784615 0 23.630769-13.784615 19.692308-25.6z"></path></svg>',t.mark="bgColor",t}return dp(t,e),t}(ED),DD=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=Dm("color.color"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 864h896v96H64zM360.58 576h302.85l81.53 224h102.16L579.24 64H444.77L176.89 800h102.16l81.53-224zM512 159.96L628.49 480H395.52L512 159.96z"></path></svg>',t.mark="color",t}return dp(t,e),t}(ED),wD=["rgb(0, 0, 0)","rgb(38, 38, 38)","rgb(89, 89, 89)","rgb(140, 140, 140)","rgb(191, 191, 191)","rgb(217, 217, 217)","rgb(233, 233, 233)","rgb(245, 245, 245)","rgb(250, 250, 250)","rgb(255, 255, 255)","rgb(225, 60, 57)","rgb(231, 95, 51)","rgb(235, 144, 58)","rgb(245, 219, 77)","rgb(114, 192, 64)","rgb(89, 191, 192)","rgb(66, 144, 247)","rgb(54, 88, 226)","rgb(106, 57, 201)","rgb(216, 68, 147)","rgb(251, 233, 230)","rgb(252, 237, 225)","rgb(252, 239, 212)","rgb(252, 251, 207)","rgb(231, 246, 213)","rgb(218, 244, 240)","rgb(217, 237, 250)","rgb(224, 232, 250)","rgb(237, 225, 248)","rgb(246, 226, 234)","rgb(255, 163, 158)","rgb(255, 187, 150)","rgb(255, 213, 145)","rgb(255, 251, 143)","rgb(183, 235, 143)","rgb(135, 232, 222)","rgb(145, 213, 255)","rgb(173, 198, 255)","rgb(211, 173, 247)","rgb(255, 173, 210)","rgb(255, 77, 79)","rgb(255, 122, 69)","rgb(255, 169, 64)","rgb(255, 236, 61)","rgb(115, 209, 61)","rgb(54, 207, 201)","rgb(64, 169, 255)","rgb(89, 126, 247)","rgb(146, 84, 222)","rgb(247, 89, 171)","rgb(207, 19, 34)","rgb(212, 56, 13)","rgb(212, 107, 8)","rgb(212, 177, 6)","rgb(56, 158, 13)","rgb(8, 151, 156)","rgb(9, 109, 217)","rgb(29, 57, 196)","rgb(83, 29, 171)","rgb(196, 29, 127)","rgb(130, 0, 20)","rgb(135, 20, 0)","rgb(135, 56, 0)","rgb(97, 71, 0)","rgb(19, 82, 0)","rgb(0, 71, 79)","rgb(0, 58, 140)","rgb(6, 17, 120)","rgb(34, 7, 94)","rgb(120, 6, 80)"];var AD={selector:"font",preParseHtml:function(e){var t=dh(e);if("font"!==fD(t))return e;var n=t.attr("color")||"";return n&&(t.removeAttr("color"),t.css("color",n)),t[0]}};function SD(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var xD={renderStyle:function(e,t){var n=e,r=n.color,o=n.bgColor,i=t;return r&&SD(i,{color:r}),o&&SD(i,{backgroundColor:o}),i},styleToHtml:function(e,t){if(!ap.Text.isText(e))return t;var n,r=e,o=r.color,i=r.bgColor;return o||i?((cD(t)||"span"!==fD(n=dh(t)))&&(n=dh("<span>".concat(t,"</span>"))),o&&n.css("color",o),i&&n.css("background-color",i),dD(n)):t},preParseHtml:[AD],parseStyleHtml:function(e,t,n){var r=dh(e);if(!ap.Text.isText(t))return t;var o=t,i=pD(r,"color");i&&(o.color=i);var a=pD(r,"background-color");return a||(a=pD(r,"background")),a&&(o.bgColor=a),o},menus:[{key:"color",factory:function(){return new DD},config:{colors:wD}},{key:"bgColor",factory:function(){return new CD},config:{colors:wD}}]},OD=function(){function e(){this.title=Dm("common.enter"),this.iconSvg='<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||!!ap.Range.isExpanded(t)},e.prototype.exec=function(e,t){var n=e.selection;if(null!=n){var r=[n.anchor.path[0]];ap.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{at:r}),e.select(ap.Editor.start(e,r))}},e}(),TD={menus:[{key:"enter",factory:function(){return new OD}}]};var ND={type:"divider",elemToHtml:function(e,t){return"<hr/>"}},BD=function(){function e(){this.title=Dm("divider.title"),this.iconSvg='<svg viewBox="0 0 1092 1024"><path d="M0 51.2m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M819.2 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M409.6 460.8m51.2 0l170.666667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-170.666667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path><path d="M0 870.4m51.2 0l989.866667 0q51.2 0 51.2 51.2l0 0q0 51.2-51.2 51.2l-989.866667 0q-51.2 0-51.2-51.2l0 0q0-51.2 51.2-51.2Z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!sg.getSelectedElems(e).some((function(t){if(e.isVoid(t))return!0;var n=sg.getNodeType(t);return"table"===n||"pre"===n}))},e.prototype.exec=function(e,t){sg.isSelectedEmptyParagraph(e)&&ap.Transforms.removeNodes(e,{mode:"highest"}),ap.Transforms.insertNodes(e,{type:"divider",children:[{text:""}]},{mode:"highest"})},e}();var kD={renderElems:[{type:"divider",renderElem:function(e,t,n){var r=sg.isNodeSelected(n,e);return Dy.h("div",{props:{contentEditable:!1,className:"w-e-textarea-divider"},dataset:{selected:r?"true":""},style:{},on:{mousedown:function(e){return e.preventDefault()}}},[Dy.h("hr")])}}],elemsToHtml:[ND],parseElemsHtml:[{selector:"hr:not([data-w-e-type])",parseElemHtml:function(e,t,n){return{type:"divider",children:[{text:""}]}}}],menus:[{key:"divider",factory:function(){return new BD}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"divider"===e.type||t(e)},r.normalizeNode=function(e){var t=vp(e,2),o=t[0],i=t[1];if("divider"!==sg.getNodeType(o))return n([o,i]);sg.isLastNode(r,o)&&ap.Transforms.insertNodes(r,sg.genEmptyParagraph(),{at:[i[0]+1]})},r}};var FD=function(){function e(){this.title=Dm("emotion.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 1024C230.4 1024 0 793.6 0 512S230.4 0 512 0s512 230.4 512 512-230.4 512-512 512z m0-102.4c226.742857 0 409.6-182.857143 409.6-409.6S738.742857 102.4 512 102.4 102.4 285.257143 102.4 512s182.857143 409.6 409.6 409.6z m-204.8-358.4h409.6c0 113.371429-91.428571 204.8-204.8 204.8s-204.8-91.428571-204.8-204.8z m0-102.4c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8 76.8 32.914286 76.8 76.8-32.914286 76.8-76.8 76.8z m409.6 0c-43.885714 0-76.8-32.914286-76.8-76.8s32.914286-76.8 76.8-76.8c43.885714 0 76.8 32.914286 76.8 76.8s-32.914286 76.8-76.8 76.8z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.exec=function(e,t){},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=vp(ap.Editor.nodes(e,{match:function(t){return"pre"===sg.getNodeType(t)||!!ap.Editor.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.getPanelContentElem=function(e){if(null==this.$content){var t=dh('<ul class="w-e-panel-content-emotion"></ul>');t.on("click","li",(function(t){var n=t.target;if(null!=n){t.preventDefault();var r=dh(n).text();e.insertText(r)}})),this.$content=t}var n=this.$content;if(null==n)return document.createElement("ul");n.empty();var r=e.getMenuConfig("emotion").emotions;return(void 0===r?[]:r).forEach((function(e){var t=dh("<li>".concat(e,"</li>"));n.append(t)})),n[0]},e}(),PD={menus:[{key:"emotion",factory:function(){return new FD},config:{emotions:"😀 😃 😄 😁 😆 😅 😂 🤣 😊 😇 🙂 🙃 😉 😌 😍 😘 😗 😙 😚 😋 😛 😝 😜 🤓 😎 😏 😒 😞 😔 😟 😕 🙁 😣 😖 😫 😩 😢 😭 😤 😠 😡 😳 😱 😨 🤗 🤔 😶 😑 😬 🙄 😯 😴 😷 🤑 😈 🤡 💩 👻 💀 👀 👣 👐 🙌 👏 🤝 👍 👎 👊 ✊ 🤛 🤜 🤞 ✌️ 🤘 👌 👈 👉 👆 👇 ☝️ ✋ 🤚 🖐 🖖 👋 🤙 💪 🖕 ✍️ 🙏".split(" ")}}]};var ID=function(){function e(){this.tag="select",this.width=80}return e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.mark,n=ap.Editor.marks(e);return n&&n[t]?n[t]:""},e.prototype.isDisabled=function(e){if(null==e.selection)return!0;var t=vp(ap.Editor.nodes(e,{match:function(t){return"pre"===sg.getNodeType(t)||!!ap.Editor.isVoid(e,t)},universal:!0}),1);return!!t[0]},e.prototype.exec=function(e,t){var n=this.mark;t?e.addMark(n,t):e.removeMark(n)},e}(),RD=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=Dm("fontFamily.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M956.788364 152.110545h-24.110546l23.924364 9.029819 0.186182 121.018181h-65.070546l-86.574545-130.048H566.551273v650.14691l130.048 64.977454v65.163636h-390.050909v-65.163636l129.954909-64.977454V152.110545H198.283636L111.429818 282.065455H46.545455V69.259636C46.545455 33.792 82.664727 22.062545 98.955636 22.062545h812.683637c23.738182 0 45.056 15.173818 45.056 41.053091V169.425455v-17.221819z"></path></svg>',t.mark="fontFamily",t.selectPanelWidth=150,t}return dp(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontFamilyList,r=void 0===n?[]:n;t.push({text:Dm("fontFamily.default"),value:""}),r.forEach((function(e){if("string"==typeof e)t.push({text:e,value:e,styleForRenderMenuList:{"font-family":e}});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r,styleForRenderMenuList:{"font-family":r}})}}));var o=this.getValue(e);return t.forEach((function(e){e.value===o?e.selected=!0:delete e.selected})),t},t}(ID),LD=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=Dm("fontSize.title"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 512h384v128h-128V1024h-128V640h-128z m896-256H708.2496v768h-136.4992V256H320V128h640z"></path></svg>',t.mark="fontSize",t}return dp(t,e),t.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig(this.mark).fontSizeList,r=void 0===n?[]:n;t.push({text:Dm("fontSize.default"),value:""}),r.forEach((function(e){if("string"==typeof e)t.push({text:e,value:e});else if("object"==typeof e){var n=e.name,r=e.value;t.push({text:n,value:r})}}));var o=this.getValue(e);return t.forEach((function(e){e.value===o?e.selected=!0:delete e.selected})),t},t}(ID);var _D={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"};var MD={renderStyle:function(e,t){var n=e,r=n.fontSize,o=n.fontFamily,i=t;return r&&SD(i,{fontSize:r}),o&&SD(i,{fontFamily:o}),i},styleToHtml:function(e,t){if(!ap.Text.isText(e))return t;var n,r=e,o=r.fontSize,i=r.fontFamily;return o||i?((cD(t)||"span"!==fD(n=dh(t)))&&(n=dh("<span>".concat(t,"</span>"))),o&&n.css("font-size",o),i&&n.css("font-family",i),dD(n)):t},preParseHtml:[{selector:"font",preParseHtml:function(e){var t=dh(e);if("font"!==fD(t))return e;var n=t.attr("size")||"";n&&(t.removeAttr("size"),t.css("font-size",_D[n]));var r=t.attr("face")||"";return r&&(t.removeAttr("face"),t.css("font-family",r)),t[0]}}],parseStyleHtml:function(e,t,n){var r=dh(e);if(!ap.Text.isText(t))return t;var o=t,i=pD(r,"font-size");i&&(o.fontSize=i);var a=pD(r,"font-family").replace(/"/g,"");return a&&(o.fontFamily=a),o},menus:[{key:"fontSize",factory:function(){return new LD},config:{fontSizeList:["12px",{name:"13px",value:"13px"},"14px","15px","16px","19px",{name:"22px",value:"22px"},"24px","29px","32px","40px","48px"]}},{key:"fontFamily",factory:function(){return new RD},config:{fontFamilyList:["黑体",{name:"仿宋",value:"仿宋"},"楷体","标楷体","华文仿宋","华文楷体",{name:"宋体",value:"宋体"},"微软雅黑","Arial","Tahoma","Verdana","Times New Roman","Courier New"]}}]};var jD=function(){function e(){this.title=Dm("formatPainter.title"),this.iconSvg='<svg viewBox="0 0 24 24"><path d="M8 19.997v-5h2v5h9v-7H5v7zm-4-9h16v-3h-6v-4h-4v4H4zm-1 10v-8H2v-6a1 1 0 0 1 1-1h5v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v3h5a1 1 0 0 1 1 1v6h-1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(t){return e.attrs.isSelect},e.prototype.isDisabled=function(e){return!1},e.prototype.setFormatHtml=function(t){var n,r;if(t.getSelectionText().length){if(e.attrs.formatStyle){!function(e){var t=ap.Editor.marks(e);t&&Object.keys(t).forEach((function(t){e.removeMark(t)}))}(t);try{for(var o=gp(Object.entries(e.attrs.formatStyle)),i=o.next();!i.done;i=o.next()){var a=vp(i.value,2),s=a[0],u=a[1];t.addMark(s,u)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}e.attrs.formatStyle=null,e.attrs.isSelect=!1}},e.prototype.exec=function(t){e.attrs.isSelect?(e.attrs.isSelect=!1,e.attrs.formatStyle=null):t.getSelectionText().length&&(e.attrs.formatStyle=ap.Editor.marks(t),e.attrs.isSelect=!0);t.blur(),t.focus()},e.attrs={isSelect:!1,formatStyle:null},e}();var HD={menus:[{key:"formatPainter",factory:function(){return new jD}}],editorPlugin:function(e){var t=new jD,n=e.onChange,r=e,o=function(){t.setFormatHtml(r),document.removeEventListener("mouseup",o)};return r.onChange=function(){n(),jD.attrs.isSelect&&(document.removeEventListener("mouseup",o),document.addEventListener("mouseup",o))},r}},zD=function(){function e(){this.title=Dm("fullScreen.title"),this.iconSvg=sD,this.tag="button",this.alwaysEnable=!0}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return e.isFullScreen},e.prototype.isDisabled=function(e){return!1},e.prototype.getIcon=function(e){return e.isFullScreen?sD:'<svg t="1723361745825" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8705" width="200" height="200"><path d="M703.926857 362.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V128a42.642286 42.642286 0 1 1 85.357715 0v149.357714h149.357714c21.211429 0 38.765714 15.433143 42.057143 35.693715l0.585143 6.948571a42.642286 42.642286 0 0 1-42.642286 42.642286H703.926857zM703.926857 938.642286a42.642286 42.642286 0 0 1-42.642286-42.642286V704c0-23.552 19.090286-42.642286 42.642286-42.642286h192.073143a42.642286 42.642286 0 1 1 0 85.284572l-149.357714 0.073143v149.284571c0 21.211429-15.506286 38.765714-35.84 42.130286l-6.875429 0.512zM319.853714 938.642286a42.642286 42.642286 0 0 1-42.642285-42.642286v-149.284571H127.853714a42.642286 42.642286 0 0 1-42.130285-35.84l-0.585143-6.875429c0-23.552 19.163429-42.642286 42.715428-42.642286h192c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286zM127.853714 362.642286a42.642286 42.642286 0 1 1 0-85.284572H277.211429V128c0-21.211429 15.433143-38.765714 35.766857-42.130286l6.875428-0.512c23.552 0 42.715429 19.017143 42.715429 42.642286v192a42.642286 42.642286 0 0 1-42.715429 42.642286H127.853714z" fill="#333333" p-id="8706"></path></svg>'},e.prototype.getTitle=function(e){return e.isFullScreen?Dm("fullScreen.title"):Dm("fullScreen.cancelTitle")},e.prototype.exec=function(e,t){e.isFullScreen?e.unFullScreen():e.fullScreen()},e}(),$D={menus:[{key:"fullScreen",factory:function(){return new zD}}]};function UD(e){return function(t,n){return"<h".concat(e,">").concat(n,"</h").concat(e,">")}}var VD={type:"header1",elemToHtml:UD(1)},WD={type:"header2",elemToHtml:UD(2)},GD={type:"header3",elemToHtml:UD(3)},qD={type:"header4",elemToHtml:UD(4)},KD={type:"header5",elemToHtml:UD(5)},YD={type:"header6",elemToHtml:UD(6)};function XD(e){var t=vp(ap.Editor.nodes(e,{match:function(e){return sg.getNodeType(e).startsWith("header")},universal:!0}),1),n=t[0];if(null==n)return"paragraph";var r=vp(n,1)[0];return sg.getNodeType(r)}function ZD(e){if(null==e.selection)return!0;var t=vp(ap.Editor.nodes(e,{match:function(e){var t=sg.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1);return!t[0]}function JD(e,t){t&&ap.Transforms.setNodes(e,{type:t})}var QD=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return XD(e)},e.prototype.isActive=function(e){return this.getValue(e)===this.type},e.prototype.isDisabled=function(e){return ZD(e)},e.prototype.exec=function(e,t){var n=this.type;JD(e,t===n?"paragraph":n)},e}(),ew=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H1",t.type="header1",t}return dp(t,e),t}(QD),tw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H2",t.type="header2",t}return dp(t,e),t}(QD),nw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H3",t.type="header3",t}return dp(t,e),t}(QD),rw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H4",t.type="header4",t}return dp(t,e),t}(QD),ow=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H5",t.type="header5",t}return dp(t,e),t}(QD),iw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="H6",t.type="header6",t}return dp(t,e),t}(QD),aw=function(){function e(){this.title=Dm("header.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M960 960c-51.2 0-102.4-3.2-153.6-3.2-51.2 0-99.2 3.2-150.4 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 57.6-28.8 86.4-48 19.2-12.8 19.2-60.8 19.2-80v-224-19.2c-9.6-3.2-19.2-3.2-28.8-3.2H320c-9.6 0-19.2 0-28.8 3.2V780.8c0 22.4 0 80 22.4 92.8 28.8 19.2 96-6.4 96 44.8 0 16-9.6 41.6-28.8 41.6-54.4 0-105.6-3.2-160-3.2-48 0-96 3.2-147.2 3.2-19.2 0-28.8-22.4-28.8-38.4 0-51.2 51.2-28.8 80-48 19.2-12.8 19.2-60.8 19.2-83.2V294.4c0-28.8 3.2-115.2-22.4-131.2-25.6-16-86.4 9.6-86.4-41.6 0-16 6.4-41.6 28.8-41.6 51.2 0 105.6 3.2 156.8 3.2 48 0 96-3.2 144-3.2 19.2 0 28.8 22.4 28.8 41.6 0 48-57.6 25.6-83.2 41.6-19.2 12.8-19.2 73.6-19.2 92.8v201.6c6.4 3.2 16 3.2 22.4 3.2h400c6.4 0 12.8 0 22.4-3.2V256c0-22.4 0-80-19.2-92.8-28.8-16-86.4 6.4-86.4-41.6 0-16 9.6-41.6 28.8-41.6 51.2 0 99.2 3.2 150.4 3.2 48 0 99.2-3.2 147.2-3.2 19.2 0 28.8 22.4 28.8 41.6 0 51.2-57.6 25.6-86.4 41.6-19.2 12.8-19.2 70.4-19.2 92.8v537.6c0 19.2 0 67.2 19.2 80 28.8 19.2 89.6-6.4 89.6 44.8 0 19.2-6.4 41.6-28.8 41.6z"></path></svg>',this.tag="select",this.width=60}return e.prototype.getOptions=function(e){var t=[{value:"header1",text:"H1",styleForRenderMenuList:{"font-size":"32px","font-weight":"bold"}},{value:"header2",text:"H2",styleForRenderMenuList:{"font-size":"24px","font-weight":"bold"}},{value:"header3",text:"H3",styleForRenderMenuList:{"font-size":"18px","font-weight":"bold"}},{value:"header4",text:"H4",styleForRenderMenuList:{"font-size":"16px","font-weight":"bold"}},{value:"header5",text:"H5",styleForRenderMenuList:{"font-size":"13px","font-weight":"bold"}},{value:"header6",text:"H6",styleForRenderMenuList:{"font-size":"11px","font-weight":"bold"}},{value:"paragraph",text:Dm("header.text")}],n=this.getValue(e).toString();return t.forEach((function(e){e.value===n?e.selected=!0:delete e.selected})),t},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){return XD(e)},e.prototype.isDisabled=function(e){return ZD(e)},e.prototype.exec=function(e,t){JD(e,t.toString())},e}(),sw={key:"headerSelect",factory:function(){return new aw}},uw={key:"header1",factory:function(){return new ew}},lw={key:"header2",factory:function(){return new tw}},cw={key:"header3",factory:function(){return new nw}},dw={key:"header4",factory:function(){return new rw}},fw={key:"header5",factory:function(){return new ow}},pw={key:"header6",factory:function(){return new iw}};function hw(e){return function(t,n,r){var o=dh(t);return 0===(n=n.filter((function(e){return!!ap.Text.isText(e)||!!r.isInline(e)}))).length&&(n=[{text:o.text().replace(/\s+/gm," ")}]),{type:"header".concat(e),children:n}}}var gw={selector:"h1:not([data-w-e-type])",parseElemHtml:hw(1)},vw={selector:"h2:not([data-w-e-type])",parseElemHtml:hw(2)},mw={selector:"h3:not([data-w-e-type])",parseElemHtml:hw(3)},yw={selector:"h4:not([data-w-e-type])",parseElemHtml:hw(4)},bw={selector:"h5:not([data-w-e-type])",parseElemHtml:hw(5)},Ew={selector:"h6:not([data-w-e-type])",parseElemHtml:hw(6)};function Cw(e){return function(t,n,r){var o="h".concat(e);return Dy.jsx(o,null,n)}}var Dw={renderElems:[{type:"header1",renderElem:Cw(1)},{type:"header2",renderElem:Cw(2)},{type:"header3",renderElem:Cw(3)},{type:"header4",renderElem:Cw(4)},{type:"header5",renderElem:Cw(5)},{type:"header6",renderElem:Cw(6)}],elemsToHtml:[VD,WD,GD,qD,KD,YD],parseElemsHtml:[gw,vw,mw,yw,bw,Ew],menus:[sw,uw,lw,cw,dw,fw,pw],editorPlugin:function(e){var t=e.insertBreak,n=e;return n.insertBreak=function(){var r=vp(ap.Editor.nodes(n,{match:function(e){return sg.getNodeType(e).startsWith("header")},universal:!0}),1),o=r[0];if(o)if(sg.isSelectionAtLineEnd(e,o[1])){ap.Transforms.insertNodes(n,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}else t();else t()},n}};var ww={type:"image",elemToHtml:function(e,t){var n=e,r=n.src,o=n.alt,i=void 0===o?"":o,a=n.href,s=void 0===a?"":a,u=n.width,l=void 0===u?"":u,c=n.height,d=void 0===c?"":c,f=n.style,p=void 0===f?{}:f,h=p.width,g=void 0===h?"":h,v=p.height,m=void 0===v?"":v,y="";return g&&(y+="width: ".concat(g,";")),m&&(y+="height: ".concat(m,";")),'<img src="'.concat(r,'" alt="').concat(i,'" data-href="').concat(s,'" width="').concat(l,'" height="').concat(d,'" style="').concat(y,'"/>')}};var Aw=function(){function e(){this.title=Dm("image.delete"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==sg.getSelectedNodeByType(e,"image")},e.prototype.exec=function(e,t){this.isDisabled(e)||ap.Transforms.removeNodes(e,{match:function(e){return sg.checkNodeType(e,"image")}})},e}();function Sw(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(ph())}function xw(e){return e.replace(/</g,"<").replace(/>/g,">")}function Ow(e){var t=e.selection;if(null==t)return!0;if(!ap.Range.isCollapsed(t))return!0;var n=vp(ap.Editor.nodes(e,{match:function(t){var n=sg.getNodeType(t);return"code"===n||("pre"===n||("link"===n||("list-item"===n||(!!n.startsWith("header")||("blockquote"===n||!!ap.Editor.isVoid(e,t))))))},universal:!0}),1);return!!n[0]}function Tw(e,t,n){return pp(this,arguments,void 0,(function(e,t,n,r,o){var i,a;return void 0===r&&(r=""),void 0===o&&(o=""),hp(this,(function(s){switch(s.label){case 0:return(i=t.getMenuConfig(e).checkImage)?[4,i(n,r,o)]:[3,2];case 1:if("string"==typeof(a=s.sent()))return t.alert(a,"error"),[2,!1];if(null==a)return[2,!1];s.label=2;case 2:return[2,!0]}}))}))}function Nw(e,t,n){return pp(this,void 0,void 0,(function(){var r;return hp(this,(function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseImageSrc)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}}))}))}function Bw(e,t){return pp(this,arguments,void 0,(function(e,t,n,r){var o,i,a;return void 0===n&&(n=""),void 0===r&&(r=""),hp(this,(function(s){switch(s.label){case 0:return[4,Tw("insertImage",e,t,n,r)];case 1:return s.sent()?[4,Nw("insertImage",e,t)]:[2];case 2:return o=s.sent(),i={type:"image",src:xw(o),href:r,alt:n,style:{},children:[{text:""}]},null===e.selection&&e.restoreSelection(),sg.getSelectedNodeByType(e,"image")&&e.move(1),Ow(e)?[2]:(ap.Transforms.insertNodes(e,i),(a=e.getMenuConfig("insertImage").onInsertedImage)&&a(i),[2])}}))}))}function kw(){return Sw("w-e-edit-image")}var Fw=function(){function e(){this.title=Dm("image.edit"),this.iconSvg=iD,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=kw(),this.altInputId=kw(),this.hrefInputId=kw(),this.buttonId=kw()}return e.prototype.getValue=function(e){return""},e.prototype.getImageNode=function(e){return sg.getSelectedNodeByType(e,"image")},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==sg.getSelectedNodeByType(e,"image"))},e.prototype.getModalPositionNode=function(e){return this.getImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,s=this.getImageNode(e);if(null==s)throw new Error("Not found selected image node");var u=vp(Pm(Dm("image.src"),r),2),l=u[0],c=u[1],d=dh(c),f=vp(Pm(Dm("image.desc"),o),2),p=f[0],h=f[1],g=dh(h),v=vp(Pm(Dm("image.link"),i),2),m=v[0],y=v[1],b=dh(y),E=vp(Im(a,Dm("common.ok")),1)[0];if(null==this.$content){var C=dh("<div></div>");C.on("click","#".concat(a),(function(n){n.preventDefault();var a=C.find("#".concat(r)).val(),s=C.find("#".concat(o)).val(),u=C.find("#".concat(i)).val();t.updateImage(e,a,s,u),e.hidePanelOrModal()})),this.$content=C}var D=this.$content;D.empty(),D.append(l),D.append(p),D.append(m),D.append(E);var w=s,A=w.src,S=w.alt,x=void 0===S?"":S,O=w.href,T=void 0===O?"":O;return d.val(A),g.val(x),b.val(T),setTimeout((function(){d.focus()})),D[0]},e.prototype.updateImage=function(e,t,n,r,o){void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),t&&(e.restoreSelection(),this.isDisabled(e)||function(e,t){pp(this,arguments,void 0,(function(e,t,n,r,o){var i,a,s,u,l,c;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o={}),hp(this,(function(d){switch(d.label){case 0:return[4,Tw("editImage",e,t,n,r)];case 1:return d.sent()?[4,Nw("editImage",e,t)]:[2];case 2:return i=d.sent(),null==(a=sg.getSelectedNodeByType(e,"image"))||(s=a.style,u={src:i,alt:n,href:r,style:fp(fp({},void 0===s?{}:s),o)},ap.Transforms.setNodes(e,u,{match:function(e){return sg.checkNodeType(e,"image")}}),l=sg.getSelectedNodeByType(e,"image"),(c=e.getMenuConfig("editImage").onUpdatedImage)&&c(l)),[2]}}))}))}(e,t,n,r,o))},e}();function Pw(){return Sw("w-e-insert-image")}var Iw=function(){function e(){this.title=Dm("image.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=Pw(),this.heightInputId=Pw(),this.buttonId=Pw()}return e.prototype.getSelectedImageNode=function(e){return sg.getSelectedNodeByType(e,"image")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedImageNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedImageNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=vp(Pm(Dm("image.width"),n,"auto"),2),a=i[0],s=i[1],u=dh(s),l=vp(Pm(Dm("image.height"),r,"auto"),2),c=l[0],d=l[1],f=dh(d),p=vp(Im(o,Dm("image.ok")),1)[0],h=this.getSelectedImageNode(e);if(null==this.$content){var g=dh("<div></div>");g.on("click","#".concat(o),(function(t){t.preventDefault();var o=g.find("#".concat(n)).val().trim(),i=g.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u=function(e){return/^\d+(\.\d+)?px$/.test(e)},l="auto",c="auto";a(o)?l=o:s(o)?l="".concat(parseInt(o,10),"px"):u(o)&&(l=o),a(i)?c=i:s(i)?c="".concat(parseInt(i,10),"px"):u(i)&&(c=i);var d=h.style,f=void 0===d?{}:d;e.restoreSelection();var p=fp(fp({},f),{style:{width:l,height:c}});ap.Transforms.setNodes(e,p,{match:function(e){return sg.checkNodeType(e,"image")}}),e.hidePanelOrModal()})),this.$content=g}var v=this.$content;if(v.empty(),v.append(a),v.append(c),v.append(p),null==h)return v[0];var m=h.style,y=void 0===m?{}:m,b=y.width,E=void 0===b?"auto":b,C=y.height,D=void 0===C?"auto":C;return u.val(E),f.val(D),setTimeout((function(){u.focus()})),v[0]},e}();function Rw(){return Sw("w-e-insert-image")}var Lw=function(){function e(){this.title=Dm("image.netImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=Rw(),this.altInputId=Rw(),this.hrefInputId=Rw(),this.buttonId=Rw()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return Ow(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.altInputId,i=n.hrefInputId,a=n.buttonId,s=vp(Pm(Dm("image.src"),r),2),u=s[0],l=s[1],c=dh(l),d=vp(Pm(Dm("image.desc"),o),2),f=d[0],p=d[1],h=dh(p),g=vp(Pm(Dm("image.link"),i),2),v=g[0],m=g[1],y=dh(m),b=vp(Im(a,Dm("common.ok")),1)[0];if(null==this.$content){var E=dh("<div></div>");E.on("click","#".concat(a),(function(n){n.preventDefault();var a=E.find("#".concat(r)).val().trim(),s=E.find("#".concat(o)).val().trim(),u=E.find("#".concat(i)).val().trim();t.insertImage(e,a,s,u),e.hidePanelOrModal()})),this.$content=E}var C=this.$content;return C.empty(),C.append(u),C.append(f),C.append(v),C.append(b),c.val(""),h.val(""),y.val(""),setTimeout((function(){c.focus()})),C[0]},e.prototype.insertImage=function(e,t,n,r){void 0===n&&(n=""),void 0===r&&(r=""),t&&(e.restoreSelection(),this.isDisabled(e)||Bw(e,t,n,r))},e}(),_w=function(){function e(){this.title=Dm("image.viewLink"),this.iconSvg=aD,this.tag="button"}return e.prototype.getValue=function(e){var t=sg.getSelectedNodeByType(e,"image");return t&&t.href||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!this.getValue(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View image link failed, image.href is '".concat(t,"'"));window.open(t,"_blank")}},e}(),Mw=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.getSelectedNode=function(e){return sg.getSelectedNodeByType(e,"image")},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedNode(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=this.getSelectedNode(e);if(null!=n){var r=sg.getHoverbar(e);r&&r.hideAndClean();var o=n.style,i={style:fp(fp({},void 0===o?{}:o),{width:this.value,height:""})};ap.Transforms.setNodes(e,i,{match:function(e){return sg.checkNodeType(e,"image")}})}}},e}(),jw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="30%",t.value="30%",t}return dp(t,e),t}(Mw),Hw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="50%",t.value="50%",t}return dp(t,e),t}(Mw),zw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title="100%",t.value="100%",t}return dp(t,e),t}(Mw),$w={onInsertedImage:function(e){},onUpdatedImage:function(e){},checkImage:function(e,t,n){return!0},parseImageSrc:function(e){return e}};function Uw(e,t){var n=sg.findKey(e,t).id;return"w-e-image-container-".concat(n)}function Vw(e,t,n,r){var o=dh("body"),i=Uw(e,t),a=r.width,s=r.height,u=0,l=0,c=0,d=0,f=!1,p=null;var h=qm((function(e){e.preventDefault();var t=e.clientX,n=l+(f?u-t:t-u),r=c*(n/l);n>d-6||null!=p&&(n<=15||r<=15||(p.css("width","".concat(n,"px")),p.css("height","".concat(r,"px"))))}),100);function g(n){if(o.off("mousemove",h),null!=p){var r=p.width().toFixed(2),i=p.height().toFixed(2),a={style:fp(fp({},t.style),{width:"".concat(r,"px"),height:"".concat(i,"px")})};ap.Transforms.setNodes(e,a,{at:sg.findPath(e,t)}),o.off("mouseup",g)}}function v(t,n){p=function(){var e=dh("#".concat(i));if(0===e.length)throw new Error("Cannot find image container elem");return e}(),u=t,d=n;var r=p.find("img");if(0===r.length)throw new Error("Cannot find image elem");l=r.width(),c=r.height(),o.on("mousemove",h),o.on("mouseup",g);var a=sg.getHoverbar(e);a&&a.hideAndClean()}var m={};return a&&(m.width=a),s&&(m.height=s),m.boxShadow="0 0 0 1px #B4D5FF",Dy.jsx("div",{id:i,style:m,className:"w-e-image-container w-e-selected-image-container",on:{mousedown:function(n){var r=dh(n.target);if(r.hasClass("w-e-image-dragger")){n.preventDefault(),(r.hasClass("left-top")||r.hasClass("left-bottom"))&&(f=!0);var o=sg.getParentNode(e,t);if(null!=o){var i=sg.toDOMNode(e,o),a=i.getBoundingClientRect?i.getBoundingClientRect():{width:0},s=window.getComputedStyle(i),u=parseFloat(s.paddingLeft),l=parseFloat(s.paddingRight),c=parseFloat(s.borderLeftWidth),d=parseFloat(s.borderRightWidth);v(n.clientX,a.width-u-l-c-d)}}}}},n,Dy.jsx("div",{className:"w-e-image-dragger left-top"}),Dy.jsx("div",{className:"w-e-image-dragger right-top"}),Dy.jsx("div",{className:"w-e-image-dragger left-bottom"}),Dy.jsx("div",{className:"w-e-image-dragger right-bottom"}))}var Ww={type:"image",renderElem:function(e,t,n){var r=e,o=r.src,i=r.alt,a=void 0===i?"":i,s=r.href,u=void 0===s?"":s,l=r.style,c=void 0===l?{}:l,d=c.width,f=void 0===d?"":d,p=c.height,h=void 0===p?"":p,g=sg.isNodeSelected(n,e),v={maxWidth:"100%"};f&&(v.width="100%"),h&&(v.height="100%");var m=Dy.jsx("img",{style:v,src:o,alt:a,"data-href":u}),y=n.isDisabled();return g&&!y?Vw(n,e,m,{width:f,height:h}):function(e,t,n,r){var o=r.width,i=r.height,a={};o&&(a.width=o),i&&(a.height=i);var s=Uw(e,t);return Dy.jsx("div",{id:s,style:a,className:"w-e-image-container"},n)}(n,e,m,{width:f,height:h})}},Gw={renderElems:[Ww],elemsToHtml:[ww],parseElemsHtml:[{selector:"img:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=dh(e),o=r.attr("data-href")||"";return o=decodeURIComponent(o),{type:"image",src:r.attr("src")||"",alt:r.attr("alt")||"",href:o,style:{width:pD(r,"width"),height:pD(r,"height")},width:r.attr("width")||"",height:r.attr("height")||"",children:[{text:""}]}}}],menus:[{key:"insertImage",factory:function(){return new Lw},config:$w},{key:"deleteImage",factory:function(){return new Aw}},{key:"editImage",factory:function(){return new Fw},config:$w},{key:"viewImageLink",factory:function(){return new _w}},{key:"imageWidth30",factory:function(){return new jw}},{key:"imageWidth50",factory:function(){return new Hw}},{key:"imageWidth100",factory:function(){return new zw}},{key:"editorImageSizeMenu",factory:function(){return new Iw}}],editorPlugin:function(e){var t=e.isInline,n=e.isVoid,r=e;return r.isInline=function(e){return"image"===e.type||t(e)},r.isVoid=function(e){return"image"===e.type||n(e)},r}},qw=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){var t=vp(ap.Editor.nodes(e,{match:function(e){return!!e.indent},universal:!0}),1),n=t[0];return null==n?"":vp(n,1)[0].indent||""},e.prototype.isActive=function(e){return!1},e.prototype.getMatchNode=function(e){var t=vp(ap.Editor.nodes(e,{match:function(e){var t=sg.getNodeType(e);return"paragraph"===t||!!t.startsWith("header")},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e}(),Kw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=Dm("indent.decrease"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m256-512v384l-256-192z"></path></svg>',t}return dp(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!t.indent},t.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{indent:null},{match:function(e){return ap.Element.isElement(e)}})},t}(qw),Yw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=Dm("indent.increase"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',t.DEFAULT_INDENT_VALUE="2em",t}return dp(t,e),t.prototype.isDisabled=function(e){var t=this.getMatchNode(e);return null==t||!!t.indent},t.prototype.getIndentValue=function(e){var t=this.getMatchNode(e);if(!t)return this.DEFAULT_INDENT_VALUE;var n=t.children.filter(ap.Text.isText)[0];if(!n||!n.fontSize)return this.DEFAULT_INDENT_VALUE;var r=n.fontSize,o=parseInt(n.fontSize,10),i=r.replace("".concat(o),"");return"".concat(2*o).concat(i)},t.prototype.exec=function(e,t){var n=this.getIndentValue(e);ap.Transforms.setNodes(e,{indent:n},{match:function(e){return ap.Element.isElement(e)},mode:"highest"})},t}(qw);var Xw={renderStyle:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.indent,r=t;return n&&SD(r,{textIndent:n}),r},styleToHtml:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.indent;if(!n)return t;var r=dh(t);return r.css("text-indent",n),dD(r)},preParseHtml:[{selector:"p,h1,h2,h3,h4,h5",preParseHtml:function(e){var t=dh(e),n=pD(t,"padding-left");return/\dem/.test(n)&&t.css("text-indent","2em"),/\dpx/.test(n)&&parseInt(n,10)%32==0&&t.css("text-indent","2em"),t[0]}}],parseStyleHtml:function(e,t,n){var r=dh(e);if(!ap.Element.isElement(t))return t;var o=t,i=pD(r,"text-indent"),a=parseInt(i,10);return i&&a>0&&(o.indent=i),o},menus:[{key:"indent",factory:function(){return new Yw}},{key:"delIndent",factory:function(){return new Kw}}]},Zw=function(){function e(){this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||!!sg.getSelectedElems(e).some((function(t){var n=t.type;return!(!ap.Editor.isVoid(e,t)||!ap.Editor.isBlock(e,t)||"video"===n)||!!["pre","code"].includes(n)}))},e}(),Jw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=Dm("justify.center"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return dp(t,e),t.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{textAlign:"center"},{match:function(t){return ap.Element.isElement(t)&&!e.isInline(t)}})},t}(Zw),Qw=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=Dm("justify.justify"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>',t}return dp(t,e),t.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{textAlign:"justify"},{match:function(t){return ap.Element.isElement(t)&&!e.isInline(t)}})},t}(Zw),eA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=Dm("justify.left"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return dp(t,e),t.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{textAlign:"left"},{match:function(t){return ap.Element.isElement(t)&&!e.isInline(t)}})},t}(Zw),tA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=Dm("justify.right"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',t}return dp(t,e),t.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{textAlign:"right"},{match:function(t){return ap.Element.isElement(t)&&!e.isInline(t)}})},t}(Zw);var nA={renderStyle:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.textAlign,r=t;return n&&SD(r,{textAlign:n}),r},styleToHtml:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.textAlign;if(!n)return t;var r=dh(t);return r.css("text-align",n),dD(r)},parseStyleHtml:function(e,t,n){var r=dh(e);if(!ap.Element.isElement(t))return t;var o=t,i=pD(r,"text-align");return i&&(o.textAlign=i),o},menus:[{key:"justifyLeft",factory:function(){return new eA}},{key:"justifyRight",factory:function(){return new tA}},{key:"justifyCenter",factory:function(){return new Jw}},{key:"justifyJustify",factory:function(){return new Qw}}]};var rA=function(){function e(){this.title=Dm("lineHeight.title"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M964 788a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526zM198.93 144.306c6.668-5.798 16.774-5.094 22.573 1.574l122.26 140.582a16 16 0 0 1 3.927 10.5c0 8.836-7.164 16-16 16h-61.8a8 8 0 0 0-8 8v390.077h69.819a16 16 0 0 1 10.502 3.928c6.666 5.8 7.37 15.906 1.57 22.573L221.476 878.123a16 16 0 0 1-1.57 1.57c-6.668 5.8-16.774 5.097-22.574-1.57L75.051 737.538a16 16 0 0 1-3.928-10.5c0-8.837 7.163-16 16-16h69.822V312.96H87.127a16 16 0 0 1-10.502-3.928c-6.666-5.8-7.37-15.906-1.57-22.573l122.303-140.582a16 16 0 0 1 1.572-1.572zM964 465a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z m0-323a8 8 0 0 1 8 8v98a8 8 0 0 1-8 8H438a8 8 0 0 1-8-8v-98a8 8 0 0 1 8-8h526z"></path></svg>',this.tag="select",this.width=80}return e.prototype.getOptions=function(e){var t=[],n=e.getMenuConfig("lineHeight").lineHeightList,r=void 0===n?[]:n;t.push({text:Dm("lineHeight.default"),value:""}),r.forEach((function(e){t.push({text:e,value:e})}));var o=this.getValue(e);return t.forEach((function(e){e.value===o?e.selected=!0:delete e.selected})),t},e.prototype.getMatchNode=function(e){var t=vp(ap.Editor.nodes(e,{match:function(e){var t=sg.getNodeType(e);return!!t.startsWith("header")||!!["paragraph","blockquote","list-item"].includes(t)},universal:!0,mode:"highest"}),1),n=t[0];return null==n?null:n[0]},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getMatchNode(e);return null==t?"":ap.Element.isElement(t)&&t.lineHeight||""},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getMatchNode(e)},e.prototype.exec=function(e,t){ap.Transforms.setNodes(e,{lineHeight:t.toString()},{mode:"highest"})},e}();var oA={renderStyle:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.lineHeight,r=t;return n&&SD(r,{lineHeight:n}),r},styleToHtml:function(e,t){if(!ap.Element.isElement(e))return t;var n=e.lineHeight;if(!n)return t;var r=dh(t);return r.css("line-height",n),dD(r)},parseStyleHtml:function(e,t,n){var r=dh(e);if(!ap.Element.isElement(t))return t;var o=t,i=n.getMenuConfig("lineHeight").lineHeightList,a=void 0===i?[]:i,s=pD(r,"line-height");return s&&a.includes(s)&&(o.lineHeight=s),o},menus:[{key:"lineHeight",factory:function(){return new rA},config:{lineHeightList:["1","1.15","1.5","2","2.5","3"]}}]};var iA={type:"link",elemToHtml:function(e,t){var n=e,r=n.url,o=n.target,i=void 0===o?"_blank":o;return'<a href="'.concat(r,'" target="').concat(i,'">').concat(t,"</a>")}};function aA(e,t,n,r){return pp(this,void 0,void 0,(function(){var o,i;return hp(this,(function(a){switch(a.label){case 0:return(o=t.getMenuConfig(e).checkLink)?[4,o(n,r)]:[3,2];case 1:if("string"==typeof(i=a.sent()))return t.alert(i,"error"),[2,!1];if(null==i)return[2,!1];a.label=2;case 2:return[2,!0]}}))}))}function sA(e,t,n){return pp(this,void 0,void 0,(function(){var r;return hp(this,(function(o){switch(o.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,o.sent()];case 2:return[2,n]}}))}))}function uA(e){return null==e.selection||!!sg.getSelectedElems(e).some((function(t){var n=t.type;return!!e.isVoid(t)||!!["pre","code","link"].includes(n)}))}function lA(e,t){return{type:"link",url:xw(e),children:t?[{text:t}]:[]}}function cA(e,t,n){return pp(this,void 0,void 0,(function(){var r,o,i,a,s;return hp(this,(function(u){switch(u.label){case 0:return n?(t||(t=n),e.restoreSelection(),uA(e)?[2]:[4,aA("insertLink",e,t,n)]):[2];case 1:return u.sent()?[4,sA("insertLink",e,n)]:[2];case 2:if(r=u.sent(),null==(o=e.selection))return[2];if(ap.Range.isCollapsed(o)){if((a=sg.getLeftLengthOfMaxLength(e))<=0)return[2];e.insertText(" "),a<t.length+1&&(t=t.slice(0,a-1)),s=lA(r,t),ap.Transforms.insertNodes(e,s),e.insertFragment([{text:" "}])}else if((i=ap.Editor.string(e,o))!==t){if((a=sg.getLeftLengthOfMaxLength(e))<=0)return[2];a<i.length-t.length&&(t=t.slice(0,a)),e.deleteFragment(),s=lA(r,t),ap.Transforms.insertNodes(e,s)}else s=lA(r),ap.Transforms.wrapNodes(e,s,{split:!0}),ap.Transforms.collapse(e,{edge:"end"});return[2]}}))}))}function dA(){return Sw("w-e-update-link")}var fA=function(){function e(){this.title=Dm("link.edit"),this.iconSvg=iD,this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.urlInputId=dA(),this.buttonId=dA()}return e.prototype.getSelectedLinkElem=function(e){var t=sg.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.getModalPositionNode=function(e){return sg.getSelectedNodeByType(e,"link")},e.prototype.getModalContentElem=function(e){var t=this.urlInputId,n=this.buttonId,r=vp(Pm(Dm("link.url"),t),2),o=r[0],i=r[1],a=dh(i),s=vp(Im(n,Dm("common.ok")),1)[0];if(null==this.$content){var u=dh("<div></div>");u.on("click","#".concat(n),(function(n){n.preventDefault(),e.restoreSelection();var r=sg.getSelectedNodeByType(e,"link"),o=r?ap.Node.string(r):"",i=u.find("#".concat(t)).val();!function(e,t,n){pp(this,void 0,void 0,(function(){var r,o;return hp(this,(function(i){switch(i.label){case 0:return n?[4,aA("editLink",e,t,n)]:[2];case 1:return i.sent()?[4,sA("editLink",e,n)]:[2];case 2:return r=i.sent(),o={url:xw(r)},ap.Transforms.setNodes(e,o,{match:function(e){return sg.checkNodeType(e,"link")}}),[2]}}))}))}(e,o,i),e.hidePanelOrModal()})),this.$content=u}var l=this.$content;l.empty(),l.append(o),l.append(s);var c=this.getValue(e);return a.val(c),setTimeout((function(){a.focus()})),l[0]},e}();function pA(){return Sw("w-e-insert-link")}var hA=function(){function e(){this.title=Dm("link.insert"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M440.224 635.776a51.84 51.84 0 0 1-36.768-15.232c-95.136-95.136-95.136-249.92 0-345.056l192-192C641.536 37.408 702.816 12.032 768 12.032s126.432 25.376 172.544 71.456c95.136 95.136 95.136 249.92 0 345.056l-87.776 87.776a51.968 51.968 0 1 1-73.536-73.536l87.776-87.776a140.16 140.16 0 0 0 0-197.984c-26.432-26.432-61.6-40.992-99.008-40.992s-72.544 14.56-99.008 40.992l-192 192a140.16 140.16 0 0 0 0 197.984 51.968 51.968 0 0 1-36.768 88.768z"></path><path d="M256 1012a242.4 242.4 0 0 1-172.544-71.456c-95.136-95.136-95.136-249.92 0-345.056l87.776-87.776a51.968 51.968 0 1 1 73.536 73.536l-87.776 87.776a140.16 140.16 0 0 0 0 197.984c26.432 26.432 61.6 40.992 99.008 40.992s72.544-14.56 99.008-40.992l192-192a140.16 140.16 0 0 0 0-197.984 51.968 51.968 0 1 1 73.536-73.536c95.136 95.136 95.136 249.92 0 345.056l-192 192A242.4 242.4 0 0 1 256 1012z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.textInputId=pA(),this.urlInputId=pA(),this.buttonId=pA()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return uA(e)},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=e.selection,n=this,r=n.textInputId,o=n.urlInputId,i=n.buttonId,a=vp(Pm(Dm("link.text"),r),2),s=a[0],u=a[1],l=dh(u),c=vp(Pm(Dm("link.url"),o),2),d=c[0],f=c[1],p=dh(f),h=vp(Im(i,Dm("common.ok")),1)[0];if(null==this.$content){var g=dh("<div></div>");g.on("click","#".concat(i),(function(t){t.preventDefault();var n=g.find("#".concat(r)).val(),i=g.find("#".concat(o)).val();cA(e,n,i),e.hidePanelOrModal()})),this.$content=g}var v=this.$content;if(v.empty(),v.append(s),v.append(d),v.append(h),null==t||ap.Range.isCollapsed(t))l.val("");else{var m=ap.Editor.string(e,t);l.val(m)}return p.val(""),setTimeout((function(){l.focus()})),v[0]},e}(),gA=function(){function e(){this.title=Dm("link.unLink"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M608.16328 811.815036c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.347563 89.347564c-118.525421 118.523421-311.38448 118.531421-429.919901 0-118.527421-118.529421-118.527421-311.39048 0-429.917901l89.349564-89.349563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.195613 79.195613c9.371954 9.371954 9.371954 24.56788 0 33.941834l-89.349563 89.347564c-56.143726 56.145726-56.143726 147.49928 0 203.645005 56.143726 56.143726 147.49928 56.145726 203.647005 0l89.347564-89.347563c9.371954-9.371954 24.56788-9.371954 33.941834 0l79.193613 79.195613z m-113.135447-520.429459c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.347564-89.347564c56.143726-56.149726 147.49928-56.145726 203.647006 0 56.143726 56.145726 56.143726 147.49928 0 203.645006l-89.349564 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.195613 79.195613c9.371954 9.371954 24.56788 9.371954 33.941834 0l89.349564-89.349563c118.529421-118.529421 118.529421-311.38848 0-429.917901-118.531421-118.527421-311.38848-118.527421-429.919901 0l-89.347563 89.347564c-9.371954 9.371954-9.371954 24.56788 0 33.941834l79.193613 79.195613z m469.653707 718.556492l45.253779-45.253779c18.745908-18.745908 18.745908-49.13776 0-67.881669L127.195629 14.062931c-18.745908-18.745908-49.13776-18.745908-67.881669 0L14.058181 59.31871c-18.745908 18.745908-18.745908 49.13776 0 67.881669l882.74169 882.74169c18.745908 18.743908 49.13776 18.743908 67.881669 0z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==sg.getSelectedNodeByType(e,"link")},e.prototype.exec=function(e,t){this.isDisabled(e)||ap.Transforms.unwrapNodes(e,{match:function(e){return sg.checkNodeType(e,"link")}})},e}(),vA=function(){function e(){this.title=Dm("link.view"),this.iconSvg=aD,this.tag="button"}return e.prototype.getSelectedLinkElem=function(e){var t=sg.getSelectedNodeByType(e,"link");return null==t?null:t},e.prototype.getValue=function(e){var t=this.getSelectedLinkElem(e);return t&&t.url||""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedLinkElem(e)},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){if(!t||"string"!=typeof t)throw new Error("View link failed, link url is '".concat(t,"'"));window.open(t,"_blank")}},e}(),mA={checkLink:function(e,t){return!0},parseLinkUrl:function(e){return e}},yA={key:"insertLink",factory:function(){return new hA},config:mA},bA={key:"editLink",factory:function(){return new fA},config:mA},EA={key:"unLink",factory:function(){return new gA}},CA={key:"viewLink",factory:function(){return new vA}};var DA,wA,AA={selector:"a:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=dh(e);return 0===(t=t.filter((function(e){return!!ap.Text.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"link",url:r.attr("href")||"",target:r.attr("target")||"",children:t}}};var SA=E(function(){if(wA)return DA;wA=1,DA=function(r){if("string"!=typeof r)return!1;var o=r.match(e);if(!o)return!1;var i=o[1];if(!i)return!1;if(t.test(i)||n.test(i))return!0;return!1};var e=/^(?:\w+:)?\/\/(\S+)$/,t=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,n=/^[^\s\.]+\.\S{2,}$/;return DA}());var xA={type:"link",renderElem:function(e,t,n){var r=e,o=r.url,i=r.target,a=void 0===i?"_blank":i;return Dy.jsx("a",{href:o,target:a},t)}},OA={renderElems:[xA],elemsToHtml:[iA],parseElemsHtml:[AA],menus:[yA,bA,EA,CA],editorPlugin:function(e){var t=e.isInline,n=e.insertData,r=e.normalizeNode,o=e;return o.isInline=function(e){return"link"===e.type||t(e)},o.insertData=function(e){var t=e.getData("text/plain");if(SA(t)){if(/<img[^>]+>/.test(e.getData("text/html")))n(e);else if(!uA(o)){var r=o.selection;if(null!=r){var i=ap.Editor.string(o,r);cA(o,i,t)}}}else n(e)},o.normalizeNode=function(e){var t=vp(e,2),n=t[0],i=t[1];return"link"!==sg.getNodeType(n)?r([n,i]):""===ap.Node.string(n)?ap.Transforms.removeNodes(o,{at:i}):r([n,i])},o}};function TA(e){var t=vp(ap.Editor.nodes(e,{match:function(t){return e.children[0]===t},mode:"highest"}),1),n=t[0];if(null==n)return!1;var r=n[0];if(!ap.Element.isElement(r))return!1;if("paragraph"===r.type)return!1;if(""!==ap.Node.string(r))return!1;var o=r.children,i=void 0===o?[]:o;return!!ap.Text.isText(i[0])&&(ap.Transforms.setNodes(e,{type:"paragraph"}),!0)}var NA={renderElems:[{type:"paragraph",renderElem:function(e,t,n){return Dy.jsx("p",null,t)}}],elemsToHtml:[{type:"paragraph",elemToHtml:function(e,t){return""===t?"<p><br></p>":"<p>".concat(t,"</p>")}}],parseElemsHtml:[{selector:"p:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=dh(e);return 0===(t=t.filter((function(e){return!!ap.Text.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:t}}}],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward,r=e;return r.deleteBackward=function(e){TA(r)||t(e)},r.deleteForward=function(e){TA(r)||n(e)},r}};function BA(e,t){if(null==e.selection)return!0;var n=vp(ap.Editor.nodes(e,{match:function(t){return"pre"===sg.getNodeType(t)||!!ap.Editor.isVoid(e,t)},universal:!0}),1);return!!n[0]}function kA(e,t){Object.keys(t).forEach((function(t){"text"!==t&&ap.Editor.removeMark(e,t)}))}var FA=function(){function e(){this.marksNeedToRemove=[],this.tag="button"}return e.prototype.getValue=function(e){var t=this.mark,n=ap.Editor.marks(e);if(n)return n[t];var r=vp(ap.Editor.nodes(e,{match:function(e){return!0===e[t]}}),1);return!!r[0]},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){return BA(e,this.mark)},e.prototype.exec=function(e,t){var n=this.mark,r=this.marksNeedToRemove;t?e.removeMark(n):(e.addMark(n,!0),r&&r.forEach((function(t){return e.removeMark(t)})))},e}(),PA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="bold",t.title=Dm("textStyle.bold"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M707.872 484.64A254.88 254.88 0 0 0 768 320c0-141.152-114.848-256-256-256H192v896h384c141.152 0 256-114.848 256-256a256.096 256.096 0 0 0-124.128-219.36zM384 192h101.504c55.968 0 101.504 57.408 101.504 128s-45.536 128-101.504 128H384V192z m159.008 640H384v-256h159.008c58.464 0 106.016 57.408 106.016 128s-47.552 128-106.016 128z"></path></svg>',t.hotkey="mod+b",t}return dp(t,e),t}(FA),IA=function(){function e(){this.title=Dm("textStyle.clear"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M969.382408 288.738615l-319.401123-270.852152a67.074236 67.074236 0 0 0-96.459139 5.74922l-505.931379 574.922021a68.35184 68.35184 0 0 0-17.886463 47.910169 74.101061 74.101061 0 0 0 24.274486 47.910168l156.50655 132.232065h373.060512L975.131628 383.281347a67.074236 67.074236 0 0 0-5.74922-96.459139z m-440.134747 433.746725H264.144729l-90.071117-78.572676c-5.74922-5.74922-12.137243-12.137243-12.137243-17.886463a36.411728 36.411728 0 0 1 5.749221-24.274485l210.804741-240.828447 265.102932 228.691204z m-439.495945 180.781036h843.218964a60.047411 60.047411 0 1 1 0 120.733624H89.751716a60.047411 60.047411 0 1 1 0-120.733624z m0 0"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return BA(e)},e.prototype.exec=function(e,t){var n,r,o=ap.Editor.nodes(e,{match:function(e){return ap.Text.isText(e)},universal:!0});try{for(var i=gp(o),a=i.next();!a.done;a=i.next()){kA(e,a.value[0])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}},e}(),RA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="code",t.title=Dm("textStyle.code"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M576 736l96 96 320-320L672 192l-96 96 224 224zM448 288l-96-96L32 512l320 320 96-96-224-224z"></path></svg>',t.hotkey="mod+e",t}return dp(t,e),t}(FA),LA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="italic",t.title=Dm("textStyle.italic"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M896 64v64h-128L448 896h128v64H128v-64h128L576 128h-128V64z"></path></svg>',t.hotkey="mod+i",t}return dp(t,e),t}(FA),_A=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="sub",t.marksNeedToRemove=["sup"],t.title=Dm("textStyle.sub"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 910.016v50.016h128v64h-192v-146.016l128-60V768h-128v-64h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',t.hotkey="",t}return dp(t,e),t}(FA),MA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="sup",t.marksNeedToRemove=["sub"],t.title=Dm("textStyle.sup"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M768 206.016v50.016h128v64h-192V174.016l128-60V64h-128V0h192v146.016zM676 256h-136L352 444 164 256H28l256 256-256 256h136L352 580 540 768h136l-256-256z"></path></svg>',t.hotkey="",t}return dp(t,e),t}(FA),jA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="through",t.title=Dm("textStyle.through"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M1024 512v64h-234.496c27.52 38.496 42.496 82.688 42.496 128 0 70.88-36.672 139.04-100.576 186.976C672.064 935.488 594.144 960 512 960s-160.064-24.512-219.424-69.024C228.64 843.04 192 774.88 192 704h128c0 69.376 87.936 128 192 128s192-58.624 192-128-87.936-128-192-128H0v-64h299.52a385.984 385.984 0 0 1-6.944-5.024C228.64 459.04 192 390.88 192 320s36.672-139.04 100.576-186.976C351.936 88.512 429.856 64 512 64s160.064 24.512 219.424 69.024C795.328 180.96 832 249.12 832 320h-128c0-69.376-87.936-128-192-128s-192 58.624-192 128 87.936 128 192 128c78.976 0 154.048 22.688 212.48 64H1024z"></path></svg>',t.hotkey="mod+shift+x",t}return dp(t,e),t}(FA),HA=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.mark="underline",t.title=Dm("textStyle.underline"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 64l128 0 0 416c0 159.072-143.264 288-320 288s-320-128.928-320-288l0-416 128 0 0 416c0 40.16 18.24 78.688 51.36 108.512 36.896 33.216 86.848 51.488 140.64 51.488s103.744-18.304 140.64-51.488c33.12-29.792 51.36-68.352 51.36-108.512l0-416zM192 832l640 0 0 128-640 0z"></path></svg>',t.hotkey="mod+u",t}return dp(t,e),t}(FA);function zA(e,t){return 0!==e.length&&(!!e[0].matches(t)||e.find(t).length>0)}function $A(e,t){var n=t,r=e,o=r.bold,i=r.italic,a=r.underline,s=r.code,u=r.through,l=r.sub,c=r.sup;return o&&(n="<strong>".concat(n,"</strong>")),s&&(n="<code>".concat(n,"</code>")),i&&(n="<em>".concat(n,"</em>")),a&&(n="<u>".concat(n,"</u>")),u&&(n="<s>".concat(n,"</s>")),l&&(n="<sub>".concat(n,"</sub>")),c&&(n="<sup>".concat(n,"</sup>")),n}var UA={renderStyle:function(e,t){var n=e,r=n.bold,o=n.italic,i=n.underline,a=n.code,s=n.through,u=n.sub,l=n.sup,c=t;return r&&(c=Dy.jsx("strong",null,c)),a&&(c=Dy.jsx("code",null,c)),o&&(c=Dy.jsx("em",null,c)),i&&(c=Dy.jsx("u",null,c)),s&&(c=Dy.jsx("s",null,c)),u&&(c=Dy.jsx("sub",null,c)),l&&(c=Dy.jsx("sup",null,c)),c},menus:[{key:"bold",factory:function(){return new PA}},{key:"underline",factory:function(){return new HA}},{key:"italic",factory:function(){return new LA}},{key:"through",factory:function(){return new jA}},{key:"code",factory:function(){return new RA}},{key:"sub",factory:function(){return new _A}},{key:"sup",factory:function(){return new MA}},{key:"clearStyle",factory:function(){return new IA}}],styleToHtml:function(e,t){if(!ap.Text.isText(e))return t;if(cD(t))return $A(e,t);var n=dh(t),r=n.html();return r=$A(e,r),n.html(r),dD(n)},parseStyleHtml:function(e,t,n){var r=dh(e);if(!ap.Text.isText(t))return t;var o=t;return zA(r,"b,strong")&&(o.bold=!0),zA(r,"i,em")&&(o.italic=!0),zA(r,"u")&&(o.underline=!0),zA(r,"s,strike")&&(o.through=!0),zA(r,"sub")&&(o.sub=!0),zA(r,"sup")&&(o.sup=!0),zA(r,"code")&&(o.code=!0),o}};var VA={type:"todo",elemToHtml:function(e,t){var n=e.checked;return'<div data-w-e-type="todo"><input type="checkbox" disabled '.concat(n?"checked":"",">").concat(t,"</div>")}},WA=function(){function e(){this.title=Dm("todo.todo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M278.755556 403.911111l-79.644445 79.644445L455.111111 739.555556l568.888889-568.888889-79.644444-79.644445L455.111111 580.266667l-176.355555-176.355556zM910.222222 910.222222H113.777778V113.777778h568.888889V0H113.777778C51.2 0 0 51.2 0 113.777778v796.444444c0 62.577778 51.2 113.777778 113.777778 113.777778h796.444444c62.577778 0 113.777778-51.2 113.777778-113.777778V455.111111h-113.777778v455.111111z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!!sg.getSelectedNodeByType(e,"todo")},e.prototype.isDisabled=function(e){return null==e.selection||!!sg.getSelectedElems(e).some((function(t){if(ap.Editor.isVoid(e,t)&&ap.Editor.isBlock(e,t))return!0;var n=t.type;return!!["pre","table","list-item"].includes(n)}))},e.prototype.exec=function(e,t){var n=this.isActive(e);ap.Transforms.setNodes(e,{type:n?"paragraph":"todo"})},e}();var GA={type:"todo",renderElem:function(e,t,n){var r=!1;n.isDisabled()&&(r=!0);var o=e.checked,i=Dy.jsx("div",{style:{margin:"5px 0"}},Dy.jsx("span",{contentEditable:!1,style:{marginRight:"0.5em"}},Dy.jsx("input",{type:"checkbox",checked:o,disabled:r,on:{change:function(t){var r=sg.findPath(n,e),o={checked:t.target.checked};ap.Transforms.setNodes(n,o,{at:r})}}})),Dy.jsx("span",null,t));return i}},qA={renderElems:[GA],elemsToHtml:[VA],preParseHtml:[{selector:"ul.w-e-todo",preParseHtml:function(e){var t=dh(e).find("li"),n=dh('<div data-w-e-type="todo"></div>'),r=t.find("input[type]");return n.append(r),t.children()[0].remove(),n[0].innerHTML+=t[0].innerHTML,n[0]}}],parseElemsHtml:[{selector:'div[data-w-e-type="todo"]',parseElemHtml:function(e,t,n){var r=dh(e);0===(t=t.filter((function(e){return!!ap.Text.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=!1;return null!=r.find('input[type="checkbox"]').attr("checked")&&(o=!0),{type:"todo",checked:o,children:t}}}],menus:[{key:"todo",factory:function(){return new WA}}],editorPlugin:function(e){var t=e.deleteBackward,n=e;return n.deleteBackward=function(n){var r=e.selection;if(r&&ap.Range.isCollapsed(r)){var o=sg.getSelectedNodeByType(e,"todo");if(o&&0===ap.Node.string(o).length)return void ap.Transforms.setNodes(e,{type:"paragraph"},{mode:"highest"})}t(n)},n}},KA=function(){function e(){this.title=Dm("undo.redo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0.00032 576a510.72 510.72 0 0 0 173.344 384l84.672-96A383.136 383.136 0 0 1 128.00032 576C128.00032 363.936 299.93632 192 512.00032 192c106.048 0 202.048 42.976 271.52 112.48L640.00032 448h384V64l-149.984 149.984A510.272 510.272 0 0 0 512.00032 64C229.21632 64 0.00032 293.216 0.00032 576z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.redo&&e.redo()},e}(),YA=function(){function e(){this.title=Dm("undo.undo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M512 64A510.272 510.272 0 0 0 149.984 213.984L0.032 64v384h384L240.512 304.48A382.784 382.784 0 0 1 512.032 192c212.064 0 384 171.936 384 384 0 114.688-50.304 217.632-130.016 288l84.672 96a510.72 510.72 0 0 0 173.344-384c0-282.784-229.216-512-512-512z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection},e.prototype.exec=function(e,t){"function"==typeof e.undo&&e.undo()},e}(),XA=[UA,xD,MD,Xw,nA,oA,Gw,kD,PD,OA,bD,gD,Dw,NA,qA,HD,{menus:[{key:"redo",factory:function(){return new KA}},{key:"undo",factory:function(){return new YA}}]},$D,TD];Em("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),Em("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var ZA=new WeakMap;function JA(e){var t,n=e.children||[],r=n.length;if(0===r)return"";for(var o=0;o<r&&!t;o+=1){var i=n[o];ap.Text.isText(i)&&(t=i)}return null==t?"":t.color||""}function QA(e,t,n){for(var r=t.type,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["type"]),i=void 0!==n?n:o.level||0,a=sg.findPath(e,t),s=a;;){if(0===s.length||0===a[a.length-1])return null;s=ap.Path.previous(s);var u=ap.Editor.node(e,s);if(!u)return null;var l=vp(u,1)[0],c=l.level,d=void 0===c?0:c;if(sg.getNodeType(l)!==r)return null;if(d===i)return l}}function eS(e,t,n){var r=QA(e,t,n);return!!r&&r.ordered===t.ordered}var tS=[];var nS={type:"list-item",elemToHtml:function(e,t){var n="",r="",o=e.ordered,i=void 0!==o&&o?"ol":"ul",a=function(e){var t=ZA.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=sg.findPath(t,e);if(0===u[0])return s+1;var l=ap.Path.previous(u),c=ap.Editor.node(t,l);if(!c)return 0;var d=vp(c,1)[0];if(sg.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?s-v:v>s?eS(t,e)?0:1:v===s?h===i?0:1:0}(e);if(a>0)for(var s=0;s<a;s+=1)n+="<".concat(i,">"),tS.push(i);var u=function(e){var t=ZA.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=sg.findPath(t,e);if(u[0]===t.children.length-1)return s+1;var l=ap.Path.next(u),c=ap.Editor.node(t,l);if(!c)return 0;var d=vp(c,1)[0];if(sg.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?eS(t,d)?s-v:s-v+1:v>s?0:v===s?h===i?0:1:0}(e);if(u>0)for(s=0;s<u;s+=1){var l=tS.pop();r+="</".concat(l,">")}var c=JA(e),d=c?' style="color:'.concat(c,'"'):"";return{html:"<li".concat(d,">").concat(t,"</li>"),prefix:n,suffix:r}}},rS=function(){function e(){this.type="list-item",this.tag="button"}return e.prototype.getListNode=function(e){var t=this.type;return sg.getSelectedNodeByType(e,t)},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){var t=this.getListNode(e);if(null==t)return!1;var n=t.ordered;return(void 0!==n&&n)===this.ordered},e.prototype.isDisabled=function(e){return null==e.selection||!!sg.getSelectedElems(e).some((function(t){if(ap.Editor.isVoid(e,t)&&ap.Editor.isBlock(e,t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)}))},e.prototype.exec=function(e,t){this.isActive(e)?ap.Transforms.setNodes(e,{type:"paragraph",ordered:void 0,level:void 0}):ap.Transforms.setNodes(e,{type:"list-item",ordered:this.ordered,indent:void 0})},e}(),oS=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.ordered=!1,t.title=Dm("listModule.unOrderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',t}return dp(t,e),t}(rS),iS=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.ordered=!0,t.title=Dm("listModule.orderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',t}return dp(t,e),t}(rS),aS={key:"bulletedList",factory:function(){return new oS}},sS={key:"numberedList",factory:function(){return new iS}};function uS(e){return e.length?e[0].tagName.toLowerCase():""}function lS(e){return ap.Editor.nodes(e,{at:e.selection||void 0,match:function(t){return 1===sg.findPath(e,t).length}})}ch.append&&(dh.fn.append=ch.append),ch.attr&&(dh.fn.attr=ch.attr),ch.parent&&(dh.fn.parent=ch.parent);var cS={type:"list-item",renderElem:function(e,t,n){ZA.set(e,n);var r=e,o=r.level,i=void 0===o?0:o,a=r.ordered,s=void 0!==a&&a,u={margin:"5px 0 5px ".concat(20*i,"px"),display:"flex",alignItems:"flex-start"},l="";if(s){var c=function(e,t){var n=t,r=n.type,o=n.level,i=void 0===o?0:o,a=n.ordered,s=void 0!==a&&a,u=1,l=t,c=sg.findPath(e,l);if(0===c[0])return 1;for(;c[0]>0;){var d=ap.Path.previous(c),f=ap.Editor.node(e,d);if(null==f)break;var p=f[0],h=p.level,g=void 0===h?0:h,v=p.type,m=p.ordered;if(v!==r)break;if(g<i)break;if(g===i){if(m!==s)break;u+=1}l=p,c=d}return u}(n,e);l="".concat(c,".")}else l=function(e){void 0===e&&(e=0);var t="";switch(e){case 0:t="•";break;case 1:t="◦";break;default:t="▪"}return t}(i);var d=JA(e);return Dy.jsx("div",{style:u},Dy.jsx("span",{contentEditable:!1,style:{marginRight:"0.5em",color:d},"data-w-e-reserve":!0},l),Dy.jsx("span",{style:{flex:"1",wordBreak:"break-word"}},t))}},dS={renderElems:[cS],editorPlugin:function(e){var t=e.deleteBackward,n=e.handleTab,r=e.normalizeNode,o=e.insertBreak,i=e;return i.insertBreak=function(){var t=vp(ap.Editor.nodes(e,{match:function(e){return sg.checkNodeType(e,"list-item")},universal:!0}),1),n=t[0];return n?""!==n[0].children[0].text?o():void ap.Transforms.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0}):o()},i.deleteBackward=function(n){var r=i.selection;if(null!=r)if(ap.Range.isExpanded(r))t(n);else{var o=sg.getSelectedNodeByType(i,"list-item");if(null!=o)if(0!==r.focus.offset)t(n);else{var a=o,s=a.level,u=void 0===s?0:s,l=a.ordered,c=void 0!==l&&l;if(u>0){var d=QA(e,o,u-1);d&&d.ordered!==c?ap.Transforms.setNodes(i,{level:u-1,ordered:!c}):ap.Transforms.setNodes(i,{level:u-1})}else ap.Transforms.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0})}else t(n)}else t(n)},i.handleTab=function(){var e,t,r,o,a=i.selection;if(null!=a){if(ap.Range.isCollapsed(a)){var s=sg.getSelectedNodeByType(i,"list-item");if(null==s)return void n();if(0===a.focus.offset){var u=s.level,l=void 0===u?0:u;return void ap.Transforms.setNodes(i,{level:l+1})}}if(ap.Range.isExpanded(a)){var c=0,d=!1;try{for(var f=gp(lS(i)),p=f.next();!p.done;p=f.next()){var h=vp(p.value,1)[0];"list-item"===sg.getNodeType(h)?c+=1:d=!0}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}if(d||c<=1)return void n();try{for(var g=gp(lS(i)),v=g.next();!v.done;v=g.next()){var m=vp(v.value,2),y=(h=m[0],m[1]),b=h.level;l=void 0===b?0:b;ap.Transforms.setNodes(i,{level:l+1},{at:y})}}catch(e){r={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}}else n()}else n()},i.normalizeNode=function(e){var t=vp(e,2),n=t[0],o=t[1],a=sg.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||ap.Transforms.unwrapNodes(i,{at:o}),r([n,o])},i},menus:[aS,sS],elemsToHtml:[nS],parseElemsHtml:[{selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(e,t,n){return t.flat(1/0)}},{selector:"li:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=dh(e);0===(t=t.filter((function(e){return!!ap.Text.isText(e)||!!n.isInline(e)}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=function(e){return"ol"===uS(e.parent())}(r),i=function(e){for(var t=0,n=e.parent(),r=uS(n);"ul"===r||"ol"===r;)r=uS(n=n.parent()),t+=1;return t-1}(r);return{type:"list-item",ordered:o,level:i,children:t}}}]};Em("en",{tableModule:{modal:{border:"Border",borderWidth:"Width",bgColor:"Back color",align:"Text Align",ok:"OK"},color:{default:"Default color",clear:"Clear back color"},borderStyle:{none:"None",solid:"Solid",dotted:"Dotted",dashed:"Dashed",double:"Double",groove:"Groove",ridge:"Ridge",inset:"Inset",outset:"Outset"},deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Width auto",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header",mergeCell:"merge cell",splitCell:"split cell",tableProperty:"Table property",cellProperty:"Cell property"}}),Em("zh-CN",{tableModule:{modal:{border:"边框",borderWidth:"宽度",bgColor:"背景色",align:"对齐方式",ok:"确定"},color:{default:"默认颜色",clear:"清除背景色"},borderStyle:{none:"无样式",solid:"实线",dotted:"点状虚线",dashed:"虚线",double:"双线",groove:"凹槽边框",ridge:"菱形边框",inset:"凹边框",outset:"凸边框"},deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"宽度自适应",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头",mergeCell:"合并单元格",splitCell:"拆分单元格",tableProperty:"表格属性",cellProperty:"单元格属性"}});var fS={type:"table",elemToHtml:function(e,t){var n=e,r=n.width,o=void 0===r?"auto":r,i=n.columnWidths,a=n.height,s=void 0===a?"auto":a,u=null==i?void 0:i.map((function(e){return"<col width=".concat(e,"></col>")})).join(""),l=u?'<colgroup contentEditable="false">'.concat(u,"</colgroup>"):"";return'<table style="width: '.concat(o,";table-layout: fixed;height:").concat(s,'">').concat(l,"<tbody>").concat(t,"</tbody></table>")}},pS={type:"table-row",elemToHtml:function(e,t){return"<tr>".concat(t,"</tr>")}},hS={type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,o=void 0===r?1:r,i=n.rowSpan,a=void 0===i?1:i,s=n.isHeader,u=void 0!==s&&s,l=n.width,c=void 0===l?"auto":l,d=n.hidden,f=u?"th":"td",p=void 0!==d&&d?"display:none":"";return"<".concat(f,' colSpan="').concat(o,'" rowSpan="').concat(a,'" width="').concat(c,'" style="').concat(p,'">').concat(t,"</").concat(f,">")}},gS='<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>',vS={blocks:{td:"table-cell",th:"table-cell",content:"paragraph",tr:"table-row",table:"table",tbody:"table-body"}};function mS(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=vS,o=t.map((function(e){var t;return null===(t=null==r?void 0:r.blocks)||void 0===t?void 0:t[e]}));return function(e){return function(e){return!ap.Editor.isEditor(e)&&ap.Element.isElement(e)&&"type"in e}(e)&&o.includes(e.type)}}function yS(e,t){for(var n=vp(t,2),r=n[0],o=n[1],i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=vp(ap.Node.common(e,r,o),2),u=s[0],l=s[1];return!!mS.apply(void 0,mp([e],vp(i),!1))(u,l)||!!ap.Editor.above(e,{match:mS.apply(void 0,mp([e],vp(i),!1)),at:l})}function bS(e,t){var n,r;void 0===t&&(t={});var o=[];try{for(var i=gp(function(e,t){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y,b;return void 0===t&&(t={}),hp(this,(function(E){switch(E.label){case 0:if(n=vp(ap.Editor.nodes(e,{match:mS(e,"table"),at:t.at}),1),!(r=n[0]))return[2,[]];o=vp(r,2),i=o[1],E.label=1;case 1:E.trys.push([1,6,7,8]),a=gp(ap.Editor.nodes(e,{match:mS(e,"table"),at:i})),s=a.next(),E.label=2;case 2:if(s.done)return[3,5];u=vp(s.value,2),l=u[1],c=[];try{for(y=void 0,d=gp(ap.Editor.nodes(e,{match:mS(e,"tr"),at:l})),f=d.next();!f.done;f=d.next())p=vp(f.value,2),h=p[1],c.push(mp([],vp(ap.Editor.nodes(e,{match:mS(e,"th","td"),at:h})),!1))}catch(e){y={error:e}}finally{try{f&&!f.done&&(b=d.return)&&b.call(d)}finally{if(y)throw y.error}}return[4,c];case 3:E.sent(),E.label=4;case 4:return s=a.next(),[3,2];case 5:return[3,8];case 6:return g=E.sent(),v={error:g},[3,8];case 7:try{s&&!s.done&&(m=a.return)&&m.call(a)}finally{if(v)throw v.error}return[7];case 8:return[2]}}))}(e,{at:t.at})),a=i.next();!a.done;a=i.next()){for(var s=a.value,u=[],l=0;l<s.length;l+=1){u[l]||(u[l]=[]);for(var c=0;c<s[l].length;c+=1)for(var d=vp(s[l][c],1)[0],f=d.rowSpan,p=void 0===f?1:f,h=d.colSpan,g=void 0===h?1:h,v=0;v<g+0;v+=1)for(var m=0;m<p;m+=1)u[l+m]||(u[l+m]=[]),u[l+m][c+v]||(u[l+m][c+v]=[s[l+m][c+v],{rtl:v-0+1,ltr:g-v+0,ttb:m+1,btt:p-m}])}o.push.apply(o,mp([],vp(u),!1))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}var ES=function(){function e(e,t){this.x=e,this.y=t}return e.valueOf=function(e,t){return new this(e,t)},e.equals=function(e,t){return e.x===t.x&&e.y===t.y},e}();function CS(e){return e.length?e[0].tagName.toLowerCase():""}function DS(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}ch.append&&dh.fn&&(dh.fn.append=ch.append),ch.on&&dh.fn&&(dh.fn.on=ch.on),ch.focus&&dh.fn&&(dh.fn.focus=ch.focus),ch.attr&&dh.fn&&(dh.fn.attr=ch.attr),ch.val&&dh.fn&&(dh.fn.val=ch.val),ch.html&&dh.fn&&(dh.fn.html=ch.html),ch.dataset&&dh.fn&&(dh.fn.dataset=ch.dataset),ch.addClass&&dh.fn&&(dh.fn.addClass=ch.addClass),ch.removeClass&&dh.fn&&(dh.fn.removeClass=ch.removeClass),ch.children&&dh.fn&&(dh.fn.children=ch.children),ch.each&&dh.fn&&(dh.fn.each=ch.each),ch.find&&dh.fn&&(dh.fn.find=ch.find),ch.data&&dh.fn&&(dh.fn.data=ch.data),ch.hide&&dh.fn&&(dh.fn.hide=ch.hide),ch.show&&dh.fn&&(dh.fn.show=ch.show);var wS=function(){function e(){this.title=Dm("tableModule.tableProperty"),this.iconSvg='<svg viewBox="0 0 20 20"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.borderStyle=[{value:"none",label:Dm("tableModule.borderStyle.none")},{value:"solid",label:Dm("tableModule.borderStyle.solid")},{value:"dotted",label:Dm("tableModule.borderStyle.dotted")},{value:"dashed",label:Dm("tableModule.borderStyle.dashed")},{value:"double",label:Dm("tableModule.borderStyle.double")},{value:"groove",label:Dm("tableModule.borderStyle.groove")},{value:"ridge",label:Dm("tableModule.borderStyle.ridge")},{value:"inset",label:Dm("tableModule.borderStyle.inset")},{value:"outset",label:Dm("tableModule.borderStyle.outset")}],this.textAlignOptions=[{value:"left",label:Dm("justify.left"),svg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"center",label:Dm("justify.center"),svg:'<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"right",label:Dm("justify.right"),svg:'<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"justify",label:Dm("justify.justify"),svg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>'}]}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==sg.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){},e.prototype.getModalContentNode=function(e){return vp(ap.Editor.nodes(e,{match:mS(e,"table")}),1)[0]},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this.getModalContentNode(e);if(!n)return null;var r=vp(n,2),o=r[0],i=r[1],a=dh('<div>\n <label class="babel-container">\n <span>'.concat(Dm("tableModule.modal.border"),'</span>\n <span class="babel-container-border">\n <select name="borderStyle">\n ').concat(this.borderStyle.map((function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")})).join(""),'\n </select>\n <span class="color-group" data-mark="color">\n <span class="color-group-block"></span>\n <input name="borderColor" type="hidden">\n </span>\n <input name="borderWidth" type="number" placeholder="').concat(Dm("tableModule.modal.borderWidth"),'">\n </span>\n </label>\n <div class="babel-container">\n <span>').concat(Dm("tableModule.modal.bgColor"),'</span>\n <span class="babel-container-background">\n <span class="color-group" data-mark="bgColor">\n <span class="color-group-block"></span>\n <input name="backgroundColor" type="hidden">\n </span>\n </span>\n </div>\n <label class="babel-container">\n <span>').concat(Dm("tableModule.modal.align"),'</span>\n <span class="babel-container-align">\n <select name="textAlign">\n ').concat(this.textAlignOptions.map((function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")})).join(""),'\n </select>\n </span>\n </label>\n <div class="button-container">\n <button type="button">').concat(Dm("tableModule.modal.ok"),"</button>\n </div>\n </div>"));a.find("[name]").each((function(e){dh(e).val(o[dh(e).attr("name")])}));var s=function(e,t){t?dh(".color-group-block",e).css("background-color",t).empty():dh(".color-group-block",e).css("background-color","").html(gS)};return a.find(".color-group").each((function(n){var r=dh('[type="hidden"]',n).val()||"";s(n,r);var o=dh(n);o.on("click",(function(){a.find(".color-group .w-e-drop-panel").hide();var i=o.data("panel");i?i.show():(i=t.getPanelContentElem(e,{mark:o.data("mark"),selectedColor:r,callback:function(e){dh('[type="hidden"]',n).val(e||""),s(n,e),i.hide()}}),o.append(i),o.data("panel",i))}))})),a.find("button").on("click",(function(){var t=Array.from(a.find("[name]")).reduce((function(e,t){return e[dh(t).attr("name")]=dh(t).val(),e}),{});ap.Transforms.setNodes(e,t,{at:i}),setTimeout((function(){e.focus()}))})),a[0]},e.prototype.getPanelContentElem=function(e,t){var n=t.mark,r=t.selectedColor,o=t.callback,i=dh('<ul class="w-e-panel-content-color"></ul>');i.on("click","li",(function(e){var t=e.target;if(t){e.preventDefault(),e.stopPropagation();var n=dh(t).attr("data-value");o(n)}}));var a=e.getMenuConfig(n).colors;(void 0===a?[]:a).forEach((function(e){var t=dh('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=dh('<li data-value="'.concat(e,'"></li>'));r===e&&n.addClass("active"),n.append(t),i.append(n)}));var s="";"color"===n&&(s=Dm("tableModule.color.default")),"bgColor"===n&&(s=Dm("tableModule.color.clear"));var u=dh('\n <li data-value="" class="clear">\n '.concat(gS,"\n ").concat(s,"\n </li>\n "));i.prepend(u);var l=dh('<div class="w-e-drop-panel"></div>');return l.append(i),l},e}(),AS=function(e){function t(){var t=e.apply(this,mp([],vp(arguments),!1))||this;return t.title=Dm("tableModule.cellProperty"),t.iconSvg='<svg viewBox="0 0 20 20"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',t.tag="button",t.showModal=!0,t.modalWidth=300,t}return dp(t,e),t.prototype.getModalContentNode=function(e){return vp(ap.Editor.nodes(e,{match:mS(e,"td")}),1)[0]},t}(wS),SS=function(){function e(){this.title=Dm("tableModule.deleteCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 510.976L393.216 445.44v-13.1072L327.68 366.7968V510.976z m327.68-78.4384l65.536-65.536V507.904L655.36 442.368v-9.8304z m393.216 484.9664V0H0v917.504h1048.576z m-65.536-131.072h-262.144v-52.4288l-13.1072 13.1072-52.4288-52.4288v91.7504H393.216v-91.7504l-52.4288 52.4288-13.1072-13.1072v52.4288H65.536V65.536H327.68v121.2416l36.0448-36.0448 29.4912 29.4912V62.2592h262.144V180.224l49.152-49.152 16.384 16.384V62.2592h262.144V786.432z m-294.912-108.1344l-160.5632-160.5632-167.1168 167.1168-78.6432-78.6432 167.1168-167.1168L288.3584 278.528l78.6432-78.6432 160.5632 160.5632 163.84-163.84 78.6432 78.6432-163.84 163.84 160.5632 160.5632-78.6432 78.6432z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==sg.getSelectedNodeByType(e,"table-cell"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=vp(ap.Editor.nodes(e,{match:function(e){return sg.checkNodeType(e,"table-cell")},universal:!0}),1),r=vp(n[0],2),o=r[0],i=r[1],a=sg.getParentNode(e,o),s=(null==a?void 0:a.children.length)||0;if(!a||s<=1)ap.Transforms.removeNodes(e,{mode:"highest"});else if(null!=sg.getParentNode(e,a)){var u=bS(e),l=0;e:for(var c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=vp(u[c][d],1),p=vp(f[0],2)[1];if(ap.Path.equals(i,p)){l=d;break e}}ap.Editor.withoutNormalizing(e,(function(){for(var t,n,r=0;r<u.length;r+=1){var o=vp(u[r][l],2),i=vp(o[0],1)[0].hidden,a=o[1],s=a.rtl,c=a.ltr;if(s>1||c>1){var d=vp(u[r][l-(s-1)],1),f=vp(d[0],2),p=f[0],h=p.rowSpan,g=void 0===h?1:h,v=p.colSpan,m=void 0===v?1:v,y=f[1];if(i)ap.Transforms.setNodes(e,{rowSpan:g,colSpan:Math.max(m-1,1)},{at:y});else{var b=vp(u[r][l+1],1),E=vp(b[0],2)[1];ap.Transforms.setNodes(e,{rowSpan:g,colSpan:m-1,hidden:!1},{at:E});try{for(var C=(t=void 0,gp(ap.Node.children(e,y,{reverse:!0}))),D=C.next();!D.done;D=C.next()){var w=vp(D.value,2)[1];ap.Transforms.moveNodes(e,{to:mp(mp([],vp(E),!1),[0],!1),at:w})}}catch(e){t={error:e}}finally{try{D&&!D.done&&(n=C.return)&&n.call(C)}finally{if(t)throw t.error}}}}}for(r=0;r<u.length;r+=1){var A=vp(u[r][l],1);y=vp(A[0],2)[1];ap.Transforms.removeNodes(e,{at:y})}var S=vp(ap.Editor.nodes(e,{match:function(e){return sg.checkNodeType(e,"table")},universal:!0}),1),x=S[0];if(x){var O=vp(x,2),T=O[0],N=O[1],B=T.columnWidths,k=mp([],vp(void 0===B?[]:B),!1);k.splice(l,1),ap.Transforms.setNodes(e,{columnWidths:k},{at:N})}}))}}},e}(),xS=function(){function e(){this.title=Dm("tableModule.deleteRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M907.6736 586.5472L747.1104 425.984l163.84-163.84-78.6432-78.6432-163.84 163.84L507.904 186.7776 429.2608 262.144l163.84 163.84-167.1168 167.1168 78.6432 78.6432 167.1168-167.1168 160.5632 160.5632 75.3664-78.6432zM0 917.504V0h1048.576v917.504H0z m983.04-327.68h-22.9376l-65.536-65.536H983.04V327.68h-91.7504l65.536-65.536h26.2144V65.536H65.536v196.608h317.8496l65.536 65.536H65.536v196.608h380.1088l-65.536 65.536H65.536v196.608H983.04v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==sg.getSelectedNodeByType(e,"table-row"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=vp(ap.Editor.nodes(e,{match:function(e){return sg.checkNodeType(e,"table-row")},universal:!0}),1),r=vp(n[0],2),o=r[0],i=r[1],a=sg.getParentNode(e,o);if(((null==a?void 0:a.children.length)||0)<=1)ap.Transforms.removeNodes(e,{mode:"highest"});else{var s=vp(ap.Editor.nodes(e,{match:function(e){return sg.checkNodeType(e,"table-cell")},universal:!0}),1),u=vp(s[0],2)[1],l=bS(e),c=0;e:for(var d=0;d<l.length;d+=1)for(var f=0;f<l[d].length;f+=1){var p=vp(l[d][f],1),h=vp(p[0],2)[1];if(ap.Path.equals(u,h)){c=d;break e}}ap.Editor.withoutNormalizing(e,(function(){for(var t,n,r=0;r<l[c].length;r+=1){var o=vp(l[c][r],2),a=vp(o[0],1)[0].hidden,s=o[1],u=s.ttb,d=s.btt;if(u>1||d>1){var f=vp(l[c-(u-1)][r],1),p=vp(f[0],2),h=p[0],g=h.rowSpan,v=void 0===g?1:g,m=h.colSpan,y=void 0===m?1:m,b=p[1];if(a)ap.Transforms.setNodes(e,{rowSpan:Math.max(v-1,1),colSpan:y},{at:b});else{var E=vp(l[c+1][r],1),C=vp(E[0],2)[1];ap.Transforms.setNodes(e,{rowSpan:v-1,colSpan:y,hidden:!1},{at:C});try{for(var D=(t=void 0,gp(ap.Node.children(e,b,{reverse:!0}))),w=D.next();!w.done;w=D.next()){var A=vp(w.value,2)[1];ap.Transforms.moveNodes(e,{to:mp(mp([],vp(C),!1),[0],!1),at:A})}}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=D.return)&&n.call(D)}finally{if(t)throw t.error}}}}}ap.Transforms.removeNodes(e,{at:i})}))}}},e}(),OS=function(){function e(){this.title=Dm("tableModule.deleteTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==sg.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){this.isDisabled(e)||ap.Transforms.removeNodes(e,{mode:"highest"})},e}(),TS=function(){function e(){this.title=Dm("tableModule.widthAuto"),this.iconSvg='<svg viewBox="0 0 1228 1024"><path d="M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=sg.getSelectedNodeByType(e,"table");return null!=t&&"100%"===t.width},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==sg.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n={width:t?"auto":"100%"};ap.Transforms.setNodes(e,n,{mode:"highest"})}},e}();function NS(e){var t=e.children||[];return 0===t.length?[]:(t[0]||{}).children||[]}function BS(e){return NS(e).every((function(e){return!!e.isHeader}))}var kS=function(){function e(){this.title=Dm("tableModule.insertCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 193.3312v186.7776H140.9024v91.7504H327.68v186.7776h88.4736V471.8592h190.0544V380.1088H416.1536V193.3312zM0 917.504V0h1048.576v917.504H0zM655.36 65.536H65.536v720.896H655.36V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 262.144h-262.144v196.608h262.144V327.68z m0 262.144h-262.144v196.608h262.144v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==sg.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=vp(ap.Editor.nodes(e,{match:function(e){return sg.checkNodeType(e,"table-cell")},universal:!0}),1),r=vp(n[0],2),o=r[0],i=r[1],a=sg.getParentNode(e,o);if(null!=a){var s=sg.getParentNode(e,a);if(null!=s){for(var u=bS(e),l=0,c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=vp(u[c][d],1),p=vp(f[0],2)[1];if(ap.Path.equals(i,p)){l=d;break}}ap.Editor.withoutNormalizing(e,(function(){for(var t=[],n=0;n<u.length;n+=1){var r=vp(u[n][l],2)[1],o=r.ltr,i=r.rtl;if(o>1||i>1){if(1===i)continue;var a=vp(u[n][l-(i-1)],1),c=vp(a[0],2),d=c[0],f=c[1],p=d.colSpan||1;t.push(n),d.hidden||ap.Transforms.setNodes(e,{colSpan:p+1},{at:f})}}for(n=0;n<u.length;n+=1){var h={type:"table-cell",hidden:t.includes(n),children:[{text:""}]};0===n&&BS(s)&&(h.isHeader=!0);var g=vp(u[n][l],1),v=vp(g[0],2)[1];ap.Transforms.insertNodes(e,h,{at:v})}var m=vp(ap.Editor.nodes(e,{match:function(e){return sg.checkNodeType(e,"table")},universal:!0}),1),y=m[0];if(y){var b=vp(y,2),E=b[0],C=b[1],D=E.columnWidths,w=mp([],vp(void 0===D?[]:D),!1),A=e.getMenuConfig("insertTable").minWidth,S=void 0===A?60:A;w.splice(l,0,parseInt(S,10)||60),ap.Transforms.setNodes(e,{columnWidths:w},{at:C})}}))}}}},e}(),FS=function(){function e(){this.title=Dm("tableModule.insertRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M707.7888 521.0112h-147.456v-147.456H488.2432v147.456h-147.456v68.8128h147.456v147.456h72.0896v-147.456h147.456zM0 917.504V0h1048.576v917.504H0zM327.68 65.536H65.536v196.608H327.68V65.536z m327.68 0H393.216v196.608h262.144V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 258.8672H65.536v462.0288H983.04V324.4032z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==sg.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=vp(ap.Editor.nodes(e,{match:function(e){return sg.checkNodeType(e,"table-cell")},universal:!0}),1),r=vp(n[0],2),o=r[0],i=r[1],a=sg.getParentNode(e,o),s=(null==a?void 0:a.children.length)||0;if(0!==s){var u=bS(e),l=0;e:for(var c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=vp(u[c][d],1),p=vp(f[0],2)[1];if(ap.Path.equals(i,p)){l=c;break e}}ap.Editor.withoutNormalizing(e,(function(){for(var t=l+1,n=t>=0&&t<u.length,r=[],o=0;n&&o<u[l].length;o+=1){var a=vp(u[l][o],2)[1],c=a.ttb,d=a.btt;if(c>1||d>1){if(1===d)continue;var f=vp(u[l-(c-1)][o],1),p=vp(f[0],2),h=p[0],g=p[1],v=h.rowSpan||1;r.push(o),h.hidden||ap.Transforms.setNodes(e,{rowSpan:v+1},{at:g})}}for(var m={type:"table-row",children:[]},y=0;y<s;y+=1){var b={type:"table-cell",hidden:r.includes(y),children:[{text:""}]};m.children.push(b)}var E=ap.Path.parent(i),C=ap.Path.next(E);ap.Transforms.insertNodes(e,m,{at:C})}))}}},e}();var PS=function(){function e(){this.title=Dm("tableModule.insertTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||!!sg.getSelectedElems(e).some((function(t){var n=sg.getNodeType(t);return"pre"===n||("table"===n||("list-item"===n||!!e.isVoid(t)))})))},e.prototype.getPanelContentElem=function(e){var t=this;if(this.$content)return this.$content[0];for(var n=dh('<div class="w-e-panel-content-table"></div>'),r=dh("<span>0 × 0</span>"),o=dh("<table></table>"),i=0;i<10;i+=1){for(var a=dh("<tr></tr>"),s=0;s<10;s+=1){var u=dh("<td></td>");u.attr("data-x",s.toString()),u.attr("data-y",i.toString()),a.append(u),u.on("mouseenter",(function(e){var t=e.target;if(null!=t){var n=dh(t).dataset(),i=n.x,a=n.y;r[0].innerHTML="".concat(i+1," × ").concat(a+1),o.children().each((function(e){dh(e).children().each((function(e){var t=dh(e),n=t.dataset(),r=n.x,o=n.y;r<=i&&o<=a?t.addClass("active"):t.removeClass("active")}))}))}})),u.on("click",(function(n){n.preventDefault();var r=n.target;if(null!=r){var o=dh(r).dataset(),i=o.x,a=o.y;t.insertTable(e,a+1,i+1)}}))}o.append(a)}return n.append(o),n.append(r),this.$content=n,n[0]},e.prototype.insertTable=function(e,t,n){var r=parseInt(t,10),o=parseInt(n,10);if(r&&o&&!(r<=0||o<=0)){if(sg.isSelectedEmptyParagraph(e)&&ap.Transforms.removeNodes(e,{mode:"highest"}),0===e.children.length){ap.Transforms.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var i=function(e,t,n){for(var r,o=[],i=e.getMenuConfig("insertTable"),a=i.minWidth,s=void 0===a?60:a,u=i.tableFullWidth,l=i.tableHeader,c=Array(n).fill(parseInt(s,10)||60),d=0;d<t;d+=1){for(var f=[],p=0;p<n;p+=1){var h={type:"table-cell",children:[{text:""}]};0===d&&(h.isHeader=null===(r=null==l?void 0:l.selected)||void 0===r||r),f.push(h)}o.push({type:"table-row",children:f})}return{type:"table",width:(null==u?void 0:u.selected)?"100%":"auto",children:o,columnWidths:c}}(e,r,o);ap.Transforms.insertNodes(e,i,{mode:"highest"})}},e}(),IS=new WeakMap,RS=new WeakMap,LS={isInTable:function(e,t){return void 0===t&&(t={}),!!vp(ap.Editor.nodes(e,{match:mS(e,"table"),at:t.at}),1)[0]},selection:function(e){var t,n,r,o,i,a,s,u;return hp(this,(function(l){switch(l.label){case 0:t=IS.get(e),n=0,l.label=1;case 1:if(!(t&&n<t.length))return[3,4];for(r=[],o=0;o<t[n].length;o+=1)i=vp(t[n][o],2),a=i[0],s=i[1],u=s.ltr,1===s.ttb&&r.push(a),o+=u-1;return[4,r];case 2:l.sent(),l.label=3;case 3:return n+=1,[3,1];case 4:return[2]}}))},unselect:function(e){RS.delete(e),IS.delete(e)},isSelected:function(e,t){var n=RS.get(e);return!!n&&n.has(t)}},_S=function(){function e(){this.title=Dm("tableModule.mergeCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M482.2 508.4 331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4c2.4-1.8 2.4-5.4 0-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4c-2.3 1.8-2.3 5.3 0 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return!this.canMerge(e)},e.prototype.exec=function(e,t){this.isDisabled(e)||(this.merge(e),LS.unselect(e))},e.prototype.canMerge=function(e){var t=IS.get(e);if(!t||!t.length)return!1;var n=vp(t[t.length-1][t[t.length-1].length-1],1),r=vp(n[0],2)[1],o=vp(t[0][0],1);return!!yS(e,[vp(o[0],2)[1],r],"table")},e.prototype.merge=function(e){if(this.canMerge(e)){var t=IS.get(e);if(t&&t.length){var n=vp(t[0][0],1),r=vp(n[0],2)[1],o=vp(ap.Node.children(e,r,{reverse:!0}),1),i=vp(o[0],2)[1];ap.Editor.withoutNormalizing(e,(function(){for(var n,o,a=0,s=0,u=t.length-1;u>=0;u-=1,a+=1){s=0;for(var l=t[u].length-1;l>=0;l-=1,s+=1){var c=vp(t[u][l],2),d=vp(c[0],2)[1],f=c[1].ttb;if(!(ap.Path.equals(r,d)||f>1)){try{for(var p=(n=void 0,gp(ap.Node.children(e,d,{reverse:!0}))),h=p.next();!h.done;h=p.next()){var g=vp(h.value,2)[1];ap.Transforms.moveNodes(e,{to:ap.Path.next(i),at:g})}}catch(e){n={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(n)throw n.error}}var v=vp(ap.Editor.nodes(e,{match:mS(e,"tr"),at:d}),1),m=vp(v[0],2)[1];vp(ap.Node.children(e,m),2)[1]&&ap.Transforms.setNodes(e,{hidden:!0},{at:d})}}}ap.Transforms.setNodes(e,{rowSpan:a,colSpan:s},{at:r})}))}}},e}(),MS=function(){function e(){this.title=Dm("tableModule.splitCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M362.667 494.933v53.334l25.6-25.6zm0-241.066L460.8 352V78.933H57.6v98.134h305.067zm0 535.466v57.6H57.6v98.134h403.2V691.2zM661.333 494.933v53.334l-25.6-25.6zm0-241.066L563.2 352V78.933h403.2v98.134H661.333zm0 535.466v57.6H966.4v98.134H563.2V691.2z"/><path d="M753.067 341.333 693.333 281.6 512 460.8 330.667 281.6l-59.734 59.733 181.334 181.334L270.933 704l59.734 59.733L512 582.4l181.333 181.333L753.067 704 571.733 522.667z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=vp(ap.Editor.nodes(e,{match:mS(e,"td")}),1),n=vp(t[0],1)[0],r=n.rowSpan,o=void 0===r?1:r,i=n.colSpan;return!(o>1||(void 0===i?1:i)>1)},e.prototype.exec=function(e,t){this.isDisabled(e)||this.split(e)},e.prototype.split=function(e,t){void 0===t&&(t={});var n=vp(ap.Editor.nodes(e,{match:mS(e,"table","th","td"),at:t.at}),2),r=n[0],o=n[1];if(r&&o){var i=IS.get(e)||[],a=bS(e,{at:t.at});ap.Editor.withoutNormalizing(e,(function(){for(var n=a.length-1;n>=0;n-=1)for(var r=a[n].length-1;r>=0;r-=1){var s=vp(a[n][r],2),u=vp(s[0],2)[1],l=s[1],c=l.ltr,d=l.rtl,f=l.btt,p=l.ttb;if(d>1)r-=d-2;else if(!(p>1||1===f&&1===c)){var h=!!t.all;if(i.length)e:for(var g=0;!t.all&&g<i.length;g+=1)for(var v=0;v<i[g].length;v+=1){var m=vp(i[g][v],1),y=vp(m[0],2)[1];if(ap.Path.equals(y,u)){h=!0;break e}}else{y=vp(o,2)[1];ap.Path.equals(y,u)&&(h=!0)}if(h){e:for(var b=1;b<f;b+=1)for(g=r;g>=0;g-=1){if(1!==vp(a[n+b][g],2)[1].ttb){for(var E=0;E<c;E+=1){var C=vp(a[n+b][g+E],1),D=vp(C[0],2)[1];ap.Transforms.unsetNodes(e,["hidden","colSpan","rowSpan"],{at:D})}continue e}}for(E=1;E<c;E+=1){var w=vp(a[n][r+E],1);D=vp(w[0],2)[1];ap.Transforms.unsetNodes(e,["hidden","colSpan","rowSpan"],{at:D})}ap.Transforms.setNodes(e,{rowSpan:1,colSpan:1},{at:u})}}}}))}},e}(),jS=function(){function e(){this.title=Dm("tableModule.header"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 128l-64 0L384 128 320 128 0 128l0 256 0 64 0 192 0 64 0 256 320 0 64 0 256 0 64 0 320 0 0-256 0-64L1024 448 1024 384 1024 128 704 128zM640 640 384 640 384 448l256 0L640 640zM64 448l256 0 0 192L64 640 64 448zM320 896 64 896l0-192 256 0L320 896zM640 896 384 896l0-192 256 0L640 896zM960 896l-256 0 0-192 256 0L960 896zM960 640l-256 0L704 448l256 0L960 640z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=sg.getSelectedNodeByType(e,"table");return null!=t&&BS(t)},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||null==sg.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=!t,r=sg.getSelectedNodeByType(e,"table");if(null!=r)NS(r).forEach((function(t){return ap.Transforms.setNodes(e,{isHeader:n},{at:sg.findPath(e,t)})}))}},e}(),HS={key:"insertTable",factory:function(){return new PS}},zS={key:"deleteTable",factory:function(){return new OS}},$S={key:"insertTableRow",factory:function(){return new FS}},US={key:"deleteTableRow",factory:function(){return new xS}},VS={key:"insertTableCol",factory:function(){return new kS}},WS={key:"deleteTableCol",factory:function(){return new SS}},GS={key:"tableHeader",factory:function(){return new jS}},qS={key:"tableFullWidth",factory:function(){return new TS}},KS={key:"mergeTableCell",factory:function(){return new _S}},YS={key:"splitTableCell",factory:function(){return new MS}},XS={key:"setTableProperty",factory:function(){return new wS}},ZS={key:"setTableCellProperty",factory:function(){return new AS}};var JS={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=dh(e);0===(t=t.filter((function(e){return"paragraph"===sg.getNodeType(e)||(!!ap.Text.isText(e)||!!n.isInline(e))}))).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=parseInt(r.attr("colSpan")||"1",10),i=parseInt(r.attr("rowSpan")||"1",10),a="none"===DS(r,"display"),s=r.attr("width")||"auto";return{type:"table-cell",isHeader:"th"===CS(r),colSpan:o,rowSpan:i,width:s,children:t,hidden:a}}};var QS={selector:"tr:not([data-w-e-type])",parseElemHtml:function(e,t,n){for(var r,o=[],i=0;i<t.length;i+=1){var a=t[i];if("table-cell"===sg.getNodeType(a)){var s=a.colSpan||1;o.push(a);for(var u=1;u<s;u+=1){var l=t[i+u];l&&"table-cell"===sg.getNodeType(l)&&"none"===(null===(r=l.style)||void 0===r?void 0:r.display)||o.push({type:"table-cell",children:[{text:""}],hidden:!0})}}}return{type:"table-row",children:o}}};var ex,tx={selector:"table:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r,o,i=dh(e),a="auto";"100%"===DS(i,"width")&&(a="100%"),"100%"===i.attr("width")&&(a="100%");var s={type:"table",width:a,height:parseInt(DS(i,"height")||"0",10),children:t.filter((function(e){return"table-row"===sg.getNodeType(e)}))},u=(null===(r=i.find("tr")[0])||void 0===r?void 0:r.children)||[],l=(null===(o=i.find("colgroup")[0])||void 0===o?void 0:o.children)||null;if(l)s.columnWidths=Array.from(l).map((function(e){return parseInt(e.getAttribute("width"),10)}));else if(u.length>0){var c=[];Array.from(u).forEach((function(e){for(var t=parseInt(dh(e).attr("colSpan")||"1",10),n=parseInt(DS(dh(e),"width")||"180",10),r=0;r<t;r+=1)c.push(n)})),s.columnWidths=c}return s}},nx=null===(ex=null===window||void 0===window?void 0:window.getComputedStyle(document.documentElement))||void 0===ex?void 0:ex.getPropertyValue("--w-e-textarea-border-color");function rx(e){var t=e.selection;if(null==t)return!1;var n=vp(ap.Editor.nodes(e,{match:function(e){return sg.checkNodeType(e,"table-cell")}}),1),r=n[0];if(r){var o=vp(r,2)[1],i=ap.Editor.start(e,o);if(ap.Point.equals(t.anchor,i))return!0}return!1}function ox(e,t){var n=t.offset;if(0===n)return!1;var r=ap.Editor.node(e,t);if(!ap.Text.isText(r[0]))return!1;var o=ap.Node.string(r[0]);return!(n>=o.length)&&("\n"===o[n-1]&&"\r"===o[n])}function ix(e,t,n){var r=e.selection;if(null==r||"line"===t)return!1;var o=vp(ap.Editor.nodes(e,{match:function(e){return sg.checkNodeType(e,"table-cell")}}),1),i=o[0],a=r.anchor;if("backward"===n&&0===r.anchor.offset&&(a=ap.Editor.before(e,r)),"forward"===n&&ap.Editor.isEnd(e,r.anchor,r.anchor.path)&&(a=ap.Editor.after(e,r)),null==a)return!1;var s=ap.Editor.above(e,{at:a,match:function(e){return sg.checkNodeType(e,"table-cell")}});if(null==s||null==i||!ap.Path.equals(s[1],i[1]))return!1;var u=ap.Editor.node(e,a);if(!ap.Text.isText(u[0])||u[0].text.length<2)return!1;var l="backward"===n?[a.offset-2,a.offset]:[a.offset,a.offset+2],c=ap.Node.string(u[0]);return"\n\r"===c.slice.apply(c,mp([],vp(l),!1))?(ap.Transforms.insertText(e,c.slice(0,l[0])+c.slice(l[1]),{at:{anchor:ap.Editor.start(e,a.path),focus:ap.Editor.end(e,a.path)}}),!0):!!ox(e,a)&&(ap.Transforms.insertText(e,c.slice(0,r.anchor.offset-1)+c.slice(r.anchor.offset+1),{at:{anchor:ap.Editor.start(e,a.path),focus:ap.Editor.end(e,a.path)}}),!0)}var ax={selector:"table",preParseHtml:function(e){var t=dh(e);if("table"!==CS(t))return e;var n=t.find("tbody");if(0===n.length)return e;var r=t.find("tr");return t.append(r),n.remove(),t[0]}};function sx(e){var t,n,r=[],o=e.reduce((function(e,t){return e+t}),0);try{for(var i=gp(e),a=i.next();!a.done;a=i.next()){var s=a.value;r.push(s/o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var ux=null;var lx=!1,cx=!1,dx=0,fx=0,px=null,hx=dh(window);hx.on("mousedown",(function(e){var t=e.target;if(t.closest('[data-block-type="table-cell"]'))lx=!0;else if("DIV"===t.tagName&&t.closest(".column-resizer-item")){if(null===px)return;var n=vp(ap.Editor.nodes(px,{match:mS(px,"table")}),1),r=vp(n[0],1)[0],o=r.columnWidths,i=void 0===o?[]:o,a=r.resizingIndex,s=void 0===a?-1:a;cx=!0;var u=e.clientX;dx=u,fx=i[s],document.body.style.cursor="col-resize",e.preventDefault()}hx.on("mousemove",gx),hx.on("mouseup",vx)}));var gx=qm((function(e){if(cx&&null!==px){e.preventDefault();var t=e.clientX,n=fx+(t-dx);(n=Math.floor(100*n)/100)<30&&(n=30);var r=vp(ap.Editor.nodes(px,{match:mS(px,"table")}),1),o=vp(r[0],1)[0],i=o.columnWidths,a=void 0===i?[]:i,s=o.resizingIndex,u=void 0===s?-1:s,l=a.reduce((function(e,t){return e+t}),0),c=l-a[u],d=document.querySelector(".table-container");if(!(d&&c+n>d.clientWidth)){var f=mp([],vp(a),!1).map((function(e){return Math.floor(e)}));f[u]=n,ap.Transforms.setNodes(px,{columnWidths:f},{mode:"highest"})}}}),100);function vx(e){lx=!1,cx=!1,px=null,document.body.style.cursor="",hx.off("mousemove",gx),hx.off("mouseup",vx)}function mx(e,t,n,r){if(!e.isDisabled()&&!lx&&!cx){var o=t,i=o.width,a=void 0===i?"auto":i,s=o.columnWidths,u=void 0===s?[]:s,l=o.isHoverCellBorder,c=o.resizingIndex,d=n.clientX,f=n.target;if(yh(f))if(d>(g=f.getBoundingClientRect()).x+5&&d<g.x+g.width-5)return void(l&&ap.Transforms.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"}));if(yh(f)){var p=f.closest(".table");if(p)for(var h=n.clientX,g=p.getBoundingClientRect(),v="100%"===a?sx(u).map((function(e){return e*r})):u,m=function(e){var t,n,r=[],o=0;try{for(var i=gp(e),a=i.next();!a.done;a=i.next())o+=a.value,r.push(o)}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}(v),y=0;y<m.length;y+=1)if(h-g.x>=m[y]-5&&h-g.x<m[y]+5){if(c===y)return;return void ap.Transforms.setNodes(e,{isHoverCellBorder:!0,resizingIndex:y},{mode:"highest"})}}!0===l&&ap.Transforms.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"})}}function yx(e,t){"mouseenter"===t.type?ap.Transforms.setNodes(e,{isResizing:!0},{mode:"highest"}):ap.Transforms.setNodes(e,{isResizing:!1},{mode:"highest"})}var bx={type:"table",renderElem:function(e,t,n){var r=function(e,t){if(e.isDisabled())return!1;var n=e.selection;if(null==n)return!0;if(ap.Range.isCollapsed(n))return!0;var r=n.anchor,o=n.focus,i=sg.findPath(e,t),a=ap.Editor.start(e,i),s=ap.Editor.end(e,i),u=ap.Point.compare(r,s)<=0&&ap.Point.compare(r,a)>=0,l=ap.Point.compare(o,s)<=0&&ap.Point.compare(o,a)>=0;return!!(u&&l&&ap.Path.equals(r.path.slice(0,3),o.path.slice(0,3)))}(n,e),o=e,i=o.width,a=void 0===i?"auto":i,s=o.height,u=o.columnWidths,l=void 0===u?[]:u,c=o.scrollWidth,d=void 0===c?0:c,f=o.isHoverCellBorder,p=o.resizingIndex,h=o.isResizing,g=sg.isNodeSelected(n,e),v=vp(LS.selection(n),1)[0],m=sx(l),y=Dy.jsx("div",{className:"table-container","data-selected":g,on:{mousedown:function(t){if("DIV"===t.target.tagName&&t.preventDefault(),!n.isDisabled()){t.target.closest('[data-block-type="table-cell"]')&&LS.unselect(n);var r=sg.findPath(n,e),o=ap.Editor.start(n,r),i=n.selection;if(null!=i)i.anchor.path[0]!==r[0]&&"DIV"===t.target.tagName&&n.select(o);else n.select(o)}}}},Dy.jsx("table",{width:a,contentEditable:r,className:"table ".concat(v?"table-selection-none":""),style:{width:"100%"===a?a:"".concat(l.reduce((function(e,t){return e+t}),0),"px")},on:{mousemove:Nv((function(t){return mx(n,e,t,d)}),25)}},Dy.jsx("colgroup",{contentEditable:!1},l.map((function(e){return Dy.jsx("col",{width:e})}))),Dy.jsx("tbody",null,t)),Dy.jsx("div",{className:"column-resizer",contentEditable:!1},l.map((function(e,t){var r=e;return"100%"===a&&(r=m[t]*d),Dy.jsx("div",{className:"column-resizer-item",style:{minWidth:"".concat(r,"px")}},Dy.jsx("div",{className:"resizer-line-hotzone ".concat(f&&t===p?"visible ":"").concat(h&&t===p?"highlight":""),style:{height:"".concat(s,"px")},on:{mouseenter:function(e){return yx(n,e)},mouseleave:function(e){return yx(n,e)},mousedown:function(e){return function(e){cx||(px=e)}(n)}}},Dy.jsx("div",{className:"resizer-line"})))})))),b=Dy.h("div",{hook:{insert:function(e){var t=e.elm;return function(e,t){if(yh(t)){var n=t.querySelector("table");n&&(ux=new ResizeObserver((function(t){var n=vp(t,1)[0].contentRect;ap.Transforms.setNodes(e,{scrollWidth:n.width,height:n.height},{mode:"highest"})})),ux.observe(n))}}(n,t)},destroy:function(){ux&&(null==ux||ux.disconnect(),ux=null)}}},y);return b}},Ex={type:"table-cell",renderElem:function(e,t,n){var r=function(e,t){var n=sg.getParentNode(e,t);if(null==n)return!1;var r=sg.getParentNode(e,n);return null!=r&&NS(r).some((function(e){return e===t}))}(n,e),o=e,i=o.colSpan,a=void 0===i?1:i,s=o.rowSpan,u=void 0===s?1:s,l=o.isHeader,c=void 0!==l&&l,d=o.hidden,f=void 0!==d&&d,p=LS.isSelected(n,e);if(!r)return Dy.jsx("td",{colSpan:a,rowSpan:u,"data-block-type":"table-cell",className:p?"w-e-selected":"",style:{display:f?"none":""}},t);var h=c?"th":"td";return Dy.jsx(h,{colSpan:a,rowSpan:u,"data-block-type":"table-cell",className:p?"w-e-selected":"",style:{display:f?"none":""}},t)}};function Cx(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var Dx={renderStyle:function(e,t){var n,r;if(!ap.Element.isElement(e))return t;var o=e,i=o.backgroundColor,a=o.borderWidth,s=o.borderStyle,u=o.borderColor,l=o.textAlign,c={};i&&(c.backgroundColor=i),a&&(c.borderWidth="".concat(a,"px")),s&&(c.borderStyle="none"===s?"":s),u&&(c.borderColor=u),l&&(c.textAlign=l);var d=t;return"table"===e.type?Cx(null===(r=(null===(n=d.children)||void 0===n?void 0:n[0]).children)||void 0===r?void 0:r[0],c):Cx(d,c),d},styleToHtml:function(e,t){if("table"!==e.type&&"table-cell"!==e.type)return t;var n=e.backgroundColor,r=e.borderWidth,o=e.borderStyle,i=e.borderColor,a=e.textAlign;if(!(n||r||o||i||a))return t;var s=dh(t);return n&&s.css("background-color",n),r&&s.css("border-width","".concat(r,"px")),o&&s.css("border-style","none"===o?"":o),i&&s.css("border-color",i),a&&s.css("text-align",a),function(e){return 0===e.length?"":e[0].outerHTML}(s)},parseStyleHtml:function(e,t,n){if("TABLE"!==e.tagName&&"TD"!==e.tagName)return t;var r=dh(e),o=t,i=DS(r,"background-color");i||(i=DS(r,"background")),i&&(o.backgroundColor=i);var a=DS(r,"border");a||"TD"!==e.tagName||(a="1px solid ".concat(nx));var s=vp((null==a?void 0:a.split(" "))||[],3),u=s[0],l=s[1],c=s[2];(u=DS(r,"border-width")||u)&&(o.borderWidth=u.replace(/[^\d]/g,"")),(l=DS(r,"border-style")||l)&&(o.borderStyle="none"===l?"":l),(c=DS(r,"border-color")||c)&&(o.borderColor=c);var d=DS(r,"text-align");return(d=DS(r,"text-align")||d)&&(o.textAlign=d),t},renderElems:[bx,{type:"table-row",renderElem:function(e,t,n){return Dy.jsx("tr",null,t)}},Ex],elemsToHtml:[fS,pS,hS],preParseHtml:[ax],parseElemsHtml:[JS,QS,tx],menus:[HS,zS,$S,US,VS,WS,GS,qS,KS,YS,XS,ZS],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward,r=e.deleteForward,o=e.deleteFragment,i=e.normalizeNode,a=e.insertData,s=e.handleTab,u=e.selectAll,l=e;return l.insertBreak=function(){null==sg.getSelectedNodeByType(l,"table")?t():l.insertText("\n\r")},l.deleteBackward=function(e){if(!rx(l)&&!ix(l,e,"backward")){var t=l.selection;if(t){var r=ap.Editor.before(l,t),o=ap.Editor.above(l,{at:t,match:function(e){return sg.checkNodeType(e,"table-cell")}});if(r){var i=function(e,t){var n=ap.Editor.nodes(e,{at:t,match:function(e){return"table"===sg.getNodeType(e)}});return!!mp([],vp(n),!1).find((function(){return!0}))}(l,r);if(!o&&i&&sg.getSelectedNodeByType(l,"paragraph"))return}}n(e)}},l.handleTab=function(){var t;if(sg.getSelectedNodeByType(l,"table")){var n=ap.Editor.above(e);sg.checkNodeType(n[0],"table-cell")&&ap.Transforms.select(e,n[1]);var r=ap.Editor.next(e);if(r)r[0]&&r[0].text&&(r=null!==(t=ap.Editor.above(e,{at:r[1]}))&&void 0!==t?t:r),ap.Transforms.select(e,r[1]);else{var o=l.children||[],i=o.length;if(sg.checkNodeType(o[i-1],"table")){var a=sg.genEmptyParagraph();ap.Transforms.insertNodes(l,a,{at:[i]}),l.handleTab()}}}else s()},l.deleteForward=function(e){rx(l)||ix(l,e,"forward")||r(e)},l.deleteFragment=function(e){var t=l.selection;if(t){var n,r=!1,i={anchor:t.anchor,focus:t.focus},a=ap.Point.isBefore(i.anchor,i.focus);if(ox(l,t.anchor))(n=ap.Editor[a?"before":"after"](l,t.anchor))&&(i.anchor=n),r=!0;if(ox(l,t.focus))(n=ap.Editor[a?"after":"before"](l,t.focus))&&(i.focus=n),r=!0;r&&ap.Transforms.setSelection(l,i),o(e)}},l.normalizeNode=function(e){var t=vp(e,2),n=t[0],r=t[1];if("table"!==sg.getNodeType(n))return i([n,r]);if(sg.isLastNode(l,n)){var o=sg.genEmptyParagraph();ap.Transforms.insertNodes(l,o,{at:[r[0]+1]})}},l.insertData=function(e){if(null!=sg.getSelectedNodeByType(l,"table")){var t=e.getData("text/plain");"\n"===t||/<img[^>]+>/.test(e.getData("text/html"))?a(e):ap.Editor.insertText(l,t)}else a(e)},l.selectAll=function(){var e=l.selection;if(null!=e){var t=sg.getSelectedNodeByType(l,"table-cell");if(null!=t){var n=e.anchor,r=e.focus;if(ap.Path.equals(n.path.slice(0,3),r.path.slice(0,3)))if(0!==ap.Node.string(t).length){var o=sg.findPath(l,t),i={anchor:ap.Editor.start(l,o),focus:ap.Editor.end(l,o)};l.select(i)}else u();else u()}else u()}else u()},function(e){var t=e.apply;e.apply=function(n){if(!ap.Operation.isSelectionOperation(n)||!n.newProperties)return t(n);var r=fp(fp({},e.selection),n.newProperties);if(!ap.Range.isRange(r))return LS.unselect(e),t(n);var o=vp(ap.Editor.nodes(e,{match:mS(e,"th","td"),at:ap.Range.start(r)}),1)[0],i=vp(ap.Editor.nodes(e,{match:mS(e,"th","td"),at:ap.Range.end(r)}),1)[0];if(!o||!i)return LS.unselect(e),t(n);var a=vp(o,2)[1],s=vp(i,2)[1];if(ap.Path.equals(a,s)||!yS(e,[a,s],"table"))return LS.unselect(e),t(n);for(var u=bS(e,{at:a}),l=ES.valueOf(0,0),c=ES.valueOf(0,0),d=0;d<u.length;d+=1)for(var f=0;f<u[d].length;f+=1){var p=vp(u[d][f],1),h=vp(p[0],2)[1];if(ap.Path.equals(a,h)&&(l.x=d,l.y=f),ap.Path.equals(s,h)){c.x=d,c.y=f;break}}for(var g=ES.valueOf(Math.min(l.x,c.x),Math.min(l.y,c.y)),v=ES.valueOf(Math.max(l.x,c.x),Math.max(l.y,c.y));;){var m=ES.valueOf(g.x,g.y),y=ES.valueOf(v.x,v.y);for(d=m.x;d<=y.x;d+=1)for(f=m.y;f<=y.y;f+=1){var b=vp(u[d][f],2)[1],E=b.rtl,C=b.ltr,D=b.btt,w=b.ttb;m.x=Math.min(m.x,d-(w-1)),m.y=Math.min(m.y,f-(E-1)),y.x=Math.max(y.x,d+(D-1)),y.y=Math.max(y.y,f+(C-1))}if(ES.equals(g,m)&&ES.equals(v,y))break;g=m,v=y}var A=[],S=new WeakSet;for(d=g.x;d<=v.x;d+=1){var x=[];for(f=g.y;f<=v.y;f+=1){var O=vp(u[d][f],1),T=vp(O[0],1)[0];S.add(T),x.push(u[d][f])}A.push(x)}IS.set(e,A),RS.set(e,S),t(n)}}(l),l}};function wx(e){return e.length?e[0].tagName.toLowerCase():""}function Ax(e,t,n,r){void 0===t&&(t="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=dh(e),i=r.width,a=void 0===i?"":i,s=r.height,u=void 0===s?"":s,l="";return a&&(l+="width: ".concat(a,";")),u&&(l+="height: ".concat(u,";")),o.attr("width",t),o.attr("height",n),o.attr("style",l),o[0].outerHTML}Em("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),Em("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}}),ch.append&&(dh.fn.append=ch.append),ch.on&&(dh.fn.on=ch.on),ch.focus&&(dh.fn.focus=ch.focus),ch.attr&&(dh.fn.attr=ch.attr),ch.val&&(dh.fn.val=ch.val),ch.html&&(dh.fn.html=ch.html),ch.parent&&(dh.fn.parent=ch.parent),ch.hasClass&&(dh.fn.hasClass=ch.hasClass),ch.empty&&(dh.fn.empty=ch.empty);var Sx={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,o=void 0===r?"":r,i=n.poster,a=void 0===i?"":i,s=n.width,u=void 0===s?"auto":s,l=n.height,c=void 0===l?"auto":l,d=n.style,f=void 0===d?{}:d,p=n.textAlign,h='<div data-w-e-type="video" data-w-e-is-void style="text-align: '.concat(void 0===p?"center":p,';">\n');if(0===o.trim().indexOf("<iframe ")){h+=Ax(o,u,c,f)}else{var g=f.width,v=void 0===g?"":g,m=f.height,y=void 0===m?"":m,b="";v&&(b+="width: ".concat(v,";")),y&&(b+="height: ".concat(y,";")),h+='<video poster="'.concat(a,'" controls="true" width="').concat(u,'" height="').concat(c,'" style="').concat(b,'"><source src="').concat(o,'" type="video/mp4"/></video>')}return h+="\n</div>"}};function xx(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(ph())}function Ox(e){var t={};return e.trim().split(";").forEach((function(e){if(e){var n=vp(e.split(":"),2),r=n[0],o=n[1];r&&o&&(t[r.trim()]=o.trim())}})),t}function Tx(){return xx("w-e-insert-video")}var Nx=function(){function e(){this.title=Dm("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=Tx(),this.heightInputId=Tx(),this.buttonId=Tx()}return e.prototype.getSelectedVideoNode=function(e){return sg.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=vp(Pm(Dm("videoModule.width"),n,"auto"),2),a=i[0],s=i[1],u=dh(s),l=vp(Pm(Dm("videoModule.height"),r,"auto"),2),c=l[0],d=l[1],f=dh(d),p=vp(Im(o,Dm("videoModule.ok")),1)[0],h=this.getSelectedVideoNode(e);if(null==this.$content){var g=dh("<div></div>");g.on("click","#".concat(o),(function(t){t.preventDefault();var o=g.find("#".concat(n)).val().trim(),i=g.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u="auto",l="auto";a(o)?u=o:s(o)&&(u="".concat(parseInt(o,10),"px")),a(i)?l=i:s(i)&&(l="".concat(parseInt(i,10),"px"));var c=h.style,d=void 0===c?{}:c;e.restoreSelection();var f={style:fp(fp({},d),{width:u,height:l})};ap.Transforms.setNodes(e,f,{match:function(e){return sg.checkNodeType(e,"video")}}),e.hidePanelOrModal()})),this.$content=g}var v=this.$content;if(v.empty(),v.append(a),v.append(c),v.append(p),null==h)return v[0];var m=h.style,y=void 0===m?{}:m,b=y.width,E=void 0===b?"":b,C=y.height,D=void 0===C?"":C;return u.val(E),f.val(D),setTimeout((function(){u.focus()})),v[0]},e}();function Bx(){return xx("w-e-edit-video")}var kx=function(){function e(){this.title=Dm("videoModule.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=Bx(),this.posterInputId=Bx(),this.buttonId=Bx()}return e.prototype.getSelectedVideoNode=function(e){return sg.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=vp(Pm(Dm("videoModule.videoSrc"),r,Dm("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=vp(Pm(Dm("videoModule.videoPoster"),o,Dm("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=dh(u),p=dh(d),h=vp(Im(i,Dm("videoModule.ok")),1)[0];if(null==this.$content){var g=dh("<div></div>");g.on("click","#".concat(i),(function(n){return pp(t,void 0,void 0,(function(){var t,i,a,s;return hp(this,(function(u){return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),a=xx("video-"),s={src:t,poster:i,key:a},e.restoreSelection(),ap.Transforms.setNodes(e,s,{match:function(e){return sg.checkNodeType(e,"video")}}),e.hidePanelOrModal(),[2]}))}))})),this.$content=g}var v=this.$content;v.empty(),v.append(s),v.append(c),v.append(h);var m=this.getSelectedVideoNode(e);if(null==m)return v[0];var y=m.src,b=void 0===y?"":y,E=m.poster,C=void 0===E?"":E;return f.val(b),p.val(C),setTimeout((function(){f.focus()})),v[0]},e}();function Fx(e,t){return pp(this,arguments,void 0,(function(e,t,n,r,o){var i,a,s,u,l,c,d;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o=""),hp(this,(function(f){switch(f.label){case 0:return t?(e.restoreSelection(),i=e.getMenuConfig("insertVideo"),a=i.onInsertedVideo,s=i.checkVideo,u=i.parseVideoSrc,[4,s(t,n)]):[2];case 1:return"string"==typeof(l=f.sent())?(e.alert(l,"error"),[2]):null==l?[2]:[4,u(t)];case 2:return 0!==(c=f.sent()).trim().indexOf("<iframe ")&&(c=function(e){return e.replace(/</g,"<").replace(/>/g,">")}(c)),d={type:"video",src:c,poster:n,children:[{text:""}],style:{width:r,height:o}},Promise.resolve().then((function(){sg.isSelectedEmptyParagraph(e)&&ap.Transforms.removeNodes(e,{mode:"highest"}),ap.Transforms.insertNodes(e,d,{mode:"highest"})})),a(d),[2]}}))}))}function Px(){return xx("w-e-insert-video")}var Ix=function(){function e(){this.title=Dm("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=Px(),this.posterInputId=Px(),this.buttonId=Px()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||!!sg.getSelectedElems(e).some((function(t){var n=sg.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))})))},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=vp(Pm(Dm("videoModule.videoSrc"),r,Dm("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=vp(Pm(Dm("videoModule.videoPoster"),o,Dm("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=dh(u),p=dh(d),h=vp(Im(i,Dm("videoModule.ok")),1)[0];if(null==this.$content){var g=dh("<div></div>");g.on("click","#".concat(i),(function(n){return pp(t,void 0,void 0,(function(){var t,i;return hp(this,(function(a){switch(a.label){case 0:return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),[4,Fx(e,t,i)];case 1:return a.sent(),e.hidePanelOrModal(),[2]}}))}))})),this.$content=g}var v=this.$content;return v.empty(),v.append(s),v.append(c),v.append(h),f.val(""),p.val(""),setTimeout((function(){f.focus()})),v[0]},e}();function Rx(e){return e.getMenuConfig("uploadVideo")}var Lx=new WeakMap;function _x(e,t){return pp(this,void 0,void 0,(function(){var n,r;return hp(this,(function(o){switch(o.label){case 0:return n=function(e){var t=Lx.get(e);if(null!=t)return t;var n=Rx(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=RC(fp(fp({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,(function(t,n){return Fx(e,t,n)})),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){var c=l.url,d=void 0===c?"":c,f=l.poster;Fx(e,d,void 0===f?"":f),r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),Lx.set(e,t),t}(e),r=t.map((function(e){return{name:e.name,type:e.type,size:e.size,data:e}})),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}}))}))}var Mx=function(){function e(){this.title=Dm("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i((function(t,n){return Fx(e,t,n)}));else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=dh("body"),u=dh('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",(function(){var t=u[0].files;!function(e,t){pp(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,l,c,d,f,p;return hp(this,(function(h){switch(h.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=[],o=Rx(e).customUpload,h.label=1;case 1:h.trys.push([1,8,9,14]),i=!0,a=yp(n),h.label=2;case 2:return[4,a.next()];case 3:return s=h.sent(),(c=s.done)?[3,7]:(p=s.value,i=!1,u=p,o?[4,o(u,(function(t,n){return Fx(e,t,n)}))]:[3,5]);case 4:return h.sent(),[3,6];case 5:r.push(u),h.label=6;case 6:return i=!0,[3,2];case 7:return[3,14];case 8:return l=h.sent(),d={error:l},[3,14];case 9:return h.trys.push([9,,12,13]),i||c||!(f=a.return)?[3,11]:[4,f.call(a)];case 10:h.sent(),h.label=11;case 11:return[3,13];case 12:if(d)throw d.error;return[7];case 13:return[7];case 14:return r.length>0?[4,_x(e,r)]:[3,16];case 15:h.sent(),h.label=16;case 16:return[2]}}))}))}(e,t)}))}},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!ap.Range.isCollapsed(t)||!!sg.getSelectedElems(e).some((function(t){var n=sg.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))})))},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadVideo")},e}();function jx(e,t,n,r,o){return void 0===t&&(t=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),{type:"video",src:e,poster:t,width:n,height:r,style:o,children:[{text:""}]}}var Hx={type:"video",renderElem:function(e,t,n){var r,o=e,i=o.src,a=void 0===i?"":i,s=o.poster,u=void 0===s?"":s,l=o.key,c=void 0===l?"":l,d=o.width,f=void 0===d?"auto":d,p=o.height,h=void 0===p?"auto":p,g=o.style,v=void 0===g?{}:g,m=o.textAlign,y=void 0===m?"center":m,b=sg.isNodeSelected(n,e);if(0===a.trim().indexOf("<iframe ")){var E=Ax(a,f,h,v);r=Dy.jsx("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y},innerHTML:E})}else{var C=Dy.jsx("video",{key:c,poster:u,controls:!0,style:v},Dy.jsx("source",{src:a,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==f&&(C.data.width=f),"auto"!==h&&(C.data.height=h),r=Dy.jsx("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y}},C)}var D=Dy.h("div",{props:{contentEditable:!1},on:{mousedown:function(e){return e.preventDefault()}}},r);return D}},zx={renderElems:[Hx],elemsToHtml:[Sx],preParseHtml:[{selector:"iframe,video,p",preParseHtml:function(e){var t=dh(e),n=t;if("p"===wx(t)){var r=t.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=dh(o))}}var a=wx(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var s=dh('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return s.append(n),s[0]}}],parseElemsHtml:[{selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=dh(e),o="",i="",a="auto",s="auto",u={},l=r.find("iframe");if(l.length>0)return a=l.attr("width")||"auto",s=l.attr("height")||"auto",u=Ox(u=l.attr("style")||""),jx(o=l[0].outerHTML,i,a,s,u);var c=r.find("video");return(o=c.attr("src")||"")||c.length>0&&(o=c.find("source").attr("src")||""),a=c.attr("width")||"auto",s=c.attr("height")||"auto",jx(o,i=c.attr("poster")||"",a,s,u=Ox(u=c.attr("style")||""))}}],menus:[{key:"insertVideo",factory:function(){return new Ix},config:{onInsertedVideo:function(e){},checkVideo:function(e,t){return!0},parseVideoSrc:function(e){return e}}},{key:"uploadVideo",factory:function(){return new Mx},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name," upload error"),t,n)}}},{key:"editVideoSize",factory:function(){return new Nx}},{key:"editVideoSrc",factory:function(){return new kx}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"video"===e.type||t(e)},r.normalizeNode=function(e){var t=vp(e,2),o=t[0],i=t[1];"video"===sg.getNodeType(o)&&(sg.isLastNode(r,o)&&ap.Transforms.insertNodes(r,sg.genEmptyParagraph(),{at:[i[0]+1]}));return n([o,i])},r}};Em("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),Em("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});ch.append&&(dh.fn.append=ch.append),ch.on&&(dh.fn.on=ch.on),ch.remove&&(dh.fn.remove=ch.remove),ch.val&&(dh.fn.val=ch.val),ch.click&&(dh.fn.click=ch.click),ch.hide&&(dh.fn.hide=ch.hide);var $x=new WeakMap;function Ux(e){return e.getMenuConfig("uploadImage")}function Vx(e,t){return pp(this,void 0,void 0,(function(){return hp(this,(function(n){return[2,new Promise((function(n){var r=new FileReader;r.readAsDataURL(t),r.onload=function(){var o=r.result;if(o){var i=o.toString(),a=0===i.indexOf("data:image")?"":i;Bw(e,i,t.name,a),n("ok")}}}))]}))}))}function Wx(e,t){return pp(this,void 0,void 0,(function(){var n,r;return hp(this,(function(o){switch(o.label){case 0:return n=function(e){var t=$x.get(e);if(null!=t)return t;var n=Ux(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=RC(fp(fp({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,(function(t,n,r){return Bw(e,t,n,r)})),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){if(Array.isArray(l))l.forEach((function(t){var n=t.url,r=void 0===n?"":n,o=t.alt,i=void 0===o?"":o,a=t.href;Bw(e,r,i,void 0===a?"":a)}));else{var c=l.url,d=void 0===c?"":c,f=l.alt,p=void 0===f?"":f,h=l.href;Bw(e,d,p,void 0===h?"":h)}r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),$x.set(e,t),t}(e),r=t.map((function(e){return{name:e.name,type:e.type,size:e.size,data:e}})),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}}))}))}function Gx(e,t){return pp(this,void 0,void 0,(function(){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v;return hp(this,(function(m){switch(m.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=Ux(e),o=r.customUpload,i=r.base64LimitSize,a=[],m.label=1;case 1:m.trys.push([1,10,11,16]),s=!0,u=yp(n),m.label=2;case 2:return[4,u.next()];case 3:return l=m.sent(),(p=l.done)?[3,9]:(v=l.value,s=!1,d=(c=v).size,i&&d<=i?[4,Vx(e,c)]:[3,5]);case 4:return m.sent(),[3,8];case 5:return o?[4,o(c,(function(t,n,r){return Bw(e,t,n,r)}))]:[3,7];case 6:return m.sent(),[3,8];case 7:a.push(c),m.label=8;case 8:return s=!0,[3,2];case 9:return[3,16];case 10:return f=m.sent(),h={error:f},[3,16];case 11:return m.trys.push([11,,14,15]),s||p||!(g=u.return)?[3,13]:[4,g.call(u)];case 12:m.sent(),m.label=13;case 13:return[3,15];case 14:if(h)throw h.error;return[7];case 15:return[7];case 16:return a.length>0?[4,Wx(e,a)]:[3,18];case 17:m.sent(),m.label=18;case 18:return[2]}}))}))}var qx=function(){function e(){this.title=Dm("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return Ow(e)},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadImage")},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i((function(t,n,r){return Bw(e,t,n,r)}));else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=dh("body"),u=dh('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",(function(){var t=u[0].files;Gx(e,t)}))}},e}();var Kx={menus:[{key:"uploadImage",factory:function(){return new qx},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name,"' upload error"),n)},base64LimitSize:0}}],editorPlugin:function(e){var t=e.insertData,n=e;return n.insertData=function(r){if(Ow(n))t(r);else if(r.getData("text/plain"))t(r);else{var o=r.files;if(o.length<=0)t(r);else Array.prototype.slice.call(o).some((function(e){return"image"===vp(e.type.split("/"),1)[0]}))?Gx(e,o):t(r)}},n}};Em("en",{highLightModule:{selectLang:"Language"}}),Em("zh-CN",{highLightModule:{selectLang:"选择语言"}});var Yx,Xx={exports:{}};var Zx=(Yx||(Yx=1,function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof i?new i(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,i;switch(n=n||{},o.util.type(t)){case"Object":if(i=o.util.objId(t),n[i])return n[i];for(var a in r={},n[i]=r,t)t.hasOwnProperty(a)&&(r[a]=e(t[a],n));return r;case"Array":return i=o.util.objId(t),n[i]?n[i]:(r=[],n[i]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e],a={};for(var s in i)if(i.hasOwnProperty(s)){if(s==t)for(var u in n)n.hasOwnProperty(u)&&(a[u]=n[u]);n.hasOwnProperty(s)||(a[s]=i[s])}var l=r[e];return r[e]=a,o.languages.DFS(o.languages,(function(t,n){n===l&&t!=e&&(this[t]=a)})),a},DFS:function e(t,n,r,i){i=i||{};var a=o.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var u=t[s],l=o.util.type(u);"Object"!==l||i[a(u)]?"Array"!==l||i[a(u)]||(i[a(u)]=!0,e(u,n,s,i)):(i[a(u)]=!0,e(u,n,null,i))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var i,a=0;i=r.elements[a++];)o.highlightElement(i,!0===t,r.callback)},highlightElement:function(t,n,r){var i=o.util.getLanguage(t),a=o.languages[i];o.util.setLanguage(t,i);var s=t.parentElement;s&&"pre"===s.nodeName.toLowerCase()&&o.util.setLanguage(s,i);var u={element:t,language:i,grammar:a,code:t.textContent};function l(e){u.highlightedCode=e,o.hooks.run("before-insert",u),u.element.innerHTML=u.highlightedCode,o.hooks.run("after-highlight",u),o.hooks.run("complete",u),r&&r.call(u.element)}if(o.hooks.run("before-sanity-check",u),(s=u.element.parentElement)&&"pre"===s.nodeName.toLowerCase()&&!s.hasAttribute("tabindex")&&s.setAttribute("tabindex","0"),!u.code)return o.hooks.run("complete",u),void(r&&r.call(u.element));if(o.hooks.run("before-highlight",u),u.grammar)if(n&&e.Worker){var c=new Worker(o.filename);c.onmessage=function(e){l(e.data)},c.postMessage(JSON.stringify({language:u.language,code:u.code,immediateClose:!0}))}else l(o.highlight(u.code,u.grammar,u.language));else l(o.util.encode(u.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),i.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new u;return l(o,o.head,e),s(e,o,t,o.head,0),function(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}},Token:i};function i(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function a(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var i=o[1].length;o.index+=i,o[0]=o[0].slice(i)}return o}function s(e,t,n,r,u,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var h=0;h<p.length;++h){if(d&&d.cause==f+","+h)return;var g=p[h],v=g.inside,m=!!g.lookbehind,y=!!g.greedy,b=g.alias;if(y&&!g.pattern.global){var E=g.pattern.toString().match(/[imsuy]*$/)[0];g.pattern=RegExp(g.pattern.source,E+"g")}for(var C=g.pattern||g,D=r.next,w=u;D!==t.tail&&!(d&&w>=d.reach);w+=D.value.length,D=D.next){var A=D.value;if(t.length>e.length)return;if(!(A instanceof i)){var S,x=1;if(y){if(!(S=a(C,w,e,m))||S.index>=e.length)break;var O=S.index,T=S.index+S[0].length,N=w;for(N+=D.value.length;O>=N;)N+=(D=D.next).value.length;if(w=N-=D.value.length,D.value instanceof i)continue;for(var B=D;B!==t.tail&&(N<T||"string"==typeof B.value);B=B.next)x++,N+=B.value.length;x--,A=e.slice(w,N),S.index-=w}else if(!(S=a(C,0,A,m)))continue;O=S.index;var k=S[0],F=A.slice(0,O),P=A.slice(O+k.length),I=w+A.length;d&&I>d.reach&&(d.reach=I);var R=D.prev;if(F&&(R=l(t,R,F),w+=F.length),c(t,R,x),D=l(t,R,new i(f,v?o.tokenize(k,v):k,b,k)),P&&l(t,D,P),x>1){var L={cause:f+","+h,reach:I};s(e,t,n,D.prev,w,L),d&&L.reach>d.reach&&(d.reach=L.reach)}}}}}}function u(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function c(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,i.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var i={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},a=t.alias;a&&(Array.isArray(a)?Array.prototype.push.apply(i.classes,a):i.classes.push(a)),o.hooks.run("wrap",i);var s="";for(var u in i.attributes)s+=" "+u+'="'+(i.attributes[u]||"").replace(/"/g,""")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+s+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,i=n.code,a=n.immediateClose;e.postMessage(o.highlight(i,o.languages[r],r)),a&&e.close()}),!1),o):o;var d=o.util.currentScript();function f(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var p=document.readyState;"loading"===p||"interactive"===p&&d&&d.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});
|
|
20
20
|
/**
|
|
21
21
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
22
22
|
*
|
|
@@ -24,5 +24,5 @@ function e(e){return"[object Object]"===Object.prototype.toString.call(e)}return
|
|
|
24
24
|
* @author Lea Verou <https://lea.verou.me>
|
|
25
25
|
* @namespace
|
|
26
26
|
* @public
|
|
27
|
-
*/e.exports&&(e.exports=t),void 0!==b&&(b.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",i="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",(function(e){e.selector+=", "+i})),t.hooks.add("before-sanity-check",(function(a){var s=a.element;if(s.matches(i)){a.code="",s.setAttribute(n,r);var u=s.appendChild(document.createElement("CODE"));u.textContent="Loading…";var l=s.getAttribute("data-src"),c=a.language;if("none"===c){var d=(/\.(\w+)$/.exec(l)||[,"none"])[1];c=e[d]||d}t.util.setLanguage(u,c),t.util.setLanguage(s,c);var f=t.plugins.autoloader;f&&f.loadLanguages(c),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(l,(function(e){s.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(r){var i=e.split(/\r\n?|\n/g),a=r[0],l=null==r[1]?i.length:r[1];a<0&&(a+=i.length),a=Math.max(0,Math.min(a-1,i.length)),l<0&&(l+=i.length),l=Math.max(0,Math.min(l,i.length)),e=i.slice(a,l).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}u.textContent=e,t.highlightElement(u)}),(function(e){s.setAttribute(n,"failed"),u.textContent=e}))}})),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(i),o=0;n=r[o++];)t.highlightElement(n)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(Zx)),Zx.exports),Qx=E(Jx);!function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return o})),RegExp(e,t)}o=i(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var a=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(a).join(""):""},s=function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===a(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:a(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var u=a(o);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(u+=a(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(u=a(t[r-1])+u,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",u,null,u)}o.content&&"string"!=typeof o.content&&s(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(Prism);var eO;eO||(eO=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];var tO;tO||(tO=1,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(Prism)),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean;var nO;nO||(nO=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python);var rO;rO||(rO=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism));var oO;oO||(oO=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism));var iO;iO||(iO=1,function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function u(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var l=u(i),c=RegExp(u(o+" "+i+" "+a+" "+s)),d=u(i+" "+a+" "+s),f=u(o+" "+i+" "+s),p=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,v=t(/<<0>>(?:\s*<<1>>)?/.source,[g,p]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,v]),y=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),E=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,h,y]),C=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[E]),D=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[C,m,y]),w={keyword:c,punctuation:/[<>()?,.:[\]]/},A=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,x=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[x]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,D]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[l,v]),lookbehind:!0,inside:w},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:w},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:w},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[D,f,g]),inside:w}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[D,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[D]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,p]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(p),alias:"class-name",inside:w}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,v,g,D,c.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[v,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(D),greedy:!0,inside:w},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var O=S+"|"+A,T=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[O]),N=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,k=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,N]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,k]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[N]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var F=/:[^}\r\n]+/.source,P=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),I=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,F]),R=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[O]),2),L=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[R,F]);function _(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,F]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[I]),lookbehind:!0,greedy:!0,inside:_(I,P)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:_(L,R)}],char:{pattern:RegExp(A),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)),Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};var aO;aO||(aO=1,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift})),function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,a=0;a<o.length;a++)i[o[a]]=e.languages.bash[o[a]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],a=o.content[3];if(i&&a&&"code-language"===i.type&&"code-block"===a.type&&"string"==typeof i.content){var s=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),u="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,u]:a.alias.push(u):a.alias=[u]}}else e(o.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],l=/language-(.+)/.exec(i);if(l){n=l[1];break}}var c=e.languages[n];if(c)t.content=e.highlight(function(e){var t=e.replace(a,"");return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),u(n);var r=s[t];return r||e})),t}(t.content),c,n);else if(n&&"none"!==n&&e.plugins.autoloader){var d="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=d,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(d);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(e){var t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.groovy}(Prism),Prism.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/};var sO=["comment","prolog","doctype","cdata","punctuation","namespace","property","tag","boolean","number","constant","symbol","deleted","selector","attr-name","string","builtin","inserted","operator","entity","url","string","atrule","attr-value","keyword","function","class-name","regex","important","variable","bold","italic","entity","char"];function uO(e){return"string"==typeof e?e.length:"string"==typeof e.content?e.content.length:e.content.reduce((function(e,t){return e+uO(t)}),0)}var lO=function(e){var t,n,r,o=vp(e,2),i=o[0],a=o[1],s=[],u=function(e){if(!ap.Text.isText(e))return null;var t=ug.getParentNode(null,e);if(t&&"code"===ug.getNodeType(t)){var n=ug.getParentNode(null,t);if(n&&"pre"===ug.getNodeType(n))return t}return null}(i);if(null==u)return s;var l=u.language,c=void 0===l?"":l;if(!c)return s;var d=function(e,t){if(!t)return[];var n=Qx.languages[t];return n?Qx.tokenize(e.text,n):[]}(i,c),f=0;try{for(var p=gp(d),h=p.next();!h.done;h=p.next()){var g=h.value,v=f+uO(g);"string"!=typeof g&&s.push(((r={})[g.type]=!0,r.anchor={path:a,offset:f},r.focus={path:a,offset:v},r)),f=v}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return s};var cO={type:"code",elemToHtml:function(e,t){var n=e.language,r=void 0===n?"":n,o=r?'class="language-'.concat(r,'"'):"";return"<code ".concat(o,">").concat(t,"</code>")}};var dO=function(){function e(){this.title=wm("highLightModule.selectLang"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 64v896h896V64H64z m487.6 698.8c0 87.2-51.2 127-125.8 127-67.4 0-106.4-34.8-126.4-77l68.6-41.4c13.2 23.4 25.2 43.2 54.2 43.2 27.6 0 45.2-10.8 45.2-53V475.4h84.2v287.4z m199.2 127c-78.2 0-128.8-37.2-153.4-86l68.6-39.6c18 29.4 41.6 51.2 83 51.2 34.8 0 57.2-17.4 57.2-41.6 0-28.8-22.8-39-61.4-56l-21-9c-60.8-25.8-101-58.4-101-127 0-63.2 48.2-111.2 123.2-111.2 53.6 0 92 18.6 119.6 67.4L800 580c-14.4-25.8-30-36-54.2-36-24.6 0-40.2 15.6-40.2 36 0 25.2 15.6 35.4 51.8 51.2l21 9c71.6 30.6 111.8 62 111.8 132.4 0 75.6-59.6 117.2-139.4 117.2z"></path></svg>',this.tag="select",this.width=95,this.selectPanelWidth=115,this.defaultCodeLang=""}return e.prototype.getOptions=function(e){var t=this,n=[],r=e.getMenuConfig("codeSelectLang").codeLangs,o=void 0===r?[]:r;n.push({text:"plain text",value:""}),o.forEach((function(e){var r=e.text,o=e.value;e.selected&&(t.defaultCodeLang=o),n.push({text:r,value:o})}));var i=this.getValue(e);return n.forEach((function(e){e.value===i?e.selected=!0:delete e.selected})),n},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);if(null==t)return this.defaultCodeLang;if(!ap.Element.isElement(t))return this.defaultCodeLang;var n=t.language.toString(),r=e.getMenuConfig("codeSelectLang").codeLangs;return(void 0===r?[]:r).some((function(e){return e.value===n}))?n:this.defaultCodeLang},e.prototype.isDisabled=function(e){return null==e.selection||!this.getSelectCodeElem(e)},e.prototype.exec=function(e,t){if(null!=this.getSelectCodeElem(e)){var n={language:t.toString()};ap.Transforms.setNodes(e,n,{match:function(e){return ug.checkNodeType(e,"code")}})}},e.prototype.getSelectCodeElem=function(e){var t=ug.getSelectedNodeByType(e,"code");if(null==t)return null;var n=ug.getParentNode(e,t);return ap.Element.isElement(n)?"pre"!==n.type?null:t:null},e}(),fO={key:"codeSelectLang",factory:function(){return new dO},config:{codeLangs:[{text:"CSS",value:"css"},{text:"HTML",value:"html"},{text:"XML",value:"xml"},{text:"Javascript",value:"javascript"},{text:"Typescript",value:"typescript"},{text:"JSX",value:"jsx"},{text:"Go",value:"go"},{text:"PHP",value:"php"},{text:"C",value:"c"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C++",value:"cpp"},{text:"C#",value:"csharp"},{text:"Visual Basic",value:"visual-basic"},{text:"SQL",value:"sql"},{text:"Ruby",value:"ruby"},{text:"Swift",value:"swift"},{text:"Bash",value:"bash"},{text:"Lua",value:"lua"},{text:"Groovy",value:"groovy"},{text:"Markdown",value:"markdown"},{text:"ABAP",value:"abap"}]}};dh.attr&&(fh.fn.attr=dh.attr);var pO={renderStyle:function(e,t){var n=e,r=t,o="";return sO.forEach((function(e){n[e]&&(o=e)})),o&&function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={}),Object.assign(n.props,{className:t})}(r,o="token ".concat(o)),r},parseStyleHtml:function(e,t,n){var r=fh(e);if(!ap.Element.isElement(t))return t;if("code"!==ug.getNodeType(t))return t;var o=t,i=r.attr("class")||"";return 0===i.indexOf("language-")?o.language=i.split("-")[1]||"":o.language=i.toLowerCase(),o},menus:[fO],elemsToHtml:[cO]},hO=function(){function e(){throw new Error("不能实例化\nCan not construct a instance")}return e.setEditorConfig=function(e){void 0===e&&(e={}),this.editorConfig=fp(fp({},this.editorConfig),e)},e.setSimpleEditorConfig=function(e){void 0===e&&(e={}),this.simpleEditorConfig=fp(fp({},this.simpleEditorConfig),e)},e.setToolbarConfig=function(e){void 0===e&&(e={}),this.toolbarConfig=fp(fp({},this.toolbarConfig),e)},e.setSimpleToolbarConfig=function(e){void 0===e&&(e={}),this.simpleToolbarConfig=fp(fp({},this.simpleToolbarConfig),e)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerMenu=function(e,t){Bp(e,t)},e.registerRenderElem=function(e){var t,n,r;n=(t=e).type,r=t.renderElem,Sy[n||""]=r},e.registerRenderStyle=function(e){!function(e){Dy.push(e)}(e)},e.registerElemToHtml=function(e){!function(e){var t=e.type,n=e.elemToHtml;Kh[t||""]=n}(e)},e.registerStyleToHtml=function(e){!function(e){Wh.push(e)}(e)},e.registerPreParseHtml=function(e){var t;t=e,Ih.push(t)},e.registerParseElemHtml=function(e){!function(e){var t=e.selector,n=e.parseElemHtml;Lh[t]=n}(e)},e.registerParseStyleHtml=function(e){!function(e){Rh.push(e)}(e)},e.registerModule=function(e){gO(e)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function gO(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,o=e.elemsToHtml,i=e.styleToHtml,a=e.preParseHtml,s=e.parseElemsHtml,u=e.parseStyleHtml,l=e.editorPlugin;t&&t.forEach((function(e){return hO.registerMenu(e)})),n&&n.forEach((function(e){return hO.registerRenderElem(e)})),r&&hO.registerRenderStyle(r),o&&o.forEach((function(e){return hO.registerElemToHtml(e)})),i&&hO.registerStyleToHtml(i),a&&a.forEach((function(e){return hO.registerPreParseHtml(e)})),s&&s.forEach((function(e){return hO.registerParseElemHtml(e)})),u&&hO.registerParseStyleHtml(u),l&&hO.registerPlugin(l)}ZA.forEach((function(e){return gO(e)})),gO(fS),gO(wx),gO($x),gO(Yx),gO(pO);var vO='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',mO='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',yO='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',bO='<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',EO='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>';var CO={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editorImageSizeMenu","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable","mergeTableCell","splitTableCell","setTableProperty","setTableCellProperty"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize","editVideoSrc"]}};var DO={hoverbarKeys:fp(fp({},CO),{text:{menuKeys:["formatPainter","headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};hO.setEditorConfig(fp(fp({},DO),{decorate:lO}));var wO={hoverbarKeys:CO};hO.setSimpleEditorConfig(fp(fp({},wO),{decorate:lO}));var AO={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:wm("editor.more"),iconSvg:bO,menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:wm("editor.justify"),iconSvg:mO,menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:wm("editor.indent"),iconSvg:vO,menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:wm("editor.image"),iconSvg:yO,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:wm("editor.video"),iconSvg:EO,menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","formatPainter","fullScreen"]};hO.setToolbarConfig(AO);var SO={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:wm("editor.image"),iconSvg:yO,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};hO.setSimpleToolbarConfig(SO);e.Boot=hO,e.DomEditor=ug,e.SlateEditor=ap.Editor,e.SlateElement=ap.Element,e.SlateLocation=ap.Location,e.SlateNode=ap.Node,e.SlatePath=ap.Path,e.SlatePoint=ap.Point,e.SlateRange=ap.Range,e.SlateText=ap.Text,e.SlateTransforms=ap.Transforms,e.Toolbar=Uy,e.createEditor=function(e){void 0===e&&(e={});var t=e.selector,n=void 0===t?"":t,r=e.content,o=void 0===r?[]:r,i=e.html,a=e.config,s=void 0===a?{}:a,u=e.mode,l="simple"===(void 0===u?"default":u)?hO.simpleEditorConfig:hO.editorConfig,c=fp(fp({},l.hoverbarKeys||{}),s.hoverbarKeys||{});return $y({selector:n,config:fp(fp(fp({},l),s),{hoverbarKeys:c}),content:o,html:i,plugins:hO.plugins})},e.createToolbar=function(e){var t=e.selector,n=e.editor,r=e.config,o=void 0===r?{}:r,i=e.mode,a=void 0===i?"default":i;if(!t)throw new Error("Cannot find 'selector' when create toolbar");var s="simple"===a?hO.simpleToolbarConfig:hO.toolbarConfig;return Vy(n,{selector:t,config:fp(fp({},s),o)})},e.createUploader=LC,e.default={},e.genModalButtonElems=Rm,e.genModalInputElems=Im,e.genModalTextareaElems=function(e,t,n){var r=fh('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=fh('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]},e.i18nAddResources=Cm,e.i18nChangeLanguage=function(e){bm.changeLanguage(e)},e.i18nGetResources=function(e){return bm.getResourceBundle(e,Em)},e.t=wm,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
27
|
+
*/e.exports&&(e.exports=t),void 0!==b&&(b.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",i="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",(function(e){e.selector+=", "+i})),t.hooks.add("before-sanity-check",(function(a){var s=a.element;if(s.matches(i)){a.code="",s.setAttribute(n,r);var u=s.appendChild(document.createElement("CODE"));u.textContent="Loading…";var l=s.getAttribute("data-src"),c=a.language;if("none"===c){var d=(/\.(\w+)$/.exec(l)||[,"none"])[1];c=e[d]||d}t.util.setLanguage(u,c),t.util.setLanguage(s,c);var f=t.plugins.autoloader;f&&f.loadLanguages(c),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(l,(function(e){s.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(r){var i=e.split(/\r\n?|\n/g),a=r[0],l=null==r[1]?i.length:r[1];a<0&&(a+=i.length),a=Math.max(0,Math.min(a-1,i.length)),l<0&&(l+=i.length),l=Math.max(0,Math.min(l,i.length)),e=i.slice(a,l).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}u.textContent=e,t.highlightElement(u)}),(function(e){s.setAttribute(n,"failed"),u.textContent=e}))}})),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(i),o=0;n=r[o++];)t.highlightElement(n)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(Xx)),Xx.exports),Jx=E(Zx);!function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return o})),RegExp(e,t)}o=i(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var a=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(a).join(""):""},s=function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===a(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:a(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var u=a(o);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(u+=a(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(u=a(t[r-1])+u,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",u,null,u)}o.content&&"string"!=typeof o.content&&s(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)}))}(Prism);var Qx;Qx||(Qx=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];var eO;eO||(eO=1,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",(function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(Prism)),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean;var tO;tO||(tO=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python);var nO;nO||(nO=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism));var rO;rO||(rO=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism));var oO;oO||(oO=1,function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function u(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var l=u(i),c=RegExp(u(o+" "+i+" "+a+" "+s)),d=u(i+" "+a+" "+s),f=u(o+" "+i+" "+s),p=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,v=t(/<<0>>(?:\s*<<1>>)?/.source,[g,p]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,v]),y=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),E=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,h,y]),C=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[E]),D=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[C,m,y]),w={keyword:c,punctuation:/[<>()?,.:[\]]/},A=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,x=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[x]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,D]),lookbehind:!0,inside:w},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[l,v]),lookbehind:!0,inside:w},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:w},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:w},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[D,f,g]),inside:w}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[D,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[D]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,p]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(p),alias:"class-name",inside:w}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,v,g,D,c.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[v,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(D),greedy:!0,inside:w},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var O=S+"|"+A,T=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[O]),N=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,k=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,N]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,k]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[N]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var F=/:[^}\r\n]+/.source,P=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[T]),2),I=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,F]),R=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[O]),2),L=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[R,F]);function _(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,F]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[I]),lookbehind:!0,greedy:!0,inside:_(I,P)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:_(L,R)}],char:{pattern:RegExp(A),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)),Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};var iO;iO||(iO=1,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift})),function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,a=0;a<o.length;a++)i[o[a]]=e.languages.bash[o[a]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,(function(){return t})),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,(function(){return r})),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike","code-snippet"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],a=o.content[3];if(i&&a&&"code-language"===i.type&&"code-block"===a.type&&"string"==typeof i.content){var s=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),u="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,u]:a.alias.push(u):a.alias=[u]}}else e(o.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],l=/language-(.+)/.exec(i);if(l){n=l[1];break}}var c=e.languages[n];if(c)t.content=e.highlight(function(e){var t=e.replace(a,"");return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,(function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),u(n);var r=s[t];return r||e})),t}(t.content),c,n);else if(n&&"none"!==n&&e.plugins.autoloader){var d="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=d,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(d);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}}));var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(e){var t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.groovy}(Prism),Prism.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/};var aO=["comment","prolog","doctype","cdata","punctuation","namespace","property","tag","boolean","number","constant","symbol","deleted","selector","attr-name","string","builtin","inserted","operator","entity","url","string","atrule","attr-value","keyword","function","class-name","regex","important","variable","bold","italic","entity","char"];function sO(e){return"string"==typeof e?e.length:"string"==typeof e.content?e.content.length:e.content.reduce((function(e,t){return e+sO(t)}),0)}var uO=function(e){var t,n,r,o=vp(e,2),i=o[0],a=o[1],s=[],u=function(e){if(!ap.Text.isText(e))return null;var t=sg.getParentNode(null,e);if(t&&"code"===sg.getNodeType(t)){var n=sg.getParentNode(null,t);if(n&&"pre"===sg.getNodeType(n))return t}return null}(i);if(null==u)return s;var l=u.language,c=void 0===l?"":l;if(!c)return s;var d=function(e,t){if(!t)return[];var n=Jx.languages[t];return n?Jx.tokenize(e.text,n):[]}(i,c),f=0;try{for(var p=gp(d),h=p.next();!h.done;h=p.next()){var g=h.value,v=f+sO(g);"string"!=typeof g&&s.push(((r={})[g.type]=!0,r.anchor={path:a,offset:f},r.focus={path:a,offset:v},r)),f=v}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return s};var lO={type:"code",elemToHtml:function(e,t){var n=e.language,r=void 0===n?"":n,o=r?'class="language-'.concat(r,'"'):"";return"<code ".concat(o,">").concat(t,"</code>")}};var cO=function(){function e(){this.title=Dm("highLightModule.selectLang"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 64v896h896V64H64z m487.6 698.8c0 87.2-51.2 127-125.8 127-67.4 0-106.4-34.8-126.4-77l68.6-41.4c13.2 23.4 25.2 43.2 54.2 43.2 27.6 0 45.2-10.8 45.2-53V475.4h84.2v287.4z m199.2 127c-78.2 0-128.8-37.2-153.4-86l68.6-39.6c18 29.4 41.6 51.2 83 51.2 34.8 0 57.2-17.4 57.2-41.6 0-28.8-22.8-39-61.4-56l-21-9c-60.8-25.8-101-58.4-101-127 0-63.2 48.2-111.2 123.2-111.2 53.6 0 92 18.6 119.6 67.4L800 580c-14.4-25.8-30-36-54.2-36-24.6 0-40.2 15.6-40.2 36 0 25.2 15.6 35.4 51.8 51.2l21 9c71.6 30.6 111.8 62 111.8 132.4 0 75.6-59.6 117.2-139.4 117.2z"></path></svg>',this.tag="select",this.width=95,this.selectPanelWidth=115,this.defaultCodeLang=""}return e.prototype.getOptions=function(e){var t=this,n=[],r=e.getMenuConfig("codeSelectLang").codeLangs,o=void 0===r?[]:r;n.push({text:"plain text",value:""}),o.forEach((function(e){var r=e.text,o=e.value;e.selected&&(t.defaultCodeLang=o),n.push({text:r,value:o})}));var i=this.getValue(e);return n.forEach((function(e){e.value===i?e.selected=!0:delete e.selected})),n},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);if(null==t)return this.defaultCodeLang;if(!ap.Element.isElement(t))return this.defaultCodeLang;var n=t.language.toString(),r=e.getMenuConfig("codeSelectLang").codeLangs;return(void 0===r?[]:r).some((function(e){return e.value===n}))?n:this.defaultCodeLang},e.prototype.isDisabled=function(e){return null==e.selection||!this.getSelectCodeElem(e)},e.prototype.exec=function(e,t){if(null!=this.getSelectCodeElem(e)){var n={language:t.toString()};ap.Transforms.setNodes(e,n,{match:function(e){return sg.checkNodeType(e,"code")}})}},e.prototype.getSelectCodeElem=function(e){var t=sg.getSelectedNodeByType(e,"code");if(null==t)return null;var n=sg.getParentNode(e,t);return ap.Element.isElement(n)?"pre"!==n.type?null:t:null},e}(),dO={key:"codeSelectLang",factory:function(){return new cO},config:{codeLangs:[{text:"CSS",value:"css"},{text:"HTML",value:"html"},{text:"XML",value:"xml"},{text:"Javascript",value:"javascript"},{text:"Typescript",value:"typescript"},{text:"JSX",value:"jsx"},{text:"Go",value:"go"},{text:"PHP",value:"php"},{text:"C",value:"c"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C++",value:"cpp"},{text:"C#",value:"csharp"},{text:"Visual Basic",value:"visual-basic"},{text:"SQL",value:"sql"},{text:"Ruby",value:"ruby"},{text:"Swift",value:"swift"},{text:"Bash",value:"bash"},{text:"Lua",value:"lua"},{text:"Groovy",value:"groovy"},{text:"Markdown",value:"markdown"},{text:"ABAP",value:"abap"}]}};ch.attr&&(dh.fn.attr=ch.attr);var fO={renderStyle:function(e,t){var n=e,r=t,o="";return aO.forEach((function(e){n[e]&&(o=e)})),o&&function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={}),Object.assign(n.props,{className:t})}(r,o="token ".concat(o)),r},parseStyleHtml:function(e,t,n){var r=dh(e);if(!ap.Element.isElement(t))return t;if("code"!==sg.getNodeType(t))return t;var o=t,i=r.attr("class")||"";return 0===i.indexOf("language-")?o.language=i.split("-")[1]||"":o.language=i.toLowerCase(),o},menus:[dO],elemsToHtml:[lO]},pO=function(){function e(){throw new Error("不能实例化\nCan not construct a instance")}return e.setEditorConfig=function(e){void 0===e&&(e={}),this.editorConfig=fp(fp({},this.editorConfig),e)},e.setSimpleEditorConfig=function(e){void 0===e&&(e={}),this.simpleEditorConfig=fp(fp({},this.simpleEditorConfig),e)},e.setToolbarConfig=function(e){void 0===e&&(e={}),this.toolbarConfig=fp(fp({},this.toolbarConfig),e)},e.setSimpleToolbarConfig=function(e){void 0===e&&(e={}),this.simpleToolbarConfig=fp(fp({},this.simpleToolbarConfig),e)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerMenu=function(e,t){Bp(e,t)},e.registerRenderElem=function(e){var t,n,r;n=(t=e).type,r=t.renderElem,Ty[n||""]=r},e.registerRenderStyle=function(e){!function(e){Oy.push(e)}(e)},e.registerElemToHtml=function(e){!function(e){var t=e.type,n=e.elemToHtml;qh[t||""]=n}(e)},e.registerStyleToHtml=function(e){!function(e){Vh.push(e)}(e)},e.registerPreParseHtml=function(e){var t;t=e,Ph.push(t)},e.registerParseElemHtml=function(e){!function(e){var t=e.selector,n=e.parseElemHtml;Rh[t]=n}(e)},e.registerParseStyleHtml=function(e){!function(e){Ih.push(e)}(e)},e.registerModule=function(e){hO(e)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function hO(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,o=e.elemsToHtml,i=e.styleToHtml,a=e.preParseHtml,s=e.parseElemsHtml,u=e.parseStyleHtml,l=e.editorPlugin;t&&t.forEach((function(e){return pO.registerMenu(e)})),n&&n.forEach((function(e){return pO.registerRenderElem(e)})),r&&pO.registerRenderStyle(r),o&&o.forEach((function(e){return pO.registerElemToHtml(e)})),i&&pO.registerStyleToHtml(i),a&&a.forEach((function(e){return pO.registerPreParseHtml(e)})),s&&s.forEach((function(e){return pO.registerParseElemHtml(e)})),u&&pO.registerParseStyleHtml(u),l&&pO.registerPlugin(l)}XA.forEach((function(e){return hO(e)})),hO(dS),hO(Dx),hO(zx),hO(Kx),hO(fO);var gO='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',vO='<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',mO='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',yO='<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',bO='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>';var EO={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editorImageSizeMenu","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable","mergeTableCell","splitTableCell","setTableProperty","setTableCellProperty"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize","editVideoSrc"]}};var CO={hoverbarKeys:fp(fp({},EO),{text:{menuKeys:["formatPainter","headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};pO.setEditorConfig(fp(fp({},CO),{decorate:uO}));var DO={hoverbarKeys:EO};pO.setSimpleEditorConfig(fp(fp({},DO),{decorate:uO}));var wO={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:Dm("editor.more"),iconSvg:yO,menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:Dm("editor.justify"),iconSvg:vO,menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:Dm("editor.indent"),iconSvg:gO,menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:Dm("editor.image"),iconSvg:mO,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:Dm("editor.video"),iconSvg:bO,menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","formatPainter","fullScreen"]};pO.setToolbarConfig(wO);var AO={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:Dm("editor.image"),iconSvg:mO,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};pO.setSimpleToolbarConfig(AO);e.Boot=pO,e.DomEditor=sg,e.SlateEditor=ap.Editor,e.SlateElement=ap.Element,e.SlateLocation=ap.Location,e.SlateNode=ap.Node,e.SlatePath=ap.Path,e.SlatePoint=ap.Point,e.SlateRange=ap.Range,e.SlateText=ap.Text,e.SlateTransforms=ap.Transforms,e.Toolbar=$y,e.createEditor=function(e){void 0===e&&(e={});var t=e.selector,n=void 0===t?"":t,r=e.content,o=void 0===r?[]:r,i=e.html,a=e.config,s=void 0===a?{}:a,u=e.mode,l="simple"===(void 0===u?"default":u)?pO.simpleEditorConfig:pO.editorConfig,c=fp(fp({},l.hoverbarKeys||{}),s.hoverbarKeys||{});return zy({selector:n,config:fp(fp(fp({},l),s),{hoverbarKeys:c}),content:o,html:i,plugins:pO.plugins})},e.createToolbar=function(e){var t=e.selector,n=e.editor,r=e.config,o=void 0===r?{}:r,i=e.mode,a=void 0===i?"default":i;if(!t)throw new Error("Cannot find 'selector' when create toolbar");var s="simple"===a?pO.simpleToolbarConfig:pO.toolbarConfig;return Uy(n,{selector:t,config:fp(fp({},s),o)})},e.createUploader=RC,e.default={},e.genModalButtonElems=Im,e.genModalInputElems=Pm,e.genModalTextareaElems=function(e,t,n){var r=dh('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=dh('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]},e.i18nAddResources=Em,e.i18nChangeLanguage=function(e){ym.changeLanguage(e)},e.i18nGetResources=function(e){return ym.getResourceBundle(e,bm)},e.t=Dm,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
28
28
|
//# sourceMappingURL=index.js.map
|