/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ var saveAs=saveAs||function(n){"use strict";if(typeof navigator=="undefined"||!/MSIE [1-9]\./.test(navigator.userAgent)){var s=n.document,r=function(){return n.URL||n.webkitURL||n},i=s.createElementNS("http://www.w3.org/1999/xhtml","a"),v="download"in i,y=function(t){var i=s.createEvent("MouseEvents");i.initMouseEvent("click",!0,!1,n,0,0,0,0,0,!1,!1,!1,!1,0,null);t.dispatchEvent(i)},u=n.webkitRequestFileSystem,h=n.requestFileSystem||u||n.mozRequestFileSystem,p=function(t){(n.setImmediate||n.setTimeout)(function(){throw t;},0)},f="application/octet-stream",c=0,w=500,e=function(t){var i=function(){typeof t=="string"?r().revokeObjectURL(t):t.remove()};n.chrome?i():setTimeout(i,w)},o=function(n,t,i){var r,u;for(t=[].concat(t),r=t.length;r--;)if(u=n["on"+t[r]],typeof u=="function")try{u.call(n,i||n)}catch(f){p(f)}},l=function(n){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(n.type)?new Blob(["",n],{type:n.type}):n},a=function(t,s){t=l(t);var a=this,d=t.type,g=!1,p,k,nt=function(){o(a,"writestart progress write writeend".split(" "))},w=function(){if((g||!p)&&(p=r().createObjectURL(t)),k)k.location.href=p;else{var i=n.open(p,"_blank");i==undefined&&typeof safari!="undefined"&&(n.location.href=p)}a.readyState=a.DONE;nt();e(p)},b=function(n){return function(){if(a.readyState!==a.DONE)return n.apply(this,arguments)}},tt={create:!0,exclusive:!1},it;if(a.readyState=a.INIT,s||(s="download"),v){p=r().createObjectURL(t);i.href=p;i.download=s;y(i);a.readyState=a.DONE;nt();e(p);return}if(n.chrome&&d&&d!==f&&(it=t.slice||t.webkitSlice,t=it.call(t,0,t.size,f),g=!0),u&&s!=="download"&&(s+=".download"),(d===f||u)&&(k=n),!h){w();return}c+=t.size;h(n.TEMPORARY,c,b(function(n){n.root.getDirectory("saved",tt,b(function(n){var i=function(){n.getFile(s,tt,b(function(n){n.createWriter(b(function(i){i.onwriteend=function(t){k.location.href=n.toURL();a.readyState=a.DONE;o(a,"writeend",t);e(n)};i.onerror=function(){var n=i.error;n.code!==n.ABORT_ERR&&w()};"writestart progress write abort".split(" ").forEach(function(n){i["on"+n]=a["on"+n]});i.write(t);a.abort=function(){i.abort();a.readyState=a.DONE};a.readyState=a.WRITING}),w)}),w)};n.getFile(s,{create:!1},b(function(n){n.remove();i()}),b(function(n){n.code===n.NOT_FOUND_ERR?i():w()}))}),w)}),w)},t=a.prototype,b=function(n,t){return new a(n,t)};return typeof navigator!="undefined"&&navigator.msSaveOrOpenBlob?function(n,t){return navigator.msSaveOrOpenBlob(l(n),t)}:(t.abort=function(){var n=this;n.readyState=n.DONE;o(n,"abort")},t.readyState=t.INIT=0,t.WRITING=1,t.DONE=2,t.error=t.onwritestart=t.onprogress=t.onwrite=t.onabort=t.onerror=t.onwriteend=null,b)}}(typeof self!="undefined"&&self||typeof window!="undefined"&&window||this.content);typeof module!="undefined"&&module.exports?module.exports.saveAs=saveAs:typeof define!="undefined"&&define!==null&&define.amd!=null&&define([],function(){return saveAs})