Files
zb-admin/docs/assets/index.f52bf569.js

181 lines
750 KiB
JavaScript
Raw Normal View History

2022-11-25 12:57:33 +08:00
import{g as Zg,h as ls,a0 as D9,x as YP,P as XP,a1 as JP,a2 as ZP,o as Qg,c as e0,B as QP,R as eN,b as on,s as Rd,a3 as tN,_ as nN,i as rN,r as Ho,a as Gi,w as Rn,d as jd,t as iN,N as oN}from"./index.d3c42775.js";var Vv;if(typeof global>"u"){if("ActiveXObject"in window){var wE="\u62B1\u6B49\uFF0CwangEditor V5+ \u7248\u672C\u5F00\u59CB\uFF0C\u4E0D\u5728\u652F\u6301 IE \u6D4F\u89C8\u5668";wE+=`
2022-11-25 12:42:25 +08:00
Sorry, wangEditor V5+ versions do not support IE browser.`,console.error(wE)}EE(),CE()}else global&&((Vv=global.navigator)===null||Vv===void 0?void 0:Vv.userAgent.match("QQBrowser"))&&(EE(),CE());function EE(){typeof globalThis>"u"&&(window.globalThis=window)}function CE(){typeof AggregateError>"u"&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}if(typeof global=="object"){var aN=Object.getOwnPropertyDescriptor(global,"window");(!global.window||aN.set)&&(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),global.document!=null&&global.document.getElementsByTagName==null&&(global.document.getElementsByTagName=function(){return[]})}/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function DE(e){return Object.prototype.toString.call(e)==="[object Object]"}function Zt(e){var t,n;return DE(e)===!1?!1:(t=e.constructor,t===void 0?!0:(n=t.prototype,!(DE(n)===!1||n.hasOwnProperty("isPrototypeOf")===!1)))}function Ht(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];{var i=hN[e],o=i?typeof i=="function"?i.apply(null,n):i:"unknown error nr: "+e;throw Error("[Immer] "+o)}}function ka(e){return!!e&&!!e[An]}function _a(e){return!!e&&(function(t){if(!t||typeof t!="object")return!1;var n=Object.getPrototypeOf(t);if(n===null)return!0;var r=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return r===Object||typeof r=="function"&&Function.toString.call(r)===gN}(e)||Array.isArray(e)||!!e[kE]||!!e.constructor[kE]||T$(e)||k$(e))}function Jc(e,t,n){n===void 0&&(n=!1),Is(e)===0?(n?Object.keys:R$)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function Is(e){var t=e[An];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:T$(e)?2:k$(e)?3:0}function S2(e,t){return Is(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function uN(e,t){return Is(e)===2?e.get(t):e[t]}function x9(e,t,n){var r=Is(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function sN(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function T$(e){return dN&&e instanceof Map}function k$(e){return pN&&e instanceof Set}function ea(e){return e.o||e.t}function _$(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=vN(e);delete t[An];for(var n=R$(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function P$(e,t){return t===void 0&&(t=!1),N$(e)||ka(e)||!_a(e)||(Is(e)>1&&(e.set=e.add=e.clear=e.delete=lN),Object.freeze(e),t&&Jc(e,function(n,r){return P$(r,!0)},!0)),e}function lN(){Ht(2)}function N$(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function ci(e){var t=mN[e];return t||Ht(18,e),t}function xE(){return cs||Ht(0),cs}function Wv(e,t){t&&(ci("Patches"),e.u=[],e.s=[],e.v=t)}function lh(e){A2(e),e.p.forEach(cN),e.p=null}function A2(e){e===cs&&(cs=e.l)}function SE(e){return cs={p:[],l:cs,h:e,m:!0,_:0}}function cN(e){var t=e[An];t.i===0||t.i===1?t.j():t.O=!0}function qv(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||ci("ES5").S(t,e,r),r?(n[An].P&&(lh(t),Ht(4)),_a(e)&&(e=ch(t,e),t.l||fh(t,e)),t.u&&ci("Patches").M(n[An],e,t.u,t.s)):e=ch(t,n,[]),lh(t),t.u&&t.v(t.u,t.s),e!==S9?e:void 0}function ch(e,t,n){if(N$(t))return t;var r=t[An];if(!r)return Jc(t,function(o,a){return AE(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return fh(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=_$(r.k):r.o;Jc(r.i===3?new Set(i):i,function(o,a){return AE(e,r,i,o,a,n)}),fh(e,i,!1),n&&e.u&&ci("Patches").R(r,n,e.u,e.s)}return r.o}function AE(e,t,n,r,i,o){if(i===n&&Ht(5),ka(i)){var a=ch(e,i,o&&t&&t.i!==3&&!S2(t.D,r)?o.concat(r):void 0);if(x9(n,r,a),!ka(a))return;e.m=!1}if(_a(i)&&!N$(i)){if(!e.h.F&&e._<1)return;ch(e,i),t&&t.A.l||fh(e,i)}}function fh(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&P$(t,n)}function Gv(e,t){var n=e[An];return(n?ea(n):e)[t]}function OE(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 O2(e){e.P||(e.P=!0,e.l&&O2(e.l))}function Kv(e){e.o||(e.o=_$(e.t))}function B2(e,t,n){var r=T$(t)?ci("MapSet").N(t,n):k$(t)?ci("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),u={i:a?1:0,A:o?o.A:xE(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},s=u,l=Ip;a&&(s=[u],l=Rp);var c=Proxy.revocable(s,l),f=c.revoke,d=c.proxy;return u.k=d,u.j=f,d}(t,n):ci("ES5").J(t,n);return(n?n.A:xE()).p.push(r),r}function fN(e){return ka(e)||Ht(22,e),function t(n){if(!_a(n))return n;var r,i=n[An],o=Is(n);if(i){if(!i.P&&(i.i<4||!ci("ES5").K(i)))return i.t;i.I=!0,r=BE(n,o),i.I=!1}else r=BE(n,o);return Jc(r,function(a,u){i&&uN(i.t,a)===u||x9(r,a,t(u))}),o===3?new S
Could not completely normalize the editor after `.concat(l,` iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state.
`));var f=r(e).pop();if(W.has(e,f)){var d=E.node(e,f);e.normalizeNode(d)}c++}})}},parent(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=E.path(e,t,n),i=_.parent(r),o=E.node(e,i);return o},path(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{depth:r,edge:i}=n;if(_.isPath(t)){if(i==="start"){var[,o]=W.first(e,t);t=o}else if(i==="end"){var[,a]=W.last(e,t);t=a}}return R.isRange(t)&&(i==="start"?t=R.start(t):i==="end"?t=R.end(t):t=_.common(t.anchor.path,t.focus.path)),$e.isPoint(t)&&(t=t.path),r!=null&&(t=t.slice(0,r)),t},hasPath(e,t){return W.has(e,t)},pathRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.pathRefs(e);return u.delete(i),i.current=null,a}},o=E.pathRefs(e);return o.add(i),i},pathRefs(e){var t=IE.get(e);return t||(t=new Set,IE.set(e,t)),t},point(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{edge:r="start"}=n;if(_.isPath(t)){var i;if(r==="end"){var[,o]=W.last(e,t);i=o}else{var[,a]=W.first(e,t);i=a}var u=W.get(e,i);if(!X.isText(u))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:i,offset:r==="end"?u.text.length:0}}if(R.isRange(t)){var[s,l]=R.edges(t);return r==="start"?s:l}return t},pointRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.pointRefs(e);return u.delete(i),i.current=null,a}},o=E.pointRefs(e);return o.add(i),i},pointRefs(e){var t=RE.get(e);return t||(t=new Set,RE.set(e,t)),t},*positions(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{at:n=e.selection,unit:r="offset",reverse:i=!1,voids:o=!1}=t;if(!n)return;var a=E.range(e,n),[u,s]=R.edges(a),l=i?s:u,c=!1,f="",d=0,p=0,v=0;for(var[m,g]of E.nodes(e,{at:n,reverse:i,voids:o})){if(te.isElement(m)){if(!o&&e.isVoid(m)){yield E.start(e,g);continue}if(e.isInline(m))continue;if(E.hasInlines(e,m)){var y=_.isAncestor(g,s.path)?s:E.end(e,g),h=_.isAncestor(g,u.path)?u:E.start(e,g);f=E.string(e,{anchor:h,focus:y},{voids:o}),c=!0}}if(X.isText(m)){var $=_.equals(g,l.path);for($?(p=i?l.offset:m.text.length-l.offset,v=l.offset):(p=m.text.length,v=i?p:0),($||c||r==="offset")&&(yield{path:g,offset:v},c=!1);;){if(d===0){if(f==="")break;d=w(f,r,i),f=L$(f,d,i)[1]}if(v=i?v-d:v+d,p=p-d,p<0){d=-p;break}d=0,yield{path:g,offset:v}}}}function w(C,D,A){return D==="character"?j$(C,A):D==="word"?xN(C,A):D==="line"||D==="block"?C.length:1}},previous(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:i,at:o=e.selection}=t;if(!!o){var a=E.before(e,o,{voids:r});if(!!a){var[,u]=E.first(e,[]),s=[a.path,u];if(_.isPath(o)&&o.length===0)throw new Error("Cannot get the previous node from the root node!");if(i==null)if(_.isPath(o)){var[l]=E.parent(e,o);i=f=>l.children.includes(f)}else i=()=>!0;var[c]=E.nodes(e,{reverse:!0,at:s,match:i,mode:n,voids:r});return c}}},range(e,t,n){if(R.isRange(t)&&!n)return t;var r=E.start(e,t),i=E.end(e,n||t);return{anchor:r,focus:i}},rangeRef(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{affinity:r="forward"}=n,i={current:t,affinity:r,unref(){var{current:a}=i,u=E.rangeRefs(e);return u.delete(i),i.current=null,a}},o=E.rangeRefs(e);return o.add(i),i},rangeRefs(e){var t=jE.get(e);return t||(t=new Set,jE.set(e,t)),t},removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){NE.set(e,t)},start(e,t){return E.point(e,t,{edge:"start"})},string(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,i=E.range(e,t),[o,a]=R.edges(i),u="";for(var[s,l]of E.nodes(e,{at:i,match:X.isText,voids:r})){var c=s.text;_.equals(l,a.path)&&(c=c.slice(0,a.offset)),_.equals(l,o.path)&&(c=c.slice(o.offset)),u+=c}return u},unhangRange(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{voids:r=!1}=n,[i,o]=R.edges(t);if(i.offset!==0||o.offset!==0||R.isCollapsed(t))return t;var a=E.above(e,
* Takes a string with placeholder variables like `%{smart_count} file selected`
* and replaces it with values from options `{smart_count: 5}`
*
* @license https://github.com/airbnb/polyglot.js/blob/master/LICENSE
* taken from https://github.com/airbnb/polyglot.js/blob/master/lib/polyglot.js#L299
*
* @param {string} phrase that needs interpolation, with placeholders
* @param {object} options with values that will be used to replace placeholders
* @returns {any[]} interpolated
*/function P6(e,t){const n=/\$/g,r="$$$$";let i=[e];if(t==null)return i;for(const o of Object.keys(t))if(o!=="_"){let a=t[o];typeof a=="string"&&(a=n[Symbol.replace](a,r)),i=cM(i,new RegExp(`%\\{${o}\\}`,"g"),a)}return i}var EO=(fu=lM("apply"),class{constructor(t){Object.defineProperty(this,fu,{value:fM}),this.locale={strings:{},pluralize(n){return n===1?0:1}},Array.isArray(t)?t.forEach(_6(this,fu)[fu],this):_6(this,fu)[fu](t)}translate(t,n){return this.translateArray(t,n).join("")}translateArray(t,n){if(!uM(this.locale.strings,t))throw new Error(`missing string: ${t}`);const r=this.locale.strings[t];if(typeof r=="object"){if(n&&typeof n.smart_count<"u"){const o=this.locale.pluralize(n.smart_count);return P6(r[o],n)}throw new Error("Attempted to use a string with plural forms, but no value was given for %{smart_count}")}return P6(r,n)}});function fM(e){if(!(e!=null&&e.strings))return;const t=this.locale;this.locale={...t,strings:{...t.strings,...e.strings}},this.locale.pluralize=e.pluralize||t.pluralize}var CO=function(){var t={},n=t._fns={};t.emit=function(a,u,s,l,c,f,d){var p=r(a);p.length&&i(a,p,[u,s,l,c,f,d])},t.on=function(a,u){n[a]||(n[a]=[]),n[a].push(u)},t.once=function(a,u){function s(){u.apply(this,arguments),t.off(a,s)}this.on(a,s)},t.off=function(a,u){var s=[];if(a&&u){var l=this._fns[a],c=0,f=l?l.length:0;for(c;c<f;c++)l[c]!==u&&s.push(l[c])}s.length?this._fns[a]=s:delete this._fns[a]};function r(o){var a=n[o]?n[o]:[],u=o.indexOf(":"),s=u===-1?[o]:[o.substring(0,u),o.substring(u+1)],l=Object.keys(n),c=0,f=l.length;for(c;c<f;c++){var d=l[c];if(d==="*"&&(a=a.concat(n[d])),s.length===2&&s[0]===d){a=a.concat(n[d]);break}}return a}function i(o,a,u){var s=0,l=a.length;for(s;s<l&&a[s];s++)a[s].event=o,a[s].apply(a[s],u)}return t};let dM="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var pM={urlAlphabet:dM};let{urlAlphabet:hM}=pM;{if(typeof navigator<"u"&&navigator.product==="ReactNative"&&typeof crypto>"u")throw new Error("React Native does not have a built-in secure random generator. If you don\u2019t need unpredictable IDs use `nanoid/non-secure`. For secure IDs, import `react-native-get-random-values` before Nano ID.");if(typeof msCrypto<"u"&&typeof crypto>"u")throw new Error("Import file with `if (!window.crypto) window.crypto = window.msCrypto` before importing Nano ID to fix IE 11 support");if(typeof crypto>"u")throw new Error("Your browser does not have secure random generator. If you don\u2019t need unpredictable IDs, you can use nanoid/non-secure.")}let DO=e=>crypto.getRandomValues(new Uint8Array(e)),xO=(e,t,n)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*r*t/e.length);return()=>{let o="";for(;;){let a=n(i),u=i;for(;u--;)if(o+=e[a[u]&r]||"",o.length===t)return o}}},gM=(e,t)=>xO(e,t,DO),vM=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let r=n[e]&63;r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r<63?t+="_":t+="-"}return t};var mM={nanoid:vM,customAlphabet:gM,customRandom:xO,urlAlphabet:hM,random:DO},r1=function(t){if(typeof t!="number"||isNaN(t))throw new TypeError("Expected a number, got "+typeof t);var n=t<0,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(n&&(t=-t),t<1)return(n?"-":"")+t+" B";var i=Math.min(Math.floor(Math.log(t)/Math.log(1024)),r.length-1);t=Number(t/Math.pow(1024,i));var o=r[i];return t>=10||t%1===0?(n?"-":"")+t.toFixed(0)+" "+o:(n?"-":"")+t.toFixed(1)+" "+o};function SO(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}SO.prototype.match=function(e){var t=!0,n=this.parts,r,i=n.length,o;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(o=(e||"").split(this.separator),r=0;t&&r<i;r++)n[r]!=="*"&&(r<o.length?t=n[r]===o[r]:t=!1);t=t&&o}else if(typeof e.splice=="function")for(t=[],r=e.length;r--;)this.match(e[r])&&(t[t.length]=e[r]);else if(typeof e=="object"){t={};for(var a in e)this.match(a)&&(t[a]=e[a])}return t};var yM=function(e,t,n){var r=new SO(e,n||/[\/\.]/);return typeof t<"u"?r.match(t):r},bM=/[\/\+\.]/,$M=function(e,t){functi
id: ${r[o].id}
type: ${r[o].type}`)}),r.length>0&&ne(this,vl)[vl](),i.length>0){let o=`Multiple errors occurred while adding files:
`;if(i.forEach(a=>{o+=`
* ${a.message}`}),this.info({message:this.i18n("addBulkFilesFailed",{smart_count:i.length}),details:o},"error",this.opts.infoTimeout),typeof AggregateError=="function")throw new AggregateError(i,o);{const a=new Error(o);throw a.errors=i,a}}}removeFiles(t,n){const{files:r,currentUploads:i}=this.getState(),o={...r},a={...i},u=Object.create(null);t.forEach(f=>{r[f]&&(u[f]=r[f],delete o[f])});function s(f){return u[f]===void 0}Object.keys(a).forEach(f=>{const d=i[f].fileIDs.filter(s);if(d.length===0){delete a[f];return}a[f]={...i[f],fileIDs:d}});const l={currentUploads:a,files:o};Object.keys(o).length===0&&(l.allowNewUpload=!0,l.error=null,l.recoveredState=null),this.setState(l),this.calculateTotalProgress();const c=Object.keys(u);c.forEach(f=>{this.emit("file-removed",u[f],n)}),c.length>5?this.log(`Removed ${c.length} files`):this.log(`Removed files: ${c.join(", ")}`)}removeFile(t,n){n===void 0&&(n=null),this.removeFiles([t],n)}pauseResume(t){if(!this.getState().capabilities.resumableUploads||this.getFile(t).uploadComplete)return;const r=!(this.getFile(t).isPaused||!1);return this.setFileState(t,{isPaused:r}),this.emit("upload-pause",t,r),r}pauseAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!0};t[r]=i}),this.setState({files:t}),this.emit("pause-all")}resumeAll(){const t={...this.getState().files};Object.keys(t).filter(r=>!t[r].progress.uploadComplete&&t[r].progress.uploadStarted).forEach(r=>{const i={...t[r],isPaused:!1,error:null};t[r]=i}),this.setState({files:t}),this.emit("resume-all")}retryAll(){const t={...this.getState().files},n=Object.keys(t).filter(i=>t[i].error);if(n.forEach(i=>{const o={...t[i],isPaused:!1,error:null};t[i]=o}),this.setState({files:t,error:null}),this.emit("retry-all",n),n.length===0)return Promise.resolve({successful:[],failed:[]});const r=ne(this,ii)[ii](n,{forceAllowNewUpload:!0});return ne(this,oi)[oi](r)}cancelAll(){this.emit("cancel-all");const{files:t}=this.getState(),n=Object.keys(t);n.length&&this.removeFiles(n,"cancel-all"),this.setState({totalProgress:0,error:null,recoveredState:null})}retryUpload(t){this.setFileState(t,{error:null,isPaused:!1}),this.emit("upload-retry",t);const n=ne(this,ii)[ii]([t],{forceAllowNewUpload:!0});return ne(this,oi)[oi](n)}reset(){this.cancelAll()}logout(){this.iteratePlugins(t=>{t.provider&&t.provider.logout&&t.provider.logout()})}calculateProgress(t,n){if(!this.getFile(t.id)){this.log(`Not setting progress for a file that has been removed: ${t.id}`);return}const r=Number.isFinite(n.bytesTotal)&&n.bytesTotal>0;this.setFileState(t.id,{progress:{...this.getFile(t.id).progress,bytesUploaded:n.bytesUploaded,bytesTotal:n.bytesTotal,percentage:r?Math.round(n.bytesUploaded/n.bytesTotal*100):0}}),this.calculateTotalProgress()}calculateTotalProgress(){const n=this.getFiles().filter(l=>l.progress.uploadStarted||l.progress.preprocess||l.progress.postprocess);if(n.length===0){this.emit("progress",0),this.setState({totalProgress:0});return}const r=n.filter(l=>l.progress.bytesTotal!=null),i=n.filter(l=>l.progress.bytesTotal==null);if(r.length===0){const l=n.length*100,c=i.reduce((d,p)=>d+p.progress.percentage,0),f=Math.round(c/l*100);this.setState({totalProgress:f});return}let o=r.reduce((l,c)=>l+c.progress.bytesTotal,0);const a=o/r.length;o+=a*i.length;let u=0;r.forEach(l=>{u+=l.progress.bytesUploaded}),i.forEach(l=>{u+=a*(l.progress.percentage||0)/100});let s=o===0?0:Math.round(u/o*100);s>100&&(s=100),this.setState({totalProgress:s}),this.emit("progress",s)}updateOnlineStatus(){(typeof window.navigator.onLine<"u"?window.navigator.onLine:!0)?(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(t,n){if(typeof t!="function"){const a=`Expected a plugin class, but got ${t===null?"null":typeof t}. Please verify that the plugin was impor
Uppy plugins must have unique \`id\` options. See https://uppy.io/docs/plugins/#id.`;throw new Error(a)}return t.VERSION&&this.log(`Using ${i} v${t.VERSION}`),r.type in ne(this,zt)[zt]?ne(this,zt)[zt][r.type].push(r):ne(this,zt)[zt][r.type]=[r],r.install(),this}getPlugin(t){for(const n of Object.values(ne(this,zt)[zt])){const r=n.find(i=>i.id===t);if(r!=null)return r}}[TO](t){return ne(this,zt)[zt][t]}iteratePlugins(t){Object.values(ne(this,zt)[zt]).flat(1).forEach(t)}removePlugin(t){this.log(`Removing plugin ${t.id}`),this.emit("plugin-remove",t),t.uninstall&&t.uninstall();const n=ne(this,zt)[zt][t.type],r=n.findIndex(a=>a.id===t.id);r!==-1&&n.splice(r,1);const o={plugins:{...this.getState().plugins,[t.id]:void 0}};this.setState(o)}close(){this.log(`Closing Uppy instance ${this.opts.id}: removing all files and uninstalling plugins`),this.reset(),ne(this,pl)[pl](),this.iteratePlugins(t=>{this.removePlugin(t)}),typeof window<"u"&&window.removeEventListener&&(window.removeEventListener("online",ne(this,or)[or]),window.removeEventListener("offline",ne(this,or)[or]))}hideInfo(){const{info:t}=this.getState();this.setState({info:t.slice(1)}),this.emit("info-hidden")}info(t,n,r){n===void 0&&(n="info"),r===void 0&&(r=3e3);const i=typeof t=="object";this.setState({info:[...this.getState().info,{type:n,message:i?t.message:t,details:i?t.details:null}]}),setTimeout(()=>this.hideInfo(),r),this.emit("info-visible")}log(t,n){const{logger:r}=this.opts;switch(n){case"error":r.error(t);break;case"warning":r.warn(t);break;default:r.debug(t);break}}restore(t){return this.log(`Core: attempting to restore upload "${t}"`),this.getState().currentUploads[t]?ne(this,oi)[oi](t):(ne(this,ca)[ca](t),Promise.reject(new Error("Nonexistent upload")))}[kO](){return ne(this,ii)[ii](...arguments)}addResultData(t,n){if(!ne(this,l1)[l1](t)){this.log(`Not setting result for an upload that has been removed: ${t}`);return}const{currentUploads:r}=this.getState(),i={...r[t],result:{...r[t].result,...n}};this.setState({currentUploads:{...r,[t]:i}})}upload(){var t;(t=ne(this,zt)[zt].uploader)!=null&&t.length||this.log("No uploader type plugins are used","warning");let{files:n}=this.getState();const r=this.opts.onBeforeUpload(n);return r===!1?Promise.reject(new Error("Not starting the upload because onBeforeUpload returned false")):(r&&typeof r=="object"&&(n=r,this.setState({files:n})),Promise.resolve().then(()=>{ne(this,a1)[a1](n),ne(this,u1)[u1](n)}).catch(i=>{ne(this,Tt)[Tt](i)}).then(()=>{const{currentUploads:i}=this.getState(),o=Object.values(i).flatMap(s=>s.fileIDs),a=[];Object.keys(n).forEach(s=>{const l=this.getFile(s);!l.progress.uploadStarted&&o.indexOf(s)===-1&&a.push(l.id)});const u=ne(this,ii)[ii](a);return ne(this,oi)[oi](u)}).catch(i=>{ne(this,Tt)[Tt](i,{showInformer:!1})}))}}function LM(e,t){t===void 0&&(t=this.getFiles());const{maxFileSize:n,minFileSize:r,maxTotalFileSize:i,maxNumberOfFiles:o,allowedFileTypes:a}=this.opts.restrictions;if(o&&t.length+1>o)throw new _r(`${this.i18n("youCanOnlyUploadX",{smart_count:o})}`);if(a&&!a.some(s=>s.indexOf("/")>-1?e.type?$M(e.type.replace(/;.*?$/,""),s):!1:s[0]==="."&&e.extension?e.extension.toLowerCase()===s.substr(1).toLowerCase():!1)){const s=a.join(", ");throw new _r(this.i18n("youCanOnlyUploadFileTypes",{types:s}))}if(i&&e.size!=null){let u=0;if(u+=e.size,t.forEach(s=>{u+=s.size}),u>i)throw new _r(this.i18n("exceedsSize",{size:r1(i),file:e.name}))}if(n&&e.size!=null&&e.size>n)throw new _r(this.i18n("exceedsSize",{size:r1(n),file:e.name}));if(r&&e.size!=null&&e.size<r)throw new _r(this.i18n("inferiorSize",{size:r1(r)}))}function MM(e){const{minNumberOfFiles:t}=this.opts.restrictions;if(Object.keys(e).length<t)throw new _r(`${this.i18n("youHaveToAtLeastSelectX",{smart_count:t})}`)}function zM(e){const{requiredMetaFields:t}=this.opts.restrictions,{hasOwnProperty:n}=Object.prototype,r=[],i=[];for(let o=0;o<t.length;o++)if(!n.call(e.meta,t[o])||e.meta[t[o]]===""){const a=new _r(`${this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})}`);r.push(a),i.push(t[o]),ne(this,Tt)[Tt](a,{file:e,showInformer:!1,
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function h8(e){return Object.prototype.toString.call(e)==="[object Object]"}at({target:"Object",stat:!0,forced:QH},{keys:function(e){return Zu(Fo(e))}});var eU={isHistory(e){return h8(t=e)!==!1&&((n=t.constructor)===void 0||h8(r=n.prototype)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(e.redos.length===0||Xi.isOperationList(e.redos[0]))&&(e.undos.length===0||Xi.isOperationList(e.undos[0]));var t,n,r}},$1=new WeakMap,w1=new WeakMap,qu={isHistoryEditor:e=>eU.isHistory(e.history)&&E.isEditor(e),isMerging:e=>w1.get(e),isSaving:e=>$1.get(e),redo(e){e.redo()},undo(e){e.undo()},withoutMerging(e,t){var n=qu.isMerging(e);w1.set(e,!1),t(),w1.set(e,n)},withoutSaving(e,t){var n=qu.isSaving(e);$1.set(e,!1),t(),$1.set(e,n)}},tU=(e,t)=>e.type==="set_selection"||!(!t||e.type!=="insert_text"||t.type!=="insert_text"||e.offset!==t.offset+t.text.length||!_.equals(e.path,t.path))||!(!t||e.type!=="remove_text"||t.type!=="remove_text"||e.offset+e.text.length!==t.offset||!_.equals(e.path,t.path)),nU=(e,t)=>e.type!=="set_selection"||e.properties!=null&&e.newProperties!=null,rU=(e,t)=>!(!t||e.type!=="set_selection"||t.type!=="set_selection"),iU=e=>e.type!=="set_selection",oU=U.String,Ge=function(e){if(p0(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return oU(e)},lw=function(){var e=mt(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},aU=Rs.PROPER,Q2=RegExp.prototype,ZO=Q2.toString,uU=re(lw),sU=je(function(){return ZO.call({source:"a",flags:"b"})!="/a/b"}),lU=aU&&ZO.name!="toString";(sU||lU)&&hn(RegExp.prototype,"toString",function(){var e=mt(this),t=Ge(e.source),n=e.flags;return"/"+t+"/"+Ge(n===void 0&&Na(Q2,e)&&!("flags"in Q2)?uU(e):n)},{unsafe:!0});var Wd,cU=Nt?Object.defineProperties:function(e,t){mt(e);for(var n,r=To(t),i=Zu(t),o=i.length,a=0;o>a;)mr.f(e,n=i[a++],r[n]);return e},eb=Xa("document","documentElement"),QO=uw("IE_PROTO"),E1=function(){},eB=function(e){return"<script>"+e+"<\/script>"},g8=function(e){e.write(eB("")),e.close();var t=e.parentWindow.Object;return e=null,t},Hp=function(){try{Wd=new ActiveXObject("htmlfile")}catch{}var e,t;Hp=typeof document<"u"?document.domain&&Wd?g8(Wd):((t=tf("iframe")).style.display="none",eb.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(eB("document.F=Object")),e.close(),e.F):g8(Wd);for(var n=Bh.length;n--;)delete Hp.prototype[Bh[n]];return Hp()};d0[QO]=!0;var v0=Object.create||function(e,t){var n;return e!==null?(E1.prototype=mt(e),n=new E1,E1.prototype=null,n[QO]=e):n=Hp(),t===void 0?n:cU(n,t)},tb=st("unscopables"),nb=Array.prototype;nb[tb]==null&&mr.f(nb,tb,{configurable:!0,value:v0(null)});var Tc=function(e){nb[tb][e]=!0},fU=YO.includes;at({target:"Array",proto:!0},{includes:function(e){return fU(this,e,arguments.length>1?arguments[1]:void 0)}}),Tc("includes");var dU=st("match"),cw=function(e){var t;return Ye(e)&&((t=e[dU])!==void 0?!!t:fr(e)=="RegExp")},pU=U.TypeError,fw=function(e){if(cw(e))throw pU("The method doesn't accept regular expressions");return e},hU=st("match"),dw=function(e){var t=/./;try{"/./"[e](t)}catch{try{return t[hU]=!1,"/./"[e](t)}catch{}}return!1},gU=re("".indexOf);at({target:"String",proto:!0,forced:!dw("includes")},{includes:function(e){return!!~gU(Ge(Zn(this)),Ge(fw(e)),arguments.length>1?arguments[1]:void 0)}});var v8,vU=/"/g,mU=re("".replace);at({target:"String",proto:!0,forced:(v8="anchor",je(function(){var e=""[v8]('"');return e!==e.toLowerCase()||e.split('"').length>3}))},{anchor:function(e){return t="a",n="name",r=e,i=Ge(Zn(this)),o="<"+t,n!==""&&(o+=" "+n+'="'+mU(Ge(r),vU,"&quot;")+'"'),o+">"+i+"</"+t+">";var t,n,r,i,o}});var rb=function(e,t,n){var r,i;mt(e);try{if(!(r=Ia(e,"return"))){if(t==="throw")throw n;return n}r=Be(r,e)}catch(o){i=!0,r=o}if(t==="throw")throw n;if(i)throw r;return mt(r),n},yU=function(e,t,n,r){try{return r?t(mt(n)[0],n[1]):t(n)}catch(i){rb(e,"throw",i)}},Es={},bU=st("iterator"),$U=Array.prototype,tB=function(e){return e!==void
`)&&e.flags==="s")}),QU=U.RegExp,bw=je(function(){var e=QU("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),eV=tn.get,tV=nw("native-string-replace",String.prototype.replace),kh=RegExp.prototype.exec,ub=kh,nV=re("".charAt),rV=re("".indexOf),iV=re("".replace),D1=re("".slice),x1=function(){var e=/a/,t=/b*/g;return Be(kh,e,"a"),Be(kh,t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),A8=y0.BROKEN_CARET,S1=/()??/.exec("")[1]!==void 0;(x1||S1||A8||yw||bw)&&(ub=function(e){var t,n,r,i,o,a,u,s=this,l=eV(s),c=Ge(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=Be(ub,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=A8&&s.sticky,v=Be(lw,s),m=s.source,g=0,y=c;if(p&&(v=iV(v,"y",""),rV(v,"g")===-1&&(v+="g"),y=D1(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&nV(c,s.lastIndex-1)!==`
`)&&(m="(?: "+m+")",y=" "+y,g++),n=new RegExp("^(?:"+m+")",v)),S1&&(n=new RegExp("^"+m+"$(?!\\s)",v)),x1&&(r=s.lastIndex),i=Be(kh,p?n:s,y),p?i?(i.input=D1(i.input,g),i[0]=D1(i[0],g),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:x1&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),S1&&i&&i.length>1&&Be(tV,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=v0(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var af=ub;at({target:"RegExp",proto:!0,forced:/./.exec!==af},{exec:af});var $w=Function.prototype,O8=$w.apply,oV=$w.bind,B8=$w.call,ww=typeof Reflect=="object"&&Reflect.apply||(oV?B8.bind(O8):function(){return B8.apply(O8,arguments)}),aV=st("species"),A1=RegExp.prototype,Ew=function(e,t,n,r){var i=st(e),o=!je(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!je(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[aV]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=re(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var v=re(l),m=c.exec;return m===af||m===A1.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:v(f,c,d)}:{done:!1}});hn(String.prototype,e,s[0]),hn(A1,i,s[1])}r&&cr(A1[i],"sham",!0)},uV=oB.charAt,Cw=function(e,t,n){return t+(n?uV(e,t).length:1)},sV=Math.floor,O1=re("".charAt),lV=re("".replace),B1=re("".slice),cV=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,fV=/\$([$&'`]|\d{1,2})/g,dV=function(e,t,n,r,i,o){var a=n+e.length,u=r.length,s=fV;return i!==void 0&&(i=Fo(i),s=cV),lV(o,s,function(l,c){var f;switch(O1(c,0)){case"$":return"$";case"&":return e;case"`":return B1(t,0,n);case"'":return B1(t,a);case"<":f=i[B1(c,1,-1)];break;default:var d=+c;if(d===0)return l;if(d>u){var p=sV(d/10);return p===0?l:p<=u?r[p-1]===void 0?O1(c,1):r[p-1]+O1(c,1):l}f=r[d-1]}return f===void 0?"":f})},pV=U.TypeError,uf=function(e,t){var n=e.exec;if(Ue(n)){var r=Be(n,e,t);return r!==null&&mt(r),r}if(fr(e)==="RegExp")return Be(af,e,t);throw pV("RegExp#exec called on incompatible receiver")},sb=st("replace"),hV=Math.max,gV=Math.min,vV=re([].concat),F1=re([].push),F8=re("".indexOf),T8=re("".slice),mV="a".replace(/./,"$0")==="$0",k8=!!/./[sb]&&/./[sb]("a","$0")==="";Ew("replace",function(e,t,n){var r=k8?"$":"$0";return[function(i,o){var a=Zn(this),u=i==null?void 0:Ia(i,sb);return u?Be(u,i,a,o):Be(t,Ge(a),i,o)},function(i,o){var a=mt(this),u=Ge(i);if(typeof o=="string"&&F8(o,r)===-1&&F8(o,"$<")===-1){var s=n(t,a,u,o);if(s.done)return s.value}var l=Ue(o);l||(o=Ge(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var d=[];;){var p=uf(a,u);if(p===null||(F1(d,p),!c))break;Ge(p[0])===""&&(a.lastIndex=Cw(u,js(a.lastIndex),f))}for(var v,m="",g=0,y=0;y<d.length;y++){for(var h=Ge((p=d[y])[0]),$=hV(gV(Kf(p.index),u.length),0),w=[],C=1;C<p.length;C++)F1(w,(v=p[C])===void 0?v:String(v));var D=p.groups;if(l){var A=vV([h],w,$,u);D!==void 0&&F1(A,D);var I=Ge(ww(o,void 0,A))}else I=dV(h,u,$,w,D,o);$>=g&&(m+=T8(u,g,$)+I,g=$+h.length)}return m+T8(u,g)}]},!!je(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!mV||k8);/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var lb=function(e,t){return lb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},lb(e,t)};function Ms(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}lb(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Gn=function(){return Gn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Gn.apply(this,arguments)};function Un(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")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 Oe(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function cb(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}var yV=0,_8=function(){this.id=""+yV++},bV=tn.set,$V=tn.getterFor("Array Iterator"),Ec=vw(Array,"Array",function(e,t){bV(this,{type:"Array Iterator",target:To(e),index:0,kind:t})},function(){var e=$V(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:r,done:!1}:n=="values"?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values");Es.Arguments=Es.Array,Tc("keys"),Tc("values"),Tc("entries");var Ds=function(e,t,n){for(var r in t)hn(e,r,t[r],n);return e},wV=U.Array,EV=Math.max,fb=function(e,t,n){for(var r=Ja(e),i=ws(t,r),o=ws(n===void 0?r:n,r),a=wV(EV(o-i,0)),u=0;i<o;i++,u++)of(a,u,e[i]);return a.length=u,a},P8=nf.f,N8=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],CV={f:function(e){return N8&&fr(e)=="Window"?function(t){try{return P8(t)}catch{return fb(N8)}}(e):P8(To(e))}},I8=je(function(){if(typeof ArrayBuffer=="function"){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}}),Gd=Object.isExtensible,fa=je(function(){Gd(1)})||I8?function(e){return!!Ye(e)&&(!I8||fr(e)!="ArrayBuffer")&&(!Gd||Gd(e))}:Gd,DV=!je(function(){return Object.isExtensible(Object.preventExtensions({}))}),b0=Gf(function(e){var t=mr.f,n=!1,r=rw("meta"),i=0,o=function(u){t(u,r,{value:{objectID:"O"+i++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var u=nf.f,s=re([].splice),l={};l[r]=1,u(l).length&&(nf.f=function(c){for(var f=u(c),d=0,p=f.length;d<p;d++)if(f[d]===r){s(f,d,1);break}return f},at({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:CV.f}))},fastKey:function(u,s){if(!Ye(u))return typeof u=="symbol"?u:(typeof u=="string"?"S":"P")+u;if(!vt(u,r)){if(!fa(u))return"F";if(!s)return"E";o(u)}return u[r].objectID},getWeakData:function(u,s){if(!vt(u,r)){if(!fa(u))return!0;if(!s)return!1;o(u)}return u[r].weakData},onFreeze:function(u){return DV&&n&&fa(u)&&!vt(u,r)&&o(u),u}};d0[r]=!0}),xV=U.TypeError,Up=function(e,t){this.stopped=e,this.result=t},R8=Up.prototype,sf=function(e,t,n){var r,i,o,a,u,s,l,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),v=Ra(t,c),m=function(y){return r&&rb(r,"normal",y),new Up(!0,y)},g=function(y){return f?(mt(y),p?v(y[0],y[1],m):v(y[0],y[1])):p?v(y,m):v(y)};if(d)r=e;else{if(!(i=pw(e)))throw xV(l0(e)+" is not iterable");if(tB(i)){for(o=0,a=Ja(e);a>o;o++)if((u=g(e[o]))&&Na(R8,u))return u;return new Up(!1)}r=nB(e,i)}for(s=r.next;!(l=Be(s,r)).done;){try{u=g(l.value)}catch(y){rb(r,"throw",y)}if(typeof u=="object"&&u&&Na(R8,u))return u}return new Up(!1)},SV=U.TypeError,$0=function(e,t){if(Na(t,e))return e;throw SV("Incorrect invo
`)}return i};function mB(e,t){if(!(e instanceof HTMLElement&&e.dataset.slateVoid==="true"))for(var n=e.childNodes,r=n.length;r--;){var i=n[r],o=i.nodeType;o==3?t(i,e):o!=1&&o!=9&&o!=11||mB(i,t)}}function Y8(e){if(e.length===0)return"";var t=e[0];return t.nodeType!==to.ELEMENT_NODE?"":t.tagName.toLowerCase()}(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"})(to||(to={})),globalThis.navigator!==void 0&&globalThis.window!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&globalThis.window.MSStream;var mb=typeof navigator<"u"&&/Mac OS X/.test(navigator.userAgent),kc=typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);typeof navigator<"u"&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent);var Al=typeof navigator<"u"&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),LV=typeof navigator<"u"&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),MV=typeof navigator<"u"&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),yb=typeof navigator<"u"&&/Chrome/i.test(navigator.userAgent);typeof navigator<"u"&&/.*QQBrowser/.test(navigator.userAgent);var Ol=!MV&&!LV&&typeof globalThis<"u"&&globalThis.InputEvent&&typeof globalThis.InputEvent.prototype.getTargetRanges=="function",S={getWindow:function(e){var t=hB.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=Wp.get(t);return n||(n=new _8,Wp.set(t,n)),n},setNewKey:function(e){var t=new _8;Wp.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var i=xs.get(r);if(i==null){if(E.isEditor(r))return n;break}var o=lf.get(r);if(o==null)break;n.unshift(o),r=i}throw new Error("Unable to find the path for Slate node: "+JSON.stringify(t))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=S.toDOMNode(e,e),n=t.getRootNode();return(n instanceof Document||n instanceof ShadowRoot)&&n.getSelection!=null?n:t.ownerDocument},getParentNode:function(e,t){return xs.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&r!=null;){var i=S.getParentNode(e,r);if(i==null)break;n.push(i),r=i}return n},getTopNode:function(e,t){var n=[S.findPath(e,t)[0]];return W.get(e,n)},toDOMNode:function(e,t){var n;if(E.isEditor(t))n=Sw.get(e);else{var r=S.findKey(e,t);n=Aw.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: "+JSON.stringify(t));return n},hasDOMNode:function(e,t,n){n===void 0&&(n={});var r,i=n.editable,o=i!==void 0&&i,a=S.toDOMNode(e,e);try{r=ir(t)?t:t.parentElement}catch(u){if(!u.message.includes('Permission denied to access property "nodeType"'))throw u}return!!r&&r.closest("[data-slate-editor]")===a&&(!o||r.isContentEditable||!!r.getAttribute("data-slate-zero-width"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,i=R.isBackward(t),o=S.toDOMPoint(e,n),a=R.isCollapsed(t)?o:S.toDOMPoint(e,r),u=S.getWindow(e).document.createRange(),s=Oe(i?a:o,2),l=s[0],c=s[1],f=Oe(i?o:a,2),d=f[0],p=f[1],v=!!(ir(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),m=!!(ir(d)?d:d.parentElement).getAttribute("data-slate-zero-width");return u.setStart(l,v?1:c),u.setEnd(d,m?1:p),u},toDOMPoint:function(e,t){var n,r,i,o=Oe(E.node(e,t.path),1)[0],a=S.toDOMNode(e,o);E.void(e,{at:t})&&(t={path:t.path,offset:0});var u=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),s=0;try{for(var l=Un(u),c=l.next();!c.done;c=l.next()){var f=c.value,d=f.childNodes[0];if(d!=null&&d.textContent!=null){var p=d.textContent.length,v=f.getAttribute("data-slate-length"),m=s+(v==null?p:parseInt(v,10));if(t.offset<=m){i=[d,Math.min(p,Math.max(0,t.offset-s))];break}s=m}}}catch(g){n={error:g}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.err
`)))&&f--}if(!c){if(o)return null;throw new Error("Cannot resolve a Slate point from DOM point: "+t)}var y=S.toSlateNode(e,c);return{path:S.findPath(e,y),offset:f}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return E.hasPath(e,n.path)&&E.hasPath(e,r.path)},getNodeType:function(e){return te.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(t){return W.string(t)}).join("")},getSelectedElems:function(e){var t,n,r=[],i=E.nodes(e,{universal:!0});try{for(var o=Un(i),a=o.next();!a.done;a=o.next()){var u=Oe(a.value,1)[0];te.isElement(u)&&r.push(u)}}catch(s){t={error:s}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=Oe(E.nodes(e,{match:function(o){return n.checkNodeType(o,t)},universal:!0}),1),i=r[0];return i==null?null:i[0]},getSelectedTextNode:function(e){var t=Oe(E.nodes(e,{match:function(r){return X.isText(r)},universal:!0}),1),n=t[0];return n==null?null:n[0]},isNodeSelected:function(e,t){var n=Oe(E.nodes(e,{match:function(i){return i===t},universal:!0}),1),r=n[0];return r!=null&&Oe(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(E.isEnd(e,n.anchor,t)||E.isEnd(e,n.focus,t))},getTextarea:function(e){var t=db.get(e);if(t==null)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return w0.get(e)||null},getHoverbar:function(e){return _h.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(typeof n!="number"||n<=0)return 1/0;var i=n-e.getText().replace(/\r|\n|(\r\n)/g,"").length;return i<=0&&r&&r(e),i},cleanExposedTexNodeInSelectionBlock:function(e){var t,n,r,i,o=S.getTextarea(e).$textArea,a=o==null?void 0:o[0].childNodes;if(a)try{for(var u=Un(Array.from(a)),s=u.next();!s.done;s=u.next()){var l=s.value;if(l.nodeType!==3)break;l.remove()}}catch(m){t={error:m}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}var c=E.nodes(e,{match:function(m){return!(!te.isElement(m)||e.isInline(m))},universal:!0});try{for(var f=Un(c),d=f.next();!d.done;d=f.next()){var p=d.value;if(p!=null){var v=p[0];mB(S.toDOMNode(e,v),function(m,g){var y=O(g);y.attr("data-slate-string")||y.attr("data-slate-zero-width")||g.removeChild(m)})}}}catch(m){r={error:m}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}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=E.nodes(e,{match:function(u){return e.isVoid(u)}}),i=0;try{for(var o=Un(r),a=o.next();!a.done;a=o.next())a.value,i++}catch(u){t={error:u}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(t==null||R.isExpanded(t))return!1;var n=S.getSelectedNodeByType(e,"paragraph");if(n===null)return!1;var r=n.children;return r.length===1&&(r[0].text===""||void 0)},isEmptyPath:function(e,t){var n=E.node(e,t);if(n==null)return!1;var r=Oe(n,1)[0].children;return r.length===1&&r[0].text===""}},zV=1,yB={},cf={};function HV(e,t){var n=e.key,r=e.factory,i=e.config,o=Gn(Gn({},i),t||{});if(cf[n]!=null)throw new Error("Duplicated key '"+n+"' in menu items");cf[n]=r,function(a,u){u!=null&&(yB[a]=u)}(n,o)}var X8=st("species"),Fw=function(e){var t=Xa(e),n=mr.f;Nt&&t&&!t[X8]&&n(t,X8,{configurable:!0,get:function(){return this}})},UV=mr.f,J8=b0.fastKey,Z8=tn.set,I1=tn.getterFor,VV={getConstructor:function(e,t,n,r){var i=e(function(l,c){$0(l,o),Z8(l,{type:t,index:v0(null),first:void 0,last:void 0,size:0}),Nt||(l.size=0),c!=null&&sf(c,l[r],{that:l,AS_ENTRIES:n})}),o=i.prototype,a=I1(t),u=function(l,c,f){var d,p,v=a(l),m=s(l,c);return m?m.value=f:(v.last=m={index:p=J8(c,!0),key:c,value:f,previous:d=v.last,next:void 0,removed:!1},v.first||(v.first=m),d&&(d.next=m),Nt?v.size++:l.s
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,Q8=re("".replace),Ph="["+bb+"]",GV=RegExp("^"+Ph+Ph+"*"),KV=RegExp(Ph+Ph+"*$"),R1=function(e){return function(t){var n=Ge(Zn(t));return 1&e&&(n=Q8(n,GV,"")),2&e&&(n=Q8(n,KV,"")),n}},YV={start:R1(1),end:R1(2),trim:R1(3)},XV=Rs.PROPER,JV=YV.trim;at({target:"String",proto:!0,forced:function(e){return je(function(){return!!bb[e]()||"\u200B\x85\u180E"[e]()!=="\u200B\x85\u180E"||XV&&bb[e].name!==e})}("trim")},{trim:function(){return JV(this)}});var Tw=[];function ZV(e){Tw.push(e)}var bB={};function QV(e){var t=e.type,n=e.elemToHtml;bB[t||""]=n}function eW(e,t,n){var r=n.isInline(e)?"span":"div";return"<"+r+">"+t+"</"+r+">"}function tW(e,t){var n=e.type,r=n===void 0?"":n,i=e.children,o=i===void 0?[]:i,a=E.isVoid(t,e),u="";a||(u=o.map(function(c){return PB(c,t)}).join(""));var s=function(c){return bB[c]||eW}(r),l=s(e,u,t);return a||Tw.forEach(function(c){return l=c(e,l)}),l}var ff,hu,eC,j1,Nh=U.Promise,nW=U.TypeError,rW=st("species"),$B=function(e,t){var n,r=mt(e).constructor;return r===void 0||(n=mt(r)[rW])==null?t:function(i){if(g0(i))return i;throw nW(l0(i)+" is not a constructor")}(n)},wB=re([].slice),EB=/(?:ipad|iphone|ipod).*applewebkit/i.test(Ju),no=fr(U.process)=="process",$b=U.setImmediate,wb=U.clearImmediate,iW=U.process,L1=U.Dispatch,oW=U.Function,tC=U.MessageChannel,aW=U.String,M1=0,_c={};try{ff=U.location}catch{}var kw=function(e){if(vt(_c,e)){var t=_c[e];delete _c[e],t()}},z1=function(e){return function(){kw(e)}},nC=function(e){kw(e.data)},rC=function(e){U.postMessage(aW(e),ff.protocol+"//"+ff.host)};$b&&wb||($b=function(e){var t=wB(arguments,1);return _c[++M1]=function(){ww(Ue(e)?e:oW(e),void 0,t)},hu(M1),M1},wb=function(e){delete _c[e]},no?hu=function(e){iW.nextTick(z1(e))}:L1&&L1.now?hu=function(e){L1.now(z1(e))}:tC&&!EB?(j1=(eC=new tC).port2,eC.port1.onmessage=nC,hu=Ra(j1.postMessage,j1)):U.addEventListener&&Ue(U.postMessage)&&!U.importScripts&&ff&&ff.protocol!=="file:"&&!je(rC)?(hu=rC,U.addEventListener("message",nC,!1)):hu="onreadystatechange"in tf("script")?function(e){eb.appendChild(tf("script")).onreadystatechange=function(){eb.removeChild(this),kw(e)}}:function(e){setTimeout(z1(e),0)});var Bl,ua,Pc,Mu,H1,U1,V1,iC,CB={set:$b,clear:wb},uW=/ipad|iphone|ipod/i.test(Ju)&&U.Pebble!==void 0,sW=/web0s(?!.*chrome)/i.test(Ju),lW=Yf.f,W1=CB.set,oC=U.MutationObserver||U.WebKitMutationObserver,aC=U.document,uC=U.process,Zd=U.Promise,sC=lW(U,"queueMicrotask"),DB=sC&&sC.value;DB||(Bl=function(){var e,t;for(no&&(e=uC.domain)&&e.exit();ua;){t=ua.fn,ua=ua.next;try{t()}catch(n){throw ua?Mu():Pc=void 0,n}}Pc=void 0,e&&e.enter()},EB||no||sW||!oC||!aC?!uW&&Zd&&Zd.resolve?((V1=Zd.resolve(void 0)).constructor=Zd,iC=Ra(V1.then,V1),Mu=function(){iC(Bl)}):no?Mu=function(){uC.nextTick(Bl)}:(W1=Ra(W1,U),Mu=function(){W1(Bl)}):(H1=!0,U1=aC.createTextNode(""),new oC(Bl).observe(U1,{characterData:!0}),Mu=function(){U1.data=H1=!H1}));var q1,lC,xB,cC,SB=DB||function(e){var t={fn:e,next:void 0};Pc&&(Pc.next=t),ua||(ua=t,Mu()),Pc=t},cW=function(e){var t,n;this.promise=new e(function(r,i){if(t!==void 0||n!==void 0)throw TypeError("Bad Promise constructor");t=r,n=i}),this.resolve=$o(t),this.reject=$o(n)},_w={f:function(e){return new cW(e)}},Eb=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},fW=typeof window=="object",AB=CB.set,dW=st("species"),Or="Promise",fC=tn.getterFor(Or),pW=tn.set,hW=tn.getterFor(Or),na=Nh&&Nh.prototype,Pr=Nh,Fl=na,OB=U.TypeError,Cb=U.document,Pw=U.process,Qu=_w.f,gW=Qu,vW=!!(Cb&&Cb.createEvent&&U.dispatchEvent),BB=Ue(U.PromiseRejectionEvent),FB=!1,Nc=rf(Or,function(){var e=f0(Pr),t=e!==String(Pr);if(!t&&ef===66)return!0;if(ef>=51&&/native code/.test(e))return!1;var n=new Pr(function(i){i(1)}),r=function(i){i(function(){},function(){})};return(n.constructor={})[dW]=r,!(FB=n.then(function(){})instanceof r)||!t&&fW&&!BB}),mW=Nc||!hw(function(e){Pr.all(e).catch(function(){})}),TB=function(e){var t;return!(!Ye(e)||!Ue(t=e.then))&&t},Nw=function(e,t){if(!e.notified){e.notifie
`)>=0)return;c&&(c=LB(c),bC(u,c)||u.push({text:c}))}}else{if(l.nodeName==="BR")return void(bC(u,`
`)||u.push({text:`
`}));var f=O(l);u.push(Rw(f,a))}}),u)}(e,t),r=function(o){for(var a in Ih)if(o[0].matches(a))return Ih[a];return LW}(e),i=r(e[0],n,t);return E.isVoid(t,i)||(n.length===0&&(i.children=[{text:e.text().replace(/\s+/gm," ")}]),Iw.forEach(function(o){i=o(e[0],i,t)})),i}function Y1(e,t){e.parents("pre").length===0&&(e[0].innerHTML=e[0].innerHTML.replace(/\s+/gm," ").replace(/<br>/g,`
`));var n=e[0].textContent||"";n=function(i){return i.replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&reg;/g,"\xAE").replace(/&copy;/g,"\xA9").replace(/&trade;/g,"\u2122")}(n);var r={text:n=LB(n)};return Iw.forEach(function(i){r=i(e[0],r,t)}),r}function Rw(e,t){RB.forEach(function(r){var i=r.selector,o=r.preParseHtml;e[0].matches(i)&&(e=O(o(e[0])))});var n=Y8(e);return n==="span"?e.attr("data-w-e-type")?K1(e,t):Y1(e,t):n==="code"?Y8(e.parent())==="pre"?K1(e,t):Y1(e,t):IB.includes(n)?Y1(e,t):K1(e,t)}function MB(e,t,n){var r=O(n);return!!r.attr(t)||(r.attr(t,"true"),e.on("destroyed",function(){r.removeAttr(t)}),!1)}function zB(e,t){t===void 0&&(t=""),t===""&&(t="<p><br></p>"),t.indexOf("<")!==0&&(t=t.split(/\n/).map(function(r){return"<p>"+r+"</p>"}).join(""));var n=O("<div>"+t+"</div>");return Array.from(n.children()).map(function(r){return Rw(O(r),e)})}var MW=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]),zW=function(e){var t=e,n=t.onChange,r=t.insertText,i=t.apply,o=t.deleteBackward;return t.insertText=function(a){t.getConfig().readOnly||r(a)},t.apply=function(a){var u,s,l,c,f,d,p,v,m=[];switch(a.type){case"insert_text":case"remove_text":case"set_node":try{for(var g=Un(E.levels(t,{at:a.path})),y=g.next();!y.done;y=g.next()){var h=Oe(y.value,2),$=h[0],w=h[1],C=S.findKey(t,$);m.push([w,C])}}catch(ee){u={error:ee}}finally{try{y&&!y.done&&(s=g.return)&&s.call(g)}finally{if(u)throw u.error}}break;case"insert_node":case"remove_node":case"merge_node":case"split_node":try{for(var D=Un(E.levels(t,{at:_.parent(a.path)})),A=D.next();!A.done;A=D.next()){var I=Oe(A.value,2);$=I[0],w=I[1],C=S.findKey(t,$),m.push([w,C])}}catch(ee){l={error:ee}}finally{try{A&&!A.done&&(c=D.return)&&c.call(D)}finally{if(l)throw l.error}}break;case"move_node":try{for(var M=Un(E.levels(t,{at:_.common(_.parent(a.path),_.parent(a.newPath))})),V=M.next();!V.done;V=M.next()){var Y=Oe(V.value,2);$=Y[0],w=Y[1],C=S.findKey(t,$),m.push([w,C])}}catch(ee){f={error:ee}}finally{try{V&&!V.done&&(d=M.return)&&d.call(M)}finally{if(f)throw f.error}}}i(a);try{for(var J=Un(m),Z=J.next();!Z.done;Z=J.next()){var se=Oe(Z.value,2);w=se[0],C=se[1],$=Oe(E.node(t,w),1)[0],Wp.set($,C)}}catch(ee){p={error:ee}}finally{try{Z&&!Z.done&&(v=J.return)&&v.call(J)}finally{if(p)throw p.error}}},t.deleteBackward=function(a){if(a!=="line")return o(a);if(e.selection&&R.isCollapsed(e.selection)){var u=E.above(e,{match:function(f){return E.isBlock(e,f)},at:e.selection});if(u){var s=Oe(u,2)[1],l=E.range(e,s,e.selection.anchor),c=function(f,d){var p=E.range(f,R.end(d)),v=Array.from(E.positions(f,{at:d})),m=0,g=v.length,y=Math.floor(g/2);if(hC(f,E.range(f,v[m]),p))return E.range(f,v[m],p);if(v.length<2)return E.range(f,v[v.length-1],p);for(;y!==v.length&&y!==m;)hC(f,E.range(f,v[y]),p)?g=y:m=y,y=Math.floor((m+g)/2);return E.range(f,v[g],p)}(t,l);R.isCollapsed(c)||P.delete(e,{at:c})}}},t.onChange=function(){var a=t.selection;a!=null&&vb.set(t,a),t.emit("change"),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var a=t.children;return(a===void 0?[]:a).map(function(u){return PB(u,t)}).join("")},t.getText=function(){var a=t.children;return(a===void 0?[]:a).map(function(u){return W.string(u)}).join(`
`)},t.getSelectionText=function(){var a=t.selection;return a==null?"":E.string(e,a)},t.getElemsByType=function(a,u){var s,l;u===void 0&&(u=!1);var c=[],f=E.nodes(t,{at:[],universal:!0});try{for(var d=Un(f),p=d.next();!p.done;p=d.next()){var v=Oe(p.value,1)[0];if(te.isElement(v)&&(u?v.type.indexOf(a)>=0:v.type===a)){var m=NB(S.findKey(t,v).id);c.push(Gn(Gn({},v),{id:m}))}}}catch(g){s={error:g}}finally{try{p&&!p.done&&(l=d.return)&&l.call(d)}finally{if(s)throw s.error}}return c},t.getElemsByTypePrefix=function(a){return t.getElemsByType(a,!0)},t.isEmpty=function(){var a=t.children,u=a===void 0?[]:a;if(u.length>1)return!1;var s=u[0];if(s==null)return!0;if(te.isElement(s)&&s.type==="paragraph"){var l=s.children,c=l===void 0?[]:l;if(c.length>1)return!1;var f=c[0];if(f==null||X.isText(f)&&f.text==="")return!0}return!1},t.clear=function(){P.removeNodes(t,{at:{anchor:E.start(t,[]),focus:E.end(t,[])},mode:"highest"}),t.children.length===0&&P.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(a){return S.getParentNode(t,a)},t.dangerouslyInsertHtml=function(a,u){if(a===void 0&&(a=""),u===void 0&&(u=!1),a){var s=document.createElement("div");s.innerHTML=a;var l=Array.from(s.childNodes);if(l=l.filter(function(p){var v=p.nodeType,m=p.nodeName;return v===to.TEXT_NODE||v===to.ELEMENT_NODE&&!MW.has(m.toLowerCase())}),l.length!==0){var c=t.selection;if(c!=null){var f=null;S.isSelectedEmptyParagraph(t)&&!u&&(f=[c.focus.path[0]]),s.setAttribute("hidden","true"),document.body.appendChild(s);var d=0;l.forEach(function(p){var v=p.nodeType,m=p.nodeName,g=p.textContent,y=g===void 0?"":g;if(v!==to.TEXT_NODE)if(m!=="BR"){var h=p,$=!1;if(IB.includes(m.toLowerCase()))$=!0;else for(var w in Ih)if(h.matches(w)){$=!0;break}if($){var C=Rw(O(h),t);return t.isInline(C)?(t.insertNode(C),C.type==="link"&&t.insertFragment([{text:""}])):P.insertNodes(t,C,{mode:"highest"}),d++,void(S.isSelectedVoidNode(t)&&t.move(1))}var D=window.getComputedStyle(h).display;S.isSelectedEmptyParagraph(t)||D.indexOf("inline")<0&&t.insertBreak(),t.dangerouslyInsertHtml(h.innerHTML,!0)}else t.insertText(`
`);else{if(!y||!y.trim())return;t.insertNode({text:y})}}),d&&f&&S.isEmptyPath(t,f)&&P.removeNodes(t,{at:f}),s.remove()}}}},t.setHtml=function(a){a===void 0&&(a="");var u=t.isDisabled(),s=t.isFocused(),l=JSON.stringify(t.selection);t.enable(),t.focus(),t.select([]),t.deleteFragment(),P.setNodes(t,{type:"paragraph"},{mode:"highest"});var c=zB(t,a);if(P.insertFragment(t,c),s||(t.deselect(),t.blur()),u&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(l))}catch{t.select(E.start(t,[]))}},t},HW=function(e){var t=e,n=t.insertText;return t.insertFragment,t.setFragmentData=function(r){var i=t.selection;if(i){var o=Oe(R.edges(i),2),a=o[0],u=o[1],s=E.void(t,{at:a.path}),l=E.void(t,{at:u.path});if(!R.isCollapsed(i)||s){var c=S.toDOMRange(t,i),f=c.cloneContents(),d=f.childNodes[0];if(f.childNodes.forEach(function(C){C.textContent&&C.textContent.trim()!==""&&(d=C)}),l){var p=Oe(l,1)[0],v=c.cloneRange(),m=S.toDOMNode(t,p);v.setEndAfter(m),f=v.cloneContents()}if(s&&(d=f.querySelector("[data-slate-spacer]")),Array.from(f.querySelectorAll("[data-slate-zero-width]")).forEach(function(C){var D=C.getAttribute("data-slate-zero-width")==="n";C.textContent=D?`
`:""}),gB(d)){var g=d.ownerDocument.createElement("span");g.style.whiteSpace="pre",g.appendChild(d),f.appendChild(g),d=g}var y=t.getFragment(),h=JSON.stringify(y),$=window.btoa(encodeURIComponent(h));d.setAttribute("data-slate-fragment",$),r.setData("application/x-slate-fragment",$);var w=f.ownerDocument.createElement("div");return w.appendChild(f),w.setAttribute("hidden","true"),f.ownerDocument.body.appendChild(w),r.setData("text/html",w.innerHTML),r.setData("text/plain",jV(w)),f.ownerDocument.body.removeChild(w),r}}},t.insertData=function(r){var i,o,a=r.getData("application/x-slate-fragment");if(a){var u=decodeURIComponent(window.atob(a)),s=JSON.parse(u);t.insertFragment(s)}else{var l=r.getData("text/plain"),c=r.getData("text/html");if(c)t.dangerouslyInsertHtml(c);else if(l){var f=l.split(/\r\n|\r|\n/),d=!1;try{for(var p=Un(f),v=p.next();!v.done;v=p.next()){var m=v.value;d&&P.splitNodes(t,{always:!0}),n(m),d=!0}}catch(g){i={error:g}}finally{try{v&&!v.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}}}},t},Cc=function(e){return e!=null},UW={object:!0,function:!0,undefined:!0},VW=function(e){if(!function(t){return!!Cc(t)&&hasOwnProperty.call(UW,typeof t)}(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch{return!1}},WW=/^\s*class[\s{/}]/,qW=Function.prototype.toString,$C=function(e){return!!function(t){if(typeof t!="function"||!hasOwnProperty.call(t,"length"))return!1;try{if(typeof t.length!="number"||typeof t.call!="function"||typeof t.apply!="function")return!1}catch{return!1}return!VW(t)}(e)&&!WW.test(qW.call(e))},jw=function(e){return e!=null},GW=Object.keys,KW=function(){try{return Object.keys("primitive"),!0}catch{return!1}}()?Object.keys:function(e){return GW(jw(e)?Object(e):e)},YW=function(e){if(!jw(e))throw new TypeError("Cannot use null or undefined");return e},XW=Math.max,wC=function(){var e,t=Object.assign;return typeof t=="function"&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}()?Object.assign:function(e,t){var n,r,i,o=XW(arguments.length,2);for(e=Object(YW(e)),i=function(a){try{e[a]=t[a]}catch(u){n||(n=u)}},r=1;r<o;++r)KW(t=arguments[r]).forEach(i);if(n!==void 0)throw n;return e},JW=Array.prototype.forEach,ZW=Object.create,QW=function(e,t){var n;for(n in e)t[n]=e[n]},EC=function(e){var t=ZW(null);return JW.call(arguments,function(n){jw(n)&&QW(Object(n),t)}),t},X1="razdwatrzy",eq=String.prototype.indexOf,kl=typeof X1.contains=="function"&&X1.contains("dwa")===!0&&X1.contains("foo")===!1?String.prototype.contains:function(e){return eq.call(this,e,arguments[1])>-1},ep=Gf(function(e){var t=e.exports=function(n,r){var i,o,a,u,s;return arguments.length<2||typeof n!="string"?(u=r,r=n,n=null):u=arguments[2],Cc(n)?(i=kl.call(n,"c"),o=kl.call(n,"e"),a=kl.call(n,"w")):(i=a=!0,o=!1),s={value:r,configurable:i,enumerable:o,writable:a},u?wC(EC(u),s):s};t.gs=function(n,r,i){var o,a,u,s;return typeof n!="string"?(u=i,i=r,r=n,n=null):u=arguments[3],Cc(r)?$C(r)?Cc(i)?$C(i)||(u=i,i=void 0):i=void 0:(u=r,r=i=void 0):r=void 0,Cc(n)?(o=kl.call(n,"c"),a=kl.call(n,"e")):(o=!0,a=!1),s={get:r,set:i,configurable:o,enumerable:a},u?wC(EC(u),s):s}}),J1=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},tq=Gf(function(e,t){var n,r,i,o,a,u,s,l=Function.prototype.apply,c=Function.prototype.call,f=Object.create,d=Object.defineProperty,p=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};n=function(g,y){var h;return J1(y),v.call(this,"__ee__")?h=this.__ee__:(h=m.value=f(null),d(this,"__ee__",m),m.value=null),h[g]?typeof h[g]=="object"?h[g].push(y):h[g]=[h[g],y]:h[g]=y,this},r=function(g,y){var h,$;return J1(y),$=this,n.call(this,g,h=function(){i.call($,g,h),l.call(y,this,arguments)}),h.__eeOnceListener__=y,this},i=function(g,y){var h,$,w,C;if(J1(y),!v.call(this,"__ee__"))return this;if(!(h=this.__ee__)[g])return this;if(typeof($=h[g])=="object")for(C=0;w=$[C];++C)w!==y&&w.__eeOnceListener__!==y||($.length===2?h[g]=$[C?0:1]:$.splice(C,1));else $!==y&&$.__eeOnceListener__!==y||delete h[g]
`:e)}function Q1(e,t){return e===void 0&&(e=0),t===void 0&&(t=!1),de("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\uFEFF",t?de("br",null):null)}function mq(e,t,n){if(e.text==null)throw new Error("Current node is not slate Text "+JSON.stringify(e));var r=S.findKey(n,e),i=n.getConfig().decorate;if(i==null)throw new Error("Can not get config.decorate");var o=S.findPath(n,e),a=i([e,o]),u=X.decorations(e,a),s=u.map(function(f,d){var p=function(v,m,g,y,h){m===void 0&&(m=!1);var $=v.text,w=S.findPath(h,g),C=_.parent(w);if(E.isEditor(y))throw new Error("Text node "+JSON.stringify(g)+" parent is Editor");return h.isVoid(y)?Q1(W.string(y).length):$!==""||y.children[y.children.length-1]!==g||h.isInline(y)||E.string(h,C)!==""?$===""?Q1():m&&$.slice(-1)===`
`?AC($,!0):AC($):Q1(0,!0)}(f,d===u.length-1,e,t,n);return p=function(v,m){var g=m;return Hw.forEach(function(y){g=y(v,g)}),g}(f,p),de("span",{"data-slate-leaf":!0},p)}),l=function(f){return"w-e-text-"+f}(r.id),c=de("span",{"data-slate-node":"text",id:l,key:r.id},s);return Qn(function(){var f=Bw(l);f!=null&&(Aw.set(r,f),C0.set(e,f),E0.set(f,e))}),c}function Sb(e,t,n,r){return lf.set(e,t),xs.set(e,n),te.isElement(e)?vq(e,r):mq(e,n,r)}function yq(e,t){var n,r=e.$scroll,i=function(m){return"w-e-textarea-"+m}(e.id),o=t.getConfig(),a=o.readOnly,u=o.autoFocus,s=function(m,g){return g===void 0&&(g=!1),$s("div#"+m,{props:{contentEditable:!g}})}(i,a),l=t.children||[];s.children=l.map(function(m,g){var y=Sb(m,g,t,t);return UB(y),y});var c=U8.get(e);if(c==null&&(c=!0),c){var f=function(m,g){return O(`<div
id="`+m+`"
data-slate-editor
data-slate-node="value"
suppressContentEditableWarning
role="textarea"
spellCheck="true"
autoCorrect="true"
autoCapitalize="true"
></div>`)}(i);r.append(f),e.$textArea=f,n=f[0],(p=Fj([Tj,Ij,Hj,kj,Nj]))(n,s),U8.set(e,!1),V8.set(e,p)}else{var d=W8.get(e),p=V8.get(e);if(d==null||p==null)return;n=d.elm,p(d,s)}if(n!=null||(n=Bw(i))!=null){if((c?u:t.isFocused())&&n.focus({preventScroll:!0}),c){var v=Ow(n);v&&hB.set(t,v)}Sw.set(t,n),C0.set(t,n),E0.set(n,t),W8.set(e,s)}}function OC(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function BC(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function em(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return BC(n.overflowY,t)||BC(n.overflowX,t)||function(r){var i=function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!i&&(i.clientHeight<r.scrollHeight||i.clientWidth<r.scrollWidth)}(e)}return!1}function np(e,t,n,r,i,o,a,u){return o<e&&a>t||o>e&&a<t?0:o<=e&&u<=n||a>=t&&u>=n?o-e-r:a>t&&u<n||o<e&&u>n?a-t+i:0}function FC(e,t){var n=window,r=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,u=t.skipOverflowHiddenElements,s=typeof a=="function"?a:function(we){return we!==a};if(!OC(e))throw new TypeError("Invalid target");for(var l=document.scrollingElement||document.documentElement,c=[],f=e;OC(f)&&s(f);){if((f=f.parentElement)===l){c.push(f);break}f!=null&&f===document.body&&em(f)&&!em(document.documentElement)||f!=null&&em(f,u)&&c.push(f)}for(var d=n.visualViewport?n.visualViewport.width:innerWidth,p=n.visualViewport?n.visualViewport.height:innerHeight,v=window.scrollX||pageXOffset,m=window.scrollY||pageYOffset,g=e.getBoundingClientRect(),y=g.height,h=g.width,$=g.top,w=g.right,C=g.bottom,D=g.left,A=i==="start"||i==="nearest"?$:i==="end"?C:$+y/2,I=o==="center"?D+h/2:o==="end"?w:D,M=[],V=0;V<c.length;V++){var Y=c[V],J=Y.getBoundingClientRect(),Z=J.height,se=J.width,ee=J.top,ae=J.right,fe=J.bottom,_e=J.left;if(r==="if-needed"&&$>=0&&D>=0&&C<=p&&w<=d&&$>=ee&&C<=fe&&D>=_e&&w<=ae)return M;var ve=getComputedStyle(Y),ie=parseInt(ve.borderLeftWidth,10),Ie=parseInt(ve.borderTopWidth,10),T=parseInt(ve.borderRightWidth,10),F=parseInt(ve.borderBottomWidth,10),k=0,N=0,H="offsetWidth"in Y?Y.offsetWidth-Y.clientWidth-ie-T:0,j="offsetHeight"in Y?Y.offsetHeight-Y.clientHeight-Ie-F:0;if(l===Y)k=i==="start"?A:i==="end"?A-p:i==="nearest"?np(m,m+p,p,Ie,F,m+A,m+A+y,y):A-p/2,N=o==="start"?I:o==="center"?I-d/2:o==="end"?I-d:np(v,v+d,d,ie,T,v+I,v+I+h,h),k=Math.max(0,k+m),N=Math.max(0,N+v);else{k=i==="start"?A-ee-Ie:i==="end"?A-fe+F+j:i==="nearest"?np(ee,fe,Z,Ie,F+j,A,A+y,y):A-(ee+Z/2)+j/2,N=o==="start"?I-_e-ie:o==="center"?I-(_e+se/2)+H/2:o==="end"?I-ae+T+H:np(_e,ae,se,ie,T+H,I,I+h,h);var Q=Y.scrollLeft,ce=Y.scrollTop;A+=ce-(k=Math.max(0,Math.min(ce+k,Y.scrollHeight-Z+j))),I+=Q-(N=Math.max(0,Math.min(Q+N,Y.scrollWidth-se+H)))}M.push({el:Y,top:k,left:N})}return M}function TC(e){return e===Object(e)&&Object.keys(e).length!==0}function bq(e,t){var n=!e.ownerDocument.documentElement.contains(e);if(TC(t)&&typeof t.behavior=="function")return t.behavior(n?[]:FC(e,t));if(!n){var r=function(i){return i===!1?{block:"end",inline:"nearest"}:TC(i)?i:{block:"start",inline:"nearest"}}(t);return function(i,o){o===void 0&&(o="auto");var a="scrollBehavior"in document.body.style;i.forEach(function(u){var s=u.el,l=u.top,c=u.left;s.scroll&&a?s.scroll({top:l,left:c,behavior:o}):(s.scrollTop=l,s.scrollLeft=c)})}(FC(e,r),r.behavior)}}function Mn(e,t){return ja(t)&&S.hasDOMNode(e,t,{editable:!0})}function kC(e,t){if(e.getConfig().readOnly)return!1;var n=Hu(e,t)&&S.toSlateNode(e,t);return E.isVoid(e,n)}function Hu(e,t){return ja(t)&&S.hasDOMNode(e,t)}function WB(e,t,n){n===void 0&&(n=!1);var r=t.selection,i=t.getConfig(),o=S.findDocumentOrShadowRoot(t).getSelection();if(o&&(!e.isComposing||n)&&t.isFocused()){var a=o.type!=="None";if(r||a){var u=Sw.get(t),s=!1;if(u.contains(o.anchorNode)&&u.contains(o.focusNode)&&(s=!0),a&&s&&r){var l=S.toSlateRange(t,o,{exactMatch:!0,suppressThrow:!0});if(l&&R.equals(l,r)){var c=!0;if(R.isCollapsed(r)){var f=o.anchorNode,d=o.anchorOffset;if(f===u){var p=u.childNodes,v
`+r:n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var Ww=function(){function e(t,n){var r=this;n===void 0&&(n=!1),this.$elem=O('<div class="w-e-bar-item"></div>'),this.$button=O('<button type="button"></button>'),this.disabled=!1,this.menu=t;var i=t.tag,o=t.width;if(i!=="button")throw new Error("Invalid tag '"+i+"', expected 'button'");var a=t.title,u=t.hotkey,s=u===void 0?"":u,l=t.iconSvg,c=l===void 0?"":l,f=this.$button;if(c){var d=O(c);Uw(d),f.append(d)}else f.text(a);GB(f,c,a,s,n),n&&c&&f.append(O('<span class="title">'+a+"</span>")),o&&f.css("width",o+"px"),this.$elem.append(f),Qn(function(){return r.init()})}return e.prototype.init=function(){var t=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(n){n.preventDefault(),Cn(t).hidePanelOrModal(),t.disabled||(t.exec(),t.onButtonClick())})},e.prototype.exec=function(){var t=Cn(this),n=this.menu,r=n.getValue(t);n.exec(t,r)},e.prototype.setActive=function(){var t=Cn(this),n=this.$button,r="active";this.menu.isActive(t)?n.addClass(r):n.removeClass(r)},e.prototype.setDisabled=function(){var t=Cn(this),n=this.$button,r=this.menu.isDisabled(t);(t.selection==null||t.isDisabled())&&(r=!0),this.menu.alwaysEnable&&(r=!1);var i="disabled";r?n.addClass(i):n.removeClass(i),this.disabled=r},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),Sq=function(e){function t(n,r){return r===void 0&&(r=!1),e.call(this,n,r)||this}return Ms(t,e),t.prototype.onButtonClick=function(){},t}(Ww),qw=function(){function e(t){this.isShow=!1,this.showTime=0,this.record(t)}return e.prototype.record=function(t){var n=gb.get(t);n==null&&(n=new Set,gb.set(t,n)),n.add(this),Vp.set(this,t)},e.prototype.renderContent=function(t){var n=this.$elem;n.empty(),n.append(t);var r=this.genSelfElem();r&&n.append(r)},e.prototype.appendTo=function(t){var n=this.$elem;t.append(n)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var t=Vp.get(this);t&&t.emit("modalOrPanelShow",this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var t=Vp.get(this);t&&t.emit("modalOrPanelHide")}},e}(),Aq=function(e){function t(n){var r=e.call(this,n)||this;return r.type="dropPanel",r.$elem=O('<div class="w-e-drop-panel"></div>'),r}return Ms(t,e),t.prototype.genSelfElem=function(){return null},t}(qw),Oq=function(e){function t(n,r){r===void 0&&(r=!1);var i=e.call(this,n,r)||this;if(i.dropPanel=null,i.menu=n,n.showDropPanel){var o=Vw();i.$button.append(o)}return i}return Ms(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var n=this.menu;if(n.getPanelContentElem!=null){var r=Cn(this);if(this.dropPanel==null){var i=new Aq(r),o=n.getPanelContentElem(r);i.renderContent(o),i.appendTo(this.$elem),i.show(),this.dropPanel=i}else{var a=this.dropPanel;a.isShow?a.hide():(o=n.getPanelContentElem(r),a.renderContent(o),a.show())}var u=this.dropPanel;if(u.isShow){var s=this.$elem,l=s.offset().left,c=s.parents(".w-e-bar");l-c.offset().left>=c.width()/2?u.$elem.css({left:"none",right:"0"}):u.$elem.css({left:"0",right:"none"})}}},t}(Ww),Bq=function(e){function t(n,r){r===void 0&&(r=0);var i=e.call(this,n)||this;i.type="modal",i.$elem=O('<div class="w-e-modal"></div>'),i.width=0,r&&(i.width=r);var o=i.$elem;return o.on("click",function(a){return a.stopPropagation()}),o.on("keyup",function(a){a.code==="Escape"&&(i.hide(),n.restoreSelection())}),i}return Ms(t,e),t.prototype.genSelfElem=function(){var n=this,r=O('<span class="btn-close"><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>'),i=Vp.get(this);return r.on("click",function(){n.hide(),i==null||i.restoreSelection()}),r},t.prototype.setStyle=function(n){var r=this.width,i=this.$elem;i.attr("style",""),r&&i.css("width",r+"px"),i.css(n)},t}(qw);function Dn(e,t,n){var r=O('<label class="babel-container"></label>');r.append("<span>"+e+
You has disabled editor scroll, please do this yourself`,void console.warn(w)}var C=O("#"+$);if(C.length!==0){var D=C[0];if(!S.hasDOMNode(h,D))return w="Element (found by id is '"+$+"') is not in editor DOM",w+=`
\u901A\u8FC7 id '`+$+"' \u627E\u5230\u7684 element \u4E0D\u5728 editor DOM \u4E4B\u5185",void console.error(w,D);var A=S.getTextarea(h),I=A.$textAreaContainer,M=A.$scroll,V=C.offset().top,Y=I.offset().top;M[0].scrollBy({top:V-Y,behavior:"smooth"})}},h.showProgressBar=function($){$<1||S.getTextarea(h).changeProgress($)},h.hidePanelOrModal=function(){var $=gb.get(h);$!=null&&$.forEach(function(w){return w.hide()})},h.enable=function(){h.getConfig().readOnly=!1,h.updateView()},h.disable=function(){h.getConfig().readOnly=!0,h.updateView()},h.isDisabled=function(){return h.getConfig().readOnly},h.toDOMNode=function($){return S.toDOMNode(h,$)},h.fullScreen=function(){if(!h.isFullScreen){var $=null,w=S.getToolbar(h);w&&($=w.$box);var C=S.getTextarea(h).$box.parent();if($&&$.parent()[0]!==C[0])throw new Error(`Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent
\u4E0D\u80FD\u8BBE\u7F6E\u5168\u5C4F\uFF0C\u56E0\u4E3A toolbar DOM \u7236\u8282\u70B9\u548C textarea DOM \u7236\u8282\u70B9\u4E0D\u4E00\u81F4`);C.addClass("w-e-full-screen-container");var D=C.css("z-index");C.attr("data-z-index",D.toString()),h.isFullScreen=!0,h.emit("fullScreen")}},h.unFullScreen=function(){if(h.isFullScreen){var $=S.getTextarea(h).$box.parent();setTimeout(function(){$.removeClass("w-e-full-screen-container"),h.isFullScreen=!1,h.emit("unFullScreen")},200)}},h.getEditableContainer=function(){return S.getTextarea(h).$textAreaContainer[0]},h}(HW(bN()))))))));if(n&&function(y,h){return MB(y,"data-w-e-textarea",h)}(l,n))throw new Error("Repeated create editor by selector '"+n+"'");var c=function(y){y===void 0&&(y={});var h=wO(yB),$={},w=y.MENU_CONF,C=w===void 0?{}:w;return q$(h,function(D,A){$[A]=Gn(Gn({},D),C[A]||{})}),delete y.MENU_CONF,Gn({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:$,hoverbarKeys:{},customAlert:function(D,A){window.alert(A+`:
`+D)}},y)}(i);H8.set(l,c);var f=c.hoverbarKeys,d=f===void 0?{}:f;if(s.forEach(function(y){l=y(l)}),a!=null&&(l.children=zB(l,a)),o&&o.length&&(l.children=o),l.children.length===0&&(l.children=[{type:"paragraph",children:[{text:""}]}]),S.normalizeContent(l),n){var p=new xq(n);db.set(l,p),pb.set(p,l),p.changeViewState(),Qn(function(){var y=p.$scroll;y!=null&&y.height()<300&&console.warn(`\u7F16\u8F91\u533A\u57DF\u9AD8\u5EA6 < 300px \u8FD9\u53EF\u80FD\u4F1A\u5BFC\u81F4 modal hoverbar \u5B9A\u4F4D\u5F02\u5E38
Textarea height < 300px . This may be cause modal and hoverbar position error`,y)});var v=void 0;Object.keys(d).length>0&&(v=new Pq,hb.set(v,l),_h.set(l,v)),l.on("change",function(){l.hidePanelOrModal()}),l.on("scroll",function(){l.hidePanelOrModal()})}else l.children.forEach(function(y,h){return YB(y,h,l,l)});var m=c.onCreated,g=c.onDestroyed;return m&&l.on("created",function(){return m(l)}),g&&l.on("destroyed",function(){return g(l)}),Qn(function(){return l.emit("created")}),l}var Iq=m0("splice"),Rq=U.TypeError,jq=Math.max,Lq=Math.min;at({target:"Array",proto:!0,forced:!Iq},{splice:function(e,t){var n,r,i,o,a,u,s=Fo(this),l=Ja(s),c=ws(e,l),f=arguments.length;if(f===0?n=r=0:f===1?(n=0,r=l-c):(n=f-2,r=Lq(jq(Kf(t),0),l-c)),l+n-r>9007199254740991)throw Rq("Maximum allowed length exceeded");for(i=WO(s,r),o=0;o<r;o++)(a=c+o)in s&&of(i,o,s[a]);if(i.length=r,n<r){for(o=c;o<l-r;o++)u=o+n,(a=o+r)in s?s[u]=s[a]:delete s[u];for(o=l;o>l-r+n;o--)delete s[o-1]}else if(n>r)for(o=l-r;o>c;o--)u=o+n-1,(a=o+r-1)in s?s[u]=s[a]:delete s[u];for(o=0;o<n;o++)s[o+c]=arguments[o+2];return s.length=l-r+n,i}});var Mq=function(){function e(t,n){var r=this;this.$toolbar=O('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.changeToolbarState=$O(function(){r.toolbarItems.forEach(function(a){a.changeMenuState()})},200),this.config=n;var i=O(t);if(i.length===0)throw new Error("Cannot find toolbar DOM by selector '"+t+"'");this.$box=i;var o=this.$toolbar;o.on("mousedown",function(a){return a.preventDefault()}),i.append(o),Qn(function(){r.registerItems(),r.changeToolbarState(),r.getEditorInstance().on("change",r.changeToolbarState)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.registerItems=function(){var t=this,n="",r=this.$toolbar,i=this.config,o=i.toolbarKeys,a=o===void 0?[]:o,u=i.insertKeys,s=u===void 0?{index:0,keys:[]}:u,l=i.excludeKeys,c=l===void 0?[]:l,f=wO(a);s.keys.length>0&&(typeof s.keys=="string"&&(s.keys=[s.keys]),s.keys.forEach(function(v,m){f.splice(s.index+m,0,v)}));var d=f.filter(function(v){if(typeof v=="string"){if(c.includes(v))return!1}else if(c.includes(v.key))return!1;return!0}),p=d.length;d.forEach(function(v,m){if(v==="|"){if(m===0||m+1===p||n==="|")return;var g=qB();return r.append(g),void(n=v)}if(typeof v=="string")return t.registerSingleItem(v,t),void(n=v);t.registerGroup(v),n="group"})},e.prototype.registerGroup=function(t){var n=this,r=this.$toolbar,i=function(l){return new PC(l)}(t),o=t.menuKeys,a=o===void 0?[]:o,u=this.config.excludeKeys,s=u===void 0?[]:u;a.forEach(function(l){s.includes(l)||n.registerSingleItem(l,i)}),r.append(i.$elem)},e.prototype.registerSingleItem=function(t,n){var r=this.getEditorInstance(),i=n instanceof PC,o=this.menus,a=o[t];if(a==null){var u=cf[t];if(u==null)throw new Error("Not found menu item factory by key '"+t+"'");if(typeof u!="function")throw new Error("Menu item factory (key='"+t+"') is not a function");a=u(),o[t]=a}else console.warn("Duplicated toolbar menu key '"+t+`'
\u91CD\u590D\u6CE8\u518C\u4E86\u83DC\u5355\u680F menu '`+t+"'");var s=KB(a,i);this.toolbarItems.push(s),xw.set(s,r),i?n.appendBarItem(s):n.$toolbar.append(s.$elem)},e.prototype.getEditorInstance=function(){var t=Dw.get(this);if(t==null)throw new Error("Can not get editor instance");return t},e.prototype.destroy=function(){this.$toolbar.remove(),this.menus={},this.toolbarItems=[]},e}();function zq(e,t){if(e==null)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,i=r===void 0?{}:r;if(function(u,s){return MB(u,"data-w-e-toolbar",s)}(e,n))throw new Error("Repeated create toolbar by selector '"+n+"'");var o=Gn({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},i||{}),a=new Mq(n,o);return Dw.set(a,e),w0.set(e,a),a}var Hq=Rs.EXISTS,Uq=mr.f,XB=Function.prototype,Vq=re(XB.toString),JB=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Wq=re(JB.exec);function ZB(e){var t=e.server,n=t===void 0?"":t,r=e.fieldName,i=r===void 0?"":r,o=e.maxFileSize,a=o===void 0?10485760:o,u=e.maxNumberOfFiles,s=u===void 0?100:u,l=e.meta,c=l===void 0?{}:l,f=e.metaWithUrl,d=f!==void 0&&f,p=e.headers,v=p===void 0?{}:p,m=e.withCredentials,g=m!==void 0&&m,y=e.timeout,h=y===void 0?1e4:y,$=e.onBeforeUpload,w=$===void 0?function(Z){return Z}:$,C=e.onSuccess,D=C===void 0?function(Z,se){}:C,A=e.onError,I=A===void 0?function(Z,se,ee){console.error(Z.name+" upload error",se,ee)}:A,M=e.onProgress,V=M===void 0?function(Z){}:M;if(!n)throw new Error(`Cannot get upload server address
\u6CA1\u6709\u914D\u7F6E\u4E0A\u4F20\u5730\u5740`);if(!i)throw new Error(`Cannot get fieldName
\u6CA1\u6709\u914D\u7F6E fieldName`);var Y=n;d&&(Y=function(Z,se){var ee=Oe(Z.split("#"),2),ae=ee[0],fe=ee[1],_e=[];q$(se,function(ie,Ie){_e.push(Ie+"="+ie)});var ve=_e.join("&");return ae=ae.indexOf("?")>0?ae+"&"+ve:ae+"?"+ve,fe?ae+"#"+fe:ae}(Y,c));var J=new qf({onBeforeUpload:w,restrictions:{maxFileSize:a,maxNumberOfFiles:s},meta:c}).use(Jz,{endpoint:Y,headers:v,formData:!0,fieldName:i,bundle:!0,withCredentials:g,timeout:h});return J.on("upload-success",function(Z,se){var ee=se.body,ae=ee===void 0?{}:ee;try{D(Z,ae)}catch(fe){console.error("wangEditor upload file - onSuccess error",fe)}J.removeFile(Z.id)}),J.on("progress",function(Z){Z<1||V(Z)}),J.on("error",function(Z){console.error("wangEditor file upload error",Z.stack)}),J.on("upload-error",function(Z,se,ee){try{I(Z,se,ee)}catch(ae){console.error("wangEditor upload file - onError error",ae)}J.removeFile(Z.id)}),J.on("restriction-failed",function(Z,se){try{I(Z,se)}catch(ee){console.error("wangEditor upload file - onError error",ee)}J.removeFile(Z.id)}),J}function ro(e){return ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ro(e)}function qq(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ct(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?Object(arguments[t]):{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&r.push.apply(r,Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),r.forEach(function(i){qq(e,i,n[i])})}return e}function gi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vi(e,t,n){return t&&IC(e.prototype,t),n&&IC(e,n),e}function La(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function df(e,t){if(t&&(ro(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return La(e)}function Ss(e){return Ss=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ss(e)}function Ab(e,t){return Ab=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ab(e,t)}function D0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ab(e,t)}Nt&&!Hq&&Uq(XB,"name",{configurable:!0,get:function(){try{return Wq(JB,Vq(this))[1]}catch{return""}}});var Gq={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},li=new(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};gi(this,e),this.init(t,n)}return vi(e,[{key:"init",value:function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||Gq,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,n,r,
`)&&e.flags==="s")}),xK=ge.RegExp,SK=ut(function(){var e=xK("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),AK=Nb.get,OK=Jw("native-string-replace",String.prototype.replace),Wh=RegExp.prototype.exec,Rb=Wh,BK=le("".charAt),FK=le("".indexOf),TK=le("".replace),sm=le("".slice),lm=(um=/b*/g,pt(Wh,uD=/a/,"a"),pt(Wh,um,"a"),uD.lastIndex!==0||um.lastIndex!==0),sD=yF.BROKEN_CARET,cm=/()??/.exec("")[1]!==void 0;(lm||cm||sD||DK||SK)&&(Rb=function(e){var t,n,r,i,o,a,u,s=this,l=AK(s),c=it(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=pt(Rb,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=sD&&s.sticky,v=pt(mF,s),m=s.source,g=0,y=c;if(p&&(v=TK(v,"y",""),FK(v,"g")===-1&&(v+="g"),y=sm(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&BK(c,s.lastIndex-1)!==`
`)&&(m="(?: "+m+")",y=" "+y,g++),n=new RegExp("^(?:"+m+")",v)),cm&&(n=new RegExp("^"+m+"$(?!\\s)",v)),lm&&(r=s.lastIndex),i=pt(Wh,p?n:s,y),p?i?(i.input=sm(i.input,g),i[0]=sm(i[0],g),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:lm&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),cm&&i&&i.length>1&&pt(OK,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=wF(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var gf=Rb;_t({target:"RegExp",proto:!0,forced:/./.exec!==gf},{exec:gf});var l3=Function.prototype,lD=l3.apply,kK=l3.bind,cD=l3.call,EF=typeof Reflect=="object"&&Reflect.apply||(kK?cD.bind(lD):function(){return cD.apply(lD,arguments)}),_K=_n("species"),fm=RegExp.prototype,c3=function(e,t,n,r){var i=_n(e),o=!ut(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!ut(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[_K]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=le(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var v=le(l),m=c.exec;return m===gf||m===fm.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:v(f,c,d)}:{done:!1}});pf(String.prototype,e,s[0]),pf(fm,i,s[1])}r&&As(fm[i],"sham",!0)},PK=le("".charAt),fD=le("".charCodeAt),NK=le("".slice),dD=function(e){return function(t,n){var r,i,o=it(er(t)),a=Vs(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=fD(o,a))<55296||r>56319||a+1===u||(i=fD(o,a+1))<56320||i>57343?e?PK(o,a):r:e?NK(o,a,a+2):i-56320+(r-55296<<10)+65536}},IK={codeAt:dD(!1),charAt:dD(!0)}.charAt,f3=function(e,t,n){return t+(n?IK(e,t).length:1)},RK=Math.floor,dm=le("".charAt),jK=le("".replace),pm=le("".slice),LK=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,MK=/\$([$&'`]|\d{1,2})/g,zK=function(e,t,n,r,i,o){var a=n+e.length,u=r.length,s=MK;return i!==void 0&&(i=Zf(i),s=LK),jK(o,s,function(l,c){var f;switch(dm(c,0)){case"$":return"$";case"&":return e;case"`":return pm(t,0,n);case"'":return pm(t,a);case"<":f=i[pm(c,1,-1)];break;default:var d=+c;if(d===0)return l;if(d>u){var p=RK(d/10);return p===0?l:p<=u?r[p-1]===void 0?dm(c,1):r[p-1]+dm(c,1):l}f=r[d-1]}return f===void 0?"":f})},HK=ge.TypeError,vf=function(e,t){var n=e.exec;if(Ut(n)){var r=pt(n,e,t);return r!==null&&Bn(r),r}if(io(e)==="RegExp")return pt(gf,e,t);throw HK("RegExp#exec called on incompatible receiver")},jb=_n("replace"),UK=Math.max,VK=Math.min,WK=le([].concat),hm=le([].push),pD=le("".indexOf),hD=le("".slice),qK="a".replace(/./,"$0")==="$0",gD=!!/./[jb]&&/./[jb]("a","$0")==="";c3("replace",function(e,t,n){var r=gD?"$":"$0";return[function(i,o){var a=er(this),u=i==null?void 0:O0(i,jb);return u?pt(u,i,a,o):pt(t,it(a),i,o)},function(i,o){var a=Bn(this),u=it(i);if(typeof o=="string"&&pD(o,r)===-1&&pD(o,"$<")===-1){var s=n(t,a,u,o);if(s.done)return s.value}var l=Ut(o);l||(o=it(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var d=[];;){var p=vf(a,u);if(p===null||(hm(d,p),!c))break;it(p[0])===""&&(a.lastIndex=f3(u,Qf(a.lastIndex),f))}for(var v,m="",g=0,y=0;y<d.length;y++){for(var h=it((p=d[y])[0]),$=UK(VK(Vs(p.index),u.length),0),w=[],C=1;C<p.length;C++)hm(w,(v=p[C])===void 0?v:String(v));var D=p.groups;if(l){var A=WK([h],w,$,u);D!==void 0&&hm(A,D);var I=it(EF(o,void 0,A))}else I=zK(h,u,$,w,D,o);$>=g&&(m+=hD(u,g,$)+I,g=$+h.length)}return m+hD(u,g)}]},!!ut(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!qK||gD);var Lb=_n("unscopables"),Mb=Array.prototype;Mb[Lb]==null&&Us.f(Mb,Lb,{configurable:!0,value:wF(null)});var CF=function(e){Mb[Lb][e]=!0},GK=T0.find,vD=!0;"find"in[]&&Array(1).find(function(){vD=!1}),_t({target:"Array",proto:!0,forced:vD},{find:function(e){return GK(this,e,arguments.length>1?arguments[1]:void 0)}}),CF("find");var KK=_n("match"),DF=function(e){var t;return Vn(e)&&((t=e[KK])!==void 0?!!t:io(e)=="RegExp")},YK=ge.TypeError,XK=_n("species"),JK=function(e,t){var n,r=Bn(e).constructor;return r===void 0||(n=Bn(r)[XK])==null?t:function(i){if(a3(i))return i;throw YK(oF(i)+" is not a constructor"
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,yD=le("".replace),qh="["+zb+"]",nY=RegExp("^"+qh+qh+"*"),rY=RegExp(qh+qh+"*$"),gm=function(e){return function(t){var n=it(er(t));return 1&e&&(n=yD(n,nY,"")),2&e&&(n=yD(n,rY,"")),n}},iY={start:gm(1),end:gm(2),trim:gm(3)},oY=B0.PROPER,aY=iY.trim;function d3(e){return O("<div>"+e+"</div>").children().filter(function(t){return t.tagName!=="BR"}).length===0}function Ws(e){return e.length===0?"":e[0].outerHTML}function qs(e){return e.length?e[0].tagName.toLowerCase():""}function dr(e,t){for(var n="",r=(e.attr("style")||"").split(";"),i=r.length,o=0;o<i;o++){var a=r[o];if(a){var u=a.split(":");u[0].trim()===t&&(n=u[1].trim())}}return n}_t({target:"String",proto:!0,forced:(jl="trim",ut(function(){return!!zb[jl]()||"\u200B\x85\u180E"[jl]()!=="\u200B\x85\u180E"||oY&&zb[jl].name!==jl}))},{trim:function(){return aY(this)}}),_t({global:!0},{globalThis:ge}),yh&&(O.fn.css=yh),Ur&&(O.fn.append=Ur),p6&&(O.fn.prepend=p6),fs&&(O.fn.addClass=fs),ds&&(O.fn.removeClass=ds),ps&&(O.fn.hasClass=ps),Hr&&(O.fn.on=Hr),l6&&(O.fn.off=l6),bo&&(O.fn.focus=bo),Mr&&(O.fn.attr=Mr),hh&&(O.fn.removeAttr=hh),gs&&(O.fn.hide=gs),mh&&(O.fn.show=mh),Eh&&(O.fn.parents=Eh),hs&&(O.fn.dataset=hs),zr&&(O.fn.val=zr),$h&&(O.fn.text=$h),yo&&(O.fn.html=yo),ms&&(O.fn.children=ms),ys&&(O.fn.remove=ys),vs&&(O.fn.find=vs),gh&&(O.fn.width=gh),vh&&(O.fn.height=vh),f6&&(O.fn.filter=f6),bs&&(O.fn.empty=bs);var uY={selector:"p",parseElemHtml:function(e,t,n){var r=O(e);return(t=t.filter(function(i){return!!X.isText(i)||!!n.isInline(i)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"paragraph",children:t}}},Hb=function(e,t){return Hb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Hb(e,t)};/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function tt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Hb(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Eo=function(){return Eo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Eo.apply(this,arguments)};function ko(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(l){try{s(r.next(l))}catch(c){o(c)}}function u(l){try{s(r.throw(l))}catch(c){o(c)}}function s(l){var c;l.done?i(l.value):(c=l.value,c instanceof n?c:new n(function(f){f(c)})).then(a,u)}s((r=r.apply(e,t||[])).next())})}function _o(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(s){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(c[0]===6&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(f){c=[6,f],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,l])}}}function AF(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")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 ke(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function bD(e){var t=ke(E.nodes(e,{match:function(a){return e.children[0]===a},mode:"highest"}),1),n=t[0];if(n==null)return!1;var r=n[0];if(!te.isElement(r)||r.type==="paragraph"||W.string(r)!=="")return!1;var i=r.children,o=i===void 0?[]:i;return!!X.isText(o[0])&&(P.setNodes(e,{type:"paragraph"}),!0)}var sY={renderElems:[cG],elemsToHtml:[fG],parseElemsHtml:[uY],editorPlugin:function(e){var t=e.deleteBackward,n=e.deleteForward;e.insertText,e.insertBreak;var r=e;return r.deleteBackward=function(i){bD(r)||t(i)},r.deleteForward=function(i){bD(r)||n(i)},r}},lY=/"/g,cY=le("".replace),Dc=function(e,t,n,r){var i=it(er(e)),o="<"+t;return n!==""&&(o+=" "+n+'="'+cY(it(r),lY,"&quot;")+'"'),o+">"+i+"</"+t+">"},xc=function(e){return ut(function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})};function vm(e,t){var n=t,r=e,i=r.bold,o=r.italic,a=r.underline;return i&&(n="<strong>"+n+"</strong>"),r.code&&(n="<code>"+n+"</code>"),o&&(n="<em>"+n+"</em>"),a&&(n="<u>"+n+"</u>"),r.through&&(n="<s>"+n+"</s>"),r.sub&&(n="<sub>"+n+"</sub>"),r.sup&&(n="<sup>"+n+"</sup>"),n}function Go(e,t){return e.length!==0&&(!!e[0].matches(t)||e.find(t).length>0)}_t({target:"String",proto:!0,forced:xc("bold")},{bold:function(){return Dc(this,"b","","")}}),_t({target:"String",proto:!0,forced:xc("italics")},{italics:function(){return Dc(this,"i","","")}}),_t({target:"String",proto:!0,forced:xc("sub")},{sub:function(){return Dc(this,"sub","","")}}),_t({target:"String",proto:!0,forced:xc("sup")},{sup:function(){return Dc(this,"sup","","")}});var $D={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectLi
<li data-value="0" class="clear">
<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>
`+u+`
</li>
`);return i.prepend(s),i[0]},e}(),gX=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("color.color"),n.iconSvg=bY,n.mark="color",n}return tt(t,e),t}(LF),vX=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("color.bgColor"),n.iconSvg=$Y,n.mark="bgColor",n}return tt(t,e),t}(LF),SD=["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)"],mX={renderStyle:function(e,t){var n=e,r=n.color,i=n.bgColor,o=t;return r&&Ma(o,{color:r}),i&&Ma(o,{backgroundColor:i}),o},styleToHtml:function(e,t){if(!X.isText(e))return t;var n,r=e,i=r.color,o=r.bgColor;return i||o?((d3(t)||qs(n=O(t))!=="span")&&(n=O("<span>"+t+"</span>")),i&&n.css("color",i),o&&n.css("background-color",o),Ws(n)):t},preParseHtml:[hX],parseStyleHtml:function(e,t,n){var r=O(e);if(!X.isText(t))return t;var i=t,o=dr(r,"color");o&&(i.color=o);var a=dr(r,"background-color");return a||(a=dr(r,"background")),a&&(i.bgColor=a),i},menus:[{key:"color",factory:function(){return new gX},config:{colors:SD}},{key:"bgColor",factory:function(){return new vX},config:{colors:SD}}]},yX=function(e){if(typeof e!="string")return!1;var t=e.match(bX);if(!t)return!1;var n=t[1];return n?!!($X.test(n)||wX.test(n)):!1},bX=/^(?:\w+:)?\/\/(\S+)$/,$X=/^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/,wX=/^[^\s\.]+\.\S{2,}$/,EX=fF.includes;function k0(e){return e===void 0&&(e="r"),e+"-"+X9()}function p3(e){return e.replace(/</g,"&lt;").replace(/>/g,"&gt;")}function MF(e,t,n,r){return ko(this,void 0,void 0,function(){var i,o;return _o(this,function(a){switch(a.label){case 0:return(i=t.getMenuConfig(e).checkLink)?[4,i(n,r)]:[3,2];case 1:if(typeof(o=a.sent())=="string")return t.alert(o,"error"),[2,!1];if(o==null)return[2,!1];a.label=2;case 2:return[2,!0]}})})}function zF(e,t,n){return ko(this,void 0,void 0,function(){var r;return _o(this,function(i){switch(i.label){case 0:return(r=t.getMenuConfig(e).parseLinkUrl)?[4,r(n)]:[3,2];case 1:return[2,i.sent()];case 2:return[2,n]}})})}function h3(e){return e.selection==null||!!S.getSelectedElems(e).some(function(t){var n=t.type;return!!e.isVoid(t)||!!["pre","code","link"].includes(n)||void 0})}function wm(e,t){return{type:"link",url:p3(e),children:t?[{text:t}]:[]}}function HF(e,t,n){return ko(this,void 0,void 0,function(){var r,i,o;return _o(this,function(a){switch(a.label){case 0:return n?(t||(t=n),e.restoreSelection(),h3(e)?[2]:[4,MF("insertLink",e,t,n)]):[2];case 1:return a.sent()?[4,zF("insertLink",e,n)]:[2];case 2:return r=a.sent(),(i=e.selection)==null?[2]:(R.isCollapsed(i)?(e.insertText(" "),o=wm(r,t),P.insertNodes(e,o),e.insertFragment([{text:" "}])):E.string(e,i)!==t?(e.deleteFragment(),o=wm(r,t),P.insertNodes(e,o)):(o=wm(r),P.wrapNodes(e,o,{split:!0}),P.collapse(e,{edge:"end"})),[2])}})})
`)return e.deleteBackward("character"),void P.insertNodes(r,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}n(`
`)},r}},uJ=function(){function e(){this.title=q("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(t,n){},e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){return t.selection==null||!!ke(E.nodes(t,{match:function(n){return S.getNodeType(n)==="pre"||!!E.isVoid(t,n)},universal:!0}),1)[0]},e.prototype.getPanelContentElem=function(t){if(this.$content==null){var n=O('<ul class="w-e-panel-content-emotion"></ul>');n.on("click","li",function(o){var a=o.target;if(a!=null){o.preventDefault();var u=O(a).text();t.insertText(u)}}),this.$content=n}var r=this.$content;if(r==null)return document.createElement("ul");r.empty();var i=t.getMenuConfig("emotion").emotions;return(i===void 0?[]:i).forEach(function(o){var a=O("<li>"+o+"</li>");r.append(a)}),r[0]},e}(),sJ={menus:[{key:"emotion",factory:function(){return new uJ},config:{emotions:"\u{1F600} \u{1F603} \u{1F604} \u{1F601} \u{1F606} \u{1F605} \u{1F602} \u{1F923} \u{1F60A} \u{1F607} \u{1F642} \u{1F643} \u{1F609} \u{1F60C} \u{1F60D} \u{1F618} \u{1F617} \u{1F619} \u{1F61A} \u{1F60B} \u{1F61B} \u{1F61D} \u{1F61C} \u{1F913} \u{1F60E} \u{1F60F} \u{1F612} \u{1F61E} \u{1F614} \u{1F61F} \u{1F615} \u{1F641} \u{1F623} \u{1F616} \u{1F62B} \u{1F629} \u{1F622} \u{1F62D} \u{1F624} \u{1F620} \u{1F621} \u{1F633} \u{1F631} \u{1F628} \u{1F917} \u{1F914} \u{1F636} \u{1F611} \u{1F62C} \u{1F644} \u{1F62F} \u{1F634} \u{1F637} \u{1F911} \u{1F608} \u{1F921} \u{1F4A9} \u{1F47B} \u{1F480} \u{1F440} \u{1F463} \u{1F450} \u{1F64C} \u{1F44F} \u{1F91D} \u{1F44D} \u{1F44E} \u{1F44A} \u270A \u{1F91B} \u{1F91C} \u{1F91E} \u270C\uFE0F \u{1F918} \u{1F44C} \u{1F448} \u{1F449} \u{1F446} \u{1F447} \u261D\uFE0F \u270B \u{1F91A} \u{1F590} \u{1F596} \u{1F44B} \u{1F919} \u{1F4AA} \u{1F595} \u270D\uFE0F \u{1F64F}".split(" ")}}]},lJ={1:"12px",2:"14px",3:"16px",4:"19px",5:"24px",6:"32px",7:"48px"},cJ={selector:"font",preParseHtml:function(e){var t=O(e);if(qs(t)!=="font")return e;var n=t.attr("size")||"";n&&(t.removeAttr("size"),t.css("font-size",lJ[n]));var r=t.attr("face")||"";return r&&(t.removeAttr("face"),t.css("font-family",r)),t[0]}},fJ=le("".indexOf);_t({target:"String",proto:!0,forced:!NF("includes")},{includes:function(e){return!!~fJ(it(er(this)),it(PF(e)),arguments.length>1?arguments[1]:void 0)}});var _i,Kp,KF=function(){function e(){this.tag="select",this.width=80}return e.prototype.isActive=function(t){return!1},e.prototype.getValue=function(t){var n=this.mark,r=E.marks(t);return r&&r[n]?r[n]:""},e.prototype.isDisabled=function(t){return t.selection==null||(this.mark,!!ke(E.nodes(t,{match:function(n){return S.getNodeType(n)==="pre"||!!E.isVoid(t,n)},universal:!0}),1)[0])},e.prototype.exec=function(t,n){var r=this.mark;n?t.addMark(r,n):t.removeMark(r)},e}(),dJ=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.title=q("fontSize.title"),n.iconSvg=wY,n.mark="fontSize",n}return tt(t,e),t.prototype.getOptions=function(n){var r=[],i=n.getMenuConfig(this.mark).fontSizeList,o=i===void 0?[]:i;r.push({text:q("fontSize.default"),value:""}),o.forEach(function(u){r.push({text:u,value:u})});var a=this.getValue(n);return r.forEach(function(u){u.value===a?u.selected=!0:delete u.selected}),r},t}(KF),sp=function(e){return e&&e.Math==Math&&e},Ee=sp(typeof globalThis=="object"&&globalThis)||sp(typeof window=="object"&&window)||sp(typeof self=="object"&&sel
`).map(function(o){return{type:"paragraph",children:[{text:o}]}});P.insertNodes(t,i,{mode:"highest"})}},e.prototype.changeToCodeBlock=function(t,n){var r,i,o=[],a=E.nodes(t,{match:function(f){return t.children.includes(f)},universal:!0});try{for(var u=AF(a),s=u.next();!s.done;s=u.next()){var l=ke(s.value,1)[0];l&&o.push(W.string(l))}}catch(f){r={error:f}}finally{try{s&&!s.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}P.removeNodes(t,{mode:"highest"});var c={type:"pre",children:[{type:"code",language:n,children:[{text:o.join(`
`)}]}]};P.insertNodes(t,c,{mode:"highest"})},e}(),BQ={key:"codeBlock",factory:function(){return new OQ}};_t({target:"String",proto:!0,forced:xc("anchor")},{anchor:function(e){return Dc(this,"a","name",e)}}),c3("match",function(e,t,n){return[function(r){var i=er(this),o=r==null?void 0:O0(r,e);return o?pt(o,r,i):new RegExp(r)[e](it(i))},function(r){var i=Bn(this),o=it(r),a=n(t,i,o);if(a.done)return a.value;if(!i.global)return vf(i,o);var u=i.unicode;i.lastIndex=0;for(var s,l=[],c=0;(s=vf(i,o))!==null;){var f=it(s[0]);l[c]=f,f===""&&(i.lastIndex=f3(o,Qf(i.lastIndex),u)),c++}return c===0?null:l}]});var FQ={type:"pre",renderElem:function(e,t,n){return de("pre",null,t)}},TQ={type:"code",renderElem:function(e,t,n){return de("code",null,t)}},kQ={selector:"pre",parseElemHtml:function(e,t,n){var r=O(e);return(t=t.filter(function(i){return S.getNodeType(i)==="code"})).length===0&&(t=[{type:"code",language:"",children:[{text:r[0].textContent||""}]}]),{type:"pre",children:t.filter(function(i){return S.getNodeType(i)==="code"})}}},_Q={menus:[BQ],editorPlugin:function(e){var t=e.insertBreak,n=e.normalizeNode,r=e.insertData;e.insertNode;var i=e;return i.insertBreak=function(){var o=S.getSelectedNodeByType(i,"code");if(o!=null){var a=function(l,c){var f=c.selection;if(f==null)return"";var d=W.string(l),p=f.anchor.offset,v=d.slice(0,p).split(`
`),m=v.length;return m===0?"":v[m-1]}(o,i);if(a){var u=a.match(/^\s+/);if(u!=null&&u[0]!=null){var s=u[0];return void i.insertText(`
`+s)}}i.insertText(`
`)}else t()},i.normalizeNode=function(o){var a=ke(o,2),u=a[0],s=a[1],l=S.getNodeType(u);return l==="code"&&s.length<=1&&P.setNodes(i,{type:"paragraph"},{at:s}),l==="pre"&&(S.isLastNode(i,u)&&P.insertNodes(i,S.genEmptyParagraph(),{at:[s[0]+1]}),S.getNodeType(u.children[0])!=="code"&&(P.unwrapNodes(i),P.setNodes(i,{type:"paragraph"},{mode:"highest"}))),n([u,s])},i.insertData=function(o){if(S.getSelectedNodeByType(i,"code")!=null){var a=o.getData("text/plain");E.insertText(i,a)}else r(o)},i},renderElems:[FQ,TQ],elemsToHtml:[{type:"code",elemToHtml:function(e,t){return"<code>"+t+"</code>"}},{type:"pre",elemToHtml:function(e,t){return"<pre>"+t+"</pre>"}}],preParseHtml:[{selector:"pre>code",preParseHtml:function(e){var t=O(e);if(qs(t)!=="code")return e;var n=t.find("xmp");if(n.length===0)return e;var r=n.text();return n.remove(),t.text(r),t[0]}}],parseElemsHtml:[{selector:"pre>code",parseElemHtml:function(e,t,n){return{type:"code",language:"",children:[{text:O(e)[0].textContent||""}]}}},kQ]},PQ=function(){function e(){this.title=q("fullScreen.title"),this.iconSvg='<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>',this.tag="button",this.alwaysEnable=!0}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return t.isFullScreen},e.prototype.isDisabled=function(t){return!1},e.prototype.exec=function(t,n){t.isFullScreen?t.unFullScreen():t.fullScreen()},e}(),NQ={menus:[{key:"fullScreen",factory:function(){return new PQ}}]},IQ=function(){function e(){this.title=q("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(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.isDisabled=function(t){var n=t.selection;return n==null||!!R.isExpanded(n)},e.prototype.exec=function(t,n){var r=t.selection;if(r!=null){var i=[r.anchor.path[0]];P.insertNodes(t,{type:"paragraph",children:[{text:""}]},{at:i}),t.select(E.start(t,i))}},e}(),RQ=[LY,mX,iQ,sQ,pQ,gQ,qX,CQ,sJ,FX,_Q,aJ,dX,sY,XX,yQ,NQ,{menus:[{key:"enter",factory:function(){return new IQ}}]}];vn("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),vn("zh-CN",{listModule:{unOrderedList:"\u65E0\u5E8F\u5217\u8868",orderedList:"\u6709\u5E8F\u5217\u8868"}});var hx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function AT(e){var t={exports:{}};return e(t,t.exports),t.exports}var Ni,Xp,dp=function(e){return e&&e.Math==Math&&e},Ae=dp(typeof globalThis=="object"&&globalThis)||dp(typeof window=="object"&&window)||dp(typeof self=="object"&&self)||dp(typeof hx=="object"&&hx)||function(){return this}()||Function("return th
`)&&e.flags==="s")}),cte=Ae.RegExp,fte=Wt(function(){var e=cte("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),dte=s4.get,pte=B3("native-string-replace",String.prototype.replace),sg=RegExp.prototype.exec,p4=sg,hte=Ne("".charAt),gte=Ne("".indexOf),vte=Ne("".replace),Um=Ne("".slice),Vm=(Hm=/b*/g,un(sg,Px=/a/,"a"),un(sg,Hm,"a"),Px.lastIndex!==0||Hm.lastIndex!==0),Nx=ute.BROKEN_CARET,Wm=/()??/.exec("")[1]!==void 0;(Vm||Wm||Nx||lte||fte)&&(p4=function(e){var t,n,r,i,o,a,u,s=this,l=dte(s),c=Fr(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=un(p4,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=Nx&&s.sticky,v=un(ote,s),m=s.source,g=0,y=c;if(p&&(v=vte(v,"y",""),gte(v,"g")===-1&&(v+="g"),y=Um(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&hte(c,s.lastIndex-1)!==`
`)&&(m="(?: "+m+")",y=" "+y,g++),n=new RegExp("^(?:"+m+")",v)),Wm&&(n=new RegExp("^"+m+"$(?!\\s)",v)),Vm&&(r=s.lastIndex),i=un(sg,p?n:s,y),p?i?(i.input=Um(i.input,g),i[0]=Um(i[0],g),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:Vm&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),Wm&&i&&i.length>1&&un(pte,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=UT(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var lg=p4;Ys({target:"RegExp",proto:!0,forced:/./.exec!==lg},{exec:lg});var M3=Function.prototype,Ix=M3.apply,mte=M3.bind,Rx=M3.call,yte=typeof Reflect=="object"&&Reflect.apply||(mte?Rx.bind(Ix):function(){return Rx.apply(Ix,arguments)}),bte=Yr("species"),qm=RegExp.prototype,$te=Ne("".charAt),jx=Ne("".charCodeAt),wte=Ne("".slice),Lx=function(e){return function(t,n){var r,i,o=Fr(sd(t)),a=z0(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=jx(o,a))<55296||r>56319||a+1===u||(i=jx(o,a+1))<56320||i>57343?e?$te(o,a):r:e?wte(o,a,a+2):i-56320+(r-55296<<10)+65536}},Ete={codeAt:Lx(!1),charAt:Lx(!0)}.charAt,Cte=function(e,t,n){return t+(n?Ete(e,t).length:1)},Dte=Math.floor,Gm=Ne("".charAt),xte=Ne("".replace),Km=Ne("".slice),Ste=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Ate=/\$([$&'`]|\d{1,2})/g,Ote=function(e,t,n,r,i,o){var a=n+e.length,u=r.length,s=Ate;return i!==void 0&&(i=M0(i),s=Ste),xte(o,s,function(l,c){var f;switch(Gm(c,0)){case"$":return"$";case"&":return e;case"`":return Km(t,0,n);case"'":return Km(t,a);case"<":f=i[Km(c,1,-1)];break;default:var d=+c;if(d===0)return l;if(d>u){var p=Dte(d/10);return p===0?l:p<=u?r[p-1]===void 0?Gm(c,1):r[p-1]+Gm(c,1):l}f=r[d-1]}return f===void 0?"":f})},Bte=Ae.TypeError,Fte=function(e,t){var n=e.exec;if(qt(n)){var r=un(n,e,t);return r!==null&&Do(r),r}if(Ca(e)==="RegExp")return un(lg,e,t);throw Bte("RegExp#exec called on incompatible receiver")},h4=Yr("replace"),Tte=Math.max,kte=Math.min,_te=Ne([].concat),Ym=Ne([].push),Mx=Ne("".indexOf),zx=Ne("".slice),Pte="a".replace(/./,"$0")==="$0",Hx=!!/./[h4]&&/./[h4]("a","$0")==="";(function(e,t,n,r){var i=Yr(e),o=!Wt(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!Wt(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[bte]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=Ne(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var v=Ne(l),m=c.exec;return m===lg||m===qm.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:v(f,c,d)}:{done:!1}});og(String.prototype,e,s[0]),og(qm,i,s[1])}r&&mf(qm[i],"sham",!0)})("replace",function(e,t,n){var r=Hx?"$":"$0";return[function(i,o){var a=sd(this),u=i==null?void 0:TT(i,h4);return u?un(u,i,a,o):un(t,Fr(a),i,o)},function(i,o){var a=Do(this),u=Fr(i);if(typeof o=="string"&&Mx(o,r)===-1&&Mx(o,"$<")===-1){var s=n(t,a,u,o);if(s.done)return s.value}var l=qt(o);l||(o=Fr(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var d=[];;){var p=Fte(a,u);if(p===null||(Ym(d,p),!c))break;Fr(p[0])===""&&(a.lastIndex=Cte(u,jT(a.lastIndex),f))}for(var v,m="",g=0,y=0;y<d.length;y++){for(var h=Fr((p=d[y])[0]),$=Tte(kte(z0(p.index),u.length),0),w=[],C=1;C<p.length;C++)Ym(w,(v=p[C])===void 0?v:String(v));var D=p.groups;if(l){var A=_te([h],w,$,u);D!==void 0&&Ym(A,D);var I=Fr(yte(o,void 0,A))}else I=Ote(h,u,$,w,D,o);$>=g&&(m+=zx(u,g,$)+I,g=$+h.length)}return m+zx(u,g)}]},!!Wt(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!Pte||Hx),Ys({global:!0},{globalThis:Ae});var Nte={selector:"li",parseElemHtml:function(e,t,n){var r=O(e);return(t=t.filter(function(i){return!!X.isText(i)||!!n.isInline(i)})).length===0&&(t=[{text:r.text().replace(/\s+/gm," ")}]),{type:"list-item",children:t}}},Ite={selector:"ul",parseElemHtml:function(e,t,n){return{type:"bulleted-list",children:t.filter(function(r){return S.getNodeType(r)==="list-item"})}}},Rte={selector:"ol",parseElemHtml:function(e,t,n){return{type:"numbered-list",children:t.filter(function(r){return S.getNodeType(r)==="list-item"})}}},g4=function(e,t){retu
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function XT(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}g4(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function v4(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}var Ux,JT=function(){function e(){this.tag="button"}return e.prototype.getListNode=function(t){var n=this.type;return S.getSelectedNodeByType(t,n)},e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!!this.getListNode(t)},e.prototype.isDisabled=function(t){return t.selection==null||!!S.getSelectedElems(t).some(function(n){if(E.isVoid(t,n)&&E.isBlock(t,n))return!0;var r=n.type;return!!["pre","code","table"].includes(r)||void 0})},e.prototype.getMatchListType=function(t){var n=v4(E.nodes(t,{match:function(o){return ug(o)},universal:!0}),1),r=n[0];if(r==null)return"";var i=v4(r,1)[0];return S.getNodeType(i)},e.prototype.exec=function(t,n){var r=this.type,i=this.isActive(t);P.unwrapNodes(t,{match:function(u){return ug(u)},split:!0}),P.setNodes(t,{type:i?"paragraph":"list-item"});var o={type:r,children:[]};i||P.wrapNodes(t,o);var a=this.getMatchListType(t);a!=""&&a!==r&&P.wrapNodes(t,o)},e}(),jte='<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>',Lte='<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>',Mte=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="bulleted-list",n.title=q("listModule.unOrderedList"),n.iconSvg=jte,n}return XT(t,e),t}(JT),zte=function(e){function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="numbered-list",n.title=q("listModule.orderedList"),n.iconSvg=Lte,n}return XT(t,e),t}(JT),Hte={key:"bulletedList",factory:function(){return new Mte}},Ute={key:"numberedList",factory:function(){return new zte}},Vte=/"/g,Wte=Ne("".replace);Ys({target:"String",proto:!0,forced:(Ux="anchor",Wt(function(){var e=""[Ux]('"');return e!==e.toLowerCase()||e.split('"').length>3}))},{anchor:function(e){return t="a",n="name",r=e,i=Fr(sd(this)),o="<"+t,n!==""&&(o+=" "+n+'="'+Wte(Fr(r),Vte,"&quot;")+'"'),o+">"+i+"</"+t+">";var t,n,r,i,o}});var Vx=function(e,t,n){var r=F3(t);r in e?cd.f(e,r,S3(0,n)):e[r]=n},ZT=Yr("isConcatSpreadable"),Wx=Ae.TypeError,qte=ng>=51||!Wt(function(){var e=[];return e[ZT]=!1,e.concat()[0]!==e}),Gte=YT("concat"),Kte=function(e){if(!ar(e))return!1;var t=e[ZT];return t!==void 0?!!t:f4(e)};Ys({target:"Array",proto:!0,forced:!qte||!Gte},{concat:function(e){var t,n,r,i,o,a=M0(this),u=KT(a,0),s=0;for(t=-1,r=arguments.length;t<r;t++)if(Kte(o=t===-1?a:arguments[t])){if(s+(i=_3(o))>9007199254740991)throw Wx("Maximum allowed index exceeded");for(n=0;n<i;n++,s++)n in o&&Vx(u,s,o[n])}else{if(s>=9007199254740991)throw Wx("Maximum allowed index exceeded");Vx(u,s++,o)}return u.length=s,u}});var Yte={renderElems:[Mee,zee,Hee],elemsToHtml:[Uee,Vee,Wee],parseElemsHtml:[Nte,Rte,Ite],menus:[Hte,Ute],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward;e.insertNode;var r=e;return r.insertBreak=function(){var i=r.selection;if(i!=null){var o=S.getSelectedNodeByType(r,"list-item");if(o!=null){var a=S.getParentNode(r,o),u=(a==null?void 0:a.children)||[];if(o===u[u.length-1]&&W.string(o)===""){P.removeNodes(r,{match:function(l){return S.checkNodeType(l,"list-item")}});var s=[i.anchor.path[0]+1];return P.insertNodes(r,S.ge
`)&&e.flags==="s")}),ire=De.RegExp,ore=Ot(function(){var e=ire("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),are=D4.get,ure=W3("native-string-replace",String.prototype.replace),pg=RegExp.prototype.exec,S4=pg,sre=Se("".charAt),lre=Se("".indexOf),cre=Se("".replace),ty=Se("".slice),ny=(ey=/b*/g,xt(pg,lS=/a/,"a"),xt(pg,ey,"a"),lS.lastIndex!==0||ey.lastIndex!==0),cS=hk.BROKEN_CARET,ry=/()??/.exec("")[1]!==void 0;(ny||ry||cS||rre||ore)&&(S4=function(e){var t,n,r,i,o,a,u,s=this,l=are(s),c=Qt(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=xt(S4,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=cS&&s.sticky,v=xt(pk,s),m=s.source,g=0,y=c;if(p&&(v=cre(v,"y",""),lre(v,"g")===-1&&(v+="g"),y=ty(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&sre(c,s.lastIndex-1)!==`
`)&&(m="(?: "+m+")",y=" "+y,g++),n=new RegExp("^(?:"+m+")",v)),ry&&(n=new RegExp("^"+m+"$(?!\\s)",v)),ny&&(r=s.lastIndex),i=xt(pg,p?n:s,y),p?i?(i.input=ty(i.input,g),i[0]=ty(i[0],g),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:ny&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),ry&&i&&i.length>1&&xt(ure,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=mk(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var $f=S4;Ao({target:"RegExp",proto:!0,forced:/./.exec!==$f},{exec:$f});var hg=Array.isArray||function(e){return so(e)=="Array"},yk=function(){},fre=[],bk=pd("Reflect","construct"),n5=/^\s*(?:class|function)\b/,dre=Se(n5.exec),pre=!n5.exec(yk),Jl=function(e){if(!Gt(e))return!1;try{return bk(yk,fre,e),!0}catch{return!1}},r5=!bk||Ot(function(){var e;return Jl(Jl.call)||!Jl(Object)||!Jl(function(){e=!0})||e})?function(e){if(!Gt(e))return!1;switch(e5(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return pre||!!dre(n5,Y3(e))}:Jl,$k=function(e,t,n){var r=G3(t);r in e?hd.f(e,r,z3(0,n)):e[r]=n},hre=nr("species"),i5=function(e){return b4>=51||!Ot(function(){var t=[];return(t.constructor={})[hre]=function(){return{foo:1}},t[e](Boolean).foo!==1})},gre=Se([].slice),vre=i5("slice"),mre=nr("species"),iy=De.Array,yre=Math.max;function gr(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function fS(e){var t=e.selection;if(t==null)return!1;var n=gr(E.nodes(e,{match:function(o){return S.checkNodeType(o,"table-cell")}}),1)[0];if(n){var r=gr(n,2)[1],i=E.start(e,r);if($e.equals(t.anchor,i))return!0}return!1}function dS(e,t){var n,r,i=E.nodes(e,{at:t,match:function(s){return S.getNodeType(s)==="table"}}),o=!1;try{for(var a=function(s){var l=typeof Symbol=="function"&&Symbol.iterator,c=l&&s[l],f=0;if(c)return c.call(s);if(s&&typeof s.length=="number")return{next:function(){return s&&f>=s.length&&(s=void 0),{value:s&&s[f++],done:!s}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")}(i),u=a.next();!u.done;u=a.next())u.value,o=!0}catch(s){n={error:s}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o}Ao({target:"Array",proto:!0,forced:!vre},{slice:function(e,t){var n,r,i,o=dd(this),a=U0(o),u=bf(e,a),s=bf(t===void 0?a:t,a);if(hg(o)&&(n=o.constructor,(r5(n)&&(n===iy||hg(n.prototype))||qn(n)&&(n=n[mre])===null)&&(n=void 0),n===iy||n===void 0))return gre(o,u,s);for(r=new(n===void 0?iy:n)(yre(s-u,0)),i=0;u<s;u++,i++)u in o&&$k(r,i,o[u]);return r.length=i,r}});var pS=Se(Se.bind),bre=nr("species"),hS=De.Array,$re=function(e,t){return new(function(n){var r;return hg(n)&&(r=n.constructor,(r5(r)&&(r===hS||hg(r.prototype))||qn(r)&&(r=r[bre])===null)&&(r=void 0)),r===void 0?hS:r}(e))(t===0?0:t)},gS=Se([].push),ji=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,o=e==6,a=e==7,u=e==5||o;return function(s,l,c,f){for(var d,p,v=q3(s),m=nk(v),g=function(C,D){return ok(C),D===void 0?C:pS?pS(C,D):function(){return C.apply(D,arguments)}}(l,c),y=U0(m),h=0,$=f||$re,w=t?$(s,y):n||a?$(s,0):void 0;y>h;h++)if((u||h in m)&&(p=g(d=m[h],h,v),e))if(t)w[h]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return h;case 2:gS(w,d)}else switch(e){case 4:return!1;case 7:gS(w,d)}return o?-1:r||i?i:w}},V0={forEach:ji(0),map:ji(1),filter:ji(2),some:ji(3),every:ji(4),find:ji(5),findIndex:ji(6),filterReject:ji(7)},wre=V0.map;Ao({target:"Array",proto:!0,forced:!i5("map")},{map:function(e){return wre(this,e,arguments.length>1?arguments[1]:void 0)}});var Ere=Q3?{}.toString:function(){return"[object "+e5(this)+"]"};function W0(e){var t=e.children||[];return t.length===0?[]:(t[0]||{}).children||[]}function wk(e){return W0(e).every(function(t){return!!t.isHeader})}Q3||yf(Object.prototype,"toString",Ere,{unsafe:!0});var Cre=J3.PROPER,A4=RegExp.prototype,Ek=A4.toString,Dre=Se(pk),xr
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,CS=Se("".replace),gg="["+T4+"]",Hre=RegExp("^"+gg+gg+"*"),Ure=RegExp(gg+gg+"*$"),ay=function(e){return function(t){var n=Qt(So(t));return 1&e&&(n=CS(n,Hre,"")),2&e&&(n=CS(n,Ure,"")),n}},Vre={start:ay(1),end:ay(2),trim:ay(3)},Wre=J3.PROPER,qre=Vre.trim;function Ak(e){return e.length?e[0].tagName.toLowerCase():""}Ao({target:"String",proto:!0,forced:function(e){return Ot(function(){return!!T4[e]()||"\u200B\x85\u180E"[e]()!=="\u200B\x85\u180E"||Wre&&T4[e].name!==e})}("trim")},{trim:function(){return qre(this)}}),Ao({global:!0},{globalThis:De}),Ur&&(O.fn.append=Ur),Hr&&(O.fn.on=Hr),bo&&(O.fn.focus=bo),Mr&&(O.fn.attr=Mr),zr&&(O.fn.val=zr),yo&&(O.fn.html=yo),hs&&(O.fn.dataset=hs),fs&&(O.fn.addClass=fs),ds&&(O.fn.removeClass=ds),ms&&(O.fn.children=ms),bh&&(O.fn.each=bh),vs&&(O.fn.find=vs);var wf=!1,Ok=0,Bk=0,Ef=null,Cf=null,Mc=O("body");function Fk(e){wf=!1,Cf=null,Ef=null,Mc.off("mousemove",Tk),Mc.off("mouseup",Fk)}Mc.on("mousedown",function(e){var t=e.target;if((t.tagName==="TH"||t.tagName==="TD")&&t.style.cursor==="col-resize"){t.style.cursor="auto",e.preventDefault(),wf=!0;var n=e.clientX;Ok=n;var r=t.getBoundingClientRect().width;Bk=r,Mc.on("mousemove",Tk),Mc.on("mouseup",Fk)}});var Tk=Pa(function(e){if(wf&&Cf!=null&&Ef!=null){e.preventDefault();var t=e.clientX,n=Bk+(t-Ok);(n=Math.floor(100*n)/100)<30&&(n=30),P.setNodes(Cf,{width:n.toString()},{at:Ef})}},100),Gre={type:"table",renderElem:function(e,t,n){var r=function(l,c){if(l.isDisabled())return!1;var f=l.selection;if(f==null||R.isCollapsed(f))return!0;var d=f.anchor,p=f.focus,v=S.findPath(l,c),m=E.start(l,v),g=E.end(l,v),y=$e.compare(d,g)<=0&&$e.compare(d,m)>=0,h=$e.compare(p,g)<=0&&$e.compare(p,m)>=0;return!!(y&&h&&_.equals(d.path.slice(0,3),p.path.slice(0,3)))}(n,e),i=e.width,o=i===void 0?"auto":i,a=S.isNodeSelected(n,e),u=W0(e),s=de("div",{className:"table-container","data-selected":a,on:{mousedown:function(l){if(l.target.tagName==="DIV"&&l.preventDefault(),!n.isDisabled()){var c=S.findPath(n,e),f=E.start(n,c),d=n.selection;d!=null?d.anchor.path[0]!==c[0]&&n.select(f):n.select(f)}}}},de("table",{width:o,contentEditable:r},de("colgroup",null,u.map(function(l){var c=l.width;return de("col",{width:c===void 0?"auto":c})})),de("tbody",null,t)));return s}},Kre={type:"table-row",renderElem:function(e,t,n){return de("tr",null,t)}},Yre={type:"table-cell",renderElem:function(e,t,n){var r=function(d,p){var v=S.getParentNode(d,p);if(v==null)return!1;var m=S.getParentNode(d,v);return m!=null&&W0(m).some(function(g){return g===p})}(n,e),i=e,o=i.colSpan,a=o===void 0?1:o,u=i.rowSpan,s=u===void 0?1:u,l=i.isHeader,c=l!==void 0&&l;if(!r)return de("td",{colSpan:a,rowSpan:s},t);var f=de(c?"th":"td",{colSpan:a,rowSpan:s,style:{borderRightWidth:"3px"},on:{mousemove:Pa(function(d){var p=this.elm;if(p!=null){var v=p.getBoundingClientRect(),m=v.left,g=v.width,y=v.top,h=v.height,$=d.clientX,w=d.clientY;wf||($>m+g-5&&$<m+g&&w>y&&w<y+h?(p.style.cursor="col-resize",Cf=n,Ef=S.findPath(n,e)):wf||(p.style.cursor="auto",Cf=null,Ef=null))}},100)}},t);return f}},Xre={type:"table",elemToHtml:function(e,t){var n=e.width;return'<table style="width: '+(n===void 0?"auto":n)+';"><tbody>'+t+"</tbody></table>"}},Jre={type:"table-row",elemToHtml:function(e,t){return"<tr>"+t+"</tr>"}},Zre={type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,i=r===void 0?1:r,o=n.rowSpan,a=o===void 0?1:o,u=n.isHeader,s=u!==void 0&&u,l=n.width,c=s?"th":"td";return"<"+c+' colSpan="'+i+'" rowSpan="'+a+'" width="'+(l===void 0?"auto":l)+'">'+t+"</"+c+">"}},Qre={selector:"table",preParseHtml:function(e){var t=O(e);if(Ak(t)!=="table")return e;var n=t.find("tbody");if(n.length===0)return e;var r=t.find("tr");return t.append(r),n.remove(),t[0]}},eie=V0.filter;Ao({target:"Array",proto:!0,forced:!i5("filter")},{filter:function(e){return eie(this,e,arguments.length>1?arguments[1]:void 0)}});var tie=Math.floor,uy=Se("".charAt),nie=Se("".replace),sy=Se("".slice),rie=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,iie=/\$([$&'`]|\d{1
`)},s.deleteBackward=function(l){if(!fS(s)){var c=s.selection;if(c){var f=E.before(s,c);if(f){var d=dS(s,f),p=dS(s,c);if(d&&!p)return}}n(l)}},s.handleTab=function(){var l;if(S.getSelectedNodeByType(s,"table")){var c=E.above(e);S.checkNodeType(c[0],"table-cell")&&P.select(e,c[1]);var f=E.next(e);if(f)f[0]&&f[0].text&&(f=(l=E.above(e,{at:f[1]}))!==null&&l!==void 0?l:f),P.select(e,f[1]);else{var d=s.children||[],p=d.length;if(S.checkNodeType(d[p-1],"table")){var v=S.genEmptyParagraph();P.insertNodes(s,v,{at:[p]}),s.handleTab()}}}else a()},s.deleteForward=function(l){fS(s)||r(l)},s.normalizeNode=function(l){var c=gr(l,2),f=c[0],d=c[1];if(S.getNodeType(f)!=="table")return i([f,d]);if(S.isLastNode(s,f)){var p=S.genEmptyParagraph();P.insertNodes(s,p,{at:[d[0]+1]})}},s.insertData=function(l){if(S.getSelectedNodeByType(s,"table")!=null){var c=l.getData("text/plain");c===`
`||/<img[^>]+>/.test(l.getData("text/html"))?o(l):E.insertText(s,c)}else o(l)},s.selectAll=function(){var l=s.selection;if(l!=null){var c=S.getSelectedNodeByType(s,"table-cell");if(c!=null){var f=l.anchor,d=l.focus;if(_.equals(f.path.slice(0,3),d.path.slice(0,3)))if(W.string(c).length!==0){var p=S.findPath(s,c),v={anchor:E.start(s,p),focus:E.end(s,p)};s.select(v)}else u();else u()}else u()}else u()},s}};vn("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",width:"Width",height:"Height"}}),vn("zh-CN",{videoModule:{delete:"\u5220\u9664\u89C6\u9891",uploadVideo:"\u4E0A\u4F20\u89C6\u9891",insertVideo:"\u63D2\u5165\u89C6\u9891",videoSrc:"\u89C6\u9891\u5730\u5740",videoSrcPlaceHolder:"\u89C6\u9891\u6587\u4EF6 url \u6216\u7B2C\u4E09\u65B9 <iframe>",videoPoster:"\u89C6\u9891\u5C01\u9762",videoPosterPlaceHolder:"\u5C01\u9762\u56FE\u7247 url",ok:"\u786E\u5B9A",editSize:"\u4FEE\u6539\u5C3A\u5BF8",width:"\u5BBD\u5EA6",height:"\u9AD8\u5EA6"}});/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var vg=function(){return vg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},vg.apply(this,arguments)};function q0(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(l){try{s(r.next(l))}catch(c){o(c)}}function u(l){try{s(r.throw(l))}catch(c){o(c)}}function s(l){var c;l.done?i(l.value):(c=l.value,c instanceof n?c:new n(function(f){f(c)})).then(a,u)}s((r=r.apply(e,t||[])).next())})}function G0(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(s){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(c[0]===6&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(f){c=[6,f],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,l])}}}function xie(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")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 Sa(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(u){i={error:u}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function Sie(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=xie(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(i){t[i]=e[i]&&function(o){return new Promise(function(a,u){(function(s,l,c,f){Promise.resolve(f).then(function(d){s({value:d,done:c})},l)})(a,u,(o=e[i](o)).done,o.value)})}}}var BS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function a5(e){var t={exports:{}};return e(t,t.exports),t.exports}var Li,eh,vp=function(e){return e&&e.Math==Math&&e},K=vp(typeof globalThis=="object"&&globalThis)||vp(typeof window=="object"&&window)||vp(typeof self=="object"&&self)||vp(typeof BS=="object"&&BS)||function(){return this}()||Function("return this")(),Je=function(e){try{return!!e()}catch{return!0}},Vr=!Je(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Ql=Function.prototype.call,Ke=Ql.bind?Ql.bind(Ql):function(){return Ql.apply(Ql,arguments)},FS={}.propertyIsEnumerable,TS=Object.getOwnPropertyDescriptor,Aie={f:TS&&!FS.call({1:2},1)?function(e){var t=TS(this,e);return!!t&&t.enumerable}:FS},K0=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_k=Function.prototype,_4=_k.bind,P4=_k.call,Oie=_4&&_4.bind(P4),pe=_4?function(e){return e&&Oie(P4,e)}:function(e){return e&&function(){return P4.apply(e,arguments)}},Bie=pe({}.toString),Fie=pe("".slice),jr=function(e){return Fie(Bie(e),8,-1)},py=K.Object,Tie=pe("".split),u5=Je(function(){return!py("z").propertyIsEnumerable(0)})?function(e){return jr(e)=="String"?Tie(e,""):py(e)}:py,kie=K.TypeError,vd=function(e){if(e==null)throw kie("Can't call method on "+e);return e},Po=function(e){return u5(vd(e))},Ve=function(e){return ty
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`,VS=pe("".replace),Cg="["+L4+"]",Doe=RegExp("^"+Cg+Cg+"*"),xoe=RegExp(Cg+Cg+"*$"),gy=function(e){return function(t){var n=Hn(vd(t));return 1&e&&(n=VS(n,Doe,"")),2&e&&(n=VS(n,xoe,"")),n}},Soe={start:gy(1),end:gy(2),trim:gy(3)},Aoe=Xs.PROPER,Ooe=Soe.trim;function WS(e){return e.length?e[0].tagName.toLowerCase():""}function zk(e,t,n){t===void 0&&(t="auto"),n===void 0&&(n="auto");var r=O(e);return r.attr("width",t),r.attr("height",n),r[0].outerHTML}pn({target:"String",proto:!0,forced:(tc="trim",Je(function(){return!!L4[tc]()||"\u200B\x85\u180E"[tc]()!=="\u200B\x85\u180E"||Aoe&&L4[tc].name!==tc}))},{trim:function(){return Ooe(this)}}),pn({global:!0},{globalThis:K}),Ur&&(O.fn.append=Ur),Hr&&(O.fn.on=Hr),bo&&(O.fn.focus=bo),Mr&&(O.fn.attr=Mr),zr&&(O.fn.val=zr),yo&&(O.fn.html=yo),wh&&(O.fn.parent=wh),ps&&(O.fn.hasClass=ps),bs&&(O.fn.empty=bs);var Boe={type:"video",renderElem:function(e,t,n){var r,i=e,o=i.src,a=o===void 0?"":o,u=i.poster,s=u===void 0?"":u,l=i.width,c=l===void 0?"auto":l,f=i.height,d=f===void 0?"auto":f,p=S.isNodeSelected(n,e);if(a.trim().indexOf("<iframe ")===0){var v=zk(a,c,d);r=de("div",{className:"w-e-textarea-video-container","data-selected":p?"true":"",innerHTML:v})}else{var m=de("video",{poster:s,controls:!0},de("source",{src:a,type:"video/mp4"}),`Sorry, your browser doesn't support embedded videos.
\u62B1\u6B49\uFF0C\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 video \u89C6\u9891`);c!=="auto"&&(m.data.width=c),d!=="auto"&&(m.data.height=d),r=de("div",{className:"w-e-textarea-video-container","data-selected":p?"true":""},m)}return $s("div",{props:{contentEditable:!1},on:{mousedown:function(g){return g.preventDefault()}}},r)}},mp,Foe={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,i=r===void 0?"":r,o=n.poster,a=o===void 0?"":o,u=n.width,s=u===void 0?"auto":u,l=n.height,c=l===void 0?"auto":l,f=`<div data-w-e-type="video" data-w-e-is-void>
`;return i.trim().indexOf("<iframe ")===0?f+=zk(i,s,c):f+='<video poster="'+a+'" controls="true" width="'+s+'" height="'+c+'"><source src="'+i+'" type="video/mp4"/></video>',f+=`
</div>`}},Toe=Object.keys||function(e){return Lk(e,$g)},koe=Vr?Object.defineProperties:function(e,t){Rt(e);for(var n,r=Po(t),i=Toe(t),o=i.length,a=0;o>a;)mi.f(e,n=i[a++],r[n]);return e},M4=Va("document","documentElement"),Hk=h5("IE_PROTO"),vy=function(){},Uk=function(e){return"<script>"+e+"<\/script>"},qS=function(e){e.write(Uk("")),e.close();var t=e.parentWindow.Object;return e=null,t},th=function(){try{mp=new ActiveXObject("htmlfile")}catch{}var e,t;th=typeof document<"u"?document.domain&&mp?qS(mp):((t=Af("iframe")).style.display="none",M4.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Uk("document.F=Object")),e.close(),e.F):qS(mp);for(var n=$g.length;n--;)delete th.prototype[$g[n]];return th()};J0[Hk]=!0;var v5=Object.create||function(e,t){var n;return e!==null?(vy.prototype=Rt(e),n=new vy,vy.prototype=null,n[Hk]=e):n=th(),t===void 0?n:koe(n,t)},z4=yt("unscopables"),H4=Array.prototype;H4[z4]==null&&mi.f(H4,z4,{configurable:!0,value:v5(null)});var Hc=function(e){H4[z4][e]=!0},_oe=jk.includes;pn({target:"Array",proto:!0},{includes:function(e){return _oe(this,e,arguments.length>1?arguments[1]:void 0)}}),Hc("includes");var Poe={selector:"iframe,video,p",preParseHtml:function(e){var t=O(e),n=t;if(WS(t)==="p"){var r=t.children();if(r.length===1){var i=r[0],o=i.tagName.toLowerCase();["iframe","video"].includes(o)&&(n=O(i))}}var a=WS(n);if(a!=="iframe"&&a!=="video"||n.parent().attr("data-w-e-type")==="video")return n[0];var u=O('<div data-w-e-type="video" data-w-e-is-void></div>');return u.append(n),u[0]}},GS=pe(pe.bind),Bf=function(e,t){return Oo(e),t===void 0?e:GS?GS(e,t):function(){return e.apply(t,arguments)}},Dg=Array.isArray||function(e){return jr(e)=="Array"},Vk=function(){},Noe=[],Wk=Va("Reflect","construct"),m5=/^\s*(?:class|function)\b/,Ioe=pe(m5.exec),Roe=!m5.exec(Vk),nc=function(e){if(!Ve(e))return!1;try{return Wk(Vk,Noe,e),!0}catch{return!1}},y5=!Wk||Je(function(){var e;return nc(nc.call)||!nc(Object)||!nc(function(){e=!0})||e})?function(e){if(!Ve(e))return!1;switch(Q0(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Roe||!!Ioe(m5,X0(e))}:nc,joe=yt("species"),KS=K.Array,Loe=function(e,t){return new(function(n){var r;return Dg(n)&&(r=n.constructor,(y5(r)&&(r===KS||Dg(r.prototype))||Ze(r)&&(r=r[joe])===null)&&(r=void 0)),r===void 0?KS:r}(e))(t===0?0:t)},YS=pe([].push),Mi=function(e){var t=e==1,n=e==2,r=e==3,i=e==4,o=e==6,a=e==7,u=e==5||o;return function(s,l,c,f){for(var d,p,v=Y0(s),m=u5(v),g=Bf(l,c),y=md(m),h=0,$=f||Loe,w=t?$(s,y):n||a?$(s,0):void 0;y>h;h++)if((u||h in m)&&(p=g(d=m[h],h,v),e))if(t)w[h]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return h;case 2:YS(w,d)}else switch(e){case 4:return!1;case 7:YS(w,d)}return o?-1:r||i?i:w}},b5={forEach:Mi(0),map:Mi(1),filter:Mi(2),some:Mi(3),every:Mi(4),find:Mi(5),findIndex:Mi(6),filterReject:Mi(7)},Moe=b5.find,XS=!0;"find"in[]&&Array(1).find(function(){XS=!1}),pn({target:"Array",proto:!0,forced:XS},{find:function(e){return Moe(this,e,arguments.length>1?arguments[1]:void 0)}}),Hc("find");var zoe=g5?{}.toString:function(){return"[object "+Q0(this)+"]"};function JS(e,t,n,r){return t===void 0&&(t=""),n===void 0&&(n="auto"),r===void 0&&(r="auto"),{type:"video",src:e,poster:t,width:n,height:r,children:[{text:""}]}}g5||xn(Object.prototype,"toString",zoe,{unsafe:!0});var ZS,my,Hoe={selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=O(e),i="",o="",a="auto",u="auto",s=r.find("iframe");if(s.length>0)return a=s.attr("width")||"auto",u=s.attr("height")||"auto",JS(i=s[0].outerHTML,o,a,u);var l=r.find("video");return(i=l.attr("src")||"")||l.length>0&&(i=l.find("source").attr("src")||""),a=l.attr("width")||"auto",u=l.attr("height")||"auto",JS(i,o=l.attr("poster")||"",a,u)}},qk=function(){var e=Rt(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},$5=K.RegExp,U4=Je(function(){var e=$5("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Uoe=U4||Je(function(){return!$5("a"
`)&&e.flags==="s")}),Goe=K.RegExp,Koe=Je(function(){var e=Goe("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Yoe=Tn.get,Xoe=c5("native-string-replace",String.prototype.replace),xg=RegExp.prototype.exec,V4=xg,Joe=pe("".charAt),Zoe=pe("".indexOf),Qoe=pe("".replace),yy=pe("".slice),by=(my=/b*/g,Ke(xg,ZS=/a/,"a"),Ke(xg,my,"a"),ZS.lastIndex!==0||my.lastIndex!==0),QS=Voe.BROKEN_CARET,$y=/()??/.exec("")[1]!==void 0;(by||$y||QS||qoe||Koe)&&(V4=function(e){var t,n,r,i,o,a,u,s=this,l=Yoe(s),c=Hn(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=Ke(V4,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=QS&&s.sticky,v=Ke(qk,s),m=s.source,g=0,y=c;if(p&&(v=Qoe(v,"y",""),Zoe(v,"g")===-1&&(v+="g"),y=yy(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Joe(c,s.lastIndex-1)!==`
`)&&(m="(?: "+m+")",y=" "+y,g++),n=new RegExp("^(?:"+m+")",v)),$y&&(n=new RegExp("^"+m+"$(?!\\s)",v)),by&&(r=s.lastIndex),i=Ke(xg,p?n:s,y),p?i?(i.input=yy(i.input,g),i[0]=yy(i[0],g),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:by&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),$y&&i&&i.length>1&&Ke(Xoe,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=v5(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var Sg=V4;pn({target:"RegExp",proto:!0,forced:/./.exec!==Sg},{exec:Sg});var w5=Function.prototype,eA=w5.apply,eae=w5.bind,tA=w5.call,Gk=typeof Reflect=="object"&&Reflect.apply||(eae?tA.bind(eA):function(){return tA.apply(eA,arguments)}),tae=yt("species"),wy=RegExp.prototype,nae=pe("".charAt),nA=pe("".charCodeAt),rae=pe("".slice),rA=function(e){return function(t,n){var r,i,o=Hn(vd(t)),a=Z0(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=nA(o,a))<55296||r>56319||a+1===u||(i=nA(o,a+1))<56320||i>57343?e?nae(o,a):r:e?rae(o,a,a+2):i-56320+(r-55296<<10)+65536}},Kk={codeAt:rA(!1),charAt:rA(!0)},iae=Kk.charAt,oae=function(e,t,n){return t+(n?iae(e,t).length:1)},aae=Math.floor,Ey=pe("".charAt),uae=pe("".replace),Cy=pe("".slice),sae=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,lae=/\$([$&'`]|\d{1,2})/g,cae=function(e,t,n,r,i,o){var a=n+e.length,u=r.length,s=lae;return i!==void 0&&(i=Y0(i),s=sae),uae(o,s,function(l,c){var f;switch(Ey(c,0)){case"$":return"$";case"&":return e;case"`":return Cy(t,0,n);case"'":return Cy(t,a);case"<":f=i[Cy(c,1,-1)];break;default:var d=+c;if(d===0)return l;if(d>u){var p=aae(d/10);return p===0?l:p<=u?r[p-1]===void 0?Ey(c,1):r[p-1]+Ey(c,1):l}f=r[d-1]}return f===void 0?"":f})},fae=K.TypeError,dae=function(e,t){var n=e.exec;if(Ve(n)){var r=Ke(n,e,t);return r!==null&&Rt(r),r}if(jr(e)==="RegExp")return Ke(Sg,e,t);throw fae("RegExp#exec called on incompatible receiver")},W4=yt("replace"),pae=Math.max,hae=Math.min,gae=pe([].concat),Dy=pe([].push),iA=pe("".indexOf),oA=pe("".slice),vae="a".replace(/./,"$0")==="$0",aA=!!/./[W4]&&/./[W4]("a","$0")==="";function Yk(e){return e===void 0&&(e="r"),e+"-"+X9()}(function(e,t,n,r){var i=yt(e),o=!Je(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!Je(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[tae]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=pe(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var v=pe(l),m=c.exec;return m===Sg||m===wy.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:v(f,c,d)}:{done:!1}});xn(String.prototype,e,s[0]),xn(wy,i,s[1])}r&&fi(wy[i],"sham",!0)})("replace",function(e,t,n){var r=aA?"$":"$0";return[function(i,o){var a=vd(this),u=i==null?void 0:Sf(i,W4);return u?Ke(u,i,a,o):Ke(t,Hn(a),i,o)},function(i,o){var a=Rt(this),u=Hn(i);if(typeof o=="string"&&iA(o,r)===-1&&iA(o,"$<")===-1){var s=n(t,a,u,o);if(s.done)return s.value}var l=Ve(o);l||(o=Hn(o));var c=a.global;if(c){var f=a.unicode;a.lastIndex=0}for(var d=[];;){var p=dae(a,u);if(p===null||(Dy(d,p),!c))break;Hn(p[0])===""&&(a.lastIndex=oae(u,Rk(a.lastIndex),f))}for(var v,m="",g=0,y=0;y<d.length;y++){for(var h=Hn((p=d[y])[0]),$=pae(hae(Z0(p.index),u.length),0),w=[],C=1;C<p.length;C++)Dy(w,(v=p[C])===void 0?v:String(v));var D=p.groups;if(l){var A=gae([h],w,$,u);D!==void 0&&Dy(A,D);var I=Hn(Gk(o,void 0,A))}else I=cae(h,u,$,w,D,o);$>=g&&(m+=oA(u,g,$)+I,g=$+h.length)}return m+oA(u,g)}]},!!Je(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"})||!vae||aA);var Ag=K.Promise,Og=function(e,t,n){for(var r in t)xn(e,r,t[r],n);return e},mae=K.String,yae=K.TypeError,Fs=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=pe(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}return function(r,i){return Rt(r),function(o){if(typeof o=="object"||Ve(o))return o;throw yae("Can't set "+mae(o)+" as a prototype")}(i),t?e(r,i):r.__proto__=i,r}}():void 0),bae=mi.f,uA=yt("toStringTag"),Bg=function(e,t,n){e&&!St(e
`)&&e.flags==="s")}),Yse=G.RegExp,Xse=Qe(function(){var e=Yse("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Jse=kn.get,Zse=_5("native-string-replace",String.prototype.replace),Lg=RegExp.prototype.exec,s$=Lg,Qse=Ce("".charAt),ele=Ce("".indexOf),tle=Ce("".replace),Gy=Ce("".slice),Ky=(qy=/b*/g,Le(Lg,e7=/a/,"a"),Le(Lg,qy,"a"),e7.lastIndex!==0||qy.lastIndex!==0),t7=R_.BROKEN_CARET,Yy=/()??/.exec("")[1]!==void 0;(Ky||Yy||t7||Kse||Xse)&&(s$=function(e){var t,n,r,i,o,a,u,s=this,l=Jse(s),c=ho(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=Le(s$,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=t7&&s.sticky,v=Le(I_,s),m=s.source,g=0,y=c;if(p&&(v=tle(v,"y",""),ele(v,"g")===-1&&(v+="g"),y=Gy(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Qse(c,s.lastIndex-1)!==`
`)&&(m="(?: "+m+")",y=" "+y,g++),n=new RegExp("^(?:"+m+")",v)),Yy&&(n=new RegExp("^"+m+"$(?!\\s)",v)),Ky&&(r=s.lastIndex),i=Le(Lg,p?n:s,y),p?i?(i.input=Gy(i.input,g),i[0]=Gy(i[0],g),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:Ky&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),Yy&&i&&i.length>1&&Le(Zse,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=V5(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var jf=s$;Ir({target:"RegExp",proto:!0,forced:/./.exec!==jf},{exec:jf});var W5=Function.prototype,n7=W5.apply,nle=W5.bind,r7=W5.call,M_=typeof Reflect=="object"&&Reflect.apply||(nle?r7.bind(n7):function(){return r7.apply(n7,arguments)}),rle=bt("species"),Xy=RegExp.prototype,ile=bt("match"),ole=G.TypeError,ale=bt("species"),z_=function(e,t){var n,r=jt(e).constructor;return r===void 0||(n=jt(r)[ale])==null?t:function(i){if(H5(i))return i;throw ole(kg(i)+" is not a constructor")}(n)},ule=Ce("".charAt),i7=Ce("".charCodeAt),sle=Ce("".slice),o7=function(e){return function(t,n){var r,i,o=ho(kf(t)),a=L5(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=i7(o,a))<55296||r>56319||a+1===u||(i=i7(o,a+1))<56320||i>57343?e?ule(o,a):r:e?sle(o,a,a+2):i-56320+(r-55296<<10)+65536}},H_={codeAt:o7(!1),charAt:o7(!0)},lle=H_.charAt,cle=function(e,t,n){return t+(n?lle(e,t).length:1)},fle=G.Array,dle=Math.max,l$=function(e,t,n){for(var r=$d(e),i=Rf(t,r),o=Rf(n===void 0?r:n,r),a=fle(dle(o-i,0)),u=0;i<o;i++,u++)P_(a,u,e[i]);return a.length=u,a},ple=G.TypeError,a7=function(e,t){var n=e.exec;if(We(n)){var r=Le(n,e,t);return r!==null&&jt(r),r}if(pr(e)==="RegExp")return Le(jf,e,t);throw ple("RegExp#exec called on incompatible receiver")},ku=R_.UNSUPPORTED_Y,hle=Math.min,U_=[].push,gle=Ce(/./.exec),_u=Ce(U_),fc=Ce("".slice);(function(e,t,n,r){var i=bt(e),o=!Qe(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!Qe(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[rle]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=Ce(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var v=Ce(l),m=c.exec;return m===jf||m===Xy.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:v(f,c,d)}:{done:!1}});Sn(String.prototype,e,s[0]),Sn(Xy,i,s[1])}r&&Lr(Xy[i],"sham",!0)})("split",function(e,t,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(i,o){var a,u,s=ho(kf(this)),l=o===void 0?4294967295:o>>>0;if(l===0)return[];if(i===void 0)return[s];if(!Xe(a=i)||!((u=a[ile])!==void 0?u:pr(a)=="RegExp"))return Le(t,s,i,l);for(var c,f,d,p=[],v=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),m=0,g=new RegExp(i.source,v+"g");(c=Le(jf,g,s))&&!((f=g.lastIndex)>m&&(_u(p,fc(s,m,c.index)),c.length>1&&c.index<s.length&&M_(U_,p,l$(c,1)),d=c[0].length,m=f,p.length>=l));)g.lastIndex===c.index&&g.lastIndex++;return m===s.length?!d&&gle(g,"")||_u(p,""):_u(p,fc(s,m)),p.length>l?l$(p,0,l):p}:"0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:Le(t,this,i,o)}:t,[function(i,o){var a=kf(this),u=i==null?void 0:Nf(i,e);return u?Le(u,i,a,o):Le(r,ho(a),i,o)},function(i,o){var a=jt(this),u=ho(i),s=n(r,a,u,o,r!==t);if(s.done)return s.value;var l=z_(a,RegExp),c=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(ku?"g":"y"),d=new l(ku?"^(?:"+a.source+")":a,f),p=o===void 0?4294967295:o>>>0;if(p===0)return[];if(u.length===0)return a7(d,u)===null?[u]:[];for(var v=0,m=0,g=[];m<u.length;){d.lastIndex=ku?0:m;var y,h=a7(d,ku?fc(u,m):u);if(h===null||(y=hle(B_(d.lastIndex+(ku?m:0)),u.length))===v)m=cle(u,m,c);else{if(_u(g,fc(u,v,m)),g.length===p)return g;for(var $=1;$<=h.length-1;$++)if(_u(g,h[$]),g.length===p)return g;m=v=y}}return _u(g,fc(u,v)),g}]},!!Qe(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return n.length!==2||n[0]!=="a"||n[1]!=="b"}),ku);/*
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Mg=function(){return Mg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Mg.apply(this,arguments)};function q5(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(l){try{s(r.next(l))}catch(c){o(c)}}function u(l){try{s(r.throw(l))}catch(c){o(c)}}function s(l){var c;l.done?i(l.value):(c=l.value,c instanceof n?c:new n(function(f){f(c)})).then(a,u)}s((r=r.apply(e,t||[])).next())})}function G5(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(s){return function(l){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&c[0]?r.return:c[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;switch(r=0,i&&(c=[2&c[0],i.value]),c[0]){case 0:case 1:i=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,r=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!((i=i.length>0&&i[i.length-1])||c[0]!==6&&c[0]!==2)){a=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){a.label=c[1];break}if(c[0]===6&&a.label<i[1]){a.label=i[1],i=c;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(c);break}i[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(f){c=[6,f],r=0}finally{n=i=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([s,l])}}}function vle(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")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 mle(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=vle(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(i){t[i]=e[i]&&function(o){return new Promise(function(a,u){(function(s,l,c,f){Promise.resolve(f).then(function(d){s({value:d,done:c})},l)})(a,u,(o=e[i](o)).done,o.value)})}}}var c$=bt("unscopables"),f$=Array.prototype;f$[c$]==null&&yi.f(f$,c$,{configurable:!0,value:V5(null)});var Fa,u7,s7,Jy=function(e){f$[c$][e]=!0},ks={},yle=!Qe(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),l7=j5("IE_PROTO"),d$=G.Object,ble=d$.prototype,zg=yle?d$.getPrototypeOf:function(e){var t=P5(e);if(At(t,l7))return t[l7];var n=t.constructor;return We(n)&&t instanceof n?n.prototype:t instanceof d$?ble:null},p$=bt("iterator"),V_=!1;[].keys&&("next"in(s7=[].keys())?(u7=zg(zg(s7)))!==Object.prototype&&(Fa=u7):V_=!0);var $le=Fa==null||Qe(function(){var e={};return Fa[p$].call(e)!==e});$le&&(Fa={}),We(Fa[p$])||Sn(Fa,p$,function(){return this});var K5={IteratorPrototype:Fa,BUGGY_SAFARI_ITERATORS:V_},wle=yi.f,c7=bt("toStringTag"),Hg=function(e,t,n){e&&!At(e=n?e:e.prototype,c7)&&wle(e,c7,{configurable:!0,value:t})},Ele=K5.IteratorPrototype,Cle=function(){return this},Dle=G.String,xle=G.TypeError,_s=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Ce(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch{}return function(r,i){return jt(r),function(o){if(typeof o=="object"||We(o))return o;throw xle("Can't set "+Dle(o)+" as a prototype")}(i),t?e(r,i):r.__proto__=i,r}}():void 0),Sle=bd.PROPER,Ale=bd.CONFIGURABLE,f7=K5.IteratorPrototype,Ap=K5.BUGGY_SAFARI_ITERATORS,dc=bt("iterator"),Ole=function(){return this},W_=function(e,t,n,r,i,o,a){(function(y,h,$,w){var C=h+" Iterator";y.prototype=V5(Ele,{next:ev(+!w,$)}),Hg(y,C,!1),ks[C]=Cle})(n,t,r);var u,s,l,c=function(y){if(y===i&&m)return m;if(!Ap&&y in p)return p[y];switch(y){case"keys":case"values":case"entries":retur
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/e.exports&&(e.exports=t),Gg!==void 0&&(Gg.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"},/"|'/]}},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(n){n.type==="entity"&&(n.attributes.title=n.content.replace(/&amp;/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(n,r){var i={};i["language-"+r]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[r]},i.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:i}};o["language-"+r]={pattern:/[\s\S]+/,inside:t.languages[r]};var a={};a[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(n,r){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+n+")"+/\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:[r,"language-"+r],inside:t.languages[r]},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(n){var r=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;n.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,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\\((?:"+r.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+r.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+r.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:r,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:/[(){};:,]/},n.languages.css.atrule.inside.rest=n.languages.css;var i=n.languages.markup;i&&(i.tag.addInlined("style","css"),i.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\
`)&&e.flags==="s")}),qfe=xe.RegExp,Gfe=It(function(){var e=qfe("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Kfe=S$.get,Yfe=iE("native-string-replace",String.prototype.replace),Jg=RegExp.prototype.exec,B$=Jg,Xfe=Me("".charAt),Jfe=Me("".indexOf),Zfe=Me("".replace),E2=Me("".slice),C2=(w2=/b*/g,kt(Jg,h9=/a/,"a"),kt(Jg,w2,"a"),h9.lastIndex!==0||w2.lastIndex!==0),g9=MP.BROKEN_CARET,D2=/()??/.exec("")[1]!==void 0;(C2||D2||g9||Wfe||Gfe)&&(B$=function(e){var t,n,r,i,o,a,u,s=this,l=Kfe(s),c=di(e),f=l.raw;if(f)return f.lastIndex=s.lastIndex,t=kt(B$,f,c),s.lastIndex=f.lastIndex,t;var d=l.groups,p=g9&&s.sticky,v=kt(LP,s),m=s.source,g=0,y=c;if(p&&(v=Zfe(v,"y",""),Jfe(v,"g")===-1&&(v+="g"),y=E2(c,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&Xfe(c,s.lastIndex-1)!==`
`)&&(m="(?: "+m+")",y=" "+y,g++),n=new RegExp("^(?:"+m+")",v)),D2&&(n=new RegExp("^"+m+"$(?!\\s)",v)),C2&&(r=s.lastIndex),i=kt(Jg,p?n:s,y),p?i?(i.input=E2(i.input,g),i[0]=E2(i[0],g),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:C2&&i&&(s.lastIndex=s.global?i.index+i[0].length:r),D2&&i&&i.length>1&&kt(Yfe,i[0],n,function(){for(o=1;o<arguments.length-2;o++)arguments[o]===void 0&&(i[o]=void 0)}),i&&d)for(i.groups=a=Ufe(null),o=0;o<d.length;o++)a[(u=d[o])[0]]=i[u[1]];return i});var Hf=B$;av({target:"RegExp",proto:!0,forced:/./.exec!==Hf},{exec:Hf});var bE=Function.prototype,v9=bE.apply,Qfe=bE.bind,m9=bE.call,ede=typeof Reflect=="object"&&Reflect.apply||(Qfe?m9.bind(v9):function(){return m9.apply(v9,arguments)}),tde=Io("species"),x2=RegExp.prototype,nde=Io("match"),rde=xe.TypeError,ide=Io("species"),ode=function(e,t){var n,r=vr(e).constructor;return r===void 0||(n=vr(r)[ide])==null?t:function(i){if(kP(i))return i;throw rde(CP(i)+" is not a constructor")}(n)},ade=Me("".charAt),y9=Me("".charCodeAt),ude=Me("".slice),b9=function(e){return function(t,n){var r,i,o=di(Ps(t)),a=gE(n),u=o.length;return a<0||a>=u?e?"":void 0:(r=y9(o,a))<55296||r>56319||a+1===u||(i=y9(o,a+1))<56320||i>57343?e?ade(o,a):r:e?ude(o,a,a+2):i-56320+(r-55296<<10)+65536}},sde={codeAt:b9(!1),charAt:b9(!0)}.charAt,lde=function(e,t,n){return t+(n?sde(e,t).length:1)},cde=xe.Array,fde=Math.max,$9=function(e,t,n){for(var r,i,o,a,u=vE(e),s=A$(t,u),l=A$(n===void 0?u:n,u),c=cde(fde(l-s,0)),f=0;s<l;s++,f++)r=c,i=f,o=e[s],a=void 0,(a=lE(i))in r?iv.f(r,a,cE(0,o)):r[a]=o;return c.length=f,c},dde=xe.TypeError,w9=function(e,t){var n=e.exec;if(en(n)){var r=kt(n,e,t);return r!==null&&vr(r),r}if(mo(e)==="RegExp")return kt(Hf,e,t);throw dde("RegExp#exec called on incompatible receiver")},Ru=MP.UNSUPPORTED_Y,pde=Math.min,UP=[].push,hde=Me(/./.exec),ju=Me(UP),$c=Me("".slice);(function(e,t,n,r){var i=Io(e),o=!It(function(){var l={};return l[i]=function(){return 7},""[e](l)!=7}),a=o&&!It(function(){var l=!1,c=/a/;return e==="split"&&((c={}).constructor={},c.constructor[tde]=function(){return c},c.flags="",c[i]=/./[i]),c.exec=function(){return l=!0,null},c[i](""),!l});if(!o||!a||n){var u=Me(/./[i]),s=t(i,""[e],function(l,c,f,d,p){var v=Me(l),m=c.exec;return m===Hf||m===x2.exec?o&&!p?{done:!0,value:u(c,f,d)}:{done:!0,value:v(f,c,d)}:{done:!1}});zf(String.prototype,e,s[0]),zf(x2,i,s[1])}r&&Ns(x2[i],"sham",!0)})("split",function(e,t,n){var r;return r="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(i,o){var a,u,s=di(Ps(this)),l=o===void 0?4294967295:o>>>0;if(l===0)return[];if(i===void 0)return[s];if(!ur(a=i)||!((u=a[nde])!==void 0?u:mo(a)=="RegExp"))return kt(t,s,i,l);for(var c,f,d,p=[],v=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),m=0,g=new RegExp(i.source,v+"g");(c=kt(Hf,g,s))&&!((f=g.lastIndex)>m&&(ju(p,$c(s,m,c.index)),c.length>1&&c.index<s.length&&ede(UP,p,$9(c,1)),d=c[0].length,m=f,p.length>=l));)g.lastIndex===c.index&&g.lastIndex++;return m===s.length?!d&&hde(g,"")||ju(p,""):ju(p,$c(s,m)),p.length>l?$9(p,0,l):p}:"0".split(void 0,0).length?function(i,o){return i===void 0&&o===0?[]:kt(t,this,i,o)}:t,[function(i,o){var a=Ps(this),u=i==null?void 0:xP(i,e);return u?kt(u,i,a,o):kt(r,di(a),i,o)},function(i,o){var a=vr(this),u=di(i),s=n(r,a,u,o,r!==t);if(s.done)return s.value;var l=ode(a,RegExp),c=a.unicode,f=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Ru?"g":"y"),d=new l(Ru?"^(?:"+a.source+")":a,f),p=o===void 0?4294967295:o>>>0;if(p===0)return[];if(u.length===0)return w9(d,u)===null?[u]:[];for(var v=0,m=0,g=[];m<u.length;){d.lastIndex=Ru?0:m;var y,h=w9(d,Ru?$c(u,m):u);if(h===null||(y=pde(BP(d.lastIndex+(Ru?m:0)),u.length))===v)m=lde(u,m,c);else{if(ju(g,$c(u,v,m)),g.length===p)return g;for(var $=1;$<=h.length-1;$++)if(ju(g,h[$]),g.length===p)return g;m=v=y}}return ju(g,$c(u,v)),g}]},!!It(function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".s
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var ct=function(){return ct=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ct.apply(this,arguments)},Pt=function(){function e(){throw new Error(`\u4E0D\u80FD\u5B9E\u4F8B\u5316
Can not construct a instance`)}return e.setEditorConfig=function(t){t===void 0&&(t={}),this.editorConfig=ct(ct({},this.editorConfig),t)},e.setSimpleEditorConfig=function(t){t===void 0&&(t={}),this.simpleEditorConfig=ct(ct({},this.simpleEditorConfig),t)},e.setToolbarConfig=function(t){t===void 0&&(t={}),this.toolbarConfig=ct(ct({},this.toolbarConfig),t)},e.setSimpleToolbarConfig=function(t){t===void 0&&(t={}),this.simpleToolbarConfig=ct(ct({},this.simpleToolbarConfig),t)},e.registerPlugin=function(t){this.plugins.push(t)},e.registerMenu=function(t,n){HV(t,n)},e.registerRenderElem=function(t){hq(t)},e.registerRenderStyle=function(t){pq(t)},e.registerElemToHtml=function(t){QV(t)},e.registerStyleToHtml=function(t){ZV(t)},e.registerPreParseHtml=function(t){EW(t)},e.registerParseElemHtml=function(t){DW(t)},e.registerParseStyleHtml=function(t){CW(t)},e.registerModule=function(t){tu(t)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function tu(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,i=e.elemsToHtml,o=e.styleToHtml,a=e.preParseHtml,u=e.parseElemsHtml,s=e.parseStyleHtml,l=e.editorPlugin;t&&t.forEach(function(c){return Pt.registerMenu(c)}),n&&n.forEach(function(c){return Pt.registerRenderElem(c)}),r&&Pt.registerRenderStyle(r),i&&i.forEach(function(c){return Pt.registerElemToHtml(c)}),o&&Pt.registerStyleToHtml(o),a&&a.forEach(function(c){return Pt.registerPreParseHtml(c)}),u&&u.forEach(function(c){return Pt.registerParseElemHtml(c)}),s&&Pt.registerParseStyleHtml(s),l&&Pt.registerPlugin(l)}RQ.forEach(function(e){return tu(e)});tu(Yte);tu(Die);tu(jue);tu(Fce);tu($de);var Cde='<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',Dde='<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>',qP='<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>',xde='<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>',Sde='<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>';function Ade(){return["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:q("editor.more"),iconSvg:xde,menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:q("editor.justify"),iconSvg:Dde,menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:q("editor.indent"),iconSvg:Cde,menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:q("editor.image"),iconSvg:qP,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:q("editor.video"),iconSvg:Sde,menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","fullScreen"]}function Ode(){return["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle",
Please use '@${e}' event instead of props`,t}var KP=(e,t)=>{for(const[n,r]of t)e[n]=r;return e};const Kde=Zg({props:{mode:{type:String,default:"default"},defaultContent:{type:Array,default:[]},defaultHtml:{type:String,default:""},defaultConfig:{type:Object,default:{}},modelValue:{type:String,default:""}},setup(e,t){const n=ls(null),r=D9(null),i=ls(""),o=()=>{if(!n.value)return;const u=ZP(e.defaultContent);Lde({selector:n.value,mode:e.mode,content:u||[],html:e.defaultHtml||e.modelValue||"",config:Gde(qde({},e.defaultConfig),{onCreated(s){if(r.value=s,t.emit("onCreated",s),e.defaultConfig.onCreated){const l=Wi("onCreated");throw new Error(l)}},onChange(s){const l=s.getHtml();if(i.value=l,t.emit("update:modelValue",l),t.emit("onChange",s),e.defaultConfig.onChange){const c=Wi("onChange");throw new Error(c)}},onDestroyed(s){if(t.emit("onDestroyed",s),e.defaultConfig.onDestroyed){const l=Wi("onDestroyed");throw new Error(l)}},onMaxLength(s){if(t.emit("onMaxLength",s),e.defaultConfig.onMaxLength){const l=Wi("onMaxLength");throw new Error(l)}},onFocus(s){if(t.emit("onFocus",s),e.defaultConfig.onFocus){const l=Wi("onFocus");throw new Error(l)}},onBlur(s){if(t.emit("onBlur",s),e.defaultConfig.onBlur){const l=Wi("onBlur");throw new Error(l)}},customAlert(s,l){if(t.emit("customAlert",s,l),e.defaultConfig.customAlert){const c=Wi("customAlert");throw new Error(c)}},customPaste:(s,l)=>{if(e.defaultConfig.customPaste){const f=Wi("customPaste");throw new Error(f)}let c;return t.emit("customPaste",s,l,f=>{c=f}),c}})})};function a(u){const s=r.value;s!=null&&s.setHtml(u)}return YP(()=>{o()}),XP(()=>e.modelValue,u=>{u!==i.value&&a(u)}),{box:n}}}),Yde={ref:"box",style:{height:"100%"}};function Xde(e,t,n,r,i,o){return Qg(),e0("div",Yde,null,512)}var Jde=KP(Kde,[["render",Xde]]);const Zde=Zg({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(e){const t=ls(null),n=r=>{if(!!t.value){if(r==null)throw new Error("Not found instance of Editor when create <Toolbar/> component");S.getToolbar(r)||Mde({editor:r,selector:t.value||"<div></div>",mode:e.mode,config:e.defaultConfig})}};return JP(()=>{const{editor:r}=e;r!=null&&n(r)}),{selector:t}}}),Qde={ref:"selector"};function epe(e,t,n,r,i,o){return Qg(),e0("div",Qde,null,512)}var tpe=KP(Zde,[["render",epe]]);const npe={class:"m-wangEditor"},rpe=Zg({__name:"index",props:{modelValue:String},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,r=D9(),i={},o={placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9..."},a=ls("default"),u=l=>{r.value=l},s=QP({get(){return n.modelValue},set(l){r.value.isEmpty()&&(l=""),t("update:modelValue",l)}});return eN(()=>{const l=r.value;l!=null&&l.destroy()}),(l,c)=>(Qg(),e0("div",npe,[on(Rd(tpe),{style:{"border-bottom":"1px solid #ccc"},editor:Rd(r),defaultConfig:i,mode:a.value},null,8,["editor","mode"]),on(Rd(Jde),{class:"editor-content'",style:{height:"300px","overflow-y":"hidden"},modelValue:Rd(s),"onUpdate:modelValue":c[0]||(c[0]=f=>tN(s)?s.value=f:null),defaultConfig:o,mode:a.value,onOnCreated:u},null,8,["modelValue","mode"])]))}});const ipe=nN(rpe,[["__scopeId","data-v-3d802932"]]),ope={class:"app-container"},ape={class:"app-container-inner"},upe=Gi("a",{href:"https://www.wangeditor.com/v5/for-frame.html",target:"_blank"}," https://www.wangeditor.com/v5/for-frame.html ",-1),spe={style:{display:"flex","align-items":"center","margin-bottom":"20px"}},lpe=Gi("span",{style:{width:"50px","font-weight":"bold"}},"\u6807\u9898\uFF1A",-1),cpe={style:{display:"flex","align-items":"center","margin-bottom":"20px"}},fpe=Gi("span",{style:{width:"50px","font-weight":"bold"}},"\u5185\u5BB9",-1),dpe=["innerHTML"],Epe=Zg({__name:"index",setup(e){const t=ls(),n=ls(!1),r=rN({title:"",content:""}),i=u=>{!u||u.validate(s=>{if(console.log("valid",s),s)oN.success("\u4FDD\u5B58\u6210\u529F");else return console.log("error submit!"),!1})},o=u=>{!u||u.validate(s=>{if(console.log("valid",s),s)n.value=!0;else return console.log("error submit!"),!1})},a=u=>{!u||u.resetFields()};return(u,s)=>{const l=Ho("el-input"),c=Ho("el-form-item"),f=Ho("e