diff options
Diffstat (limited to 'bundle.js')
| -rw-r--r-- | bundle.js | 1135 |
1 files changed, 571 insertions, 564 deletions
@@ -63,7 +63,7 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 60); +/******/ return __webpack_require__(__webpack_require__.s = 62); /******/ }) /************************************************************************/ /******/ ([ @@ -76,7 +76,7 @@ var support = __webpack_require__(2); var base64 = __webpack_require__(28); var nodejsUtils = __webpack_require__(12); -var setImmediate = __webpack_require__(81); +var setImmediate = __webpack_require__(83); var external = __webpack_require__(10); @@ -1460,8 +1460,8 @@ exports.Utf8EncodeWorker = Utf8EncodeWorker; -var base64 = __webpack_require__(64) -var ieee754 = __webpack_require__(66) +var base64 = __webpack_require__(66) +var ieee754 = __webpack_require__(68) var isArray = __webpack_require__(27) exports.Buffer = Buffer @@ -3371,7 +3371,7 @@ var ES6Promise = null; if (typeof Promise !== "undefined") { ES6Promise = Promise; } else { - ES6Promise = __webpack_require__(95); + ES6Promise = __webpack_require__(97); } /** @@ -27883,7 +27883,7 @@ var _tone = __webpack_require__(11); var _tone2 = _interopRequireDefault(_tone); -var _startAudioContext = __webpack_require__(62); +var _startAudioContext = __webpack_require__(64); var _startAudioContext2 = _interopRequireDefault(_startAudioContext); @@ -28637,7 +28637,7 @@ util.inherits = __webpack_require__(6); /*<replacement>*/ var internalUtil = { - deprecate: __webpack_require__(117) + deprecate: __webpack_require__(119) }; /*</replacement>*/ @@ -29242,7 +29242,7 @@ Writable.prototype._destroy = function (err, cb) { this.end(); cb(err); }; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15), __webpack_require__(116).setImmediate, __webpack_require__(5))) +/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(15), __webpack_require__(118).setImmediate, __webpack_require__(5))) /***/ }), /* 25 */ @@ -29254,7 +29254,7 @@ exports.Readable = exports; exports.Writable = __webpack_require__(24); exports.Duplex = __webpack_require__(4); exports.Transform = __webpack_require__(51); -exports.PassThrough = __webpack_require__(106); +exports.PassThrough = __webpack_require__(108); /***/ }), @@ -29496,7 +29496,7 @@ exports.STORE = { return new GenericWorker("STORE decompression"); } }; -exports.DEFLATE = __webpack_require__(68); +exports.DEFLATE = __webpack_require__(70); /***/ }), @@ -29529,7 +29529,7 @@ exports.dosPermissions = null; * reduce the final size of the bundle (only one stream implementation, not * two). */ -module.exports = __webpack_require__(115); +module.exports = __webpack_require__(117); /***/ }), @@ -29758,8 +29758,8 @@ module.exports = Uint8ArrayReader; var utils = __webpack_require__(0); var support = __webpack_require__(2); var ArrayReader = __webpack_require__(32); -var StringReader = __webpack_require__(76); -var NodeBufferReader = __webpack_require__(75); +var StringReader = __webpack_require__(78); +var NodeBufferReader = __webpack_require__(77); var Uint8ArrayReader = __webpack_require__(34); /** @@ -29995,7 +29995,7 @@ module.exports = DataWorker; /* WEBPACK VAR INJECTION */(function(Buffer) { var utils = __webpack_require__(0); -var ConvertWorker = __webpack_require__(77); +var ConvertWorker = __webpack_require__(79); var GenericWorker = __webpack_require__(1); var base64 = __webpack_require__(28); var support = __webpack_require__(2); @@ -30004,7 +30004,7 @@ var external = __webpack_require__(10); var NodejsStreamOutputAdapter = null; if (support.nodestream) { try { - NodejsStreamOutputAdapter = __webpack_require__(73); + NodejsStreamOutputAdapter = __webpack_require__(75); } catch(e) {} } @@ -30219,7 +30219,7 @@ if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding -var aFunction = __webpack_require__(82); +var aFunction = __webpack_require__(84); module.exports = function(fn, that, length){ aFunction(fn); if(that === undefined)return fn; @@ -30784,7 +30784,7 @@ util.inherits = __webpack_require__(6); /*</replacement>*/ /*<replacement>*/ -var debugUtil = __webpack_require__(118); +var debugUtil = __webpack_require__(122); var debug = void 0; if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog('stream'); @@ -30793,7 +30793,7 @@ if (debugUtil && debugUtil.debuglog) { } /*</replacement>*/ -var BufferList = __webpack_require__(107); +var BufferList = __webpack_require__(109); var destroyImpl = __webpack_require__(52); var StringDecoder; @@ -32328,13 +32328,13 @@ Object.defineProperty(exports, "__esModule", { var _util = __webpack_require__(17); -__webpack_require__(63); +__webpack_require__(65); var _mouse = __webpack_require__(26); var _mouse2 = _interopRequireDefault(_mouse); -var _color = __webpack_require__(61); +var _color = __webpack_require__(63); var _color2 = _interopRequireDefault(_color); @@ -32715,9 +32715,9 @@ var _tone2 = _interopRequireDefault(_tone); var _util = __webpack_require__(17); -var _signalWindows = __webpack_require__(112); +var _signalWindows = __webpack_require__(114); -var _fft = __webpack_require__(65); +var _fft = __webpack_require__(67); var _fft2 = _interopRequireDefault(_fft); @@ -33037,6 +33037,201 @@ exports.default = { /* 59 */ /***/ (function(module, exports, __webpack_require__) { +var __WEBPACK_AMD_DEFINE_RESULT__;/* FileSaver.js + * A saveAs() FileSaver implementation. + * 1.3.2 + * 2016-06-16 18:25:19 + * + * By Eli Grey, http://eligrey.com + * License: MIT + * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md + */ + +/*global self */ +/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */ + +/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ + +var saveAs = saveAs || (function(view) { + "use strict"; + // IE <10 is explicitly unsupported + if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) { + return; + } + var + doc = view.document + // only get URL when necessary in case Blob.js hasn't overridden it yet + , get_URL = function() { + return view.URL || view.webkitURL || view; + } + , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") + , can_use_save_link = "download" in save_link + , click = function(node) { + var event = new MouseEvent("click"); + node.dispatchEvent(event); + } + , is_safari = /constructor/i.test(view.HTMLElement) || view.safari + , is_chrome_ios =/CriOS\/[\d]+/.test(navigator.userAgent) + , throw_outside = function(ex) { + (view.setImmediate || view.setTimeout)(function() { + throw ex; + }, 0); + } + , force_saveable_type = "application/octet-stream" + // the Blob API is fundamentally broken as there is no "downloadfinished" event to subscribe to + , arbitrary_revoke_timeout = 1000 * 40 // in ms + , revoke = function(file) { + var revoker = function() { + if (typeof file === "string") { // file is an object URL + get_URL().revokeObjectURL(file); + } else { // file is a File + file.remove(); + } + }; + setTimeout(revoker, arbitrary_revoke_timeout); + } + , dispatch = function(filesaver, event_types, event) { + event_types = [].concat(event_types); + var i = event_types.length; + while (i--) { + var listener = filesaver["on" + event_types[i]]; + if (typeof listener === "function") { + try { + listener.call(filesaver, event || filesaver); + } catch (ex) { + throw_outside(ex); + } + } + } + } + , auto_bom = function(blob) { + // prepend BOM for UTF-8 XML and text/* types (including HTML) + // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF + if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { + return new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type}); + } + return blob; + } + , FileSaver = function(blob, name, no_auto_bom) { + if (!no_auto_bom) { + blob = auto_bom(blob); + } + // First try a.download, then web filesystem, then object URLs + var + filesaver = this + , type = blob.type + , force = type === force_saveable_type + , object_url + , dispatch_all = function() { + dispatch(filesaver, "writestart progress write writeend".split(" ")); + } + // on any filesys errors revert to saving with object URLs + , fs_error = function() { + if ((is_chrome_ios || (force && is_safari)) && view.FileReader) { + // Safari doesn't allow downloading of blob urls + var reader = new FileReader(); + reader.onloadend = function() { + var url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;'); + var popup = view.open(url, '_blank'); + if(!popup) view.location.href = url; + url=undefined; // release reference before dispatching + filesaver.readyState = filesaver.DONE; + dispatch_all(); + }; + reader.readAsDataURL(blob); + filesaver.readyState = filesaver.INIT; + return; + } + // don't create more object URLs than needed + if (!object_url) { + object_url = get_URL().createObjectURL(blob); + } + if (force) { + view.location.href = object_url; + } else { + var opened = view.open(object_url, "_blank"); + if (!opened) { + // Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html + view.location.href = object_url; + } + } + filesaver.readyState = filesaver.DONE; + dispatch_all(); + revoke(object_url); + } + ; + filesaver.readyState = filesaver.INIT; + + if (can_use_save_link) { + object_url = get_URL().createObjectURL(blob); + setTimeout(function() { + save_link.href = object_url; + save_link.download = name; + click(save_link); + dispatch_all(); + revoke(object_url); + filesaver.readyState = filesaver.DONE; + }); + return; + } + + fs_error(); + } + , FS_proto = FileSaver.prototype + , saveAs = function(blob, name, no_auto_bom) { + return new FileSaver(blob, name || blob.name || "download", no_auto_bom); + } + ; + // IE 10+ (native saveAs) + if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) { + return function(blob, name, no_auto_bom) { + name = name || blob.name || "download"; + + if (!no_auto_bom) { + blob = auto_bom(blob); + } + return navigator.msSaveOrOpenBlob(blob, name); + }; + } + + FS_proto.abort = function(){}; + FS_proto.readyState = FS_proto.INIT = 0; + FS_proto.WRITING = 1; + FS_proto.DONE = 2; + + FS_proto.error = + FS_proto.onwritestart = + FS_proto.onprogress = + FS_proto.onwrite = + FS_proto.onabort = + FS_proto.onerror = + FS_proto.onwriteend = + null; + + return saveAs; +}( + typeof self !== "undefined" && self + || typeof window !== "undefined" && window + || this.content +)); +// `self` is undefined in Firefox for Android content script context +// while `this` is nsIContentFrameMessageManager +// with an attribute `content` that corresponds to the window + +if (typeof module !== "undefined" && module.exports) { + module.exports.saveAs = saveAs; +} else if (("function" !== "undefined" && __webpack_require__(120) !== null) && (__webpack_require__(121) !== null)) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { + return saveAs; + }.call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); +} + + +/***/ }), +/* 60 */ +/***/ (function(module, exports, __webpack_require__) { + "use strict"; @@ -33075,8 +33270,8 @@ function JSZip() { return newObj; }; } -JSZip.prototype = __webpack_require__(74); -JSZip.prototype.loadAsync = __webpack_require__(71); +JSZip.prototype = __webpack_require__(76); +JSZip.prototype.loadAsync = __webpack_require__(73); JSZip.support = __webpack_require__(2); JSZip.defaults = __webpack_require__(30); @@ -33093,7 +33288,232 @@ module.exports = JSZip; /***/ }), -/* 60 */ +/* 61 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */ + +!function() { + 'use strict' + + var re = { + not_string: /[^s]/, + not_bool: /[^t]/, + not_type: /[^T]/, + not_primitive: /[^v]/, + number: /[diefg]/, + numeric_arg: /[bcdiefguxX]/, + json: /[j]/, + not_json: /[^j]/, + text: /^[^\x25]+/, + modulo: /^\x25{2}/, + placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/, + key: /^([a-z_][a-z_\d]*)/i, + key_access: /^\.([a-z_][a-z_\d]*)/i, + index_access: /^\[(\d+)\]/, + sign: /^[\+\-]/ + } + + function sprintf(key) { + // `arguments` is not an array, but should be fine for this call + return sprintf_format(sprintf_parse(key), arguments) + } + + function vsprintf(fmt, argv) { + return sprintf.apply(null, [fmt].concat(argv || [])) + } + + function sprintf_format(parse_tree, argv) { + var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, match, pad, pad_character, pad_length, is_positive, sign + for (i = 0; i < tree_length; i++) { + if (typeof parse_tree[i] === 'string') { + output += parse_tree[i] + } + else if (Array.isArray(parse_tree[i])) { + match = parse_tree[i] // convenience purposes only + if (match[2]) { // keyword argument + arg = argv[cursor] + for (k = 0; k < match[2].length; k++) { + if (!arg.hasOwnProperty(match[2][k])) { + throw new Error(sprintf('[sprintf] property "%s" does not exist', match[2][k])) + } + arg = arg[match[2][k]] + } + } + else if (match[1]) { // positional argument (explicit) + arg = argv[match[1]] + } + else { // positional argument (implicit) + arg = argv[cursor++] + } + + if (re.not_type.test(match[8]) && re.not_primitive.test(match[8]) && arg instanceof Function) { + arg = arg() + } + + if (re.numeric_arg.test(match[8]) && (typeof arg !== 'number' && isNaN(arg))) { + throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg)) + } + + if (re.number.test(match[8])) { + is_positive = arg >= 0 + } + + switch (match[8]) { + case 'b': + arg = parseInt(arg, 10).toString(2) + break + case 'c': + arg = String.fromCharCode(parseInt(arg, 10)) + break + case 'd': + case 'i': + arg = parseInt(arg, 10) + break + case 'j': + arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0) + break + case 'e': + arg = match[7] ? parseFloat(arg).toExponential(match[7]) : parseFloat(arg).toExponential() + break + case 'f': + arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg) + break + case 'g': + arg = match[7] ? String(Number(arg.toPrecision(match[7]))) : parseFloat(arg) + break + case 'o': + arg = (parseInt(arg, 10) >>> 0).toString(8) + break + case 's': + arg = String(arg) + arg = (match[7] ? arg.substring(0, match[7]) : arg) + break + case 't': + arg = String(!!arg) + arg = (match[7] ? arg.substring(0, match[7]) : arg) + break + case 'T': + arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase() + arg = (match[7] ? arg.substring(0, match[7]) : arg) + break + case 'u': + arg = parseInt(arg, 10) >>> 0 + break + case 'v': + arg = arg.valueOf() + arg = (match[7] ? arg.substring(0, match[7]) : arg) + break + case 'x': + arg = (parseInt(arg, 10) >>> 0).toString(16) + break + case 'X': + arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase() + break + } + if (re.json.test(match[8])) { + output += arg + } + else { + if (re.number.test(match[8]) && (!is_positive || match[3])) { + sign = is_positive ? '+' : '-' + arg = arg.toString().replace(re.sign, '') + } + else { + sign = '' + } + pad_character = match[4] ? match[4] === '0' ? '0' : match[4].charAt(1) : ' ' + pad_length = match[6] - (sign + arg).length + pad = match[6] ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : '' + output += match[5] ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg) + } + } + } + return output + } + + var sprintf_cache = Object.create(null) + + function sprintf_parse(fmt) { + if (sprintf_cache[fmt]) { + return sprintf_cache[fmt] + } + + var _fmt = fmt, match, parse_tree = [], arg_names = 0 + while (_fmt) { + if ((match = re.text.exec(_fmt)) !== null) { + parse_tree.push(match[0]) + } + else if ((match = re.modulo.exec(_fmt)) !== null) { + parse_tree.push('%') + } + else if ((match = re.placeholder.exec(_fmt)) !== null) { + if (match[2]) { + arg_names |= 1 + var field_list = [], replacement_field = match[2], field_match = [] + if ((field_match = re.key.exec(replacement_field)) !== null) { + field_list.push(field_match[1]) + while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') { + if ((field_match = re.key_access.exec(replacement_field)) !== null) { + field_list.push(field_match[1]) + } + else if ((field_match = re.index_access.exec(replacement_field)) !== null) { + field_list.push(field_match[1]) + } + else { + throw new SyntaxError('[sprintf] failed to parse named argument key') + } + } + } + else { + throw new SyntaxError('[sprintf] failed to parse named argument key') + } + match[2] = field_list + } + else { + arg_names |= 2 + } + if (arg_names === 3) { + throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported') + } + parse_tree.push(match) + } + else { + throw new SyntaxError('[sprintf] unexpected placeholder') + } + _fmt = _fmt.substring(match[0].length) + } + return sprintf_cache[fmt] = parse_tree + } + + /** + * export to either browser or node.js + */ + /* eslint-disable quote-props */ + if (true) { + exports['sprintf'] = sprintf + exports['vsprintf'] = vsprintf + } + if (typeof window !== 'undefined') { + window['sprintf'] = sprintf + window['vsprintf'] = vsprintf + + if (true) { + !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { + return { + 'sprintf': sprintf, + 'vsprintf': vsprintf + } + }.call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) + } + } + /* eslint-enable quote-props */ +}() + + +/***/ }), +/* 62 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33103,13 +33523,13 @@ var _tone = __webpack_require__(11); var _tone2 = _interopRequireDefault(_tone); -var _jszip = __webpack_require__(59); +var _jszip = __webpack_require__(60); var _jszip2 = _interopRequireDefault(_jszip); -var _sprintfJs = __webpack_require__(120); +var _sprintfJs = __webpack_require__(61); -var _fileSaver = __webpack_require__(121); +var _fileSaver = __webpack_require__(59); var _fileSaver2 = _interopRequireDefault(_fileSaver); @@ -33183,10 +33603,14 @@ function drop(e) { } selfDrag = false; } +var files = void 0, + file_index = 0; function handleFileSelect(e) { - var files = e.dataTransfer ? e.dataTransfer.files : e.target.files; - var file = files[0]; - // console.log(files, file) + files = e.dataTransfer ? e.dataTransfer.files : e.target.files; + loadNext(); +} +function loadNext() { + var file = files[file_index++]; if (!file) return; load(file); } @@ -33203,25 +33627,28 @@ function loadBuffer() { if (!pcm) return; var FRAME_LENGTH = 126 * 255; - var FRAME_OFFSET = FRAME_LENGTH / 8; + var FRAME_OFFSET = FRAME_LENGTH / 4; var zip = new _jszip2.default(); var zip_folder = zip.folder("images"); - for (var offset = 0, count = 0, _len = pcm.length; offset < _len; offset += FRAME_OFFSET, count += 1) { + for (var offset = 0, count = 0, _len = pcm.length - FRAME_LENGTH; offset < _len; offset += FRAME_OFFSET, count += 1) { + if (count % 100 === 0) console.log(count); // console.log('generating', count, offset) - var player = render(pcm.slice(offset, offset + FRAME_LENGTH), count, zip_folder); - register(player, count); + // let player = render(pcm.slice(offset, offset+FRAME_LENGTH), count, zip_folder) + render(pcm.slice(offset, offset + FRAME_LENGTH), count, zip_folder); + // register(player, count) // if (count > 20) break } console.log('done exporting'); - // zip.generateAsync({type:"blob"}).then(function(content) { - // console.log('saving zip') - // FileSaver.saveAs(content, "img2pix.zip") - // }) - play(0); + zip.generateAsync({ type: "blob" }).then(function (content) { + console.log('saving zip'); + _fileSaver2.default.saveAs(content, "img2pix.zip"); + setTimeout(loadNext, 1000); + }); + // play(0) } function render(pcm, count, zip) { var fft = _spectrum2.default.toSpectrum(pcm, sr); @@ -33269,12 +33696,12 @@ function register(player, i) { player.canvas.addEventListener('click', function () { play(i); }); - gallery.appendChild(player.canvas); + // gallery.appendChild(player.canvas) } init(); /***/ }), -/* 61 */ +/* 63 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33341,7 +33768,7 @@ function hue2rgb(v1, v2, vH) { exports.default = { color: color, hsl2rgb: hsl2rgb }; /***/ }), -/* 62 */ +/* 64 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33532,7 +33959,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol }); /***/ }), -/* 63 */ +/* 65 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33683,7 +34110,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol })(window.HTMLCanvasElement.prototype); /***/ }), -/* 64 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -33806,7 +34233,7 @@ function fromByteArray (uint8) { /***/ }), -/* 65 */ +/* 67 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34320,7 +34747,7 @@ FFT.prototype._singleRealTransform4 = function _singleRealTransform4(outOff, /***/ }), -/* 66 */ +/* 68 */ /***/ (function(module, exports) { exports.read = function (buffer, offset, isLE, mLen, nBytes) { @@ -34410,7 +34837,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { /***/ }), -/* 67 */ +/* 69 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -34487,14 +34914,14 @@ function immediate(task) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }), -/* 68 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined'); -var pako = __webpack_require__(96); +var pako = __webpack_require__(98); var utils = __webpack_require__(0); var GenericWorker = __webpack_require__(1); @@ -34579,7 +35006,7 @@ exports.uncompressWorker = function () { /***/ }), -/* 69 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35126,14 +35553,14 @@ module.exports = ZipFileWorker; /***/ }), -/* 70 */ +/* 72 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var compressions = __webpack_require__(29); -var ZipFileWorker = __webpack_require__(69); +var ZipFileWorker = __webpack_require__(71); /** * Find the compression to use. @@ -35190,7 +35617,7 @@ exports.generateWorker = function (zip, options, comment) { /***/ }), -/* 71 */ +/* 73 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35199,7 +35626,7 @@ var utils = __webpack_require__(0); var external = __webpack_require__(10); var utf8 = __webpack_require__(7); var utils = __webpack_require__(0); -var ZipEntries = __webpack_require__(78); +var ZipEntries = __webpack_require__(80); var Crc32Probe = __webpack_require__(37); var nodejsUtils = __webpack_require__(12); @@ -35279,7 +35706,7 @@ module.exports = function(data, options) { /***/ }), -/* 72 */ +/* 74 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35360,7 +35787,7 @@ module.exports = NodejsStreamInputAdapter; /***/ }), -/* 73 */ +/* 75 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35409,7 +35836,7 @@ module.exports = NodejsStreamOutputAdapter; /***/ }), -/* 74 */ +/* 76 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35420,10 +35847,10 @@ var GenericWorker = __webpack_require__(1); var StreamHelper = __webpack_require__(40); var defaults = __webpack_require__(30); var CompressedObject = __webpack_require__(19); -var ZipObject = __webpack_require__(80); -var generate = __webpack_require__(70); +var ZipObject = __webpack_require__(82); +var generate = __webpack_require__(72); var nodejsUtils = __webpack_require__(12); -var NodejsStreamInputAdapter = __webpack_require__(72); +var NodejsStreamInputAdapter = __webpack_require__(74); /** @@ -35805,7 +36232,7 @@ module.exports = out; /***/ }), -/* 75 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35831,7 +36258,7 @@ module.exports = NodeBufferReader; /***/ }), -/* 76 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35876,7 +36303,7 @@ module.exports = StringReader; /***/ }), -/* 77 */ +/* 79 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35909,7 +36336,7 @@ module.exports = ConvertWorker; /***/ }), -/* 78 */ +/* 80 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -35917,7 +36344,7 @@ module.exports = ConvertWorker; var readerFor = __webpack_require__(35); var utils = __webpack_require__(0); var sig = __webpack_require__(36); -var ZipEntry = __webpack_require__(79); +var ZipEntry = __webpack_require__(81); var utf8 = __webpack_require__(7); var support = __webpack_require__(2); // class ZipEntries {{{ @@ -36178,7 +36605,7 @@ module.exports = ZipEntries; /***/ }), -/* 79 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36477,7 +36904,7 @@ module.exports = ZipEntry; /***/ }), -/* 80 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -36617,14 +37044,14 @@ module.exports = ZipObject; /***/ }), -/* 81 */ +/* 83 */ /***/ (function(module, exports, __webpack_require__) { -__webpack_require__(94); +__webpack_require__(96); module.exports = __webpack_require__(41).setImmediate; /***/ }), -/* 82 */ +/* 84 */ /***/ (function(module, exports) { module.exports = function(it){ @@ -36633,7 +37060,7 @@ module.exports = function(it){ }; /***/ }), -/* 83 */ +/* 85 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(22); @@ -36643,7 +37070,7 @@ module.exports = function(it){ }; /***/ }), -/* 84 */ +/* 86 */ /***/ (function(module, exports) { var toString = {}.toString; @@ -36653,13 +37080,13 @@ module.exports = function(it){ }; /***/ }), -/* 85 */ +/* 87 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(13) , core = __webpack_require__(41) , ctx = __webpack_require__(42) - , hide = __webpack_require__(86) + , hide = __webpack_require__(88) , PROTOTYPE = 'prototype'; var $export = function(type, name, source){ @@ -36719,11 +37146,11 @@ $export.R = 128; // real proto method for `library` module.exports = $export; /***/ }), -/* 86 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { -var dP = __webpack_require__(90) - , createDesc = __webpack_require__(91); +var dP = __webpack_require__(92) + , createDesc = __webpack_require__(93); module.exports = __webpack_require__(21) ? function(object, key, value){ return dP.f(object, key, createDesc(1, value)); } : function(object, key, value){ @@ -36732,13 +37159,13 @@ module.exports = __webpack_require__(21) ? function(object, key, value){ }; /***/ }), -/* 87 */ +/* 89 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(13).document && document.documentElement; /***/ }), -/* 88 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(21) && !__webpack_require__(44)(function(){
@@ -36746,7 +37173,7 @@ module.exports = !__webpack_require__(21) && !__webpack_require__(44)(function() }); /***/ }), -/* 89 */ +/* 91 */ /***/ (function(module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 @@ -36767,12 +37194,12 @@ module.exports = function(fn, args, that){ }; /***/ }), -/* 90 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { -var anObject = __webpack_require__(83) - , IE8_DOM_DEFINE = __webpack_require__(88) - , toPrimitive = __webpack_require__(93) +var anObject = __webpack_require__(85) + , IE8_DOM_DEFINE = __webpack_require__(90) + , toPrimitive = __webpack_require__(95) , dP = Object.defineProperty; exports.f = __webpack_require__(21) ? Object.defineProperty : function defineProperty(O, P, Attributes){ @@ -36788,7 +37215,7 @@ exports.f = __webpack_require__(21) ? Object.defineProperty : function definePro }; /***/ }), -/* 91 */ +/* 93 */ /***/ (function(module, exports) { module.exports = function(bitmap, value){ @@ -36801,12 +37228,12 @@ module.exports = function(bitmap, value){ }; /***/ }), -/* 92 */ +/* 94 */ /***/ (function(module, exports, __webpack_require__) { var ctx = __webpack_require__(42) - , invoke = __webpack_require__(89) - , html = __webpack_require__(87) + , invoke = __webpack_require__(91) + , html = __webpack_require__(89) , cel = __webpack_require__(43) , global = __webpack_require__(13) , process = global.process @@ -36843,7 +37270,7 @@ if(!setTask || !clearTask){ delete queue[id]; }; // Node.js 0.8- - if(__webpack_require__(84)(process) == 'process'){ + if(__webpack_require__(86)(process) == 'process'){ defer = function(id){ process.nextTick(ctx(run, id, 1)); }; @@ -36881,7 +37308,7 @@ module.exports = { }; /***/ }), -/* 93 */ +/* 95 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) @@ -36898,23 +37325,23 @@ module.exports = function(it, S){ }; /***/ }), -/* 94 */ +/* 96 */ /***/ (function(module, exports, __webpack_require__) { -var $export = __webpack_require__(85) - , $task = __webpack_require__(92); +var $export = __webpack_require__(87) + , $task = __webpack_require__(94); $export($export.G + $export.B, { setImmediate: $task.set, clearImmediate: $task.clear }); /***/ }), -/* 95 */ +/* 97 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var immediate = __webpack_require__(67); +var immediate = __webpack_require__(69); /* istanbul ignore next */ function INTERNAL() {} @@ -37169,7 +37596,7 @@ function race(iterable) { /***/ }), -/* 96 */ +/* 98 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -37178,8 +37605,8 @@ function race(iterable) { var assign = __webpack_require__(3).assign; -var deflate = __webpack_require__(97); -var inflate = __webpack_require__(98); +var deflate = __webpack_require__(99); +var inflate = __webpack_require__(100); var constants = __webpack_require__(47); var pako = {}; @@ -37190,14 +37617,14 @@ module.exports = pako; /***/ }), -/* 97 */ +/* 99 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var zlib_deflate = __webpack_require__(99); +var zlib_deflate = __webpack_require__(101); var utils = __webpack_require__(3); var strings = __webpack_require__(45); var msg = __webpack_require__(23); @@ -37597,20 +38024,20 @@ exports.gzip = gzip; /***/ }), -/* 98 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var zlib_inflate = __webpack_require__(102); +var zlib_inflate = __webpack_require__(104); var utils = __webpack_require__(3); var strings = __webpack_require__(45); var c = __webpack_require__(47); var msg = __webpack_require__(23); var ZStream = __webpack_require__(49); -var GZheader = __webpack_require__(100); +var GZheader = __webpack_require__(102); var toString = Object.prototype.toString; @@ -38022,7 +38449,7 @@ exports.ungzip = inflate; /***/ }), -/* 99 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -38048,7 +38475,7 @@ exports.ungzip = inflate; // 3. This notice may not be removed or altered from any source distribution. var utils = __webpack_require__(3); -var trees = __webpack_require__(104); +var trees = __webpack_require__(106); var adler32 = __webpack_require__(46); var crc32 = __webpack_require__(48); var msg = __webpack_require__(23); @@ -39903,7 +40330,7 @@ exports.deflateTune = deflateTune; /***/ }), -/* 100 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -39968,7 +40395,7 @@ module.exports = GZheader; /***/ }), -/* 101 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40320,7 +40747,7 @@ module.exports = function inflate_fast(strm, start) { /***/ }), -/* 102 */ +/* 104 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -40348,8 +40775,8 @@ module.exports = function inflate_fast(strm, start) { var utils = __webpack_require__(3); var adler32 = __webpack_require__(46); var crc32 = __webpack_require__(48); -var inflate_fast = __webpack_require__(101); -var inflate_table = __webpack_require__(103); +var inflate_fast = __webpack_require__(103); +var inflate_table = __webpack_require__(105); var CODES = 0; var LENS = 1; @@ -41883,7 +42310,7 @@ exports.inflateUndermine = inflateUndermine; /***/ }), -/* 103 */ +/* 105 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -42233,7 +42660,7 @@ module.exports = function inflate_table(type, lens, lens_index, codes, table, ta /***/ }), -/* 104 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43460,14 +43887,14 @@ exports._tr_align = _tr_align; /***/ }), -/* 105 */ +/* 107 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(4); /***/ }), -/* 106 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43520,7 +43947,7 @@ PassThrough.prototype._transform = function (chunk, encoding, cb) { }; /***/ }), -/* 107 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -43529,7 +43956,7 @@ PassThrough.prototype._transform = function (chunk, encoding, cb) { function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var Buffer = __webpack_require__(16).Buffer; -var util = __webpack_require__(119); +var util = __webpack_require__(123); function copyBuffer(src, target, offset) { src.copy(target, offset); @@ -43605,28 +44032,28 @@ if (util && util.inspect && util.inspect.custom) { } /***/ }), -/* 108 */ +/* 110 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(25).PassThrough /***/ }), -/* 109 */ +/* 111 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(25).Transform /***/ }), -/* 110 */ +/* 112 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(24); /***/ }), -/* 111 */ +/* 113 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) { @@ -43819,17 +44246,17 @@ module.exports = __webpack_require__(24); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5), __webpack_require__(15))) /***/ }), -/* 112 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { - framer: __webpack_require__(113), - windows: __webpack_require__(114) + framer: __webpack_require__(115), + windows: __webpack_require__(116) }; /***/ }), -/* 113 */ +/* 115 */ /***/ (function(module, exports) { /*===========================================================================*\ @@ -43896,7 +44323,7 @@ module.exports = Framer; /***/ }), -/* 114 */ +/* 116 */ /***/ (function(module, exports) { /*===========================================================================*\ @@ -43940,7 +44367,7 @@ module.exports = { /***/ }), -/* 115 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { // Copyright Joyent, Inc. and other Node contributors. @@ -43971,10 +44398,10 @@ var inherits = __webpack_require__(6); inherits(Stream, EE); Stream.Readable = __webpack_require__(25); -Stream.Writable = __webpack_require__(110); -Stream.Duplex = __webpack_require__(105); -Stream.Transform = __webpack_require__(109); -Stream.PassThrough = __webpack_require__(108); +Stream.Writable = __webpack_require__(112); +Stream.Duplex = __webpack_require__(107); +Stream.Transform = __webpack_require__(111); +Stream.PassThrough = __webpack_require__(110); // Backwards-compat with node 0.4.x Stream.Stream = Stream; @@ -44073,7 +44500,7 @@ Stream.prototype.pipe = function(dest, options) { /***/ }), -/* 116 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var apply = Function.prototype.apply; @@ -44126,7 +44553,7 @@ exports._unrefActive = exports.active = function(item) { }; // setimmediate attaches itself to the global object -__webpack_require__(111); +__webpack_require__(113); // On some exotic environments, it's not clear which object `setimmeidate` was // able to install onto. Search each possibility in the same order as the // `setimmediate` library. @@ -44140,7 +44567,7 @@ exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) || /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }), -/* 117 */ +/* 119 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) { @@ -44214,454 +44641,34 @@ function config (name) { /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }), -/* 118 */ -/***/ (function(module, exports) { - -/* (ignored) */ - -/***/ }), -/* 119 */ -/***/ (function(module, exports) { - -/* (ignored) */ - -/***/ }), /* 120 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/* global window, exports, define */ - -!function() { - 'use strict' - - var re = { - not_string: /[^s]/, - not_bool: /[^t]/, - not_type: /[^T]/, - not_primitive: /[^v]/, - number: /[diefg]/, - numeric_arg: /[bcdiefguxX]/, - json: /[j]/, - not_json: /[^j]/, - text: /^[^\x25]+/, - modulo: /^\x25{2}/, - placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/, - key: /^([a-z_][a-z_\d]*)/i, - key_access: /^\.([a-z_][a-z_\d]*)/i, - index_access: /^\[(\d+)\]/, - sign: /^[\+\-]/ - } - - function sprintf(key) { - // `arguments` is not an array, but should be fine for this call - return sprintf_format(sprintf_parse(key), arguments) - } - - function vsprintf(fmt, argv) { - return sprintf.apply(null, [fmt].concat(argv || [])) - } - - function sprintf_format(parse_tree, argv) { - var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, match, pad, pad_character, pad_length, is_positive, sign - for (i = 0; i < tree_length; i++) { - if (typeof parse_tree[i] === 'string') { - output += parse_tree[i] - } - else if (Array.isArray(parse_tree[i])) { - match = parse_tree[i] // convenience purposes only - if (match[2]) { // keyword argument - arg = argv[cursor] - for (k = 0; k < match[2].length; k++) { - if (!arg.hasOwnProperty(match[2][k])) { - throw new Error(sprintf('[sprintf] property "%s" does not exist', match[2][k])) - } - arg = arg[match[2][k]] - } - } - else if (match[1]) { // positional argument (explicit) - arg = argv[match[1]] - } - else { // positional argument (implicit) - arg = argv[cursor++] - } - - if (re.not_type.test(match[8]) && re.not_primitive.test(match[8]) && arg instanceof Function) { - arg = arg() - } - - if (re.numeric_arg.test(match[8]) && (typeof arg !== 'number' && isNaN(arg))) { - throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg)) - } - - if (re.number.test(match[8])) { - is_positive = arg >= 0 - } - - switch (match[8]) { - case 'b': - arg = parseInt(arg, 10).toString(2) - break - case 'c': - arg = String.fromCharCode(parseInt(arg, 10)) - break - case 'd': - case 'i': - arg = parseInt(arg, 10) - break - case 'j': - arg = JSON.stringify(arg, null, match[6] ? parseInt(match[6]) : 0) - break - case 'e': - arg = match[7] ? parseFloat(arg).toExponential(match[7]) : parseFloat(arg).toExponential() - break - case 'f': - arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg) - break - case 'g': - arg = match[7] ? String(Number(arg.toPrecision(match[7]))) : parseFloat(arg) - break - case 'o': - arg = (parseInt(arg, 10) >>> 0).toString(8) - break - case 's': - arg = String(arg) - arg = (match[7] ? arg.substring(0, match[7]) : arg) - break - case 't': - arg = String(!!arg) - arg = (match[7] ? arg.substring(0, match[7]) : arg) - break - case 'T': - arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase() - arg = (match[7] ? arg.substring(0, match[7]) : arg) - break - case 'u': - arg = parseInt(arg, 10) >>> 0 - break - case 'v': - arg = arg.valueOf() - arg = (match[7] ? arg.substring(0, match[7]) : arg) - break - case 'x': - arg = (parseInt(arg, 10) >>> 0).toString(16) - break - case 'X': - arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase() - break - } - if (re.json.test(match[8])) { - output += arg - } - else { - if (re.number.test(match[8]) && (!is_positive || match[3])) { - sign = is_positive ? '+' : '-' - arg = arg.toString().replace(re.sign, '') - } - else { - sign = '' - } - pad_character = match[4] ? match[4] === '0' ? '0' : match[4].charAt(1) : ' ' - pad_length = match[6] - (sign + arg).length - pad = match[6] ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : '' - output += match[5] ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg) - } - } - } - return output - } - - var sprintf_cache = Object.create(null) - - function sprintf_parse(fmt) { - if (sprintf_cache[fmt]) { - return sprintf_cache[fmt] - } - - var _fmt = fmt, match, parse_tree = [], arg_names = 0 - while (_fmt) { - if ((match = re.text.exec(_fmt)) !== null) { - parse_tree.push(match[0]) - } - else if ((match = re.modulo.exec(_fmt)) !== null) { - parse_tree.push('%') - } - else if ((match = re.placeholder.exec(_fmt)) !== null) { - if (match[2]) { - arg_names |= 1 - var field_list = [], replacement_field = match[2], field_match = [] - if ((field_match = re.key.exec(replacement_field)) !== null) { - field_list.push(field_match[1]) - while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') { - if ((field_match = re.key_access.exec(replacement_field)) !== null) { - field_list.push(field_match[1]) - } - else if ((field_match = re.index_access.exec(replacement_field)) !== null) { - field_list.push(field_match[1]) - } - else { - throw new SyntaxError('[sprintf] failed to parse named argument key') - } - } - } - else { - throw new SyntaxError('[sprintf] failed to parse named argument key') - } - match[2] = field_list - } - else { - arg_names |= 2 - } - if (arg_names === 3) { - throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported') - } - parse_tree.push(match) - } - else { - throw new SyntaxError('[sprintf] unexpected placeholder') - } - _fmt = _fmt.substring(match[0].length) - } - return sprintf_cache[fmt] = parse_tree - } - - /** - * export to either browser or node.js - */ - /* eslint-disable quote-props */ - if (true) { - exports['sprintf'] = sprintf - exports['vsprintf'] = vsprintf - } - if (typeof window !== 'undefined') { - window['sprintf'] = sprintf - window['vsprintf'] = vsprintf +/***/ (function(module, exports) { - if (true) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { - return { - 'sprintf': sprintf, - 'vsprintf': vsprintf - } - }.call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) - } - } - /* eslint-enable quote-props */ -}() +module.exports = function() {
+ throw new Error("define cannot be used indirect");
+};
/***/ }), /* 121 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_RESULT__;/* FileSaver.js - * A saveAs() FileSaver implementation. - * 1.3.2 - * 2016-06-16 18:25:19 - * - * By Eli Grey, http://eligrey.com - * License: MIT - * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md - */ - -/*global self */ -/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */ - -/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ - -var saveAs = saveAs || (function(view) { - "use strict"; - // IE <10 is explicitly unsupported - if (typeof view === "undefined" || typeof navigator !== "undefined" && /MSIE [1-9]\./.test(navigator.userAgent)) { - return; - } - var - doc = view.document - // only get URL when necessary in case Blob.js hasn't overridden it yet - , get_URL = function() { - return view.URL || view.webkitURL || view; - } - , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") - , can_use_save_link = "download" in save_link - , click = function(node) { - var event = new MouseEvent("click"); - node.dispatchEvent(event); - } - , is_safari = /constructor/i.test(view.HTMLElement) || view.safari - , is_chrome_ios =/CriOS\/[\d]+/.test(navigator.userAgent) - , throw_outside = function(ex) { - (view.setImmediate || view.setTimeout)(function() { - throw ex; - }, 0); - } - , force_saveable_type = "application/octet-stream" - // the Blob API is fundamentally broken as there is no "downloadfinished" event to subscribe to - , arbitrary_revoke_timeout = 1000 * 40 // in ms - , revoke = function(file) { - var revoker = function() { - if (typeof file === "string") { // file is an object URL - get_URL().revokeObjectURL(file); - } else { // file is a File - file.remove(); - } - }; - setTimeout(revoker, arbitrary_revoke_timeout); - } - , dispatch = function(filesaver, event_types, event) { - event_types = [].concat(event_types); - var i = event_types.length; - while (i--) { - var listener = filesaver["on" + event_types[i]]; - if (typeof listener === "function") { - try { - listener.call(filesaver, event || filesaver); - } catch (ex) { - throw_outside(ex); - } - } - } - } - , auto_bom = function(blob) { - // prepend BOM for UTF-8 XML and text/* types (including HTML) - // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF - if (/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) { - return new Blob([String.fromCharCode(0xFEFF), blob], {type: blob.type}); - } - return blob; - } - , FileSaver = function(blob, name, no_auto_bom) { - if (!no_auto_bom) { - blob = auto_bom(blob); - } - // First try a.download, then web filesystem, then object URLs - var - filesaver = this - , type = blob.type - , force = type === force_saveable_type - , object_url - , dispatch_all = function() { - dispatch(filesaver, "writestart progress write writeend".split(" ")); - } - // on any filesys errors revert to saving with object URLs - , fs_error = function() { - if ((is_chrome_ios || (force && is_safari)) && view.FileReader) { - // Safari doesn't allow downloading of blob urls - var reader = new FileReader(); - reader.onloadend = function() { - var url = is_chrome_ios ? reader.result : reader.result.replace(/^data:[^;]*;/, 'data:attachment/file;'); - var popup = view.open(url, '_blank'); - if(!popup) view.location.href = url; - url=undefined; // release reference before dispatching - filesaver.readyState = filesaver.DONE; - dispatch_all(); - }; - reader.readAsDataURL(blob); - filesaver.readyState = filesaver.INIT; - return; - } - // don't create more object URLs than needed - if (!object_url) { - object_url = get_URL().createObjectURL(blob); - } - if (force) { - view.location.href = object_url; - } else { - var opened = view.open(object_url, "_blank"); - if (!opened) { - // Apple does not allow window.open, see https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/WorkingwithWindowsandTabs/WorkingwithWindowsandTabs.html - view.location.href = object_url; - } - } - filesaver.readyState = filesaver.DONE; - dispatch_all(); - revoke(object_url); - } - ; - filesaver.readyState = filesaver.INIT; - - if (can_use_save_link) { - object_url = get_URL().createObjectURL(blob); - setTimeout(function() { - save_link.href = object_url; - save_link.download = name; - click(save_link); - dispatch_all(); - revoke(object_url); - filesaver.readyState = filesaver.DONE; - }); - return; - } - - fs_error(); - } - , FS_proto = FileSaver.prototype - , saveAs = function(blob, name, no_auto_bom) { - return new FileSaver(blob, name || blob.name || "download", no_auto_bom); - } - ; - // IE 10+ (native saveAs) - if (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob) { - return function(blob, name, no_auto_bom) { - name = name || blob.name || "download"; - - if (!no_auto_bom) { - blob = auto_bom(blob); - } - return navigator.msSaveOrOpenBlob(blob, name); - }; - } - - FS_proto.abort = function(){}; - FS_proto.readyState = FS_proto.INIT = 0; - FS_proto.WRITING = 1; - FS_proto.DONE = 2; - - FS_proto.error = - FS_proto.onwritestart = - FS_proto.onprogress = - FS_proto.onwrite = - FS_proto.onabort = - FS_proto.onerror = - FS_proto.onwriteend = - null; - - return saveAs; -}( - typeof self !== "undefined" && self - || typeof window !== "undefined" && window - || this.content -)); -// `self` is undefined in Firefox for Android content script context -// while `this` is nsIContentFrameMessageManager -// with an attribute `content` that corresponds to the window +/***/ (function(module, exports) { -if (typeof module !== "undefined" && module.exports) { - module.exports.saveAs = saveAs; -} else if (("function" !== "undefined" && __webpack_require__(122) !== null) && (__webpack_require__(123) !== null)) { - !(__WEBPACK_AMD_DEFINE_RESULT__ = function() { - return saveAs; - }.call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); -} +/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
+module.exports = __webpack_amd_options__;
+/* WEBPACK VAR INJECTION */}.call(exports, {})) /***/ }), /* 122 */ /***/ (function(module, exports) { -module.exports = function() {
- throw new Error("define cannot be used indirect");
-};
- +/* (ignored) */ /***/ }), /* 123 */ /***/ (function(module, exports) { -/* WEBPACK VAR INJECTION */(function(__webpack_amd_options__) {/* globals __webpack_amd_options__ */
-module.exports = __webpack_amd_options__;
- -/* WEBPACK VAR INJECTION */}.call(exports, {})) +/* (ignored) */ /***/ }) /******/ ]); |
