UNPKG

@wangeditor/core

Version:
23 lines (21 loc) 179 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("slate"),require("lodash.toarray"),require("dom7"),require("lodash.foreach"),require("nanoid"),require("lodash.throttle"),require("snabbdom"),require("lodash.camelcase"),require("is-hotkey"),require("lodash.debounce"),require("lodash.clonedeep"),require("@uppy/core"),require("@uppy/xhr-upload")):"function"==typeof define&&define.amd?define(["exports","slate","lodash.toarray","dom7","lodash.foreach","nanoid","lodash.throttle","snabbdom","lodash.camelcase","is-hotkey","lodash.debounce","lodash.clonedeep","@uppy/core","@uppy/xhr-upload"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).WangEditorCore={},e.slate,e.toArray,e.$,e.forEach$1,null,e.throttle,e.snabbdom,e.camelCase,e.isHotkey,e.debounce,e.cloneDeep,e.Uppy,e.XHRUpload)}(this,(function(e,t,n,r,o,i,a,s,l,u,c,f,d,p){"use strict";function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=h(t),v=h(n),y=h(r),m=h(o),b=h(a),w=h(l),x=h(c),E=h(f),S=h(d),k=h(p),O="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function T(e){var t={exports:{}};return e(t,t.exports),t.exports}var N,M,L=function(e){return e&&e.Math==Math&&e},P=L("object"==typeof globalThis&&globalThis)||L("object"==typeof window&&window)||L("object"==typeof self&&self)||L("object"==typeof O&&O)||function(){return this}()||Function("return this")(),R=Object.defineProperty,D=function(e,t){try{R(P,e,{value:t,configurable:!0,writable:!0})}catch(n){P[e]=t}return t},j="__core-js_shared__",A=P[j]||D(j,{}),_=T((function(e){(e.exports=function(e,t){return A[e]||(A[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),F=Function.prototype,I=F.bind,B=F.call,$=I&&I.bind(B),W=I?function(e){return e&&$(B,e)}:function(e){return e&&function(){return B.apply(e,arguments)}},H=P.TypeError,V=function(e){if(null==e)throw H("Can't call method on "+e);return e},z=P.Object,U=function(e){return z(V(e))},K=W({}.hasOwnProperty),q=Object.hasOwn||function(e,t){return K(U(e),t)},G=0,J=Math.random(),Y=W(1..toString),X=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Y(++G+J,36)},Q=function(e){return"function"==typeof e},Z=function(e){return Q(e)?e:void 0},ee=function(e,t){return arguments.length<2?Z(P[e]):P[e]&&P[e][t]},te=ee("navigator","userAgent")||"",ne=P.process,re=P.Deno,oe=ne&&ne.versions||re&&re.version,ie=oe&&oe.v8;ie&&(M=(N=ie.split("."))[0]>0&&N[0]<4?1:+(N[0]+N[1])),!M&&te&&(!(N=te.match(/Edge\/(\d+)/))||N[1]>=74)&&(N=te.match(/Chrome\/(\d+)/))&&(M=+N[1]);var ae=M,se=function(e){try{return!!e()}catch(e){return!0}},le=!!Object.getOwnPropertySymbols&&!se((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&ae&&ae<41})),ue=le&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ce=_("wks"),fe=P.Symbol,de=fe&&fe.for,pe=ue?fe:fe&&fe.withoutSetter||X,he=function(e){if(!q(ce,e)||!le&&"string"!=typeof ce[e]){var t="Symbol."+e;le&&q(fe,e)?ce[e]=fe[e]:ce[e]=ue&&de?de(t):pe(t)}return ce[e]},ge={};ge[he("toStringTag")]="z";var ve="[object z]"===String(ge),ye=!se((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),me=function(e){return"object"==typeof e?null!==e:Q(e)},be=P.document,we=me(be)&&me(be.createElement),xe=function(e){return we?be.createElement(e):{}},Ee=!ye&&!se((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),Se=P.String,ke=P.TypeError,Oe=function(e){if(me(e))return e;throw ke(Se(e)+" is not an object")},Ce=Function.prototype.call,Te=Ce.bind?Ce.bind(Ce):function(){return Ce.apply(Ce,arguments)},Ne=W({}.isPrototypeOf),Me=P.Object,Le=ue?function(e){return"symbol"==typeof e}:function(e){var t=ee("Symbol");return Q(t)&&Ne(t.prototype,Me(e))},Pe=P.String,Re=function(e){try{return Pe(e)}catch(e){return"Object"}},De=P.TypeError,je=function(e){if(Q(e))return e;throw De(Re(e)+" is not a function")},Ae=function(e,t){var n=e[t];return null==n?void 0:je(n)},_e=P.TypeError,Fe=P.TypeError,Ie=he("toPrimitive"),Be=function(e,t){if(!me(e)||Le(e))return e;var n,r=Ae(e,Ie);if(r){if(void 0===t&&(t="default"),n=Te(r,e,t),!me(n)||Le(n))return n;throw Fe("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var n,r;if("string"===t&&Q(n=e.toString)&&!me(r=Te(n,e)))return r;if(Q(n=e.valueOf)&&!me(r=Te(n,e)))return r;if("string"!==t&&Q(n=e.toString)&&!me(r=Te(n,e)))return r;throw _e("Can't convert object to primitive value")}(e,t)},$e=function(e){var t=Be(e,"string");return Le(t)?t:t+""},We=P.TypeError,He=Object.defineProperty,Ve={f:ye?He:function(e,t,n){if(Oe(e),t=$e(t),Oe(n),Ee)try{return He(e,t,n)}catch(e){}if("get"in n||"set"in n)throw We("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},ze=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Ue=ye?function(e,t,n){return Ve.f(e,t,ze(1,n))}:function(e,t,n){return e[t]=n,e},Ke=W(Function.toString);Q(A.inspectSource)||(A.inspectSource=function(e){return Ke(e)});var qe,Ge,Je,Ye=A.inspectSource,Xe=P.WeakMap,Qe=Q(Xe)&&/native code/.test(Ye(Xe)),Ze=_("keys"),et=function(e){return Ze[e]||(Ze[e]=X(e))},tt={},nt="Object already initialized",rt=P.TypeError,ot=P.WeakMap;if(Qe||A.state){var it=A.state||(A.state=new ot),at=W(it.get),st=W(it.has),lt=W(it.set);qe=function(e,t){if(st(it,e))throw new rt(nt);return t.facade=e,lt(it,e,t),t},Ge=function(e){return at(it,e)||{}},Je=function(e){return st(it,e)}}else{var ut=et("state");tt[ut]=!0,qe=function(e,t){if(q(e,ut))throw new rt(nt);return t.facade=e,Ue(e,ut,t),t},Ge=function(e){return q(e,ut)?e[ut]:{}},Je=function(e){return q(e,ut)}}var ct={set:qe,get:Ge,has:Je,enforce:function(e){return Je(e)?Ge(e):qe(e,{})},getterFor:function(e){return function(t){var n;if(!me(t)||(n=Ge(t)).type!==e)throw rt("Incompatible receiver, "+e+" required");return n}}},ft=Function.prototype,dt=ye&&Object.getOwnPropertyDescriptor,pt=q(ft,"name"),ht={EXISTS:pt,PROPER:pt&&"something"===function(){}.name,CONFIGURABLE:pt&&(!ye||ye&&dt(ft,"name").configurable)},gt=T((function(e){var t=ht.CONFIGURABLE,n=ct.get,r=ct.enforce,o=String(String).split("String");(e.exports=function(e,n,i,a){var s,l=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,c=!!a&&!!a.noTargetGet,f=a&&void 0!==a.name?a.name:n;Q(i)&&("Symbol("===String(f).slice(0,7)&&(f="["+String(f).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!q(i,"name")||t&&i.name!==f)&&Ue(i,"name",f),(s=r(i)).source||(s.source=o.join("string"==typeof f?f:""))),e!==P?(l?!c&&e[n]&&(u=!0):delete e[n],u?e[n]=i:Ue(e,n,i)):u?e[n]=i:D(n,i)})(Function.prototype,"toString",(function(){return Q(this)&&n(this).source||Ye(this)}))})),vt=W({}.toString),yt=W("".slice),mt=function(e){return yt(vt(e),8,-1)},bt=he("toStringTag"),wt=P.Object,xt="Arguments"==mt(function(){return arguments}()),Et=ve?mt:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=wt(e),bt))?n:xt?mt(t):"Object"==(r=mt(t))&&Q(t.callee)?"Arguments":r},St=ve?{}.toString:function(){return"[object "+Et(this)+"]"};ve||gt(Object.prototype,"toString",St,{unsafe:!0});var kt={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Ot=xe("span").classList,Ct=Ot&&Ot.constructor&&Ot.constructor.prototype,Tt=Ct===Object.prototype?void 0:Ct,Nt=W(W.bind),Mt=function(e,t){return je(e),void 0===t?e:Nt?Nt(e,t):function(){return e.apply(t,arguments)}},Lt=P.Object,Pt=W("".split),Rt=se((function(){return!Lt("z").propertyIsEnumerable(0)}))?function(e){return"String"==mt(e)?Pt(e,""):Lt(e)}:Lt,Dt=Math.ceil,jt=Math.floor,At=function(e){var t=+e;return t!=t||0===t?0:(t>0?jt:Dt)(t)},_t=Math.min,Ft=function(e){return e>0?_t(At(e),9007199254740991):0},It=function(e){return Ft(e.length)},Bt=Array.isArray||function(e){return"Array"==mt(e)},$t=function(){},Wt=[],Ht=ee("Reflect","construct"),Vt=/^\s*(?:class|function)\b/,zt=W(Vt.exec),Ut=!Vt.exec($t),Kt=function(e){if(!Q(e))return!1;try{return Ht($t,Wt,e),!0}catch(e){return!1}},qt=!Ht||se((function(){var e;return Kt(Kt.call)||!Kt(Object)||!Kt((function(){e=!0}))||e}))?function(e){if(!Q(e))return!1;switch(Et(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Ut||!!zt(Vt,Ye(e))}:Kt,Gt=he("species"),Jt=P.Array,Yt=function(e,t){return new(function(e){var t;return Bt(e)&&(t=e.constructor,(qt(t)&&(t===Jt||Bt(t.prototype))||me(t)&&null===(t=t[Gt]))&&(t=void 0)),void 0===t?Jt:t}(e))(0===t?0:t)},Xt=W([].push),Qt=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,a=7==e,s=5==e||i;return function(l,u,c,f){for(var d,p,h=U(l),g=Rt(h),v=Mt(u,c),y=It(g),m=0,b=f||Yt,w=t?b(l,y):n||a?b(l,0):void 0;y>m;m++)if((s||m in g)&&(p=v(d=g[m],m,h),e))if(t)w[m]=p;else if(p)switch(e){case 3:return!0;case 5:return d;case 6:return m;case 2:Xt(w,d)}else switch(e){case 4:return!1;case 7:Xt(w,d)}return i?-1:r||o?o:w}},Zt={forEach:Qt(0),map:Qt(1),filter:Qt(2),some:Qt(3),every:Qt(4),find:Qt(5),findIndex:Qt(6),filterReject:Qt(7)},en=function(e,t){var n=[][e];return!!n&&se((function(){n.call(null,t||function(){throw 1},1)}))},tn=Zt.forEach,nn=en("forEach")?[].forEach:function(e){return tn(this,e,arguments.length>1?arguments[1]:void 0)},rn=function(e){if(e&&e.forEach!==nn)try{Ue(e,"forEach",nn)}catch(t){e.forEach=nn}};for(var on in kt)kt[on]&&rn(P[on]&&P[on].prototype);rn(Tt);var an={}.propertyIsEnumerable,sn=Object.getOwnPropertyDescriptor,ln=sn&&!an.call({1:2},1)?function(e){var t=sn(this,e);return!!t&&t.enumerable}:an,un={f:ln},cn=function(e){return Rt(V(e))},fn=Object.getOwnPropertyDescriptor,dn={f:ye?fn:function(e,t){if(e=cn(e),t=$e(t),Ee)try{return fn(e,t)}catch(e){}if(q(e,t))return ze(!Te(un.f,e,t),e[t])}},pn=Math.max,hn=Math.min,gn=function(e,t){var n=At(e);return n<0?pn(n+t,0):hn(n,t)},vn=function(e){return function(t,n,r){var o,i=cn(t),a=It(i),s=gn(r,a);if(e&&n!=n){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===n)return e||s||0;return!e&&-1}},yn={includes:vn(!0),indexOf:vn(!1)},mn=yn.indexOf,bn=W([].push),wn=function(e,t){var n,r=cn(e),o=0,i=[];for(n in r)!q(tt,n)&&q(r,n)&&bn(i,n);for(;t.length>o;)q(r,n=t[o++])&&(~mn(i,n)||bn(i,n));return i},xn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],En=xn.concat("length","prototype"),Sn={f:Object.getOwnPropertyNames||function(e){return wn(e,En)}},kn={f:Object.getOwnPropertySymbols},On=W([].concat),Cn=ee("Reflect","ownKeys")||function(e){var t=Sn.f(Oe(e)),n=kn.f;return n?On(t,n(e)):t},Tn=function(e,t){for(var n=Cn(t),r=Ve.f,o=dn.f,i=0;i<n.length;i++){var a=n[i];q(e,a)||r(e,a,o(t,a))}},Nn=/#|\.prototype\./,Mn=function(e,t){var n=Pn[Ln(e)];return n==Dn||n!=Rn&&(Q(t)?se(t):!!t)},Ln=Mn.normalize=function(e){return String(e).replace(Nn,".").toLowerCase()},Pn=Mn.data={},Rn=Mn.NATIVE="N",Dn=Mn.POLYFILL="P",jn=Mn,An=dn.f,_n=function(e,t){var n,r,o,i,a,s=e.target,l=e.global,u=e.stat;if(n=l?P:u?P[s]||D(s,{}):(P[s]||{}).prototype)for(r in t){if(i=t[r],o=e.noTargetGet?(a=An(n,r))&&a.value:n[r],!jn(l?r:s+(u?".":"#")+r,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Tn(i,o)}(e.sham||o&&o.sham)&&Ue(i,"sham",!0),gt(n,r,i,e)}},Fn=Object.keys||function(e){return wn(e,xn)},In=se((function(){Fn(1)})); /*! * is-plain-object <https://github.com/jonschlinkert/is-plain-object> * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ function Bn(e){return"[object Object]"===Object.prototype.toString.call(e)}_n({target:"Object",stat:!0,forced:In},{keys:function(e){return Fn(U(e))}});var $n=function(e){var t,n;return!1!==Bn(e)&&(void 0===(t=e.constructor)||!1!==Bn(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))},Wn=Object.defineProperty({isPlainObject:$n},"__esModule",{value:!0}),Hn=function(e){return Wn.isPlainObject(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||g.default.Operation.isOperationList(e.redos[0]))&&(0===e.undos.length||g.default.Operation.isOperationList(e.undos[0]))},Vn=new WeakMap,zn=new WeakMap,Un={isHistoryEditor:function(e){return Hn(e.history)&&g.default.Editor.isEditor(e)},isMerging:function(e){return zn.get(e)},isSaving:function(e){return Vn.get(e)},redo:function(e){e.redo()},undo:function(e){e.undo()},withoutMerging:function(e,t){var n=Un.isMerging(e);zn.set(e,!1),t(),zn.set(e,n)},withoutSaving:function(e,t){var n=Un.isSaving(e);Vn.set(e,!1),t(),Vn.set(e,n)}};function Kn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return qn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qn(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function qn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Gn=function(e,t){return"set_selection"===e.type||(!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!g.default.Path.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!g.default.Path.equals(e.path,t.path)))},Jn=function(e,t){return"set_selection"!==e.type||null!=e.properties&&null!=e.newProperties},Yn=function(e,t){return!(!t||"set_selection"!==e.type||"set_selection"!==t.type)},Xn=function(e){return"set_selection"!==e.type},Qn=function(e){var t=e,n=t.apply;return t.history={undos:[],redos:[]},t.redo=function(){var e=t.history,n=e.redos;if(n.length>0){var r=n[n.length-1];Un.withoutSaving(t,(function(){g.default.Editor.withoutNormalizing(t,(function(){var e,n=Kn(r);try{for(n.s();!(e=n.n()).done;){var o=e.value;t.apply(o)}}catch(e){n.e(e)}finally{n.f()}}))})),e.redos.pop(),e.undos.push(r)}},t.undo=function(){var e=t.history,n=e.undos;if(n.length>0){var r=n[n.length-1];Un.withoutSaving(t,(function(){g.default.Editor.withoutNormalizing(t,(function(){var e,n=Kn(r.map(g.default.Operation.inverse).reverse());try{for(n.s();!(e=n.n()).done;){var o=e.value;t.apply(o)}}catch(e){n.e(e)}finally{n.f()}}))})),e.redos.push(r),e.undos.pop()}},t.apply=function(e){var r=t.operations,o=t.history,i=o.undos,a=i[i.length-1],s=a&&a[a.length-1],l=Yn(e,s),u=Un.isSaving(t),c=Un.isMerging(t);if(null==u&&(u=Jn(e)),u){if(null==c&&(c=null!=a&&(0!==r.length||(Gn(e,s)||l))),a&&c)l&&a.pop(),a.push(e);else{var f=[e];i.push(f)}for(;i.length>100;)i.shift();Xn(e)&&(o.redos=[])}n(e)},t},Zn=P.String,er=function(e){if("Symbol"===Et(e))throw TypeError("Cannot convert a Symbol value to a string");return Zn(e)},tr=function(){var e=Oe(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},nr=ht.PROPER,rr="toString",or=RegExp.prototype,ir=or.toString,ar=W(tr),sr=se((function(){return"/a/b"!=ir.call({source:"a",flags:"b"})})),lr=nr&&ir.name!=rr;(sr||lr)&&gt(RegExp.prototype,rr,(function(){var e=Oe(this),t=er(e.source),n=e.flags;return"/"+t+"/"+er(void 0===n&&Ne(or,e)&&!("flags"in or)?ar(e):n)}),{unsafe:!0});var ur,cr=ye?Object.defineProperties:function(e,t){Oe(e);for(var n,r=cn(t),o=Fn(t),i=o.length,a=0;i>a;)Ve.f(e,n=o[a++],r[n]);return e},fr=ee("document","documentElement"),dr=et("IE_PROTO"),pr=function(){},hr=function(e){return"<script>"+e+"</"+"script>"},gr=function(e){e.write(hr("")),e.close();var t=e.parentWindow.Object;return e=null,t},vr=function(){try{ur=new ActiveXObject("htmlfile")}catch(e){}var e,t;vr="undefined"!=typeof document?document.domain&&ur?gr(ur):((t=xe("iframe")).style.display="none",fr.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(hr("document.F=Object")),e.close(),e.F):gr(ur);for(var n=xn.length;n--;)delete vr.prototype[xn[n]];return vr()};tt[dr]=!0;var yr=Object.create||function(e,t){var n;return null!==e?(pr.prototype=Oe(e),n=new pr,pr.prototype=null,n[dr]=e):n=vr(),void 0===t?n:cr(n,t)},mr=he("unscopables"),br=Array.prototype;null==br[mr]&&Ve.f(br,mr,{configurable:!0,value:yr(null)});var wr=function(e){br[mr][e]=!0},xr=yn.includes;_n({target:"Array",proto:!0},{includes:function(e){return xr(this,e,arguments.length>1?arguments[1]:void 0)}}),wr("includes");var Er=he("match"),Sr=function(e){var t;return me(e)&&(void 0!==(t=e[Er])?!!t:"RegExp"==mt(e))},kr=P.TypeError,Or=function(e){if(Sr(e))throw kr("The method doesn't accept regular expressions");return e},Cr=he("match"),Tr=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[Cr]=!1,"/./"[e](t)}catch(e){}}return!1},Nr=W("".indexOf);_n({target:"String",proto:!0,forced:!Tr("includes")},{includes:function(e){return!!~Nr(er(V(this)),er(Or(e)),arguments.length>1?arguments[1]:void 0)}});var Mr,Lr=/"/g,Pr=W("".replace);_n({target:"String",proto:!0,forced:(Mr="anchor",se((function(){var e=""[Mr]('"');return e!==e.toLowerCase()||e.split('"').length>3})))},{anchor:function(e){return t="a",n="name",r=e,o=er(V(this)),i="<"+t,""!==n&&(i+=" "+n+'="'+Pr(er(r),Lr,"&quot;")+'"'),i+">"+o+"</"+t+">";var t,n,r,o,i}});var Rr=function(e,t,n){var r,o;Oe(e);try{if(!(r=Ae(e,"return"))){if("throw"===t)throw n;return n}r=Te(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return Oe(r),n},Dr=function(e,t,n,r){try{return r?t(Oe(n)[0],n[1]):t(n)}catch(t){Rr(e,"throw",t)}},jr={},Ar=he("iterator"),_r=Array.prototype,Fr=function(e){return void 0!==e&&(jr.Array===e||_r[Ar]===e)},Ir=function(e,t,n){var r=$e(t);r in e?Ve.f(e,r,ze(0,n)):e[r]=n},Br=he("iterator"),$r=function(e){if(null!=e)return Ae(e,Br)||Ae(e,"@@iterator")||jr[Et(e)]},Wr=P.TypeError,Hr=function(e,t){var n=arguments.length<2?$r(e):t;if(je(n))return Oe(Te(n,e));throw Wr(Re(e)+" is not iterable")},Vr=P.Array,zr=he("iterator"),Ur=!1;try{var Kr=0,qr={next:function(){return{done:!!Kr++}},return:function(){Ur=!0}};qr[zr]=function(){return this},Array.from(qr,(function(){throw 2}))}catch(e){}var Gr=function(e,t){if(!t&&!Ur)return!1;var n=!1;try{var r={};r[zr]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},Jr=!Gr((function(e){Array.from(e)}));_n({target:"Array",stat:!0,forced:Jr},{from:function(e){var t=U(e),n=qt(this),r=arguments.length,o=r>1?arguments[1]:void 0,i=void 0!==o;i&&(o=Mt(o,r>2?arguments[2]:void 0));var a,s,l,u,c,f,d=$r(t),p=0;if(!d||this==Vr&&Fr(d))for(a=It(t),s=n?new this(a):Vr(a);a>p;p++)f=i?o(t[p],p):t[p],Ir(s,p,f);else for(c=(u=Hr(t,d)).next,s=n?new this:[];!(l=Te(c,u)).done;p++)f=i?Dr(u,o,[l.value,p],!0):l.value,Ir(s,p,f);return s.length=p,s}});var Yr,Xr,Qr,Zr=W("".charAt),eo=W("".charCodeAt),to=W("".slice),no=function(e){return function(t,n){var r,o,i=er(V(t)),a=At(n),s=i.length;return a<0||a>=s?e?"":void 0:(r=eo(i,a))<55296||r>56319||a+1===s||(o=eo(i,a+1))<56320||o>57343?e?Zr(i,a):r:e?to(i,a,a+2):o-56320+(r-55296<<10)+65536}},ro={codeAt:no(!1),charAt:no(!0)},oo=!se((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),io=et("IE_PROTO"),ao=P.Object,so=ao.prototype,lo=oo?ao.getPrototypeOf:function(e){var t=U(e);if(q(t,io))return t[io];var n=t.constructor;return Q(n)&&t instanceof n?n.prototype:t instanceof ao?so:null},uo=he("iterator"),co=!1;[].keys&&("next"in(Qr=[].keys())?(Xr=lo(lo(Qr)))!==Object.prototype&&(Yr=Xr):co=!0);var fo=null==Yr||se((function(){var e={};return Yr[uo].call(e)!==e}));fo&&(Yr={}),Q(Yr[uo])||gt(Yr,uo,(function(){return this}));var po={IteratorPrototype:Yr,BUGGY_SAFARI_ITERATORS:co},ho=Ve.f,go=he("toStringTag"),vo=function(e,t,n){e&&!q(e=n?e:e.prototype,go)&&ho(e,go,{configurable:!0,value:t})},yo=po.IteratorPrototype,mo=function(){return this},bo=P.String,wo=P.TypeError,xo=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=W(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return Oe(n),function(e){if("object"==typeof e||Q(e))return e;throw wo("Can't set "+bo(e)+" as a prototype")}(r),t?e(n,r):n.__proto__=r,n}}():void 0),Eo=ht.PROPER,So=ht.CONFIGURABLE,ko=po.IteratorPrototype,Oo=po.BUGGY_SAFARI_ITERATORS,Co=he("iterator"),To="keys",No="values",Mo="entries",Lo=function(){return this},Po=function(e,t,n,r,o,i,a){!function(e,t,n,r){var o=t+" Iterator";e.prototype=yr(yo,{next:ze(+!r,n)}),vo(e,o,!1),jr[o]=mo}(n,t,r);var s,l,u,c=function(e){if(e===o&&g)return g;if(!Oo&&e in p)return p[e];switch(e){case To:case No:case Mo:return function(){return new n(this,e)}}return function(){return new n(this)}},f=t+" Iterator",d=!1,p=e.prototype,h=p[Co]||p["@@iterator"]||o&&p[o],g=!Oo&&h||c(o),v="Array"==t&&p.entries||h;if(v&&(s=lo(v.call(new e)))!==Object.prototype&&s.next&&(lo(s)!==ko&&(xo?xo(s,ko):Q(s[Co])||gt(s,Co,Lo)),vo(s,f,!0)),Eo&&o==No&&h&&h.name!==No&&(So?Ue(p,"name",No):(d=!0,g=function(){return Te(h,this)})),o)if(l={values:c(No),keys:i?g:c(To),entries:c(Mo)},a)for(u in l)(Oo||d||!(u in p))&&gt(p,u,l[u]);else _n({target:t,proto:!0,forced:Oo||d},l);return p[Co]!==g&&gt(p,Co,g,{name:o}),jr[t]=g,l},Ro=ro.charAt,Do="String Iterator",jo=ct.set,Ao=ct.getterFor(Do);Po(String,"String",(function(e){jo(this,{type:Do,string:er(e),index:0})}),(function(){var e,t=Ao(this),n=t.string,r=t.index;return r>=n.length?{value:void 0,done:!0}:(e=Ro(n,r),t.index+=e.length,{value:e,done:!1})}));var _o,Fo=dn.f,Io=W("".endsWith),Bo=W("".slice),$o=Math.min,Wo=Tr("endsWith"),Ho=!(Wo||(_o=Fo(String.prototype,"endsWith"),!_o||_o.writable));_n({target:"String",proto:!0,forced:!Ho&&!Wo},{endsWith:function(e){var t=er(V(this));Or(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=void 0===n?r:$o(Ft(n),r),i=er(e);return Io?Io(t,i,o):Bo(t,o-i.length,o)===i}});var Vo=W([].join),zo=Rt!=Object,Uo=en("join",",");_n({target:"Array",proto:!0,forced:zo||!Uo},{join:function(e){return Vo(cn(this),void 0===e?",":e)}});var Ko=he("species"),qo=function(e){return ae>=51||!se((function(){var t=[];return(t.constructor={})[Ko]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Go=Zt.map,Jo=qo("map");_n({target:"Array",proto:!0,forced:!Jo},{map:function(e){return Go(this,e,arguments.length>1?arguments[1]:void 0)}});var Yo=P.RegExp,Xo=se((function(){var e=Yo("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Qo=Xo||se((function(){return!Yo("a","y").sticky})),Zo={BROKEN_CARET:Xo||se((function(){var e=Yo("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Qo,UNSUPPORTED_Y:Xo},ei=P.RegExp,ti=se((function(){var e=ei(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ni=P.RegExp,ri=se((function(){var e=ni("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),oi=ct.get,ii=_("native-string-replace",String.prototype.replace),ai=RegExp.prototype.exec,si=ai,li=W("".charAt),ui=W("".indexOf),ci=W("".replace),fi=W("".slice),di=function(){var e=/a/,t=/b*/g;return Te(ai,e,"a"),Te(ai,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),pi=Zo.BROKEN_CARET,hi=void 0!==/()??/.exec("")[1];(di||hi||pi||ti||ri)&&(si=function(e){var t,n,r,o,i,a,s,l=this,u=oi(l),c=er(e),f=u.raw;if(f)return f.lastIndex=l.lastIndex,t=Te(si,f,c),l.lastIndex=f.lastIndex,t;var d=u.groups,p=pi&&l.sticky,h=Te(tr,l),g=l.source,v=0,y=c;if(p&&(h=ci(h,"y",""),-1===ui(h,"g")&&(h+="g"),y=fi(c,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==li(c,l.lastIndex-1))&&(g="(?: "+g+")",y=" "+y,v++),n=new RegExp("^(?:"+g+")",h)),hi&&(n=new RegExp("^"+g+"$(?!\\s)",h)),di&&(r=l.lastIndex),o=Te(ai,p?n:l,y),p?o?(o.input=fi(o.input,v),o[0]=fi(o[0],v),o.index=l.lastIndex,l.lastIndex+=o[0].length):l.lastIndex=0:di&&o&&(l.lastIndex=l.global?o.index+o[0].length:r),hi&&o&&o.length>1&&Te(ii,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=a=yr(null),i=0;i<d.length;i++)a[(s=d[i])[0]]=o[s[1]];return o});var gi=si;_n({target:"RegExp",proto:!0,forced:/./.exec!==gi},{exec:gi});var vi=Function.prototype,yi=vi.apply,mi=vi.bind,bi=vi.call,wi="object"==typeof Reflect&&Reflect.apply||(mi?bi.bind(yi):function(){return bi.apply(yi,arguments)}),xi=he("species"),Ei=RegExp.prototype,Si=function(e,t,n,r){var o=he(e),i=!se((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!se((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[xi]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!i||!a||n){var s=W(/./[o]),l=t(o,""[e],(function(e,t,n,r,o){var a=W(e),l=t.exec;return l===gi||l===Ei.exec?i&&!o?{done:!0,value:s(t,n,r)}:{done:!0,value:a(n,t,r)}:{done:!1}}));gt(String.prototype,e,l[0]),gt(Ei,o,l[1])}r&&Ue(Ei[o],"sham",!0)},ki=ro.charAt,Oi=function(e,t,n){return t+(n?ki(e,t).length:1)},Ci=Math.floor,Ti=W("".charAt),Ni=W("".replace),Mi=W("".slice),Li=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Pi=/\$([$&'`]|\d{1,2})/g,Ri=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,l=Pi;return void 0!==o&&(o=U(o),l=Li),Ni(i,l,(function(i,l){var u;switch(Ti(l,0)){case"$":return"$";case"&":return e;case"`":return Mi(t,0,n);case"'":return Mi(t,a);case"<":u=o[Mi(l,1,-1)];break;default:var c=+l;if(0===c)return i;if(c>s){var f=Ci(c/10);return 0===f?i:f<=s?void 0===r[f-1]?Ti(l,1):r[f-1]+Ti(l,1):i}u=r[c-1]}return void 0===u?"":u}))},Di=P.TypeError,ji=function(e,t){var n=e.exec;if(Q(n)){var r=Te(n,e,t);return null!==r&&Oe(r),r}if("RegExp"===mt(e))return Te(gi,e,t);throw Di("RegExp#exec called on incompatible receiver")},Ai=he("replace"),_i=Math.max,Fi=Math.min,Ii=W([].concat),Bi=W([].push),$i=W("".indexOf),Wi=W("".slice),Hi="$0"==="a".replace(/./,"$0"),Vi=!!/./[Ai]&&""===/./[Ai]("a","$0");Si("replace",(function(e,t,n){var r=Vi?"$":"$0";return[function(e,n){var r=V(this),o=null==e?void 0:Ae(e,Ai);return o?Te(o,e,r,n):Te(t,er(r),e,n)},function(e,o){var i=Oe(this),a=er(e);if("string"==typeof o&&-1===$i(o,r)&&-1===$i(o,"$<")){var s=n(t,i,a,o);if(s.done)return s.value}var l=Q(o);l||(o=er(o));var u=i.global;if(u){var c=i.unicode;i.lastIndex=0}for(var f=[];;){var d=ji(i,a);if(null===d)break;if(Bi(f,d),!u)break;""===er(d[0])&&(i.lastIndex=Oi(a,Ft(i.lastIndex),c))}for(var p,h="",g=0,v=0;v<f.length;v++){for(var y=er((d=f[v])[0]),m=_i(Fi(At(d.index),a.length),0),b=[],w=1;w<d.length;w++)Bi(b,void 0===(p=d[w])?p:String(p));var x=d.groups;if(l){var E=Ii([y],b,m,a);void 0!==x&&Bi(E,x);var S=er(wi(o,void 0,E))}else S=Ri(y,a,m,b,x,o);m>=g&&(h+=Wi(a,g,m)+S,g=m+y.length)}return h+Wi(a,g)}]}),!!se((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Hi||Vi); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var zi=function(e,t){return zi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},zi(e,t)};function Ui(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}zi(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ki=function(){return Ki=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ki.apply(this,arguments)};function qi(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gi(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Ji(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e}var Yi=0,Xi=function(){this.id=""+Yi++},Qi="Array Iterator",Zi=ct.set,ea=ct.getterFor(Qi),ta=Po(Array,"Array",(function(e,t){Zi(this,{type:Qi,target:cn(e),index:0,kind:t})}),(function(){var e=ea(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values");jr.Arguments=jr.Array,wr("keys"),wr("values"),wr("entries");var na=function(e,t,n){for(var r in t)gt(e,r,t[r],n);return e},ra=P.Array,oa=Math.max,ia=function(e,t,n){for(var r=It(e),o=gn(t,r),i=gn(void 0===n?r:n,r),a=ra(oa(i-o,0)),s=0;o<i;o++,s++)Ir(a,s,e[o]);return a.length=s,a},aa=Sn.f,sa="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],la={f:function(e){return sa&&"Window"==mt(e)?function(e){try{return aa(e)}catch(e){return ia(sa)}}(e):aa(cn(e))}},ua=se((function(){if("function"==typeof ArrayBuffer){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),ca=Object.isExtensible,fa=se((function(){ca(1)}))||ua?function(e){return!!me(e)&&((!ua||"ArrayBuffer"!=mt(e))&&(!ca||ca(e)))}:ca,da=!se((function(){return Object.isExtensible(Object.preventExtensions({}))})),pa=T((function(e){var t=Ve.f,n=!1,r=X("meta"),o=0,i=function(e){t(e,r,{value:{objectID:"O"+o++,weakData:{}}})},a=e.exports={enable:function(){a.enable=function(){},n=!0;var e=Sn.f,t=W([].splice),o={};o[r]=1,e(o).length&&(Sn.f=function(n){for(var o=e(n),i=0,a=o.length;i<a;i++)if(o[i]===r){t(o,i,1);break}return o},_n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:la.f}))},fastKey:function(e,t){if(!me(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!q(e,r)){if(!fa(e))return"F";if(!t)return"E";i(e)}return e[r].objectID},getWeakData:function(e,t){if(!q(e,r)){if(!fa(e))return!0;if(!t)return!1;i(e)}return e[r].weakData},onFreeze:function(e){return da&&n&&fa(e)&&!q(e,r)&&i(e),e}};tt[r]=!0})),ha=P.TypeError,ga=function(e,t){this.stopped=e,this.result=t},va=ga.prototype,ya=function(e,t,n){var r,o,i,a,s,l,u,c=n&&n.that,f=!(!n||!n.AS_ENTRIES),d=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),h=Mt(t,c),g=function(e){return r&&Rr(r,"normal",e),new ga(!0,e)},v=function(e){return f?(Oe(e),p?h(e[0],e[1],g):h(e[0],e[1])):p?h(e,g):h(e)};if(d)r=e;else{if(!(o=$r(e)))throw ha(Re(e)+" is not iterable");if(Fr(o)){for(i=0,a=It(e);a>i;i++)if((s=v(e[i]))&&Ne(va,s))return s;return new ga(!1)}r=Hr(e,o)}for(l=r.next;!(u=Te(l,r)).done;){try{s=v(u.value)}catch(e){Rr(r,"throw",e)}if("object"==typeof s&&s&&Ne(va,s))return s}return new ga(!1)},ma=P.TypeError,ba=function(e,t){if(Ne(t,e))return e;throw ma("Incorrect invocation")},wa=function(e,t,n){var r,o;return xo&&Q(r=t.constructor)&&r!==n&&me(o=r.prototype)&&o!==n.prototype&&xo(e,o),e},xa=function(e,t,n){var r=-1!==e.indexOf("Map"),o=-1!==e.indexOf("Weak"),i=r?"set":"add",a=P[e],s=a&&a.prototype,l=a,u={},c=function(e){var t=W(s[e]);gt(s,e,"add"==e?function(e){return t(this,0===e?0:e),this}:"delete"==e?function(e){return!(o&&!me(e))&&t(this,0===e?0:e)}:"get"==e?function(e){return o&&!me(e)?void 0:t(this,0===e?0:e)}:"has"==e?function(e){return!(o&&!me(e))&&t(this,0===e?0:e)}:function(e,n){return t(this,0===e?0:e,n),this})};if(jn(e,!Q(a)||!(o||s.forEach&&!se((function(){(new a).entries().next()})))))l=n.getConstructor(t,e,r,i),pa.enable();else if(jn(e,!0)){var f=new l,d=f[i](o?{}:-0,1)!=f,p=se((function(){f.has(1)})),h=Gr((function(e){new a(e)})),g=!o&&se((function(){for(var e=new a,t=5;t--;)e[i](t,t);return!e.has(-0)}));h||((l=t((function(e,t){ba(e,s);var n=wa(new a,e,l);return null!=t&&ya(t,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=s,s.constructor=l),(p||g)&&(c("delete"),c("has"),r&&c("get")),(g||d)&&c(i),o&&s.clear&&delete s.clear}return u[e]=l,_n({global:!0,forced:l!=a},u),vo(l,e),o||n.setStrong(l,e,r),l},Ea=pa.getWeakData,Sa=ct.set,ka=ct.getterFor,Oa=Zt.find,Ca=Zt.findIndex,Ta=W([].splice),Na=0,Ma=function(e){return e.frozen||(e.frozen=new La)},La=function(){this.entries=[]},Pa=function(e,t){return Oa(e.entries,(function(e){return e[0]===t}))};La.prototype={get:function(e){var t=Pa(this,e);if(t)return t[1]},has:function(e){return!!Pa(this,e)},set:function(e,t){var n=Pa(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=Ca(this.entries,(function(t){return t[0]===e}));return~t&&Ta(this.entries,t,1),!!~t}};var Ra,Da={getConstructor:function(e,t,n,r){var o=e((function(e,o){ba(e,i),Sa(e,{type:t,id:Na++,frozen:void 0}),null!=o&&ya(o,e[r],{that:e,AS_ENTRIES:n})})),i=o.prototype,a=ka(t),s=function(e,t,n){var r=a(e),o=Ea(Oe(t),!0);return!0===o?Ma(r).set(t,n):o[r.id]=n,e};return na(i,{delete:function(e){var t=a(this);if(!me(e))return!1;var n=Ea(e);return!0===n?Ma(t).delete(e):n&&q(n,t.id)&&delete n[t.id]},has:function(e){var t=a(this);if(!me(e))return!1;var n=Ea(e);return!0===n?Ma(t).has(e):n&&q(n,t.id)}}),na(i,n?{get:function(e){var t=a(this);if(me(e)){var n=Ea(e);return!0===n?Ma(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return s(this,e,t)}}:{add:function(e){return s(this,e,!0)}}),o}},ja=ct.enforce,Aa=!P.ActiveXObject&&"ActiveXObject"in P,_a=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Fa=xa("WeakMap",_a,Da);if(Qe&&Aa){Ra=Da.getConstructor(_a,"WeakMap",!0),pa.enable();var Ia=Fa.prototype,Ba=W(Ia.delete),$a=W(Ia.has),Wa=W(Ia.get),Ha=W(Ia.set);na(Ia,{delete:function(e){if(me(e)&&!fa(e)){var t=ja(this);return t.frozen||(t.frozen=new Ra),Ba(this,e)||t.frozen.delete(e)}return Ba(this,e)},has:function(e){if(me(e)&&!fa(e)){var t=ja(this);return t.frozen||(t.frozen=new Ra),$a(this,e)||t.frozen.has(e)}return $a(this,e)},get:function(e){if(me(e)&&!fa(e)){var t=ja(this);return t.frozen||(t.frozen=new Ra),$a(this,e)?Wa(this,e):t.frozen.get(e)}return Wa(this,e)},set:function(e,t){if(me(e)&&!fa(e)){var n=ja(this);n.frozen||(n.frozen=new Ra),$a(this,e)?Ha(this,e,t):n.frozen.set(e,t)}else Ha(this,e,t);return this}})}var Va=he("iterator"),za=he("toStringTag"),Ua=ta.values,Ka=function(e,t){if(e){if(e[Va]!==Ua)try{Ue(e,Va,Ua)}catch(t){e[Va]=Ua}if(e[za]||Ue(e,za,t),kt[t])for(var n in ta)if(e[n]!==ta[n])try{Ue(e,n,ta[n])}catch(t){e[n]=ta[n]}}};for(var qa in kt)Ka(P[qa]&&P[qa].prototype,qa);Ka(Tt,"DOMTokenList");var Ga=new WeakMap,Ja=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,Qa=new WeakMap,Za=new WeakMap,es=new WeakMap,ts=new WeakMap,ns=new WeakMap,rs=new WeakMap,os=new WeakMap,is=new WeakMap,as=new WeakMap,ss=new WeakMap,ls=new WeakMap,us=new WeakMap,cs=new WeakMap,fs=new WeakMap,ds=new WeakMap,ps=new WeakMap,hs=new WeakMap,gs=new WeakMap,vs=new WeakMap,ys=new WeakMap,ms=new WeakMap,bs=Zt.find,ws="find",xs=!0;ws in[]&&Array(1).find((function(){xs=!1})),_n({target:"Array",proto:!0,forced:xs},{find:function(e){return bs(this,e,arguments.length>1?arguments[1]:void 0)}}),wr(ws),_n({global:!0},{globalThis:P});const Es=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","isindex","keygen","link","menuitem","meta","nextid","param","source","track","wbr"];r.css&&(y.default.fn.css=r.css),r.append&&(y.default.fn.append=r.append),r.addClass&&(y.default.fn.addClass=r.addClass),r.removeClass&&(y.default.fn.removeClass=r.removeClass),r.hasClass&&(y.default.fn.hasClass=r.hasClass),r.on&&(y.default.fn.on=r.on),r.focus&&(y.default.fn.focus=r.focus),r.attr&&(y.default.fn.attr=r.attr),r.removeAttr&&(y.default.fn.removeAttr=r.removeAttr),r.hide&&(y.default.fn.hide=r.hide),r.show&&(y.default.fn.show=r.show),r.offset&&(y.default.fn.offset=r.offset),r.width&&(y.default.fn.width=r.width),r.height&&(y.default.fn.height=r.height),r.parent&&(y.default.fn.parent=r.parent),r.parents&&(y.default.fn.parents=r.parents),r.is&&(y.default.fn.is=r.is),r.dataset&&(y.default.fn.dataset=r.dataset),r.val&&(y.default.fn.val=r.val),r.text&&(y.default.fn.text=r.text),r.html&&(y.default.fn.html=r.html),r.children&&(y.default.fn.children=r.children),r.remove&&(y.default.fn.remove=r.remove),r.find&&(y.default.fn.find=r.find),r.each&&(y.default.fn.each=r.each),r.empty&&(y.default.fn.empty=r.empty);var Ss,ks=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||null},Os=function(e){return Cs(e)&&1===e.nodeType},Cs=function(e){var t=ks(e);return!!t&&e instanceof t.Node},Ts=function(e){var t=e&&e.anchorNode&&ks(e.anchorNode);return!!t&&e instanceof t.Selection},Ns=function(e){return Cs(e)&&3===e.nodeType},Ms=function(e){var t,n,r;return null!==(t=window.document.getElementById(e))&&void 0!==t?t:(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},Ls=function(e,t,n){for(var r,o=e.childNodes,i=o[t],a=t,s=!1,l=!1;(Cs(r=i)&&8===r.nodeType||Os(i)&&0===i.childNodes.length||Os(i)&&"false"===i.getAttribute("contenteditable"))&&(!s||!l);)a>=o.length?(s=!0,a=t-1,n="backward"):a<0?(l=!0,a=t+1,n="forward"):(i=o[a],t=a,a+="forward"===n?1:-1);return[i,t]},Ps=function(e,t,n){return Gi(Ls(e,t,n),1)[0]},Rs=function e(t){var n,r,o="";if(Ns(t)&&t.nodeValue)return t.nodeValue;if(Os(t)){try{for(var i=qi(Array.from(t.childNodes)),a=i.next();!a.done;a=i.next()){o+=e(a.value)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}var s=getComputedStyle(t).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==t.tagName||(o+="\n")}return o};function Ds(e,t){if(!(e instanceof HTMLElement&&"true"===e.dataset.slateVoid))for(var n=e.childNodes,r=n.length;r--;){var o=n[r],i=o.nodeType;3==i?t(o,e):1!=i&&9!=i&&11!=i||Ds(o,t)}}function js(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==Ss.ELEMENT_NODE?"":t.tagName.toLowerCase()}!function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(Ss||(Ss={})),void 0!==globalThis.navigator&&void 0!==globalThis.window&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&globalThis.window.MSStream;var As="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),_s="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent);"undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent);var Fs="undefined"!=typeof navigator&&/Version\/[\d\.]+.*Safari/.test(navigator.userAgent),Is="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Bs="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),$s="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent);"undefined"!=typeof navigator&&/.*QQBrowser/.test(navigator.userAgent);var Ws=!Bs&&!Is&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,Hs={getWindow:function(e){var t=hs.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var n=ps.get(t);return n||(n=new Xi,ps.set(t,n)),n},setNewKey:function(e){var t=new Xi;ps.set(e,t)},findPath:function(e,n){for(var r=[],o=n;;){var i=ls.get(o);if(null==i){if(t.Editor.isEditor(o))return r;break}var a=ss.get(o);if(null==a)break;r.unshift(a),o=i}throw new Error("Unable to find the path for Slate node: "+JSON.stringify(n))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=Hs.toDOMNode(e,e),n=t.getRootNode();return(n instanceof Document||n instanceof ShadowRoot)&&null!=n.getSelection?n:t.ownerDocument},getParentNode:function(e,t){return ls.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=Hs.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,n){var r=[Hs.findPath(e,n)[0]];return t.Node.get(e,r)},toDOMNode:function(e,n){var r;if(t.Editor.isEditor(n))r=us.get(e);else{var o=Hs.findKey(e,n);r=fs.get(o)}if(!r)throw new Error("Cannot resolve a DOM node from Slate node: "+JSON.stringify(n));return r},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=Hs.toDOMNode(e,e);try{r=Os(t)?t:t.parentElement}catch(e){if(!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||!!r.getAttribute("data-slate-zero-width")))},toDOMRange:function(e,n){var r=n.anchor,o=n.focus,i=t.Range.isBackward(n),a=Hs.toDOMPoint(e,r),s=t.Range.isCollapsed(n)?a:Hs.toDOMPoint(e,o),l=Hs.getWindow(e).document.createRange(),u=Gi(i?s:a,2),c=u[0],f=u[1],d=Gi(i?a:s,2),p=d[0],h=d[1],g=!!(Os(c)?c:c.parentElement).getAttribute("data-slate-zero-width"),v=!!(Os(p)?p:p.parentElement).getAttribute("data-slate-zero-width");return l.setStart(c,g?1:f),l.setEnd(p,v?1:h),l},toDOMPoint:function(e,n){var r,o,i,a=Gi(t.Editor.node(e,n.path),1)[0],s=Hs.toDOMNode(e,a);t.Editor.void(e,{at:n})&&(n={path:n.path,offset:0});var l=Array.from(s.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var c=qi(l),f=c.next();!f.done;f=c.next()){var d=f.value,p=d.childNodes[0];if(null!=p&&null!=p.textContent){var h=p.textContent.length,g=d.getAttribute("data-slate-length"),v=u+(null==g?h:parseInt(g,10));if(n.offset<=v){i=[p,Math.min(h,Math.max(0,n.offset-u))];break}u=v}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}if(!i)throw new Error("Cannot resolve a DOM point from Slate point: "+JSON.stringify(n));return i},toSlateNode:function(e,t){var n=Os(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?cs.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: "+n);return r},findEventRange:function(e,n){"nativeEvent"in n&&(n=n.nativeEvent);var r=n.clientX,o=n.clientY,i=n.target;if(null==r||null==o)throw new Error("Cannot resolve a Slate range from a DOM event: "+n);var a,s=Hs.toSlateNode(e,n.target),l=Hs.findPath(e,s);if(t.Editor.isVoid(e,s)){var u=i.getBoundingClientRect(),c=e.isInline(s)?r-u.left<u.left+u.width-r:o-u.top<u.top+u.height-o,f=t.Editor.point(e,l,{edge:c?"start":"end"}),d=c?t.Editor.before(e,f):t.Editor.after(e,f);if(d)return t.Editor.range(e,d)}var p=this.getWindow(e).document;if(p.caretRangeFromPoint)a=p.caretRangeFromPoint(r,o);else{var h=p.caretPositionFromPoint(r,o);h&&((a=p.createRange()).setStart(h.offsetNode,h.offset),a.setEnd(h.offsetNode,h.offset))}if(!a)throw new Error("Cannot resolve a Slate range from a DOM event: "+n);return Hs.toSlateRange(e,a,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,n,r){var o,i,a,s,l,u=r.exactMatch,c=r.suppressThrow;if((Ts(n)?n.anchorNode:n.startContainer)&&(Ts(n)?(o=n.anchorNode,i=n.anchorOffset,a=n.focusNode,s=n.focusOffset,l=$s&&window.document.activeElement&&window.document.activeElement.shadowRoot?n.anchorNode===n.focusNode&&n.anchorOffset===n.focusOffset:n.isCollapsed):(o=n.startContainer,i=n.startOffset,a=n.endContainer,s=n.endOffset,l=n.collapsed)),null==o||null==a||null==i||null==s)throw new Error("Cannot resolve a Slate range from DOM range: "+n);var f=Hs.toSlatePoint(e,[o,i],{exactMatch:u,suppressThrow:c});if(!f)return null;var d=l?f:Hs.toSlatePoint(e,[a,s],{exactMatch:u,suppressThrow:c});if(!d)return null;var p={anchor:f,focus:d};return t.Range.isExpanded(p)&&t.Range.isForward(p)&&Os(a)&&t.Editor.void(e,{at:p.focus,mode:"highest"})&&(p=t.Editor.unhangRange(e,p,{voids:!0})),p},toSlatePoint:function(e,t,n){var r,o=n.exactMatch,i=n.suppressThrow,a=Gi(o?t:function(e){var t,n=Gi(e,2),r=n[0],o=n[1];if(Os(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=Gi(Ls(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;Os(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=Ps(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]}(t),2),s=a[0],l=a[1],u=s.parentNode,c=null,f=0;if(u){var d=u.closest('[data-slate-void="true"]'),p=u.closest("[data-slate-leaf]"),h=null;if(p){c=p.closest('[data-slate-node="text"]');var g=Hs.getWindow(e).document.createRange();g.setStart(c,0),g.setEnd(s,l);var y=g.cloneContents();Ji(Ji([],Gi(v.default(y.querySelectorAll("[data-slate-zero-width]")))),Gi(v.default(y.querySelectorAll("[contenteditable=false]")))).forEach((function(e){e.parentNode.removeChild(e)})),f=y.textContent.length,h=c}else d&&((p=d.querySelector("[data-slate-leaf]"))?(c=p.closest('[data-slate-node="text"]'),f=(h=p).textContent.length,h.querySelectorAll("[data-slate-zero-width]").forEach((function(e){f-=e.textContent.length}))):f=1);h&&f===h.textContent.length&&(u.hasAttribute("data-slate-zero-width")||_s&&(null===(r=h.textContent)||void 0===r?void 0:r.endsWith("\n")))&&f--}if(!c){if(i)return null;throw new Error("Cannot resolve a Slate point from DOM point: "+t)}var m=Hs.toSlateNode(e,c);return{path:Hs.findPath(e,m),offset:f}},hasRange:function(e,n){var r=n.anchor,o=n.focus;return t.Editor.hasPath(e,r.path)&&t.Editor.hasPath(e,o.path)},getNodeType:function(e){return t.Element.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map((function(e){return t.Node.string(e)})).join("")},getSelectedElems:function(e){var n,r,o=[],i=t.Editor.nodes(e,{universal:!0});try{for(var a=qi(i),s=a.next();!s.done;s=a.next()){var l=Gi(s.value,1)[0];t.Element.isElement(l)&&o.push(l)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},getSelectedNodeByType:function(e,n){var r=this,o=Gi(t.Editor.nodes(e,{match:function(e){return r.checkNodeType(e,n)},universal:!0}),1),i=o[0];return null==i?null:i[0]},getSelectedTextNode:function(e){var n=Gi(t.Editor.nodes(e,{match:function(e){return t.Text.isText(e)},universal:!0}),1),r=n[0];return null==r?null:r[0]},isNodeSelected:function(e,n){var r=Gi(t.Editor.nodes(e,{match:function(e){return e===n},universal:!0}),1),o=r[0];return null!=o&&Gi(o,1)[0]===n},isSelectionAtLineEnd:function(e,n){var r=e.selection;return!!r&&(t.Editor.isEnd(e,r.anchor,n)||t.Editor.isEnd(e,r.focus,n))},getTextarea:function(e){var t=Ga.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return Xa.get(e)||null},getHoverbar:function(e){return Za.get(e)||null},normalizeContent:function(e){e.children.forEach((function(t,n){e.normalizeNode([t,[n]])}))},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-e.getText().replace(/\r|\n|(\r\n)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var n,r,o,i,a=Hs.getTextarea(e).$textArea,s=null==a?void 0:a[0].childNodes;if(s)try{for(var l=qi(Array.from(s)),u=l.next();!u.done;u=l.next()){var c=u.value;if(3!==c.nodeType)break;c.remove()}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}var f=t.Editor.nodes(e,{match:function(n){return!(!t.Element.isElement(n)||e.isInline(n))},universal:!0});try{for(var d=qi(f),p=d.next();!p.done;p=d.next()){var h=p.value;if(null!=h){var g=h[0];Ds(Hs.toDOMNode(e,g),(function(e,t){var n=y.default(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)}))}}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var n,r,o=t.Editor.nodes(e,{match:function(t){return e.isVoid(t)}}),i=0;try{for(var a=qi(o),s=a.next();!s.done;s=a.next()){s.value;i++}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i>0},isSelectedEmptyParagraph:function(e){var n=e.selection;if(null==n)return!1;if(t.Range.isExpanded(n))return!1;var r=Hs.getSelectedNodeByType(e,"paragraph");if(null===r)return!1;var o=r.children;return 1===o.length&&(""===o[0].text||void 0)},isEmptyPath:function(e,n){var r=t.Editor.node(e,n);i