text: /**
   * 
   * Copyright (c) 2014 Keita Kuroki
   * Released under MIT license:
   * http://www.opensource.org/licenses/mit-license.php
   *  
   * For more information:
   * https://github.com/keitakun/Magipack.js
   * code@hellokeita.in
   * 
   **/var Magipack=function(){function r(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)return new ActiveXObject("MSXML2.XMLHTTP.3.0")}function i(e,t){e&&this.init(e,t)}window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL;i.isIE=document.all;i.version="0.1";if(i.isIE){var e=document.createElement("script");e.type="text/vbscript";e.innerHTML='Function IEBinaryToArray_ByteStr(Binary)\n	IEBinaryToArray_ByteStr = CStr(Binary)\nEnd Function\nFunction IEBinaryToArray_ByteStr_Last(Binary)\n	Dim lastIndex\n	lastIndex = LenB(Binary)\n	if lastIndex mod 2 Then\n		IEBinaryToArray_ByteStr_Last = Chr( AscB( MidB( Binary, lastIndex, 1 ) ) )\n	Else\n		IEBinaryToArray_ByteStr_Last = ""\n	End If\nEnd Function';document.write(e.outerHTML);function t(e){var t={};for(var n=0;n<256;n++)for(var r=0;r<256;r++)t[String.fromCharCode(n+r*256)]=String.fromCharCode(n)+String.fromCharCode(r);var i=IEBinaryToArray_ByteStr(e),s=IEBinaryToArray_ByteStr_Last(e);return i.replace(/[\s\S]/g,function(e){return t[e]})+s}function n(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";t=t.split("");var n=e.length,r=0,i=b=0,s=0,o=0,u,a,f,l,c,h,p,d="";while(r<n){u=e.charCodeAt(r+0)&255;a=e.charCodeAt(r+1)&255;f=e.charCodeAt(r+2)&255;l=u>>2&63;c=(u<<4|a>>4)&63;h=(a<<2|f>>6)&63;p=f&63;d+=t[l]+t[c]+t[h]+t[p];r+=3}r=n%3;n=d.length;r==1?d=d.substr(0,n-2)+"==":r==2&&(d=d.substr(0,n-1)+"=");return d}}i.prototype._loadFile=function(e,t,n){var i=r();n||(n="blob");i.open("GET",e,!0);i.responseType=n;var s=t,o=this;i.onreadystatechange=function(e){if(this.readyState==4){s&&s.call(o,this);this.onreadystatechange=null}};i.send(null)};i.prototype._configLoaded=function(e){this.config=JSON.parse(e.responseText);this._loadFile(this.pack,this._packLoaded)};i.prototype._packLoaded=function(e){i.isIE?this.init(e.responseBody,this.config):this.init(e.response,this.config);this.onLoadComplete&&this.onLoadComplete(this)};i.prototype._findFile=function(e){var t;t=this.config.length;while(t-->0)if(e.indexOf(this.config[t][0])>=0)return this.config[t]};i.prototype._getRange=function(e,t,r){if(i.isIE)return"data:"+r+";base64,"+n(this.ieBlob.substr(e,t-e));var s=this.blob.slice(e,t);s.type=r;return window.URL.createObjectURL(s)};i.prototype.init=function(e,n){this.config=n;e&&(i.isIE?this.ieBlob=t(e):this.blob=new Blob([e]))};i.prototype.load=function(e,t){this.pack=e;t?this._loadFile(t,this._configLoaded,"text"):this._loadFile(e,this._packLoaded)};i.prototype.getURI=function(){if(arguments.length==0)throw new Error("Not enough arguments.");if(isNaN(arguments[0])&&!this.config)throw new Error("No config file loaded.");var e;if(!isNaN(arguments[0])&&!isNaN(arguments[1])){e=arguments[2];e||(e="text/plain");return this._getRange(arguments[0],arguments[1],e)}var t=this._findFile(arguments[0]);if(!t)throw new Error("File not found in pack.");e=t[3];e||(e="text/plain");return this._getRange(t[1],t[2],e)};i.init=function(e,t){if(this.inited)throw new Error("Magipack static instance already initialized.");this._instance=new i(e,t);e&&this._instance.init(e,t);this.inited=!0};i.load=function(e,t){this.inited||this.init();this._instance.onLoadComplete=this.onLoadComplete;this._instance.load(e,t)};i.getURI=function(){return this._instance.getURI.apply(this._instance,arguments)};return i}();