tb_require('./header.js') tb_require('./shims.js') tb_require('./proxy.js') /* exported VideoContainer
166255
function (plugin, stream) {
    var Proto = function VideoContainer () {},
        api = new Proto();

    api.domElement = plugin._;
    api.$ = $(plugin._);
    api.parentElement = plugin._.parentNode;

    plugin.addRef(api);

    api.appendTo = function (parentDomElement) {
      if (parentDomElement && plugin._.parentNode !== parentDomElement) {
        OTPlugin.debug('VideoContainer appendTo', parentDomElement);
        parentDomElement.appendChild(plugin._);
        api.parentElement = parentDomElement;
      }
    };

    api.show = function (completion) {
      OTPlugin.debug('VideoContainer show');
      plugin._.removeAttribute('width');
      plugin._.removeAttribute('height');
      plugin.setStream(stream, completion);
      $.show(plugin._);
      return api;
    };

    api.setSize = function(width, height) {
      plugin._.setAttribute('width', width);
      plugin._.setAttribute('height', height);
      return api;
    };

    api.width = function (newWidth) {
      if (newWidth !== void 0) {
        OTPlugin.debug('VideoContainer set width to ' + newWidth);
        plugin._.setAttribute('width', newWidth);
      }

      return plugin._.getAttribute('width');
    };

    api.height = function (newHeight) {
      if (newHeight !== void 0) {
        OTPlugin.debug('VideoContainer set height to ' + newHeight);
        plugin._.setAttribute('height', newHeight);
      }

      return plugin._.getAttribute('height');
    };

    api.volume = function (newVolume) {
      if (newVolume !== void 0) {
        // TODO
        OTPlugin.debug('VideoContainer setVolume not implemented: called with ' + newVolume);
      }
      else {
        OTPlugin.debug('VideoContainer getVolume not implemented');
      }

      return 0.5;
    };

    api.getImgData = function () {
      return plugin._.getImgData('image/png');
    };

    api.videoWidth = function () {
      return plugin._.videoWidth;
    };

    api.videoHeight = function () {
      return plugin._.videoHeight;
    };

    api.destroy = function () {
      plugin._.setStream(null);
      plugin.removeRef(api);
    };

    return api;
  }
1155087
function shimZlib () {
    let originalGzip = zlib.gzipSync;
    let originalGunzip = zlib.gunzipSync;
    zlib.gzipSync = function (data, options = {}) {
        options.finishFlush = zlib.Z_SYNC_FLUSH;
        return originalGzip.call(zlib, data, options);
    };
    zlib.gunzipSync = function (data, options = {}) {
        options.finishFlush = zlib.Z_SYNC_FLUSH;
        return originalGunzip.call(zlib, data, options);
    };
}
120871
function require(name) {
  var module = require.modules[name];
  if (!module) throw new Error('failed to require "' + name + '"');

  if (!('exports' in module) && typeof module.definition === 'function') {
    module.client = module.component = true;
    module.definition.call(this, module.exports = {}, module);
    delete module.definition;
  }

  return module.exports;
}
643138
function startServer(argv, httpPort, httpsPort, certs) {
  console.log('Launching proxy server...');
  console.log('   http: ' + httpPort);
  console.log('  https: ' + httpsPort);

  // Injects a node stream by buffering all data, transforming it, and writing
  // it back out.
  // Module IDs are assigned on demand and rotate 0-126.
  var nextModuleId = 0;
  function injectStream(url, source, target) {
    var moduleId = nextModuleId++;
    if (nextModuleId >= 127) {
      nextModuleId = 0;
    }
    var sourceCode = '';
    source.on('data', function(chunk) {
      sourceCode += chunk;
    });
    source.on('end', function() {
      try {
        var targetCode = transformCode(moduleId, url, sourceCode, argv);
        target.end(targetCode);
      } catch (e) {
        console.log('Error during transformation, writing through.');
        console.log(e);
        target.end(sourceCode);
      }
    });
  };

  // Handles both HTTP and HTTPS requests.
  function handler(req, res) {
    // Support both the ?url= mode and the X-WTF-URL header.
    var targetUrl;
    if (req.headers['x-wtf-url']) {
      targetUrl = req.headers['x-wtf-url'];
    } else {
      var parsedUrl = url.parse(req.url, true);
      var query = parsedUrl.query;
      targetUrl = query.url;
    }
    if (!targetUrl || targetUrl.indexOf('http') != 0) {
      res.writeHead(404, ['Content-Type', 'text/plain']);
      res.end();
      return;
    }

    res.on('error', function(e) {
      console.log('ERROR (source): ' + e);
    });

    var targetModule = targetUrl.indexOf('https') == 0 ? https : http;
    targetModule.get(targetUrl, function(originalRes) {
      // Eat errors, otherwise the app will die.
      originalRes.on('error', function(e) {
        console.log('ERROR (target): ' + e);
      });

      // Pull out content type to see if we are interested in it.
      var supportedContentType = false;
      var contentType = originalRes.headers['content-type'];
      if (contentType && contentType.indexOf(';') != 0) {
        contentType = contentType.substr(0, contentType.indexOf(';'));
      }
      switch (contentType) {
        case 'text/javascript':
        case 'application/javascript':
          supportedContentType = true;
          break;
      }

      // Also parse the URL - some servers don't return content type for some
      // reason.
      var supportedPath = false;
      var contentUrl = url.parse(targetUrl);
      if (path.extname(contentUrl.pathname) == '.js') {
        supportedPath = true;
      }

      if (supportedContentType || supportedPath) {
        var headers = [];
        for (var key in originalRes.headers) {
          if (key == 'content-length') {
            continue;
          }
          headers.push([key, originalRes.headers[key]]);
        }
        res.writeHead(originalRes.statusCode, headers);
        injectStream(targetUrl, originalRes, res);
      } else {
        console.log('Pass-through: ' + targetUrl, contentType);
        res.writeHead(originalRes.statusCode, originalRes.headers);
        originalRes.pipe(res);
      }
    }).on('error', function(e) {
      console.log(e);
      res.writeHead(404, ['Content-Type', 'text/plain']);
      res.end(e.message);
    });
  };

  // HTTP server.
  var httpServer = http.createServer(handler);
  httpServer.listen(httpPort);

  // HTTPS server.
  var httpsServer = https.createServer({
    key: certs.privateKey,
    cert: certs.certificate
  }, handler);
  httpsServer.listen(httpsPort);

  console.log('Server ready, use ctrl-c to exit...');
  console.log('');
}
1035577
function() {
    return gulp
      .src(item.src)
      .pipe(sourcemaps.init())
      .pipe(concat(item.name + '.js'))
      .pipe(sourcemaps.write('./'))
      .pipe(gulp.dest(item.dest));
  }
35058
function() {
		var api_url,
			self = this;

		// Create Dom element
		this._el.content_item	= TL.Dom.create("div", "tl-media-item tl-media-iframe tl-media-vimeo tl-media-shadow", this._el.content);

		// Get Media ID
		this.media_id = this.data.url.split(/video\/|\/\/vimeo\.com\//)[1].split(/[?&]/)[0];
		var start_time = null;

		// Get start time
		if (this.data.url.match(/#t=([^&]+).*/)) {
			start_time = this.data.url.match(/#t=([^&]+).*/)[1];
		}

		// API URL
		api_url = "https://player.vimeo.com/video/" + this.media_id + "?api=1&title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff";
		if (start_time) {
			api_url = api_url += '&amp;#t=' + start_time;
		}

		this.player = TL.Dom.create("iframe", "", this._el.content_item);

		// Media Loaded Event
		this.player.addEventListener('load', function(e) {
			self.onMediaLoaded();
		});

		this.player.width 		= "100%";
		this.player.height 		= "100%";
		this.player.frameBorder = "0";
		this.player.src 		= api_url;

		this.player.setAttribute('allowfullscreen', '');
		this.player.setAttribute('webkitallowfullscreen', '');
		this.player.setAttribute('mozallowfullscreen', '');

		// After Loaded
		this.onLoaded();
	}
