@wangeditor-next/video-module 1.3.8 → 1.3.9

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("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: ".concat(a,";")),s&&(f+="height: ".concat(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)}},yn=Array.isArray||function(t){return"Array"===k(t)},gn=TypeError,mn=function(t){if(t>9007199254740991)throw gn("Maximum allowed index exceeded");return t},bn=function(t,e,n){w?Kt.f(t,e,T(0,n)):t[e]=n},wn=function(){},Sn=W("Reflect","construct"),En=/^\s*(?:class|function)\b/,On=N(En.exec),xn=!En.test(wn),In=function(t){if(!U(t))return!1;try{return Sn(wn,[],t),!0}catch(t){return!1}},jn=function(t){if(!U(t))return!1;switch(en(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xn||!!On(En,oe(t))}catch(t){return!0}};jn.sham=!0;var Tn=!Sn||b((function(){var t;return In(In.call)||!In(Object)||!In((function(){t=!0}))||t}))?jn:In,Pn=Tt("species"),Mn=Array,An=function(t,e){return new(function(t){var e;return yn(t)&&(e=t.constructor,(Tn(e)&&(e===Mn||yn(e.prototype))||H(e)&&null===(e=e[Pn]))&&(e=void 0)),void 0===e?Mn:e}(t))(0===e?0:e)},Nn=Tt("species"),Rn=function(t){return tt>=51||!b((function(){var e=[];return(e.constructor={})[Nn]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Cn=Tt("isConcatSpreadable"),kn=tt>=51||!b((function(){var t=[];return t[Cn]=!1,t.concat()[0]!==t})),Dn=function(t){if(!H(t))return!1;var e=t[Cn];return void 0!==e?!!e:yn(t)},Vn=!kn||!Rn("concat");Ke({target:"Array",proto:!0,arity:1,forced:Vn},{concat:function(t){var e,n,r,o,i,u=gt(this),a=An(u,0),c=0;for(e=-1,r=arguments.length;e<r;e++)if(Dn(i=-1===e?u:arguments[e]))for(o=Te(i),mn(c+o),n=0;n<o;n++,c++)n in i&&bn(a,c,i[n]);else mn(c+1),bn(a,c++,i);return a.length=c,a}});var Ln,zn={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+=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: ".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>"}},Fn=Object.keys||function(t){return Re(t,Ce)},_n=w&&!zt?Object.defineProperties:function(t,e){$t(t);for(var n,r=$(e),o=Fn(e),i=o.length,u=0;i>u;)Kt.f(t,n=o[u++],r[n]);return t},$n={f:_n},Bn=W("document","documentElement"),Un="prototype",Hn="script",Wn=ce("IE_PROTO"),Gn=function(){},qn=function(t){return"<"+Hn+">"+t+"</"+Hn+">"},Kn=function(t){t.write(qn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Xn=function(){try{Ln=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Xn="undefined"!=typeof document?document.domain&&Ln?Kn(Ln):(e=kt("iframe"),n="java"+Hn+":",e.style.display="none",Bn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(qn("document.F=Object")),t.close(),t.F):Kn(Ln);for(var r=Ce.length;r--;)delete Xn[Un][Ce[r]];return Xn()};se[Wn]=!0;var Yn=Object.create||function(t,e){var n;return null!==t?(Gn[Un]=$t(t),n=new Gn,Gn[Un]=null,n[Wn]=t):n=Xn(),void 0===e?n:$n.f(n,e)},Jn=Kt.f,Qn=Tt("unscopables"),Zn=Array.prototype;void 0===Zn[Qn]&&Jn(Zn,Qn,{configurable:!0,value:Yn(null)});var tr=function(t){Zn[Qn][t]=!0},er=Me.includes,nr=b((function(){return!Array(1).includes()}));Ke({target:"Array",proto:!0,forced:nr},{includes:function(t){return er(this,t,arguments.length>1?arguments[1]:void 0)}}),tr("includes");var rr={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]}},or=function(t){if("Function"===k(t))return N(t)},ir=or(or.bind),ur=function(t,e){return st(t),void 0===e?t:S?ir(t,e):function(){return t.apply(e,arguments)}},ar=N([].push),cr=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=ur(s,f),m=0,b=l||An,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:ar(w,d)}else switch(t){case 4:return!1;case 7:ar(w,d)}return i?-1:r||o?o:w}},sr={forEach:cr(0),map:cr(1),filter:cr(2),some:cr(3),every:cr(4),find:cr(5),findIndex:cr(6),filterReject:cr(7)},fr=sr.find,lr="find",dr=!0;lr in[]&&Array(1)[lr]((function(){dr=!1})),Ke({target:"Array",proto:!0,forced:dr},{find:function(t){return fr(this,t,arguments.length>1?arguments[1]:void 0)}}),tr(lr);var pr=Je?{}.toString:function(){return"[object "+en(this)+"]"};Je||ge(Object.prototype,"toString",pr,{unsafe:!0});var vr,hr,yr=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},gr=m.RegExp,mr=b((function(){var t=gr("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),br=mr||b((function(){return!gr("a","y").sticky})),wr={BROKEN_CARET:mr||b((function(){var t=gr("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:br,UNSUPPORTED_Y:mr},Sr=m.RegExp,Er=b((function(){var t=Sr(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),Or=m.RegExp,xr=b((function(){var t=Or("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Ir=he.get,jr=ht("native-string-replace",String.prototype.replace),Tr=RegExp.prototype.exec,Pr=Tr,Mr=N("".charAt),Ar=N("".indexOf),Nr=N("".replace),Rr=N("".slice),Cr=(hr=/b*/g,O(Tr,vr=/a/,"a"),O(Tr,hr,"a"),0!==vr.lastIndex||0!==hr.lastIndex),kr=wr.BROKEN_CARET,Dr=void 0!==/()??/.exec("")[1];(Cr||Dr||kr||Er||xr)&&(Pr=function(t){var e,n,r,o,i,u,a,c=this,s=Ir(c),f=rn(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=O(Pr,l,f),c.lastIndex=l.lastIndex,e;var d=s.groups,p=kr&&c.sticky,v=O(yr,c),h=c.source,y=0,g=f;if(p&&(v=Nr(v,"y",""),-1===Ar(v,"g")&&(v+="g"),g=Rr(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Mr(f,c.lastIndex-1))&&(h="(?: "+h+")",g=" "+g,y++),n=new RegExp("^(?:"+h+")",v)),Dr&&(n=new RegExp("^"+h+"$(?!\\s)",v)),Cr&&(r=c.lastIndex),o=O(Tr,p?n:c,g),p?o?(o.input=Rr(o.input,y),o[0]=Rr(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Cr&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),Dr&&o&&o.length>1&&O(jr,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=Yn(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var Vr=Pr;Ke({target:"RegExp",proto:!0,forced:/./.exec!==Vr},{exec:Vr});var Lr=Function.prototype,zr=Lr.apply,Fr=Lr.call,_r="object"==typeof Reflect&&Reflect.apply||(S?Fr.bind(zr):function(){return Fr.apply(zr,arguments)}),$r=Tt("species"),Br=RegExp.prototype,Ur=N("".charAt),Hr=N("".charCodeAt),Wr=N("".slice),Gr=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=Hr(i,u))<55296||r>56319||u+1===a||(o=Hr(i,u+1))<56320||o>57343?t?Ur(i,u):r:t?Wr(i,u,u+2):o-56320+(r-55296<<10)+65536}},qr={codeAt:Gr(!1),charAt:Gr(!0)},Kr=qr.charAt,Xr=function(t,e,n){return e+(n?Kr(t,e).length:1)},Yr=Math.floor,Jr=N("".charAt),Qr=N("".replace),Zr=N("".slice),to=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,eo=/\$([$&'`]|\d{1,2})/g,no=function(t,e,n,r,o,i){var u=n+t.length,a=r.length,c=eo;return void 0!==o&&(o=gt(o),c=to),Qr(i,c,(function(i,c){var s;switch(Jr(c,0)){case"$":return"$";case"&":return t;case"`":return Zr(e,0,n);case"'":return Zr(e,u);case"<":s=o[Zr(c,1,-1)];break;default:var f=+c;if(0===f)return i;if(f>a){var l=Yr(f/10);return 0===l?i:l<=a?void 0===r[l-1]?Jr(c,1):r[l-1]+Jr(c,1):i}s=r[f-1]}return void 0===s?"":s}))},ro=TypeError,oo=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(Vr,t,e);throw new ro("RegExp#exec called on incompatible receiver")},io=Tt("replace"),uo=Math.max,ao=Math.min,co=N([].concat),so=N([].push),fo=N("".indexOf),lo=N("".slice),po="$0"==="a".replace(/./,"$0"),vo=!!/./[io]&&""===/./[io]("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[$r]=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===Vr||u===Br.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(Br,o,c[1])}r&&Xt(Br[o],"sham",!0)}("replace",(function(t,e,n){var r=vo?"$":"$0";return[function(t,n){var r=_(this),o=z(t)?void 0:ft(t,io);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===fo(o,r)&&-1===fo(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=oo(i,u))&&(so(d,l),f);){""===rn(l[0])&&(i.lastIndex=Xr(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=uo(ao(Se(l.index),u.length),0),w=[],S=1;S<l.length;S++)so(w,void 0===(p=l[S])?p:String(p));var E=l.groups;if(c){var O=co([m],w,b,u);void 0!==E&&so(O,E),g=rn(_r(o,void 0,O))}else g=no(m,u,b,w,E,o);b>=h&&(v+=lo(u,h,b)+g,h=b+m.length)}return v+lo(u,h)}]}),!!b((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!po||vo);var ho={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},yo=kt("span").classList,go=yo&&yo.constructor&&yo.constructor.prototype,mo=go===Object.prototype?void 0:go,bo=function(t,e){var n=[][t];return!!n&&b((function(){n.call(null,e||function(){return 1},1)}))},wo=sr.forEach,So=bo("forEach")?[].forEach:function(t){return wo(this,t,arguments.length>1?arguments[1]:void 0)},Eo=function(t){if(t&&t.forEach!==So)try{Xt(t,"forEach",So)}catch(e){t.forEach=So}};for(var Oo in ho)ho[Oo]&&Eo(m[Oo]&&m[Oo].prototype);function xo(t){return void 0===t&&(t="r"),"".concat(t,"-").concat(o.nanoid())}function Io(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 jo(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:""}]}}Eo(mo);var To,Po,Mo,Ao,No={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=Io(s=f.attr("style")||""),jo(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",jo(o,i=l.attr("poster")||"",a,c,s=Io(s=l.attr("style")||""))}},Ro=function(t){return X.slice(0,t.length)===t},Co=Ro("Bun/")?"BUN":Ro("Cloudflare-Workers")?"CLOUDFLARE":Ro("Deno/")?"DENO":Ro("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",ko="NODE"===Co,Do=String,Vo=TypeError,Lo=function(t){if(function(t){return H(t)||null===t}(t))return t;throw new Vo("Can't set "+Do(t)+" as a prototype")},zo=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),Lo(r),H(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),Fo=Kt.f,_o=Tt("toStringTag"),$o=function(t,e,n){t&&!n&&(t=t.prototype),t&&!bt(t,_o)&&Fo(t,_o,{configurable:!0,value:e})},Bo=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)},Uo=Tt("species"),Ho=TypeError,Wo=function(t,e){if(G(e,t))return t;throw new Ho("Incorrect invocation")},Go=TypeError,qo=Tt("species"),Ko=function(t,e){var n,r=$t(t).constructor;return void 0===r||z(n=$t(r)[qo])?e:function(t){if(Tn(t))return t;throw new Go(at(t)+" is not a constructor")}(n)},Xo=N([].slice),Yo=TypeError,Jo=/(?:ipad|iphone|ipod).*applewebkit/i.test(X),Qo=m.setImmediate,Zo=m.clearImmediate,ti=m.process,ei=m.Dispatch,ni=m.Function,ri=m.MessageChannel,oi=m.String,ii=0,ui={},ai="onreadystatechange";b((function(){To=m.location}));var ci=function(t){if(bt(ui,t)){var e=ui[t];delete ui[t],e()}},si=function(t){return function(){ci(t)}},fi=function(t){ci(t.data)},li=function(t){m.postMessage(oi(t),To.protocol+"//"+To.host)};Qo&&Zo||(Qo=function(t){!function(t,e){if(t<e)throw new Yo("Not enough arguments")}(arguments.length,1);var e=U(t)?t:ni(t),n=Xo(arguments,1);return ui[++ii]=function(){_r(e,void 0,n)},Po(ii),ii},Zo=function(t){delete ui[t]},ko?Po=function(t){ti.nextTick(si(t))}:ei&&ei.now?Po=function(t){ei.now(si(t))}:ri&&!Jo?(Ao=(Mo=new ri).port2,Mo.port1.onmessage=fi,Po=ur(Ao.postMessage,Ao)):m.addEventListener&&U(m.postMessage)&&!m.importScripts&&To&&"file:"!==To.protocol&&!b(li)?(Po=li,m.addEventListener("message",fi,!1)):Po=ai in kt("script")?function(t){Bn.appendChild(kt("script"))[ai]=function(){Bn.removeChild(this),ci(t)}}:function(t){setTimeout(si(t),0)});var di={set:Qo,clear:Zo},pi=Object.getOwnPropertyDescriptor,vi=function(){this.head=null,this.tail=null};vi.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 hi,yi,gi,mi,bi,wi=vi,Si=/ipad|iphone|ipod/i.test(X)&&"undefined"!=typeof Pebble,Ei=/web0s(?!.*chrome)/i.test(X),Oi=di.set,xi=m.MutationObserver||m.WebKitMutationObserver,Ii=m.document,ji=m.process,Ti=m.Promise,Pi=function(t){if(!w)return m[t];var e=pi(m,t);return e&&e.value}("queueMicrotask");if(!Pi){var Mi=new wi,Ai=function(){var t,e;for(ko&&(t=ji.domain)&&t.exit();e=Mi.get();)try{e()}catch(t){throw Mi.head&&hi(),t}t&&t.enter()};Jo||ko||Ei||!xi||!Ii?!Si&&Ti&&Ti.resolve?((mi=Ti.resolve(void 0)).constructor=Ti,bi=ur(mi.then,mi),hi=function(){bi(Ai)}):ko?hi=function(){ji.nextTick(Ai)}:(Oi=ur(Oi,m),hi=function(){Oi(Ai)}):(yi=!0,gi=Ii.createTextNode(""),new xi(Ai).observe(gi,{characterData:!0}),hi=function(){gi.data=yi=!yi}),Pi=function(t){Mi.head||hi(),Mi.add(t)}}var Ni=Pi,Ri=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ci=m.Promise;Ci&&Ci.prototype;var ki,Di,Vi,Li,zi=Tt("species"),Fi=!1,_i=U(m.PromiseRejectionEvent),$i=Ge("Promise",(function(){var t=oe(Ci),e=t!==String(Ci);if(!e&&66===tt)return!0;if(!tt||tt<51||!/native code/.test(t)){var n=new Ci((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[zi]=r,!(Fi=n.then((function(){}))instanceof r))return!0}return!(e||"BROWSER"!==Co&&"DENO"!==Co||_i)})),Bi={CONSTRUCTOR:$i,REJECTION_EVENT:_i,SUBCLASSING:Fi},Ui=TypeError,Hi=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new Ui("Bad Promise constructor");e=t,n=r})),this.resolve=st(e),this.reject=st(n)},Wi={f:function(t){return new Hi(t)}},Gi=di.set,qi="Promise",Ki=Bi.CONSTRUCTOR,Xi=Bi.REJECTION_EVENT,Yi=Bi.SUBCLASSING,Ji=he.getterFor(qi),Qi=he.set,Zi=Ci&&Ci.prototype,tu=Ci,eu=Zi,nu=m.TypeError,ru=m.document,ou=m.process,iu=Wi.f,uu=iu,au=!!(ru&&ru.createEvent&&m.dispatchEvent),cu="unhandledrejection",su=function(t){var e;return!(!H(t)||!U(e=t.then))&&e},fu=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&&hu(e),e.rejection=1),!0===a?n=i:(f&&f.enter(),n=a(i),f&&(f.exit(),o=!0)),n===t.promise?s(new nu("Promise-chain cycle")):(r=su(n))?O(r,n,c,s):c(n)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},lu=function(t,e){t.notified||(t.notified=!0,Ni((function(){for(var n,r=t.reactions;n=r.get();)fu(n,t);t.notified=!1,e&&!t.rejection&&pu(t)})))},du=function(t,e,n){var r,o;au?((r=ru.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),m.dispatchEvent(r)):r={promise:e,reason:n},!Xi&&(o=m["on"+t])?o(r):t===cu&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",n)},pu=function(t){O(Gi,m,(function(){var e,n=t.facade,r=t.value;if(vu(t)&&(e=Ri((function(){ko?ou.emit("unhandledRejection",r,n):du(cu,n,r)})),t.rejection=ko||vu(t)?2:1,e.error))throw e.value}))},vu=function(t){return 1!==t.rejection&&!t.parent},hu=function(t){O(Gi,m,(function(){var e=t.facade;ko?ou.emit("rejectionHandled",e):du("rejectionhandled",e,t.value)}))},yu=function(t,e,n){return function(r){t(e,r,n)}},gu=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,lu(t,!0))},mu=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new nu("Promise can't be resolved itself");var r=su(e);r?Ni((function(){var n={done:!1};try{O(r,e,yu(mu,n,t),yu(gu,n,t))}catch(e){gu(n,e,t)}})):(t.value=e,t.state=1,lu(t,!1))}catch(e){gu({done:!1},e,t)}}};if(Ki&&(eu=(tu=function(t){Wo(this,eu),st(t),O(ki,this);var e=Ji(this);try{t(yu(mu,e),yu(gu,e))}catch(t){gu(e,t)}}).prototype,(ki=function(t){Qi(this,{type:qi,done:!1,notified:!1,parent:!1,reactions:new wi,rejection:!1,state:0,value:null})}).prototype=ge(eu,"then",(function(t,e){var n=Ji(this),r=iu(Ko(this,tu));return n.parent=!0,r.ok=!U(t)||t,r.fail=U(e)&&e,r.domain=ko?ou.domain:void 0,0===n.state?n.reactions.add(r):Ni((function(){fu(r,n)})),r.promise})),Di=function(){var t=new ki,e=Ji(t);this.promise=t,this.resolve=yu(mu,e),this.reject=yu(gu,e)},Wi.f=iu=function(t){return t===tu||undefined===t?new Di(t):uu(t)},U(Ci)&&Zi!==Object.prototype)){Vi=Zi.then,Yi||ge(Zi,"then",(function(t,e){var n=this;return new tu((function(t,e){O(Vi,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Zi.constructor}catch(t){}zo&&zo(Zi,eu)}Ke({global:!0,constructor:!0,wrap:!0,forced:Ki},{Promise:tu}),$o(tu,qi,!1),Li=W(qi),w&&Li&&!Li[Uo]&&Bo(Li,Uo,{configurable:!0,get:function(){return this}});var bu={},wu=Tt("iterator"),Su=Array.prototype,Eu=Tt("iterator"),Ou=function(t){if(!z(t))return ft(t,Eu)||ft(t,"@@iterator")||bu[en(t)]},xu=TypeError,Iu=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},ju=TypeError,Tu=function(t,e){this.stopped=t,this.result=e},Pu=Tu.prototype,Mu=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=ur(e,l),g=function(t){return r&&Iu(r,"normal",t),new Tu(!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=Ou(t)))throw new ju(at(t)+" is not iterable");if(void 0!==(f=o)&&(bu.Array===f||Su[wu]===f)){for(i=0,u=Te(t);u>i;i++)if((a=m(t[i]))&&G(Pu,a))return a;return new Tu(!1)}r=function(t,e){var n=arguments.length<2?Ou(t):e;if(st(n))return $t(O(n,t));throw new xu(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){Iu(r,"throw",t)}if("object"==typeof a&&a&&G(Pu,a))return a}return new Tu(!1)},Au=Tt("iterator"),Nu=!1;try{var Ru=0,Cu={next:function(){return{done:!!Ru++}},return:function(){Nu=!0}};Cu[Au]=function(){return this},Array.from(Cu,(function(){throw 2}))}catch(t){}var ku=function(t,e){try{if(!e&&!Nu)return!1}catch(t){return!1}var n=!1;try{var r={};r[Au]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Du=Bi.CONSTRUCTOR||!ku((function(t){Ci.all(t).then(void 0,(function(){}))}));Ke({target:"Promise",stat:!0,forced:Du},{all:function(t){var e=this,n=Wi.f(e),r=n.resolve,o=n.reject,i=Ri((function(){var n=st(e.resolve),i=[],u=0,a=1;Mu(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 Vu=Bi.CONSTRUCTOR,Lu=Ci&&Ci.prototype;if(Ke({target:"Promise",proto:!0,forced:Vu,real:!0},{catch:function(t){return this.then(void 0,t)}}),U(Ci)){var zu=W("Promise").prototype.catch;Lu.catch!==zu&&ge(Lu,"catch",zu,{unsafe:!0})}Ke({target:"Promise",stat:!0,forced:Du},{race:function(t){var e=this,n=Wi.f(e),r=n.reject,o=Ri((function(){var o=st(e.resolve);Mu(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:Bi.CONSTRUCTOR},{reject:function(t){var e=Wi.f(this);return(0,e.reject)(t),e.promise}});var Fu=Bi.CONSTRUCTOR;function _u(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 $u(){return xo("w-e-insert-video")}W("Promise"),Ke({target:"Promise",stat:!0,forced:Fu},{resolve:function(t){return function(t,e){if($t(t),H(e)&&e.constructor===t)return e;var n=Wi.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var Bu=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=$u(),this.posterInputId=$u(),this.buttonId=$u()}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","#".concat(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("#".concat(o)).val().trim(),r=w.find("#".concat(i)).val().trim(),[4,_u(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}(),Uu=N([].join),Hu=L!==Object||!bo("join",",");Ke({target:"Array",proto:!0,forced:Hu},{join:function(t){return Uu($(this),void 0===t?",":t)}});var Wu,Gu,qu,Ku=!b((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Xu=ce("IE_PROTO"),Yu=Object,Ju=Yu.prototype,Qu=Ku?Yu.getPrototypeOf:function(t){var e=gt(t);if(bt(e,Xu))return e[Xu];var n=e.constructor;return U(n)&&e instanceof n?n.prototype:e instanceof Yu?Ju:null},Zu=Tt("iterator"),ta=!1;[].keys&&("next"in(qu=[].keys())?(Gu=Qu(Qu(qu)))!==Object.prototype&&(Wu=Gu):ta=!0);var ea=!H(Wu)||b((function(){var t={};return Wu[Zu].call(t)!==t}));ea&&(Wu={}),U(Wu[Zu])||ge(Wu,Zu,(function(){return this}));var na={IteratorPrototype:Wu,BUGGY_SAFARI_ITERATORS:ta},ra=na.IteratorPrototype,oa=function(){return this},ia=Zt.PROPER,ua=Zt.CONFIGURABLE,aa=na.IteratorPrototype,ca=na.BUGGY_SAFARI_ITERATORS,sa=Tt("iterator"),fa="keys",la="values",da="entries",pa=function(){return this},va=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=Yn(ra,{next:T(+!r,n)}),$o(t,o,!1),bu[o]=oa}(n,e,r);var a,c,s,f=function(t){if(t===o&&h)return h;if(!ca&&t&&t in p)return p[t];switch(t){case fa:case la:case da:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",d=!1,p=t.prototype,v=p[sa]||p["@@iterator"]||o&&p[o],h=!ca&&v||f(o),y="Array"===e&&p.entries||v;if(y&&(a=Qu(y.call(new t)))!==Object.prototype&&a.next&&(Qu(a)!==aa&&(zo?zo(a,aa):U(a[sa])||ge(a,sa,pa)),$o(a,l,!0)),ia&&o===la&&v&&v.name!==la&&(ua?Xt(p,"name",la):(d=!0,h=function(){return O(v,this)})),o)if(c={values:f(la),keys:i?h:f(fa),entries:f(da)},u)for(s in c)(ca||d||!(s in p))&&ge(p,s,c[s]);else Ke({target:e,proto:!0,forced:ca||d},c);return p[sa]!==h&&ge(p,sa,h,{name:o}),bu[e]=h,c},ha=function(t,e){return{value:t,done:e}},ya=Kt.f,ga="Array Iterator",ma=he.set,ba=he.getterFor(ga),wa=va(Array,"Array",(function(t,e){ma(this,{type:ga,target:$(t),index:0,kind:e})}),(function(){var t=ba(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,ha(void 0,!0);switch(t.kind){case"keys":return ha(n,!1);case"values":return ha(e[n],!1)}return ha([n,e[n]],!1)}),"values"),Sa=bu.Arguments=bu.Array;if(tr("keys"),tr("values"),tr("entries"),w&&"values"!==Sa.name)try{ya(Sa,"name",{value:"values"})}catch(t){}var Ea=Rn("slice"),Oa=Tt("species"),xa=Array,Ia=Math.max;Ke({target:"Array",proto:!0,forced:!Ea},{slice:function(t,e){var n,r,o,i=$(this),u=Te(i),a=xe(t,u),c=xe(void 0===e?u:e,u);if(yn(i)&&(n=i.constructor,(Tn(n)&&(n===xa||yn(n.prototype))||H(n)&&null===(n=n[Oa]))&&(n=void 0),n===xa||void 0===n))return Xo(i,a,c);for(r=new(void 0===n?xa:n)(Ia(c-a,0)),o=0;a<c;a++,o++)a in i&&bn(r,o,i[a]);return r.length=o,r}});var ja=Zt.EXISTS,Ta=Function.prototype,Pa=N(Ta.toString),Ma=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Aa=N(Ma.exec);w&&!ja&&Bo(Ta,"name",{configurable:!0,get:function(){try{return Aa(Ma,Pa(this))[1]}catch(t){return""}}});var Na=qr.charAt,Ra="String Iterator",Ca=he.set,ka=he.getterFor(Ra);va(String,"String",(function(t){Ca(this,{type:Ra,string:rn(t),index:0})}),(function(){var t,e=ka(this),n=e.string,r=e.index;return r>=n.length?ha(void 0,!0):(t=Na(n,r),e.index+=t.length,ha(t,!1))}));var Da=!b((function(){return Object.isExtensible(Object.preventExtensions({}))})),Va=function(t,e,n){for(var r in e)ge(t,r,e[r],n);return t},La=De.f,za="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Fa={f:function(t){return za&&"Window"===k(t)?function(t){try{return La(t)}catch(t){return Xo(za)}}(t):La($(t))}},_a=b((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),$a=Object.isExtensible,Ba=b((function(){$a(1)}))||_a?function(t){return!!H(t)&&((!_a||"ArrayBuffer"!==k(t))&&(!$a||$a(t)))}:$a,Ua=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:Fa.f}))},fastKey:function(t,e){if(!H(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!bt(t,r)){if(!Ba(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!bt(t,r)){if(!Ba(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return Da&&n&&Ba(t)&&!bt(t,r)&&i(t),t}};se[r]=!0})),Ha=Ua.getWeakData,Wa=he.set,Ga=he.getterFor,qa=sr.find,Ka=sr.findIndex,Xa=N([].splice),Ya=0,Ja=function(t){return t.frozen||(t.frozen=new Qa)},Qa=function(){this.entries=[]},Za=function(t,e){return qa(t.entries,(function(t){return t[0]===e}))};Qa.prototype={get:function(t){var e=Za(this,t);if(e)return e[1]},has:function(t){return!!Za(this,t)},set:function(t,e){var n=Za(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Ka(this.entries,(function(e){return e[0]===t}));return~e&&Xa(this.entries,e,1),!!~e}};var tc,ec={getConstructor:function(t,e,n,r){var o=t((function(t,o){Wo(t,i),Wa(t,{type:e,id:Ya++,frozen:null}),z(o)||Mu(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=Ga(e),a=function(t,e,n){var r=u(t),o=Ha($t(e),!0);return!0===o?Ja(r).set(e,n):o[r.id]=n,t};return Va(i,{delete:function(t){var e=u(this);if(!H(t))return!1;var n=Ha(t);return!0===n?Ja(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=Ha(t);return!0===n?Ja(e).has(t):n&&bt(n,e.id)}}),Va(i,n?{get:function(t){var e=u(this);if(H(t)){var n=Ha(t);if(!0===n)return Ja(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}},nc=he.enforce,rc=Object,oc=Array.isArray,ic=rc.isExtensible,uc=rc.isFrozen,ac=rc.isSealed,cc=rc.freeze,sc=rc.seal,fc=!m.ActiveXObject&&"ActiveXObject"in m,lc=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},dc=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),Ua.enable();else if(Ge(t,!0)){var l=new c,d=l[i](o?{}:-0,1)!==l,p=b((function(){l.has(1)})),v=ku((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){Wo(t,a);var n=function(t,e,n){var r,o;return zo&&U(r=e.constructor)&&r!==n&&H(o=r.prototype)&&o!==n.prototype&&zo(t,o),t}(new u,t,c);return z(e)||Mu(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),$o(c,t),o||n.setStrong(c,t,r),c}("WeakMap",lc,ec),pc=dc.prototype,vc=N(pc.set);if(ue)if(fc){tc=ec.getConstructor(lc,"WeakMap",!0),Ua.enable();var hc=N(pc.delete),yc=N(pc.has),gc=N(pc.get);Va(pc,{delete:function(t){if(H(t)&&!ic(t)){var e=nc(this);return e.frozen||(e.frozen=new tc),hc(this,t)||e.frozen.delete(t)}return hc(this,t)},has:function(t){if(H(t)&&!ic(t)){var e=nc(this);return e.frozen||(e.frozen=new tc),yc(this,t)||e.frozen.has(t)}return yc(this,t)},get:function(t){if(H(t)&&!ic(t)){var e=nc(this);return e.frozen||(e.frozen=new tc),yc(this,t)?gc(this,t):e.frozen.get(t)}return gc(this,t)},set:function(t,e){if(H(t)&&!ic(t)){var n=nc(this);n.frozen||(n.frozen=new tc),yc(this,t)?vc(this,t,e):n.frozen.set(t,e)}else vc(this,t,e);return this}})}else Da&&b((function(){var t=cc([]);return vc(new dc,t,1),!uc(t)}))&&Va(pc,{set:function(t,e){var n;return oc(t)&&(uc(t)?n=cc:ac(t)&&(n=sc)),vc(this,t,e),n&&n(t),this}});var mc=Tt("iterator"),bc=wa.values,wc=function(t,e){if(t){if(t[mc]!==bc)try{Xt(t,mc,bc)}catch(e){t[mc]=bc}if($o(t,e,!0),ho[e])for(var n in wa)if(t[n]!==wa[n])try{Xt(t,n,wa[n])}catch(e){t[n]=wa[n]}}};for(var Sc in ho)wc(m[Sc]&&m[Sc].prototype,Sc);function Ec(t){return t.getMenuConfig("uploadVideo")}wc(mo,"DOMTokenList");var Oc=new WeakMap;function xc(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=Oc.get(e);if(null!=n)return n;var r=Ec(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 _u(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;_u(e,l,void 0===d?"":d),o(t,n)}else u(t,n)},onError:function(t,e,n){s(t,e,n)}})),Oc.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 Ic=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 _u(t,e,n)}));else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var f=u.default("body"),l=u.default('<input type="file" '.concat(a," multiple/>"));l.hide(),f.append(l),l.click(),l.on("change",(function(){var e=l[0].files;!function(t,e){var n,r,o,i;c(this,void 0,void 0,(function(){var u,a,c,f,l,p,v;return s(this,(function(s){switch(s.label){case 0:if(null==e)return[2];u=Array.prototype.slice.call(e),a=Ec(t).customUpload,s.label=1;case 1:s.trys.push([1,12,13,18]),c=!0,f=d(u),s.label=2;case 2:return[4,f.next()];case 3:if(l=s.sent(),n=l.done)return[3,11];i=l.value,c=!1,s.label=4;case 4:return s.trys.push([4,,9,10]),p=i,a?[4,a(p,(function(e,n){return _u(t,e,n)}))]:[3,6];case 5:return s.sent(),[3,8];case 6:return[4,xc(t,p)];case 7:s.sent(),s.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 v=s.sent(),r={error:v},[3,18];case 13:return s.trys.push([13,,16,17]),c||n||!(o=f.return)?[3,15]:[4,o.call(f)];case 14:s.sent(),s.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)}))}},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 jc(){return xo("w-e-insert-video")}var Tc=function(){function n(){this.title=t.t("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=jc(),this.heightInputId=jc(),this.buttonId=jc()}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","#".concat(c),(function(r){r.preventDefault();var u=b.find("#".concat(o)).val().trim(),c=b.find("#".concat(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 Pc(){return xo("w-e-edit-video")}var Mc=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=Pc(),this.posterInputId=Pc(),this.buttonId=Pc()}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","#".concat(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("#".concat(i)).val().trim(),u=S.find("#".concat(a)).val().trim(),c=xo("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 Ac={renderElems:[hn],elemsToHtml:[zn],preParseHtml:[rr],parseElemsHtml:[No],menus:[{key:"insertVideo",factory:function(){return new Bu},config:{onInsertedVideo:function(t){},checkVideo:function(t,e){return!0},parseVideoSrc:function(t){return t}}},{key:"uploadVideo",factory:function(){return new Ic},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)}}},{key:"editVideoSize",factory:function(){return new Tc}},{key:"editVideoSrc",factory:function(){return new Mc}}],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 Ac}));
2
2
  //# sourceMappingURL=index.js.map