@rainte/ant 0.0.57 → 0.0.58

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/index.js +155 -11
  2. package/dist/index.umd.cjs +1 -80
  3. package/dist/types/{src/components → components}/Editor/index.d.ts +3 -3
  4. package/dist/types/components/Form/index.d.ts +11 -0
  5. package/dist/types/{src/components → components}/Provider/index.d.ts +1 -1
  6. package/dist/types/components/Table/index.d.ts +4 -0
  7. package/dist/types/{src/components → components}/Upload/index.d.ts +2 -2
  8. package/dist/types/lib.d.ts +12 -0
  9. package/dist/types/views/form/index.d.ts +1 -0
  10. package/dist/types/views/layout/blank/index.d.ts +1 -0
  11. package/dist/types/views/layout/menu/index.d.ts +2 -0
  12. package/dist/types/views/table/index.d.ts +1 -0
  13. package/package.json +66 -73
  14. package/dist/browser-ponyfill-B_NmYAlA.js +0 -366
  15. package/dist/index-Bpi8Scy9.js +0 -10591
  16. package/dist/index.css +0 -7
  17. package/dist/types/lib/index.d.ts +0 -14
  18. package/dist/types/src/components/Form/index.d.ts +0 -11
  19. package/dist/types/src/components/Menu/index.d.ts +0 -3
  20. package/dist/types/src/components/Table/index.d.ts +0 -4
  21. package/dist/types/src/views/form/index.d.ts +0 -1
  22. package/dist/types/src/views/layout/blank/index.d.ts +0 -1
  23. package/dist/types/src/views/layout/menu/index.d.ts +0 -1
  24. package/dist/types/src/views/table/index.d.ts +0 -1
  25. package/dist/types/vite.config.d.ts +0 -2
  26. /package/dist/types/{src/main.d.ts → main.d.ts} +0 -0
  27. /package/dist/types/{src/router → router}/index.d.ts +0 -0
  28. /package/dist/types/{src/utils → utils}/dialog.d.ts +0 -0
  29. /package/dist/types/{src/utils → utils}/i18n.d.ts +0 -0
  30. /package/dist/types/{src/utils → utils}/misc.d.ts +0 -0
@@ -1,80 +1 @@
1
- (function(se,Te){typeof exports=="object"&&typeof module<"u"?Te(exports,require("react"),require("@ant-design/pro-components"),require("antd"),require("react-router-dom"),require("@rainte/js")):typeof define=="function"&&define.amd?define(["exports","react","@ant-design/pro-components","antd","react-router-dom","@rainte/js"],Te):(se=typeof globalThis<"u"?globalThis:se||self,Te(se["@rainte/react"]={},se.React,se.ProComponents,se.antd,se.ReactRouterDOM,se.RainteJS))})(this,(function(se,Te,zt,ze,$s,bo){"use strict";var b1=Object.defineProperty;var y1=(se,Te,zt)=>Te in se?b1(se,Te,{enumerable:!0,configurable:!0,writable:!0,value:zt}):se[Te]=zt;var B=(se,Te,zt)=>y1(se,typeof Te!="symbol"?Te+"":Te,zt);function Ou(n,e){for(var t=0;t<e.length;t++){const r=e[t];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in n)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(n,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}var Ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ms(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Vn={exports:{}},un={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var yo;function Nu(){if(yo)return un;yo=1;var n=Te,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(a,u,c){var d,g={},f=null,m=null;c!==void 0&&(f=""+c),u.key!==void 0&&(f=""+u.key),u.ref!==void 0&&(m=u.ref);for(d in u)r.call(u,d)&&!i.hasOwnProperty(d)&&(g[d]=u[d]);if(a&&a.defaultProps)for(d in u=a.defaultProps,u)g[d]===void 0&&(g[d]=u[d]);return{$$typeof:e,type:a,key:f,ref:m,props:g,_owner:s.current}}return un.Fragment=t,un.jsx=o,un.jsxs=o,un}var cn={},vo;function Lu(){if(vo)return cn;vo=1;var n={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */return n.NODE_ENV!=="production"&&(function(){var e=Te,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),g=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),x=Symbol.iterator,T="@@iterator";function L(y){if(y===null||typeof y!="object")return null;var q=x&&y[x]||y[T];return typeof q=="function"?q:null}var P=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(y){{for(var q=arguments.length,D=new Array(q>1?q-1:0),Z=1;Z<q;Z++)D[Z-1]=arguments[Z];z("error",y,D)}}function z(y,q,D){{var Z=P.ReactDebugCurrentFrame,X=Z.getStackAddendum();X!==""&&(q+="%s",D=D.concat([X]));var pe=D.map(function(ne){return String(ne)});pe.unshift("Warning: "+q),Function.prototype.apply.call(console[y],console,pe)}}var H=!1,ie=!1,te=!1,oe=!1,be=!1,xe;xe=Symbol.for("react.module.reference");function b(y){return!!(typeof y=="string"||typeof y=="function"||y===s||y===o||be||y===i||y===d||y===g||oe||y===w||H||ie||te||typeof y=="object"&&y!==null&&(y.$$typeof===m||y.$$typeof===f||y.$$typeof===a||y.$$typeof===u||y.$$typeof===c||y.$$typeof===xe||y.getModuleId!==void 0))}function N(y,q,D){var Z=y.displayName;if(Z)return Z;var X=q.displayName||q.name||"";return X!==""?D+"("+X+")":D}function A(y){return y.displayName||"Context"}function R(y){if(y==null)return null;if(typeof y.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof y=="function")return y.displayName||y.name||null;if(typeof y=="string")return y;switch(y){case s:return"Fragment";case r:return"Portal";case o:return"Profiler";case i:return"StrictMode";case d:return"Suspense";case g:return"SuspenseList"}if(typeof y=="object")switch(y.$$typeof){case u:var q=y;return A(q)+".Consumer";case a:var D=y;return A(D._context)+".Provider";case c:return N(y,y.render,"ForwardRef");case f:var Z=y.displayName||null;return Z!==null?Z:R(y.type)||"Memo";case m:{var X=y,pe=X._payload,ne=X._init;try{return R(ne(pe))}catch{return null}}}return null}var p=Object.assign,E=0,S,I,k,_,G,W,Y;function V(){}V.__reactDisabledLog=!0;function M(){{if(E===0){S=console.log,I=console.info,k=console.warn,_=console.error,G=console.group,W=console.groupCollapsed,Y=console.groupEnd;var y={configurable:!0,enumerable:!0,value:V,writable:!0};Object.defineProperties(console,{info:y,log:y,warn:y,error:y,group:y,groupCollapsed:y,groupEnd:y})}E++}}function ve(){{if(E--,E===0){var y={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:p({},y,{value:S}),info:p({},y,{value:I}),warn:p({},y,{value:k}),error:p({},y,{value:_}),group:p({},y,{value:G}),groupCollapsed:p({},y,{value:W}),groupEnd:p({},y,{value:Y})})}E<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ye=P.ReactCurrentDispatcher,Q;function ae(y,q,D){{if(Q===void 0)try{throw Error()}catch(X){var Z=X.stack.trim().match(/\n( *(at )?)/);Q=Z&&Z[1]||""}return`
18
- `+Q+y}}var le=!1,ue;{var de=typeof WeakMap=="function"?WeakMap:Map;ue=new de}function ge(y,q){if(!y||le)return"";{var D=ue.get(y);if(D!==void 0)return D}var Z;le=!0;var X=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var pe;pe=ye.current,ye.current=null,M();try{if(q){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(qe){Z=qe}Reflect.construct(y,[],ne)}else{try{ne.call()}catch(qe){Z=qe}y.call(ne.prototype)}}else{try{throw Error()}catch(qe){Z=qe}y()}}catch(qe){if(qe&&Z&&typeof qe.stack=="string"){for(var re=qe.stack.split(`
19
- `),_e=Z.stack.split(`
20
- `),Ae=re.length-1,ce=_e.length-1;Ae>=1&&ce>=0&&re[Ae]!==_e[ce];)ce--;for(;Ae>=1&&ce>=0;Ae--,ce--)if(re[Ae]!==_e[ce]){if(Ae!==1||ce!==1)do if(Ae--,ce--,ce<0||re[Ae]!==_e[ce]){var Be=`
21
- `+re[Ae].replace(" at new "," at ");return y.displayName&&Be.includes("<anonymous>")&&(Be=Be.replace("<anonymous>",y.displayName)),typeof y=="function"&&ue.set(y,Be),Be}while(Ae>=1&&ce>=0);break}}}finally{le=!1,ye.current=pe,ve(),Error.prepareStackTrace=X}var Nt=y?y.displayName||y.name:"",gt=Nt?ae(Nt):"";return typeof y=="function"&&ue.set(y,gt),gt}function Oe(y,q,D){return ge(y,!1)}function Re(y){var q=y.prototype;return!!(q&&q.isReactComponent)}function At(y,q,D){if(y==null)return"";if(typeof y=="function")return ge(y,Re(y));if(typeof y=="string")return ae(y);switch(y){case d:return ae("Suspense");case g:return ae("SuspenseList")}if(typeof y=="object")switch(y.$$typeof){case c:return Oe(y.render);case f:return At(y.type,q,D);case m:{var Z=y,X=Z._payload,pe=Z._init;try{return At(pe(X),q,D)}catch{}}}return""}var Tt=Object.prototype.hasOwnProperty,Gr={},Wr=P.ReactDebugCurrentFrame;function ct(y){if(y){var q=y._owner,D=At(y.type,y._source,q?q.type:null);Wr.setExtraStackFrame(D)}else Wr.setExtraStackFrame(null)}function mr(y,q,D,Z,X){{var pe=Function.call.bind(Tt);for(var ne in y)if(pe(y,ne)){var re=void 0;try{if(typeof y[ne]!="function"){var _e=Error((Z||"React class")+": "+D+" type `"+ne+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof y[ne]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw _e.name="Invariant Violation",_e}re=y[ne](q,ne,Z,D,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ae){re=Ae}re&&!(re instanceof Error)&&(ct(X),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Z||"React class",D,ne,typeof re),ct(null)),re instanceof Error&&!(re.message in Gr)&&(Gr[re.message]=!0,ct(X),j("Failed %s type: %s",D,re.message),ct(null))}}}var Zr=Array.isArray;function Jt(y){return Zr(y)}function Qe(y){{var q=typeof Symbol=="function"&&Symbol.toStringTag,D=q&&y[Symbol.toStringTag]||y.constructor.name||"Object";return D}}function Qt(y){try{return Xr(y),!1}catch{return!0}}function Xr(y){return""+y}function St(y){if(Qt(y))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qe(y)),Xr(y)}var Dt=P.ReactCurrentOwner,br={key:!0,ref:!0,__self:!0,__source:!0},Ue,yr;function Yr(y){if(Tt.call(y,"ref")){var q=Object.getOwnPropertyDescriptor(y,"ref").get;if(q&&q.isReactWarning)return!1}return y.ref!==void 0}function jn(y){if(Tt.call(y,"key")){var q=Object.getOwnPropertyDescriptor(y,"key").get;if(q&&q.isReactWarning)return!1}return y.key!==void 0}function vr(y,q){typeof y.ref=="string"&&Dt.current}function er(y,q){{var D=function(){Ue||(Ue=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",q))};D.isReactWarning=!0,Object.defineProperty(y,"key",{get:D,configurable:!0})}}function Jr(y,q){{var D=function(){yr||(yr=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",q))};D.isReactWarning=!0,Object.defineProperty(y,"ref",{get:D,configurable:!0})}}var tr=function(y,q,D,Z,X,pe,ne){var re={$$typeof:t,type:y,key:q,ref:D,props:ne,_owner:pe};return re._store={},Object.defineProperty(re._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(re,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Z}),Object.defineProperty(re,"_source",{configurable:!1,enumerable:!1,writable:!1,value:X}),Object.freeze&&(Object.freeze(re.props),Object.freeze(re)),re};function Bt(y,q,D,Z,X){{var pe,ne={},re=null,_e=null;D!==void 0&&(St(D),re=""+D),jn(q)&&(St(q.key),re=""+q.key),Yr(q)&&(_e=q.ref,vr(q,X));for(pe in q)Tt.call(q,pe)&&!br.hasOwnProperty(pe)&&(ne[pe]=q[pe]);if(y&&y.defaultProps){var Ae=y.defaultProps;for(pe in Ae)ne[pe]===void 0&&(ne[pe]=Ae[pe])}if(re||_e){var ce=typeof y=="function"?y.displayName||y.name||"Unknown":y;re&&er(ne,ce),_e&&Jr(ne,ce)}return tr(y,re,_e,X,Z,Dt.current,ne)}}var Fe=P.ReactCurrentOwner,$t=P.ReactDebugCurrentFrame;function et(y){if(y){var q=y._owner,D=At(y.type,y._source,q?q.type:null);$t.setExtraStackFrame(D)}else $t.setExtraStackFrame(null)}var ft;ft=!1;function Mt(y){return typeof y=="object"&&y!==null&&y.$$typeof===t}function Ot(){{if(Fe.current){var y=R(Fe.current.type);if(y)return`
22
-
23
- Check the render method of \``+y+"`."}return""}}function wr(y){return""}var rr={};function Er(y){{var q=Ot();if(!q){var D=typeof y=="string"?y:y.displayName||y.name;D&&(q=`
24
-
25
- Check the top-level render call using <`+D+">.")}return q}}function ht(y,q){{if(!y._store||y._store.validated||y.key!=null)return;y._store.validated=!0;var D=Er(q);if(rr[D])return;rr[D]=!0;var Z="";y&&y._owner&&y._owner!==Fe.current&&(Z=" It was passed a child from "+R(y._owner.type)+"."),et(y),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',D,Z),et(null)}}function xr(y,q){{if(typeof y!="object")return;if(Jt(y))for(var D=0;D<y.length;D++){var Z=y[D];Mt(Z)&&ht(Z,q)}else if(Mt(y))y._store&&(y._store.validated=!0);else if(y){var X=L(y);if(typeof X=="function"&&X!==y.entries)for(var pe=X.call(y),ne;!(ne=pe.next()).done;)Mt(ne.value)&&ht(ne.value,q)}}}function dt(y){{var q=y.type;if(q==null||typeof q=="string")return;var D;if(typeof q=="function")D=q.propTypes;else if(typeof q=="object"&&(q.$$typeof===c||q.$$typeof===f))D=q.propTypes;else return;if(D){var Z=R(q);mr(D,y.props,"prop",Z,y)}else if(q.PropTypes!==void 0&&!ft){ft=!0;var X=R(q);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",X||"Unknown")}typeof q.getDefaultProps=="function"&&!q.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Dn(y){{for(var q=Object.keys(y.props),D=0;D<q.length;D++){var Z=q[D];if(Z!=="children"&&Z!=="key"){et(y),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Z),et(null);break}}y.ref!==null&&(et(y),j("Invalid attribute `ref` supplied to `React.Fragment`."),et(null))}}var Qr={};function en(y,q,D,Z,X,pe){{var ne=b(y);if(!ne){var re="";(y===void 0||typeof y=="object"&&y!==null&&Object.keys(y).length===0)&&(re+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var _e=wr();_e?re+=_e:re+=Ot();var Ae;y===null?Ae="null":Jt(y)?Ae="array":y!==void 0&&y.$$typeof===t?(Ae="<"+(R(y.type)||"Unknown")+" />",re=" Did you accidentally export a JSX literal instead of a component?"):Ae=typeof y,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ae,re)}var ce=Bt(y,q,D,X,pe);if(ce==null)return ce;if(ne){var Be=q.children;if(Be!==void 0)if(Z)if(Jt(Be)){for(var Nt=0;Nt<Be.length;Nt++)xr(Be[Nt],y);Object.freeze&&Object.freeze(Be)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else xr(Be,y)}if(Tt.call(q,"key")){var gt=R(y),qe=Object.keys(q).filter(function(rn){return rn!=="key"}),Tr=qe.length>0?"{key: someKey, "+qe.join(": ..., ")+": ...}":"{key: someKey}";if(!Qr[gt+Tr]){var nr=qe.length>0?"{"+qe.join(": ..., ")+": ...}":"{}";j(`A props object containing a "key" prop is being spread into JSX:
26
- let props = %s;
27
- <%s {...props} />
28
- React keys must be passed directly to JSX without using spread:
29
- let props = %s;
30
- <%s key={someKey} {...props} />`,Tr,gt,nr,gt),Qr[gt+Tr]=!0}}return y===s?Dn(ce):dt(ce),ce}}function tn(y,q,D){return en(y,q,D,!0)}function Ar(y,q,D){return en(y,q,D,!1)}var Le=Ar,Bn=tn;cn.Fragment=s,cn.jsx=Le,cn.jsxs=Bn})(),cn}var wo;function _u(){if(wo)return Vn.exports;wo=1;var n={};return n.NODE_ENV==="production"?Vn.exports=Nu():Vn.exports=Lu(),Vn.exports}var Se=_u(),Eo=typeof global=="object"&&global&&global.Object===Object&&global,Cu=typeof self=="object"&&self&&self.Object===Object&&self,mt=Eo||Cu||Function("return this")(),Vt=mt.Symbol,xo=Object.prototype,Ru=xo.hasOwnProperty,qu=xo.toString,fn=Vt?Vt.toStringTag:void 0;function ku(n){var e=Ru.call(n,fn),t=n[fn];try{n[fn]=void 0;var r=!0}catch{}var s=qu.call(n);return r&&(e?n[fn]=t:delete n[fn]),s}var Iu=Object.prototype,Pu=Iu.toString;function ju(n){return Pu.call(n)}var Du="[object Null]",Bu="[object Undefined]",Ao=Vt?Vt.toStringTag:void 0;function Lr(n){return n==null?n===void 0?Bu:Du:Ao&&Ao in Object(n)?ku(n):ju(n)}function Rt(n){return n!=null&&typeof n=="object"}var or=Array.isArray;function Kt(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function To(n){return n}var $u="[object AsyncFunction]",Mu="[object Function]",Uu="[object GeneratorFunction]",Fu="[object Proxy]";function Us(n){if(!Kt(n))return!1;var e=Lr(n);return e==Mu||e==Uu||e==$u||e==Fu}var Fs=mt["__core-js_shared__"],So=(function(){var n=/[^.]+$/.exec(Fs&&Fs.keys&&Fs.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""})();function Hu(n){return!!So&&So in n}var zu=Function.prototype,Vu=zu.toString;function ar(n){if(n!=null){try{return Vu.call(n)}catch{}try{return n+""}catch{}}return""}var Ku=/[\\^$.*+?()[\]{}|]/g,Gu=/^\[object .+?Constructor\]$/,Wu=Function.prototype,Zu=Object.prototype,Xu=Wu.toString,Yu=Zu.hasOwnProperty,Ju=RegExp("^"+Xu.call(Yu).replace(Ku,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qu(n){if(!Kt(n)||Hu(n))return!1;var e=Us(n)?Ju:Gu;return e.test(ar(n))}function ec(n,e){return n==null?void 0:n[e]}function lr(n,e){var t=ec(n,e);return Qu(t)?t:void 0}var Hs=lr(mt,"WeakMap"),Oo=Object.create,tc=(function(){function n(){}return function(e){if(!Kt(e))return{};if(Oo)return Oo(e);n.prototype=e;var t=new n;return n.prototype=void 0,t}})();function rc(n,e,t){switch(t.length){case 0:return n.call(e);case 1:return n.call(e,t[0]);case 2:return n.call(e,t[0],t[1]);case 3:return n.call(e,t[0],t[1],t[2])}return n.apply(e,t)}function nc(n,e){var t=-1,r=n.length;for(e||(e=Array(r));++t<r;)e[t]=n[t];return e}var sc=800,ic=16,oc=Date.now;function ac(n){var e=0,t=0;return function(){var r=oc(),s=ic-(r-t);if(t=r,s>0){if(++e>=sc)return arguments[0]}else e=0;return n.apply(void 0,arguments)}}function lc(n){return function(){return n}}var Kn=(function(){try{var n=lr(Object,"defineProperty");return n({},"",{}),n}catch{}})(),uc=Kn?function(n,e){return Kn(n,"toString",{configurable:!0,enumerable:!1,value:lc(e),writable:!0})}:To,cc=ac(uc);function fc(n,e){for(var t=-1,r=n==null?0:n.length;++t<r&&e(n[t],t,n)!==!1;);return n}var hc=9007199254740991,dc=/^(?:0|[1-9]\d*)$/;function No(n,e){var t=typeof n;return e=e??hc,!!e&&(t=="number"||t!="symbol"&&dc.test(n))&&n>-1&&n%1==0&&n<e}function zs(n,e,t){e=="__proto__"&&Kn?Kn(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):n[e]=t}function hn(n,e){return n===e||n!==n&&e!==e}var gc=Object.prototype,pc=gc.hasOwnProperty;function Lo(n,e,t){var r=n[e];(!(pc.call(n,e)&&hn(r,t))||t===void 0&&!(e in n))&&zs(n,e,t)}function mc(n,e,t,r){var s=!t;t||(t={});for(var i=-1,o=e.length;++i<o;){var a=e[i],u=void 0;u===void 0&&(u=n[a]),s?zs(t,a,u):Lo(t,a,u)}return t}var _o=Math.max;function bc(n,e,t){return e=_o(e===void 0?n.length-1:e,0),function(){for(var r=arguments,s=-1,i=_o(r.length-e,0),o=Array(i);++s<i;)o[s]=r[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=r[s];return a[e]=t(o),rc(n,this,a)}}function yc(n,e){return cc(bc(n,e,To),n+"")}var vc=9007199254740991;function Co(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=vc}function Gn(n){return n!=null&&Co(n.length)&&!Us(n)}function wc(n,e,t){if(!Kt(t))return!1;var r=typeof e;return(r=="number"?Gn(t)&&No(e,t.length):r=="string"&&e in t)?hn(t[e],n):!1}function Ec(n){return yc(function(e,t){var r=-1,s=t.length,i=s>1?t[s-1]:void 0,o=s>2?t[2]:void 0;for(i=n.length>3&&typeof i=="function"?(s--,i):void 0,o&&wc(t[0],t[1],o)&&(i=s<3?void 0:i,s=1),e=Object(e);++r<s;){var a=t[r];a&&n(e,a,r,i)}return e})}var xc=Object.prototype;function Vs(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||xc;return n===t}function Ac(n,e){for(var t=-1,r=Array(n);++t<n;)r[t]=e(t);return r}var Tc="[object Arguments]";function Ro(n){return Rt(n)&&Lr(n)==Tc}var qo=Object.prototype,Sc=qo.hasOwnProperty,Oc=qo.propertyIsEnumerable,Ks=Ro((function(){return arguments})())?Ro:function(n){return Rt(n)&&Sc.call(n,"callee")&&!Oc.call(n,"callee")};function Nc(){return!1}var ko=typeof se=="object"&&se&&!se.nodeType&&se,Io=ko&&typeof module=="object"&&module&&!module.nodeType&&module,Lc=Io&&Io.exports===ko,Po=Lc?mt.Buffer:void 0,_c=Po?Po.isBuffer:void 0,dn=_c||Nc,Cc="[object Arguments]",Rc="[object Array]",qc="[object Boolean]",kc="[object Date]",Ic="[object Error]",Pc="[object Function]",jc="[object Map]",Dc="[object Number]",Bc="[object Object]",$c="[object RegExp]",Mc="[object Set]",Uc="[object String]",Fc="[object WeakMap]",Hc="[object ArrayBuffer]",zc="[object DataView]",Vc="[object Float32Array]",Kc="[object Float64Array]",Gc="[object Int8Array]",Wc="[object Int16Array]",Zc="[object Int32Array]",Xc="[object Uint8Array]",Yc="[object Uint8ClampedArray]",Jc="[object Uint16Array]",Qc="[object Uint32Array]",Ee={};Ee[Vc]=Ee[Kc]=Ee[Gc]=Ee[Wc]=Ee[Zc]=Ee[Xc]=Ee[Yc]=Ee[Jc]=Ee[Qc]=!0,Ee[Cc]=Ee[Rc]=Ee[Hc]=Ee[qc]=Ee[zc]=Ee[kc]=Ee[Ic]=Ee[Pc]=Ee[jc]=Ee[Dc]=Ee[Bc]=Ee[$c]=Ee[Mc]=Ee[Uc]=Ee[Fc]=!1;function ef(n){return Rt(n)&&Co(n.length)&&!!Ee[Lr(n)]}function Gs(n){return function(e){return n(e)}}var jo=typeof se=="object"&&se&&!se.nodeType&&se,gn=jo&&typeof module=="object"&&module&&!module.nodeType&&module,tf=gn&&gn.exports===jo,Ws=tf&&Eo.process,_r=(function(){try{var n=gn&&gn.require&&gn.require("util").types;return n||Ws&&Ws.binding&&Ws.binding("util")}catch{}})(),Do=_r&&_r.isTypedArray,Zs=Do?Gs(Do):ef,rf=Object.prototype,nf=rf.hasOwnProperty;function Bo(n,e){var t=or(n),r=!t&&Ks(n),s=!t&&!r&&dn(n),i=!t&&!r&&!s&&Zs(n),o=t||r||s||i,a=o?Ac(n.length,String):[],u=a.length;for(var c in n)(e||nf.call(n,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||No(c,u)))&&a.push(c);return a}function $o(n,e){return function(t){return n(e(t))}}var sf=$o(Object.keys,Object),of=Object.prototype,af=of.hasOwnProperty;function lf(n){if(!Vs(n))return sf(n);var e=[];for(var t in Object(n))af.call(n,t)&&t!="constructor"&&e.push(t);return e}function uf(n){return Gn(n)?Bo(n):lf(n)}function cf(n){var e=[];if(n!=null)for(var t in Object(n))e.push(t);return e}var ff=Object.prototype,hf=ff.hasOwnProperty;function df(n){if(!Kt(n))return cf(n);var e=Vs(n),t=[];for(var r in n)r=="constructor"&&(e||!hf.call(n,r))||t.push(r);return t}function Mo(n){return Gn(n)?Bo(n,!0):df(n)}var pn=lr(Object,"create");function gf(){this.__data__=pn?pn(null):{},this.size=0}function pf(n){var e=this.has(n)&&delete this.__data__[n];return this.size-=e?1:0,e}var mf="__lodash_hash_undefined__",bf=Object.prototype,yf=bf.hasOwnProperty;function vf(n){var e=this.__data__;if(pn){var t=e[n];return t===mf?void 0:t}return yf.call(e,n)?e[n]:void 0}var wf=Object.prototype,Ef=wf.hasOwnProperty;function xf(n){var e=this.__data__;return pn?e[n]!==void 0:Ef.call(e,n)}var Af="__lodash_hash_undefined__";function Tf(n,e){var t=this.__data__;return this.size+=this.has(n)?0:1,t[n]=pn&&e===void 0?Af:e,this}function ur(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}ur.prototype.clear=gf,ur.prototype.delete=pf,ur.prototype.get=vf,ur.prototype.has=xf,ur.prototype.set=Tf;function Sf(){this.__data__=[],this.size=0}function Wn(n,e){for(var t=n.length;t--;)if(hn(n[t][0],e))return t;return-1}var Of=Array.prototype,Nf=Of.splice;function Lf(n){var e=this.__data__,t=Wn(e,n);if(t<0)return!1;var r=e.length-1;return t==r?e.pop():Nf.call(e,t,1),--this.size,!0}function _f(n){var e=this.__data__,t=Wn(e,n);return t<0?void 0:e[t][1]}function Cf(n){return Wn(this.__data__,n)>-1}function Rf(n,e){var t=this.__data__,r=Wn(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}function qt(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}qt.prototype.clear=Sf,qt.prototype.delete=Lf,qt.prototype.get=_f,qt.prototype.has=Cf,qt.prototype.set=Rf;var mn=lr(mt,"Map");function qf(){this.size=0,this.__data__={hash:new ur,map:new(mn||qt),string:new ur}}function kf(n){var e=typeof n;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?n!=="__proto__":n===null}function Zn(n,e){var t=n.__data__;return kf(e)?t[typeof e=="string"?"string":"hash"]:t.map}function If(n){var e=Zn(this,n).delete(n);return this.size-=e?1:0,e}function Pf(n){return Zn(this,n).get(n)}function jf(n){return Zn(this,n).has(n)}function Df(n,e){var t=Zn(this,n),r=t.size;return t.set(n,e),this.size+=t.size==r?0:1,this}function cr(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e<t;){var r=n[e];this.set(r[0],r[1])}}cr.prototype.clear=qf,cr.prototype.delete=If,cr.prototype.get=Pf,cr.prototype.has=jf,cr.prototype.set=Df;function Bf(n,e){for(var t=-1,r=e.length,s=n.length;++t<r;)n[s+t]=e[t];return n}var Uo=$o(Object.getPrototypeOf,Object),$f="[object Object]",Mf=Function.prototype,Uf=Object.prototype,Fo=Mf.toString,Ff=Uf.hasOwnProperty,Hf=Fo.call(Object);function zf(n){if(!Rt(n)||Lr(n)!=$f)return!1;var e=Uo(n);if(e===null)return!0;var t=Ff.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Fo.call(t)==Hf}function Vf(){this.__data__=new qt,this.size=0}function Kf(n){var e=this.__data__,t=e.delete(n);return this.size=e.size,t}function Gf(n){return this.__data__.get(n)}function Wf(n){return this.__data__.has(n)}var Zf=200;function Xf(n,e){var t=this.__data__;if(t instanceof qt){var r=t.__data__;if(!mn||r.length<Zf-1)return r.push([n,e]),this.size=++t.size,this;t=this.__data__=new cr(r)}return t.set(n,e),this.size=t.size,this}function bt(n){var e=this.__data__=new qt(n);this.size=e.size}bt.prototype.clear=Vf,bt.prototype.delete=Kf,bt.prototype.get=Gf,bt.prototype.has=Wf,bt.prototype.set=Xf;var Ho=typeof se=="object"&&se&&!se.nodeType&&se,zo=Ho&&typeof module=="object"&&module&&!module.nodeType&&module,Yf=zo&&zo.exports===Ho,Vo=Yf?mt.Buffer:void 0,Ko=Vo?Vo.allocUnsafe:void 0;function Go(n,e){if(e)return n.slice();var t=n.length,r=Ko?Ko(t):new n.constructor(t);return n.copy(r),r}function Jf(n,e){for(var t=-1,r=n==null?0:n.length,s=0,i=[];++t<r;){var o=n[t];e(o,t,n)&&(i[s++]=o)}return i}function Qf(){return[]}var eh=Object.prototype,th=eh.propertyIsEnumerable,Wo=Object.getOwnPropertySymbols,rh=Wo?function(n){return n==null?[]:(n=Object(n),Jf(Wo(n),function(e){return th.call(n,e)}))}:Qf;function nh(n,e,t){var r=e(n);return or(n)?r:Bf(r,t(n))}function Xs(n){return nh(n,uf,rh)}var Ys=lr(mt,"DataView"),Js=lr(mt,"Promise"),Qs=lr(mt,"Set"),Zo="[object Map]",sh="[object Object]",Xo="[object Promise]",Yo="[object Set]",Jo="[object WeakMap]",Qo="[object DataView]",ih=ar(Ys),oh=ar(mn),ah=ar(Js),lh=ar(Qs),uh=ar(Hs),tt=Lr;(Ys&&tt(new Ys(new ArrayBuffer(1)))!=Qo||mn&&tt(new mn)!=Zo||Js&&tt(Js.resolve())!=Xo||Qs&&tt(new Qs)!=Yo||Hs&&tt(new Hs)!=Jo)&&(tt=function(n){var e=Lr(n),t=e==sh?n.constructor:void 0,r=t?ar(t):"";if(r)switch(r){case ih:return Qo;case oh:return Zo;case ah:return Xo;case lh:return Yo;case uh:return Jo}return e});var ch=Object.prototype,fh=ch.hasOwnProperty;function hh(n){var e=n.length,t=new n.constructor(e);return e&&typeof n[0]=="string"&&fh.call(n,"index")&&(t.index=n.index,t.input=n.input),t}var Xn=mt.Uint8Array;function ei(n){var e=new n.constructor(n.byteLength);return new Xn(e).set(new Xn(n)),e}function dh(n,e){var t=ei(n.buffer);return new n.constructor(t,n.byteOffset,n.byteLength)}var gh=/\w*$/;function ph(n){var e=new n.constructor(n.source,gh.exec(n));return e.lastIndex=n.lastIndex,e}var ea=Vt?Vt.prototype:void 0,ta=ea?ea.valueOf:void 0;function mh(n){return ta?Object(ta.call(n)):{}}function ra(n,e){var t=e?ei(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}var bh="[object Boolean]",yh="[object Date]",vh="[object Map]",wh="[object Number]",Eh="[object RegExp]",xh="[object Set]",Ah="[object String]",Th="[object Symbol]",Sh="[object ArrayBuffer]",Oh="[object DataView]",Nh="[object Float32Array]",Lh="[object Float64Array]",_h="[object Int8Array]",Ch="[object Int16Array]",Rh="[object Int32Array]",qh="[object Uint8Array]",kh="[object Uint8ClampedArray]",Ih="[object Uint16Array]",Ph="[object Uint32Array]";function jh(n,e,t){var r=n.constructor;switch(e){case Sh:return ei(n);case bh:case yh:return new r(+n);case Oh:return dh(n);case Nh:case Lh:case _h:case Ch:case Rh:case qh:case kh:case Ih:case Ph:return ra(n,t);case vh:return new r;case wh:case Ah:return new r(n);case Eh:return ph(n);case xh:return new r;case Th:return mh(n)}}function na(n){return typeof n.constructor=="function"&&!Vs(n)?tc(Uo(n)):{}}var Dh="[object Map]";function Bh(n){return Rt(n)&&tt(n)==Dh}var sa=_r&&_r.isMap,$h=sa?Gs(sa):Bh,Mh="[object Set]";function Uh(n){return Rt(n)&&tt(n)==Mh}var ia=_r&&_r.isSet,Fh=ia?Gs(ia):Uh,Hh=1,oa="[object Arguments]",zh="[object Array]",Vh="[object Boolean]",Kh="[object Date]",Gh="[object Error]",aa="[object Function]",Wh="[object GeneratorFunction]",Zh="[object Map]",Xh="[object Number]",la="[object Object]",Yh="[object RegExp]",Jh="[object Set]",Qh="[object String]",ed="[object Symbol]",td="[object WeakMap]",rd="[object ArrayBuffer]",nd="[object DataView]",sd="[object Float32Array]",id="[object Float64Array]",od="[object Int8Array]",ad="[object Int16Array]",ld="[object Int32Array]",ud="[object Uint8Array]",cd="[object Uint8ClampedArray]",fd="[object Uint16Array]",hd="[object Uint32Array]",we={};we[oa]=we[zh]=we[rd]=we[nd]=we[Vh]=we[Kh]=we[sd]=we[id]=we[od]=we[ad]=we[ld]=we[Zh]=we[Xh]=we[la]=we[Yh]=we[Jh]=we[Qh]=we[ed]=we[ud]=we[cd]=we[fd]=we[hd]=!0,we[Gh]=we[aa]=we[td]=!1;function Yn(n,e,t,r,s,i){var o,a=e&Hh;if(o!==void 0)return o;if(!Kt(n))return n;var u=or(n);if(u)o=hh(n);else{var c=tt(n),d=c==aa||c==Wh;if(dn(n))return Go(n,a);if(c==la||c==oa||d&&!s)o=d?{}:na(n);else{if(!we[c])return s?n:{};o=jh(n,c,a)}}i||(i=new bt);var g=i.get(n);if(g)return g;i.set(n,o),Fh(n)?n.forEach(function(w){o.add(Yn(w,e,t,w,n,i))}):$h(n)&&n.forEach(function(w,x){o.set(x,Yn(w,e,t,x,n,i))});var f=Xs,m=u?void 0:f(n);return fc(m||n,function(w,x){m&&(x=w,w=n[x]),Lo(o,x,Yn(w,e,t,x,n,i))}),o}var dd=1,gd=4;function Cr(n){return Yn(n,dd|gd)}var pd="__lodash_hash_undefined__";function md(n){return this.__data__.set(n,pd),this}function bd(n){return this.__data__.has(n)}function Jn(n){var e=-1,t=n==null?0:n.length;for(this.__data__=new cr;++e<t;)this.add(n[e])}Jn.prototype.add=Jn.prototype.push=md,Jn.prototype.has=bd;function yd(n,e){for(var t=-1,r=n==null?0:n.length;++t<r;)if(e(n[t],t,n))return!0;return!1}function vd(n,e){return n.has(e)}var wd=1,Ed=2;function ua(n,e,t,r,s,i){var o=t&wd,a=n.length,u=e.length;if(a!=u&&!(o&&u>a))return!1;var c=i.get(n),d=i.get(e);if(c&&d)return c==e&&d==n;var g=-1,f=!0,m=t&Ed?new Jn:void 0;for(i.set(n,e),i.set(e,n);++g<a;){var w=n[g],x=e[g];if(r)var T=o?r(x,w,g,e,n,i):r(w,x,g,n,e,i);if(T!==void 0){if(T)continue;f=!1;break}if(m){if(!yd(e,function(L,P){if(!vd(m,P)&&(w===L||s(w,L,t,r,i)))return m.push(P)})){f=!1;break}}else if(!(w===x||s(w,x,t,r,i))){f=!1;break}}return i.delete(n),i.delete(e),f}function xd(n){var e=-1,t=Array(n.size);return n.forEach(function(r,s){t[++e]=[s,r]}),t}function Ad(n){var e=-1,t=Array(n.size);return n.forEach(function(r){t[++e]=r}),t}var Td=1,Sd=2,Od="[object Boolean]",Nd="[object Date]",Ld="[object Error]",_d="[object Map]",Cd="[object Number]",Rd="[object RegExp]",qd="[object Set]",kd="[object String]",Id="[object Symbol]",Pd="[object ArrayBuffer]",jd="[object DataView]",ca=Vt?Vt.prototype:void 0,ti=ca?ca.valueOf:void 0;function Dd(n,e,t,r,s,i,o){switch(t){case jd:if(n.byteLength!=e.byteLength||n.byteOffset!=e.byteOffset)return!1;n=n.buffer,e=e.buffer;case Pd:return!(n.byteLength!=e.byteLength||!i(new Xn(n),new Xn(e)));case Od:case Nd:case Cd:return hn(+n,+e);case Ld:return n.name==e.name&&n.message==e.message;case Rd:case kd:return n==e+"";case _d:var a=xd;case qd:var u=r&Td;if(a||(a=Ad),n.size!=e.size&&!u)return!1;var c=o.get(n);if(c)return c==e;r|=Sd,o.set(n,e);var d=ua(a(n),a(e),r,s,i,o);return o.delete(n),d;case Id:if(ti)return ti.call(n)==ti.call(e)}return!1}var Bd=1,$d=Object.prototype,Md=$d.hasOwnProperty;function Ud(n,e,t,r,s,i){var o=t&Bd,a=Xs(n),u=a.length,c=Xs(e),d=c.length;if(u!=d&&!o)return!1;for(var g=u;g--;){var f=a[g];if(!(o?f in e:Md.call(e,f)))return!1}var m=i.get(n),w=i.get(e);if(m&&w)return m==e&&w==n;var x=!0;i.set(n,e),i.set(e,n);for(var T=o;++g<u;){f=a[g];var L=n[f],P=e[f];if(r)var j=o?r(P,L,f,e,n,i):r(L,P,f,n,e,i);if(!(j===void 0?L===P||s(L,P,t,r,i):j)){x=!1;break}T||(T=f=="constructor")}if(x&&!T){var z=n.constructor,H=e.constructor;z!=H&&"constructor"in n&&"constructor"in e&&!(typeof z=="function"&&z instanceof z&&typeof H=="function"&&H instanceof H)&&(x=!1)}return i.delete(n),i.delete(e),x}var Fd=1,fa="[object Arguments]",ha="[object Array]",Qn="[object Object]",Hd=Object.prototype,da=Hd.hasOwnProperty;function zd(n,e,t,r,s,i){var o=or(n),a=or(e),u=o?ha:tt(n),c=a?ha:tt(e);u=u==fa?Qn:u,c=c==fa?Qn:c;var d=u==Qn,g=c==Qn,f=u==c;if(f&&dn(n)){if(!dn(e))return!1;o=!0,d=!1}if(f&&!d)return i||(i=new bt),o||Zs(n)?ua(n,e,t,r,s,i):Dd(n,e,u,t,r,s,i);if(!(t&Fd)){var m=d&&da.call(n,"__wrapped__"),w=g&&da.call(e,"__wrapped__");if(m||w){var x=m?n.value():n,T=w?e.value():e;return i||(i=new bt),s(x,T,t,r,i)}}return f?(i||(i=new bt),Ud(n,e,t,r,s,i)):!1}function ga(n,e,t,r,s){return n===e?!0:n==null||e==null||!Rt(n)&&!Rt(e)?n!==n&&e!==e:zd(n,e,t,r,ga,s)}function Vd(n){return function(e,t,r){for(var s=-1,i=Object(e),o=r(e),a=o.length;a--;){var u=o[++s];if(t(i[u],u,i)===!1)break}return e}}var Kd=Vd();function ri(n,e,t){(t!==void 0&&!hn(n[e],t)||t===void 0&&!(e in n))&&zs(n,e,t)}function Gd(n){return Rt(n)&&Gn(n)}function ni(n,e){if(!(e==="constructor"&&typeof n[e]=="function")&&e!="__proto__")return n[e]}function Wd(n){return mc(n,Mo(n))}function Zd(n,e,t,r,s,i,o){var a=ni(n,t),u=ni(e,t),c=o.get(u);if(c){ri(n,t,c);return}var d=i?i(a,u,t+"",n,e,o):void 0,g=d===void 0;if(g){var f=or(u),m=!f&&dn(u),w=!f&&!m&&Zs(u);d=u,f||m||w?or(a)?d=a:Gd(a)?d=nc(a):m?(g=!1,d=Go(u,!0)):w?(g=!1,d=ra(u,!0)):d=[]:zf(u)||Ks(u)?(d=a,Ks(a)?d=Wd(a):(!Kt(a)||Us(a))&&(d=na(u))):g=!1}g&&(o.set(u,d),s(d,u,r,i,o),o.delete(u)),ri(n,t,d)}function pa(n,e,t,r,s){n!==e&&Kd(e,function(i,o){if(s||(s=new bt),Kt(i))Zd(n,e,o,t,pa,r,s);else{var a=r?r(ni(n,o),i,o+"",n,e,s):void 0;a===void 0&&(a=i),ri(n,o,a)}},Mo)}function si(n,e){return ga(n,e)}var Gt=Ec(function(n,e,t){pa(n,e,t)}),F=(n=>(n[n.TYPE=3]="TYPE",n[n.LEVEL=12]="LEVEL",n[n.ATTRIBUTE=13]="ATTRIBUTE",n[n.BLOT=14]="BLOT",n[n.INLINE=7]="INLINE",n[n.BLOCK=11]="BLOCK",n[n.BLOCK_BLOT=10]="BLOCK_BLOT",n[n.INLINE_BLOT=6]="INLINE_BLOT",n[n.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",n[n.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",n[n.ANY=15]="ANY",n))(F||{});class yt{constructor(e,t,r={}){this.attrName=e,this.keyName=t;const s=F.TYPE&F.ATTRIBUTE;this.scope=r.scope!=null?r.scope&F.LEVEL|s:F.ATTRIBUTE,r.whitelist!=null&&(this.whitelist=r.whitelist)}static keys(e){return Array.from(e.attributes).map(t=>t.name)}add(e,t){return this.canAdd(e,t)?(e.setAttribute(this.keyName,t),!0):!1}canAdd(e,t){return this.whitelist==null?!0:typeof t=="string"?this.whitelist.indexOf(t.replace(/["']/g,""))>-1:this.whitelist.indexOf(t)>-1}remove(e){e.removeAttribute(this.keyName)}value(e){const t=e.getAttribute(this.keyName);return this.canAdd(e,t)&&t?t:""}}class Rr extends Error{constructor(e){e="[Parchment] "+e,super(e),this.message=e,this.name=this.constructor.name}}const ma=class po{constructor(){this.attributes={},this.classes={},this.tags={},this.types={}}static find(e,t=!1){if(e==null)return null;if(this.blots.has(e))return this.blots.get(e)||null;if(t){let r=null;try{r=e.parentNode}catch{return null}return this.find(r,t)}return null}create(e,t,r){const s=this.query(t);if(s==null)throw new Rr(`Unable to create ${t} blot`);const i=s,o=t instanceof Node||t.nodeType===Node.TEXT_NODE?t:i.create(r),a=new i(e,o,r);return po.blots.set(a.domNode,a),a}find(e,t=!1){return po.find(e,t)}query(e,t=F.ANY){let r;return typeof e=="string"?r=this.types[e]||this.attributes[e]:e instanceof Text||e.nodeType===Node.TEXT_NODE?r=this.types.text:typeof e=="number"?e&F.LEVEL&F.BLOCK?r=this.types.block:e&F.LEVEL&F.INLINE&&(r=this.types.inline):e instanceof Element&&((e.getAttribute("class")||"").split(/\s+/).some(s=>(r=this.classes[s],!!r)),r=r||this.tags[e.tagName]),r==null?null:"scope"in r&&t&F.LEVEL&r.scope&&t&F.TYPE&r.scope?r:null}register(...e){return e.map(t=>{const r="blotName"in t,s="attrName"in t;if(!r&&!s)throw new Rr("Invalid definition");if(r&&t.blotName==="abstract")throw new Rr("Cannot register abstract class");const i=r?t.blotName:s?t.attrName:void 0;return this.types[i]=t,s?typeof t.keyName=="string"&&(this.attributes[t.keyName]=t):r&&(t.className&&(this.classes[t.className]=t),t.tagName&&(Array.isArray(t.tagName)?t.tagName=t.tagName.map(o=>o.toUpperCase()):t.tagName=t.tagName.toUpperCase(),(Array.isArray(t.tagName)?t.tagName:[t.tagName]).forEach(o=>{(this.tags[o]==null||t.className==null)&&(this.tags[o]=t)}))),t})}};ma.blots=new WeakMap;let qr=ma;function ba(n,e){return(n.getAttribute("class")||"").split(/\s+/).filter(t=>t.indexOf(`${e}-`)===0)}class Xd extends yt{static keys(e){return(e.getAttribute("class")||"").split(/\s+/).map(t=>t.split("-").slice(0,-1).join("-"))}add(e,t){return this.canAdd(e,t)?(this.remove(e),e.classList.add(`${this.keyName}-${t}`),!0):!1}remove(e){ba(e,this.keyName).forEach(t=>{e.classList.remove(t)}),e.classList.length===0&&e.removeAttribute("class")}value(e){const t=(ba(e,this.keyName)[0]||"").slice(this.keyName.length+1);return this.canAdd(e,t)?t:""}}const rt=Xd;function ii(n){const e=n.split("-"),t=e.slice(1).map(r=>r[0].toUpperCase()+r.slice(1)).join("");return e[0]+t}class Yd extends yt{static keys(e){return(e.getAttribute("style")||"").split(";").map(t=>t.split(":")[0].trim())}add(e,t){return this.canAdd(e,t)?(e.style[ii(this.keyName)]=t,!0):!1}remove(e){e.style[ii(this.keyName)]="",e.getAttribute("style")||e.removeAttribute("style")}value(e){const t=e.style[ii(this.keyName)];return this.canAdd(e,t)?t:""}}const Wt=Yd;class Jd{constructor(e){this.attributes={},this.domNode=e,this.build()}attribute(e,t){t?e.add(this.domNode,t)&&(e.value(this.domNode)!=null?this.attributes[e.attrName]=e:delete this.attributes[e.attrName]):(e.remove(this.domNode),delete this.attributes[e.attrName])}build(){this.attributes={};const e=qr.find(this.domNode);if(e==null)return;const t=yt.keys(this.domNode),r=rt.keys(this.domNode),s=Wt.keys(this.domNode);t.concat(r).concat(s).forEach(i=>{const o=e.scroll.query(i,F.ATTRIBUTE);o instanceof yt&&(this.attributes[o.attrName]=o)})}copy(e){Object.keys(this.attributes).forEach(t=>{const r=this.attributes[t].value(this.domNode);e.format(t,r)})}move(e){this.copy(e),Object.keys(this.attributes).forEach(t=>{this.attributes[t].remove(this.domNode)}),this.attributes={}}values(){return Object.keys(this.attributes).reduce((e,t)=>(e[t]=this.attributes[t].value(this.domNode),e),{})}}const es=Jd,ya=class{constructor(e,t){this.scroll=e,this.domNode=t,qr.blots.set(t,this),this.prev=null,this.next=null}static create(e){if(this.tagName==null)throw new Rr("Blot definition missing tagName");let t,r;return Array.isArray(this.tagName)?(typeof e=="string"?(r=e.toUpperCase(),parseInt(r,10).toString()===r&&(r=parseInt(r,10))):typeof e=="number"&&(r=e),typeof r=="number"?t=document.createElement(this.tagName[r-1]):r&&this.tagName.indexOf(r)>-1?t=document.createElement(r):t=document.createElement(this.tagName[0])):t=document.createElement(this.tagName),this.className&&t.classList.add(this.className),t}get statics(){return this.constructor}attach(){}clone(){const e=this.domNode.cloneNode(!1);return this.scroll.create(e)}detach(){this.parent!=null&&this.parent.removeChild(this),qr.blots.delete(this.domNode)}deleteAt(e,t){this.isolate(e,t).remove()}formatAt(e,t,r,s){const i=this.isolate(e,t);if(this.scroll.query(r,F.BLOT)!=null&&s)i.wrap(r,s);else if(this.scroll.query(r,F.ATTRIBUTE)!=null){const o=this.scroll.create(this.statics.scope);i.wrap(o),o.format(r,s)}}insertAt(e,t,r){const s=r==null?this.scroll.create("text",t):this.scroll.create(t,r),i=this.split(e);this.parent.insertBefore(s,i||void 0)}isolate(e,t){const r=this.split(e);if(r==null)throw new Error("Attempt to isolate at end");return r.split(t),r}length(){return 1}offset(e=this.parent){return this.parent==null||this===e?0:this.parent.children.offset(this)+this.parent.offset(e)}optimize(e){this.statics.requiredContainer&&!(this.parent instanceof this.statics.requiredContainer)&&this.wrap(this.statics.requiredContainer.blotName)}remove(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return this.parent!=null&&(this.parent.insertBefore(r,this.next||void 0),this.remove()),r}split(e,t){return e===0?this:this.next}update(e,t){}wrap(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;if(this.parent!=null&&this.parent.insertBefore(r,this.next||void 0),typeof r.appendChild!="function")throw new Rr(`Cannot wrap ${e}`);return r.appendChild(this),r}};ya.blotName="abstract";let va=ya;const wa=class extends va{static value(e){return!0}index(e,t){return this.domNode===e||this.domNode.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(t,1):-1}position(e,t){let r=Array.from(this.parent.domNode.childNodes).indexOf(this.domNode);return e>0&&(r+=1),[this.parent.domNode,r]}value(){return{[this.statics.blotName]:this.statics.value(this.domNode)||!0}}};wa.scope=F.INLINE_BLOT;const Pe=wa;class Qd{constructor(){this.head=null,this.tail=null,this.length=0}append(...e){if(this.insertBefore(e[0],null),e.length>1){const t=e.slice(1);this.append(...t)}}at(e){const t=this.iterator();let r=t();for(;r&&e>0;)e-=1,r=t();return r}contains(e){const t=this.iterator();let r=t();for(;r;){if(r===e)return!0;r=t()}return!1}indexOf(e){const t=this.iterator();let r=t(),s=0;for(;r;){if(r===e)return s;s+=1,r=t()}return-1}insertBefore(e,t){e!=null&&(this.remove(e),e.next=t,t!=null?(e.prev=t.prev,t.prev!=null&&(t.prev.next=e),t.prev=e,t===this.head&&(this.head=e)):this.tail!=null?(this.tail.next=e,e.prev=this.tail,this.tail=e):(e.prev=null,this.head=this.tail=e),this.length+=1)}offset(e){let t=0,r=this.head;for(;r!=null;){if(r===e)return t;t+=r.length(),r=r.next}return-1}remove(e){this.contains(e)&&(e.prev!=null&&(e.prev.next=e.next),e.next!=null&&(e.next.prev=e.prev),e===this.head&&(this.head=e.next),e===this.tail&&(this.tail=e.prev),this.length-=1)}iterator(e=this.head){return()=>{const t=e;return e!=null&&(e=e.next),t}}find(e,t=!1){const r=this.iterator();let s=r();for(;s;){const i=s.length();if(e<i||t&&e===i&&(s.next==null||s.next.length()!==0))return[s,e];e-=i,s=r()}return[null,0]}forEach(e){const t=this.iterator();let r=t();for(;r;)e(r),r=t()}forEachAt(e,t,r){if(t<=0)return;const[s,i]=this.find(e);let o=e-i;const a=this.iterator(s);let u=a();for(;u&&o<e+t;){const c=u.length();e>o?r(u,e-o,Math.min(t,o+c-e)):r(u,0,Math.min(c,e+t-o)),o+=c,u=a()}}map(e){return this.reduce((t,r)=>(t.push(e(r)),t),[])}reduce(e,t){const r=this.iterator();let s=r();for(;s;)t=e(t,s),s=r();return t}}function Ea(n,e){const t=e.find(n);if(t)return t;try{return e.create(n)}catch{const r=e.create(F.INLINE);return Array.from(n.childNodes).forEach(s=>{r.domNode.appendChild(s)}),n.parentNode&&n.parentNode.replaceChild(r.domNode,n),r.attach(),r}}const xa=class ir extends va{constructor(e,t){super(e,t),this.uiNode=null,this.build()}appendChild(e){this.insertBefore(e)}attach(){super.attach(),this.children.forEach(e=>{e.attach()})}attachUI(e){this.uiNode!=null&&this.uiNode.remove(),this.uiNode=e,ir.uiClass&&this.uiNode.classList.add(ir.uiClass),this.uiNode.setAttribute("contenteditable","false"),this.domNode.insertBefore(this.uiNode,this.domNode.firstChild)}build(){this.children=new Qd,Array.from(this.domNode.childNodes).filter(e=>e!==this.uiNode).reverse().forEach(e=>{try{const t=Ea(e,this.scroll);this.insertBefore(t,this.children.head||void 0)}catch(t){if(t instanceof Rr)return;throw t}})}deleteAt(e,t){if(e===0&&t===this.length())return this.remove();this.children.forEachAt(e,t,(r,s,i)=>{r.deleteAt(s,i)})}descendant(e,t=0){const[r,s]=this.children.find(t);return e.blotName==null&&e(r)||e.blotName!=null&&r instanceof e?[r,s]:r instanceof ir?r.descendant(e,s):[null,-1]}descendants(e,t=0,r=Number.MAX_VALUE){let s=[],i=r;return this.children.forEachAt(t,r,(o,a,u)=>{(e.blotName==null&&e(o)||e.blotName!=null&&o instanceof e)&&s.push(o),o instanceof ir&&(s=s.concat(o.descendants(e,a,i))),i-=u}),s}detach(){this.children.forEach(e=>{e.detach()}),super.detach()}enforceAllowedChildren(){let e=!1;this.children.forEach(t=>{e||this.statics.allowedChildren.some(r=>t instanceof r)||(t.statics.scope===F.BLOCK_BLOT?(t.next!=null&&this.splitAfter(t),t.prev!=null&&this.splitAfter(t.prev),t.parent.unwrap(),e=!0):t instanceof ir?t.unwrap():t.remove())})}formatAt(e,t,r,s){this.children.forEachAt(e,t,(i,o,a)=>{i.formatAt(o,a,r,s)})}insertAt(e,t,r){const[s,i]=this.children.find(e);if(s)s.insertAt(i,t,r);else{const o=r==null?this.scroll.create("text",t):this.scroll.create(t,r);this.appendChild(o)}}insertBefore(e,t){e.parent!=null&&e.parent.children.remove(e);let r=null;this.children.insertBefore(e,t||null),e.parent=this,t!=null&&(r=t.domNode),(this.domNode.parentNode!==e.domNode||this.domNode.nextSibling!==r)&&this.domNode.insertBefore(e.domNode,r),e.attach()}length(){return this.children.reduce((e,t)=>e+t.length(),0)}moveChildren(e,t){this.children.forEach(r=>{e.insertBefore(r,t)})}optimize(e){if(super.optimize(e),this.enforceAllowedChildren(),this.uiNode!=null&&this.uiNode!==this.domNode.firstChild&&this.domNode.insertBefore(this.uiNode,this.domNode.firstChild),this.children.length===0)if(this.statics.defaultChild!=null){const t=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(t)}else this.remove()}path(e,t=!1){const[r,s]=this.children.find(e,t),i=[[this,e]];return r instanceof ir?i.concat(r.path(s,t)):(r!=null&&i.push([r,s]),i)}removeChild(e){this.children.remove(e)}replaceWith(e,t){const r=typeof e=="string"?this.scroll.create(e,t):e;return r instanceof ir&&this.moveChildren(r),super.replaceWith(r)}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.clone();return this.parent&&this.parent.insertBefore(r,this.next||void 0),this.children.forEachAt(e,this.length(),(s,i,o)=>{const a=s.split(i,t);a!=null&&r.appendChild(a)}),r}splitAfter(e){const t=this.clone();for(;e.next!=null;)t.appendChild(e.next);return this.parent&&this.parent.insertBefore(t,this.next||void 0),t}unwrap(){this.parent&&this.moveChildren(this.parent,this.next||void 0),this.remove()}update(e,t){const r=[],s=[];e.forEach(i=>{i.target===this.domNode&&i.type==="childList"&&(r.push(...i.addedNodes),s.push(...i.removedNodes))}),s.forEach(i=>{if(i.parentNode!=null&&i.tagName!=="IFRAME"&&document.body.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY)return;const o=this.scroll.find(i);o!=null&&(o.domNode.parentNode==null||o.domNode.parentNode===this.domNode)&&o.detach()}),r.filter(i=>i.parentNode===this.domNode&&i!==this.uiNode).sort((i,o)=>i===o?0:i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1).forEach(i=>{let o=null;i.nextSibling!=null&&(o=this.scroll.find(i.nextSibling));const a=Ea(i,this.scroll);(a.next!==o||a.next==null)&&(a.parent!=null&&a.parent.removeChild(this),this.insertBefore(a,o||void 0))}),this.enforceAllowedChildren()}};xa.uiClass="";const nt=xa;function eg(n,e){if(Object.keys(n).length!==Object.keys(e).length)return!1;for(const t in n)if(n[t]!==e[t])return!1;return!0}const kr=class ln extends nt{static create(e){return super.create(e)}static formats(e,t){const r=t.query(ln.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new es(this.domNode)}format(e,t){if(e===this.statics.blotName&&!t)this.children.forEach(r=>{r instanceof ln||(r=r.wrap(ln.blotName,!0)),this.attributes.copy(r)}),this.unwrap();else{const r=this.scroll.query(e,F.INLINE);if(r==null)return;r instanceof yt?this.attributes.attribute(r,t):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t)}}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,s){this.formats()[r]!=null||this.scroll.query(r,F.ATTRIBUTE)?this.isolate(e,t).format(r,s):super.formatAt(e,t,r,s)}optimize(e){super.optimize(e);const t=this.formats();if(Object.keys(t).length===0)return this.unwrap();const r=this.next;r instanceof ln&&r.prev===this&&eg(t,r.formats())&&(r.moveChildren(this),r.remove())}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}wrap(e,t){const r=super.wrap(e,t);return r instanceof ln&&this.attributes.move(r),r}};kr.allowedChildren=[kr,Pe],kr.blotName="inline",kr.scope=F.INLINE_BLOT,kr.tagName="SPAN";const oi=kr,Ir=class mo extends nt{static create(e){return super.create(e)}static formats(e,t){const r=t.query(mo.blotName);if(!(r!=null&&e.tagName===r.tagName)){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return e.tagName.toLowerCase()}}constructor(e,t){super(e,t),this.attributes=new es(this.domNode)}format(e,t){const r=this.scroll.query(e,F.BLOCK);r!=null&&(r instanceof yt?this.attributes.attribute(r,t):e===this.statics.blotName&&!t?this.replaceWith(mo.blotName):t&&(e!==this.statics.blotName||this.formats()[e]!==t)&&this.replaceWith(e,t))}formats(){const e=this.attributes.values(),t=this.statics.formats(this.domNode,this.scroll);return t!=null&&(e[this.statics.blotName]=t),e}formatAt(e,t,r,s){this.scroll.query(r,F.BLOCK)!=null?this.format(r,s):super.formatAt(e,t,r,s)}insertAt(e,t,r){if(r==null||this.scroll.query(t,F.INLINE)!=null)super.insertAt(e,t,r);else{const s=this.split(e);if(s!=null){const i=this.scroll.create(t,r);s.parent.insertBefore(i,s)}else throw new Error("Attempt to insertAt after block boundaries")}}replaceWith(e,t){const r=super.replaceWith(e,t);return this.attributes.copy(r),r}update(e,t){super.update(e,t),e.some(r=>r.target===this.domNode&&r.type==="attributes")&&this.attributes.build()}};Ir.blotName="block",Ir.scope=F.BLOCK_BLOT,Ir.tagName="P",Ir.allowedChildren=[oi,Ir,Pe];const bn=Ir,ai=class extends nt{checkMerge(){return this.next!==null&&this.next.statics.blotName===this.statics.blotName}deleteAt(e,t){super.deleteAt(e,t),this.enforceAllowedChildren()}formatAt(e,t,r,s){super.formatAt(e,t,r,s),this.enforceAllowedChildren()}insertAt(e,t,r){super.insertAt(e,t,r),this.enforceAllowedChildren()}optimize(e){super.optimize(e),this.children.length>0&&this.next!=null&&this.checkMerge()&&(this.next.moveChildren(this),this.next.remove())}};ai.blotName="container",ai.scope=F.BLOCK_BLOT;const ts=ai;class tg extends Pe{static formats(e,t){}format(e,t){super.formatAt(0,this.length(),e,t)}formatAt(e,t,r,s){e===0&&t===this.length()?this.format(r,s):super.formatAt(e,t,r,s)}formats(){return this.statics.formats(this.domNode,this.scroll)}}const Ke=tg,rg={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},ng=100,Pr=class extends nt{constructor(e,t){super(null,t),this.registry=e,this.scroll=this,this.build(),this.observer=new MutationObserver(r=>{this.update(r)}),this.observer.observe(this.domNode,rg),this.attach()}create(e,t){return this.registry.create(this,e,t)}find(e,t=!1){const r=this.registry.find(e,t);return r?r.scroll===this?r:t?this.find(r.scroll.domNode.parentNode,!0):null:null}query(e,t=F.ANY){return this.registry.query(e,t)}register(...e){return this.registry.register(...e)}build(){this.scroll!=null&&super.build()}detach(){super.detach(),this.observer.disconnect()}deleteAt(e,t){this.update(),e===0&&t===this.length()?this.children.forEach(r=>{r.remove()}):super.deleteAt(e,t)}formatAt(e,t,r,s){this.update(),super.formatAt(e,t,r,s)}insertAt(e,t,r){this.update(),super.insertAt(e,t,r)}optimize(e=[],t={}){super.optimize(t);const r=t.mutationsMap||new WeakMap;let s=Array.from(this.observer.takeRecords());for(;s.length>0;)e.push(s.pop());const i=(u,c=!0)=>{u==null||u===this||u.domNode.parentNode!=null&&(r.has(u.domNode)||r.set(u.domNode,[]),c&&i(u.parent))},o=u=>{r.has(u.domNode)&&(u instanceof nt&&u.children.forEach(o),r.delete(u.domNode),u.optimize(t))};let a=e;for(let u=0;a.length>0;u+=1){if(u>=ng)throw new Error("[Parchment] Maximum optimize iterations reached");for(a.forEach(c=>{const d=this.find(c.target,!0);d!=null&&(d.domNode===c.target&&(c.type==="childList"?(i(this.find(c.previousSibling,!1)),Array.from(c.addedNodes).forEach(g=>{const f=this.find(g,!1);i(f,!1),f instanceof nt&&f.children.forEach(m=>{i(m,!1)})})):c.type==="attributes"&&i(d.prev)),i(d))}),this.children.forEach(o),a=Array.from(this.observer.takeRecords()),s=a.slice();s.length>0;)e.push(s.pop())}}update(e,t={}){e=e||this.observer.takeRecords();const r=new WeakMap;e.map(s=>{const i=this.find(s.target,!0);return i==null?null:r.has(i.domNode)?(r.get(i.domNode).push(s),null):(r.set(i.domNode,[s]),i)}).forEach(s=>{s!=null&&s!==this&&r.has(s.domNode)&&s.update(r.get(s.domNode)||[],t)}),t.mutationsMap=r,r.has(this.domNode)&&super.update(r.get(this.domNode),t),this.optimize(e,t)}};Pr.blotName="scroll",Pr.defaultChild=bn,Pr.allowedChildren=[bn,ts],Pr.scope=F.BLOCK_BLOT,Pr.tagName="DIV";const li=Pr,ui=class Su extends Pe{static create(e){return document.createTextNode(e)}static value(e){return e.data}constructor(e,t){super(e,t),this.text=this.statics.value(this.domNode)}deleteAt(e,t){this.domNode.data=this.text=this.text.slice(0,e)+this.text.slice(e+t)}index(e,t){return this.domNode===e?t:-1}insertAt(e,t,r){r==null?(this.text=this.text.slice(0,e)+t+this.text.slice(e),this.domNode.data=this.text):super.insertAt(e,t,r)}length(){return this.text.length}optimize(e){super.optimize(e),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof Su&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())}position(e,t=!1){return[this.domNode,e]}split(e,t=!1){if(!t){if(e===0)return this;if(e===this.length())return this.next}const r=this.scroll.create(this.domNode.splitText(e));return this.parent.insertBefore(r,this.next||void 0),this.text=this.statics.value(this.domNode),r}update(e,t){e.some(r=>r.type==="characterData"&&r.target===this.domNode)&&(this.text=this.statics.value(this.domNode))}value(){return this.text}};ui.blotName="text",ui.scope=F.INLINE_BLOT;const rs=ui,sg=Object.freeze(Object.defineProperty({__proto__:null,Attributor:yt,AttributorStore:es,BlockBlot:bn,ClassAttributor:rt,ContainerBlot:ts,EmbedBlot:Ke,InlineBlot:oi,LeafBlot:Pe,ParentBlot:nt,Registry:qr,Scope:F,ScrollBlot:li,StyleAttributor:Wt,TextBlot:rs},Symbol.toStringTag,{value:"Module"}));var ns={exports:{}},ci,Aa;function ig(){if(Aa)return ci;Aa=1;var n=-1,e=1,t=0;function r(b,N,A,R,p){if(b===N)return b?[[t,b]]:[];if(A!=null){var E=be(b,N,A);if(E)return E}var S=a(b,N),I=b.substring(0,S);b=b.substring(S),N=N.substring(S),S=c(b,N);var k=b.substring(b.length-S);b=b.substring(0,b.length-S),N=N.substring(0,N.length-S);var _=s(b,N);return I&&_.unshift([t,I]),k&&_.push([t,k]),P(_,p),R&&g(_),_}function s(b,N){var A;if(!b)return[[e,N]];if(!N)return[[n,b]];var R=b.length>N.length?b:N,p=b.length>N.length?N:b,E=R.indexOf(p);if(E!==-1)return A=[[e,R.substring(0,E)],[t,p],[e,R.substring(E+p.length)]],b.length>N.length&&(A[0][0]=A[2][0]=n),A;if(p.length===1)return[[n,b],[e,N]];var S=d(b,N);if(S){var I=S[0],k=S[1],_=S[2],G=S[3],W=S[4],Y=r(I,_),V=r(k,G);return Y.concat([[t,W]],V)}return i(b,N)}function i(b,N){for(var A=b.length,R=N.length,p=Math.ceil((A+R)/2),E=p,S=2*p,I=new Array(S),k=new Array(S),_=0;_<S;_++)I[_]=-1,k[_]=-1;I[E+1]=0,k[E+1]=0;for(var G=A-R,W=G%2!==0,Y=0,V=0,M=0,ve=0,ye=0;ye<p;ye++){for(var Q=-ye+Y;Q<=ye-V;Q+=2){var ae=E+Q,le;Q===-ye||Q!==ye&&I[ae-1]<I[ae+1]?le=I[ae+1]:le=I[ae-1]+1;for(var ue=le-Q;le<A&&ue<R&&b.charAt(le)===N.charAt(ue);)le++,ue++;if(I[ae]=le,le>A)V+=2;else if(ue>R)Y+=2;else if(W){var de=E+G-Q;if(de>=0&&de<S&&k[de]!==-1){var ge=A-k[de];if(le>=ge)return o(b,N,le,ue)}}}for(var Oe=-ye+M;Oe<=ye-ve;Oe+=2){var de=E+Oe,ge;Oe===-ye||Oe!==ye&&k[de-1]<k[de+1]?ge=k[de+1]:ge=k[de-1]+1;for(var Re=ge-Oe;ge<A&&Re<R&&b.charAt(A-ge-1)===N.charAt(R-Re-1);)ge++,Re++;if(k[de]=ge,ge>A)ve+=2;else if(Re>R)M+=2;else if(!W){var ae=E+G-Oe;if(ae>=0&&ae<S&&I[ae]!==-1){var le=I[ae],ue=E+le-ae;if(ge=A-ge,le>=ge)return o(b,N,le,ue)}}}}return[[n,b],[e,N]]}function o(b,N,A,R){var p=b.substring(0,A),E=N.substring(0,R),S=b.substring(A),I=N.substring(R),k=r(p,E),_=r(S,I);return k.concat(_)}function a(b,N){if(!b||!N||b.charAt(0)!==N.charAt(0))return 0;for(var A=0,R=Math.min(b.length,N.length),p=R,E=0;A<p;)b.substring(E,p)==N.substring(E,p)?(A=p,E=A):R=p,p=Math.floor((R-A)/2+A);return j(b.charCodeAt(p-1))&&p--,p}function u(b,N){var A=b.length,R=N.length;if(A==0||R==0)return 0;A>R?b=b.substring(A-R):A<R&&(N=N.substring(0,A));var p=Math.min(A,R);if(b==N)return p;for(var E=0,S=1;;){var I=b.substring(p-S),k=N.indexOf(I);if(k==-1)return E;S+=k,(k==0||b.substring(p-S)==N.substring(0,S))&&(E=S,S++)}}function c(b,N){if(!b||!N||b.slice(-1)!==N.slice(-1))return 0;for(var A=0,R=Math.min(b.length,N.length),p=R,E=0;A<p;)b.substring(b.length-p,b.length-E)==N.substring(N.length-p,N.length-E)?(A=p,E=A):R=p,p=Math.floor((R-A)/2+A);return z(b.charCodeAt(b.length-p))&&p--,p}function d(b,N){var A=b.length>N.length?b:N,R=b.length>N.length?N:b;if(A.length<4||R.length*2<A.length)return null;function p(V,M,ve){for(var ye=V.substring(ve,ve+Math.floor(V.length/4)),Q=-1,ae="",le,ue,de,ge;(Q=M.indexOf(ye,Q+1))!==-1;){var Oe=a(V.substring(ve),M.substring(Q)),Re=c(V.substring(0,ve),M.substring(0,Q));ae.length<Re+Oe&&(ae=M.substring(Q-Re,Q)+M.substring(Q,Q+Oe),le=V.substring(0,ve-Re),ue=V.substring(ve+Oe),de=M.substring(0,Q-Re),ge=M.substring(Q+Oe))}return ae.length*2>=V.length?[le,ue,de,ge,ae]:null}var E=p(A,R,Math.ceil(A.length/4)),S=p(A,R,Math.ceil(A.length/2)),I;if(!E&&!S)return null;S?E?I=E[4].length>S[4].length?E:S:I=S:I=E;var k,_,G,W;b.length>N.length?(k=I[0],_=I[1],G=I[2],W=I[3]):(G=I[0],W=I[1],k=I[2],_=I[3]);var Y=I[4];return[k,_,G,W,Y]}function g(b){for(var N=!1,A=[],R=0,p=null,E=0,S=0,I=0,k=0,_=0;E<b.length;)b[E][0]==t?(A[R++]=E,S=k,I=_,k=0,_=0,p=b[E][1]):(b[E][0]==e?k+=b[E][1].length:_+=b[E][1].length,p&&p.length<=Math.max(S,I)&&p.length<=Math.max(k,_)&&(b.splice(A[R-1],0,[n,p]),b[A[R-1]+1][0]=e,R--,R--,E=R>0?A[R-1]:-1,S=0,I=0,k=0,_=0,p=null,N=!0)),E++;for(N&&P(b),L(b),E=1;E<b.length;){if(b[E-1][0]==n&&b[E][0]==e){var G=b[E-1][1],W=b[E][1],Y=u(G,W),V=u(W,G);Y>=V?(Y>=G.length/2||Y>=W.length/2)&&(b.splice(E,0,[t,W.substring(0,Y)]),b[E-1][1]=G.substring(0,G.length-Y),b[E+1][1]=W.substring(Y),E++):(V>=G.length/2||V>=W.length/2)&&(b.splice(E,0,[t,G.substring(0,V)]),b[E-1][0]=e,b[E-1][1]=W.substring(0,W.length-V),b[E+1][0]=n,b[E+1][1]=G.substring(V),E++),E++}E++}}var f=/[^a-zA-Z0-9]/,m=/\s/,w=/[\r\n]/,x=/\n\r?\n$/,T=/^\r?\n\r?\n/;function L(b){function N(V,M){if(!V||!M)return 6;var ve=V.charAt(V.length-1),ye=M.charAt(0),Q=ve.match(f),ae=ye.match(f),le=Q&&ve.match(m),ue=ae&&ye.match(m),de=le&&ve.match(w),ge=ue&&ye.match(w),Oe=de&&V.match(x),Re=ge&&M.match(T);return Oe||Re?5:de||ge?4:Q&&!le&&ue?3:le||ue?2:Q||ae?1:0}for(var A=1;A<b.length-1;){if(b[A-1][0]==t&&b[A+1][0]==t){var R=b[A-1][1],p=b[A][1],E=b[A+1][1],S=c(R,p);if(S){var I=p.substring(p.length-S);R=R.substring(0,R.length-S),p=I+p.substring(0,p.length-S),E=I+E}for(var k=R,_=p,G=E,W=N(R,p)+N(p,E);p.charAt(0)===E.charAt(0);){R+=p.charAt(0),p=p.substring(1)+E.charAt(0),E=E.substring(1);var Y=N(R,p)+N(p,E);Y>=W&&(W=Y,k=R,_=p,G=E)}b[A-1][1]!=k&&(k?b[A-1][1]=k:(b.splice(A-1,1),A--),b[A][1]=_,G?b[A+1][1]=G:(b.splice(A+1,1),A--))}A++}}function P(b,N){b.push([t,""]);for(var A=0,R=0,p=0,E="",S="",I;A<b.length;){if(A<b.length-1&&!b[A][1]){b.splice(A,1);continue}switch(b[A][0]){case e:p++,S+=b[A][1],A++;break;case n:R++,E+=b[A][1],A++;break;case t:var k=A-p-R-1;if(N){if(k>=0&&ie(b[k][1])){var _=b[k][1].slice(-1);if(b[k][1]=b[k][1].slice(0,-1),E=_+E,S=_+S,!b[k][1]){b.splice(k,1),A--;var G=k-1;b[G]&&b[G][0]===e&&(p++,S=b[G][1]+S,G--),b[G]&&b[G][0]===n&&(R++,E=b[G][1]+E,G--),k=G}}if(H(b[A][1])){var _=b[A][1].charAt(0);b[A][1]=b[A][1].slice(1),E+=_,S+=_}}if(A<b.length-1&&!b[A][1]){b.splice(A,1);break}if(E.length>0||S.length>0){E.length>0&&S.length>0&&(I=a(S,E),I!==0&&(k>=0?b[k][1]+=S.substring(0,I):(b.splice(0,0,[t,S.substring(0,I)]),A++),S=S.substring(I),E=E.substring(I)),I=c(S,E),I!==0&&(b[A][1]=S.substring(S.length-I)+b[A][1],S=S.substring(0,S.length-I),E=E.substring(0,E.length-I)));var W=p+R;E.length===0&&S.length===0?(b.splice(A-W,W),A=A-W):E.length===0?(b.splice(A-W,W,[e,S]),A=A-W+1):S.length===0?(b.splice(A-W,W,[n,E]),A=A-W+1):(b.splice(A-W,W,[n,E],[e,S]),A=A-W+2)}A!==0&&b[A-1][0]===t?(b[A-1][1]+=b[A][1],b.splice(A,1)):A++,p=0,R=0,E="",S="";break}}b[b.length-1][1]===""&&b.pop();var Y=!1;for(A=1;A<b.length-1;)b[A-1][0]===t&&b[A+1][0]===t&&(b[A][1].substring(b[A][1].length-b[A-1][1].length)===b[A-1][1]?(b[A][1]=b[A-1][1]+b[A][1].substring(0,b[A][1].length-b[A-1][1].length),b[A+1][1]=b[A-1][1]+b[A+1][1],b.splice(A-1,1),Y=!0):b[A][1].substring(0,b[A+1][1].length)==b[A+1][1]&&(b[A-1][1]+=b[A+1][1],b[A][1]=b[A][1].substring(b[A+1][1].length)+b[A+1][1],b.splice(A+1,1),Y=!0)),A++;Y&&P(b,N)}function j(b){return b>=55296&&b<=56319}function z(b){return b>=56320&&b<=57343}function H(b){return z(b.charCodeAt(0))}function ie(b){return j(b.charCodeAt(b.length-1))}function te(b){for(var N=[],A=0;A<b.length;A++)b[A][1].length>0&&N.push(b[A]);return N}function oe(b,N,A,R){return ie(b)||H(R)?null:te([[t,b],[n,N],[e,A],[t,R]])}function be(b,N,A){var R=typeof A=="number"?{index:A,length:0}:A.oldRange,p=typeof A=="number"?null:A.newRange,E=b.length,S=N.length;if(R.length===0&&(p===null||p.length===0)){var I=R.index,k=b.slice(0,I),_=b.slice(I),G=p?p.index:null;e:{var W=I+S-E;if(G!==null&&G!==W||W<0||W>S)break e;var Y=N.slice(0,W),V=N.slice(W);if(V!==_)break e;var M=Math.min(I,W),ve=k.slice(0,M),ye=Y.slice(0,M);if(ve!==ye)break e;var Q=k.slice(M),ae=Y.slice(M);return oe(ve,Q,ae,_)}e:{if(G!==null&&G!==I)break e;var le=I,Y=N.slice(0,le),V=N.slice(le);if(Y!==k)break e;var ue=Math.min(E-le,S-le),de=_.slice(_.length-ue),ge=V.slice(V.length-ue);if(de!==ge)break e;var Q=_.slice(0,_.length-ue),ae=V.slice(0,V.length-ue);return oe(k,Q,ae,de)}}if(R.length>0&&p&&p.length===0)e:{var ve=b.slice(0,R.index),de=b.slice(R.index+R.length),M=ve.length,ue=de.length;if(S<M+ue)break e;var ye=N.slice(0,M),ge=N.slice(S-ue);if(ve!==ye||de!==ge)break e;var Q=b.slice(M,E-ue),ae=N.slice(M,S-ue);return oe(ve,Q,ae,de)}return null}function xe(b,N,A,R){return r(b,N,A,R,!0)}return xe.INSERT=e,xe.DELETE=n,xe.EQUAL=t,ci=xe,ci}var yn={exports:{}};yn.exports;var Ta;function Sa(){return Ta||(Ta=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",s=9007199254740991,i="[object Arguments]",o="[object Array]",a="[object Boolean]",u="[object Date]",c="[object Error]",d="[object Function]",g="[object GeneratorFunction]",f="[object Map]",m="[object Number]",w="[object Object]",x="[object Promise]",T="[object RegExp]",L="[object Set]",P="[object String]",j="[object Symbol]",z="[object WeakMap]",H="[object ArrayBuffer]",ie="[object DataView]",te="[object Float32Array]",oe="[object Float64Array]",be="[object Int8Array]",xe="[object Int16Array]",b="[object Int32Array]",N="[object Uint8Array]",A="[object Uint8ClampedArray]",R="[object Uint16Array]",p="[object Uint32Array]",E=/[\\^$.*+?()[\]{}|]/g,S=/\w*$/,I=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,_={};_[i]=_[o]=_[H]=_[ie]=_[a]=_[u]=_[te]=_[oe]=_[be]=_[xe]=_[b]=_[f]=_[m]=_[w]=_[T]=_[L]=_[P]=_[j]=_[N]=_[A]=_[R]=_[p]=!0,_[c]=_[d]=_[z]=!1;var G=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge,W=typeof self=="object"&&self&&self.Object===Object&&self,Y=G||W||Function("return this")(),V=e&&!e.nodeType&&e,M=V&&!0&&n&&!n.nodeType&&n,ve=M&&M.exports===V;function ye(l,h){return l.set(h[0],h[1]),l}function Q(l,h){return l.add(h),l}function ae(l,h){for(var v=-1,O=l?l.length:0;++v<O&&h(l[v],v,l)!==!1;);return l}function le(l,h){for(var v=-1,O=h.length,ee=l.length;++v<O;)l[ee+v]=h[v];return l}function ue(l,h,v,O){for(var ee=-1,K=l?l.length:0;++ee<K;)v=h(v,l[ee],ee,l);return v}function de(l,h){for(var v=-1,O=Array(l);++v<l;)O[v]=h(v);return O}function ge(l,h){return l==null?void 0:l[h]}function Oe(l){var h=!1;if(l!=null&&typeof l.toString!="function")try{h=!!(l+"")}catch{}return h}function Re(l){var h=-1,v=Array(l.size);return l.forEach(function(O,ee){v[++h]=[ee,O]}),v}function At(l,h){return function(v){return l(h(v))}}function Tt(l){var h=-1,v=Array(l.size);return l.forEach(function(O){v[++h]=O}),v}var Gr=Array.prototype,Wr=Function.prototype,ct=Object.prototype,mr=Y["__core-js_shared__"],Zr=(function(){var l=/[^.]+$/.exec(mr&&mr.keys&&mr.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Jt=Wr.toString,Qe=ct.hasOwnProperty,Qt=ct.toString,Xr=RegExp("^"+Jt.call(Qe).replace(E,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),St=ve?Y.Buffer:void 0,Dt=Y.Symbol,br=Y.Uint8Array,Ue=At(Object.getPrototypeOf,Object),yr=Object.create,Yr=ct.propertyIsEnumerable,jn=Gr.splice,vr=Object.getOwnPropertySymbols,er=St?St.isBuffer:void 0,Jr=At(Object.keys,Object),tr=pt(Y,"DataView"),Bt=pt(Y,"Map"),Fe=pt(Y,"Promise"),$t=pt(Y,"Set"),et=pt(Y,"WeakMap"),ft=pt(Object,"create"),Mt=He(tr),Ot=He(Bt),wr=He(Fe),rr=He($t),Er=He(et),ht=Dt?Dt.prototype:void 0,xr=ht?ht.valueOf:void 0;function dt(l){var h=-1,v=l?l.length:0;for(this.clear();++h<v;){var O=l[h];this.set(O[0],O[1])}}function Dn(){this.__data__=ft?ft(null):{}}function Qr(l){return this.has(l)&&delete this.__data__[l]}function en(l){var h=this.__data__;if(ft){var v=h[l];return v===r?void 0:v}return Qe.call(h,l)?h[l]:void 0}function tn(l){var h=this.__data__;return ft?h[l]!==void 0:Qe.call(h,l)}function Ar(l,h){var v=this.__data__;return v[l]=ft&&h===void 0?r:h,this}dt.prototype.clear=Dn,dt.prototype.delete=Qr,dt.prototype.get=en,dt.prototype.has=tn,dt.prototype.set=Ar;function Le(l){var h=-1,v=l?l.length:0;for(this.clear();++h<v;){var O=l[h];this.set(O[0],O[1])}}function Bn(){this.__data__=[]}function y(l){var h=this.__data__,v=nn(h,l);if(v<0)return!1;var O=h.length-1;return v==O?h.pop():jn.call(h,v,1),!0}function q(l){var h=this.__data__,v=nn(h,l);return v<0?void 0:h[v][1]}function D(l){return nn(this.__data__,l)>-1}function Z(l,h){var v=this.__data__,O=nn(v,l);return O<0?v.push([l,h]):v[O][1]=h,this}Le.prototype.clear=Bn,Le.prototype.delete=y,Le.prototype.get=q,Le.prototype.has=D,Le.prototype.set=Z;function X(l){var h=-1,v=l?l.length:0;for(this.clear();++h<v;){var O=l[h];this.set(O[0],O[1])}}function pe(){this.__data__={hash:new dt,map:new(Bt||Le),string:new dt}}function ne(l){return Or(this,l).delete(l)}function re(l){return Or(this,l).get(l)}function _e(l){return Or(this,l).has(l)}function Ae(l,h){return Or(this,l).set(l,h),this}X.prototype.clear=pe,X.prototype.delete=ne,X.prototype.get=re,X.prototype.has=_e,X.prototype.set=Ae;function ce(l){this.__data__=new Le(l)}function Be(){this.__data__=new Le}function Nt(l){return this.__data__.delete(l)}function gt(l){return this.__data__.get(l)}function qe(l){return this.__data__.has(l)}function Tr(l,h){var v=this.__data__;if(v instanceof Le){var O=v.__data__;if(!Bt||O.length<t-1)return O.push([l,h]),this;v=this.__data__=new X(O)}return v.set(l,h),this}ce.prototype.clear=Be,ce.prototype.delete=Nt,ce.prototype.get=gt,ce.prototype.has=qe,ce.prototype.set=Tr;function nr(l,h){var v=Fn(l)||on(l)?de(l.length,String):[],O=v.length,ee=!!O;for(var K in l)Qe.call(l,K)&&!(ee&&(K=="length"||lo(K,O)))&&v.push(K);return v}function rn(l,h,v){var O=l[h];(!(Qe.call(l,h)&&ks(O,v))||v===void 0&&!(h in l))&&(l[h]=v)}function nn(l,h){for(var v=l.length;v--;)if(ks(l[v][0],h))return v;return-1}function Lt(l,h){return l&&Un(h,zn(h),l)}function $n(l,h,v,O,ee,K,he){var fe;if(O&&(fe=K?O(l,ee,K,he):O(l)),fe!==void 0)return fe;if(!Ct(l))return l;var Ne=Fn(l);if(Ne){if(fe=oo(l),!h)return no(l,fe)}else{var me=Ft(l),$e=me==d||me==g;if(Is(l))return sn(l,h);if(me==w||me==i||$e&&!K){if(Oe(l))return K?l:{};if(fe=_t($e?{}:l),!h)return so(l,Lt(fe,l))}else{if(!_[me])return K?l:{};fe=ao(l,me,$n,h)}}he||(he=new ce);var Ve=he.get(l);if(Ve)return Ve;if(he.set(l,fe),!Ne)var Ce=v?io(l):zn(l);return ae(Ce||l,function(Me,Ie){Ce&&(Ie=Me,Me=l[Ie]),rn(fe,Ie,$n(Me,h,v,O,Ie,l,he))}),fe}function Zi(l){return Ct(l)?yr(l):{}}function Xi(l,h,v){var O=h(l);return Fn(l)?O:le(O,v(l))}function Yi(l){return Qt.call(l)}function Ji(l){if(!Ct(l)||co(l))return!1;var h=Hn(l)||Oe(l)?Xr:I;return h.test(He(l))}function Qi(l){if(!Rs(l))return Jr(l);var h=[];for(var v in Object(l))Qe.call(l,v)&&v!="constructor"&&h.push(v);return h}function sn(l,h){if(h)return l.slice();var v=new l.constructor(l.length);return l.copy(v),v}function Mn(l){var h=new l.constructor(l.byteLength);return new br(h).set(new br(l)),h}function Sr(l,h){var v=h?Mn(l.buffer):l.buffer;return new l.constructor(v,l.byteOffset,l.byteLength)}function _s(l,h,v){var O=h?v(Re(l),!0):Re(l);return ue(O,ye,new l.constructor)}function Cs(l){var h=new l.constructor(l.source,S.exec(l));return h.lastIndex=l.lastIndex,h}function eo(l,h,v){var O=h?v(Tt(l),!0):Tt(l);return ue(O,Q,new l.constructor)}function to(l){return xr?Object(xr.call(l)):{}}function ro(l,h){var v=h?Mn(l.buffer):l.buffer;return new l.constructor(v,l.byteOffset,l.length)}function no(l,h){var v=-1,O=l.length;for(h||(h=Array(O));++v<O;)h[v]=l[v];return h}function Un(l,h,v,O){v||(v={});for(var ee=-1,K=h.length;++ee<K;){var he=h[ee],fe=void 0;rn(v,he,fe===void 0?l[he]:fe)}return v}function so(l,h){return Un(l,Ut(l),h)}function io(l){return Xi(l,zn,Ut)}function Or(l,h){var v=l.__data__;return uo(h)?v[typeof h=="string"?"string":"hash"]:v.map}function pt(l,h){var v=ge(l,h);return Ji(v)?v:void 0}var Ut=vr?At(vr,Object):ho,Ft=Yi;(tr&&Ft(new tr(new ArrayBuffer(1)))!=ie||Bt&&Ft(new Bt)!=f||Fe&&Ft(Fe.resolve())!=x||$t&&Ft(new $t)!=L||et&&Ft(new et)!=z)&&(Ft=function(l){var h=Qt.call(l),v=h==w?l.constructor:void 0,O=v?He(v):void 0;if(O)switch(O){case Mt:return ie;case Ot:return f;case wr:return x;case rr:return L;case Er:return z}return h});function oo(l){var h=l.length,v=l.constructor(h);return h&&typeof l[0]=="string"&&Qe.call(l,"index")&&(v.index=l.index,v.input=l.input),v}function _t(l){return typeof l.constructor=="function"&&!Rs(l)?Zi(Ue(l)):{}}function ao(l,h,v,O){var ee=l.constructor;switch(h){case H:return Mn(l);case a:case u:return new ee(+l);case ie:return Sr(l,O);case te:case oe:case be:case xe:case b:case N:case A:case R:case p:return ro(l,O);case f:return _s(l,O,v);case m:case P:return new ee(l);case T:return Cs(l);case L:return eo(l,O,v);case j:return to(l)}}function lo(l,h){return h=h??s,!!h&&(typeof l=="number"||k.test(l))&&l>-1&&l%1==0&&l<h}function uo(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function co(l){return!!Zr&&Zr in l}function Rs(l){var h=l&&l.constructor,v=typeof h=="function"&&h.prototype||ct;return l===v}function He(l){if(l!=null){try{return Jt.call(l)}catch{}try{return l+""}catch{}}return""}function qs(l){return $n(l,!0,!0)}function ks(l,h){return l===h||l!==l&&h!==h}function on(l){return fo(l)&&Qe.call(l,"callee")&&(!Yr.call(l,"callee")||Qt.call(l)==i)}var Fn=Array.isArray;function an(l){return l!=null&&Ps(l.length)&&!Hn(l)}function fo(l){return js(l)&&an(l)}var Is=er||go;function Hn(l){var h=Ct(l)?Qt.call(l):"";return h==d||h==g}function Ps(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=s}function Ct(l){var h=typeof l;return!!l&&(h=="object"||h=="function")}function js(l){return!!l&&typeof l=="object"}function zn(l){return an(l)?nr(l):Qi(l)}function ho(){return[]}function go(){return!1}n.exports=qs})(yn,yn.exports)),yn.exports}var vn={exports:{}};vn.exports;var Oa;function Na(){return Oa||(Oa=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",s=1,i=2,o=9007199254740991,a="[object Arguments]",u="[object Array]",c="[object AsyncFunction]",d="[object Boolean]",g="[object Date]",f="[object Error]",m="[object Function]",w="[object GeneratorFunction]",x="[object Map]",T="[object Number]",L="[object Null]",P="[object Object]",j="[object Promise]",z="[object Proxy]",H="[object RegExp]",ie="[object Set]",te="[object String]",oe="[object Symbol]",be="[object Undefined]",xe="[object WeakMap]",b="[object ArrayBuffer]",N="[object DataView]",A="[object Float32Array]",R="[object Float64Array]",p="[object Int8Array]",E="[object Int16Array]",S="[object Int32Array]",I="[object Uint8Array]",k="[object Uint8ClampedArray]",_="[object Uint16Array]",G="[object Uint32Array]",W=/[\\^$.*+?()[\]{}|]/g,Y=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,M={};M[A]=M[R]=M[p]=M[E]=M[S]=M[I]=M[k]=M[_]=M[G]=!0,M[a]=M[u]=M[b]=M[d]=M[N]=M[g]=M[f]=M[m]=M[x]=M[T]=M[P]=M[H]=M[ie]=M[te]=M[xe]=!1;var ve=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge,ye=typeof self=="object"&&self&&self.Object===Object&&self,Q=ve||ye||Function("return this")(),ae=e&&!e.nodeType&&e,le=ae&&!0&&n&&!n.nodeType&&n,ue=le&&le.exports===ae,de=ue&&ve.process,ge=(function(){try{return de&&de.binding&&de.binding("util")}catch{}})(),Oe=ge&&ge.isTypedArray;function Re(l,h){for(var v=-1,O=l==null?0:l.length,ee=0,K=[];++v<O;){var he=l[v];h(he,v,l)&&(K[ee++]=he)}return K}function At(l,h){for(var v=-1,O=h.length,ee=l.length;++v<O;)l[ee+v]=h[v];return l}function Tt(l,h){for(var v=-1,O=l==null?0:l.length;++v<O;)if(h(l[v],v,l))return!0;return!1}function Gr(l,h){for(var v=-1,O=Array(l);++v<l;)O[v]=h(v);return O}function Wr(l){return function(h){return l(h)}}function ct(l,h){return l.has(h)}function mr(l,h){return l==null?void 0:l[h]}function Zr(l){var h=-1,v=Array(l.size);return l.forEach(function(O,ee){v[++h]=[ee,O]}),v}function Jt(l,h){return function(v){return l(h(v))}}function Qe(l){var h=-1,v=Array(l.size);return l.forEach(function(O){v[++h]=O}),v}var Qt=Array.prototype,Xr=Function.prototype,St=Object.prototype,Dt=Q["__core-js_shared__"],br=Xr.toString,Ue=St.hasOwnProperty,yr=(function(){var l=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||"");return l?"Symbol(src)_1."+l:""})(),Yr=St.toString,jn=RegExp("^"+br.call(Ue).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vr=ue?Q.Buffer:void 0,er=Q.Symbol,Jr=Q.Uint8Array,tr=St.propertyIsEnumerable,Bt=Qt.splice,Fe=er?er.toStringTag:void 0,$t=Object.getOwnPropertySymbols,et=vr?vr.isBuffer:void 0,ft=Jt(Object.keys,Object),Mt=Ut(Q,"DataView"),Ot=Ut(Q,"Map"),wr=Ut(Q,"Promise"),rr=Ut(Q,"Set"),Er=Ut(Q,"WeakMap"),ht=Ut(Object,"create"),xr=He(Mt),dt=He(Ot),Dn=He(wr),Qr=He(rr),en=He(Er),tn=er?er.prototype:void 0,Ar=tn?tn.valueOf:void 0;function Le(l){var h=-1,v=l==null?0:l.length;for(this.clear();++h<v;){var O=l[h];this.set(O[0],O[1])}}function Bn(){this.__data__=ht?ht(null):{},this.size=0}function y(l){var h=this.has(l)&&delete this.__data__[l];return this.size-=h?1:0,h}function q(l){var h=this.__data__;if(ht){var v=h[l];return v===r?void 0:v}return Ue.call(h,l)?h[l]:void 0}function D(l){var h=this.__data__;return ht?h[l]!==void 0:Ue.call(h,l)}function Z(l,h){var v=this.__data__;return this.size+=this.has(l)?0:1,v[l]=ht&&h===void 0?r:h,this}Le.prototype.clear=Bn,Le.prototype.delete=y,Le.prototype.get=q,Le.prototype.has=D,Le.prototype.set=Z;function X(l){var h=-1,v=l==null?0:l.length;for(this.clear();++h<v;){var O=l[h];this.set(O[0],O[1])}}function pe(){this.__data__=[],this.size=0}function ne(l){var h=this.__data__,v=sn(h,l);if(v<0)return!1;var O=h.length-1;return v==O?h.pop():Bt.call(h,v,1),--this.size,!0}function re(l){var h=this.__data__,v=sn(h,l);return v<0?void 0:h[v][1]}function _e(l){return sn(this.__data__,l)>-1}function Ae(l,h){var v=this.__data__,O=sn(v,l);return O<0?(++this.size,v.push([l,h])):v[O][1]=h,this}X.prototype.clear=pe,X.prototype.delete=ne,X.prototype.get=re,X.prototype.has=_e,X.prototype.set=Ae;function ce(l){var h=-1,v=l==null?0:l.length;for(this.clear();++h<v;){var O=l[h];this.set(O[0],O[1])}}function Be(){this.size=0,this.__data__={hash:new Le,map:new(Ot||X),string:new Le}}function Nt(l){var h=pt(this,l).delete(l);return this.size-=h?1:0,h}function gt(l){return pt(this,l).get(l)}function qe(l){return pt(this,l).has(l)}function Tr(l,h){var v=pt(this,l),O=v.size;return v.set(l,h),this.size+=v.size==O?0:1,this}ce.prototype.clear=Be,ce.prototype.delete=Nt,ce.prototype.get=gt,ce.prototype.has=qe,ce.prototype.set=Tr;function nr(l){var h=-1,v=l==null?0:l.length;for(this.__data__=new ce;++h<v;)this.add(l[h])}function rn(l){return this.__data__.set(l,r),this}function nn(l){return this.__data__.has(l)}nr.prototype.add=nr.prototype.push=rn,nr.prototype.has=nn;function Lt(l){var h=this.__data__=new X(l);this.size=h.size}function $n(){this.__data__=new X,this.size=0}function Zi(l){var h=this.__data__,v=h.delete(l);return this.size=h.size,v}function Xi(l){return this.__data__.get(l)}function Yi(l){return this.__data__.has(l)}function Ji(l,h){var v=this.__data__;if(v instanceof X){var O=v.__data__;if(!Ot||O.length<t-1)return O.push([l,h]),this.size=++v.size,this;v=this.__data__=new ce(O)}return v.set(l,h),this.size=v.size,this}Lt.prototype.clear=$n,Lt.prototype.delete=Zi,Lt.prototype.get=Xi,Lt.prototype.has=Yi,Lt.prototype.set=Ji;function Qi(l,h){var v=on(l),O=!v&&ks(l),ee=!v&&!O&&an(l),K=!v&&!O&&!ee&&js(l),he=v||O||ee||K,fe=he?Gr(l.length,String):[],Ne=fe.length;for(var me in l)Ue.call(l,me)&&!(he&&(me=="length"||ee&&(me=="offset"||me=="parent")||K&&(me=="buffer"||me=="byteLength"||me=="byteOffset")||ao(me,Ne)))&&fe.push(me);return fe}function sn(l,h){for(var v=l.length;v--;)if(qs(l[v][0],h))return v;return-1}function Mn(l,h,v){var O=h(l);return on(l)?O:At(O,v(l))}function Sr(l){return l==null?l===void 0?be:L:Fe&&Fe in Object(l)?Ft(l):Rs(l)}function _s(l){return Ct(l)&&Sr(l)==a}function Cs(l,h,v,O,ee){return l===h?!0:l==null||h==null||!Ct(l)&&!Ct(h)?l!==l&&h!==h:eo(l,h,v,O,Cs,ee)}function eo(l,h,v,O,ee,K){var he=on(l),fe=on(h),Ne=he?u:_t(l),me=fe?u:_t(h);Ne=Ne==a?P:Ne,me=me==a?P:me;var $e=Ne==P,Ve=me==P,Ce=Ne==me;if(Ce&&an(l)){if(!an(h))return!1;he=!0,$e=!1}if(Ce&&!$e)return K||(K=new Lt),he||js(l)?Un(l,h,v,O,ee,K):so(l,h,Ne,v,O,ee,K);if(!(v&s)){var Me=$e&&Ue.call(l,"__wrapped__"),Ie=Ve&&Ue.call(h,"__wrapped__");if(Me||Ie){var sr=Me?l.value():l,Ht=Ie?h.value():h;return K||(K=new Lt),ee(sr,Ht,v,O,K)}}return Ce?(K||(K=new Lt),io(l,h,v,O,ee,K)):!1}function to(l){if(!Ps(l)||uo(l))return!1;var h=Is(l)?jn:Y;return h.test(He(l))}function ro(l){return Ct(l)&&Hn(l.length)&&!!M[Sr(l)]}function no(l){if(!co(l))return ft(l);var h=[];for(var v in Object(l))Ue.call(l,v)&&v!="constructor"&&h.push(v);return h}function Un(l,h,v,O,ee,K){var he=v&s,fe=l.length,Ne=h.length;if(fe!=Ne&&!(he&&Ne>fe))return!1;var me=K.get(l);if(me&&K.get(h))return me==h;var $e=-1,Ve=!0,Ce=v&i?new nr:void 0;for(K.set(l,h),K.set(h,l);++$e<fe;){var Me=l[$e],Ie=h[$e];if(O)var sr=he?O(Ie,Me,$e,h,l,K):O(Me,Ie,$e,l,h,K);if(sr!==void 0){if(sr)continue;Ve=!1;break}if(Ce){if(!Tt(h,function(Ht,Nr){if(!ct(Ce,Nr)&&(Me===Ht||ee(Me,Ht,v,O,K)))return Ce.push(Nr)})){Ve=!1;break}}else if(!(Me===Ie||ee(Me,Ie,v,O,K))){Ve=!1;break}}return K.delete(l),K.delete(h),Ve}function so(l,h,v,O,ee,K,he){switch(v){case N:if(l.byteLength!=h.byteLength||l.byteOffset!=h.byteOffset)return!1;l=l.buffer,h=h.buffer;case b:return!(l.byteLength!=h.byteLength||!K(new Jr(l),new Jr(h)));case d:case g:case T:return qs(+l,+h);case f:return l.name==h.name&&l.message==h.message;case H:case te:return l==h+"";case x:var fe=Zr;case ie:var Ne=O&s;if(fe||(fe=Qe),l.size!=h.size&&!Ne)return!1;var me=he.get(l);if(me)return me==h;O|=i,he.set(l,h);var $e=Un(fe(l),fe(h),O,ee,K,he);return he.delete(l),$e;case oe:if(Ar)return Ar.call(l)==Ar.call(h)}return!1}function io(l,h,v,O,ee,K){var he=v&s,fe=Or(l),Ne=fe.length,me=Or(h),$e=me.length;if(Ne!=$e&&!he)return!1;for(var Ve=Ne;Ve--;){var Ce=fe[Ve];if(!(he?Ce in h:Ue.call(h,Ce)))return!1}var Me=K.get(l);if(Me&&K.get(h))return Me==h;var Ie=!0;K.set(l,h),K.set(h,l);for(var sr=he;++Ve<Ne;){Ce=fe[Ve];var Ht=l[Ce],Nr=h[Ce];if(O)var Tu=he?O(Nr,Ht,Ce,h,l,K):O(Ht,Nr,Ce,l,h,K);if(!(Tu===void 0?Ht===Nr||ee(Ht,Nr,v,O,K):Tu)){Ie=!1;break}sr||(sr=Ce=="constructor")}if(Ie&&!sr){var Ds=l.constructor,Bs=h.constructor;Ds!=Bs&&"constructor"in l&&"constructor"in h&&!(typeof Ds=="function"&&Ds instanceof Ds&&typeof Bs=="function"&&Bs instanceof Bs)&&(Ie=!1)}return K.delete(l),K.delete(h),Ie}function Or(l){return Mn(l,zn,oo)}function pt(l,h){var v=l.__data__;return lo(h)?v[typeof h=="string"?"string":"hash"]:v.map}function Ut(l,h){var v=mr(l,h);return to(v)?v:void 0}function Ft(l){var h=Ue.call(l,Fe),v=l[Fe];try{l[Fe]=void 0;var O=!0}catch{}var ee=Yr.call(l);return O&&(h?l[Fe]=v:delete l[Fe]),ee}var oo=$t?function(l){return l==null?[]:(l=Object(l),Re($t(l),function(h){return tr.call(l,h)}))}:ho,_t=Sr;(Mt&&_t(new Mt(new ArrayBuffer(1)))!=N||Ot&&_t(new Ot)!=x||wr&&_t(wr.resolve())!=j||rr&&_t(new rr)!=ie||Er&&_t(new Er)!=xe)&&(_t=function(l){var h=Sr(l),v=h==P?l.constructor:void 0,O=v?He(v):"";if(O)switch(O){case xr:return N;case dt:return x;case Dn:return j;case Qr:return ie;case en:return xe}return h});function ao(l,h){return h=h??o,!!h&&(typeof l=="number"||V.test(l))&&l>-1&&l%1==0&&l<h}function lo(l){var h=typeof l;return h=="string"||h=="number"||h=="symbol"||h=="boolean"?l!=="__proto__":l===null}function uo(l){return!!yr&&yr in l}function co(l){var h=l&&l.constructor,v=typeof h=="function"&&h.prototype||St;return l===v}function Rs(l){return Yr.call(l)}function He(l){if(l!=null){try{return br.call(l)}catch{}try{return l+""}catch{}}return""}function qs(l,h){return l===h||l!==l&&h!==h}var ks=_s((function(){return arguments})())?_s:function(l){return Ct(l)&&Ue.call(l,"callee")&&!tr.call(l,"callee")},on=Array.isArray;function Fn(l){return l!=null&&Hn(l.length)&&!Is(l)}var an=et||go;function fo(l,h){return Cs(l,h)}function Is(l){if(!Ps(l))return!1;var h=Sr(l);return h==m||h==w||h==c||h==z}function Hn(l){return typeof l=="number"&&l>-1&&l%1==0&&l<=o}function Ps(l){var h=typeof l;return l!=null&&(h=="object"||h=="function")}function Ct(l){return l!=null&&typeof l=="object"}var js=Oe?Wr(Oe):ro;function zn(l){return Fn(l)?Qi(l):no(l)}function ho(){return[]}function go(){return!1}n.exports=fo})(vn,vn.exports)),vn.exports}var ss={},La;function og(){if(La)return ss;La=1,Object.defineProperty(ss,"__esModule",{value:!0});const n=Sa(),e=Na();var t;return(function(r){function s(u={},c={},d=!1){typeof u!="object"&&(u={}),typeof c!="object"&&(c={});let g=n(c);d||(g=Object.keys(g).reduce((f,m)=>(g[m]!=null&&(f[m]=g[m]),f),{}));for(const f in u)u[f]!==void 0&&c[f]===void 0&&(g[f]=u[f]);return Object.keys(g).length>0?g:void 0}r.compose=s;function i(u={},c={}){typeof u!="object"&&(u={}),typeof c!="object"&&(c={});const d=Object.keys(u).concat(Object.keys(c)).reduce((g,f)=>(e(u[f],c[f])||(g[f]=c[f]===void 0?null:c[f]),g),{});return Object.keys(d).length>0?d:void 0}r.diff=i;function o(u={},c={}){u=u||{};const d=Object.keys(c).reduce((g,f)=>(c[f]!==u[f]&&u[f]!==void 0&&(g[f]=c[f]),g),{});return Object.keys(u).reduce((g,f)=>(u[f]!==c[f]&&c[f]===void 0&&(g[f]=null),g),d)}r.invert=o;function a(u,c,d=!1){if(typeof u!="object")return c;if(typeof c!="object")return;if(!d)return c;const g=Object.keys(c).reduce((f,m)=>(u[m]===void 0&&(f[m]=c[m]),f),{});return Object.keys(g).length>0?g:void 0}r.transform=a})(t||(t={})),ss.default=t,ss}var is={},_a;function Ca(){if(_a)return is;_a=1,Object.defineProperty(is,"__esModule",{value:!0});var n;return(function(e){function t(r){return typeof r.delete=="number"?r.delete:typeof r.retain=="number"?r.retain:typeof r.retain=="object"&&r.retain!==null?1:typeof r.insert=="string"?r.insert.length:1}e.length=t})(n||(n={})),is.default=n,is}var os={},Ra;function ag(){if(Ra)return os;Ra=1,Object.defineProperty(os,"__esModule",{value:!0});const n=Ca();class e{constructor(r){this.ops=r,this.index=0,this.offset=0}hasNext(){return this.peekLength()<1/0}next(r){r||(r=1/0);const s=this.ops[this.index];if(s){const i=this.offset,o=n.default.length(s);if(r>=o-i?(r=o-i,this.index+=1,this.offset=0):this.offset+=r,typeof s.delete=="number")return{delete:r};{const a={};return s.attributes&&(a.attributes=s.attributes),typeof s.retain=="number"?a.retain=r:typeof s.retain=="object"&&s.retain!==null?a.retain=s.retain:typeof s.insert=="string"?a.insert=s.insert.substr(i,r):a.insert=s.insert,a}}else return{retain:1/0}}peek(){return this.ops[this.index]}peekLength(){return this.ops[this.index]?n.default.length(this.ops[this.index])-this.offset:1/0}peekType(){const r=this.ops[this.index];return r?typeof r.delete=="number"?"delete":typeof r.retain=="number"||typeof r.retain=="object"&&r.retain!==null?"retain":"insert":"retain"}rest(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);{const r=this.offset,s=this.index,i=this.next(),o=this.ops.slice(this.index);return this.offset=r,this.index=s,[i].concat(o)}}else return[]}}return os.default=e,os}var qa;function lg(){return qa||(qa=1,(function(n,e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeMap=e.OpIterator=e.Op=void 0;const t=ig(),r=Sa(),s=Na(),i=og();e.AttributeMap=i.default;const o=Ca();e.Op=o.default;const a=ag();e.OpIterator=a.default;const u="\0",c=(g,f)=>{if(typeof g!="object"||g===null)throw new Error(`cannot retain a ${typeof g}`);if(typeof f!="object"||f===null)throw new Error(`cannot retain a ${typeof f}`);const m=Object.keys(g)[0];if(!m||m!==Object.keys(f)[0])throw new Error(`embed types not matched: ${m} != ${Object.keys(f)[0]}`);return[m,g[m],f[m]]};class d{constructor(f){Array.isArray(f)?this.ops=f:f!=null&&Array.isArray(f.ops)?this.ops=f.ops:this.ops=[]}static registerEmbed(f,m){this.handlers[f]=m}static unregisterEmbed(f){delete this.handlers[f]}static getHandler(f){const m=this.handlers[f];if(!m)throw new Error(`no handlers for embed type "${f}"`);return m}insert(f,m){const w={};return typeof f=="string"&&f.length===0?this:(w.insert=f,m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(w.attributes=m),this.push(w))}delete(f){return f<=0?this:this.push({delete:f})}retain(f,m){if(typeof f=="number"&&f<=0)return this;const w={retain:f};return m!=null&&typeof m=="object"&&Object.keys(m).length>0&&(w.attributes=m),this.push(w)}push(f){let m=this.ops.length,w=this.ops[m-1];if(f=r(f),typeof w=="object"){if(typeof f.delete=="number"&&typeof w.delete=="number")return this.ops[m-1]={delete:w.delete+f.delete},this;if(typeof w.delete=="number"&&f.insert!=null&&(m-=1,w=this.ops[m-1],typeof w!="object"))return this.ops.unshift(f),this;if(s(f.attributes,w.attributes)){if(typeof f.insert=="string"&&typeof w.insert=="string")return this.ops[m-1]={insert:w.insert+f.insert},typeof f.attributes=="object"&&(this.ops[m-1].attributes=f.attributes),this;if(typeof f.retain=="number"&&typeof w.retain=="number")return this.ops[m-1]={retain:w.retain+f.retain},typeof f.attributes=="object"&&(this.ops[m-1].attributes=f.attributes),this}}return m===this.ops.length?this.ops.push(f):this.ops.splice(m,0,f),this}chop(){const f=this.ops[this.ops.length-1];return f&&typeof f.retain=="number"&&!f.attributes&&this.ops.pop(),this}filter(f){return this.ops.filter(f)}forEach(f){this.ops.forEach(f)}map(f){return this.ops.map(f)}partition(f){const m=[],w=[];return this.forEach(x=>{(f(x)?m:w).push(x)}),[m,w]}reduce(f,m){return this.ops.reduce(f,m)}changeLength(){return this.reduce((f,m)=>m.insert?f+o.default.length(m):m.delete?f-m.delete:f,0)}length(){return this.reduce((f,m)=>f+o.default.length(m),0)}slice(f=0,m=1/0){const w=[],x=new a.default(this.ops);let T=0;for(;T<m&&x.hasNext();){let L;T<f?L=x.next(f-T):(L=x.next(m-T),w.push(L)),T+=o.default.length(L)}return new d(w)}compose(f){const m=new a.default(this.ops),w=new a.default(f.ops),x=[],T=w.peek();if(T!=null&&typeof T.retain=="number"&&T.attributes==null){let P=T.retain;for(;m.peekType()==="insert"&&m.peekLength()<=P;)P-=m.peekLength(),x.push(m.next());T.retain-P>0&&w.next(T.retain-P)}const L=new d(x);for(;m.hasNext()||w.hasNext();)if(w.peekType()==="insert")L.push(w.next());else if(m.peekType()==="delete")L.push(m.next());else{const P=Math.min(m.peekLength(),w.peekLength()),j=m.next(P),z=w.next(P);if(z.retain){const H={};if(typeof j.retain=="number")H.retain=typeof z.retain=="number"?P:z.retain;else if(typeof z.retain=="number")j.retain==null?H.insert=j.insert:H.retain=j.retain;else{const te=j.retain==null?"insert":"retain",[oe,be,xe]=c(j[te],z.retain),b=d.getHandler(oe);H[te]={[oe]:b.compose(be,xe,te==="retain")}}const ie=i.default.compose(j.attributes,z.attributes,typeof j.retain=="number");if(ie&&(H.attributes=ie),L.push(H),!w.hasNext()&&s(L.ops[L.ops.length-1],H)){const te=new d(m.rest());return L.concat(te).chop()}}else typeof z.delete=="number"&&(typeof j.retain=="number"||typeof j.retain=="object"&&j.retain!==null)&&L.push(z)}return L.chop()}concat(f){const m=new d(this.ops.slice());return f.ops.length>0&&(m.push(f.ops[0]),m.ops=m.ops.concat(f.ops.slice(1))),m}diff(f,m){if(this.ops===f.ops)return new d;const w=[this,f].map(j=>j.map(z=>{if(z.insert!=null)return typeof z.insert=="string"?z.insert:u;const H=j===f?"on":"with";throw new Error("diff() called "+H+" non-document")}).join("")),x=new d,T=t(w[0],w[1],m,!0),L=new a.default(this.ops),P=new a.default(f.ops);return T.forEach(j=>{let z=j[1].length;for(;z>0;){let H=0;switch(j[0]){case t.INSERT:H=Math.min(P.peekLength(),z),x.push(P.next(H));break;case t.DELETE:H=Math.min(z,L.peekLength()),L.next(H),x.delete(H);break;case t.EQUAL:H=Math.min(L.peekLength(),P.peekLength(),z);const ie=L.next(H),te=P.next(H);s(ie.insert,te.insert)?x.retain(H,i.default.diff(ie.attributes,te.attributes)):x.push(te).delete(H);break}z-=H}}),x.chop()}eachLine(f,m=`
31
- `){const w=new a.default(this.ops);let x=new d,T=0;for(;w.hasNext();){if(w.peekType()!=="insert")return;const L=w.peek(),P=o.default.length(L)-w.peekLength(),j=typeof L.insert=="string"?L.insert.indexOf(m,P)-P:-1;if(j<0)x.push(w.next());else if(j>0)x.push(w.next(j));else{if(f(x,w.next(1).attributes||{},T)===!1)return;T+=1,x=new d}}x.length()>0&&f(x,{},T)}invert(f){const m=new d;return this.reduce((w,x)=>{if(x.insert)m.delete(o.default.length(x));else{if(typeof x.retain=="number"&&x.attributes==null)return m.retain(x.retain),w+x.retain;if(x.delete||typeof x.retain=="number"){const T=x.delete||x.retain;return f.slice(w,w+T).forEach(P=>{x.delete?m.push(P):x.retain&&x.attributes&&m.retain(o.default.length(P),i.default.invert(x.attributes,P.attributes))}),w+T}else if(typeof x.retain=="object"&&x.retain!==null){const T=f.slice(w,w+1),L=new a.default(T.ops).next(),[P,j,z]=c(x.retain,L.insert),H=d.getHandler(P);return m.retain({[P]:H.invert(j,z)},i.default.invert(x.attributes,L.attributes)),w+1}}return w},0),m.chop()}transform(f,m=!1){if(m=!!m,typeof f=="number")return this.transformPosition(f,m);const w=f,x=new a.default(this.ops),T=new a.default(w.ops),L=new d;for(;x.hasNext()||T.hasNext();)if(x.peekType()==="insert"&&(m||T.peekType()!=="insert"))L.retain(o.default.length(x.next()));else if(T.peekType()==="insert")L.push(T.next());else{const P=Math.min(x.peekLength(),T.peekLength()),j=x.next(P),z=T.next(P);if(j.delete)continue;if(z.delete)L.push(z);else{const H=j.retain,ie=z.retain;let te=typeof ie=="object"&&ie!==null?ie:P;if(typeof H=="object"&&H!==null&&typeof ie=="object"&&ie!==null){const oe=Object.keys(H)[0];if(oe===Object.keys(ie)[0]){const be=d.getHandler(oe);be&&(te={[oe]:be.transform(H[oe],ie[oe],m)})}}L.retain(te,i.default.transform(j.attributes,z.attributes,m))}}return L.chop()}transformPosition(f,m=!1){m=!!m;const w=new a.default(this.ops);let x=0;for(;w.hasNext()&&x<=f;){const T=w.peekLength(),L=w.peekType();if(w.next(),L==="delete"){f-=Math.min(T,f-x);continue}else L==="insert"&&(x<f||!m)&&(f+=T);x+=T}return f}}d.Op=o.default,d.OpIterator=a.default,d.AttributeMap=i.default,d.handlers={},e.default=d,n.exports=d,n.exports.default=d})(ns,ns.exports)),ns.exports}var We=lg();const U=Ms(We);class st extends Ke{static value(){}optimize(){(this.prev||this.next)&&this.remove()}length(){return 0}value(){return""}}st.blotName="break",st.tagName="BR";let it=class extends rs{};const ug={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function as(n){return n.replace(/[&<>"']/g,e=>ug[e])}const xt=class xt extends oi{static compare(e,t){const r=xt.order.indexOf(e),s=xt.order.indexOf(t);return r>=0||s>=0?r-s:e===t?0:e<t?-1:1}formatAt(e,t,r,s){if(xt.compare(this.statics.blotName,r)<0&&this.scroll.query(r,F.BLOT)){const i=this.isolate(e,t);s&&i.wrap(r,s)}else super.formatAt(e,t,r,s)}optimize(e){if(super.optimize(e),this.parent instanceof xt&&xt.compare(this.statics.blotName,this.parent.statics.blotName)>0){const t=this.parent.isolate(this.offset(),this.length());this.moveChildren(t),t.wrap(this)}}};B(xt,"allowedChildren",[xt,st,Ke,it]),B(xt,"order",["cursor","inline","link","underline","strike","italic","bold","script","code"]);let vt=xt;const ka=1;class ke extends bn{constructor(){super(...arguments);B(this,"cache",{})}delta(){return this.cache.delta==null&&(this.cache.delta=Ia(this)),this.cache.delta}deleteAt(t,r){super.deleteAt(t,r),this.cache={}}formatAt(t,r,s,i){r<=0||(this.scroll.query(s,F.BLOCK)?t+r===this.length()&&this.format(s,i):super.formatAt(t,Math.min(r,this.length()-t-1),s,i),this.cache={})}insertAt(t,r,s){if(s!=null){super.insertAt(t,r,s),this.cache={};return}if(r.length===0)return;const i=r.split(`
32
- `),o=i.shift();o.length>0&&(t<this.length()-1||this.children.tail==null?super.insertAt(Math.min(t,this.length()-1),o):this.children.tail.insertAt(this.children.tail.length(),o),this.cache={});let a=this;i.reduce((u,c)=>(a=a.split(u,!0),a.insertAt(0,c),c.length),t+o.length)}insertBefore(t,r){const{head:s}=this.children;super.insertBefore(t,r),s instanceof st&&s.remove(),this.cache={}}length(){return this.cache.length==null&&(this.cache.length=super.length()+ka),this.cache.length}moveChildren(t,r){super.moveChildren(t,r),this.cache={}}optimize(t){super.optimize(t),this.cache={}}path(t){return super.path(t,!0)}removeChild(t){super.removeChild(t),this.cache={}}split(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(r&&(t===0||t>=this.length()-ka)){const i=this.clone();return t===0?(this.parent.insertBefore(i,this),this):(this.parent.insertBefore(i,this.next),i)}const s=super.split(t,r);return this.cache={},s}}ke.blotName="block",ke.tagName="P",ke.defaultChild=st,ke.allowedChildren=[st,vt,Ke,it];class Ze extends Ke{attach(){super.attach(),this.attributes=new es(this.domNode)}delta(){return new U().insert(this.value(),{...this.formats(),...this.attributes.values()})}format(e,t){const r=this.scroll.query(e,F.BLOCK_ATTRIBUTE);r!=null&&this.attributes.attribute(r,t)}formatAt(e,t,r,s){this.format(r,s)}insertAt(e,t,r){if(r!=null){super.insertAt(e,t,r);return}const s=t.split(`
33
- `),i=s.pop(),o=s.map(u=>{const c=this.scroll.create(ke.blotName);return c.insertAt(0,u),c}),a=this.split(e);o.forEach(u=>{this.parent.insertBefore(u,a)}),i&&this.parent.insertBefore(this.scroll.create("text",i),a)}}Ze.scope=F.BLOCK_BLOT;function Ia(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n.descendants(Pe).reduce((t,r)=>r.length()===0?t:t.insert(r.value(),Xe(r,{},e)),new U).insert(`
34
- `,Xe(n))}function Xe(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return n==null||("formats"in n&&typeof n.formats=="function"&&(e={...e,...n.formats()},t&&delete e["code-token"]),n.parent==null||n.parent.statics.blotName==="scroll"||n.parent.statics.scope!==n.statics.scope)?e:Xe(n.parent,e,t)}const Je=class Je extends Ke{static value(){}constructor(e,t,r){super(e,t),this.selection=r,this.textNode=document.createTextNode(Je.CONTENTS),this.domNode.appendChild(this.textNode),this.savedLength=0}detach(){this.parent!=null&&this.parent.removeChild(this)}format(e,t){if(this.savedLength!==0){super.format(e,t);return}let r=this,s=0;for(;r!=null&&r.statics.scope!==F.BLOCK_BLOT;)s+=r.offset(r.parent),r=r.parent;r!=null&&(this.savedLength=Je.CONTENTS.length,r.optimize(),r.formatAt(s,Je.CONTENTS.length,e,t),this.savedLength=0)}index(e,t){return e===this.textNode?0:super.index(e,t)}length(){return this.savedLength}position(){return[this.textNode,this.textNode.data.length]}remove(){super.remove(),this.parent=null}restore(){if(this.selection.composing||this.parent==null)return null;const e=this.selection.getNativeRange();for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);const t=this.prev instanceof it?this.prev:null,r=t?t.length():0,s=this.next instanceof it?this.next:null,i=s?s.text:"",{textNode:o}=this,a=o.data.split(Je.CONTENTS).join("");o.data=Je.CONTENTS;let u;if(t)u=t,(a||s)&&(t.insertAt(t.length(),a+i),s&&s.remove());else if(s)u=s,s.insertAt(0,a);else{const c=document.createTextNode(a);u=this.scroll.create(c),this.parent.insertBefore(u,this)}if(this.remove(),e){const c=(f,m)=>t&&f===t.domNode?m:f===o?r+m-1:s&&f===s.domNode?r+a.length+m:null,d=c(e.start.node,e.start.offset),g=c(e.end.node,e.end.offset);if(d!==null&&g!==null)return{startNode:u.domNode,startOffset:d,endNode:u.domNode,endOffset:g}}return null}update(e,t){if(e.some(r=>r.type==="characterData"&&r.target===this.textNode)){const r=this.restore();r&&(t.range=r)}}optimize(e){super.optimize(e);let{parent:t}=this;for(;t;){if(t.domNode.tagName==="A"){this.savedLength=Je.CONTENTS.length,t.isolate(this.offset(t),this.length()).unwrap(),this.savedLength=0;break}t=t.parent}}value(){return""}};B(Je,"blotName","cursor"),B(Je,"className","ql-cursor"),B(Je,"tagName","span"),B(Je,"CONTENTS","\uFEFF");let jr=Je;var fi={exports:{}},Pa;function cg(){return Pa||(Pa=1,(function(n){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function s(u,c,d){this.fn=u,this.context=c,this.once=d||!1}function i(u,c,d,g,f){if(typeof d!="function")throw new TypeError("The listener must be a function");var m=new s(d,g||u,f),w=t?t+c:c;return u._events[w]?u._events[w].fn?u._events[w]=[u._events[w],m]:u._events[w].push(m):(u._events[w]=m,u._eventsCount++),u}function o(u,c){--u._eventsCount===0?u._events=new r:delete u._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],d,g;if(this._eventsCount===0)return c;for(g in d=this._events)e.call(d,g)&&c.push(t?g.slice(1):g);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},a.prototype.listeners=function(c){var d=t?t+c:c,g=this._events[d];if(!g)return[];if(g.fn)return[g.fn];for(var f=0,m=g.length,w=new Array(m);f<m;f++)w[f]=g[f].fn;return w},a.prototype.listenerCount=function(c){var d=t?t+c:c,g=this._events[d];return g?g.fn?1:g.length:0},a.prototype.emit=function(c,d,g,f,m,w){var x=t?t+c:c;if(!this._events[x])return!1;var T=this._events[x],L=arguments.length,P,j;if(T.fn){switch(T.once&&this.removeListener(c,T.fn,void 0,!0),L){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,d),!0;case 3:return T.fn.call(T.context,d,g),!0;case 4:return T.fn.call(T.context,d,g,f),!0;case 5:return T.fn.call(T.context,d,g,f,m),!0;case 6:return T.fn.call(T.context,d,g,f,m,w),!0}for(j=1,P=new Array(L-1);j<L;j++)P[j-1]=arguments[j];T.fn.apply(T.context,P)}else{var z=T.length,H;for(j=0;j<z;j++)switch(T[j].once&&this.removeListener(c,T[j].fn,void 0,!0),L){case 1:T[j].fn.call(T[j].context);break;case 2:T[j].fn.call(T[j].context,d);break;case 3:T[j].fn.call(T[j].context,d,g);break;case 4:T[j].fn.call(T[j].context,d,g,f);break;default:if(!P)for(H=1,P=new Array(L-1);H<L;H++)P[H-1]=arguments[H];T[j].fn.apply(T[j].context,P)}}return!0},a.prototype.on=function(c,d,g){return i(this,c,d,g,!1)},a.prototype.once=function(c,d,g){return i(this,c,d,g,!0)},a.prototype.removeListener=function(c,d,g,f){var m=t?t+c:c;if(!this._events[m])return this;if(!d)return o(this,m),this;var w=this._events[m];if(w.fn)w.fn===d&&(!f||w.once)&&(!g||w.context===g)&&o(this,m);else{for(var x=0,T=[],L=w.length;x<L;x++)(w[x].fn!==d||f&&!w[x].once||g&&w[x].context!==g)&&T.push(w[x]);T.length?this._events[m]=T.length===1?T[0]:T:o(this,m)}return this},a.prototype.removeAllListeners=function(c){var d;return c?(d=t?t+c:c,this._events[d]&&o(this,d)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,n.exports=a})(fi)),fi.exports}var fg=cg();const hg=Ms(fg),hi=new WeakMap,di=["error","warn","log","info"];let gi="warn";function ja(n){if(gi&&di.indexOf(n)<=di.indexOf(gi)){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];console[n](...t)}}function kt(n){return di.reduce((e,t)=>(e[t]=ja.bind(console,t,n),e),{})}kt.level=n=>{gi=n},ja.level=kt.level;const pi=kt("quill:events");["selectionchange","mousedown","mouseup","click"].forEach(n=>{document.addEventListener(n,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];Array.from(document.querySelectorAll(".ql-container")).forEach(s=>{const i=hi.get(s);i&&i.emitter&&i.emitter.handleDOM(...t)})})});class $ extends hg{constructor(){super(),this.domListeners={},this.on("error",pi.error)}emit(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return pi.log.call(pi,...t),super.emit(...t)}handleDOM(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];(this.domListeners[e.type]||[]).forEach(i=>{let{node:o,handler:a}=i;(e.target===o||o.contains(e.target))&&a(e,...r)})}listenDOM(e,t,r){this.domListeners[e]||(this.domListeners[e]=[]),this.domListeners[e].push({node:t,handler:r})}}B($,"events",{EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_BLOT_MOUNT:"scroll-blot-mount",SCROLL_BLOT_UNMOUNT:"scroll-blot-unmount",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SCROLL_EMBED_UPDATE:"scroll-embed-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change",COMPOSITION_BEFORE_START:"composition-before-start",COMPOSITION_START:"composition-start",COMPOSITION_BEFORE_END:"composition-before-end",COMPOSITION_END:"composition-end"}),B($,"sources",{API:"api",SILENT:"silent",USER:"user"});const mi=kt("quill:selection");class fr{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;this.index=e,this.length=t}}class dg{constructor(e,t){this.emitter=t,this.scroll=e,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=this.scroll.create("cursor",this),this.savedRange=new fr(0,0),this.lastRange=this.savedRange,this.lastNative=null,this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,()=>{!this.mouseDown&&!this.composing&&setTimeout(this.update.bind(this,$.sources.USER),1)}),this.emitter.on($.events.SCROLL_BEFORE_UPDATE,()=>{if(!this.hasFocus())return;const r=this.getNativeRange();r!=null&&r.start.node!==this.cursor.textNode&&this.emitter.once($.events.SCROLL_UPDATE,(s,i)=>{try{this.root.contains(r.start.node)&&this.root.contains(r.end.node)&&this.setNativeRange(r.start.node,r.start.offset,r.end.node,r.end.offset);const o=i.some(a=>a.type==="characterData"||a.type==="childList"||a.type==="attributes"&&a.target===this.root);this.update(o?$.sources.SILENT:s)}catch{}})}),this.emitter.on($.events.SCROLL_OPTIMIZE,(r,s)=>{if(s.range){const{startNode:i,startOffset:o,endNode:a,endOffset:u}=s.range;this.setNativeRange(i,o,a,u),this.update($.sources.SILENT)}}),this.update($.sources.SILENT)}handleComposition(){this.emitter.on($.events.COMPOSITION_BEFORE_START,()=>{this.composing=!0}),this.emitter.on($.events.COMPOSITION_END,()=>{if(this.composing=!1,this.cursor.parent){const e=this.cursor.restore();if(!e)return;setTimeout(()=>{this.setNativeRange(e.startNode,e.startOffset,e.endNode,e.endOffset)},1)}})}handleDragging(){this.emitter.listenDOM("mousedown",document.body,()=>{this.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,()=>{this.mouseDown=!1,this.update($.sources.USER)})}focus(){this.hasFocus()||(this.root.focus({preventScroll:!0}),this.setRange(this.savedRange))}format(e,t){this.scroll.update();const r=this.getNativeRange();if(!(r==null||!r.native.collapsed||this.scroll.query(e,F.BLOCK))){if(r.start.node!==this.cursor.textNode){const s=this.scroll.find(r.start.node,!1);if(s==null)return;if(s instanceof Pe){const i=s.split(r.start.offset);s.parent.insertBefore(this.cursor,i)}else s.insertBefore(this.cursor,r.start.node);this.cursor.attach()}this.cursor.format(e,t),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;const r=this.scroll.length();e=Math.min(e,r-1),t=Math.min(e+t,r-1)-e;let s,[i,o]=this.scroll.leaf(e);if(i==null)return null;if(t>0&&o===i.length()){const[d]=this.scroll.leaf(e+1);if(d){const[g]=this.scroll.line(e),[f]=this.scroll.line(e+1);g===f&&(i=d,o=0)}}[s,o]=i.position(o,!0);const a=document.createRange();if(t>0)return a.setStart(s,o),[i,o]=this.scroll.leaf(e+t),i==null?null:([s,o]=i.position(o,!0),a.setEnd(s,o),a.getBoundingClientRect());let u="left",c;if(s instanceof Text){if(!s.data.length)return null;o<s.data.length?(a.setStart(s,o),a.setEnd(s,o+1)):(a.setStart(s,o-1),a.setEnd(s,o),u="right"),c=a.getBoundingClientRect()}else{if(!(i.domNode instanceof Element))return null;c=i.domNode.getBoundingClientRect(),o>0&&(u="right")}return{bottom:c.top+c.height,height:c.height,left:c[u],right:c[u],top:c.top,width:0}}getNativeRange(){const e=document.getSelection();if(e==null||e.rangeCount<=0)return null;const t=e.getRangeAt(0);if(t==null)return null;const r=this.normalizeNative(t);return mi.info("getNativeRange",r),r}getRange(){const e=this.scroll.domNode;if("isConnected"in e&&!e.isConnected)return[null,null];const t=this.getNativeRange();return t==null?[null,null]:[this.normalizedToRange(t),t]}hasFocus(){return document.activeElement===this.root||document.activeElement!=null&&bi(this.root,document.activeElement)}normalizedToRange(e){const t=[[e.start.node,e.start.offset]];e.native.collapsed||t.push([e.end.node,e.end.offset]);const r=t.map(o=>{const[a,u]=o,c=this.scroll.find(a,!0),d=c.offset(this.scroll);return u===0?d:c instanceof Pe?d+c.index(a,u):d+c.length()}),s=Math.min(Math.max(...r),this.scroll.length()-1),i=Math.min(s,...r);return new fr(i,s-i)}normalizeNative(e){if(!bi(this.root,e.startContainer)||!e.collapsed&&!bi(this.root,e.endContainer))return null;const t={start:{node:e.startContainer,offset:e.startOffset},end:{node:e.endContainer,offset:e.endOffset},native:e};return[t.start,t.end].forEach(r=>{let{node:s,offset:i}=r;for(;!(s instanceof Text)&&s.childNodes.length>0;)if(s.childNodes.length>i)s=s.childNodes[i],i=0;else if(s.childNodes.length===i)s=s.lastChild,s instanceof Text?i=s.data.length:s.childNodes.length>0?i=s.childNodes.length:i=s.childNodes.length+1;else break;r.node=s,r.offset=i}),t}rangeToNative(e){const t=this.scroll.length(),r=(s,i)=>{s=Math.min(t-1,s);const[o,a]=this.scroll.leaf(s);return o?o.position(a,i):[null,-1]};return[...r(e.index,!1),...r(e.index+e.length,!0)]}setNativeRange(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(mi.info("setNativeRange",e,t,r,s),e!=null&&(this.root.parentNode==null||e.parentNode==null||r.parentNode==null))return;const o=document.getSelection();if(o!=null)if(e!=null){this.hasFocus()||this.root.focus({preventScroll:!0});const{native:a}=this.getNativeRange()||{};if(a==null||i||e!==a.startContainer||t!==a.startOffset||r!==a.endContainer||s!==a.endOffset){e instanceof Element&&e.tagName==="BR"&&(t=Array.from(e.parentNode.childNodes).indexOf(e),e=e.parentNode),r instanceof Element&&r.tagName==="BR"&&(s=Array.from(r.parentNode.childNodes).indexOf(r),r=r.parentNode);const u=document.createRange();u.setStart(e,t),u.setEnd(r,s),o.removeAllRanges(),o.addRange(u)}}else o.removeAllRanges(),this.root.blur()}setRange(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$.sources.API;if(typeof t=="string"&&(r=t,t=!1),mi.info("setRange",e),e!=null){const s=this.rangeToNative(e);this.setNativeRange(...s,t)}else this.setNativeRange(null);this.update(r)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$.sources.USER;const t=this.lastRange,[r,s]=this.getRange();if(this.lastRange=r,this.lastNative=s,this.lastRange!=null&&(this.savedRange=this.lastRange),!si(t,this.lastRange)){if(!this.composing&&s!=null&&s.native.collapsed&&s.start.node!==this.cursor.textNode){const o=this.cursor.restore();o&&this.setNativeRange(o.startNode,o.startOffset,o.endNode,o.endOffset)}const i=[$.events.SELECTION_CHANGE,Cr(this.lastRange),Cr(t),e];this.emitter.emit($.events.EDITOR_CHANGE,...i),e!==$.sources.SILENT&&this.emitter.emit(...i)}}}function bi(n,e){try{e.parentNode}catch{return!1}return n.contains(e)}const gg=/^[ -~]*$/;let pg=class{constructor(e){this.scroll=e,this.delta=this.getDelta()}applyDelta(e){this.scroll.update();let t=this.scroll.length();this.scroll.batchStart();const r=Da(e),s=new U;return bg(r.ops.slice()).reduce((o,a)=>{const u=We.Op.length(a);let c=a.attributes||{},d=!1,g=!1;if(a.insert!=null){if(s.retain(u),typeof a.insert=="string"){const w=a.insert;g=!w.endsWith(`
35
- `)&&(t<=o||!!this.scroll.descendant(Ze,o)[0]),this.scroll.insertAt(o,w);const[x,T]=this.scroll.line(o);let L=Gt({},Xe(x));if(x instanceof ke){const[P]=x.descendant(Pe,T);P&&(L=Gt(L,Xe(P)))}c=We.AttributeMap.diff(L,c)||{}}else if(typeof a.insert=="object"){const w=Object.keys(a.insert)[0];if(w==null)return o;const x=this.scroll.query(w,F.INLINE)!=null;if(x)(t<=o||this.scroll.descendant(Ze,o)[0])&&(g=!0);else if(o>0){const[T,L]=this.scroll.descendant(Pe,o-1);T instanceof it?T.value()[L]!==`
36
- `&&(d=!0):T instanceof Ke&&T.statics.scope===F.INLINE_BLOT&&(d=!0)}if(this.scroll.insertAt(o,w,a.insert[w]),x){const[T]=this.scroll.descendant(Pe,o);if(T){const L=Gt({},Xe(T));c=We.AttributeMap.diff(L,c)||{}}}}t+=u}else if(s.push(a),a.retain!==null&&typeof a.retain=="object"){const w=Object.keys(a.retain)[0];if(w==null)return o;this.scroll.updateEmbedAt(o,w,a.retain[w])}Object.keys(c).forEach(w=>{this.scroll.formatAt(o,u,w,c[w])});const f=d?1:0,m=g?1:0;return t+=f+m,s.retain(f),s.delete(m),o+u+f+m},0),s.reduce((o,a)=>typeof a.delete=="number"?(this.scroll.deleteAt(o,a.delete),o):o+We.Op.length(a),0),this.scroll.batchEnd(),this.scroll.optimize(),this.update(r)}deleteText(e,t){return this.scroll.deleteAt(e,t),this.update(new U().retain(e).delete(t))}formatLine(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.scroll.update(),Object.keys(r).forEach(i=>{this.scroll.lines(e,Math.max(t,1)).forEach(o=>{o.format(i,r[i])})}),this.scroll.optimize();const s=new U().retain(e).retain(t,Cr(r));return this.update(s)}formatText(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Object.keys(r).forEach(i=>{this.scroll.formatAt(e,t,i,r[i])});const s=new U().retain(e).retain(t,Cr(r));return this.update(s)}getContents(e,t){return this.delta.slice(e,e+t)}getDelta(){return this.scroll.lines().reduce((e,t)=>e.concat(t.delta()),new U)}getFormat(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=[],s=[];t===0?this.scroll.path(e).forEach(a=>{const[u]=a;u instanceof ke?r.push(u):u instanceof Pe&&s.push(u)}):(r=this.scroll.lines(e,t),s=this.scroll.descendants(Pe,e,t));const[i,o]=[r,s].map(a=>{const u=a.shift();if(u==null)return{};let c=Xe(u);for(;Object.keys(c).length>0;){const d=a.shift();if(d==null)return c;c=mg(Xe(d),c)}return c});return{...i,...o}}getHTML(e,t){const[r,s]=this.scroll.line(e);if(r){const i=r.length();return r.length()>=s+t&&!(s===0&&t===i)?wn(r,s,t,!0):wn(this.scroll,e,t,!0)}return""}getText(e,t){return this.getContents(e,t).filter(r=>typeof r.insert=="string").map(r=>r.insert).join("")}insertContents(e,t){const r=Da(t),s=new U().retain(e).concat(r);return this.scroll.insertContents(e,r),this.update(s)}insertEmbed(e,t,r){return this.scroll.insertAt(e,t,r),this.update(new U().retain(e).insert({[t]:r}))}insertText(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t=t.replace(/\r\n/g,`
37
- `).replace(/\r/g,`
38
- `),this.scroll.insertAt(e,t),Object.keys(r).forEach(s=>{this.scroll.formatAt(e,t.length,s,r[s])}),this.update(new U().retain(e).insert(t,Cr(r)))}isBlank(){if(this.scroll.children.length===0)return!0;if(this.scroll.children.length>1)return!1;const e=this.scroll.children.head;if((e==null?void 0:e.statics.blotName)!==ke.blotName)return!1;const t=e;return t.children.length>1?!1:t.children.head instanceof st}removeFormat(e,t){const r=this.getText(e,t),[s,i]=this.scroll.line(e+t);let o=0,a=new U;s!=null&&(o=s.length()-i,a=s.delta().slice(i,i+o-1).insert(`
39
- `));const c=this.getContents(e,t+o).diff(new U().insert(r).concat(a)),d=new U().retain(e).concat(c);return this.applyDelta(d)}update(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;const s=this.delta;if(t.length===1&&t[0].type==="characterData"&&t[0].target.data.match(gg)&&this.scroll.find(t[0].target)){const i=this.scroll.find(t[0].target),o=Xe(i),a=i.offset(this.scroll),u=t[0].oldValue.replace(jr.CONTENTS,""),c=new U().insert(u),d=new U().insert(i.value()),g=r&&{oldRange:Ba(r.oldRange,-a),newRange:Ba(r.newRange,-a)};e=new U().retain(a).concat(c.diff(d,g)).reduce((m,w)=>w.insert?m.insert(w.insert,o):m.push(w),new U),this.delta=s.compose(e)}else this.delta=this.getDelta(),(!e||!si(s.compose(e),this.delta))&&(e=s.diff(this.delta,r));return e}};function Dr(n,e,t){if(n.length===0){const[m]=yi(t.pop());return e<=0?`</li></${m}>`:`</li></${m}>${Dr([],e-1,t)}`}const[{child:r,offset:s,length:i,indent:o,type:a},...u]=n,[c,d]=yi(a);if(o>e)return t.push(a),o===e+1?`<${c}><li${d}>${wn(r,s,i)}${Dr(u,o,t)}`:`<${c}><li>${Dr(n,e+1,t)}`;const g=t[t.length-1];if(o===e&&a===g)return`</li><li${d}>${wn(r,s,i)}${Dr(u,o,t)}`;const[f]=yi(t.pop());return`</li></${f}>${Dr(n,e-1,t)}`}function wn(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if("html"in n&&typeof n.html=="function")return n.html(e,t);if(n instanceof it)return as(n.value().slice(e,e+t)).replaceAll(" ","&nbsp;");if(n instanceof nt){if(n.statics.blotName==="list-container"){const c=[];return n.children.forEachAt(e,t,(d,g,f)=>{const m="formats"in d&&typeof d.formats=="function"?d.formats():{};c.push({child:d,offset:g,length:f,indent:m.indent||0,type:m.list})}),Dr(c,-1,[])}const s=[];if(n.children.forEachAt(e,t,(c,d,g)=>{s.push(wn(c,d,g))}),r||n.statics.blotName==="list")return s.join("");const{outerHTML:i,innerHTML:o}=n.domNode,[a,u]=i.split(`>${o}<`);return a==="<table"?`<table style="border: 1px solid #000;">${s.join("")}<${u}`:`${a}>${s.join("")}<${u}`}return n.domNode instanceof Element?n.domNode.outerHTML:""}function mg(n,e){return Object.keys(e).reduce((t,r)=>{if(n[r]==null)return t;const s=e[r];return s===n[r]?t[r]=s:Array.isArray(s)?s.indexOf(n[r])<0?t[r]=s.concat([n[r]]):t[r]=s:t[r]=[s,n[r]],t},{})}function yi(n){const e=n==="ordered"?"ol":"ul";switch(n){case"checked":return[e,' data-list="checked"'];case"unchecked":return[e,' data-list="unchecked"'];default:return[e,""]}}function Da(n){return n.reduce((e,t)=>{if(typeof t.insert=="string"){const r=t.insert.replace(/\r\n/g,`
40
- `).replace(/\r/g,`
41
- `);return e.insert(r,t.attributes)}return e.push(t)},new U)}function Ba(n,e){let{index:t,length:r}=n;return new fr(t+e,r)}function bg(n){const e=[];return n.forEach(t=>{typeof t.insert=="string"?t.insert.split(`
42
- `).forEach((s,i)=>{i&&e.push({insert:`
43
- `,attributes:t.attributes}),s&&e.push({insert:s,attributes:t.attributes})}):e.push(t)}),e}class ot{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.quill=e,this.options=t}}B(ot,"DEFAULTS",{});const ls="\uFEFF";class vi extends Ke{constructor(e,t){super(e,t),this.contentNode=document.createElement("span"),this.contentNode.setAttribute("contenteditable","false"),Array.from(this.domNode.childNodes).forEach(r=>{this.contentNode.appendChild(r)}),this.leftGuard=document.createTextNode(ls),this.rightGuard=document.createTextNode(ls),this.domNode.appendChild(this.leftGuard),this.domNode.appendChild(this.contentNode),this.domNode.appendChild(this.rightGuard)}index(e,t){return e===this.leftGuard?0:e===this.rightGuard?1:super.index(e,t)}restore(e){let t=null,r;const s=e.data.split(ls).join("");if(e===this.leftGuard)if(this.prev instanceof it){const i=this.prev.length();this.prev.insertAt(i,s),t={startNode:this.prev.domNode,startOffset:i+s.length}}else r=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(r),this),t={startNode:r,startOffset:s.length};else e===this.rightGuard&&(this.next instanceof it?(this.next.insertAt(0,s),t={startNode:this.next.domNode,startOffset:s.length}):(r=document.createTextNode(s),this.parent.insertBefore(this.scroll.create(r),this.next),t={startNode:r,startOffset:s.length}));return e.data=ls,t}update(e,t){e.forEach(r=>{if(r.type==="characterData"&&(r.target===this.leftGuard||r.target===this.rightGuard)){const s=this.restore(r.target);s&&(t.range=s)}})}}class yg{constructor(e,t){B(this,"isComposing",!1);this.scroll=e,this.emitter=t,this.setupListeners()}setupListeners(){this.scroll.domNode.addEventListener("compositionstart",e=>{this.isComposing||this.handleCompositionStart(e)}),this.scroll.domNode.addEventListener("compositionend",e=>{this.isComposing&&queueMicrotask(()=>{this.handleCompositionEnd(e)})})}handleCompositionStart(e){const t=e.target instanceof Node?this.scroll.find(e.target,!0):null;t&&!(t instanceof vi)&&(this.emitter.emit($.events.COMPOSITION_BEFORE_START,e),this.scroll.batchStart(),this.emitter.emit($.events.COMPOSITION_START,e),this.isComposing=!0)}handleCompositionEnd(e){this.emitter.emit($.events.COMPOSITION_BEFORE_END,e),this.scroll.batchEnd(),this.emitter.emit($.events.COMPOSITION_END,e),this.isComposing=!1}}const In=class In{constructor(e,t){B(this,"modules",{});this.quill=e,this.options=t}init(){Object.keys(this.options.modules).forEach(e=>{this.modules[e]==null&&this.addModule(e)})}addModule(e){const t=this.quill.constructor.import(`modules/${e}`);return this.modules[e]=new t(this.quill,this.options.modules[e]||{}),this.modules[e]}};B(In,"DEFAULTS",{modules:{}}),B(In,"themes",{default:In});let Br=In;const vg=n=>n.parentElement||n.getRootNode().host||null,wg=n=>{const e=n.getBoundingClientRect(),t="offsetWidth"in n&&Math.abs(e.width)/n.offsetWidth||1,r="offsetHeight"in n&&Math.abs(e.height)/n.offsetHeight||1;return{top:e.top,right:e.left+n.clientWidth*t,bottom:e.top+n.clientHeight*r,left:e.left}},us=n=>{const e=parseInt(n,10);return Number.isNaN(e)?0:e},$a=(n,e,t,r,s,i)=>n<t&&e>r?0:n<t?-(t-n+s):e>r?e-n>r-t?n+s-t:e-r+i:0,Eg=(n,e)=>{var i,o,a;const t=n.ownerDocument;let r=e,s=n;for(;s;){const u=s===t.body,c=u?{top:0,right:((i=window.visualViewport)==null?void 0:i.width)??t.documentElement.clientWidth,bottom:((o=window.visualViewport)==null?void 0:o.height)??t.documentElement.clientHeight,left:0}:wg(s),d=getComputedStyle(s),g=$a(r.left,r.right,c.left,c.right,us(d.scrollPaddingLeft),us(d.scrollPaddingRight)),f=$a(r.top,r.bottom,c.top,c.bottom,us(d.scrollPaddingTop),us(d.scrollPaddingBottom));if(g||f)if(u)(a=t.defaultView)==null||a.scrollBy(g,f);else{const{scrollLeft:m,scrollTop:w}=s;f&&(s.scrollTop+=f),g&&(s.scrollLeft+=g);const x=s.scrollLeft-m,T=s.scrollTop-w;r={left:r.left-x,top:r.top-T,right:r.right-x,bottom:r.bottom-T}}s=u||d.position==="fixed"?null:vg(s)}},xg=100,Ag=["block","break","cursor","inline","scroll","text"],Tg=(n,e,t)=>{const r=new qr;return Ag.forEach(s=>{const i=e.query(s);i&&r.register(i)}),n.forEach(s=>{let i=e.query(s);i||t.error(`Cannot register "${s}" specified in "formats" config. Are you sure it was registered?`);let o=0;for(;i;)if(r.register(i),i="blotName"in i?i.requiredContainer??null:null,o+=1,o>xg){t.error(`Cycle detected in registering blot requiredContainer: "${s}"`);break}}),r},$r=kt("quill"),cs=new qr;nt.uiClass="ql-ui";const ut=class ut{static debug(e){e===!0&&(e="log"),kt.level(e)}static find(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return hi.get(e)||cs.find(e,t)}static import(e){return this.imports[e]==null&&$r.error(`Cannot import ${e}. Are you sure it was registered?`),this.imports[e]}static register(){if(typeof(arguments.length<=0?void 0:arguments[0])!="string"){const e=arguments.length<=0?void 0:arguments[0],t=!!(!(arguments.length<=1)&&arguments[1]),r="attrName"in e?e.attrName:e.blotName;typeof r=="string"?this.register(`formats/${r}`,e,t):Object.keys(e).forEach(s=>{this.register(s,e[s],t)})}else{const e=arguments.length<=0?void 0:arguments[0],t=arguments.length<=1?void 0:arguments[1],r=!!(!(arguments.length<=2)&&arguments[2]);this.imports[e]!=null&&!r&&$r.warn(`Overwriting ${e} with`,t),this.imports[e]=t,(e.startsWith("blots/")||e.startsWith("formats/"))&&t&&typeof t!="boolean"&&t.blotName!=="abstract"&&cs.register(t),typeof t.register=="function"&&t.register(cs)}}constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.options=Sg(e,t),this.container=this.options.container,this.container==null){$r.error("Invalid Quill container",e);return}this.options.debug&&ut.debug(this.options.debug);const r=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",hi.set(this.container,this),this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.emitter=new $;const s=li.blotName,i=this.options.registry.query(s);if(!i||!("blotName"in i))throw new Error(`Cannot initialize Quill without "${s}" blot`);if(this.scroll=new i(this.options.registry,this.root,{emitter:this.emitter}),this.editor=new pg(this.scroll),this.selection=new dg(this.scroll,this.emitter),this.composition=new yg(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.uploader=this.theme.addModule("uploader"),this.theme.addModule("input"),this.theme.addModule("uiNode"),this.theme.init(),this.emitter.on($.events.EDITOR_CHANGE,o=>{o===$.events.TEXT_CHANGE&&this.root.classList.toggle("ql-blank",this.editor.isBlank())}),this.emitter.on($.events.SCROLL_UPDATE,(o,a)=>{const u=this.selection.lastRange,[c]=this.selection.getRange(),d=u&&c?{oldRange:u,newRange:c}:void 0;at.call(this,()=>this.editor.update(null,a,d),o)}),this.emitter.on($.events.SCROLL_EMBED_UPDATE,(o,a)=>{const u=this.selection.lastRange,[c]=this.selection.getRange(),d=u&&c?{oldRange:u,newRange:c}:void 0;at.call(this,()=>{const g=new U().retain(o.offset(this)).retain({[o.statics.blotName]:a});return this.editor.update(g,[],d)},ut.sources.USER)}),r){const o=this.clipboard.convert({html:`${r}<p><br></p>`,text:`
44
- `});this.setContents(o)}this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable(),this.allowReadOnlyEdits=!1}addContainer(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof e=="string"){const r=e;e=document.createElement("div"),e.classList.add(r)}return this.container.insertBefore(e,t),e}blur(){this.selection.setRange(null)}deleteText(e,t,r){return[e,t,,r]=It(e,t,r),at.call(this,()=>this.editor.deleteText(e,t),r,e,-1*t)}disable(){this.enable(!1)}editReadOnly(e){this.allowReadOnlyEdits=!0;const t=e();return this.allowReadOnlyEdits=!1,t}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(e),this.container.classList.toggle("ql-disabled",!e)}focus(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.selection.focus(),e.preventScroll||this.scrollSelectionIntoView()}format(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$.sources.API;return at.call(this,()=>{const s=this.getSelection(!0);let i=new U;if(s==null)return i;if(this.scroll.query(e,F.BLOCK))i=this.editor.formatLine(s.index,s.length,{[e]:t});else{if(s.length===0)return this.selection.format(e,t),i;i=this.editor.formatText(s.index,s.length,{[e]:t})}return this.setSelection(s,$.sources.SILENT),i},r)}formatLine(e,t,r,s,i){let o;return[e,t,o,i]=It(e,t,r,s,i),at.call(this,()=>this.editor.formatLine(e,t,o),i,e,0)}formatText(e,t,r,s,i){let o;return[e,t,o,i]=It(e,t,r,s,i),at.call(this,()=>this.editor.formatText(e,t,o),i,e,0)}getBounds(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=null;if(typeof e=="number"?r=this.selection.getBounds(e,t):r=this.selection.getBounds(e.index,e.length),!r)return null;const s=this.container.getBoundingClientRect();return{bottom:r.bottom-s.top,height:r.height,left:r.left-s.left,right:r.right-s.left,top:r.top-s.top,width:r.width}}getContents(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-e;return[e,t]=It(e,t),this.editor.getContents(e,t)}getFormat(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof e=="number"?this.editor.getFormat(e,t):this.editor.getFormat(e.index,e.length)}getIndex(e){return e.offset(this.scroll)}getLength(){return this.scroll.length()}getLeaf(e){return this.scroll.leaf(e)}getLine(e){return this.scroll.line(e)}getLines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof e!="number"?this.scroll.lines(e.index,e.length):this.scroll.lines(e,t)}getModule(e){return this.theme.modules[e]}getSelection(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)&&this.focus(),this.update(),this.selection.getRange()[0]}getSemanticHTML(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=It(e,t),this.editor.getHTML(e,t)}getText(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return typeof e=="number"&&(t=t??this.getLength()-e),[e,t]=It(e,t),this.editor.getText(e,t)}hasFocus(){return this.selection.hasFocus()}insertEmbed(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ut.sources.API;return at.call(this,()=>this.editor.insertEmbed(e,t,r),s,e)}insertText(e,t,r,s,i){let o;return[e,,o,i]=It(e,0,r,s,i),at.call(this,()=>this.editor.insertText(e,t,o),i,e,t.length)}isEnabled(){return this.scroll.isEnabled()}off(){return this.emitter.off(...arguments)}on(){return this.emitter.on(...arguments)}once(){return this.emitter.once(...arguments)}removeFormat(e,t,r){return[e,t,,r]=It(e,t,r),at.call(this,()=>this.editor.removeFormat(e,t),r,e)}scrollRectIntoView(e){Eg(this.root,e)}scrollIntoView(){console.warn("Quill#scrollIntoView() has been deprecated and will be removed in the near future. Please use Quill#scrollSelectionIntoView() instead."),this.scrollSelectionIntoView()}scrollSelectionIntoView(){const e=this.selection.lastRange,t=e&&this.selection.getBounds(e.index,e.length);t&&this.scrollRectIntoView(t)}setContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$.sources.API;return at.call(this,()=>{e=new U(e);const r=this.getLength(),s=this.editor.deleteText(0,r),i=this.editor.insertContents(0,e),o=this.editor.deleteText(this.getLength()-1,1);return s.compose(i).compose(o)},t)}setSelection(e,t,r){e==null?this.selection.setRange(null,t||ut.sources.API):([e,t,,r]=It(e,t,r),this.selection.setRange(new fr(Math.max(0,e),t),r),r!==$.sources.SILENT&&this.scrollSelectionIntoView())}setText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$.sources.API;const r=new U().insert(e);return this.setContents(r,t)}update(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:$.sources.USER;const t=this.scroll.update(e);return this.selection.update(e),t}updateContents(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$.sources.API;return at.call(this,()=>(e=new U(e),this.editor.applyDelta(e)),t,!0)}};B(ut,"DEFAULTS",{bounds:null,modules:{clipboard:!0,keyboard:!0,history:!0,uploader:!0},placeholder:"",readOnly:!1,registry:cs,theme:"default"}),B(ut,"events",$.events),B(ut,"sources",$.sources),B(ut,"version","2.0.3"),B(ut,"imports",{delta:U,parchment:sg,"core/module":ot,"core/theme":Br});let C=ut;function Ma(n){return typeof n=="string"?document.querySelector(n):n}function wi(n){return Object.entries(n??{}).reduce((e,t)=>{let[r,s]=t;return{...e,[r]:s===!0?{}:s}},{})}function Ua(n){return Object.fromEntries(Object.entries(n).filter(e=>e[1]!==void 0))}function Sg(n,e){const t=Ma(n);if(!t)throw new Error("Invalid Quill container");const s=!e.theme||e.theme===C.DEFAULTS.theme?Br:C.import(`themes/${e.theme}`);if(!s)throw new Error(`Invalid theme ${e.theme}. Did you register it?`);const{modules:i,...o}=C.DEFAULTS,{modules:a,...u}=s.DEFAULTS;let c=wi(e.modules);c!=null&&c.toolbar&&c.toolbar.constructor!==Object&&(c={...c,toolbar:{container:c.toolbar}});const d=Gt({},wi(i),wi(a),c),g={...o,...Ua(u),...Ua(e)};let f=e.registry;return f?e.formats&&$r.warn('Ignoring "formats" option because "registry" is specified'):f=e.formats?Tg(e.formats,g.registry,$r):g.registry,{...g,registry:f,container:t,theme:s,modules:Object.entries(d).reduce((m,w)=>{let[x,T]=w;if(!T)return m;const L=C.import(`modules/${x}`);return L==null?($r.error(`Cannot load ${x} module. Are you sure you registered it?`),m):{...m,[x]:Gt({},L.DEFAULTS||{},T)}},{}),bounds:Ma(g.bounds)}}function at(n,e,t,r){if(!this.isEnabled()&&e===$.sources.USER&&!this.allowReadOnlyEdits)return new U;let s=t==null?null:this.getSelection();const i=this.editor.delta,o=n();if(s!=null&&(t===!0&&(t=s.index),r==null?s=Fa(s,o,e):r!==0&&(s=Fa(s,t,r,e)),this.setSelection(s,$.sources.SILENT)),o.length()>0){const a=[$.events.TEXT_CHANGE,o,i,e];this.emitter.emit($.events.EDITOR_CHANGE,...a),e!==$.sources.SILENT&&this.emitter.emit(...a)}return o}function It(n,e,t,r,s){let i={};return typeof n.index=="number"&&typeof n.length=="number"?typeof e!="number"?(s=r,r=t,t=e,e=n.length,n=n.index):(e=n.length,n=n.index):typeof e!="number"&&(s=r,r=t,t=e,e=0),typeof t=="object"?(i=t,s=r):typeof t=="string"&&(r!=null?i[t]=r:s=t),s=s||$.sources.API,[n,e,i,s]}function Fa(n,e,t,r){const s=typeof t=="number"?t:0;if(n==null)return null;let i,o;return e&&typeof e.transformPosition=="function"?[i,o]=[n.index,n.index+n.length].map(a=>e.transformPosition(a,r!==$.sources.USER)):[i,o]=[n.index,n.index+n.length].map(a=>a<e||a===e&&r===$.sources.USER?a:s>=0?a+s:Math.max(e,a+s)),new fr(i,o-i)}class hr extends ts{}function Ha(n){return n instanceof ke||n instanceof Ze}function za(n){return typeof n.updateContent=="function"}class Mr extends li{constructor(e,t,r){let{emitter:s}=r;super(e,t),this.emitter=s,this.batch=!1,this.optimize(),this.enable(),this.domNode.addEventListener("dragstart",i=>this.handleDragStart(i))}batchStart(){Array.isArray(this.batch)||(this.batch=[])}batchEnd(){if(!this.batch)return;const e=this.batch;this.batch=!1,this.update(e)}emitMount(e){this.emitter.emit($.events.SCROLL_BLOT_MOUNT,e)}emitUnmount(e){this.emitter.emit($.events.SCROLL_BLOT_UNMOUNT,e)}emitEmbedUpdate(e,t){this.emitter.emit($.events.SCROLL_EMBED_UPDATE,e,t)}deleteAt(e,t){const[r,s]=this.line(e),[i]=this.line(e+t);if(super.deleteAt(e,t),i!=null&&r!==i&&s>0){if(r instanceof Ze||i instanceof Ze){this.optimize();return}const o=i.children.head instanceof st?null:i.children.head;r.moveChildren(i,o),r.remove()}this.optimize()}enable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",e?"true":"false")}formatAt(e,t,r,s){super.formatAt(e,t,r,s),this.optimize()}insertAt(e,t,r){if(e>=this.length())if(r==null||this.scroll.query(t,F.BLOCK)==null){const s=this.scroll.create(this.statics.defaultChild.blotName);this.appendChild(s),r==null&&t.endsWith(`
45
- `)?s.insertAt(0,t.slice(0,-1),r):s.insertAt(0,t,r)}else{const s=this.scroll.create(t,r);this.appendChild(s)}else super.insertAt(e,t,r);this.optimize()}insertBefore(e,t){if(e.statics.scope===F.INLINE_BLOT){const r=this.scroll.create(this.statics.defaultChild.blotName);r.appendChild(e),super.insertBefore(r,t)}else super.insertBefore(e,t)}insertContents(e,t){const r=this.deltaToRenderBlocks(t.concat(new U().insert(`
46
- `))),s=r.pop();if(s==null)return;this.batchStart();const i=r.shift();if(i){const u=i.type==="block"&&(i.delta.length()===0||!this.descendant(Ze,e)[0]&&e<this.length()),c=i.type==="block"?i.delta:new U().insert({[i.key]:i.value});Ei(this,e,c);const d=i.type==="block"?1:0,g=e+c.length()+d;u&&this.insertAt(g-1,`
47
- `);const f=Xe(this.line(e)[0]),m=We.AttributeMap.diff(f,i.attributes)||{};Object.keys(m).forEach(w=>{this.formatAt(g-1,1,w,m[w])}),e=g}let[o,a]=this.children.find(e);if(r.length&&(o&&(o=o.split(a),a=0),r.forEach(u=>{if(u.type==="block"){const c=this.createBlock(u.attributes,o||void 0);Ei(c,0,u.delta)}else{const c=this.create(u.key,u.value);this.insertBefore(c,o||void 0),Object.keys(u.attributes).forEach(d=>{c.format(d,u.attributes[d])})}})),s.type==="block"&&s.delta.length()){const u=o?o.offset(o.scroll)+a:this.length();Ei(this,u,s.delta)}this.batchEnd(),this.optimize()}isEnabled(){return this.domNode.getAttribute("contenteditable")==="true"}leaf(e){const t=this.path(e).pop();if(!t)return[null,-1];const[r,s]=t;return r instanceof Pe?[r,s]:[null,-1]}line(e){return e===this.length()?this.line(e-1):this.descendant(Ha,e)}lines(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;const r=(s,i,o)=>{let a=[],u=o;return s.children.forEachAt(i,o,(c,d,g)=>{Ha(c)?a.push(c):c instanceof ts&&(a=a.concat(r(c,d,u))),u-=g}),a};return r(this,e,t)}optimize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch||(super.optimize(e,t),e.length>0&&this.emitter.emit($.events.SCROLL_OPTIMIZE,e,t))}path(e){return super.path(e).slice(1)}remove(){}update(e){if(this.batch){Array.isArray(e)&&(this.batch=this.batch.concat(e));return}let t=$.sources.USER;typeof e=="string"&&(t=e),Array.isArray(e)||(e=this.observer.takeRecords()),e=e.filter(r=>{let{target:s}=r;const i=this.find(s,!0);return i&&!za(i)}),e.length>0&&this.emitter.emit($.events.SCROLL_BEFORE_UPDATE,t,e),super.update(e.concat([])),e.length>0&&this.emitter.emit($.events.SCROLL_UPDATE,t,e)}updateEmbedAt(e,t,r){const[s]=this.descendant(i=>i instanceof Ze,e);s&&s.statics.blotName===t&&za(s)&&s.updateContent(r)}handleDragStart(e){e.preventDefault()}deltaToRenderBlocks(e){const t=[];let r=new U;return e.forEach(s=>{const i=s==null?void 0:s.insert;if(i)if(typeof i=="string"){const o=i.split(`
48
- `);o.slice(0,-1).forEach(u=>{r.insert(u,s.attributes),t.push({type:"block",delta:r,attributes:s.attributes??{}}),r=new U});const a=o[o.length-1];a&&r.insert(a,s.attributes)}else{const o=Object.keys(i)[0];if(!o)return;this.query(o,F.INLINE)?r.push(s):(r.length()&&t.push({type:"block",delta:r,attributes:{}}),r=new U,t.push({type:"blockEmbed",key:o,value:i[o],attributes:s.attributes??{}}))}}),r.length()&&t.push({type:"block",delta:r,attributes:{}}),t}createBlock(e,t){let r;const s={};Object.entries(e).forEach(a=>{let[u,c]=a;this.query(u,F.BLOCK&F.BLOT)!=null?r=u:s[u]=c});const i=this.create(r||this.statics.defaultChild.blotName,r?e[r]:void 0);this.insertBefore(i,t||void 0);const o=i.length();return Object.entries(s).forEach(a=>{let[u,c]=a;i.formatAt(0,o,u,c)}),i}}B(Mr,"blotName","scroll"),B(Mr,"className","ql-editor"),B(Mr,"tagName","DIV"),B(Mr,"defaultChild",ke),B(Mr,"allowedChildren",[ke,Ze,hr]);function Ei(n,e,t){t.reduce((r,s)=>{const i=We.Op.length(s);let o=s.attributes||{};if(s.insert!=null){if(typeof s.insert=="string"){const a=s.insert;n.insertAt(r,a);const[u]=n.descendant(Pe,r),c=Xe(u);o=We.AttributeMap.diff(c,o)||{}}else if(typeof s.insert=="object"){const a=Object.keys(s.insert)[0];if(a==null)return r;if(n.insertAt(r,a,s.insert[a]),n.scroll.query(a,F.INLINE)!=null){const[c]=n.descendant(Pe,r),d=Xe(c);o=We.AttributeMap.diff(d,o)||{}}}}return Object.keys(o).forEach(a=>{n.formatAt(r,i,a,o[a])}),r+i},e)}const xi={scope:F.BLOCK,whitelist:["right","center","justify"]},Og=new yt("align","align",xi),Va=new rt("align","ql-align",xi),Ka=new Wt("align","text-align",xi);class Ga extends Wt{value(e){let t=super.value(e);return t.startsWith("rgb(")?(t=t.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),`#${t.split(",").map(s=>`00${parseInt(s,10).toString(16)}`.slice(-2)).join("")}`):t}}const Ng=new rt("color","ql-color",{scope:F.INLINE}),Ai=new Ga("color","color",{scope:F.INLINE}),Lg=new rt("background","ql-bg",{scope:F.INLINE}),Ti=new Ga("background","background-color",{scope:F.INLINE});class dr extends hr{static create(e){const t=super.create(e);return t.setAttribute("spellcheck","false"),t}code(e,t){return this.children.map(r=>r.length()<=1?"":r.domNode.innerText).join(`
49
- `).slice(e,e+t)}html(e,t){return`<pre>
50
- ${as(this.code(e,t))}
51
- </pre>`}}class je extends ke{static register(){C.register(dr)}}B(je,"TAB"," ");class Si extends vt{}Si.blotName="code",Si.tagName="CODE",je.blotName="code-block",je.className="ql-code-block",je.tagName="DIV",dr.blotName="code-block-container",dr.className="ql-code-block-container",dr.tagName="DIV",dr.allowedChildren=[je],je.allowedChildren=[it,st,jr],je.requiredContainer=dr;const Oi={scope:F.BLOCK,whitelist:["rtl"]},Wa=new yt("direction","dir",Oi),Za=new rt("direction","ql-direction",Oi),Xa=new Wt("direction","direction",Oi),Ya={scope:F.INLINE,whitelist:["serif","monospace"]},Ja=new rt("font","ql-font",Ya);class _g extends Wt{value(e){return super.value(e).replace(/["']/g,"")}}const Qa=new _g("font","font-family",Ya),el=new rt("size","ql-size",{scope:F.INLINE,whitelist:["small","large","huge"]}),tl=new Wt("size","font-size",{scope:F.INLINE,whitelist:["10px","18px","32px"]}),Cg=kt("quill:keyboard"),Rg=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey";class fs extends ot{static match(e,t){return["altKey","ctrlKey","metaKey","shiftKey"].some(r=>!!t[r]!==e[r]&&t[r]!==null)?!1:t.key===e.key||t.key===e.which}constructor(e,t){super(e,t),this.bindings={},Object.keys(this.options.bindings).forEach(r=>{this.options.bindings[r]&&this.addBinding(this.options.bindings[r])}),this.addBinding({key:"Enter",shiftKey:null},this.handleEnter),this.addBinding({key:"Enter",metaKey:null,ctrlKey:null,altKey:null},()=>{}),/Firefox/i.test(navigator.userAgent)?(this.addBinding({key:"Backspace"},{collapsed:!0},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0},this.handleDelete)):(this.addBinding({key:"Backspace"},{collapsed:!0,prefix:/^.?$/},this.handleBackspace),this.addBinding({key:"Delete"},{collapsed:!0,suffix:/^.?$/},this.handleDelete)),this.addBinding({key:"Backspace"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Delete"},{collapsed:!1},this.handleDeleteRange),this.addBinding({key:"Backspace",altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},this.handleBackspace),this.listen()}addBinding(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=kg(e);if(s==null){Cg.warn("Attempted to add invalid keyboard binding",s);return}typeof t=="function"&&(t={handler:t}),typeof r=="function"&&(r={handler:r}),(Array.isArray(s.key)?s.key:[s.key]).forEach(o=>{const a={...s,key:o,...t,...r};this.bindings[a.key]=this.bindings[a.key]||[],this.bindings[a.key].push(a)})}listen(){this.quill.root.addEventListener("keydown",e=>{if(e.defaultPrevented||e.isComposing||e.keyCode===229&&(e.key==="Enter"||e.key==="Backspace"))return;const s=(this.bindings[e.key]||[]).concat(this.bindings[e.which]||[]).filter(L=>fs.match(e,L));if(s.length===0)return;const i=C.find(e.target,!0);if(i&&i.scroll!==this.quill.scroll)return;const o=this.quill.getSelection();if(o==null||!this.quill.hasFocus())return;const[a,u]=this.quill.getLine(o.index),[c,d]=this.quill.getLeaf(o.index),[g,f]=o.length===0?[c,d]:this.quill.getLeaf(o.index+o.length),m=c instanceof rs?c.value().slice(0,d):"",w=g instanceof rs?g.value().slice(f):"",x={collapsed:o.length===0,empty:o.length===0&&a.length()<=1,format:this.quill.getFormat(o),line:a,offset:u,prefix:m,suffix:w,event:e};s.some(L=>{if(L.collapsed!=null&&L.collapsed!==x.collapsed||L.empty!=null&&L.empty!==x.empty||L.offset!=null&&L.offset!==x.offset)return!1;if(Array.isArray(L.format)){if(L.format.every(P=>x.format[P]==null))return!1}else if(typeof L.format=="object"&&!Object.keys(L.format).every(P=>L.format[P]===!0?x.format[P]!=null:L.format[P]===!1?x.format[P]==null:si(L.format[P],x.format[P])))return!1;return L.prefix!=null&&!L.prefix.test(x.prefix)||L.suffix!=null&&!L.suffix.test(x.suffix)?!1:L.handler.call(this,o,x,L)!==!0})&&e.preventDefault()})}handleBackspace(e,t){const r=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(t.prefix)?2:1;if(e.index===0||this.quill.getLength()<=1)return;let s={};const[i]=this.quill.getLine(e.index);let o=new U().retain(e.index-r).delete(r);if(t.offset===0){const[a]=this.quill.getLine(e.index-1);if(a&&!(a.statics.blotName==="block"&&a.length()<=1)){const c=i.formats(),d=this.quill.getFormat(e.index-1,1);if(s=We.AttributeMap.diff(c,d)||{},Object.keys(s).length>0){const g=new U().retain(e.index+i.length()-2).retain(1,s);o=o.compose(g)}}}this.quill.updateContents(o,C.sources.USER),this.quill.focus()}handleDelete(e,t){const r=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(t.suffix)?2:1;if(e.index>=this.quill.getLength()-r)return;let s={};const[i]=this.quill.getLine(e.index);let o=new U().retain(e.index).delete(r);if(t.offset>=i.length()-1){const[a]=this.quill.getLine(e.index+1);if(a){const u=i.formats(),c=this.quill.getFormat(e.index,1);s=We.AttributeMap.diff(u,c)||{},Object.keys(s).length>0&&(o=o.retain(a.length()-1).retain(1,s))}}this.quill.updateContents(o,C.sources.USER),this.quill.focus()}handleDeleteRange(e){Li({range:e,quill:this.quill}),this.quill.focus()}handleEnter(e,t){const r=Object.keys(t.format).reduce((i,o)=>(this.quill.scroll.query(o,F.BLOCK)&&!Array.isArray(t.format[o])&&(i[o]=t.format[o]),i),{}),s=new U().retain(e.index).delete(e.length).insert(`
52
- `,r);this.quill.updateContents(s,C.sources.USER),this.quill.setSelection(e.index+1,C.sources.SILENT),this.quill.focus()}}const qg={bindings:{bold:Ni("bold"),italic:Ni("italic"),underline:Ni("underline"),indent:{key:"Tab",format:["blockquote","indent","list"],handler(n,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","+1",C.sources.USER),!1)}},outdent:{key:"Tab",shiftKey:!0,format:["blockquote","indent","list"],handler(n,e){return e.collapsed&&e.offset!==0?!0:(this.quill.format("indent","-1",C.sources.USER),!1)}},"outdent backspace":{key:"Backspace",collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler(n,e){e.format.indent!=null?this.quill.format("indent","-1",C.sources.USER):e.format.list!=null&&this.quill.format("list",!1,C.sources.USER)}},"indent code-block":rl(!0),"outdent code-block":rl(!1),"remove tab":{key:"Tab",shiftKey:!0,collapsed:!0,prefix:/\t$/,handler(n){this.quill.deleteText(n.index-1,1,C.sources.USER)}},tab:{key:"Tab",handler(n,e){if(e.format.table)return!0;this.quill.history.cutoff();const t=new U().retain(n.index).delete(n.length).insert(" ");return this.quill.updateContents(t,C.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(n.index+1,C.sources.SILENT),!1}},"blockquote empty enter":{key:"Enter",collapsed:!0,format:["blockquote"],empty:!0,handler(){this.quill.format("blockquote",!1,C.sources.USER)}},"list empty enter":{key:"Enter",collapsed:!0,format:["list"],empty:!0,handler(n,e){const t={list:!1};e.format.indent&&(t.indent=!1),this.quill.formatLine(n.index,n.length,t,C.sources.USER)}},"checklist enter":{key:"Enter",collapsed:!0,format:{list:"checked"},handler(n){const[e,t]=this.quill.getLine(n.index),r={...e.formats(),list:"checked"},s=new U().retain(n.index).insert(`
53
- `,r).retain(e.length()-t-1).retain(1,{list:"unchecked"});this.quill.updateContents(s,C.sources.USER),this.quill.setSelection(n.index+1,C.sources.SILENT),this.quill.scrollSelectionIntoView()}},"header enter":{key:"Enter",collapsed:!0,format:["header"],suffix:/^$/,handler(n,e){const[t,r]=this.quill.getLine(n.index),s=new U().retain(n.index).insert(`
54
- `,e.format).retain(t.length()-r-1).retain(1,{header:null});this.quill.updateContents(s,C.sources.USER),this.quill.setSelection(n.index+1,C.sources.SILENT),this.quill.scrollSelectionIntoView()}},"table backspace":{key:"Backspace",format:["table"],collapsed:!0,offset:0,handler(){}},"table delete":{key:"Delete",format:["table"],collapsed:!0,suffix:/^$/,handler(){}},"table enter":{key:"Enter",shiftKey:null,format:["table"],handler(n){const e=this.quill.getModule("table");if(e){const[t,r,s,i]=e.getTable(n),o=Ig(t,r,s,i);if(o==null)return;let a=t.offset();if(o<0){const u=new U().retain(a).insert(`
55
- `);this.quill.updateContents(u,C.sources.USER),this.quill.setSelection(n.index+1,n.length,C.sources.SILENT)}else if(o>0){a+=t.length();const u=new U().retain(a).insert(`
56
- `);this.quill.updateContents(u,C.sources.USER),this.quill.setSelection(a,C.sources.USER)}}}},"table tab":{key:"Tab",shiftKey:null,format:["table"],handler(n,e){const{event:t,line:r}=e,s=r.offset(this.quill.scroll);t.shiftKey?this.quill.setSelection(s-1,C.sources.USER):this.quill.setSelection(s+r.length(),C.sources.USER)}},"list autofill":{key:" ",shiftKey:null,collapsed:!0,format:{"code-block":!1,blockquote:!1,table:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler(n,e){if(this.quill.scroll.query("list")==null)return!0;const{length:t}=e.prefix,[r,s]=this.quill.getLine(n.index);if(s>t)return!0;let i;switch(e.prefix.trim()){case"[]":case"[ ]":i="unchecked";break;case"[x]":i="checked";break;case"-":case"*":i="bullet";break;default:i="ordered"}this.quill.insertText(n.index," ",C.sources.USER),this.quill.history.cutoff();const o=new U().retain(n.index-s).delete(t+1).retain(r.length()-2-s).retain(1,{list:i});return this.quill.updateContents(o,C.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(n.index-t,C.sources.SILENT),!1}},"code exit":{key:"Enter",collapsed:!0,format:["code-block"],prefix:/^$/,suffix:/^\s*$/,handler(n){const[e,t]=this.quill.getLine(n.index);let r=2,s=e;for(;s!=null&&s.length()<=1&&s.formats()["code-block"];)if(s=s.prev,r-=1,r<=0){const i=new U().retain(n.index+e.length()-t-2).retain(1,{"code-block":null}).delete(1);return this.quill.updateContents(i,C.sources.USER),this.quill.setSelection(n.index-1,C.sources.SILENT),!1}return!0}},"embed left":hs("ArrowLeft",!1),"embed left shift":hs("ArrowLeft",!0),"embed right":hs("ArrowRight",!1),"embed right shift":hs("ArrowRight",!0),"table down":nl(!1),"table up":nl(!0)}};fs.DEFAULTS=qg;function rl(n){return{key:"Tab",shiftKey:!n,format:{"code-block":!0},handler(e,t){let{event:r}=t;const s=this.quill.scroll.query("code-block"),{TAB:i}=s;if(e.length===0&&!r.shiftKey){this.quill.insertText(e.index,i,C.sources.USER),this.quill.setSelection(e.index+i.length,C.sources.SILENT);return}const o=e.length===0?this.quill.getLines(e.index,1):this.quill.getLines(e);let{index:a,length:u}=e;o.forEach((c,d)=>{n?(c.insertAt(0,i),d===0?a+=i.length:u+=i.length):c.domNode.textContent.startsWith(i)&&(c.deleteAt(0,i.length),d===0?a-=i.length:u-=i.length)}),this.quill.update(C.sources.USER),this.quill.setSelection(a,u,C.sources.SILENT)}}}function hs(n,e){return{key:n,shiftKey:e,altKey:null,[n==="ArrowLeft"?"prefix":"suffix"]:/^$/,handler(r){let{index:s}=r;n==="ArrowRight"&&(s+=r.length+1);const[i]=this.quill.getLeaf(s);return i instanceof Ke?(n==="ArrowLeft"?e?this.quill.setSelection(r.index-1,r.length+1,C.sources.USER):this.quill.setSelection(r.index-1,C.sources.USER):e?this.quill.setSelection(r.index,r.length+1,C.sources.USER):this.quill.setSelection(r.index+r.length+1,C.sources.USER),!1):!0}}}function Ni(n){return{key:n[0],shortKey:!0,handler(e,t){this.quill.format(n,!t.format[n],C.sources.USER)}}}function nl(n){return{key:n?"ArrowUp":"ArrowDown",collapsed:!0,format:["table"],handler(e,t){const r=n?"prev":"next",s=t.line,i=s.parent[r];if(i!=null){if(i.statics.blotName==="table-row"){let o=i.children.head,a=s;for(;a.prev!=null;)a=a.prev,o=o.next;const u=o.offset(this.quill.scroll)+Math.min(t.offset,o.length()-1);this.quill.setSelection(u,0,C.sources.USER)}}else{const o=s.table()[r];o!=null&&(n?this.quill.setSelection(o.offset(this.quill.scroll)+o.length()-1,0,C.sources.USER):this.quill.setSelection(o.offset(this.quill.scroll),0,C.sources.USER))}return!1}}}function kg(n){if(typeof n=="string"||typeof n=="number")n={key:n};else if(typeof n=="object")n=Cr(n);else return null;return n.shortKey&&(n[Rg]=n.shortKey,delete n.shortKey),n}function Li(n){let{quill:e,range:t}=n;const r=e.getLines(t);let s={};if(r.length>1){const i=r[0].formats(),o=r[r.length-1].formats();s=We.AttributeMap.diff(o,i)||{}}e.deleteText(t,C.sources.USER),Object.keys(s).length>0&&e.formatLine(t.index,1,s,C.sources.USER),e.setSelection(t.index,C.sources.SILENT)}function Ig(n,e,t,r){return e.prev==null&&e.next==null?t.prev==null&&t.next==null?r===0?-1:1:t.prev==null?-1:1:e.prev==null?-1:e.next==null?1:null}const Pg=/font-weight:\s*normal/,jg=["P","OL","UL"],sl=n=>n&&jg.includes(n.tagName),Dg=n=>{Array.from(n.querySelectorAll("br")).filter(e=>sl(e.previousElementSibling)&&sl(e.nextElementSibling)).forEach(e=>{var t;(t=e.parentNode)==null||t.removeChild(e)})},Bg=n=>{Array.from(n.querySelectorAll('b[style*="font-weight"]')).filter(e=>{var t;return(t=e.getAttribute("style"))==null?void 0:t.match(Pg)}).forEach(e=>{var r;const t=n.createDocumentFragment();t.append(...e.childNodes),(r=e.parentNode)==null||r.replaceChild(t,e)})};function $g(n){n.querySelector('[id^="docs-internal-guid-"]')&&(Bg(n),Dg(n))}const Mg=/\bmso-list:[^;]*ignore/i,Ug=/\bmso-list:[^;]*\bl(\d+)/i,Fg=/\bmso-list:[^;]*\blevel(\d+)/i,Hg=(n,e)=>{const t=n.getAttribute("style"),r=t==null?void 0:t.match(Ug);if(!r)return null;const s=Number(r[1]),i=t==null?void 0:t.match(Fg),o=i?Number(i[1]):1,a=new RegExp(`@list l${s}:level${o}\\s*\\{[^\\}]*mso-level-number-format:\\s*([\\w-]+)`,"i"),u=e.match(a),c=u&&u[1]==="bullet"?"bullet":"ordered";return{id:s,indent:o,type:c,element:n}},zg=n=>{var o,a;const e=Array.from(n.querySelectorAll("[style*=mso-list]")),t=[],r=[];e.forEach(u=>{(u.getAttribute("style")||"").match(Mg)?t.push(u):r.push(u)}),t.forEach(u=>{var c;return(c=u.parentNode)==null?void 0:c.removeChild(u)});const s=n.documentElement.innerHTML,i=r.map(u=>Hg(u,s)).filter(u=>u);for(;i.length;){const u=[];let c=i.shift();for(;c;)u.push(c),c=i.length&&((o=i[0])==null?void 0:o.element)===c.element.nextElementSibling&&i[0].id===c.id?i.shift():null;const d=document.createElement("ul");u.forEach(m=>{const w=document.createElement("li");w.setAttribute("data-list",m.type),m.indent>1&&w.setAttribute("class",`ql-indent-${m.indent-1}`),w.innerHTML=m.element.innerHTML,d.appendChild(w)});const g=(a=u[0])==null?void 0:a.element,{parentNode:f}=g??{};g&&(f==null||f.replaceChild(d,g)),u.slice(1).forEach(m=>{let{element:w}=m;f==null||f.removeChild(w)})}};function Vg(n){n.documentElement.getAttribute("xmlns:w")==="urn:schemas-microsoft-com:office:word"&&zg(n)}const Kg=[Vg,$g],Gg=n=>{n.documentElement&&Kg.forEach(e=>{e(n)})},Wg=kt("quill:clipboard"),Zg=[[Node.TEXT_NODE,ap],[Node.TEXT_NODE,ll],["br",ep],[Node.ELEMENT_NODE,ll],[Node.ELEMENT_NODE,Qg],[Node.ELEMENT_NODE,Jg],[Node.ELEMENT_NODE,ip],["li",np],["ol, ul",sp],["pre",tp],["tr",op],["b",Ci("bold")],["i",Ci("italic")],["strike",Ci("strike")],["style",rp]],Xg=[Og,Wa].reduce((n,e)=>(n[e.keyName]=e,n),{}),il=[Ka,Ti,Ai,Xa,Qa,tl].reduce((n,e)=>(n[e.keyName]=e,n),{});class ol extends ot{constructor(e,t){super(e,t),this.quill.root.addEventListener("copy",r=>this.onCaptureCopy(r,!1)),this.quill.root.addEventListener("cut",r=>this.onCaptureCopy(r,!0)),this.quill.root.addEventListener("paste",this.onCapturePaste.bind(this)),this.matchers=[],Zg.concat(this.options.matchers??[]).forEach(r=>{let[s,i]=r;this.addMatcher(s,i)})}addMatcher(e,t){this.matchers.push([e,t])}convert(e){let{html:t,text:r}=e,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s[je.blotName])return new U().insert(r||"",{[je.blotName]:s[je.blotName]});if(!t)return new U().insert(r||"",s);const i=this.convertHTML(t);return En(i,`
57
- `)&&(i.ops[i.ops.length-1].attributes==null||s.table)?i.compose(new U().retain(i.length()-1).delete(1)):i}normalizeHTML(e){Gg(e)}convertHTML(e){const t=new DOMParser().parseFromString(e,"text/html");this.normalizeHTML(t);const r=t.body,s=new WeakMap,[i,o]=this.prepareMatching(r,s);return _i(this.quill.scroll,r,i,o,s)}dangerouslyPasteHTML(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:C.sources.API;if(typeof e=="string"){const s=this.convert({html:e,text:""});this.quill.setContents(s,t),this.quill.setSelection(0,C.sources.SILENT)}else{const s=this.convert({html:t,text:""});this.quill.updateContents(new U().retain(e).concat(s),r),this.quill.setSelection(e+s.length(),C.sources.SILENT)}}onCaptureCopy(e){var o,a;let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(e.defaultPrevented)return;e.preventDefault();const[r]=this.quill.selection.getRange();if(r==null)return;const{html:s,text:i}=this.onCopy(r,t);(o=e.clipboardData)==null||o.setData("text/plain",i),(a=e.clipboardData)==null||a.setData("text/html",s),t&&Li({range:r,quill:this.quill})}normalizeURIList(e){return e.split(/\r?\n/).filter(t=>t[0]!=="#").join(`
58
- `)}onCapturePaste(e){var o,a,u,c,d;if(e.defaultPrevented||!this.quill.isEnabled())return;e.preventDefault();const t=this.quill.getSelection(!0);if(t==null)return;const r=(o=e.clipboardData)==null?void 0:o.getData("text/html");let s=(a=e.clipboardData)==null?void 0:a.getData("text/plain");if(!r&&!s){const g=(u=e.clipboardData)==null?void 0:u.getData("text/uri-list");g&&(s=this.normalizeURIList(g))}const i=Array.from(((c=e.clipboardData)==null?void 0:c.files)||[]);if(!r&&i.length>0){this.quill.uploader.upload(t,i);return}if(r&&i.length>0){const g=new DOMParser().parseFromString(r,"text/html");if(g.body.childElementCount===1&&((d=g.body.firstElementChild)==null?void 0:d.tagName)==="IMG"){this.quill.uploader.upload(t,i);return}}this.onPaste(t,{html:r,text:s})}onCopy(e){const t=this.quill.getText(e);return{html:this.quill.getSemanticHTML(e),text:t}}onPaste(e,t){let{text:r,html:s}=t;const i=this.quill.getFormat(e.index),o=this.convert({text:r,html:s},i);Wg.log("onPaste",o,{text:r,html:s});const a=new U().retain(e.index).delete(e.length).concat(o);this.quill.updateContents(a,C.sources.USER),this.quill.setSelection(a.length()-e.length,C.sources.SILENT),this.quill.scrollSelectionIntoView()}prepareMatching(e,t){const r=[],s=[];return this.matchers.forEach(i=>{const[o,a]=i;switch(o){case Node.TEXT_NODE:s.push(a);break;case Node.ELEMENT_NODE:r.push(a);break;default:Array.from(e.querySelectorAll(o)).forEach(u=>{if(t.has(u)){const c=t.get(u);c==null||c.push(a)}else t.set(u,[a])});break}}),[r,s]}}B(ol,"DEFAULTS",{matchers:[]});function gr(n,e,t,r){return r.query(e)?n.reduce((s,i)=>{if(!i.insert)return s;if(i.attributes&&i.attributes[e])return s.push(i);const o=t?{[e]:t}:{};return s.insert(i.insert,{...o,...i.attributes})},new U):n}function En(n,e){let t="";for(let r=n.ops.length-1;r>=0&&t.length<e.length;--r){const s=n.ops[r];if(typeof s.insert!="string")break;t=s.insert+t}return t.slice(-1*e.length)===e}function Zt(n,e){if(!(n instanceof Element))return!1;const t=e.query(n);return t&&t.prototype instanceof Ke?!1:["address","article","blockquote","canvas","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","iframe","li","main","nav","ol","output","p","pre","section","table","td","tr","ul","video"].includes(n.tagName.toLowerCase())}function Yg(n,e){return n.previousElementSibling&&n.nextElementSibling&&!Zt(n.previousElementSibling,e)&&!Zt(n.nextElementSibling,e)}const ds=new WeakMap;function al(n){return n==null?!1:(ds.has(n)||(n.tagName==="PRE"?ds.set(n,!0):ds.set(n,al(n.parentNode))),ds.get(n))}function _i(n,e,t,r,s){return e.nodeType===e.TEXT_NODE?r.reduce((i,o)=>o(e,i,n),new U):e.nodeType===e.ELEMENT_NODE?Array.from(e.childNodes||[]).reduce((i,o)=>{let a=_i(n,o,t,r,s);return o.nodeType===e.ELEMENT_NODE&&(a=t.reduce((u,c)=>c(o,u,n),a),a=(s.get(o)||[]).reduce((u,c)=>c(o,u,n),a)),i.concat(a)},new U):new U}function Ci(n){return(e,t,r)=>gr(t,n,!0,r)}function Jg(n,e,t){const r=yt.keys(n),s=rt.keys(n),i=Wt.keys(n),o={};return r.concat(s).concat(i).forEach(a=>{let u=t.query(a,F.ATTRIBUTE);u!=null&&(o[u.attrName]=u.value(n),o[u.attrName])||(u=Xg[a],u!=null&&(u.attrName===a||u.keyName===a)&&(o[u.attrName]=u.value(n)||void 0),u=il[a],u!=null&&(u.attrName===a||u.keyName===a)&&(u=il[a],o[u.attrName]=u.value(n)||void 0))}),Object.entries(o).reduce((a,u)=>{let[c,d]=u;return gr(a,c,d,t)},e)}function Qg(n,e,t){const r=t.query(n);if(r==null)return e;if(r.prototype instanceof Ke){const s={},i=r.value(n);if(i!=null)return s[r.blotName]=i,new U().insert(s,r.formats(n,t))}else if(r.prototype instanceof bn&&!En(e,`
59
- `)&&e.insert(`
60
- `),"blotName"in r&&"formats"in r&&typeof r.formats=="function")return gr(e,r.blotName,r.formats(n,t),t);return e}function ep(n,e){return En(e,`
61
- `)||e.insert(`
62
- `),e}function tp(n,e,t){const r=t.query("code-block"),s=r&&"formats"in r&&typeof r.formats=="function"?r.formats(n,t):!0;return gr(e,"code-block",s,t)}function rp(){return new U}function np(n,e,t){const r=t.query(n);if(r==null||r.blotName!=="list"||!En(e,`
63
- `))return e;let s=-1,i=n.parentNode;for(;i!=null;)["OL","UL"].includes(i.tagName)&&(s+=1),i=i.parentNode;return s<=0?e:e.reduce((o,a)=>a.insert?a.attributes&&typeof a.attributes.indent=="number"?o.push(a):o.insert(a.insert,{indent:s,...a.attributes||{}}):o,new U)}function sp(n,e,t){const r=n;let s=r.tagName==="OL"?"ordered":"bullet";const i=r.getAttribute("data-checked");return i&&(s=i==="true"?"checked":"unchecked"),gr(e,"list",s,t)}function ll(n,e,t){if(!En(e,`
64
- `)){if(Zt(n,t)&&(n.childNodes.length>0||n instanceof HTMLParagraphElement))return e.insert(`
65
- `);if(e.length()>0&&n.nextSibling){let r=n.nextSibling;for(;r!=null;){if(Zt(r,t))return e.insert(`
66
- `);const s=t.query(r);if(s&&s.prototype instanceof Ze)return e.insert(`
67
- `);r=r.firstChild}}}return e}function ip(n,e,t){var i;const r={},s=n.style||{};return s.fontStyle==="italic"&&(r.italic=!0),s.textDecoration==="underline"&&(r.underline=!0),s.textDecoration==="line-through"&&(r.strike=!0),((i=s.fontWeight)!=null&&i.startsWith("bold")||parseInt(s.fontWeight,10)>=700)&&(r.bold=!0),e=Object.entries(r).reduce((o,a)=>{let[u,c]=a;return gr(o,u,c,t)},e),parseFloat(s.textIndent||0)>0?new U().insert(" ").concat(e):e}function op(n,e,t){var s,i;const r=((s=n.parentElement)==null?void 0:s.tagName)==="TABLE"?n.parentElement:(i=n.parentElement)==null?void 0:i.parentElement;if(r!=null){const a=Array.from(r.querySelectorAll("tr")).indexOf(n)+1;return gr(e,"table",a,t)}return e}function ap(n,e,t){var s;let r=n.data;if(((s=n.parentElement)==null?void 0:s.tagName)==="O:P")return e.insert(r.trim());if(!al(n)){if(r.trim().length===0&&r.includes(`
68
- `)&&!Yg(n,t))return e;r=r.replace(/[^\S\u00a0]/g," "),r=r.replace(/ {2,}/g," "),(n.previousSibling==null&&n.parentElement!=null&&Zt(n.parentElement,t)||n.previousSibling instanceof Element&&Zt(n.previousSibling,t))&&(r=r.replace(/^ /,"")),(n.nextSibling==null&&n.parentElement!=null&&Zt(n.parentElement,t)||n.nextSibling instanceof Element&&Zt(n.nextSibling,t))&&(r=r.replace(/ $/,"")),r=r.replaceAll(" "," ")}return e.insert(r)}class ul extends ot{constructor(t,r){super(t,r);B(this,"lastRecorded",0);B(this,"ignoreChange",!1);B(this,"stack",{undo:[],redo:[]});B(this,"currentRange",null);this.quill.on(C.events.EDITOR_CHANGE,(s,i,o,a)=>{s===C.events.SELECTION_CHANGE?i&&a!==C.sources.SILENT&&(this.currentRange=i):s===C.events.TEXT_CHANGE&&(this.ignoreChange||(!this.options.userOnly||a===C.sources.USER?this.record(i,o):this.transform(i)),this.currentRange=Ri(this.currentRange,i))}),this.quill.keyboard.addBinding({key:"z",shortKey:!0},this.undo.bind(this)),this.quill.keyboard.addBinding({key:["z","Z"],shortKey:!0,shiftKey:!0},this.redo.bind(this)),/Win/i.test(navigator.platform)&&this.quill.keyboard.addBinding({key:"y",shortKey:!0},this.redo.bind(this)),this.quill.root.addEventListener("beforeinput",s=>{s.inputType==="historyUndo"?(this.undo(),s.preventDefault()):s.inputType==="historyRedo"&&(this.redo(),s.preventDefault())})}change(t,r){if(this.stack[t].length===0)return;const s=this.stack[t].pop();if(!s)return;const i=this.quill.getContents(),o=s.delta.invert(i);this.stack[r].push({delta:o,range:Ri(s.range,o)}),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(s.delta,C.sources.USER),this.ignoreChange=!1,this.restoreSelection(s)}clear(){this.stack={undo:[],redo:[]}}cutoff(){this.lastRecorded=0}record(t,r){if(t.ops.length===0)return;this.stack.redo=[];let s=t.invert(r),i=this.currentRange;const o=Date.now();if(this.lastRecorded+this.options.delay>o&&this.stack.undo.length>0){const a=this.stack.undo.pop();a&&(s=s.compose(a.delta),i=a.range)}else this.lastRecorded=o;s.length()!==0&&(this.stack.undo.push({delta:s,range:i}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift())}redo(){this.change("redo","undo")}transform(t){cl(this.stack.undo,t),cl(this.stack.redo,t)}undo(){this.change("undo","redo")}restoreSelection(t){if(t.range)this.quill.setSelection(t.range,C.sources.USER);else{const r=up(this.quill.scroll,t.delta);this.quill.setSelection(r,C.sources.USER)}}}B(ul,"DEFAULTS",{delay:1e3,maxStack:100,userOnly:!1});function cl(n,e){let t=e;for(let r=n.length-1;r>=0;r-=1){const s=n[r];n[r]={delta:t.transform(s.delta,!0),range:s.range&&Ri(s.range,t)},t=s.delta.transform(t),n[r].delta.length()===0&&n.splice(r,1)}}function lp(n,e){const t=e.ops[e.ops.length-1];return t==null?!1:t.insert!=null?typeof t.insert=="string"&&t.insert.endsWith(`
69
- `):t.attributes!=null?Object.keys(t.attributes).some(r=>n.query(r,F.BLOCK)!=null):!1}function up(n,e){const t=e.reduce((s,i)=>s+(i.delete||0),0);let r=e.length()-t;return lp(n,e)&&(r-=1),r}function Ri(n,e){if(!n)return n;const t=e.transformPosition(n.index),r=e.transformPosition(n.index+n.length);return{index:t,length:r-t}}class fl extends ot{constructor(e,t){super(e,t),e.root.addEventListener("drop",r=>{var o;r.preventDefault();let s=null;if(document.caretRangeFromPoint)s=document.caretRangeFromPoint(r.clientX,r.clientY);else if(document.caretPositionFromPoint){const a=document.caretPositionFromPoint(r.clientX,r.clientY);s=document.createRange(),s.setStart(a.offsetNode,a.offset),s.setEnd(a.offsetNode,a.offset)}const i=s&&e.selection.normalizeNative(s);if(i){const a=e.selection.normalizedToRange(i);(o=r.dataTransfer)!=null&&o.files&&this.upload(a,r.dataTransfer.files)}})}upload(e,t){const r=[];Array.from(t).forEach(s=>{var i;s&&((i=this.options.mimetypes)!=null&&i.includes(s.type))&&r.push(s)}),r.length>0&&this.options.handler.call(this,e,r)}}fl.DEFAULTS={mimetypes:["image/png","image/jpeg"],handler(n,e){if(!this.quill.scroll.query("image"))return;const t=e.map(r=>new Promise(s=>{const i=new FileReader;i.onload=()=>{s(i.result)},i.readAsDataURL(r)}));Promise.all(t).then(r=>{const s=r.reduce((i,o)=>i.insert({image:o}),new U().retain(n.index).delete(n.length));this.quill.updateContents(s,$.sources.USER),this.quill.setSelection(n.index+r.length,$.sources.SILENT)})}};const cp=["insertText","insertReplacementText"];class fp extends ot{constructor(e,t){super(e,t),e.root.addEventListener("beforeinput",r=>{this.handleBeforeInput(r)}),/Android/i.test(navigator.userAgent)||e.on(C.events.COMPOSITION_BEFORE_START,()=>{this.handleCompositionStart()})}deleteRange(e){Li({range:e,quill:this.quill})}replaceText(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";if(e.length===0)return!1;if(t){const r=this.quill.getFormat(e.index,1);this.deleteRange(e),this.quill.updateContents(new U().retain(e.index).insert(t,r),C.sources.USER)}else this.deleteRange(e);return this.quill.setSelection(e.index+t.length,0,C.sources.SILENT),!0}handleBeforeInput(e){if(this.quill.composition.isComposing||e.defaultPrevented||!cp.includes(e.inputType))return;const t=e.getTargetRanges?e.getTargetRanges()[0]:null;if(!t||t.collapsed===!0)return;const r=hp(e);if(r==null)return;const s=this.quill.selection.normalizeNative(t),i=s?this.quill.selection.normalizedToRange(s):null;i&&this.replaceText(i,r)&&e.preventDefault()}handleCompositionStart(){const e=this.quill.getSelection();e&&this.replaceText(e)}}function hp(n){var e;return typeof n.data=="string"?n.data:(e=n.dataTransfer)!=null&&e.types.includes("text/plain")?n.dataTransfer.getData("text/plain"):null}const dp=/Mac/i.test(navigator.platform),gp=100,pp=n=>!!(n.key==="ArrowLeft"||n.key==="ArrowRight"||n.key==="ArrowUp"||n.key==="ArrowDown"||n.key==="Home"||dp&&n.key==="a"&&n.ctrlKey===!0);class mp extends ot{constructor(t,r){super(t,r);B(this,"isListening",!1);B(this,"selectionChangeDeadline",0);this.handleArrowKeys(),this.handleNavigationShortcuts()}handleArrowKeys(){this.quill.keyboard.addBinding({key:["ArrowLeft","ArrowRight"],offset:0,shiftKey:null,handler(t,r){let{line:s,event:i}=r;if(!(s instanceof nt)||!s.uiNode)return!0;const o=getComputedStyle(s.domNode).direction==="rtl";return o&&i.key!=="ArrowRight"||!o&&i.key!=="ArrowLeft"?!0:(this.quill.setSelection(t.index-1,t.length+(i.shiftKey?1:0),C.sources.USER),!1)}})}handleNavigationShortcuts(){this.quill.root.addEventListener("keydown",t=>{!t.defaultPrevented&&pp(t)&&this.ensureListeningToSelectionChange()})}ensureListeningToSelectionChange(){if(this.selectionChangeDeadline=Date.now()+gp,this.isListening)return;this.isListening=!0;const t=()=>{this.isListening=!1,Date.now()<=this.selectionChangeDeadline&&this.handleSelectionChange()};document.addEventListener("selectionchange",t,{once:!0})}handleSelectionChange(){const t=document.getSelection();if(!t)return;const r=t.getRangeAt(0);if(r.collapsed!==!0||r.startOffset!==0)return;const s=this.quill.scroll.find(r.startContainer);if(!(s instanceof nt)||!s.uiNode)return;const i=document.createRange();i.setStartAfter(s.uiNode),i.setEndAfter(s.uiNode),t.removeAllRanges(),t.addRange(i)}}C.register({"blots/block":ke,"blots/block/embed":Ze,"blots/break":st,"blots/container":hr,"blots/cursor":jr,"blots/embed":vi,"blots/inline":vt,"blots/scroll":Mr,"blots/text":it,"modules/clipboard":ol,"modules/history":ul,"modules/keyboard":fs,"modules/uploader":fl,"modules/input":fp,"modules/uiNode":mp});class bp extends rt{add(e,t){let r=0;if(t==="+1"||t==="-1"){const s=this.value(e)||0;r=t==="+1"?s+1:s-1}else typeof t=="number"&&(r=t);return r===0?(this.remove(e),!0):super.add(e,r.toString())}canAdd(e,t){return super.canAdd(e,t)||super.canAdd(e,parseInt(t,10))}value(e){return parseInt(super.value(e),10)||void 0}}const yp=new bp("indent","ql-indent",{scope:F.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});class qi extends ke{}B(qi,"blotName","blockquote"),B(qi,"tagName","blockquote");class ki extends ke{static formats(e){return this.tagName.indexOf(e.tagName)+1}}B(ki,"blotName","header"),B(ki,"tagName",["H1","H2","H3","H4","H5","H6"]);class xn extends hr{}xn.blotName="list-container",xn.tagName="OL";class An extends ke{static create(e){const t=super.create();return t.setAttribute("data-list",e),t}static formats(e){return e.getAttribute("data-list")||void 0}static register(){C.register(xn)}constructor(e,t){super(e,t);const r=t.ownerDocument.createElement("span"),s=i=>{if(!e.isEnabled())return;const o=this.statics.formats(t,e);o==="checked"?(this.format("list","unchecked"),i.preventDefault()):o==="unchecked"&&(this.format("list","checked"),i.preventDefault())};r.addEventListener("mousedown",s),r.addEventListener("touchstart",s),this.attachUI(r)}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-list",t):super.format(e,t)}}An.blotName="list",An.tagName="LI",xn.allowedChildren=[An],An.requiredContainer=xn;class Tn extends vt{static create(){return super.create()}static formats(){return!0}optimize(e){super.optimize(e),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}B(Tn,"blotName","bold"),B(Tn,"tagName",["STRONG","B"]);class Ii extends Tn{}B(Ii,"blotName","italic"),B(Ii,"tagName",["EM","I"]);class Xt extends vt{static create(e){const t=super.create(e);return t.setAttribute("href",this.sanitize(e)),t.setAttribute("rel","noopener noreferrer"),t.setAttribute("target","_blank"),t}static formats(e){return e.getAttribute("href")}static sanitize(e){return hl(e,this.PROTOCOL_WHITELIST)?e:this.SANITIZED_URL}format(e,t){e!==this.statics.blotName||!t?super.format(e,t):this.domNode.setAttribute("href",this.constructor.sanitize(t))}}B(Xt,"blotName","link"),B(Xt,"tagName","A"),B(Xt,"SANITIZED_URL","about:blank"),B(Xt,"PROTOCOL_WHITELIST",["http","https","mailto","tel","sms"]);function hl(n,e){const t=document.createElement("a");t.href=n;const r=t.href.slice(0,t.href.indexOf(":"));return e.indexOf(r)>-1}class Pi extends vt{static create(e){return e==="super"?document.createElement("sup"):e==="sub"?document.createElement("sub"):super.create(e)}static formats(e){if(e.tagName==="SUB")return"sub";if(e.tagName==="SUP")return"super"}}B(Pi,"blotName","script"),B(Pi,"tagName",["SUB","SUP"]);class ji extends Tn{}B(ji,"blotName","strike"),B(ji,"tagName",["S","STRIKE"]);class Di extends vt{}B(Di,"blotName","underline"),B(Di,"tagName","U");class gs extends vi{static create(e){if(window.katex==null)throw new Error("Formula module requires KaTeX.");const t=super.create(e);return typeof e=="string"&&(window.katex.render(e,t,{throwOnError:!1,errorColor:"#f00"}),t.setAttribute("data-value",e)),t}static value(e){return e.getAttribute("data-value")}html(){const{formula:e}=this.value();return`<span>${e}</span>`}}B(gs,"blotName","formula"),B(gs,"className","ql-formula"),B(gs,"tagName","SPAN");const dl=["alt","height","width"];class Bi extends Ke{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("src",this.sanitize(e)),t}static formats(e){return dl.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static match(e){return/\.(jpe?g|gif|png)$/.test(e)||/^data:image\/.+;base64/.test(e)}static sanitize(e){return hl(e,["http","https","data"])?e:"//:0"}static value(e){return e.getAttribute("src")}format(e,t){dl.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}}B(Bi,"blotName","image"),B(Bi,"tagName","IMG");const gl=["height","width"];class ps extends Ze{static create(e){const t=super.create(e);return t.setAttribute("frameborder","0"),t.setAttribute("allowfullscreen","true"),t.setAttribute("src",this.sanitize(e)),t}static formats(e){return gl.reduce((t,r)=>(e.hasAttribute(r)&&(t[r]=e.getAttribute(r)),t),{})}static sanitize(e){return Xt.sanitize(e)}static value(e){return e.getAttribute("src")}format(e,t){gl.indexOf(e)>-1?t?this.domNode.setAttribute(e,t):this.domNode.removeAttribute(e):super.format(e,t)}html(){const{video:e}=this.value();return`<a href="${e}">${e}</a>`}}B(ps,"blotName","video"),B(ps,"className","ql-video"),B(ps,"tagName","IFRAME");const Sn=new rt("code-token","hljs",{scope:F.INLINE});class Pt extends vt{static formats(e,t){for(;e!=null&&e!==t.domNode;){if(e.classList&&e.classList.contains(je.className))return super.formats(e,t);e=e.parentNode}}constructor(e,t,r){super(e,t,r),Sn.add(this.domNode,r)}format(e,t){e!==Pt.blotName?super.format(e,t):t?Sn.add(this.domNode,t):(Sn.remove(this.domNode),this.domNode.classList.remove(this.statics.className))}optimize(){super.optimize(...arguments),Sn.value(this.domNode)||this.unwrap()}}Pt.blotName="code-token",Pt.className="ql-token";class Ye extends je{static create(e){const t=super.create(e);return typeof e=="string"&&t.setAttribute("data-language",e),t}static formats(e){return e.getAttribute("data-language")||"plain"}static register(){}format(e,t){e===this.statics.blotName&&t?this.domNode.setAttribute("data-language",t):super.format(e,t)}replaceWith(e,t){return this.formatAt(0,this.length(),Pt.blotName,!1),super.replaceWith(e,t)}}class On extends dr{attach(){super.attach(),this.forceNext=!1,this.scroll.emitMount(this)}format(e,t){e===Ye.blotName&&(this.forceNext=!0,this.children.forEach(r=>{r.format(e,t)}))}formatAt(e,t,r,s){r===Ye.blotName&&(this.forceNext=!0),super.formatAt(e,t,r,s)}highlight(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.children.head==null)return;const s=`${Array.from(this.domNode.childNodes).filter(o=>o!==this.uiNode).map(o=>o.textContent).join(`
70
- `)}
71
- `,i=Ye.formats(this.children.head.domNode);if(t||this.forceNext||this.cachedText!==s){if(s.trim().length>0||this.cachedText==null){const o=this.children.reduce((u,c)=>u.concat(Ia(c,!1)),new U),a=e(s,i);o.diff(a).reduce((u,c)=>{let{retain:d,attributes:g}=c;return d?(g&&Object.keys(g).forEach(f=>{[Ye.blotName,Pt.blotName].includes(f)&&this.formatAt(u,d,f,g[f])}),u+d):u},0)}this.cachedText=s,this.forceNext=!1}}html(e,t){const[r]=this.children.find(e);return`<pre data-language="${r?Ye.formats(r.domNode):"plain"}">
72
- ${as(this.code(e,t))}
73
- </pre>`}optimize(e){if(super.optimize(e),this.parent!=null&&this.children.head!=null&&this.uiNode!=null){const t=Ye.formats(this.children.head.domNode);t!==this.uiNode.value&&(this.uiNode.value=t)}}}On.allowedChildren=[Ye],Ye.requiredContainer=On,Ye.allowedChildren=[Pt,jr,it,st];const vp=(n,e,t)=>{if(typeof n.versionString=="string"){const r=n.versionString.split(".")[0];if(parseInt(r,10)>=11)return n.highlight(t,{language:e}).value}return n.highlight(e,t).value};class pl extends ot{static register(){C.register(Pt,!0),C.register(Ye,!0),C.register(On,!0)}constructor(e,t){if(super(e,t),this.options.hljs==null)throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");this.languages=this.options.languages.reduce((r,s)=>{let{key:i}=s;return r[i]=!0,r},{}),this.highlightBlot=this.highlightBlot.bind(this),this.initListener(),this.initTimer()}initListener(){this.quill.on(C.events.SCROLL_BLOT_MOUNT,e=>{if(!(e instanceof On))return;const t=this.quill.root.ownerDocument.createElement("select");this.options.languages.forEach(r=>{let{key:s,label:i}=r;const o=t.ownerDocument.createElement("option");o.textContent=i,o.setAttribute("value",s),t.appendChild(o)}),t.addEventListener("change",()=>{e.format(Ye.blotName,t.value),this.quill.root.focus(),this.highlight(e,!0)}),e.uiNode==null&&(e.attachUI(t),e.children.head&&(t.value=Ye.formats(e.children.head.domNode)))})}initTimer(){let e=null;this.quill.on(C.events.SCROLL_OPTIMIZE,()=>{e&&clearTimeout(e),e=setTimeout(()=>{this.highlight(),e=null},this.options.interval)})}highlight(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(this.quill.selection.composing)return;this.quill.update(C.sources.USER);const r=this.quill.getSelection();(e==null?this.quill.scroll.descendants(On):[e]).forEach(i=>{i.highlight(this.highlightBlot,t)}),this.quill.update(C.sources.SILENT),r!=null&&this.quill.setSelection(r,C.sources.SILENT)}highlightBlot(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"plain";if(t=this.languages[t]?t:"plain",t==="plain")return as(e).split(`
74
- `).reduce((s,i,o)=>(o!==0&&s.insert(`
75
- `,{[je.blotName]:t}),s.insert(i)),new U);const r=this.quill.root.ownerDocument.createElement("div");return r.classList.add(je.className),r.innerHTML=vp(this.options.hljs,t,e),_i(this.quill.scroll,r,[(s,i)=>{const o=Sn.value(s);return o?i.compose(new U().retain(i.length(),{[Pt.blotName]:o})):i}],[(s,i)=>s.data.split(`
76
- `).reduce((o,a,u)=>(u!==0&&o.insert(`
77
- `,{[je.blotName]:t}),o.insert(a)),i)],new WeakMap)}}pl.DEFAULTS={hljs:window.hljs,interval:1e3,languages:[{key:"plain",label:"Plain"},{key:"bash",label:"Bash"},{key:"cpp",label:"C++"},{key:"cs",label:"C#"},{key:"css",label:"CSS"},{key:"diff",label:"Diff"},{key:"xml",label:"HTML/XML"},{key:"java",label:"Java"},{key:"javascript",label:"JavaScript"},{key:"markdown",label:"Markdown"},{key:"php",label:"PHP"},{key:"python",label:"Python"},{key:"ruby",label:"Ruby"},{key:"sql",label:"SQL"}]};const Pn=class Pn extends ke{static create(e){const t=super.create();return e?t.setAttribute("data-row",e):t.setAttribute("data-row",$i()),t}static formats(e){if(e.hasAttribute("data-row"))return e.getAttribute("data-row")}cellOffset(){return this.parent?this.parent.children.indexOf(this):-1}format(e,t){e===Pn.blotName&&t?this.domNode.setAttribute("data-row",t):super.format(e,t)}row(){return this.parent}rowOffset(){return this.row()?this.row().rowOffset():-1}table(){return this.row()&&this.row().table()}};B(Pn,"blotName","table"),B(Pn,"tagName","TD");let lt=Pn;class jt extends hr{checkMerge(){if(super.checkMerge()&&this.next.children.head!=null){const e=this.children.head.formats(),t=this.children.tail.formats(),r=this.next.children.head.formats(),s=this.next.children.tail.formats();return e.table===t.table&&e.table===r.table&&e.table===s.table}return!1}optimize(e){super.optimize(e),this.children.forEach(t=>{if(t.next==null)return;const r=t.formats(),s=t.next.formats();if(r.table!==s.table){const i=this.splitAfter(t);i&&i.optimize(),this.prev&&this.prev.optimize()}})}rowOffset(){return this.parent?this.parent.children.indexOf(this):-1}table(){return this.parent&&this.parent.parent}}B(jt,"blotName","table-row"),B(jt,"tagName","TR");class wt extends hr{}B(wt,"blotName","table-body"),B(wt,"tagName","TBODY");class Ur extends hr{balanceCells(){const e=this.descendants(jt),t=e.reduce((r,s)=>Math.max(s.children.length,r),0);e.forEach(r=>{new Array(t-r.children.length).fill(0).forEach(()=>{let s;r.children.head!=null&&(s=lt.formats(r.children.head.domNode));const i=this.scroll.create(lt.blotName,s);r.appendChild(i),i.optimize()})})}cells(e){return this.rows().map(t=>t.children.at(e))}deleteColumn(e){const[t]=this.descendant(wt);t==null||t.children.head==null||t.children.forEach(r=>{const s=r.children.at(e);s!=null&&s.remove()})}insertColumn(e){const[t]=this.descendant(wt);t==null||t.children.head==null||t.children.forEach(r=>{const s=r.children.at(e),i=lt.formats(r.children.head.domNode),o=this.scroll.create(lt.blotName,i);r.insertBefore(o,s)})}insertRow(e){const[t]=this.descendant(wt);if(t==null||t.children.head==null)return;const r=$i(),s=this.scroll.create(jt.blotName);t.children.head.children.forEach(()=>{const o=this.scroll.create(lt.blotName,r);s.appendChild(o)});const i=t.children.at(e);t.insertBefore(s,i)}rows(){const e=this.children.head;return e==null?[]:e.children.map(t=>t)}}B(Ur,"blotName","table-container"),B(Ur,"tagName","TABLE"),Ur.allowedChildren=[wt],wt.requiredContainer=Ur,wt.allowedChildren=[jt],jt.requiredContainer=wt,jt.allowedChildren=[lt],lt.requiredContainer=jt;function $i(){return`row-${Math.random().toString(36).slice(2,6)}`}let wp=class extends ot{static register(){C.register(lt),C.register(jt),C.register(wt),C.register(Ur)}constructor(){super(...arguments),this.listenBalanceCells()}balanceTables(){this.quill.scroll.descendants(Ur).forEach(e=>{e.balanceCells()})}deleteColumn(){const[e,,t]=this.getTable();t!=null&&(e.deleteColumn(t.cellOffset()),this.quill.update(C.sources.USER))}deleteRow(){const[,e]=this.getTable();e!=null&&(e.remove(),this.quill.update(C.sources.USER))}deleteTable(){const[e]=this.getTable();if(e==null)return;const t=e.offset();e.remove(),this.quill.update(C.sources.USER),this.quill.setSelection(t,C.sources.SILENT)}getTable(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.quill.getSelection();if(e==null)return[null,null,null,-1];const[t,r]=this.quill.getLine(e.index);if(t==null||t.statics.blotName!==lt.blotName)return[null,null,null,-1];const s=t.parent;return[s.parent.parent,s,t,r]}insertColumn(e){const t=this.quill.getSelection();if(!t)return;const[r,s,i]=this.getTable(t);if(i==null)return;const o=i.cellOffset();r.insertColumn(o+e),this.quill.update(C.sources.USER);let a=s.rowOffset();e===0&&(a+=1),this.quill.setSelection(t.index+a,t.length,C.sources.SILENT)}insertColumnLeft(){this.insertColumn(0)}insertColumnRight(){this.insertColumn(1)}insertRow(e){const t=this.quill.getSelection();if(!t)return;const[r,s,i]=this.getTable(t);if(i==null)return;const o=s.rowOffset();r.insertRow(o+e),this.quill.update(C.sources.USER),e>0?this.quill.setSelection(t,C.sources.SILENT):this.quill.setSelection(t.index+s.children.length,t.length,C.sources.SILENT)}insertRowAbove(){this.insertRow(0)}insertRowBelow(){this.insertRow(1)}insertTable(e,t){const r=this.quill.getSelection();if(r==null)return;const s=new Array(e).fill(0).reduce(i=>{const o=new Array(t).fill(`
78
- `).join("");return i.insert(o,{table:$i()})},new U().retain(r.index));this.quill.updateContents(s,C.sources.USER),this.quill.setSelection(r.index,C.sources.SILENT),this.balanceTables()}listenBalanceCells(){this.quill.on(C.events.SCROLL_OPTIMIZE,e=>{e.some(t=>["TD","TR","TBODY","TABLE"].includes(t.target.tagName)?(this.quill.once(C.events.TEXT_CHANGE,(r,s,i)=>{i===C.sources.USER&&this.balanceTables()}),!0):!1)})}};const ml=kt("quill:toolbar");class Mi extends ot{constructor(e,t){var r,s;if(super(e,t),Array.isArray(this.options.container)){const i=document.createElement("div");i.setAttribute("role","toolbar"),Ep(i,this.options.container),(s=(r=e.container)==null?void 0:r.parentNode)==null||s.insertBefore(i,e.container),this.container=i}else typeof this.options.container=="string"?this.container=document.querySelector(this.options.container):this.container=this.options.container;if(!(this.container instanceof HTMLElement)){ml.error("Container required for toolbar",this.options);return}this.container.classList.add("ql-toolbar"),this.controls=[],this.handlers={},this.options.handlers&&Object.keys(this.options.handlers).forEach(i=>{var a;const o=(a=this.options.handlers)==null?void 0:a[i];o&&this.addHandler(i,o)}),Array.from(this.container.querySelectorAll("button, select")).forEach(i=>{this.attach(i)}),this.quill.on(C.events.EDITOR_CHANGE,()=>{const[i]=this.quill.selection.getRange();this.update(i)})}addHandler(e,t){this.handlers[e]=t}attach(e){let t=Array.from(e.classList).find(s=>s.indexOf("ql-")===0);if(!t)return;if(t=t.slice(3),e.tagName==="BUTTON"&&e.setAttribute("type","button"),this.handlers[t]==null&&this.quill.scroll.query(t)==null){ml.warn("ignoring attaching to nonexistent format",t,e);return}const r=e.tagName==="SELECT"?"change":"click";e.addEventListener(r,s=>{let i;if(e.tagName==="SELECT"){if(e.selectedIndex<0)return;const a=e.options[e.selectedIndex];a.hasAttribute("selected")?i=!1:i=a.value||!1}else e.classList.contains("ql-active")?i=!1:i=e.value||!e.hasAttribute("value"),s.preventDefault();this.quill.focus();const[o]=this.quill.selection.getRange();if(this.handlers[t]!=null)this.handlers[t].call(this,i);else if(this.quill.scroll.query(t).prototype instanceof Ke){if(i=prompt(`Enter ${t}`),!i)return;this.quill.updateContents(new U().retain(o.index).delete(o.length).insert({[t]:i}),C.sources.USER)}else this.quill.format(t,i,C.sources.USER);this.update(o)}),this.controls.push([t,e])}update(e){const t=e==null?{}:this.quill.getFormat(e);this.controls.forEach(r=>{const[s,i]=r;if(i.tagName==="SELECT"){let o=null;if(e==null)o=null;else if(t[s]==null)o=i.querySelector("option[selected]");else if(!Array.isArray(t[s])){let a=t[s];typeof a=="string"&&(a=a.replace(/"/g,'\\"')),o=i.querySelector(`option[value="${a}"]`)}o==null?(i.value="",i.selectedIndex=-1):o.selected=!0}else if(e==null)i.classList.remove("ql-active"),i.setAttribute("aria-pressed","false");else if(i.hasAttribute("value")){const o=t[s],a=o===i.getAttribute("value")||o!=null&&o.toString()===i.getAttribute("value")||o==null&&!i.getAttribute("value");i.classList.toggle("ql-active",a),i.setAttribute("aria-pressed",a.toString())}else{const o=t[s]!=null;i.classList.toggle("ql-active",o),i.setAttribute("aria-pressed",o.toString())}})}}Mi.DEFAULTS={};function bl(n,e,t){const r=document.createElement("button");r.setAttribute("type","button"),r.classList.add(`ql-${e}`),r.setAttribute("aria-pressed","false"),t!=null?(r.value=t,r.setAttribute("aria-label",`${e}: ${t}`)):r.setAttribute("aria-label",e),n.appendChild(r)}function Ep(n,e){Array.isArray(e[0])||(e=[e]),e.forEach(t=>{const r=document.createElement("span");r.classList.add("ql-formats"),t.forEach(s=>{if(typeof s=="string")bl(r,s);else{const i=Object.keys(s)[0],o=s[i];Array.isArray(o)?xp(r,i,o):bl(r,i,o)}}),n.appendChild(r)})}function xp(n,e,t){const r=document.createElement("select");r.classList.add(`ql-${e}`),t.forEach(s=>{const i=document.createElement("option");s!==!1?i.setAttribute("value",String(s)):i.setAttribute("selected","selected"),r.appendChild(i)}),n.appendChild(r)}Mi.DEFAULTS={container:null,handlers:{clean(){const n=this.quill.getSelection();if(n!=null)if(n.length===0){const e=this.quill.getFormat();Object.keys(e).forEach(t=>{this.quill.scroll.query(t,F.INLINE)!=null&&this.quill.format(t,!1,C.sources.USER)})}else this.quill.removeFormat(n.index,n.length,C.sources.USER)},direction(n){const{align:e}=this.quill.getFormat();n==="rtl"&&e==null?this.quill.format("align","right",C.sources.USER):!n&&e==="right"&&this.quill.format("align",!1,C.sources.USER),this.quill.format("direction",n,C.sources.USER)},indent(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e),r=parseInt(t.indent||0,10);if(n==="+1"||n==="-1"){let s=n==="+1"?1:-1;t.direction==="rtl"&&(s*=-1),this.quill.format("indent",r+s,C.sources.USER)}},link(n){n===!0&&(n=prompt("Enter link URL:")),this.quill.format("link",n,C.sources.USER)},list(n){const e=this.quill.getSelection(),t=this.quill.getFormat(e);n==="check"?t.list==="checked"||t.list==="unchecked"?this.quill.format("list",!1,C.sources.USER):this.quill.format("list","unchecked",C.sources.USER):this.quill.format("list",n,C.sources.USER)}}};const Ap='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="13" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="9" y1="4" y2="4"/></svg>',Tp='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="14" x2="4" y1="14" y2="14"/><line class="ql-stroke" x1="12" x2="6" y1="4" y2="4"/></svg>',Sp='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="5" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="9" y1="4" y2="4"/></svg>',Op='<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="15" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="15" x2="3" y1="14" y2="14"/><line class="ql-stroke" x1="15" x2="3" y1="4" y2="4"/></svg>',Np='<svg viewbox="0 0 18 18"><g class="ql-fill ql-color-label"><polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"/><rect height="1" width="1" x="4" y="4"/><polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"/><rect height="1" width="1" x="2" y="6"/><rect height="1" width="1" x="3" y="5"/><rect height="1" width="1" x="4" y="7"/><polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"/><rect height="1" width="1" x="2" y="12"/><rect height="1" width="1" x="2" y="9"/><rect height="1" width="1" x="2" y="15"/><polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"/><rect height="1" width="1" x="3" y="8"/><path d="M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z"/><path d="M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z"/><path d="M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z"/><rect height="1" width="1" x="12" y="2"/><rect height="1" width="1" x="11" y="3"/><path d="M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z"/><rect height="1" width="1" x="2" y="3"/><rect height="1" width="1" x="6" y="2"/><rect height="1" width="1" x="3" y="2"/><rect height="1" width="1" x="5" y="3"/><rect height="1" width="1" x="9" y="2"/><rect height="1" width="1" x="15" y="14"/><polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"/><rect height="1" width="1" x="13" y="7"/><rect height="1" width="1" x="15" y="5"/><rect height="1" width="1" x="14" y="6"/><rect height="1" width="1" x="15" y="8"/><rect height="1" width="1" x="14" y="9"/><path d="M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z"/><rect height="1" width="1" x="14" y="3"/><polygon points="12 6.868 12 6 11.62 6 12 6.868"/><rect height="1" width="1" x="15" y="2"/><rect height="1" width="1" x="12" y="5"/><rect height="1" width="1" x="13" y="4"/><polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"/><rect height="1" width="1" x="9" y="14"/><rect height="1" width="1" x="8" y="15"/><path d="M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z"/><rect height="1" width="1" x="5" y="15"/><path d="M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z"/><rect height="1" width="1" x="11" y="15"/><path d="M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z"/><rect height="1" width="1" x="14" y="15"/><rect height="1" width="1" x="15" y="11"/></g><polyline class="ql-stroke" points="5.5 13 9 5 12.5 13"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="11" y2="11"/></svg>',Lp='<svg viewbox="0 0 18 18"><rect class="ql-fill ql-stroke" height="3" width="3" x="4" y="5"/><rect class="ql-fill ql-stroke" height="3" width="3" x="11" y="5"/><path class="ql-even ql-fill ql-stroke" d="M7,8c0,4.031-3,5-3,5"/><path class="ql-even ql-fill ql-stroke" d="M14,8c0,4.031-3,5-3,5"/></svg>',_p='<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z"/><path class="ql-stroke" d="M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z"/></svg>',Cp='<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="5" x2="13" y1="3" y2="3"/><line class="ql-stroke" x1="6" x2="9.35" y1="12" y2="3"/><line class="ql-stroke" x1="11" x2="15" y1="11" y2="15"/><line class="ql-stroke" x1="15" x2="11" y1="11" y2="15"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="7" x="2" y="14"/></svg>',yl='<svg viewbox="0 0 18 18"><polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"/><polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"/><line class="ql-stroke" x1="10" x2="8" y1="5" y2="13"/></svg>',Nn={align:{"":Ap,center:Tp,right:Sp,justify:Op},background:Np,blockquote:Lp,bold:_p,clean:Cp,code:yl,"code-block":yl,color:'<svg viewbox="0 0 18 18"><line class="ql-color-label ql-stroke ql-transparent" x1="3" x2="15" y1="15" y2="15"/><polyline class="ql-stroke" points="5.5 11 9 3 12.5 11"/><line class="ql-stroke" x1="11.63" x2="6.38" y1="9" y2="9"/></svg>',direction:{"":'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"/><line class="ql-stroke ql-fill" x1="15" x2="11" y1="4" y2="4"/><path class="ql-fill" d="M11,3a3,3,0,0,0,0,6h1V3H11Z"/><rect class="ql-fill" height="11" width="1" x="11" y="4"/><rect class="ql-fill" height="11" width="1" x="13" y="4"/></svg>',rtl:'<svg viewbox="0 0 18 18"><polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"/><line class="ql-stroke ql-fill" x1="9" x2="5" y1="4" y2="4"/><path class="ql-fill" d="M5,3A3,3,0,0,0,5,9H6V3H5Z"/><rect class="ql-fill" height="11" width="1" x="5" y="4"/><rect class="ql-fill" height="11" width="1" x="7" y="4"/></svg>'},formula:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z"/><rect class="ql-fill" height="1.6" rx="0.8" ry="0.8" width="5" x="5.15" y="6.2"/><path class="ql-fill" d="M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z"/></svg>',header:{1:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z"/></svg>',2:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',3:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.65186,12.30664a2.6742,2.6742,0,0,1-2.915,2.68457,3.96592,3.96592,0,0,1-2.25537-.6709.56007.56007,0,0,1-.13232-.83594L11.64648,13c.209-.34082.48389-.36328.82471-.1543a2.32654,2.32654,0,0,0,1.12256.33008c.71484,0,1.12207-.35156,1.12207-.78125,0-.61523-.61621-.86816-1.46338-.86816H13.2085a.65159.65159,0,0,1-.68213-.41895l-.05518-.10937a.67114.67114,0,0,1,.14307-.78125l.71533-.86914a8.55289,8.55289,0,0,1,.68213-.7373V8.58887a3.93913,3.93913,0,0,1-.748.05469H11.9873a.54085.54085,0,0,1-.605-.60547V7.59863a.54085.54085,0,0,1,.605-.60547h3.75146a.53773.53773,0,0,1,.60547.59375v.17676a1.03723,1.03723,0,0,1-.27539.748L14.74854,10.0293A2.31132,2.31132,0,0,1,16.65186,12.30664ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',4:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm7.05371,7.96582v.38477c0,.39648-.165.60547-.46191.60547h-.47314v1.29785a.54085.54085,0,0,1-.605.60547h-.69336a.54085.54085,0,0,1-.605-.60547V12.95605H11.333a.5412.5412,0,0,1-.60547-.60547v-.15332a1.199,1.199,0,0,1,.22021-.748l2.56348-4.05957a.7819.7819,0,0,1,.72607-.39648h1.27637a.54085.54085,0,0,1,.605.60547v3.7627h.33008A.54055.54055,0,0,1,17.05371,11.96582ZM14.28125,8.7207h-.022a4.18969,4.18969,0,0,1-.38525.81348l-1.188,1.80469v.02246h1.5293V9.60059A7.04058,7.04058,0,0,1,14.28125,8.7207Z"/></svg>',5:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M16.74023,12.18555a2.75131,2.75131,0,0,1-2.91553,2.80566,3.908,3.908,0,0,1-2.25537-.68164.54809.54809,0,0,1-.13184-.8252L11.73438,13c.209-.34082.48389-.36328.8252-.1543a2.23757,2.23757,0,0,0,1.1001.33008,1.01827,1.01827,0,0,0,1.1001-.96777c0-.61621-.53906-.97949-1.25439-.97949a2.15554,2.15554,0,0,0-.64893.09961,1.15209,1.15209,0,0,1-.814.01074l-.12109-.04395a.64116.64116,0,0,1-.45117-.71484l.231-3.00391a.56666.56666,0,0,1,.62744-.583H15.541a.54085.54085,0,0,1,.605.60547v.43945a.54085.54085,0,0,1-.605.60547H13.41748l-.04395.72559a1.29306,1.29306,0,0,1-.04395.30859h.022a2.39776,2.39776,0,0,1,.57227-.07715A2.53266,2.53266,0,0,1,16.74023,12.18555ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z"/></svg>',6:'<svg viewBox="0 0 18 18"><path class="ql-fill" d="M14.51758,9.64453a1.85627,1.85627,0,0,0-1.24316.38477H13.252a1.73532,1.73532,0,0,1,1.72754-1.4082,2.66491,2.66491,0,0,1,.5498.06641c.35254.05469.57227.01074.70508-.40723l.16406-.5166a.53393.53393,0,0,0-.373-.75977,4.83723,4.83723,0,0,0-1.17773-.14258c-2.43164,0-3.7627,2.17773-3.7627,4.43359,0,2.47559,1.60645,3.69629,3.19043,3.69629A2.70585,2.70585,0,0,0,16.96,12.19727,2.43861,2.43861,0,0,0,14.51758,9.64453Zm-.23047,3.58691c-.67187,0-1.22168-.81445-1.22168-1.45215,0-.47363.30762-.583.72559-.583.96875,0,1.27734.59375,1.27734,1.12207A.82182.82182,0,0,1,14.28711,13.23145ZM10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Z"/></svg>'},italic:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="13" y1="4" y2="4"/><line class="ql-stroke" x1="5" x2="11" y1="14" y2="14"/><line class="ql-stroke" x1="8" x2="10" y1="14" y2="4"/></svg>',image:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="10" width="12" x="3" y="4"/><circle class="ql-fill" cx="6" cy="7" r="1"/><polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"/></svg>',indent:{"+1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"/></svg>',"-1":'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="3" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="5 7 5 11 3 9 5 7"/></svg>'},link:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="11" y1="7" y2="11"/><path class="ql-even ql-stroke" d="M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z"/><path class="ql-even ql-stroke" d="M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z"/></svg>',list:{bullet:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="6" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="6" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="6" x2="15" y1="14" y2="14"/><line class="ql-stroke" x1="3" x2="3" y1="4" y2="4"/><line class="ql-stroke" x1="3" x2="3" y1="9" y2="9"/><line class="ql-stroke" x1="3" x2="3" y1="14" y2="14"/></svg>',check:'<svg class="" viewbox="0 0 18 18"><line class="ql-stroke" x1="9" x2="15" y1="4" y2="4"/><polyline class="ql-stroke" points="3 4 4 5 6 3"/><line class="ql-stroke" x1="9" x2="15" y1="14" y2="14"/><polyline class="ql-stroke" points="3 14 4 15 6 13"/><line class="ql-stroke" x1="9" x2="15" y1="9" y2="9"/><polyline class="ql-stroke" points="3 9 4 10 6 8"/></svg>',ordered:'<svg viewbox="0 0 18 18"><line class="ql-stroke" x1="7" x2="15" y1="4" y2="4"/><line class="ql-stroke" x1="7" x2="15" y1="9" y2="9"/><line class="ql-stroke" x1="7" x2="15" y1="14" y2="14"/><line class="ql-stroke ql-thin" x1="2.5" x2="4.5" y1="5.5" y2="5.5"/><path class="ql-fill" d="M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z"/><path class="ql-stroke ql-thin" d="M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156"/><path class="ql-stroke ql-thin" d="M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109"/></svg>'},script:{sub:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z"/><path class="ql-fill" d="M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z"/></svg>',super:'<svg viewbox="0 0 18 18"><path class="ql-fill" d="M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z"/><path class="ql-fill" d="M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z"/></svg>'},strike:'<svg viewbox="0 0 18 18"><line class="ql-stroke ql-thin" x1="15.5" x2="2.5" y1="8.5" y2="9.5"/><path class="ql-fill" d="M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z"/><path class="ql-fill" d="M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z"/></svg>',table:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="2" width="3" x="5" y="5"/><rect class="ql-fill" height="2" width="4" x="9" y="5"/><g class="ql-fill ql-transparent"><rect height="2" width="3" x="5" y="8"/><rect height="2" width="4" x="9" y="8"/><rect height="2" width="3" x="5" y="11"/><rect height="2" width="4" x="9" y="11"/></g></svg>',underline:'<svg viewbox="0 0 18 18"><path class="ql-stroke" d="M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3"/><rect class="ql-fill" height="1" rx="0.5" ry="0.5" width="12" x="3" y="15"/></svg>',video:'<svg viewbox="0 0 18 18"><rect class="ql-stroke" height="12" width="12" x="3" y="3"/><rect class="ql-fill" height="12" width="1" x="5" y="3"/><rect class="ql-fill" height="12" width="1" x="12" y="3"/><rect class="ql-fill" height="2" width="8" x="5" y="8"/><rect class="ql-fill" height="1" width="3" x="3" y="5"/><rect class="ql-fill" height="1" width="3" x="3" y="7"/><rect class="ql-fill" height="1" width="3" x="3" y="10"/><rect class="ql-fill" height="1" width="3" x="3" y="12"/><rect class="ql-fill" height="1" width="3" x="12" y="5"/><rect class="ql-fill" height="1" width="3" x="12" y="7"/><rect class="ql-fill" height="1" width="3" x="12" y="10"/><rect class="ql-fill" height="1" width="3" x="12" y="12"/></svg>'},Rp='<svg viewbox="0 0 18 18"><polygon class="ql-stroke" points="7 11 9 13 11 11 7 11"/><polygon class="ql-stroke" points="7 7 9 5 11 7 7 7"/></svg>';let vl=0;function wl(n,e){n.setAttribute(e,`${n.getAttribute(e)!=="true"}`)}class ms{constructor(e){this.select=e,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",()=>{this.togglePicker()}),this.label.addEventListener("keydown",t=>{switch(t.key){case"Enter":this.togglePicker();break;case"Escape":this.escape(),t.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}togglePicker(){this.container.classList.toggle("ql-expanded"),wl(this.label,"aria-expanded"),wl(this.options,"aria-hidden")}buildItem(e){const t=document.createElement("span");t.tabIndex="0",t.setAttribute("role","button"),t.classList.add("ql-picker-item");const r=e.getAttribute("value");return r&&t.setAttribute("data-value",r),e.textContent&&t.setAttribute("data-label",e.textContent),t.addEventListener("click",()=>{this.selectItem(t,!0)}),t.addEventListener("keydown",s=>{switch(s.key){case"Enter":this.selectItem(t,!0),s.preventDefault();break;case"Escape":this.escape(),s.preventDefault();break}}),t}buildLabel(){const e=document.createElement("span");return e.classList.add("ql-picker-label"),e.innerHTML=Rp,e.tabIndex="0",e.setAttribute("role","button"),e.setAttribute("aria-expanded","false"),this.container.appendChild(e),e}buildOptions(){const e=document.createElement("span");e.classList.add("ql-picker-options"),e.setAttribute("aria-hidden","true"),e.tabIndex="-1",e.id=`ql-picker-options-${vl}`,vl+=1,this.label.setAttribute("aria-controls",e.id),this.options=e,Array.from(this.select.options).forEach(t=>{const r=this.buildItem(t);e.appendChild(r),t.selected===!0&&this.selectItem(r)}),this.container.appendChild(e)}buildPicker(){Array.from(this.select.attributes).forEach(e=>{this.container.setAttribute(e.name,e.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}escape(){this.close(),setTimeout(()=>this.label.focus(),1)}close(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}selectItem(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const r=this.container.querySelector(".ql-selected");e!==r&&(r!=null&&r.classList.remove("ql-selected"),e!=null&&(e.classList.add("ql-selected"),this.select.selectedIndex=Array.from(e.parentNode.children).indexOf(e),e.hasAttribute("data-value")?this.label.setAttribute("data-value",e.getAttribute("data-value")):this.label.removeAttribute("data-value"),e.hasAttribute("data-label")?this.label.setAttribute("data-label",e.getAttribute("data-label")):this.label.removeAttribute("data-label"),t&&(this.select.dispatchEvent(new Event("change")),this.close())))}update(){let e;if(this.select.selectedIndex>-1){const r=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];e=this.select.options[this.select.selectedIndex],this.selectItem(r)}else this.selectItem(null);const t=e!=null&&e!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",t)}}class El extends ms{constructor(e,t){super(e),this.label.innerHTML=t,this.container.classList.add("ql-color-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).slice(0,7).forEach(r=>{r.classList.add("ql-primary")})}buildItem(e){const t=super.buildItem(e);return t.style.backgroundColor=e.getAttribute("value")||"",t}selectItem(e,t){super.selectItem(e,t);const r=this.label.querySelector(".ql-color-label"),s=e&&e.getAttribute("data-value")||"";r&&(r.tagName==="line"?r.style.stroke=s:r.style.fill=s)}}class xl extends ms{constructor(e,t){super(e),this.container.classList.add("ql-icon-picker"),Array.from(this.container.querySelectorAll(".ql-picker-item")).forEach(r=>{r.innerHTML=t[r.getAttribute("data-value")||""]}),this.defaultItem=this.container.querySelector(".ql-selected"),this.selectItem(this.defaultItem)}selectItem(e,t){super.selectItem(e,t);const r=e||this.defaultItem;if(r!=null){if(this.label.innerHTML===r.innerHTML)return;this.label.innerHTML=r.innerHTML}}}const qp=n=>{const{overflowY:e}=getComputedStyle(n,null);return e!=="visible"&&e!=="clip"};class Al{constructor(e,t){this.quill=e,this.boundsContainer=t||document.body,this.root=e.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,qp(this.quill.root)&&this.quill.root.addEventListener("scroll",()=>{this.root.style.marginTop=`${-1*this.quill.root.scrollTop}px`}),this.hide()}hide(){this.root.classList.add("ql-hidden")}position(e){const t=e.left+e.width/2-this.root.offsetWidth/2,r=e.bottom+this.quill.root.scrollTop;this.root.style.left=`${t}px`,this.root.style.top=`${r}px`,this.root.classList.remove("ql-flip");const s=this.boundsContainer.getBoundingClientRect(),i=this.root.getBoundingClientRect();let o=0;if(i.right>s.right&&(o=s.right-i.right,this.root.style.left=`${t+o}px`),i.left<s.left&&(o=s.left-i.left,this.root.style.left=`${t+o}px`),i.bottom>s.bottom){const a=i.bottom-i.top,u=e.bottom-e.top+a;this.root.style.top=`${r-u}px`,this.root.classList.add("ql-flip")}return o}show(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}const kp=[!1,"center","right","justify"],Ip=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],Pp=[!1,"serif","monospace"],jp=["1","2","3",!1],Dp=["small",!1,"large","huge"];class Ln extends Br{constructor(e,t){super(e,t);const r=s=>{if(!document.body.contains(e.root)){document.body.removeEventListener("click",r);return}this.tooltip!=null&&!this.tooltip.root.contains(s.target)&&document.activeElement!==this.tooltip.textbox&&!this.quill.hasFocus()&&this.tooltip.hide(),this.pickers!=null&&this.pickers.forEach(i=>{i.container.contains(s.target)||i.close()})};e.emitter.listenDOM("click",document.body,r)}addModule(e){const t=super.addModule(e);return e==="toolbar"&&this.extendToolbar(t),t}buildButtons(e,t){Array.from(e).forEach(r=>{(r.getAttribute("class")||"").split(/\s+/).forEach(i=>{if(i.startsWith("ql-")&&(i=i.slice(3),t[i]!=null))if(i==="direction")r.innerHTML=t[i][""]+t[i].rtl;else if(typeof t[i]=="string")r.innerHTML=t[i];else{const o=r.value||"";o!=null&&t[i][o]&&(r.innerHTML=t[i][o])}})})}buildPickers(e,t){this.pickers=Array.from(e).map(s=>{if(s.classList.contains("ql-align")&&(s.querySelector("option")==null&&_n(s,kp),typeof t.align=="object"))return new xl(s,t.align);if(s.classList.contains("ql-background")||s.classList.contains("ql-color")){const i=s.classList.contains("ql-background")?"background":"color";return s.querySelector("option")==null&&_n(s,Ip,i==="background"?"#ffffff":"#000000"),new El(s,t[i])}return s.querySelector("option")==null&&(s.classList.contains("ql-font")?_n(s,Pp):s.classList.contains("ql-header")?_n(s,jp):s.classList.contains("ql-size")&&_n(s,Dp)),new ms(s)});const r=()=>{this.pickers.forEach(s=>{s.update()})};this.quill.on($.events.EDITOR_CHANGE,r)}}Ln.DEFAULTS=Gt({},Br.DEFAULTS,{modules:{toolbar:{handlers:{formula(){this.quill.theme.tooltip.edit("formula")},image(){let n=this.container.querySelector("input.ql-image[type=file]");n==null&&(n=document.createElement("input"),n.setAttribute("type","file"),n.setAttribute("accept",this.quill.uploader.options.mimetypes.join(", ")),n.classList.add("ql-image"),n.addEventListener("change",()=>{const e=this.quill.getSelection(!0);this.quill.uploader.upload(e,n.files),n.value=""}),this.container.appendChild(n)),n.click()},video(){this.quill.theme.tooltip.edit("video")}}}}});class Tl extends Al{constructor(e,t){super(e,t),this.textbox=this.root.querySelector('input[type="text"]'),this.listen()}listen(){this.textbox.addEventListener("keydown",e=>{e.key==="Enter"?(this.save(),e.preventDefault()):e.key==="Escape"&&(this.cancel(),e.preventDefault())})}cancel(){this.hide(),this.restoreFocus()}edit(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),this.textbox==null)return;t!=null?this.textbox.value=t:e!==this.root.getAttribute("data-mode")&&(this.textbox.value="");const r=this.quill.getBounds(this.quill.selection.savedRange);r!=null&&this.position(r),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute(`data-${e}`)||""),this.root.setAttribute("data-mode",e)}restoreFocus(){this.quill.focus({preventScroll:!0})}save(){let{value:e}=this.textbox;switch(this.root.getAttribute("data-mode")){case"link":{const{scrollTop:t}=this.quill.root;this.linkRange?(this.quill.formatText(this.linkRange,"link",e,$.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",e,$.sources.USER)),this.quill.root.scrollTop=t;break}case"video":e=Bp(e);case"formula":{if(!e)break;const t=this.quill.getSelection(!0);if(t!=null){const r=t.index+t.length;this.quill.insertEmbed(r,this.root.getAttribute("data-mode"),e,$.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(r+1," ",$.sources.USER),this.quill.setSelection(r+2,$.sources.USER)}break}}this.textbox.value="",this.hide()}}function Bp(n){let e=n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||n.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return e?`${e[1]||"https"}://www.youtube.com/embed/${e[2]}?showinfo=0`:(e=n.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?`${e[1]||"https"}://player.vimeo.com/video/${e[2]}/`:n}function _n(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;e.forEach(r=>{const s=document.createElement("option");r===t?s.setAttribute("selected","selected"):s.setAttribute("value",String(r)),n.appendChild(s)})}const $p=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]];class Sl extends Tl{constructor(e,t){super(e,t),this.quill.on($.events.EDITOR_CHANGE,(r,s,i,o)=>{if(r===$.events.SELECTION_CHANGE)if(s!=null&&s.length>0&&o===$.sources.USER){this.show(),this.root.style.left="0px",this.root.style.width="",this.root.style.width=`${this.root.offsetWidth}px`;const a=this.quill.getLines(s.index,s.length);if(a.length===1){const u=this.quill.getBounds(s);u!=null&&this.position(u)}else{const u=a[a.length-1],c=this.quill.getIndex(u),d=Math.min(u.length()-1,s.index+s.length-c),g=this.quill.getBounds(new fr(c,d));g!=null&&this.position(g)}}else document.activeElement!==this.textbox&&this.quill.hasFocus()&&this.hide()})}listen(){super.listen(),this.root.querySelector(".ql-close").addEventListener("click",()=>{this.root.classList.remove("ql-editing")}),this.quill.on($.events.SCROLL_OPTIMIZE,()=>{setTimeout(()=>{if(this.root.classList.contains("ql-hidden"))return;const e=this.quill.getSelection();if(e!=null){const t=this.quill.getBounds(e);t!=null&&this.position(t)}},1)})}cancel(){this.show()}position(e){const t=super.position(e),r=this.root.querySelector(".ql-tooltip-arrow");return r.style.marginLeft="",t!==0&&(r.style.marginLeft=`${-1*t-r.offsetWidth/2}px`),t}}B(Sl,"TEMPLATE",['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""));class Ol extends Ln{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=$p),super(e,t),this.quill.container.classList.add("ql-bubble")}extendToolbar(e){this.tooltip=new Sl(this.quill,this.options.bounds),e.container!=null&&(this.tooltip.root.appendChild(e.container),this.buildButtons(e.container.querySelectorAll("button"),Nn),this.buildPickers(e.container.querySelectorAll("select"),Nn))}}Ol.DEFAULTS=Gt({},Ln.DEFAULTS,{modules:{toolbar:{handlers:{link(n){n?this.quill.theme.tooltip.edit():this.quill.format("link",!1,C.sources.USER)}}}}});const Mp=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]];class Nl extends Tl{constructor(){super(...arguments);B(this,"preview",this.root.querySelector("a.ql-preview"))}listen(){super.listen(),this.root.querySelector("a.ql-action").addEventListener("click",t=>{this.root.classList.contains("ql-editing")?this.save():this.edit("link",this.preview.textContent),t.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",t=>{if(this.linkRange!=null){const r=this.linkRange;this.restoreFocus(),this.quill.formatText(r,"link",!1,$.sources.USER),delete this.linkRange}t.preventDefault(),this.hide()}),this.quill.on($.events.SELECTION_CHANGE,(t,r,s)=>{if(t!=null){if(t.length===0&&s===$.sources.USER){const[i,o]=this.quill.scroll.descendant(Xt,t.index);if(i!=null){this.linkRange=new fr(t.index-o,i.length());const a=Xt.formats(i.domNode);this.preview.textContent=a,this.preview.setAttribute("href",a),this.show();const u=this.quill.getBounds(this.linkRange);u!=null&&this.position(u);return}}else delete this.linkRange;this.hide()}})}show(){super.show(),this.root.removeAttribute("data-mode")}}B(Nl,"TEMPLATE",['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""));class Ll extends Ln{constructor(e,t){t.modules.toolbar!=null&&t.modules.toolbar.container==null&&(t.modules.toolbar.container=Mp),super(e,t),this.quill.container.classList.add("ql-snow")}extendToolbar(e){e.container!=null&&(e.container.classList.add("ql-snow"),this.buildButtons(e.container.querySelectorAll("button"),Nn),this.buildPickers(e.container.querySelectorAll("select"),Nn),this.tooltip=new Nl(this.quill,this.options.bounds),e.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"k",shortKey:!0},(t,r)=>{e.handlers.link.call(e,!r.format.link)}))}}Ll.DEFAULTS=Gt({},Ln.DEFAULTS,{modules:{toolbar:{handlers:{link(n){if(n){const e=this.quill.getSelection();if(e==null||e.length===0)return;let t=this.quill.getText(e);/^\S+@\S+\.\S+$/.test(t)&&t.indexOf("mailto:")!==0&&(t=`mailto:${t}`);const{tooltip:r}=this.quill.theme;r.edit("link",t)}else this.quill.format("link",!1,C.sources.USER)}}}}}),C.register({"attributors/attribute/direction":Wa,"attributors/class/align":Va,"attributors/class/background":Lg,"attributors/class/color":Ng,"attributors/class/direction":Za,"attributors/class/font":Ja,"attributors/class/size":el,"attributors/style/align":Ka,"attributors/style/background":Ti,"attributors/style/color":Ai,"attributors/style/direction":Xa,"attributors/style/font":Qa,"attributors/style/size":tl},!0),C.register({"formats/align":Va,"formats/direction":Za,"formats/indent":yp,"formats/background":Ti,"formats/color":Ai,"formats/font":Ja,"formats/size":el,"formats/blockquote":qi,"formats/code-block":je,"formats/header":ki,"formats/list":An,"formats/bold":Tn,"formats/code":Si,"formats/italic":Ii,"formats/link":Xt,"formats/script":Pi,"formats/strike":ji,"formats/underline":Di,"formats/formula":gs,"formats/image":Bi,"formats/video":ps,"modules/syntax":pl,"modules/table":wp,"modules/toolbar":Mi,"themes/bubble":Ol,"themes/snow":Ll,"ui/icons":Nn,"ui/picker":ms,"ui/icon-picker":xl,"ui/color-picker":El,"ui/tooltip":Al},!0);function _l(n){const{value:e,style:t,...r}=n,s=Te.useRef(null);return Te.useEffect(()=>{const i=s.current,o=i.ownerDocument.createElement("div");Object.entries(t).forEach(([c,d])=>{o.style[c]=d});const a=i.appendChild(o),u=new C(a,{theme:"snow",...r});return e&&(u.root.innerHTML=e),u.on("text-change",()=>{var c;(c=r.onChange)==null||c.call(r,u.root.innerHTML||"")}),()=>{i.innerHTML=""}},[s]),Se.jsx("div",{ref:s,style:{height:"100%"}})}var Cl={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Rl=Te.createContext&&Te.createContext(Cl),Up=["attr","size","title"];function Fp(n,e){if(n==null)return{};var t,r,s=Hp(n,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);for(r=0;r<i.length;r++)t=i[r],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(n,t)&&(s[t]=n[t])}return s}function Hp(n,e){if(n==null)return{};var t={};for(var r in n)if({}.hasOwnProperty.call(n,r)){if(e.indexOf(r)!==-1)continue;t[r]=n[r]}return t}function bs(){return bs=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},bs.apply(null,arguments)}function ql(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),t.push.apply(t,r)}return t}function ys(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ql(Object(t),!0).forEach(function(r){zp(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ql(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function zp(n,e,t){return(e=Vp(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Vp(n){var e=Kp(n,"string");return typeof e=="symbol"?e:e+""}function Kp(n,e){if(typeof n!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function kl(n){return n&&n.map((e,t)=>Te.createElement(e.tag,ys({key:t},e.attr),kl(e.child)))}function Gp(n){return e=>Te.createElement(Wp,bs({attr:ys({},n.attr)},e),kl(n.child))}function Wp(n){var e=t=>{var{attr:r,size:s,title:i}=n,o=Fp(n,Up),a=s||t.size||"1em",u;return t.className&&(u=t.className),n.className&&(u=(u?u+" ":"")+n.className),Te.createElement("svg",bs({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,r,o,{className:u,style:ys(ys({color:n.color||t.color},t.style),n.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),i&&Te.createElement("title",null,i),n.children)};return Rl!==void 0?Te.createElement(Rl.Consumer,null,t=>e(t)):e(Cl)}function Il(n){return Gp({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 0 0-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"},child:[]}]})(n)}const Zp=n=>Array.isArray(n)?n:n&&n.fileList;function Pl(n){var a;const{value:e,...t}=n,r=Zp(e),s=Array.isArray(r)?r.length:0,i=t.maxCount??1;let o;return s<i&&((a=t.listType)!=null&&a.startsWith("picture-")?o=Se.jsx(Il,{}):o=Se.jsx(ze.Button,{icon:Se.jsx(Il,{}),children:" 上传"})),Se.jsx(ze.Upload,{maxCount:1,multiple:!0,showUploadList:!0,...t,fileList:r,onChange:u=>{var c;return(c=t.onChange)==null?void 0:c.call(t,u.fileList)},children:s<i&&o})}const Xp={upload:{renderFormItem:(n,e)=>Se.jsx(Pl,{...e.fieldProps})},editor:{renderFormItem:(n,e)=>Se.jsx(_l,{...e.fieldProps})}};function Ui({children:n}){return Se.jsx(zt.ProConfigProvider,{valueTypeMap:Xp,children:n})}const Yp=()=>ze.Form.useForm().pop(),jl=n=>Se.jsx(Ui,{children:Se.jsx(zt.BetaSchemaForm,{layout:"horizontal",colon:!1,labelCol:{span:3},wrapperCol:{span:6},scrollToFirstError:!0,submitter:{render:(e,t)=>Se.jsx(ze.Form.Item,{wrapperCol:{offset:4,span:8},children:Se.jsx(ze.Space,{children:t})})},...n})});jl.useForm=Yp;function Jp(n){const{items:e,...t}={...n},r=$s.useNavigate(),i=$s.useLocation().pathname.split("/").filter(Boolean).pop(),o=e==null?void 0:e.find(u=>(u==null?void 0:u.key)==i),a=[(o==null?void 0:o.key)??""];return Se.jsxs(ze.Layout,{style:{height:"100vh"},children:[Se.jsxs(ze.Layout.Sider,{children:[Se.jsx(ze.Typography.Title,{style:{color:"white",textAlign:"center"},children:"Rainte"}),Se.jsx(ze.Menu,{mode:"inline",theme:"dark",items:e,defaultSelectedKeys:a,onClick:u=>r(u.key),...t})]}),Se.jsx(ze.Layout,{style:{overflow:"auto"},children:Se.jsx(ze.Layout.Content,{style:{minHeight:"fit-content",padding:"1rem"},children:Se.jsx(ze.Layout.Content,{style:{height:"100%",padding:"1rem",backgroundColor:"white"},children:Se.jsx($s.Outlet,{})})})})]})}function Qp(n){return Se.jsx(Ui,{children:Se.jsx(zt.ProTable,{rowKey:"id",pagination:{pageSize:10},tableAlertRender:({selectedRowKeys:e})=>Se.jsxs(ze.Space,{children:["已选 ",e.length," 项"]}),...n})})}let vs,Dl,Fi;const Bl=()=>{const n=ze.App.useApp();return vs=n.message,Fi=n.modal,Dl=n.notification,null},em=Object.freeze(Object.defineProperty({__proto__:null,default:Bl,get message(){return vs},get modal(){return Fi},get notification(){return Dl},popup:{confirm:n=>Fi.confirm({title:"提示",content:"确认操作?",...n}),success:(n,e)=>(n=n||"操作成功",vs.success(n,e)),error:(n,e)=>{n=n||"操作失败",vs.error(n,e),bo.system.fail(n)},ask:function(n,e){return this.confirm({onOk:n,...e})}},useDialog:Bl},Symbol.toStringTag,{value:"Module"})),J=n=>typeof n=="string",Cn=()=>{let n,e;const t=new Promise((r,s)=>{n=r,e=s});return t.resolve=n,t.reject=e,t},$l=n=>n==null?"":""+n,tm=(n,e,t)=>{n.forEach(r=>{e[r]&&(t[r]=e[r])})},rm=/###/g,Ml=n=>n&&n.indexOf("###")>-1?n.replace(rm,"."):n,Ul=n=>!n||J(n),Rn=(n,e,t)=>{const r=J(e)?e.split("."):e;let s=0;for(;s<r.length-1;){if(Ul(n))return{};const i=Ml(r[s]);!n[i]&&t&&(n[i]=new t),Object.prototype.hasOwnProperty.call(n,i)?n=n[i]:n={},++s}return Ul(n)?{}:{obj:n,k:Ml(r[s])}},Fl=(n,e,t)=>{const{obj:r,k:s}=Rn(n,e,Object);if(r!==void 0||e.length===1){r[s]=t;return}let i=e[e.length-1],o=e.slice(0,e.length-1),a=Rn(n,o,Object);for(;a.obj===void 0&&o.length;)i=`${o[o.length-1]}.${i}`,o=o.slice(0,o.length-1),a=Rn(n,o,Object),a!=null&&a.obj&&typeof a.obj[`${a.k}.${i}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${i}`]=t},nm=(n,e,t,r)=>{const{obj:s,k:i}=Rn(n,e,Object);s[i]=s[i]||[],s[i].push(t)},ws=(n,e)=>{const{obj:t,k:r}=Rn(n,e);if(t&&Object.prototype.hasOwnProperty.call(t,r))return t[r]},sm=(n,e,t)=>{const r=ws(n,t);return r!==void 0?r:ws(e,t)},Hl=(n,e,t)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in n?J(n[r])||n[r]instanceof String||J(e[r])||e[r]instanceof String?t&&(n[r]=e[r]):Hl(n[r],e[r],t):n[r]=e[r]);return n},Fr=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var im={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const om=n=>J(n)?n.replace(/[&<>"'\/]/g,e=>im[e]):n;class am{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const lm=[" ",",","?","!",";"],um=new am(20),cm=(n,e,t)=>{e=e||"",t=t||"";const r=lm.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(r.length===0)return!0;const s=um.getRegExp(`(${r.map(o=>o==="?"?"\\?":o).join("|")})`);let i=!s.test(n);if(!i){const o=n.indexOf(t);o>0&&!s.test(n.substring(0,o))&&(i=!0)}return i},Hi=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const r=e.split(t);let s=n;for(let i=0;i<r.length;){if(!s||typeof s!="object")return;let o,a="";for(let u=i;u<r.length;++u)if(u!==i&&(a+=t),a+=r[u],o=s[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<r.length-1)continue;i+=u-i+1;break}s=o}return s},Es=n=>n==null?void 0:n.replace("_","-"),fm={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){var t,r;(r=(t=console==null?void 0:console[n])==null?void 0:t.apply)==null||r.call(t,console,e)}};class xs{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||fm,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,r,s){return s&&!this.debug?null:(J(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new xs(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new xs(this.logger,e)}}var Et=new xs;class As{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(t)||0;this.observers[r].set(t,s+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),s=1;s<t;s++)r[s-1]=arguments[s];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[a,u]=o;for(let c=0;c<u;c++)a(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,u]=o;for(let c=0;c<u;c++)a.apply(a,[e,...r])})}}class zl extends As{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,r){var c,d;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,o=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],r&&(Array.isArray(r)?a.push(...r):J(r)&&i?a.push(...r.split(i)):a.push(r)));const u=ws(this.data,a);return!u&&!t&&!r&&e.indexOf(".")>-1&&(e=a[0],t=a[1],r=a.slice(2).join(".")),u||!o||!J(r)?u:Hi((d=(c=this.data)==null?void 0:c[e])==null?void 0:d[t],r,i)}addResource(e,t,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let a=[e,t];r&&(a=a.concat(o?r.split(o):r)),e.indexOf(".")>-1&&(a=e.split("."),s=t,t=a[1]),this.addNamespaces(t),Fl(this.data,a,s),i.silent||this.emit("added",e,t,r,s)}addResources(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(J(r[i])||Array.isArray(r[i]))&&this.addResource(e,t,i,r[i],{silent:!0});s.silent||this.emit("added",e,t,r)}addResourceBundle(e,t,r,s,i){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),s=r,r=t,t=a[1]),this.addNamespaces(t);let u=ws(this.data,a)||{};o.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?Hl(u,r,i):u={...u,...r},Fl(this.data,a,u),o.silent||this.emit("added",e,t,r)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}}var Vl={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,r,s){return n.forEach(i=>{var o;e=((o=this.processors[i])==null?void 0:o.process(e,t,r,s))??e}),e}};const Kl={},Gl=n=>!J(n)&&typeof n!="boolean"&&typeof n!="number";class Ts extends As{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),tm(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Et.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,t);return(r==null?void 0:r.res)!==void 0}extractFromKey(e,t){let r=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let i=t.ns||this.options.defaultNS||[];const o=r&&e.indexOf(r)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!cm(e,r,s);if(o&&!a){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:J(i)?[i]:i};const c=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),e=c.join(s)}return{key:e,namespaces:J(i)?[i]:i}}translate(e,t,r){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),u=a[a.length-1],c=t.lng||this.language,d=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((c==null?void 0:c.toLowerCase())==="cimode"){if(d){const b=t.nsSeparator||this.options.nsSeparator;return s?{res:`${u}${b}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:`${u}${b}${o}`}return s?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:o}const g=this.resolve(e,t);let f=g==null?void 0:g.res;const m=(g==null?void 0:g.usedKey)||o,w=(g==null?void 0:g.exactUsedKey)||o,x=["[object Number]","[object Function]","[object RegExp]"],T=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,L=!this.i18nFormat||this.i18nFormat.handleAsObject,P=t.count!==void 0&&!J(t.count),j=Ts.hasDefaultValue(t),z=P?this.pluralResolver.getSuffix(c,t.count,t):"",H=t.ordinal&&P?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",ie=P&&!t.ordinal&&t.count===0,te=ie&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${z}`]||t[`defaultValue${H}`]||t.defaultValue;let oe=f;L&&!f&&j&&(oe=te);const be=Gl(oe),xe=Object.prototype.toString.apply(oe);if(L&&oe&&be&&x.indexOf(xe)<0&&!(J(T)&&Array.isArray(oe))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,oe,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(g.res=b,g.usedParams=this.getUsedParamsDetails(t),g):b}if(i){const b=Array.isArray(oe),N=b?[]:{},A=b?w:m;for(const R in oe)if(Object.prototype.hasOwnProperty.call(oe,R)){const p=`${A}${i}${R}`;j&&!f?N[R]=this.translate(p,{...t,defaultValue:Gl(te)?te[R]:void 0,joinArrays:!1,ns:a}):N[R]=this.translate(p,{...t,joinArrays:!1,ns:a}),N[R]===p&&(N[R]=oe[R])}f=N}}else if(L&&J(T)&&Array.isArray(f))f=f.join(T),f&&(f=this.extendTranslation(f,e,t,r));else{let b=!1,N=!1;!this.isValidLookup(f)&&j&&(b=!0,f=te),this.isValidLookup(f)||(N=!0,f=o);const R=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:f,p=j&&te!==f&&this.options.updateMissing;if(N||b||p){if(this.logger.log(p?"updateKey":"missingKey",c,u,o,p?te:f),i){const k=this.resolve(o,{...t,keySeparator:!1});k&&k.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let E=[];const S=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&S&&S[0])for(let k=0;k<S.length;k++)E.push(S[k]);else this.options.saveMissingTo==="all"?E=this.languageUtils.toResolveHierarchy(t.lng||this.language):E.push(t.lng||this.language);const I=(k,_,G)=>{var Y;const W=j&&G!==f?G:R;this.options.missingKeyHandler?this.options.missingKeyHandler(k,u,_,W,p,t):(Y=this.backendConnector)!=null&&Y.saveMissing&&this.backendConnector.saveMissing(k,u,_,W,p,t),this.emit("missingKey",k,u,_,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?E.forEach(k=>{const _=this.pluralResolver.getSuffixes(k,t);ie&&t[`defaultValue${this.options.pluralSeparator}zero`]&&_.indexOf(`${this.options.pluralSeparator}zero`)<0&&_.push(`${this.options.pluralSeparator}zero`),_.forEach(G=>{I([k],o+G,t[`defaultValue${G}`]||te)})}):I(E,o,te))}f=this.extendTranslation(f,e,t,g,r),N&&f===o&&this.options.appendNamespaceToMissingKey&&(f=`${u}:${o}`),(N||b)&&this.options.parseMissingKeyHandler&&(f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,b?f:void 0))}return s?(g.res=f,g.usedParams=this.getUsedParamsDetails(t),g):f}extendTranslation(e,t,r,s,i){var c,d;var o=this;if((c=this.i18nFormat)!=null&&c.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const g=J(e)&&(((d=r==null?void 0:r.interpolation)==null?void 0:d.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(g){const w=e.match(this.interpolator.nestingRegexp);f=w&&w.length}let m=r.replace&&!J(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),e=this.interpolator.interpolate(e,m,r.lng||this.language||s.usedLng,r),g){const w=e.match(this.interpolator.nestingRegexp),x=w&&w.length;f<x&&(r.nest=!1)}!r.lng&&s&&s.res&&(r.lng=this.language||s.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var w=arguments.length,x=new Array(w),T=0;T<w;T++)x[T]=arguments[T];return(i==null?void 0:i[0])===x[0]&&!r.context?(o.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${t[0]}`),null):o.translate(...x,t)},r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,u=J(a)?[a]:a;return e!=null&&(u!=null&&u.length)&&r.applyPostProcessor!==!1&&(e=Vl.handle(u,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...s,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,o,a;return J(e)&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(u,t),d=c.key;s=d;let g=c.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const f=t.count!==void 0&&!J(t.count),m=f&&!t.ordinal&&t.count===0,w=t.context!==void 0&&(J(t.context)||typeof t.context=="number")&&t.context!=="",x=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);g.forEach(T=>{var L,P;this.isValidLookup(r)||(a=T,!Kl[`${x[0]}-${T}`]&&((L=this.utils)!=null&&L.hasLoadedNamespace)&&!((P=this.utils)!=null&&P.hasLoadedNamespace(a))&&(Kl[`${x[0]}-${T}`]=!0,this.logger.warn(`key "${s}" for languages "${x.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),x.forEach(j=>{var ie;if(this.isValidLookup(r))return;o=j;const z=[d];if((ie=this.i18nFormat)!=null&&ie.addLookupKeys)this.i18nFormat.addLookupKeys(z,d,j,T,t);else{let te;f&&(te=this.pluralResolver.getSuffix(j,t.count,t));const oe=`${this.options.pluralSeparator}zero`,be=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(z.push(d+te),t.ordinal&&te.indexOf(be)===0&&z.push(d+te.replace(be,this.options.pluralSeparator)),m&&z.push(d+oe)),w){const xe=`${d}${this.options.contextSeparator}${t.context}`;z.push(xe),f&&(z.push(xe+te),t.ordinal&&te.indexOf(be)===0&&z.push(xe+te.replace(be,this.options.pluralSeparator)),m&&z.push(xe+oe))}}let H;for(;H=z.pop();)this.isValidLookup(r)||(i=H,r=this.getResource(j,T,H,t))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,r){var i;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return(i=this.i18nFormat)!=null&&i.getResource?this.i18nFormat.getResource(e,t,r,s):this.resourceStore.getResource(e,t,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!J(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of t)delete s[i]}return s}static hasDefaultValue(e){const t="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t===r.substring(0,t.length)&&e[r]!==void 0)return!0;return!1}}class Wl{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Et.create("languageUtils")}getScriptPartFromCode(e){if(e=Es(e),!e||e.indexOf("-")<0)return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Es(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(J(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(r=>{if(t)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(t=s)}),!t&&this.options.supportedLngs&&e.forEach(r=>{if(t)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return t=s;t=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),J(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let r=e[t];return r||(r=e[this.getScriptPartFromCode(t)]),r||(r=e[this.formatLanguageCode(t)]),r||(r=e[this.getLanguagePartFromCode(t)]),r||(r=e.default),r||[]}toResolveHierarchy(e,t){const r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),s=[],i=o=>{o&&(this.isSupportedCode(o)?s.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return J(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):J(e)&&i(this.formatLanguageCode(e)),r.forEach(o=>{s.indexOf(o)<0&&i(this.formatLanguageCode(o))}),s}}const Zl={zero:0,one:1,two:2,few:3,many:4,other:5},Xl={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class hm{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=Et.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=Es(e==="dev"?"en":e),s=t.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let o;try{o=new Intl.PluralRules(r,{type:s})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Xl;if(!e.match(/-|_/))return Xl;const u=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(u,t)}return this.pluralRulesCache[i]=o,o}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${t}${s}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(e,t);return r||(r=this.getRule("dev",t)),r?r.resolvedOptions().pluralCategories.sort((s,i)=>Zl[s]-Zl[i]).map(s=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${s}`):[]}getSuffix(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,r))}}const Yl=function(n,e,t){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=sm(n,e,t);return!i&&s&&J(t)&&(i=Hi(n,t,r),i===void 0&&(i=Hi(e,t,r))),i},zi=n=>n.replace(/\$/g,"$$$$");class dm{constructor(){var t;let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Et.create("interpolator"),this.options=e,this.format=((t=e==null?void 0:e.interpolation)==null?void 0:t.format)||(r=>r),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:o,suffix:a,suffixEscaped:u,formatSeparator:c,unescapeSuffix:d,unescapePrefix:g,nestingPrefix:f,nestingPrefixEscaped:m,nestingSuffix:w,nestingSuffixEscaped:x,nestingOptionsSeparator:T,maxReplaces:L,alwaysFormat:P}=e.interpolation;this.escape=t!==void 0?t:om,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?Fr(i):o||"{{",this.suffix=a?Fr(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=d?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=f?Fr(f):m||Fr("$t("),this.nestingSuffix=w?Fr(w):x||Fr(")"),this.nestingOptionsSeparator=T||",",this.maxReplaces=L||1e3,this.alwaysFormat=P!==void 0?P:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,r)=>(t==null?void 0:t.source)===r?(t.lastIndex=0,t):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,r,s){var m;let i,o,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=w=>{if(w.indexOf(this.formatSeparator)<0){const P=Yl(t,u,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(P,void 0,r,{...s,...t,interpolationkey:w}):P}const x=w.split(this.formatSeparator),T=x.shift().trim(),L=x.join(this.formatSeparator).trim();return this.format(Yl(t,u,T,this.options.keySeparator,this.options.ignoreJSONStructure),L,r,{...s,...t,interpolationkey:T})};this.resetRegExp();const d=(s==null?void 0:s.missingInterpolationHandler)||this.options.missingInterpolationHandler,g=((m=s==null?void 0:s.interpolation)==null?void 0:m.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>zi(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?zi(this.escape(w)):zi(w)}].forEach(w=>{for(a=0;i=w.regex.exec(e);){const x=i[1].trim();if(o=c(x),o===void 0)if(typeof d=="function"){const L=d(e,i,s);o=J(L)?L:""}else if(s&&Object.prototype.hasOwnProperty.call(s,x))o="";else if(g){o=i[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${e}`),o="";else!J(o)&&!this.useRawValueToEscape&&(o=$l(o));const T=w.safeValue(o);if(e=e.replace(i[0],T),g?(w.regex.lastIndex+=o.length,w.regex.lastIndex-=i[0].length):w.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,o;const a=(u,c)=>{const d=this.nestingOptionsSeparator;if(u.indexOf(d)<0)return u;const g=u.split(new RegExp(`${d}[ ]*{`));let f=`{${g[1]}`;u=g[0],f=this.interpolate(f,o);const m=f.match(/'/g),w=f.match(/"/g);(((m==null?void 0:m.length)??0)%2===0&&!w||w.length%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),c&&(o={...c,...o})}catch(x){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,x),`${u}${d}${f}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u};for(;s=this.nestingRegexp.exec(e);){let u=[];o={...r},o=o.replace&&!J(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const d=s[1].split(this.formatSeparator).map(g=>g.trim());s[1]=d.shift(),u=d,c=!0}if(i=t(a.call(this,s[1].trim(),o),o),i&&s[0]===e&&!J(i))return i;J(i)||(i=$l(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),c&&(i=u.reduce((d,g)=>this.format(d,g,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}const gm=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const r=n.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?t.currency||(t.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?t.range||(t.range=s.trim()):s.split(";").forEach(o=>{if(o){const[a,...u]=o.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),d=a.trim();t[d]||(t[d]=c),c==="false"&&(t[d]=!1),c==="true"&&(t[d]=!0),isNaN(c)||(t[d]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}},Hr=n=>{const e={};return(t,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const o=r+JSON.stringify(i);let a=e[o];return a||(a=n(Es(r),s),e[o]=a),a(t)}};class pm{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Et.create("formatter"),this.options=e,this.formats={number:Hr((t,r)=>{const s=new Intl.NumberFormat(t,{...r});return i=>s.format(i)}),currency:Hr((t,r)=>{const s=new Intl.NumberFormat(t,{...r,style:"currency"});return i=>s.format(i)}),datetime:Hr((t,r)=>{const s=new Intl.DateTimeFormat(t,{...r});return i=>s.format(i)}),relativetime:Hr((t,r)=>{const s=new Intl.RelativeTimeFormat(t,{...r});return i=>s.format(i,r.range||"day")}),list:Hr((t,r)=>{const s=new Intl.ListFormat(t,{...r});return i=>s.format(i)})},this.init(e)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Hr(t)}format(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(a=>a.indexOf(")")>-1)){const a=i.findIndex(u=>u.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,a)].join(this.formatSeparator)}return i.reduce((a,u)=>{var g;const{formatName:c,formatOptions:d}=gm(u);if(this.formats[c]){let f=a;try{const m=((g=s==null?void 0:s.formatParams)==null?void 0:g[s.interpolationkey])||{},w=m.locale||m.lng||s.locale||s.lng||r;f=this.formats[c](a,w,{...d,...s,...m})}catch(m){this.logger.warn(m)}return f}else this.logger.warn(`there was no format function for ${c}`);return a},e)}}const mm=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class bm extends As{constructor(e,t,r){var i,o;let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=Et.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],(o=(i=this.backend)==null?void 0:i.init)==null||o.call(i,r,s.backend,s)}queueLoad(e,t,r,s){const i={},o={},a={},u={};return e.forEach(c=>{let d=!0;t.forEach(g=>{const f=`${c}|${g}`;!r.reload&&this.store.hasResourceBundle(c,g)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,d=!1,o[f]===void 0&&(o[f]=!0),i[f]===void 0&&(i[f]=!0),u[g]===void 0&&(u[g]=!0)))}),d||(a[c]=!0)}),(Object.keys(i).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(e,t,r){const s=e.split("|"),i=s[0],o=s[1];t&&this.emit("failedLoading",i,o,t),!t&&r&&this.store.addResourceBundle(i,o,r,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&r&&(this.state[e]=0);const a={};this.queue.forEach(u=>{nm(u.loaded,[i],o),mm(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const d=u.loaded[c];d.length&&d.forEach(g=>{a[c][g]===void 0&&(a[c][g]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(e,t,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:r,tried:s,wait:i,callback:o});return}this.readingCalls++;const a=(c,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(c&&d&&s<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,r,s+1,i*2,o)},i);return}o(c,d)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const c=u(e,t);c&&typeof c.then=="function"?c.then(d=>a(null,d)).catch(a):a(null,c)}catch(c){a(c)}return}return u(e,t,a)}prepareLoading(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();J(e)&&(e=this.languageUtils.toResolveHierarchy(e)),J(t)&&(t=[t]);const i=this.queueLoad(e,t,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(o=>{this.loadOne(o)})}load(e,t,r){this.prepareLoading(e,t,{},r)}reload(e,t,r){this.prepareLoading(e,t,{reload:!0},r)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${i} for language ${s} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${s}`,a),this.loaded(e,o,a)})}saveMissing(e,t,r,s,i){var u,c,d,g,f;let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if((c=(u=this.services)==null?void 0:u.utils)!=null&&c.hasLoadedNamespace&&!((g=(d=this.services)==null?void 0:d.utils)!=null&&g.hasLoadedNamespace(t))){this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const m={...o,isUpdate:i},w=this.backend.create.bind(this.backend);if(w.length<6)try{let x;w.length===5?x=w(e,t,r,s,m):x=w(e,t,r,s),x&&typeof x.then=="function"?x.then(T=>a(null,T)).catch(a):a(null,x)}catch(x){a(x)}else w(e,t,r,s,a,m)}!e||!e[0]||this.store.addResource(e[0],t,r,s)}}}const Jl=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),J(n[1])&&(e.defaultValue=n[1]),J(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(r=>{e[r]=t[r]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Ql=n=>{var e,t;return J(n.ns)&&(n.ns=[n.ns]),J(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),J(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),((t=(e=n.supportedLngs)==null?void 0:e.indexOf)==null?void 0:t.call(e,"cimode"))<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n},Ss=()=>{},ym=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class qn extends As{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ql(e),this.services={},this.logger=Et,this.modules={external:[]},ym(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(r=t,t={}),t.defaultNS==null&&t.ns&&(J(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const s=Jl();this.options={...s,...this.options,...Ql(t)},this.options.interpolation={...s.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const i=d=>d?typeof d=="function"?new d:d:null;if(!this.options.isClone){this.modules.logger?Et.init(i(this.modules.logger),this.options):Et.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:d=pm;const g=new Wl(this.options);this.store=new zl(this.options.resources,this.options);const f=this.services;f.logger=Et,f.resourceStore=this.store,f.languageUtils=g,f.pluralResolver=new hm(g,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(f.formatter=i(d),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new dm(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new bm(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(m){for(var w=arguments.length,x=new Array(w>1?w-1:0),T=1;T<w;T++)x[T-1]=arguments[T];e.emit(m,...x)}),this.modules.languageDetector&&(f.languageDetector=i(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=i(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Ts(this.services,this.options),this.translator.on("*",function(m){for(var w=arguments.length,x=new Array(w>1?w-1:0),T=1;T<w;T++)x[T-1]=arguments[T];e.emit(m,...x)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Ss),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(d=>{this[d]=function(){return e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const u=Cn(),c=()=>{const d=(g,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(f),r(g,f)};if(this.languages&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),u}loadResources(e){var i,o;let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ss;const s=J(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((s==null?void 0:s.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],u=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(g=>{g!=="cimode"&&a.indexOf(g)<0&&a.push(g)})};s?u(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>u(d)),(o=(i=this.options.preload)==null?void 0:i.forEach)==null||o.call(i,c=>u(c)),this.services.backendConnector.load(a,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(e,t,r){const s=Cn();return typeof e=="function"&&(r=e,e=void 0),typeof t=="function"&&(r=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),r||(r=Ss),this.services.backendConnector.reload(e,t,i=>{s.resolve(),r(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&Vl.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let t=0;t<this.languages.length;t++){const r=this.languages[t];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,t){var r=this;this.isLanguageChangingTo=e;const s=Cn();this.emit("languageChanging",e);const i=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,c)=>{c?(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),t&&t(u,function(){return r.t(...arguments)})},a=u=>{var d,g;!e&&!u&&this.services.languageDetector&&(u=[]);const c=J(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),(g=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||g.call(d,c)),this.loadResources(c,f=>{o(f,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),s}getFixedT(e,t,r){var s=this;const i=function(o,a){let u;if(typeof a!="object"){for(var c=arguments.length,d=new Array(c>2?c-2:0),g=2;g<c;g++)d[g-2]=arguments[g];u=s.options.overloadTranslationOptionHandler([o,a].concat(d))}else u={...a};u.lng=u.lng||i.lng,u.lngs=u.lngs||i.lngs,u.ns=u.ns||i.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||r||i.keyPrefix);const f=s.options.keySeparator||".";let m;return u.keyPrefix&&Array.isArray(o)?m=o.map(w=>`${u.keyPrefix}${f}${w}`):m=u.keyPrefix?`${u.keyPrefix}${f}${o}`:o,s.t(m,u)};return J(e)?i.lng=e:i.lngs=e,i.ns=t,i.keyPrefix=r,i}t(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.translate(...t)}exists(){var s;for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(s=this.translator)==null?void 0:s.exists(...t)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=t.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const o=(a,u)=>{const c=this.services.backendConnector.state[`${a}|${u}`];return c===-1||c===0||c===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(r,e)&&(!s||o(i,e)))}loadNamespaces(e,t){const r=Cn();return this.options.ns?(J(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),t&&t(s)}),r):(t&&t(),Promise.resolve())}loadLanguages(e,t){const r=Cn();J(e)&&(e=[e]);const s=this.options.preload||[],i=e.filter(o=>s.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return i.length?(this.options.preload=s.concat(i),this.loadResources(o=>{r.resolve(),t&&t(o)}),r):(t&&t(),Promise.resolve())}dir(e){var s,i;if(e||(e=this.resolvedLanguage||(((s=this.languages)==null?void 0:s.length)>0?this.languages[0]:this.language)),!e)return"rtl";const t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((i=this.services)==null?void 0:i.languageUtils)||new Wl(Jl());return t.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new qn(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ss;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new qn(s);if((e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(a=>{i[a]=this[a]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r){const a=Object.keys(this.store.data).reduce((u,c)=>(u[c]={...this.store.data[c]},Object.keys(u[c]).reduce((d,g)=>(d[g]={...u[c][g]},d),{})),{});i.store=new zl(a,s),i.services.resourceStore=i.store}return i.translator=new Ts(i.services,s),i.translator.on("*",function(a){for(var u=arguments.length,c=new Array(u>1?u-1:0),d=1;d<u;d++)c[d-1]=arguments[d];i.emit(a,...c)}),i.init(s,t),i.translator.options=s,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const De=qn.createInstance();De.createInstance=qn.createInstance;const vm=De.createInstance,wm=De.dir,Em=De.init,xm=De.loadResources,Am=De.reloadResources,Tm=De.use,Sm=De.changeLanguage,Om=De.getFixedT,Nm=De.t,Lm=De.exists,_m=De.setDefaultNamespace,Cm=De.hasLoadedNamespace,Rm=De.loadNamespaces,qm=De.loadLanguages;function km(n,e){var t=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=Im(n))||e){t&&(n=t);var r=0,s=function(){};return{s,n:function(){return r>=n.length?{done:!0}:{done:!1,value:n[r++]}},e:function(c){throw c},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
79
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,o=!0,a=!1;return{s:function(){t=t.call(n)},n:function(){var c=t.next();return o=c.done,c},e:function(c){a=!0,i=c},f:function(){try{o||t.return==null||t.return()}finally{if(a)throw i}}}}function Im(n,e){if(n){if(typeof n=="string")return eu(n,e);var t={}.toString.call(n).slice(8,-1);return t==="Object"&&n.constructor&&(t=n.constructor.name),t==="Map"||t==="Set"?Array.from(n):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?eu(n,e):void 0}}function eu(n,e){(e==null||e>n.length)&&(e=n.length);for(var t=0,r=Array(e);t<e;t++)r[t]=n[t];return r}function Vi(n){"@babel/helpers - typeof";return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vi(n)}var tu=["__proto__","constructor","prototype"];function ru(n){return!(typeof n!="string"||n.length===0||n.length>128||tu.indexOf(n)>-1||n.indexOf("..")>-1||n.indexOf("\\")>-1||/[?#%\s@]/.test(n)||/[\x00-\x1F\x7F]/.test(n))}function nu(n){return!(!ru(n)||n.indexOf("/")>-1)}function Pm(n){return ru(n)}var jm={lng:nu,ns:Pm};function Os(n){return typeof n!="string"?n:n.replace(/[\r\n\x00-\x1F\x7F]/g," ")}function Dm(n){if(typeof n!="string"||n.length===0)return n;try{var e=new URL(n);return e.username||e.password?(e.username="",e.password="",e.toString()):n}catch{return n.replace(/(\/\/)[^/@\s]+@/g,"$1")}}function su(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Vi(XMLHttpRequest))==="object"}function Bm(n){return!!n&&typeof n.then=="function"}function $m(n){return Bm(n)?n:Promise.resolve(n)}var Mm=/\{\{(.+?)\}\}/g;function iu(n,e){var t=!1,r=n.replace(Mm,function(s,i){var o=i.trim();if(tu.indexOf(o)>-1)return s;var a=e[o];if(a==null)return s;var u=jm[o]||nu,c=String(a).split("+"),d=km(c),g;try{for(d.s();!(g=d.n()).done;){var f=g.value;if(!u(f))return t=!0,s}}catch(m){d.e(m)}finally{d.f()}return c.join("+")});return t?null:r}function ou(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),t.push.apply(t,r)}return t}function au(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ou(Object(t),!0).forEach(function(r){Um(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ou(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Um(n,e,t){return(e=Fm(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Fm(n){var e=Hm(n,"string");return pr(e)=="symbol"?e:e+""}function Hm(n,e){if(pr(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(pr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function pr(n){"@babel/helpers - typeof";return pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pr(n)}var Yt=typeof fetch=="function"?fetch:void 0;typeof global<"u"&&global.fetch?Yt=global.fetch:typeof window<"u"&&window.fetch&&(Yt=window.fetch);var kn;su()&&(typeof global<"u"&&global.XMLHttpRequest?kn=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(kn=window.XMLHttpRequest));var Ns;if(typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Ns=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Ns=window.ActiveXObject)),typeof Yt!="function"&&(Yt=void 0),!Yt&&!kn&&!Ns)try{Promise.resolve().then(()=>m1).then(function(n){Yt=n.default}).catch(function(){})}catch{}var lu=["__proto__","constructor","prototype"],Ki=function(e,t){if(t&&pr(t)==="object"){for(var r="",s=0,i=Object.keys(t);s<i.length;s++){var o=i[s];lu.indexOf(o)>-1||(r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(t[o]))}if(!r)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+r.slice(1)}return e},uu=function(e,t,r,s){var i=function(u){if(!u.ok)return r(u.statusText||"Error",{status:u.status});u.text().then(function(c){r(null,{status:u.status,data:c})}).catch(r)};if(s){var o=s(e,t);if(o instanceof Promise){o.then(i).catch(r);return}}typeof fetch=="function"?fetch(e,t).then(i).catch(r):Yt(e,t).then(i).catch(r)},zm=function(e,t,r,s){e.queryStringParams&&(t=Ki(t,e.queryStringParams));var i=au({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var o=typeof e.requestOptions=="function"?e.requestOptions(r):e.requestOptions,a=au({method:r?"POST":"GET",body:r?e.stringify(r):void 0,headers:i},e._omitFetchOptions?{}:o),u=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{uu(t,a,s,u)}catch(c){if(!o||Object.keys(o).length===0||!c.message||c.message.indexOf("not implemented")<0)return s(c);try{Object.keys(o).forEach(function(d){delete a[d]}),uu(t,a,s,u),e._omitFetchOptions=!0}catch(d){s(d)}}},Vm=function(e,t,r,s){r&&pr(r)==="object"&&(r=Ki("",r).slice(1)),e.queryStringParams&&(t=Ki(t,e.queryStringParams));try{var i=kn?new kn:new Ns("MSXML2.XMLHTTP.3.0");i.open(r?"POST":"GET",t,1),e.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!e.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var o=e.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a=0,u=Object.keys(o);a<u.length;a++){var c=u[a];lu.indexOf(c)>-1||i.setRequestHeader(c,o[c])}i.onreadystatechange=function(){i.readyState>3&&s(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(d){console&&console.log(d)}},Km=function(e,t,r,s){if(typeof r=="function"&&(s=r,r=void 0),s=s||function(){},Yt&&t.indexOf("file:")!==0)return zm(e,t,r,s);if(su()||typeof ActiveXObject=="function")return Vm(e,t,r,s);s(new Error("No fetch and no xhr implementation found!"))};function zr(n){"@babel/helpers - typeof";return zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zr(n)}function cu(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),t.push.apply(t,r)}return t}function Gi(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?cu(Object(t),!0).forEach(function(r){fu(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):cu(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Gm(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Wm(n,e){for(var t=0;t<e.length;t++){var r=e[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,hu(r.key),r)}}function Zm(n,e,t){return e&&Wm(n.prototype,e),Object.defineProperty(n,"prototype",{writable:!1}),n}function fu(n,e,t){return(e=hu(e))in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function hu(n){var e=Xm(n,"string");return zr(e)=="symbol"?e:e+""}function Xm(n,e){if(zr(n)!="object"||!n)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e);if(zr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}var Ym=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,r,s){return fu({},r,s||"")},parseLoadPayload:function(t,r){},request:Km,reloadInterval:typeof window<"u"?!1:3600*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},du=(function(){function n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Gm(this,n),this.services=e,this.options=t,this.allOptions=r,this.type="backend",this.init(e,t,r)}return Zm(n,[{key:"init",value:function(t){var r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=t,this.options=Gi(Gi(Gi({},Ym()),this.options||{}),s),this.allOptions=i,this.services&&this.options.reloadInterval){var o=setInterval(function(){return r.reload()},this.options.reloadInterval);zr(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(t,r,s){this._readAny(t,t,r,r,s)}},{key:"read",value:function(t,r,s){this._readAny([t],t,[r],r,s)}},{key:"_readAny",value:function(t,r,s,i,o){var a=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(t,s)),u=$m(u),u.then(function(c){if(!c)return o(null,{});var d=iu(c,{lng:t.join("+"),ns:s.join("+")});if(d==null){var g=t.map(Os).join(", "),f=s.map(Os).join(", ");return o(new Error("i18next-http-backend: unsafe lng/ns value — refusing to build request URL for languages=["+g+"] namespaces=["+f+"]"),!1)}a.loadUrl(d,o,r,i)})}},{key:"loadUrl",value:function(t,r,s,i){var o=this,a=typeof s=="string"?[s]:s,u=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(a,u),d=Os(Dm(t));this.options.request(this.options,t,c,function(g,f){if(f&&(f.status>=500&&f.status<600||!f.status))return r("failed loading "+d+"; status code: "+f.status,!0);if(f&&f.status>=400&&f.status<500)return r("failed loading "+d+"; status code: "+f.status,!1);if(!f&&g&&g.message){var m=g.message.toLowerCase(),w=["failed","fetch","network","load"].find(function(L){return m.indexOf(L)>-1});if(w)return r("failed loading "+d+": "+Os(g.message),!0)}if(g)return r(g,!1);var x,T;try{typeof f.data=="string"?x=o.options.parse(f.data,s,i):x=f.data}catch{T="failed parsing "+d+" to json"}if(T)return r(T,!1);r(null,x)})}},{key:"create",value:function(t,r,s,i,o){var a=this;if(this.options.addPath){typeof t=="string"&&(t=[t]);var u=this.options.parsePayload(r,s,i),c=0,d=[],g=[];t.forEach(function(f){var m=a.options.addPath;typeof a.options.addPath=="function"&&(m=a.options.addPath(f,r));var w=iu(m,{lng:f,ns:r});if(w==null){c+=1,o&&c===t.length&&o(d,g);return}a.options.request(a.options,w,u,function(x,T){c+=1,d.push(x),g.push(T),c===t.length&&typeof o=="function"&&o(d,g)})})}}},{key:"reload",value:function(){var t=this,r=this.services,s=r.backendConnector,i=r.languageUtils,o=r.logger,a=s.language;if(!(a&&a.toLowerCase()==="cimode")){var u=[],c=function(g){var f=i.toResolveHierarchy(g);f.forEach(function(m){u.indexOf(m)<0&&u.push(m)})};c(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return c(d)}),u.forEach(function(d){t.allOptions.ns.forEach(function(g){s.read(d,g,"read",null,null,function(f,m){f&&o.warn("loading namespace ".concat(g," for language ").concat(d," failed"),f),!f&&m&&o.log("loaded namespace ".concat(g," for language ").concat(d),m),s.loaded("".concat(d,"|").concat(g),f,m)})})})}}}])})();du.type="backend";const{slice:Jm,forEach:Qm}=[];function e1(n){return Qm.call(Jm.call(arguments,1),e=>{if(e)for(const t in e)n[t]===void 0&&(n[t]=e[t])}),n}function t1(n){return typeof n!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(t=>t.test(n))}const gu=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,r1=function(n,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},s=encodeURIComponent(e);let i=`${n}=${s}`;if(r.maxAge>0){const o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(o)}`}if(r.domain){if(!gu.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!gu.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(i+="; Partitioned"),i},pu={create(n,e,t,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(s.expires=new Date,s.expires.setTime(s.expires.getTime()+t*60*1e3)),r&&(s.domain=r),document.cookie=r1(n,e,s)},read(n){const e=`${n}=`,t=document.cookie.split(";");for(let r=0;r<t.length;r++){let s=t[r];for(;s.charAt(0)===" ";)s=s.substring(1,s.length);if(s.indexOf(e)===0)return s.substring(e.length,s.length)}return null},remove(n,e){this.create(n,"",-1,e)}};var n1={name:"cookie",lookup(n){let{lookupCookie:e}=n;if(e&&typeof document<"u")return pu.read(e)||void 0},cacheUserLanguage(n,e){let{lookupCookie:t,cookieMinutes:r,cookieDomain:s,cookieOptions:i}=e;t&&typeof document<"u"&&pu.create(t,n,r,s,i)}},s1={name:"querystring",lookup(n){var r;let{lookupQuerystring:e}=n,t;if(typeof window<"u"){let{search:s}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));const o=s.substring(1).split("&");for(let a=0;a<o.length;a++){const u=o[a].indexOf("=");u>0&&o[a].substring(0,u)===e&&(t=o[a].substring(u+1))}}return t}},i1={name:"hash",lookup(n){var s;let{lookupHash:e,lookupFromHashIndex:t}=n,r;if(typeof window<"u"){const{hash:i}=window.location;if(i&&i.length>2){const o=i.substring(1);if(e){const a=o.split("&");for(let u=0;u<a.length;u++){const c=a[u].indexOf("=");c>0&&a[u].substring(0,c)===e&&(r=a[u].substring(c+1))}}if(r)return r;if(!r&&t>-1){const a=i.match(/\/([a-zA-Z-]*)/g);return Array.isArray(a)?(s=a[typeof t=="number"?t:0])==null?void 0:s.replace("/",""):void 0}}}return r}};let Vr=null;const mu=()=>{if(Vr!==null)return Vr;try{if(Vr=typeof window<"u"&&window.localStorage!==null,!Vr)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{Vr=!1}return Vr};var o1={name:"localStorage",lookup(n){let{lookupLocalStorage:e}=n;if(e&&mu())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupLocalStorage:t}=e;t&&mu()&&window.localStorage.setItem(t,n)}};let Kr=null;const bu=()=>{if(Kr!==null)return Kr;try{if(Kr=typeof window<"u"&&window.sessionStorage!==null,!Kr)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{Kr=!1}return Kr};var a1={name:"sessionStorage",lookup(n){let{lookupSessionStorage:e}=n;if(e&&bu())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(n,e){let{lookupSessionStorage:t}=e;t&&bu()&&window.sessionStorage.setItem(t,n)}},l1={name:"navigator",lookup(n){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:r,language:s}=navigator;if(t)for(let i=0;i<t.length;i++)e.push(t[i]);r&&e.push(r),s&&e.push(s)}return e.length>0?e:void 0}},u1={name:"htmlTag",lookup(n){let{htmlTag:e}=n,t;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(t=r.getAttribute("lang")),t}},c1={name:"path",lookup(n){var s;let{lookupFromPathIndex:e}=n;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(s=t[typeof e=="number"?e:0])==null?void 0:s.replace("/",""):void 0}},f1={name:"subdomain",lookup(n){var s,i;let{lookupFromSubdomainIndex:e}=n;const t=typeof e=="number"?e+1:1,r=typeof window<"u"&&((i=(s=window.location)==null?void 0:s.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[t]}};let yu=!1;try{document.cookie,yu=!0}catch{}const vu=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];yu||vu.splice(1,1);const h1=()=>({order:vu,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class wu{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=e1(t,this.options||{},h1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=s=>s.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(n1),this.addDetector(s1),this.addDetector(o1),this.addDetector(a1),this.addDetector(l1),this.addDetector(u1),this.addDetector(c1),this.addDetector(f1),this.addDetector(i1)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,t=[];return e.forEach(r=>{if(this.detectors[r]){let s=this.detectors[r].lookup(this.options);s&&typeof s=="string"&&(s=[s]),s&&(t=t.concat(s))}}),t=t.filter(r=>r!=null&&!t1(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}wu.type="languageDetector";const Eu="i18nextLng",Wi="zh";De.use(du).use(wu).init({lng:bo.storage.local.getRaw(Eu,Wi),fallbackLng:Wi,backend:{loadPath:"/locales/{{lng}}/{{ns}}.json"},interpolation:{escapeValue:!1}});const d1=Object.freeze(Object.defineProperty({__proto__:null,KEY:Eu,LNG_ZH:Wi,changeLanguage:Sm,createInstance:vm,dir:wm,exists:Lm,getFixedT:Om,hasLoadedNamespace:Cm,init:Em,loadLanguages:qm,loadNamespaces:Rm,loadResources:xm,reloadResources:Am,setDefaultNamespace:_m,t:Nm,use:Tm},Symbol.toStringTag,{value:"Module"})),g1=Object.freeze(Object.defineProperty({__proto__:null,onUpload:async n=>{const{file:e,onProgress:t,onSuccess:r}=n;let s=0;const i=setInterval(()=>{s+=Math.floor(Math.random()*10),s>=100&&(s=99),t({percent:s})},100);e.url=URL.createObjectURL(e),r==null||r({url:e.url}),clearInterval(i)}},Symbol.toStringTag,{value:"Module"}));var Ls={exports:{}},xu;function p1(){return xu||(xu=1,(function(n,e){var t=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Ge<"u"&&Ge,r=(function(){function i(){this.fetch=!1,this.DOMException=t.DOMException}return i.prototype=t,new i})();(function(i){(function(o){var a=typeof i<"u"&&i||typeof self<"u"&&self||typeof Ge<"u"&&Ge||{},u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(p){return p&&DataView.prototype.isPrototypeOf(p)}if(u.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],g=ArrayBuffer.isView||function(p){return p&&d.indexOf(Object.prototype.toString.call(p))>-1};function f(p){if(typeof p!="string"&&(p=String(p)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(p)||p==="")throw new TypeError('Invalid character in header field name: "'+p+'"');return p.toLowerCase()}function m(p){return typeof p!="string"&&(p=String(p)),p}function w(p){var E={next:function(){var S=p.shift();return{done:S===void 0,value:S}}};return u.iterable&&(E[Symbol.iterator]=function(){return E}),E}function x(p){this.map={},p instanceof x?p.forEach(function(E,S){this.append(S,E)},this):Array.isArray(p)?p.forEach(function(E){if(E.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+E.length);this.append(E[0],E[1])},this):p&&Object.getOwnPropertyNames(p).forEach(function(E){this.append(E,p[E])},this)}x.prototype.append=function(p,E){p=f(p),E=m(E);var S=this.map[p];this.map[p]=S?S+", "+E:E},x.prototype.delete=function(p){delete this.map[f(p)]},x.prototype.get=function(p){return p=f(p),this.has(p)?this.map[p]:null},x.prototype.has=function(p){return this.map.hasOwnProperty(f(p))},x.prototype.set=function(p,E){this.map[f(p)]=m(E)},x.prototype.forEach=function(p,E){for(var S in this.map)this.map.hasOwnProperty(S)&&p.call(E,this.map[S],S,this)},x.prototype.keys=function(){var p=[];return this.forEach(function(E,S){p.push(S)}),w(p)},x.prototype.values=function(){var p=[];return this.forEach(function(E){p.push(E)}),w(p)},x.prototype.entries=function(){var p=[];return this.forEach(function(E,S){p.push([S,E])}),w(p)},u.iterable&&(x.prototype[Symbol.iterator]=x.prototype.entries);function T(p){if(!p._noBody){if(p.bodyUsed)return Promise.reject(new TypeError("Already read"));p.bodyUsed=!0}}function L(p){return new Promise(function(E,S){p.onload=function(){E(p.result)},p.onerror=function(){S(p.error)}})}function P(p){var E=new FileReader,S=L(E);return E.readAsArrayBuffer(p),S}function j(p){var E=new FileReader,S=L(E),I=/charset=([A-Za-z0-9_-]+)/.exec(p.type),k=I?I[1]:"utf-8";return E.readAsText(p,k),S}function z(p){for(var E=new Uint8Array(p),S=new Array(E.length),I=0;I<E.length;I++)S[I]=String.fromCharCode(E[I]);return S.join("")}function H(p){if(p.slice)return p.slice(0);var E=new Uint8Array(p.byteLength);return E.set(new Uint8Array(p)),E.buffer}function ie(){return this.bodyUsed=!1,this._initBody=function(p){this.bodyUsed=this.bodyUsed,this._bodyInit=p,p?typeof p=="string"?this._bodyText=p:u.blob&&Blob.prototype.isPrototypeOf(p)?this._bodyBlob=p:u.formData&&FormData.prototype.isPrototypeOf(p)?this._bodyFormData=p:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(p)?this._bodyText=p.toString():u.arrayBuffer&&u.blob&&c(p)?(this._bodyArrayBuffer=H(p.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(p)||g(p))?this._bodyArrayBuffer=H(p):this._bodyText=p=Object.prototype.toString.call(p):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof p=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(p)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var p=T(this);if(p)return p;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var p=T(this);return p||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(u.blob)return this.blob().then(P);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var p=T(this);if(p)return p;if(this._bodyBlob)return j(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(z(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(xe)}),this.json=function(){return this.text().then(JSON.parse)},this}var te=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function oe(p){var E=p.toUpperCase();return te.indexOf(E)>-1?E:p}function be(p,E){if(!(this instanceof be))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');E=E||{};var S=E.body;if(p instanceof be){if(p.bodyUsed)throw new TypeError("Already read");this.url=p.url,this.credentials=p.credentials,E.headers||(this.headers=new x(p.headers)),this.method=p.method,this.mode=p.mode,this.signal=p.signal,!S&&p._bodyInit!=null&&(S=p._bodyInit,p.bodyUsed=!0)}else this.url=String(p);if(this.credentials=E.credentials||this.credentials||"same-origin",(E.headers||!this.headers)&&(this.headers=new x(E.headers)),this.method=oe(E.method||this.method||"GET"),this.mode=E.mode||this.mode||null,this.signal=E.signal||this.signal||(function(){if("AbortController"in a){var _=new AbortController;return _.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&S)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(S),(this.method==="GET"||this.method==="HEAD")&&(E.cache==="no-store"||E.cache==="no-cache")){var I=/([?&])_=[^&]*/;if(I.test(this.url))this.url=this.url.replace(I,"$1_="+new Date().getTime());else{var k=/\?/;this.url+=(k.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}be.prototype.clone=function(){return new be(this,{body:this._bodyInit})};function xe(p){var E=new FormData;return p.trim().split("&").forEach(function(S){if(S){var I=S.split("="),k=I.shift().replace(/\+/g," "),_=I.join("=").replace(/\+/g," ");E.append(decodeURIComponent(k),decodeURIComponent(_))}}),E}function b(p){var E=new x,S=p.replace(/\r?\n[\t ]+/g," ");return S.split("\r").map(function(I){return I.indexOf(`
80
- `)===0?I.substr(1,I.length):I}).forEach(function(I){var k=I.split(":"),_=k.shift().trim();if(_){var G=k.join(":").trim();try{E.append(_,G)}catch(W){console.warn("Response "+W.message)}}}),E}ie.call(be.prototype);function N(p,E){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(E||(E={}),this.type="default",this.status=E.status===void 0?200:E.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=E.statusText===void 0?"":""+E.statusText,this.headers=new x(E.headers),this.url=E.url||"",this._initBody(p)}ie.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new x(this.headers),url:this.url})},N.error=function(){var p=new N(null,{status:200,statusText:""});return p.ok=!1,p.status=0,p.type="error",p};var A=[301,302,303,307,308];N.redirect=function(p,E){if(A.indexOf(E)===-1)throw new RangeError("Invalid status code");return new N(null,{status:E,headers:{location:p}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(E,S){this.message=E,this.name=S;var I=Error(E);this.stack=I.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function R(p,E){return new Promise(function(S,I){var k=new be(p,E);if(k.signal&&k.signal.aborted)return I(new o.DOMException("Aborted","AbortError"));var _=new XMLHttpRequest;function G(){_.abort()}_.onload=function(){var V={statusText:_.statusText,headers:b(_.getAllResponseHeaders()||"")};k.url.indexOf("file://")===0&&(_.status<200||_.status>599)?V.status=200:V.status=_.status,V.url="responseURL"in _?_.responseURL:V.headers.get("X-Request-URL");var M="response"in _?_.response:_.responseText;setTimeout(function(){S(new N(M,V))},0)},_.onerror=function(){setTimeout(function(){I(new TypeError("Network request failed"))},0)},_.ontimeout=function(){setTimeout(function(){I(new TypeError("Network request timed out"))},0)},_.onabort=function(){setTimeout(function(){I(new o.DOMException("Aborted","AbortError"))},0)};function W(V){try{return V===""&&a.location.href?a.location.href:V}catch{return V}}if(_.open(k.method,W(k.url),!0),k.credentials==="include"?_.withCredentials=!0:k.credentials==="omit"&&(_.withCredentials=!1),"responseType"in _&&(u.blob?_.responseType="blob":u.arrayBuffer&&(_.responseType="arraybuffer")),E&&typeof E.headers=="object"&&!(E.headers instanceof x||a.Headers&&E.headers instanceof a.Headers)){var Y=[];Object.getOwnPropertyNames(E.headers).forEach(function(V){Y.push(f(V)),_.setRequestHeader(V,m(E.headers[V]))}),k.headers.forEach(function(V,M){Y.indexOf(M)===-1&&_.setRequestHeader(M,V)})}else k.headers.forEach(function(V,M){_.setRequestHeader(M,V)});k.signal&&(k.signal.addEventListener("abort",G),_.onreadystatechange=function(){_.readyState===4&&k.signal.removeEventListener("abort",G)}),_.send(typeof k._bodyInit>"u"?null:k._bodyInit)})}return R.polyfill=!0,a.fetch||(a.fetch=R,a.Headers=x,a.Request=be,a.Response=N),o.Headers=x,o.Request=be,o.Response=N,o.fetch=R,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var s=t.fetch?t:r;e=s.fetch,e.default=s.fetch,e.fetch=s.fetch,e.Headers=s.Headers,e.Request=s.Request,e.Response=s.Response,n.exports=e})(Ls,Ls.exports)),Ls.exports}var Au=p1();const m1=Ou({__proto__:null,default:Ms(Au)},[Au]);se.Editor=_l,se.Form=jl,se.Menu=Jp,se.Provider=Ui,se.Table=Qp,se.Upload=Pl,se.dialog=em,se.i18n=d1,se.misc=g1,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("quill"),require("quill/dist/quill.snow.css"),require("react/jsx-runtime"),require("@ant-design/pro-components"),require("antd"),require("react-icons/ai"),require("@rainte/js"),require("i18next"),require("i18next-http-backend"),require("i18next-browser-languagedetector")):typeof define==`function`&&define.amd?define([`exports`,`react`,`quill`,`quill/dist/quill.snow.css`,`react/jsx-runtime`,`@ant-design/pro-components`,`antd`,`react-icons/ai`,`@rainte/js`,`i18next`,`i18next-http-backend`,`i18next-browser-languagedetector`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`@rainte/ant`]={},e.React,e.Quill,e.QuillSnowCSS,e.ReactJSXRuntime,e.ProComponents,e.antd,e.ReactIconsAI,e.RainteJS,e.i18next,e.i18nextHttpBackend,e.i18nextBrowserLanguageDetector))})(this,function(e,t,n,r,i,a,o,s,c,l,u,d){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var f=Object.create,p=Object.defineProperty,m=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,g=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty,v=(e,t)=>{let n={};for(var r in e)p(n,r,{get:e[r],enumerable:!0});return t||p(n,Symbol.toStringTag,{value:`Module`}),n},y=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=h(t),a=0,o=i.length,s;a<o;a++)s=i[a],!_.call(e,s)&&s!==n&&p(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=m(t,s))||r.enumerable});return e},b=(e,t,n)=>(y(e,t,`default`),n&&y(n,t,`default`)),x=(e,t,n)=>(n=e==null?{}:f(g(e)),y(t||!e||!e.__esModule||!_.call(e,`default`)?p(n,`default`,{value:e,enumerable:!0}):n,e));n=x(n,1),l=x(l,1),u=x(u,1),d=x(d,1);function S(e){let{value:r,style:a,...o}=e,s=(0,t.useRef)(null),c=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let e=s.current,t=document.createElement(`div`);Object.assign(t.style,a??{});let r=new n.default(e.appendChild(t),{theme:`snow`,...o});c.current=r;let i=()=>o.onChange?.(r.root.innerHTML||``);return r.on(`text-change`,i),()=>{r.off(`text-change`,i),c.current=null,e.innerHTML=``}},[]),(0,t.useEffect)(()=>{let e=c.current;if(!e)return;let t=r||``;e.root.innerHTML!==t&&e.clipboard.dangerouslyPasteHTML(t)},[r]),(0,i.jsx)(`div`,{ref:s,style:{height:`100%`}})}var C=e=>Array.isArray(e)?e:e&&e.fileList;function w(e){let{value:t,...n}=e,r=C(t),a=Array.isArray(r)?r.length:0,c=n.maxCount??1,l;return a<c&&(l=n.listType?.startsWith(`picture-`)?(0,i.jsx)(s.AiOutlineUpload,{}):(0,i.jsx)(o.Button,{icon:(0,i.jsx)(s.AiOutlineUpload,{}),children:` 上传`})),(0,i.jsx)(o.Upload,{maxCount:1,multiple:!0,showUploadList:!0,...n,fileList:r,onChange:e=>n.onChange?.(e.fileList),children:a<c&&l})}var T={upload:{formItemRender:(e,t)=>(0,i.jsx)(w,{...t.fieldProps})},editor:{formItemRender:(e,t)=>(0,i.jsx)(S,{...t.fieldProps})}};function E({children:e}){return(0,i.jsx)(a.ProConfigProvider,{valueTypeMap:T,children:e})}var D=()=>a.ProForm.useForm()[0],O=e=>(0,i.jsx)(E,{children:(0,i.jsx)(a.BetaSchemaForm,{layout:`horizontal`,colon:!1,labelCol:{span:3},wrapperCol:{span:6},scrollToFirstError:!0,submitter:{render:(e,t)=>(0,i.jsx)(a.ProForm.Item,{wrapperCol:{offset:4,span:8},children:(0,i.jsx)(o.Space,{children:t})})},...e})});O.useForm=D;function k(e){return(0,i.jsx)(E,{children:(0,i.jsx)(a.ProTable,{rowKey:`id`,pagination:{pageSize:10},tableAlertRender:({selectedRowKeys:e})=>(0,i.jsxs)(o.Space,{children:[`已选 `,e.length,` 项`]}),...e})})}var A=v({default:()=>P,message:()=>j,modal:()=>N,notification:()=>M,popup:()=>F,useDialog:()=>P}),j,M,N,P=()=>{let e=o.App.useApp();return j=e.message,N=e.modal,M=e.notification,null},F={confirm:e=>N.confirm({title:`提示`,content:`确认操作?`,...e}),success:(e,t)=>(e||=`操作成功`,j.success(e,t)),error:(e,t)=>{e||=`操作失败`,j.error(e,t),c.system.fail(e)},ask:function(e,t){return this.confirm({onOk:e,...t})}},I=v({KEY:()=>L,LNG_ZH:()=>`zh`});b(I,require("i18next"));var L=`i18nextLng`;l.default.use(u.default).use(d.default).init({lng:c.storage.local.getRaw(L,`zh`),fallbackLng:`zh`,backend:{loadPath:`/locales/{{lng}}/{{ns}}.json`},interpolation:{escapeValue:!1}});var R=v({onUpload:()=>z}),z=async e=>{let{file:t,onProgress:n,onSuccess:r}=e,i=0,a=setInterval(()=>{i+=Math.floor(Math.random()*10),i>=100&&(i=99),n({percent:i})},100);t.url=URL.createObjectURL(t),r?.({url:t.url}),clearInterval(a)};e.Editor=S,e.Form=O,e.Provider=E,e.Table=k,e.Upload=w,Object.defineProperty(e,"dialog",{enumerable:!0,get:function(){return A}}),Object.defineProperty(e,"i18n",{enumerable:!0,get:function(){return I}}),Object.defineProperty(e,"misc",{enumerable:!0,get:function(){return R}})});