@wangeditor-next/video-module 1.3.8 → 1.3.10

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.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@wangeditor-next/core"),require("slate"),require("snabbdom"),require("dom7"),require("nanoid")):"function"==typeof define&&define.amd?define(["@wangeditor-next/core","slate","snabbdom","dom7","nanoid"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorVideoModule=e(t.core,t.slate,t.snabbdom,t.$,t.nanoid)}(this,(function(t,e,n,r,o){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=i(r);t.i18nAddResources("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),t.i18nAddResources("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}});var a=function(){return a=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},a.apply(this,arguments)};function c(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 s(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 f(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 l(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}function d(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=f(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 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 h,y,g=function(t){return t&&t.Math===Math&&t},m=g("object"==typeof globalThis&&globalThis)||g("object"==typeof window&&window)||g("object"==typeof self&&self)||g("object"==typeof p&&p)||g("object"==typeof p&&p)||function(){return this}()||Function("return this")(),b=function(t){try{return!!t()}catch(t){return!0}},w=!b((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),S=!b((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),E=Function.prototype.call,O=S?E.bind(E):function(){return E.apply(E,arguments)},x={}.propertyIsEnumerable,I=Object.getOwnPropertyDescriptor,j={f:I&&!x.call({1:2},1)?function(t){var e=I(this,t);return!!e&&e.enumerable}:x},T=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},P=Function.prototype,M=P.call,A=S&&P.bind.bind(M,M),N=S?A:function(t){return function(){return M.apply(t,arguments)}},R=N({}.toString),C=N("".slice),k=function(t){return C(R(t),8,-1)},D=Object,V=N("".split),L=b((function(){return!D("z").propertyIsEnumerable(0)}))?function(t){return"String"===k(t)?V(t,""):D(t)}:D,z=function(t){return null==t},F=TypeError,_=function(t){if(z(t))throw new F("Can't call method on "+t);return t},$=function(t){return L(_(t))},B="object"==typeof document&&document.all,U=void 0===B&&void 0!==B?function(t){return"function"==typeof t||t===B}:function(t){return"function"==typeof t},H=function(t){return"object"==typeof t?null!==t:U(t)},W=function(t,e){return arguments.length<2?(n=m[t],U(n)?n:void 0):m[t]&&m[t][e];var n},G=N({}.isPrototypeOf),q=m.navigator,K=q&&q.userAgent,X=K?String(K):"",Y=m.process,J=m.Deno,Q=Y&&Y.versions||J&&J.version,Z=Q&&Q.v8;Z&&(y=(h=Z.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!y&&X&&(!(h=X.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=X.match(/Chrome\/(\d+)/))&&(y=+h[1]);var tt=y,et=m.String,nt=!!Object.getOwnPropertySymbols&&!b((function(){var t=Symbol("symbol detection");return!et(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&tt&&tt<41})),rt=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ot=Object,it=rt?function(t){return"symbol"==typeof t}:function(t){var e=W("Symbol");return U(e)&&G(e.prototype,ot(t))},ut=String,at=function(t){try{return ut(t)}catch(t){return"Object"}},ct=TypeError,st=function(t){if(U(t))return t;throw new ct(at(t)+" is not a function")},ft=function(t,e){var n=t[e];return z(n)?void 0:st(n)},lt=TypeError,dt=Object.defineProperty,pt=function(t,e){try{dt(m,t,{value:e,configurable:!0,writable:!0})}catch(n){m[t]=e}return e},vt=v((function(t){var e="__core-js_shared__",n=t.exports=m[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"})})),ht=function(t,e){return vt[t]||(vt[t]=e||{})},yt=Object,gt=function(t){return yt(_(t))},mt=N({}.hasOwnProperty),bt=Object.hasOwn||function(t,e){return mt(gt(t),e)},wt=0,St=Math.random(),Et=N(1..toString),Ot=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Et(++wt+St,36)},xt=m.Symbol,It=ht("wks"),jt=rt?xt.for||xt:xt&&xt.withoutSetter||Ot,Tt=function(t){return bt(It,t)||(It[t]=nt&&bt(xt,t)?xt[t]:jt("Symbol."+t)),It[t]},Pt=TypeError,Mt=Tt("toPrimitive"),At=function(t,e){if(!H(t)||it(t))return t;var n,r=ft(t,Mt);if(r){if(void 0===e&&(e="default"),n=O(r,t,e),!H(n)||it(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&&U(n=t.toString)&&!H(r=O(n,t)))return r;if(U(n=t.valueOf)&&!H(r=O(n,t)))return r;if("string"!==e&&U(n=t.toString)&&!H(r=O(n,t)))return r;throw new lt("Can't convert object to primitive value")}(t,e)},Nt=function(t){var e=At(t,"string");return it(e)?e:e+""},Rt=m.document,Ct=H(Rt)&&H(Rt.createElement),kt=function(t){return Ct?Rt.createElement(t):{}},Dt=!w&&!b((function(){return 7!==Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Vt=Object.getOwnPropertyDescriptor,Lt={f:w?Vt:function(t,e){if(t=$(t),e=Nt(e),Dt)try{return Vt(t,e)}catch(t){}if(bt(t,e))return T(!O(j.f,t,e),t[e])}},zt=w&&b((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ft=String,_t=TypeError,$t=function(t){if(H(t))return t;throw new _t(Ft(t)+" is not an object")},Bt=TypeError,Ut=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Wt="enumerable",Gt="configurable",qt="writable",Kt={f:w?zt?function(t,e,n){if($t(t),e=Nt(e),$t(n),"function"==typeof t&&"prototype"===e&&"value"in n&&qt in n&&!n[qt]){var r=Ht(t,e);r&&r[qt]&&(t[e]=n.value,n={configurable:Gt in n?n[Gt]:r[Gt],enumerable:Wt in n?n[Wt]:r[Wt],writable:!1})}return Ut(t,e,n)}:Ut:function(t,e,n){if($t(t),e=Nt(e),$t(n),Dt)try{return Ut(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}},Xt=w?function(t,e,n){return Kt.f(t,e,T(1,n))}:function(t,e,n){return t[e]=n,t},Yt=Function.prototype,Jt=w&&Object.getOwnPropertyDescriptor,Qt=bt(Yt,"name"),Zt={EXISTS:Qt,PROPER:Qt&&"something"===function(){}.name,CONFIGURABLE:Qt&&(!w||w&&Jt(Yt,"name").configurable)},te=N(Function.toString);U(vt.inspectSource)||(vt.inspectSource=function(t){return te(t)});var ee,ne,re,oe=vt.inspectSource,ie=m.WeakMap,ue=U(ie)&&/native code/.test(String(ie)),ae=ht("keys"),ce=function(t){return ae[t]||(ae[t]=Ot(t))},se={},fe="Object already initialized",le=m.TypeError,de=m.WeakMap;if(ue||vt.state){var pe=vt.state||(vt.state=new de);pe.get=pe.get,pe.has=pe.has,pe.set=pe.set,ee=function(t,e){if(pe.has(t))throw new le(fe);return e.facade=t,pe.set(t,e),e},ne=function(t){return pe.get(t)||{}},re=function(t){return pe.has(t)}}else{var ve=ce("state");se[ve]=!0,ee=function(t,e){if(bt(t,ve))throw new le(fe);return e.facade=t,Xt(t,ve,e),e},ne=function(t){return bt(t,ve)?t[ve]:{}},re=function(t){return bt(t,ve)}}var he={set:ee,get:ne,has:re,enforce:function(t){return re(t)?ne(t):ee(t,{})},getterFor:function(t){return function(e){var n;if(!H(e)||(n=ne(e)).type!==t)throw new le("Incompatible receiver, "+t+" required");return n}}},ye=v((function(t){var e=Zt.CONFIGURABLE,n=he.enforce,r=he.get,o=String,i=Object.defineProperty,u=N("".slice),a=N("".replace),c=N([].join),s=w&&!b((function(){return 8!==i((function(){}),"length",{value:8}).length})),f=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),(!bt(t,"name")||e&&t.name!==r)&&(w?i(t,"name",{value:r,configurable:!0}):t.name=r),s&&l&&bt(l,"arity")&&t.length!==l.arity&&i(t,"length",{value:l.arity});try{l&&bt(l,"constructor")&&l.constructor?w&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var d=n(t);return bt(d,"source")||(d.source=c(f,"string"==typeof r?r:"")),t};Function.prototype.toString=l((function(){return U(this)&&r(this).source||oe(this)}),"toString")})),ge=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(U(n)&&ye(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:Kt.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},me=Math.ceil,be=Math.floor,we=Math.trunc||function(t){var e=+t;return(e>0?be:me)(e)},Se=function(t){var e=+t;return e!=e||0===e?0:we(e)},Ee=Math.max,Oe=Math.min,xe=function(t,e){var n=Se(t);return n<0?Ee(n+e,0):Oe(n,e)},Ie=Math.min,je=function(t){var e=Se(t);return e>0?Ie(e,9007199254740991):0},Te=function(t){return je(t.length)},Pe=function(t){return function(e,n,r){var o=$(e),i=Te(o);if(0===i)return!t&&-1;var u,a=xe(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}},Me={includes:Pe(!0),indexOf:Pe(!1)},Ae=Me.indexOf,Ne=N([].push),Re=function(t,e){var n,r=$(t),o=0,i=[];for(n in r)!bt(se,n)&&bt(r,n)&&Ne(i,n);for(;e.length>o;)bt(r,n=e[o++])&&(~Ae(i,n)||Ne(i,n));return i},Ce=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ke=Ce.concat("length","prototype"),De={f:Object.getOwnPropertyNames||function(t){return Re(t,ke)}},Ve={f:Object.getOwnPropertySymbols},Le=N([].concat),ze=W("Reflect","ownKeys")||function(t){var e=De.f($t(t)),n=Ve.f;return n?Le(e,n(t)):e},Fe=function(t,e,n){for(var r=ze(e),o=Kt.f,i=Lt.f,u=0;u<r.length;u++){var a=r[u];bt(t,a)||n&&bt(n,a)||o(t,a,i(e,a))}},_e=/#|\.prototype\./,$e=function(t,e){var n=Ue[Be(t)];return n===We||n!==He&&(U(e)?b(e):!!e)},Be=$e.normalize=function(t){return String(t).replace(_e,".").toLowerCase()},Ue=$e.data={},He=$e.NATIVE="N",We=$e.POLYFILL="P",Ge=$e,qe=Lt.f,Ke=function(t,e){var n,r,o,i,u,a=t.target,c=t.global,s=t.stat;if(n=c?m:s?m[a]||pt(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],!Ge(c?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Fe(i,o)}(t.sham||o&&o.sham)&&Xt(i,"sham",!0),ge(n,r,i,t)}},Xe={};Xe[Tt("toStringTag")]="z";var Ye,Je="[object z]"===String(Xe),Qe=Tt("toStringTag"),Ze=Object,tn="Arguments"===k(function(){return arguments}()),en=Je?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=Ze(t),Qe))?n:tn?k(e):"Object"===(r=k(e))&&U(e.callee)?"Arguments":r},nn=String,rn=function(t){if("Symbol"===en(t))throw new TypeError("Cannot convert a Symbol value to a string");return nn(t)},on="\t\n\v\f\r                 \u2028\u2029\ufeff",un=N("".replace),an=RegExp("^["+on+"]+"),cn=RegExp("(^|[^"+on+"])["+on+"]+$"),sn=function(t){return function(e){var n=rn(_(e));return 1&t&&(n=un(n,an,"")),2&t&&(n=un(n,cn,"$1")),n}},fn={start:sn(1),end:sn(2),trim:sn(3)},ln=Zt.PROPER,dn=fn.trim;function pn(t){return t.length?t[0].tagName.toLowerCase():""}function vn(t,e,n,r){void 0===e&&(e="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=u.default(t),i=r.width,a=void 0===i?"":i,c=r.height,s=void 0===c?"":c,f="";return a&&(f+="width: "+a+";"),s&&(f+="height: "+s+";"),o.attr("width",e),o.attr("height",n),o.attr("style",f),o[0].outerHTML}Ke({target:"String",proto:!0,forced:(Ye="trim",b((function(){return!!on[Ye]()||"​…᠎"!=="​…᠎"[Ye]()||ln&&on[Ye].name!==Ye})))},{trim:function(){return dn(this)}}),Ke({global:!0,forced:m.globalThis!==m},{globalThis:m}),r.append&&(u.default.fn.append=r.append),r.on&&(u.default.fn.on=r.on),r.focus&&(u.default.fn.focus=r.focus),r.attr&&(u.default.fn.attr=r.attr),r.val&&(u.default.fn.val=r.val),r.html&&(u.default.fn.html=r.html),r.parent&&(u.default.fn.parent=r.parent),r.hasClass&&(u.default.fn.hasClass=r.hasClass),r.empty&&(u.default.fn.empty=r.empty);var hn={type:"video",renderElem:function(e,r,o){var i,u=e,a=u.src,c=void 0===a?"":a,s=u.poster,f=void 0===s?"":s,l=u.key,d=void 0===l?"":l,p=u.width,v=void 0===p?"auto":p,h=u.height,y=void 0===h?"auto":h,g=u.style,m=void 0===g?{}:g,b=u.textAlign,w=void 0===b?"center":b,S=t.DomEditor.isNodeSelected(o,e);if(0===c.trim().indexOf("<iframe ")){var E=vn(c,v,y,m);i=n.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w},innerHTML:E})}else{var O=n.jsx("video",{key:d,poster:f,controls:!0,style:m},n.jsx("source",{src:c,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==v&&(O.data.width=v),"auto"!==y&&(O.data.height=y),i=n.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w}},O)}return n.h("div",{props:{contentEditable:!1},on:{mousedown:function(t){return t.preventDefault()}}},i)}};var yn,gn={type:"video",elemToHtml:function(t,e){var n=t,r=n.src,o=void 0===r?"":r,i=n.poster,u=void 0===i?"":i,a=n.width,c=void 0===a?"auto":a,s=n.height,f=void 0===s?"auto":s,l=n.style,d=void 0===l?{}:l,p=n.textAlign,v='<div data-w-e-type="video" data-w-e-is-void style="text-align: '+(void 0===p?"center":p)+';">\n';if(0===o.trim().indexOf("<iframe ")){v+=vn(o,c,f,d)}else{var h=d.width,y=void 0===h?"":h,g=d.height,m=void 0===g?"":g,b="";y&&(b+="width: "+y+";"),m&&(b+="height: "+m+";"),v+='<video poster="'+u+'" controls="true" width="'+c+'" height="'+f+'" style="'+b+'"><source src="'+o+'" type="video/mp4"/></video>'}return v+="\n</div>"}},mn=Object.keys||function(t){return Re(t,Ce)},bn=w&&!zt?Object.defineProperties:function(t,e){$t(t);for(var n,r=$(e),o=mn(e),i=o.length,u=0;i>u;)Kt.f(t,n=o[u++],r[n]);return t},wn={f:bn},Sn=W("document","documentElement"),En="prototype",On="script",xn=ce("IE_PROTO"),In=function(){},jn=function(t){return"<"+On+">"+t+"</"+On+">"},Tn=function(t){t.write(jn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Pn=function(){try{yn=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Pn="undefined"!=typeof document?document.domain&&yn?Tn(yn):(e=kt("iframe"),n="java"+On+":",e.style.display="none",Sn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(jn("document.F=Object")),t.close(),t.F):Tn(yn);for(var r=Ce.length;r--;)delete Pn[En][Ce[r]];return Pn()};se[xn]=!0;var Mn=Object.create||function(t,e){var n;return null!==t?(In[En]=$t(t),n=new In,In[En]=null,n[xn]=t):n=Pn(),void 0===e?n:wn.f(n,e)},An=Kt.f,Nn=Tt("unscopables"),Rn=Array.prototype;void 0===Rn[Nn]&&An(Rn,Nn,{configurable:!0,value:Mn(null)});var Cn=function(t){Rn[Nn][t]=!0},kn=Me.includes,Dn=b((function(){return!Array(1).includes()}));Ke({target:"Array",proto:!0,forced:Dn},{includes:function(t){return kn(this,t,arguments.length>1?arguments[1]:void 0)}}),Cn("includes");var Vn={selector:"iframe,video,p",preParseHtml:function(t){var e=u.default(t),n=e;if("p"===pn(e)){var r=e.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=u.default(o))}}var a=pn(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var c=u.default('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return c.append(n),c[0]}},Ln=function(t){if("Function"===k(t))return N(t)},zn=Ln(Ln.bind),Fn=function(t,e){return st(t),void 0===e?t:S?zn(t,e):function(){return t.apply(e,arguments)}},_n=Array.isArray||function(t){return"Array"===k(t)},$n=function(){},Bn=W("Reflect","construct"),Un=/^\s*(?:class|function)\b/,Hn=N(Un.exec),Wn=!Un.test($n),Gn=function(t){if(!U(t))return!1;try{return Bn($n,[],t),!0}catch(t){return!1}},qn=function(t){if(!U(t))return!1;switch(en(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Wn||!!Hn(Un,oe(t))}catch(t){return!0}};qn.sham=!0;var Kn=!Bn||b((function(){var t;return Gn(Gn.call)||!Gn(Object)||!Gn((function(){t=!0}))||t}))?qn:Gn,Xn=Tt("species"),Yn=Array,Jn=function(t,e){return new(function(t){var e;return _n(t)&&(e=t.constructor,(Kn(e)&&(e===Yn||_n(e.prototype))||H(e)&&null===(e=e[Xn]))&&(e=void 0)),void 0===e?Yn:e}(t))(0===e?0:e)},Qn=N([].push),Zn=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,s,f,l){for(var d,p,v=gt(c),h=L(v),y=Te(h),g=Fn(s,f),m=0,b=l||Jn,w=e?b(c,y):n||u?b(c,0):void 0;y>m;m++)if((a||m in h)&&(p=g(d=h[m],m,v),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return m;case 2:Qn(w,d)}else switch(t){case 4:return!1;case 7:Qn(w,d)}return i?-1:r||o?o:w}},tr={forEach:Zn(0),map:Zn(1),filter:Zn(2),some:Zn(3),every:Zn(4),find:Zn(5),findIndex:Zn(6),filterReject:Zn(7)},er=tr.find,nr="find",rr=!0;nr in[]&&Array(1)[nr]((function(){rr=!1})),Ke({target:"Array",proto:!0,forced:rr},{find:function(t){return er(this,t,arguments.length>1?arguments[1]:void 0)}}),Cn(nr);var or=Je?{}.toString:function(){return"[object "+en(this)+"]"};Je||ge(Object.prototype,"toString",or,{unsafe:!0});var ir,ur,ar=function(){var t=$t(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},cr=m.RegExp,sr=b((function(){var t=cr("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),fr=sr||b((function(){return!cr("a","y").sticky})),lr={BROKEN_CARET:sr||b((function(){var t=cr("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:fr,UNSUPPORTED_Y:sr},dr=m.RegExp,pr=b((function(){var t=dr(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),vr=m.RegExp,hr=b((function(){var t=vr("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),yr=he.get,gr=ht("native-string-replace",String.prototype.replace),mr=RegExp.prototype.exec,br=mr,wr=N("".charAt),Sr=N("".indexOf),Er=N("".replace),Or=N("".slice),xr=(ur=/b*/g,O(mr,ir=/a/,"a"),O(mr,ur,"a"),0!==ir.lastIndex||0!==ur.lastIndex),Ir=lr.BROKEN_CARET,jr=void 0!==/()??/.exec("")[1];(xr||jr||Ir||pr||hr)&&(br=function(t){var e,n,r,o,i,u,a,c=this,s=yr(c),f=rn(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=O(br,l,f),c.lastIndex=l.lastIndex,e;var d=s.groups,p=Ir&&c.sticky,v=O(ar,c),h=c.source,y=0,g=f;if(p&&(v=Er(v,"y",""),-1===Sr(v,"g")&&(v+="g"),g=Or(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==wr(f,c.lastIndex-1))&&(h="(?: "+h+")",g=" "+g,y++),n=new RegExp("^(?:"+h+")",v)),jr&&(n=new RegExp("^"+h+"$(?!\\s)",v)),xr&&(r=c.lastIndex),o=O(mr,p?n:c,g),p?o?(o.input=Or(o.input,y),o[0]=Or(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:xr&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),jr&&o&&o.length>1&&O(gr,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=u=Mn(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var Tr=br;Ke({target:"RegExp",proto:!0,forced:/./.exec!==Tr},{exec:Tr});var Pr=Function.prototype,Mr=Pr.apply,Ar=Pr.call,Nr="object"==typeof Reflect&&Reflect.apply||(S?Ar.bind(Mr):function(){return Ar.apply(Mr,arguments)}),Rr=Tt("species"),Cr=RegExp.prototype,kr=N("".charAt),Dr=N("".charCodeAt),Vr=N("".slice),Lr=function(t){return function(e,n){var r,o,i=rn(_(e)),u=Se(n),a=i.length;return u<0||u>=a?t?"":void 0:(r=Dr(i,u))<55296||r>56319||u+1===a||(o=Dr(i,u+1))<56320||o>57343?t?kr(i,u):r:t?Vr(i,u,u+2):o-56320+(r-55296<<10)+65536}},zr={codeAt:Lr(!1),charAt:Lr(!0)},Fr=zr.charAt,_r=function(t,e,n){return e+(n?Fr(t,e).length:1)},$r=Math.floor,Br=N("".charAt),Ur=N("".replace),Hr=N("".slice),Wr=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Gr=/\$([$&'`]|\d{1,2})/g,qr=function(t,e,n,r,o,i){var u=n+t.length,a=r.length,c=Gr;return void 0!==o&&(o=gt(o),c=Wr),Ur(i,c,(function(i,c){var s;switch(Br(c,0)){case"$":return"$";case"&":return t;case"`":return Hr(e,0,n);case"'":return Hr(e,u);case"<":s=o[Hr(c,1,-1)];break;default:var f=+c;if(0===f)return i;if(f>a){var l=$r(f/10);return 0===l?i:l<=a?void 0===r[l-1]?Br(c,1):r[l-1]+Br(c,1):i}s=r[f-1]}return void 0===s?"":s}))},Kr=TypeError,Xr=function(t,e){var n=t.exec;if(U(n)){var r=O(n,t,e);return null!==r&&$t(r),r}if("RegExp"===k(t))return O(Tr,t,e);throw new Kr("RegExp#exec called on incompatible receiver")},Yr=Tt("replace"),Jr=Math.max,Qr=Math.min,Zr=N([].concat),to=N([].push),eo=N("".indexOf),no=N("".slice),ro="$0"==="a".replace(/./,"$0"),oo=!!/./[Yr]&&""===/./[Yr]("a","$0");!function(t,e,n,r){var o=Tt(t),i=!b((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),u=i&&!b((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[Rr]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!u||n){var a=/./[o],c=e(o,""[t],(function(t,e,n,r,o){var u=e.exec;return u===Tr||u===Cr.exec?i&&!o?{done:!0,value:O(a,e,n,r)}:{done:!0,value:O(t,n,e,r)}:{done:!1}}));ge(String.prototype,t,c[0]),ge(Cr,o,c[1])}r&&Xt(Cr[o],"sham",!0)}("replace",(function(t,e,n){var r=oo?"$":"$0";return[function(t,n){var r=_(this),o=z(t)?void 0:ft(t,Yr);return o?O(o,t,r,n):O(e,rn(r),t,n)},function(t,o){var i=$t(this),u=rn(t);if("string"==typeof o&&-1===eo(o,r)&&-1===eo(o,"$<")){var a=n(e,i,u,o);if(a.done)return a.value}var c=U(o);c||(o=rn(o));var s,f=i.global;f&&(s=i.unicode,i.lastIndex=0);for(var l,d=[];null!==(l=Xr(i,u))&&(to(d,l),f);){""===rn(l[0])&&(i.lastIndex=_r(u,je(i.lastIndex),s))}for(var p,v="",h=0,y=0;y<d.length;y++){for(var g,m=rn((l=d[y])[0]),b=Jr(Qr(Se(l.index),u.length),0),w=[],S=1;S<l.length;S++)to(w,void 0===(p=l[S])?p:String(p));var E=l.groups;if(c){var O=Zr([m],w,b,u);void 0!==E&&to(O,E),g=rn(Nr(o,void 0,O))}else g=qr(m,u,b,w,E,o);b>=h&&(v+=no(u,h,b)+g,h=b+m.length)}return v+no(u,h)}]}),!!b((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!ro||oo);var io={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},uo=kt("span").classList,ao=uo&&uo.constructor&&uo.constructor.prototype,co=ao===Object.prototype?void 0:ao,so=function(t,e){var n=[][t];return!!n&&b((function(){n.call(null,e||function(){return 1},1)}))},fo=tr.forEach,lo=so("forEach")?[].forEach:function(t){return fo(this,t,arguments.length>1?arguments[1]:void 0)},po=function(t){if(t&&t.forEach!==lo)try{Xt(t,"forEach",lo)}catch(e){t.forEach=lo}};for(var vo in io)io[vo]&&po(m[vo]&&m[vo].prototype);function ho(t){return void 0===t&&(t="r"),t+"-"+o.nanoid()}function yo(t){var e={};return t.trim().split(";").forEach((function(t){if(t){var n=l(t.split(":"),2),r=n[0],o=n[1];r&&o&&(e[r.trim()]=o.trim())}})),e}function go(t,e,n,r,o){return void 0===e&&(e=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),{type:"video",src:t,poster:e,width:n,height:r,style:o,children:[{text:""}]}}po(co);var mo,bo,wo,So,Eo={selector:'div[data-w-e-type="video"]',parseElemHtml:function(t,e,n){var r=u.default(t),o="",i="",a="auto",c="auto",s={},f=r.find("iframe");if(f.length>0)return a=f.attr("width")||"auto",c=f.attr("height")||"auto",s=yo(s=f.attr("style")||""),go(o=f[0].outerHTML,i,a,c,s);var l=r.find("video");return(o=l.attr("src")||"")||l.length>0&&(o=l.find("source").attr("src")||""),a=l.attr("width")||"auto",c=l.attr("height")||"auto",go(o,i=l.attr("poster")||"",a,c,s=yo(s=l.attr("style")||""))}},Oo=function(t){return X.slice(0,t.length)===t},xo=Oo("Bun/")?"BUN":Oo("Cloudflare-Workers")?"CLOUDFLARE":Oo("Deno/")?"DENO":Oo("Node.js/")?"NODE":m.Bun&&"string"==typeof Bun.version?"BUN":m.Deno&&"object"==typeof Deno.version?"DENO":"process"===k(m.process)?"NODE":m.window&&m.document?"BROWSER":"REST",Io="NODE"===xo,jo=String,To=TypeError,Po=function(t){if(function(t){return H(t)||null===t}(t))return t;throw new To("Can't set "+jo(t)+" as a prototype")},Mo=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=function(t,e,n){try{return N(st(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),Po(r),H(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),Ao=Kt.f,No=Tt("toStringTag"),Ro=function(t,e,n){t&&!n&&(t=t.prototype),t&&!bt(t,No)&&Ao(t,No,{configurable:!0,value:e})},Co=function(t,e,n){return n.get&&ye(n.get,e,{getter:!0}),n.set&&ye(n.set,e,{setter:!0}),Kt.f(t,e,n)},ko=Tt("species"),Do=TypeError,Vo=function(t,e){if(G(e,t))return t;throw new Do("Incorrect invocation")},Lo=TypeError,zo=Tt("species"),Fo=function(t,e){var n,r=$t(t).constructor;return void 0===r||z(n=$t(r)[zo])?e:function(t){if(Kn(t))return t;throw new Lo(at(t)+" is not a constructor")}(n)},_o=N([].slice),$o=TypeError,Bo=/(?:ipad|iphone|ipod).*applewebkit/i.test(X),Uo=m.setImmediate,Ho=m.clearImmediate,Wo=m.process,Go=m.Dispatch,qo=m.Function,Ko=m.MessageChannel,Xo=m.String,Yo=0,Jo={},Qo="onreadystatechange";b((function(){mo=m.location}));var Zo=function(t){if(bt(Jo,t)){var e=Jo[t];delete Jo[t],e()}},ti=function(t){return function(){Zo(t)}},ei=function(t){Zo(t.data)},ni=function(t){m.postMessage(Xo(t),mo.protocol+"//"+mo.host)};Uo&&Ho||(Uo=function(t){!function(t,e){if(t<e)throw new $o("Not enough arguments")}(arguments.length,1);var e=U(t)?t:qo(t),n=_o(arguments,1);return Jo[++Yo]=function(){Nr(e,void 0,n)},bo(Yo),Yo},Ho=function(t){delete Jo[t]},Io?bo=function(t){Wo.nextTick(ti(t))}:Go&&Go.now?bo=function(t){Go.now(ti(t))}:Ko&&!Bo?(So=(wo=new Ko).port2,wo.port1.onmessage=ei,bo=Fn(So.postMessage,So)):m.addEventListener&&U(m.postMessage)&&!m.importScripts&&mo&&"file:"!==mo.protocol&&!b(ni)?(bo=ni,m.addEventListener("message",ei,!1)):bo=Qo in kt("script")?function(t){Sn.appendChild(kt("script"))[Qo]=function(){Sn.removeChild(this),Zo(t)}}:function(t){setTimeout(ti(t),0)});var ri={set:Uo,clear:Ho},oi=Object.getOwnPropertyDescriptor,ii=function(){this.head=null,this.tail=null};ii.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 ui,ai,ci,si,fi,li=ii,di=/ipad|iphone|ipod/i.test(X)&&"undefined"!=typeof Pebble,pi=/web0s(?!.*chrome)/i.test(X),vi=ri.set,hi=m.MutationObserver||m.WebKitMutationObserver,yi=m.document,gi=m.process,mi=m.Promise,bi=function(t){if(!w)return m[t];var e=oi(m,t);return e&&e.value}("queueMicrotask");if(!bi){var wi=new li,Si=function(){var t,e;for(Io&&(t=gi.domain)&&t.exit();e=wi.get();)try{e()}catch(t){throw wi.head&&ui(),t}t&&t.enter()};Bo||Io||pi||!hi||!yi?!di&&mi&&mi.resolve?((si=mi.resolve(void 0)).constructor=mi,fi=Fn(si.then,si),ui=function(){fi(Si)}):Io?ui=function(){gi.nextTick(Si)}:(vi=Fn(vi,m),ui=function(){vi(Si)}):(ai=!0,ci=yi.createTextNode(""),new hi(Si).observe(ci,{characterData:!0}),ui=function(){ci.data=ai=!ai}),bi=function(t){wi.head||ui(),wi.add(t)}}var Ei=bi,Oi=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},xi=m.Promise;xi&&xi.prototype;var Ii,ji,Ti,Pi,Mi=Tt("species"),Ai=!1,Ni=U(m.PromiseRejectionEvent),Ri=Ge("Promise",(function(){var t=oe(xi),e=t!==String(xi);if(!e&&66===tt)return!0;if(!tt||tt<51||!/native code/.test(t)){var n=new xi((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[Mi]=r,!(Ai=n.then((function(){}))instanceof r))return!0}return!(e||"BROWSER"!==xo&&"DENO"!==xo||Ni)})),Ci={CONSTRUCTOR:Ri,REJECTION_EVENT:Ni,SUBCLASSING:Ai},ki=TypeError,Di=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new ki("Bad Promise constructor");e=t,n=r})),this.resolve=st(e),this.reject=st(n)},Vi={f:function(t){return new Di(t)}},Li=ri.set,zi="Promise",Fi=Ci.CONSTRUCTOR,_i=Ci.REJECTION_EVENT,$i=Ci.SUBCLASSING,Bi=he.getterFor(zi),Ui=he.set,Hi=xi&&xi.prototype,Wi=xi,Gi=Hi,qi=m.TypeError,Ki=m.document,Xi=m.process,Yi=Vi.f,Ji=Yi,Qi=!!(Ki&&Ki.createEvent&&m.dispatchEvent),Zi="unhandledrejection",tu=function(t){var e;return!(!H(t)||!U(e=t.then))&&e},eu=function(t,e){var n,r,o,i=e.value,u=1===e.state,a=u?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{a?(u||(2===e.rejection&&uu(e),e.rejection=1),!0===a?n=i:(f&&f.enter(),n=a(i),f&&(f.exit(),o=!0)),n===t.promise?s(new qi("Promise-chain cycle")):(r=tu(n))?O(r,n,c,s):c(n)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},nu=function(t,e){t.notified||(t.notified=!0,Ei((function(){for(var n,r=t.reactions;n=r.get();)eu(n,t);t.notified=!1,e&&!t.rejection&&ou(t)})))},ru=function(t,e,n){var r,o;Qi?((r=Ki.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),m.dispatchEvent(r)):r={promise:e,reason:n},!_i&&(o=m["on"+t])?o(r):t===Zi&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",n)},ou=function(t){O(Li,m,(function(){var e,n=t.facade,r=t.value;if(iu(t)&&(e=Oi((function(){Io?Xi.emit("unhandledRejection",r,n):ru(Zi,n,r)})),t.rejection=Io||iu(t)?2:1,e.error))throw e.value}))},iu=function(t){return 1!==t.rejection&&!t.parent},uu=function(t){O(Li,m,(function(){var e=t.facade;Io?Xi.emit("rejectionHandled",e):ru("rejectionhandled",e,t.value)}))},au=function(t,e,n){return function(r){t(e,r,n)}},cu=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,nu(t,!0))},su=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new qi("Promise can't be resolved itself");var r=tu(e);r?Ei((function(){var n={done:!1};try{O(r,e,au(su,n,t),au(cu,n,t))}catch(e){cu(n,e,t)}})):(t.value=e,t.state=1,nu(t,!1))}catch(e){cu({done:!1},e,t)}}};if(Fi&&(Gi=(Wi=function(t){Vo(this,Gi),st(t),O(Ii,this);var e=Bi(this);try{t(au(su,e),au(cu,e))}catch(t){cu(e,t)}}).prototype,(Ii=function(t){Ui(this,{type:zi,done:!1,notified:!1,parent:!1,reactions:new li,rejection:!1,state:0,value:null})}).prototype=ge(Gi,"then",(function(t,e){var n=Bi(this),r=Yi(Fo(this,Wi));return n.parent=!0,r.ok=!U(t)||t,r.fail=U(e)&&e,r.domain=Io?Xi.domain:void 0,0===n.state?n.reactions.add(r):Ei((function(){eu(r,n)})),r.promise})),ji=function(){var t=new Ii,e=Bi(t);this.promise=t,this.resolve=au(su,e),this.reject=au(cu,e)},Vi.f=Yi=function(t){return t===Wi||undefined===t?new ji(t):Ji(t)},U(xi)&&Hi!==Object.prototype)){Ti=Hi.then,$i||ge(Hi,"then",(function(t,e){var n=this;return new Wi((function(t,e){O(Ti,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Hi.constructor}catch(t){}Mo&&Mo(Hi,Gi)}Ke({global:!0,constructor:!0,wrap:!0,forced:Fi},{Promise:Wi}),Ro(Wi,zi,!1),Pi=W(zi),w&&Pi&&!Pi[ko]&&Co(Pi,ko,{configurable:!0,get:function(){return this}});var fu={},lu=Tt("iterator"),du=Array.prototype,pu=Tt("iterator"),vu=function(t){if(!z(t))return ft(t,pu)||ft(t,"@@iterator")||fu[en(t)]},hu=TypeError,yu=function(t,e,n){var r,o;$t(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 $t(r),n},gu=TypeError,mu=function(t,e){this.stopped=t,this.result=e},bu=mu.prototype,wu=function(t,e,n){var r,o,i,u,a,c,s,f,l=n&&n.that,d=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),v=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),y=Fn(e,l),g=function(t){return r&&yu(r,"normal",t),new mu(!0,t)},m=function(t){return d?($t(t),h?y(t[0],t[1],g):y(t[0],t[1])):h?y(t,g):y(t)};if(p)r=t.iterator;else if(v)r=t;else{if(!(o=vu(t)))throw new gu(at(t)+" is not iterable");if(void 0!==(f=o)&&(fu.Array===f||du[lu]===f)){for(i=0,u=Te(t);u>i;i++)if((a=m(t[i]))&&G(bu,a))return a;return new mu(!1)}r=function(t,e){var n=arguments.length<2?vu(t):e;if(st(n))return $t(O(n,t));throw new hu(at(t)+" is not iterable")}(t,o)}for(c=p?t.next:r.next;!(s=O(c,r)).done;){try{a=m(s.value)}catch(t){yu(r,"throw",t)}if("object"==typeof a&&a&&G(bu,a))return a}return new mu(!1)},Su=Tt("iterator"),Eu=!1;try{var Ou=0,xu={next:function(){return{done:!!Ou++}},return:function(){Eu=!0}};xu[Su]=function(){return this},Array.from(xu,(function(){throw 2}))}catch(t){}var Iu=function(t,e){try{if(!e&&!Eu)return!1}catch(t){return!1}var n=!1;try{var r={};r[Su]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},ju=Ci.CONSTRUCTOR||!Iu((function(t){xi.all(t).then(void 0,(function(){}))}));Ke({target:"Promise",stat:!0,forced:ju},{all:function(t){var e=this,n=Vi.f(e),r=n.resolve,o=n.reject,i=Oi((function(){var n=st(e.resolve),i=[],u=0,a=1;wu(t,(function(t){var c=u++,s=!1;a++,O(n,e,t).then((function(t){s||(s=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise}});var Tu=Ci.CONSTRUCTOR,Pu=xi&&xi.prototype;if(Ke({target:"Promise",proto:!0,forced:Tu,real:!0},{catch:function(t){return this.then(void 0,t)}}),U(xi)){var Mu=W("Promise").prototype.catch;Pu.catch!==Mu&&ge(Pu,"catch",Mu,{unsafe:!0})}Ke({target:"Promise",stat:!0,forced:ju},{race:function(t){var e=this,n=Vi.f(e),r=n.reject,o=Oi((function(){var o=st(e.resolve);wu(t,(function(t){O(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),Ke({target:"Promise",stat:!0,forced:Ci.CONSTRUCTOR},{reject:function(t){var e=Vi.f(this);return(0,e.reject)(t),e.promise}});var Au=Ci.CONSTRUCTOR;function Nu(n,r,o,i,u){return void 0===o&&(o=""),void 0===i&&(i=""),void 0===u&&(u=""),c(this,void 0,void 0,(function(){var a,c,f,l,d,p,v;return s(this,(function(s){switch(s.label){case 0:return r?(n.restoreSelection(),a=n.getMenuConfig("insertVideo"),c=a.onInsertedVideo,f=a.checkVideo,l=a.parseVideoSrc,[4,f(r,o)]):[2];case 1:return"string"==typeof(d=s.sent())?(n.alert(d,"error"),[2]):null==d?[2]:[4,l(r)];case 2:return 0!==(p=s.sent()).trim().indexOf("<iframe ")&&(p=p.replace(/</g,"&lt;").replace(/>/g,"&gt;")),v={type:"video",src:p,poster:o,children:[{text:""}],style:{width:i,height:u}},Promise.resolve().then((function(){t.DomEditor.isSelectedEmptyParagraph(n)&&e.Transforms.removeNodes(n,{mode:"highest"}),e.Transforms.insertNodes(n,v,{mode:"highest"})})),c(v),[2]}}))}))}function Ru(){return ho("w-e-insert-video")}W("Promise"),Ke({target:"Promise",stat:!0,forced:Au},{resolve:function(t){return function(t,e){if($t(t),H(e)&&e.constructor===t)return e;var n=Vi.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var Cu=function(){function n(){this.title=t.t("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=Ru(),this.posterInputId=Ru(),this.buttonId=Ru()}return n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){},n.prototype.isDisabled=function(n){var r=n.selection;return null==r||(!e.Range.isCollapsed(r)||!!t.DomEditor.getSelectedElems(n).some((function(e){var r=t.DomEditor.getNodeType(e);return"pre"===r||("list-item"===r||!!n.isVoid(e))})))},n.prototype.getModalPositionNode=function(t){return null},n.prototype.getModalContentElem=function(e){var n=this,r=this,o=r.srcInputId,i=r.posterInputId,a=r.buttonId,f=l(t.genModalInputElems(t.t("videoModule.videoSrc"),o,t.t("videoModule.videoSrcPlaceHolder")),2),d=f[0],p=f[1],v=l(t.genModalInputElems(t.t("videoModule.videoPoster"),i,t.t("videoModule.videoPosterPlaceHolder")),2),h=v[0],y=v[1],g=u.default(p),m=u.default(y),b=l(t.genModalButtonElems(a,t.t("videoModule.ok")),1)[0];if(null==this.$content){var w=u.default("<div></div>");w.on("click","#"+a,(function(t){return c(n,void 0,void 0,(function(){var n,r;return s(this,(function(u){switch(u.label){case 0:return t.preventDefault(),n=w.find("#"+o).val().trim(),r=w.find("#"+i).val().trim(),[4,Nu(e,n,r)];case 1:return u.sent(),e.hidePanelOrModal(),[2]}}))}))})),this.$content=w}var S=this.$content;return S.empty(),S.append(d),S.append(h),S.append(b),g.val(""),m.val(""),setTimeout((function(){g.focus()})),S[0]},n}(),ku=N([].join),Du=L!==Object||!so("join",",");Ke({target:"Array",proto:!0,forced:Du},{join:function(t){return ku($(this),void 0===t?",":t)}});var Vu,Lu,zu,Fu=!b((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),_u=ce("IE_PROTO"),$u=Object,Bu=$u.prototype,Uu=Fu?$u.getPrototypeOf:function(t){var e=gt(t);if(bt(e,_u))return e[_u];var n=e.constructor;return U(n)&&e instanceof n?n.prototype:e instanceof $u?Bu:null},Hu=Tt("iterator"),Wu=!1;[].keys&&("next"in(zu=[].keys())?(Lu=Uu(Uu(zu)))!==Object.prototype&&(Vu=Lu):Wu=!0);var Gu=!H(Vu)||b((function(){var t={};return Vu[Hu].call(t)!==t}));Gu&&(Vu={}),U(Vu[Hu])||ge(Vu,Hu,(function(){return this}));var qu={IteratorPrototype:Vu,BUGGY_SAFARI_ITERATORS:Wu},Ku=qu.IteratorPrototype,Xu=function(){return this},Yu=Zt.PROPER,Ju=Zt.CONFIGURABLE,Qu=qu.IteratorPrototype,Zu=qu.BUGGY_SAFARI_ITERATORS,ta=Tt("iterator"),ea="keys",na="values",ra="entries",oa=function(){return this},ia=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=Mn(Ku,{next:T(+!r,n)}),Ro(t,o,!1),fu[o]=Xu}(n,e,r);var a,c,s,f=function(t){if(t===o&&h)return h;if(!Zu&&t&&t in p)return p[t];switch(t){case ea:case na:case ra:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",d=!1,p=t.prototype,v=p[ta]||p["@@iterator"]||o&&p[o],h=!Zu&&v||f(o),y="Array"===e&&p.entries||v;if(y&&(a=Uu(y.call(new t)))!==Object.prototype&&a.next&&(Uu(a)!==Qu&&(Mo?Mo(a,Qu):U(a[ta])||ge(a,ta,oa)),Ro(a,l,!0)),Yu&&o===na&&v&&v.name!==na&&(Ju?Xt(p,"name",na):(d=!0,h=function(){return O(v,this)})),o)if(c={values:f(na),keys:i?h:f(ea),entries:f(ra)},u)for(s in c)(Zu||d||!(s in p))&&ge(p,s,c[s]);else Ke({target:e,proto:!0,forced:Zu||d},c);return p[ta]!==h&&ge(p,ta,h,{name:o}),fu[e]=h,c},ua=function(t,e){return{value:t,done:e}},aa=Kt.f,ca="Array Iterator",sa=he.set,fa=he.getterFor(ca),la=ia(Array,"Array",(function(t,e){sa(this,{type:ca,target:$(t),index:0,kind:e})}),(function(){var t=fa(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,ua(void 0,!0);switch(t.kind){case"keys":return ua(n,!1);case"values":return ua(e[n],!1)}return ua([n,e[n]],!1)}),"values"),da=fu.Arguments=fu.Array;if(Cn("keys"),Cn("values"),Cn("entries"),w&&"values"!==da.name)try{aa(da,"name",{value:"values"})}catch(t){}var pa=Tt("species"),va=function(t){return tt>=51||!b((function(){var e=[];return(e.constructor={})[pa]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("slice"),ha=Tt("species"),ya=Array,ga=Math.max;Ke({target:"Array",proto:!0,forced:!va},{slice:function(t,e){var n,r,o,i,u,a,c=$(this),s=Te(c),f=xe(t,s),l=xe(void 0===e?s:e,s);if(_n(c)&&(n=c.constructor,(Kn(n)&&(n===ya||_n(n.prototype))||H(n)&&null===(n=n[ha]))&&(n=void 0),n===ya||void 0===n))return _o(c,f,l);for(r=new(void 0===n?ya:n)(ga(l-f,0)),o=0;f<l;f++,o++)f in c&&(i=r,u=o,a=c[f],w?Kt.f(i,u,T(0,a)):i[u]=a);return r.length=o,r}});var ma=Zt.EXISTS,ba=Function.prototype,wa=N(ba.toString),Sa=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Ea=N(Sa.exec);w&&!ma&&Co(ba,"name",{configurable:!0,get:function(){try{return Ea(Sa,wa(this))[1]}catch(t){return""}}});var Oa=zr.charAt,xa="String Iterator",Ia=he.set,ja=he.getterFor(xa);ia(String,"String",(function(t){Ia(this,{type:xa,string:rn(t),index:0})}),(function(){var t,e=ja(this),n=e.string,r=e.index;return r>=n.length?ua(void 0,!0):(t=Oa(n,r),e.index+=t.length,ua(t,!1))}));var Ta=!b((function(){return Object.isExtensible(Object.preventExtensions({}))})),Pa=function(t,e,n){for(var r in e)ge(t,r,e[r],n);return t},Ma=De.f,Aa="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Na={f:function(t){return Aa&&"Window"===k(t)?function(t){try{return Ma(t)}catch(t){return _o(Aa)}}(t):Ma($(t))}},Ra=b((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Ca=Object.isExtensible,ka=b((function(){Ca(1)}))||Ra?function(t){return!!H(t)&&((!Ra||"ArrayBuffer"!==k(t))&&(!Ca||Ca(t)))}:Ca,Da=v((function(t){var e=Kt.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=De.f,e=N([].splice),o={};o[r]=1,t(o).length&&(De.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},Ke({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Na.f}))},fastKey:function(t,e){if(!H(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!bt(t,r)){if(!ka(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!bt(t,r)){if(!ka(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return Ta&&n&&ka(t)&&!bt(t,r)&&i(t),t}};se[r]=!0})),Va=Da.getWeakData,La=he.set,za=he.getterFor,Fa=tr.find,_a=tr.findIndex,$a=N([].splice),Ba=0,Ua=function(t){return t.frozen||(t.frozen=new Ha)},Ha=function(){this.entries=[]},Wa=function(t,e){return Fa(t.entries,(function(t){return t[0]===e}))};Ha.prototype={get:function(t){var e=Wa(this,t);if(e)return e[1]},has:function(t){return!!Wa(this,t)},set:function(t,e){var n=Wa(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=_a(this.entries,(function(e){return e[0]===t}));return~e&&$a(this.entries,e,1),!!~e}};var Ga,qa={getConstructor:function(t,e,n,r){var o=t((function(t,o){Vo(t,i),La(t,{type:e,id:Ba++,frozen:null}),z(o)||wu(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=za(e),a=function(t,e,n){var r=u(t),o=Va($t(e),!0);return!0===o?Ua(r).set(e,n):o[r.id]=n,t};return Pa(i,{delete:function(t){var e=u(this);if(!H(t))return!1;var n=Va(t);return!0===n?Ua(e).delete(t):n&&bt(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!H(t))return!1;var n=Va(t);return!0===n?Ua(e).has(t):n&&bt(n,e.id)}}),Pa(i,n?{get:function(t){var e=u(this);if(H(t)){var n=Va(t);if(!0===n)return Ua(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}},Ka=he.enforce,Xa=Object,Ya=Array.isArray,Ja=Xa.isExtensible,Qa=Xa.isFrozen,Za=Xa.isSealed,tc=Xa.freeze,ec=Xa.seal,nc=!m.ActiveXObject&&"ActiveXObject"in m,rc=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},oc=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,s={},f=function(t){var e=N(a[t]);ge(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(Ge(t,!U(u)||!(o||a.forEach&&!b((function(){(new u).entries().next()})))))c=n.getConstructor(e,t,r,i),Da.enable();else if(Ge(t,!0)){var l=new c,d=l[i](o?{}:-0,1)!==l,p=b((function(){l.has(1)})),v=Iu((function(t){new u(t)})),h=!o&&b((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));v||((c=e((function(t,e){Vo(t,a);var n=function(t,e,n){var r,o;return Mo&&U(r=e.constructor)&&r!==n&&H(o=r.prototype)&&o!==n.prototype&&Mo(t,o),t}(new u,t,c);return z(e)||wu(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=c),(p||h)&&(f("delete"),f("has"),r&&f("get")),(h||d)&&f(i),o&&a.clear&&delete a.clear}return s[t]=c,Ke({global:!0,constructor:!0,forced:c!==u},s),Ro(c,t),o||n.setStrong(c,t,r),c}("WeakMap",rc,qa),ic=oc.prototype,uc=N(ic.set);if(ue)if(nc){Ga=qa.getConstructor(rc,"WeakMap",!0),Da.enable();var ac=N(ic.delete),cc=N(ic.has),sc=N(ic.get);Pa(ic,{delete:function(t){if(H(t)&&!Ja(t)){var e=Ka(this);return e.frozen||(e.frozen=new Ga),ac(this,t)||e.frozen.delete(t)}return ac(this,t)},has:function(t){if(H(t)&&!Ja(t)){var e=Ka(this);return e.frozen||(e.frozen=new Ga),cc(this,t)||e.frozen.has(t)}return cc(this,t)},get:function(t){if(H(t)&&!Ja(t)){var e=Ka(this);return e.frozen||(e.frozen=new Ga),cc(this,t)?sc(this,t):e.frozen.get(t)}return sc(this,t)},set:function(t,e){if(H(t)&&!Ja(t)){var n=Ka(this);n.frozen||(n.frozen=new Ga),cc(this,t)?uc(this,t,e):n.frozen.set(t,e)}else uc(this,t,e);return this}})}else Ta&&b((function(){var t=tc([]);return uc(new oc,t,1),!Qa(t)}))&&Pa(ic,{set:function(t,e){var n;return Ya(t)&&(Qa(t)?n=tc:Za(t)&&(n=ec)),uc(this,t,e),n&&n(t),this}});var fc=Tt("iterator"),lc=la.values,dc=function(t,e){if(t){if(t[fc]!==lc)try{Xt(t,fc,lc)}catch(e){t[fc]=lc}if(Ro(t,e,!0),io[e])for(var n in la)if(t[n]!==la[n])try{Xt(t,n,la[n])}catch(e){t[n]=la[n]}}};for(var pc in io)dc(m[pc]&&m[pc].prototype,pc);function vc(t){return t.getMenuConfig("uploadVideo")}dc(co,"DOMTokenList");var hc=new WeakMap;function yc(e,n){return c(this,void 0,void 0,(function(){var r,o,i,u;return s(this,(function(c){switch(c.label){case 0:return r=function(e){var n=hc.get(e);if(null!=n)return n;var r=vc(e),o=r.onSuccess,i=r.onProgress,u=r.onFailed,c=r.customInsert,s=r.onError;return n=t.createUploader(a(a({},r),{onProgress:function(t){e.showProgressBar(t),i&&i(t)},onSuccess:function(t,n){if(c)return c(n,(function(t,n){return Nu(e,t,n)})),void o(t,n);var r=n.errno,i=void 0===r?1:r,a=n.data,s=void 0===a?{}:a;if(0===i){var f=s.url,l=void 0===f?"":f,d=s.poster;Nu(e,l,void 0===d?"":d),o(t,n)}else u(t,n)},onError:function(t,e,n){s(t,e,n)}})),hc.set(e,n),n}(e),o=n.name,i=n.type,u=n.size,r.addFile({name:o,type:i,size:u,data:n}),[4,r.upload()];case 1:return c.sent(),[2]}}))}))}var gc=function(){function n(){this.title=t.t("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){var n=this.getMenuConfig(t),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i((function(e,n){return Nu(t,e,n)}));else{var a="";o.length>0&&(a='accept="'+o.join(", ")+'"');var f=u.default("body"),l=u.default('<input type="file" '+a+" multiple/>");l.hide(),f.append(l),l.click(),l.on("change",(function(){var e=l[0].files;!function(t,e){var n,r;c(this,void 0,void 0,(function(){var o,i,u,a,c,f;return s(this,(function(s){switch(s.label){case 0:if(null==e)return[2];o=Array.prototype.slice.call(e),i=vc(t).customUpload,s.label=1;case 1:s.trys.push([1,9,10,15]),u=d(o),s.label=2;case 2:return[4,u.next()];case 3:return(a=s.sent()).done?[3,8]:(c=a.value,i?[4,i(c,(function(e,n){return Nu(t,e,n)}))]:[3,5]);case 4:return s.sent(),[3,7];case 5:return[4,yc(t,c)];case 6:s.sent(),s.label=7;case 7:return[3,2];case 8:return[3,15];case 9:return f=s.sent(),n={error:f},[3,15];case 10:return s.trys.push([10,,13,14]),a&&!a.done&&(r=u.return)?[4,r.call(u)]:[3,12];case 11:s.sent(),s.label=12;case 12:return[3,14];case 13:if(n)throw n.error;return[7];case 14:return[7];case 15:return[2]}}))}))}(t,e)}))}},n.prototype.isDisabled=function(n){var r=n.selection;return null==r||(!e.Range.isCollapsed(r)||!!t.DomEditor.getSelectedElems(n).some((function(e){var r=t.DomEditor.getNodeType(e);return"pre"===r||("list-item"===r||!!n.isVoid(e))})))},n.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadVideo")},n}();function mc(){return ho("w-e-insert-video")}var bc=function(){function n(){this.title=t.t("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=mc(),this.heightInputId=mc(),this.buttonId=mc()}return n.prototype.getSelectedVideoNode=function(e){return t.DomEditor.getSelectedNodeByType(e,"video")},n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){},n.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},n.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},n.prototype.getModalContentElem=function(n){var r=this,o=r.widthInputId,i=r.heightInputId,c=r.buttonId,s=l(t.genModalInputElems(t.t("videoModule.width"),o,"auto"),2),f=s[0],d=s[1],p=u.default(d),v=l(t.genModalInputElems(t.t("videoModule.height"),i,"auto"),2),h=v[0],y=v[1],g=u.default(y),m=l(t.genModalButtonElems(c,t.t("videoModule.ok")),1)[0];if(null==this.$content){var b=u.default("<div></div>");b.on("click","#"+c,(function(r){r.preventDefault();var u=b.find("#"+o).val().trim(),c=b.find("#"+i).val().trim(),s=function(t){return/^\d+(\.\d+)?%$/.test(t)},f=function(t){return/^\d+(\.\d+)?$/.test(t)},l="auto",d="auto";s(u)?l=u:f(u)&&(l=parseInt(u)+"px"),s(c)?d=c:f(c)&&(d=parseInt(c)+"px");var p=S.style,v=void 0===p?{}:p;n.restoreSelection();var h={style:a(a({},v),{width:l,height:d})};e.Transforms.setNodes(n,h,{match:function(e){return t.DomEditor.checkNodeType(e,"video")}}),n.hidePanelOrModal()})),this.$content=b}var w=this.$content;w.empty(),w.append(f),w.append(h),w.append(m);var S=this.getSelectedVideoNode(n);if(null==S)return w[0];var E=S.style,O=void 0===E?{}:E,x=O.width,I=void 0===x?"":x,j=O.height,T=void 0===j?"":j;return p.val(I),g.val(T),setTimeout((function(){p.focus()})),w[0]},n}();function wc(){return ho("w-e-edit-video")}var Sc=function(){function n(){this.title=t.t("videoModule.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=wc(),this.posterInputId=wc(),this.buttonId=wc()}return n.prototype.getSelectedVideoNode=function(e){return t.DomEditor.getSelectedNodeByType(e,"video")},n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){},n.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},n.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},n.prototype.getModalContentElem=function(n){var r=this,o=this,i=o.srcInputId,a=o.posterInputId,f=o.buttonId,d=l(t.genModalInputElems(t.t("videoModule.videoSrc"),i,t.t("videoModule.videoSrcPlaceHolder")),2),p=d[0],v=d[1],h=l(t.genModalInputElems(t.t("videoModule.videoPoster"),a,t.t("videoModule.videoPosterPlaceHolder")),2),y=h[0],g=h[1],m=u.default(v),b=u.default(g),w=l(t.genModalButtonElems(f,t.t("videoModule.ok")),1)[0];if(null==this.$content){var S=u.default("<div></div>");S.on("click","#"+f,(function(o){return c(r,void 0,void 0,(function(){var r,u,c,f;return s(this,(function(s){return o.preventDefault(),r=S.find("#"+i).val().trim(),u=S.find("#"+a).val().trim(),c=ho("video-"),f={src:r,poster:u,key:c},n.restoreSelection(),e.Transforms.setNodes(n,f,{match:function(e){return t.DomEditor.checkNodeType(e,"video")}}),n.hidePanelOrModal(),[2]}))}))})),this.$content=S}var E=this.$content;E.empty(),E.append(p),E.append(y),E.append(w);var O=this.getSelectedVideoNode(n);if(null==O)return E[0];var x=O.src,I=void 0===x?"":x,j=O.poster,T=void 0===j?"":j;return m.val(I),b.val(T),setTimeout((function(){m.focus()})),E[0]},n}();var Ec={renderElems:[hn],elemsToHtml:[gn],preParseHtml:[Vn],parseElemsHtml:[Eo],menus:[{key:"insertVideo",factory:function(){return new Cu},config:{onInsertedVideo:function(t){},checkVideo:function(t,e){return!0},parseVideoSrc:function(t){return t}}},{key:"uploadVideo",factory:function(){return new gc},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,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",e,n)}}},{key:"editVideoSize",factory:function(){return new bc}},{key:"editVideoSrc",factory:function(){return new Sc}}],editorPlugin:function(n){var r=n.isVoid,o=n.normalizeNode,i=n;return i.isVoid=function(t){return"video"===t.type||r(t)},i.normalizeNode=function(n){var r=l(n,2),u=r[0],a=r[1];"video"===t.DomEditor.getNodeType(u)&&(t.DomEditor.isLastNode(i,u)&&e.Transforms.insertNodes(i,t.DomEditor.genEmptyParagraph(),{at:[a[0]+1]}));return o([u,a])},i}};return Ec}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@wangeditor-next/core"),require("dom7"),require("slate"),require("nanoid"),require("snabbdom")):"function"==typeof define&&define.amd?define(["@wangeditor-next/core","dom7","slate","nanoid","snabbdom"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorVideoModule=e(t.core,t.$,t.slate,t.nanoid,t.snabbdom)}(this,(function(t,e,n,r,o){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=i(e);t.i18nAddResources("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),t.i18nAddResources("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}});var 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 s,f,l=function(t){return t&&t.Math===Math&&t},d=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")(),p=function(t){try{return!!t()}catch(t){return!0}},v=!p((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),h=!p((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),y=Function.prototype.call,g=h?y.bind(y):function(){return y.apply(y,arguments)},m={}.propertyIsEnumerable,b=Object.getOwnPropertyDescriptor,w={f:b&&!m.call({1:2},1)?function(t){var e=b(this,t);return!!e&&e.enumerable}:m},S=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},E=Function.prototype,O=E.call,x=h&&E.bind.bind(O,O),I=h?x:function(t){return function(){return O.apply(t,arguments)}},j=I({}.toString),T=I("".slice),P=function(t){return T(j(t),8,-1)},M=Object,A=I("".split),N=p((function(){return!M("z").propertyIsEnumerable(0)}))?function(t){return"String"===P(t)?A(t,""):M(t)}:M,R=function(t){return null==t},C=TypeError,k=function(t){if(R(t))throw new C("Can't call method on "+t);return t},D=function(t){return N(k(t))},V="object"==typeof document&&document.all,L=void 0===V&&void 0!==V?function(t){return"function"==typeof t||t===V}:function(t){return"function"==typeof t},z=function(t){return"object"==typeof t?null!==t:L(t)},F=function(t,e){return arguments.length<2?(n=d[t],L(n)?n:void 0):d[t]&&d[t][e];var n},_=I({}.isPrototypeOf),$=d.navigator,B=$&&$.userAgent,U=B?String(B):"",H=d.process,W=d.Deno,G=H&&H.versions||W&&W.version,q=G&&G.v8;q&&(f=(s=q.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!f&&U&&(!(s=U.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=U.match(/Chrome\/(\d+)/))&&(f=+s[1]);var K=f,X=d.String,Y=!!Object.getOwnPropertySymbols&&!p((function(){var t=Symbol("symbol detection");return!X(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&K&&K<41})),J=Y&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Q=Object,Z=J?function(t){return"symbol"==typeof t}:function(t){var e=F("Symbol");return L(e)&&_(e.prototype,Q(t))},tt=String,et=function(t){try{return tt(t)}catch(t){return"Object"}},nt=TypeError,rt=function(t){if(L(t))return t;throw new nt(et(t)+" is not a function")},ot=function(t,e){var n=t[e];return R(n)?void 0:rt(n)},it=TypeError,ut=Object.defineProperty,at=function(t,e){try{ut(d,t,{value:e,configurable:!0,writable:!0})}catch(n){d[t]=e}return e},ct=c((function(t){var e="__core-js_shared__",n=t.exports=d[e]||at(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"})})),st=function(t,e){return ct[t]||(ct[t]=e||{})},ft=Object,lt=function(t){return ft(k(t))},dt=I({}.hasOwnProperty),pt=Object.hasOwn||function(t,e){return dt(lt(t),e)},vt=0,ht=Math.random(),yt=I(1..toString),gt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+yt(++vt+ht,36)},mt=d.Symbol,bt=st("wks"),wt=J?mt.for||mt:mt&&mt.withoutSetter||gt,St=function(t){return pt(bt,t)||(bt[t]=Y&&pt(mt,t)?mt[t]:wt("Symbol."+t)),bt[t]},Et=TypeError,Ot=St("toPrimitive"),xt=function(t,e){if(!z(t)||Z(t))return t;var n,r=ot(t,Ot);if(r){if(void 0===e&&(e="default"),n=g(r,t,e),!z(n)||Z(n))return n;throw new Et("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&L(n=t.toString)&&!z(r=g(n,t)))return r;if(L(n=t.valueOf)&&!z(r=g(n,t)))return r;if("string"!==e&&L(n=t.toString)&&!z(r=g(n,t)))return r;throw new it("Can't convert object to primitive value")}(t,e)},It=function(t){var e=xt(t,"string");return Z(e)?e:e+""},jt=d.document,Tt=z(jt)&&z(jt.createElement),Pt=function(t){return Tt?jt.createElement(t):{}},Mt=!v&&!p((function(){return 7!==Object.defineProperty(Pt("div"),"a",{get:function(){return 7}}).a})),At=Object.getOwnPropertyDescriptor,Nt={f:v?At:function(t,e){if(t=D(t),e=It(e),Mt)try{return At(t,e)}catch(t){}if(pt(t,e))return S(!g(w.f,t,e),t[e])}},Rt=v&&p((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ct=String,kt=TypeError,Dt=function(t){if(z(t))return t;throw new kt(Ct(t)+" is not an object")},Vt=TypeError,Lt=Object.defineProperty,zt=Object.getOwnPropertyDescriptor,Ft="enumerable",_t="configurable",$t="writable",Bt={f:v?Rt?function(t,e,n){if(Dt(t),e=It(e),Dt(n),"function"==typeof t&&"prototype"===e&&"value"in n&&$t in n&&!n[$t]){var r=zt(t,e);r&&r[$t]&&(t[e]=n.value,n={configurable:_t in n?n[_t]:r[_t],enumerable:Ft in n?n[Ft]:r[Ft],writable:!1})}return Lt(t,e,n)}:Lt:function(t,e,n){if(Dt(t),e=It(e),Dt(n),Mt)try{return Lt(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new Vt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Ut=v?function(t,e,n){return Bt.f(t,e,S(1,n))}:function(t,e,n){return t[e]=n,t},Ht=Function.prototype,Wt=v&&Object.getOwnPropertyDescriptor,Gt=pt(Ht,"name"),qt={EXISTS:Gt,PROPER:Gt&&"something"===function(){}.name,CONFIGURABLE:Gt&&(!v||v&&Wt(Ht,"name").configurable)},Kt=I(Function.toString);L(ct.inspectSource)||(ct.inspectSource=function(t){return Kt(t)});var Xt,Yt,Jt,Qt=ct.inspectSource,Zt=d.WeakMap,te=L(Zt)&&/native code/.test(String(Zt)),ee=st("keys"),ne=function(t){return ee[t]||(ee[t]=gt(t))},re={},oe="Object already initialized",ie=d.TypeError,ue=d.WeakMap;if(te||ct.state){var ae=ct.state||(ct.state=new ue);ae.get=ae.get,ae.has=ae.has,ae.set=ae.set,Xt=function(t,e){if(ae.has(t))throw new ie(oe);return e.facade=t,ae.set(t,e),e},Yt=function(t){return ae.get(t)||{}},Jt=function(t){return ae.has(t)}}else{var ce=ne("state");re[ce]=!0,Xt=function(t,e){if(pt(t,ce))throw new ie(oe);return e.facade=t,Ut(t,ce,e),e},Yt=function(t){return pt(t,ce)?t[ce]:{}},Jt=function(t){return pt(t,ce)}}var se={set:Xt,get:Yt,has:Jt,enforce:function(t){return Jt(t)?Yt(t):Xt(t,{})},getterFor:function(t){return function(e){var n;if(!z(e)||(n=Yt(e)).type!==t)throw new ie("Incompatible receiver, "+t+" required");return n}}},fe=c((function(t){var e=qt.CONFIGURABLE,n=se.enforce,r=se.get,o=String,i=Object.defineProperty,u=I("".slice),a=I("".replace),c=I([].join),s=v&&!p((function(){return 8!==i((function(){}),"length",{value:8}).length})),f=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),(!pt(t,"name")||e&&t.name!==r)&&(v?i(t,"name",{value:r,configurable:!0}):t.name=r),s&&l&&pt(l,"arity")&&t.length!==l.arity&&i(t,"length",{value:l.arity});try{l&&pt(l,"constructor")&&l.constructor?v&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var d=n(t);return pt(d,"source")||(d.source=c(f,"string"==typeof r?r:"")),t};Function.prototype.toString=l((function(){return L(this)&&r(this).source||Qt(this)}),"toString")})),le=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(L(n)&&fe(n,i,r),r.global)o?t[e]=n:at(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Bt.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},de=Math.ceil,pe=Math.floor,ve=Math.trunc||function(t){var e=+t;return(e>0?pe:de)(e)},he=function(t){var e=+t;return e!=e||0===e?0:ve(e)},ye=Math.max,ge=Math.min,me=function(t,e){var n=he(t);return n<0?ye(n+e,0):ge(n,e)},be=Math.min,we=function(t){var e=he(t);return e>0?be(e,9007199254740991):0},Se=function(t){return we(t.length)},Ee=function(t){return function(e,n,r){var o=D(e),i=Se(o);if(0===i)return!t&&-1;var u,a=me(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}},Oe={includes:Ee(!0),indexOf:Ee(!1)},xe=Oe.indexOf,Ie=I([].push),je=function(t,e){var n,r=D(t),o=0,i=[];for(n in r)!pt(re,n)&&pt(r,n)&&Ie(i,n);for(;e.length>o;)pt(r,n=e[o++])&&(~xe(i,n)||Ie(i,n));return i},Te=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Pe=Te.concat("length","prototype"),Me={f:Object.getOwnPropertyNames||function(t){return je(t,Pe)}},Ae={f:Object.getOwnPropertySymbols},Ne=I([].concat),Re=F("Reflect","ownKeys")||function(t){var e=Me.f(Dt(t)),n=Ae.f;return n?Ne(e,n(t)):e},Ce=function(t,e,n){for(var r=Re(e),o=Bt.f,i=Nt.f,u=0;u<r.length;u++){var a=r[u];pt(t,a)||n&&pt(n,a)||o(t,a,i(e,a))}},ke=/#|\.prototype\./,De=function(t,e){var n=Le[Ve(t)];return n===Fe||n!==ze&&(L(e)?p(e):!!e)},Ve=De.normalize=function(t){return String(t).replace(ke,".").toLowerCase()},Le=De.data={},ze=De.NATIVE="N",Fe=De.POLYFILL="P",_e=De,$e=Nt.f,Be=function(t,e){var n,r,o,i,u,a=t.target,c=t.global,s=t.stat;if(n=c?d:s?d[a]||at(a,{}):d[a]&&d[a].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=$e(n,r))&&u.value:n[r],!_e(c?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ce(i,o)}(t.sham||o&&o.sham)&&Ut(i,"sham",!0),le(n,r,i,t)}},Ue=Array.isArray||function(t){return"Array"===P(t)},He=TypeError,We=function(t){if(t>9007199254740991)throw He("Maximum allowed index exceeded");return t},Ge=function(t,e,n){v?Bt.f(t,e,S(0,n)):t[e]=n},qe={};qe[St("toStringTag")]="z";var Ke="[object z]"===String(qe),Xe=St("toStringTag"),Ye=Object,Je="Arguments"===P(function(){return arguments}()),Qe=Ke?P: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=Ye(t),Xe))?n:Je?P(e):"Object"===(r=P(e))&&L(e.callee)?"Arguments":r},Ze=function(){},tn=F("Reflect","construct"),en=/^\s*(?:class|function)\b/,nn=I(en.exec),rn=!en.test(Ze),on=function(t){if(!L(t))return!1;try{return tn(Ze,[],t),!0}catch(t){return!1}},un=function(t){if(!L(t))return!1;switch(Qe(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return rn||!!nn(en,Qt(t))}catch(t){return!0}};un.sham=!0;var an=!tn||p((function(){var t;return on(on.call)||!on(Object)||!on((function(){t=!0}))||t}))?un:on,cn=St("species"),sn=Array,fn=function(t,e){return new(function(t){var e;return Ue(t)&&(e=t.constructor,(an(e)&&(e===sn||Ue(e.prototype))||z(e)&&null===(e=e[cn]))&&(e=void 0)),void 0===e?sn:e}(t))(0===e?0:e)},ln=St("species"),dn=function(t){return K>=51||!p((function(){var e=[];return(e.constructor={})[ln]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},pn=St("isConcatSpreadable"),vn=K>=51||!p((function(){var t=[];return t[pn]=!1,t.concat()[0]!==t})),hn=function(t){if(!z(t))return!1;var e=t[pn];return void 0!==e?!!e:Ue(t)},yn=!vn||!dn("concat");Be({target:"Array",proto:!0,arity:1,forced:yn},{concat:function(t){var e,n,r,o,i,u=lt(this),a=fn(u,0),c=0;for(e=-1,r=arguments.length;e<r;e++)if(hn(i=-1===e?u:arguments[e]))for(o=Se(i),We(c+o),n=0;n<o;n++,c++)n in i&&Ge(a,c,i[n]);else We(c+1),Ge(a,c++,i);return a.length=c,a}});var gn,mn=String,bn=function(t){if("Symbol"===Qe(t))throw new TypeError("Cannot convert a Symbol value to a string");return mn(t)},wn="\t\n\v\f\r                 \u2028\u2029\ufeff",Sn=I("".replace),En=RegExp("^["+wn+"]+"),On=RegExp("(^|[^"+wn+"])["+wn+"]+$"),xn=function(t){return function(e){var n=bn(k(e));return 1&t&&(n=Sn(n,En,"")),2&t&&(n=Sn(n,On,"$1")),n}},In={start:xn(1),end:xn(2),trim:xn(3)},jn=qt.PROPER,Tn=In.trim;function Pn(t){return t.length?t[0].tagName.toLowerCase():""}function Mn(t,e,n,r){void 0===e&&(e="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=u.default(t),i=r.width,a=void 0===i?"":i,c=r.height,s=void 0===c?"":c,f="";return a&&(f+="width: ".concat(a,";")),s&&(f+="height: ".concat(s,";")),o.attr("width",e),o.attr("height",n),o.attr("style",f),o[0].outerHTML}Be({target:"String",proto:!0,forced:(gn="trim",p((function(){return!!wn[gn]()||"​…᠎"!=="​…᠎"[gn]()||jn&&wn[gn].name!==gn})))},{trim:function(){return Tn(this)}}),Be({global:!0,forced:d.globalThis!==d},{globalThis:d}),e.append&&(u.default.fn.append=e.append),e.on&&(u.default.fn.on=e.on),e.focus&&(u.default.fn.focus=e.focus),e.attr&&(u.default.fn.attr=e.attr),e.val&&(u.default.fn.val=e.val),e.html&&(u.default.fn.html=e.html),e.parent&&(u.default.fn.parent=e.parent),e.hasClass&&(u.default.fn.hasClass=e.hasClass),e.empty&&(u.default.fn.empty=e.empty);var An={type:"video",elemToHtml:function(t,e){var n=t,r=n.src,o=void 0===r?"":r,i=n.poster,u=void 0===i?"":i,a=n.width,c=void 0===a?"auto":a,s=n.height,f=void 0===s?"auto":s,l=n.style,d=void 0===l?{}:l,p=n.textAlign,v='<div data-w-e-type="video" data-w-e-is-void style="text-align: '.concat(void 0===p?"center":p,';">\n');if(0===o.trim().indexOf("<iframe ")){v+=Mn(o,c,f,d)}else{var h=d.width,y=void 0===h?"":h,g=d.height,m=void 0===g?"":g,b="";y&&(b+="width: ".concat(y,";")),m&&(b+="height: ".concat(m,";")),v+='<video poster="'.concat(u,'" controls="true" width="').concat(c,'" height="').concat(f,'" style="').concat(b,'"><source src="').concat(o,'" type="video/mp4"/></video>')}return v+="\n</div>"}},Nn=function(t,e,n){return n.get&&fe(n.get,e,{getter:!0}),n.set&&fe(n.set,e,{setter:!0}),Bt.f(t,e,n)},Rn=qt.EXISTS,Cn=Function.prototype,kn=I(Cn.toString),Dn=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Vn=I(Dn.exec);v&&!Rn&&Nn(Cn,"name",{configurable:!0,get:function(){try{return Vn(Dn,kn(this))[1]}catch(t){return""}}});var Ln,zn=function(t){if("Function"===P(t))return I(t)},Fn=zn(zn.bind),_n=function(t,e){return rt(t),void 0===e?t:h?Fn(t,e):function(){return t.apply(e,arguments)}},$n=I([].push),Bn=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,s,f,l){for(var d,p,v=lt(c),h=N(v),y=Se(h),g=_n(s,f),m=0,b=l||fn,w=e?b(c,y):n||u?b(c,0):void 0;y>m;m++)if((a||m in h)&&(p=g(d=h[m],m,v),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return m;case 2:$n(w,d)}else switch(t){case 4:return!1;case 7:$n(w,d)}return i?-1:r||o?o:w}},Un={forEach:Bn(0),map:Bn(1),filter:Bn(2),some:Bn(3),every:Bn(4),find:Bn(5),findIndex:Bn(6),filterReject:Bn(7)},Hn=Object.keys||function(t){return je(t,Te)},Wn=v&&!Rt?Object.defineProperties:function(t,e){Dt(t);for(var n,r=D(e),o=Hn(e),i=o.length,u=0;i>u;)Bt.f(t,n=o[u++],r[n]);return t},Gn={f:Wn},qn=F("document","documentElement"),Kn="prototype",Xn="script",Yn=ne("IE_PROTO"),Jn=function(){},Qn=function(t){return"<"+Xn+">"+t+"</"+Xn+">"},Zn=function(t){t.write(Qn("")),t.close();var e=t.parentWindow.Object;return t=null,e},tr=function(){try{Ln=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;tr="undefined"!=typeof document?document.domain&&Ln?Zn(Ln):(e=Pt("iframe"),n="java"+Xn+":",e.style.display="none",qn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(Qn("document.F=Object")),t.close(),t.F):Zn(Ln);for(var r=Te.length;r--;)delete tr[Kn][Te[r]];return tr()};re[Yn]=!0;var er=Object.create||function(t,e){var n;return null!==t?(Jn[Kn]=Dt(t),n=new Jn,Jn[Kn]=null,n[Yn]=t):n=tr(),void 0===e?n:Gn.f(n,e)},nr=Bt.f,rr=St("unscopables"),or=Array.prototype;void 0===or[rr]&&nr(or,rr,{configurable:!0,value:er(null)});var ir=function(t){or[rr][t]=!0},ur=Un.find,ar="find",cr=!0;ar in[]&&Array(1)[ar]((function(){cr=!1})),Be({target:"Array",proto:!0,forced:cr},{find:function(t){return ur(this,t,arguments.length>1?arguments[1]:void 0)}}),ir(ar);var sr=Ke?{}.toString:function(){return"[object "+Qe(this)+"]"};Ke||le(Object.prototype,"toString",sr,{unsafe:!0});var fr,lr,dr=function(){var t=Dt(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},pr=d.RegExp,vr=p((function(){var t=pr("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),hr=vr||p((function(){return!pr("a","y").sticky})),yr={BROKEN_CARET:vr||p((function(){var t=pr("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:hr,UNSUPPORTED_Y:vr},gr=d.RegExp,mr=p((function(){var t=gr(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),br=d.RegExp,wr=p((function(){var t=br("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Sr=se.get,Er=st("native-string-replace",String.prototype.replace),Or=RegExp.prototype.exec,xr=Or,Ir=I("".charAt),jr=I("".indexOf),Tr=I("".replace),Pr=I("".slice),Mr=(lr=/b*/g,g(Or,fr=/a/,"a"),g(Or,lr,"a"),0!==fr.lastIndex||0!==lr.lastIndex),Ar=yr.BROKEN_CARET,Nr=void 0!==/()??/.exec("")[1];(Mr||Nr||Ar||mr||wr)&&(xr=function(t){var e,n,r,o,i,u,a,c=this,s=Sr(c),f=bn(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=g(xr,l,f),c.lastIndex=l.lastIndex,e;var d=s.groups,p=Ar&&c.sticky,v=g(dr,c),h=c.source,y=0,m=f;if(p&&(v=Tr(v,"y",""),-1===jr(v,"g")&&(v+="g"),m=Pr(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Ir(f,c.lastIndex-1))&&(h="(?: "+h+")",m=" "+m,y++),n=new RegExp("^(?:"+h+")",v)),Nr&&(n=new RegExp("^"+h+"$(?!\\s)",v)),Mr&&(r=c.lastIndex),o=g(Or,p?n:c,m),p?o?(o.input=Pr(o.input,y),o[0]=Pr(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Mr&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),Nr&&o&&o.length>1&&g(Er,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=u=er(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var Rr=xr;Be({target:"RegExp",proto:!0,forced:/./.exec!==Rr},{exec:Rr});var Cr=function(){return Cr=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},Cr.apply(this,arguments)};function kr(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 Dr(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 Vr(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 Lr(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}function zr(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=Vr(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 Fr=Function.prototype,_r=Fr.apply,$r=Fr.call,Br="object"==typeof Reflect&&Reflect.apply||(h?$r.bind(_r):function(){return $r.apply(_r,arguments)}),Ur=St("species"),Hr=RegExp.prototype,Wr=I("".charAt),Gr=I("".charCodeAt),qr=I("".slice),Kr=function(t){return function(e,n){var r,o,i=bn(k(e)),u=he(n),a=i.length;return u<0||u>=a?t?"":void 0:(r=Gr(i,u))<55296||r>56319||u+1===a||(o=Gr(i,u+1))<56320||o>57343?t?Wr(i,u):r:t?qr(i,u,u+2):o-56320+(r-55296<<10)+65536}},Xr={codeAt:Kr(!1),charAt:Kr(!0)},Yr=Xr.charAt,Jr=function(t,e,n){return e+(n?Yr(t,e).length:1)},Qr=Math.floor,Zr=I("".charAt),to=I("".replace),eo=I("".slice),no=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ro=/\$([$&'`]|\d{1,2})/g,oo=function(t,e,n,r,o,i){var u=n+t.length,a=r.length,c=ro;return void 0!==o&&(o=lt(o),c=no),to(i,c,(function(i,c){var s;switch(Zr(c,0)){case"$":return"$";case"&":return t;case"`":return eo(e,0,n);case"'":return eo(e,u);case"<":s=o[eo(c,1,-1)];break;default:var f=+c;if(0===f)return i;if(f>a){var l=Qr(f/10);return 0===l?i:l<=a?void 0===r[l-1]?Zr(c,1):r[l-1]+Zr(c,1):i}s=r[f-1]}return void 0===s?"":s}))},io=TypeError,uo=function(t,e){var n=t.exec;if(L(n)){var r=g(n,t,e);return null!==r&&Dt(r),r}if("RegExp"===P(t))return g(Rr,t,e);throw new io("RegExp#exec called on incompatible receiver")},ao=St("replace"),co=Math.max,so=Math.min,fo=I([].concat),lo=I([].push),po=I("".indexOf),vo=I("".slice),ho="$0"==="a".replace(/./,"$0"),yo=!!/./[ao]&&""===/./[ao]("a","$0");!function(t,e,n,r){var o=St(t),i=!p((function(){var e={};return e[o]=function(){return 7},7!==""[t](e)})),u=i&&!p((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[Ur]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!u||n){var a=/./[o],c=e(o,""[t],(function(t,e,n,r,o){var u=e.exec;return u===Rr||u===Hr.exec?i&&!o?{done:!0,value:g(a,e,n,r)}:{done:!0,value:g(t,n,e,r)}:{done:!1}}));le(String.prototype,t,c[0]),le(Hr,o,c[1])}r&&Ut(Hr[o],"sham",!0)}("replace",(function(t,e,n){var r=yo?"$":"$0";return[function(t,n){var r=k(this),o=R(t)?void 0:ot(t,ao);return o?g(o,t,r,n):g(e,bn(r),t,n)},function(t,o){var i=Dt(this),u=bn(t);if("string"==typeof o&&-1===po(o,r)&&-1===po(o,"$<")){var a=n(e,i,u,o);if(a.done)return a.value}var c=L(o);c||(o=bn(o));var s,f=i.global;f&&(s=i.unicode,i.lastIndex=0);for(var l,d=[];null!==(l=uo(i,u))&&(lo(d,l),f);){""===bn(l[0])&&(i.lastIndex=Jr(u,we(i.lastIndex),s))}for(var p,v="",h=0,y=0;y<d.length;y++){for(var g,m=bn((l=d[y])[0]),b=co(so(he(l.index),u.length),0),w=[],S=1;S<l.length;S++)lo(w,void 0===(p=l[S])?p:String(p));var E=l.groups;if(c){var O=fo([m],w,b,u);void 0!==E&&lo(O,E),g=bn(Br(o,void 0,O))}else g=oo(m,u,b,w,E,o);b>=h&&(v+=vo(u,h,b)+g,h=b+m.length)}return v+vo(u,h)}]}),!!p((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!ho||yo);var go={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},mo=Pt("span").classList,bo=mo&&mo.constructor&&mo.constructor.prototype,wo=bo===Object.prototype?void 0:bo,So=function(t,e){var n=[][t];return!!n&&p((function(){n.call(null,e||function(){return 1},1)}))},Eo=Un.forEach,Oo=So("forEach")?[].forEach:function(t){return Eo(this,t,arguments.length>1?arguments[1]:void 0)},xo=function(t){if(t&&t.forEach!==Oo)try{Ut(t,"forEach",Oo)}catch(e){t.forEach=Oo}};for(var Io in go)go[Io]&&xo(d[Io]&&d[Io].prototype);function jo(t){return void 0===t&&(t="r"),"".concat(t,"-").concat(r.nanoid())}function To(t){var e={};return t.trim().split(";").forEach((function(t){if(t){var n=Lr(t.split(":"),2),r=n[0],o=n[1];r&&o&&(e[r.trim()]=o.trim())}})),e}function Po(){return jo("w-e-insert-video")}xo(wo);var Mo=function(){function e(){this.title=t.t("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=Po(),this.heightInputId=Po(),this.buttonId=Po()}return e.prototype.getSelectedVideoNode=function(e){return t.DomEditor.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,e){},e.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},e.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},e.prototype.getModalContentElem=function(e){var r=this,o=r.widthInputId,i=r.heightInputId,a=r.buttonId,c=Lr(t.genModalInputElems(t.t("videoModule.width"),o,"auto"),2),s=c[0],f=c[1],l=u.default(f),d=Lr(t.genModalInputElems(t.t("videoModule.height"),i,"auto"),2),p=d[0],v=d[1],h=u.default(v),y=Lr(t.genModalButtonElems(a,t.t("videoModule.ok")),1)[0],g=this.getSelectedVideoNode(e);if(null==this.$content){var m=u.default("<div></div>");m.on("click","#".concat(a),(function(r){r.preventDefault();var u=m.find("#".concat(o)).val().trim(),a=m.find("#".concat(i)).val().trim(),c=function(t){return/^\d+(\.\d+)?%$/.test(t)},s=function(t){return/^\d+(\.\d+)?$/.test(t)},f="auto",l="auto";c(u)?f=u:s(u)&&(f="".concat(parseInt(u,10),"px")),c(a)?l=a:s(a)&&(l="".concat(parseInt(a,10),"px"));var d=g.style,p=void 0===d?{}:d;e.restoreSelection();var v={style:Cr(Cr({},p),{width:f,height:l})};n.Transforms.setNodes(e,v,{match:function(e){return t.DomEditor.checkNodeType(e,"video")}}),e.hidePanelOrModal()})),this.$content=m}var b=this.$content;if(b.empty(),b.append(s),b.append(p),b.append(y),null==g)return b[0];var w=g.style,S=void 0===w?{}:w,E=S.width,O=void 0===E?"":E,x=S.height,I=void 0===x?"":x;return l.val(O),h.val(I),setTimeout((function(){l.focus()})),b[0]},e}();function Ao(){return jo("w-e-edit-video")}var No,Ro,Co,ko,Do=function(){function e(){this.title=t.t("videoModule.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=Ao(),this.posterInputId=Ao(),this.buttonId=Ao()}return e.prototype.getSelectedVideoNode=function(e){return t.DomEditor.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,e){},e.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},e.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},e.prototype.getModalContentElem=function(e){var r=this,o=this,i=o.srcInputId,a=o.posterInputId,c=o.buttonId,s=Lr(t.genModalInputElems(t.t("videoModule.videoSrc"),i,t.t("videoModule.videoSrcPlaceHolder")),2),f=s[0],l=s[1],d=Lr(t.genModalInputElems(t.t("videoModule.videoPoster"),a,t.t("videoModule.videoPosterPlaceHolder")),2),p=d[0],v=d[1],h=u.default(l),y=u.default(v),g=Lr(t.genModalButtonElems(c,t.t("videoModule.ok")),1)[0];if(null==this.$content){var m=u.default("<div></div>");m.on("click","#".concat(c),(function(o){return kr(r,void 0,void 0,(function(){var r,u,c,s;return Dr(this,(function(f){return o.preventDefault(),r=m.find("#".concat(i)).val().trim(),u=m.find("#".concat(a)).val().trim(),c=jo("video-"),s={src:r,poster:u,key:c},e.restoreSelection(),n.Transforms.setNodes(e,s,{match:function(e){return t.DomEditor.checkNodeType(e,"video")}}),e.hidePanelOrModal(),[2]}))}))})),this.$content=m}var b=this.$content;b.empty(),b.append(f),b.append(p),b.append(g);var w=this.getSelectedVideoNode(e);if(null==w)return b[0];var S=w.src,E=void 0===S?"":S,O=w.poster,x=void 0===O?"":O;return h.val(E),y.val(x),setTimeout((function(){h.focus()})),b[0]},e}(),Vo=function(t){return U.slice(0,t.length)===t},Lo=Vo("Bun/")?"BUN":Vo("Cloudflare-Workers")?"CLOUDFLARE":Vo("Deno/")?"DENO":Vo("Node.js/")?"NODE":d.Bun&&"string"==typeof Bun.version?"BUN":d.Deno&&"object"==typeof Deno.version?"DENO":"process"===P(d.process)?"NODE":d.window&&d.document?"BROWSER":"REST",zo="NODE"===Lo,Fo=String,_o=TypeError,$o=function(t){if(function(t){return z(t)||null===t}(t))return t;throw new _o("Can't set "+Fo(t)+" as a prototype")},Bo=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=function(t,e,n){try{return I(rt(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return k(n),$o(r),z(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),Uo=Bt.f,Ho=St("toStringTag"),Wo=function(t,e,n){t&&!n&&(t=t.prototype),t&&!pt(t,Ho)&&Uo(t,Ho,{configurable:!0,value:e})},Go=St("species"),qo=TypeError,Ko=function(t,e){if(_(e,t))return t;throw new qo("Incorrect invocation")},Xo=TypeError,Yo=St("species"),Jo=function(t,e){var n,r=Dt(t).constructor;return void 0===r||R(n=Dt(r)[Yo])?e:function(t){if(an(t))return t;throw new Xo(et(t)+" is not a constructor")}(n)},Qo=I([].slice),Zo=TypeError,ti=/(?:ipad|iphone|ipod).*applewebkit/i.test(U),ei=d.setImmediate,ni=d.clearImmediate,ri=d.process,oi=d.Dispatch,ii=d.Function,ui=d.MessageChannel,ai=d.String,ci=0,si={},fi="onreadystatechange";p((function(){No=d.location}));var li=function(t){if(pt(si,t)){var e=si[t];delete si[t],e()}},di=function(t){return function(){li(t)}},pi=function(t){li(t.data)},vi=function(t){d.postMessage(ai(t),No.protocol+"//"+No.host)};ei&&ni||(ei=function(t){!function(t,e){if(t<e)throw new Zo("Not enough arguments")}(arguments.length,1);var e=L(t)?t:ii(t),n=Qo(arguments,1);return si[++ci]=function(){Br(e,void 0,n)},Ro(ci),ci},ni=function(t){delete si[t]},zo?Ro=function(t){ri.nextTick(di(t))}:oi&&oi.now?Ro=function(t){oi.now(di(t))}:ui&&!ti?(ko=(Co=new ui).port2,Co.port1.onmessage=pi,Ro=_n(ko.postMessage,ko)):d.addEventListener&&L(d.postMessage)&&!d.importScripts&&No&&"file:"!==No.protocol&&!p(vi)?(Ro=vi,d.addEventListener("message",pi,!1)):Ro=fi in Pt("script")?function(t){qn.appendChild(Pt("script"))[fi]=function(){qn.removeChild(this),li(t)}}:function(t){setTimeout(di(t),0)});var hi={set:ei,clear:ni},yi=Object.getOwnPropertyDescriptor,gi=function(){this.head=null,this.tail=null};gi.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 mi,bi,wi,Si,Ei,Oi=gi,xi=/ipad|iphone|ipod/i.test(U)&&"undefined"!=typeof Pebble,Ii=/web0s(?!.*chrome)/i.test(U),ji=hi.set,Ti=d.MutationObserver||d.WebKitMutationObserver,Pi=d.document,Mi=d.process,Ai=d.Promise,Ni=function(t){if(!v)return d[t];var e=yi(d,t);return e&&e.value}("queueMicrotask");if(!Ni){var Ri=new Oi,Ci=function(){var t,e;for(zo&&(t=Mi.domain)&&t.exit();e=Ri.get();)try{e()}catch(t){throw Ri.head&&mi(),t}t&&t.enter()};ti||zo||Ii||!Ti||!Pi?!xi&&Ai&&Ai.resolve?((Si=Ai.resolve(void 0)).constructor=Ai,Ei=_n(Si.then,Si),mi=function(){Ei(Ci)}):zo?mi=function(){Mi.nextTick(Ci)}:(ji=_n(ji,d),mi=function(){ji(Ci)}):(bi=!0,wi=Pi.createTextNode(""),new Ti(Ci).observe(wi,{characterData:!0}),mi=function(){wi.data=bi=!bi}),Ni=function(t){Ri.head||mi(),Ri.add(t)}}var ki=Ni,Di=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Vi=d.Promise;Vi&&Vi.prototype;var Li,zi,Fi,_i,$i=St("species"),Bi=!1,Ui=L(d.PromiseRejectionEvent),Hi=_e("Promise",(function(){var t=Qt(Vi),e=t!==String(Vi);if(!e&&66===K)return!0;if(!K||K<51||!/native code/.test(t)){var n=new Vi((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[$i]=r,!(Bi=n.then((function(){}))instanceof r))return!0}return!(e||"BROWSER"!==Lo&&"DENO"!==Lo||Ui)})),Wi={CONSTRUCTOR:Hi,REJECTION_EVENT:Ui,SUBCLASSING:Bi},Gi=TypeError,qi=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new Gi("Bad Promise constructor");e=t,n=r})),this.resolve=rt(e),this.reject=rt(n)},Ki={f:function(t){return new qi(t)}},Xi=hi.set,Yi="Promise",Ji=Wi.CONSTRUCTOR,Qi=Wi.REJECTION_EVENT,Zi=Wi.SUBCLASSING,tu=se.getterFor(Yi),eu=se.set,nu=Vi&&Vi.prototype,ru=Vi,ou=nu,iu=d.TypeError,uu=d.document,au=d.process,cu=Ki.f,su=cu,fu=!!(uu&&uu.createEvent&&d.dispatchEvent),lu="unhandledrejection",du=function(t){var e;return!(!z(t)||!L(e=t.then))&&e},pu=function(t,e){var n,r,o,i=e.value,u=1===e.state,a=u?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{a?(u||(2===e.rejection&&mu(e),e.rejection=1),!0===a?n=i:(f&&f.enter(),n=a(i),f&&(f.exit(),o=!0)),n===t.promise?s(new iu("Promise-chain cycle")):(r=du(n))?g(r,n,c,s):c(n)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},vu=function(t,e){t.notified||(t.notified=!0,ki((function(){for(var n,r=t.reactions;n=r.get();)pu(n,t);t.notified=!1,e&&!t.rejection&&yu(t)})))},hu=function(t,e,n){var r,o;fu?((r=uu.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),d.dispatchEvent(r)):r={promise:e,reason:n},!Qi&&(o=d["on"+t])?o(r):t===lu&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",n)},yu=function(t){g(Xi,d,(function(){var e,n=t.facade,r=t.value;if(gu(t)&&(e=Di((function(){zo?au.emit("unhandledRejection",r,n):hu(lu,n,r)})),t.rejection=zo||gu(t)?2:1,e.error))throw e.value}))},gu=function(t){return 1!==t.rejection&&!t.parent},mu=function(t){g(Xi,d,(function(){var e=t.facade;zo?au.emit("rejectionHandled",e):hu("rejectionhandled",e,t.value)}))},bu=function(t,e,n){return function(r){t(e,r,n)}},wu=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,vu(t,!0))},Su=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new iu("Promise can't be resolved itself");var r=du(e);r?ki((function(){var n={done:!1};try{g(r,e,bu(Su,n,t),bu(wu,n,t))}catch(e){wu(n,e,t)}})):(t.value=e,t.state=1,vu(t,!1))}catch(e){wu({done:!1},e,t)}}};if(Ji&&(ou=(ru=function(t){Ko(this,ou),rt(t),g(Li,this);var e=tu(this);try{t(bu(Su,e),bu(wu,e))}catch(t){wu(e,t)}}).prototype,(Li=function(t){eu(this,{type:Yi,done:!1,notified:!1,parent:!1,reactions:new Oi,rejection:!1,state:0,value:null})}).prototype=le(ou,"then",(function(t,e){var n=tu(this),r=cu(Jo(this,ru));return n.parent=!0,r.ok=!L(t)||t,r.fail=L(e)&&e,r.domain=zo?au.domain:void 0,0===n.state?n.reactions.add(r):ki((function(){pu(r,n)})),r.promise})),zi=function(){var t=new Li,e=tu(t);this.promise=t,this.resolve=bu(Su,e),this.reject=bu(wu,e)},Ki.f=cu=function(t){return t===ru||undefined===t?new zi(t):su(t)},L(Vi)&&nu!==Object.prototype)){Fi=nu.then,Zi||le(nu,"then",(function(t,e){var n=this;return new ru((function(t,e){g(Fi,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete nu.constructor}catch(t){}Bo&&Bo(nu,ou)}Be({global:!0,constructor:!0,wrap:!0,forced:Ji},{Promise:ru}),Wo(ru,Yi,!1),_i=F(Yi),v&&_i&&!_i[Go]&&Nn(_i,Go,{configurable:!0,get:function(){return this}});var Eu={},Ou=St("iterator"),xu=Array.prototype,Iu=St("iterator"),ju=function(t){if(!R(t))return ot(t,Iu)||ot(t,"@@iterator")||Eu[Qe(t)]},Tu=TypeError,Pu=function(t,e,n){var r,o;Dt(t);try{if(!(r=ot(t,"return"))){if("throw"===e)throw n;return n}r=g(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Dt(r),n},Mu=TypeError,Au=function(t,e){this.stopped=t,this.result=e},Nu=Au.prototype,Ru=function(t,e,n){var r,o,i,u,a,c,s,f,l=n&&n.that,d=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),v=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),y=_n(e,l),m=function(t){return r&&Pu(r,"normal",t),new Au(!0,t)},b=function(t){return d?(Dt(t),h?y(t[0],t[1],m):y(t[0],t[1])):h?y(t,m):y(t)};if(p)r=t.iterator;else if(v)r=t;else{if(!(o=ju(t)))throw new Mu(et(t)+" is not iterable");if(void 0!==(f=o)&&(Eu.Array===f||xu[Ou]===f)){for(i=0,u=Se(t);u>i;i++)if((a=b(t[i]))&&_(Nu,a))return a;return new Au(!1)}r=function(t,e){var n=arguments.length<2?ju(t):e;if(rt(n))return Dt(g(n,t));throw new Tu(et(t)+" is not iterable")}(t,o)}for(c=p?t.next:r.next;!(s=g(c,r)).done;){try{a=b(s.value)}catch(t){Pu(r,"throw",t)}if("object"==typeof a&&a&&_(Nu,a))return a}return new Au(!1)},Cu=St("iterator"),ku=!1;try{var Du=0,Vu={next:function(){return{done:!!Du++}},return:function(){ku=!0}};Vu[Cu]=function(){return this},Array.from(Vu,(function(){throw 2}))}catch(t){}var Lu=function(t,e){try{if(!e&&!ku)return!1}catch(t){return!1}var n=!1;try{var r={};r[Cu]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},zu=Wi.CONSTRUCTOR||!Lu((function(t){Vi.all(t).then(void 0,(function(){}))}));Be({target:"Promise",stat:!0,forced:zu},{all:function(t){var e=this,n=Ki.f(e),r=n.resolve,o=n.reject,i=Di((function(){var n=rt(e.resolve),i=[],u=0,a=1;Ru(t,(function(t){var c=u++,s=!1;a++,g(n,e,t).then((function(t){s||(s=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise}});var Fu=Wi.CONSTRUCTOR,_u=Vi&&Vi.prototype;if(Be({target:"Promise",proto:!0,forced:Fu,real:!0},{catch:function(t){return this.then(void 0,t)}}),L(Vi)){var $u=F("Promise").prototype.catch;_u.catch!==$u&&le(_u,"catch",$u,{unsafe:!0})}Be({target:"Promise",stat:!0,forced:zu},{race:function(t){var e=this,n=Ki.f(e),r=n.reject,o=Di((function(){var o=rt(e.resolve);Ru(t,(function(t){g(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),Be({target:"Promise",stat:!0,forced:Wi.CONSTRUCTOR},{reject:function(t){var e=Ki.f(this);return(0,e.reject)(t),e.promise}});var Bu=Wi.CONSTRUCTOR;function Uu(e,r,o,i,u){return void 0===o&&(o=""),void 0===i&&(i=""),void 0===u&&(u=""),kr(this,void 0,void 0,(function(){var a,c,s,f,l,d,p;return Dr(this,(function(v){switch(v.label){case 0:return r?(e.restoreSelection(),a=e.getMenuConfig("insertVideo"),c=a.onInsertedVideo,s=a.checkVideo,f=a.parseVideoSrc,[4,s(r,o)]):[2];case 1:return"string"==typeof(l=v.sent())?(e.alert(l,"error"),[2]):null==l?[2]:[4,f(r)];case 2:return 0!==(d=v.sent()).trim().indexOf("<iframe ")&&(d=d.replace(/</g,"&lt;").replace(/>/g,"&gt;")),p={type:"video",src:d,poster:o,children:[{text:""}],style:{width:i,height:u}},Promise.resolve().then((function(){t.DomEditor.isSelectedEmptyParagraph(e)&&n.Transforms.removeNodes(e,{mode:"highest"}),n.Transforms.insertNodes(e,p,{mode:"highest"})})),c(p),[2]}}))}))}function Hu(){return jo("w-e-insert-video")}F("Promise"),Be({target:"Promise",stat:!0,forced:Bu},{resolve:function(t){return function(t,e){if(Dt(t),z(e)&&e.constructor===t)return e;var n=Ki.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var Wu=function(){function e(){this.title=t.t("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=Hu(),this.posterInputId=Hu(),this.buttonId=Hu()}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,e){},e.prototype.isDisabled=function(e){var r=e.selection;return null==r||(!n.Range.isCollapsed(r)||!!t.DomEditor.getSelectedElems(e).some((function(n){var r=t.DomEditor.getNodeType(n);return"pre"===r||("list-item"===r||!!e.isVoid(n))})))},e.prototype.getModalPositionNode=function(t){return null},e.prototype.getModalContentElem=function(e){var n=this,r=this,o=r.srcInputId,i=r.posterInputId,a=r.buttonId,c=Lr(t.genModalInputElems(t.t("videoModule.videoSrc"),o,t.t("videoModule.videoSrcPlaceHolder")),2),s=c[0],f=c[1],l=Lr(t.genModalInputElems(t.t("videoModule.videoPoster"),i,t.t("videoModule.videoPosterPlaceHolder")),2),d=l[0],p=l[1],v=u.default(f),h=u.default(p),y=Lr(t.genModalButtonElems(a,t.t("videoModule.ok")),1)[0];if(null==this.$content){var g=u.default("<div></div>");g.on("click","#".concat(a),(function(t){return kr(n,void 0,void 0,(function(){var n,r;return Dr(this,(function(u){switch(u.label){case 0:return t.preventDefault(),n=g.find("#".concat(o)).val().trim(),r=g.find("#".concat(i)).val().trim(),[4,Uu(e,n,r)];case 1:return u.sent(),e.hidePanelOrModal(),[2]}}))}))})),this.$content=g}var m=this.$content;return m.empty(),m.append(s),m.append(d),m.append(y),v.val(""),h.val(""),setTimeout((function(){v.focus()})),m[0]},e}(),Gu=I([].join),qu=N!==Object||!So("join",",");Be({target:"Array",proto:!0,forced:qu},{join:function(t){return Gu(D(this),void 0===t?",":t)}});var Ku,Xu,Yu,Ju=!p((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Qu=ne("IE_PROTO"),Zu=Object,ta=Zu.prototype,ea=Ju?Zu.getPrototypeOf:function(t){var e=lt(t);if(pt(e,Qu))return e[Qu];var n=e.constructor;return L(n)&&e instanceof n?n.prototype:e instanceof Zu?ta:null},na=St("iterator"),ra=!1;[].keys&&("next"in(Yu=[].keys())?(Xu=ea(ea(Yu)))!==Object.prototype&&(Ku=Xu):ra=!0);var oa=!z(Ku)||p((function(){var t={};return Ku[na].call(t)!==t}));oa&&(Ku={}),L(Ku[na])||le(Ku,na,(function(){return this}));var ia={IteratorPrototype:Ku,BUGGY_SAFARI_ITERATORS:ra},ua=ia.IteratorPrototype,aa=function(){return this},ca=qt.PROPER,sa=qt.CONFIGURABLE,fa=ia.IteratorPrototype,la=ia.BUGGY_SAFARI_ITERATORS,da=St("iterator"),pa="keys",va="values",ha="entries",ya=function(){return this},ga=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=er(ua,{next:S(+!r,n)}),Wo(t,o,!1),Eu[o]=aa}(n,e,r);var a,c,s,f=function(t){if(t===o&&h)return h;if(!la&&t&&t in p)return p[t];switch(t){case pa:case va:case ha:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",d=!1,p=t.prototype,v=p[da]||p["@@iterator"]||o&&p[o],h=!la&&v||f(o),y="Array"===e&&p.entries||v;if(y&&(a=ea(y.call(new t)))!==Object.prototype&&a.next&&(ea(a)!==fa&&(Bo?Bo(a,fa):L(a[da])||le(a,da,ya)),Wo(a,l,!0)),ca&&o===va&&v&&v.name!==va&&(sa?Ut(p,"name",va):(d=!0,h=function(){return g(v,this)})),o)if(c={values:f(va),keys:i?h:f(pa),entries:f(ha)},u)for(s in c)(la||d||!(s in p))&&le(p,s,c[s]);else Be({target:e,proto:!0,forced:la||d},c);return p[da]!==h&&le(p,da,h,{name:o}),Eu[e]=h,c},ma=function(t,e){return{value:t,done:e}},ba=Bt.f,wa="Array Iterator",Sa=se.set,Ea=se.getterFor(wa),Oa=ga(Array,"Array",(function(t,e){Sa(this,{type:wa,target:D(t),index:0,kind:e})}),(function(){var t=Ea(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,ma(void 0,!0);switch(t.kind){case"keys":return ma(n,!1);case"values":return ma(e[n],!1)}return ma([n,e[n]],!1)}),"values"),xa=Eu.Arguments=Eu.Array;if(ir("keys"),ir("values"),ir("entries"),v&&"values"!==xa.name)try{ba(xa,"name",{value:"values"})}catch(t){}var Ia=dn("slice"),ja=St("species"),Ta=Array,Pa=Math.max;Be({target:"Array",proto:!0,forced:!Ia},{slice:function(t,e){var n,r,o,i=D(this),u=Se(i),a=me(t,u),c=me(void 0===e?u:e,u);if(Ue(i)&&(n=i.constructor,(an(n)&&(n===Ta||Ue(n.prototype))||z(n)&&null===(n=n[ja]))&&(n=void 0),n===Ta||void 0===n))return Qo(i,a,c);for(r=new(void 0===n?Ta:n)(Pa(c-a,0)),o=0;a<c;a++,o++)a in i&&Ge(r,o,i[a]);return r.length=o,r}});var Ma=Xr.charAt,Aa="String Iterator",Na=se.set,Ra=se.getterFor(Aa);ga(String,"String",(function(t){Na(this,{type:Aa,string:bn(t),index:0})}),(function(){var t,e=Ra(this),n=e.string,r=e.index;return r>=n.length?ma(void 0,!0):(t=Ma(n,r),e.index+=t.length,ma(t,!1))}));var Ca=!p((function(){return Object.isExtensible(Object.preventExtensions({}))})),ka=function(t,e,n){for(var r in e)le(t,r,e[r],n);return t},Da=Me.f,Va="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],La={f:function(t){return Va&&"Window"===P(t)?function(t){try{return Da(t)}catch(t){return Qo(Va)}}(t):Da(D(t))}},za=p((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),Fa=Object.isExtensible,_a=p((function(){Fa(1)}))||za?function(t){return!!z(t)&&((!za||"ArrayBuffer"!==P(t))&&(!Fa||Fa(t)))}:Fa,$a=c((function(t){var e=Bt.f,n=!1,r=gt("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=Me.f,e=I([].splice),o={};o[r]=1,t(o).length&&(Me.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},Be({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:La.f}))},fastKey:function(t,e){if(!z(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!pt(t,r)){if(!_a(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!pt(t,r)){if(!_a(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return Ca&&n&&_a(t)&&!pt(t,r)&&i(t),t}};re[r]=!0})),Ba=$a.getWeakData,Ua=se.set,Ha=se.getterFor,Wa=Un.find,Ga=Un.findIndex,qa=I([].splice),Ka=0,Xa=function(t){return t.frozen||(t.frozen=new Ya)},Ya=function(){this.entries=[]},Ja=function(t,e){return Wa(t.entries,(function(t){return t[0]===e}))};Ya.prototype={get:function(t){var e=Ja(this,t);if(e)return e[1]},has:function(t){return!!Ja(this,t)},set:function(t,e){var n=Ja(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Ga(this.entries,(function(e){return e[0]===t}));return~e&&qa(this.entries,e,1),!!~e}};var Qa,Za={getConstructor:function(t,e,n,r){var o=t((function(t,o){Ko(t,i),Ua(t,{type:e,id:Ka++,frozen:null}),R(o)||Ru(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=Ha(e),a=function(t,e,n){var r=u(t),o=Ba(Dt(e),!0);return!0===o?Xa(r).set(e,n):o[r.id]=n,t};return ka(i,{delete:function(t){var e=u(this);if(!z(t))return!1;var n=Ba(t);return!0===n?Xa(e).delete(t):n&&pt(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!z(t))return!1;var n=Ba(t);return!0===n?Xa(e).has(t):n&&pt(n,e.id)}}),ka(i,n?{get:function(t){var e=u(this);if(z(t)){var n=Ba(t);if(!0===n)return Xa(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}},tc=se.enforce,ec=Object,nc=Array.isArray,rc=ec.isExtensible,oc=ec.isFrozen,ic=ec.isSealed,uc=ec.freeze,ac=ec.seal,cc=!d.ActiveXObject&&"ActiveXObject"in d,sc=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},fc=function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",u=d[t],a=u&&u.prototype,c=u,s={},f=function(t){var e=I(a[t]);le(a,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!z(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!z(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!z(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(_e(t,!L(u)||!(o||a.forEach&&!p((function(){(new u).entries().next()})))))c=n.getConstructor(e,t,r,i),$a.enable();else if(_e(t,!0)){var l=new c,v=l[i](o?{}:-0,1)!==l,h=p((function(){l.has(1)})),y=Lu((function(t){new u(t)})),g=!o&&p((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));y||((c=e((function(t,e){Ko(t,a);var n=function(t,e,n){var r,o;return Bo&&L(r=e.constructor)&&r!==n&&z(o=r.prototype)&&o!==n.prototype&&Bo(t,o),t}(new u,t,c);return R(e)||Ru(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=c),(h||g)&&(f("delete"),f("has"),r&&f("get")),(g||v)&&f(i),o&&a.clear&&delete a.clear}return s[t]=c,Be({global:!0,constructor:!0,forced:c!==u},s),Wo(c,t),o||n.setStrong(c,t,r),c}("WeakMap",sc,Za),lc=fc.prototype,dc=I(lc.set);if(te)if(cc){Qa=Za.getConstructor(sc,"WeakMap",!0),$a.enable();var pc=I(lc.delete),vc=I(lc.has),hc=I(lc.get);ka(lc,{delete:function(t){if(z(t)&&!rc(t)){var e=tc(this);return e.frozen||(e.frozen=new Qa),pc(this,t)||e.frozen.delete(t)}return pc(this,t)},has:function(t){if(z(t)&&!rc(t)){var e=tc(this);return e.frozen||(e.frozen=new Qa),vc(this,t)||e.frozen.has(t)}return vc(this,t)},get:function(t){if(z(t)&&!rc(t)){var e=tc(this);return e.frozen||(e.frozen=new Qa),vc(this,t)?hc(this,t):e.frozen.get(t)}return hc(this,t)},set:function(t,e){if(z(t)&&!rc(t)){var n=tc(this);n.frozen||(n.frozen=new Qa),vc(this,t)?dc(this,t,e):n.frozen.set(t,e)}else dc(this,t,e);return this}})}else Ca&&p((function(){var t=uc([]);return dc(new fc,t,1),!oc(t)}))&&ka(lc,{set:function(t,e){var n;return nc(t)&&(oc(t)?n=uc:ic(t)&&(n=ac)),dc(this,t,e),n&&n(t),this}});var yc=St("iterator"),gc=Oa.values,mc=function(t,e){if(t){if(t[yc]!==gc)try{Ut(t,yc,gc)}catch(e){t[yc]=gc}if(Wo(t,e,!0),go[e])for(var n in Oa)if(t[n]!==Oa[n])try{Ut(t,n,Oa[n])}catch(e){t[n]=Oa[n]}}};for(var bc in go)mc(d[bc]&&d[bc].prototype,bc);function wc(t){return t.getMenuConfig("uploadVideo")}mc(wo,"DOMTokenList");var Sc=new WeakMap;function Ec(e,n){return kr(this,void 0,void 0,(function(){var r,o,i,u;return Dr(this,(function(a){switch(a.label){case 0:return r=function(e){var n=Sc.get(e);if(null!=n)return n;var r=wc(e),o=r.onSuccess,i=r.onProgress,u=r.onFailed,a=r.customInsert,c=r.onError;return n=t.createUploader(Cr(Cr({},r),{onProgress:function(t){e.showProgressBar(t),i&&i(t)},onSuccess:function(t,n){if(a)return a(n,(function(t,n){return Uu(e,t,n)})),void o(t,n);var r=n.errno,i=void 0===r?1:r,c=n.data,s=void 0===c?{}:c;if(0===i){var f=s.url,l=void 0===f?"":f,d=s.poster;Uu(e,l,void 0===d?"":d),o(t,n)}else u(t,n)},onError:function(t,e,n){c(t,e,n)}})),Sc.set(e,n),n}(e),o=n.name,i=n.type,u=n.size,r.addFile({name:o,type:i,size:u,data:n}),[4,r.upload()];case 1:return a.sent(),[2]}}))}))}var Oc=function(){function e(){this.title=t.t("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(t){return""},e.prototype.isActive=function(t){return!1},e.prototype.exec=function(t,e){var n=this.getMenuConfig(t),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i((function(e,n){return Uu(t,e,n)}));else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var c=u.default("body"),s=u.default('<input type="file" '.concat(a," multiple/>"));s.hide(),c.append(s),s.click(),s.on("change",(function(){var e=s[0].files;!function(t,e){var n,r,o,i;kr(this,void 0,void 0,(function(){var u,a,c,s,f,l,d;return Dr(this,(function(p){switch(p.label){case 0:if(null==e)return[2];u=Array.prototype.slice.call(e),a=wc(t).customUpload,p.label=1;case 1:p.trys.push([1,12,13,18]),c=!0,s=zr(u),p.label=2;case 2:return[4,s.next()];case 3:if(f=p.sent(),n=f.done)return[3,11];i=f.value,c=!1,p.label=4;case 4:return p.trys.push([4,,9,10]),l=i,a?[4,a(l,(function(e,n){return Uu(t,e,n)}))]:[3,6];case 5:return p.sent(),[3,8];case 6:return[4,Ec(t,l)];case 7:p.sent(),p.label=8;case 8:return[3,10];case 9:return c=!0,[7];case 10:return[3,2];case 11:return[3,18];case 12:return d=p.sent(),r={error:d},[3,18];case 13:return p.trys.push([13,,16,17]),c||n||!(o=s.return)?[3,15]:[4,o.call(s)];case 14:p.sent(),p.label=15;case 15:return[3,17];case 16:if(r)throw r.error;return[7];case 17:return[7];case 18:return[2]}}))}))}(t,e)}))}},e.prototype.isDisabled=function(e){var r=e.selection;return null==r||(!n.Range.isCollapsed(r)||!!t.DomEditor.getSelectedElems(e).some((function(n){var r=t.DomEditor.getNodeType(n);return"pre"===r||("list-item"===r||!!e.isVoid(n))})))},e.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadVideo")},e}(),xc={key:"insertVideo",factory:function(){return new Wu},config:{onInsertedVideo:function(t){},checkVideo:function(t,e){return!0},parseVideoSrc:function(t){return t}}},Ic={key:"uploadVideo",factory:function(){return new Oc},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,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"),e,n)}}},jc={key:"editVideoSize",factory:function(){return new Mo}},Tc={key:"editVideoSrc",factory:function(){return new Do}};function Pc(t,e,n,r,o){return void 0===e&&(e=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),{type:"video",src:t,poster:e,width:n,height:r,style:o,children:[{text:""}]}}var Mc={selector:'div[data-w-e-type="video"]',parseElemHtml:function(t,e,n){var r=u.default(t),o="",i="",a="auto",c="auto",s={},f=r.find("iframe");if(f.length>0)return a=f.attr("width")||"auto",c=f.attr("height")||"auto",s=To(s=f.attr("style")||""),Pc(o=f[0].outerHTML,i,a,c,s);var l=r.find("video");return(o=l.attr("src")||"")||l.length>0&&(o=l.find("source").attr("src")||""),a=l.attr("width")||"auto",c=l.attr("height")||"auto",Pc(o,i=l.attr("poster")||"",a,c,s=To(s=l.attr("style")||""))}};var Ac=Oe.includes,Nc=p((function(){return!Array(1).includes()}));Be({target:"Array",proto:!0,forced:Nc},{includes:function(t){return Ac(this,t,arguments.length>1?arguments[1]:void 0)}}),ir("includes");var Rc={renderElems:[{type:"video",renderElem:function(e,n,r){var i,u=e,a=u.src,c=void 0===a?"":a,s=u.poster,f=void 0===s?"":s,l=u.key,d=void 0===l?"":l,p=u.width,v=void 0===p?"auto":p,h=u.height,y=void 0===h?"auto":h,g=u.style,m=void 0===g?{}:g,b=u.textAlign,w=void 0===b?"center":b,S=t.DomEditor.isNodeSelected(r,e);if(0===c.trim().indexOf("<iframe ")){var E=Mn(c,v,y,m);i=o.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w},innerHTML:E})}else{var O=o.jsx("video",{key:d,poster:f,controls:!0,style:m},o.jsx("source",{src:c,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==v&&(O.data.width=v),"auto"!==y&&(O.data.height=y),i=o.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w}},O)}return o.h("div",{props:{contentEditable:!1},on:{mousedown:function(t){return t.preventDefault()}}},i)}}],elemsToHtml:[An],preParseHtml:[{selector:"iframe,video,p",preParseHtml:function(t){var e=u.default(t),n=e;if("p"===Pn(e)){var r=e.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=u.default(o))}}var a=Pn(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var c=u.default('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return c.append(n),c[0]}}],parseElemsHtml:[Mc],menus:[xc,Ic,jc,Tc],editorPlugin:function(e){var r=e.isVoid,o=e.normalizeNode,i=e;return i.isVoid=function(t){return"video"===t.type||r(t)},i.normalizeNode=function(e){var r=Lr(e,2),u=r[0],a=r[1];"video"===t.DomEditor.getNodeType(u)&&(t.DomEditor.isLastNode(i,u)&&n.Transforms.insertNodes(i,t.DomEditor.genEmptyParagraph(),{at:[a[0]+1]}));return o([u,a])},i}};return Rc}));
2
2
  //# sourceMappingURL=index.js.map