Current File : /home/lecoinf/www/iwp/js/jquery.encode.min.js |
/*!
* jquery.base64.js 0.0.3 - https://github.com/yckart/jquery.base64.js
* Makes Base64 en & -decoding simpler as it is.
*
* Based upon: https://gist.github.com/Yaffle/1284012
*
* Copyright (c) 2012 Yannick Albert (http://yckart.com)
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
* 2013/02/10
**/
!function(r){function e(r,e,n,t,o,a){r=String(r);for(var u=0,c=0,f=r.length,d="",i=0;f>c;){var h=r.charCodeAt(c);for(h=256>h?n[h]:-1,u=(u<<o)+h,i+=o;i>=a;){i-=a;var C=u>>i;d+=t.charAt(C),u^=C<<i}++c}return!e&&i>0&&(d+=t.charAt(u<<a-i)),d}for(var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="",o=[256],a=[256],u=0,c={encode:function(r){var e=r.replace(/[\u0080-\u07ff]/g,function(r){var e=r.charCodeAt(0);return String.fromCharCode(192|e>>6,128|63&e)}).replace(/[\u0800-\uffff]/g,function(r){var e=r.charCodeAt(0);return String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e)});return e},decode:function(r){var e=r.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(r){var e=(15&r.charCodeAt(0))<<12|(63&r.charCodeAt(1))<<6|63&r.charCodeAt(2);return String.fromCharCode(e)}).replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(r){var e=(31&r.charCodeAt(0))<<6|63&r.charCodeAt(1);return String.fromCharCode(e)});return e}};256>u;){var f=String.fromCharCode(u);t+=f,a[u]=u,o[u]=n.indexOf(f),++u}var d=r.base64=function(r,e,n){return e?d[r](e,n):r?null:this};d.btoa=d.encode=function(r,t){return r=d.raw===!1||d.utf8encode||t?c.encode(r):r,r=e(r,!1,a,n,8,6),r+"====".slice(r.length%4||4)},d.atob=d.decode=function(r,n){r=r.replace(/[^A-Za-z0-9\+\/\=]/g,""),r=String(r).split("=");var a=r.length;do--a,r[a]=e(r[a],!0,o,t,6,8);while(a>0);return r=r.join(""),d.raw===!1||d.utf8decode||n?c.decode(r):r}}(jQuery);