<filename>public/assets/js/variable.min.js
/* 
 * More info at: http://phpjs.org
 * 
 * This is version: 3.19
 * php.js is copyright 2010 <NAME>.
 * 
 * Portions copyright <NAME> (http://brett-zamir.me), <NAME>
 * (http://kevin.vanzonneveld.net), <NAME>, Theriault, <NAME>
 * (http://getsprink.com), <NAME>, <NAME>, Jack, Jonas
 * <NAME> (http://www.jsfromhell.com), <NAME>, Legaev
 * Andrey, <NAME> (http://magnetiq.com), <NAME>, <NAME>,
 * lmeyrick (https://sourceforge.net/projects/bcmath-js/), Nate, Philippe
 * Baumann, <NAME>, Webtoolkit.info (http://www.webtoolkit.info/),
 * <NAME>, <NAME> (http://hexmen.com/blog/), <NAME>,
 * travc, <NAME> (http://www.jsfromhell.com), WebDevHobo
 * (http://webdevhobo.blogspot.com/), stag019, RafaÅ‚ Kukawski
 * (http://blog.kukawski.pl), GeekFG (http://geekfg.blogspot.com), pilus,
 * RafaÅ‚ Kukawski (http://blog.kukawski.pl/), T.Wild, Erkekjetter,
 * http://stackoverflow.com/questions/57803/how-to-convert-decimal-to-hex-in-javascript,
 * marrtins, d3x, <NAME> (http://webreflection.blogspot.com),
 * <NAME>, <NAME> (http://www.phpvrouwen.nl), majak, mdsjack
 * (http://www.mdsjack.bo.it), <NAME>isendoerfer
 * (http://www.debuggable.com/felix), Martin (http://www.erlenwiese.de/),
 * gorthaur, <NAME>, <NAME>, gettimeofday, Chris, Mailfaker
 * (http://www.weedem.fr/), <NAME>, felix, AJ, <NAME>
 * (http://blog.stevenlevithan.com), <NAME>, <NAME>
 * (http://www.kingsquare.nl), <NAME>, <NAME>
 * (http://kevin.vanzonneveld.net/), <NAME> (mailto:<EMAIL>),
 * Breaking Par Consulting Inc
 * (http://www.breakingpar.com/bkp/home.nsf/0/87256B280015193F87256CFB006C45F7),
 * <NAME>, <NAME>
 * (http://onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/),
 * <NAME>, Sakimori, <NAME>, <NAME>, David, Diplom@t
 * (http://difane.com/), <NAME> (http://www.myipdf.com/), Pellentesque
 * Malesuada, <NAME> (http://rumkin.com), Thunder.m, <NAME>
 * (http://caioariede.com), saulius, <NAME>, <NAME>
 * (http://www.webfaktory.info/), Public Domain
 * (http://www.json.org/json2.js), <NAME>
 * (http://www.alfonsojimenez.com), ReverseSyntax, sankai, <NAME>, Oskar
 * <NAME>¶gfeldt (http://oskar-lh.name/), Arno, madipta, Slawomir
 * Kaniecki, vlado houba, Billy, class_exists, noname, Mateusz "loonquawl"
 * Zalega, Marco, <NAME>, Itsacon (http://www.itsacon.net/), Nick
 * Kolosov (http://sammy.ru), ger, marc andreu, Fox, <NAME>, Francois,
 * john (http://www.jd-tech.net), nobbler, Nathan, date, <NAME>
 * (http://javascript.crockford.com), mktime, <NAME>, <NAME>,
 * <NAME>, <NAME>, merabi, <NAME>, Gilbert, <NAME>, T0bsn,
 * <NAME>, <NAME>, MeEtc (http://yass.meetcweb.com), <NAME>
 * (http://www.quirksmode.org/js/beat.html), Pyerre, <NAME>, jmweb, Bayron
 * Guevara, <NAME> (http://web2.bitbaro.hu/), pau<NAME>, duncan,
 * <NAME>, <NAME> (http://thiagomata.blog.com), Linuxworld,
 * lmeyrick (https://sourceforge.net/projects/bcmath-js/this.), djmix, Bryan
 * Elliott, <NAME>, <NAME>, Francesco, <NAME>
 * (http://www.svest.org/), J A R, kenneth, <NAME>, <NAME>
 * (http://www.nervous.nl/), Raphael (Ao RUDLER), Shingo, LH, JB, nord_ua,
 * josh, JT, <NAME> (http://www.webapp.fr), Ozh, XoraX
 * (http://www.xorax.info), <NAME> (http://doubleaw.com/), <NAME>
 * (http://innerdom.sourceforge.net/), echo is bad, 0m3r, FremyCompany,
 * stensi, <NAME>, <NAME> (SCK-CEN Belgian Nucleair
 * Research Centre), <NAME>, <NAME>, <NAME>, Saulo
 * Vallory, Christoph, <NAME>, <NAME>, <NAME>,
 * <NAME> (http://carrot.org/), <NAME>, strftime, Brant Messenger
 * (http://www.brantmessenger.com/), <NAME>, Bug?, Blues
 * (http://tech.bluesmoon.info/), <NAME>ke
 * (http://www.bjornroesbeke.be/), <NAME>, <NAME>, Simon
 * Willison (http://simonwillison.net), <NAME>, Pul, rezna, Mick@el,
 * <NAME>, <NAME>, <NAME>, <NAME>, uestla,
 * <NAME>, Ulrich, Zahlii, <NAME>, sowberry, Norman "zEh" Fuchs, hitwork,
 * johnrembo, <NAME> (http://www.premasolutions.com/), <NAME>,
 * <NAME> (stevenlevithan.com), ejsanders, <NAME>, Philippe
 * Jausions (http://pear.php.net/user/jausions), <NAME>
 * (http://aidanlister.com/), Rob, Orlando, HKM, ChaosNo1, metjay, strcasecmp,
 * strcmp, <NAME>, jpfle, <NAME>
 * (http://snippets.dzone.com/user/AlexanderErmolaev), DxGx, dptr1988, kilops,
 * <NAME>, James, James (http://www.james-bell.co.uk/), <NAME>
 * (http://www.pedrotainha.com), <NAME>, <NAME>, jakes,
 * 3D-GRAF, Yannoo, <NAME>, <NAME>, FGFEmperor, <NAME>
 * wermann (http://wermann.com.br), <NAME>žÃ³r, <NAME>, <NAME>,
 * <NAME> (http://www.winternet.no), <NAME>, Maximusya, davook,
 * <NAME>, <NAME>, Manish, <NAME>, Cord, fearphage
 * (http://http/my.opera.com/fearphage/), Matteo, Victor, taith, <NAME>
 * Koning, <NAME>, <NAME> (http://ryan.10e.us), Riddler
 * (http://www.frontierwebdev.com/), <NAME>, <NAME>
 * (http://www.freaky-media.com/), RafaÅ‚ Kukawski, Rival, <NAME>
 * (http://lucassmith.name), <NAME> (http://www.nbill.co.uk/), Jamie
 * Beck (http://www.terabit.ca/), Garagoth, <NAME>, <NAME>
 * (http://www.letorbi.de/), DtTvB
 * (http://dt.in.th/2008-09-16.string-length-in-bytes.html), Andreas, Arnout
 * Kazemier (http://www.3rd-Eden.com), penutbutterjelly, Michael, setcookie,
 * Blues at http://hacks.bluesmoon.info/strftime/strftime.js, YUI Library:
 * http://developer.yahoo.com/yui/docs/YAHOO.util.DateLocale.html, rem, Josep
 * Sanz (http://www.ws3.es/), <NAME>, Dreamer, Amirouche, <NAME>
 * (http://www.residence-mixte.com/), <NAME>
 * (http://www.distantia.ca/), <NAME>, booeyOH, <NAME>, meo, William,
 * Greenseed, <NAME>, <NAME>, mk.keck
 * 
 * Dual licensed under the MIT (MIT-LICENSE.txt)
 * and GPL (GPL-LICENSE.txt) licenses.
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL KEVIN VAN ZONNEVELD BE LIABLE FOR ANY CLAIM, DAMAGES
 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 */ 


