| Server IP : 172.67.216.113 / Your IP : 172.71.28.145 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/kainumber.com/plugin/sweetalert-master/lib/modules/ |
Upload File : |
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
/*
* Allow user to pass their own params
*/
var extend = function extend(a, b) {
for (var key in b) {
if (b.hasOwnProperty(key)) {
a[key] = b[key];
}
}
return a;
};
/*
* Convert HEX codes to RGB values (#000000 -> rgb(0,0,0))
*/
var hexToRgb = function hexToRgb(hex) {
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? parseInt(result[1], 16) + ', ' + parseInt(result[2], 16) + ', ' + parseInt(result[3], 16) : null;
};
/*
* Check if the user is using Internet Explorer 8 (for fallbacks)
*/
var isIE8 = function isIE8() {
return window.attachEvent && !window.addEventListener;
};
/*
* IE compatible logging for developers
*/
var logStr = function logStr(string) {
if (typeof(window) !== 'undefined' && window.console) {
// IE...
window.console.log('SweetAlert: ' + string);
}
};
/*
* Set hover, active and focus-states for buttons
* (source: http://www.sitepoint.com/javascript-generate-lighter-darker-color)
*/
var colorLuminance = function colorLuminance(hex, lum) {
// Validate hex string
hex = String(hex).replace(/[^0-9a-f]/gi, '');
if (hex.length < 6) {
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
}
lum = lum || 0;
// Convert to decimal and change luminosity
var rgb = '#';
var c;
var i;
for (i = 0; i < 3; i++) {
c = parseInt(hex.substr(i * 2, 2), 16);
c = Math.round(Math.min(Math.max(0, c + c * lum), 255)).toString(16);
rgb += ('00' + c).substr(c.length);
}
return rgb;
};
exports.extend = extend;
exports.hexToRgb = hexToRgb;
exports.isIE8 = isIE8;
exports.logStr = logStr;
exports.colorLuminance = colorLuminance;