!function(t,e){"object"==typeofexports&&"object"==typeofmodule?module.exports=e():"function"==typeofdefine&&define.amd?define([],e):"object"==typeofexports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){returnfunction(t){functione(o){if(n[o])returnn[o].exports;varr=n[o]={i:o,l:!1,exports:{}};returnt[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}varn={};returne.m=t,e.c=n,e.i=function(t){returnt},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){varn=t&&t.__esModule?function(){returnt.default}:function(){returnt};returne.d(n,"a",n),n},e.o=function(t,e){returnObject.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([function(t,e,n){varo,r,i;!function(a,c){r=[t,n(7)],o=c,void0!==(i="function"==typeofo?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}varo=function(t){returnt&&t.__esModule?t:{default:t}}(e),r="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},i=function(){functiont(t,e){for(varn=0;n<e.length;n++){varo=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,n,o){returnn&&t(e.prototype,n),o&&t(e,o),e}}(),a=function(){functiont(e){n(this,t),this.resolveOptions(e),this.initSelection()}returni(t,[{key:"resolveOptions",value:function(){vart=arguments.length>0&&void0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){vart=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){returnt.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";varn=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,o.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,o.default)(this.target),this.copyText()}},{key:"copyText",value:function(){vart=void0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){vart=arguments.length>0&&void0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)thrownewError('Invalid "action" value, use either "copy" or "cut"')},get:function(){returnthis._action}},{key:"target",set:function(t){if(void0!==t){if(!t||"object"!==(void0===t?"undefined":r(t))||1!==t.nodeType)thrownewError('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))thrownewError('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))thrownewError('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){returnthis._target}}]),t}();t.exports=a})},function(t,e,n){functiono(t,e,n){if(!t&&!e&&!n)thrownewError("Missing required arguments");if(!c.string(e))thrownewTypeError("Second argument must be a String");if(!c.fn(n))thrownewTypeError("Third argument must be a Function");if(c.node(t))returnr(t,e,n);if(c.nodeList(t))returni(t,e,n);if(c.string(t))returna(t,e,n);thrownewTypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}functionr(t,e,n){returnt.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}functioni(t,e,n){returnArray.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}functiona(t,e,n){returnu(document.body,t,e,n)}varc=n(6),u=n(5);t.exports=o},function(t,e){functionn(){}n.prototype={on:function(t,e,n){varo=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){functiono(){r.off(t,o),e.apply(n,arguments)}varr=this;returno._=e,this.on(t,o,n)},emit:function(t){vare=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;for(o;o<r;o++)n[o].fn.apply(n[o].ctx,e);returnthis},off:function(t,e){varn=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(vari=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);returnr.length?n[t]=r:deleten[t],this}},t.exports=n},function(t,e,n){varo,r,i;!function(a,c){r=[t,n(0),n(2),n(1)],o=c,void0!==(i="function"==typeofo?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e,n,o){"use strict";functionr(t){returnt&&t.__esModule?t:{default:t}}functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiona(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functionc(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}functionu(t,e){varn="data-clipboard-"+t;if(e.hasAttribute(n))returne.getAttribute(n)}varl=r(e),s=r(n),f=r(o),d="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},h=function(){functiont(t,e){for(varn=0;n<e.length;n++){varo=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}returnfunction(e,n,o){returnn&&t(e.prototype,n),o&&t(e,o),e}}(),p=function(t){functione(t,n){i(this,e);varo=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));returno.resolveOptions(n),o.listenClick(t),o}returnc(e,t),h(e,[{key:"resolveOptions",value:function(){vart=arguments.length>0&&void0!==arguments[0]?arguments[0]:{};this.action="function"==typeoft.action?t.action:this.defaultAction,this.target="function"==typeoft.target?t.target:this.defaultTarget,this.text="function"==typeoft.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){vare=this;this.listener=(0,f.default)(t,"click",function(t){returne.onClick(t)})}},{key:"onClick",value:function(t){vare=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=newl.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){returnu("action",t)}},{key:"defaultTarget",value:function(t){vare=u("target",t);if(e)returndocument.querySelector(e)}},{key:"defaultText",value:function(t){returnu("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){vart=arguments.length>0&&void0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeoft?[t]:t,n=!!document.queryCommandSupported;returne.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},function(t,e){functionn(t,e){for(;t&&t.nodeType!==o;){if("function"==typeoft.matches&&t.matches(e))returnt;t=t.parentNode}}varo=9;if("undefined"!=typeofElement&&!Element.prototype.matches){varr=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=n},function(t,e,n){functiono(t,e,n,o,r){vara=i.apply(this,arguments);returnt.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}functionr(t,e,n,r,i){return"function"==typeoft.addEventListener?o.apply(null,arguments):"function"==typeofn?o.bind(null,document).apply(null,arguments):("string"==typeoft&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){returno(t,e,n,r,i)}))}functioni(t,e,n,o){returnfunction(n){n.delegateTarget=a(n.target,e),n.delegateTarget&&o.call(t,n)}}vara=n(4);t.exports=r},function(t,e){e.node=function(t){returnvoid0!==t&&tinstanceofHTMLElement&&1===t.nodeType},e.nodeList=function(t){varn=Object.prototype.toString.call(t);returnvoid0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"int&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeoft||tinstanceofString},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e){functionn(t){vare;if("SELECT"===t.nodeName)t.focus(),e=t.value;elseif("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){varn=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();varo=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}returne}t.exports=n}])});