1
2
|
(this["webpackJsonp@netdata/dashboard"]=this["webpackJsonp@netdata/dashboard"]||[]).push([[8],{504:function(t,n,e){"use strict";function r(t,n,e,r){return new(e||(e=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function u(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){t.done?o(t.value):new e((function(n){n(t.value)})).then(a,u)}c((r=r.apply(t,n||[])).next())}))}function o(t,n){var e,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(i){return function(u){return function(i){if(e)throw new TypeError("Generator is already executing.");for(;a;)try{if(e=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=n.call(t,a)}catch(t){i=[6,t],r=0}finally{e=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}e.r(n),e.d(n,"DT",(function(){return c})),e.d(n,"read",(function(){return w})),e.d(n,"readText",(function(){return m})),e.d(n,"setDebugLog",(function(){return p})),e.d(n,"suppressWarnings",(function(){return h})),e.d(n,"write",(function(){return v})),e.d(n,"writeText",(function(){return b}));var i=["text/plain","text/html"],a=function(){(console.warn||console.log).call(arguments)}.bind(console,"[clipboard-polyfill]"),u=!0,c=function(){function t(){this.m={}}return t.prototype.setData=function(t,n){u&&-1===i.indexOf(t)&&a("Unknown data type: "+t,"Call clipboard.suppressWarnings() to suppress this warning."),this.m[t]=n},t.prototype.getData=function(t){return this.m[t]},t.prototype.forEach=function(t){for(var n in this.m)t(this.m[n],n)},t}(),s=function(t){},d=!0,l=function(){(console.warn||console.log).apply(console,arguments)}.bind("[clipboard-polyfill]"),f="text/plain";function p(t){s=t}function h(){d=!1,u=!1}function v(t){return r(this,void 0,void 0,(function(){var n;return o(this,(function(e){if(d&&!t.getData(f)&&l("clipboard.write() was called without a `text/plain` data type. On some platforms, this may result in an empty clipboard. Call clipboard.suppressWarnings() to suppress this warning."),S()){if(function(t){var n=t.getData(f);if(void 0!==n)return window.clipboardData.setData("Text",n);throw new Error("No `text/plain` value was specified.")}(t))return[2];throw new Error("Copying failed, possibly because the user rejected it.")}if(T(t))return s("regular execCopy worked"),[2];if(navigator.userAgent.indexOf("Edge")>-1)return s('UA "Edge" => assuming success'),[2];if(E(document.body,t))return s("copyUsingTempSelection worked"),[2];if(function(t){var n=document.createElement("div");n.setAttribute("style","-webkit-user-select: text !important"),n.textContent="temporary element",document.body.appendChild(n);var e=E(n,t);return document.body.removeChild(n),e}(t))return s("copyUsingTempElem worked"),[2];if(void 0!==(n=t.getData(f))&&function(t){s("copyTextUsingDOM");var n=document.createElement("div");n.setAttribute("style","-webkit-user-select: text !important");var e=n;n.attachShadow&&(s("Using shadow DOM."),e=n.attachShadow({mode:"open"}));var r=document.createElement("span");r.innerText=t,e.appendChild(r),document.body.appendChild(n),C(r);var o=document.execCommand("copy");return k(),document.body.removeChild(n),o}(n))return s("copyTextUsingDOM worked"),[2];throw new Error("Copy command failed.")}))}))}function b(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){return navigator.clipboard&&navigator.clipboard.writeText?(s("Using `navigator.clipboard.writeText()`."),[2,navigator.clipboard.writeText(t)]):[2,v(U(t))]}))}))}function w(){return r(this,void 0,void 0,(function(){var t;return o(this,(function(n){switch(n.label){case 0:return t=U,[4,m()];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))}function m(){return r(this,void 0,void 0,(function(){return o(this,(function(t){if(navigator.clipboard&&navigator.clipboard.readText)return s("Using `navigator.clipboard.readText()`."),[2,navigator.clipboard.readText()];if(S())return s("Reading text using IE strategy."),[2,A()];throw new Error("Read is not supported in your browser.")}))}))}var g=!1;function y(){g||(d&&l('The deprecated default object of `clipboard-polyfill` was called. Please switch to `import * as clipboard from "clipboard-polyfill"` and see https://github.com/lgarron/clipboard-polyfill/issues/101 for more info.'),g=!0)}var x={DT:c,setDebugLog:function(t){return y(),p(t)},suppressWarnings:function(){return y(),h()},write:function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){return y(),[2,v(t)]}))}))},writeText:function(t){return r(this,void 0,void 0,(function(){return o(this,(function(n){return y(),[2,b(t)]}))}))},read:function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return y(),[2,w()]}))}))},readText:function(){return r(this,void 0,void 0,(function(){return o(this,(function(t){return y(),[2,m()]}))}))}},D=function(){this.success=!1};function T(t){var n=new D,e=function(t,n,e){s("listener called"),t.success=!0,n.forEach((function(n,r){var o=e.clipboardData;o.setData(r,n),r===f&&o.getData(r)!==n&&(s("setting text/plain failed"),t.success=!1)})),e.preventDefault()}.bind(this,n,t);document.addEventListener("copy",e);try{document.execCommand("copy")}finally{document.removeEventListener("copy",e)}return n.success}function E(t,n){C(t);var e=T(n);return k(),e}function C(t){var n=document.getSelection();if(n){var e=document.createRange();e.selectNodeContents(t),n.removeAllRanges(),n.addRange(e)}}function k(){var t=document.getSelection();t&&t.removeAllRanges()}function U(t){var n=new c;return n.setData(f,t),n}function S(){return"undefined"==typeof ClipboardEvent&&void 0!==window.clipboardData&&void 0!==window.clipboardData.setData}function A(){return r(this,void 0,void 0,(function(){var t;return o(this,(function(n){if(""===(t=window.clipboardData.getData("Text")))throw new Error("Empty clipboard or could not read plain text from clipboard");return[2,t]}))}))}n.default=x}}]);
//# sourceMappingURL=8.b1a4b595.chunk.js.map
|