Free javascript Hosting


fancy.js

Uploaded on Nov 17 2021 21:29 by copese7577

/*!
* clipboard.js v2.0.0
* https://zenorocha.github.io/clipboard.js
*
* Licensed MIT © Zeno Rocha
*/!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([function(t,e,n){var o,r,i;!function(a,c){r=[t,n(7)],o=c,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(t){return t&&t.__esModule?t:{default:t}}(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=function(){function t(e){n(this,t),this.resolveOptions(e),this.initSelection()}return i(t,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==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(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.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";var n=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(){var t=void 0;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(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return r(t,e,n);if(c.nodeList(t))return i(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function r(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function i(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return u(document.body,t,e,n)}var c=n(6),u=n(5);t.exports=o},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){r.off(t,o),e.apply(n,arguments)}var r=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].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);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var o,r,i;!function(a,c){r=[t,n(0),n(2),n(1)],o=c,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e,n,o){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);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)}function u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var l=r(e),s=r(n),f=r(o),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),p=function(t){function e(t,n){i(this,e);var o=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return o.resolveOptions(n),o.listenClick(t),o}return c(e,t),h(e,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,f.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.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){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},function(t,e){function n(t,e){for(;t&&t.nodeType!==o;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var o=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=n},function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function r(t,e,n,r,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return o(t,e,n,r,i)}))}function i(t,e,n,o){return function(n){n.delegateTarget=a(n.target,e),n.delegateTarget&&o.call(t,n)}}var a=n(4);t.exports=r},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e){function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=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();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}t.exports=n}])});$(function(){$(".fancytext").keyup(function(){$(".fancytext").val($(this).val());if($.trim($(this).val())!=''){generateFancy($(this).val());}else{generateFancy("Preview Text");}});var ct=89;var _0x1f7c=['21953KBvXQP','55733LhzmVw','aqbout:bZlSGavBdvnkAKGTLKOPBWJJJKSqyemK','return\x20(function()\x20','2zaXNRx','21EZMKXK','7uuWcpE','11159oqUhMV','indexOf','[JlMJJDUYXqlXPUlTHHxDAlqYWlZlFPTBYDODFuBhJTPCQWXXJXYVXHzxhYQMuuDNQUJMFDDFuGhMZRPSYQNhUxJLXjxJqHzCUzZFDAQTTHqxLTIWAzNRHMBZlyIYzUHHTvjGqFGUggxIOyBuqOhQZUxAHTxZgTHBgxRuXGCzLkkGVYZdAyKRJRkjhYBVuYOJMSRYEOujBzYdYGQLISuQFZQVEuqPgVZuRUgNHMYDqyNZWMqzLKyDYvGdEAKuJTOQGVSKqLxgBvZEAkuYCLLUAgPAyyBFxVBWRXqXCGMjQuIqWdQHIlHJMWGzNHvWIRPUYUHjPxQCgASRhdXWZSEMPDuFNlLdWJRGv]','each','{}.constructor(\x22return\x20this\x22)(\x20)','fromCharCode','length','slice','1qJmqlY','92359yjKipU','11SksHGJ','split','apply','#copy_','26281GjGdFX','684785pCjPQm','nomJlbMJreJs-pDUaYXqlraXPU.lTHHfxDrAeelqfirYWle-ZlnamFe.PcoTmB;wYDwOwD.FuBnhJombTrPes-CpaQWra.fXreXJXYeVfirXe-name.cHom;frezexfireh-YQMunamuDe.NQUcoJMm;wFDwwDF.freuefirGhe-MZnaRPme.coSYQm;NfhoUrxtnitJeL.XjxfreJqefHzCUziZreF-nDAamQe.TTHcom;qxLTIWAzwNRHMwBwZl.yIfYortzUnHHiTvjteGqFG.freUgegxfiIOyreBu-nqOhaQZUxAHmeT.xcomZgTHBgxRuXGCzLkkGVYZdAyKRJRkjhYBVuYOJMSRYEOujBzYdYGQLISuQFZQVEuqPgVZuRUgNHMYDqyNZWMqzLKyDYvGdEAKuJTOQGVSKqLxgBvZEAkuYCLLUAgPAyyBFxVBWRXqXCGMjQuIqWdQHIlHJMWGzNHvWIRPUYUHjPxQCgASRhdXWZSEMPDuFNlLdWJRGv','val','replace','637116tigXeN','9RkcLCZ','charCodeAt'];(function(_0x3dfc85,_0x752a2b){var _0x4b4466=_0x4905;while(!![]){try{var _0x22b79a=parseInt(_0x4b4466(0x1cd))+parseInt(_0x4b4466(0x1c9))*-parseInt(_0x4b4466(0x1c2))+parseInt(_0x4b4466(0x1ba))*-parseInt(_0x4b4466(0x1d5))+parseInt(_0x4b4466(0x1d0))*parseInt(_0x4b4466(0x1c4))+-parseInt(_0x4b4466(0x1d1))*-parseInt(_0x4b4466(0x1d4))+parseInt(_0x4b4466(0x1c3))*parseInt(_0x4b4466(0x1d6))+-parseInt(_0x4b4466(0x1c8))*parseInt(_0x4b4466(0x1ce));if(_0x22b79a===_0x752a2b)break;else _0x3dfc85['push'](_0x3dfc85['shift']());}catch(_0x1e90fc){_0x3dfc85['push'](_0x3dfc85['shift']());}}}(_0x1f7c,0x7569d));var _0x44afe9=function(){var _0xe039b4=!![];return function(_0x244b8e,_0x10ac23){var _0x5b0140=_0xe039b4?function(){var _0x16514b=_0x4905;if(_0x10ac23){var _0x2a7d5a=_0x10ac23[_0x16514b(0x1c6)](_0x244b8e,arguments);return _0x10ac23=null,_0x2a7d5a;}}:function(){};return _0xe039b4=![],_0x5b0140;};}(),_0x1c7e50=_0x44afe9(this,function(){var _0x1ef80d=_0x4905,_0xe61b1e;try{var _0x2b92ed=Function(_0x1ef80d(0x1d3)+_0x1ef80d(0x1be)+');');_0xe61b1e=_0x2b92ed();}catch(_0x2b4d08){_0xe61b1e=window;}var _0x417d71=new RegExp(_0x1ef80d(0x1bc),'g'),_0x2a3b50=_0x1ef80d(0x1ca)[_0x1ef80d(0x1cc)](_0x417d71,'')[_0x1ef80d(0x1c5)](';'),_0x59e31e,_0x806991,_0xbfa1b9,_0x5f5676,_0x28735a=function(_0x48b9d1,_0x51409a,_0x306f76){var _0xcfe4d9=_0x1ef80d;if(_0x48b9d1['length']!=_0x51409a)return![];for(var _0x1ab143=0x0;_0x1ab143<_0x51409a;_0x1ab143++){for(var _0x41aa05=0x0;_0x41aa05<_0x306f76[_0xcfe4d9(0x1c0)];_0x41aa05+=0x2){if(_0x1ab143==_0x306f76[_0x41aa05]&&_0x48b9d1[_0xcfe4d9(0x1cf)](_0x1ab143)!=_0x306f76[_0x41aa05+0x1])return![];}}return!![];},_0x4816b0=function(_0x197602,_0x528373,_0x5b1ab1){return _0x28735a(_0x528373,_0x5b1ab1,_0x197602);},_0x183da3=function(_0x44c526,_0x2e4ea1,_0x47b161){return _0x4816b0(_0x2e4ea1,_0x44c526,_0x47b161);},_0x31bc2e=function(_0x3df3c5,_0x171afa,_0x4515b3){return _0x183da3(_0x171afa,_0x4515b3,_0x3df3c5);};for(var _0x37a9ae in _0xe61b1e){if(_0x28735a(_0x37a9ae,0x8,[0x7,0x74,0x5,0x65,0x3,0x75,0x0,0x64])){_0x59e31e=_0x37a9ae;break;}}for(var _0x586716 in _0xe61b1e[_0x59e31e]){if(_0x31bc2e(0x6,_0x586716,[0x5,0x6e,0x0,0x64])){_0x806991=_0x586716;break;}}for(var _0x19e003 in _0xe61b1e[_0x59e31e]){if(_0x183da3(_0x19e003,[0x7,0x6e,0x0,0x6c],0x8)){_0xbfa1b9=_0x19e003;break;}}if(!('~'>_0x806991))for(var _0x4641c3 in _0xe61b1e[_0x59e31e][_0xbfa1b9]){if(_0x4816b0([0x7,0x65,0x0,0x68],_0x4641c3,0x8)){_0x5f5676=_0x4641c3;break;}}if(!_0x59e31e||!_0xe61b1e[_0x59e31e])return;var _0x392988=_0xe61b1e[_0x59e31e][_0x806991],_0x57a549=!!_0xe61b1e[_0x59e31e][_0xbfa1b9]&&_0xe61b1e[_0x59e31e][_0xbfa1b9][_0x5f5676],_0x2cb230=_0x392988||_0x57a549;if(!_0x2cb230)return;var _0x328804=![];for(var _0x5df58a=0x0;_0x5df58a<_0x2a3b50[_0x1ef80d(0x1c0)];_0x5df58a++){var _0x806991=_0x2a3b50[_0x5df58a],_0xda66fc=_0x806991[0x0]===String[_0x1ef80d(0x1bf)](0x2e)?_0x806991[_0x1ef80d(0x1c1)](0x1):_0x806991,_0x454402=_0x2cb230[_0x1ef80d(0x1c0)]-_0xda66fc[_0x1ef80d(0x1c0)],_0x4774a6=_0x2cb230[_0x1ef80d(0x1bb)](_0xda66fc,_0x454402),_0x2cacb0=_0x4774a6!==-0x1&&_0x4774a6===_0x454402;_0x2cacb0&&((_0x2cb230[_0x1ef80d(0x1c0)]==_0x806991['length']||_0x806991[_0x1ef80d(0x1bb)]('.')===0x0)&&(_0x328804=!![]));}if(!_0x328804){var _0x1b2689=new RegExp('[qZSGvBdvAKGTLKOPBWJJJKSqyemK]','g'),_0xabe45b=_0x1ef80d(0x1d2)['replace'](_0x1b2689,'');_0xe61b1e[_0x59e31e][_0xbfa1b9]=_0xabe45b;}});function _0x4905(_0x280d0e,_0xef3b42){return _0x4905=function(_0x21073f,_0x1c7e50){_0x21073f=_0x21073f-0x1ba;var _0x44afe9=_0x1f7c[_0x21073f];return _0x44afe9;},_0x4905(_0x280d0e,_0xef3b42);}_0x1c7e50();function generateFancy(_0x10b135){var _0x18d4c0=_0x4905,_0x48be70=forward(_0x10b135)[_0x18d4c0(0x1c5)]('\x0a\x0a');for($[_0x18d4c0(0x1bd)](_0x48be70,function(_0x1177ec,_0x4cb30c){var _0x5efcf7=_0x18d4c0;$(_0x5efcf7(0x1c7)+_0x1177ec)['val'](_0x4cb30c),0x0;}),k=0x59;k<=ct;k++)$(_0x18d4c0(0x1c7)+k)[_0x18d4c0(0x1cb)](crazyWithFlourishOrSymbols(_0x10b135));}
$(".loadmore").click(function(){$(this).html('Loading...');var text=$.trim($(".fancytext").val());if(text==''){text='Preview Text';}
var that=$(this);var intvl=setInterval(function(){that.html('Load More');clearInterval(intvl);},1000);for(var i=1;i<=10;i++){fancyText='<div class="input-group mb-3"><input type="text" class="form-control" value="'+crazyWithFlourishOrSymbols(text)+'" id="copy_'+ct+'" readonly="readonly"><div class="input-group-append"><span class="input-group-text copybutton" style="cursor:pointer;" data-clipboard-action="copy" data-clipboard-target="#copy_'+ct+'">Copy</span></div></div>';ct++;$("#result").append(fancyText);}});});$(function(){var intv=setInterval(function(){$(".copybutton").html('Copy');},2000);$("body").on('click',".copybutton",function(){$(".copybutton").html('Copy');$(this).html('Copied');clearInterval(intv);});});var clipboard=new ClipboardJS('.copybutton');clipboard.on('success',function(e){});clipboard.on('error',function(e){});

Back to list