@wangeditor-next/upload-image-module 1.1.5 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import{i18nAddResources as t,createUploader as e,t as n}from"@wangeditor-next/core";import{insertImageNode as r,isInsertImageMenuDisabled as o}from"@wangeditor-next/basic-modules";import i,{append as u,on as a,remove as c,val as f,click as s,hide as l}from"dom7";t("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),t("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function v(t){var e={exports:{}};return t(e,e.exports),e.exports}var d,h,y=function(t){return t&&t.Math===Math&&t},g=y("object"==typeof globalThis&&globalThis)||y("object"==typeof window&&window)||y("object"==typeof self&&self)||y("object"==typeof p&&p)||y("object"==typeof p&&p)||function(){return this}()||Function("return this")(),m=function(t){try{return!!t()}catch(t){return!0}},b=!m((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),w=!m((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),S=Function.prototype.call,O=w?S.bind(S):function(){return S.apply(S,arguments)},E={}.propertyIsEnumerable,j=Object.getOwnPropertyDescriptor,x={f:j&&!E.call({1:2},1)?function(t){var e=j(this,t);return!!e&&e.enumerable}:E},T=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},P=Function.prototype,I=P.call,R=w&&P.bind.bind(I,I),A=w?R:function(t){return function(){return I.apply(t,arguments)}},C=A({}.toString),N=A("".slice),k=function(t){return N(C(t),8,-1)},L=Object,M=A("".split),D=m((function(){return!L("z").propertyIsEnumerable(0)}))?function(t){return"String"===k(t)?M(t,""):L(t)}:L,F=function(t){return null==t},z=TypeError,_=function(t){if(F(t))throw new z("Can't call method on "+t);return t},U=function(t){return D(_(t))},B="object"==typeof document&&document.all,G=void 0===B&&void 0!==B?function(t){return"function"==typeof t||t===B}:function(t){return"function"==typeof t},W=function(t){return"object"==typeof t?null!==t:G(t)},V=function(t,e){return arguments.length<2?(n=g[t],G(n)?n:void 0):g[t]&&g[t][e];var n},H=A({}.isPrototypeOf),K=g.navigator,X=K&&K.userAgent,Y=X?String(X):"",$=g.process,q=g.Deno,J=$&&$.versions||q&&q.version,Q=J&&J.v8;Q&&(h=(d=Q.split("."))[0]>0&&d[0]<4?1:+(d[0]+d[1])),!h&&Y&&(!(d=Y.match(/Edge\/(\d+)/))||d[1]>=74)&&(d=Y.match(/Chrome\/(\d+)/))&&(h=+d[1]);var Z=h,tt=g.String,et=!!Object.getOwnPropertySymbols&&!m((function(){var t=Symbol("symbol detection");return!tt(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Z&&Z<41})),nt=et&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,rt=Object,ot=nt?function(t){return"symbol"==typeof t}:function(t){var e=V("Symbol");return G(e)&&H(e.prototype,rt(t))},it=String,ut=function(t){try{return it(t)}catch(t){return"Object"}},at=TypeError,ct=function(t){if(G(t))return t;throw new at(ut(t)+" is not a function")},ft=function(t,e){var n=t[e];return F(n)?void 0:ct(n)},st=TypeError,lt=Object.defineProperty,pt=function(t,e){try{lt(g,t,{value:e,configurable:!0,writable:!0})}catch(n){g[t]=e}return e},vt=v((function(t){var e="__core-js_shared__",n=t.exports=g[e]||pt(e,{});(n.versions||(n.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),dt=function(t,e){return vt[t]||(vt[t]=e||{})},ht=Object,yt=function(t){return ht(_(t))},gt=A({}.hasOwnProperty),mt=Object.hasOwn||function(t,e){return gt(yt(t),e)},bt=0,wt=Math.random(),St=A(1..toString),Ot=function(t){return"Symbol("+(void 0===t?"":t)+")_"+St(++bt+wt,36)},Et=g.Symbol,jt=dt("wks"),xt=nt?Et.for||Et:Et&&Et.withoutSetter||Ot,Tt=function(t){return mt(jt,t)||(jt[t]=et&&mt(Et,t)?Et[t]:xt("Symbol."+t)),jt[t]},Pt=TypeError,It=Tt("toPrimitive"),Rt=function(t,e){if(!W(t)||ot(t))return t;var n,r=ft(t,It);if(r){if(void 0===e&&(e="default"),n=O(r,t,e),!W(n)||ot(n))return n;throw new Pt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&G(n=t.toString)&&!W(r=O(n,t)))return r;if(G(n=t.valueOf)&&!W(r=O(n,t)))return r;if("string"!==e&&G(n=t.toString)&&!W(r=O(n,t)))return r;throw new st("Can't convert object to primitive value")}(t,e)},At=function(t){var e=Rt(t,"string");return ot(e)?e:e+""},Ct=g.document,Nt=W(Ct)&&W(Ct.createElement),kt=function(t){return Nt?Ct.createElement(t):{}},Lt=!b&&!m((function(){return 7!==Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Mt=Object.getOwnPropertyDescriptor,Dt={f:b?Mt:function(t,e){if(t=U(t),e=At(e),Lt)try{return Mt(t,e)}catch(t){}if(mt(t,e))return T(!O(x.f,t,e),t[e])}},Ft=b&&m((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),zt=String,_t=TypeError,Ut=function(t){if(W(t))return t;throw new _t(zt(t)+" is not an object")},Bt=TypeError,Gt=Object.defineProperty,Wt=Object.getOwnPropertyDescriptor,Vt="enumerable",Ht="configurable",Kt="writable",Xt={f:b?Ft?function(t,e,n){if(Ut(t),e=At(e),Ut(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Kt in n&&!n[Kt]){var r=Wt(t,e);r&&r[Kt]&&(t[e]=n.value,n={configurable:Ht in n?n[Ht]:r[Ht],enumerable:Vt in n?n[Vt]:r[Vt],writable:!1})}return Gt(t,e,n)}:Gt:function(t,e,n){if(Ut(t),e=At(e),Ut(n),Lt)try{return Gt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new Bt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Yt=b?function(t,e,n){return Xt.f(t,e,T(1,n))}:function(t,e,n){return t[e]=n,t},$t=Function.prototype,qt=b&&Object.getOwnPropertyDescriptor,Jt=mt($t,"name"),Qt={EXISTS:Jt,PROPER:Jt&&"something"===function(){}.name,CONFIGURABLE:Jt&&(!b||b&&qt($t,"name").configurable)},Zt=A(Function.toString);G(vt.inspectSource)||(vt.inspectSource=function(t){return Zt(t)});var te,ee,ne,re=vt.inspectSource,oe=g.WeakMap,ie=G(oe)&&/native code/.test(String(oe)),ue=dt("keys"),ae=function(t){return ue[t]||(ue[t]=Ot(t))},ce={},fe="Object already initialized",se=g.TypeError,le=g.WeakMap;if(ie||vt.state){var pe=vt.state||(vt.state=new le);pe.get=pe.get,pe.has=pe.has,pe.set=pe.set,te=function(t,e){if(pe.has(t))throw new se(fe);return e.facade=t,pe.set(t,e),e},ee=function(t){return pe.get(t)||{}},ne=function(t){return pe.has(t)}}else{var ve=ae("state");ce[ve]=!0,te=function(t,e){if(mt(t,ve))throw new se(fe);return e.facade=t,Yt(t,ve,e),e},ee=function(t){return mt(t,ve)?t[ve]:{}},ne=function(t){return mt(t,ve)}}var de={set:te,get:ee,has:ne,enforce:function(t){return ne(t)?ee(t):te(t,{})},getterFor:function(t){return function(e){var n;if(!W(e)||(n=ee(e)).type!==t)throw new se("Incompatible receiver, "+t+" required");return n}}},he=v((function(t){var e=Qt.CONFIGURABLE,n=de.enforce,r=de.get,o=String,i=Object.defineProperty,u=A("".slice),a=A("".replace),c=A([].join),f=b&&!m((function(){return 8!==i((function(){}),"length",{value:8}).length})),s=String(String).split("String"),l=t.exports=function(t,r,l){"Symbol("===u(o(r),0,7)&&(r="["+a(o(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),l&&l.getter&&(r="get "+r),l&&l.setter&&(r="set "+r),(!mt(t,"name")||e&&t.name!==r)&&(b?i(t,"name",{value:r,configurable:!0}):t.name=r),f&&l&&mt(l,"arity")&&t.length!==l.arity&&i(t,"length",{value:l.arity});try{l&&mt(l,"constructor")&&l.constructor?b&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var p=n(t);return mt(p,"source")||(p.source=c(s,"string"==typeof r?r:"")),t};Function.prototype.toString=l((function(){return G(this)&&r(this).source||re(this)}),"toString")})),ye=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(G(n)&&he(n,i,r),r.global)o?t[e]=n:pt(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Xt.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},ge=Math.ceil,me=Math.floor,be=Math.trunc||function(t){var e=+t;return(e>0?me:ge)(e)},we=function(t){var e=+t;return e!=e||0===e?0:be(e)},Se=Math.max,Oe=Math.min,Ee=function(t,e){var n=we(t);return n<0?Se(n+e,0):Oe(n,e)},je=Math.min,xe=function(t){return e=t.length,(n=we(e))>0?je(n,9007199254740991):0;var e,n},Te=function(t){return function(e,n,r){var o=U(e),i=xe(o);if(0===i)return!t&&-1;var u,a=Ee(r,i);if(t&&n!=n){for(;i>a;)if((u=o[a++])!=u)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},Pe={includes:Te(!0),indexOf:Te(!1)}.indexOf,Ie=A([].push),Re=function(t,e){var n,r=U(t),o=0,i=[];for(n in r)!mt(ce,n)&&mt(r,n)&&Ie(i,n);for(;e.length>o;)mt(r,n=e[o++])&&(~Pe(i,n)||Ie(i,n));return i},Ae=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ce=Ae.concat("length","prototype"),Ne={f:Object.getOwnPropertyNames||function(t){return Re(t,Ce)}},ke={f:Object.getOwnPropertySymbols},Le=A([].concat),Me=V("Reflect","ownKeys")||function(t){var e=Ne.f(Ut(t)),n=ke.f;return n?Le(e,n(t)):e},De=function(t,e,n){for(var r=Me(e),o=Xt.f,i=Dt.f,u=0;u<r.length;u++){var a=r[u];mt(t,a)||n&&mt(n,a)||o(t,a,i(e,a))}},Fe=/#|\.prototype\./,ze=function(t,e){var n=Ue[_e(t)];return n===Ge||n!==Be&&(G(e)?m(e):!!e)},_e=ze.normalize=function(t){return String(t).replace(Fe,".").toLowerCase()},Ue=ze.data={},Be=ze.NATIVE="N",Ge=ze.POLYFILL="P",We=ze,Ve=Dt.f,He=function(t,e){var n,r,o,i,u,a=t.target,c=t.global,f=t.stat;if(n=c?g:f?g[a]||pt(a,{}):g[a]&&g[a].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=Ve(n,r))&&u.value:n[r],!We(c?r:a+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;De(i,o)}(t.sham||o&&o.sham)&&Yt(i,"sham",!0),ye(n,r,i,t)}},Ke=Array.isArray||function(t){return"Array"===k(t)},Xe={};Xe[Tt("toStringTag")]="z";var Ye="[object z]"===String(Xe),$e=Tt("toStringTag"),qe=Object,Je="Arguments"===k(function(){return arguments}()),Qe=Ye?k:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=qe(t),$e))?n:Je?k(e):"Object"===(r=k(e))&&G(e.callee)?"Arguments":r},Ze=function(){},tn=V("Reflect","construct"),en=/^\s*(?:class|function)\b/,nn=A(en.exec),rn=!en.test(Ze),on=function(t){if(!G(t))return!1;try{return tn(Ze,[],t),!0}catch(t){return!1}},un=function(t){if(!G(t))return!1;switch(Qe(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return rn||!!nn(en,re(t))}catch(t){return!0}};un.sham=!0;var an,cn=!tn||m((function(){var t;return on(on.call)||!on(Object)||!on((function(){t=!0}))||t}))?un:on,fn=Tt("species"),sn=A([].slice),ln=(an="slice",Z>=51||!m((function(){var t=[];return(t.constructor={})[fn]=function(){return{foo:1}},1!==t[an](Boolean).foo}))),pn=Tt("species"),vn=Array,dn=Math.max;He({target:"Array",proto:!0,forced:!ln},{slice:function(t,e){var n,r,o,i,u,a,c=U(this),f=xe(c),s=Ee(t,f),l=Ee(void 0===e?f:e,f);if(Ke(c)&&(n=c.constructor,(cn(n)&&(n===vn||Ke(n.prototype))||W(n)&&null===(n=n[pn]))&&(n=void 0),n===vn||void 0===n))return sn(c,s,l);for(r=new(void 0===n?vn:n)(dn(l-s,0)),o=0;s<l;s++,o++)s in c&&(i=r,u=o,a=c[s],b?Xt.f(i,u,T(0,a)):i[u]=a);return r.length=o,r}});var hn=Ye?{}.toString:function(){return"[object "+Qe(this)+"]"};Ye||ye(Object.prototype,"toString",hn,{unsafe:!0});var yn=function(){return yn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},yn.apply(this,arguments)};function gn(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))}function mn(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=e.call(t,u)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function bn(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function wn(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=bn(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;var Sn,On=Object.keys||function(t){return Re(t,Ae)},En=b&&!Ft?Object.defineProperties:function(t,e){Ut(t);for(var n,r=U(e),o=On(e),i=o.length,u=0;i>u;)Xt.f(t,n=o[u++],r[n]);return t},jn={f:En},xn=V("document","documentElement"),Tn="prototype",Pn="script",In=ae("IE_PROTO"),Rn=function(){},An=function(t){return"<"+Pn+">"+t+"</"+Pn+">"},Cn=function(t){t.write(An("")),t.close();var e=t.parentWindow.Object;return t=null,e},Nn=function(){try{Sn=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Nn="undefined"!=typeof document?document.domain&&Sn?Cn(Sn):(e=kt("iframe"),n="java"+Pn+":",e.style.display="none",xn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(An("document.F=Object")),t.close(),t.F):Cn(Sn);for(var r=Ae.length;r--;)delete Nn[Tn][Ae[r]];return Nn()};ce[In]=!0;var kn=Object.create||function(t,e){var n;return null!==t?(Rn[Tn]=Ut(t),n=new Rn,Rn[Tn]=null,n[In]=t):n=Nn(),void 0===e?n:jn.f(n,e)},Ln=Xt.f,Mn=Tt("unscopables"),Dn=Array.prototype;void 0===Dn[Mn]&&Ln(Dn,Mn,{configurable:!0,value:kn(null)});var Fn,zn,_n,Un=function(t){Dn[Mn][t]=!0},Bn={},Gn=!m((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Wn=ae("IE_PROTO"),Vn=Object,Hn=Vn.prototype,Kn=Gn?Vn.getPrototypeOf:function(t){var e=yt(t);if(mt(e,Wn))return e[Wn];var n=e.constructor;return G(n)&&e instanceof n?n.prototype:e instanceof Vn?Hn:null},Xn=Tt("iterator"),Yn=!1;[].keys&&("next"in(_n=[].keys())?(zn=Kn(Kn(_n)))!==Object.prototype&&(Fn=zn):Yn=!0);var $n=!W(Fn)||m((function(){var t={};return Fn[Xn].call(t)!==t}));$n&&(Fn={}),G(Fn[Xn])||ye(Fn,Xn,(function(){return this}));var qn={IteratorPrototype:Fn,BUGGY_SAFARI_ITERATORS:Yn},Jn=Xt.f,Qn=Tt("toStringTag"),Zn=function(t,e,n){t&&!n&&(t=t.prototype),t&&!mt(t,Qn)&&Jn(t,Qn,{configurable:!0,value:e})},tr=qn.IteratorPrototype,er=function(){return this},nr=String,rr=TypeError,or=function(t){if(function(t){return W(t)||null===t}(t))return t;throw new rr("Can't set "+nr(t)+" as a prototype")},ir=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=function(t,e,n){try{return A(ct(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return _(n),or(r),W(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),ur=Qt.PROPER,ar=Qt.CONFIGURABLE,cr=qn.IteratorPrototype,fr=qn.BUGGY_SAFARI_ITERATORS,sr=Tt("iterator"),lr="keys",pr="values",vr="entries",dr=function(){return this},hr=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=kn(tr,{next:T(+!r,n)}),Zn(t,o,!1),Bn[o]=er}(n,e,r);var a,c,f,s=function(t){if(t===o&&h)return h;if(!fr&&t&&t in v)return v[t];switch(t){case lr:case pr:case vr:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",p=!1,v=t.prototype,d=v[sr]||v["@@iterator"]||o&&v[o],h=!fr&&d||s(o),y="Array"===e&&v.entries||d;if(y&&(a=Kn(y.call(new t)))!==Object.prototype&&a.next&&(Kn(a)!==cr&&(ir?ir(a,cr):G(a[sr])||ye(a,sr,dr)),Zn(a,l,!0)),ur&&o===pr&&d&&d.name!==pr&&(ar?Yt(v,"name",pr):(p=!0,h=function(){return O(d,this)})),o)if(c={values:s(pr),keys:i?h:s(lr),entries:s(vr)},u)for(f in c)(fr||p||!(f in v))&&ye(v,f,c[f]);else He({target:e,proto:!0,forced:fr||p},c);return v[sr]!==h&&ye(v,sr,h,{name:o}),Bn[e]=h,c},yr=function(t,e){return{value:t,done:e}},gr=Xt.f,mr="Array Iterator",br=de.set,wr=de.getterFor(mr),Sr=hr(Array,"Array",(function(t,e){br(this,{type:mr,target:U(t),index:0,kind:e})}),(function(){var t=wr(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,yr(void 0,!0);switch(t.kind){case"keys":return yr(n,!1);case"values":return yr(e[n],!1)}return yr([n,e[n]],!1)}),"values"),Or=Bn.Arguments=Bn.Array;if(Un("keys"),Un("values"),Un("entries"),b&&"values"!==Or.name)try{gr(Or,"name",{value:"values"})}catch(t){}var Er=function(t,e,n){return n.get&&he(n.get,e,{getter:!0}),n.set&&he(n.set,e,{setter:!0}),Xt.f(t,e,n)},jr=Qt.EXISTS,xr=Function.prototype,Tr=A(xr.toString),Pr=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Ir=A(Pr.exec);b&&!jr&&Er(xr,"name",{configurable:!0,get:function(){try{return Ir(Pr,Tr(this))[1]}catch(t){return""}}});var Rr,Ar,Cr,Nr,kr=function(t){return Y.slice(0,t.length)===t},Lr=kr("Bun/")?"BUN":kr("Cloudflare-Workers")?"CLOUDFLARE":kr("Deno/")?"DENO":kr("Node.js/")?"NODE":g.Bun&&"string"==typeof Bun.version?"BUN":g.Deno&&"object"==typeof Deno.version?"DENO":"process"===k(g.process)?"NODE":g.window&&g.document?"BROWSER":"REST",Mr="NODE"===Lr,Dr=Tt("species"),Fr=TypeError,zr=function(t,e){if(H(e,t))return t;throw new Fr("Incorrect invocation")},_r=TypeError,Ur=Tt("species"),Br=function(t,e){var n,r=Ut(t).constructor;return void 0===r||F(n=Ut(r)[Ur])?e:function(t){if(cn(t))return t;throw new _r(ut(t)+" is not a constructor")}(n)},Gr=Function.prototype,Wr=Gr.apply,Vr=Gr.call,Hr="object"==typeof Reflect&&Reflect.apply||(w?Vr.bind(Wr):function(){return Vr.apply(Wr,arguments)}),Kr=function(t){if("Function"===k(t))return A(t)},Xr=Kr(Kr.bind),Yr=function(t,e){return ct(t),void 0===e?t:w?Xr(t,e):function(){return t.apply(e,arguments)}},$r=TypeError,qr=/(?:ipad|iphone|ipod).*applewebkit/i.test(Y),Jr=g.setImmediate,Qr=g.clearImmediate,Zr=g.process,to=g.Dispatch,eo=g.Function,no=g.MessageChannel,ro=g.String,oo=0,io={},uo="onreadystatechange";m((function(){Rr=g.location}));var ao=function(t){if(mt(io,t)){var e=io[t];delete io[t],e()}},co=function(t){return function(){ao(t)}},fo=function(t){ao(t.data)},so=function(t){g.postMessage(ro(t),Rr.protocol+"//"+Rr.host)};Jr&&Qr||(Jr=function(t){!function(t,e){if(t<e)throw new $r("Not enough arguments")}(arguments.length,1);var e=G(t)?t:eo(t),n=sn(arguments,1);return io[++oo]=function(){Hr(e,void 0,n)},Ar(oo),oo},Qr=function(t){delete io[t]},Mr?Ar=function(t){Zr.nextTick(co(t))}:to&&to.now?Ar=function(t){to.now(co(t))}:no&&!qr?(Nr=(Cr=new no).port2,Cr.port1.onmessage=fo,Ar=Yr(Nr.postMessage,Nr)):g.addEventListener&&G(g.postMessage)&&!g.importScripts&&Rr&&"file:"!==Rr.protocol&&!m(so)?(Ar=so,g.addEventListener("message",fo,!1)):Ar=uo in kt("script")?function(t){xn.appendChild(kt("script"))[uo]=function(){xn.removeChild(this),ao(t)}}:function(t){setTimeout(co(t),0)});var lo={set:Jr,clear:Qr},po=Object.getOwnPropertyDescriptor,vo=function(){this.head=null,this.tail=null};vo.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var ho,yo,go,mo,bo,wo=vo,So=/ipad|iphone|ipod/i.test(Y)&&"undefined"!=typeof Pebble,Oo=/web0s(?!.*chrome)/i.test(Y),Eo=lo.set,jo=g.MutationObserver||g.WebKitMutationObserver,xo=g.document,To=g.process,Po=g.Promise,Io=function(t){if(!b)return g[t];var e=po(g,t);return e&&e.value}("queueMicrotask");if(!Io){var Ro=new wo,Ao=function(){var t,e;for(Mr&&(t=To.domain)&&t.exit();e=Ro.get();)try{e()}catch(t){throw Ro.head&&ho(),t}t&&t.enter()};qr||Mr||Oo||!jo||!xo?!So&&Po&&Po.resolve?((mo=Po.resolve(void 0)).constructor=Po,bo=Yr(mo.then,mo),ho=function(){bo(Ao)}):Mr?ho=function(){To.nextTick(Ao)}:(Eo=Yr(Eo,g),ho=function(){Eo(Ao)}):(yo=!0,go=xo.createTextNode(""),new jo(Ao).observe(go,{characterData:!0}),ho=function(){go.data=yo=!yo}),Io=function(t){Ro.head||ho(),Ro.add(t)}}var Co=Io,No=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},ko=g.Promise;ko&&ko.prototype;var Lo,Mo,Do,Fo,zo=Tt("species"),_o=!1,Uo=G(g.PromiseRejectionEvent),Bo=We("Promise",(function(){var t=re(ko),e=t!==String(ko);if(!e&&66===Z)return!0;if(!Z||Z<51||!/native code/.test(t)){var n=new ko((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[zo]=r,!(_o=n.then((function(){}))instanceof r))return!0}return!(e||"BROWSER"!==Lr&&"DENO"!==Lr||Uo)})),Go={CONSTRUCTOR:Bo,REJECTION_EVENT:Uo,SUBCLASSING:_o},Wo=TypeError,Vo=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new Wo("Bad Promise constructor");e=t,n=r})),this.resolve=ct(e),this.reject=ct(n)},Ho={f:function(t){return new Vo(t)}},Ko=lo.set,Xo="Promise",Yo=Go.CONSTRUCTOR,$o=Go.REJECTION_EVENT,qo=Go.SUBCLASSING,Jo=de.getterFor(Xo),Qo=de.set,Zo=ko&&ko.prototype,ti=ko,ei=Zo,ni=g.TypeError,ri=g.document,oi=g.process,ii=Ho.f,ui=ii,ai=!!(ri&&ri.createEvent&&g.dispatchEvent),ci="unhandledrejection",fi=function(t){var e;return!(!W(t)||!G(e=t.then))&&e},si=function(t,e){var n,r,o,i=e.value,u=1===e.state,a=u?t.ok:t.fail,c=t.resolve,f=t.reject,s=t.domain;try{a?(u||(2===e.rejection&&hi(e),e.rejection=1),!0===a?n=i:(s&&s.enter(),n=a(i),s&&(s.exit(),o=!0)),n===t.promise?f(new ni("Promise-chain cycle")):(r=fi(n))?O(r,n,c,f):c(n)):f(i)}catch(t){s&&!o&&s.exit(),f(t)}},li=function(t,e){t.notified||(t.notified=!0,Co((function(){for(var n,r=t.reactions;n=r.get();)si(n,t);t.notified=!1,e&&!t.rejection&&vi(t)})))},pi=function(t,e,n){var r,o;ai?((r=ri.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),g.dispatchEvent(r)):r={promise:e,reason:n},!$o&&(o=g["on"+t])?o(r):t===ci&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",n)},vi=function(t){O(Ko,g,(function(){var e,n=t.facade,r=t.value;if(di(t)&&(e=No((function(){Mr?oi.emit("unhandledRejection",r,n):pi(ci,n,r)})),t.rejection=Mr||di(t)?2:1,e.error))throw e.value}))},di=function(t){return 1!==t.rejection&&!t.parent},hi=function(t){O(Ko,g,(function(){var e=t.facade;Mr?oi.emit("rejectionHandled",e):pi("rejectionhandled",e,t.value)}))},yi=function(t,e,n){return function(r){t(e,r,n)}},gi=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,li(t,!0))},mi=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new ni("Promise can't be resolved itself");var r=fi(e);r?Co((function(){var n={done:!1};try{O(r,e,yi(mi,n,t),yi(gi,n,t))}catch(e){gi(n,e,t)}})):(t.value=e,t.state=1,li(t,!1))}catch(e){gi({done:!1},e,t)}}};if(Yo&&(ei=(ti=function(t){zr(this,ei),ct(t),O(Lo,this);var e=Jo(this);try{t(yi(mi,e),yi(gi,e))}catch(t){gi(e,t)}}).prototype,(Lo=function(t){Qo(this,{type:Xo,done:!1,notified:!1,parent:!1,reactions:new wo,rejection:!1,state:0,value:null})}).prototype=ye(ei,"then",(function(t,e){var n=Jo(this),r=ii(Br(this,ti));return n.parent=!0,r.ok=!G(t)||t,r.fail=G(e)&&e,r.domain=Mr?oi.domain:void 0,0===n.state?n.reactions.add(r):Co((function(){si(r,n)})),r.promise})),Mo=function(){var t=new Lo,e=Jo(t);this.promise=t,this.resolve=yi(mi,e),this.reject=yi(gi,e)},Ho.f=ii=function(t){return t===ti||undefined===t?new Mo(t):ui(t)},G(ko)&&Zo!==Object.prototype)){Do=Zo.then,qo||ye(Zo,"then",(function(t,e){var n=this;return new ti((function(t,e){O(Do,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Zo.constructor}catch(t){}ir&&ir(Zo,ei)}He({global:!0,constructor:!0,wrap:!0,forced:Yo},{Promise:ti}),Zn(ti,Xo,!1),Fo=V(Xo),b&&Fo&&!Fo[Dr]&&Er(Fo,Dr,{configurable:!0,get:function(){return this}});var bi=Tt("iterator"),wi=Array.prototype,Si=Tt("iterator"),Oi=function(t){if(!F(t))return ft(t,Si)||ft(t,"@@iterator")||Bn[Qe(t)]},Ei=TypeError,ji=function(t,e,n){var r,o;Ut(t);try{if(!(r=ft(t,"return"))){if("throw"===e)throw n;return n}r=O(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Ut(r),n},xi=TypeError,Ti=function(t,e){this.stopped=t,this.result=e},Pi=Ti.prototype,Ii=function(t,e,n){var r,o,i,u,a,c,f,s,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),v=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),y=Yr(e,l),g=function(t){return r&&ji(r,"normal",t),new Ti(!0,t)},m=function(t){return p?(Ut(t),h?y(t[0],t[1],g):y(t[0],t[1])):h?y(t,g):y(t)};if(v)r=t.iterator;else if(d)r=t;else{if(!(o=Oi(t)))throw new xi(ut(t)+" is not iterable");if(void 0!==(s=o)&&(Bn.Array===s||wi[bi]===s)){for(i=0,u=xe(t);u>i;i++)if((a=m(t[i]))&&H(Pi,a))return a;return new Ti(!1)}r=function(t,e){var n=arguments.length<2?Oi(t):e;if(ct(n))return Ut(O(n,t));throw new Ei(ut(t)+" is not iterable")}(t,o)}for(c=v?t.next:r.next;!(f=O(c,r)).done;){try{a=m(f.value)}catch(t){ji(r,"throw",t)}if("object"==typeof a&&a&&H(Pi,a))return a}return new Ti(!1)},Ri=Tt("iterator"),Ai=!1;try{var Ci=0,Ni={next:function(){return{done:!!Ci++}},return:function(){Ai=!0}};Ni[Ri]=function(){return this},Array.from(Ni,(function(){throw 2}))}catch(t){}var ki=function(t,e){try{if(!e&&!Ai)return!1}catch(t){return!1}var n=!1;try{var r={};r[Ri]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Li=Go.CONSTRUCTOR||!ki((function(t){ko.all(t).then(void 0,(function(){}))}));He({target:"Promise",stat:!0,forced:Li},{all:function(t){var e=this,n=Ho.f(e),r=n.resolve,o=n.reject,i=No((function(){var n=ct(e.resolve),i=[],u=0,a=1;Ii(t,(function(t){var c=u++,f=!1;a++,O(n,e,t).then((function(t){f||(f=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise}});var Mi=Go.CONSTRUCTOR,Di=ko&&ko.prototype;if(He({target:"Promise",proto:!0,forced:Mi,real:!0},{catch:function(t){return this.then(void 0,t)}}),G(ko)){var Fi=V("Promise").prototype.catch;Di.catch!==Fi&&ye(Di,"catch",Fi,{unsafe:!0})}He({target:"Promise",stat:!0,forced:Li},{race:function(t){var e=this,n=Ho.f(e),r=n.reject,o=No((function(){var o=ct(e.resolve);Ii(t,(function(t){O(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),He({target:"Promise",stat:!0,forced:Go.CONSTRUCTOR},{reject:function(t){var e=Ho.f(this);return(0,e.reject)(t),e.promise}});var zi=Go.CONSTRUCTOR;V("Promise"),He({target:"Promise",stat:!0,forced:zi},{resolve:function(t){return function(t,e){if(Ut(t),W(e)&&e.constructor===t)return e;var n=Ho.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var _i=String,Ui=function(t){if("Symbol"===Qe(t))throw new TypeError("Cannot convert a Symbol value to a string");return _i(t)},Bi=function(){var t=Ut(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},Gi=RegExp.prototype,Wi=Qt.PROPER,Vi="toString",Hi=RegExp.prototype,Ki=Hi[Vi],Xi=m((function(){return"/a/b"!==Ki.call({source:"a",flags:"b"})})),Yi=Wi&&Ki.name!==Vi;(Xi||Yi)&&ye(Hi,Vi,(function(){var t=Ut(this),e=Ui(t.source),n=Ui(function(t){var e=t.flags;return void 0!==e||"flags"in Gi||mt(t,"flags")||!H(Gi,t)?e:O(Bi,t)}(t));return"/"+e+"/"+n}),{unsafe:!0});var $i=A("".charAt),qi=A("".charCodeAt),Ji=A("".slice),Qi=function(t){return function(e,n){var r,o,i=Ui(_(e)),u=we(n),a=i.length;return u<0||u>=a?t?"":void 0:(r=qi(i,u))<55296||r>56319||u+1===a||(o=qi(i,u+1))<56320||o>57343?t?$i(i,u):r:t?Ji(i,u,u+2):o-56320+(r-55296<<10)+65536}},Zi={codeAt:Qi(!1),charAt:Qi(!0)}.charAt,tu="String Iterator",eu=de.set,nu=de.getterFor(tu);hr(String,"String",(function(t){eu(this,{type:tu,string:Ui(t),index:0})}),(function(){var t,e=nu(this),n=e.string,r=e.index;return r>=n.length?yr(void 0,!0):(t=Zi(n,r),e.index+=t.length,yr(t,!1))}));var ru=!m((function(){return Object.isExtensible(Object.preventExtensions({}))})),ou=function(t,e,n){for(var r in e)ye(t,r,e[r],n);return t},iu=Ne.f,uu="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],au={f:function(t){return uu&&"Window"===k(t)?function(t){try{return iu(t)}catch(t){return sn(uu)}}(t):iu(U(t))}},cu=m((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),fu=Object.isExtensible,su=m((function(){fu(1)}))||cu?function(t){return!!W(t)&&((!cu||"ArrayBuffer"!==k(t))&&(!fu||fu(t)))}:fu,lu=v((function(t){var e=Xt.f,n=!1,r=Ot("meta"),o=0,i=function(t){e(t,r,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},n=!0;var t=Ne.f,e=A([].splice),o={};o[r]=1,t(o).length&&(Ne.f=function(n){for(var o=t(n),i=0,u=o.length;i<u;i++)if(o[i]===r){e(o,i,1);break}return o},He({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:au.f}))},fastKey:function(t,e){if(!W(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!mt(t,r)){if(!su(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!mt(t,r)){if(!su(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return ru&&n&&su(t)&&!mt(t,r)&&i(t),t}};ce[r]=!0})),pu=Tt("species"),vu=Array,du=function(t,e){return new(function(t){var e;return Ke(t)&&(e=t.constructor,(cn(e)&&(e===vu||Ke(e.prototype))||W(e)&&null===(e=e[pu]))&&(e=void 0)),void 0===e?vu:e}(t))(0===e?0:e)},hu=A([].push),yu=function(t){var e=1===t,n=2===t,r=3===t,o=4===t,i=6===t,u=7===t,a=5===t||i;return function(c,f,s,l){for(var p,v,d=yt(c),h=D(d),y=xe(h),g=Yr(f,s),m=0,b=l||du,w=e?b(c,y):n||u?b(c,0):void 0;y>m;m++)if((a||m in h)&&(v=g(p=h[m],m,d),t))if(e)w[m]=v;else if(v)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:hu(w,p)}else switch(t){case 4:return!1;case 7:hu(w,p)}return i?-1:r||o?o:w}},gu={forEach:yu(0),map:yu(1),filter:yu(2),some:yu(3),every:yu(4),find:yu(5),findIndex:yu(6),filterReject:yu(7)},mu=lu.getWeakData,bu=de.set,wu=de.getterFor,Su=gu.find,Ou=gu.findIndex,Eu=A([].splice),ju=0,xu=function(t){return t.frozen||(t.frozen=new Tu)},Tu=function(){this.entries=[]},Pu=function(t,e){return Su(t.entries,(function(t){return t[0]===e}))};Tu.prototype={get:function(t){var e=Pu(this,t);if(e)return e[1]},has:function(t){return!!Pu(this,t)},set:function(t,e){var n=Pu(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Ou(this.entries,(function(e){return e[0]===t}));return~e&&Eu(this.entries,e,1),!!~e}};var Iu,Ru={getConstructor:function(t,e,n,r){var o=t((function(t,o){zr(t,i),bu(t,{type:e,id:ju++,frozen:null}),F(o)||Ii(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=wu(e),a=function(t,e,n){var r=u(t),o=mu(Ut(e),!0);return!0===o?xu(r).set(e,n):o[r.id]=n,t};return ou(i,{delete:function(t){var e=u(this);if(!W(t))return!1;var n=mu(t);return!0===n?xu(e).delete(t):n&&mt(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!W(t))return!1;var n=mu(t);return!0===n?xu(e).has(t):n&&mt(n,e.id)}}),ou(i,n?{get:function(t){var e=u(this);if(W(t)){var n=mu(t);if(!0===n)return xu(e).get(t);if(n)return n[e.id]}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},Au=de.enforce,Cu=Object,Nu=Array.isArray,ku=Cu.isExtensible,Lu=Cu.isFrozen,Mu=Cu.isSealed,Du=Cu.freeze,Fu=Cu.seal,zu=!g.ActiveXObject&&"ActiveXObject"in g,_u=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Uu=function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",u=g[t],a=u&&u.prototype,c=u,f={},s=function(t){var e=A(a[t]);ye(a,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!W(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!W(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!W(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(We(t,!G(u)||!(o||a.forEach&&!m((function(){(new u).entries().next()})))))c=n.getConstructor(e,t,r,i),lu.enable();else if(We(t,!0)){var l=new c,p=l[i](o?{}:-0,1)!==l,v=m((function(){l.has(1)})),d=ki((function(t){new u(t)})),h=!o&&m((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));d||((c=e((function(t,e){zr(t,a);var n=function(t,e,n){var r,o;return ir&&G(r=e.constructor)&&r!==n&&W(o=r.prototype)&&o!==n.prototype&&ir(t,o),t}(new u,t,c);return F(e)||Ii(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=c),(v||h)&&(s("delete"),s("has"),r&&s("get")),(h||p)&&s(i),o&&a.clear&&delete a.clear}return f[t]=c,He({global:!0,constructor:!0,forced:c!==u},f),Zn(c,t),o||n.setStrong(c,t,r),c}("WeakMap",_u,Ru),Bu=Uu.prototype,Gu=A(Bu.set);if(ie)if(zu){Iu=Ru.getConstructor(_u,"WeakMap",!0),lu.enable();var Wu=A(Bu.delete),Vu=A(Bu.has),Hu=A(Bu.get);ou(Bu,{delete:function(t){if(W(t)&&!ku(t)){var e=Au(this);return e.frozen||(e.frozen=new Iu),Wu(this,t)||e.frozen.delete(t)}return Wu(this,t)},has:function(t){if(W(t)&&!ku(t)){var e=Au(this);return e.frozen||(e.frozen=new Iu),Vu(this,t)||e.frozen.has(t)}return Vu(this,t)},get:function(t){if(W(t)&&!ku(t)){var e=Au(this);return e.frozen||(e.frozen=new Iu),Vu(this,t)?Hu(this,t):e.frozen.get(t)}return Hu(this,t)},set:function(t,e){if(W(t)&&!ku(t)){var n=Au(this);n.frozen||(n.frozen=new Iu),Vu(this,t)?Gu(this,t,e):n.frozen.set(t,e)}else Gu(this,t,e);return this}})}else ru&&m((function(){var t=Du([]);return Gu(new Uu,t,1),!Lu(t)}))&&ou(Bu,{set:function(t,e){var n;return Nu(t)&&(Lu(t)?n=Du:Mu(t)&&(n=Fu)),Gu(this,t,e),n&&n(t),this}});var Ku={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},Xu=kt("span").classList,Yu=Xu&&Xu.constructor&&Xu.constructor.prototype,$u=Yu===Object.prototype?void 0:Yu,qu=function(t,e){var n=[][t];return!!n&&m((function(){n.call(null,e||function(){return 1},1)}))},Ju=gu.forEach,Qu=qu("forEach")?[].forEach:function(t){return Ju(this,t,arguments.length>1?arguments[1]:void 0)},Zu=function(t){if(t&&t.forEach!==Qu)try{Yt(t,"forEach",Qu)}catch(e){t.forEach=Qu}};for(var ta in Ku)Ku[ta]&&Zu(g[ta]&&g[ta].prototype);Zu($u);var ea=Tt("iterator"),na=Sr.values,ra=function(t,e){if(t){if(t[ea]!==na)try{Yt(t,ea,na)}catch(e){t[ea]=na}if(Zn(t,e,!0),Ku[e])for(var n in Sr)if(t[n]!==Sr[n])try{Yt(t,n,Sr[n])}catch(e){t[n]=Sr[n]}}};for(var oa in Ku)ra(g[oa]&&g[oa].prototype,oa);ra($u,"DOMTokenList");var ia=new WeakMap;function ua(t){return t.getMenuConfig("uploadImage")}function aa(t,e){return gn(this,void 0,void 0,(function(){return mn(this,(function(n){return[2,new Promise((function(n){var o=new FileReader;o.readAsDataURL(e),o.onload=function(){var i=o.result;if(i){var u=i.toString(),a=0===u.indexOf("data:image")?"":u;r(t,u,e.name,a),n("ok")}}}))]}))}))}function ca(t,n){return gn(this,void 0,void 0,(function(){var o,i,u,a;return mn(this,(function(c){switch(c.label){case 0:return o=function(t){var n=ia.get(t);if(null!=n)return n;var o=ua(t),i=o.onSuccess,u=o.onProgress,a=o.onFailed,c=o.customInsert,f=o.onError;return n=e(yn(yn({},o),{onProgress:function(e){t.showProgressBar(e),u&&u(e)},onSuccess:function(e,n){if(c)return c(n,(function(e,n,o){return r(t,e,n,o)})),void i(e,n);var o=n.errno,u=void 0===o?1:o,f=n.data,s=void 0===f?{}:f;if(0===u){if(Array.isArray(s))s.forEach((function(e){var n=e.url,o=void 0===n?"":n,i=e.alt,u=void 0===i?"":i,a=e.href;r(t,o,u,void 0===a?"":a)}));else{var l=s.url,p=void 0===l?"":l,v=s.alt,d=void 0===v?"":v,h=s.href;r(t,p,d,void 0===h?"":h)}i(e,n)}else a(e,n)},onError:function(t,e,n){f(t,e,n)}})),ia.set(t,n),n}(t),i=n.name,u=n.type,a=n.size,o.addFile({name:i,type:u,size:a,data:n}),[4,o.upload()];case 1:return c.sent(),[2]}}))}))}function fa(t,e){var n,o;return gn(this,void 0,void 0,(function(){var i,u,a,c,f,s,l,p,v;return mn(this,(function(d){switch(d.label){case 0:if(null==e)return[2];i=Array.prototype.slice.call(e),u=ua(t),a=u.customUpload,c=u.base64LimitSize,d.label=1;case 1:d.trys.push([1,11,12,17]),f=wn(i),d.label=2;case 2:return[4,f.next()];case 3:return(s=d.sent()).done?[3,10]:(l=s.value,p=l.size,c&&p<=c?[4,aa(t,l)]:[3,5]);case 4:return d.sent(),[3,9];case 5:return a?[4,a(l,(function(e,n,o){return r(t,e,n,o)}))]:[3,7];case 6:return d.sent(),[3,9];case 7:return[4,ca(t,l)];case 8:d.sent(),d.label=9;case 9:return[3,2];case 10:return[3,17];case 11:return v=d.sent(),n={error:v},[3,17];case 12:return d.trys.push([12,,15,16]),s&&!s.done&&(o=f.return)?[4,o.call(f)]:[3,14];case 13:d.sent(),d.label=14;case 14:return[3,16];case 15:if(n)throw n.error;return[7];case 16:return[7];case 17:return[2]}}))}))}var sa=A([].join),la=D!==Object||!qu("join",",");He({target:"Array",proto:!0,forced:la},{join:function(t){return sa(U(this),void 0===t?",":t)}});var pa,va,da=g.RegExp,ha=m((function(){var t=da("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),ya=ha||m((function(){return!da("a","y").sticky})),ga={BROKEN_CARET:ha||m((function(){var t=da("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:ya,UNSUPPORTED_Y:ha},ma=g.RegExp,ba=m((function(){var t=ma(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),wa=g.RegExp,Sa=m((function(){var t=wa("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Oa=de.get,Ea=dt("native-string-replace",String.prototype.replace),ja=RegExp.prototype.exec,xa=ja,Ta=A("".charAt),Pa=A("".indexOf),Ia=A("".replace),Ra=A("".slice),Aa=(va=/b*/g,O(ja,pa=/a/,"a"),O(ja,va,"a"),0!==pa.lastIndex||0!==va.lastIndex),Ca=ga.BROKEN_CARET,Na=void 0!==/()??/.exec("")[1];(Aa||Na||Ca||ba||Sa)&&(xa=function(t){var e,n,r,o,i,u,a,c=this,f=Oa(c),s=Ui(t),l=f.raw;if(l)return l.lastIndex=c.lastIndex,e=O(xa,l,s),c.lastIndex=l.lastIndex,e;var p=f.groups,v=Ca&&c.sticky,d=O(Bi,c),h=c.source,y=0,g=s;if(v&&(d=Ia(d,"y",""),-1===Pa(d,"g")&&(d+="g"),g=Ra(s,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ta(s,c.lastIndex-1))&&(h="(?: "+h+")",g=" "+g,y++),n=new RegExp("^(?:"+h+")",d)),Na&&(n=new RegExp("^"+h+"$(?!\\s)",d)),Aa&&(r=c.lastIndex),o=O(ja,v?n:c,g),v?o?(o.input=Ra(o.input,y),o[0]=Ra(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Aa&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),Na&&o&&o.length>1&&O(Ea,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=u=kn(null),i=0;i<p.length;i++)u[(a=p[i])[0]]=o[a[1]];return o});He({target:"RegExp",proto:!0,forced:/./.exec!==xa},{exec:xa});u&&(i.fn.append=u),a&&(i.fn.on=a),c&&(i.fn.remove=c),f&&(i.fn.val=f),s&&(i.fn.click=s),l&&(i.fn.hide=l);var ka=function(){function t(){this.title=n("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){return!1},t.prototype.isDisabled=function(t){return o(t)},t.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadImage")},t.prototype.exec=function(t,e){var n=this.getMenuConfig(t),o=n.allowedFileTypes,u=void 0===o?[]:o,a=n.customBrowseAndUpload;if(a)a((function(e,n,o){return r(t,e,n,o)}));else{var c="";u.length>0&&(c='accept="'+u.join(", ")+'"');var f=i("body"),s=i('<input type="file" '+c+" multiple/>");s.hide(),f.append(s),s.click(),s.on("change",(function(){var e=s[0].files;fa(t,e)}))}},t}();var La={menus:[{key:"uploadImage",factory:function(){return new ka},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(t){return t},onProgress:function(t){},onSuccess:function(t,e){},onFailed:function(t,e){console.error("'"+t.name+"' upload failed",e)},onError:function(t,e,n){console.error("'"+t.name+"' upload error",n)},base64LimitSize:0}}],editorPlugin:function(t){var e=t.insertData,n=t;return n.insertData=function(r){if(o(n))e(r);else if(r.getData("text/plain"))e(r);else{var i=r.files;if(i.length<=0)e(r);else Array.prototype.slice.call(i).some((function(t){return"image"===function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}(t.type.split("/"),1)[0]}))?fa(t,i):e(r)}},n}};export{La as default};
1
+ import{i18nAddResources as t,createUploader as e,t as n}from"@wangeditor-next/core";import{insertImageNode as r,isInsertImageMenuDisabled as o}from"@wangeditor-next/basic-modules";import i,{append as u,on as a,remove as c,val as f,click as s,hide as l}from"dom7";t("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),t("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});var p=function(t){try{return!!t()}catch(t){return!0}},v=!p((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),d=!p((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),h=Function.prototype,y=h.call,g=d&&h.bind.bind(y,y),m=d?g:function(t){return function(){return y.apply(t,arguments)}},b=function(t){return null==t},w=TypeError,S=function(t){if(b(t))throw new w("Can't call method on "+t);return t},O=Object,E=function(t){return O(S(t))},j=m({}.hasOwnProperty),x=Object.hasOwn||function(t,e){return j(E(t),e)},T=Function.prototype,P=v&&Object.getOwnPropertyDescriptor,I=x(T,"name"),R={EXISTS:I,PROPER:I&&"something"===function(){}.name,CONFIGURABLE:I&&(!v||v&&P(T,"name").configurable)},A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function C(t){var e={exports:{}};return t(e,e.exports),e.exports}var N="object"==typeof document&&document.all,k=void 0===N&&void 0!==N?function(t){return"function"==typeof t||t===N}:function(t){return"function"==typeof t},L=function(t){return t&&t.Math===Math&&t},M=L("object"==typeof globalThis&&globalThis)||L("object"==typeof window&&window)||L("object"==typeof self&&self)||L("object"==typeof A&&A)||L("object"==typeof A&&A)||function(){return this}()||Function("return this")(),D=Object.defineProperty,F=function(t,e){try{D(M,t,{value:e,configurable:!0,writable:!0})}catch(n){M[t]=e}return e},z=C((function(t){var e="__core-js_shared__",n=t.exports=M[e]||F(e,{});(n.versions||(n.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),_=m(Function.toString);k(z.inspectSource)||(z.inspectSource=function(t){return _(t)});var U,B,G=z.inspectSource,W=M.WeakMap,V=k(W)&&/native code/.test(String(W)),H=function(t){return"object"==typeof t?null!==t:k(t)},K=M.document,X=H(K)&&H(K.createElement),Y=function(t){return X?K.createElement(t):{}},$=!v&&!p((function(){return 7!==Object.defineProperty(Y("div"),"a",{get:function(){return 7}}).a})),q=v&&p((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),J=String,Q=TypeError,Z=function(t){if(H(t))return t;throw new Q(J(t)+" is not an object")},tt=Function.prototype.call,et=d?tt.bind(tt):function(){return tt.apply(tt,arguments)},nt=function(t,e){return arguments.length<2?(n=M[t],k(n)?n:void 0):M[t]&&M[t][e];var n},rt=m({}.isPrototypeOf),ot=M.navigator,it=ot&&ot.userAgent,ut=it?String(it):"",at=M.process,ct=M.Deno,ft=at&&at.versions||ct&&ct.version,st=ft&&ft.v8;st&&(B=(U=st.split("."))[0]>0&&U[0]<4?1:+(U[0]+U[1])),!B&&ut&&(!(U=ut.match(/Edge\/(\d+)/))||U[1]>=74)&&(U=ut.match(/Chrome\/(\d+)/))&&(B=+U[1]);var lt,pt,vt,dt=B,ht=M.String,yt=!!Object.getOwnPropertySymbols&&!p((function(){var t=Symbol("symbol detection");return!ht(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&dt&&dt<41})),gt=yt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,mt=Object,bt=gt?function(t){return"symbol"==typeof t}:function(t){var e=nt("Symbol");return k(e)&&rt(e.prototype,mt(t))},wt=String,St=function(t){try{return wt(t)}catch(t){return"Object"}},Ot=TypeError,Et=function(t){if(k(t))return t;throw new Ot(St(t)+" is not a function")},jt=function(t,e){var n=t[e];return b(n)?void 0:Et(n)},xt=TypeError,Tt=function(t,e){return z[t]||(z[t]=e||{})},Pt=0,It=Math.random(),Rt=m(1..toString),At=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Rt(++Pt+It,36)},Ct=M.Symbol,Nt=Tt("wks"),kt=gt?Ct.for||Ct:Ct&&Ct.withoutSetter||At,Lt=function(t){return x(Nt,t)||(Nt[t]=yt&&x(Ct,t)?Ct[t]:kt("Symbol."+t)),Nt[t]},Mt=TypeError,Dt=Lt("toPrimitive"),Ft=function(t,e){if(!H(t)||bt(t))return t;var n,r=jt(t,Dt);if(r){if(void 0===e&&(e="default"),n=et(r,t,e),!H(n)||bt(n))return n;throw new Mt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&k(n=t.toString)&&!H(r=et(n,t)))return r;if(k(n=t.valueOf)&&!H(r=et(n,t)))return r;if("string"!==e&&k(n=t.toString)&&!H(r=et(n,t)))return r;throw new xt("Can't convert object to primitive value")}(t,e)},zt=function(t){var e=Ft(t,"string");return bt(e)?e:e+""},_t=TypeError,Ut=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,Gt="enumerable",Wt="configurable",Vt="writable",Ht={f:v?q?function(t,e,n){if(Z(t),e=zt(e),Z(n),"function"==typeof t&&"prototype"===e&&"value"in n&&Vt in n&&!n[Vt]){var r=Bt(t,e);r&&r[Vt]&&(t[e]=n.value,n={configurable:Wt in n?n[Wt]:r[Wt],enumerable:Gt in n?n[Gt]:r[Gt],writable:!1})}return Ut(t,e,n)}:Ut:function(t,e,n){if(Z(t),e=zt(e),Z(n),$)try{return Ut(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new _t("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Kt=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},Xt=v?function(t,e,n){return Ht.f(t,e,Kt(1,n))}:function(t,e,n){return t[e]=n,t},Yt=Tt("keys"),$t=function(t){return Yt[t]||(Yt[t]=At(t))},qt={},Jt="Object already initialized",Qt=M.TypeError,Zt=M.WeakMap;if(V||z.state){var te=z.state||(z.state=new Zt);te.get=te.get,te.has=te.has,te.set=te.set,lt=function(t,e){if(te.has(t))throw new Qt(Jt);return e.facade=t,te.set(t,e),e},pt=function(t){return te.get(t)||{}},vt=function(t){return te.has(t)}}else{var ee=$t("state");qt[ee]=!0,lt=function(t,e){if(x(t,ee))throw new Qt(Jt);return e.facade=t,Xt(t,ee,e),e},pt=function(t){return x(t,ee)?t[ee]:{}},vt=function(t){return x(t,ee)}}var ne={set:lt,get:pt,has:vt,enforce:function(t){return vt(t)?pt(t):lt(t,{})},getterFor:function(t){return function(e){var n;if(!H(e)||(n=pt(e)).type!==t)throw new Qt("Incompatible receiver, "+t+" required");return n}}},re=C((function(t){var e=R.CONFIGURABLE,n=ne.enforce,r=ne.get,o=String,i=Object.defineProperty,u=m("".slice),a=m("".replace),c=m([].join),f=v&&!p((function(){return 8!==i((function(){}),"length",{value:8}).length})),s=String(String).split("String"),l=t.exports=function(t,r,l){"Symbol("===u(o(r),0,7)&&(r="["+a(o(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),l&&l.getter&&(r="get "+r),l&&l.setter&&(r="set "+r),(!x(t,"name")||e&&t.name!==r)&&(v?i(t,"name",{value:r,configurable:!0}):t.name=r),f&&l&&x(l,"arity")&&t.length!==l.arity&&i(t,"length",{value:l.arity});try{l&&x(l,"constructor")&&l.constructor?v&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var p=n(t);return x(p,"source")||(p.source=c(s,"string"==typeof r?r:"")),t};Function.prototype.toString=l((function(){return k(this)&&r(this).source||G(this)}),"toString")})),oe=function(t,e,n){return n.get&&re(n.get,e,{getter:!0}),n.set&&re(n.set,e,{setter:!0}),Ht.f(t,e,n)},ie=R.EXISTS,ue=Function.prototype,ae=m(ue.toString),ce=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,fe=m(ce.exec);v&&!ie&&oe(ue,"name",{configurable:!0,get:function(){try{return fe(ce,ae(this))[1]}catch(t){return""}}});var se={}.propertyIsEnumerable,le=Object.getOwnPropertyDescriptor,pe={f:le&&!se.call({1:2},1)?function(t){var e=le(this,t);return!!e&&e.enumerable}:se},ve=m({}.toString),de=m("".slice),he=function(t){return de(ve(t),8,-1)},ye=Object,ge=m("".split),me=p((function(){return!ye("z").propertyIsEnumerable(0)}))?function(t){return"String"===he(t)?ge(t,""):ye(t)}:ye,be=function(t){return me(S(t))},we=Object.getOwnPropertyDescriptor,Se={f:v?we:function(t,e){if(t=be(t),e=zt(e),$)try{return we(t,e)}catch(t){}if(x(t,e))return Kt(!et(pe.f,t,e),t[e])}},Oe=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(k(n)&&re(n,i,r),r.global)o?t[e]=n:F(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Ht.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},Ee=Math.ceil,je=Math.floor,xe=Math.trunc||function(t){var e=+t;return(e>0?je:Ee)(e)},Te=function(t){var e=+t;return e!=e||0===e?0:xe(e)},Pe=Math.max,Ie=Math.min,Re=function(t,e){var n=Te(t);return n<0?Pe(n+e,0):Ie(n,e)},Ae=Math.min,Ce=function(t){return e=t.length,(n=Te(e))>0?Ae(n,9007199254740991):0;var e,n},Ne=function(t){return function(e,n,r){var o=be(e),i=Ce(o);if(0===i)return!t&&-1;var u,a=Re(r,i);if(t&&n!=n){for(;i>a;)if((u=o[a++])!=u)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},ke={includes:Ne(!0),indexOf:Ne(!1)}.indexOf,Le=m([].push),Me=function(t,e){var n,r=be(t),o=0,i=[];for(n in r)!x(qt,n)&&x(r,n)&&Le(i,n);for(;e.length>o;)x(r,n=e[o++])&&(~ke(i,n)||Le(i,n));return i},De=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Fe=De.concat("length","prototype"),ze={f:Object.getOwnPropertyNames||function(t){return Me(t,Fe)}},_e={f:Object.getOwnPropertySymbols},Ue=m([].concat),Be=nt("Reflect","ownKeys")||function(t){var e=ze.f(Z(t)),n=_e.f;return n?Ue(e,n(t)):e},Ge=function(t,e,n){for(var r=Be(e),o=Ht.f,i=Se.f,u=0;u<r.length;u++){var a=r[u];x(t,a)||n&&x(n,a)||o(t,a,i(e,a))}},We=/#|\.prototype\./,Ve=function(t,e){var n=Ke[He(t)];return n===Ye||n!==Xe&&(k(e)?p(e):!!e)},He=Ve.normalize=function(t){return String(t).replace(We,".").toLowerCase()},Ke=Ve.data={},Xe=Ve.NATIVE="N",Ye=Ve.POLYFILL="P",$e=Ve,qe=Se.f,Je=function(t,e){var n,r,o,i,u,a=t.target,c=t.global,f=t.stat;if(n=c?M:f?M[a]||F(a,{}):M[a]&&M[a].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=qe(n,r))&&u.value:n[r],!$e(c?r:a+(f?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ge(i,o)}(t.sham||o&&o.sham)&&Xt(i,"sham",!0),Oe(n,r,i,t)}},Qe=function(t,e){var n=[][t];return!!n&&p((function(){n.call(null,e||function(){return 1},1)}))},Ze=m([].join),tn=me!==Object||!Qe("join",",");Je({target:"Array",proto:!0,forced:tn},{join:function(t){return Ze(be(this),void 0===t?",":t)}});var en={};en[Lt("toStringTag")]="z";var nn,rn="[object z]"===String(en),on=Lt("toStringTag"),un=Object,an="Arguments"===he(function(){return arguments}()),cn=rn?he:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=un(t),on))?n:an?he(e):"Object"===(r=he(e))&&k(e.callee)?"Arguments":r},fn=String,sn=function(t){if("Symbol"===cn(t))throw new TypeError("Cannot convert a Symbol value to a string");return fn(t)},ln=function(){var t=Z(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},pn=M.RegExp,vn=p((function(){var t=pn("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),dn=vn||p((function(){return!pn("a","y").sticky})),hn={BROKEN_CARET:vn||p((function(){var t=pn("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:dn,UNSUPPORTED_Y:vn},yn=Object.keys||function(t){return Me(t,De)},gn=v&&!q?Object.defineProperties:function(t,e){Z(t);for(var n,r=be(e),o=yn(e),i=o.length,u=0;i>u;)Ht.f(t,n=o[u++],r[n]);return t},mn={f:gn},bn=nt("document","documentElement"),wn="prototype",Sn="script",On=$t("IE_PROTO"),En=function(){},jn=function(t){return"<"+Sn+">"+t+"</"+Sn+">"},xn=function(t){t.write(jn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Tn=function(){try{nn=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Tn="undefined"!=typeof document?document.domain&&nn?xn(nn):(e=Y("iframe"),n="java"+Sn+":",e.style.display="none",bn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(jn("document.F=Object")),t.close(),t.F):xn(nn);for(var r=De.length;r--;)delete Tn[wn][De[r]];return Tn()};qt[On]=!0;var Pn,In,Rn=Object.create||function(t,e){var n;return null!==t?(En[wn]=Z(t),n=new En,En[wn]=null,n[On]=t):n=Tn(),void 0===e?n:mn.f(n,e)},An=M.RegExp,Cn=p((function(){var t=An(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),Nn=M.RegExp,kn=p((function(){var t=Nn("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Ln=ne.get,Mn=Tt("native-string-replace",String.prototype.replace),Dn=RegExp.prototype.exec,Fn=Dn,zn=m("".charAt),_n=m("".indexOf),Un=m("".replace),Bn=m("".slice),Gn=(In=/b*/g,et(Dn,Pn=/a/,"a"),et(Dn,In,"a"),0!==Pn.lastIndex||0!==In.lastIndex),Wn=hn.BROKEN_CARET,Vn=void 0!==/()??/.exec("")[1];(Gn||Vn||Wn||Cn||kn)&&(Fn=function(t){var e,n,r,o,i,u,a,c=this,f=Ln(c),s=sn(t),l=f.raw;if(l)return l.lastIndex=c.lastIndex,e=et(Fn,l,s),c.lastIndex=l.lastIndex,e;var p=f.groups,v=Wn&&c.sticky,d=et(ln,c),h=c.source,y=0,g=s;if(v&&(d=Un(d,"y",""),-1===_n(d,"g")&&(d+="g"),g=Bn(s,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==zn(s,c.lastIndex-1))&&(h="(?: "+h+")",g=" "+g,y++),n=new RegExp("^(?:"+h+")",d)),Vn&&(n=new RegExp("^"+h+"$(?!\\s)",d)),Gn&&(r=c.lastIndex),o=et(Dn,v?n:c,g),v?o?(o.input=Bn(o.input,y),o[0]=Bn(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Gn&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),Vn&&o&&o.length>1&&et(Mn,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=u=Rn(null),i=0;i<p.length;i++)u[(a=p[i])[0]]=o[a[1]];return o});Je({target:"RegExp",proto:!0,forced:/./.exec!==Fn},{exec:Fn});u&&(i.fn.append=u),a&&(i.fn.on=a),c&&(i.fn.remove=c),f&&(i.fn.val=f),s&&(i.fn.click=s),l&&(i.fn.hide=l);var Hn=Ht.f,Kn=Lt("unscopables"),Xn=Array.prototype;void 0===Xn[Kn]&&Hn(Xn,Kn,{configurable:!0,value:Rn(null)});var Yn,$n,qn,Jn=function(t){Xn[Kn][t]=!0},Qn={},Zn=!p((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),tr=$t("IE_PROTO"),er=Object,nr=er.prototype,rr=Zn?er.getPrototypeOf:function(t){var e=E(t);if(x(e,tr))return e[tr];var n=e.constructor;return k(n)&&e instanceof n?n.prototype:e instanceof er?nr:null},or=Lt("iterator"),ir=!1;[].keys&&("next"in(qn=[].keys())?($n=rr(rr(qn)))!==Object.prototype&&(Yn=$n):ir=!0);var ur=!H(Yn)||p((function(){var t={};return Yn[or].call(t)!==t}));ur&&(Yn={}),k(Yn[or])||Oe(Yn,or,(function(){return this}));var ar={IteratorPrototype:Yn,BUGGY_SAFARI_ITERATORS:ir},cr=Ht.f,fr=Lt("toStringTag"),sr=function(t,e,n){t&&!n&&(t=t.prototype),t&&!x(t,fr)&&cr(t,fr,{configurable:!0,value:e})},lr=ar.IteratorPrototype,pr=function(){return this},vr=String,dr=TypeError,hr=function(t){if(function(t){return H(t)||null===t}(t))return t;throw new dr("Can't set "+vr(t)+" as a prototype")},yr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=function(t,e,n){try{return m(Et(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return S(n),hr(r),H(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),gr=R.PROPER,mr=R.CONFIGURABLE,br=ar.IteratorPrototype,wr=ar.BUGGY_SAFARI_ITERATORS,Sr=Lt("iterator"),Or="keys",Er="values",jr="entries",xr=function(){return this},Tr=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=Rn(lr,{next:Kt(+!r,n)}),sr(t,o,!1),Qn[o]=pr}(n,e,r);var a,c,f,s=function(t){if(t===o&&h)return h;if(!wr&&t&&t in v)return v[t];switch(t){case Or:case Er:case jr:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",p=!1,v=t.prototype,d=v[Sr]||v["@@iterator"]||o&&v[o],h=!wr&&d||s(o),y="Array"===e&&v.entries||d;if(y&&(a=rr(y.call(new t)))!==Object.prototype&&a.next&&(rr(a)!==br&&(yr?yr(a,br):k(a[Sr])||Oe(a,Sr,xr)),sr(a,l,!0)),gr&&o===Er&&d&&d.name!==Er&&(mr?Xt(v,"name",Er):(p=!0,h=function(){return et(d,this)})),o)if(c={values:s(Er),keys:i?h:s(Or),entries:s(jr)},u)for(f in c)(wr||p||!(f in v))&&Oe(v,f,c[f]);else Je({target:e,proto:!0,forced:wr||p},c);return v[Sr]!==h&&Oe(v,Sr,h,{name:o}),Qn[e]=h,c},Pr=function(t,e){return{value:t,done:e}},Ir=Ht.f,Rr="Array Iterator",Ar=ne.set,Cr=ne.getterFor(Rr),Nr=Tr(Array,"Array",(function(t,e){Ar(this,{type:Rr,target:be(t),index:0,kind:e})}),(function(){var t=Cr(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,Pr(void 0,!0);switch(t.kind){case"keys":return Pr(n,!1);case"values":return Pr(e[n],!1)}return Pr([n,e[n]],!1)}),"values"),kr=Qn.Arguments=Qn.Array;if(Jn("keys"),Jn("values"),Jn("entries"),v&&"values"!==kr.name)try{Ir(kr,"name",{value:"values"})}catch(t){}var Lr=Array.isArray||function(t){return"Array"===he(t)},Mr=function(){},Dr=nt("Reflect","construct"),Fr=/^\s*(?:class|function)\b/,zr=m(Fr.exec),_r=!Fr.test(Mr),Ur=function(t){if(!k(t))return!1;try{return Dr(Mr,[],t),!0}catch(t){return!1}},Br=function(t){if(!k(t))return!1;switch(cn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _r||!!zr(Fr,G(t))}catch(t){return!0}};Br.sham=!0;var Gr,Wr=!Dr||p((function(){var t;return Ur(Ur.call)||!Ur(Object)||!Ur((function(){t=!0}))||t}))?Br:Ur,Vr=Lt("species"),Hr=m([].slice),Kr=(Gr="slice",dt>=51||!p((function(){var t=[];return(t.constructor={})[Vr]=function(){return{foo:1}},1!==t[Gr](Boolean).foo}))),Xr=Lt("species"),Yr=Array,$r=Math.max;Je({target:"Array",proto:!0,forced:!Kr},{slice:function(t,e){var n,r,o,i,u,a,c=be(this),f=Ce(c),s=Re(t,f),l=Re(void 0===e?f:e,f);if(Lr(c)&&(n=c.constructor,(Wr(n)&&(n===Yr||Lr(n.prototype))||H(n)&&null===(n=n[Xr]))&&(n=void 0),n===Yr||void 0===n))return Hr(c,s,l);for(r=new(void 0===n?Yr:n)($r(l-s,0)),o=0;s<l;s++,o++)s in c&&(i=r,u=o,a=c[s],v?Ht.f(i,u,Kt(0,a)):i[u]=a);return r.length=o,r}});var qr=rn?{}.toString:function(){return"[object "+cn(this)+"]"};rn||Oe(Object.prototype,"toString",qr,{unsafe:!0});var Jr,Qr,Zr,to,eo=function(t){return ut.slice(0,t.length)===t},no=eo("Bun/")?"BUN":eo("Cloudflare-Workers")?"CLOUDFLARE":eo("Deno/")?"DENO":eo("Node.js/")?"NODE":M.Bun&&"string"==typeof Bun.version?"BUN":M.Deno&&"object"==typeof Deno.version?"DENO":"process"===he(M.process)?"NODE":M.window&&M.document?"BROWSER":"REST",ro="NODE"===no,oo=Lt("species"),io=TypeError,uo=function(t,e){if(rt(e,t))return t;throw new io("Incorrect invocation")},ao=TypeError,co=Lt("species"),fo=function(t,e){var n,r=Z(t).constructor;return void 0===r||b(n=Z(r)[co])?e:function(t){if(Wr(t))return t;throw new ao(St(t)+" is not a constructor")}(n)},so=Function.prototype,lo=so.apply,po=so.call,vo="object"==typeof Reflect&&Reflect.apply||(d?po.bind(lo):function(){return po.apply(lo,arguments)}),ho=function(t){if("Function"===he(t))return m(t)},yo=ho(ho.bind),go=function(t,e){return Et(t),void 0===e?t:d?yo(t,e):function(){return t.apply(e,arguments)}},mo=TypeError,bo=/(?:ipad|iphone|ipod).*applewebkit/i.test(ut),wo=M.setImmediate,So=M.clearImmediate,Oo=M.process,Eo=M.Dispatch,jo=M.Function,xo=M.MessageChannel,To=M.String,Po=0,Io={},Ro="onreadystatechange";p((function(){Jr=M.location}));var Ao=function(t){if(x(Io,t)){var e=Io[t];delete Io[t],e()}},Co=function(t){return function(){Ao(t)}},No=function(t){Ao(t.data)},ko=function(t){M.postMessage(To(t),Jr.protocol+"//"+Jr.host)};wo&&So||(wo=function(t){!function(t,e){if(t<e)throw new mo("Not enough arguments")}(arguments.length,1);var e=k(t)?t:jo(t),n=Hr(arguments,1);return Io[++Po]=function(){vo(e,void 0,n)},Qr(Po),Po},So=function(t){delete Io[t]},ro?Qr=function(t){Oo.nextTick(Co(t))}:Eo&&Eo.now?Qr=function(t){Eo.now(Co(t))}:xo&&!bo?(to=(Zr=new xo).port2,Zr.port1.onmessage=No,Qr=go(to.postMessage,to)):M.addEventListener&&k(M.postMessage)&&!M.importScripts&&Jr&&"file:"!==Jr.protocol&&!p(ko)?(Qr=ko,M.addEventListener("message",No,!1)):Qr=Ro in Y("script")?function(t){bn.appendChild(Y("script"))[Ro]=function(){bn.removeChild(this),Ao(t)}}:function(t){setTimeout(Co(t),0)});var Lo={set:wo,clear:So},Mo=Object.getOwnPropertyDescriptor,Do=function(){this.head=null,this.tail=null};Do.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Fo,zo,_o,Uo,Bo,Go=Do,Wo=/ipad|iphone|ipod/i.test(ut)&&"undefined"!=typeof Pebble,Vo=/web0s(?!.*chrome)/i.test(ut),Ho=Lo.set,Ko=M.MutationObserver||M.WebKitMutationObserver,Xo=M.document,Yo=M.process,$o=M.Promise,qo=function(t){if(!v)return M[t];var e=Mo(M,t);return e&&e.value}("queueMicrotask");if(!qo){var Jo=new Go,Qo=function(){var t,e;for(ro&&(t=Yo.domain)&&t.exit();e=Jo.get();)try{e()}catch(t){throw Jo.head&&Fo(),t}t&&t.enter()};bo||ro||Vo||!Ko||!Xo?!Wo&&$o&&$o.resolve?((Uo=$o.resolve(void 0)).constructor=$o,Bo=go(Uo.then,Uo),Fo=function(){Bo(Qo)}):ro?Fo=function(){Yo.nextTick(Qo)}:(Ho=go(Ho,M),Fo=function(){Ho(Qo)}):(zo=!0,_o=Xo.createTextNode(""),new Ko(Qo).observe(_o,{characterData:!0}),Fo=function(){_o.data=zo=!zo}),qo=function(t){Jo.head||Fo(),Jo.add(t)}}var Zo=qo,ti=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},ei=M.Promise;ei&&ei.prototype;var ni,ri,oi,ii,ui=Lt("species"),ai=!1,ci=k(M.PromiseRejectionEvent),fi=$e("Promise",(function(){var t=G(ei),e=t!==String(ei);if(!e&&66===dt)return!0;if(!dt||dt<51||!/native code/.test(t)){var n=new ei((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[ui]=r,!(ai=n.then((function(){}))instanceof r))return!0}return!(e||"BROWSER"!==no&&"DENO"!==no||ci)})),si={CONSTRUCTOR:fi,REJECTION_EVENT:ci,SUBCLASSING:ai},li=TypeError,pi=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new li("Bad Promise constructor");e=t,n=r})),this.resolve=Et(e),this.reject=Et(n)},vi={f:function(t){return new pi(t)}},di=Lo.set,hi="Promise",yi=si.CONSTRUCTOR,gi=si.REJECTION_EVENT,mi=si.SUBCLASSING,bi=ne.getterFor(hi),wi=ne.set,Si=ei&&ei.prototype,Oi=ei,Ei=Si,ji=M.TypeError,xi=M.document,Ti=M.process,Pi=vi.f,Ii=Pi,Ri=!!(xi&&xi.createEvent&&M.dispatchEvent),Ai="unhandledrejection",Ci=function(t){var e;return!(!H(t)||!k(e=t.then))&&e},Ni=function(t,e){var n,r,o,i=e.value,u=1===e.state,a=u?t.ok:t.fail,c=t.resolve,f=t.reject,s=t.domain;try{a?(u||(2===e.rejection&&Fi(e),e.rejection=1),!0===a?n=i:(s&&s.enter(),n=a(i),s&&(s.exit(),o=!0)),n===t.promise?f(new ji("Promise-chain cycle")):(r=Ci(n))?et(r,n,c,f):c(n)):f(i)}catch(t){s&&!o&&s.exit(),f(t)}},ki=function(t,e){t.notified||(t.notified=!0,Zo((function(){for(var n,r=t.reactions;n=r.get();)Ni(n,t);t.notified=!1,e&&!t.rejection&&Mi(t)})))},Li=function(t,e,n){var r,o;Ri?((r=xi.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),M.dispatchEvent(r)):r={promise:e,reason:n},!gi&&(o=M["on"+t])?o(r):t===Ai&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",n)},Mi=function(t){et(di,M,(function(){var e,n=t.facade,r=t.value;if(Di(t)&&(e=ti((function(){ro?Ti.emit("unhandledRejection",r,n):Li(Ai,n,r)})),t.rejection=ro||Di(t)?2:1,e.error))throw e.value}))},Di=function(t){return 1!==t.rejection&&!t.parent},Fi=function(t){et(di,M,(function(){var e=t.facade;ro?Ti.emit("rejectionHandled",e):Li("rejectionhandled",e,t.value)}))},zi=function(t,e,n){return function(r){t(e,r,n)}},_i=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,ki(t,!0))},Ui=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new ji("Promise can't be resolved itself");var r=Ci(e);r?Zo((function(){var n={done:!1};try{et(r,e,zi(Ui,n,t),zi(_i,n,t))}catch(e){_i(n,e,t)}})):(t.value=e,t.state=1,ki(t,!1))}catch(e){_i({done:!1},e,t)}}};if(yi&&(Ei=(Oi=function(t){uo(this,Ei),Et(t),et(ni,this);var e=bi(this);try{t(zi(Ui,e),zi(_i,e))}catch(t){_i(e,t)}}).prototype,(ni=function(t){wi(this,{type:hi,done:!1,notified:!1,parent:!1,reactions:new Go,rejection:!1,state:0,value:null})}).prototype=Oe(Ei,"then",(function(t,e){var n=bi(this),r=Pi(fo(this,Oi));return n.parent=!0,r.ok=!k(t)||t,r.fail=k(e)&&e,r.domain=ro?Ti.domain:void 0,0===n.state?n.reactions.add(r):Zo((function(){Ni(r,n)})),r.promise})),ri=function(){var t=new ni,e=bi(t);this.promise=t,this.resolve=zi(Ui,e),this.reject=zi(_i,e)},vi.f=Pi=function(t){return t===Oi||undefined===t?new ri(t):Ii(t)},k(ei)&&Si!==Object.prototype)){oi=Si.then,mi||Oe(Si,"then",(function(t,e){var n=this;return new Oi((function(t,e){et(oi,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Si.constructor}catch(t){}yr&&yr(Si,Ei)}Je({global:!0,constructor:!0,wrap:!0,forced:yi},{Promise:Oi}),sr(Oi,hi,!1),ii=nt(hi),v&&ii&&!ii[oo]&&oe(ii,oo,{configurable:!0,get:function(){return this}});var Bi=Lt("iterator"),Gi=Array.prototype,Wi=Lt("iterator"),Vi=function(t){if(!b(t))return jt(t,Wi)||jt(t,"@@iterator")||Qn[cn(t)]},Hi=TypeError,Ki=function(t,e,n){var r,o;Z(t);try{if(!(r=jt(t,"return"))){if("throw"===e)throw n;return n}r=et(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Z(r),n},Xi=TypeError,Yi=function(t,e){this.stopped=t,this.result=e},$i=Yi.prototype,qi=function(t,e,n){var r,o,i,u,a,c,f,s,l=n&&n.that,p=!(!n||!n.AS_ENTRIES),v=!(!n||!n.IS_RECORD),d=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),y=go(e,l),g=function(t){return r&&Ki(r,"normal",t),new Yi(!0,t)},m=function(t){return p?(Z(t),h?y(t[0],t[1],g):y(t[0],t[1])):h?y(t,g):y(t)};if(v)r=t.iterator;else if(d)r=t;else{if(!(o=Vi(t)))throw new Xi(St(t)+" is not iterable");if(void 0!==(s=o)&&(Qn.Array===s||Gi[Bi]===s)){for(i=0,u=Ce(t);u>i;i++)if((a=m(t[i]))&&rt($i,a))return a;return new Yi(!1)}r=function(t,e){var n=arguments.length<2?Vi(t):e;if(Et(n))return Z(et(n,t));throw new Hi(St(t)+" is not iterable")}(t,o)}for(c=v?t.next:r.next;!(f=et(c,r)).done;){try{a=m(f.value)}catch(t){Ki(r,"throw",t)}if("object"==typeof a&&a&&rt($i,a))return a}return new Yi(!1)},Ji=Lt("iterator"),Qi=!1;try{var Zi=0,tu={next:function(){return{done:!!Zi++}},return:function(){Qi=!0}};tu[Ji]=function(){return this},Array.from(tu,(function(){throw 2}))}catch(t){}var eu=function(t,e){try{if(!e&&!Qi)return!1}catch(t){return!1}var n=!1;try{var r={};r[Ji]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},nu=si.CONSTRUCTOR||!eu((function(t){ei.all(t).then(void 0,(function(){}))}));Je({target:"Promise",stat:!0,forced:nu},{all:function(t){var e=this,n=vi.f(e),r=n.resolve,o=n.reject,i=ti((function(){var n=Et(e.resolve),i=[],u=0,a=1;qi(t,(function(t){var c=u++,f=!1;a++,et(n,e,t).then((function(t){f||(f=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise}});var ru=si.CONSTRUCTOR,ou=ei&&ei.prototype;if(Je({target:"Promise",proto:!0,forced:ru,real:!0},{catch:function(t){return this.then(void 0,t)}}),k(ei)){var iu=nt("Promise").prototype.catch;ou.catch!==iu&&Oe(ou,"catch",iu,{unsafe:!0})}Je({target:"Promise",stat:!0,forced:nu},{race:function(t){var e=this,n=vi.f(e),r=n.reject,o=ti((function(){var o=Et(e.resolve);qi(t,(function(t){et(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),Je({target:"Promise",stat:!0,forced:si.CONSTRUCTOR},{reject:function(t){var e=vi.f(this);return(0,e.reject)(t),e.promise}});var uu=si.CONSTRUCTOR;nt("Promise"),Je({target:"Promise",stat:!0,forced:uu},{resolve:function(t){return function(t,e){if(Z(t),H(e)&&e.constructor===t)return e;var n=vi.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var au=RegExp.prototype,cu=R.PROPER,fu="toString",su=RegExp.prototype,lu=su[fu],pu=p((function(){return"/a/b"!==lu.call({source:"a",flags:"b"})})),vu=cu&&lu.name!==fu;(pu||vu)&&Oe(su,fu,(function(){var t=Z(this),e=sn(t.source),n=sn(function(t){var e=t.flags;return void 0!==e||"flags"in au||x(t,"flags")||!rt(au,t)?e:et(ln,t)}(t));return"/"+e+"/"+n}),{unsafe:!0});var du=m("".charAt),hu=m("".charCodeAt),yu=m("".slice),gu=function(t){return function(e,n){var r,o,i=sn(S(e)),u=Te(n),a=i.length;return u<0||u>=a?t?"":void 0:(r=hu(i,u))<55296||r>56319||u+1===a||(o=hu(i,u+1))<56320||o>57343?t?du(i,u):r:t?yu(i,u,u+2):o-56320+(r-55296<<10)+65536}},mu={codeAt:gu(!1),charAt:gu(!0)}.charAt,bu="String Iterator",wu=ne.set,Su=ne.getterFor(bu);Tr(String,"String",(function(t){wu(this,{type:bu,string:sn(t),index:0})}),(function(){var t,e=Su(this),n=e.string,r=e.index;return r>=n.length?Pr(void 0,!0):(t=mu(n,r),e.index+=t.length,Pr(t,!1))}));var Ou=!p((function(){return Object.isExtensible(Object.preventExtensions({}))})),Eu=function(t,e,n){for(var r in e)Oe(t,r,e[r],n);return t},ju=ze.f,xu="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Tu={f:function(t){return xu&&"Window"===he(t)?function(t){try{return ju(t)}catch(t){return Hr(xu)}}(t):ju(be(t))}},Pu=p((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Iu=Object.isExtensible,Ru=p((function(){Iu(1)}))||Pu?function(t){return!!H(t)&&((!Pu||"ArrayBuffer"!==he(t))&&(!Iu||Iu(t)))}:Iu,Au=C((function(t){var e=Ht.f,n=!1,r=At("meta"),o=0,i=function(t){e(t,r,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},n=!0;var t=ze.f,e=m([].splice),o={};o[r]=1,t(o).length&&(ze.f=function(n){for(var o=t(n),i=0,u=o.length;i<u;i++)if(o[i]===r){e(o,i,1);break}return o},Je({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Tu.f}))},fastKey:function(t,e){if(!H(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!x(t,r)){if(!Ru(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!x(t,r)){if(!Ru(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return Ou&&n&&Ru(t)&&!x(t,r)&&i(t),t}};qt[r]=!0})),Cu=Lt("species"),Nu=Array,ku=function(t,e){return new(function(t){var e;return Lr(t)&&(e=t.constructor,(Wr(e)&&(e===Nu||Lr(e.prototype))||H(e)&&null===(e=e[Cu]))&&(e=void 0)),void 0===e?Nu:e}(t))(0===e?0:e)},Lu=m([].push),Mu=function(t){var e=1===t,n=2===t,r=3===t,o=4===t,i=6===t,u=7===t,a=5===t||i;return function(c,f,s,l){for(var p,v,d=E(c),h=me(d),y=Ce(h),g=go(f,s),m=0,b=l||ku,w=e?b(c,y):n||u?b(c,0):void 0;y>m;m++)if((a||m in h)&&(v=g(p=h[m],m,d),t))if(e)w[m]=v;else if(v)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:Lu(w,p)}else switch(t){case 4:return!1;case 7:Lu(w,p)}return i?-1:r||o?o:w}},Du={forEach:Mu(0),map:Mu(1),filter:Mu(2),some:Mu(3),every:Mu(4),find:Mu(5),findIndex:Mu(6),filterReject:Mu(7)},Fu=Au.getWeakData,zu=ne.set,_u=ne.getterFor,Uu=Du.find,Bu=Du.findIndex,Gu=m([].splice),Wu=0,Vu=function(t){return t.frozen||(t.frozen=new Hu)},Hu=function(){this.entries=[]},Ku=function(t,e){return Uu(t.entries,(function(t){return t[0]===e}))};Hu.prototype={get:function(t){var e=Ku(this,t);if(e)return e[1]},has:function(t){return!!Ku(this,t)},set:function(t,e){var n=Ku(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Bu(this.entries,(function(e){return e[0]===t}));return~e&&Gu(this.entries,e,1),!!~e}};var Xu,Yu={getConstructor:function(t,e,n,r){var o=t((function(t,o){uo(t,i),zu(t,{type:e,id:Wu++,frozen:null}),b(o)||qi(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=_u(e),a=function(t,e,n){var r=u(t),o=Fu(Z(e),!0);return!0===o?Vu(r).set(e,n):o[r.id]=n,t};return Eu(i,{delete:function(t){var e=u(this);if(!H(t))return!1;var n=Fu(t);return!0===n?Vu(e).delete(t):n&&x(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!H(t))return!1;var n=Fu(t);return!0===n?Vu(e).has(t):n&&x(n,e.id)}}),Eu(i,n?{get:function(t){var e=u(this);if(H(t)){var n=Fu(t);if(!0===n)return Vu(e).get(t);if(n)return n[e.id]}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},$u=ne.enforce,qu=Object,Ju=Array.isArray,Qu=qu.isExtensible,Zu=qu.isFrozen,ta=qu.isSealed,ea=qu.freeze,na=qu.seal,ra=!M.ActiveXObject&&"ActiveXObject"in M,oa=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},ia=function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",u=M[t],a=u&&u.prototype,c=u,f={},s=function(t){var e=m(a[t]);Oe(a,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!H(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!H(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!H(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if($e(t,!k(u)||!(o||a.forEach&&!p((function(){(new u).entries().next()})))))c=n.getConstructor(e,t,r,i),Au.enable();else if($e(t,!0)){var l=new c,v=l[i](o?{}:-0,1)!==l,d=p((function(){l.has(1)})),h=eu((function(t){new u(t)})),y=!o&&p((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));h||((c=e((function(t,e){uo(t,a);var n=function(t,e,n){var r,o;return yr&&k(r=e.constructor)&&r!==n&&H(o=r.prototype)&&o!==n.prototype&&yr(t,o),t}(new u,t,c);return b(e)||qi(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=c),(d||y)&&(s("delete"),s("has"),r&&s("get")),(y||v)&&s(i),o&&a.clear&&delete a.clear}return f[t]=c,Je({global:!0,constructor:!0,forced:c!==u},f),sr(c,t),o||n.setStrong(c,t,r),c}("WeakMap",oa,Yu),ua=ia.prototype,aa=m(ua.set);if(V)if(ra){Xu=Yu.getConstructor(oa,"WeakMap",!0),Au.enable();var ca=m(ua.delete),fa=m(ua.has),sa=m(ua.get);Eu(ua,{delete:function(t){if(H(t)&&!Qu(t)){var e=$u(this);return e.frozen||(e.frozen=new Xu),ca(this,t)||e.frozen.delete(t)}return ca(this,t)},has:function(t){if(H(t)&&!Qu(t)){var e=$u(this);return e.frozen||(e.frozen=new Xu),fa(this,t)||e.frozen.has(t)}return fa(this,t)},get:function(t){if(H(t)&&!Qu(t)){var e=$u(this);return e.frozen||(e.frozen=new Xu),fa(this,t)?sa(this,t):e.frozen.get(t)}return sa(this,t)},set:function(t,e){if(H(t)&&!Qu(t)){var n=$u(this);n.frozen||(n.frozen=new Xu),fa(this,t)?aa(this,t,e):n.frozen.set(t,e)}else aa(this,t,e);return this}})}else Ou&&p((function(){var t=ea([]);return aa(new ia,t,1),!Zu(t)}))&&Eu(ua,{set:function(t,e){var n;return Ju(t)&&(Zu(t)?n=ea:ta(t)&&(n=na)),aa(this,t,e),n&&n(t),this}});var la={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},pa=Y("span").classList,va=pa&&pa.constructor&&pa.constructor.prototype,da=va===Object.prototype?void 0:va,ha=Du.forEach,ya=Qe("forEach")?[].forEach:function(t){return ha(this,t,arguments.length>1?arguments[1]:void 0)},ga=function(t){if(t&&t.forEach!==ya)try{Xt(t,"forEach",ya)}catch(e){t.forEach=ya}};for(var ma in la)la[ma]&&ga(M[ma]&&M[ma].prototype);ga(da);var ba=Lt("iterator"),wa=Nr.values,Sa=function(t,e){if(t){if(t[ba]!==wa)try{Xt(t,ba,wa)}catch(e){t[ba]=wa}if(sr(t,e,!0),la[e])for(var n in Nr)if(t[n]!==Nr[n])try{Xt(t,n,Nr[n])}catch(e){t[n]=Nr[n]}}};for(var Oa in la)Sa(M[Oa]&&M[Oa].prototype,Oa);Sa(da,"DOMTokenList");var Ea=function(){return Ea=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ea.apply(this,arguments)};function ja(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))}function xa(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=e.call(t,u)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function Ta(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Pa(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=Ta(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;var Ia=new WeakMap;function Ra(t){return t.getMenuConfig("uploadImage")}function Aa(t,e){return ja(this,void 0,void 0,(function(){return xa(this,(function(n){return[2,new Promise((function(n){var o=new FileReader;o.readAsDataURL(e),o.onload=function(){var i=o.result;if(i){var u=i.toString(),a=0===u.indexOf("data:image")?"":u;r(t,u,e.name,a),n("ok")}}}))]}))}))}function Ca(t,n){return ja(this,void 0,void 0,(function(){var o,i,u,a;return xa(this,(function(c){switch(c.label){case 0:return o=function(t){var n=Ia.get(t);if(null!=n)return n;var o=Ra(t),i=o.onSuccess,u=o.onProgress,a=o.onFailed,c=o.customInsert,f=o.onError;return n=e(Ea(Ea({},o),{onProgress:function(e){t.showProgressBar(e),u&&u(e)},onSuccess:function(e,n){if(c)return c(n,(function(e,n,o){return r(t,e,n,o)})),void i(e,n);var o=n.errno,u=void 0===o?1:o,f=n.data,s=void 0===f?{}:f;if(0===u){if(Array.isArray(s))s.forEach((function(e){var n=e.url,o=void 0===n?"":n,i=e.alt,u=void 0===i?"":i,a=e.href;r(t,o,u,void 0===a?"":a)}));else{var l=s.url,p=void 0===l?"":l,v=s.alt,d=void 0===v?"":v,h=s.href;r(t,p,d,void 0===h?"":h)}i(e,n)}else a(e,n)},onError:function(t,e,n){f(t,e,n)}})),Ia.set(t,n),n}(t),i=n.name,u=n.type,a=n.size,o.addFile({name:i,type:u,size:a,data:n}),[4,o.upload()];case 1:return c.sent(),[2]}}))}))}function Na(t,e){var n,o,i,u;return ja(this,void 0,void 0,(function(){var a,c,f,s,l,p,v,d,h,y;return xa(this,(function(g){switch(g.label){case 0:if(null==e)return[2];a=Array.prototype.slice.call(e),c=Ra(t),f=c.customUpload,s=c.base64LimitSize,g.label=1;case 1:g.trys.push([1,14,15,20]),l=!0,p=Pa(a),g.label=2;case 2:return[4,p.next()];case 3:if(v=g.sent(),n=v.done)return[3,13];u=v.value,l=!1,g.label=4;case 4:return g.trys.push([4,,11,12]),h=(d=u).size,s&&h<=s?[4,Aa(t,d)]:[3,6];case 5:return g.sent(),[3,10];case 6:return f?[4,f(d,(function(e,n,o){return r(t,e,n,o)}))]:[3,8];case 7:return g.sent(),[3,10];case 8:return[4,Ca(t,d)];case 9:g.sent(),g.label=10;case 10:return[3,12];case 11:return l=!0,[7];case 12:return[3,2];case 13:return[3,20];case 14:return y=g.sent(),o={error:y},[3,20];case 15:return g.trys.push([15,,18,19]),l||n||!(i=p.return)?[3,17]:[4,i.call(p)];case 16:g.sent(),g.label=17;case 17:return[3,19];case 18:if(o)throw o.error;return[7];case 19:return[7];case 20:return[2]}}))}))}var ka=function(){function t(){this.title=n("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return t.prototype.getValue=function(t){return""},t.prototype.isActive=function(t){return!1},t.prototype.isDisabled=function(t){return o(t)},t.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadImage")},t.prototype.exec=function(t,e){var n=this.getMenuConfig(t),o=n.allowedFileTypes,u=void 0===o?[]:o,a=n.customBrowseAndUpload;if(a)a((function(e,n,o){return r(t,e,n,o)}));else{var c="";u.length>0&&(c='accept="'.concat(u.join(", "),'"'));var f=i("body"),s=i('<input type="file" '.concat(c," multiple/>"));s.hide(),f.append(s),s.click(),s.on("change",(function(){var e=s[0].files;Na(t,e)}))}},t}();var La={menus:[{key:"uploadImage",factory:function(){return new ka},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(t){return t},onProgress:function(t){},onSuccess:function(t,e){},onFailed:function(t,e){console.error("'".concat(t.name,"' upload failed"),e)},onError:function(t,e,n){console.error("'".concat(t.name,"' upload error"),n)},base64LimitSize:0}}],editorPlugin:function(t){var e=t.insertData,n=t;return n.insertData=function(r){if(o(n))e(r);else if(r.getData("text/plain"))e(r);else{var i=r.files;if(i.length<=0)e(r);else Array.prototype.slice.call(i).some((function(t){return"image"===function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}(t.type.split("/"),1)[0]}))?Na(t,i):e(r)}},n}};export{La as default};
2
2
  //# sourceMappingURL=index.esm.js.map