tinymce_plugins_media.js 46 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345
  1. import {
  2. __commonJS,
  3. init_define_APP_INFO
  4. } from "./chunk-XY75H3MP.js";
  5. // node_modules/tinymce/plugins/media/plugin.js
  6. var require_plugin = __commonJS({
  7. "node_modules/tinymce/plugins/media/plugin.js"() {
  8. init_define_APP_INFO();
  9. (function() {
  10. "use strict";
  11. var global$9 = tinymce.util.Tools.resolve("tinymce.PluginManager");
  12. var __assign = function() {
  13. __assign = Object.assign || function __assign2(t) {
  14. for (var s, i = 1, n = arguments.length; i < n; i++) {
  15. s = arguments[i];
  16. for (var p in s)
  17. if (Object.prototype.hasOwnProperty.call(s, p))
  18. t[p] = s[p];
  19. }
  20. return t;
  21. };
  22. return __assign.apply(this, arguments);
  23. };
  24. var typeOf = function(x) {
  25. var t = typeof x;
  26. if (x === null) {
  27. return "null";
  28. } else if (t === "object" && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === "Array")) {
  29. return "array";
  30. } else if (t === "object" && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === "String")) {
  31. return "string";
  32. } else {
  33. return t;
  34. }
  35. };
  36. var isType = function(type) {
  37. return function(value) {
  38. return typeOf(value) === type;
  39. };
  40. };
  41. var isString = isType("string");
  42. var isObject = isType("object");
  43. var isArray = isType("array");
  44. var isNullable = function(a) {
  45. return a === null || a === void 0;
  46. };
  47. var isNonNullable = function(a) {
  48. return !isNullable(a);
  49. };
  50. var noop = function() {
  51. };
  52. var constant = function(value) {
  53. return function() {
  54. return value;
  55. };
  56. };
  57. var identity = function(x) {
  58. return x;
  59. };
  60. var never = constant(false);
  61. var always = constant(true);
  62. var none = function() {
  63. return NONE;
  64. };
  65. var NONE = function() {
  66. var call = function(thunk) {
  67. return thunk();
  68. };
  69. var id = identity;
  70. var me = {
  71. fold: function(n, _s) {
  72. return n();
  73. },
  74. isSome: never,
  75. isNone: always,
  76. getOr: id,
  77. getOrThunk: call,
  78. getOrDie: function(msg) {
  79. throw new Error(msg || "error: getOrDie called on none.");
  80. },
  81. getOrNull: constant(null),
  82. getOrUndefined: constant(void 0),
  83. or: id,
  84. orThunk: call,
  85. map: none,
  86. each: noop,
  87. bind: none,
  88. exists: never,
  89. forall: always,
  90. filter: function() {
  91. return none();
  92. },
  93. toArray: function() {
  94. return [];
  95. },
  96. toString: constant("none()")
  97. };
  98. return me;
  99. }();
  100. var some = function(a) {
  101. var constant_a = constant(a);
  102. var self = function() {
  103. return me;
  104. };
  105. var bind = function(f) {
  106. return f(a);
  107. };
  108. var me = {
  109. fold: function(n, s) {
  110. return s(a);
  111. },
  112. isSome: always,
  113. isNone: never,
  114. getOr: constant_a,
  115. getOrThunk: constant_a,
  116. getOrDie: constant_a,
  117. getOrNull: constant_a,
  118. getOrUndefined: constant_a,
  119. or: self,
  120. orThunk: self,
  121. map: function(f) {
  122. return some(f(a));
  123. },
  124. each: function(f) {
  125. f(a);
  126. },
  127. bind,
  128. exists: bind,
  129. forall: bind,
  130. filter: function(f) {
  131. return f(a) ? me : NONE;
  132. },
  133. toArray: function() {
  134. return [a];
  135. },
  136. toString: function() {
  137. return "some(" + a + ")";
  138. }
  139. };
  140. return me;
  141. };
  142. var from = function(value) {
  143. return value === null || value === void 0 ? NONE : some(value);
  144. };
  145. var Optional = {
  146. some,
  147. none,
  148. from
  149. };
  150. var nativePush = Array.prototype.push;
  151. var each$1 = function(xs, f) {
  152. for (var i = 0, len = xs.length; i < len; i++) {
  153. var x = xs[i];
  154. f(x, i);
  155. }
  156. };
  157. var flatten = function(xs) {
  158. var r = [];
  159. for (var i = 0, len = xs.length; i < len; ++i) {
  160. if (!isArray(xs[i])) {
  161. throw new Error("Arr.flatten item " + i + " was not an array, input: " + xs);
  162. }
  163. nativePush.apply(r, xs[i]);
  164. }
  165. return r;
  166. };
  167. var Cell = function(initial) {
  168. var value = initial;
  169. var get2 = function() {
  170. return value;
  171. };
  172. var set = function(v) {
  173. value = v;
  174. };
  175. return {
  176. get: get2,
  177. set
  178. };
  179. };
  180. var keys = Object.keys;
  181. var hasOwnProperty = Object.hasOwnProperty;
  182. var each = function(obj, f) {
  183. var props = keys(obj);
  184. for (var k = 0, len = props.length; k < len; k++) {
  185. var i = props[k];
  186. var x = obj[i];
  187. f(x, i);
  188. }
  189. };
  190. var get$1 = function(obj, key) {
  191. return has(obj, key) ? Optional.from(obj[key]) : Optional.none();
  192. };
  193. var has = function(obj, key) {
  194. return hasOwnProperty.call(obj, key);
  195. };
  196. var getScripts = function(editor) {
  197. return editor.getParam("media_scripts");
  198. };
  199. var getAudioTemplateCallback = function(editor) {
  200. return editor.getParam("audio_template_callback");
  201. };
  202. var getVideoTemplateCallback = function(editor) {
  203. return editor.getParam("video_template_callback");
  204. };
  205. var hasLiveEmbeds = function(editor) {
  206. return editor.getParam("media_live_embeds", true);
  207. };
  208. var shouldFilterHtml = function(editor) {
  209. return editor.getParam("media_filter_html", true);
  210. };
  211. var getUrlResolver = function(editor) {
  212. return editor.getParam("media_url_resolver");
  213. };
  214. var hasAltSource = function(editor) {
  215. return editor.getParam("media_alt_source", true);
  216. };
  217. var hasPoster = function(editor) {
  218. return editor.getParam("media_poster", true);
  219. };
  220. var hasDimensions = function(editor) {
  221. return editor.getParam("media_dimensions", true);
  222. };
  223. var global$8 = tinymce.util.Tools.resolve("tinymce.util.Tools");
  224. var global$7 = tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");
  225. var global$6 = tinymce.util.Tools.resolve("tinymce.html.SaxParser");
  226. var getVideoScriptMatch = function(prefixes, src) {
  227. if (prefixes) {
  228. for (var i = 0; i < prefixes.length; i++) {
  229. if (src.indexOf(prefixes[i].filter) !== -1) {
  230. return prefixes[i];
  231. }
  232. }
  233. }
  234. };
  235. var DOM$1 = global$7.DOM;
  236. var trimPx = function(value) {
  237. return value.replace(/px$/, "");
  238. };
  239. var getEphoxEmbedData = function(attrs) {
  240. var style = attrs.map.style;
  241. var styles = style ? DOM$1.parseStyle(style) : {};
  242. return {
  243. type: "ephox-embed-iri",
  244. source: attrs.map["data-ephox-embed-iri"],
  245. altsource: "",
  246. poster: "",
  247. width: get$1(styles, "max-width").map(trimPx).getOr(""),
  248. height: get$1(styles, "max-height").map(trimPx).getOr("")
  249. };
  250. };
  251. var htmlToData = function(prefixes, html) {
  252. var isEphoxEmbed = Cell(false);
  253. var data = {};
  254. global$6({
  255. validate: false,
  256. allow_conditional_comments: true,
  257. start: function(name, attrs) {
  258. if (isEphoxEmbed.get())
  259. ;
  260. else if (has(attrs.map, "data-ephox-embed-iri")) {
  261. isEphoxEmbed.set(true);
  262. data = getEphoxEmbedData(attrs);
  263. } else {
  264. if (!data.source && name === "param") {
  265. data.source = attrs.map.movie;
  266. }
  267. if (name === "iframe" || name === "object" || name === "embed" || name === "video" || name === "audio") {
  268. if (!data.type) {
  269. data.type = name;
  270. }
  271. data = global$8.extend(attrs.map, data);
  272. }
  273. if (name === "script") {
  274. var videoScript = getVideoScriptMatch(prefixes, attrs.map.src);
  275. if (!videoScript) {
  276. return;
  277. }
  278. data = {
  279. type: "script",
  280. source: attrs.map.src,
  281. width: String(videoScript.width),
  282. height: String(videoScript.height)
  283. };
  284. }
  285. if (name === "source") {
  286. if (!data.source) {
  287. data.source = attrs.map.src;
  288. } else if (!data.altsource) {
  289. data.altsource = attrs.map.src;
  290. }
  291. }
  292. if (name === "img" && !data.poster) {
  293. data.poster = attrs.map.src;
  294. }
  295. }
  296. }
  297. }).parse(html);
  298. data.source = data.source || data.src || data.data;
  299. data.altsource = data.altsource || "";
  300. data.poster = data.poster || "";
  301. return data;
  302. };
  303. var guess = function(url) {
  304. var mimes = {
  305. mp3: "audio/mpeg",
  306. m4a: "audio/x-m4a",
  307. wav: "audio/wav",
  308. mp4: "video/mp4",
  309. webm: "video/webm",
  310. ogg: "video/ogg",
  311. swf: "application/x-shockwave-flash"
  312. };
  313. var fileEnd = url.toLowerCase().split(".").pop();
  314. var mime = mimes[fileEnd];
  315. return mime ? mime : "";
  316. };
  317. var global$5 = tinymce.util.Tools.resolve("tinymce.html.Schema");
  318. var global$4 = tinymce.util.Tools.resolve("tinymce.html.Writer");
  319. var DOM = global$7.DOM;
  320. var addPx = function(value) {
  321. return /^[0-9.]+$/.test(value) ? value + "px" : value;
  322. };
  323. var setAttributes = function(attrs, updatedAttrs) {
  324. each(updatedAttrs, function(val, name) {
  325. var value = "" + val;
  326. if (attrs.map[name]) {
  327. var i = attrs.length;
  328. while (i--) {
  329. var attr = attrs[i];
  330. if (attr.name === name) {
  331. if (value) {
  332. attrs.map[name] = value;
  333. attr.value = value;
  334. } else {
  335. delete attrs.map[name];
  336. attrs.splice(i, 1);
  337. }
  338. }
  339. }
  340. } else if (value) {
  341. attrs.push({
  342. name,
  343. value
  344. });
  345. attrs.map[name] = value;
  346. }
  347. });
  348. };
  349. var updateEphoxEmbed = function(data, attrs) {
  350. var style = attrs.map.style;
  351. var styleMap = style ? DOM.parseStyle(style) : {};
  352. styleMap["max-width"] = addPx(data.width);
  353. styleMap["max-height"] = addPx(data.height);
  354. setAttributes(attrs, { style: DOM.serializeStyle(styleMap) });
  355. };
  356. var sources = [
  357. "source",
  358. "altsource"
  359. ];
  360. var updateHtml = function(html, data, updateAll) {
  361. var writer = global$4();
  362. var isEphoxEmbed = Cell(false);
  363. var sourceCount = 0;
  364. var hasImage;
  365. global$6({
  366. validate: false,
  367. allow_conditional_comments: true,
  368. comment: function(text) {
  369. writer.comment(text);
  370. },
  371. cdata: function(text) {
  372. writer.cdata(text);
  373. },
  374. text: function(text, raw) {
  375. writer.text(text, raw);
  376. },
  377. start: function(name, attrs, empty) {
  378. if (isEphoxEmbed.get())
  379. ;
  380. else if (has(attrs.map, "data-ephox-embed-iri")) {
  381. isEphoxEmbed.set(true);
  382. updateEphoxEmbed(data, attrs);
  383. } else {
  384. switch (name) {
  385. case "video":
  386. case "object":
  387. case "embed":
  388. case "img":
  389. case "iframe":
  390. if (data.height !== void 0 && data.width !== void 0) {
  391. setAttributes(attrs, {
  392. width: data.width,
  393. height: data.height
  394. });
  395. }
  396. break;
  397. }
  398. if (updateAll) {
  399. switch (name) {
  400. case "video":
  401. setAttributes(attrs, {
  402. poster: data.poster,
  403. src: ""
  404. });
  405. if (data.altsource) {
  406. setAttributes(attrs, { src: "" });
  407. }
  408. break;
  409. case "iframe":
  410. setAttributes(attrs, { src: data.source });
  411. break;
  412. case "source":
  413. if (sourceCount < 2) {
  414. setAttributes(attrs, {
  415. src: data[sources[sourceCount]],
  416. type: data[sources[sourceCount] + "mime"]
  417. });
  418. if (!data[sources[sourceCount]]) {
  419. return;
  420. }
  421. }
  422. sourceCount++;
  423. break;
  424. case "img":
  425. if (!data.poster) {
  426. return;
  427. }
  428. hasImage = true;
  429. break;
  430. }
  431. }
  432. }
  433. writer.start(name, attrs, empty);
  434. },
  435. end: function(name) {
  436. if (!isEphoxEmbed.get()) {
  437. if (name === "video" && updateAll) {
  438. for (var index = 0; index < 2; index++) {
  439. if (data[sources[index]]) {
  440. var attrs = [];
  441. attrs.map = {};
  442. if (sourceCount <= index) {
  443. setAttributes(attrs, {
  444. src: data[sources[index]],
  445. type: data[sources[index] + "mime"]
  446. });
  447. writer.start("source", attrs, true);
  448. }
  449. }
  450. }
  451. }
  452. if (data.poster && name === "object" && updateAll && !hasImage) {
  453. var imgAttrs = [];
  454. imgAttrs.map = {};
  455. setAttributes(imgAttrs, {
  456. src: data.poster,
  457. width: data.width,
  458. height: data.height
  459. });
  460. writer.start("img", imgAttrs, true);
  461. }
  462. }
  463. writer.end(name);
  464. }
  465. }, global$5({})).parse(html);
  466. return writer.getContent();
  467. };
  468. var urlPatterns = [
  469. {
  470. regex: /youtu\.be\/([\w\-_\?&=.]+)/i,
  471. type: "iframe",
  472. w: 560,
  473. h: 314,
  474. url: "www.youtube.com/embed/$1",
  475. allowFullscreen: true
  476. },
  477. {
  478. regex: /youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,
  479. type: "iframe",
  480. w: 560,
  481. h: 314,
  482. url: "www.youtube.com/embed/$2?$4",
  483. allowFullscreen: true
  484. },
  485. {
  486. regex: /youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,
  487. type: "iframe",
  488. w: 560,
  489. h: 314,
  490. url: "www.youtube.com/embed/$1",
  491. allowFullscreen: true
  492. },
  493. {
  494. regex: /vimeo\.com\/([0-9]+)/,
  495. type: "iframe",
  496. w: 425,
  497. h: 350,
  498. url: "player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",
  499. allowFullscreen: true
  500. },
  501. {
  502. regex: /vimeo\.com\/(.*)\/([0-9]+)/,
  503. type: "iframe",
  504. w: 425,
  505. h: 350,
  506. url: "player.vimeo.com/video/$2?title=0&amp;byline=0",
  507. allowFullscreen: true
  508. },
  509. {
  510. regex: /maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,
  511. type: "iframe",
  512. w: 425,
  513. h: 350,
  514. url: 'maps.google.com/maps/ms?msid=$2&output=embed"',
  515. allowFullscreen: false
  516. },
  517. {
  518. regex: /dailymotion\.com\/video\/([^_]+)/,
  519. type: "iframe",
  520. w: 480,
  521. h: 270,
  522. url: "www.dailymotion.com/embed/video/$1",
  523. allowFullscreen: true
  524. },
  525. {
  526. regex: /dai\.ly\/([^_]+)/,
  527. type: "iframe",
  528. w: 480,
  529. h: 270,
  530. url: "www.dailymotion.com/embed/video/$1",
  531. allowFullscreen: true
  532. }
  533. ];
  534. var getProtocol = function(url) {
  535. var protocolMatches = url.match(/^(https?:\/\/|www\.)(.+)$/i);
  536. if (protocolMatches && protocolMatches.length > 1) {
  537. return protocolMatches[1] === "www." ? "https://" : protocolMatches[1];
  538. } else {
  539. return "https://";
  540. }
  541. };
  542. var getUrl = function(pattern, url) {
  543. var protocol = getProtocol(url);
  544. var match = pattern.regex.exec(url);
  545. var newUrl = protocol + pattern.url;
  546. var _loop_1 = function(i2) {
  547. newUrl = newUrl.replace("$" + i2, function() {
  548. return match[i2] ? match[i2] : "";
  549. });
  550. };
  551. for (var i = 0; i < match.length; i++) {
  552. _loop_1(i);
  553. }
  554. return newUrl.replace(/\?$/, "");
  555. };
  556. var matchPattern = function(url) {
  557. var patterns = urlPatterns.filter(function(pattern) {
  558. return pattern.regex.test(url);
  559. });
  560. if (patterns.length > 0) {
  561. return global$8.extend({}, patterns[0], { url: getUrl(patterns[0], url) });
  562. } else {
  563. return null;
  564. }
  565. };
  566. var getIframeHtml = function(data) {
  567. var allowFullscreen = data.allowfullscreen ? ' allowFullscreen="1"' : "";
  568. return '<iframe src="' + data.source + '" width="' + data.width + '" height="' + data.height + '"' + allowFullscreen + "></iframe>";
  569. };
  570. var getFlashHtml = function(data) {
  571. var html = '<object data="' + data.source + '" width="' + data.width + '" height="' + data.height + '" type="application/x-shockwave-flash">';
  572. if (data.poster) {
  573. html += '<img src="' + data.poster + '" width="' + data.width + '" height="' + data.height + '" />';
  574. }
  575. html += "</object>";
  576. return html;
  577. };
  578. var getAudioHtml = function(data, audioTemplateCallback) {
  579. if (audioTemplateCallback) {
  580. return audioTemplateCallback(data);
  581. } else {
  582. return '<audio controls="controls" src="' + data.source + '">' + (data.altsource ? '\n<source src="' + data.altsource + '"' + (data.altsourcemime ? ' type="' + data.altsourcemime + '"' : "") + " />\n" : "") + "</audio>";
  583. }
  584. };
  585. var getVideoHtml = function(data, videoTemplateCallback) {
  586. if (videoTemplateCallback) {
  587. return videoTemplateCallback(data);
  588. } else {
  589. return '<video width="' + data.width + '" height="' + data.height + '"' + (data.poster ? ' poster="' + data.poster + '"' : "") + ' controls="controls">\n<source src="' + data.source + '"' + (data.sourcemime ? ' type="' + data.sourcemime + '"' : "") + " />\n" + (data.altsource ? '<source src="' + data.altsource + '"' + (data.altsourcemime ? ' type="' + data.altsourcemime + '"' : "") + " />\n" : "") + "</video>";
  590. }
  591. };
  592. var getScriptHtml = function(data) {
  593. return '<script src="' + data.source + '"><\/script>';
  594. };
  595. var dataToHtml = function(editor, dataIn) {
  596. var data = global$8.extend({}, dataIn);
  597. if (!data.source) {
  598. global$8.extend(data, htmlToData(getScripts(editor), data.embed));
  599. if (!data.source) {
  600. return "";
  601. }
  602. }
  603. if (!data.altsource) {
  604. data.altsource = "";
  605. }
  606. if (!data.poster) {
  607. data.poster = "";
  608. }
  609. data.source = editor.convertURL(data.source, "source");
  610. data.altsource = editor.convertURL(data.altsource, "source");
  611. data.sourcemime = guess(data.source);
  612. data.altsourcemime = guess(data.altsource);
  613. data.poster = editor.convertURL(data.poster, "poster");
  614. var pattern = matchPattern(data.source);
  615. if (pattern) {
  616. data.source = pattern.url;
  617. data.type = pattern.type;
  618. data.allowfullscreen = pattern.allowFullscreen;
  619. data.width = data.width || String(pattern.w);
  620. data.height = data.height || String(pattern.h);
  621. }
  622. if (data.embed) {
  623. return updateHtml(data.embed, data, true);
  624. } else {
  625. var videoScript = getVideoScriptMatch(getScripts(editor), data.source);
  626. if (videoScript) {
  627. data.type = "script";
  628. data.width = String(videoScript.width);
  629. data.height = String(videoScript.height);
  630. }
  631. var audioTemplateCallback = getAudioTemplateCallback(editor);
  632. var videoTemplateCallback = getVideoTemplateCallback(editor);
  633. data.width = data.width || "300";
  634. data.height = data.height || "150";
  635. global$8.each(data, function(value, key) {
  636. data[key] = editor.dom.encode("" + value);
  637. });
  638. if (data.type === "iframe") {
  639. return getIframeHtml(data);
  640. } else if (data.sourcemime === "application/x-shockwave-flash") {
  641. return getFlashHtml(data);
  642. } else if (data.sourcemime.indexOf("audio") !== -1) {
  643. return getAudioHtml(data, audioTemplateCallback);
  644. } else if (data.type === "script") {
  645. return getScriptHtml(data);
  646. } else {
  647. return getVideoHtml(data, videoTemplateCallback);
  648. }
  649. }
  650. };
  651. var isMediaElement = function(element) {
  652. return element.hasAttribute("data-mce-object") || element.hasAttribute("data-ephox-embed-iri");
  653. };
  654. var setup$2 = function(editor) {
  655. editor.on("click keyup touchend", function() {
  656. var selectedNode = editor.selection.getNode();
  657. if (selectedNode && editor.dom.hasClass(selectedNode, "mce-preview-object")) {
  658. if (editor.dom.getAttrib(selectedNode, "data-mce-selected")) {
  659. selectedNode.setAttribute("data-mce-selected", "2");
  660. }
  661. }
  662. });
  663. editor.on("ObjectSelected", function(e) {
  664. var objectType = e.target.getAttribute("data-mce-object");
  665. if (objectType === "script") {
  666. e.preventDefault();
  667. }
  668. });
  669. editor.on("ObjectResized", function(e) {
  670. var target = e.target;
  671. if (target.getAttribute("data-mce-object")) {
  672. var html = target.getAttribute("data-mce-html");
  673. if (html) {
  674. html = unescape(html);
  675. target.setAttribute("data-mce-html", escape(updateHtml(html, {
  676. width: String(e.width),
  677. height: String(e.height)
  678. })));
  679. }
  680. }
  681. });
  682. };
  683. var global$3 = tinymce.util.Tools.resolve("tinymce.util.Promise");
  684. var cache = {};
  685. var embedPromise = function(data, dataToHtml2, handler) {
  686. return new global$3(function(res, rej) {
  687. var wrappedResolve = function(response) {
  688. if (response.html) {
  689. cache[data.source] = response;
  690. }
  691. return res({
  692. url: data.source,
  693. html: response.html ? response.html : dataToHtml2(data)
  694. });
  695. };
  696. if (cache[data.source]) {
  697. wrappedResolve(cache[data.source]);
  698. } else {
  699. handler({ url: data.source }, wrappedResolve, rej);
  700. }
  701. });
  702. };
  703. var defaultPromise = function(data, dataToHtml2) {
  704. return global$3.resolve({
  705. html: dataToHtml2(data),
  706. url: data.source
  707. });
  708. };
  709. var loadedData = function(editor) {
  710. return function(data) {
  711. return dataToHtml(editor, data);
  712. };
  713. };
  714. var getEmbedHtml = function(editor, data) {
  715. var embedHandler = getUrlResolver(editor);
  716. return embedHandler ? embedPromise(data, loadedData(editor), embedHandler) : defaultPromise(data, loadedData(editor));
  717. };
  718. var isCached = function(url) {
  719. return has(cache, url);
  720. };
  721. var extractMeta = function(sourceInput, data) {
  722. return get$1(data, sourceInput).bind(function(mainData) {
  723. return get$1(mainData, "meta");
  724. });
  725. };
  726. var getValue = function(data, metaData, sourceInput) {
  727. return function(prop) {
  728. var _a;
  729. var getFromData = function() {
  730. return get$1(data, prop);
  731. };
  732. var getFromMetaData = function() {
  733. return get$1(metaData, prop);
  734. };
  735. var getNonEmptyValue = function(c) {
  736. return get$1(c, "value").bind(function(v) {
  737. return v.length > 0 ? Optional.some(v) : Optional.none();
  738. });
  739. };
  740. var getFromValueFirst = function() {
  741. return getFromData().bind(function(child) {
  742. return isObject(child) ? getNonEmptyValue(child).orThunk(getFromMetaData) : getFromMetaData().orThunk(function() {
  743. return Optional.from(child);
  744. });
  745. });
  746. };
  747. var getFromMetaFirst = function() {
  748. return getFromMetaData().orThunk(function() {
  749. return getFromData().bind(function(child) {
  750. return isObject(child) ? getNonEmptyValue(child) : Optional.from(child);
  751. });
  752. });
  753. };
  754. return _a = {}, _a[prop] = (prop === sourceInput ? getFromValueFirst() : getFromMetaFirst()).getOr(""), _a;
  755. };
  756. };
  757. var getDimensions = function(data, metaData) {
  758. var dimensions = {};
  759. get$1(data, "dimensions").each(function(dims) {
  760. each$1([
  761. "width",
  762. "height"
  763. ], function(prop) {
  764. get$1(metaData, prop).orThunk(function() {
  765. return get$1(dims, prop);
  766. }).each(function(value) {
  767. return dimensions[prop] = value;
  768. });
  769. });
  770. });
  771. return dimensions;
  772. };
  773. var unwrap = function(data, sourceInput) {
  774. var metaData = sourceInput ? extractMeta(sourceInput, data).getOr({}) : {};
  775. var get2 = getValue(data, metaData, sourceInput);
  776. return __assign(__assign(__assign(__assign(__assign({}, get2("source")), get2("altsource")), get2("poster")), get2("embed")), getDimensions(data, metaData));
  777. };
  778. var wrap = function(data) {
  779. var wrapped = __assign(__assign({}, data), {
  780. source: { value: get$1(data, "source").getOr("") },
  781. altsource: { value: get$1(data, "altsource").getOr("") },
  782. poster: { value: get$1(data, "poster").getOr("") }
  783. });
  784. each$1([
  785. "width",
  786. "height"
  787. ], function(prop) {
  788. get$1(data, prop).each(function(value) {
  789. var dimensions = wrapped.dimensions || {};
  790. dimensions[prop] = value;
  791. wrapped.dimensions = dimensions;
  792. });
  793. });
  794. return wrapped;
  795. };
  796. var handleError = function(editor) {
  797. return function(error) {
  798. var errorMessage = error && error.msg ? "Media embed handler error: " + error.msg : "Media embed handler threw unknown error.";
  799. editor.notificationManager.open({
  800. type: "error",
  801. text: errorMessage
  802. });
  803. };
  804. };
  805. var snippetToData = function(editor, embedSnippet) {
  806. return htmlToData(getScripts(editor), embedSnippet);
  807. };
  808. var getEditorData = function(editor) {
  809. var element = editor.selection.getNode();
  810. var snippet = isMediaElement(element) ? editor.serializer.serialize(element, { selection: true }) : "";
  811. return __assign({ embed: snippet }, htmlToData(getScripts(editor), snippet));
  812. };
  813. var addEmbedHtml = function(api, editor) {
  814. return function(response) {
  815. if (isString(response.url) && response.url.trim().length > 0) {
  816. var html = response.html;
  817. var snippetData = snippetToData(editor, html);
  818. var nuData = __assign(__assign({}, snippetData), {
  819. source: response.url,
  820. embed: html
  821. });
  822. api.setData(wrap(nuData));
  823. }
  824. };
  825. };
  826. var selectPlaceholder = function(editor, beforeObjects) {
  827. var afterObjects = editor.dom.select("*[data-mce-object]");
  828. for (var i = 0; i < beforeObjects.length; i++) {
  829. for (var y = afterObjects.length - 1; y >= 0; y--) {
  830. if (beforeObjects[i] === afterObjects[y]) {
  831. afterObjects.splice(y, 1);
  832. }
  833. }
  834. }
  835. editor.selection.select(afterObjects[0]);
  836. };
  837. var handleInsert = function(editor, html) {
  838. var beforeObjects = editor.dom.select("*[data-mce-object]");
  839. editor.insertContent(html);
  840. selectPlaceholder(editor, beforeObjects);
  841. editor.nodeChanged();
  842. };
  843. var submitForm = function(prevData, newData, editor) {
  844. newData.embed = updateHtml(newData.embed, newData);
  845. if (newData.embed && (prevData.source === newData.source || isCached(newData.source))) {
  846. handleInsert(editor, newData.embed);
  847. } else {
  848. getEmbedHtml(editor, newData).then(function(response) {
  849. handleInsert(editor, response.html);
  850. }).catch(handleError(editor));
  851. }
  852. };
  853. var showDialog = function(editor) {
  854. var editorData = getEditorData(editor);
  855. var currentData = Cell(editorData);
  856. var initialData = wrap(editorData);
  857. var handleSource = function(prevData, api) {
  858. var serviceData = unwrap(api.getData(), "source");
  859. if (prevData.source !== serviceData.source) {
  860. addEmbedHtml(win, editor)({
  861. url: serviceData.source,
  862. html: ""
  863. });
  864. getEmbedHtml(editor, serviceData).then(addEmbedHtml(win, editor)).catch(handleError(editor));
  865. }
  866. };
  867. var handleEmbed = function(api) {
  868. var data = unwrap(api.getData());
  869. var dataFromEmbed = snippetToData(editor, data.embed);
  870. api.setData(wrap(dataFromEmbed));
  871. };
  872. var handleUpdate = function(api, sourceInput) {
  873. var data = unwrap(api.getData(), sourceInput);
  874. var embed = dataToHtml(editor, data);
  875. api.setData(wrap(__assign(__assign({}, data), { embed })));
  876. };
  877. var mediaInput = [{
  878. name: "source",
  879. type: "urlinput",
  880. filetype: "media",
  881. label: "Source"
  882. }];
  883. var sizeInput = !hasDimensions(editor) ? [] : [{
  884. type: "sizeinput",
  885. name: "dimensions",
  886. label: "Constrain proportions",
  887. constrain: true
  888. }];
  889. var generalTab = {
  890. title: "General",
  891. name: "general",
  892. items: flatten([
  893. mediaInput,
  894. sizeInput
  895. ])
  896. };
  897. var embedTextarea = {
  898. type: "textarea",
  899. name: "embed",
  900. label: "Paste your embed code below:"
  901. };
  902. var embedTab = {
  903. title: "Embed",
  904. items: [embedTextarea]
  905. };
  906. var advancedFormItems = [];
  907. if (hasAltSource(editor)) {
  908. advancedFormItems.push({
  909. name: "altsource",
  910. type: "urlinput",
  911. filetype: "media",
  912. label: "Alternative source URL"
  913. });
  914. }
  915. if (hasPoster(editor)) {
  916. advancedFormItems.push({
  917. name: "poster",
  918. type: "urlinput",
  919. filetype: "image",
  920. label: "Media poster (Image URL)"
  921. });
  922. }
  923. var advancedTab = {
  924. title: "Advanced",
  925. name: "advanced",
  926. items: advancedFormItems
  927. };
  928. var tabs = [
  929. generalTab,
  930. embedTab
  931. ];
  932. if (advancedFormItems.length > 0) {
  933. tabs.push(advancedTab);
  934. }
  935. var body = {
  936. type: "tabpanel",
  937. tabs
  938. };
  939. var win = editor.windowManager.open({
  940. title: "Insert/Edit Media",
  941. size: "normal",
  942. body,
  943. buttons: [
  944. {
  945. type: "cancel",
  946. name: "cancel",
  947. text: "Cancel"
  948. },
  949. {
  950. type: "submit",
  951. name: "save",
  952. text: "Save",
  953. primary: true
  954. }
  955. ],
  956. onSubmit: function(api) {
  957. var serviceData = unwrap(api.getData());
  958. submitForm(currentData.get(), serviceData, editor);
  959. api.close();
  960. },
  961. onChange: function(api, detail) {
  962. switch (detail.name) {
  963. case "source":
  964. handleSource(currentData.get(), api);
  965. break;
  966. case "embed":
  967. handleEmbed(api);
  968. break;
  969. case "dimensions":
  970. case "altsource":
  971. case "poster":
  972. handleUpdate(api, detail.name);
  973. break;
  974. }
  975. currentData.set(unwrap(api.getData()));
  976. },
  977. initialData
  978. });
  979. };
  980. var get = function(editor) {
  981. var showDialog$1 = function() {
  982. showDialog(editor);
  983. };
  984. return { showDialog: showDialog$1 };
  985. };
  986. var register$1 = function(editor) {
  987. var showDialog$1 = function() {
  988. showDialog(editor);
  989. };
  990. editor.addCommand("mceMedia", showDialog$1);
  991. };
  992. var global$2 = tinymce.util.Tools.resolve("tinymce.html.Node");
  993. var global$1 = tinymce.util.Tools.resolve("tinymce.Env");
  994. var global = tinymce.util.Tools.resolve("tinymce.html.DomParser");
  995. var sanitize = function(editor, html) {
  996. if (shouldFilterHtml(editor) === false) {
  997. return html;
  998. }
  999. var writer = global$4();
  1000. var blocked;
  1001. global$6({
  1002. validate: false,
  1003. allow_conditional_comments: false,
  1004. comment: function(text) {
  1005. if (!blocked) {
  1006. writer.comment(text);
  1007. }
  1008. },
  1009. cdata: function(text) {
  1010. if (!blocked) {
  1011. writer.cdata(text);
  1012. }
  1013. },
  1014. text: function(text, raw) {
  1015. if (!blocked) {
  1016. writer.text(text, raw);
  1017. }
  1018. },
  1019. start: function(name, attrs, empty) {
  1020. blocked = true;
  1021. if (name === "script" || name === "noscript" || name === "svg") {
  1022. return;
  1023. }
  1024. for (var i = attrs.length - 1; i >= 0; i--) {
  1025. var attrName = attrs[i].name;
  1026. if (attrName.indexOf("on") === 0) {
  1027. delete attrs.map[attrName];
  1028. attrs.splice(i, 1);
  1029. }
  1030. if (attrName === "style") {
  1031. attrs[i].value = editor.dom.serializeStyle(editor.dom.parseStyle(attrs[i].value), name);
  1032. }
  1033. }
  1034. writer.start(name, attrs, empty);
  1035. blocked = false;
  1036. },
  1037. end: function(name) {
  1038. if (blocked) {
  1039. return;
  1040. }
  1041. writer.end(name);
  1042. }
  1043. }, global$5({})).parse(html);
  1044. return writer.getContent();
  1045. };
  1046. var isLiveEmbedNode = function(node) {
  1047. var name = node.name;
  1048. return name === "iframe" || name === "video" || name === "audio";
  1049. };
  1050. var getDimension = function(node, styles, dimension, defaultValue) {
  1051. if (defaultValue === void 0) {
  1052. defaultValue = null;
  1053. }
  1054. var value = node.attr(dimension);
  1055. if (isNonNullable(value)) {
  1056. return value;
  1057. } else if (!has(styles, dimension)) {
  1058. return defaultValue;
  1059. } else {
  1060. return null;
  1061. }
  1062. };
  1063. var setDimensions = function(node, previewNode, styles) {
  1064. var useDefaults = previewNode.name === "img" || node.name === "video";
  1065. var defaultWidth = useDefaults ? "300" : null;
  1066. var fallbackHeight = node.name === "audio" ? "30" : "150";
  1067. var defaultHeight = useDefaults ? fallbackHeight : null;
  1068. previewNode.attr({
  1069. width: getDimension(node, styles, "width", defaultWidth),
  1070. height: getDimension(node, styles, "height", defaultHeight)
  1071. });
  1072. };
  1073. var appendNodeContent = function(editor, nodeName, previewNode, html) {
  1074. var newNode = global({
  1075. forced_root_block: false,
  1076. validate: false
  1077. }, editor.schema).parse(html, { context: nodeName });
  1078. while (newNode.firstChild) {
  1079. previewNode.append(newNode.firstChild);
  1080. }
  1081. };
  1082. var createPlaceholderNode = function(editor, node) {
  1083. var name = node.name;
  1084. var placeHolder = new global$2("img", 1);
  1085. placeHolder.shortEnded = true;
  1086. retainAttributesAndInnerHtml(editor, node, placeHolder);
  1087. setDimensions(node, placeHolder, {});
  1088. placeHolder.attr({
  1089. "style": node.attr("style"),
  1090. "src": global$1.transparentSrc,
  1091. "data-mce-object": name,
  1092. "class": "mce-object mce-object-" + name
  1093. });
  1094. return placeHolder;
  1095. };
  1096. var createPreviewNode = function(editor, node) {
  1097. var name = node.name;
  1098. var previewWrapper = new global$2("span", 1);
  1099. previewWrapper.attr({
  1100. "contentEditable": "false",
  1101. "style": node.attr("style"),
  1102. "data-mce-object": name,
  1103. "class": "mce-preview-object mce-object-" + name
  1104. });
  1105. retainAttributesAndInnerHtml(editor, node, previewWrapper);
  1106. var styles = editor.dom.parseStyle(node.attr("style"));
  1107. var previewNode = new global$2(name, 1);
  1108. setDimensions(node, previewNode, styles);
  1109. previewNode.attr({
  1110. src: node.attr("src"),
  1111. style: node.attr("style"),
  1112. class: node.attr("class")
  1113. });
  1114. if (name === "iframe") {
  1115. previewNode.attr({
  1116. allowfullscreen: node.attr("allowfullscreen"),
  1117. frameborder: "0"
  1118. });
  1119. } else {
  1120. var attrs = [
  1121. "controls",
  1122. "crossorigin",
  1123. "currentTime",
  1124. "loop",
  1125. "muted",
  1126. "poster",
  1127. "preload"
  1128. ];
  1129. each$1(attrs, function(attrName) {
  1130. previewNode.attr(attrName, node.attr(attrName));
  1131. });
  1132. var sanitizedHtml = previewWrapper.attr("data-mce-html");
  1133. if (isNonNullable(sanitizedHtml)) {
  1134. appendNodeContent(editor, name, previewNode, unescape(sanitizedHtml));
  1135. }
  1136. }
  1137. var shimNode = new global$2("span", 1);
  1138. shimNode.attr("class", "mce-shim");
  1139. previewWrapper.append(previewNode);
  1140. previewWrapper.append(shimNode);
  1141. return previewWrapper;
  1142. };
  1143. var retainAttributesAndInnerHtml = function(editor, sourceNode, targetNode) {
  1144. var attribs = sourceNode.attributes;
  1145. var ai = attribs.length;
  1146. while (ai--) {
  1147. var attrName = attribs[ai].name;
  1148. var attrValue = attribs[ai].value;
  1149. if (attrName !== "width" && attrName !== "height" && attrName !== "style") {
  1150. if (attrName === "data" || attrName === "src") {
  1151. attrValue = editor.convertURL(attrValue, attrName);
  1152. }
  1153. targetNode.attr("data-mce-p-" + attrName, attrValue);
  1154. }
  1155. }
  1156. var innerHtml = sourceNode.firstChild && sourceNode.firstChild.value;
  1157. if (innerHtml) {
  1158. targetNode.attr("data-mce-html", escape(sanitize(editor, innerHtml)));
  1159. targetNode.firstChild = null;
  1160. }
  1161. };
  1162. var isPageEmbedWrapper = function(node) {
  1163. var nodeClass = node.attr("class");
  1164. return nodeClass && /\btiny-pageembed\b/.test(nodeClass);
  1165. };
  1166. var isWithinEmbedWrapper = function(node) {
  1167. while (node = node.parent) {
  1168. if (node.attr("data-ephox-embed-iri") || isPageEmbedWrapper(node)) {
  1169. return true;
  1170. }
  1171. }
  1172. return false;
  1173. };
  1174. var placeHolderConverter = function(editor) {
  1175. return function(nodes) {
  1176. var i = nodes.length;
  1177. var node;
  1178. var videoScript;
  1179. while (i--) {
  1180. node = nodes[i];
  1181. if (!node.parent) {
  1182. continue;
  1183. }
  1184. if (node.parent.attr("data-mce-object")) {
  1185. continue;
  1186. }
  1187. if (node.name === "script") {
  1188. videoScript = getVideoScriptMatch(getScripts(editor), node.attr("src"));
  1189. if (!videoScript) {
  1190. continue;
  1191. }
  1192. }
  1193. if (videoScript) {
  1194. if (videoScript.width) {
  1195. node.attr("width", videoScript.width.toString());
  1196. }
  1197. if (videoScript.height) {
  1198. node.attr("height", videoScript.height.toString());
  1199. }
  1200. }
  1201. if (isLiveEmbedNode(node) && hasLiveEmbeds(editor) && global$1.ceFalse) {
  1202. if (!isWithinEmbedWrapper(node)) {
  1203. node.replace(createPreviewNode(editor, node));
  1204. }
  1205. } else {
  1206. if (!isWithinEmbedWrapper(node)) {
  1207. node.replace(createPlaceholderNode(editor, node));
  1208. }
  1209. }
  1210. }
  1211. };
  1212. };
  1213. var setup$1 = function(editor) {
  1214. editor.on("preInit", function() {
  1215. var specialElements = editor.schema.getSpecialElements();
  1216. global$8.each("video audio iframe object".split(" "), function(name) {
  1217. specialElements[name] = new RegExp("</" + name + "[^>]*>", "gi");
  1218. });
  1219. var boolAttrs = editor.schema.getBoolAttrs();
  1220. global$8.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "), function(name) {
  1221. boolAttrs[name] = {};
  1222. });
  1223. editor.parser.addNodeFilter("iframe,video,audio,object,embed,script", placeHolderConverter(editor));
  1224. editor.serializer.addAttributeFilter("data-mce-object", function(nodes, name) {
  1225. var i = nodes.length;
  1226. var node;
  1227. var realElm;
  1228. var ai;
  1229. var attribs;
  1230. var innerHtml;
  1231. var innerNode;
  1232. var realElmName;
  1233. var className;
  1234. while (i--) {
  1235. node = nodes[i];
  1236. if (!node.parent) {
  1237. continue;
  1238. }
  1239. realElmName = node.attr(name);
  1240. realElm = new global$2(realElmName, 1);
  1241. if (realElmName !== "audio" && realElmName !== "script") {
  1242. className = node.attr("class");
  1243. if (className && className.indexOf("mce-preview-object") !== -1) {
  1244. realElm.attr({
  1245. width: node.firstChild.attr("width"),
  1246. height: node.firstChild.attr("height")
  1247. });
  1248. } else {
  1249. realElm.attr({
  1250. width: node.attr("width"),
  1251. height: node.attr("height")
  1252. });
  1253. }
  1254. }
  1255. realElm.attr({ style: node.attr("style") });
  1256. attribs = node.attributes;
  1257. ai = attribs.length;
  1258. while (ai--) {
  1259. var attrName = attribs[ai].name;
  1260. if (attrName.indexOf("data-mce-p-") === 0) {
  1261. realElm.attr(attrName.substr(11), attribs[ai].value);
  1262. }
  1263. }
  1264. if (realElmName === "script") {
  1265. realElm.attr("type", "text/javascript");
  1266. }
  1267. innerHtml = node.attr("data-mce-html");
  1268. if (innerHtml) {
  1269. innerNode = new global$2("#text", 3);
  1270. innerNode.raw = true;
  1271. innerNode.value = sanitize(editor, unescape(innerHtml));
  1272. realElm.append(innerNode);
  1273. }
  1274. node.replace(realElm);
  1275. }
  1276. });
  1277. });
  1278. editor.on("SetContent", function() {
  1279. editor.$("span.mce-preview-object").each(function(index, elm) {
  1280. var $elm = editor.$(elm);
  1281. if ($elm.find("span.mce-shim").length === 0) {
  1282. $elm.append('<span class="mce-shim"></span>');
  1283. }
  1284. });
  1285. });
  1286. };
  1287. var setup = function(editor) {
  1288. editor.on("ResolveName", function(e) {
  1289. var name;
  1290. if (e.target.nodeType === 1 && (name = e.target.getAttribute("data-mce-object"))) {
  1291. e.name = name;
  1292. }
  1293. });
  1294. };
  1295. var register = function(editor) {
  1296. var onAction = function() {
  1297. return editor.execCommand("mceMedia");
  1298. };
  1299. editor.ui.registry.addToggleButton("media", {
  1300. tooltip: "Insert/edit media",
  1301. icon: "embed",
  1302. onAction,
  1303. onSetup: function(buttonApi) {
  1304. var selection = editor.selection;
  1305. buttonApi.setActive(isMediaElement(selection.getNode()));
  1306. return selection.selectorChangedWithUnbind("img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]", buttonApi.setActive).unbind;
  1307. }
  1308. });
  1309. editor.ui.registry.addMenuItem("media", {
  1310. icon: "embed",
  1311. text: "Media...",
  1312. onAction
  1313. });
  1314. };
  1315. function Plugin() {
  1316. global$9.add("media", function(editor) {
  1317. register$1(editor);
  1318. register(editor);
  1319. setup(editor);
  1320. setup$1(editor);
  1321. setup$2(editor);
  1322. return get(editor);
  1323. });
  1324. }
  1325. Plugin();
  1326. })();
  1327. }
  1328. });
  1329. // node_modules/tinymce/plugins/media/index.js
  1330. var require_media = __commonJS({
  1331. "node_modules/tinymce/plugins/media/index.js"() {
  1332. init_define_APP_INFO();
  1333. require_plugin();
  1334. }
  1335. });
  1336. // dep:tinymce_plugins_media
  1337. init_define_APP_INFO();
  1338. var tinymce_plugins_media_default = require_media();
  1339. export {
  1340. tinymce_plugins_media_default as default
  1341. };
  1342. //# sourceMappingURL=tinymce_plugins_media.js.map