@mnykj/wangeditoroptimize-video-module 1.0.0
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/README.md +3 -0
- package/dist/css/style.css +1 -0
- package/dist/index.esm.js +4528 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/video-module/src/constants/svg.d.ts +11 -0
- package/dist/video-module/src/index.d.ts +8 -0
- package/dist/video-module/src/locale/en.d.ts +20 -0
- package/dist/video-module/src/locale/index.d.ts +5 -0
- package/dist/video-module/src/locale/zh-CN.d.ts +20 -0
- package/dist/video-module/src/module/custom-types.d.ts +18 -0
- package/dist/video-module/src/module/elem-to-html.d.ts +11 -0
- package/dist/video-module/src/module/helper/align.d.ts +5 -0
- package/dist/video-module/src/module/helper/insert-video.d.ts +12 -0
- package/dist/video-module/src/module/helper/upload-videos.d.ts +6 -0
- package/dist/video-module/src/module/index.d.ts +7 -0
- package/dist/video-module/src/module/menu/EditVideoSizeMenu.d.ts +25 -0
- package/dist/video-module/src/module/menu/InsertVideoMenu.d.ts +25 -0
- package/dist/video-module/src/module/menu/UploadVideoMenu.d.ts +16 -0
- package/dist/video-module/src/module/menu/config.d.ts +33 -0
- package/dist/video-module/src/module/menu/index.d.ts +25 -0
- package/dist/video-module/src/module/parse-elem-html.d.ts +14 -0
- package/dist/video-module/src/module/plugin.d.ts +7 -0
- package/dist/video-module/src/module/pre-parse-html.d.ts +15 -0
- package/dist/video-module/src/module/render-elem.d.ts +13 -0
- package/dist/video-module/src/utils/dom.d.ts +28 -0
- package/dist/video-module/src/utils/util.d.ts +11 -0
- package/package.json +52 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@mnykj/wangeditoroptimize-core"),require("slate"),require("snabbdom"),require("dom7"),require("nanoid")):"function"==typeof define&&define.amd?define(["@mnykj/wangeditoroptimize-core","slate","snabbdom","dom7","nanoid"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorVideoModule=e(t.wangeditoroptimizeCore,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 a=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",width:"Width",height:"Height"}}),t.i18nAddResources("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",width:"宽度",height:"高度"}});var u=function(){return u=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},u.apply(this,arguments)};function c(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function u(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(a,u)}c((r=r.apply(t,e||[])).next())}))}function s(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){a.label=u[1];break}if(6===u[0]&&a.label<o[1]){a.label=o[1],o=u;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(u);break}o[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,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),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.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 a}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,g,y=function(t){return t&&t.Math==Math&&t},m=y("object"==typeof globalThis&&globalThis)||y("object"==typeof window&&window)||y("object"==typeof self&&self)||y("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,j={f:O&&!E.call({1:2},1)?function(t){var e=O(this,t);return!!e&&e.enumerable}:E},M=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},T=Function.prototype,I=T.bind,P=T.call,A=I&&I.bind(P),z=I?function(t){return t&&A(P,t)}:function(t){return t&&function(){return P.apply(t,arguments)}},k=z({}.toString),R=z("".slice),V=function(t){return R(k(t),8,-1)},L=m.Object,C=z("".split),H=b((function(){return!L("z").propertyIsEnumerable(0)}))?function(t){return"String"==V(t)?C(t,""):L(t)}:L,N=m.TypeError,D=function(t){if(null==t)throw N("Can't call method on "+t);return t},F=function(t){return H(D(t))},B=function(t){return"function"==typeof t},_=function(t){return"object"==typeof t?null!==t:B(t)},$=function(t){return B(t)?t:void 0},G=function(t,e){return arguments.length<2?$(m[t]):m[t]&&m[t][e]},W=z({}.isPrototypeOf),U=G("navigator","userAgent")||"",q=m.process,K=m.Deno,X=q&&q.versions||K&&K.version,Y=X&&X.v8;Y&&(g=(h=Y.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!g&&U&&(!(h=U.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=U.match(/Chrome\/(\d+)/))&&(g=+h[1]);var J=g,Q=!!Object.getOwnPropertySymbols&&!b((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&J&&J<41})),Z=Q&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,tt=m.Object,et=Z?function(t){return"symbol"==typeof t}:function(t){var e=G("Symbol");return B(e)&&W(e.prototype,tt(t))},nt=m.String,rt=function(t){try{return nt(t)}catch(t){return"Object"}},ot=m.TypeError,it=function(t){if(B(t))return t;throw ot(rt(t)+" is not a function")},at=function(t,e){var n=t[e];return null==n?void 0:it(n)},ut=m.TypeError,ct=Object.defineProperty,st=function(t,e){try{ct(m,t,{value:e,configurable:!0,writable:!0})}catch(n){m[t]=e}return e},ft="__core-js_shared__",lt=m[ft]||st(ft,{}),dt=p((function(t){(t.exports=function(t,e){return lt[t]||(lt[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),vt=m.Object,pt=function(t){return vt(D(t))},ht=z({}.hasOwnProperty),gt=Object.hasOwn||function(t,e){return ht(pt(t),e)},yt=0,mt=Math.random(),bt=z(1..toString),wt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+bt(++yt+mt,36)},St=dt("wks"),xt=m.Symbol,Et=xt&&xt.for,Ot=Z?xt:xt&&xt.withoutSetter||wt,jt=function(t){if(!gt(St,t)||!Q&&"string"!=typeof St[t]){var e="Symbol."+t;Q&>(xt,t)?St[t]=xt[t]:St[t]=Z&&Et?Et(e):Ot(e)}return St[t]},Mt=m.TypeError,Tt=jt("toPrimitive"),It=function(t,e){if(!_(t)||et(t))return t;var n,r=at(t,Tt);if(r){if(void 0===e&&(e="default"),n=x(r,t,e),!_(n)||et(n))return n;throw Mt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&B(n=t.toString)&&!_(r=x(n,t)))return r;if(B(n=t.valueOf)&&!_(r=x(n,t)))return r;if("string"!==e&&B(n=t.toString)&&!_(r=x(n,t)))return r;throw ut("Can't convert object to primitive value")}(t,e)},Pt=function(t){var e=It(t,"string");return et(e)?e:e+""},At=m.document,zt=_(At)&&_(At.createElement),kt=function(t){return zt?At.createElement(t):{}},Rt=!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=F(t),e=Pt(e),Rt)try{return Vt(t,e)}catch(t){}if(gt(t,e))return M(!x(j.f,t,e),t[e])}},Ct=m.String,Ht=m.TypeError,Nt=function(t){if(_(t))return t;throw Ht(Ct(t)+" is not an object")},Dt=m.TypeError,Ft=Object.defineProperty,Bt={f:w?Ft:function(t,e,n){if(Nt(t),e=Pt(e),Nt(n),Rt)try{return Ft(t,e,n)}catch(t){}if("get"in n||"set"in n)throw Dt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},_t=w?function(t,e,n){return Bt.f(t,e,M(1,n))}:function(t,e,n){return t[e]=n,t},$t=z(Function.toString);B(lt.inspectSource)||(lt.inspectSource=function(t){return $t(t)});var Gt,Wt,Ut,qt=lt.inspectSource,Kt=m.WeakMap,Xt=B(Kt)&&/native code/.test(qt(Kt)),Yt=dt("keys"),Jt=function(t){return Yt[t]||(Yt[t]=wt(t))},Qt={},Zt="Object already initialized",te=m.TypeError,ee=m.WeakMap;if(Xt||lt.state){var ne=lt.state||(lt.state=new ee),re=z(ne.get),oe=z(ne.has),ie=z(ne.set);Gt=function(t,e){if(oe(ne,t))throw new te(Zt);return e.facade=t,ie(ne,t,e),e},Wt=function(t){return re(ne,t)||{}},Ut=function(t){return oe(ne,t)}}else{var ae=Jt("state");Qt[ae]=!0,Gt=function(t,e){if(gt(t,ae))throw new te(Zt);return e.facade=t,_t(t,ae,e),e},Wt=function(t){return gt(t,ae)?t[ae]:{}},Ut=function(t){return gt(t,ae)}}var ue,ce,se={set:Gt,get:Wt,has:Ut,enforce:function(t){return Ut(t)?Wt(t):Gt(t,{})},getterFor:function(t){return function(e){var n;if(!_(e)||(n=Wt(e)).type!==t)throw te("Incompatible receiver, "+t+" required");return n}}},fe=Function.prototype,le=w&&Object.getOwnPropertyDescriptor,de=gt(fe,"name"),ve={EXISTS:de,PROPER:de&&"something"===function(){}.name,CONFIGURABLE:de&&(!w||w&&le(fe,"name").configurable)},pe=p((function(t){var e=ve.CONFIGURABLE,n=se.get,r=se.enforce,o=String(String).split("String");(t.exports=function(t,n,i,a){var u,c=!!a&&!!a.unsafe,s=!!a&&!!a.enumerable,f=!!a&&!!a.noTargetGet,l=a&&void 0!==a.name?a.name:n;B(i)&&("Symbol("===String(l).slice(0,7)&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!gt(i,"name")||e&&i.name!==l)&&_t(i,"name",l),(u=r(i)).source||(u.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:st(n,i)})(Function.prototype,"toString",(function(){return B(this)&&n(this).source||qt(this)}))})),he=Math.ceil,ge=Math.floor,ye=function(t){var e=+t;return e!=e||0===e?0:(e>0?ge:he)(e)},me=Math.max,be=Math.min,we=function(t,e){var n=ye(t);return n<0?me(n+e,0):be(n,e)},Se=Math.min,xe=function(t){return t>0?Se(ye(t),9007199254740991):0},Ee=function(t){return xe(t.length)},Oe=function(t){return function(e,n,r){var o,i=F(e),a=Ee(i),u=we(r,a);if(t&&n!=n){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===n)return t||u||0;return!t&&-1}},je={includes:Oe(!0),indexOf:Oe(!1)},Me=je.indexOf,Te=z([].push),Ie=function(t,e){var n,r=F(t),o=0,i=[];for(n in r)!gt(Qt,n)&>(r,n)&&Te(i,n);for(;e.length>o;)gt(r,n=e[o++])&&(~Me(i,n)||Te(i,n));return i},Pe=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ae=Pe.concat("length","prototype"),ze={f:Object.getOwnPropertyNames||function(t){return Ie(t,Ae)}},ke={f:Object.getOwnPropertySymbols},Re=z([].concat),Ve=G("Reflect","ownKeys")||function(t){var e=ze.f(Nt(t)),n=ke.f;return n?Re(e,n(t)):e},Le=function(t,e){for(var n=Ve(e),r=Bt.f,o=Lt.f,i=0;i<n.length;i++){var a=n[i];gt(t,a)||r(t,a,o(e,a))}},Ce=/#|\.prototype\./,He=function(t,e){var n=De[Ne(t)];return n==Be||n!=Fe&&(B(e)?b(e):!!e)},Ne=He.normalize=function(t){return String(t).replace(Ce,".").toLowerCase()},De=He.data={},Fe=He.NATIVE="N",Be=He.POLYFILL="P",_e=He,$e=Lt.f,Ge=function(t,e){var n,r,o,i,a,u=t.target,c=t.global,s=t.stat;if(n=c?m:s?m[u]||st(u,{}):(m[u]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(a=$e(n,r))&&a.value:n[r],!_e(c?r:u+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Le(i,o)}(t.sham||o&&o.sham)&&_t(i,"sham",!0),pe(n,r,i,t)}},We=z([].join),Ue=H!=Object,qe=(ue=",",!!(ce=[]["join"])&&b((function(){ce.call(null,ue||function(){throw 1},1)})));Ge({target:"Array",proto:!0,forced:Ue||!qe},{join:function(t){return We(F(this),void 0===t?",":t)}});var Ke=z(z.bind),Xe=function(t,e){return it(t),void 0===e?t:Ke?Ke(t,e):function(){return t.apply(e,arguments)}},Ye=Array.isArray||function(t){return"Array"==V(t)},Je={};Je[jt("toStringTag")]="z";var Qe="[object z]"===String(Je),Ze=jt("toStringTag"),tn=m.Object,en="Arguments"==V(function(){return arguments}()),nn=Qe?V: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=tn(t),Ze))?n:en?V(e):"Object"==(r=V(e))&&B(e.callee)?"Arguments":r},rn=function(){},on=[],an=G("Reflect","construct"),un=/^\s*(?:class|function)\b/,cn=z(un.exec),sn=!un.exec(rn),fn=function(t){if(!B(t))return!1;try{return an(rn,on,t),!0}catch(t){return!1}},ln=!an||b((function(){var t;return fn(fn.call)||!fn(Object)||!fn((function(){t=!0}))||t}))?function(t){if(!B(t))return!1;switch(nn(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return sn||!!cn(un,qt(t))}:fn,dn=jt("species"),vn=m.Array,pn=function(t,e){return new(function(t){var e;return Ye(t)&&(e=t.constructor,(ln(e)&&(e===vn||Ye(e.prototype))||_(e)&&null===(e=e[dn]))&&(e=void 0)),void 0===e?vn:e}(t))(0===e?0:e)},hn=z([].push),gn=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,a=7==t,u=5==t||i;return function(c,s,f,l){for(var d,v,p=pt(c),h=H(p),g=Xe(s,f),y=Ee(h),m=0,b=l||pn,w=e?b(c,y):n||a?b(c,0):void 0;y>m;m++)if((u||m in h)&&(v=g(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:hn(w,d)}else switch(t){case 4:return!1;case 7:hn(w,d)}return i?-1:r||o?o:w}},yn={forEach:gn(0),map:gn(1),filter:gn(2),some:gn(3),every:gn(4),find:gn(5),findIndex:gn(6),filterReject:gn(7)},mn=jt("species"),bn=function(t){return J>=51||!b((function(){var e=[];return(e.constructor={})[mn]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},wn=yn.filter,Sn=bn("filter");Ge({target:"Array",proto:!0,forced:!Sn},{filter:function(t){return wn(this,t,arguments.length>1?arguments[1]:void 0)}});var xn=Qe?{}.toString:function(){return"[object "+nn(this)+"]"};Qe||pe(Object.prototype,"toString",xn,{unsafe:!0});var En,On=m.String,jn=function(t){if("Symbol"===nn(t))throw TypeError("Cannot convert a Symbol value to a string");return On(t)},Mn=function(){var t=Nt(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},Tn=m.RegExp,In=b((function(){var t=Tn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),Pn=In||b((function(){return!Tn("a","y").sticky})),An={BROKEN_CARET:In||b((function(){var t=Tn("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:Pn,UNSUPPORTED_Y:In},zn=Object.keys||function(t){return Ie(t,Pe)},kn=w?Object.defineProperties:function(t,e){Nt(t);for(var n,r=F(e),o=zn(e),i=o.length,a=0;i>a;)Bt.f(t,n=o[a++],r[n]);return t},Rn=G("document","documentElement"),Vn=Jt("IE_PROTO"),Ln=function(){},Cn=function(t){return"<script>"+t+"</"+"script>"},Hn=function(t){t.write(Cn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Nn=function(){try{En=new ActiveXObject("htmlfile")}catch(t){}var t,e;Nn="undefined"!=typeof document?document.domain&&En?Hn(En):((e=kt("iframe")).style.display="none",Rn.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Cn("document.F=Object")),t.close(),t.F):Hn(En);for(var n=Pe.length;n--;)delete Nn.prototype[Pe[n]];return Nn()};Qt[Vn]=!0;var Dn,Fn,Bn=Object.create||function(t,e){var n;return null!==t?(Ln.prototype=Nt(t),n=new Ln,Ln.prototype=null,n[Vn]=t):n=Nn(),void 0===e?n:kn(n,e)},_n=m.RegExp,$n=b((function(){var t=_n(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),Gn=m.RegExp,Wn=b((function(){var t=Gn("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Un=se.get,qn=dt("native-string-replace",String.prototype.replace),Kn=RegExp.prototype.exec,Xn=Kn,Yn=z("".charAt),Jn=z("".indexOf),Qn=z("".replace),Zn=z("".slice),tr=(Fn=/b*/g,x(Kn,Dn=/a/,"a"),x(Kn,Fn,"a"),0!==Dn.lastIndex||0!==Fn.lastIndex),er=An.BROKEN_CARET,nr=void 0!==/()??/.exec("")[1];(tr||nr||er||$n||Wn)&&(Xn=function(t){var e,n,r,o,i,a,u,c=this,s=Un(c),f=jn(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=x(Xn,l,f),c.lastIndex=l.lastIndex,e;var d=s.groups,v=er&&c.sticky,p=x(Mn,c),h=c.source,g=0,y=f;if(v&&(p=Qn(p,"y",""),-1===Jn(p,"g")&&(p+="g"),y=Zn(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Yn(f,c.lastIndex-1))&&(h="(?: "+h+")",y=" "+y,g++),n=new RegExp("^(?:"+h+")",p)),nr&&(n=new RegExp("^"+h+"$(?!\\s)",p)),tr&&(r=c.lastIndex),o=x(Kn,v?n:c,y),v?o?(o.input=Zn(o.input,g),o[0]=Zn(o[0],g),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:tr&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),nr&&o&&o.length>1&&x(qn,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=a=Bn(null),i=0;i<d.length;i++)a[(u=d[i])[0]]=o[u[1]];return o});var rr=Xn;Ge({target:"RegExp",proto:!0,forced:/./.exec!==rr},{exec:rr});var or=Function.prototype,ir=or.apply,ar=or.bind,ur=or.call,cr="object"==typeof Reflect&&Reflect.apply||(ar?ur.bind(ir):function(){return ur.apply(ir,arguments)}),sr=jt("species"),fr=RegExp.prototype,lr=z("".charAt),dr=z("".charCodeAt),vr=z("".slice),pr=function(t){return function(e,n){var r,o,i=jn(D(e)),a=ye(n),u=i.length;return a<0||a>=u?t?"":void 0:(r=dr(i,a))<55296||r>56319||a+1===u||(o=dr(i,a+1))<56320||o>57343?t?lr(i,a):r:t?vr(i,a,a+2):o-56320+(r-55296<<10)+65536}},hr={codeAt:pr(!1),charAt:pr(!0)},gr=hr.charAt,yr=function(t,e,n){return e+(n?gr(t,e).length:1)},mr=Math.floor,br=z("".charAt),wr=z("".replace),Sr=z("".slice),xr=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Er=/\$([$&'`]|\d{1,2})/g,Or=function(t,e,n,r,o,i){var a=n+t.length,u=r.length,c=Er;return void 0!==o&&(o=pt(o),c=xr),wr(i,c,(function(i,c){var s;switch(br(c,0)){case"$":return"$";case"&":return t;case"`":return Sr(e,0,n);case"'":return Sr(e,a);case"<":s=o[Sr(c,1,-1)];break;default:var f=+c;if(0===f)return i;if(f>u){var l=mr(f/10);return 0===l?i:l<=u?void 0===r[l-1]?br(c,1):r[l-1]+br(c,1):i}s=r[f-1]}return void 0===s?"":s}))},jr=m.TypeError,Mr=function(t,e){var n=t.exec;if(B(n)){var r=x(n,t,e);return null!==r&&Nt(r),r}if("RegExp"===V(t))return x(rr,t,e);throw jr("RegExp#exec called on incompatible receiver")},Tr=jt("replace"),Ir=Math.max,Pr=Math.min,Ar=z([].concat),zr=z([].push),kr=z("".indexOf),Rr=z("".slice),Vr="$0"==="a".replace(/./,"$0"),Lr=!!/./[Tr]&&""===/./[Tr]("a","$0");!function(t,e,n,r){var o=jt(t),i=!b((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!b((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[sr]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!a||n){var u=z(/./[o]),c=e(o,""[t],(function(t,e,n,r,o){var a=z(t),c=e.exec;return c===rr||c===fr.exec?i&&!o?{done:!0,value:u(e,n,r)}:{done:!0,value:a(n,e,r)}:{done:!1}}));pe(String.prototype,t,c[0]),pe(fr,o,c[1])}r&&_t(fr[o],"sham",!0)}("replace",(function(t,e,n){var r=Lr?"$":"$0";return[function(t,n){var r=D(this),o=null==t?void 0:at(t,Tr);return o?x(o,t,r,n):x(e,jn(r),t,n)},function(t,o){var i=Nt(this),a=jn(t);if("string"==typeof o&&-1===kr(o,r)&&-1===kr(o,"$<")){var u=n(e,i,a,o);if(u.done)return u.value}var c=B(o);c||(o=jn(o));var s=i.global;if(s){var f=i.unicode;i.lastIndex=0}for(var l=[];;){var d=Mr(i,a);if(null===d)break;if(zr(l,d),!s)break;""===jn(d[0])&&(i.lastIndex=yr(a,xe(i.lastIndex),f))}for(var v,p="",h=0,g=0;g<l.length;g++){for(var y=jn((d=l[g])[0]),m=Ir(Pr(ye(d.index),a.length),0),b=[],w=1;w<d.length;w++)zr(b,void 0===(v=d[w])?v:String(v));var S=d.groups;if(c){var x=Ar([y],b,m,a);void 0!==S&&zr(x,S);var E=jn(cr(o,void 0,x))}else E=Or(y,a,m,b,S,o);m>=h&&(p+=Rr(a,h,m)+E,h=m+y.length)}return p+Rr(a,h)}]}),!!b((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Vr||Lr);var Cr="\t\n\v\f\r \u2028\u2029\ufeff",Hr=z("".replace),Nr="["+Cr+"]",Dr=RegExp("^"+Nr+Nr+"*"),Fr=RegExp(Nr+Nr+"*$"),Br=function(t){return function(e){var n=jn(D(e));return 1&t&&(n=Hr(n,Dr,"")),2&t&&(n=Hr(n,Fr,"")),n}},_r={start:Br(1),end:Br(2),trim:Br(3)},$r=ve.PROPER,Gr=_r.trim;function Wr(t){return t.length?t[0].tagName.toLowerCase():""}function Ur(t,e,n){void 0===e&&(e="auto"),void 0===n&&(n="auto");var r=a.default(t);return r.attr("width",e),r.attr("height",n),r[0].outerHTML}function qr(t){var e=String(t||"").toLowerCase();return"center"===e||"right"===e?e:"left"}Ge({target:"String",proto:!0,forced:function(t){return b((function(){return!!Cr[t]()||"
"!=="
"[t]()||$r&&Cr[t].name!==t}))}("trim")},{trim:function(){return Gr(this)}}),Ge({global:!0},{globalThis:m}),r.append&&(a.default.fn.append=r.append),r.on&&(a.default.fn.on=r.on),r.focus&&(a.default.fn.focus=r.focus),r.attr&&(a.default.fn.attr=r.attr),r.val&&(a.default.fn.val=r.val),r.html&&(a.default.fn.html=r.html),r.parent&&(a.default.fn.parent=r.parent),r.hasClass&&(a.default.fn.hasClass=r.hasClass),r.empty&&(a.default.fn.empty=r.empty);function Kr(t){var e;return"100%"===String((null===(e=t)||void 0===e?void 0:e.width)||"")}function Xr(t,e,r,o){void 0===o&&(o={});var i=o.disabled,a=void 0!==i&&i,c=o.active,s=["mdg-video-btn",a?"is-disabled":"",void 0!==c&&c?"is-active":""].filter(Boolean).join(" ");return n.h("button",{attrs:u({type:"button",class:s,title:e,"data-video-action":t},a?{disabled:"disabled"}:{}),props:{contentEditable:!1,disabled:a},hook:{insert:function(t){var e=t.elm;e&&(e.innerHTML=r)},postpatch:function(t,e){var n=e.elm;n&&n.innerHTML!==r&&(n.innerHTML=r)}}})}function Yr(e,n){try{var r=t.resolveElemPath(e,n);return!!(null==r?void 0:r.length)&&(e.select({anchor:{path:r,offset:0},focus:{path:r,offset:0}}),!0)}catch(t){return!1}}function Jr(t,n){try{return e.Node.get(t,n)}catch(t){return null}}var Qr={type:"video",renderElem:function(r,o,i){var a=r,u=t.DomEditor.isNodeSelected(i,r),c=function(t){var e=t.src,r=void 0===e?"":e,o=t.poster,i=void 0===o?"":o,a=t.width,u=void 0===a?"auto":a,c=t.height,s=void 0===c?"auto":c;if(0===r.trim().indexOf("<iframe ")){var f=Ur(r,u,s);return n.h("div",{attrs:{class:"mdg-video-iframe-host"+("100%"===u?" is-full-width":"")},hook:{insert:function(t){t.elm&&(t.elm.innerHTML=f)},postpatch:function(t,e){e.elm&&e.elm.innerHTML!==f&&(e.elm.innerHTML=f)}}})}var l=n.jsx("video",{poster:i,controls:!0},n.jsx("source",{src:r,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.");return"auto"!==u&&(l.data.width=u),"auto"!==s&&(l.data.height=s),l}(a),s=qr(a.align),f={display:"flex",flexDirection:"column",alignItems:"center"===s?"center":"right"===s?"flex-end":"flex-start"};if(i.isDisabled())return n.h("div",{props:{contentEditable:!1},on:{mousedown:function(t){return t.preventDefault()}}},[n.h("div",{attrs:{class:"w-e-textarea-video-container","data-selected":u?"true":"false","data-align":s},style:f},[c])]);var l=!1;try{var d=t.DomEditor.findPath(i,r);l=t.canRemoveEmptyLineAboveBlock(i,d)}catch(t){l=!1}var v=Kr(a),p=n.h("div",{attrs:{class:"mdg-video-toolbar",contenteditable:"false","data-mdg-video-toolbar":"1"},props:{contentEditable:!1},style:{alignSelf:"stretch"},on:{mousedown:function(t){t.preventDefault(),t.stopPropagation()},click:function(n){var o,a;n.preventDefault(),n.stopPropagation();var u=n.target,c=null===(o=null==u?void 0:u.closest)||void 0===o?void 0:o.call(u,"button[data-video-action]"),s=null===(a=null==c?void 0:c.getAttribute)||void 0===a?void 0:a.call(c,"data-video-action");c&&s&&!c.classList.contains("is-disabled")&&function(n,r,o){var i,a;if(n&&!n.isDestroyed&&!n.isDisabled()){var u=t.resolveElemPath(n,r);if(null==u?void 0:u.length)if("enter"!==o)if("cancel-enter"!==o)if("align-left"!==o&&"align-center"!==o&&"align-right"!==o)if("full-width"!==o)if("edit-size"!==o){if("remove"===o){var c=Jr(n,u)||r;t.replaceBlockWithEmptyLine(n,u,c)}}else{if(!Yr(n,r))return;l=Jr(n,u)||r;var s=window.prompt("宽度(如 400 / auto / 100%)",String(null!==(i=l.width)&&void 0!==i?i:"auto"));if(null==s)return;var f=window.prompt("高度(如 300 / auto)",String(null!==(a=l.height)&&void 0!==a?a:"auto"));if(null==f)return;e.Transforms.setNodes(n,{width:s.trim()||"auto",height:f.trim()||"auto"},{at:u})}else{if(!Yr(n,r))return;var l,d=Kr(l=t.DomEditor.getSelectedNodeByType(n,"video")||r)?"auto":"100%";e.Transforms.setNodes(n,{width:d,height:"auto"},{at:u})}else{if(!Yr(n,r))return;var v=o.replace("align-","");e.Transforms.setNodes(n,{align:qr(v)},{at:u})}else t.removeEmptyLineAboveTopLevelBlock(n,u);else t.insertEmptyLineAboveAtPath(n,u)}}(i,r,s)}}},[Xr("enter","回车(上方空行)",'<svg viewBox="0 0 1255 1024"><path d="M1095.111111 731.477333h-625.777778V1024L0 658.318222 469.333333 292.408889v292.636444h625.777778V0h156.444445v731.477333z"></path></svg>'),Xr("cancel-enter","取消回车",'<svg viewBox="0 0 1024 1024"><path d="M436 680H124v-56h312l-124-124 42-42 220 220-42-42 124-124z"></path><path d="M198 128l64-64 628 628-64 64z"></path></svg>',{disabled:!l}),Xr("edit-size","修改尺寸",'<svg viewBox="0 0 1024 1024"><path d="M128 128h320v64H192v256H128V128zm768 0v320h-64V192H576v-64h320zM128 896V576h64v256h256v64H128zm768 0H576v-64h256V576h64v320z"></path></svg>'),Xr("align-left","左对齐",'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',{active:"left"===s}),Xr("align-center","居中",'<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',{active:"center"===s}),Xr("align-right","右对齐",'<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',{active:"right"===s}),Xr("full-width","宽度自适应",'<svg viewBox="0 0 1228 1024"><path d="M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1 15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z"></path></svg>',{active:v}),Xr("remove","删除",'<svg viewBox="0 0 1024 1024"><path d="M360 184h304v-40H360v40zM184 264h656v72H184V264zm72 120v456c0 22 18 40 40 40h432c22 0 40-18 40-40V384H256zm120 88h64v280h-64V472zm208 0h64v280h-64V472z"></path></svg>')]);return n.h("div",{props:{contentEditable:!1},on:{mousedown:function(t){return t.preventDefault()}}},[n.h("div",{attrs:{class:"w-e-textarea-video-container mdg-video-with-toolbar","data-selected":u?"true":"false","data-align":s},style:f},[p,c])])}};var Zr={type:"video",elemToHtml:function(t,e){var n=t,r=n.src,o=void 0===r?"":r,i=n.poster,a=void 0===i?"":i,u=n.width,c=void 0===u?"auto":u,s=n.height,f=void 0===s?"auto":s,l=qr(n.align),d='<div data-w-e-type="video" data-w-e-is-void'+("left"!==l?' data-align="'+l+'"':"")+("left"!==l?' style="text-align: '+l+';"':"")+">\n";return 0===o.trim().indexOf("<iframe ")?d+=Ur(o,c,f):d+='<video poster="'+a+'" controls="true" width="'+c+'" height="'+f+'"><source src="'+o+'" type="video/mp4"/></video>',d+="\n</div>"}},to=jt("unscopables"),eo=Array.prototype;null==eo[to]&&Bt.f(eo,to,{configurable:!0,value:Bn(null)});var no=function(t){eo[to][t]=!0},ro=je.includes;Ge({target:"Array",proto:!0},{includes:function(t){return ro(this,t,arguments.length>1?arguments[1]:void 0)}}),no("includes");var oo={selector:"iframe,video,p",preParseHtml:function(t){var e=a.default(t),n=e;if("p"===Wr(e)){var r=e.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=a.default(o))}}var u=Wr(n);if("iframe"!==u&&"video"!==u)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var c=a.default('<div data-w-e-type="video" data-w-e-is-void></div>');return c.append(n),c[0]}},io=yn.find,ao="find",uo=!0;function co(t,e,n,r,o){void 0===e&&(e=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o="left");var i={type:"video",src:t,poster:e,width:n,height:r,children:[{text:""}]};return"left"!==o&&(i.align=o),i}ao in[]&&Array(1).find((function(){uo=!1})),Ge({target:"Array",proto:!0,forced:uo},{find:function(t){return io(this,t,arguments.length>1?arguments[1]:void 0)}}),no(ao);var so={selector:'div[data-w-e-type="video"]',parseElemHtml:function(t,e,n){var r=a.default(t),o="",i="",u="auto",c="auto",s=function(t){var e,n;return qr((null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"data-align"))||("string"==typeof(null===(n=t.style)||void 0===n?void 0:n.textAlign)?t.style.textAlign:"")||"")}(t),f=r.find("iframe");if(f.length>0)return u=f.attr("width")||"auto",c=f.attr("height")||"auto",co(o=f[0].outerHTML,i,u,c,s);var l=r.find("video");return(o=l.attr("src")||"")||l.length>0&&(o=l.find("source").attr("src")||""),u=l.attr("width")||"auto",c=l.attr("height")||"auto",co(o,i=l.attr("poster")||"",u,c,s)}};function fo(t){return void 0===t&&(t="r"),t+"-"+o.nanoid()}var lo=m.Promise,vo=function(t,e,n){for(var r in e)pe(t,r,e[r],n);return t},po=m.String,ho=m.TypeError,go=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=z(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Nt(n),function(t){if("object"==typeof t||B(t))return t;throw ho("Can't set "+po(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),yo=Bt.f,mo=jt("toStringTag"),bo=function(t,e,n){t&&!gt(t=n?t:t.prototype,mo)&&yo(t,mo,{configurable:!0,value:e})},wo=jt("species"),So=m.TypeError,xo=function(t,e){if(W(e,t))return t;throw So("Incorrect invocation")},Eo={},Oo=jt("iterator"),jo=Array.prototype,Mo=jt("iterator"),To=function(t){if(null!=t)return at(t,Mo)||at(t,"@@iterator")||Eo[nn(t)]},Io=m.TypeError,Po=function(t,e,n){var r,o;Nt(t);try{if(!(r=at(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 Nt(r),n},Ao=m.TypeError,zo=function(t,e){this.stopped=t,this.result=e},ko=zo.prototype,Ro=function(t,e,n){var r,o,i,a,u,c,s,f,l=n&&n.that,d=!(!n||!n.AS_ENTRIES),v=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),h=Xe(e,l),g=function(t){return r&&Po(r,"normal",t),new zo(!0,t)},y=function(t){return d?(Nt(t),p?h(t[0],t[1],g):h(t[0],t[1])):p?h(t,g):h(t)};if(v)r=t;else{if(!(o=To(t)))throw Ao(rt(t)+" is not iterable");if(void 0!==(f=o)&&(Eo.Array===f||jo[Oo]===f)){for(i=0,a=Ee(t);a>i;i++)if((u=y(t[i]))&&W(ko,u))return u;return new zo(!1)}r=function(t,e){var n=arguments.length<2?To(t):e;if(it(n))return Nt(x(n,t));throw Io(rt(t)+" is not iterable")}(t,o)}for(c=r.next;!(s=x(c,r)).done;){try{u=y(s.value)}catch(t){Po(r,"throw",t)}if("object"==typeof u&&u&&W(ko,u))return u}return new zo(!1)},Vo=jt("iterator"),Lo=!1;try{var Co=0,Ho={next:function(){return{done:!!Co++}},return:function(){Lo=!0}};Ho[Vo]=function(){return this},Array.from(Ho,(function(){throw 2}))}catch(t){}var No,Do,Fo,Bo,_o=function(t,e){if(!e&&!Lo)return!1;var n=!1;try{var r={};r[Vo]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},$o=m.TypeError,Go=jt("species"),Wo=function(t,e){var n,r=Nt(t).constructor;return void 0===r||null==(n=Nt(r)[Go])?e:function(t){if(ln(t))return t;throw $o(rt(t)+" is not a constructor")}(n)},Uo=z([].slice),qo=/(?:ipad|iphone|ipod).*applewebkit/i.test(U),Ko="process"==V(m.process),Xo=m.setImmediate,Yo=m.clearImmediate,Jo=m.process,Qo=m.Dispatch,Zo=m.Function,ti=m.MessageChannel,ei=m.String,ni=0,ri={},oi="onreadystatechange";try{No=m.location}catch(t){}var ii=function(t){if(gt(ri,t)){var e=ri[t];delete ri[t],e()}},ai=function(t){return function(){ii(t)}},ui=function(t){ii(t.data)},ci=function(t){m.postMessage(ei(t),No.protocol+"//"+No.host)};Xo&&Yo||(Xo=function(t){var e=Uo(arguments,1);return ri[++ni]=function(){cr(B(t)?t:Zo(t),void 0,e)},Do(ni),ni},Yo=function(t){delete ri[t]},Ko?Do=function(t){Jo.nextTick(ai(t))}:Qo&&Qo.now?Do=function(t){Qo.now(ai(t))}:ti&&!qo?(Bo=(Fo=new ti).port2,Fo.port1.onmessage=ui,Do=Xe(Bo.postMessage,Bo)):m.addEventListener&&B(m.postMessage)&&!m.importScripts&&No&&"file:"!==No.protocol&&!b(ci)?(Do=ci,m.addEventListener("message",ui,!1)):Do=oi in kt("script")?function(t){Rn.appendChild(kt("script")).onreadystatechange=function(){Rn.removeChild(this),ii(t)}}:function(t){setTimeout(ai(t),0)});var si,fi,li,di,vi,pi,hi,gi,yi={set:Xo,clear:Yo},mi=/ipad|iphone|ipod/i.test(U)&&void 0!==m.Pebble,bi=/web0s(?!.*chrome)/i.test(U),wi=Lt.f,Si=yi.set,xi=m.MutationObserver||m.WebKitMutationObserver,Ei=m.document,Oi=m.process,ji=m.Promise,Mi=wi(m,"queueMicrotask"),Ti=Mi&&Mi.value;Ti||(si=function(){var t,e;for(Ko&&(t=Oi.domain)&&t.exit();fi;){e=fi.fn,fi=fi.next;try{e()}catch(t){throw fi?di():li=void 0,t}}li=void 0,t&&t.enter()},qo||Ko||bi||!xi||!Ei?!mi&&ji&&ji.resolve?((hi=ji.resolve(void 0)).constructor=ji,gi=Xe(hi.then,hi),di=function(){gi(si)}):Ko?di=function(){Oi.nextTick(si)}:(Si=Xe(Si,m),di=function(){Si(si)}):(vi=!0,pi=Ei.createTextNode(""),new xi(si).observe(pi,{characterData:!0}),di=function(){pi.data=vi=!vi}));var Ii,Pi,Ai,zi,ki=Ti||function(t){var e={fn:t,next:void 0};li&&(li.next=e),fi||(fi=e,di()),li=e},Ri=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=it(e),this.reject=it(n)},Vi={f:function(t){return new Ri(t)}},Li=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ci="object"==typeof window,Hi=yi.set,Ni=jt("species"),Di="Promise",Fi=se.getterFor(Di),Bi=se.set,_i=se.getterFor(Di),$i=lo&&lo.prototype,Gi=lo,Wi=$i,Ui=m.TypeError,qi=m.document,Ki=m.process,Xi=Vi.f,Yi=Xi,Ji=!!(qi&&qi.createEvent&&m.dispatchEvent),Qi=B(m.PromiseRejectionEvent),Zi="unhandledrejection",ta=!1,ea=_e(Di,(function(){var t=qt(Gi),e=t!==String(Gi);if(!e&&66===J)return!0;if(J>=51&&/native code/.test(t))return!1;var n=new Gi((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[Ni]=r,!(ta=n.then((function(){}))instanceof r)||!e&&Ci&&!Qi})),na=ea||!_o((function(t){Gi.all(t).catch((function(){}))})),ra=function(t){var e;return!(!_(t)||!B(e=t.then))&&e},oa=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;ki((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,u,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&&ca(t),t.rejection=1),!0===f?a=r:(v&&v.enter(),a=f(r),v&&(v.exit(),c=!0)),a===s.promise?d(Ui("Promise-chain cycle")):(u=ra(a))?x(u,a,l,d):l(a)):d(r)}catch(t){v&&!c&&v.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&aa(t)}))}},ia=function(t,e,n){var r,o;Ji?((r=qi.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),m.dispatchEvent(r)):r={promise:e,reason:n},!Qi&&(o=m["on"+t])?o(r):t===Zi&&function(t,e){var n=m.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},aa=function(t){x(Hi,m,(function(){var e,n=t.facade,r=t.value;if(ua(t)&&(e=Li((function(){Ko?Ki.emit("unhandledRejection",r,n):ia(Zi,n,r)})),t.rejection=Ko||ua(t)?2:1,e.error))throw e.value}))},ua=function(t){return 1!==t.rejection&&!t.parent},ca=function(t){x(Hi,m,(function(){var e=t.facade;Ko?Ki.emit("rejectionHandled",e):ia("rejectionhandled",e,t.value)}))},sa=function(t,e,n){return function(r){t(e,r,n)}},fa=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,oa(t,!0))},la=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Ui("Promise can't be resolved itself");var r=ra(e);r?ki((function(){var n={done:!1};try{x(r,e,sa(la,n,t),sa(fa,n,t))}catch(e){fa(n,e,t)}})):(t.value=e,t.state=1,oa(t,!1))}catch(e){fa({done:!1},e,t)}}};if(ea&&(Wi=(Gi=function(t){xo(this,Wi),it(t),x(Ii,this);var e=Fi(this);try{t(sa(la,e),sa(fa,e))}catch(t){fa(e,t)}}).prototype,(Ii=function(t){Bi(this,{type:Di,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=vo(Wi,{then:function(t,e){var n=_i(this),r=n.reactions,o=Xi(Wo(this,Gi));return o.ok=!B(t)||t,o.fail=B(e)&&e,o.domain=Ko?Ki.domain:void 0,n.parent=!0,r[r.length]=o,0!=n.state&&oa(n,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),Pi=function(){var t=new Ii,e=Fi(t);this.promise=t,this.resolve=sa(la,e),this.reject=sa(fa,e)},Vi.f=Xi=function(t){return t===Gi||t===Ai?new Pi(t):Yi(t)},B(lo)&&$i!==Object.prototype)){zi=$i.then,ta||(pe($i,"then",(function(t,e){var n=this;return new Gi((function(t,e){x(zi,n,t,e)})).then(t,e)}),{unsafe:!0}),pe($i,"catch",Wi.catch,{unsafe:!0}));try{delete $i.constructor}catch(t){}go&&go($i,Wi)}function da(t,n,r){return void 0===r&&(r=""),c(this,void 0,void 0,(function(){var o,i,a,u,c,f,l;return s(this,(function(s){switch(s.label){case 0:return n?(t.restoreSelection(),o=t.getMenuConfig("insertVideo"),i=o.onInsertedVideo,a=o.checkVideo,u=o.parseVideoSrc,[4,a(n,r)]):[2];case 1:return"string"==typeof(c=s.sent())?(t.alert(c,"error"),[2]):null==c?[2]:[4,u(n)];case 2:return 0!==(f=s.sent()).trim().indexOf("<iframe ")&&(f=f.replace(/</g,"<").replace(/>/g,">")),l={type:"video",src:f,poster:r,children:[{text:""}]},Promise.resolve().then((function(){e.Transforms.insertNodes(t,l)})),i(l),[2]}}))}))}function va(){return fo("w-e-insert-video")}Ge({global:!0,wrap:!0,forced:ea},{Promise:Gi}),bo(Gi,Di,!1),function(t){var e=G(t),n=Bt.f;w&&e&&!e[wo]&&n(e,wo,{configurable:!0,get:function(){return this}})}(Di),Ai=G(Di),Ge({target:Di,stat:!0,forced:ea},{reject:function(t){var e=Xi(this);return x(e.reject,void 0,t),e.promise}}),Ge({target:Di,stat:!0,forced:ea},{resolve:function(t){return function(t,e){if(Nt(t),_(e)&&e.constructor===t)return e;var n=Vi.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),Ge({target:Di,stat:!0,forced:na},{all:function(t){var e=this,n=Xi(e),r=n.resolve,o=n.reject,i=Li((function(){var n=it(e.resolve),i=[],a=0,u=1;Ro(t,(function(t){var c=a++,s=!1;u++,x(n,e,t).then((function(t){s||(s=!0,i[c]=t,--u||r(i))}),o)})),--u||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=Xi(e),r=n.reject,o=Li((function(){var o=it(e.resolve);Ro(t,(function(t){x(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var pa,ha,ga,ya=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=va(),this.posterInputId=va(),this.buttonId=va()}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,u=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],g=p[1],y=a.default(v),m=a.default(g),b=l(t.genModalButtonElems(u,t.t("videoModule.ok")),1)[0];if(null==this.$content){var w=a.default("<div></div>");w.on("click","#"+u,(function(t){return c(n,void 0,void 0,(function(){var n,r;return s(this,(function(a){switch(a.label){case 0:return t.preventDefault(),n=w.find("#"+o).val().trim(),r=w.find("#"+i).val().trim(),[4,da(e,n,r)];case 1:return a.sent(),e.hidePanelOrModal(),[2]}}))}))})),this.$content=w}var S=this.$content;return S.empty(),S.append(d),S.append(h),S.append(b),y.val(""),m.val(""),setTimeout((function(){y.focus()})),S[0]},n}(),ma=!b((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ba=Jt("IE_PROTO"),wa=m.Object,Sa=wa.prototype,xa=ma?wa.getPrototypeOf:function(t){var e=pt(t);if(gt(e,ba))return e[ba];var n=e.constructor;return B(n)&&e instanceof n?n.prototype:e instanceof wa?Sa:null},Ea=jt("iterator"),Oa=!1;[].keys&&("next"in(ga=[].keys())?(ha=xa(xa(ga)))!==Object.prototype&&(pa=ha):Oa=!0);var ja=null==pa||b((function(){var t={};return pa[Ea].call(t)!==t}));ja&&(pa={}),B(pa[Ea])||pe(pa,Ea,(function(){return this}));var Ma={IteratorPrototype:pa,BUGGY_SAFARI_ITERATORS:Oa},Ta=Ma.IteratorPrototype,Ia=function(){return this},Pa=ve.PROPER,Aa=ve.CONFIGURABLE,za=Ma.IteratorPrototype,ka=Ma.BUGGY_SAFARI_ITERATORS,Ra=jt("iterator"),Va="keys",La="values",Ca="entries",Ha=function(){return this},Na=function(t,e,n,r,o,i,a){!function(t,e,n,r){var o=e+" Iterator";t.prototype=Bn(Ta,{next:M(+!r,n)}),bo(t,o,!1),Eo[o]=Ia}(n,e,r);var u,c,s,f=function(t){if(t===o&&h)return h;if(!ka&&t in v)return v[t];switch(t){case Va:case La:case Ca:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",d=!1,v=t.prototype,p=v[Ra]||v["@@iterator"]||o&&v[o],h=!ka&&p||f(o),g="Array"==e&&v.entries||p;if(g&&(u=xa(g.call(new t)))!==Object.prototype&&u.next&&(xa(u)!==za&&(go?go(u,za):B(u[Ra])||pe(u,Ra,Ha)),bo(u,l,!0)),Pa&&o==La&&p&&p.name!==La&&(Aa?_t(v,"name",La):(d=!0,h=function(){return x(p,this)})),o)if(c={values:f(La),keys:i?h:f(Va),entries:f(Ca)},a)for(s in c)(ka||d||!(s in v))&&pe(v,s,c[s]);else Ge({target:e,proto:!0,forced:ka||d},c);return v[Ra]!==h&&pe(v,Ra,h,{name:o}),Eo[e]=h,c},Da="Array Iterator",Fa=se.set,Ba=se.getterFor(Da),_a=Na(Array,"Array",(function(t,e){Fa(this,{type:Da,target:F(t),index:0,kind:e})}),(function(){var t=Ba(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");Eo.Arguments=Eo.Array,no("keys"),no("values"),no("entries");var $a=hr.charAt,Ga="String Iterator",Wa=se.set,Ua=se.getterFor(Ga);Na(String,"String",(function(t){Wa(this,{type:Ga,string:jn(t),index:0})}),(function(){var t,e=Ua(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=$a(n,r),e.index+=t.length,{value:t,done:!1})}));var qa=function(t,e,n){var r=Pt(e);r in t?Bt.f(t,r,M(0,n)):t[r]=n},Ka=m.Array,Xa=Math.max,Ya=ze.f,Ja="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Qa=function(t){try{return Ya(t)}catch(t){return function(t,e,n){for(var r=Ee(t),o=we(e,r),i=we(void 0===n?r:n,r),a=Ka(Xa(i-o,0)),u=0;o<i;o++,u++)qa(a,u,t[o]);return a.length=u,a}(Ja)}},Za={f:function(t){return Ja&&"Window"==V(t)?Qa(t):Ya(F(t))}},tu=b((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),eu=Object.isExtensible,nu=b((function(){eu(1)}))||tu?function(t){return!!_(t)&&((!tu||"ArrayBuffer"!=V(t))&&(!eu||eu(t)))}:eu,ru=!b((function(){return Object.isExtensible(Object.preventExtensions({}))})),ou=p((function(t){var e=Bt.f,n=!1,r=wt("meta"),o=0,i=function(t){e(t,r,{value:{objectID:"O"+o++,weakData:{}}})},a=t.exports={enable:function(){a.enable=function(){},n=!0;var t=ze.f,e=z([].splice),o={};o[r]=1,t(o).length&&(ze.f=function(n){for(var o=t(n),i=0,a=o.length;i<a;i++)if(o[i]===r){e(o,i,1);break}return o},Ge({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Za.f}))},fastKey:function(t,e){if(!_(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!gt(t,r)){if(!nu(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!gt(t,r)){if(!nu(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return ru&&n&&nu(t)&&!gt(t,r)&&i(t),t}};Qt[r]=!0})),iu=ou.getWeakData,au=se.set,uu=se.getterFor,cu=yn.find,su=yn.findIndex,fu=z([].splice),lu=0,du=function(t){return t.frozen||(t.frozen=new vu)},vu=function(){this.entries=[]},pu=function(t,e){return cu(t.entries,(function(t){return t[0]===e}))};vu.prototype={get:function(t){var e=pu(this,t);if(e)return e[1]},has:function(t){return!!pu(this,t)},set:function(t,e){var n=pu(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=su(this.entries,(function(e){return e[0]===t}));return~e&&fu(this.entries,e,1),!!~e}};var hu,gu={getConstructor:function(t,e,n,r){var o=t((function(t,o){xo(t,i),au(t,{type:e,id:lu++,frozen:void 0}),null!=o&&Ro(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,a=uu(e),u=function(t,e,n){var r=a(t),o=iu(Nt(e),!0);return!0===o?du(r).set(e,n):o[r.id]=n,t};return vo(i,{delete:function(t){var e=a(this);if(!_(t))return!1;var n=iu(t);return!0===n?du(e).delete(t):n&>(n,e.id)&&delete n[e.id]},has:function(t){var e=a(this);if(!_(t))return!1;var n=iu(t);return!0===n?du(e).has(t):n&>(n,e.id)}}),vo(i,n?{get:function(t){var e=a(this);if(_(t)){var n=iu(t);return!0===n?du(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return u(this,t,e)}}:{add:function(t){return u(this,t,!0)}}),o}},yu=se.enforce,mu=!m.ActiveXObject&&"ActiveXObject"in m,bu=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},wu=function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",a=m[t],u=a&&a.prototype,c=a,s={},f=function(t){var e=z(u[t]);pe(u,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!_(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return o&&!_(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!_(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(_e(t,!B(a)||!(o||u.forEach&&!b((function(){(new a).entries().next()})))))c=n.getConstructor(e,t,r,i),ou.enable();else if(_e(t,!0)){var l=new c,d=l[i](o?{}:-0,1)!=l,v=b((function(){l.has(1)})),p=_o((function(t){new a(t)})),h=!o&&b((function(){for(var t=new a,e=5;e--;)t[i](e,e);return!t.has(-0)}));p||((c=e((function(t,e){xo(t,u);var n=function(t,e,n){var r,o;return go&&B(r=e.constructor)&&r!==n&&_(o=r.prototype)&&o!==n.prototype&&go(t,o),t}(new a,t,c);return null!=e&&Ro(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=u,u.constructor=c),(v||h)&&(f("delete"),f("has"),r&&f("get")),(h||d)&&f(i),o&&u.clear&&delete u.clear}return s[t]=c,Ge({global:!0,forced:c!=a},s),bo(c,t),o||n.setStrong(c,t,r),c}("WeakMap",bu,gu);if(Xt&&mu){hu=gu.getConstructor(bu,"WeakMap",!0),ou.enable();var Su=wu.prototype,xu=z(Su.delete),Eu=z(Su.has),Ou=z(Su.get),ju=z(Su.set);vo(Su,{delete:function(t){if(_(t)&&!nu(t)){var e=yu(this);return e.frozen||(e.frozen=new hu),xu(this,t)||e.frozen.delete(t)}return xu(this,t)},has:function(t){if(_(t)&&!nu(t)){var e=yu(this);return e.frozen||(e.frozen=new hu),Eu(this,t)||e.frozen.has(t)}return Eu(this,t)},get:function(t){if(_(t)&&!nu(t)){var e=yu(this);return e.frozen||(e.frozen=new hu),Eu(this,t)?Ou(this,t):e.frozen.get(t)}return Ou(this,t)},set:function(t,e){if(_(t)&&!nu(t)){var n=yu(this);n.frozen||(n.frozen=new hu),Eu(this,t)?ju(this,t,e):n.frozen.set(t,e)}else ju(this,t,e);return this}})}var Mu={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},Tu=kt("span").classList,Iu=Tu&&Tu.constructor&&Tu.constructor.prototype,Pu=Iu===Object.prototype?void 0:Iu,Au=jt("iterator"),zu=jt("toStringTag"),ku=_a.values,Ru=function(t,e){if(t){if(t[Au]!==ku)try{_t(t,Au,ku)}catch(e){t[Au]=ku}if(t[zu]||_t(t,zu,e),Mu[e])for(var n in _a)if(t[n]!==_a[n])try{_t(t,n,_a[n])}catch(e){t[n]=_a[n]}}};for(var Vu in Mu)Ru(m[Vu]&&m[Vu].prototype,Vu);Ru(Pu,"DOMTokenList");var Lu=ve.EXISTS,Cu=Bt.f,Hu=Function.prototype,Nu=z(Hu.toString),Du=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Fu=z(Du.exec);w&&!Lu&&Cu(Hu,"name",{configurable:!0,get:function(){try{return Fu(Du,Nu(this))[1]}catch(t){return""}}});var Bu=bn("slice"),_u=jt("species"),$u=m.Array,Gu=Math.max;function Wu(t){return t.getMenuConfig("uploadVideo")}Ge({target:"Array",proto:!0,forced:!Bu},{slice:function(t,e){var n,r,o,i=F(this),a=Ee(i),u=we(t,a),c=we(void 0===e?a:e,a);if(Ye(i)&&(n=i.constructor,(ln(n)&&(n===$u||Ye(n.prototype))||_(n)&&null===(n=n[_u]))&&(n=void 0),n===$u||void 0===n))return Uo(i,u,c);for(r=new(void 0===n?$u:n)(Gu(c-u,0)),o=0;u<c;u++,o++)u in i&&qa(r,o,i[u]);return r.length=o,r}});var Uu=new WeakMap;function qu(e,n){return c(this,void 0,void 0,(function(){var r,o,i,a;return s(this,(function(c){switch(c.label){case 0:return r=function(e){var n=Uu.get(e);if(null!=n)return n;var r=Wu(e),o=r.onSuccess,i=r.onProgress,a=r.onFailed,c=r.customInsert,s=r.onError;return n=t.createUploader(u(u({},r),{onProgress:function(t){e.showProgressBar(t),i&&i(t)},onSuccess:function(t,n){if(c)return c(n,(function(t,n){return da(e,t,n)})),void o(t,n);var r=n.errno,i=void 0===r?1:r,u=n.data,s=void 0===u?{}:u;if(0===i){var f=s.url,l=void 0===f?"":f,d=s.poster;da(e,l,void 0===d?"":d),o(t,n)}else a(t,n)},onError:function(t,e,n){s(t,e,n)}})),Uu.set(e,n),n}(e),o=n.name,i=n.type,a=n.size,r.addFile({name:o,type:i,size:a,data:n}),[4,r.upload()];case 1:return c.sent(),[2]}}))}))}var Ku=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 da(t,e,n)}));else{var u="";o.length>0&&(u='accept="'+o.join(", ")+'"');var f=a.default("body"),l=a.default('<input type="file" '+u+" 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,a,u,c,f;return s(this,(function(s){switch(s.label){case 0:if(null==e)return[2];o=Array.prototype.slice.call(e),i=Wu(t).customUpload,s.label=1;case 1:s.trys.push([1,9,10,15]),a=d(o),s.label=2;case 2:return[4,a.next()];case 3:return(u=s.sent()).done?[3,8]:(c=u.value,i?[4,i(c,(function(e,n){return da(t,e,n)}))]:[3,5]);case 4:return s.sent(),[3,7];case 5:return[4,qu(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]),u&&!u.done&&(r=a.return)?[4,r.call(a)]:[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}(),Xu=ve.PROPER,Yu="toString",Ju=RegExp.prototype,Qu=Ju.toString,Zu=z(Mn),tc=b((function(){return"/a/b"!=Qu.call({source:"a",flags:"b"})})),ec=Xu&&Qu.name!=Yu;function nc(){return fo("w-e-insert-video")}(tc||ec)&&pe(RegExp.prototype,Yu,(function(){var t=Nt(this),e=jn(t.source),n=t.flags;return"/"+e+"/"+jn(void 0===n&&W(Ju,t)&&!("flags"in Ju)?Zu(t):n)}),{unsafe:!0});var rc=function(){function n(){this.title=t.t("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=nc(),this.heightInputId=nc(),this.buttonId=nc()}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,u=r.buttonId,c=l(t.genModalInputElems(t.t("videoModule.width"),o,"auto"),2),s=c[0],f=c[1],d=a.default(f),v=l(t.genModalInputElems(t.t("videoModule.height"),i,"auto"),2),p=v[0],h=v[1],g=a.default(h),y=l(t.genModalButtonElems(u,t.t("videoModule.ok")),1)[0];if(null==this.$content){var m=a.default("<div></div>");m.on("click","#"+u,(function(r){r.preventDefault();var a=m.find("#"+o).val().trim(),u=m.find("#"+i).val().trim(),c=parseInt(a),s=parseInt(u),f=c?c.toString():"auto",l=s?s.toString():"auto";n.restoreSelection(),e.Transforms.setNodes(n,{width:f,height:l},{match:function(e){return t.DomEditor.checkNodeType(e,"video")}}),n.hidePanelOrModal()})),this.$content=m}var b=this.$content;b.empty(),b.append(s),b.append(p),b.append(y);var w=this.getSelectedVideoNode(n);if(null==w)return b[0];var S=w.width,x=void 0===S?"auto":S,E=w.height,O=void 0===E?"auto":E;return d.val(x),g.val(O),setTimeout((function(){d.focus()})),b[0]},n}();var oc={renderElems:[Qr],elemsToHtml:[Zr],preParseHtml:[oo],parseElemsHtml:[so],menus:[{key:"insertVideo",factory:function(){return new ya},config:{onInsertedVideo:function(t){},checkVideo:function(t,e){return!0},parseVideoSrc:function(t){return t}}},{key:"uploadVideo",factory:function(){return new Ku},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 rc}}],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),a=r[0],u=r[1];"video"===t.DomEditor.getNodeType(a)&&(t.DomEditor.isLastNode(i,a)&&e.Transforms.insertNodes(i,t.DomEditor.genEmptyParagraph(),{at:[u[0]+1]}));return o([a,u])},i}};return oc}));
|
|
2
|
+
//# sourceMappingURL=index.js.map
|