* https://clipboardjs.com/
* Licensed MIT © Zeno Rocha
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
else if(typeof exports === 'object')
exports["ClipboardJS"] = factory();
root["ClipboardJS"] = factory();
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 6);
/************************************************************************/
/***/ (function(module, exports) {
function select(element) {
if (element.nodeName === 'SELECT') {
selectedText = element.value;
else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
var isReadOnly = element.hasAttribute('readonly');
element.setAttribute('readonly', '');
element.setSelectionRange(0, element.value.length);
element.removeAttribute('readonly');
selectedText = element.value;
if (element.hasAttribute('contenteditable')) {
var selection = window.getSelection();
var range = document.createRange();
range.selectNodeContents(element);
selection.removeAllRanges();
selection.addRange(range);
selectedText = selection.toString();
/***/ (function(module, exports) {
// Keep this empty so it's easier to inherit from
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
on: function (name, callback, ctx) {
var e = this.e || (this.e = {});
(e[name] || (e[name] = [])).push({
once: function (name, callback, ctx) {
self.off(name, listener);
callback.apply(ctx, arguments);
return this.on(name, listener, ctx);
var data = [].slice.call(arguments, 1);
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
evtArr[i].fn.apply(evtArr[i].ctx, data);
off: function (name, callback) {
var e = this.e || (this.e = {});
for (var i = 0, len = evts.length; i < len; i++) {
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
liveEvents.push(evts[i]);
// Remove event from queue to prevent memory leak
// Suggested by https://github.com/lazd
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
module.exports.TinyEmitter = E;
/***/ (function(module, exports, __webpack_require__) {
var is = __webpack_require__(3);
var delegate = __webpack_require__(4);
* Validates all params and calls the right
* listener function based on its target type.
* @param {String|HTMLElement|HTMLCollection|NodeList} target
* @param {Function} callback
function listen(target, type, callback) {
if (!target && !type && !callback) {
throw new Error('Missing required arguments');
throw new TypeError('Second argument must be a String');
throw new TypeError('Third argument must be a Function');
return listenNode(target, type, callback);
else if (is.nodeList(target)) {
return listenNodeList(target, type, callback);
else if (is.string(target)) {
return listenSelector(target, type, callback);
throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
* Adds an event listener to a HTML element
* and returns a remove listener function.
* @param {HTMLElement} node
* @param {Function} callback
function listenNode(node, type, callback) {
node.addEventListener(type, callback);
node.removeEventListener(type, callback);
* Add an event listener to a list of HTML elements
* and returns a remove listener function.
* @param {NodeList|HTMLCollection} nodeList
* @param {Function} callback
function listenNodeList(nodeList, type, callback) {
Array.prototype.forEach.call(nodeList, function(node) {
node.addEventListener(type, callback);
Array.prototype.forEach.call(nodeList, function(node) {
node.removeEventListener(type, callback);
* Add an event listener to a selector
* and returns a remove listener function.
* @param {String} selector
* @param {Function} callback
function listenSelector(selector, type, callback) {
return delegate(document.body, selector, type, callback);
/***/ (function(module, exports) {
* Check if argument is a HTML element.
exports.node = function(value) {
return value !== undefined
&& value instanceof HTMLElement
* Check if argument is a list of HTML elements.
exports.nodeList = function(value) {
var type = Object.prototype.toString.call(value);
return value !== undefined
&& (type === '[object NodeList]' || type === '[object HTMLCollection]')
&& (value.length === 0 || exports.node(value[0]));
* Check if argument is a string.
exports.string = function(value) {
return typeof value === 'string'
|| value instanceof String;
* Check if argument is a function.
exports.fn = function(value) {
var type = Object.prototype.toString.call(value);
return type === '[object Function]';
/***/ (function(module, exports, __webpack_require__) {
var closest = __webpack_require__(5);
* Delegates event to a selector.
* @param {Element} element
* @param {String} selector
* @param {Function} callback
* @param {Boolean} useCapture
function _delegate(element, selector, type, callback, useCapture) {
var listenerFn = listener.apply(this, arguments);
element.addEventListener(type, listenerFn, useCapture);
element.removeEventListener(type, listenerFn, useCapture);
* Delegates event to a selector.
* @param {Element|String|Array} [elements]
* @param {String} selector
* @param {Function} callback
* @param {Boolean} useCapture
function delegate(elements, selector, type, callback, useCapture) {
// Handle the regular Element usage
if (typeof elements.addEventListener === 'function') {
return _delegate.apply(null, arguments);
// Handle Element-less usage, it defaults to global delegation
if (typeof type === 'function') {
// Use `document` as the first parameter, then apply arguments
// This is a short way to .unshift `arguments` without running into deoptimizations
return _delegate.bind(null, document).apply(null, arguments);
// Handle Selector-based usage
if (typeof elements === 'string') {
elements = document.querySelectorAll(elements);
// Handle Array-like based usage
return Array.prototype.map.call(elements, function (element) {
return _delegate(element, selector, type, callback, useCapture);
* Finds closest match and invokes callback.
* @param {Element} element
* @param {String} selector
* @param {Function} callback
function listener(element, selector, type, callback) {
e.delegateTarget = closest(e.target, selector);
callback.call(element, e);
module.exports = delegate;
/***/ (function(module, exports) {
var DOCUMENT_NODE_TYPE = 9;
* A polyfill for Element.matches()
if (typeof Element !== 'undefined' && !Element.prototype.matches) {
var proto = Element.prototype;
proto.matches = proto.matchesSelector ||
proto.mozMatchesSelector ||
proto.msMatchesSelector ||
proto.oMatchesSelector ||
proto.webkitMatchesSelector;
* Finds the closest parent that matches a selector.
* @param {Element} element
* @param {String} selector
function closest (element, selector) {
while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {
if (typeof element.matches === 'function' &&
element.matches(selector)) {
element = element.parentNode;