You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
352 KiB

5 years ago
webpackJsonp([99],{1571:function(n,t,e){var o;o=function(){return o={},r.m=e=[function(n,t,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},r=function(n,t,e){return t&&i(n.prototype,t),e&&i(n,e),n};function i(n,t){for(var e=0;e<t.length;e++){var o=t[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}var a=s(e(1)),A=s(e(3)),l=s(e(4));function s(n){return n&&n.__esModule?n:{default:n}}var c=(function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}(d,A.default),r(d,[{key:"resolveOptions",value:function(n){var t=0<arguments.length&&void 0!==n?n:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===o(t.container)?t.container:document.body}},{key:"listenClick",value:function(n){var t=this;this.listener=(0,l.default)(n,"click",function(n){return t.onClick(n)})}},{key:"onClick",value:function(n){var t=n.delegateTarget||n.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new a.default({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(n){return C("action",n)}},{key:"defaultTarget",value:function(n){var t=C("target",n);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(n){return C("text",n)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(n){var t=0<arguments.length&&void 0!==n?n:["copy","cut"],e="string"==typeof t?[t]:t,o=!!document.queryCommandSupported;return e.forEach(function(n){o=o&&!!document.queryCommandSupported(n)}),o}}]),d);function d(n,t){!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d);var e=function(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}(this,(d.__proto__||Object.getPrototypeOf(d)).call(this));return e.resolveOptions(t),e.listenClick(n),e}function C(n,t){var e="data-clipboard-"+n;if(t.hasAttribute(e))return t.getAttribute(e)}n.exports=c},function(n,t,e){"use strict";var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},r=function(n,t,e){return t&&i(n.prototype,t),e&&i(n,e),n};function i(n,t){for(var e=0;e<t.length;e++){var o=t[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(n,o.key,o)}}var a,A=e(2),l=(a=A)&&a.__esModule?a:{default:a};var s=(r(c,[{key:"resolveOptions",value:function(n){var t=0<arguments.length&&void 0!==n?n:{};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(){var n=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return n.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",thi