text: /*!
   * accounting.js v0.4.1
   * Copyright 2014 Open Exchange Rates
   *
   * Freely distributable under the MIT license.
   * Portions of accounting.js are inspired or borrowed from underscore.js
   *
   * Full details and documentation:
   * http://openexchangerates.github.io/accounting.js/
   */
  (function(o,g){var n={};n.version="0.4.1";n.settings={currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}};console.log(thousandsSep);if(typeof thousandsSep!="undefined"){n.settings.currency.thousand=thousandsSep;n.settings.number.thousand=thousandsSep}var p=Array.prototype.map,j=Array.isArray,f=Object.prototype.toString;function c(r){return !!(r===""||(r&&r.charCodeAt&&r.substr))}function k(r){return j?j(r):f.call(r)==="[object Array]"}function q(r){return r&&f.call(r)==="[object Object]"}function h(s,r){var t;s=s||{};r=r||{};for(t in r){if(r.hasOwnProperty(t)){if(s[t]==null){s[t]=r[t]}}}return s}function a(w,v,u){var t=[],s,r;if(!w){return t}if(p&&w.map===p){return w.map(v,u)}for(s=0,r=w.length;s<r;s++){t[s]=v.call(u,w[s],s,w)}return t}function l(s,r){s=Math.round(Math.abs(s));return isNaN(s)?r:s}function e(s){var r=n.settings.currency.format;if(typeof s==="function"){s=s()}if(c(s)&&s.match("%v")){return{pos:s,neg:s.replace("-","").replace("%v","-%v"),zero:s}}else{if(!s||!s.pos||!s.pos.match("%v")){return(!c(r))?r:n.settings.currency.format={pos:r,neg:r.replace("%v","-%v"),zero:r}}}return s}var i=n.unformat=n.parse=function(u,r){if(k(u)){return a(u,function(v){return i(v,r)})}u=u||0;if(typeof u==="number"){return u}r=r||n.settings.number.decimal;var t=new RegExp("[^0-9-"+r+"]",["g"]),s=parseFloat((""+u).replace(/\((.*)\)/,"-$1").replace(t,"").replace(r,"."));return !isNaN(s)?s:0};var b=n.toFixed=function(t,r){r=l(r,n.settings.number.precision);var s=Math.pow(10,r);return(Math.round(n.unformat(t)*s)/s).toFixed(r)};var d=n.formatNumber=n.format=function(t,w,z,v){if(k(t)){return a(t,function(A){return d(A,w,z,v)})}t=i(t);var r=h((q(w)?w:{precision:w,thousand:z,decimal:v}),n.settings.number),x=l(r.precision),u=t<0?"-":"",s=parseInt(b(Math.abs(t||0),x),10)+"",y=s.length>3?s.length%3:0;return u+(y?s.substr(0,y)+r.thousand:"")+s.substr(y).replace(/(\d{3})(?=\d)/g,"$1"+r.thousand)+(x?r.decimal+b(Math.abs(t),x).split(".")[1]:"")};var m=n.formatMoney=function(t,s,v,z,u,y){if(k(t)){return a(t,function(A){return m(A,s,v,z,u,y)})}t=i(t);var r=h((q(s)?s:{symbol:s,precision:v,thousand:z,decimal:u,format:y}),n.settings.currency),x=e(r.format),w=t>0?x.pos:t<0?x.neg:x.zero;return w.replace("%s",r.symbol).replace("%v",d(Math.abs(t),l(r.precision),r.thousand,r.decimal))};n.formatColumn=function(y,t,w,B,v,A){if(!y){return[]}var r=h((q(t)?t:{symbol:t,precision:w,thousand:B,decimal:v,format:A}),n.settings.currency),z=e(r.format),x=z.pos.indexOf("%s")<z.pos.indexOf("%v")?true:false,s=0,u=a(y,function(F,D){if(k(F)){return n.formatColumn(F,r)}else{F=i(F);var C=F>0?z.pos:F<0?z.neg:z.zero,E=C.replace("%s",r.symbol).replace("%v",d(Math.abs(F),l(r.precision),r.thousand,r.decimal));if(E.length>s){s=E.length}return E}});return a(u,function(D,C){if(c(D)&&D.length<s){return x?D.replace(r.symbol,r.symbol+(new Array(s-D.length+1).join(" "))):(new Array(s-D.length+1).join(" "))+D}return D})};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports){exports=module.exports=n}exports.accounting=n}else{if(typeof define==="function"&&define.amd){define([],function(){return n})}else{n.noConflict=(function(r){return function(){o.accounting=r;n.noConflict=g;return n}})(o.accounting);o.accounting=n}}}(this));