262319
function (module, exports, __webpack_require__) {

  "use strict";

  Object.defineProperty(exports, "__esModule", {
    value: true
  });

  var _vuex = __webpack_require__(92);

  exports.default = {
    computed: (0, _vuex.mapGetters)(['evenOrOdd']),
    methods: (0, _vuex.mapActions)(['increment', 'decrement', 'incrementIfOdd', 'incrementAsync'])
  }; //
  //
  //
  //
  //
  //
  //
  //
  //
  //

  /***/
}
566116
function exampleScripts() {
  return gulp.src( './examples/index.js' )
    .pipe( webpackStream( {
      module: {
        rules: [ {
          use: [ {
            loader: 'babel-loader?cacheDirectory=true',
            options: {
              presets: [ [ 'env', {
                targets: {
                  browsers: config.supportedBrowsers
                },
                debug: true
              } ] ]
            }
          } ],
          exclude: /node_modules/
        } ]
      },
      output: {
        filename: 'example.js'
      },
    }, webpack ) )
    .pipe( gulp.dest( config.BUILD ) );
}
235759
function (events) {
        "use strict";
    
        requirejs.onError = function (err) {
    
            if (err.requireType === 'timeout') {
    
                events.trigger('error');
                for (var i in err.requireModules) {
                    requirejs.undef(err.requireModules[i]);
                }
    
                // try again loading modules
                require(err.requireModules, function () {
                    events.trigger('retried');
                });
    
            }
            else {
                console.log(err.stack);
            }
    
        };
    
    }
