@wangeditor-next/video-module 1.3.7 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
- package/CHANGELOG.md +0 -263
- package/LICENSE +0 -21
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 v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(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 v&&v)||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=Function.prototype.call,x=S.bind?S.bind(S):function(){return S.apply(S,arguments)},E={}.propertyIsEnumerable,O=Object.getOwnPropertyDescriptor,I={f:O&&!E.call({1:2},1)?function(t){var e=O(this,t);return!!e&&e.enumerable}:E},j=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},M=Function.prototype,P=M.bind,T=M.call,A=P&&P.bind(T),k=P?function(t){return t&&A(T,t)}:function(t){return t&&function(){return T.apply(t,arguments)}},N=k({}.toString),R=k("".slice),C=function(t){return R(N(t),8,-1)},V=m.Object,L=k("".split),D=b((function(){return!V("z").propertyIsEnumerable(0)}))?function(t){return"String"==C(t)?L(t,""):V(t)}:V,z=m.TypeError,F=function(t){if(null==t)throw z("Can't call method on "+t);return t},$=function(t){return D(F(t))},_=function(t){return"function"==typeof t},B=function(t){return"object"==typeof t?null!==t:_(t)},H=function(t,e){return arguments.length<2?(n=m[t],_(n)?n:void 0):m[t]&&m[t][e];var n},G=k({}.isPrototypeOf),W=H("navigator","userAgent")||"",U=m.process,q=m.Deno,K=U&&U.versions||q&&q.version,X=K&&K.v8;X&&(y=(h=X.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!y&&W&&(!(h=W.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=W.match(/Chrome\/(\d+)/))&&(y=+h[1]);var Y=y,J=!!Object.getOwnPropertySymbols&&!b((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Y&&Y<41})),Q=J&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Z=m.Object,tt=Q?function(t){return"symbol"==typeof t}:function(t){var e=H("Symbol");return _(e)&&G(e.prototype,Z(t))},et=m.String,nt=function(t){try{return et(t)}catch(t){return"Object"}},rt=m.TypeError,ot=function(t){if(_(t))return t;throw rt(nt(t)+" is not a function")},it=function(t,e){var n=t[e];return null==n?void 0:ot(n)},ut=m.TypeError,at=Object.defineProperty,ct=function(t,e){try{at(m,t,{value:e,configurable:!0,writable:!0})}catch(n){m[t]=e}return e},st="__core-js_shared__",ft=m[st]||ct(st,{}),lt=p((function(t){(t.exports=function(t,e){return ft[t]||(ft[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),dt=m.Object,vt=function(t){return dt(F(t))},pt=k({}.hasOwnProperty),ht=Object.hasOwn||function(t,e){return pt(vt(t),e)},yt=0,gt=Math.random(),mt=k(1..toString),bt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+mt(++yt+gt,36)},wt=lt("wks"),St=m.Symbol,xt=St&&St.for,Et=Q?St:St&&St.withoutSetter||bt,Ot=function(t){if(!ht(wt,t)||!J&&"string"!=typeof wt[t]){var e="Symbol."+t;J&&ht(St,t)?wt[t]=St[t]:wt[t]=Q&&xt?xt(e):Et(e)}return wt[t]},It=m.TypeError,jt=Ot("toPrimitive"),Mt=function(t,e){if(!B(t)||tt(t))return t;var n,r=it(t,jt);if(r){if(void 0===e&&(e="default"),n=x(r,t,e),!B(n)||tt(n))return n;throw It("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&_(n=t.toString)&&!B(r=x(n,t)))return r;if(_(n=t.valueOf)&&!B(r=x(n,t)))return r;if("string"!==e&&_(n=t.toString)&&!B(r=x(n,t)))return r;throw ut("Can't convert object to primitive value")}(t,e)},Pt=function(t){var e=Mt(t,"string");return tt(e)?e:e+""},Tt=m.document,At=B(Tt)&&B(Tt.createElement),kt=function(t){return At?Tt.createElement(t):{}},Nt=!w&&!b((function(){return 7!=Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Rt=Object.getOwnPropertyDescriptor,Ct={f:w?Rt:function(t,e){if(t=$(t),e=Pt(e),Nt)try{return Rt(t,e)}catch(t){}if(ht(t,e))return j(!x(I.f,t,e),t[e])}},Vt=m.String,Lt=m.TypeError,Dt=function(t){if(B(t))return t;throw Lt(Vt(t)+" is not an object")},zt=m.TypeError,Ft=Object.defineProperty,$t={f:w?Ft:function(t,e,n){if(Dt(t),e=Pt(e),Dt(n),Nt)try{return Ft(t,e,n)}catch(t){}if("get"in n||"set"in n)throw zt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},_t=w?function(t,e,n){return $t.f(t,e,j(1,n))}:function(t,e,n){return t[e]=n,t},Bt=k(Function.toString);_(ft.inspectSource)||(ft.inspectSource=function(t){return Bt(t)});var Ht,Gt,Wt,Ut=ft.inspectSource,qt=m.WeakMap,Kt=_(qt)&&/native code/.test(Ut(qt)),Xt=lt("keys"),Yt=function(t){return Xt[t]||(Xt[t]=bt(t))},Jt={},Qt="Object already initialized",Zt=m.TypeError,te=m.WeakMap;if(Kt||ft.state){var ee=ft.state||(ft.state=new te),ne=k(ee.get),re=k(ee.has),oe=k(ee.set);Ht=function(t,e){if(re(ee,t))throw new Zt(Qt);return e.facade=t,oe(ee,t,e),e},Gt=function(t){return ne(ee,t)||{}},Wt=function(t){return re(ee,t)}}else{var ie=Yt("state");Jt[ie]=!0,Ht=function(t,e){if(ht(t,ie))throw new Zt(Qt);return e.facade=t,_t(t,ie,e),e},Gt=function(t){return ht(t,ie)?t[ie]:{}},Wt=function(t){return ht(t,ie)}}var ue={set:Ht,get:Gt,has:Wt,enforce:function(t){return Wt(t)?Gt(t):Ht(t,{})},getterFor:function(t){return function(e){var n;if(!B(e)||(n=Gt(e)).type!==t)throw Zt("Incompatible receiver, "+t+" required");return n}}},ae=Function.prototype,ce=w&&Object.getOwnPropertyDescriptor,se=ht(ae,"name"),fe={EXISTS:se,PROPER:se&&"something"===function(){}.name,CONFIGURABLE:se&&(!w||w&&ce(ae,"name").configurable)},le=p((function(t){var e=fe.CONFIGURABLE,n=ue.get,r=ue.enforce,o=String(String).split("String");(t.exports=function(t,n,i,u){var a,c=!!u&&!!u.unsafe,s=!!u&&!!u.enumerable,f=!!u&&!!u.noTargetGet,l=u&&void 0!==u.name?u.name:n;_(i)&&("Symbol("===String(l).slice(0,7)&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ht(i,"name")||e&&i.name!==l)&&_t(i,"name",l),(a=r(i)).source||(a.source=o.join("string"==typeof l?l:""))),t!==m?(c?!f&&t[n]&&(s=!0):delete t[n],s?t[n]=i:_t(t,n,i)):s?t[n]=i:ct(n,i)})(Function.prototype,"toString",(function(){return _(this)&&n(this).source||Ut(this)}))})),de=Math.ceil,ve=Math.floor,pe=function(t){var e=+t;return e!=e||0===e?0:(e>0?ve:de)(e)},he=Math.max,ye=Math.min,ge=function(t,e){var n=pe(t);return n<0?he(n+e,0):ye(n,e)},me=Math.min,be=function(t){return t>0?me(pe(t),9007199254740991):0},we=function(t){return be(t.length)},Se=function(t){return function(e,n,r){var o,i=$(e),u=we(i),a=ge(r,u);if(t&&n!=n){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},xe={includes:Se(!0),indexOf:Se(!1)},Ee=xe.indexOf,Oe=k([].push),Ie=function(t,e){var n,r=$(t),o=0,i=[];for(n in r)!ht(Jt,n)&&ht(r,n)&&Oe(i,n);for(;e.length>o;)ht(r,n=e[o++])&&(~Ee(i,n)||Oe(i,n));return i},je=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Me=je.concat("length","prototype"),Pe={f:Object.getOwnPropertyNames||function(t){return Ie(t,Me)}},Te={f:Object.getOwnPropertySymbols},Ae=k([].concat),ke=H("Reflect","ownKeys")||function(t){var e=Pe.f(Dt(t)),n=Te.f;return n?Ae(e,n(t)):e},Ne=function(t,e){for(var n=ke(e),r=$t.f,o=Ct.f,i=0;i<n.length;i++){var u=n[i];ht(t,u)||r(t,u,o(e,u))}},Re=/#|\.prototype\./,Ce=function(t,e){var n=Le[Ve(t)];return n==ze||n!=De&&(_(e)?b(e):!!e)},Ve=Ce.normalize=function(t){return String(t).replace(Re,".").toLowerCase()},Le=Ce.data={},De=Ce.NATIVE="N",ze=Ce.POLYFILL="P",Fe=Ce,$e=Ct.f,_e=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]||ct(a,{}):(m[a]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=$e(n,r))&&u.value:n[r],!Fe(c?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ne(i,o)}(t.sham||o&&o.sham)&&_t(i,"sham",!0),le(n,r,i,t)}},Be={};Be[Ot("toStringTag")]="z";var He,Ge="[object z]"===String(Be),We=Ot("toStringTag"),Ue=m.Object,qe="Arguments"==C(function(){return arguments}()),Ke=Ge?C: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=Ue(t),We))?n:qe?C(e):"Object"==(r=C(e))&&_(e.callee)?"Arguments":r},Xe=m.String,Ye=function(t){if("Symbol"===Ke(t))throw TypeError("Cannot convert a Symbol value to a string");return Xe(t)},Je="\t\n\v\f\r \u2028\u2029\ufeff",Qe=k("".replace),Ze="["+Je+"]",tn=RegExp("^"+Ze+Ze+"*"),en=RegExp(Ze+Ze+"*$"),nn=function(t){return function(e){var n=Ye(F(e));return 1&t&&(n=Qe(n,tn,"")),2&t&&(n=Qe(n,en,"")),n}},rn={start:nn(1),end:nn(2),trim:nn(3)},on=fe.PROPER,un=rn.trim;function an(t){return t.length?t[0].tagName.toLowerCase():""}function cn(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}_e({target:"String",proto:!0,forced:(He="trim",b((function(){return!!Je[He]()||"
"!=="
"[He]()||on&&Je[He].name!==He})))},{trim:function(){return un(this)}}),_e({global:!0},{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 sn={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,v=u.width,p=void 0===v?"auto":v,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 x=cn(c,p,y,m);i=n.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w},innerHTML:x})}else{var E=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"!==p&&(E.data.width=p),"auto"!==y&&(E.data.height=y),i=n.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w}},E)}return n.h("div",{props:{contentEditable:!1},on:{mousedown:function(t){return t.preventDefault()}}},i)}};var fn,ln={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,v=n.textAlign,p='<div data-w-e-type="video" data-w-e-is-void style="text-align: '+(void 0===v?"center":v)+';">\n';if(0===o.trim().indexOf("<iframe ")){p+=cn(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+";"),p+='<video poster="'+u+'" controls="true" width="'+c+'" height="'+f+'" style="'+b+'"><source src="'+o+'" type="video/mp4"/></video>'}return p+="\n</div>"}},dn=Object.keys||function(t){return Ie(t,je)},vn=w?Object.defineProperties:function(t,e){Dt(t);for(var n,r=$(e),o=dn(e),i=o.length,u=0;i>u;)$t.f(t,n=o[u++],r[n]);return t},pn=H("document","documentElement"),hn="prototype",yn="script",gn=Yt("IE_PROTO"),mn=function(){},bn=function(t){return"<"+yn+">"+t+"</"+yn+">"},wn=function(t){t.write(bn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Sn=function(){try{fn=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Sn="undefined"!=typeof document?document.domain&&fn?wn(fn):(e=kt("iframe"),n="java"+yn+":",e.style.display="none",pn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(bn("document.F=Object")),t.close(),t.F):wn(fn);for(var r=je.length;r--;)delete Sn[hn][je[r]];return Sn()};Jt[gn]=!0;var xn=Object.create||function(t,e){var n;return null!==t?(mn[hn]=Dt(t),n=new mn,mn[hn]=null,n[gn]=t):n=Sn(),void 0===e?n:vn(n,e)},En=Ot("unscopables"),On=Array.prototype;null==On[En]&&$t.f(On,En,{configurable:!0,value:xn(null)});var In=function(t){On[En][t]=!0},jn=xe.includes;_e({target:"Array",proto:!0},{includes:function(t){return jn(this,t,arguments.length>1?arguments[1]:void 0)}}),In("includes");var Mn={selector:"iframe,video,p",preParseHtml:function(t){var e=u.default(t),n=e;if("p"===an(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=an(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]}},Pn=k(k.bind),Tn=function(t,e){return ot(t),void 0===e?t:Pn?Pn(t,e):function(){return t.apply(e,arguments)}},An=Array.isArray||function(t){return"Array"==C(t)},kn=function(){},Nn=[],Rn=H("Reflect","construct"),Cn=/^\s*(?:class|function)\b/,Vn=k(Cn.exec),Ln=!Cn.exec(kn),Dn=function(t){if(!_(t))return!1;try{return Rn(kn,Nn,t),!0}catch(t){return!1}},zn=!Rn||b((function(){var t;return Dn(Dn.call)||!Dn(Object)||!Dn((function(){t=!0}))||t}))?function(t){if(!_(t))return!1;switch(Ke(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Ln||!!Vn(Cn,Ut(t))}:Dn,Fn=Ot("species"),$n=m.Array,_n=function(t,e){return new(function(t){var e;return An(t)&&(e=t.constructor,(zn(e)&&(e===$n||An(e.prototype))||B(e)&&null===(e=e[Fn]))&&(e=void 0)),void 0===e?$n:e}(t))(0===e?0:e)},Bn=k([].push),Hn=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,v,p=vt(c),h=D(p),y=Tn(s,f),g=we(h),m=0,b=l||_n,w=e?b(c,g):n||u?b(c,0):void 0;g>m;m++)if((a||m in h)&&(v=y(d=h[m],m,p),t))if(e)w[m]=v;else if(v)switch(t){case 3:return!0;case 5:return d;case 6:return m;case 2:Bn(w,d)}else switch(t){case 4:return!1;case 7:Bn(w,d)}return i?-1:r||o?o:w}},Gn={forEach:Hn(0),map:Hn(1),filter:Hn(2),some:Hn(3),every:Hn(4),find:Hn(5),findIndex:Hn(6),filterReject:Hn(7)},Wn=Gn.find,Un="find",qn=!0;Un in[]&&Array(1)[Un]((function(){qn=!1})),_e({target:"Array",proto:!0,forced:qn},{find:function(t){return Wn(this,t,arguments.length>1?arguments[1]:void 0)}}),In(Un);var Kn=Ge?{}.toString:function(){return"[object "+Ke(this)+"]"};Ge||le(Object.prototype,"toString",Kn,{unsafe:!0});var Xn,Yn,Jn=function(){var t=Dt(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Qn=m.RegExp,Zn=b((function(){var t=Qn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),tr=Zn||b((function(){return!Qn("a","y").sticky})),er={BROKEN_CARET:Zn||b((function(){var t=Qn("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:tr,UNSUPPORTED_Y:Zn},nr=m.RegExp,rr=b((function(){var t=nr(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),or=m.RegExp,ir=b((function(){var t=or("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),ur=ue.get,ar=lt("native-string-replace",String.prototype.replace),cr=RegExp.prototype.exec,sr=cr,fr=k("".charAt),lr=k("".indexOf),dr=k("".replace),vr=k("".slice),pr=(Yn=/b*/g,x(cr,Xn=/a/,"a"),x(cr,Yn,"a"),0!==Xn.lastIndex||0!==Yn.lastIndex),hr=er.BROKEN_CARET,yr=void 0!==/()??/.exec("")[1];(pr||yr||hr||rr||ir)&&(sr=function(t){var e,n,r,o,i,u,a,c=this,s=ur(c),f=Ye(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=x(sr,l,f),c.lastIndex=l.lastIndex,e;var d=s.groups,v=hr&&c.sticky,p=x(Jn,c),h=c.source,y=0,g=f;if(v&&(p=dr(p,"y",""),-1===lr(p,"g")&&(p+="g"),g=vr(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==fr(f,c.lastIndex-1))&&(h="(?: "+h+")",g=" "+g,y++),n=new RegExp("^(?:"+h+")",p)),yr&&(n=new RegExp("^"+h+"$(?!\\s)",p)),pr&&(r=c.lastIndex),o=x(cr,v?n:c,g),v?o?(o.input=vr(o.input,y),o[0]=vr(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:pr&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),yr&&o&&o.length>1&&x(ar,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=xn(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var gr=sr;_e({target:"RegExp",proto:!0,forced:/./.exec!==gr},{exec:gr});var mr=Function.prototype,br=mr.apply,wr=mr.bind,Sr=mr.call,xr="object"==typeof Reflect&&Reflect.apply||(wr?Sr.bind(br):function(){return Sr.apply(br,arguments)}),Er=Ot("species"),Or=RegExp.prototype,Ir=k("".charAt),jr=k("".charCodeAt),Mr=k("".slice),Pr=function(t){return function(e,n){var r,o,i=Ye(F(e)),u=pe(n),a=i.length;return u<0||u>=a?t?"":void 0:(r=jr(i,u))<55296||r>56319||u+1===a||(o=jr(i,u+1))<56320||o>57343?t?Ir(i,u):r:t?Mr(i,u,u+2):o-56320+(r-55296<<10)+65536}},Tr={codeAt:Pr(!1),charAt:Pr(!0)},Ar=Tr.charAt,kr=function(t,e,n){return e+(n?Ar(t,e).length:1)},Nr=Math.floor,Rr=k("".charAt),Cr=k("".replace),Vr=k("".slice),Lr=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Dr=/\$([$&'`]|\d{1,2})/g,zr=function(t,e,n,r,o,i){var u=n+t.length,a=r.length,c=Dr;return void 0!==o&&(o=vt(o),c=Lr),Cr(i,c,(function(i,c){var s;switch(Rr(c,0)){case"$":return"$";case"&":return t;case"`":return Vr(e,0,n);case"'":return Vr(e,u);case"<":s=o[Vr(c,1,-1)];break;default:var f=+c;if(0===f)return i;if(f>a){var l=Nr(f/10);return 0===l?i:l<=a?void 0===r[l-1]?Rr(c,1):r[l-1]+Rr(c,1):i}s=r[f-1]}return void 0===s?"":s}))},Fr=m.TypeError,$r=function(t,e){var n=t.exec;if(_(n)){var r=x(n,t,e);return null!==r&&Dt(r),r}if("RegExp"===C(t))return x(gr,t,e);throw Fr("RegExp#exec called on incompatible receiver")},_r=Ot("replace"),Br=Math.max,Hr=Math.min,Gr=k([].concat),Wr=k([].push),Ur=k("".indexOf),qr=k("".slice),Kr="$0"==="a".replace(/./,"$0"),Xr=!!/./[_r]&&""===/./[_r]("a","$0");!function(t,e,n,r){var o=Ot(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[Er]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!u||n){var a=k(/./[o]),c=e(o,""[t],(function(t,e,n,r,o){var u=k(t),c=e.exec;return c===gr||c===Or.exec?i&&!o?{done:!0,value:a(e,n,r)}:{done:!0,value:u(n,e,r)}:{done:!1}}));le(String.prototype,t,c[0]),le(Or,o,c[1])}r&&_t(Or[o],"sham",!0)}("replace",(function(t,e,n){var r=Xr?"$":"$0";return[function(t,n){var r=F(this),o=null==t?void 0:it(t,_r);return o?x(o,t,r,n):x(e,Ye(r),t,n)},function(t,o){var i=Dt(this),u=Ye(t);if("string"==typeof o&&-1===Ur(o,r)&&-1===Ur(o,"$<")){var a=n(e,i,u,o);if(a.done)return a.value}var c=_(o);c||(o=Ye(o));var s=i.global;if(s){var f=i.unicode;i.lastIndex=0}for(var l=[];;){var d=$r(i,u);if(null===d)break;if(Wr(l,d),!s)break;""===Ye(d[0])&&(i.lastIndex=kr(u,be(i.lastIndex),f))}for(var v,p="",h=0,y=0;y<l.length;y++){for(var g=Ye((d=l[y])[0]),m=Br(Hr(pe(d.index),u.length),0),b=[],w=1;w<d.length;w++)Wr(b,void 0===(v=d[w])?v:String(v));var S=d.groups;if(c){var x=Gr([g],b,m,u);void 0!==S&&Wr(x,S);var E=Ye(xr(o,void 0,x))}else E=zr(g,u,m,b,S,o);m>=h&&(p+=qr(u,h,m)+E,h=m+g.length)}return p+qr(u,h)}]}),!!b((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Kr||Xr);var Yr={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},Jr=kt("span").classList,Qr=Jr&&Jr.constructor&&Jr.constructor.prototype,Zr=Qr===Object.prototype?void 0:Qr,to=function(t,e){var n=[][t];return!!n&&b((function(){n.call(null,e||function(){throw 1},1)}))},eo=Gn.forEach,no=to("forEach")?[].forEach:function(t){return eo(this,t,arguments.length>1?arguments[1]:void 0)},ro=function(t){if(t&&t.forEach!==no)try{_t(t,"forEach",no)}catch(e){t.forEach=no}};for(var oo in Yr)Yr[oo]&&ro(m[oo]&&m[oo].prototype);function io(t){return void 0===t&&(t="r"),t+"-"+o.nanoid()}function uo(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 ao(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:""}]}}ro(Zr);var co={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=uo(s=f.attr("style")||""),ao(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",ao(o,i=l.attr("poster")||"",a,c,s=uo(s=l.attr("style")||""))}},so=m.Promise,fo=function(t,e,n){for(var r in e)le(t,r,e[r],n);return t},lo=m.String,vo=m.TypeError,po=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=k(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Dt(n),function(t){if("object"==typeof t||_(t))return t;throw vo("Can't set "+lo(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),ho=$t.f,yo=Ot("toStringTag"),go=function(t,e,n){t&&!ht(t=n?t:t.prototype,yo)&&ho(t,yo,{configurable:!0,value:e})},mo=Ot("species"),bo=m.TypeError,wo=function(t,e){if(G(e,t))return t;throw bo("Incorrect invocation")},So={},xo=Ot("iterator"),Eo=Array.prototype,Oo=Ot("iterator"),Io=function(t){if(null!=t)return it(t,Oo)||it(t,"@@iterator")||So[Ke(t)]},jo=m.TypeError,Mo=function(t,e,n){var r,o;Dt(t);try{if(!(r=it(t,"return"))){if("throw"===e)throw n;return n}r=x(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Dt(r),n},Po=m.TypeError,To=function(t,e){this.stopped=t,this.result=e},Ao=To.prototype,ko=function(t,e,n){var r,o,i,u,a,c,s,f,l=n&&n.that,d=!(!n||!n.AS_ENTRIES),v=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),h=Tn(e,l),y=function(t){return r&&Mo(r,"normal",t),new To(!0,t)},g=function(t){return d?(Dt(t),p?h(t[0],t[1],y):h(t[0],t[1])):p?h(t,y):h(t)};if(v)r=t;else{if(!(o=Io(t)))throw Po(nt(t)+" is not iterable");if(void 0!==(f=o)&&(So.Array===f||Eo[xo]===f)){for(i=0,u=we(t);u>i;i++)if((a=g(t[i]))&&G(Ao,a))return a;return new To(!1)}r=function(t,e){var n=arguments.length<2?Io(t):e;if(ot(n))return Dt(x(n,t));throw jo(nt(t)+" is not iterable")}(t,o)}for(c=r.next;!(s=x(c,r)).done;){try{a=g(s.value)}catch(t){Mo(r,"throw",t)}if("object"==typeof a&&a&&G(Ao,a))return a}return new To(!1)},No=Ot("iterator"),Ro=!1;try{var Co=0,Vo={next:function(){return{done:!!Co++}},return:function(){Ro=!0}};Vo[No]=function(){return this},Array.from(Vo,(function(){throw 2}))}catch(t){}var Lo,Do,zo,Fo,$o=function(t,e){if(!e&&!Ro)return!1;var n=!1;try{var r={};r[No]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},_o=m.TypeError,Bo=Ot("species"),Ho=function(t,e){var n,r=Dt(t).constructor;return void 0===r||null==(n=Dt(r)[Bo])?e:function(t){if(zn(t))return t;throw _o(nt(t)+" is not a constructor")}(n)},Go=k([].slice),Wo=/(?:ipad|iphone|ipod).*applewebkit/i.test(W),Uo="process"==C(m.process),qo=m.setImmediate,Ko=m.clearImmediate,Xo=m.process,Yo=m.Dispatch,Jo=m.Function,Qo=m.MessageChannel,Zo=m.String,ti=0,ei={},ni="onreadystatechange";try{Lo=m.location}catch(t){}var ri=function(t){if(ht(ei,t)){var e=ei[t];delete ei[t],e()}},oi=function(t){return function(){ri(t)}},ii=function(t){ri(t.data)},ui=function(t){m.postMessage(Zo(t),Lo.protocol+"//"+Lo.host)};qo&&Ko||(qo=function(t){var e=Go(arguments,1);return ei[++ti]=function(){xr(_(t)?t:Jo(t),void 0,e)},Do(ti),ti},Ko=function(t){delete ei[t]},Uo?Do=function(t){Xo.nextTick(oi(t))}:Yo&&Yo.now?Do=function(t){Yo.now(oi(t))}:Qo&&!Wo?(Fo=(zo=new Qo).port2,zo.port1.onmessage=ii,Do=Tn(Fo.postMessage,Fo)):m.addEventListener&&_(m.postMessage)&&!m.importScripts&&Lo&&"file:"!==Lo.protocol&&!b(ui)?(Do=ui,m.addEventListener("message",ii,!1)):Do=ni in kt("script")?function(t){pn.appendChild(kt("script"))[ni]=function(){pn.removeChild(this),ri(t)}}:function(t){setTimeout(oi(t),0)});var ai,ci,si,fi,li,di,vi,pi,hi={set:qo,clear:Ko},yi=/ipad|iphone|ipod/i.test(W)&&void 0!==m.Pebble,gi=/web0s(?!.*chrome)/i.test(W),mi=Ct.f,bi=hi.set,wi=m.MutationObserver||m.WebKitMutationObserver,Si=m.document,xi=m.process,Ei=m.Promise,Oi=mi(m,"queueMicrotask"),Ii=Oi&&Oi.value;Ii||(ai=function(){var t,e;for(Uo&&(t=xi.domain)&&t.exit();ci;){e=ci.fn,ci=ci.next;try{e()}catch(t){throw ci?fi():si=void 0,t}}si=void 0,t&&t.enter()},Wo||Uo||gi||!wi||!Si?!yi&&Ei&&Ei.resolve?((vi=Ei.resolve(void 0)).constructor=Ei,pi=Tn(vi.then,vi),fi=function(){pi(ai)}):Uo?fi=function(){xi.nextTick(ai)}:(bi=Tn(bi,m),fi=function(){bi(ai)}):(li=!0,di=Si.createTextNode(""),new wi(ai).observe(di,{characterData:!0}),fi=function(){di.data=li=!li}));var ji,Mi,Pi,Ti,Ai=Ii||function(t){var e={fn:t,next:void 0};si&&(si.next=e),ci||(ci=e,fi()),si=e},ki=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=ot(e),this.reject=ot(n)},Ni={f:function(t){return new ki(t)}},Ri=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ci="object"==typeof window,Vi=hi.set,Li=Ot("species"),Di="Promise",zi=ue.getterFor(Di),Fi=ue.set,$i=ue.getterFor(Di),_i=so&&so.prototype,Bi=so,Hi=_i,Gi=m.TypeError,Wi=m.document,Ui=m.process,qi=Ni.f,Ki=qi,Xi=!!(Wi&&Wi.createEvent&&m.dispatchEvent),Yi=_(m.PromiseRejectionEvent),Ji="unhandledrejection",Qi=!1,Zi=Fe(Di,(function(){var t=Ut(Bi),e=t!==String(Bi);if(!e&&66===Y)return!0;if(Y>=51&&/native code/.test(t))return!1;var n=new Bi((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[Li]=r,!(Qi=n.then((function(){}))instanceof r)||!e&&Ci&&!Yi})),tu=Zi||!$o((function(t){Bi.all(t).catch((function(){}))})),eu=function(t){var e;return!(!B(t)||!_(e=t.then))&&e},nu=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;Ai((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var u,a,c,s=n[i++],f=o?s.ok:s.fail,l=s.resolve,d=s.reject,v=s.domain;try{f?(o||(2===t.rejection&&uu(t),t.rejection=1),!0===f?u=r:(v&&v.enter(),u=f(r),v&&(v.exit(),c=!0)),u===s.promise?d(Gi("Promise-chain cycle")):(a=eu(u))?x(a,u,l,d):l(u)):d(r)}catch(t){v&&!c&&v.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ou(t)}))}},ru=function(t,e,n){var r,o;Xi?((r=Wi.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),m.dispatchEvent(r)):r={promise:e,reason:n},!Yi&&(o=m["on"+t])?o(r):t===Ji&&function(t,e){var n=m.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},ou=function(t){x(Vi,m,(function(){var e,n=t.facade,r=t.value;if(iu(t)&&(e=Ri((function(){Uo?Ui.emit("unhandledRejection",r,n):ru(Ji,n,r)})),t.rejection=Uo||iu(t)?2:1,e.error))throw e.value}))},iu=function(t){return 1!==t.rejection&&!t.parent},uu=function(t){x(Vi,m,(function(){var e=t.facade;Uo?Ui.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 Gi("Promise can't be resolved itself");var r=eu(e);r?Ai((function(){var n={done:!1};try{x(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(Zi&&(Hi=(Bi=function(t){wo(this,Hi),ot(t),x(ji,this);var e=zi(this);try{t(au(su,e),au(cu,e))}catch(t){cu(e,t)}}).prototype,(ji=function(t){Fi(this,{type:Di,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=fo(Hi,{then:function(t,e){var n=$i(this),r=n.reactions,o=qi(Ho(this,Bi));return o.ok=!_(t)||t,o.fail=_(e)&&e,o.domain=Uo?Ui.domain:void 0,n.parent=!0,r[r.length]=o,0!=n.state&&nu(n,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),Mi=function(){var t=new ji,e=zi(t);this.promise=t,this.resolve=au(su,e),this.reject=au(cu,e)},Ni.f=qi=function(t){return t===Bi||t===Pi?new Mi(t):Ki(t)},_(so)&&_i!==Object.prototype)){Ti=_i.then,Qi||(le(_i,"then",(function(t,e){var n=this;return new Bi((function(t,e){x(Ti,n,t,e)})).then(t,e)}),{unsafe:!0}),le(_i,"catch",Hi.catch,{unsafe:!0}));try{delete _i.constructor}catch(t){}po&&po(_i,Hi)}function fu(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,v,p;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!==(v=s.sent()).trim().indexOf("<iframe ")&&(v=v.replace(/</g,"<").replace(/>/g,">")),p={type:"video",src:v,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,p,{mode:"highest"})})),c(p),[2]}}))}))}function lu(){return io("w-e-insert-video")}_e({global:!0,wrap:!0,forced:Zi},{Promise:Bi}),go(Bi,Di,!1),function(t){var e=H(t),n=$t.f;w&&e&&!e[mo]&&n(e,mo,{configurable:!0,get:function(){return this}})}(Di),Pi=H(Di),_e({target:Di,stat:!0,forced:Zi},{reject:function(t){var e=qi(this);return x(e.reject,void 0,t),e.promise}}),_e({target:Di,stat:!0,forced:Zi},{resolve:function(t){return function(t,e){if(Dt(t),B(e)&&e.constructor===t)return e;var n=Ni.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),_e({target:Di,stat:!0,forced:tu},{all:function(t){var e=this,n=qi(e),r=n.resolve,o=n.reject,i=Ri((function(){var n=ot(e.resolve),i=[],u=0,a=1;ko(t,(function(t){var c=u++,s=!1;a++,x(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},race:function(t){var e=this,n=qi(e),r=n.reject,o=Ri((function(){var o=ot(e.resolve);ko(t,(function(t){x(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var du=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=lu(),this.posterInputId=lu(),this.buttonId=lu()}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],v=f[1],p=l(t.genModalInputElems(t.t("videoModule.videoPoster"),i,t.t("videoModule.videoPosterPlaceHolder")),2),h=p[0],y=p[1],g=u.default(v),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,fu(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}(),vu=k([].join),pu=D!=Object,hu=to("join",",");_e({target:"Array",proto:!0,forced:pu||!hu},{join:function(t){return vu($(this),void 0===t?",":t)}});var yu,gu,mu,bu=!b((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),wu=Yt("IE_PROTO"),Su=m.Object,xu=Su.prototype,Eu=bu?Su.getPrototypeOf:function(t){var e=vt(t);if(ht(e,wu))return e[wu];var n=e.constructor;return _(n)&&e instanceof n?n.prototype:e instanceof Su?xu:null},Ou=Ot("iterator"),Iu=!1;[].keys&&("next"in(mu=[].keys())?(gu=Eu(Eu(mu)))!==Object.prototype&&(yu=gu):Iu=!0);var ju=null==yu||b((function(){var t={};return yu[Ou].call(t)!==t}));ju&&(yu={}),_(yu[Ou])||le(yu,Ou,(function(){return this}));var Mu={IteratorPrototype:yu,BUGGY_SAFARI_ITERATORS:Iu},Pu=Mu.IteratorPrototype,Tu=function(){return this},Au=fe.PROPER,ku=fe.CONFIGURABLE,Nu=Mu.IteratorPrototype,Ru=Mu.BUGGY_SAFARI_ITERATORS,Cu=Ot("iterator"),Vu="keys",Lu="values",Du="entries",zu=function(){return this},Fu=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=xn(Pu,{next:j(+!r,n)}),go(t,o,!1),So[o]=Tu}(n,e,r);var a,c,s,f=function(t){if(t===o&&h)return h;if(!Ru&&t in v)return v[t];switch(t){case Vu:case Lu:case Du:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",d=!1,v=t.prototype,p=v[Cu]||v["@@iterator"]||o&&v[o],h=!Ru&&p||f(o),y="Array"==e&&v.entries||p;if(y&&(a=Eu(y.call(new t)))!==Object.prototype&&a.next&&(Eu(a)!==Nu&&(po?po(a,Nu):_(a[Cu])||le(a,Cu,zu)),go(a,l,!0)),Au&&o==Lu&&p&&p.name!==Lu&&(ku?_t(v,"name",Lu):(d=!0,h=function(){return x(p,this)})),o)if(c={values:f(Lu),keys:i?h:f(Vu),entries:f(Du)},u)for(s in c)(Ru||d||!(s in v))&&le(v,s,c[s]);else _e({target:e,proto:!0,forced:Ru||d},c);return v[Cu]!==h&&le(v,Cu,h,{name:o}),So[e]=h,c},$u="Array Iterator",_u=ue.set,Bu=ue.getterFor($u),Hu=Fu(Array,"Array",(function(t,e){_u(this,{type:$u,target:$(t),index:0,kind:e})}),(function(){var t=Bu(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");So.Arguments=So.Array,In("keys"),In("values"),In("entries");var Gu=function(t,e,n){var r=Pt(e);r in t?$t.f(t,r,j(0,n)):t[r]=n},Wu=Ot("species"),Uu=function(t){return Y>=51||!b((function(){var e=[];return(e.constructor={})[Wu]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("slice"),qu=Ot("species"),Ku=m.Array,Xu=Math.max;_e({target:"Array",proto:!0,forced:!Uu},{slice:function(t,e){var n,r,o,i=$(this),u=we(i),a=ge(t,u),c=ge(void 0===e?u:e,u);if(An(i)&&(n=i.constructor,(zn(n)&&(n===Ku||An(n.prototype))||B(n)&&null===(n=n[qu]))&&(n=void 0),n===Ku||void 0===n))return Go(i,a,c);for(r=new(void 0===n?Ku:n)(Xu(c-a,0)),o=0;a<c;a++,o++)a in i&&Gu(r,o,i[a]);return r.length=o,r}});var Yu=fe.EXISTS,Ju=$t.f,Qu=Function.prototype,Zu=k(Qu.toString),ta=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,ea=k(ta.exec);w&&!Yu&&Ju(Qu,"name",{configurable:!0,get:function(){try{return ea(ta,Zu(this))[1]}catch(t){return""}}});var na=Tr.charAt,ra="String Iterator",oa=ue.set,ia=ue.getterFor(ra);Fu(String,"String",(function(t){oa(this,{type:ra,string:Ye(t),index:0})}),(function(){var t,e=ia(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=na(n,r),e.index+=t.length,{value:t,done:!1})}));var ua=m.Array,aa=Math.max,ca=Pe.f,sa="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],fa=function(t){try{return ca(t)}catch(t){return function(t,e,n){for(var r=we(t),o=ge(e,r),i=ge(void 0===n?r:n,r),u=ua(aa(i-o,0)),a=0;o<i;o++,a++)Gu(u,a,t[o]);return u.length=a,u}(sa)}},la={f:function(t){return sa&&"Window"==C(t)?fa(t):ca($(t))}},da=b((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),va=Object.isExtensible,pa=b((function(){va(1)}))||da?function(t){return!!B(t)&&((!da||"ArrayBuffer"!=C(t))&&(!va||va(t)))}:va,ha=!b((function(){return Object.isExtensible(Object.preventExtensions({}))})),ya=p((function(t){var e=$t.f,n=!1,r=bt("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=Pe.f,e=k([].splice),o={};o[r]=1,t(o).length&&(Pe.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},_e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:la.f}))},fastKey:function(t,e){if(!B(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!ht(t,r)){if(!pa(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!ht(t,r)){if(!pa(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return ha&&n&&pa(t)&&!ht(t,r)&&i(t),t}};Jt[r]=!0})),ga=ya.getWeakData,ma=ue.set,ba=ue.getterFor,wa=Gn.find,Sa=Gn.findIndex,xa=k([].splice),Ea=0,Oa=function(t){return t.frozen||(t.frozen=new Ia)},Ia=function(){this.entries=[]},ja=function(t,e){return wa(t.entries,(function(t){return t[0]===e}))};Ia.prototype={get:function(t){var e=ja(this,t);if(e)return e[1]},has:function(t){return!!ja(this,t)},set:function(t,e){var n=ja(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Sa(this.entries,(function(e){return e[0]===t}));return~e&&xa(this.entries,e,1),!!~e}};var Ma,Pa={getConstructor:function(t,e,n,r){var o=t((function(t,o){wo(t,i),ma(t,{type:e,id:Ea++,frozen:void 0}),null!=o&&ko(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=ba(e),a=function(t,e,n){var r=u(t),o=ga(Dt(e),!0);return!0===o?Oa(r).set(e,n):o[r.id]=n,t};return fo(i,{delete:function(t){var e=u(this);if(!B(t))return!1;var n=ga(t);return!0===n?Oa(e).delete(t):n&&ht(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!B(t))return!1;var n=ga(t);return!0===n?Oa(e).has(t):n&&ht(n,e.id)}}),fo(i,n?{get:function(t){var e=u(this);if(B(t)){var n=ga(t);return!0===n?Oa(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},Ta=ue.enforce,Aa=!m.ActiveXObject&&"ActiveXObject"in m,ka=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Na=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=k(a[t]);le(a,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!B(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return o&&!B(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!B(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(Fe(t,!_(u)||!(o||a.forEach&&!b((function(){(new u).entries().next()})))))c=n.getConstructor(e,t,r,i),ya.enable();else if(Fe(t,!0)){var l=new c,d=l[i](o?{}:-0,1)!=l,v=b((function(){l.has(1)})),p=$o((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)}));p||((c=e((function(t,e){wo(t,a);var n=function(t,e,n){var r,o;return po&&_(r=e.constructor)&&r!==n&&B(o=r.prototype)&&o!==n.prototype&&po(t,o),t}(new u,t,c);return null!=e&&ko(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=c),(v||h)&&(f("delete"),f("has"),r&&f("get")),(h||d)&&f(i),o&&a.clear&&delete a.clear}return s[t]=c,_e({global:!0,forced:c!=u},s),go(c,t),o||n.setStrong(c,t,r),c}("WeakMap",ka,Pa);if(Kt&&Aa){Ma=Pa.getConstructor(ka,"WeakMap",!0),ya.enable();var Ra=Na.prototype,Ca=k(Ra.delete),Va=k(Ra.has),La=k(Ra.get),Da=k(Ra.set);fo(Ra,{delete:function(t){if(B(t)&&!pa(t)){var e=Ta(this);return e.frozen||(e.frozen=new Ma),Ca(this,t)||e.frozen.delete(t)}return Ca(this,t)},has:function(t){if(B(t)&&!pa(t)){var e=Ta(this);return e.frozen||(e.frozen=new Ma),Va(this,t)||e.frozen.has(t)}return Va(this,t)},get:function(t){if(B(t)&&!pa(t)){var e=Ta(this);return e.frozen||(e.frozen=new Ma),Va(this,t)?La(this,t):e.frozen.get(t)}return La(this,t)},set:function(t,e){if(B(t)&&!pa(t)){var n=Ta(this);n.frozen||(n.frozen=new Ma),Va(this,t)?Da(this,t,e):n.frozen.set(t,e)}else Da(this,t,e);return this}})}var za=Ot("iterator"),Fa=Ot("toStringTag"),$a=Hu.values,_a=function(t,e){if(t){if(t[za]!==$a)try{_t(t,za,$a)}catch(e){t[za]=$a}if(t[Fa]||_t(t,Fa,e),Yr[e])for(var n in Hu)if(t[n]!==Hu[n])try{_t(t,n,Hu[n])}catch(e){t[n]=Hu[n]}}};for(var Ba in Yr)_a(m[Ba]&&m[Ba].prototype,Ba);function Ha(t){return t.getMenuConfig("uploadVideo")}_a(Zr,"DOMTokenList");var Ga=new WeakMap;function Wa(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=Ga.get(e);if(null!=n)return n;var r=Ha(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 fu(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;fu(e,l,void 0===d?"":d),o(t,n)}else u(t,n)},onError:function(t,e,n){s(t,e,n)}})),Ga.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 Ua=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 fu(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=Ha(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 fu(t,e,n)}))]:[3,5]);case 4:return s.sent(),[3,7];case 5:return[4,Wa(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 qa(){return io("w-e-insert-video")}var Ka=function(){function n(){this.title=t.t("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=qa(),this.heightInputId=qa(),this.buttonId=qa()}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],v=u.default(d),p=l(t.genModalInputElems(t.t("videoModule.height"),i,"auto"),2),h=p[0],y=p[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 v=S.style,p=void 0===v?{}:v;n.restoreSelection();var h={style:a(a({},p),{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 x=S.style,E=void 0===x?{}:x,O=E.width,I=void 0===O?"":O,j=E.height,M=void 0===j?"":j;return v.val(I),g.val(M),setTimeout((function(){v.focus()})),w[0]},n}();function Xa(){return io("w-e-edit-video")}var Ya=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=Xa(),this.posterInputId=Xa(),this.buttonId=Xa()}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),v=d[0],p=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(p),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=io("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 x=this.$content;x.empty(),x.append(v),x.append(y),x.append(w);var E=this.getSelectedVideoNode(n);if(null==E)return x[0];var O=E.src,I=void 0===O?"":O,j=E.poster,M=void 0===j?"":j;return m.val(I),b.val(M),setTimeout((function(){m.focus()})),x[0]},n}();var Ja={renderElems:[sn],elemsToHtml:[ln],preParseHtml:[Mn],parseElemsHtml:[co],menus:[{key:"insertVideo",factory:function(){return new du},config:{onInsertedVideo:function(t){},checkVideo:function(t,e){return!0},parseVideoSrc:function(t){return t}}},{key:"uploadVideo",factory:function(){return new Ua},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 Ka}},{key:"editVideoSrc",factory:function(){return new Ya}}],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 Ja}));
|
|
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,"<").replace(/>/g,">")),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}));
|
|
2
2
|
//# sourceMappingURL=index.js.map
|