// Compression: minified


function doubleval(mixed_var){return this.floatval(mixed_var);}
function echo(){var arg='',argc=arguments.length,argv=arguments,i=0;var win=this.window;var d=win.document;var ns_xhtml='http://www.w3.org/1999/xhtml';var ns_xul='http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';var holder;var stringToDOM=function(str,parent,ns,container){var extraNSs='';if(ns===ns_xul){extraNSs=' xmlns:html="'+ns_xhtml+'"';}
var stringContainer='<'+container+' xmlns="'+ns+'"'+extraNSs+'>'+str+'</'+container+'>';if(win.DOMImplementationLS&&win.DOMImplementationLS.createLSInput&&win.DOMImplementationLS.createLSParser){var lsInput=DOMImplementationLS.createLSInput();lsInput.stringData=stringContainer;var lsParser=DOMImplementationLS.createLSParser(1,null);return lsParser.parse(lsInput).firstChild;}
else if(win.DOMParser){try{var fc=new DOMParser().parseFromString(stringContainer,'text/xml');if(!fc||!fc.documentElement||fc.documentElement.localName!=='parsererror'||fc.documentElement.namespaceURI!=='http://www.mozilla.org/newlayout/xml/parsererror.xml'){return fc.documentElement.firstChild;}}
catch(e){}}
else if(win.ActiveXObject){var axo=new ActiveXObject('MSXML2.DOMDocument');axo.loadXML(str);return axo.documentElement;}
if(d.createElementNS&&(d.documentElement.namespaceURI||d.documentElement.nodeName.toLowerCase()!=='html'||(d.contentType&&d.contentType!=='text/html'))){holder=d.createElementNS(ns,container);}
else{holder=d.createElement(container);}
holder.innerHTML=str;while(holder.firstChild){parent.appendChild(holder.firstChild);}
return false;};var ieFix=function(node){if(node.nodeType===1){var newNode=d.createElement(node.nodeName);var i,len;if(node.attributes&&node.attributes.length>0){for(i=0,len=node.attributes.length;i<len;i++){newNode.setAttribute(node.attributes[i].nodeName,node.getAttribute(node.attributes[i].nodeName));}}
if(node.childNodes&&node.childNodes.length>0){for(i=0,len=node.childNodes.length;i<len;i++){newNode.appendChild(ieFix(node.childNodes[i]));}}
return newNode;}
else{return d.createTextNode(node.nodeValue);}};for(i=0;i<argc;i++){arg=argv[i];if(this.php_js&&this.php_js.ini&&this.php_js.ini['phpjs.echo_embedded_vars']){arg=arg.replace(/(.?)\{\$(.*?)\}/g,function(s,m1,m2){if(m1!=='\\'){return m1+eval(m2);}
else{return s;}});}
if(d.appendChild){if(d.body){if(win.navigator.appName=='Microsoft Internet Explorer'){d.body.appendChild(stringToDOM(ieFix(arg)));}
else{var unappendedLeft=stringToDOM(arg,d.body,ns_xhtml,'div').cloneNode(true);if(unappendedLeft){d.body.appendChild(unappendedLeft);}}}else{d.documentElement.appendChild(stringToDOM(arg,d.documentElement,ns_xul,'description'));}}else if(d.write){d.write(arg);}}}
function empty(mixed_var){var key;if(mixed_var===""||mixed_var===0||mixed_var==="0"||mixed_var===null||mixed_var===false||typeof mixed_var==='undefined'){return true;}
if(typeof mixed_var=='object'){for(key in mixed_var){return false;}
return true;}
return false;}
function floatval(mixed_var){return(parseFloat(mixed_var)||0);}
function get_defined_vars(){var i='',arr=[],already={};for(i in this.window){try{if(typeof this.window[i]==='object'){for(var j in this.window[i]){if(this.window[j]&&!already[j]){already[j]=1;arr.push(j);}}}
else if(!already[i]){already[i]=1;arr.push(i);}}
catch(e){if(!already[i]){already[i]=1;arr.push(i);}}}
return arr;}
function get_resource_type(handle){var getFuncName=function(fn){var name=(/\W*function\s+([\w\$]+)\s*\(/).exec(fn);if(!name){return'(Anonymous)';}
return name[1];};if(!handle||typeof handle!=='object'||!handle.constructor||getFuncName(handle.constructor)!=='PHPJS_Resource'){return false;}
return handle.get_resource_type();}
function gettype(mixed_var){var s=typeof mixed_var,name;var getFuncName=function(fn){var name=(/\W*function\s+([\w\$]+)\s*\(/).exec(fn);if(!name){return'(Anonymous)';}
return name[1];};if(s==='object'){if(mixed_var!==null){if(typeof mixed_var.length==='number'&&!(mixed_var.propertyIsEnumerable('length'))&&typeof mixed_var.splice==='function'){s='array';}
else if(mixed_var.constructor&&getFuncName(mixed_var.constructor)){name=getFuncName(mixed_var.constructor);if(name==='Date'){s='date';}
else if(name==='RegExp'){s='regexp';}
else if(name==='PHPJS_Resource'){s='resource';}}}else{s='null';}}
else if(s==='number'){s=this.is_float(mixed_var)?'double':'integer';}
return s;}
function import_request_variables(types,prefix){var i=0,current='',url='',vars='',arrayBracketPos=-1,arrName='',win=this.window,requestObj=this.window,getObj=false,cookieObj=false;prefix=prefix||'';var that=this;var _ini_get=function(ini){if(that.php_js&&that.php_js.ini&&that.php_js.ini[ini]&&that.php_js.ini[ini].local_value){return that.php_js.ini[ini].local_value;}
return false;};requestObj=_ini_get('phpjs.requestVarsObj')||requestObj;if(/g/i.test(types)){getObj=_ini_get('phpjs.getVarsObj')||getObj;for(i=0,url=win.location.href,vars=url.substring(url.lastIndexOf('?')+1,url.length).split('&');i<vars.length;i++){current=vars[i].split('=');current[1]=decodeURIComponent(current[1]);arrayBracketPos=current[0].indexOf('[');if(arrayBracketPos!==-1){arrName=current[0].substring(0,arrayBracketPos);arrName=decodeURIComponent(arrName);if(!requestObj[prefix+arrName]){requestObj[prefix+arrName]=[];}
requestObj[prefix+arrName].push(current[1]||null);if(getObj){if(!getObj[prefix+arrName]){getObj[prefix+arrName]=[];}
getObj[prefix+arrName].push(current[1]||null);}}
else{current[0]=decodeURIComponent(current[0]);requestObj[prefix+current[0]]=current[1]||null;if(getObj){getObj[prefix+current[0]]=current[1]||null;}}}}
if(/c/i.test(types)){cookieObj=_ini_get('phpjs.cookieVarsObj')||cookieObj;for(i=0,vars=win.document.cookie.split("&");i<vars.length;i++){current=vars[i].split("=");requestObj[prefix+current[0]]=current[1].split(";")[0]||null;if(cookieObj){cookieObj[prefix+current[0]]=current[1].split(";")[0]||null;}}}}
function intval(mixed_var,base){var tmp;var type=typeof(mixed_var);if(type==='boolean'){return(mixed_var)?1:0;}else if(type==='string'){tmp=parseInt(mixed_var,base||10);return(isNaN(tmp)||!isFinite(tmp))?0:tmp;}else if(type==='number'&&isFinite(mixed_var)){return Math.floor(mixed_var);}else{return 0;}}
function is_array(mixed_var){var key='';var getFuncName=function(fn){var name=(/\W*function\s+([\w\$]+)\s*\(/).exec(fn);if(!name){return'(Anonymous)';}
return name[1];};if(!mixed_var){return false;}
this.php_js=this.php_js||{};this.php_js.ini=this.php_js.ini||{};if(typeof mixed_var==='object'){if(this.php_js.ini['phpjs.objectsAsArrays']&&((this.php_js.ini['phpjs.objectsAsArrays'].local_value.toLowerCase&&this.php_js.ini['phpjs.objectsAsArrays'].local_value.toLowerCase()==='off')||parseInt(this.php_js.ini['phpjs.objectsAsArrays'].local_value,10)===0)){return mixed_var.hasOwnProperty('length')&&!mixed_var.propertyIsEnumerable('length')&&getFuncName(mixed_var.constructor)!=='String';}
if(mixed_var.hasOwnProperty){for(key in mixed_var){if(false===mixed_var.hasOwnProperty(key)){return false;}}}
return true;}
return false;}
function is_binary(vr){return typeof vr==='string';}
function is_bool(mixed_var)
{return(typeof mixed_var==='boolean');}
function is_buffer(vr){return typeof vr==='string';}
function is_callable(v,syntax_only,callable_name){var name='',obj={},method='';var getFuncName=function(fn){var name=(/\W*function\s+([\w\$]+)\s*\(/).exec(fn);if(!name){return'(Anonymous)';}
return name[1];};if(typeof v==='string'){obj=this.window;method=v;name=v;}
else if(v instanceof Array&&v.length===2&&typeof v[0]==='object'&&typeof v[1]==='string'){obj=v[0];method=v[1];name=(obj.constructor&&getFuncName(obj.constructor))+'::'+method;}
else{return false;}
if(syntax_only||typeof obj[method]==='function'){if(callable_name){this.window[callable_name]=name;}
return true;}
return false;}
function is_double(mixed_var){return this.is_float(mixed_var);}
function is_float(mixed_var){if(typeof mixed_var!=='number'){return false;}
return!!(mixed_var%1);}
function is_int(mixed_var){if(typeof mixed_var!=='number'){return false;}
return!(mixed_var%1);}
function is_integer(mixed_var){return this.is_int(mixed_var);}
function is_long(mixed_var){return this.is_float(mixed_var);}
function is_null(mixed_var){return(mixed_var===null);}
function is_numeric(mixed_var){return(typeof(mixed_var)==='number'||typeof(mixed_var)==='string')&&mixed_var!==''&&!isNaN(mixed_var);}
function is_object(mixed_var){if(mixed_var instanceof Array){return false;}else{return(mixed_var!==null)&&(typeof(mixed_var)=='object');}}
function is_real(mixed_var){return this.is_float(mixed_var);}
function is_resource(handle){var getFuncName=function(fn){var name=(/\W*function\s+([\w\$]+)\s*\(/).exec(fn);if(!name){return'(Anonymous)';}
return name[1];};return!(!handle||typeof handle!=='object'||!handle.constructor||getFuncName(handle.constructor)!=='PHPJS_Resource');}
function is_scalar(mixed_var){return(/boolean|number|string/).test(typeof mixed_var);}
function is_string(mixed_var){return(typeof(mixed_var)=='string');}
function is_unicode(vr){if(typeof vr!=='string'){return false;}
var arr=[],any='([\s\S])',highSurrogate='[\uD800-\uDBFF]',lowSurrogate='[\uDC00-\uDFFF]',highSurrogateBeforeAny=new RegExp(highSurrogate+any,'g'),lowSurrogateAfterAny=new RegExp(any+lowSurrogate,'g'),singleLowSurrogate=new RegExp('^'+lowSurrogate+'$'),singleHighSurrogate=new RegExp('^'+highSurrogate+'$');while((arr=highSurrogateBeforeAny.exec(vr))!==null){if(!arr[1]||!arr[1].match(singleLowSurrogate)){return false;}}
while((arr=lowSurrogateAfterAny.exec(vr))!==null){if(!arr[1]||!arr[1].match(singleHighSurrogate)){return false;}}
return true;}
function isset(){var a=arguments,l=a.length,i=0,undef;if(l===0){throw new Error('Empty isset');}
while(i!==l){if(a[i]===undef||a[i]===null){return false;}
i++;}
return true;}
function print_r(array,return_val){var output="",pad_char=" ",pad_val=4,d=this.window.document;var getFuncName=function(fn){var name=(/\W*function\s+([\w\$]+)\s*\(/).exec(fn);if(!name){return'(Anonymous)';}
return name[1];};var repeat_char=function(len,pad_char){var str="";for(var i=0;i<len;i++){str+=pad_char;}
return str;};var formatArray=function(obj,cur_depth,pad_val,pad_char){if(cur_depth>0){cur_depth++;}
var base_pad=repeat_char(pad_val*cur_depth,pad_char);var thick_pad=repeat_char(pad_val*(cur_depth+1),pad_char);var str="";if(typeof obj==='object'&&obj!==null&&obj.constructor&&getFuncName(obj.constructor)!=='PHPJS_Resource'){str+="Array\n"+base_pad+"(\n";for(var key in obj){if(obj[key]instanceof Array){str+=thick_pad+"["+key+"] => "+formatArray(obj[key],cur_depth+1,pad_val,pad_char);}else{str+=thick_pad+"["+key+"] => "+obj[key]+"\n";}}
str+=base_pad+")\n";}else if(obj===null||obj===undefined){str='';}else{str=obj.toString();}
return str;};output=formatArray(array,0,pad_val,pad_char);if(return_val!==true){if(d.body){this.echo(output);}
else{try{d=XULDocument;this.echo('<pre xmlns="http://www.w3.org/1999/xhtml" style="white-space:pre;">'+output+'</pre>');}
catch(e){this.echo(output);}}
return true;}else{return output;}}
function serialize(mixed_value){var _utf8Size=function(str){var size=0,i=0,l=str.length,code='';for(i=0;i<l;i++){code=str[i].charCodeAt(0);if(code<0x0080){size+=1;}else if(code<0x0800){size+=2;}else{size+=3;}}
return size;};var _getType=function(inp){var type=typeof inp,match;var key;if(type==='object'&&!inp){return'null';}
if(type==="object"){if(!inp.constructor){return'object';}
var cons=inp.constructor.toString();match=cons.match(/(\w+)\(/);if(match){cons=match[1].toLowerCase();}
var types=["boolean","number","string","array"];for(key in types){if(cons==types[key]){type=types[key];break;}}}
return type;};var type=_getType(mixed_value);var val,ktype='';switch(type){case"function":val="";break;case"boolean":val="b:"+(mixed_value?"1":"0");break;case"number":val=(Math.round(mixed_value)==mixed_value?"i":"d")+":"+mixed_value;break;case"string":val="s:"+_utf8Size(mixed_value)+":\""+mixed_value+"\"";break;case"array":case"object":val="a";var count=0;var vals="";var okey;var key;for(key in mixed_value){if(mixed_value.hasOwnProperty(key)){ktype=_getType(mixed_value[key]);if(ktype==="function"){continue;}
okey=(key.match(/^[0-9]+$/)?parseInt(key,10):key);vals+=this.serialize(okey)+
this.serialize(mixed_value[key]);count++;}}
val+=":"+count+":{"+vals+"}";break;case"undefined":default:val="N";break;}
if(type!=="object"&&type!=="array"){val+=";";}
return val;}
function settype(vr,type){var is_array=function(arr){return typeof arr==='object'&&typeof arr.length==='number'&&!(arr.propertyIsEnumerable('length'))&&typeof arr.splice==='function';};var v,mtch,i,obj;v=this[vr]?this[vr]:vr;try{switch(type){case'boolean':if(is_array(v)&&v.length===0){this[vr]=false;}
else if(v==='0'){this[vr]=false;}
else if(typeof v==='object'&&!is_array(v)){var lgth=false;for(i in v){lgth=true;}
this[vr]=lgth;}
else{this[vr]=!!v;}
break;case'integer':if(typeof v==='number'){this[vr]=parseInt(v,10);}
else if(typeof v==='string'){mtch=v.match(/^([+\-]?)(\d+)/);if(!mtch){this[vr]=0;}
else{this[vr]=parseInt(v,10);}}
else if(v===true){this[vr]=1;}
else if(v===false||v===null){this[vr]=0;}
else if(is_array(v)&&v.length===0){this[vr]=0;}
else if(typeof v==='object'){this[vr]=1;}
break;case'float':if(typeof v==='string'){mtch=v.match(/^([+\-]?)(\d+(\.\d+)?|\.\d+)([eE][+\-]?\d+)?/);if(!mtch){this[vr]=0;}
else{this[vr]=parseFloat(v,10);}}
else if(v===true){this[vr]=1;}
else if(v===false||v===null){this[vr]=0;}
else if(is_array(v)&&v.length===0){this[vr]=0;}
else if(typeof v==='object'){this[vr]=1;}
break;case'string':if(v===null||v===false){this[vr]='';}
else if(is_array(v)){this[vr]='Array';}
else if(typeof v==='object'){this[vr]='Object';}
else if(v===true){this[vr]='1';}
else{this[vr]+='';}
break;case'array':if(v===null){this[vr]=[];}
else if(typeof v!=='object'){this[vr]=[v];}
break;case'object':if(v===null){this[vr]={};}
else if(is_array(v)){for(i=0,obj={};i<v.length;i++){obj[i]=v;}
this[vr]=obj;}
else if(typeof v!=='object'){this[vr]={scalar:v};}
break;case'null':delete this[vr];break;}
return true;}catch(e){return false;}}
function strval(str){var type='';if(str===null){return'';}
type=this.gettype(str);switch(type){case'boolean':if(str===true){return'1';}
return'';case'array':return'Array';case'object':return'Object';}
return str;}
function unserialize(data){var that=this;var utf8Overhead=function(chr){var code=chr.charCodeAt(0);if(code<0x0080){return 0;}
if(code<0x0800){return 1;}
return 2;};var error=function(type,msg,filename,line){throw new that.window[type](msg,filename,line);};var read_until=function(data,offset,stopchr){var buf=[];var chr=data.slice(offset,offset+1);var i=2;while(chr!=stopchr){if((i+offset)>data.length){error('Error','Invalid');}
buf.push(chr);chr=data.slice(offset+(i-1),offset+i);i+=1;}
return[buf.length,buf.join('')];};var read_chrs=function(data,offset,length){var buf;buf=[];for(var i=0;i<length;i++){var chr=data.slice(offset+(i-1),offset+i);buf.push(chr);length-=utf8Overhead(chr);}
return[buf.length,buf.join('')];};var _unserialize=function(data,offset){var readdata;var readData;var chrs=0;var ccount;var stringlength;var keyandchrs;var keys;if(!offset){offset=0;}
var dtype=(data.slice(offset,offset+1)).toLowerCase();var dataoffset=offset+2;var typeconvert=function(x){return x;};switch(dtype){case'i':typeconvert=function(x){return parseInt(x,10);};readData=read_until(data,dataoffset,';');chrs=readData[0];readdata=readData[1];dataoffset+=chrs+1;break;case'b':typeconvert=function(x){return parseInt(x,10)!==0;};readData=read_until(data,dataoffset,';');chrs=readData[0];readdata=readData[1];dataoffset+=chrs+1;break;case'd':typeconvert=function(x){return parseFloat(x);};readData=read_until(data,dataoffset,';');chrs=readData[0];readdata=readData[1];dataoffset+=chrs+1;break;case'n':readdata=null;break;case's':ccount=read_until(data,dataoffset,':');chrs=ccount[0];stringlength=ccount[1];dataoffset+=chrs+2;readData=read_chrs(data,dataoffset+1,parseInt(stringlength,10));chrs=readData[0];readdata=readData[1];dataoffset+=chrs+2;if(chrs!=parseInt(stringlength,10)&&chrs!=readdata.length){error('SyntaxError','String length mismatch');}
readdata=that.utf8_decode(readdata);break;case'a':readdata={};keyandchrs=read_until(data,dataoffset,':');chrs=keyandchrs[0];keys=keyandchrs[1];dataoffset+=chrs+2;for(var i=0;i<parseInt(keys,10);i++){var kprops=_unserialize(data,dataoffset);var kchrs=kprops[1];var key=kprops[2];dataoffset+=kchrs;var vprops=_unserialize(data,dataoffset);var vchrs=vprops[1];var value=vprops[2];dataoffset+=vchrs;readdata[key]=value;}
dataoffset+=1;break;default:error('SyntaxError','Unknown / Unhandled data type(s): '+dtype);break;}
return[dtype,dataoffset-offset,typeconvert(readdata)];};return _unserialize((data+''),0)[2];}
function utf8_decode(str_data){var tmp_arr=[],i=0,ac=0,c1=0,c2=0,c3=0;str_data+='';while(i<str_data.length){c1=str_data.charCodeAt(i);if(c1<128){tmp_arr[ac++]=String.fromCharCode(c1);i++;}else if((c1>191)&&(c1<224)){c2=str_data.charCodeAt(i+1);tmp_arr[ac++]=String.fromCharCode(((c1&31)<<6)|(c2&63));i+=2;}else{c2=str_data.charCodeAt(i+1);c3=str_data.charCodeAt(i+2);tmp_arr[ac++]=String.fromCharCode(((c1&15)<<12)|((c2&63)<<6)|(c3&63));i+=3;}}
return tmp_arr.join('');}
function utf8_encode(argString){var string=(argString+'');var utftext="";var start,end;var stringl=0;start=end=0;stringl=string.length;for(var n=0;n<stringl;n++){var c1=string.charCodeAt(n);var enc=null;if(c1<128){end++;}else if(c1>127&&c1<2048){enc=String.fromCharCode((c1>>6)|192)+String.fromCharCode((c1&63)|128);}else{enc=String.fromCharCode((c1>>12)|224)+String.fromCharCode(((c1>>6)&63)|128)+String.fromCharCode((c1&63)|128);}
if(enc!==null){if(end>start){utftext+=string.substring(start,end);}
utftext+=enc;start=end=n+1;}}
if(end>start){utftext+=string.substring(start,string.length);}
return utftext;}
function var_dump(){var output='',pad_char=' ',pad_val=4,lgth=0,i=0,d=this.window.document;var _getFuncName=function(fn){var name=(/\W*function\s+([\w\$]+)\s*\(/).exec(fn);if(!name){return'(Anonymous)';}
return name[1];};var _repeat_char=function(len,pad_char){var str='';for(var i=0;i<len;i++){str+=pad_char;}
return str;};var _getInnerVal=function(val,thick_pad){var ret='';if(val===null){ret='NULL';}
else if(typeof val==='boolean'){ret='bool('+val+')';}
else if(typeof val==='string'){ret='string('+val.length+') "'+val+'"';}
else if(typeof val==='number'){if(parseFloat(val)==parseInt(val,10)){ret='int('+val+')';}
else{ret='float('+val+')';}}
else if(typeof val==='undefined'){ret='undefined';}
else if(typeof val==='function'){var funcLines=val.toString().split('\n');ret='';for(var i=0,fll=funcLines.length;i<fll;i++){ret+=(i!==0?'\n'+thick_pad:'')+funcLines[i];}}
else if(val instanceof Date){ret='Date('+val+')';}
else if(val instanceof RegExp){ret='RegExp('+val+')';}
else if(val.nodeName){switch(val.nodeType){case 1:if(typeof val.namespaceURI==='undefined'||val.namespaceURI==='http://www.w3.org/1999/xhtml'){ret='HTMLElement("'+val.nodeName+'")';}
else{ret='XML Element("'+val.nodeName+'")';}
break;case 2:ret='ATTRIBUTE_NODE('+val.nodeName+')';break;case 3:ret='TEXT_NODE('+val.nodeValue+')';break;case 4:ret='CDATA_SECTION_NODE('+val.nodeValue+')';break;case 5:ret='ENTITY_REFERENCE_NODE';break;case 6:ret='ENTITY_NODE';break;case 7:ret='PROCESSING_INSTRUCTION_NODE('+val.nodeName+':'+val.nodeValue+')';break;case 8:ret='COMMENT_NODE('+val.nodeValue+')';break;case 9:ret='DOCUMENT_NODE';break;case 10:ret='DOCUMENT_TYPE_NODE';break;case 11:ret='DOCUMENT_FRAGMENT_NODE';break;case 12:ret='NOTATION_NODE';break;}}
return ret;};var _formatArray=function(obj,cur_depth,pad_val,pad_char){var someProp='';if(cur_depth>0){cur_depth++;}
var base_pad=_repeat_char(pad_val*(cur_depth-1),pad_char);var thick_pad=_repeat_char(pad_val*(cur_depth+1),pad_char);var str='';var val='';if(typeof obj==='object'&&obj!==null){if(obj.constructor&&_getFuncName(obj.constructor)==='PHPJS_Resource'){return obj.var_dump();}
lgth=0;for(someProp in obj){lgth++;}
str+='array('+lgth+') {\n';for(var key in obj){var objVal=obj[key];if(typeof objVal==='object'&&objVal!==null&&!(objVal instanceof Date)&&!(objVal instanceof RegExp)&&!objVal.nodeName){str+=thick_pad+'['+key+'] =>\n'+thick_pad+_formatArray(objVal,cur_depth+1,pad_val,pad_char);}else{val=_getInnerVal(objVal,thick_pad);str+=thick_pad+'['+key+'] =>\n'+thick_pad+val+'\n';}}
str+=base_pad+'}\n';}else{str=_getInnerVal(obj,thick_pad);}
return str;};output=_formatArray(arguments[0],0,pad_val,pad_char);for(i=1;i<arguments.length;i++){output+='\n'+_formatArray(arguments[i],0,pad_val,pad_char);}
if(d.body){this.echo(output);}
else{try{d=XULDocument;this.echo('<pre xmlns="http://www.w3.org/1999/xhtml" style="white-space:pre;">'+output+'</pre>');}
catch(e){this.echo(output);}}}
function var_export(mixed_expression,bool_return){var retstr='',iret='',cnt=0,x=[],i=0,funcParts=[],idtLevel=arguments[2]||2,innerIndent='',outerIndent='';var getFuncName=function(fn){var name=(/\W*function\s+([\w\$]+)\s*\(/).exec(fn);if(!name){return'(Anonymous)';}
return name[1];};var _makeIndent=function(idtLevel){return(new Array(idtLevel+1)).join(' ');};var __getType=function(inp){var i=0;var match,type=typeof inp;if(type==='object'&&inp.constructor&&getFuncName(inp.constructor)==='PHPJS_Resource'){return'resource';}
if(type==='function'){return'function';}
if(type==='object'&&!inp){return'null';}
if(type==="object"){if(!inp.constructor){return'object';}
var cons=inp.constructor.toString();match=cons.match(/(\w+)\(/);if(match){cons=match[1].toLowerCase();}
var types=["boolean","number","string","array"];for(i=0;i<types.length;i++){if(cons===types[i]){type=types[i];break;}}}
return type;};var type=__getType(mixed_expression);if(type===null){retstr="NULL";}else if(type==='array'||type==='object'){outerIndent=_makeIndent(idtLevel-2);innerIndent=_makeIndent(idtLevel);for(i in mixed_expression){var value=this.var_export(mixed_expression[i],true,idtLevel+2);value=typeof value==='string'?value.replace(/</g,'&lt;').replace(/>/g,'&gt;'):value;x[cnt++]=innerIndent+i+' => '+(__getType(mixed_expression[i])==='array'?'\n':'')+value;}
iret=x.join(',\n');retstr=outerIndent+"array (\n"+iret+'\n'+outerIndent+')';}
else if(type==='function'){funcParts=mixed_expression.toString().match(/function .*?\((.*?)\) \{([\s\S]*)\}/);retstr="create_function ('"+funcParts[1]+"', '"+funcParts[2].replace(new RegExp("'",'g'),"\\'")+"')";}
else if(type==='resource'){retstr='NULL';}else{retstr=(typeof(mixed_expression)!=='string')?mixed_expression:"'"+mixed_expression.replace(/(["'])/g,"\\$1").replace(/\0/g,"\\0")+"'";}
if(bool_return!==true){this.echo(retstr);return null;}else{return retstr;}}