542016
function createServer(bs) {
    var proxy = bs.options.get("proxy");
    var server = bs.options.get("server");

    if (!proxy && !server) {
        return require("./snippet-server")(bs);
    }

    if (proxy) {
        return require("./proxy-server")(bs);
    }

    if (server) {
        return require("./static-server")(bs);
    }
}
853879
function Bobsled(opts)
{
  require('http').Server.call(this);

  if (typeof(opts) == "undefined") opts = {};

  this.port = ("port" in opts) ? opts.port : 8085; // reads like BOBS on an old calculator

  if ("env" in opts) this.env = opts.env;
  if ("uid" in opts) this.uid = opts.uid;
  if ("gid" in opts) this.gid = opts.gid;

  this.template_compiler = ("template_compiler" in opts) ? opts.template_compiler : function () { throw new Error("no template compiler configured"); };

  // TODO: support other template engines besides doT?
  //
  this.template_config = {
    evaluate:    /<%([\s\S]+?)%>/g, // some erb like delimiters
    interpolate: /<%=([\s\S]+?)%>/g,
    varname: ["Page", "Server"],
    strip: false,
    append: true
  };

  this.templates = {};

  // compile all templates, useful for checking correctness on startup
  this.compileTemplates = function() {
    for (var template_name in this.templates) this.templates[template_name].compile();
  };

  this.controllers = {
    template: function(pathinfo, request, response) {
      var template_name = pathinfo.basename || "index"
      if (template_name in this.templates) {
        this.templateResponder(template_name, pathinfo, response);
      } else {
        this.emit("notFound", pathinfo, request, response);
      }
    }.bind(this),
    "static": function(pathinfo, request, response) {
      var filename = "." + pathinfo.dirname + "/" + pathinfo.basename + pathinfo.extname;
      if (!fs.statSync(filename).isFile()) {
        this.emit("notFound", pathinfo, request, response);
      } else {
        response.writeHead(200, {"content-type": "text/css"}); // HACK TODO mimetype
        fs.readFile(filename, function (err, data) { response.end(data); });
      }
    }.bind(this),
    favicon: function(pathinfo, request, response) {
      response.writeHead(200, {"content-type": "image/x-icon"}); // TODO: set expires
      fs.readFile("favicon.ico", function (err, data) { response.end(data); });
    },
    notFound: function (pathinfo, request, response) {
      if ("404" in this.templates) {
        this.templateResponder("404", { statusCode: 404, pathinfo: pathinfo, request: request }, response);
      } else {
        response.writeHead(404, {"content-type": "text/plain"});
        response.end(request.url + " not found");
      }
    }.bind(this)
  };

  // TODO: config/recipe for default routes
  this.routes = {
    GET: {
      "/": {
        "favicon.ico": this.controllers.favicon,
        "*.html": this.controllers.template
      },
    },
    POST: { }
  };

  // setup static routes
  if (true) { // TODO: opts.static? (could pass in path?)
    var static_folders = {"css": "/css", "img": "/img", "js": "/js"}; // TODO: pass in opts?
    for (folder in static_folders) {
      if (fs.existsSync(folder) && fs.statSync(folder).isDirectory()) {
        this.routes.GET[static_folders[folder]] = { "*": this.controllers.static };
      }
    }
  }

  if (opts.env) {
    // TODO: make path part of config?
    this.routes.GET["/"]["env"] = function(pathinfo, request, response) {
      response.writeHead(200, {"content-type": "application/json"}); // TODO switch to HTML on extname
      var data = { env: process.env, uid: process.getuid(), os: {} };
      var os = require("os");
      ["hostname", "type", "platform", "arch", "release", "networkInterfaces", "cpus"].forEach(function (a) {
        data.os[a] = os[a]();
      });
      if (process.env.HOME) data.home = fs.readdirSync(process.env.HOME);
      // data.passwd = require("getpw").getpwuid(data.uid); (TODO: pass to constructor to eliminate hard dep)
      response.end(JSON.stringify(data, null, "  "));
    }
  }

  this.redirect = function(new_url, response) {
      response.writeHead(302, { 'Location': new_url });
      response.end();
  };

  this.on("notFound", this.controllers.notFound);

  this.route = function(request, response, body) {
    var parsed_url = url.parse(request.url, true);
    var method = request.method,
        dirname = path.dirname(parsed_url.pathname).replace(/\/*$/, ''), // strip any trailing slash
        extname = path.extname(parsed_url.pathname), // TODO: should have a default for extname?
        basename = path.basename(parsed_url.pathname, extname) || "index"; // TODO: configurable default basename?

    console.log("%s %s/%s%s", method, dirname, basename, extname); // TODO: add an on/off switch for this logging

    if (dirname == "") dirname = "/"; // special case root routes, where the leading and trailing slash are the same

    // TODO: add a switch for case (in)sensitivity
    // dirname = dirname.toLowerCase();
    // basename = basename.toLowerCase();

    var controller = this.controllers.notFound;
    if (this.routes[method] && this.routes[method][dirname]) {
       // find the most specific match possible
       var candidate, candidates = [basename + extname, basename, "*" + extname, "*"];
       while (candidate = candidates.shift()) {
         if (candidate in this.routes[method][dirname]) {
             controller = this.routes[method][dirname][candidate];
             break; // while
         }
       }
    }
    return controller({ dirname: dirname, basename: basename, extname: extname, query: parsed_url.query }, request, response, body);
  };
}
118073
function createIframe(config) {
    let { url, width, height, allow, callback, appendTo } = config;
    let iframe = document.createElement('iframe');
    let winWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
    iframe.className = 'vimeo-video gvideo';
    iframe.src = url;

    if (height) {
        if (isMobile && winWidth < 767) {
            iframe.style.height = ''
        } else {
            iframe.style.height = `${height}px`
        }
    }
    if (width) {
        iframe.style.width = `${width}px`
    }
    if (allow) {
        iframe.setAttribute('allow', allow)
    }
    iframe.onload = function() {
        addClass(iframe, 'iframe-ready');
        if (utils.isFunction(callback)) {
            callback()
        }
    };

    if (appendTo) {
        appendTo.appendChild(iframe);
    }
    return iframe;
}
840377
function(module, exports, __webpack_require__) {

	/*
		MIT License http://www.opensource.org/licenses/mit-license.php
		Author Tobias Koppers @sokra
	*/
	var stylesInDom = {},
		memoize = function(fn) {
			var memo;
			return function () {
				if (typeof memo === "undefined") memo = fn.apply(this, arguments);
				return memo;
			};
		},
		isOldIE = memoize(function() {
			return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
		}),
		getHeadElement = memoize(function () {
			return document.head || document.getElementsByTagName("head")[0];
		}),
		singletonElement = null,
		singletonCounter = 0,
		styleElementsInsertedAtTop = [];
	
	module.exports = function(list, options) {
		if(false) {
			if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
		}
	
		options = options || {};
		// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
		// tags it will allow on a page
		if (typeof options.singleton === "undefined") options.singleton = isOldIE();
	
		// By default, add <style> tags to the bottom of <head>.
		if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
	
		var styles = listToStyles(list);
		addStylesToDom(styles, options);
	
		return function update(newList) {
			var mayRemove = [];
			for(var i = 0; i < styles.length; i++) {
				var item = styles[i];
				var domStyle = stylesInDom[item.id];
				domStyle.refs--;
				mayRemove.push(domStyle);
			}
			if(newList) {
				var newStyles = listToStyles(newList);
				addStylesToDom(newStyles, options);
			}
			for(var i = 0; i < mayRemove.length; i++) {
				var domStyle = mayRemove[i];
				if(domStyle.refs === 0) {
					for(var j = 0; j < domStyle.parts.length; j++)
						domStyle.parts[j]();
					delete stylesInDom[domStyle.id];
				}
			}
		};
	}
	
	function addStylesToDom(styles, options) {
		for(var i = 0; i < styles.length; i++) {
			var item = styles[i];
			var domStyle = stylesInDom[item.id];
			if(domStyle) {
				domStyle.refs++;
				for(var j = 0; j < domStyle.parts.length; j++) {
					domStyle.parts[j](item.parts[j]);
				}
				for(; j < item.parts.length; j++) {
					domStyle.parts.push(addStyle(item.parts[j], options));
				}
			} else {
				var parts = [];
				for(var j = 0; j < item.parts.length; j++) {
					parts.push(addStyle(item.parts[j], options));
				}
				stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
			}
		}
	}
	
	function listToStyles(list) {
		var styles = [];
		var newStyles = {};
		for(var i = 0; i < list.length; i++) {
			var item = list[i];
			var id = item[0];
			var css = item[1];
			var media = item[2];
			var sourceMap = item[3];
			var part = {css: css, media: media, sourceMap: sourceMap};
			if(!newStyles[id])
				styles.push(newStyles[id] = {id: id, parts: [part]});
			else
				newStyles[id].parts.push(part);
		}
		return styles;
	}
	
	function insertStyleElement(options, styleElement) {
		var head = getHeadElement();
		var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
		if (options.insertAt === "top") {
			if(!lastStyleElementInsertedAtTop) {
				head.insertBefore(styleElement, head.firstChild);
			} else if(lastStyleElementInsertedAtTop.nextSibling) {
				head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
			} else {
				head.appendChild(styleElement);
			}
			styleElementsInsertedAtTop.push(styleElement);
		} else if (options.insertAt === "bottom") {
			head.appendChild(styleElement);
		} else {
			throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
		}
	}
	
	function removeStyleElement(styleElement) {
		styleElement.parentNode.removeChild(styleElement);
		var idx = styleElementsInsertedAtTop.indexOf(styleElement);
		if(idx >= 0) {
			styleElementsInsertedAtTop.splice(idx, 1);
		}
	}
	
	function createStyleElement(options) {
		var styleElement = document.createElement("style");
		styleElement.type = "text/css";
		insertStyleElement(options, styleElement);
		return styleElement;
	}
	
	function addStyle(obj, options) {
		var styleElement, update, remove;
	
		if (options.singleton) {
			var styleIndex = singletonCounter++;
			styleElement = singletonElement || (singletonElement = createStyleElement(options));
			update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
			remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
		} else {
			styleElement = createStyleElement(options);
			update = applyToTag.bind(null, styleElement);
			remove = function() {
				removeStyleElement(styleElement);
			};
		}
	
		update(obj);
	
		return function updateStyle(newObj) {
			if(newObj) {
				if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
					return;
				update(obj = newObj);
			} else {
				remove();
			}
		};
	}
	
	var replaceText = (function () {
		var textStore = [];
	
		return function (index, replacement) {
			textStore[index] = replacement;
			return textStore.filter(Boolean).join('\n');
		};
	})();
	
	function applyToSingletonTag(styleElement, index, remove, obj) {
		var css = remove ? "" : obj.css;
	
		if (styleElement.styleSheet) {
			styleElement.styleSheet.cssText = replaceText(index, css);
		} else {
			var cssNode = document.createTextNode(css);
			var childNodes = styleElement.childNodes;
			if (childNodes[index]) styleElement.removeChild(childNodes[index]);
			if (childNodes.length) {
				styleElement.insertBefore(cssNode, childNodes[index]);
			} else {
				styleElement.appendChild(cssNode);
			}
		}
	}
	
	function applyToTag(styleElement, obj) {
		var css = obj.css;
		var media = obj.media;
		var sourceMap = obj.sourceMap;
	
		if (media) {
			styleElement.setAttribute("media", media);
		}
	
		if (sourceMap) {
			// https://developer.chrome.com/devtools/docs/javascript-debugging
			// this makes source maps inside style tags work properly in Chrome
			css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */';
			// http://stackoverflow.com/a/26603875
			css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
		}
	
		if (styleElement.styleSheet) {
			styleElement.styleSheet.cssText = css;
		} else {
			while(styleElement.firstChild) {
				styleElement.removeChild(styleElement.firstChild);
			}
			styleElement.appendChild(document.createTextNode(css));
		}
	}


/***/ }
120093
function (o) {
    if (!o.src) {
      throw new Error('src dir missing');
    }

    var opts = _.extend({}, defaults, o);

    var hasStyle = function () {
      return !!opts.style;
    };

    var stream = vfs.src(opts.src)
      .pipe(tile(opts))
      .on('error', handleError())
      .pipe(layout(opts))
      .on('error', handleError())
      .pipe(sprite(opts))
      .on('error', handleError())
      .pipe(ifStream(hasStyle, style(opts)))
      .on('error', handleError())
      .pipe(toVinyl(opts))
      .on('error', handleError())
      .pipe(through2(function (obj, enc, cb) {
        if (obj instanceof Error) {
          cb(obj, null);
        }
        else {
          cb(null, obj);
        }
      }));

    return stream;
  }
1108204
function require(path) {
  var module = require.modules[path];
  if(!module) {
    throw("couldn't find module for: " + path);
  }
  if(!module.exports) {
    module.exports = {};
    module.call(module.exports, module, module.exports, require.bind(path));
  }
  return module.exports;
}
451109
function (videoId, canvaId, outputOptions) {
    let editorVideo;
    const domElement = document.getElementById(videoId);

    if (domElement !== null) {
        editorVideo = new Video(domElement);
    }
    const store = new Store();

    function getCanva() {
        return document.getElementById(canvaId);
    }

    outputOptions = outputOptions || {};

    function setAltCanvas() {
        let domElements = [];
        let altCanvas = outputOptions.altCanvas;
        if (altCanvas.length > 0) {
            for (let i = 0; i < altCanvas.length; i++) {
                domElements.push({
                    el: new Canva(altCanvas[i]),
                    width: altCanvas[i].getAttribute('data-width'),
                    name: altCanvas[i].getAttribute('data-name')
                });
            }
        }
        return domElements;
    }

    return {
        isSupported: function () {
            const elem = document.createElement('canvas');

            return !!document.getElementById(videoId) && document.getElementById(canvaId)
                && !!elem.getContext && !!elem.getContext('2d');
        },
        screenshot: function () {
            const screenshot = new ScreenShot(
                store.getLength() + 1,
                new Canva(getCanva()),
                editorVideo,
                setAltCanvas()
            );

            store.set(screenshot.getId(), screenshot);

            return screenshot;
        },
        store: store,
        copy: function (mainSource, altSources) {

            const elementDomNode = document.createElement('img');
            elementDomNode.src = mainSource;

            const element = new Image(elementDomNode);
            const editorCanva = new Canva(getCanva());
            const altEditorCanva = setAltCanvas();
            editorCanva
                .reset()
                .resize(editorVideo)
                .copy(element);


            // handle alternative canvas:
            if (altEditorCanva.length > 0) {
                for (let i = 0; i < altEditorCanva.length; i++) {

                    let tmpEl = document.createElement('img');
                    tmpEl.src = altSources[i].dataURI;

                    const canvaEl = altEditorCanva[i].el;

                    canvaEl
                        .reset()
                        .resize(editorVideo, altEditorCanva[i].width)
                        .copy(new Image(tmpEl)); // @TODO: should copy the right stored image
                }
            }
        },
        getCanvaImage: function () {
            const canva = new Canva(getCanva());

            return canva.extractImage();
        },
        resetCanva: function () {
            const editorCanva = new Canva(getCanva());
            editorCanva.reset();
        },
        getNbScreenshot: function () {
            return store.getLength();
        }
    };
}
1351748
function requireExtended(name) {
  var module = require(name);
  if (module && module.__esModule === true && typeof module.default !== 'undefined') {
    if (typeof module.__module !== 'undefined') {
      // if __module is specified as a named export, add it to the default export
      _.defaults(module.default, {__module: module.__module})
    }
    return module.default;
  }
  return module;
}