diff --git a/epub.js/epub.js b/epub.js/epub.js index cb42010..be76ab5 100644 --- a/epub.js/epub.js +++ b/epub.js/epub.js @@ -1,338 +1,59 @@ -(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,d=e.filter,g=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=function(n){return n instanceof w?n:this instanceof w?(this._wrapped=n,void 0):new w(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):n._=w,w.VERSION="1.4.4";var A=w.each=w.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(w.has(n,a)&&t.call(e,n[a],a,n)===r)return};w.map=w.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var O="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=w.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},w.reduceRight=w.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=w.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=w.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},w.find=w.detect=function(n,t,r){var e;return E(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},w.filter=w.select=function(n,t,r){var e=[];return null==n?e:d&&n.filter===d?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&(e[e.length]=n)}),e)},w.reject=function(n,t,r){return w.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},w.every=w.all=function(n,t,e){t||(t=w.identity);var u=!0;return null==n?u:g&&n.every===g?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var E=w.some=w.any=function(n,t,e){t||(t=w.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};w.contains=w.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:E(n,function(n){return n===t})},w.invoke=function(n,t){var r=o.call(arguments,2),e=w.isFunction(t);return w.map(n,function(n){return(e?t:n[t]).apply(n,r)})},w.pluck=function(n,t){return w.map(n,function(n){return n[t]})},w.where=function(n,t,r){return w.isEmpty(t)?r?null:[]:w[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},w.findWhere=function(n,t){return w.where(n,t,!0)},w.max=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.max.apply(Math,n);if(!t&&w.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},w.min=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.min.apply(Math,n);if(!t&&w.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;e.computed>a&&(e={value:n,computed:a})}),e.value},w.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=w.random(r++),e[r-1]=e[t],e[t]=n}),e};var k=function(n){return w.isFunction(n)?n:function(t){return t[n]}};w.sortBy=function(n,t,r){var e=k(t);return w.pluck(w.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.indexi;){var o=i+a>>>1;u>r.call(e,n[o])?i=o+1:a=o}return i},w.toArray=function(n){return n?w.isArray(n)?o.call(n):n.length===+n.length?w.map(n,w.identity):w.values(n):[]},w.size=function(n){return null==n?0:n.length===+n.length?n.length:w.keys(n).length},w.first=w.head=w.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},w.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},w.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},w.rest=w.tail=w.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},w.compact=function(n){return w.filter(n,w.identity)};var R=function(n,t,r){return A(n,function(n){w.isArray(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r};w.flatten=function(n,t){return R(n,t,[])},w.without=function(n){return w.difference(n,o.call(arguments,1))},w.uniq=w.unique=function(n,t,r,e){w.isFunction(t)&&(e=r,r=t,t=!1);var u=r?w.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:w.contains(a,r))||(a.push(r),i.push(n[e]))}),i},w.union=function(){return w.uniq(c.apply(e,arguments))},w.intersection=function(n){var t=o.call(arguments,1);return w.filter(w.uniq(n),function(n){return w.every(t,function(t){return w.indexOf(t,n)>=0})})},w.difference=function(n){var t=c.apply(e,o.call(arguments,1));return w.filter(n,function(n){return!w.contains(t,n)})},w.zip=function(){for(var n=o.call(arguments),t=w.max(w.pluck(n,"length")),r=Array(t),e=0;t>e;e++)r[e]=w.pluck(n,""+e);return r},w.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},w.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=w.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},w.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},w.range=function(n,t,r){1>=arguments.length&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=Array(e);e>u;)i[u++]=n,n+=r;return i},w.bind=function(n,t){if(n.bind===j&&j)return j.apply(n,o.call(arguments,1));var r=o.call(arguments,2);return function(){return n.apply(t,r.concat(o.call(arguments)))}},w.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},w.bindAll=function(n){var t=o.call(arguments,1);return 0===t.length&&(t=w.functions(n)),A(t,function(t){n[t]=w.bind(n[t],n)}),n},w.memoize=function(n,t){var r={};return t||(t=w.identity),function(){var e=t.apply(this,arguments);return w.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},w.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},w.defer=function(n){return w.delay.apply(w,[n,1].concat(o.call(arguments,1)))},w.throttle=function(n,t){var r,e,u,i,a=0,o=function(){a=new Date,u=null,i=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,0>=l?(clearTimeout(u),u=null,a=c,i=n.apply(r,e)):u||(u=setTimeout(o,l)),i}},w.debounce=function(n,t,r){var e,u;return function(){var i=this,a=arguments,o=function(){e=null,r||(u=n.apply(i,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(u=n.apply(i,a)),u}},w.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},w.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},w.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},w.after=function(n,t){return 0>=n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},w.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)w.has(n,r)&&(t[t.length]=r);return t},w.values=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push(n[r]);return t},w.pairs=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push([r,n[r]]);return t},w.invert=function(n){var t={};for(var r in n)w.has(n,r)&&(t[n[r]]=r);return t},w.functions=w.methods=function(n){var t=[];for(var r in n)w.isFunction(n[r])&&t.push(r);return t.sort()},w.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},w.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},w.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)w.contains(r,u)||(t[u]=n[u]);return t},w.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},w.clone=function(n){return w.isObject(n)?w.isArray(n)?n.slice():w.extend({},n):n},w.tap=function(n,t){return t(n),n};var I=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof w&&(n=n._wrapped),t instanceof w&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==t+"";case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;r.push(n),e.push(t);var a=0,o=!0;if("[object Array]"==u){if(a=n.length,o=a==t.length)for(;a--&&(o=I(n[a],t[a],r,e)););}else{var c=n.constructor,f=t.constructor;if(c!==f&&!(w.isFunction(c)&&c instanceof c&&w.isFunction(f)&&f instanceof f))return!1;for(var s in n)if(w.has(n,s)&&(a++,!(o=w.has(t,s)&&I(n[s],t[s],r,e))))break;if(o){for(s in t)if(w.has(t,s)&&!a--)break;o=!a}}return r.pop(),e.pop(),o};w.isEqual=function(n,t){return I(n,t,[],[])},w.isEmpty=function(n){if(null==n)return!0;if(w.isArray(n)||w.isString(n))return 0===n.length;for(var t in n)if(w.has(n,t))return!1;return!0},w.isElement=function(n){return!(!n||1!==n.nodeType)},w.isArray=x||function(n){return"[object Array]"==l.call(n)},w.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){w["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),w.isArguments(arguments)||(w.isArguments=function(n){return!(!n||!w.has(n,"callee"))}),"function"!=typeof/./&&(w.isFunction=function(n){return"function"==typeof n}),w.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},w.isNaN=function(n){return w.isNumber(n)&&n!=+n},w.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},w.isNull=function(n){return null===n},w.isUndefined=function(n){return n===void 0},w.has=function(n,t){return f.call(n,t)},w.noConflict=function(){return n._=t,this},w.identity=function(n){return n},w.times=function(n,t,r){for(var e=Array(n),u=0;n>u;u++)e[u]=t.call(r,u);return e},w.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var M={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};M.unescape=w.invert(M.escape);var S={escape:RegExp("["+w.keys(M.escape).join("")+"]","g"),unescape:RegExp("("+w.keys(M.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(n){w[n]=function(t){return null==t?"":(""+t).replace(S[n],function(t){return M[n][t]})}}),w.result=function(n,t){if(null==n)return null;var r=n[t];return w.isFunction(r)?r.call(n):r},w.mixin=function(n){A(w.functions(n),function(t){var r=w[t]=n[t];w.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),D.call(this,r.apply(w,n))}})};var N=0;w.uniqueId=function(n){var t=++N+"";return n?n+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var T=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(n,t,r){var e;r=w.defaults({},r,w.templateSettings);var u=RegExp([(r.escape||T).source,(r.interpolate||T).source,(r.evaluate||T).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(B,function(n){return"\\"+q[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,w);var c=function(n){return e.call(this,n,w)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},w.chain=function(n){return w(n).chain()};var D=function(n){return this._chain?w(n).chain():n};w.mixin(w),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];w.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],D.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];w.prototype[n]=function(){return D.call(this,t.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this); -(function(global) { -var define, requireModule, require, requirejs; +/*! + * @overview RSVP - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/tildeio/rsvp.js/master/LICENSE + * @version 3.1.0 + */ (function() { - var registry = {}, seen = {}; - - define = function(name, deps, callback) { - registry[name] = { deps: deps, callback: callback }; - }; - - requirejs = require = requireModule = function(name) { - requirejs._eak_seen = registry; - - if (seen[name]) { return seen[name]; } - seen[name] = {}; - - if (!registry[name]) { - throw new Error("Could not find module " + name); - } - - var mod = registry[name], - deps = mod.deps, - callback = mod.callback, - reified = [], - exports; - - for (var i=0, l=deps.length; i 1) { + throw new Error('Second argument not supported'); + } + if (typeof o !== 'object') { + throw new TypeError('Argument must be an object'); + } + lib$rsvp$utils$$F.prototype = o; + return new lib$rsvp$utils$$F(); + }); + function lib$rsvp$events$$indexOf(callbacks, callback) { for (var i=0, l=callbacks.length; i 1; - }; - - RSVP.filter(promises, filterFn).then(function(result){ - // result is [ 2, 3 ] - }); - ``` - - If any of the `promises` given to `RSVP.filter` are rejected, the first promise - that is rejected will be given as an argument to the returned promises's - rejection handler. For example: - - ```javascript - var promise1 = RSVP.resolve(1); - var promise2 = RSVP.reject(new Error("2")); - var promise3 = RSVP.reject(new Error("3")); - var promises = [ promise1, promise2, promise3 ]; - - var filterFn = function(item){ - return item > 1; - }; - - RSVP.filter(promises, filterFn).then(function(array){ - // Code here never runs because there are rejected promises! - }, function(reason) { - // reason.message === "2" - }); - ``` - - `RSVP.filter` will also wait for any promises returned from `filterFn`. - For instance, you may want to fetch a list of users then return a subset - of those users based on some asynchronous operation: - - ```javascript - - var alice = { name: 'alice' }; - var bob = { name: 'bob' }; - var users = [ alice, bob ]; - - var promises = users.map(function(user){ - return RSVP.resolve(user); - }); - - var filterFn = function(user){ - // Here, Alice has permissions to create a blog post, but Bob does not. - return getPrivilegesForUser(user).then(function(privs){ - return privs.can_create_blog_post === true; - }); - }; - RSVP.filter(promises, filterFn).then(function(users){ - // true, because the server told us only Alice can create a blog post. - users.length === 1; - // false, because Alice is the only user present in `users` - users[0] === bob; - }); - ``` - - @method filter - @for RSVP - @param {Array} promises - @param {Function} filterFn - function to be called on each resolved value to - filter the final results. - @param {String} label optional string describing the promise. Useful for - tooling. - @return {Promise} - */ - function filter(promises, filterFn, label) { - if (!isArray(promises)) { - throw new TypeError('You must pass an array to filter.'); + function lib$rsvp$config$$configure(name, value) { + if (name === 'onerror') { + // handle for legacy users that expect the actual + // error to be passed to their function added via + // `RSVP.configure('onerror', someFunctionHere);` + lib$rsvp$config$$config['on']('error', value); + return; } - if (!isFunction(filterFn)){ - throw new TypeError("You must pass a function to filter's second argument."); + if (arguments.length === 2) { + lib$rsvp$config$$config[name] = value; + } else { + return lib$rsvp$config$$config[name]; } - - return all(promises, label).then(function(values){ - return map(promises, filterFn, label).then(function(filterResults){ - var i, - valuesLen = values.length, - filtered = []; - - for (i = 0; i < valuesLen; i++){ - if(filterResults[i]) filtered.push(values[i]); - } - return filtered; - }); - }); } - __exports__["default"] = filter; - }); -define("rsvp/hash", - ["./promise","./utils","exports"], - function(__dependency1__, __dependency2__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - var isNonThenable = __dependency2__.isNonThenable; - var keysOf = __dependency2__.keysOf; + var lib$rsvp$instrument$$queue = []; - /** - `RSVP.hash` is similar to `RSVP.all`, but takes an object instead of an array - for its `promises` argument. + function lib$rsvp$instrument$$scheduleFlush() { + setTimeout(function() { + var entry; + for (var i = 0; i < lib$rsvp$instrument$$queue.length; i++) { + entry = lib$rsvp$instrument$$queue[i]; - Returns a promise that is fulfilled when all the given promises have been - fulfilled, or rejected if any of them become rejected. The returned promise - is fulfilled with a hash that has the same key names as the `promises` object - argument. If any of the values in the object are not promises, they will - simply be copied over to the fulfilled object. + var payload = entry.payload; - Example: - - ```javascript - var promises = { - myPromise: RSVP.resolve(1), - yourPromise: RSVP.resolve(2), - theirPromise: RSVP.resolve(3), - notAPromise: 4 - }; - - RSVP.hash(promises).then(function(hash){ - // hash here is an object that looks like: - // { - // myPromise: 1, - // yourPromise: 2, - // theirPromise: 3, - // notAPromise: 4 - // } - }); - ```` - - If any of the `promises` given to `RSVP.hash` are rejected, the first promise - that is rejected will be given as as the first argument, or as the reason to - the rejection handler. For example: - - ```javascript - var promises = { - myPromise: RSVP.resolve(1), - rejectedPromise: RSVP.reject(new Error("rejectedPromise")), - anotherRejectedPromise: RSVP.reject(new Error("anotherRejectedPromise")), - }; - - RSVP.hash(promises).then(function(hash){ - // Code here never runs because there are rejected promises! - }, function(reason) { - // reason.message === "rejectedPromise" - }); - ``` - - An important note: `RSVP.hash` is intended for plain JavaScript objects that - are just a set of keys and values. `RSVP.hash` will NOT preserve prototype - chains. - - Example: - - ```javascript - function MyConstructor(){ - this.example = RSVP.resolve("Example"); - } - - MyConstructor.prototype = { - protoProperty: RSVP.resolve("Proto Property") - }; - - var myObject = new MyConstructor(); - - RSVP.hash(myObject).then(function(hash){ - // protoProperty will not be present, instead you will just have an - // object that looks like: - // { - // example: "Example" - // } - // - // hash.hasOwnProperty('protoProperty'); // false - // 'undefined' === typeof hash.protoProperty - }); - ``` - - @method hash - @for RSVP - @param {Object} promises - @param {String} label - optional string that describes the promise. - Useful for tooling. - @return {Promise} promise that is fulfilled when all properties of `promises` - have been fulfilled, or rejected if any of them become rejected. - */ - __exports__["default"] = function hash(object, label) { - return new Promise(function(resolve, reject){ - var results = {}; - var keys = keysOf(object); - var remaining = keys.length; - var entry, property; - - if (remaining === 0) { - resolve(results); - return; - } - - function fulfilledTo(property) { - return function(value) { - results[property] = value; - if (--remaining === 0) { - resolve(results); - } - }; - } - - function onRejection(reason) { - remaining = 0; - reject(reason); - } - - for (var i = 0; i < keys.length; i++) { - property = keys[i]; - entry = object[property]; - - if (isNonThenable(entry)) { - results[property] = entry; - if (--remaining === 0) { - resolve(results); - } - } else { - Promise.cast(entry).then(fulfilledTo(property), onRejection); + payload.guid = payload.key + payload.id; + payload.childGuid = payload.key + payload.childId; + if (payload.error) { + payload.stack = payload.error.stack; } - } - }); - }; - }); -define("rsvp/instrument", - ["./config","./utils","exports"], - function(__dependency1__, __dependency2__, __exports__) { - "use strict"; - var config = __dependency1__.config; - var now = __dependency2__.now; - __exports__["default"] = function instrument(eventName, promise, child) { - // instrumentation should not disrupt normal usage. - try { - config.trigger(eventName, { - guid: promise._guidKey + promise._id, + lib$rsvp$config$$config['trigger'](entry.name, entry.payload); + } + lib$rsvp$instrument$$queue.length = 0; + }, 50); + } + + function lib$rsvp$instrument$$instrument(eventName, promise, child) { + if (1 === lib$rsvp$instrument$$queue.push({ + name: eventName, + payload: { + key: promise._guidKey, + id: promise._id, eventName: eventName, - detail: promise._detail, - childGuid: child && promise._guidKey + child._id, + detail: promise._result, + childId: child && child._id, label: promise._label, - timeStamp: now(), - stack: new Error(promise._label).stack - }); - } catch(error) { - setTimeout(function(){ - throw error; - }, 0); - } - }; - }); -define("rsvp/map", - ["./promise","./all","./utils","exports"], - function(__dependency1__, __dependency2__, __dependency3__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - var all = __dependency2__["default"]; - var isArray = __dependency3__.isArray; - var isFunction = __dependency3__.isFunction; - - /** - - `RSVP.map` is similar to JavaScript's native `map` method, except that it - waits for all promises to become fulfilled before running the `mapFn` on - each item in given to `promises`. `RSVP.map` returns a promise that will - become fulfilled with the result of running `mapFn` on the values the promises - become fulfilled with. - - For example: - - ```javascript - - var promise1 = RSVP.resolve(1); - var promise2 = RSVP.resolve(2); - var promise3 = RSVP.resolve(3); - var promises = [ promise1, promise2, promise3 ]; - - var mapFn = function(item){ - return item + 1; - }; - - RSVP.map(promises, mapFn).then(function(result){ - // result is [ 2, 3, 4 ] - }); - ``` - - If any of the `promises` given to `RSVP.map` are rejected, the first promise - that is rejected will be given as an argument to the returned promises's - rejection handler. For example: - - ```javascript - var promise1 = RSVP.resolve(1); - var promise2 = RSVP.reject(new Error("2")); - var promise3 = RSVP.reject(new Error("3")); - var promises = [ promise1, promise2, promise3 ]; - - var mapFn = function(item){ - return item + 1; - }; - - RSVP.map(promises, mapFn).then(function(array){ - // Code here never runs because there are rejected promises! - }, function(reason) { - // reason.message === "2" - }); - ``` - - `RSVP.map` will also wait if a promise is returned from `mapFn`. For example, - say you want to get all comments from a set of blog posts, but you need - the blog posts first becuase they contain a url to those comments. - - ```javscript - - var mapFn = function(blogPost){ - // getComments does some ajax and returns an RSVP.Promise that is fulfilled - // with some comments data - return getComments(blogPost.comments_url); - }; - - // getBlogPosts does some ajax and returns an RSVP.Promise that is fulfilled - // with some blog post data - RSVP.map(getBlogPosts(), mapFn).then(function(comments){ - // comments is the result of asking the server for the comments - // of all blog posts returned from getBlogPosts() - }); - ``` - - @method map - @for RSVP - @param {Array} promises - @param {Function} mapFn function to be called on each fulfilled promise. - @param {String} label optional string for labeling the promise. - Useful for tooling. - @return {Promise} promise that is fulfilled with the result of calling - `mapFn` on each fulfilled promise or value when they become fulfilled. - The promise will be rejected if any of the given `promises` become rejected. - */ - __exports__["default"] = function map(promises, mapFn, label) { - - if (!isArray(promises)) { - throw new TypeError('You must pass an array to map.'); - } - - if (!isFunction(mapFn)){ - throw new TypeError("You must pass a function to map's second argument."); - } - - return all(promises, label).then(function(results){ - var resultLen = results.length, - mappedResults = [], - i; - - for (i = 0; i < resultLen; i++){ - mappedResults.push(mapFn(results[i])); + timeStamp: lib$rsvp$utils$$now(), + error: lib$rsvp$config$$config["instrument-with-stack"] ? new Error(promise._label) : null + }})) { + lib$rsvp$instrument$$scheduleFlush(); } + } + var lib$rsvp$instrument$$default = lib$rsvp$instrument$$instrument; - return all(mappedResults, label); - }); - }; - }); -define("rsvp/node", - ["./promise","exports"], - function(__dependency1__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - - var slice = Array.prototype.slice; - - function makeNodeCallbackFor(resolve, reject) { - return function (error, value) { - if (error) { - reject(error); - } else if (arguments.length > 2) { - resolve(slice.call(arguments, 1)); - } else { - resolve(value); - } - }; + function lib$rsvp$$internal$$withOwnPromise() { + return new TypeError('A promises callback cannot return that same promise.'); } - /** - `RSVP.denodeify` takes a "node-style" function and returns a function that - will return an `RSVP.Promise`. You can use `denodeify` in Node.js or the - browser when you'd prefer to use promises over using callbacks. For example, - `denodeify` transforms the following: + function lib$rsvp$$internal$$noop() {} - ```javascript - var fs = require('fs'); + var lib$rsvp$$internal$$PENDING = void 0; + var lib$rsvp$$internal$$FULFILLED = 1; + var lib$rsvp$$internal$$REJECTED = 2; - fs.readFile('myfile.txt', function(err, data){ - if (err) return handleError(err); - handleData(data); - }); - ``` - - into: - - ```javascript - var fs = require('fs'); - - var readFile = RSVP.denodeify(fs.readFile); - - readFile('myfile.txt').then(handleData, handleError); - ``` - - Using `denodeify` makes it easier to compose asynchronous operations instead - of using callbacks. For example, instead of: - - ```javascript - var fs = require('fs'); - var log = require('some-async-logger'); - - fs.readFile('myfile.txt', function(err, data){ - if (err) return handleError(err); - fs.writeFile('myfile2.txt', data, function(err){ - if (err) throw err; - log('success', function(err) { - if (err) throw err; - }); - }); - }); - ``` - - You can chain the operations together using `then` from the returned promise: - - ```javascript - var fs = require('fs'); - var denodeify = RSVP.denodeify; - var readFile = denodeify(fs.readFile); - var writeFile = denodeify(fs.writeFile); - var log = denodeify(require('some-async-logger')); - - readFile('myfile.txt').then(function(data){ - return writeFile('myfile2.txt', data); - }).then(function(){ - return log('SUCCESS'); - }).then(function(){ - // success handler - }, function(reason){ - // rejection handler - }); - ``` - - @method denodeify - @for RSVP - @param {Function} nodeFunc a "node-style" function that takes a callback as - its last argument. The callback expects an error to be passed as its first - argument (if an error occurred, otherwise null), and the value from the - operation as its second argument ("function(err, value){ }"). - @param {Any} binding optional argument for binding the "this" value when - calling the `nodeFunc` function. - @return {Function} a function that wraps `nodeFunc` to return an - `RSVP.Promise` - */ - __exports__["default"] = function denodeify(nodeFunc, binding) { - return function() { - var nodeArgs = slice.call(arguments), resolve, reject; - var thisArg = this || binding; - - return new Promise(function(resolve, reject) { - Promise.all(nodeArgs).then(function(nodeArgs) { - try { - nodeArgs.push(makeNodeCallbackFor(resolve, reject)); - nodeFunc.apply(thisArg, nodeArgs); - } catch(e) { - reject(e); - } - }); - }); - }; - }; - }); -define("rsvp/promise", - ["./config","./events","./instrument","./utils","./promise/cast","./promise/all","./promise/race","./promise/resolve","./promise/reject","exports"], - function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __exports__) { - "use strict"; - var config = __dependency1__.config; - var EventTarget = __dependency2__["default"]; - var instrument = __dependency3__["default"]; - var objectOrFunction = __dependency4__.objectOrFunction; - var isFunction = __dependency4__.isFunction; - var now = __dependency4__.now; - var cast = __dependency5__["default"]; - var all = __dependency6__["default"]; - var race = __dependency7__["default"]; - var Resolve = __dependency8__["default"]; - var Reject = __dependency9__["default"]; - - var guidKey = 'rsvp_' + now() + '-'; - var counter = 0; - - function noop() {} - - __exports__["default"] = Promise; - - - /** - - Promise objects represent the eventual result of an asynchronous operation. The - primary way of interacting with a promise is through its `then` method, which - registers callbacks to receive either a promise’s eventual value or the reason - why the promise cannot be fulfilled. - - Terminology - ----------- - - - `promise` is an object or function with a `then` method whose behavior conforms to this specification. - - `thenable` is an object or function that defines a `then` method. - - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). - - `exception` is a value that is thrown using the throw statement. - - `reason` is a value that indicates why a promise was rejected. - - `settled` the final resting state of a promise, fulfilled or rejected. - - A promise can be in one of three states: pending, fulfilled, or rejected. - - - Basic Usage: - ------------ - - ```js - var promise = new Promise(function(resolve, reject) { - // on success - resolve(value); - - // on failure - reject(reason); - }); - - promise.then(function(value) { - // on fulfillment - }, function(reason) { - // on rejection - }); - ``` - - Advanced Usage: - --------------- - - Promises shine when abstracting away asynchronous interactions such as - `XMLHttpRequest`s. - - ```js - function getJSON(url) { - return new Promise(function(resolve, reject){ - var xhr = new XMLHttpRequest(); - - xhr.open('GET', url); - xhr.onreadystatechange = handler; - xhr.responseType = 'json'; - xhr.setRequestHeader('Accept', 'application/json'); - xhr.send(); - - function handler() { - if (this.readyState === this.DONE) { - if (this.status === 200) { - resolve(this.response); - } else { - reject(new Error("getJSON: `" + url + "` failed with status: [" + this.status + "]"); - } - } - }; - }); - } - - getJSON('/posts.json').then(function(json) { - // on fulfillment - }, function(reason) { - // on rejection - }); - ``` - - Unlike callbacks, promises are great composable primitives. - - ```js - Promise.all([ - getJSON('/posts'), - getJSON('/comments') - ]).then(function(values){ - values[0] // => postsJSON - values[1] // => commentsJSON - - return values; - }); - ``` - - @class Promise - @param {function} - @param {String} label optional string for labeling the promise. - Useful for tooling. - @constructor - */ - function Promise(resolver, label) { - if (!isFunction(resolver)) { - throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); - } - - if (!(this instanceof Promise)) { - throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); - } - - this._id = counter++; - this._label = label; - this._subscribers = []; - - if (config.instrument) { - instrument('created', this); - } - - if (noop !== resolver) { - invokeResolver(resolver, this); - } - } - - function invokeResolver(resolver, promise) { - function resolvePromise(value) { - resolve(promise, value); - } - - function rejectPromise(reason) { - reject(promise, reason); - } + var lib$rsvp$$internal$$GET_THEN_ERROR = new lib$rsvp$$internal$$ErrorObject(); + function lib$rsvp$$internal$$getThen(promise) { try { - resolver(resolvePromise, rejectPromise); - } catch(e) { - rejectPromise(e); + return promise.then; + } catch(error) { + lib$rsvp$$internal$$GET_THEN_ERROR.error = error; + return lib$rsvp$$internal$$GET_THEN_ERROR; } } - Promise.cast = cast; - Promise.all = all; - Promise.race = race; - Promise.resolve = Resolve; - Promise.reject = Reject; + function lib$rsvp$$internal$$tryThen(then, value, fulfillmentHandler, rejectionHandler) { + try { + then.call(value, fulfillmentHandler, rejectionHandler); + } catch(e) { + return e; + } + } - var PENDING = void 0; - var SEALED = 0; - var FULFILLED = 1; - var REJECTED = 2; + function lib$rsvp$$internal$$handleForeignThenable(promise, thenable, then) { + lib$rsvp$config$$config.async(function(promise) { + var sealed = false; + var error = lib$rsvp$$internal$$tryThen(then, thenable, function(value) { + if (sealed) { return; } + sealed = true; + if (thenable !== value) { + lib$rsvp$$internal$$resolve(promise, value); + } else { + lib$rsvp$$internal$$fulfill(promise, value); + } + }, function(reason) { + if (sealed) { return; } + sealed = true; - function subscribe(parent, child, onFulfillment, onRejection) { + lib$rsvp$$internal$$reject(promise, reason); + }, 'Settle: ' + (promise._label || ' unknown promise')); + + if (!sealed && error) { + sealed = true; + lib$rsvp$$internal$$reject(promise, error); + } + }, promise); + } + + function lib$rsvp$$internal$$handleOwnThenable(promise, thenable) { + if (thenable._state === lib$rsvp$$internal$$FULFILLED) { + lib$rsvp$$internal$$fulfill(promise, thenable._result); + } else if (thenable._state === lib$rsvp$$internal$$REJECTED) { + thenable._onError = null; + lib$rsvp$$internal$$reject(promise, thenable._result); + } else { + lib$rsvp$$internal$$subscribe(thenable, undefined, function(value) { + if (thenable !== value) { + lib$rsvp$$internal$$resolve(promise, value); + } else { + lib$rsvp$$internal$$fulfill(promise, value); + } + }, function(reason) { + lib$rsvp$$internal$$reject(promise, reason); + }); + } + } + + function lib$rsvp$$internal$$handleMaybeThenable(promise, maybeThenable) { + if (maybeThenable.constructor === promise.constructor) { + lib$rsvp$$internal$$handleOwnThenable(promise, maybeThenable); + } else { + var then = lib$rsvp$$internal$$getThen(maybeThenable); + + if (then === lib$rsvp$$internal$$GET_THEN_ERROR) { + lib$rsvp$$internal$$reject(promise, lib$rsvp$$internal$$GET_THEN_ERROR.error); + } else if (then === undefined) { + lib$rsvp$$internal$$fulfill(promise, maybeThenable); + } else if (lib$rsvp$utils$$isFunction(then)) { + lib$rsvp$$internal$$handleForeignThenable(promise, maybeThenable, then); + } else { + lib$rsvp$$internal$$fulfill(promise, maybeThenable); + } + } + } + + function lib$rsvp$$internal$$resolve(promise, value) { + if (promise === value) { + lib$rsvp$$internal$$fulfill(promise, value); + } else if (lib$rsvp$utils$$objectOrFunction(value)) { + lib$rsvp$$internal$$handleMaybeThenable(promise, value); + } else { + lib$rsvp$$internal$$fulfill(promise, value); + } + } + + function lib$rsvp$$internal$$publishRejection(promise) { + if (promise._onError) { + promise._onError(promise._result); + } + + lib$rsvp$$internal$$publish(promise); + } + + function lib$rsvp$$internal$$fulfill(promise, value) { + if (promise._state !== lib$rsvp$$internal$$PENDING) { return; } + + promise._result = value; + promise._state = lib$rsvp$$internal$$FULFILLED; + + if (promise._subscribers.length === 0) { + if (lib$rsvp$config$$config.instrument) { + lib$rsvp$instrument$$default('fulfilled', promise); + } + } else { + lib$rsvp$config$$config.async(lib$rsvp$$internal$$publish, promise); + } + } + + function lib$rsvp$$internal$$reject(promise, reason) { + if (promise._state !== lib$rsvp$$internal$$PENDING) { return; } + promise._state = lib$rsvp$$internal$$REJECTED; + promise._result = reason; + lib$rsvp$config$$config.async(lib$rsvp$$internal$$publishRejection, promise); + } + + function lib$rsvp$$internal$$subscribe(parent, child, onFulfillment, onRejection) { var subscribers = parent._subscribers; var length = subscribers.length; + parent._onError = null; + subscribers[length] = child; - subscribers[length + FULFILLED] = onFulfillment; - subscribers[length + REJECTED] = onRejection; + subscribers[length + lib$rsvp$$internal$$FULFILLED] = onFulfillment; + subscribers[length + lib$rsvp$$internal$$REJECTED] = onRejection; + + if (length === 0 && parent._state) { + lib$rsvp$config$$config.async(lib$rsvp$$internal$$publish, parent); + } } - function publish(promise, settled) { - var child, callback, subscribers = promise._subscribers, detail = promise._detail; + function lib$rsvp$$internal$$publish(promise) { + var subscribers = promise._subscribers; + var settled = promise._state; - if (config.instrument) { - instrument(settled === FULFILLED ? 'fulfilled' : 'rejected', promise); + if (lib$rsvp$config$$config.instrument) { + lib$rsvp$instrument$$default(settled === lib$rsvp$$internal$$FULFILLED ? 'fulfilled' : 'rejected', promise); } + if (subscribers.length === 0) { return; } + + var child, callback, detail = promise._result; + for (var i = 0; i < subscribers.length; i += 3) { child = subscribers[i]; callback = subscribers[i + settled]; - invokeCallback(settled, child, callback, detail); + if (child) { + lib$rsvp$$internal$$invokeCallback(settled, child, callback, detail); + } else { + callback(detail); + } } - promise._subscribers = null; + promise._subscribers.length = 0; } - Promise.prototype = { - /** - @property constructor - */ - constructor: Promise, + function lib$rsvp$$internal$$ErrorObject() { + this.error = null; + } - _id: undefined, - _guidKey: guidKey, - _label: undefined, + var lib$rsvp$$internal$$TRY_CATCH_ERROR = new lib$rsvp$$internal$$ErrorObject(); - _state: undefined, - _detail: undefined, - _subscribers: undefined, + function lib$rsvp$$internal$$tryCatch(callback, detail) { + try { + return callback(detail); + } catch(e) { + lib$rsvp$$internal$$TRY_CATCH_ERROR.error = e; + return lib$rsvp$$internal$$TRY_CATCH_ERROR; + } + } - _onerror: function (reason) { - config.trigger('error', reason); + function lib$rsvp$$internal$$invokeCallback(settled, promise, callback, detail) { + var hasCallback = lib$rsvp$utils$$isFunction(callback), + value, error, succeeded, failed; + + if (hasCallback) { + value = lib$rsvp$$internal$$tryCatch(callback, detail); + + if (value === lib$rsvp$$internal$$TRY_CATCH_ERROR) { + failed = true; + error = value.error; + value = null; + } else { + succeeded = true; + } + + if (promise === value) { + lib$rsvp$$internal$$reject(promise, lib$rsvp$$internal$$withOwnPromise()); + return; + } + + } else { + value = detail; + succeeded = true; + } + + if (promise._state !== lib$rsvp$$internal$$PENDING) { + // noop + } else if (hasCallback && succeeded) { + lib$rsvp$$internal$$resolve(promise, value); + } else if (failed) { + lib$rsvp$$internal$$reject(promise, error); + } else if (settled === lib$rsvp$$internal$$FULFILLED) { + lib$rsvp$$internal$$fulfill(promise, value); + } else if (settled === lib$rsvp$$internal$$REJECTED) { + lib$rsvp$$internal$$reject(promise, value); + } + } + + function lib$rsvp$$internal$$initializePromise(promise, resolver) { + var resolved = false; + try { + resolver(function resolvePromise(value){ + if (resolved) { return; } + resolved = true; + lib$rsvp$$internal$$resolve(promise, value); + }, function rejectPromise(reason) { + if (resolved) { return; } + resolved = true; + lib$rsvp$$internal$$reject(promise, reason); + }); + } catch(e) { + lib$rsvp$$internal$$reject(promise, e); + } + } + + function lib$rsvp$enumerator$$makeSettledResult(state, position, value) { + if (state === lib$rsvp$$internal$$FULFILLED) { + return { + state: 'fulfilled', + value: value + }; + } else { + return { + state: 'rejected', + reason: value + }; + } + } + + function lib$rsvp$enumerator$$Enumerator(Constructor, input, abortOnReject, label) { + var enumerator = this; + + enumerator._instanceConstructor = Constructor; + enumerator.promise = new Constructor(lib$rsvp$$internal$$noop, label); + enumerator._abortOnReject = abortOnReject; + + if (enumerator._validateInput(input)) { + enumerator._input = input; + enumerator.length = input.length; + enumerator._remaining = input.length; + + enumerator._init(); + + if (enumerator.length === 0) { + lib$rsvp$$internal$$fulfill(enumerator.promise, enumerator._result); + } else { + enumerator.length = enumerator.length || 0; + enumerator._enumerate(); + if (enumerator._remaining === 0) { + lib$rsvp$$internal$$fulfill(enumerator.promise, enumerator._result); + } + } + } else { + lib$rsvp$$internal$$reject(enumerator.promise, enumerator._validationError()); + } + } + + var lib$rsvp$enumerator$$default = lib$rsvp$enumerator$$Enumerator; + + lib$rsvp$enumerator$$Enumerator.prototype._validateInput = function(input) { + return lib$rsvp$utils$$isArray(input); + }; + + lib$rsvp$enumerator$$Enumerator.prototype._validationError = function() { + return new Error('Array Methods must be provided an Array'); + }; + + lib$rsvp$enumerator$$Enumerator.prototype._init = function() { + this._result = new Array(this.length); + }; + + lib$rsvp$enumerator$$Enumerator.prototype._enumerate = function() { + var enumerator = this; + var length = enumerator.length; + var promise = enumerator.promise; + var input = enumerator._input; + + for (var i = 0; promise._state === lib$rsvp$$internal$$PENDING && i < length; i++) { + enumerator._eachEntry(input[i], i); + } + }; + + lib$rsvp$enumerator$$Enumerator.prototype._eachEntry = function(entry, i) { + var enumerator = this; + var c = enumerator._instanceConstructor; + if (lib$rsvp$utils$$isMaybeThenable(entry)) { + if (entry.constructor === c && entry._state !== lib$rsvp$$internal$$PENDING) { + entry._onError = null; + enumerator._settledAt(entry._state, i, entry._result); + } else { + enumerator._willSettleAt(c.resolve(entry), i); + } + } else { + enumerator._remaining--; + enumerator._result[i] = enumerator._makeResult(lib$rsvp$$internal$$FULFILLED, i, entry); + } + }; + + lib$rsvp$enumerator$$Enumerator.prototype._settledAt = function(state, i, value) { + var enumerator = this; + var promise = enumerator.promise; + + if (promise._state === lib$rsvp$$internal$$PENDING) { + enumerator._remaining--; + + if (enumerator._abortOnReject && state === lib$rsvp$$internal$$REJECTED) { + lib$rsvp$$internal$$reject(promise, value); + } else { + enumerator._result[i] = enumerator._makeResult(state, i, value); + } + } + + if (enumerator._remaining === 0) { + lib$rsvp$$internal$$fulfill(promise, enumerator._result); + } + }; + + lib$rsvp$enumerator$$Enumerator.prototype._makeResult = function(state, i, value) { + return value; + }; + + lib$rsvp$enumerator$$Enumerator.prototype._willSettleAt = function(promise, i) { + var enumerator = this; + + lib$rsvp$$internal$$subscribe(promise, undefined, function(value) { + enumerator._settledAt(lib$rsvp$$internal$$FULFILLED, i, value); + }, function(reason) { + enumerator._settledAt(lib$rsvp$$internal$$REJECTED, i, reason); + }); + }; + function lib$rsvp$promise$all$$all(entries, label) { + return new lib$rsvp$enumerator$$default(this, entries, true /* abort on reject */, label).promise; + } + var lib$rsvp$promise$all$$default = lib$rsvp$promise$all$$all; + function lib$rsvp$promise$race$$race(entries, label) { + /*jshint validthis:true */ + var Constructor = this; + + var promise = new Constructor(lib$rsvp$$internal$$noop, label); + + if (!lib$rsvp$utils$$isArray(entries)) { + lib$rsvp$$internal$$reject(promise, new TypeError('You must pass an array to race.')); + return promise; + } + + var length = entries.length; + + function onFulfillment(value) { + lib$rsvp$$internal$$resolve(promise, value); + } + + function onRejection(reason) { + lib$rsvp$$internal$$reject(promise, reason); + } + + for (var i = 0; promise._state === lib$rsvp$$internal$$PENDING && i < length; i++) { + lib$rsvp$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection); + } + + return promise; + } + var lib$rsvp$promise$race$$default = lib$rsvp$promise$race$$race; + function lib$rsvp$promise$resolve$$resolve(object, label) { + /*jshint validthis:true */ + var Constructor = this; + + if (object && typeof object === 'object' && object.constructor === Constructor) { + return object; + } + + var promise = new Constructor(lib$rsvp$$internal$$noop, label); + lib$rsvp$$internal$$resolve(promise, object); + return promise; + } + var lib$rsvp$promise$resolve$$default = lib$rsvp$promise$resolve$$resolve; + function lib$rsvp$promise$reject$$reject(reason, label) { + /*jshint validthis:true */ + var Constructor = this; + var promise = new Constructor(lib$rsvp$$internal$$noop, label); + lib$rsvp$$internal$$reject(promise, reason); + return promise; + } + var lib$rsvp$promise$reject$$default = lib$rsvp$promise$reject$$reject; + + var lib$rsvp$promise$$guidKey = 'rsvp_' + lib$rsvp$utils$$now() + '-'; + var lib$rsvp$promise$$counter = 0; + + function lib$rsvp$promise$$needsResolver() { + throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); + } + + function lib$rsvp$promise$$needsNew() { + throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); + } + + function lib$rsvp$promise$$Promise(resolver, label) { + var promise = this; + + promise._id = lib$rsvp$promise$$counter++; + promise._label = label; + promise._state = undefined; + promise._result = undefined; + promise._subscribers = []; + + if (lib$rsvp$config$$config.instrument) { + lib$rsvp$instrument$$default('created', promise); + } + + if (lib$rsvp$$internal$$noop !== resolver) { + if (!lib$rsvp$utils$$isFunction(resolver)) { + lib$rsvp$promise$$needsResolver(); + } + + if (!(promise instanceof lib$rsvp$promise$$Promise)) { + lib$rsvp$promise$$needsNew(); + } + + lib$rsvp$$internal$$initializePromise(promise, resolver); + } + } + + var lib$rsvp$promise$$default = lib$rsvp$promise$$Promise; + + // deprecated + lib$rsvp$promise$$Promise.cast = lib$rsvp$promise$resolve$$default; + lib$rsvp$promise$$Promise.all = lib$rsvp$promise$all$$default; + lib$rsvp$promise$$Promise.race = lib$rsvp$promise$race$$default; + lib$rsvp$promise$$Promise.resolve = lib$rsvp$promise$resolve$$default; + lib$rsvp$promise$$Promise.reject = lib$rsvp$promise$reject$$default; + + lib$rsvp$promise$$Promise.prototype = { + constructor: lib$rsvp$promise$$Promise, + + _guidKey: lib$rsvp$promise$$guidKey, + + _onError: function (reason) { + var promise = this; + lib$rsvp$config$$config.after(function() { + if (promise._onError) { + lib$rsvp$config$$config['trigger']('error', reason, promise._label); + } + }); }, /** - - A promise represents the eventual result of an asynchronous operation. The - primary way of interacting with a promise is through its `then` method, which - registers callbacks to receive either a promise's eventual value or the reason - why the promise cannot be fulfilled. + The primary way of interacting with a promise is through its `then` method, + which registers callbacks to receive either a promise's eventual value or the + reason why the promise cannot be fulfilled. ```js findUser().then(function(user){ @@ -1254,7 +797,7 @@ define("rsvp/promise", Chaining -------- - The return value of `then` is itself a promise. This second, "downstream" + The return value of `then` is itself a promise. This second, 'downstream' promise is resolved with the return value of the first promise's fulfillment or rejection handler, or rejected if the handler throws an exception. @@ -1262,28 +805,28 @@ define("rsvp/promise", findUser().then(function (user) { return user.name; }, function (reason) { - return "default name"; + return 'default name'; }).then(function (userName) { // If `findUser` fulfilled, `userName` will be the user's name, otherwise it - // will be `"default name"` + // will be `'default name'` }); findUser().then(function (user) { - throw "Found user, but still unhappy"; + throw new Error('Found user, but still unhappy'); }, function (reason) { - throw "`findUser` rejected and we're unhappy"; + throw new Error('`findUser` rejected and we're unhappy'); }).then(function (value) { // never reached }, function (reason) { - // if `findUser` fulfilled, `reason` will be "Found user, but still unhappy". - // If `findUser` rejected, `reason` will be "`findUser` rejected and we're unhappy". + // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. + // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. }); ``` If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. ```js findUser().then(function (user) { - throw new PedagogicalException("Upstream error"); + throw new PedagogicalException('Upstream error'); }).then(function (value) { // never reached }).then(function (value) { @@ -1297,9 +840,9 @@ define("rsvp/promise", ------------ Sometimes the value you want to propagate to a downstream promise can only be - retrieved asynchronously. This can be achieved by returning a promise in the - fulfillment or rejection handler. The downstream promise will then be pending - until the returned promise is settled. This is called *assimilation*. + retrieved asynchronously. This can be achieved by returning a promise in the + fulfillment or rejection handler. The downstream promise will then be pending + until the returned promise is settled. This is called *assimilation*. ```js findUser().then(function (user) { @@ -1351,11 +894,11 @@ define("rsvp/promise", Promise Example; - ```javacsript + ```javascript findResult().then(function(result){ - + // success }, function(reason){ - + // failure }); ``` @@ -1415,13 +958,13 @@ define("rsvp/promise", Promise Example; - ```javacsript + ```javascript findAuthor(). then(findBooksByAuthor). then(function(books){ // found books }).catch(function(reason){ - // something went wrong; + // something went wrong }); ``` @@ -1433,46 +976,56 @@ define("rsvp/promise", @return {Promise} */ then: function(onFulfillment, onRejection, label) { - var promise = this; - this._onerror = null; + var parent = this; + var state = parent._state; - var thenPromise = new this.constructor(noop, label); + if (state === lib$rsvp$$internal$$FULFILLED && !onFulfillment || state === lib$rsvp$$internal$$REJECTED && !onRejection) { + if (lib$rsvp$config$$config.instrument) { + lib$rsvp$instrument$$default('chained', parent, parent); + } + return parent; + } - if (this._state) { - var callbacks = arguments; - config.async(function invokePromiseCallback() { - invokeCallback(promise._state, thenPromise, callbacks[promise._state - 1], promise._detail); + parent._onError = null; + + var child = new parent.constructor(lib$rsvp$$internal$$noop, label); + var result = parent._result; + + if (lib$rsvp$config$$config.instrument) { + lib$rsvp$instrument$$default('chained', parent, child); + } + + if (state) { + var callback = arguments[state - 1]; + lib$rsvp$config$$config.async(function(){ + lib$rsvp$$internal$$invokeCallback(state, child, callback, result); }); } else { - subscribe(this, thenPromise, onFulfillment, onRejection); + lib$rsvp$$internal$$subscribe(parent, child, onFulfillment, onRejection); } - if (config.instrument) { - instrument('chained', promise, thenPromise); - } - - return thenPromise; + return child; }, /** - `catch` is simply sugar for `then(null, onRejection)` which makes it the same - as the catch block, of a try/catch statement. + `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same + as the catch block of a try/catch statement. ```js function findAuthor(){ - throw new Error("couldn't find that author"); + throw new Error('couldn't find that author'); } // synchronous try { findAuthor(); } catch(reason) { - + // something went wrong } // async with promises findAuthor().catch(function(reason){ - // something went wrong; + // something went wrong }); ``` @@ -1483,13 +1036,15 @@ define("rsvp/promise", @return {Promise} */ 'catch': function(onRejection, label) { - return this.then(null, onRejection, label); + return this.then(undefined, onRejection, label); }, /** `finally` will be invoked regardless of the promise's fate just as native try/catch/finally behaves + Synchronous example: + ```js findAuthor() { if (Math.random() > 0.5) { @@ -1504,10 +1059,16 @@ define("rsvp/promise", return findOtherAuther(); } finally { // always runs - // doesn't effect the return value + // doesn't affect the return value } + ``` - findAuthor().finally(function(){ + Asynchronous example: + + ```js + findAuthor().catch(function(reason){ + return findOtherAuther(); + }).finally(function(){ // author was either found, or not }); ``` @@ -1519,673 +1080,526 @@ define("rsvp/promise", @return {Promise} */ 'finally': function(callback, label) { - var constructor = this.constructor; + var promise = this; + var constructor = promise.constructor; - return this.then(function(value) { - return constructor.cast(callback()).then(function(){ + return promise.then(function(value) { + return constructor.resolve(callback()).then(function(){ return value; }); }, function(reason) { - return constructor.cast(callback()).then(function(){ + return constructor.resolve(callback()).then(function(){ throw reason; }); }, label); } }; - function invokeCallback(settled, promise, callback, detail) { - var hasCallback = isFunction(callback), - value, error, succeeded, failed; + function lib$rsvp$all$settled$$AllSettled(Constructor, entries, label) { + this._superConstructor(Constructor, entries, false /* don't abort on reject */, label); + } - if (hasCallback) { - try { - value = callback(detail); - succeeded = true; - } catch(e) { - failed = true; - error = e; + lib$rsvp$all$settled$$AllSettled.prototype = lib$rsvp$utils$$o_create(lib$rsvp$enumerator$$default.prototype); + lib$rsvp$all$settled$$AllSettled.prototype._superConstructor = lib$rsvp$enumerator$$default; + lib$rsvp$all$settled$$AllSettled.prototype._makeResult = lib$rsvp$enumerator$$makeSettledResult; + lib$rsvp$all$settled$$AllSettled.prototype._validationError = function() { + return new Error('allSettled must be called with an array'); + }; + + function lib$rsvp$all$settled$$allSettled(entries, label) { + return new lib$rsvp$all$settled$$AllSettled(lib$rsvp$promise$$default, entries, label).promise; + } + var lib$rsvp$all$settled$$default = lib$rsvp$all$settled$$allSettled; + function lib$rsvp$all$$all(array, label) { + return lib$rsvp$promise$$default.all(array, label); + } + var lib$rsvp$all$$default = lib$rsvp$all$$all; + var lib$rsvp$asap$$len = 0; + var lib$rsvp$asap$$toString = {}.toString; + var lib$rsvp$asap$$vertxNext; + function lib$rsvp$asap$$asap(callback, arg) { + lib$rsvp$asap$$queue[lib$rsvp$asap$$len] = callback; + lib$rsvp$asap$$queue[lib$rsvp$asap$$len + 1] = arg; + lib$rsvp$asap$$len += 2; + if (lib$rsvp$asap$$len === 2) { + // If len is 1, that means that we need to schedule an async flush. + // If additional callbacks are queued before the queue is flushed, they + // will be processed by this flush that we are scheduling. + lib$rsvp$asap$$scheduleFlush(); + } + } + + var lib$rsvp$asap$$default = lib$rsvp$asap$$asap; + + var lib$rsvp$asap$$browserWindow = (typeof window !== 'undefined') ? window : undefined; + var lib$rsvp$asap$$browserGlobal = lib$rsvp$asap$$browserWindow || {}; + var lib$rsvp$asap$$BrowserMutationObserver = lib$rsvp$asap$$browserGlobal.MutationObserver || lib$rsvp$asap$$browserGlobal.WebKitMutationObserver; + var lib$rsvp$asap$$isNode = typeof self === 'undefined' && + typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; + + // test for web worker but not in IE10 + var lib$rsvp$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' && + typeof importScripts !== 'undefined' && + typeof MessageChannel !== 'undefined'; + + // node + function lib$rsvp$asap$$useNextTick() { + var nextTick = process.nextTick; + // node version 0.10.x displays a deprecation warning when nextTick is used recursively + // setImmediate should be used instead instead + var version = process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/); + if (Array.isArray(version) && version[1] === '0' && version[2] === '10') { + nextTick = setImmediate; + } + return function() { + nextTick(lib$rsvp$asap$$flush); + }; + } + + // vertx + function lib$rsvp$asap$$useVertxTimer() { + return function() { + lib$rsvp$asap$$vertxNext(lib$rsvp$asap$$flush); + }; + } + + function lib$rsvp$asap$$useMutationObserver() { + var iterations = 0; + var observer = new lib$rsvp$asap$$BrowserMutationObserver(lib$rsvp$asap$$flush); + var node = document.createTextNode(''); + observer.observe(node, { characterData: true }); + + return function() { + node.data = (iterations = ++iterations % 2); + }; + } + + // web worker + function lib$rsvp$asap$$useMessageChannel() { + var channel = new MessageChannel(); + channel.port1.onmessage = lib$rsvp$asap$$flush; + return function () { + channel.port2.postMessage(0); + }; + } + + function lib$rsvp$asap$$useSetTimeout() { + return function() { + setTimeout(lib$rsvp$asap$$flush, 1); + }; + } + + var lib$rsvp$asap$$queue = new Array(1000); + function lib$rsvp$asap$$flush() { + for (var i = 0; i < lib$rsvp$asap$$len; i+=2) { + var callback = lib$rsvp$asap$$queue[i]; + var arg = lib$rsvp$asap$$queue[i+1]; + + callback(arg); + + lib$rsvp$asap$$queue[i] = undefined; + lib$rsvp$asap$$queue[i+1] = undefined; + } + + lib$rsvp$asap$$len = 0; + } + + function lib$rsvp$asap$$attemptVertex() { + try { + var r = require; + var vertx = r('vertx'); + lib$rsvp$asap$$vertxNext = vertx.runOnLoop || vertx.runOnContext; + return lib$rsvp$asap$$useVertxTimer(); + } catch(e) { + return lib$rsvp$asap$$useSetTimeout(); + } + } + + var lib$rsvp$asap$$scheduleFlush; + // Decide what async method to use to triggering processing of queued callbacks: + if (lib$rsvp$asap$$isNode) { + lib$rsvp$asap$$scheduleFlush = lib$rsvp$asap$$useNextTick(); + } else if (lib$rsvp$asap$$BrowserMutationObserver) { + lib$rsvp$asap$$scheduleFlush = lib$rsvp$asap$$useMutationObserver(); + } else if (lib$rsvp$asap$$isWorker) { + lib$rsvp$asap$$scheduleFlush = lib$rsvp$asap$$useMessageChannel(); + } else if (lib$rsvp$asap$$browserWindow === undefined && typeof require === 'function') { + lib$rsvp$asap$$scheduleFlush = lib$rsvp$asap$$attemptVertex(); + } else { + lib$rsvp$asap$$scheduleFlush = lib$rsvp$asap$$useSetTimeout(); + } + function lib$rsvp$defer$$defer(label) { + var deferred = {}; + + deferred['promise'] = new lib$rsvp$promise$$default(function(resolve, reject) { + deferred['resolve'] = resolve; + deferred['reject'] = reject; + }, label); + + return deferred; + } + var lib$rsvp$defer$$default = lib$rsvp$defer$$defer; + function lib$rsvp$filter$$filter(promises, filterFn, label) { + return lib$rsvp$promise$$default.all(promises, label).then(function(values) { + if (!lib$rsvp$utils$$isFunction(filterFn)) { + throw new TypeError("You must pass a function as filter's second argument."); + } + + var length = values.length; + var filtered = new Array(length); + + for (var i = 0; i < length; i++) { + filtered[i] = filterFn(values[i]); + } + + return lib$rsvp$promise$$default.all(filtered, label).then(function(filtered) { + var results = new Array(length); + var newLength = 0; + + for (var i = 0; i < length; i++) { + if (filtered[i]) { + results[newLength] = values[i]; + newLength++; + } + } + + results.length = newLength; + + return results; + }); + }); + } + var lib$rsvp$filter$$default = lib$rsvp$filter$$filter; + + function lib$rsvp$promise$hash$$PromiseHash(Constructor, object, label) { + this._superConstructor(Constructor, object, true, label); + } + + var lib$rsvp$promise$hash$$default = lib$rsvp$promise$hash$$PromiseHash; + + lib$rsvp$promise$hash$$PromiseHash.prototype = lib$rsvp$utils$$o_create(lib$rsvp$enumerator$$default.prototype); + lib$rsvp$promise$hash$$PromiseHash.prototype._superConstructor = lib$rsvp$enumerator$$default; + lib$rsvp$promise$hash$$PromiseHash.prototype._init = function() { + this._result = {}; + }; + + lib$rsvp$promise$hash$$PromiseHash.prototype._validateInput = function(input) { + return input && typeof input === 'object'; + }; + + lib$rsvp$promise$hash$$PromiseHash.prototype._validationError = function() { + return new Error('Promise.hash must be called with an object'); + }; + + lib$rsvp$promise$hash$$PromiseHash.prototype._enumerate = function() { + var enumerator = this; + var promise = enumerator.promise; + var input = enumerator._input; + var results = []; + + for (var key in input) { + if (promise._state === lib$rsvp$$internal$$PENDING && Object.prototype.hasOwnProperty.call(input, key)) { + results.push({ + position: key, + entry: input[key] + }); + } + } + + var length = results.length; + enumerator._remaining = length; + var result; + + for (var i = 0; promise._state === lib$rsvp$$internal$$PENDING && i < length; i++) { + result = results[i]; + enumerator._eachEntry(result.entry, result.position); + } + }; + + function lib$rsvp$hash$settled$$HashSettled(Constructor, object, label) { + this._superConstructor(Constructor, object, false, label); + } + + lib$rsvp$hash$settled$$HashSettled.prototype = lib$rsvp$utils$$o_create(lib$rsvp$promise$hash$$default.prototype); + lib$rsvp$hash$settled$$HashSettled.prototype._superConstructor = lib$rsvp$enumerator$$default; + lib$rsvp$hash$settled$$HashSettled.prototype._makeResult = lib$rsvp$enumerator$$makeSettledResult; + + lib$rsvp$hash$settled$$HashSettled.prototype._validationError = function() { + return new Error('hashSettled must be called with an object'); + }; + + function lib$rsvp$hash$settled$$hashSettled(object, label) { + return new lib$rsvp$hash$settled$$HashSettled(lib$rsvp$promise$$default, object, label).promise; + } + var lib$rsvp$hash$settled$$default = lib$rsvp$hash$settled$$hashSettled; + function lib$rsvp$hash$$hash(object, label) { + return new lib$rsvp$promise$hash$$default(lib$rsvp$promise$$default, object, label).promise; + } + var lib$rsvp$hash$$default = lib$rsvp$hash$$hash; + function lib$rsvp$map$$map(promises, mapFn, label) { + return lib$rsvp$promise$$default.all(promises, label).then(function(values) { + if (!lib$rsvp$utils$$isFunction(mapFn)) { + throw new TypeError("You must pass a function as map's second argument."); + } + + var length = values.length; + var results = new Array(length); + + for (var i = 0; i < length; i++) { + results[i] = mapFn(values[i]); + } + + return lib$rsvp$promise$$default.all(results, label); + }); + } + var lib$rsvp$map$$default = lib$rsvp$map$$map; + + function lib$rsvp$node$$Result() { + this.value = undefined; + } + + var lib$rsvp$node$$ERROR = new lib$rsvp$node$$Result(); + var lib$rsvp$node$$GET_THEN_ERROR = new lib$rsvp$node$$Result(); + + function lib$rsvp$node$$getThen(obj) { + try { + return obj.then; + } catch(error) { + lib$rsvp$node$$ERROR.value= error; + return lib$rsvp$node$$ERROR; + } + } + + + function lib$rsvp$node$$tryApply(f, s, a) { + try { + f.apply(s, a); + } catch(error) { + lib$rsvp$node$$ERROR.value = error; + return lib$rsvp$node$$ERROR; + } + } + + function lib$rsvp$node$$makeObject(_, argumentNames) { + var obj = {}; + var name; + var i; + var length = _.length; + var args = new Array(length); + + for (var x = 0; x < length; x++) { + args[x] = _[x]; + } + + for (i = 0; i < argumentNames.length; i++) { + name = argumentNames[i]; + obj[name] = args[i + 1]; + } + + return obj; + } + + function lib$rsvp$node$$arrayResult(_) { + var length = _.length; + var args = new Array(length - 1); + + for (var i = 1; i < length; i++) { + args[i - 1] = _[i]; + } + + return args; + } + + function lib$rsvp$node$$wrapThenable(then, promise) { + return { + then: function(onFulFillment, onRejection) { + return then.call(promise, onFulFillment, onRejection); + } + }; + } + + function lib$rsvp$node$$denodeify(nodeFunc, options) { + var fn = function() { + var self = this; + var l = arguments.length; + var args = new Array(l + 1); + var arg; + var promiseInput = false; + + for (var i = 0; i < l; ++i) { + arg = arguments[i]; + + if (!promiseInput) { + // TODO: clean this up + promiseInput = lib$rsvp$node$$needsPromiseInput(arg); + if (promiseInput === lib$rsvp$node$$GET_THEN_ERROR) { + var p = new lib$rsvp$promise$$default(lib$rsvp$$internal$$noop); + lib$rsvp$$internal$$reject(p, lib$rsvp$node$$GET_THEN_ERROR.value); + return p; + } else if (promiseInput && promiseInput !== true) { + arg = lib$rsvp$node$$wrapThenable(promiseInput, arg); + } + } + args[i] = arg; + } + + var promise = new lib$rsvp$promise$$default(lib$rsvp$$internal$$noop); + + args[l] = function(err, val) { + if (err) + lib$rsvp$$internal$$reject(promise, err); + else if (options === undefined) + lib$rsvp$$internal$$resolve(promise, val); + else if (options === true) + lib$rsvp$$internal$$resolve(promise, lib$rsvp$node$$arrayResult(arguments)); + else if (lib$rsvp$utils$$isArray(options)) + lib$rsvp$$internal$$resolve(promise, lib$rsvp$node$$makeObject(arguments, options)); + else + lib$rsvp$$internal$$resolve(promise, val); + }; + + if (promiseInput) { + return lib$rsvp$node$$handlePromiseInput(promise, args, nodeFunc, self); + } else { + return lib$rsvp$node$$handleValueInput(promise, args, nodeFunc, self); + } + }; + + fn.__proto__ = nodeFunc; + + return fn; + } + + var lib$rsvp$node$$default = lib$rsvp$node$$denodeify; + + function lib$rsvp$node$$handleValueInput(promise, args, nodeFunc, self) { + var result = lib$rsvp$node$$tryApply(nodeFunc, self, args); + if (result === lib$rsvp$node$$ERROR) { + lib$rsvp$$internal$$reject(promise, result.value); + } + return promise; + } + + function lib$rsvp$node$$handlePromiseInput(promise, args, nodeFunc, self){ + return lib$rsvp$promise$$default.all(args).then(function(args){ + var result = lib$rsvp$node$$tryApply(nodeFunc, self, args); + if (result === lib$rsvp$node$$ERROR) { + lib$rsvp$$internal$$reject(promise, result.value); + } + return promise; + }); + } + + function lib$rsvp$node$$needsPromiseInput(arg) { + if (arg && typeof arg === 'object') { + if (arg.constructor === lib$rsvp$promise$$default) { + return true; + } else { + return lib$rsvp$node$$getThen(arg); } } else { - value = detail; - succeeded = true; - } - - if (handleThenable(promise, value)) { - return; - } else if (hasCallback && succeeded) { - resolve(promise, value); - } else if (failed) { - reject(promise, error); - } else if (settled === FULFILLED) { - resolve(promise, value); - } else if (settled === REJECTED) { - reject(promise, value); + return false; } } + var lib$rsvp$platform$$platform; - function handleThenable(promise, value) { - var then = null, - resolved; + /* global self */ + if (typeof self === 'object') { + lib$rsvp$platform$$platform = self; - try { - if (promise === value) { - throw new TypeError("A promises callback cannot return that same promise."); - } - - if (objectOrFunction(value)) { - then = value.then; - - if (isFunction(then)) { - then.call(value, function(val) { - if (resolved) { return true; } - resolved = true; - - if (value !== val) { - resolve(promise, val); - } else { - fulfill(promise, val); - } - }, function(val) { - if (resolved) { return true; } - resolved = true; - - reject(promise, val); - }, 'derived from: ' + (promise._label || ' unknown promise')); - - return true; - } - } - } catch (error) { - if (resolved) { return true; } - reject(promise, error); - return true; - } - - return false; + /* global global */ + } else if (typeof global === 'object') { + lib$rsvp$platform$$platform = global; + } else { + throw new Error('no global: `self` or `global` found'); } - function resolve(promise, value) { - if (promise === value) { - fulfill(promise, value); - } else if (!handleThenable(promise, value)) { - fulfill(promise, value); - } + var lib$rsvp$platform$$default = lib$rsvp$platform$$platform; + function lib$rsvp$race$$race(array, label) { + return lib$rsvp$promise$$default.race(array, label); } - - function fulfill(promise, value) { - if (promise._state !== PENDING) { return; } - promise._state = SEALED; - promise._detail = value; - - config.async(publishFulfillment, promise); + var lib$rsvp$race$$default = lib$rsvp$race$$race; + function lib$rsvp$reject$$reject(reason, label) { + return lib$rsvp$promise$$default.reject(reason, label); } - - function reject(promise, reason) { - if (promise._state !== PENDING) { return; } - promise._state = SEALED; - promise._detail = reason; - - config.async(publishRejection, promise); + var lib$rsvp$reject$$default = lib$rsvp$reject$$reject; + function lib$rsvp$resolve$$resolve(value, label) { + return lib$rsvp$promise$$default.resolve(value, label); } - - function publishFulfillment(promise) { - publish(promise, promise._state = FULFILLED); - } - - function publishRejection(promise) { - if (promise._onerror) { - promise._onerror(promise._detail); - } - - publish(promise, promise._state = REJECTED); - } - }); -define("rsvp/promise/all", - ["../utils","exports"], - function(__dependency1__, __exports__) { - "use strict"; - var isArray = __dependency1__.isArray; - var isNonThenable = __dependency1__.isNonThenable; - - /** - - `RSVP.Promise.all` returns a new promise which is fulfilled with an array of - fulfillment values for the passed promises, or rejects with the reason of the - first passed promise that rejects. It casts all elements of the passed iterable - to promises as it runs this algorithm. - - Example: - - ```javascript - var promise1 = RSVP.resolve(1); - var promise2 = RSVP.resolve(2); - var promise3 = RSVP.resolve(3); - var promises = [ promise1, promise2, promise3 ]; - - RSVP.Promise.all(promises).then(function(array){ - // The array here would be [ 1, 2, 3 ]; - }); - ``` - - If any of the `promises` given to `RSVP.all` are rejected, the first promise - that is rejected will be given as an argument to the returned promises's - rejection handler. For example: - - Example: - - ```javascript - var promise1 = RSVP.resolve(1); - var promise2 = RSVP.reject(new Error("2")); - var promise3 = RSVP.reject(new Error("3")); - var promises = [ promise1, promise2, promise3 ]; - - RSVP.Promise.all(promises).then(function(array){ - // Code here never runs because there are rejected promises! - }, function(error) { - // error.message === "2" - }); - ``` - - @method all - @for RSVP.Promise - @param {Array} promises - @param {String} label optional string for labeling the promise. - Useful for tooling. - @return {Promise} promise that is fulfilled when all `promises` have been - fulfilled, or rejected if any of them become rejected. - */ - __exports__["default"] = function all(entries, label) { - - /*jshint validthis:true */ - var Constructor = this; - - return new Constructor(function(resolve, reject) { - if (!isArray(entries)) { - throw new TypeError('You must pass an array to all.'); - } - - var remaining = entries.length; - var results = new Array(remaining); - var entry, pending = true; - - if (remaining === 0) { - resolve(results); - return; - } - - function fulfillmentAt(index) { - return function(value) { - results[index] = value; - if (--remaining === 0) { - resolve(results); - } - }; - } - - function onRejection(reason) { - remaining = 0; - reject(reason); - } - - for (var index = 0; index < entries.length; index++) { - entry = entries[index]; - if (isNonThenable(entry)) { - results[index] = entry; - if (--remaining === 0) { - resolve(results); - } - } else { - Constructor.cast(entry).then(fulfillmentAt(index), onRejection); - } - } - }, label); - }; - }); -define("rsvp/promise/cast", - ["exports"], - function(__exports__) { - "use strict"; - /** - - `RSVP.Promise.cast` cast coerces its argument to a promise, or returns the - argument if it is already a promise which shares a constructor with the caster; - - Example: - - ```javascript - var promise = RSVP.Promise.resolve(1); - var casted = RSVP.Promise.cast(promise); - - console.log(promise === casted); // true - ``` - - In the case of a promise whose constructor does not match, it is assimilated. - The resulting promise will fulfill or reject based on the outcome of the - promise being casted. - - In the case of a non-promise, a promise which will fulfill with that value is - returned. - - Example: - - ```javascript - var value = 1; // could be a number, boolean, string, undefined... - var casted = RSVP.Promise.cast(value); - - console.log(value === casted); // false - console.log(casted instanceof RSVP.Promise) // true - - casted.then(function(val) { - val === value // => true - }); - ``` - - `RSVP.Promise.cast` is similar to `RSVP.Promise.resolve`, but `RSVP.Promise.cast` differs in the - following ways: - - * `RSVP.Promise.cast` serves as a memory-efficient way of getting a promise, when you - have something that could either be a promise or a value. RSVP.resolve - will have the same effect but will create a new promise wrapper if the - argument is a promise. - * `RSVP.Promise.cast` is a way of casting incoming thenables or promise subclasses to - promises of the exact class specified, so that the resulting object's `then` is - ensured to have the behavior of the constructor you are calling cast on (i.e., RSVP.Promise). - - @method cast - @for RSVP.Promise - @param {Object} object to be casted - @param {String} label optional string for labeling the promise. - Useful for tooling. - @return {Promise} promise - */ - - __exports__["default"] = function cast(object, label) { - /*jshint validthis:true */ - var Constructor = this; - - if (object && typeof object === 'object' && object.constructor === Constructor) { - return object; - } - - return new Constructor(function(resolve) { - resolve(object); - }, label); - }; - }); -define("rsvp/promise/race", - ["../utils","exports"], - function(__dependency1__, __exports__) { - "use strict"; - /* global toString */ - - var isArray = __dependency1__.isArray; - var isFunction = __dependency1__.isFunction; - var isNonThenable = __dependency1__.isNonThenable; - - /** - `RSVP.Promise.race` returns a new promise which is settled in the same way as the - first passed promise to settle. - - Example: - - ```javascript - var promise1 = new RSVP.Promise(function(resolve, reject){ - setTimeout(function(){ - resolve("promise 1"); - }, 200); - }); - - var promise2 = new RSVP.Promise(function(resolve, reject){ - setTimeout(function(){ - resolve("promise 2"); - }, 100); - }); - - RSVP.Promise.race([promise1, promise2]).then(function(result){ - // result === "promise 2" because it was resolved before promise1 - // was resolved. - }); - ``` - - `RSVP.Promise.race` is deterministic in that only the state of the first - completed promise matters. For example, even if other promises given to the - `promises` array argument are resolved, but the first completed promise has - become rejected before the other promises became fulfilled, the returned - promise will become rejected: - - ```javascript - var promise1 = new RSVP.Promise(function(resolve, reject){ - setTimeout(function(){ - resolve("promise 1"); - }, 200); - }); - - var promise2 = new RSVP.Promise(function(resolve, reject){ - setTimeout(function(){ - reject(new Error("promise 2")); - }, 100); - }); - - RSVP.Promise.race([promise1, promise2]).then(function(result){ - // Code here never runs because there are rejected promises! - }, function(reason){ - // reason.message === "promise2" because promise 2 became rejected before - // promise 1 became fulfilled - }); - ``` - - @method race - @for RSVP.Promise - @param {Array} promises array of promises to observe - @param {String} label optional string for describing the promise returned. - Useful for tooling. - @return {Promise} a promise which settles in the same way as the first passed - promise to settle. - */ - __exports__["default"] = function race(entries, label) { - /*jshint validthis:true */ - var Constructor = this, entry; - - return new Constructor(function(resolve, reject) { - if (!isArray(entries)) { - throw new TypeError('You must pass an array to race.'); - } - - var pending = true; - - function onFulfillment(value) { if (pending) { pending = false; resolve(value); } } - function onRejection(reason) { if (pending) { pending = false; reject(reason); } } - - for (var i = 0; i < entries.length; i++) { - entry = entries[i]; - if (isNonThenable(entry)) { - pending = false; - resolve(entry); - return; - } else { - Constructor.cast(entry).then(onFulfillment, onRejection); - } - } - }, label); - }; - }); -define("rsvp/promise/reject", - ["exports"], - function(__exports__) { - "use strict"; - /** - `RSVP.Promise.reject` returns a promise rejected with the passed `reason`. - It is essentially shorthand for the following: - - ```javascript - var promise = new RSVP.Promise(function(resolve, reject){ - reject(new Error('WHOOPS')); - }); - - promise.then(function(value){ - // Code here doesn't run because the promise is rejected! - }, function(reason){ - // reason.message === 'WHOOPS' - }); - ``` - - Instead of writing the above, your code now simply becomes the following: - - ```javascript - var promise = RSVP.Promise.reject(new Error('WHOOPS')); - - promise.then(function(value){ - // Code here doesn't run because the promise is rejected! - }, function(reason){ - // reason.message === 'WHOOPS' - }); - ``` - - @method reject - @for RSVP.Promise - @param {Any} reason value that the returned promise will be rejected with. - @param {String} label optional string for identifying the returned promise. - Useful for tooling. - @return {Promise} a promise rejected with the given `reason`. - */ - __exports__["default"] = function reject(reason, label) { - /*jshint validthis:true */ - var Constructor = this; - - return new Constructor(function (resolve, reject) { - reject(reason); - }, label); - }; - }); -define("rsvp/promise/resolve", - ["exports"], - function(__exports__) { - "use strict"; - /** - `RSVP.Promise.resolve` returns a promise that will become fulfilled with the passed - `value`. It is essentially shorthand for the following: - - ```javascript - var promise = new RSVP.Promise(function(resolve, reject){ - resolve(1); - }); - - promise.then(function(value){ - // value === 1 - }); - ``` - - Instead of writing the above, your code now simply becomes the following: - - ```javascript - var promise = RSVP.Promise.resolve(1); - - promise.then(function(value){ - // value === 1 - }); - ``` - - @method resolve - @for RSVP.Promise - @param {Any} value value that the returned promise will be resolved with - @param {String} label optional string for identifying the returned promise. - Useful for tooling. - @return {Promise} a promise that will become fulfilled with the given - `value` - */ - __exports__["default"] = function resolve(value, label) { - /*jshint validthis:true */ - var Constructor = this; - - return new Constructor(function(resolve, reject) { - resolve(value); - }, label); - }; - }); -define("rsvp/race", - ["./promise","exports"], - function(__dependency1__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - - __exports__["default"] = function race(array, label) { - return Promise.race(array, label); - }; - }); -define("rsvp/reject", - ["./promise","exports"], - function(__dependency1__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - - __exports__["default"] = function reject(reason, label) { - return Promise.reject(reason, label); - }; - }); -define("rsvp/resolve", - ["./promise","exports"], - function(__dependency1__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - - __exports__["default"] = function resolve(value, label) { - return Promise.resolve(value, label); - }; - }); -define("rsvp/rethrow", - ["exports"], - function(__exports__) { - "use strict"; - /** - `RSVP.rethrow` will rethrow an error on the next turn of the JavaScript event - loop in order to aid debugging. - - Promises A+ specifies that any exceptions that occur with a promise must be - caught by the promises implementation and bubbled to the last handler. For - this reason, it is recommended that you always specify a second rejection - handler function to `then`. However, `RSVP.rethrow` will throw the exception - outside of the promise, so it bubbles up to your console if in the browser, - or domain/cause uncaught exception in Node. `rethrow` will throw the error - again so the error can be handled by the promise. - - ```javascript - function throws(){ - throw new Error('Whoops!'); - } - - var promise = new RSVP.Promise(function(resolve, reject){ - throws(); - }); - - promise.catch(RSVP.rethrow).then(function(){ - // Code here doesn't run because the promise became rejected due to an - // error! - }, function (err){ - // handle the error here - }); - ``` - - The 'Whoops' error will be thrown on the next turn of the event loop - and you can watch for it in your console. You can also handle it using a - rejection handler given to `.then` or `.catch` on the returned promise. - - @method rethrow - @for RSVP - @param {Error} reason reason the promise became rejected. - @throws Error - */ - __exports__["default"] = function rethrow(reason) { + var lib$rsvp$resolve$$default = lib$rsvp$resolve$$resolve; + function lib$rsvp$rethrow$$rethrow(reason) { setTimeout(function() { throw reason; }); throw reason; + } + var lib$rsvp$rethrow$$default = lib$rsvp$rethrow$$rethrow; + + // defaults + lib$rsvp$config$$config.async = lib$rsvp$asap$$default; + lib$rsvp$config$$config.after = function(cb) { + setTimeout(cb, 0); }; - }); -define("rsvp/utils", - ["exports"], - function(__exports__) { - "use strict"; - function objectOrFunction(x) { - return typeof x === "function" || (typeof x === "object" && x !== null); + var lib$rsvp$$cast = lib$rsvp$resolve$$default; + function lib$rsvp$$async(callback, arg) { + lib$rsvp$config$$config.async(callback, arg); } - __exports__.objectOrFunction = objectOrFunction;function isFunction(x) { - return typeof x === "function"; + function lib$rsvp$$on() { + lib$rsvp$config$$config['on'].apply(lib$rsvp$config$$config, arguments); } - __exports__.isFunction = isFunction;function isNonThenable(x) { - return !objectOrFunction(x); - } - - __exports__.isNonThenable = isNonThenable;function isArray(x) { - return Object.prototype.toString.call(x) === "[object Array]"; - } - - __exports__.isArray = isArray;// Date.now is not available in browsers < IE9 - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility - var now = Date.now || function() { return new Date().getTime(); }; - __exports__.now = now; - var keysOf = Object.keys || function(object) { - var result = []; - - for (var prop in object) { - result.push(prop); - } - - return result; - }; - __exports__.keysOf = keysOf; - }); -define("rsvp", - ["./rsvp/promise","./rsvp/events","./rsvp/node","./rsvp/all","./rsvp/all_settled","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/map","./rsvp/resolve","./rsvp/reject","./rsvp/asap","./rsvp/filter","exports"], - function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - var EventTarget = __dependency2__["default"]; - var denodeify = __dependency3__["default"]; - var all = __dependency4__["default"]; - var allSettled = __dependency5__["default"]; - var race = __dependency6__["default"]; - var hash = __dependency7__["default"]; - var rethrow = __dependency8__["default"]; - var defer = __dependency9__["default"]; - var config = __dependency10__.config; - var configure = __dependency10__.configure; - var map = __dependency11__["default"]; - var resolve = __dependency12__["default"]; - var reject = __dependency13__["default"]; - var asap = __dependency14__["default"]; - var filter = __dependency15__["default"]; - - config.async = asap; // default async is asap; - - function async(callback, arg) { - config.async(callback, arg); - } - - function on() { - config.on.apply(config, arguments); - } - - function off() { - config.off.apply(config, arguments); + function lib$rsvp$$off() { + lib$rsvp$config$$config['off'].apply(lib$rsvp$config$$config, arguments); } // Set up instrumentation through `window.__PROMISE_INTRUMENTATION__` - if (typeof window !== 'undefined' && typeof window.__PROMISE_INSTRUMENTATION__ === 'object') { - var callbacks = window.__PROMISE_INSTRUMENTATION__; - configure('instrument', true); - for (var eventName in callbacks) { - if (callbacks.hasOwnProperty(eventName)) { - on(eventName, callbacks[eventName]); + if (typeof window !== 'undefined' && typeof window['__PROMISE_INSTRUMENTATION__'] === 'object') { + var lib$rsvp$$callbacks = window['__PROMISE_INSTRUMENTATION__']; + lib$rsvp$config$$configure('instrument', true); + for (var lib$rsvp$$eventName in lib$rsvp$$callbacks) { + if (lib$rsvp$$callbacks.hasOwnProperty(lib$rsvp$$eventName)) { + lib$rsvp$$on(lib$rsvp$$eventName, lib$rsvp$$callbacks[lib$rsvp$$eventName]); } } } - __exports__.Promise = Promise; - __exports__.EventTarget = EventTarget; - __exports__.all = all; - __exports__.allSettled = allSettled; - __exports__.race = race; - __exports__.hash = hash; - __exports__.rethrow = rethrow; - __exports__.defer = defer; - __exports__.denodeify = denodeify; - __exports__.configure = configure; - __exports__.on = on; - __exports__.off = off; - __exports__.resolve = resolve; - __exports__.reject = reject; - __exports__.async = async; - __exports__.map = map; - __exports__.filter = filter; - }); -global.RSVP = requireModule('rsvp'); -}(window)); + var lib$rsvp$umd$$RSVP = { + 'race': lib$rsvp$race$$default, + 'Promise': lib$rsvp$promise$$default, + 'allSettled': lib$rsvp$all$settled$$default, + 'hash': lib$rsvp$hash$$default, + 'hashSettled': lib$rsvp$hash$settled$$default, + 'denodeify': lib$rsvp$node$$default, + 'on': lib$rsvp$$on, + 'off': lib$rsvp$$off, + 'map': lib$rsvp$map$$default, + 'filter': lib$rsvp$filter$$default, + 'resolve': lib$rsvp$resolve$$default, + 'reject': lib$rsvp$reject$$default, + 'all': lib$rsvp$all$$default, + 'rethrow': lib$rsvp$rethrow$$default, + 'defer': lib$rsvp$defer$$default, + 'EventTarget': lib$rsvp$events$$default, + 'configure': lib$rsvp$config$$configure, + 'async': lib$rsvp$$async + }; + + /* global define:true module:true window: true */ + if (typeof define === 'function' && define['amd']) { + define(function() { return lib$rsvp$umd$$RSVP; }); + } else if (typeof module !== 'undefined' && module['exports']) { + module['exports'] = lib$rsvp$umd$$RSVP; + } else if (typeof lib$rsvp$platform$$default !== 'undefined') { + lib$rsvp$platform$$default['RSVP'] = lib$rsvp$umd$$RSVP; + } +}).call(this); + + 'use strict'; var EPUBJS = EPUBJS || {}; -EPUBJS.VERSION = "0.2.3"; +EPUBJS.VERSION = "0.2.12"; EPUBJS.plugins = EPUBJS.plugins || {}; @@ -2202,7 +1616,7 @@ EPUBJS.Render = {}; //-- var book = ePub("path/to/book.epub", { restore: true }) if(typeof(arguments[0]) != 'undefined' && - typeof arguments[0] === 'string') { + (typeof arguments[0] === 'string' || arguments[0] instanceof ArrayBuffer)) { bookPath = arguments[0]; @@ -2224,7 +1638,7 @@ EPUBJS.Render = {}; * book.open("path/to/book.epub"); */ - if( arguments[0] && typeof arguments[0] === 'object' ) { + if( arguments[0] && typeof arguments[0] === 'object' && !(arguments[0] instanceof ArrayBuffer)) { options = arguments[0]; } @@ -2232,20 +1646,14 @@ EPUBJS.Render = {}; return new EPUBJS.Book(options); }; - _.extend(ePub, { - noConflict : function() { - root.ePub = previousEpub; - return this; - } - }); - //exports to multiple environments - if (typeof define === 'function' && define.amd) - //AMD - define(function(){ return ePub; }); - else if (typeof module != "undefined" && module.exports) - //Node - module.exports = ePub; + if (typeof define === 'function' && define.amd) { + //AMD + define(['rsvp'], function(){ return ePub; }); + } else if (typeof module != "undefined" && module.exports) { + //Node + module.exports = ePub; + } })(window); @@ -2253,20 +1661,20 @@ EPUBJS.Book = function(options){ var book = this; - this.settings = _.defaults(options || {}, { - bookPath : null, - bookKey : null, - packageUrl : null, + this.settings = EPUBJS.core.defaults(options || {}, { + bookPath : undefined, + bookKey : undefined, + packageUrl : undefined, storage: false, //-- true (auto) or false (none) | override: 'ram', 'websqldatabase', 'indexeddb', 'filesystem' fromStorage : false, saved : false, online : true, contained : false, - width : null, - height: null, - layoutOveride : null, // Default: { spread: 'reflowable', layout: 'auto', orientation: 'auto'} - orientation : null, - minSpreadWidth: 800, //-- overridden by spread: none (never) / both (always) + width : undefined, + height: undefined, + layoutOveride : undefined, // Default: { spread: 'reflowable', layout: 'auto', orientation: 'auto'} + orientation : undefined, + minSpreadWidth: 768, //-- overridden by spread: none (never) / both (always) gap: "auto", //-- "auto" or int version: 1, restore: false, @@ -2303,15 +1711,6 @@ EPUBJS.Book = function(options){ this.online = this.settings.online || navigator.onLine; this.networkListeners(); - this.store = false; //-- False if not using storage; - - //-- Determine storage method - //-- Override options: none | ram | websqldatabase | indexeddb | filesystem - - if(this.settings.storage !== false){ - this.storage = new fileStorage.storage(this.settings.storage); - } - this.ready = { manifest: new RSVP.defer(), spine: new RSVP.defer(), @@ -2360,8 +1759,18 @@ EPUBJS.Book = function(options){ this.defer_opened = new RSVP.defer(); this.opened = this.defer_opened.promise; + + this.store = false; //-- False if not using storage; + + //-- Determine storage method + //-- Override options: none | ram | websqldatabase | indexeddb | filesystem + if(this.settings.storage !== false){ + // this.storage = new fileStorage.storage(this.settings.storage); + this.fromStorage(true); + } + // BookUrl is optional, but if present start loading process - if(typeof this.settings.bookPath === 'string') { + if(typeof this.settings.bookPath === 'string' || this.settings.bookPath instanceof ArrayBuffer) { this.open(this.settings.bookPath, this.settings.reload); } @@ -2380,9 +1789,6 @@ EPUBJS.Book.prototype.open = function(bookPath, forceReload){ this.settings.bookPath = bookPath; - //-- Get a absolute URL from the book path - this.bookUrl = this.urlFrom(bookPath); - if(this.settings.contained || this.isContained(bookPath)){ this.settings.contained = this.contained = true; @@ -2395,6 +1801,9 @@ EPUBJS.Book.prototype.open = function(bookPath, forceReload){ }); } else { + //-- Get a absolute URL from the book path + this.bookUrl = this.urlFrom(bookPath); + epubpackage = this.loadPackage(); } @@ -2421,11 +1830,6 @@ EPUBJS.Book.prototype.open = function(bookPath, forceReload){ }); } - //-- If there is network connection, store the books contents - if(this.online && this.settings.storage && !this.settings.contained){ - if(!this.settings.stored) opened.then(book.storeOffline()); - } - this._registerReplacements(this.renderer); return opened.promise; @@ -2485,11 +1889,11 @@ EPUBJS.Book.prototype.unpack = function(packageXml){ //-- Set Globbal Layout setting based on metadata book.globalLayoutProperties = book.parseLayoutProperties(book.metadata); - + if(book.contents.coverPath) { book.cover = book.contents.cover = book.settings.contentsPath + book.contents.coverPath; } - + book.spineNodeIndex = book.contents.spineNodeIndex; book.ready.manifest.resolve(book.contents.manifest); @@ -2497,6 +1901,7 @@ EPUBJS.Book.prototype.unpack = function(packageXml){ book.ready.metadata.resolve(book.contents.metadata); book.ready.cover.resolve(book.contents.cover); + book.locations = new EPUBJS.Locations(book.spine, book.store, book.settings.withCredentials); //-- Load the TOC, optional; either the EPUB3 XHTML Navigation file or the EPUB2 NCX file if(book.contents.navPath) { @@ -2580,7 +1985,7 @@ EPUBJS.Book.prototype.createHiddenRender = function(renderer, _width, _height) { renderer.setMinSpreadWidth(this.settings.minSpreadWidth); renderer.setGap(this.settings.gap); - this._registerReplacements(renderer); + this._registerReplacements(renderer); if(this.settings.forceSingle) { renderer.forceSingle(true); } @@ -2707,14 +2112,19 @@ EPUBJS.Book.prototype.getToc = function() { //-- Listeners for browser events EPUBJS.Book.prototype.networkListeners = function(){ var book = this; - window.addEventListener("offline", function(e) { book.online = false; + if (book.settings.storage) { + book.fromStorage(true); + } book.trigger("book:offline"); }, false); window.addEventListener("online", function(e) { book.online = true; + if (book.settings.storage) { + book.fromStorage(false); + } book.trigger("book:online"); }, false); @@ -2762,28 +2172,40 @@ EPUBJS.Book.prototype.listenToRenderer = function(renderer){ // Prevents the Render from loading a different chapter when back button is pressed EPUBJS.Book.prototype.loadChange = function(url){ var uri = EPUBJS.core.uri(url); - var chapter; - - if(this.currentChapter) { - chapter = EPUBJS.core.uri(this.currentChapter.absolute); - } - - if(!this._rendering && this.currentChapter && uri.path != chapter.path){ + var chapterUri = EPUBJS.core.uri(this.currentChapter.absolute); + var spinePos, chapter; + + if(uri.path != chapterUri.path){ console.warn("Miss Match", uri.path, this.currentChapter.absolute); - this.goto(uri.filename); + // this.goto(uri.filename); + + // Set the current chapter to what is being displayed + spinePos = this.spineIndexByURL[uri.filename]; + chapter = new EPUBJS.Chapter(this.spine[spinePos], this.store); + this.currentChapter = chapter; + + // setup the renderer with the displayed chapter + this.renderer.currentChapter = chapter; + this.renderer.afterLoad(this.renderer.render.docEl); + this.renderer.beforeDisplay(function () { + this.renderer.afterDisplay(); + }.bind(this)); + + } else if(!this._rendering) { + this.renderer.reformat(); } }; EPUBJS.Book.prototype.unlistenToRenderer = function(renderer){ renderer.Events.forEach(function(eventName){ renderer.off(eventName); - } ); + }); }; //-- Choose between a request from store or a request from network EPUBJS.Book.prototype.loadXml = function(url){ if(this.settings.fromStorage) { - return this.storage.getXml(url, this.settings.encoding); + return this.store.getXml(url, this.settings.encoding); } else if(this.settings.contained) { return this.zip.getXml(url, this.settings.encoding); }else{ @@ -2839,11 +2261,14 @@ EPUBJS.Book.prototype.unarchive = function(bookPath){ this.zip = new EPUBJS.Unarchiver(); this.store = this.zip; // Use zip storaged in ram - return this.zip.openZip(bookPath); + return this.zip.open(bookPath); }; -//-- Checks if url has a .epub or .zip extension +//-- Checks if url has a .epub or .zip extension, or is ArrayBuffer (of zip/epub) EPUBJS.Book.prototype.isContained = function(bookUrl){ + if (bookUrl instanceof ArrayBuffer) { + return true; + } var uri = EPUBJS.core.uri(bookUrl); if(uri.extension && (uri.extension == "epub" || uri.extension == "zip")){ @@ -2897,7 +2322,7 @@ EPUBJS.Book.prototype.renderTo = function(elem){ var book = this, rendered; - if(_.isElement(elem)) { + if(EPUBJS.core.isElement(elem)) { this.element = elem; } else if (typeof elem == "string") { this.element = EPUBJS.core.getEl(elem); @@ -2910,6 +2335,11 @@ EPUBJS.Book.prototype.renderTo = function(elem){ then(function(){ // book.render = new EPUBJS.Renderer[this.settings.renderer](book); book.renderer.initialize(book.element, book.settings.width, book.settings.height); + + if(book.metadata.direction) { + book.renderer.setDirection(book.metadata.direction); + } + book._rendered(); return book.startDisplay(); }); @@ -3000,7 +2430,7 @@ EPUBJS.Book.prototype.displayChapter = function(chap, end, deferred){ return defer.promise; } - if(_.isNumber(chap)){ + if(EPUBJS.core.isNumber(chap)){ pos = chap; }else{ cfi = new EPUBJS.EpubCFI(chap); @@ -3019,6 +2449,18 @@ EPUBJS.Book.prototype.displayChapter = function(chap, end, deferred){ this._rendering = true; + if(this._needsAssetReplacement()) { + + chapter.registerHook("beforeChapterRender", [ + EPUBJS.replace.head, + EPUBJS.replace.resources, + EPUBJS.replace.svg + ], true); + + } + + book.currentChapter = chapter; + render = book.renderer.displayChapter(chapter, this.globalLayoutProperties); if(cfi) { book.renderer.gotoCfi(cfi); @@ -3033,12 +2475,11 @@ EPUBJS.Book.prototype.displayChapter = function(chap, end, deferred){ defer.resolve(book.renderer); - if(!book.settings.fromStorage && - !book.settings.contained) { + if(book.settings.fromStorage === false && + book.settings.contained === false) { book.preloadNextChapter(); } - book.currentChapter = chapter; book._rendering = false; book._displayQ.dequeue(); if(book._displayQ.length() === 0) { @@ -3047,7 +2488,7 @@ EPUBJS.Book.prototype.displayChapter = function(chap, end, deferred){ }, function(error) { // handle errors in either of the two requests - console.error("Could not load Chapter: "+ chapter.absolute); + console.error("Could not load Chapter: "+ chapter.absolute, error); book.trigger("book:chapterLoadFailed", chapter.absolute); book._rendering = false; defer.reject(error); @@ -3217,8 +2658,11 @@ EPUBJS.Book.prototype.gotoHref = function(url, defer){ split = url.split("#"); chapter = split[0]; section = split[1] || false; - // absoluteURL = (chapter.search("://") === -1) ? (this.settings.contentsPath + chapter) : chapter; - relativeURL = chapter.replace(this.settings.contentsPath, ''); + if (chapter.search("://") == -1) { + relativeURL = chapter.replace(EPUBJS.core.uri(this.settings.contentsPath).path, ''); + } else { + relativeURL = chapter.replace(this.settings.contentsPath, ''); + } spinePos = this.spineIndexByURL[relativeURL]; //-- If link fragment only stay on current chapter @@ -3279,13 +2723,12 @@ EPUBJS.Book.prototype.preloadNextChapter = function() { } }; - EPUBJS.Book.prototype.storeOffline = function() { var book = this, - assets = _.values(this.manifest); + assets = EPUBJS.core.values(this.manifest); //-- Creates a queue of all items to load - return EPUBJS.storage.batch(assets). + return this.store.put(assets). then(function(){ book.settings.stored = true; book.trigger("book:stored"); @@ -3296,40 +2739,74 @@ EPUBJS.Book.prototype.availableOffline = function() { return this.settings.stored > 0 ? true : false; }; -/* -EPUBJS.Book.prototype.fromStorage = function(stored) { +EPUBJS.Book.prototype.toStorage = function () { + var key = this.settings.bookKey; + this.store.isStored(key).then(function(stored) { - if(this.contained) return; + if (stored === true) { + this.settings.stored = true; + return true; + } - if(!stored){ - this.online = true; - this.tell("book:online"); - }else{ - if(!this.availableOffline){ - //-- If book hasn't been cached yet, store offline - this.storeOffline(function(){ - this.online = false; - this.tell("book:offline"); + return this.storeOffline() + .then(function() { + this.store.token(key, true); }.bind(this)); - }else{ - this.online = false; - this.tell("book:offline"); - } + }.bind(this)); + +}; +EPUBJS.Book.prototype.fromStorage = function(stored) { + var hooks = [ + EPUBJS.replace.head, + EPUBJS.replace.resources, + EPUBJS.replace.svg + ]; + + if(this.contained || this.settings.contained) return; + + //-- If there is network connection, store the books contents + if(this.online){ + this.opened.then(this.toStorage.bind(this)); } -} -*/ + if(this.store && this.settings.fromStorage && stored === false){ + this.settings.fromStorage = false; + this.store.off("offline"); + // this.renderer.removeHook("beforeChapterRender", hooks, true); + this.store = false; + }else if(!this.settings.fromStorage){ + + this.store = new EPUBJS.Storage(this.settings.credentials); + this.store.on("offline", function (offline) { + if (!offline) { + // Online + this.offline = false; + this.settings.fromStorage = false; + // this.renderer.removeHook("beforeChapterRender", hooks, true); + this.trigger("book:online"); + } else { + // Offline + this.offline = true; + this.settings.fromStorage = true; + // this.renderer.registerHook("beforeChapterRender", hooks, true); + this.trigger("book:offline"); + } + }.bind(this)); + + } + +}; EPUBJS.Book.prototype.setStyle = function(style, val, prefixed) { var noreflow = ["color", "background", "background-color"]; - + if(!this.isRendered) return this._q.enqueue("setStyle", arguments); this.settings.styles[style] = val; this.renderer.setStyle(style, val, prefixed); - + if(noreflow.indexOf(style) === -1) { // clearTimeout(this.reformatTimeout); // this.reformatTimeout = setTimeout(function(){ @@ -3347,7 +2824,7 @@ EPUBJS.Book.prototype.removeStyle = function(style) { EPUBJS.Book.prototype.addHeadTag = function(tag, attrs) { if(!this.isRendered) return this._q.enqueue("addHeadTag", arguments); - this.settings.headTags[tag] = attrs; + this.settings.headTags[tag] = attrs; }; EPUBJS.Book.prototype.useSpreads = function(use) { @@ -3361,7 +2838,7 @@ EPUBJS.Book.prototype.useSpreads = function(use) { EPUBJS.Book.prototype.forceSingle = function(_use) { var force = typeof _use === "undefined" ? true : _use; - + this.renderer.forceSingle(force); this.settings.forceSingle = force; if(this.isRendered) { @@ -3392,7 +2869,7 @@ EPUBJS.Book.prototype.chapter = function(path) { if(spinePos){ spineItem = this.spine[spinePos]; - chapter = new EPUBJS.Chapter(spineItem, this.store); + chapter = new EPUBJS.Chapter(spineItem, this.store, this.settings.withCredentials); chapter.load(); } return chapter; @@ -3417,7 +2894,7 @@ EPUBJS.Book.prototype.destroy = function() { this.unload(); - if(this.render) this.render.remove(); + if(this.renderer) this.renderer.remove(); }; @@ -3453,26 +2930,15 @@ EPUBJS.Book.prototype._registerReplacements = function(renderer){ renderer.registerHook("beforeChapterDisplay", this.applyStyles.bind(this, renderer), true); renderer.registerHook("beforeChapterDisplay", this.applyHeadTags.bind(this, renderer), true); renderer.registerHook("beforeChapterDisplay", EPUBJS.replace.hrefs.bind(this), true); - - if(this._needsAssetReplacement()) { - - renderer.registerHook("beforeChapterDisplay", [ - EPUBJS.replace.head, - EPUBJS.replace.resources, - EPUBJS.replace.svg - ], true); - - } - }; EPUBJS.Book.prototype._needsAssetReplacement = function(){ if(this.settings.fromStorage) { //-- Filesystem api links are relative, so no need to replace them - if(this.storage.getStorageType() == "filesystem") { - return false; - } + // if(this.storage.getStorageType() == "filesystem") { + // return false; + // } return true; @@ -3490,9 +2956,9 @@ EPUBJS.Book.prototype._needsAssetReplacement = function(){ //-- http://www.idpf.org/epub/fxl/ EPUBJS.Book.prototype.parseLayoutProperties = function(metadata){ - var layout = (this.layoutOveride && this.layoutOveride.layout) || metadata.layout || "reflowable"; - var spread = (this.layoutOveride && this.layoutOveride.spread) || metadata.spread || "auto"; - var orientation = (this.layoutOveride && this.layoutOveride.orientation) || metadata.orientation || "auto"; + var layout = (this.settings.layoutOveride && this.settings.layoutOveride.layout) || metadata.layout || "reflowable"; + var spread = (this.settings.layoutOveride && this.settings.layoutOveride.spread) || metadata.spread || "auto"; + var orientation = (this.settings.layoutOveride && this.settings.layoutOveride.orientation) || metadata.orientation || "auto"; return { layout : layout, spread : spread, @@ -3508,15 +2974,15 @@ RSVP.on('error', function(event) { //console.error(event, event.detail); }); -RSVP.configure('instrument', true); //-- true | will logging out all RSVP rejections +RSVP.configure('instrument', false); //-- true | will logging out all RSVP rejections // RSVP.on('created', listener); // RSVP.on('chained', listener); // RSVP.on('fulfilled', listener); -RSVP.on('rejected', function(event){ - console.error(event.detail.message, event.detail.stack); -}); +// RSVP.on('rejected', function(event){ +// console.error(event.detail.message, event.detail.stack); +// }); -EPUBJS.Chapter = function(spineObject, store){ +EPUBJS.Chapter = function(spineObject, store, credentials){ this.href = spineObject.href; this.absolute = spineObject.url; this.id = spineObject.id; @@ -3527,45 +2993,62 @@ EPUBJS.Chapter = function(spineObject, store){ this.linear = spineObject.linear; this.pages = 1; this.store = store; + this.credentials = credentials; this.epubcfi = new EPUBJS.EpubCFI(); this.deferred = new RSVP.defer(); this.loaded = this.deferred.promise; + + EPUBJS.Hooks.mixin(this); + //-- Get pre-registered hooks for events + this.getHooks("beforeChapterRender"); + + // Cached for replacement urls from storage + this.caches = {}; }; -EPUBJS.Chapter.prototype.load = function(_store){ +EPUBJS.Chapter.prototype.load = function(_store, _credentials){ var store = _store || this.store; + var credentials = _credentials || this.credentials; var promise; // if(this.store && (!this.book.online || this.book.contained)) if(store){ - promise = store.get(this.href); + promise = store.getXml(this.absolute); }else{ - promise = EPUBJS.core.request(this.absolute, 'xml'); + promise = EPUBJS.core.request(this.absolute, false, credentials); } - + promise.then(function(xml){ this.setDocument(xml); this.deferred.resolve(this); }.bind(this)); - + return promise; }; EPUBJS.Chapter.prototype.render = function(_store){ - + return this.load().then(function(doc){ - - var serializer = new XMLSerializer(); - var contents; - var head = doc.head; + + var head = doc.querySelector('head'); var base = doc.createElement("base"); - - base.setAttribute("href", window.location.origin + this.absolute); + + base.setAttribute("href", this.absolute); head.insertBefore(base, head.firstChild); - contents = serializer.serializeToString(doc); - + + this.contents = doc; + + return new RSVP.Promise(function (resolve, reject) { + this.triggerHooks("beforeChapterRender", function () { + resolve(doc); + }.bind(this), this); + }.bind(this)); + + }.bind(this)) + .then(function(doc) { + var serializer = new XMLSerializer(); + var contents = serializer.serializeToString(doc); return contents; - }.bind(this)); }; @@ -3575,7 +3058,7 @@ EPUBJS.Chapter.prototype.url = function(_store){ var loaded; var chapter = this; var url; - + if(store){ if(!this.tempUrl) { store.getUrl(this.absolute).then(function(url){ @@ -3590,16 +3073,7 @@ EPUBJS.Chapter.prototype.url = function(_store){ url = this.absolute; deferred.resolve(url); } - /* - loaded = EPUBJS.core.request(url, 'xml', false); - loaded.then(function(contents){ - chapter.contents = contents; - deferred.resolve(chapter.absolute); - }, function(error){ - deferred.reject(error); - }); - */ - + return deferred.promise; }; @@ -3653,59 +3127,65 @@ EPUBJS.Chapter.prototype.cfiFromRange = function(_range) { var startXpath, endXpath; var startContainer, endContainer; var cleanTextContent, cleanEndTextContent; - + // Check for Contents if(!this.document) return; - startXpath = EPUBJS.core.getElementXPath(_range.startContainer); - // console.log(startContainer) - endXpath = EPUBJS.core.getElementXPath(_range.endContainer); - startContainer = this.document.evaluate(startXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - - if(!_range.collapsed) { - endContainer = this.document.evaluate(endXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - } - - range = this.document.createRange(); - // Find Exact Range in original document - if(startContainer) { - try { - range.setStart(startContainer, _range.startOffset); - if(!_range.collapsed && endContainer) { - range.setEnd(endContainer, _range.endOffset); - } - } catch (e) { - console.log("missed"); - startContainer = false; - } - - } + if(typeof document.evaluate != 'undefined') { + + startXpath = EPUBJS.core.getElementXPath(_range.startContainer); + // console.log(startContainer) + endXpath = EPUBJS.core.getElementXPath(_range.endContainer); - // Fuzzy Match - if(!startContainer) { - console.log("not found, try fuzzy match"); - cleanStartTextContent = EPUBJS.core.cleanStringForXpath(_range.startContainer.textContent); - startXpath = "//text()[contains(.," + cleanStartTextContent + ")]"; - startContainer = this.document.evaluate(startXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - if(startContainer){ - // console.log("Found with Fuzzy"); - range.setStart(startContainer, _range.startOffset); + if(!_range.collapsed) { + endContainer = this.document.evaluate(endXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + } - if(!_range.collapsed) { - cleanEndTextContent = EPUBJS.core.cleanStringForXpath(_range.endContainer.textContent); - endXpath = "//text()[contains(.," + cleanEndTextContent + ")]"; - endContainer = this.document.evaluate(endXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - if(endContainer) { + range = this.document.createRange(); + // Find Exact Range in original document + if(startContainer) { + try { + range.setStart(startContainer, _range.startOffset); + if(!_range.collapsed && endContainer) { range.setEnd(endContainer, _range.endOffset); } + } catch (e) { + console.log("missed"); + startContainer = false; } } + + // Fuzzy Match + if(!startContainer) { + console.log("not found, try fuzzy match"); + cleanStartTextContent = EPUBJS.core.cleanStringForXpath(_range.startContainer.textContent); + startXpath = "//text()[contains(.," + cleanStartTextContent + ")]"; + + startContainer = this.document.evaluate(startXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + + if(startContainer){ + // console.log("Found with Fuzzy"); + range.setStart(startContainer, _range.startOffset); + + if(!_range.collapsed) { + cleanEndTextContent = EPUBJS.core.cleanStringForXpath(_range.endContainer.textContent); + endXpath = "//text()[contains(.," + cleanEndTextContent + ")]"; + endContainer = this.document.evaluate(endXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + if(endContainer) { + range.setEnd(endContainer, _range.endOffset); + } + } + + } + } + } else { + range = _range; // Just evaluate the current documents range } - - // Generate the Cfi + + // Generate the Cfi return this.epubcfi.generateCfiFromRange(range, this.cfiBase); }; @@ -3723,19 +3203,19 @@ EPUBJS.Chapter.prototype.find = function(_query){ var last = -1; var excerpt; var limit = 150; - + while (pos != -1) { pos = text.indexOf(query, last + 1); - + if(pos != -1) { // If Found, Create Range range = chapter.document.createRange(); range.setStart(node, pos); range.setEnd(node, pos + query.length); - + //Generate CFI cfi = chapter.cfiFromRange(range); - + // Generate Excerpt if(node.textContent.length < limit) { excerpt = node.textContent; @@ -3743,32 +3223,32 @@ EPUBJS.Chapter.prototype.find = function(_query){ excerpt = node.textContent.substring(pos-limit/2,pos+limit/2); excerpt = "..." + excerpt + "..."; } - + //Add CFI to list matches.push({ cfi: cfi, excerpt: excerpt }); } - + last = pos; } }; - + // Grab text nodes - + /* for ( var i=0 ; i < xpath.snapshotLength; i++ ) { find(xpath.snapshotItem(i)); } */ - + this.textSprint(this.document, function(node){ find(node); }); - - + + // Return List of CFIs return matches; }; @@ -3790,6 +3270,108 @@ EPUBJS.Chapter.prototype.textSprint = function(root, func) { } }; + +EPUBJS.Chapter.prototype.replace = function(query, func, finished, progress){ + var items = this.contents.querySelectorAll(query), + resources = Array.prototype.slice.call(items), + count = resources.length; + + + if(count === 0) { + finished(false); + return; + } + resources.forEach(function(item){ + var called = false; + var after = function(result, full){ + if(called === false) { + count--; + if(progress) progress(result, full, count); + if(count <= 0 && finished) finished(true); + called = true; + } + }; + + func(item, after); + + }.bind(this)); + +}; + +EPUBJS.Chapter.prototype.replaceWithStored = function(query, attr, func, callback) { + var _oldUrls, + _newUrls = {}, + _store = this.store, + _cache = this.caches[query], + _uri = EPUBJS.core.uri(this.absolute), + _chapterBase = _uri.base, + _attr = attr, + _wait = 5, + progress = function(url, full, count) { + _newUrls[full] = url; + }, + finished = function(notempty) { + if(callback) callback(); + EPUBJS.core.values(_oldUrls).forEach(function(url){ + _store.revokeUrl(url); + }); + + _cache = _newUrls; + }; + + if(!_store) return; + + if(!_cache) _cache = {}; + _oldUrls = EPUBJS.core.clone(_cache); + + this.replace(query, function(link, done){ + var src = link.getAttribute(_attr), + full = EPUBJS.core.resolveUrl(_chapterBase, src); + + var replaceUrl = function(url) { + var timeout; + link.onload = function(){ + clearTimeout(timeout); + done(url, full); + }; + + link.onerror = function(e){ + clearTimeout(timeout); + done(url, full); + console.error(e); + }; + + if(query == "svg image") { + //-- SVG needs this to trigger a load event + link.setAttribute("externalResourcesRequired", "true"); + } + + if(query == "link[href]" && link.getAttribute("rel") !== "stylesheet") { + //-- Only Stylesheet links seem to have a load events, just continue others + done(url, full); + } else { + timeout = setTimeout(function(){ + done(url, full); + }, _wait); + } + + if (url) { + link.setAttribute(_attr, url); + } + + }; + + if(full in _oldUrls){ + replaceUrl(_oldUrls[full]); + _newUrls[full] = _oldUrls[full]; + delete _oldUrls[full]; + }else{ + func(_store, full, replaceUrl, link); + } + + }, finished, progress); +}; + var EPUBJS = EPUBJS || {}; EPUBJS.core = {}; @@ -3806,78 +3388,116 @@ EPUBJS.core.getEls = function(classes) { EPUBJS.core.request = function(url, type, withCredentials) { var supportsURL = window.URL; var BLOB_RESPONSE = supportsURL ? "blob" : "arraybuffer"; - var deferred = new RSVP.defer(); - var xhr = new XMLHttpRequest(); + var uri; - //-- Check from PDF.js: + //-- Check from PDF.js: // https://github.com/mozilla/pdf.js/blob/master/web/compatibility.js var xhrPrototype = XMLHttpRequest.prototype; - + + var handler = function() { + var r; + + if (this.readyState != this.DONE) return; + + if (this.status === 200 || (this.status === 0 && this.response) ) { // Android & Firefox reporting 0 for local & blob urls + if(type == 'xml'){ + // If this.responseXML wasn't set, try to parse using a DOMParser from text + if(!this.responseXML){ + r = new DOMParser().parseFromString(this.response, "application/xml"); + } else { + r = this.responseXML; + } + }else + if(type == 'xhtml'){ + if(!this.responseXML){ + r = new DOMParser().parseFromString(this.response, "application/xhtml+xml"); + } else { + r = this.responseXML; + } + }else + if(type == 'html'){ + if(!this.responseXML){ + r = new DOMParser().parseFromString(this.response, "text/html"); + } else { + r = this.responseXML; + } + } else + if(type == 'json'){ + r = JSON.parse(this.response); + }else + if(type == 'blob'){ + + if(supportsURL) { + r = this.response; + } else { + //-- Safari doesn't support responseType blob, so create a blob from arraybuffer + r = new Blob([this.response]); + } + + }else{ + r = this.response; + } + + deferred.resolve(r); + } else { + deferred.reject({ + message : this.response, + stack : new Error().stack + }); + } + }; + if (!('overrideMimeType' in xhrPrototype)) { // IE10 might have response, but not overrideMimeType Object.defineProperty(xhrPrototype, 'overrideMimeType', { value: function xmlHttpRequestOverrideMimeType(mimeType) {} }); } + + xhr.open("GET", url, true); + xhr.onreadystatechange = handler; + if(withCredentials) { xhr.withCredentials = true; } - xhr.open("GET", url, true); - xhr.onreadystatechange = handler; - + + // If type isn't set, determine it from the file extension + if(!type) { + uri = EPUBJS.core.uri(url); + type = uri.extension; + type = { + 'htm': 'html' + }[type] || type; + } + if(type == 'blob'){ xhr.responseType = BLOB_RESPONSE; } - + if(type == "json") { xhr.setRequestHeader("Accept", "application/json"); } - + if(type == 'xml') { - xhr.overrideMimeType('text/xml'); + xhr.responseType = "document"; + xhr.overrideMimeType('text/xml'); // for OPF parsing } + if(type == 'xhtml') { + xhr.responseType = "document"; + } + + if(type == 'html') { + xhr.responseType = "document"; + } + if(type == "binary") { xhr.responseType = "arraybuffer"; } - + xhr.send(); - - function handler() { - if (this.readyState === this.DONE) { - if (this.status === 200 || this.responseXML ) { //-- Firefox is reporting 0 for blob urls - var r; - - if(type == 'xml'){ - r = this.responseXML; - }else - if(type == 'json'){ - r = JSON.parse(this.response); - }else - if(type == 'blob'){ - - if(supportsURL) { - r = this.response; - } else { - //-- Safari doesn't support responseType blob, so create a blob from arraybuffer - r = new Blob([this.response]); - } - - }else{ - r = this.response; - } - - deferred.resolve(r); - } else { - deferred.reject({ - message : this.response, - stack : new Error().stack - }); - } - } - } return deferred.promise; }; @@ -3918,13 +3538,13 @@ EPUBJS.core.uri = function(url){ withoutProtocol, dot, firstSlash; - + if(blob === 0) { uri.protocol = "blob"; uri.base = url.indexOf(0, fragment); return uri; } - + if(fragment != -1) { uri.fragment = url.slice(fragment + 1); url = url.slice(0, fragment); @@ -3935,12 +3555,12 @@ EPUBJS.core.uri = function(url){ url = url.slice(0, search); href = url; } - + if(doubleSlash != -1) { uri.protocol = url.slice(0, doubleSlash); withoutProtocol = url.slice(doubleSlash+3); firstSlash = withoutProtocol.indexOf('/'); - + if(firstSlash === -1) { uri.host = uri.path; uri.path = ""; @@ -3948,12 +3568,12 @@ EPUBJS.core.uri = function(url){ uri.host = withoutProtocol.slice(0, firstSlash); uri.path = withoutProtocol.slice(firstSlash); } - - + + uri.origin = uri.protocol + "://" + uri.host; - + uri.directory = EPUBJS.core.folder(uri.path); - + uri.base = uri.origin + uri.directory; // return origin; } else { @@ -3961,7 +3581,7 @@ EPUBJS.core.uri = function(url){ uri.directory = EPUBJS.core.folder(url); uri.base = uri.directory; } - + //-- Filename uri.filename = url.replace(uri.base, ''); dot = uri.filename.lastIndexOf('.'); @@ -3974,13 +3594,13 @@ EPUBJS.core.uri = function(url){ //-- Parse out the folder, will return everything before the last slash EPUBJS.core.folder = function(url){ - + var lastSlash = url.lastIndexOf('/'); - + if(lastSlash == -1) var folder = ''; - + folder = url.slice(0, lastSlash + 1); - + return folder; }; @@ -4012,7 +3632,7 @@ EPUBJS.core.dataURLToBlob = function(dataURL) { return new Blob([uInt8Array], {type: contentType}); }; -//-- Load scripts async: http://stackoverflow.com/questions/7718935/load-scripts-asynchronously +//-- Load scripts async: http://stackoverflow.com/questions/7718935/load-scripts-asynchronously EPUBJS.core.addScript = function(src, callback, target) { var s, r; r = false; @@ -4067,13 +3687,13 @@ EPUBJS.core.prefixed = function(unprefixed) { prefixes = ['-Webkit-', '-moz-', '-o-', '-ms-'], upper = unprefixed[0].toUpperCase() + unprefixed.slice(1), length = vendors.length; - - if (typeof(document.body.style[unprefixed]) != 'undefined') { + + if (typeof(document.documentElement.style[unprefixed]) != 'undefined') { return unprefixed; } for ( var i=0; i < length; i++ ) { - if (typeof(document.body.style[vendors[i] + upper]) != 'undefined') { + if (typeof(document.documentElement.style[vendors[i] + upper]) != 'undefined') { return vendors[i] + upper; } } @@ -4087,11 +3707,11 @@ EPUBJS.core.resolveUrl = function(base, path) { uri = EPUBJS.core.uri(path), folders = base.split("/"), paths; - + if(uri.host) { return path; } - + folders.pop(); paths = path.split("/"); @@ -4120,11 +3740,11 @@ EPUBJS.core.uuid = function() { }; // Fast quicksort insert for sorted array -- based on: -// http://stackoverflow.com/questions/1344500/efficient-way-to-insert-a-number-into-a-sorted-array-of-numbers +// http://stackoverflow.com/questions/1344500/efficient-way-to-insert-a-number-into-a-sorted-array-of-numbers EPUBJS.core.insert = function(item, array, compareFunction) { var location = EPUBJS.core.locationOf(item, array, compareFunction); array.splice(location, 0, item); - + return location; }; @@ -4143,12 +3763,12 @@ EPUBJS.core.locationOf = function(item, array, compareFunction, _start, _end) { if(end-start <= 0) { return pivot; } - + compared = compareFunction(array[pivot], item); if(end-start === 1) { return compared > 0 ? pivot : pivot + 1; } - + if(compared === 0) { return pivot; } @@ -4213,7 +3833,7 @@ EPUBJS.core.queue = function(_scope){ // }, 0); } }; - + // Run All var flush = function(){ while(_q.length) { @@ -4224,11 +3844,11 @@ EPUBJS.core.queue = function(_scope){ var clear = function(){ _q = []; }; - + var length = function(){ return _q.length; }; - + return { "enqueue" : enqueue, "dequeue" : dequeue, @@ -4254,7 +3874,7 @@ EPUBJS.core.getElementTreeXPath = function(element) { var paths = []; var isXhtml = (element.ownerDocument.documentElement.getAttribute('xmlns') === "http://www.w3.org/1999/xhtml"); var index, nodeName, tagName, pathIndex; - + if(element.nodeType === Node.TEXT_NODE){ // index = Array.prototype.indexOf.call(element.parentNode.childNodes, element) + 1; index = EPUBJS.core.indexOfTextNode(element) + 1; @@ -4322,511 +3942,619 @@ EPUBJS.core.indexOfTextNode = function(textNode){ } if(sib == textNode) break; } - + return index; }; + +// Underscore +EPUBJS.core.defaults = function(obj) { + for (var i = 1, length = arguments.length; i < length; i++) { + var source = arguments[i]; + for (var prop in source) { + if (obj[prop] === void 0) obj[prop] = source[prop]; + } + } + return obj; +}; + +EPUBJS.core.extend = function(target) { + var sources = [].slice.call(arguments, 1); + sources.forEach(function (source) { + if(!source) return; + Object.getOwnPropertyNames(source).forEach(function(propName) { + Object.defineProperty(target, propName, Object.getOwnPropertyDescriptor(source, propName)); + }); + }); + return target; +}; + +EPUBJS.core.clone = function(obj) { + return EPUBJS.core.isArray(obj) ? obj.slice() : EPUBJS.core.extend({}, obj); +}; + +EPUBJS.core.isElement = function(obj) { + return !!(obj && obj.nodeType == 1); +}; + +EPUBJS.core.isNumber = function(n) { + return !isNaN(parseFloat(n)) && isFinite(n); +}; + +EPUBJS.core.isString = function(str) { + return (typeof str === 'string' || str instanceof String); +}; + +EPUBJS.core.isArray = Array.isArray || function(obj) { + return Object.prototype.toString.call(obj) === '[object Array]'; +}; + +// Lodash +EPUBJS.core.values = function(object) { + var index = -1; + var props, length, result; + + if(!object) return []; + + props = Object.keys(object); + length = props.length; + result = Array(length); + + while (++index < length) { + result[index] = object[props[index]]; + } + return result; +}; + EPUBJS.EpubCFI = function(cfiStr){ - if(cfiStr) return this.parse(cfiStr); + if(cfiStr) return this.parse(cfiStr); }; EPUBJS.EpubCFI.prototype.generateChapterComponent = function(_spineNodeIndex, _pos, id) { - var pos = parseInt(_pos), - spineNodeIndex = _spineNodeIndex + 1, - cfi = '/'+spineNodeIndex+'/'; + var pos = parseInt(_pos), + spineNodeIndex = _spineNodeIndex + 1, + cfi = '/'+spineNodeIndex+'/'; - cfi += (pos + 1) * 2; + cfi += (pos + 1) * 2; - if(id) cfi += "[" + id + "]"; + if(id) cfi += "[" + id + "]"; - //cfi += "!"; + //cfi += "!"; - return cfi; + return cfi; }; EPUBJS.EpubCFI.prototype.generatePathComponent = function(steps) { - var parts = []; + var parts = []; - steps.forEach(function(part){ - var segment = ''; - segment += (part.index + 1) * 2; + steps.forEach(function(part){ + var segment = ''; + segment += (part.index + 1) * 2; - if(part.id) { - segment += "[" + part.id + "]"; - } + if(part.id) { + segment += "[" + part.id + "]"; + } - parts.push(segment); - }); + parts.push(segment); + }); - return parts.join('/'); + return parts.join('/'); }; EPUBJS.EpubCFI.prototype.generateCfiFromElement = function(element, chapter) { - var steps = this.pathTo(element); - var path = this.generatePathComponent(steps); - if(!path.length) { - // Start of Chapter - return "epubcfi(" + chapter + "!/4/)"; - } else { - // First Text Node - return "epubcfi(" + chapter + "!" + path + "/1:0)"; - } + var steps = this.pathTo(element); + var path = this.generatePathComponent(steps); + if(!path.length) { + // Start of Chapter + return "epubcfi(" + chapter + "!/4/)"; + } else { + // First Text Node + return "epubcfi(" + chapter + "!" + path + "/1:0)"; + } }; EPUBJS.EpubCFI.prototype.pathTo = function(node) { - var stack = [], - children; + var stack = [], + children; - while(node && node.parentNode !== null && node.parentNode.nodeType != 9) { - children = node.parentNode.children; + while(node && node.parentNode !== null && node.parentNode.nodeType != 9) { + children = node.parentNode.children; - stack.unshift({ - 'id' : node.id, - // 'classList' : node.classList, - 'tagName' : node.tagName, - 'index' : children ? Array.prototype.indexOf.call(children, node) : 0 - }); - - node = node.parentNode; - } - - return stack; + stack.unshift({ + 'id' : node.id, + // 'classList' : node.classList, + 'tagName' : node.tagName, + 'index' : children ? Array.prototype.indexOf.call(children, node) : 0 + }); + + node = node.parentNode; + } + + return stack; }; EPUBJS.EpubCFI.prototype.getChapterComponent = function(cfiStr) { - var splitStr = cfiStr.split("!"); + var splitStr = cfiStr.split("!"); - return splitStr[0]; + return splitStr[0]; }; EPUBJS.EpubCFI.prototype.getPathComponent = function(cfiStr) { - var splitStr = cfiStr.split("!"); - var pathComponent = splitStr[1] ? splitStr[1].split(":") : ''; + var splitStr = cfiStr.split("!"); + var pathComponent = splitStr[1] ? splitStr[1].split(":") : ''; - return pathComponent[0]; + return pathComponent[0]; }; EPUBJS.EpubCFI.prototype.getCharecterOffsetComponent = function(cfiStr) { - var splitStr = cfiStr.split(":"); - return splitStr[1] || ''; + var splitStr = cfiStr.split(":"); + return splitStr[1] || ''; }; EPUBJS.EpubCFI.prototype.parse = function(cfiStr) { - var cfi = {}, - chapSegment, - chapterComponent, - pathComponent, - charecterOffsetComponent, - assertion, - chapId, - path, - end, - endInt, - text, - parseStep = function(part){ - var type, index, has_brackets, id; - - type = "element"; - index = parseInt(part) / 2 - 1; - has_brackets = part.match(/\[(.*)\]/); - if(has_brackets && has_brackets[1]){ - id = has_brackets[1]; - } - - return { - "type" : type, - 'index' : index, - 'id' : id || false - }; - }; - - if(typeof cfiStr !== "string") { - return {spinePos: -1}; - } + var cfi = {}, + chapSegment, + chapterComponent, + pathComponent, + charecterOffsetComponent, + assertion, + chapId, + path, + end, + endInt, + text, + parseStep = function(part){ + var type, index, has_brackets, id; - cfi.str = cfiStr; + type = "element"; + index = parseInt(part) / 2 - 1; + has_brackets = part.match(/\[(.*)\]/); + if(has_brackets && has_brackets[1]){ + id = has_brackets[1]; + } - if(cfiStr.indexOf("epubcfi(") === 0 && cfiStr[cfiStr.length-1] === ")") { - // Remove intial epubcfi( and ending ) - cfiStr = cfiStr.slice(8, cfiStr.length-1); - } + return { + "type" : type, + 'index' : index, + 'id' : id || false + }; + }; - chapterComponent = this.getChapterComponent(cfiStr); - pathComponent = this.getPathComponent(cfiStr) || ''; - charecterOffsetComponent = this.getCharecterOffsetComponent(cfiStr); - // Make sure this is a valid cfi or return - if(!chapterComponent) { - return {spinePos: -1}; - } - - // Chapter segment is always the second one - chapSegment = chapterComponent.split("/")[2] || ''; - if(!chapSegment) return {spinePos:-1}; + if(typeof cfiStr !== "string") { + return {spinePos: -1}; + } - cfi.spinePos = (parseInt(chapSegment) / 2 - 1 ) || 0; + cfi.str = cfiStr; - chapId = chapSegment.match(/\[(.*)\]/); + if(cfiStr.indexOf("epubcfi(") === 0 && cfiStr[cfiStr.length-1] === ")") { + // Remove intial epubcfi( and ending ) + cfiStr = cfiStr.slice(8, cfiStr.length-1); + } - cfi.spineId = chapId ? chapId[1] : false; + chapterComponent = this.getChapterComponent(cfiStr); + pathComponent = this.getPathComponent(cfiStr) || ''; + charecterOffsetComponent = this.getCharecterOffsetComponent(cfiStr); + // Make sure this is a valid cfi or return + if(!chapterComponent) { + return {spinePos: -1}; + } - if(pathComponent.indexOf(',') != -1) { - // Handle ranges -- not supported yet - console.warn("CFI Ranges are not supported"); - } + // Chapter segment is always the second one + chapSegment = chapterComponent.split("/")[2] || ''; + if(!chapSegment) return {spinePos:-1}; - path = pathComponent.split('/'); - end = path.pop(); + cfi.spinePos = (parseInt(chapSegment) / 2 - 1 ) || 0; - cfi.steps = []; + chapId = chapSegment.match(/\[(.*)\]/); - path.forEach(function(part){ - var step; - - if(part) { - step = parseStep(part); - cfi.steps.push(step); - } - }); + cfi.spineId = chapId ? chapId[1] : false; - //-- Check if END is a text node or element - endInt = parseInt(end); - if(!isNaN(endInt)) { - - if(endInt % 2 === 0) { // Even = is an element - cfi.steps.push(parseStep(end)); - } else { - cfi.steps.push({ - "type" : "text", - 'index' : (endInt - 1 ) / 2 - }); - } + if(pathComponent.indexOf(',') != -1) { + // Handle ranges -- not supported yet + console.warn("CFI Ranges are not supported"); + } - } + path = pathComponent.split('/'); + end = path.pop(); - assertion = charecterOffsetComponent.match(/\[(.*)\]/); - if(assertion && assertion[1]){ - cfi.characterOffset = parseInt(charecterOffsetComponent.split('[')[0]); - // We arent handling these assertions yet - cfi.textLocationAssertion = assertion[1]; - } else { - cfi.characterOffset = parseInt(charecterOffsetComponent); - } - - return cfi; + cfi.steps = []; + + path.forEach(function(part){ + var step; + + if(part) { + step = parseStep(part); + cfi.steps.push(step); + } + }); + + //-- Check if END is a text node or element + endInt = parseInt(end); + if(!isNaN(endInt)) { + + if(endInt % 2 === 0) { // Even = is an element + cfi.steps.push(parseStep(end)); + } else { + cfi.steps.push({ + "type" : "text", + 'index' : (endInt - 1 ) / 2 + }); + } + + } + + assertion = charecterOffsetComponent.match(/\[(.*)\]/); + if(assertion && assertion[1]){ + cfi.characterOffset = parseInt(charecterOffsetComponent.split('[')[0]); + // We arent handling these assertions yet + cfi.textLocationAssertion = assertion[1]; + } else { + cfi.characterOffset = parseInt(charecterOffsetComponent); + } + + return cfi; }; EPUBJS.EpubCFI.prototype.addMarker = function(cfi, _doc, _marker) { - var doc = _doc || document; - var marker = _marker || this.createMarker(doc); - var parent; - var lastStep; - var text; - var split; - - if(typeof cfi === 'string') { - cfi = this.parse(cfi); - } - // Get the terminal step - lastStep = cfi.steps[cfi.steps.length-1]; + var doc = _doc || document; + var marker = _marker || this.createMarker(doc); + var parent; + var lastStep; + var text; + var split; - // check spinePos - if(cfi.spinePos === -1) { - // Not a valid CFI - return false; - } + if(typeof cfi === 'string') { + cfi = this.parse(cfi); + } + // Get the terminal step + lastStep = cfi.steps[cfi.steps.length-1]; - // Find the CFI elements parent - parent = this.findParent(cfi, doc); - - if(!parent) { - // CFI didn't return an element - // Maybe it isnt in the current chapter? - return false; - } - - if(lastStep && lastStep.type === "text") { - text = parent.childNodes[lastStep.index]; - if(cfi.characterOffset){ - split = text.splitText(cfi.characterOffset); - marker.classList.add("EPUBJS-CFI-SPLIT"); - parent.insertBefore(marker, split); - } else { - parent.insertBefore(marker, text); - } - } else { - parent.insertBefore(marker, parent.firstChild); - } - - return marker; + // check spinePos + if(cfi.spinePos === -1) { + // Not a valid CFI + return false; + } + + // Find the CFI elements parent + parent = this.findParent(cfi, doc); + + if(!parent) { + // CFI didn't return an element + // Maybe it isnt in the current chapter? + return false; + } + + if(lastStep && lastStep.type === "text") { + text = parent.childNodes[lastStep.index]; + if(cfi.characterOffset){ + split = text.splitText(cfi.characterOffset); + marker.classList.add("EPUBJS-CFI-SPLIT"); + parent.insertBefore(marker, split); + } else { + parent.insertBefore(marker, text); + } + } else { + parent.insertBefore(marker, parent.firstChild); + } + + return marker; }; EPUBJS.EpubCFI.prototype.createMarker = function(_doc) { - var doc = _doc || document; - var element = doc.createElement('span'); - element.id = "EPUBJS-CFI-MARKER:"+ EPUBJS.core.uuid(); - element.classList.add("EPUBJS-CFI-MARKER"); - - return element; + var doc = _doc || document; + var element = doc.createElement('span'); + element.id = "EPUBJS-CFI-MARKER:"+ EPUBJS.core.uuid(); + element.classList.add("EPUBJS-CFI-MARKER"); + + return element; }; EPUBJS.EpubCFI.prototype.removeMarker = function(marker, _doc) { - var doc = _doc || document; - // var id = marker.id; + var doc = _doc || document; + // var id = marker.id; - // Cleanup textnodes if they were split - if(marker.classList.contains("EPUBJS-CFI-SPLIT")){ - nextSib = marker.nextSibling; - prevSib = marker.previousSibling; - if(nextSib && - prevSib && - nextSib.nodeType === 3 && - prevSib.nodeType === 3){ + // Cleanup textnodes if they were split + if(marker.classList.contains("EPUBJS-CFI-SPLIT")){ + nextSib = marker.nextSibling; + prevSib = marker.previousSibling; + if(nextSib && + prevSib && + nextSib.nodeType === 3 && + prevSib.nodeType === 3){ - prevSib.textContent += nextSib.textContent; - marker.parentNode.removeChild(nextSib); - } - marker.parentNode.removeChild(marker); - } else if(marker.classList.contains("EPUBJS-CFI-MARKER")) { - // Remove only elements added as markers - marker.parentNode.removeChild(marker); - } + prevSib.textContent += nextSib.textContent; + marker.parentNode.removeChild(nextSib); + } + marker.parentNode.removeChild(marker); + } else if(marker.classList.contains("EPUBJS-CFI-MARKER")) { + // Remove only elements added as markers + marker.parentNode.removeChild(marker); + } }; EPUBJS.EpubCFI.prototype.findParent = function(cfi, _doc) { - var doc = _doc || document, - element = doc.getElementsByTagName('html')[0], - children = Array.prototype.slice.call(element.children), - num, index, part, sections, - text, textBegin, textEnd; + var doc = _doc || document, + element = doc.getElementsByTagName('html')[0], + children = Array.prototype.slice.call(element.children), + num, index, part, sections, + text, textBegin, textEnd; - if(typeof cfi === 'string') { - cfi = this.parse(cfi); - } - - sections = cfi.steps.slice(0); // Clone steps array - if(!sections.length) { - return doc.getElementsByTagName('body')[0]; - } + if(typeof cfi === 'string') { + cfi = this.parse(cfi); + } - while(sections && sections.length > 0) { - part = sections.shift(); - // Find textNodes Parent - if(part.type === "text") { - text = element.childNodes[part.index]; - element = text.parentNode || element; - // Find element by id if present - } else if(part.id){ - element = doc.getElementById(part.id); - // Find element in parent - }else{ - element = children[part.index]; - } - // Element can't be found - if(typeof element === "undefined") { - console.error("No Element For", part, cfi.str); - return false; - } - // Get current element children and continue through steps - children = Array.prototype.slice.call(element.children); - } + sections = cfi.steps.slice(0); // Clone steps array + if(!sections.length) { + return doc.getElementsByTagName('body')[0]; + } - return element; + while(sections && sections.length > 0) { + part = sections.shift(); + // Find textNodes Parent + if(part.type === "text") { + text = element.childNodes[part.index]; + element = text.parentNode || element; + // Find element by id if present + } else if(part.id){ + element = doc.getElementById(part.id); + // Find element in parent + }else{ + element = children[part.index]; + } + // Element can't be found + if(typeof element === "undefined") { + console.error("No Element For", part, cfi.str); + return false; + } + // Get current element children and continue through steps + children = Array.prototype.slice.call(element.children); + } + + return element; }; EPUBJS.EpubCFI.prototype.compare = function(cfiOne, cfiTwo) { - if(typeof cfiOne === 'string') { - cfiOne = new EPUBJS.EpubCFI(cfiOne); - } - if(typeof cfiTwo === 'string') { - cfiTwo = new EPUBJS.EpubCFI(cfiTwo); - } - // Compare Spine Positions - if(cfiOne.spinePos > cfiTwo.spinePos) { - return 1; - } - if(cfiOne.spinePos < cfiTwo.spinePos) { - return -1; - } - - - // Compare Each Step in the First item - for (var i = 0; i < cfiOne.steps.length; i++) { - if(!cfiTwo.steps[i]) { - return 1; - } - if(cfiOne.steps[i].index > cfiTwo.steps[i].index) { - return 1; - } - if(cfiOne.steps[i].index < cfiTwo.steps[i].index) { - return -1; - } - // Otherwise continue checking - } - - // All steps in First present in Second - if(cfiOne.steps.length < cfiTwo.steps.length) { - return -1; - } + if(typeof cfiOne === 'string') { + cfiOne = new EPUBJS.EpubCFI(cfiOne); + } + if(typeof cfiTwo === 'string') { + cfiTwo = new EPUBJS.EpubCFI(cfiTwo); + } + // Compare Spine Positions + if(cfiOne.spinePos > cfiTwo.spinePos) { + return 1; + } + if(cfiOne.spinePos < cfiTwo.spinePos) { + return -1; + } - // Compare the charecter offset of the text node - if(cfiOne.characterOffset > cfiTwo.characterOffset) { - return 1; - } - if(cfiOne.characterOffset < cfiTwo.characterOffset) { - return -1; - } - // CFI's are equal - return 0; + // Compare Each Step in the First item + for (var i = 0; i < cfiOne.steps.length; i++) { + if(!cfiTwo.steps[i]) { + return 1; + } + if(cfiOne.steps[i].index > cfiTwo.steps[i].index) { + return 1; + } + if(cfiOne.steps[i].index < cfiTwo.steps[i].index) { + return -1; + } + // Otherwise continue checking + } + + // All steps in First present in Second + if(cfiOne.steps.length < cfiTwo.steps.length) { + return -1; + } + + // Compare the charecter offset of the text node + if(cfiOne.characterOffset > cfiTwo.characterOffset) { + return 1; + } + if(cfiOne.characterOffset < cfiTwo.characterOffset) { + return -1; + } + + // CFI's are equal + return 0; }; EPUBJS.EpubCFI.prototype.generateCfiFromHref = function(href, book) { - var uri = EPUBJS.core.uri(href); - var path = uri.path; - var fragment = uri.fragment; - var spinePos = book.spineIndexByURL[path]; - var loaded; - var deferred = new RSVP.defer(); - var epubcfi = new EPUBJS.EpubCFI(); - var spineItem; - - if(typeof spinePos !== "undefined"){ - spineItem = book.spine[spinePos]; - loaded = book.loadXml(spineItem.url); - loaded.then(function(doc){ - var element = doc.getElementById(fragment); - var cfi; - cfi = epubcfi.generateCfiFromElement(element, spineItem.cfiBase); - deferred.resolve(cfi); - }); - } - - return deferred.promise; + var uri = EPUBJS.core.uri(href); + var path = uri.path; + var fragment = uri.fragment; + var spinePos = book.spineIndexByURL[path]; + var loaded; + var deferred = new RSVP.defer(); + var epubcfi = new EPUBJS.EpubCFI(); + var spineItem; + + if(typeof spinePos !== "undefined"){ + spineItem = book.spine[spinePos]; + loaded = book.loadXml(spineItem.url); + loaded.then(function(doc){ + var element = doc.getElementById(fragment); + var cfi; + cfi = epubcfi.generateCfiFromElement(element, spineItem.cfiBase); + deferred.resolve(cfi); + }); + } + + return deferred.promise; }; EPUBJS.EpubCFI.prototype.generateCfiFromTextNode = function(anchor, offset, base) { - var parent = anchor.parentNode; - var steps = this.pathTo(parent); - var path = this.generatePathComponent(steps); - var index = 1 + (2 * Array.prototype.indexOf.call(parent.childNodes, anchor)); - return "epubcfi(" + base + "!" + path + "/"+index+":"+(offset || 0)+")"; + var parent = anchor.parentNode; + var steps = this.pathTo(parent); + var path = this.generatePathComponent(steps); + var index = 1 + (2 * Array.prototype.indexOf.call(parent.childNodes, anchor)); + return "epubcfi(" + base + "!" + path + "/"+index+":"+(offset || 0)+")"; }; EPUBJS.EpubCFI.prototype.generateCfiFromRangeAnchor = function(range, base) { - var anchor = range.anchorNode; - var offset = range.anchorOffset; - return this.generateCfiFromTextNode(anchor, offset, base); + var anchor = range.anchorNode; + var offset = range.anchorOffset; + return this.generateCfiFromTextNode(anchor, offset, base); }; EPUBJS.EpubCFI.prototype.generateCfiFromRange = function(range, base) { - var start, startElement, startSteps, startPath, startOffset, startIndex; - var end, endElement, endSteps, endPath, endOffset, endIndex; + var start, startElement, startSteps, startPath, startOffset, startIndex; + var end, endElement, endSteps, endPath, endOffset, endIndex; - start = range.startContainer; - - if(start.nodeType === 3) { // text node - startElement = start.parentNode; - //startIndex = 1 + (2 * Array.prototype.indexOf.call(startElement.childNodes, start)); - startIndex = 1 + (2 * EPUBJS.core.indexOfTextNode(start)); - startSteps = this.pathTo(startElement); - } else if(range.collapsed) { - return this.generateCfiFromElement(start, base); // single element - } else { - startSteps = this.pathTo(start); - } - - startPath = this.generatePathComponent(startSteps); - startOffset = range.startOffset; - - if(!range.collapsed) { - end = range.endContainer; - - if(end.nodeType === 3) { // text node - endElement = end.parentNode; - // endIndex = 1 + (2 * Array.prototype.indexOf.call(endElement.childNodes, end)); - endIndex = 1 + (2 * EPUBJS.core.indexOfTextNode(end)); - - endSteps = this.pathTo(endElement); - } else { - endSteps = this.pathTo(end); - } + start = range.startContainer; - endPath = this.generatePathComponent(endSteps); - endOffset = range.endOffset; + if(start.nodeType === 3) { // text node + startElement = start.parentNode; + //startIndex = 1 + (2 * Array.prototype.indexOf.call(startElement.childNodes, start)); + startIndex = 1 + (2 * EPUBJS.core.indexOfTextNode(start)); + startSteps = this.pathTo(startElement); + } else if(range.collapsed) { + return this.generateCfiFromElement(start, base); // single element + } else { + startSteps = this.pathTo(start); + } - return "epubcfi(" + base + "!" + startPath + "/" + startIndex + ":" + startOffset + "," + endPath + "/" + endIndex + ":" + endOffset + ")"; - - } else { - return "epubcfi(" + base + "!" + startPath + "/"+ startIndex +":"+ startOffset +")"; - } + startPath = this.generatePathComponent(startSteps); + startOffset = range.startOffset; + + if(!range.collapsed) { + end = range.endContainer; + + if(end.nodeType === 3) { // text node + endElement = end.parentNode; + // endIndex = 1 + (2 * Array.prototype.indexOf.call(endElement.childNodes, end)); + endIndex = 1 + (2 * EPUBJS.core.indexOfTextNode(end)); + + endSteps = this.pathTo(endElement); + } else { + endSteps = this.pathTo(end); + } + + endPath = this.generatePathComponent(endSteps); + endOffset = range.endOffset; + + // Remove steps present in startPath + endPath = endPath.replace(startPath, ''); + + if (endPath.length) { + endPath = endPath + "/"; + } + + return "epubcfi(" + base + "!" + startPath + "/" + startIndex + ":" + startOffset + "," + endPath + endIndex + ":" + endOffset + ")"; + + } else { + return "epubcfi(" + base + "!" + startPath + "/"+ startIndex +":"+ startOffset +")"; + } }; EPUBJS.EpubCFI.prototype.generateXpathFromSteps = function(steps) { - var xpath = [".", "*"]; + var xpath = [".", "*"]; - steps.forEach(function(step){ - var position = step.index + 1; - - if(step.id){ - xpath.push("*[position()=" + position + " and @id='" + step.id + "']"); - } else if(step.type === "text") { - xpath.push("text()[" + position + "]"); - } else { - xpath.push("*[" + position + "]"); - } - }); + steps.forEach(function(step){ + var position = step.index + 1; - return xpath.join("/"); + if(step.id){ + xpath.push("*[position()=" + position + " and @id='" + step.id + "']"); + } else if(step.type === "text") { + xpath.push("text()[" + position + "]"); + } else { + xpath.push("*[" + position + "]"); + } + }); + + return xpath.join("/"); +}; + +EPUBJS.EpubCFI.prototype.generateQueryFromSteps = function(steps) { + var query = ["html"]; + + steps.forEach(function(step){ + var position = step.index + 1; + + if(step.id){ + query.push("#" + step.id); + } else if(step.type === "text") { + // unsupported in querySelector + // query.push("text()[" + position + "]"); + } else { + query.push("*:nth-child(" + position + ")"); + } + }); + + return query.join(">"); }; EPUBJS.EpubCFI.prototype.generateRangeFromCfi = function(cfi, _doc) { - var doc = _doc || document; - var range = doc.createRange(); - var lastStep; - var xpath; - var startContainer; - var textLength; - - if(typeof cfi === 'string') { - cfi = this.parse(cfi); - } - - // check spinePos - if(cfi.spinePos === -1) { - // Not a valid CFI - return false; - } - - xpath = this.generateXpathFromSteps(cfi.steps); - - // Get the terminal step - lastStep = cfi.steps[cfi.steps.length-1]; - startContainer = doc.evaluate(xpath, doc, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + var doc = _doc || document; + var range = doc.createRange(); + var lastStep; + var xpath; + var startContainer; + var textLength; + var query; + var startContainerParent; - if(!startContainer) { - return null; - } + if(typeof cfi === 'string') { + cfi = this.parse(cfi); + } - if(startContainer && cfi.characterOffset >= 0) { - textLength = startContainer.length; + // check spinePos + if(cfi.spinePos === -1) { + // Not a valid CFI + return false; + } - if(cfi.characterOffset < textLength) { - range.setStart(startContainer, cfi.characterOffset); - range.setEnd(startContainer, textLength ); - } else { - console.debug("offset greater than length:", cfi.characterOffset, textLength); - range.setStart(startContainer, textLength - 1 ); - range.setEnd(startContainer, textLength ); - } - } else if(startContainer) { - range.selectNode(startContainer); - } - // doc.defaultView.getSelection().addRange(range); - return range; + // Get the terminal step + lastStep = cfi.steps[cfi.steps.length-1]; + + if(typeof document.evaluate != 'undefined') { + xpath = this.generateXpathFromSteps(cfi.steps); + startContainer = doc.evaluate(xpath, doc, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + } else { + // Get the query string + query = this.generateQueryFromSteps(cfi.steps); + // Find the containing element + startContainerParent = doc.querySelector(query); + // Find the text node within that element + if(startContainerParent && lastStep.type == "text") { + startContainer = startContainerParent.childNodes[lastStep.index]; + } + } + + if(!startContainer) { + return null; + } + + if(startContainer && cfi.characterOffset >= 0) { + textLength = startContainer.length; + + if(cfi.characterOffset < textLength) { + range.setStart(startContainer, cfi.characterOffset); + range.setEnd(startContainer, textLength ); + } else { + console.debug("offset greater than length:", cfi.characterOffset, textLength); + range.setStart(startContainer, textLength - 1 ); + range.setEnd(startContainer, textLength ); + } + } else if(startContainer) { + range.selectNode(startContainer); + } + // doc.defaultView.getSelection().addRange(range); + return range; +}; + +EPUBJS.EpubCFI.prototype.isCfiString = function(target) { + if(typeof target === "string" && + target.indexOf("epubcfi(") === 0) { + return true; + } + + return false; }; EPUBJS.Events = function(obj, el){ @@ -4901,7 +4629,7 @@ EPUBJS.Events.prototype.listenUntil = function(OnEvt, OffEvt, func, bindto){ EPUBJS.hooks = {}; EPUBJS.Hooks = (function(){ function hooks(){} - + //-- Get pre-registered hooks hooks.prototype.getHooks = function(){ var plugs; @@ -4911,20 +4639,20 @@ EPUBJS.Hooks = (function(){ }, this); for (var plugType in this.hooks) { - plugs = _.values(EPUBJS.hooks[plugType]); - + plugs = EPUBJS.core.values(EPUBJS.hooks[plugType]); + plugs.forEach(function(hook){ this.registerHook(plugType, hook); }, this); } }; - - //-- Hooks allow for injecting async functions that must all complete before continuing + + //-- Hooks allow for injecting async functions that must all complete before continuing // Functions must have a callback as their first argument. hooks.prototype.registerHook = function(type, toAdd, toFront){ - + if(typeof(this.hooks[type]) != "undefined"){ - + if(typeof(toAdd) === "function"){ if(toFront) { this.hooks[type].unshift(toAdd); @@ -4941,18 +4669,49 @@ EPUBJS.Hooks = (function(){ }, this); } }else{ - //-- Allows for undefined hooks, but maybe this should error? - this.hooks[type] = [func]; + //-- Allows for undefined hooks + this.hooks[type] = [toAdd]; + + if(typeof(toAdd) === "function"){ + this.hooks[type] = [toAdd]; + }else if(Array.isArray(toAdd)){ + this.hooks[type] = []; + toAdd.forEach(function(hook){ + this.hooks[type].push(hook); + }, this); + } + } }; - + + hooks.prototype.removeHook = function(type, toRemove){ + var index; + + if(typeof(this.hooks[type]) != "undefined"){ + + if(typeof(toRemove) === "function"){ + index = this.hooks[type].indexOf(toRemove); + if (index > -1) { + this.hooks[type].splice(index, 1); + } + }else if(Array.isArray(toRemove)){ + toRemove.forEach(function(hook){ + index = this.hooks[type].indexOf(hook); + if (index > -1) { + this.hooks[type].splice(index, 1); + } + }, this); + } + } + }; + hooks.prototype.triggerHooks = function(type, callback, passed){ var hooks, count; - + if(typeof(this.hooks[type]) == "undefined") return false; - + hooks = this.hooks[type]; - + count = hooks.length; if(count === 0 && callback) { callback(); @@ -4962,12 +4721,12 @@ EPUBJS.Hooks = (function(){ count--; if(count <= 0 && callback) callback(); } - + hooks.forEach(function(hook){ hook(countdown, passed); }); }; - + return { register: function(name) { if(EPUBJS.hooks[name] === undefined) { EPUBJS.hooks[name] = {}; } @@ -4982,7 +4741,6 @@ EPUBJS.Hooks = (function(){ }; })(); - EPUBJS.Layout = EPUBJS.Layout || {}; EPUBJS.Layout.Reflowable = function(){ @@ -5110,7 +4868,7 @@ EPUBJS.Layout.Fixed = function(){ EPUBJS.Layout.Fixed.prototype.format = function(documentElement, _width, _height, _gap){ var columnWidth = EPUBJS.core.prefixed('columnWidth'); - var viewport = documentElement.querySelector("[name=viewport"); + var viewport = documentElement.querySelector("[name=viewport]"); var content; var contents; var width, height; @@ -5157,6 +4915,240 @@ EPUBJS.Layout.Fixed.prototype.calculatePages = function(){ }; }; +EPUBJS.Locations = function(spine, store, credentials) { + this.spine = spine; + this.store = store; + this.credentials = credentials; + + this.epubcfi = new EPUBJS.EpubCFI(); + + this._locations = []; + this.total = 0; + + this.break = 150; + + this._current = 0; + +}; + +EPUBJS.Locations.prototype.generate = function(chars) { + var deferred = new RSVP.defer(); + var spinePos = -1; + var spineLength = this.spine.length; + var finished; + var nextChapter = function(deferred){ + var chapter; + var next = spinePos + 1; + var done = deferred || new RSVP.defer(); + var loaded; + if(next >= spineLength) { + done.resolve(); + } else { + spinePos = next; + chapter = new EPUBJS.Chapter(this.spine[spinePos], this.store, this.credentials); + + this.process(chapter).then(function() { + // Load up the next chapter + setTimeout(function(){ + nextChapter(done); + }, 1); + + }); + } + return done.promise; + }.bind(this); + + if(typeof chars === 'number') { + this.break = chars; + } + + finished = nextChapter().then(function(){ + this.total = this._locations.length-1; + + if (this._currentCfi) { + this.currentLocation = this._currentCfi; + } + deferred.resolve(this._locations); + }.bind(this)); + + return deferred.promise; +}; + +EPUBJS.Locations.prototype.process = function(chapter) { + return chapter.load() + .then(function(_doc) { + + var range; + var doc = _doc; + var contents = doc.documentElement.querySelector("body"); + var counter = 0; + var prev; + + this.sprint(contents, function(node) { + var len = node.length; + var dist; + var pos = 0; + + // Start range + if (counter === 0) { + range = doc.createRange(); + range.setStart(node, 0); + } + + dist = this.break - counter; + + // Node is smaller than a break + if(dist > len){ + counter += len; + pos = len; + } + + while (pos < len) { + counter = this.break; + pos += this.break; + + // Gone over + if(pos >= len){ + // Continue counter for next node + counter = len - (pos - this.break); + + // At End + } else { + // End the previous range + range.setEnd(node, pos); + cfi = chapter.cfiFromRange(range); + this._locations.push(cfi); + counter = 0; + + // Start new range + pos += 1; + range = doc.createRange(); + range.setStart(node, pos); + } + + } + + prev = node; + + }.bind(this)); + + // Close remaining + if (range) { + range.setEnd(prev, prev.length); + cfi = chapter.cfiFromRange(range); + this._locations.push(cfi); + counter = 0; + } + + }.bind(this)); + +}; + +EPUBJS.Locations.prototype.sprint = function(root, func) { + var treeWalker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, null, false); + + while ((node = treeWalker.nextNode())) { + func(node); + } + +}; + +EPUBJS.Locations.prototype.locationFromCfi = function(cfi){ + // Check if the location has not been set yet + if(this._locations.length === 0) { + return -1; + } + + return EPUBJS.core.locationOf(cfi, this._locations, this.epubcfi.compare); +}; + +EPUBJS.Locations.prototype.percentageFromCfi = function(cfi) { + // Find closest cfi + var loc = this.locationFromCfi(cfi); + // Get percentage in total + return this.percentageFromLocation(loc); +}; + +EPUBJS.Locations.prototype.percentageFromLocation = function(loc) { + if (!loc || !this.total) { + return 0; + } + return (loc / this.total); +}; + +EPUBJS.Locations.prototype.cfiFromLocation = function(loc){ + var cfi = -1; + // check that pg is an int + if(typeof loc != "number"){ + loc = parseInt(loc); + } + + if(loc >= 0 && loc < this._locations.length) { + cfi = this._locations[loc]; + } + + return cfi; +}; + +EPUBJS.Locations.prototype.cfiFromPercentage = function(value){ + var percentage = (value > 1) ? value / 100 : value; // Normalize value to 0-1 + var loc = Math.ceil(this.total * percentage); + + return this.cfiFromLocation(loc); +}; + +EPUBJS.Locations.prototype.load = function(locations){ + this._locations = JSON.parse(locations); + this.total = this._locations.length-1; + return this._locations; +}; + +EPUBJS.Locations.prototype.save = function(json){ + return JSON.stringify(this._locations); +}; + +EPUBJS.Locations.prototype.getCurrent = function(json){ + return this._current; +}; + +EPUBJS.Locations.prototype.setCurrent = function(curr){ + var loc; + + if(typeof curr == "string"){ + this._currentCfi = curr; + } else if (typeof curr == "number") { + this._current = curr; + } else { + return; + } + + if(this._locations.length === 0) { + return; + } + + if(typeof curr == "string"){ + loc = this.locationFromCfi(curr); + this._current = loc; + } else { + loc = curr; + } + + this.trigger("changed", { + percentage: this.percentageFromLocation(loc) + }); +}; + +Object.defineProperty(EPUBJS.Locations.prototype, 'currentLocation', { + get: function () { + return this._current; + }, + set: function (curr) { + this.setCurrent(curr); + } +}); + +RSVP.EventTarget.mixin(EPUBJS.Locations.prototype); + EPUBJS.Pagination = function(pageList) { this.pages = []; this.locations = []; @@ -5252,19 +5244,19 @@ EPUBJS.Parser = function(baseUrl){ EPUBJS.Parser.prototype.container = function(containerXml){ //-- var rootfile, fullpath, folder, encoding; - + if(!containerXml) { console.error("Container File Not Found"); return; } - + rootfile = containerXml.querySelector("rootfile"); - + if(!rootfile) { console.error("No RootFile Found"); return; } - + fullpath = rootfile.getAttribute('full-path'); folder = EPUBJS.core.uri(fullpath).directory; encoding = containerXml.xmlEncoding; @@ -5279,19 +5271,19 @@ EPUBJS.Parser.prototype.container = function(containerXml){ EPUBJS.Parser.prototype.identifier = function(packageXml){ var metadataNode; - + if(!packageXml) { console.error("Package File Not Found"); return; } - + metadataNode = packageXml.querySelector("metadata"); - + if(!metadataNode) { console.error("No Metadata Found"); return; } - + return this.getElementText(metadataNode, "identifier"); }; @@ -5302,48 +5294,53 @@ EPUBJS.Parser.prototype.packageContents = function(packageXml, baseUrl){ var spineNodeIndex; var spine; var spineIndexByURL; - + var metadata; + if(baseUrl) this.baseUrl = baseUrl; - + if(!packageXml) { console.error("Package File Not Found"); return; } - + metadataNode = packageXml.querySelector("metadata"); if(!metadataNode) { console.error("No Metadata Found"); return; } - + manifestNode = packageXml.querySelector("manifest"); if(!manifestNode) { console.error("No Manifest Found"); return; } - + spineNode = packageXml.querySelector("spine"); if(!spineNode) { console.error("No Spine Found"); return; } - + manifest = parse.manifest(manifestNode); navPath = parse.findNavPath(manifestNode); tocPath = parse.findTocPath(manifestNode, spineNode); - coverPath = parse.findCoverPath(manifestNode); + coverPath = parse.findCoverPath(packageXml); spineNodeIndex = Array.prototype.indexOf.call(spineNode.parentNode.childNodes, spineNode); - + spine = parse.spine(spineNode, manifest); - + spineIndexByURL = {}; spine.forEach(function(item){ spineIndexByURL[item.href] = item.index; }); + metadata = parse.metadata(metadataNode); + + metadata.direction = spineNode.getAttribute("page-progression-direction"); + return { - 'metadata' : parse.metadata(metadataNode), + 'metadata' : metadata, 'spine' : spine, 'manifest' : manifest, 'navPath' : navPath, @@ -5366,9 +5363,9 @@ EPUBJS.Parser.prototype.findNavPath = function(manifestNode){ EPUBJS.Parser.prototype.findTocPath = function(manifestNode, spineNode){ var node = manifestNode.querySelector("item[media-type='application/x-dtbncx+xml']"); var tocId; - + // If we can't find the toc by media-type then try to look for id of the item in the spine attributes as - // according to http://www.idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.4.1.2, + // according to http://www.idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.4.1.2, // "The item that describes the NCX must be referenced by the spine toc attribute." if (!node) { tocId = spineNode.getAttribute("toc"); @@ -5376,39 +5373,46 @@ EPUBJS.Parser.prototype.findTocPath = function(manifestNode, spineNode){ node = manifestNode.querySelector("item[id='" + tocId + "']"); } } - + return node ? node.getAttribute('href') : false; }; //-- Find Cover: -EPUBJS.Parser.prototype.findCoverPath = function(manifestNode){ - var node = manifestNode.querySelector("item[properties='cover-image']"); - return node ? node.getAttribute('href') : false; +//-- Fallback for Epub 2.0 +EPUBJS.Parser.prototype.findCoverPath = function(packageXml){ + var epubVersion = packageXml.querySelector('package').getAttribute('version'); + if (epubVersion === '2.0') { + var coverId = packageXml.querySelector('meta[name="cover"]').getAttribute('content'); + return packageXml.querySelector("item[id='" + coverId + "']").getAttribute('href'); + } + else { + var node = packageXml.querySelector("item[properties='cover-image']"); + return node ? node.getAttribute('href') : false; + } }; //-- Expanded to match Readium web components EPUBJS.Parser.prototype.metadata = function(xml){ var metadata = {}, p = this; - + metadata.bookTitle = p.getElementText(xml, 'title'); metadata.creator = p.getElementText(xml, 'creator'); metadata.description = p.getElementText(xml, 'description'); - + metadata.pubdate = p.getElementText(xml, 'date'); - + metadata.publisher = p.getElementText(xml, 'publisher'); - + metadata.identifier = p.getElementText(xml, "identifier"); metadata.language = p.getElementText(xml, "language"); metadata.rights = p.getElementText(xml, "rights"); - + metadata.modified_date = p.querySelectorText(xml, "meta[property='dcterms:modified']"); metadata.layout = p.querySelectorText(xml, "meta[property='rendition:layout']"); metadata.orientation = p.querySelectorText(xml, "meta[property='rendition:orientation']"); metadata.spread = p.querySelectorText(xml, "meta[property='rendition:spread']"); - // metadata.page_prog_dir = packageXml.querySelector("spine").getAttribute("page-progression-direction"); - + return metadata; }; @@ -5417,7 +5421,7 @@ EPUBJS.Parser.prototype.getElementText = function(xml, tag){ el; if(!found || found.length === 0) return ''; - + el = found[0]; if(el.childNodes.length){ @@ -5425,7 +5429,7 @@ EPUBJS.Parser.prototype.getElementText = function(xml, tag){ } return ''; - + }; EPUBJS.Parser.prototype.querySelectorText = function(xml, q){ @@ -5441,34 +5445,34 @@ EPUBJS.Parser.prototype.querySelectorText = function(xml, q){ EPUBJS.Parser.prototype.manifest = function(manifestXml){ var baseUrl = this.baseUrl, manifest = {}; - + //-- Turn items into an array var selected = manifestXml.querySelectorAll("item"), items = Array.prototype.slice.call(selected); - + //-- Create an object with the id as key items.forEach(function(item){ var id = item.getAttribute('id'), href = item.getAttribute('href') || '', type = item.getAttribute('media-type') || '', properties = item.getAttribute('properties') || ''; - + manifest[id] = { 'href' : href, 'url' : baseUrl + href, //-- Absolute URL for loading with a web worker 'type' : type, 'properties' : properties }; - + }); - + return manifest; }; EPUBJS.Parser.prototype.spine = function(spineXml, manifest){ var spine = []; - + var selected = spineXml.getElementsByTagName("itemref"), items = Array.prototype.slice.call(selected); @@ -5493,236 +5497,207 @@ EPUBJS.Parser.prototype.spine = function(spineXml, manifest){ 'url' : manifest[Id].url, 'index' : index, 'cfiBase' : cfiBase, - 'cfi' : "epub(" + cfiBase + ")" + 'cfi' : "epubcfi(" + cfiBase + ")" }; spine.push(vert); }); - + return spine; }; +EPUBJS.Parser.prototype.querySelectorByType = function(html, element, type){ + var query = html.querySelector(element+'[*|type="'+type+'"]'); + // Handle IE not supporting namespaced epub:type in querySelector + if(query.length === 0) { + query = html.querySelectorAll(element); + for (var i = 0; i < query.length; i++) { + if(query[i].getAttributeNS("http://www.idpf.org/2007/ops", "type") === type) { + return query[i]; + } + } + } else { + return query; + } +}; + EPUBJS.Parser.prototype.nav = function(navHtml, spineIndexByURL, bookSpine){ - var navEl = navHtml.querySelector('nav[*|type="toc"]'), //-- [*|type="toc"] * Doesn't seem to work - idCounter = 0; - - if(!navEl) return []; - - // Implements `> ol > li` - function findListItems(parent){ - var items = []; - - Array.prototype.slice.call(parent.childNodes).forEach(function(node){ - if('ol' == node.tagName){ - Array.prototype.slice.call(node.childNodes).forEach(function(item){ - if('li' == item.tagName){ - items.push(item); - } - }); - } - }); - - return items; - + var navElement = this.querySelectorByType(navHtml, "nav", "toc"); + var navItems = navElement ? navElement.querySelectorAll("ol li") : []; + var length = navItems.length; + var i; + var toc = {}; + var list = []; + var item, parent; + + if(!navItems || length === 0) return list; + + for (i = 0; i < length; ++i) { + item = this.navItem(navItems[i], spineIndexByURL, bookSpine); + toc[item.id] = item; + if(!item.parent) { + list.push(item); + } else { + parent = toc[item.parent]; + parent.subitems.push(item); + } } - - // Implements `> a, > span` - function findAnchorOrSpan(parent){ - var item = null; - - Array.prototype.slice.call(parent.childNodes).forEach(function(node){ - if('a' == node.tagName || 'span' == node.tagName){ - item = node; - } - }); - - return item; + + return list; +}; + +EPUBJS.Parser.prototype.navItem = function(item, spineIndexByURL, bookSpine){ + var id = item.getAttribute('id') || false, + content = item.querySelector("a, span"), + src = content.getAttribute('href') || '', + text = content.textContent || "", + split = src.split("#"), + baseUrl = split[0], + spinePos = spineIndexByURL[baseUrl], + spineItem = bookSpine[spinePos], + subitems = [], + parentNode = item.parentNode, + parent, + cfi = spineItem ? spineItem.cfi : ''; + + if(parentNode && parentNode.nodeName === "navPoint") { + parent = parentNode.getAttribute('id'); } - - function getTOC(parent){ - var list = [], - nodes = findListItems(parent), - items = Array.prototype.slice.call(nodes), - length = items.length, - node; - - if(length === 0) return false; - - items.forEach(function(item){ - var id = item.getAttribute('id') || false, - content = findAnchorOrSpan(item), - href = content.getAttribute('href') || '', - text = content.textContent || "", - split = href.split("#"), - baseUrl = split[0], - subitems = getTOC(item), - spinePos = spineIndexByURL[baseUrl], - spineItem = bookSpine[spinePos], - cfi = spineItem ? spineItem.cfi : ''; - - if(!id) { - if(spinePos) { - spineItem = bookSpine[spinePos]; - id = spineItem.id; - cfi = spineItem.cfi; - } else { - id = 'epubjs-autogen-toc-id-' + (idCounter++); - } - } - - item.setAttribute('id', id); // Ensure all elements have an id - list.push({ - "id": id, - "href": href, - "label": text, - "subitems" : subitems, - "parent" : parent ? parent.getAttribute('id') : null, - "cfi" : cfi - }); - - }); - - return list; + + if(!id) { + if(spinePos) { + spineItem = bookSpine[spinePos]; + id = spineItem.id; + cfi = spineItem.cfi; + } else { + id = 'epubjs-autogen-toc-id-' + EPUBJS.core.uuid(); + item.setAttribute('id', id); + } } - - return getTOC(navEl); + + return { + "id": id, + "href": src, + "label": text, + "spinePos": spinePos, + "subitems" : subitems, + "parent" : parent, + "cfi" : cfi + }; }; EPUBJS.Parser.prototype.toc = function(tocXml, spineIndexByURL, bookSpine){ - var navMap = tocXml.querySelector("navMap"); - if(!navMap) return []; - - function getTOC(parent){ - var list = [], - snapshot = tocXml.evaluate("*[local-name()='navPoint']", parent, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null), - length = snapshot.snapshotLength; - - if(length === 0) return []; + var navPoints = tocXml.querySelectorAll("navMap navPoint"); + var length = navPoints.length; + var i; + var toc = {}; + var list = []; + var item, parent; - for ( var i=length-1 ; i >= 0; i-- ) { - var item = snapshot.snapshotItem(i); - - var id = item.getAttribute('id') || false, - content = item.querySelector("content"), - src = content.getAttribute('src'), - navLabel = item.querySelector("navLabel"), - text = navLabel.textContent ? navLabel.textContent : "", - split = src.split("#"), - baseUrl = split[0], - spinePos = spineIndexByURL[baseUrl], - spineItem = bookSpine[spinePos], - subitems = getTOC(item), - cfi = spineItem ? spineItem.cfi : ''; - - if(!id) { - if(spinePos) { - spineItem = bookSpine[spinePos]; - id = spineItem.id; - cfi = spineItem.cfi; - } else { - id = 'epubjs-autogen-toc-id-' + (idCounter++); - } - } - - list.unshift({ - "id": id, - "href": src, - "label": text, - "spinePos": spinePos, - "subitems" : subitems, - "parent" : parent ? parent.getAttribute('id') : null, - "cfi" : cfi - }); + if(!navPoints || length === 0) return list; + for (i = 0; i < length; ++i) { + item = this.tocItem(navPoints[i], spineIndexByURL, bookSpine); + toc[item.id] = item; + if(!item.parent) { + list.push(item); + } else { + parent = toc[item.parent]; + parent.subitems.push(item); } - - return list; } - return getTOC(navMap); + return list; }; +EPUBJS.Parser.prototype.tocItem = function(item, spineIndexByURL, bookSpine){ + var id = item.getAttribute('id') || false, + content = item.querySelector("content"), + src = content.getAttribute('src'), + navLabel = item.querySelector("navLabel"), + text = navLabel.textContent ? navLabel.textContent : "", + split = src.split("#"), + baseUrl = split[0], + spinePos = spineIndexByURL[baseUrl], + spineItem = bookSpine[spinePos], + subitems = [], + parentNode = item.parentNode, + parent, + cfi = spineItem ? spineItem.cfi : ''; + + if(parentNode && parentNode.nodeName === "navPoint") { + parent = parentNode.getAttribute('id'); + } + + if(!id) { + if(spinePos) { + spineItem = bookSpine[spinePos]; + id = spineItem.id; + cfi = spineItem.cfi; + } else { + id = 'epubjs-autogen-toc-id-' + EPUBJS.core.uuid(); + item.setAttribute('id', id); + } + } + + return { + "id": id, + "href": src, + "label": text, + "spinePos": spinePos, + "subitems" : subitems, + "parent" : parent, + "cfi" : cfi + }; +}; + + EPUBJS.Parser.prototype.pageList = function(navHtml, spineIndexByURL, bookSpine){ - var navEl = navHtml.querySelector('nav[*|type="page-list"]'), - idCounter = 0; + var navElement = this.querySelectorByType(navHtml, "nav", "page-list"); + var navItems = navElement ? navElement.querySelectorAll("ol li") : []; + var length = navItems.length; + var i; + var toc = {}; + var list = []; + var item; - if(!navEl) return []; - - // Implements `> ol > li` - function findListItems(parent){ - var items = []; - - Array.prototype.slice.call(parent.childNodes).forEach(function(node){ - if('ol' == node.tagName){ - Array.prototype.slice.call(node.childNodes).forEach(function(item){ - if('li' == item.tagName){ - items.push(item); - } - }); - } - }); - - return items; - - } - - // Implements `> a, > span` - function findAnchorOrSpan(parent){ - var item = null; - - Array.prototype.slice.call(parent.childNodes).forEach(function(node){ - if('a' == node.tagName || 'span' == node.tagName){ - item = node; - } - }); - - return item; - } - - function getPages(parent){ - var list = [], - nodes = findListItems(parent), - items = Array.prototype.slice.call(nodes), - length = items.length, - node; - - if(length === 0) return false; - - items.forEach(function(item){ - var id = item.getAttribute('id') || false, - content = findAnchorOrSpan(item), - href = content.getAttribute('href') || '', - text = content.textContent || "", - page = parseInt(text), - isCfi = href.indexOf("epubcfi"), - split, - packageUrl, - cfi; - - if(isCfi != -1) { - split = href.split("#"); - packageUrl = split[0]; - cfi = split.length > 1 ? split[1] : false; - list.push({ - "cfi" : cfi, - "href" : href, - "packageUrl" : packageUrl, - "page" : page - }); - } else { - list.push({ - "href" : href, - "page" : page - }); - } + if(!navItems || length === 0) return list; - }); - - return list; + for (i = 0; i < length; ++i) { + item = this.pageListItem(navItems[i], spineIndexByURL, bookSpine); + list.push(item); } - - return getPages(navEl); + + return list; }; +EPUBJS.Parser.prototype.pageListItem = function(item, spineIndexByURL, bookSpine){ + var id = item.getAttribute('id') || false, + content = item.querySelector("a"), + href = content.getAttribute('href') || '', + text = content.textContent || "", + page = parseInt(text), + isCfi = href.indexOf("epubcfi"), + split, + packageUrl, + cfi; + + if(isCfi != -1) { + split = href.split("#"); + packageUrl = split[0]; + cfi = split.length > 1 ? split[1] : false; + return { + "cfi" : cfi, + "href" : href, + "packageUrl" : packageUrl, + "page" : page + }; + } else { + return { + "href" : href, + "page" : page + }; + } +}; EPUBJS.Render.Iframe = function() { this.iframe = null; this.document = null; @@ -5742,74 +5717,107 @@ EPUBJS.Render.Iframe.prototype.create = function(){ this.iframe.seamless = "seamless"; // Back up if seamless isn't supported this.iframe.style.border = "none"; - + this.iframe.addEventListener("load", this.loaded.bind(this), false); + + this.isMobile = navigator.userAgent.match(/(iPad|iPhone|iPod|Mobile|Android)/g); + this.transform = EPUBJS.core.prefixed('transform'); + return this.iframe; }; /** * Sets the source of the iframe with the given URL string -* Takes: URL string +* Takes: Document Contents String * Returns: promise with document element */ -EPUBJS.Render.Iframe.prototype.load = function(chapter){ +EPUBJS.Render.Iframe.prototype.load = function(contents, url){ var render = this, deferred = new RSVP.defer(); - - chapter.url().then(function(url){ + + if(this.window) { + this.unload(); + } + + this.iframe.onload = function(e) { + var title; + + render.document = render.iframe.contentDocument; + render.docEl = render.document.documentElement; + render.headEl = render.document.head; + render.bodyEl = render.document.body || render.document.querySelector("body"); + render.window = render.iframe.contentWindow; + + render.window.addEventListener("resize", render.resized.bind(render), false); + // Reset the scroll position render.leftPos = 0; - - if(this.window) { - this.unload(); + render.setLeft(0); + + //-- Clear Margins + if(render.bodyEl) { + render.bodyEl.style.margin = "0"; } - - this.iframe.onload = function(e) { - render.document = render.iframe.contentDocument; - render.docEl = render.document.documentElement; - render.headEl = render.document.head; - render.bodyEl = render.document.body || render.document.querySelector("body"); - render.window = render.iframe.contentWindow; - - render.window.addEventListener("resize", render.resized.bind(render), false); - - //-- Clear Margins - if(render.bodyEl) { - render.bodyEl.style.margin = "0"; - } - - deferred.resolve(render.docEl); - }; - - this.iframe.onerror = function(e) { - //console.error("Error Loading Contents", e); - deferred.reject({ - message : "Error Loading Contents: " + e, - stack : new Error().stack - }); - }; - - this.iframe.contentWindow.location.replace(url); - - }.bind(this)); - + + // HTML element must have direction set if RTL or columnns will + // not be in the correct direction in Firefox + // Firefox also need the html element to be position right + if(render.direction == "rtl" && render.docEl.dir != "rtl"){ + render.docEl.dir = "rtl"; + render.docEl.style.position = "absolute"; + render.docEl.style.right = "0"; + } + + deferred.resolve(render.docEl); + }; + + this.iframe.onerror = function(e) { + //console.error("Error Loading Contents", e); + deferred.reject({ + message : "Error Loading Contents: " + e, + stack : new Error().stack + }); + }; + + // this.iframe.contentWindow.location.replace(url); + this.document = this.iframe.contentDocument; + + if(!this.document) { + deferred.reject(new Error("No Document Available")); + return deferred; + } + + this.document.open(); + this.document.write(contents); + this.document.close(); + return deferred.promise; }; EPUBJS.Render.Iframe.prototype.loaded = function(v){ var url = this.iframe.contentWindow.location.href; + var baseEl, base; + + this.document = this.iframe.contentDocument; + this.docEl = this.document.documentElement; + this.headEl = this.document.head; + this.bodyEl = this.document.body || this.document.querySelector("body"); + this.window = this.iframe.contentWindow; + if(url != "about:blank"){ - this.trigger("render:loaded", url); + baseEl = this.iframe.contentDocument.querySelector("base"); + base = baseEl.getAttribute('href'); + this.trigger("render:loaded", base); } }; // Resize the iframe to the given width and height EPUBJS.Render.Iframe.prototype.resize = function(width, height){ var iframeBox; - + if(!this.iframe) return; - + this.iframe.height = height; if(!isNaN(width) && width % 2 !== 0){ @@ -5845,11 +5853,30 @@ EPUBJS.Render.Iframe.prototype.setPageDimensions = function(pageWidth, pageHeigh // this.docEl.style.width = this.docEl.scrollWidth + pageWidth + "px"; }; +EPUBJS.Render.Iframe.prototype.setDirection = function(direction){ + + this.direction = direction; + + // Undo previous changes if needed + if(this.docEl && this.docEl.dir == "rtl"){ + this.docEl.dir = "rtl"; + this.docEl.style.position = "static"; + this.docEl.style.right = "auto"; + } + +}; + EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){ // this.bodyEl.style.marginLeft = -leftPos + "px"; // this.docEl.style.marginLeft = -leftPos + "px"; // this.docEl.style[EPUBJS.Render.Iframe.transform] = 'translate('+ (-leftPos) + 'px, 0)'; - this.document.defaultView.scrollTo(leftPos, 0); + + if (this.isMobile) { + this.docEl.style[this.transform] = 'translate('+ (-leftPos) + 'px, 0)'; + } else { + this.document.defaultView.scrollTo(leftPos, 0); + } + }; EPUBJS.Render.Iframe.prototype.setStyle = function(style, val, prefixed){ @@ -5870,7 +5897,7 @@ EPUBJS.Render.Iframe.prototype.addHeadTag = function(tag, attrs, _doc) { var doc = _doc || this.document; var tagEl = doc.createElement(tag); var headEl = doc.head; - + for(var attr in attrs) { tagEl.setAttribute(attr, attrs[attr]); } @@ -5880,6 +5907,12 @@ EPUBJS.Render.Iframe.prototype.addHeadTag = function(tag, attrs, _doc) { EPUBJS.Render.Iframe.prototype.page = function(pg){ this.leftPos = this.pageWidth * (pg-1); //-- pages start at 1 + + // Reverse for rtl langs + if(this.direction === "rtl"){ + this.leftPos = this.leftPos * -1; + } + this.setLeft(this.leftPos); }; @@ -5889,9 +5922,9 @@ EPUBJS.Render.Iframe.prototype.getPageNumberByElement = function(el){ if(!el) return; left = this.leftPos + el.getBoundingClientRect().left; //-- Calculate left offset compaired to scrolled position - + pg = Math.floor(left / this.pageWidth) + 1; //-- pages start at 1 - + return pg; }; @@ -5901,7 +5934,7 @@ EPUBJS.Render.Iframe.prototype.getPageNumberByRect = function(boundingClientRect left = this.leftPos + boundingClientRect.left; //-- Calculate left offset compaired to scrolled position pg = Math.floor(left / this.pageWidth) + 1; //-- pages start at 1 - + return pg; }; @@ -5910,6 +5943,11 @@ EPUBJS.Render.Iframe.prototype.getBaseElement = function(){ return this.bodyEl; }; +// Return the document element +EPUBJS.Render.Iframe.prototype.getDocumentElement = function(){ + return this.docEl; +}; + // Checks if an element is on the screen EPUBJS.Render.Iframe.prototype.isElementVisible = function(el){ var rect; @@ -5941,10 +5979,12 @@ EPUBJS.Render.Iframe.prototype.scroll = function(bool){ // Cleanup event listeners EPUBJS.Render.Iframe.prototype.unload = function(){ this.window.removeEventListener("resize", this.resized); + this.window.location.reload(); }; //-- Enable binding events to Render RSVP.EventTarget.mixin(EPUBJS.Render.Iframe.prototype); + EPUBJS.Renderer = function(renderMethod, hidden) { // Dom events to listen for this.listenedEvents = ["keydown", "keyup", "keypressed", "mouseup", "mousedown", "click"]; @@ -5976,7 +6016,7 @@ EPUBJS.Renderer = function(renderMethod, hidden) { this.spreads = true; this.isForcedSingle = false; - this.resized = _.debounce(this.onResized.bind(this), 100); + this.resized = this.onResized.bind(this); this.layoutSettings = {}; @@ -5989,7 +6029,7 @@ EPUBJS.Renderer = function(renderMethod, hidden) { //-- Queue up page changes if page map isn't ready this._q = EPUBJS.core.queue(this); - + this._moving = false; }; @@ -6034,7 +6074,7 @@ EPUBJS.Renderer.prototype.initialize = function(element, width, height){ } else { this.render.resize('100%', '100%'); } - + document.addEventListener("orientationchange", this.onResized); }; @@ -6051,17 +6091,17 @@ EPUBJS.Renderer.prototype.displayChapter = function(chapter, globalLayout){ } this._moving = true; // Get the url string from the chapter (may be from storage) - return chapter.url(). - then(function(url) { - + return chapter.render(). + then(function(contents) { + // Unload the previous chapter listener if(this.currentChapter) { this.currentChapter.unload(); // Remove stored blobs - + if(this.render.window){ this.render.window.removeEventListener("resize", this.resized); } - + this.removeEventListeners(); this.removeSelectionListeners(); this.trigger("renderer:chapterUnloaded"); @@ -6069,13 +6109,16 @@ EPUBJS.Renderer.prototype.displayChapter = function(chapter, globalLayout){ this.doc = null; this.pageMap = null; } - + this.currentChapter = chapter; + this.chapterPos = 1; + this.currentChapterCfiBase = chapter.cfiBase; this.layoutSettings = this.reconcileLayoutSettings(globalLayout, chapter.properties); - return this.load(chapter); + + return this.load(contents, chapter.href); }.bind(this)); @@ -6087,7 +6130,7 @@ EPUBJS.Renderer.prototype.displayChapter = function(chapter, globalLayout){ * Returns: Promise with the rendered contents. */ -EPUBJS.Renderer.prototype.load = function(url){ +EPUBJS.Renderer.prototype.load = function(contents, url){ var deferred = new RSVP.defer(); var loaded; @@ -6097,49 +6140,22 @@ EPUBJS.Renderer.prototype.load = function(url){ this.visible(false); - render = this.render.load(url); + render = this.render.load(contents, url); render.then(function(contents) { - var formated; - this.currentChapter.setDocument(this.render.document); - this.contents = contents; - this.doc = this.render.document; - // Format the contents using the current layout method - this.formated = this.layout.format(contents, this.render.width, this.render.height, this.gap); - this.render.setPageDimensions(this.formated.pageWidth, this.formated.pageHeight); - - // window.addEventListener("orientationchange", this.onResized.bind(this), false); - if(!this.initWidth && !this.initHeight){ - this.render.window.addEventListener("resize", this.resized, false); - } - - this.addEventListeners(); - this.addSelectionListeners(); + this.afterLoad(contents); //-- Trigger registered hooks before displaying this.beforeDisplay(function(){ - var pages = this.layout.calculatePages(); - var msg = this.currentChapter; - var queued = this._q.length(); - this._moving = false; - this.updatePages(pages); - - this.visibleRangeCfi = this.getVisibleRangeCfi(); - this.currentLocationCfi = this.visibleRangeCfi.start; + this.afterDisplay(); - if(queued === 0) { - this.trigger("renderer:locationChanged", this.currentLocationCfi); - this.trigger("renderer:visibleRangeChanged", this.visibleRangeCfi); - } - - msg.cfi = this.currentLocationCfi; //TODO: why is this cfi passed to chapterDisplayed - this.trigger("renderer:chapterDisplayed", msg); - this.visible(true); - + + deferred.resolve(this); //-- why does this return the renderer? + }.bind(this)); }.bind(this)); @@ -6147,6 +6163,48 @@ EPUBJS.Renderer.prototype.load = function(url){ return deferred.promise; }; +EPUBJS.Renderer.prototype.afterLoad = function(contents) { + var formated; + this.currentChapter.setDocument(this.render.document); + this.contents = contents; + this.doc = this.render.document; + + // Format the contents using the current layout method + this.formated = this.layout.format(contents, this.render.width, this.render.height, this.gap); + this.render.setPageDimensions(this.formated.pageWidth, this.formated.pageHeight); + + // window.addEventListener("orientationchange", this.onResized.bind(this), false); + if(!this.initWidth && !this.initHeight){ + this.render.window.addEventListener("resize", this.resized, false); + } + + this.addEventListeners(); + this.addSelectionListeners(); + +}; + +EPUBJS.Renderer.prototype.afterDisplay = function(contents) { + + var pages = this.layout.calculatePages(); + var msg = this.currentChapter; + var queued = this._q.length(); + this._moving = false; + + this.updatePages(pages); + + this.visibleRangeCfi = this.getVisibleRangeCfi(); + this.currentLocationCfi = this.visibleRangeCfi.start; + + if(queued === 0) { + this.trigger("renderer:locationChanged", this.currentLocationCfi); + this.trigger("renderer:visibleRangeChanged", this.visibleRangeCfi); + } + + msg.cfi = this.currentLocationCfi; //TODO: why is this cfi passed to chapterDisplayed + this.trigger("renderer:chapterDisplayed", msg); + +}; + EPUBJS.Renderer.prototype.loaded = function(url){ this.trigger("render:loaded", url); // var uri = EPUBJS.core.uri(url); @@ -6236,10 +6294,10 @@ EPUBJS.Renderer.prototype.updatePages = function(layout){ } else { this.displayedPages = this.pageMap.length; } - + // this.currentChapter.pages = layout.pageCount; this.currentChapter.pages = this.pageMap.length; - + this._q.flush(); }; @@ -6257,18 +6315,17 @@ EPUBJS.Renderer.prototype.reformat = function(){ this.layoutMethod = this.determineLayout(this.layoutSettings); this.layout = new EPUBJS.Layout[this.layoutMethod](); } - + // Reset pages this.chapterPos = 1; - this.render.page(1); + this.render.page(this.chapterPos); // Give the css styles time to update // clearTimeout(this.timeoutTillCfi); // this.timeoutTillCfi = setTimeout(function(){ - - renderer.formated = renderer.layout.format(renderer.contents, renderer.render.width, renderer.render.height, renderer.gap); + renderer.formated = renderer.layout.format(renderer.render.docEl, renderer.render.width, renderer.render.height, renderer.gap); renderer.render.setPageDimensions(renderer.formated.pageWidth, renderer.formated.pageHeight); - + pages = renderer.layout.calculatePages(); renderer.updatePages(pages); @@ -6392,12 +6449,16 @@ EPUBJS.Renderer.prototype.lastPage = function(){ if(this._moving) { return this._q.enqueue("lastPage", arguments); } - + this.page(this.displayedPages); }; // Jump to the first page of the chapter EPUBJS.Renderer.prototype.firstPage = function(){ + if(this._moving) { + return this._q.enqueue("firstPage", arguments); + } + this.page(1); }; @@ -6425,6 +6486,15 @@ EPUBJS.Renderer.prototype.firstElementisTextNode = function(node) { return false; }; +EPUBJS.Renderer.prototype.isGoodNode = function(node) { + var embeddedElements = ["audio", "canvas", "embed", "iframe", "img", "math", "object", "svg", "video"]; + if (embeddedElements.indexOf(node.tagName.toLowerCase()) !== -1) { + // Embedded elements usually do not have a text node as first element, but are also good nodes + return true; + } + return this.firstElementisTextNode(node); +}; + // Walk the node tree from a start element to next visible element EPUBJS.Renderer.prototype.walk = function(node, x, y) { var r, children, leng, @@ -6436,7 +6506,7 @@ EPUBJS.Renderer.prototype.walk = function(node, x, y) { while(!r && stack.length) { node = stack.shift(); - if( this.containsPoint(node, x, y) && this.firstElementisTextNode(node)) { + if( this.containsPoint(node, x, y) && this.isGoodNode(node)) { r = node; } @@ -6539,7 +6609,7 @@ EPUBJS.Renderer.prototype.mapPage = function(){ if(!elPos || (elPos.width === 0 && elPos.height === 0)) { return; } - + //-- Element starts new Col if(elPos.left > elLimit) { children.forEach(function(node){ @@ -6549,7 +6619,7 @@ EPUBJS.Renderer.prototype.mapPage = function(){ } }); } - + //-- Element Spans new Col if(elPos.right > elLimit) { children.forEach(function(node){ @@ -6590,7 +6660,7 @@ EPUBJS.Renderer.prototype.mapPage = function(){ start: cfi, end: null }); - + page += 1; limit = (width * page) - offset; elLimit = limit; @@ -6601,8 +6671,24 @@ EPUBJS.Renderer.prototype.mapPage = function(){ }; + var docEl = this.render.getDocumentElement(); + var dir = docEl.dir; + + // Set back to ltr before sprinting to get correct order + if(dir == "rtl") { + docEl.dir = "ltr"; + docEl.style.position = "static"; + } this.sprint(root, check); + + // Reset back to previous RTL settings + if(dir == "rtl") { + docEl.dir = dir; + docEl.style.left = "auto"; + docEl.style.right = "0"; + } + // this.textSprint(root, checkText); if(prevRange){ @@ -6619,7 +6705,7 @@ EPUBJS.Renderer.prototype.mapPage = function(){ range.collapse(true); cfi = renderer.currentChapter.cfiFromRange(range); - + map.push({ start: cfi, end: cfi }); } @@ -6638,17 +6724,17 @@ EPUBJS.Renderer.prototype.indexOfBreakableChar = function (text, startPosition) var whiteCharacters = "\x2D\x20\t\r\n\b\f"; // '-' \x2D // ' ' \x20 - + if (! startPosition) { startPosition = 0; } - + for (var i = startPosition; i < text.length; i++) { if (whiteCharacters.indexOf(text.charAt(i)) != -1) { return i; } } - + return -1; }; @@ -6660,7 +6746,7 @@ EPUBJS.Renderer.prototype.splitTextNodeIntoWordsRanges = function(node){ var rect; var list; // jaroslaw.bielski@7bulls.com - // Usage of indexOf() function for space character as word delimiter + // Usage of indexOf() function for space character as word delimiter // is not sufficient in case of other breakable characters like \r\n- etc pos = this.indexOfBreakableChar(text); @@ -6741,15 +6827,8 @@ EPUBJS.Renderer.prototype.getPageCfi = function(prevEl){ // Get the cfi of the current page EPUBJS.Renderer.prototype.getPageCfi = function(){ - var pg; - if (this.spreads) { - pg = this.chapterPos*2; - startRange = this.pageMap[pg-2]; - } else { - pg = this.chapterPos; - startRange = this.pageMap[pg-1]; - } - return this.pageMap[(this.chapterPos * 2) -1].start; + var pg = (this.chapterPos * 2)-1; + return this.pageMap[pg].start; }; EPUBJS.Renderer.prototype.getRange = function(x, y, forceElement){ @@ -6896,12 +6975,12 @@ EPUBJS.Renderer.prototype.gotoCfi = function(cfi){ var pg; var marker; var range; - + if(this._moving){ return this._q.enqueue("gotoCfi", arguments); } - - if(_.isString(cfi)){ + + if(EPUBJS.core.isString(cfi)){ cfi = this.epubcfi.parse(cfi); } @@ -6924,16 +7003,19 @@ EPUBJS.Renderer.prototype.gotoCfi = function(cfi){ var rect = range.getBoundingClientRect(); if (rect) { pg = this.render.getPageNumberByRect(rect); - - } else { + + } else { // Goto first page in chapter pg = 1; } this.page(pg); - + // Reset the current location cfi to requested cfi this.currentLocationCfi = cfi.str; + } else { + // Failed to find a range, go to first page + this.page(1); } } }; @@ -7091,6 +7173,11 @@ EPUBJS.Renderer.prototype.setGap = function(gap){ this.gap = gap; //-- False == auto gap }; +EPUBJS.Renderer.prototype.setDirection = function(direction){ + this.direction = direction; + this.render.setDirection(this.direction); +}; + //-- Content Replacements EPUBJS.Renderer.prototype.replace = function(query, func, finished, progress){ @@ -7120,80 +7207,6 @@ EPUBJS.Renderer.prototype.replace = function(query, func, finished, progress){ }; -EPUBJS.Renderer.prototype.replaceWithStored = function(query, attr, func, callback) { - var _oldUrls, - _newUrls = {}, - _store = this.currentChapter.store, - _cache = this.caches[query], - _uri = EPUBJS.core.uri(this.currentChapter.absolute), - _chapterBase = _uri.base, - _attr = attr, - _wait = 2000, - progress = function(url, full, count) { - _newUrls[full] = url; - }, - finished = function(notempty) { - if(callback) callback(); - - _.each(_oldUrls, function(url){ - _store.revokeUrl(url); - }); - - _cache = _newUrls; - }; - - if(!_store) return; - - if(!_cache) _cache = {}; - _oldUrls = _.clone(_cache); - - this.replace(query, function(link, done){ - var src = link.getAttribute(_attr), - full = EPUBJS.core.resolveUrl(_chapterBase, src); - - var replaceUrl = function(url) { - var timeout; - link.onload = function(){ - clearTimeout(timeout); - done(url, full); - }; - - link.onerror = function(e){ - clearTimeout(timeout); - done(url, full); - console.error(e); - }; - - if(query == "image") { - //-- SVG needs this to trigger a load event - link.setAttribute("externalResourcesRequired", "true"); - } - - if(query == "link[href]" && link.getAttribute("rel") !== "stylesheet") { - //-- Only Stylesheet links seem to have a load events, just continue others - done(url, full); - } - - link.setAttribute(_attr, url); - - //-- If elements never fire Load Event, should continue anyways - timeout = setTimeout(function(){ - done(url, full); - }, _wait); - - }; - - if(full in _oldUrls){ - replaceUrl(_oldUrls[full]); - _newUrls[full] = _oldUrls[full]; - delete _oldUrls[full]; - }else{ - func(_store, full, replaceUrl, link); - } - - }, finished, progress); -}; - //-- Enable binding events to Renderer RSVP.EventTarget.mixin(EPUBJS.Renderer.prototype); @@ -7208,7 +7221,10 @@ EPUBJS.replace.hrefs = function(callback, renderer){ isRelative = href.search("://"), directory, relative, - location; + location, + base, + uri, + url; if(isRelative != -1){ @@ -7216,9 +7232,21 @@ EPUBJS.replace.hrefs = function(callback, renderer){ }else{ // Links may need to be resolved, such as ../chp1.xhtml - directory = EPUBJS.core.uri(renderer.render.window.location.href).directory; + base = renderer.render.docEl.querySelector('base'); + url = base.getAttribute("href"); + uri = EPUBJS.core.uri(url); + directory = uri.directory; + if(directory) { - relative = EPUBJS.core.resolveUrl(directory, href); + // We must ensure that the file:// protocol is preserved for + // local file links, as in certain contexts (such as under + // Titanium), file links without the file:// protocol will not + // work + if (uri.protocol === "file") { + relative = EPUBJS.core.resolveUrl(uri.base, href); + } else { + relative = EPUBJS.core.resolveUrl(directory, href); + } } else { relative = href; } @@ -7232,7 +7260,7 @@ EPUBJS.replace.hrefs = function(callback, renderer){ done(); }; - + renderer.replace("a[href]", replacments, callback); }; @@ -7252,8 +7280,8 @@ EPUBJS.replace.resources = function(callback, renderer){ }; EPUBJS.replace.svg = function(callback, renderer) { - - renderer.replaceWithStored("image", "xlink:href", function(_store, full, done){ + + renderer.replaceWithStored("svg image", "xlink:href", function(_store, full, done){ _store.getUrl(full).then(done); }, callback); @@ -7262,7 +7290,7 @@ EPUBJS.replace.svg = function(callback, renderer) { EPUBJS.replace.srcs = function(_store, full, done){ _store.getUrl(full).then(done); - + }; //-- Replaces links in head, such as stylesheets - link[href] @@ -7271,12 +7299,16 @@ EPUBJS.replace.links = function(_store, full, done, link){ if(link.getAttribute("rel") === "stylesheet") { EPUBJS.replace.stylesheets(_store, full).then(function(url, full){ // done - setTimeout(function(){ - done(url, full); - }, 5); //-- Allow for css to apply before displaying chapter + done(url, full); + }, function(reason) { + // we were unable to replace the style sheets + done(null); }); }else{ - _store.getUrl(full).then(done); + _store.getUrl(full).then(done, function(reason) { + // we were unable to get the url, signal to upper layer + done(null); + }); } }; @@ -7296,10 +7328,12 @@ EPUBJS.replace.stylesheets = function(_store, full) { deferred.resolve(url); - }, function(e) { - console.error(e); + }, function(reason) { + deferred.reject(reason); }); - + + }, function(reason) { + deferred.reject(reason); }); return deferred.promise; @@ -7308,8 +7342,8 @@ EPUBJS.replace.stylesheets = function(_store, full) { EPUBJS.replace.cssUrls = function(_store, base, text){ var deferred = new RSVP.defer(), promises = [], - matches = text.match(/url\(\'?\"?([^\'|^\"^\)]*)\'?\"?\)/g); - + matches = text.match(/url\(\'?\"?((?!data:)[^\'|^\"^\)]*)\'?\"?\)/g); + if(!_store) return; if(!matches){ @@ -7318,49 +7352,312 @@ EPUBJS.replace.cssUrls = function(_store, base, text){ } matches.forEach(function(str){ - var full = EPUBJS.core.resolveUrl(base, str.replace(/url\(|[|\)|\'|\"]/g, '')); + var full = EPUBJS.core.resolveUrl(base, str.replace(/url\(|[|\)|\'|\"]|\?.*$/g, '')); var replaced = _store.getUrl(full).then(function(url){ - text = text.replace(str, 'url("'+url+'")'); - }); - + text = text.replace(str, 'url("'+url+'")'); + }, function(reason) { + deferred.reject(reason); + }); + promises.push(replaced); }); - + RSVP.all(promises).then(function(){ deferred.resolve(text); }); - + return deferred.promise; }; +EPUBJS.Storage = function(withCredentials){ + + this.checkRequirements(); + this.urlCache = {}; + this.withCredentials = withCredentials; + this.URL = window.URL || window.webkitURL || window.mozURL; + this.offline = false; +}; + +//-- Load the zip lib and set the workerScriptsPath +EPUBJS.Storage.prototype.checkRequirements = function(callback){ + if(typeof(localforage) == "undefined") console.error("localForage library not loaded"); +}; + +EPUBJS.Storage.prototype.put = function(assets, store) { + var deferred = new RSVP.defer(); + var count = assets.length; + var current = 0; + var next = function(deferred){ + var done = deferred || new RSVP.defer(); + var url; + var encodedUrl; + + if(current >= count) { + done.resolve(); + } else { + url = assets[current].url; + encodedUrl = window.encodeURIComponent(url); + + EPUBJS.core.request(url, "binary") + .then(function (data) { + return localforage.setItem(encodedUrl, data); + }) + .then(function(data){ + current++; + // Load up the next + setTimeout(function(){ + next(done); + }, 1); + + }); + } + return done.promise; + }.bind(this); + + if(!Array.isArray(assets)) { + assets = [assets]; + } + + next().then(function(){ + deferred.resolve(); + }.bind(this)); + + return deferred.promise; +}; + +EPUBJS.Storage.prototype.token = function(url, value){ + var encodedUrl = window.encodeURIComponent(url); + return localforage.setItem(encodedUrl, value) + .then(function (result) { + if (result === null) { + return false; + } else { + return true; + } + }); +}; + +EPUBJS.Storage.prototype.isStored = function(url){ + var encodedUrl = window.encodeURIComponent(url); + return localforage.getItem(encodedUrl) + .then(function (result) { + if (result === null) { + return false; + } else { + return true; + } + }); +}; + +EPUBJS.Storage.prototype.getText = function(url){ + var encodedUrl = window.encodeURIComponent(url); + + return EPUBJS.core.request(url, 'arraybuffer', this.withCredentials) + .then(function(buffer){ + + if(this.offline){ + this.offline = false; + this.trigger("offline", false); + } + localforage.setItem(encodedUrl, buffer); + return buffer; + }.bind(this)) + .then(function(data) { + var deferred = new RSVP.defer(); + var mimeType = EPUBJS.core.getMimeType(url); + var blob = new Blob([data], {type : mimeType}); + var reader = new FileReader(); + reader.addEventListener("loadend", function() { + deferred.resolve(reader.result); + }); + reader.readAsText(blob, mimeType); + return deferred.promise; + }) + .catch(function() { + + var deferred = new RSVP.defer(); + var entry = localforage.getItem(encodedUrl); + + if(!this.offline){ + this.offline = true; + this.trigger("offline", true); + } + + if(!entry) { + deferred.reject({ + message : "File not found in the storage: " + url, + stack : new Error().stack + }); + return deferred.promise; + } + + entry.then(function(data) { + var mimeType = EPUBJS.core.getMimeType(url); + var blob = new Blob([data], {type : mimeType}); + var reader = new FileReader(); + reader.addEventListener("loadend", function() { + deferred.resolve(reader.result); + }); + reader.readAsText(blob, mimeType); + }); + + return deferred.promise; + }.bind(this)); +}; + +EPUBJS.Storage.prototype.getUrl = function(url){ + var encodedUrl = window.encodeURIComponent(url); + + return EPUBJS.core.request(url, 'arraybuffer', this.withCredentials) + .then(function(buffer){ + if(this.offline){ + this.offline = false; + this.trigger("offline", false); + } + localforage.setItem(encodedUrl, buffer); + return url; + }.bind(this)) + .catch(function() { + var deferred = new RSVP.defer(); + var entry; + var _URL = window.URL || window.webkitURL || window.mozURL; + var tempUrl; + + if(!this.offline){ + this.offline = true; + this.trigger("offline", true); + } + + if(encodedUrl in this.urlCache) { + deferred.resolve(this.urlCache[encodedUrl]); + return deferred.promise; + } + + entry = localforage.getItem(encodedUrl); + + if(!entry) { + deferred.reject({ + message : "File not found in the storage: " + url, + stack : new Error().stack + }); + return deferred.promise; + } + + entry.then(function(data) { + var blob = new Blob([data], {type : EPUBJS.core.getMimeType(url)}); + tempUrl = _URL.createObjectURL(blob); + deferred.resolve(tempUrl); + this.urlCache[encodedUrl] = tempUrl; + }.bind(this)); + + + return deferred.promise; + }.bind(this)); +}; + +EPUBJS.Storage.prototype.getXml = function(url){ + var encodedUrl = window.encodeURIComponent(url); + + return EPUBJS.core.request(url, 'arraybuffer', this.withCredentials) + .then(function(buffer){ + if(this.offline){ + this.offline = false; + this.trigger("offline", false); + } + localforage.setItem(encodedUrl, buffer); + return buffer; + }.bind(this)) + .then(function(data) { + var deferred = new RSVP.defer(); + var mimeType = EPUBJS.core.getMimeType(url); + var blob = new Blob([data], {type : mimeType}); + var reader = new FileReader(); + reader.addEventListener("loadend", function() { + var parser = new DOMParser(); + var doc = parser.parseFromString(reader.result, "text/xml"); + deferred.resolve(doc); + }); + reader.readAsText(blob, mimeType); + return deferred.promise; + }) + .catch(function() { + var deferred = new RSVP.defer(); + var entry = localforage.getItem(encodedUrl); + + if(!this.offline){ + this.offline = true; + this.trigger("offline", true); + } + + if(!entry) { + deferred.reject({ + message : "File not found in the storage: " + url, + stack : new Error().stack + }); + return deferred.promise; + } + + entry.then(function(data) { + var mimeType = EPUBJS.core.getMimeType(url); + var blob = new Blob([data], {type : mimeType}); + var reader = new FileReader(); + reader.addEventListener("loadend", function() { + var parser = new DOMParser(); + var doc = parser.parseFromString(reader.result, "text/xml"); + deferred.resolve(doc); + }); + reader.readAsText(blob, mimeType); + }); + + return deferred.promise; + }.bind(this)); +}; + +EPUBJS.Storage.prototype.revokeUrl = function(url){ + var _URL = window.URL || window.webkitURL || window.mozURL; + var fromCache = this.urlCache[url]; + if(fromCache) _URL.revokeObjectURL(fromCache); +}; + +EPUBJS.Storage.prototype.failed = function(error){ + console.error(error); +}; + +RSVP.EventTarget.mixin(EPUBJS.Storage.prototype); EPUBJS.Unarchiver = function(url){ - - this.loadLib(); + + this.checkRequirements(); this.urlCache = {}; }; //-- Load the zip lib and set the workerScriptsPath -EPUBJS.Unarchiver.prototype.loadLib = function(callback){ +EPUBJS.Unarchiver.prototype.checkRequirements = function(callback){ if(typeof(JSZip) == "undefined") console.error("JSZip lib not loaded"); }; -EPUBJS.Unarchiver.prototype.openZip = function(zipUrl, callback){ - var deferred = new RSVP.defer(); - - return EPUBJS.core.request(zipUrl, "binary").then(function(data){ - this.zip = new JSZip(data); - }.bind(this)); +EPUBJS.Unarchiver.prototype.open = function(zipUrl, callback){ + if (zipUrl instanceof ArrayBuffer) { + this.zip = new JSZip(zipUrl); + var deferred = new RSVP.defer(); + deferred.resolve(); + return deferred.promise; + } else { + return EPUBJS.core.request(zipUrl, "binary").then(function(data){ + this.zip = new JSZip(data); + }.bind(this)); + } }; EPUBJS.Unarchiver.prototype.getXml = function(url, encoding){ - - return this.getText(url, encoding). + var decodededUrl = window.decodeURIComponent(url); + return this.getText(decodededUrl, encoding). then(function(text){ var parser = new DOMParser(); - return parser.parseFromString(text, "text/xml"); + var mimeType = EPUBJS.core.getMimeType(url); + return parser.parseFromString(text, mimeType); }); }; @@ -7372,6 +7669,7 @@ EPUBJS.Unarchiver.prototype.getUrl = function(url, mime){ var entry = this.zip.file(decodededUrl); var _URL = window.URL || window.webkitURL || window.mozURL; var tempUrl; + var blob; if(!entry) { deferred.reject({ @@ -7380,13 +7678,13 @@ EPUBJS.Unarchiver.prototype.getUrl = function(url, mime){ }); return deferred.promise; } - + if(url in this.urlCache) { deferred.resolve(this.urlCache[url]); return deferred.promise; } - blob = new Blob([entry.asUint8Array()], {type : mime || this.zip.getMimeType(entry.name)}); + blob = new Blob([entry.asUint8Array()], {type : EPUBJS.core.getMimeType(entry.name)}); tempUrl = _URL.createObjectURL(blob); deferred.resolve(tempUrl); @@ -7400,10 +7698,13 @@ EPUBJS.Unarchiver.prototype.getText = function(url, encoding){ var deferred = new RSVP.defer(); var decodededUrl = window.decodeURIComponent(url); var entry = this.zip.file(decodededUrl); - var _URL = window.URL || window.webkitURL || window.mozURL; + var text; if(!entry) { - console.warn("File not found in the contained epub:", url); + deferred.reject({ + message : "File not found in the epub: " + url, + stack : new Error().stack + }); return deferred.promise; } @@ -7415,7 +7716,7 @@ EPUBJS.Unarchiver.prototype.getText = function(url, encoding){ EPUBJS.Unarchiver.prototype.revokeUrl = function(url){ var _URL = window.URL || window.webkitURL || window.mozURL; - var fromCache = unarchiver.urlCache[url]; + var fromCache = this.urlCache[url]; if(fromCache) _URL.revokeObjectURL(fromCache); }; @@ -7437,18 +7738,18 @@ EPUBJS.Unarchiver.prototype.toStorage = function(entries){ count--; if(count === 0) that.afterSaved(); } - + entries.forEach(function(entry){ - + setTimeout(function(entry){ that.saveEntryFileToStorage(entry, callback); }, timeout, entry); - + timeout += delay; }); - + console.log("time", timeout); - + //entries.forEach(this.saveEntryFileToStorage.bind(this)); }; @@ -7459,4 +7760,203 @@ EPUBJS.Unarchiver.prototype.toStorage = function(entries){ // }); // }; +/* + From Zip.js, by Gildas Lormeau + */ + +(function() { + "use strict"; + var table = { + "application" : { + "ecmascript" : [ "es", "ecma" ], + "javascript" : "js", + "ogg" : "ogx", + "pdf" : "pdf", + "postscript" : [ "ps", "ai", "eps", "epsi", "epsf", "eps2", "eps3" ], + "rdf+xml" : "rdf", + "smil" : [ "smi", "smil" ], + "xhtml+xml" : [ "xhtml", "xht" ], + "xml" : [ "xml", "xsl", "xsd", "opf" ], + "zip" : "zip", + "x-httpd-eruby" : "rhtml", + "x-latex" : "latex", + "x-maker" : [ "frm", "maker", "frame", "fm", "fb", "book", "fbdoc" ], + "x-object" : "o", + "x-shockwave-flash" : [ "swf", "swfl" ], + "x-silverlight" : "scr", + "epub+zip" : "epub", + "font-tdpfr" : "pfr", + "inkml+xml" : [ "ink", "inkml" ], + "json" : "json", + "jsonml+json" : "jsonml", + "mathml+xml" : "mathml", + "metalink+xml" : "metalink", + "mp4" : "mp4s", + // "oebps-package+xml" : "opf", + "omdoc+xml" : "omdoc", + "oxps" : "oxps", + "vnd.amazon.ebook" : "azw", + "widget" : "wgt", + "x-dtbncx+xml" : "ncx", + "x-dtbook+xml" : "dtb", + "x-dtbresource+xml" : "res", + "x-font-bdf" : "bdf", + "x-font-ghostscript" : "gsf", + "x-font-linux-psf" : "psf", + "x-font-otf" : "otf", + "x-font-pcf" : "pcf", + "x-font-snf" : "snf", + "x-font-ttf" : [ "ttf", "ttc" ], + "x-font-type1" : [ "pfa", "pfb", "pfm", "afm" ], + "x-font-woff" : "woff", + "x-mobipocket-ebook" : [ "prc", "mobi" ], + "x-mspublisher" : "pub", + "x-nzb" : "nzb", + "x-tgif" : "obj", + "xaml+xml" : "xaml", + "xml-dtd" : "dtd", + "xproc+xml" : "xpl", + "xslt+xml" : "xslt", + "internet-property-stream" : "acx", + "x-compress" : "z", + "x-compressed" : "tgz", + "x-gzip" : "gz", + }, + "audio" : { + "flac" : "flac", + "midi" : [ "mid", "midi", "kar", "rmi" ], + "mpeg" : [ "mpga", "mpega", "mp2", "mp3", "m4a", "mp2a", "m2a", "m3a" ], + "mpegurl" : "m3u", + "ogg" : [ "oga", "ogg", "spx" ], + "x-aiff" : [ "aif", "aiff", "aifc" ], + "x-ms-wma" : "wma", + "x-wav" : "wav", + "adpcm" : "adp", + "mp4" : "mp4a", + "webm" : "weba", + "x-aac" : "aac", + "x-caf" : "caf", + "x-matroska" : "mka", + "x-pn-realaudio-plugin" : "rmp", + "xm" : "xm", + "mid" : [ "mid", "rmi" ] + }, + "image" : { + "gif" : "gif", + "ief" : "ief", + "jpeg" : [ "jpeg", "jpg", "jpe" ], + "pcx" : "pcx", + "png" : "png", + "svg+xml" : [ "svg", "svgz" ], + "tiff" : [ "tiff", "tif" ], + "x-icon" : "ico", + "bmp" : "bmp", + "webp" : "webp", + "x-pict" : [ "pic", "pct" ], + "x-tga" : "tga", + "cis-cod" : "cod", + }, + "message" : { + "rfc822" : [ "eml", "mime", "mht", "mhtml", "nws" ] + }, + "text" : { + "cache-manifest" : [ "manifest", "appcache" ], + "calendar" : [ "ics", "icz", "ifb" ], + "css" : "css", + "csv" : "csv", + "h323" : "323", + "html" : [ "html", "htm", "shtml", "stm" ], + "iuls" : "uls", + "mathml" : "mml", + "plain" : [ "txt", "text", "brf", "conf", "def", "list", "log", "in", "bas" ], + "richtext" : "rtx", + "tab-separated-values" : "tsv", + "x-bibtex" : "bib", + "x-dsrc" : "d", + "x-diff" : [ "diff", "patch" ], + "x-haskell" : "hs", + "x-java" : "java", + "x-literate-haskell" : "lhs", + "x-moc" : "moc", + "x-pascal" : [ "p", "pas" ], + "x-pcs-gcd" : "gcd", + "x-perl" : [ "pl", "pm" ], + "x-python" : "py", + "x-scala" : "scala", + "x-setext" : "etx", + "x-tcl" : [ "tcl", "tk" ], + "x-tex" : [ "tex", "ltx", "sty", "cls" ], + "x-vcard" : "vcf", + "sgml" : [ "sgml", "sgm" ], + "x-c" : [ "c", "cc", "cxx", "cpp", "h", "hh", "dic" ], + "x-fortran" : [ "f", "for", "f77", "f90" ], + "x-opml" : "opml", + "x-nfo" : "nfo", + "x-sfv" : "sfv", + "x-uuencode" : "uu", + "webviewhtml" : "htt" + }, + "video" : { + "mpeg" : [ "mpeg", "mpg", "mpe", "m1v", "m2v", "mp2", "mpa", "mpv2" ], + "mp4" : [ "mp4", "mp4v", "mpg4" ], + "quicktime" : [ "qt", "mov" ], + "ogg" : "ogv", + "vnd.mpegurl" : [ "mxu", "m4u" ], + "x-flv" : "flv", + "x-la-asf" : [ "lsf", "lsx" ], + "x-mng" : "mng", + "x-ms-asf" : [ "asf", "asx", "asr" ], + "x-ms-wm" : "wm", + "x-ms-wmv" : "wmv", + "x-ms-wmx" : "wmx", + "x-ms-wvx" : "wvx", + "x-msvideo" : "avi", + "x-sgi-movie" : "movie", + "x-matroska" : [ "mpv", "mkv", "mk3d", "mks" ], + "3gpp2" : "3g2", + "h261" : "h261", + "h263" : "h263", + "h264" : "h264", + "jpeg" : "jpgv", + "jpm" : [ "jpm", "jpgm" ], + "mj2" : [ "mj2", "mjp2" ], + "vnd.ms-playready.media.pyv" : "pyv", + "vnd.uvvu.mp4" : [ "uvu", "uvvu" ], + "vnd.vivo" : "viv", + "webm" : "webm", + "x-f4v" : "f4v", + "x-m4v" : "m4v", + "x-ms-vob" : "vob", + "x-smv" : "smv" + } + }; + + var mimeTypes = (function() { + var type, subtype, val, index, mimeTypes = {}; + for (type in table) { + if (table.hasOwnProperty(type)) { + for (subtype in table[type]) { + if (table[type].hasOwnProperty(subtype)) { + val = table[type][subtype]; + if (typeof val == "string") { + mimeTypes[val] = type + "/" + subtype; + } else { + for (index = 0; index < val.length; index++) { + mimeTypes[val[index]] = type + "/" + subtype; + } + } + } + } + } + } + return mimeTypes; + })(); + + EPUBJS.core.getMimeType = function(filename) { + var defaultValue = "text/plain";//"application/octet-stream"; + return filename && mimeTypes[filename.split(".").pop().toLowerCase()] || defaultValue; + }; + +})(); + //# sourceMappingURL=epub.js.map \ No newline at end of file diff --git a/epub.js/epub.js.map b/epub.js/epub.js.map index dd40312..fe9b197 100644 --- a/epub.js/epub.js.map +++ b/epub.js/epub.js.map @@ -1 +1,26 @@ -{"version":3,"file":"epub.min.js","sources":["epub.js"],"names":["n","this","t","_","r","e","Array","prototype","u","Object","i","Function","a","push","o","slice","c","concat","l","toString","f","hasOwnProperty","s","forEach","p","map","h","reduce","v","reduceRight","d","filter","g","every","m","some","y","indexOf","b","lastIndexOf","x","isArray","keys","j","bind","w","_wrapped","exports","module","VERSION","A","each","length","call","has","collect","O","foldl","inject","arguments","TypeError","foldr","find","detect","E","select","reject","all","identity","any","contains","include","invoke","isFunction","apply","pluck","where","isEmpty","findWhere","max","Math","computed","value","min","shuffle","random","k","sortBy","index","criteria","sort","F","groupBy","countBy","sortedIndex","toArray","values","size","first","head","take","initial","last","rest","tail","drop","compact","R","flatten","without","difference","uniq","unique","union","intersection","zip","object","range","ceil","partial","bindAll","functions","memoize","delay","setTimeout","defer","throttle","Date","clearTimeout","debounce","once","wrap","compose","after","pairs","invert","methods","extend","pick","omit","defaults","clone","isObject","tap","I","source","global","multiline","ignoreCase","constructor","pop","isEqual","isString","isElement","nodeType","isArguments","isFinite","isNaN","parseFloat","isNumber","isBoolean","isNull","isUndefined","noConflict","times","floor","M","escape","&","<",">","\"","'","/","unescape","S","RegExp","join","replace","result","mixin","D","N","uniqueId","templateSettings","evaluate","interpolate","T","q","\\","\r","\n","\t","
","
","B","template","variable","chain","_chain","define","requireModule","require","requirejs","registry","seen","name","deps","callback","resolve","child","charAt","parts","split","parentBase","part","_eak_seen","Error","mod","reified","__dependency1__","__exports__","Promise","array","label","__dependency2__","fulfilled","state","rejected","reason","isNonThenable","entries","fulfilledResolver","resolveAll","rejectedResolver","results","remaining","entry","cast","then","useNextTick","process","nextTick","flush","useMutationObserver","iterations","observer","BrowserMutationObserver","node","document","createTextNode","observe","characterData","data","useSetTimeout","queue","tuple","arg","scheduleFlush","browserGlobal","window","MutationObserver","WebKitMutationObserver","configure","config","on","EventTarget","instrument","deferred","promise","callbacks","callbacksFor","_promiseCallbacks","off","trigger","undefined","eventName","allCallbacks","splice","options","__dependency3__","promises","filterFn","filterResults","valuesLen","filtered","keysOf","fulfilledTo","property","onRejection","now","guid","_guidKey","_id","detail","_detail","childGuid","_label","timeStamp","stack","error","mapFn","resultLen","mappedResults","makeNodeCallbackFor","nodeFunc","binding","nodeArgs","thisArg","__dependency4__","__dependency5__","__dependency6__","__dependency7__","__dependency8__","__dependency9__","noop","resolver","counter","_subscribers","invokeResolver","resolvePromise","rejectPromise","subscribe","parent","onFulfillment","subscribers","FULFILLED","REJECTED","publish","settled","invokeCallback","succeeded","failed","hasCallback","handleThenable","resolved","objectOrFunction","val","fulfill","_state","PENDING","SEALED","async","publishFulfillment","publishRejection","_onerror","race","Resolve","Reject","guidKey","thenPromise","catch","finally","Constructor","fulfillmentAt","pending","getTime","prop","__dependency10__","__dependency11__","__dependency12__","__dependency13__","__dependency14__","__dependency15__","denodeify","allSettled","hash","rethrow","asap","__PROMISE_INSTRUMENTATION__","RSVP","EPUBJS","plugins","filePath","Render","root","previousEpub","ePub","bookPath","Book","amd","settings","bookKey","packageUrl","storage","fromStorage","saved","online","contained","width","height","layoutOveride","orientation","minSpreadWidth","gap","version","restore","reload","goto","styles","headTags","withCredentials","render_method","EPUBJSVERSION","spinePos","stored","navigator","onLine","networkListeners","store","fileStorage","ready","manifest","spine","metadata","cover","toc","pageList","readyPromises","pagination","Pagination","pageListReady","_ready","isRendered","_q","core","_rendering","_displayQ","_moving","_gotoQ","renderer","Renderer","setMinSpreadWidth","setGap","listenToRenderer","defer_opened","opened","open","addEventListener","unload","forceReload","epubpackage","book","bookUrl","urlFrom","isContained","unarchive","loadPackage","localStorage","packageXml","identifier","packageIdentifier","restored","unpack","storeOffline","_registerReplacements","_containerPath","parse","Parser","containerPath","loadXml","containerXml","container","paths","contentsPath","basePath","packagePath","encoding","console","contents","packageContents","spineIndexByURL","generateBookKey","globalLayoutProperties","parseLayoutProperties","coverPath","spineNodeIndex","navPath","navUrl","navHtml","nav","epubcfi","EpubCFI","wait","pg","cfi","generateCfiFromHref","href","tocPath","tocUrl","tocXml","createHiddenRender","_width","_height","hiddenContainer","hiddenEl","box","element","getBoundingClientRect","forceSingle","createElement","style","visibility","overflow","appendChild","initialize","generatePageList","pager","spineLength","currentPage","nextChapter","chapter","next","done","Chapter","displayChapter","pageMap","item","start","page","spreads","end","remove","removeChild","generatePagination","defered","loadPagination","pagelistJSON","JSON","getPageList","getMetadata","getToc","Events","startPage","endPage","percent","pageRange","pageFromCfi","percentageFromPage","anchorPage","percentage","loadChange","url","uri","currentChapter","absolute","path","warn","filename","unlistenToRenderer","getXml","request","base","protocol","fromRoot","location","origin","host","baseTag","getElementsByTagName","resolveUrl","pathname","Unarchiver","openZip","extension","isSaved","storedSettings","getItem","saveContents","setItem","stringify","removeSavedContents","removeItem","renderTo","elem","rendered","getEl","_rendered","startDisplay","display","previousLocationCfi","gotoCfi","fetch","fromStore","len","clearSaved","chap","render","pos","enqueue","lastPage","preloadNextChapter","dequeue","message","nextPage","prevPage","prev","prevChapter","linear","getCurrentLocationCfi","currentLocationCfi","target","gotoPercentage","parseInt","substring","gotoPage","gotoHref","cfiString","spineItem","section","relativeURL","firstPage","cfiFromPage","pageFromPercentage","assets","batch","availableOffline","setStyle","prefixed","noreflow","reformat","removeStyle","addHeadTag","tag","attrs","useSpreads","use","_use","force","load","destroy","removeEventListener","applyStyles","applyHeadTags","registerHook","hrefs","_needsAssetReplacement","resources","svg","getStorageType","layout","spread","event","spineObject","id","cfiBase","properties","manifestProperties","pages","loaded","_store","get","xml","setDocument","doc","serializer","XMLSerializer","setAttribute","insertBefore","firstChild","serializeToString","tempUrl","getUrl","setPages","num","getPages","getID","ID","revokeUrl","_document","namespaceURI","doctype","implementation","createDocument","importNode","documentElement","cfiFromRange","_range","startXpath","endXpath","startContainer","endContainer","cleanEndTextContent","getElementXPath","nsResolver","XPathResult","FIRST_ORDERED_NODE_TYPE","singleNodeValue","collapsed","createRange","setStart","startOffset","setEnd","endOffset","log","cleanStartTextContent","cleanStringForXpath","textContent","generateCfiFromRange","_query","matches","query","toLowerCase","excerpt","text","limit","textSprint","func","treeWalker","createTreeWalker","NodeFilter","SHOW_TEXT","acceptNode","test","FILTER_ACCEPT","FILTER_REJECT","nextNode","getElementById","getEls","classes","getElementsByClassName","type","handler","readyState","DONE","status","responseXML","response","supportsURL","Blob","URL","BLOB_RESPONSE","xhr","XMLHttpRequest","xhrPrototype","defineProperty","onreadystatechange","responseType","setRequestHeader","overrideMimeType","send","obj","arr","member","newitm","ident","withoutProtocol","dot","firstSlash","directory","fragment","blob","doubleSlash","search","folder","lastSlash","dataURLToBlob","dataURL","contentType","raw","rawLength","uInt8Array","BASE64_MARKER","atob","Uint8Array","charCodeAt","addScript","src","onload","body","addScripts","srcArr","total","curr","cb","addCss","rel","unprefixed","vendors","upper","toUpperCase","segments","folders","uuid","insert","compareFunction","locationOf","_start","_end","compared","pivot","indexOfSorted","_scope","scope","funcName","args","context","inwait","shift","clear","getElementTreeXPath","nodeName","tagName","pathIndex","isXhtml","ownerDocument","getAttribute","Node","TEXT_NODE","indexOfTextNode","parentNode","sibling","previousSibling","DOCUMENT_TYPE_NODE","prefix","ns","xhtml","epub","str","match","textNode","sib","children","childNodes","cfiStr","generateChapterComponent","_spineNodeIndex","_pos","generatePathComponent","steps","segment","generateCfiFromElement","pathTo","unshift","getChapterComponent","splitStr","getPathComponent","pathComponent","getCharecterOffsetComponent","chapSegment","chapterComponent","charecterOffsetComponent","assertion","chapId","endInt","parseStep","has_brackets","spineId","step","characterOffset","textLocationAssertion","addMarker","_doc","_marker","lastStep","marker","createMarker","findParent","splitText","classList","add","removeMarker","nextSib","nextSibling","prevSib","sections","compare","cfiOne","cfiTwo","generateCfiFromTextNode","anchor","offset","generateCfiFromRangeAnchor","anchorNode","anchorOffset","startElement","startSteps","startPath","startIndex","endElement","endSteps","endPath","endIndex","generateXpathFromSteps","xpath","position","generateRangeFromCfi","textLength","debug","selectNode","el","events","createEvent","tell","listen","deafen","listenUntil","evt","CustomEvent","msg","dispatchEvent","bindto","OnEvt","OffEvt","unlisten","hooks","Hooks","getHooks","plugs","plugType","hook","toAdd","toFront","triggerHooks","passed","countdown","count","register","Layout","Reflowable","spreadWidth","format","_gap","columnAxis","columnGap","columnWidth","columnFill","colWidth","pageWidth","pageHeight","calculatePages","totalWidth","displayedPages","scrollWidth","pageCount","ReflowableSpreads","divisor","fullWidth","Fixed","content","viewport","querySelector","hasAttribute","locations","totalPages","round","percentageFromCfi","baseUrl","rootfile","fullpath","xmlEncoding","metadataNode","getElementText","manifestNode","spineNode","findNavPath","findTocPath","findCoverPath","tocId","bookTitle","creator","description","pubdate","publisher","language","rights","modified_date","querySelectorText","found","getElementsByTagNameNS","nodeValue","manifestXml","selected","querySelectorAll","items","spineXml","Id","props","propArray","manifestProps","manifestPropArray","vert","bookSpine","findListItems","findAnchorOrSpan","getTOC","list","nodes","subitems","idCounter","navEl","snapshot","ORDERED_NODE_SNAPSHOT_TYPE","snapshotLength","snapshotItem","navLabel","navMap","isCfi","Iframe","iframe","docEl","bodyEl","leftPos","create","scrolling","seamless","border","contentDocument","headEl","contentWindow","resized","margin","onerror","resize","totalHeight","scrollHeight","setPageDimensions","setLeft","defaultView","scrollTo","tagEl","attr","getPageNumberByElement","left","getPageNumberByRect","boundingClientRect","getBaseElement","isElementVisible","rect","scroll","bool","renderMethod","hidden","listenedEvents","upEvent","downEvent","caches","isForcedSingle","onResized","layoutSettings","initWidth","initHeight","clientWidth","clientHeight","globalLayout","removeEventListeners","removeSelectionListeners","chapterPos","currentChapterCfiBase","reconcileLayoutSettings","layoutMethod","determineLayout","visible","formated","addEventListeners","addSelectionListeners","beforeDisplay","queued","updatePages","visibleRangeCfi","getVisibleRangeCfi","rendition","determineSpreads","mapPage","headTag","pageByElement","firstElementisTextNode","leng","trim","walk","prevNode","startNode","STOP","ITER","containsPoint","childElementCount","sprint","SHOW_ELEMENT","prevRange","elLimit","check","elPos","elRange","ELEMENT_NODE","selectNodeContents","checkText","right","ranges","splitTextNodeIntoWordsRanges","collapse","indexOfBreakableChar","startPosition","whiteCharacters","rangePosition","getClientRects","getPageCfi","startRange","getRange","forceElement","caretPositionFromPoint","caretRangeFromPoint","visibileEl","findElementAfter","offsetNode","pagesInCurrentChapter","pgs","currentRenderedPage","getRenderedPagesLeft","pagesLeft","endRange","findFirstVisible","startEl","setSize","triggerEvent","onSelectionChange","selectionEndTimeout","selectedRange","getSelection","cutoff","finished","progress","called","full","replaceWithStored","_oldUrls","_newUrls","_cache","_uri","_chapterBase","_attr","_wait","link","replaceUrl","timeout","replacments","relative","isRelative","onclick","links","srcs","stylesheets","getText","cssUrls","newText","_URL","webkitURL","mozURL","createObjectURL","replaced","loadLib","urlCache","zipUrl","JSZip","parser","DOMParser","parseFromString","mime","unarchiver","decodededUrl","decodeURIComponent","file","asUint8Array","getMimeType","asText","fromCache","revokeObjectURL","afterSaved","toStorage","that","saveEntryFileToStorage"],"mappings":"CAAA,WAAY,GAAIA,GAAEC,KAAKC,EAAEF,EAAEG,EAAEC,KAAKC,EAAEC,MAAMC,UAAUC,EAAEC,OAAOF,UAAUG,EAAEC,SAASJ,UAAUK,EAAEP,EAAEQ,KAAKC,EAAET,EAAEU,MAAMC,EAAEX,EAAEY,OAAOC,EAAEV,EAAEW,SAASC,EAAEZ,EAAEa,eAAeC,EAAEjB,EAAEkB,QAAQC,EAAEnB,EAAEoB,IAAIC,EAAErB,EAAEsB,OAAOC,EAAEvB,EAAEwB,YAAYC,EAAEzB,EAAE0B,OAAOC,EAAE3B,EAAE4B,MAAMC,EAAE7B,EAAE8B,KAAKC,EAAE/B,EAAEgC,QAAQC,EAAEjC,EAAEkC,YAAYC,EAAElC,MAAMmC,QAAQtC,EAAEM,OAAOiC,KAAKC,EAAEjC,EAAEkC,KAAKC,EAAE,SAAS7C,GAAG,MAAOA,aAAa6C,GAAE7C,EAAEC,eAAgB4C,QAAG5C,KAAK6C,SAAS9C,GAAU,GAAI6C,GAAE7C,GAAI,oBAAoB+C,UAAS,mBAAoBC,SAAQA,OAAOD,UAAUA,QAAQC,OAAOD,QAAQF,GAAGE,QAAQ5C,EAAE0C,GAAG7C,EAAEG,EAAE0C,EAAEA,EAAEI,QAAQ,OAAQ,IAAIC,GAAEL,EAAEM,KAAKN,EAAEtB,QAAQ,SAASvB,EAAEE,EAAEG,GAAG,GAAG,MAAML,EAAE,GAAGsB,GAAGtB,EAAEuB,UAAUD,EAAEtB,EAAEuB,QAAQrB,EAAEG,OAAQ,IAAGL,EAAEoD,UAAUpD,EAAEoD,QAAQ,IAAI,GAAI5C,GAAE,EAAEE,EAAEV,EAAEoD,OAAO1C,EAAEF,EAAEA,IAAI,GAAGN,EAAEmD,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/B,EAAQ,GACRqhC,EAAO/oC,KACPm5B,EAAQ7qB,EAAQnL,MAOjBmL,GAAQhN,QAAQ,SAASsN,GAExBjH,WAAW,SAASiH,GACnBm6B,EAAKC,uBAAuBp6B,EAAO7B,IACjC65B,EAASh4B,GAEZg4B,GAAWl/B,IAGZyV,QAAQkO,IAAI,OAAQub"} \ No newline at end of file +{ + "version": 3, + "file": "epub.js", + "sources": [ + "node_modules/rsvp/dist/rsvp.js", + "src/base.js", + "src/book.js", + "src/chapter.js", + "src/core.js", + "src/epubcfi.js", + "src/events.js", + "src/hooks.js", + "src/layout.js", + "src/locations.js", + "src/pagination.js", + "src/parser.js", + "src/render_iframe.js", + "src/renderer.js", + "src/replace.js", + "src/storage.js", + "src/unarchiver.js", + "libs/mime-types/mime-types.js" + ], + "names": [], + "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5jDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3yCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACpYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACvnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AC5cA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC7RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACvsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;AC7JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACpIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A" +} \ No newline at end of file diff --git a/epub.js/epub.min.js b/epub.js/epub.min.js index cb42010..d381b90 100644 --- a/epub.js/epub.min.js +++ b/epub.js/epub.min.js @@ -1,7462 +1,12 @@ -(function(){var n=this,t=n._,r={},e=Array.prototype,u=Object.prototype,i=Function.prototype,a=e.push,o=e.slice,c=e.concat,l=u.toString,f=u.hasOwnProperty,s=e.forEach,p=e.map,h=e.reduce,v=e.reduceRight,d=e.filter,g=e.every,m=e.some,y=e.indexOf,b=e.lastIndexOf,x=Array.isArray,_=Object.keys,j=i.bind,w=function(n){return n instanceof w?n:this instanceof w?(this._wrapped=n,void 0):new w(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=w),exports._=w):n._=w,w.VERSION="1.4.4";var A=w.each=w.forEach=function(n,t,e){if(null!=n)if(s&&n.forEach===s)n.forEach(t,e);else if(n.length===+n.length){for(var u=0,i=n.length;i>u;u++)if(t.call(e,n[u],u,n)===r)return}else for(var a in n)if(w.has(n,a)&&t.call(e,n[a],a,n)===r)return};w.map=w.collect=function(n,t,r){var e=[];return null==n?e:p&&n.map===p?n.map(t,r):(A(n,function(n,u,i){e[e.length]=t.call(r,n,u,i)}),e)};var O="Reduce of empty array with no initial value";w.reduce=w.foldl=w.inject=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),h&&n.reduce===h)return e&&(t=w.bind(t,e)),u?n.reduce(t,r):n.reduce(t);if(A(n,function(n,i,a){u?r=t.call(e,r,n,i,a):(r=n,u=!0)}),!u)throw new TypeError(O);return r},w.reduceRight=w.foldr=function(n,t,r,e){var u=arguments.length>2;if(null==n&&(n=[]),v&&n.reduceRight===v)return e&&(t=w.bind(t,e)),u?n.reduceRight(t,r):n.reduceRight(t);var i=n.length;if(i!==+i){var a=w.keys(n);i=a.length}if(A(n,function(o,c,l){c=a?a[--i]:--i,u?r=t.call(e,r,n[c],c,l):(r=n[c],u=!0)}),!u)throw new TypeError(O);return r},w.find=w.detect=function(n,t,r){var e;return E(n,function(n,u,i){return t.call(r,n,u,i)?(e=n,!0):void 0}),e},w.filter=w.select=function(n,t,r){var e=[];return null==n?e:d&&n.filter===d?n.filter(t,r):(A(n,function(n,u,i){t.call(r,n,u,i)&&(e[e.length]=n)}),e)},w.reject=function(n,t,r){return w.filter(n,function(n,e,u){return!t.call(r,n,e,u)},r)},w.every=w.all=function(n,t,e){t||(t=w.identity);var u=!0;return null==n?u:g&&n.every===g?n.every(t,e):(A(n,function(n,i,a){return(u=u&&t.call(e,n,i,a))?void 0:r}),!!u)};var E=w.some=w.any=function(n,t,e){t||(t=w.identity);var u=!1;return null==n?u:m&&n.some===m?n.some(t,e):(A(n,function(n,i,a){return u||(u=t.call(e,n,i,a))?r:void 0}),!!u)};w.contains=w.include=function(n,t){return null==n?!1:y&&n.indexOf===y?n.indexOf(t)!=-1:E(n,function(n){return n===t})},w.invoke=function(n,t){var r=o.call(arguments,2),e=w.isFunction(t);return w.map(n,function(n){return(e?t:n[t]).apply(n,r)})},w.pluck=function(n,t){return w.map(n,function(n){return n[t]})},w.where=function(n,t,r){return w.isEmpty(t)?r?null:[]:w[r?"find":"filter"](n,function(n){for(var r in t)if(t[r]!==n[r])return!1;return!0})},w.findWhere=function(n,t){return w.where(n,t,!0)},w.max=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.max.apply(Math,n);if(!t&&w.isEmpty(n))return-1/0;var e={computed:-1/0,value:-1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;a>=e.computed&&(e={value:n,computed:a})}),e.value},w.min=function(n,t,r){if(!t&&w.isArray(n)&&n[0]===+n[0]&&65535>n.length)return Math.min.apply(Math,n);if(!t&&w.isEmpty(n))return 1/0;var e={computed:1/0,value:1/0};return A(n,function(n,u,i){var a=t?t.call(r,n,u,i):n;e.computed>a&&(e={value:n,computed:a})}),e.value},w.shuffle=function(n){var t,r=0,e=[];return A(n,function(n){t=w.random(r++),e[r-1]=e[t],e[t]=n}),e};var k=function(n){return w.isFunction(n)?n:function(t){return t[n]}};w.sortBy=function(n,t,r){var e=k(t);return w.pluck(w.map(n,function(n,t,u){return{value:n,index:t,criteria:e.call(r,n,t,u)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.indexi;){var o=i+a>>>1;u>r.call(e,n[o])?i=o+1:a=o}return i},w.toArray=function(n){return n?w.isArray(n)?o.call(n):n.length===+n.length?w.map(n,w.identity):w.values(n):[]},w.size=function(n){return null==n?0:n.length===+n.length?n.length:w.keys(n).length},w.first=w.head=w.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:o.call(n,0,t)},w.initial=function(n,t,r){return o.call(n,0,n.length-(null==t||r?1:t))},w.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:o.call(n,Math.max(n.length-t,0))},w.rest=w.tail=w.drop=function(n,t,r){return o.call(n,null==t||r?1:t)},w.compact=function(n){return w.filter(n,w.identity)};var R=function(n,t,r){return A(n,function(n){w.isArray(n)?t?a.apply(r,n):R(n,t,r):r.push(n)}),r};w.flatten=function(n,t){return R(n,t,[])},w.without=function(n){return w.difference(n,o.call(arguments,1))},w.uniq=w.unique=function(n,t,r,e){w.isFunction(t)&&(e=r,r=t,t=!1);var u=r?w.map(n,r,e):n,i=[],a=[];return A(u,function(r,e){(t?e&&a[a.length-1]===r:w.contains(a,r))||(a.push(r),i.push(n[e]))}),i},w.union=function(){return w.uniq(c.apply(e,arguments))},w.intersection=function(n){var t=o.call(arguments,1);return w.filter(w.uniq(n),function(n){return w.every(t,function(t){return w.indexOf(t,n)>=0})})},w.difference=function(n){var t=c.apply(e,o.call(arguments,1));return w.filter(n,function(n){return!w.contains(t,n)})},w.zip=function(){for(var n=o.call(arguments),t=w.max(w.pluck(n,"length")),r=Array(t),e=0;t>e;e++)r[e]=w.pluck(n,""+e);return r},w.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},w.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=w.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}if(y&&n.indexOf===y)return n.indexOf(t,r);for(;u>e;e++)if(n[e]===t)return e;return-1},w.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=null!=r;if(b&&n.lastIndexOf===b)return e?n.lastIndexOf(t,r):n.lastIndexOf(t);for(var u=e?r:n.length;u--;)if(n[u]===t)return u;return-1},w.range=function(n,t,r){1>=arguments.length&&(t=n||0,n=0),r=arguments[2]||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=0,i=Array(e);e>u;)i[u++]=n,n+=r;return i},w.bind=function(n,t){if(n.bind===j&&j)return j.apply(n,o.call(arguments,1));var r=o.call(arguments,2);return function(){return n.apply(t,r.concat(o.call(arguments)))}},w.partial=function(n){var t=o.call(arguments,1);return function(){return n.apply(this,t.concat(o.call(arguments)))}},w.bindAll=function(n){var t=o.call(arguments,1);return 0===t.length&&(t=w.functions(n)),A(t,function(t){n[t]=w.bind(n[t],n)}),n},w.memoize=function(n,t){var r={};return t||(t=w.identity),function(){var e=t.apply(this,arguments);return w.has(r,e)?r[e]:r[e]=n.apply(this,arguments)}},w.delay=function(n,t){var r=o.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},w.defer=function(n){return w.delay.apply(w,[n,1].concat(o.call(arguments,1)))},w.throttle=function(n,t){var r,e,u,i,a=0,o=function(){a=new Date,u=null,i=n.apply(r,e)};return function(){var c=new Date,l=t-(c-a);return r=this,e=arguments,0>=l?(clearTimeout(u),u=null,a=c,i=n.apply(r,e)):u||(u=setTimeout(o,l)),i}},w.debounce=function(n,t,r){var e,u;return function(){var i=this,a=arguments,o=function(){e=null,r||(u=n.apply(i,a))},c=r&&!e;return clearTimeout(e),e=setTimeout(o,t),c&&(u=n.apply(i,a)),u}},w.once=function(n){var t,r=!1;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},w.wrap=function(n,t){return function(){var r=[n];return a.apply(r,arguments),t.apply(this,r)}},w.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length-1;r>=0;r--)t=[n[r].apply(this,t)];return t[0]}},w.after=function(n,t){return 0>=n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},w.keys=_||function(n){if(n!==Object(n))throw new TypeError("Invalid object");var t=[];for(var r in n)w.has(n,r)&&(t[t.length]=r);return t},w.values=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push(n[r]);return t},w.pairs=function(n){var t=[];for(var r in n)w.has(n,r)&&t.push([r,n[r]]);return t},w.invert=function(n){var t={};for(var r in n)w.has(n,r)&&(t[n[r]]=r);return t},w.functions=w.methods=function(n){var t=[];for(var r in n)w.isFunction(n[r])&&t.push(r);return t.sort()},w.extend=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)n[r]=t[r]}),n},w.pick=function(n){var t={},r=c.apply(e,o.call(arguments,1));return A(r,function(r){r in n&&(t[r]=n[r])}),t},w.omit=function(n){var t={},r=c.apply(e,o.call(arguments,1));for(var u in n)w.contains(r,u)||(t[u]=n[u]);return t},w.defaults=function(n){return A(o.call(arguments,1),function(t){if(t)for(var r in t)null==n[r]&&(n[r]=t[r])}),n},w.clone=function(n){return w.isObject(n)?w.isArray(n)?n.slice():w.extend({},n):n},w.tap=function(n,t){return t(n),n};var I=function(n,t,r,e){if(n===t)return 0!==n||1/n==1/t;if(null==n||null==t)return n===t;n instanceof w&&(n=n._wrapped),t instanceof w&&(t=t._wrapped);var u=l.call(n);if(u!=l.call(t))return!1;switch(u){case"[object String]":return n==t+"";case"[object Number]":return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case"[object Date]":case"[object Boolean]":return+n==+t;case"[object RegExp]":return n.source==t.source&&n.global==t.global&&n.multiline==t.multiline&&n.ignoreCase==t.ignoreCase}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i=r.length;i--;)if(r[i]==n)return e[i]==t;r.push(n),e.push(t);var a=0,o=!0;if("[object Array]"==u){if(a=n.length,o=a==t.length)for(;a--&&(o=I(n[a],t[a],r,e)););}else{var c=n.constructor,f=t.constructor;if(c!==f&&!(w.isFunction(c)&&c instanceof c&&w.isFunction(f)&&f instanceof f))return!1;for(var s in n)if(w.has(n,s)&&(a++,!(o=w.has(t,s)&&I(n[s],t[s],r,e))))break;if(o){for(s in t)if(w.has(t,s)&&!a--)break;o=!a}}return r.pop(),e.pop(),o};w.isEqual=function(n,t){return I(n,t,[],[])},w.isEmpty=function(n){if(null==n)return!0;if(w.isArray(n)||w.isString(n))return 0===n.length;for(var t in n)if(w.has(n,t))return!1;return!0},w.isElement=function(n){return!(!n||1!==n.nodeType)},w.isArray=x||function(n){return"[object Array]"==l.call(n)},w.isObject=function(n){return n===Object(n)},A(["Arguments","Function","String","Number","Date","RegExp"],function(n){w["is"+n]=function(t){return l.call(t)=="[object "+n+"]"}}),w.isArguments(arguments)||(w.isArguments=function(n){return!(!n||!w.has(n,"callee"))}),"function"!=typeof/./&&(w.isFunction=function(n){return"function"==typeof n}),w.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},w.isNaN=function(n){return w.isNumber(n)&&n!=+n},w.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"==l.call(n)},w.isNull=function(n){return null===n},w.isUndefined=function(n){return n===void 0},w.has=function(n,t){return f.call(n,t)},w.noConflict=function(){return n._=t,this},w.identity=function(n){return n},w.times=function(n,t,r){for(var e=Array(n),u=0;n>u;u++)e[u]=t.call(r,u);return e},w.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))};var M={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};M.unescape=w.invert(M.escape);var S={escape:RegExp("["+w.keys(M.escape).join("")+"]","g"),unescape:RegExp("("+w.keys(M.unescape).join("|")+")","g")};w.each(["escape","unescape"],function(n){w[n]=function(t){return null==t?"":(""+t).replace(S[n],function(t){return M[n][t]})}}),w.result=function(n,t){if(null==n)return null;var r=n[t];return w.isFunction(r)?r.call(n):r},w.mixin=function(n){A(w.functions(n),function(t){var r=w[t]=n[t];w.prototype[t]=function(){var n=[this._wrapped];return a.apply(n,arguments),D.call(this,r.apply(w,n))}})};var N=0;w.uniqueId=function(n){var t=++N+"";return n?n+t:t},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var T=/(.)^/,q={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},B=/\\|'|\r|\n|\t|\u2028|\u2029/g;w.template=function(n,t,r){var e;r=w.defaults({},r,w.templateSettings);var u=RegExp([(r.escape||T).source,(r.interpolate||T).source,(r.evaluate||T).source].join("|")+"|$","g"),i=0,a="__p+='";n.replace(u,function(t,r,e,u,o){return a+=n.slice(i,o).replace(B,function(n){return"\\"+q[n]}),r&&(a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'"),e&&(a+="'+\n((__t=("+e+"))==null?'':__t)+\n'"),u&&(a+="';\n"+u+"\n__p+='"),i=o+t.length,t}),a+="';\n",r.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{e=Function(r.variable||"obj","_",a)}catch(o){throw o.source=a,o}if(t)return e(t,w);var c=function(n){return e.call(this,n,w)};return c.source="function("+(r.variable||"obj")+"){\n"+a+"}",c},w.chain=function(n){return w(n).chain()};var D=function(n){return this._chain?w(n).chain():n};w.mixin(w),A(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=e[n];w.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!=n&&"splice"!=n||0!==r.length||delete r[0],D.call(this,r)}}),A(["concat","join","slice"],function(n){var t=e[n];w.prototype[n]=function(){return D.call(this,t.apply(this._wrapped,arguments))}}),w.extend(w.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this); -(function(global) { -var define, requireModule, require, requirejs; - -(function() { - var registry = {}, seen = {}; - - define = function(name, deps, callback) { - registry[name] = { deps: deps, callback: callback }; - }; - - requirejs = require = requireModule = function(name) { - requirejs._eak_seen = registry; - - if (seen[name]) { return seen[name]; } - seen[name] = {}; - - if (!registry[name]) { - throw new Error("Could not find module " + name); - } - - var mod = registry[name], - deps = mod.deps, - callback = mod.callback, - reified = [], - exports; - - for (var i=0, l=deps.length; i 1; - }; - - RSVP.filter(promises, filterFn).then(function(result){ - // result is [ 2, 3 ] - }); - ``` - - If any of the `promises` given to `RSVP.filter` are rejected, the first promise - that is rejected will be given as an argument to the returned promises's - rejection handler. For example: - - ```javascript - var promise1 = RSVP.resolve(1); - var promise2 = RSVP.reject(new Error("2")); - var promise3 = RSVP.reject(new Error("3")); - var promises = [ promise1, promise2, promise3 ]; - - var filterFn = function(item){ - return item > 1; - }; - - RSVP.filter(promises, filterFn).then(function(array){ - // Code here never runs because there are rejected promises! - }, function(reason) { - // reason.message === "2" - }); - ``` - - `RSVP.filter` will also wait for any promises returned from `filterFn`. - For instance, you may want to fetch a list of users then return a subset - of those users based on some asynchronous operation: - - ```javascript - - var alice = { name: 'alice' }; - var bob = { name: 'bob' }; - var users = [ alice, bob ]; - - var promises = users.map(function(user){ - return RSVP.resolve(user); - }); - - var filterFn = function(user){ - // Here, Alice has permissions to create a blog post, but Bob does not. - return getPrivilegesForUser(user).then(function(privs){ - return privs.can_create_blog_post === true; - }); - }; - RSVP.filter(promises, filterFn).then(function(users){ - // true, because the server told us only Alice can create a blog post. - users.length === 1; - // false, because Alice is the only user present in `users` - users[0] === bob; - }); - ``` - - @method filter - @for RSVP - @param {Array} promises - @param {Function} filterFn - function to be called on each resolved value to - filter the final results. - @param {String} label optional string describing the promise. Useful for - tooling. - @return {Promise} - */ - function filter(promises, filterFn, label) { - if (!isArray(promises)) { - throw new TypeError('You must pass an array to filter.'); - } - - if (!isFunction(filterFn)){ - throw new TypeError("You must pass a function to filter's second argument."); - } - - return all(promises, label).then(function(values){ - return map(promises, filterFn, label).then(function(filterResults){ - var i, - valuesLen = values.length, - filtered = []; - - for (i = 0; i < valuesLen; i++){ - if(filterResults[i]) filtered.push(values[i]); - } - return filtered; - }); - }); - } - - __exports__["default"] = filter; - }); -define("rsvp/hash", - ["./promise","./utils","exports"], - function(__dependency1__, __dependency2__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - var isNonThenable = __dependency2__.isNonThenable; - var keysOf = __dependency2__.keysOf; - - /** - `RSVP.hash` is similar to `RSVP.all`, but takes an object instead of an array - for its `promises` argument. - - Returns a promise that is fulfilled when all the given promises have been - fulfilled, or rejected if any of them become rejected. The returned promise - is fulfilled with a hash that has the same key names as the `promises` object - argument. If any of the values in the object are not promises, they will - simply be copied over to the fulfilled object. - - Example: - - ```javascript - var promises = { - myPromise: RSVP.resolve(1), - yourPromise: RSVP.resolve(2), - theirPromise: RSVP.resolve(3), - notAPromise: 4 - }; - - RSVP.hash(promises).then(function(hash){ - // hash here is an object that looks like: - // { - // myPromise: 1, - // yourPromise: 2, - // theirPromise: 3, - // notAPromise: 4 - // } - }); - ```` - - If any of the `promises` given to `RSVP.hash` are rejected, the first promise - that is rejected will be given as as the first argument, or as the reason to - the rejection handler. For example: - - ```javascript - var promises = { - myPromise: RSVP.resolve(1), - rejectedPromise: RSVP.reject(new Error("rejectedPromise")), - anotherRejectedPromise: RSVP.reject(new Error("anotherRejectedPromise")), - }; - - RSVP.hash(promises).then(function(hash){ - // Code here never runs because there are rejected promises! - }, function(reason) { - // reason.message === "rejectedPromise" - }); - ``` - - An important note: `RSVP.hash` is intended for plain JavaScript objects that - are just a set of keys and values. `RSVP.hash` will NOT preserve prototype - chains. - - Example: - - ```javascript - function MyConstructor(){ - this.example = RSVP.resolve("Example"); - } - - MyConstructor.prototype = { - protoProperty: RSVP.resolve("Proto Property") - }; - - var myObject = new MyConstructor(); - - RSVP.hash(myObject).then(function(hash){ - // protoProperty will not be present, instead you will just have an - // object that looks like: - // { - // example: "Example" - // } - // - // hash.hasOwnProperty('protoProperty'); // false - // 'undefined' === typeof hash.protoProperty - }); - ``` - - @method hash - @for RSVP - @param {Object} promises - @param {String} label - optional string that describes the promise. - Useful for tooling. - @return {Promise} promise that is fulfilled when all properties of `promises` - have been fulfilled, or rejected if any of them become rejected. - */ - __exports__["default"] = function hash(object, label) { - return new Promise(function(resolve, reject){ - var results = {}; - var keys = keysOf(object); - var remaining = keys.length; - var entry, property; - - if (remaining === 0) { - resolve(results); - return; - } - - function fulfilledTo(property) { - return function(value) { - results[property] = value; - if (--remaining === 0) { - resolve(results); - } - }; - } - - function onRejection(reason) { - remaining = 0; - reject(reason); - } - - for (var i = 0; i < keys.length; i++) { - property = keys[i]; - entry = object[property]; - - if (isNonThenable(entry)) { - results[property] = entry; - if (--remaining === 0) { - resolve(results); - } - } else { - Promise.cast(entry).then(fulfilledTo(property), onRejection); - } - } - }); - }; - }); -define("rsvp/instrument", - ["./config","./utils","exports"], - function(__dependency1__, __dependency2__, __exports__) { - "use strict"; - var config = __dependency1__.config; - var now = __dependency2__.now; - - __exports__["default"] = function instrument(eventName, promise, child) { - // instrumentation should not disrupt normal usage. - try { - config.trigger(eventName, { - guid: promise._guidKey + promise._id, - eventName: eventName, - detail: promise._detail, - childGuid: child && promise._guidKey + child._id, - label: promise._label, - timeStamp: now(), - stack: new Error(promise._label).stack - }); - } catch(error) { - setTimeout(function(){ - throw error; - }, 0); - } - }; - }); -define("rsvp/map", - ["./promise","./all","./utils","exports"], - function(__dependency1__, __dependency2__, __dependency3__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - var all = __dependency2__["default"]; - var isArray = __dependency3__.isArray; - var isFunction = __dependency3__.isFunction; - - /** - - `RSVP.map` is similar to JavaScript's native `map` method, except that it - waits for all promises to become fulfilled before running the `mapFn` on - each item in given to `promises`. `RSVP.map` returns a promise that will - become fulfilled with the result of running `mapFn` on the values the promises - become fulfilled with. - - For example: - - ```javascript - - var promise1 = RSVP.resolve(1); - var promise2 = RSVP.resolve(2); - var promise3 = RSVP.resolve(3); - var promises = [ promise1, promise2, promise3 ]; - - var mapFn = function(item){ - return item + 1; - }; - - RSVP.map(promises, mapFn).then(function(result){ - // result is [ 2, 3, 4 ] - }); - ``` - - If any of the `promises` given to `RSVP.map` are rejected, the first promise - that is rejected will be given as an argument to the returned promises's - rejection handler. For example: - - ```javascript - var promise1 = RSVP.resolve(1); - var promise2 = RSVP.reject(new Error("2")); - var promise3 = RSVP.reject(new Error("3")); - var promises = [ promise1, promise2, promise3 ]; - - var mapFn = function(item){ - return item + 1; - }; - - RSVP.map(promises, mapFn).then(function(array){ - // Code here never runs because there are rejected promises! - }, function(reason) { - // reason.message === "2" - }); - ``` - - `RSVP.map` will also wait if a promise is returned from `mapFn`. For example, - say you want to get all comments from a set of blog posts, but you need - the blog posts first becuase they contain a url to those comments. - - ```javscript - - var mapFn = function(blogPost){ - // getComments does some ajax and returns an RSVP.Promise that is fulfilled - // with some comments data - return getComments(blogPost.comments_url); - }; - - // getBlogPosts does some ajax and returns an RSVP.Promise that is fulfilled - // with some blog post data - RSVP.map(getBlogPosts(), mapFn).then(function(comments){ - // comments is the result of asking the server for the comments - // of all blog posts returned from getBlogPosts() - }); - ``` - - @method map - @for RSVP - @param {Array} promises - @param {Function} mapFn function to be called on each fulfilled promise. - @param {String} label optional string for labeling the promise. - Useful for tooling. - @return {Promise} promise that is fulfilled with the result of calling - `mapFn` on each fulfilled promise or value when they become fulfilled. - The promise will be rejected if any of the given `promises` become rejected. - */ - __exports__["default"] = function map(promises, mapFn, label) { - - if (!isArray(promises)) { - throw new TypeError('You must pass an array to map.'); - } - - if (!isFunction(mapFn)){ - throw new TypeError("You must pass a function to map's second argument."); - } - - return all(promises, label).then(function(results){ - var resultLen = results.length, - mappedResults = [], - i; - - for (i = 0; i < resultLen; i++){ - mappedResults.push(mapFn(results[i])); - } - - return all(mappedResults, label); - }); - }; - }); -define("rsvp/node", - ["./promise","exports"], - function(__dependency1__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - - var slice = Array.prototype.slice; - - function makeNodeCallbackFor(resolve, reject) { - return function (error, value) { - if (error) { - reject(error); - } else if (arguments.length > 2) { - resolve(slice.call(arguments, 1)); - } else { - resolve(value); - } - }; - } - - /** - `RSVP.denodeify` takes a "node-style" function and returns a function that - will return an `RSVP.Promise`. You can use `denodeify` in Node.js or the - browser when you'd prefer to use promises over using callbacks. For example, - `denodeify` transforms the following: - - ```javascript - var fs = require('fs'); - - fs.readFile('myfile.txt', function(err, data){ - if (err) return handleError(err); - handleData(data); - }); - ``` - - into: - - ```javascript - var fs = require('fs'); - - var readFile = RSVP.denodeify(fs.readFile); - - readFile('myfile.txt').then(handleData, handleError); - ``` - - Using `denodeify` makes it easier to compose asynchronous operations instead - of using callbacks. For example, instead of: - - ```javascript - var fs = require('fs'); - var log = require('some-async-logger'); - - fs.readFile('myfile.txt', function(err, data){ - if (err) return handleError(err); - fs.writeFile('myfile2.txt', data, function(err){ - if (err) throw err; - log('success', function(err) { - if (err) throw err; - }); - }); - }); - ``` - - You can chain the operations together using `then` from the returned promise: - - ```javascript - var fs = require('fs'); - var denodeify = RSVP.denodeify; - var readFile = denodeify(fs.readFile); - var writeFile = denodeify(fs.writeFile); - var log = denodeify(require('some-async-logger')); - - readFile('myfile.txt').then(function(data){ - return writeFile('myfile2.txt', data); - }).then(function(){ - return log('SUCCESS'); - }).then(function(){ - // success handler - }, function(reason){ - // rejection handler - }); - ``` - - @method denodeify - @for RSVP - @param {Function} nodeFunc a "node-style" function that takes a callback as - its last argument. The callback expects an error to be passed as its first - argument (if an error occurred, otherwise null), and the value from the - operation as its second argument ("function(err, value){ }"). - @param {Any} binding optional argument for binding the "this" value when - calling the `nodeFunc` function. - @return {Function} a function that wraps `nodeFunc` to return an - `RSVP.Promise` - */ - __exports__["default"] = function denodeify(nodeFunc, binding) { - return function() { - var nodeArgs = slice.call(arguments), resolve, reject; - var thisArg = this || binding; - - return new Promise(function(resolve, reject) { - Promise.all(nodeArgs).then(function(nodeArgs) { - try { - nodeArgs.push(makeNodeCallbackFor(resolve, reject)); - nodeFunc.apply(thisArg, nodeArgs); - } catch(e) { - reject(e); - } - }); - }); - }; - }; - }); -define("rsvp/promise", - ["./config","./events","./instrument","./utils","./promise/cast","./promise/all","./promise/race","./promise/resolve","./promise/reject","exports"], - function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __exports__) { - "use strict"; - var config = __dependency1__.config; - var EventTarget = __dependency2__["default"]; - var instrument = __dependency3__["default"]; - var objectOrFunction = __dependency4__.objectOrFunction; - var isFunction = __dependency4__.isFunction; - var now = __dependency4__.now; - var cast = __dependency5__["default"]; - var all = __dependency6__["default"]; - var race = __dependency7__["default"]; - var Resolve = __dependency8__["default"]; - var Reject = __dependency9__["default"]; - - var guidKey = 'rsvp_' + now() + '-'; - var counter = 0; - - function noop() {} - - __exports__["default"] = Promise; - - - /** - - Promise objects represent the eventual result of an asynchronous operation. The - primary way of interacting with a promise is through its `then` method, which - registers callbacks to receive either a promise’s eventual value or the reason - why the promise cannot be fulfilled. - - Terminology - ----------- - - - `promise` is an object or function with a `then` method whose behavior conforms to this specification. - - `thenable` is an object or function that defines a `then` method. - - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). - - `exception` is a value that is thrown using the throw statement. - - `reason` is a value that indicates why a promise was rejected. - - `settled` the final resting state of a promise, fulfilled or rejected. - - A promise can be in one of three states: pending, fulfilled, or rejected. - - - Basic Usage: - ------------ - - ```js - var promise = new Promise(function(resolve, reject) { - // on success - resolve(value); - - // on failure - reject(reason); - }); - - promise.then(function(value) { - // on fulfillment - }, function(reason) { - // on rejection - }); - ``` - - Advanced Usage: - --------------- - - Promises shine when abstracting away asynchronous interactions such as - `XMLHttpRequest`s. - - ```js - function getJSON(url) { - return new Promise(function(resolve, reject){ - var xhr = new XMLHttpRequest(); - - xhr.open('GET', url); - xhr.onreadystatechange = handler; - xhr.responseType = 'json'; - xhr.setRequestHeader('Accept', 'application/json'); - xhr.send(); - - function handler() { - if (this.readyState === this.DONE) { - if (this.status === 200) { - resolve(this.response); - } else { - reject(new Error("getJSON: `" + url + "` failed with status: [" + this.status + "]"); - } - } - }; - }); - } - - getJSON('/posts.json').then(function(json) { - // on fulfillment - }, function(reason) { - // on rejection - }); - ``` - - Unlike callbacks, promises are great composable primitives. - - ```js - Promise.all([ - getJSON('/posts'), - getJSON('/comments') - ]).then(function(values){ - values[0] // => postsJSON - values[1] // => commentsJSON - - return values; - }); - ``` - - @class Promise - @param {function} - @param {String} label optional string for labeling the promise. - Useful for tooling. - @constructor - */ - function Promise(resolver, label) { - if (!isFunction(resolver)) { - throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); - } - - if (!(this instanceof Promise)) { - throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); - } - - this._id = counter++; - this._label = label; - this._subscribers = []; - - if (config.instrument) { - instrument('created', this); - } - - if (noop !== resolver) { - invokeResolver(resolver, this); - } - } - - function invokeResolver(resolver, promise) { - function resolvePromise(value) { - resolve(promise, value); - } - - function rejectPromise(reason) { - reject(promise, reason); - } - - try { - resolver(resolvePromise, rejectPromise); - } catch(e) { - rejectPromise(e); - } - } - - Promise.cast = cast; - Promise.all = all; - Promise.race = race; - Promise.resolve = Resolve; - Promise.reject = Reject; - - var PENDING = void 0; - var SEALED = 0; - var FULFILLED = 1; - var REJECTED = 2; - - function subscribe(parent, child, onFulfillment, onRejection) { - var subscribers = parent._subscribers; - var length = subscribers.length; - - subscribers[length] = child; - subscribers[length + FULFILLED] = onFulfillment; - subscribers[length + REJECTED] = onRejection; - } - - function publish(promise, settled) { - var child, callback, subscribers = promise._subscribers, detail = promise._detail; - - if (config.instrument) { - instrument(settled === FULFILLED ? 'fulfilled' : 'rejected', promise); - } - - for (var i = 0; i < subscribers.length; i += 3) { - child = subscribers[i]; - callback = subscribers[i + settled]; - - invokeCallback(settled, child, callback, detail); - } - - promise._subscribers = null; - } - - Promise.prototype = { - /** - @property constructor - */ - constructor: Promise, - - _id: undefined, - _guidKey: guidKey, - _label: undefined, - - _state: undefined, - _detail: undefined, - _subscribers: undefined, - - _onerror: function (reason) { - config.trigger('error', reason); - }, - - /** - - A promise represents the eventual result of an asynchronous operation. The - primary way of interacting with a promise is through its `then` method, which - registers callbacks to receive either a promise's eventual value or the reason - why the promise cannot be fulfilled. - - ```js - findUser().then(function(user){ - // user is available - }, function(reason){ - // user is unavailable, and you are given the reason why - }); - ``` - - Chaining - -------- - - The return value of `then` is itself a promise. This second, "downstream" - promise is resolved with the return value of the first promise's fulfillment - or rejection handler, or rejected if the handler throws an exception. - - ```js - findUser().then(function (user) { - return user.name; - }, function (reason) { - return "default name"; - }).then(function (userName) { - // If `findUser` fulfilled, `userName` will be the user's name, otherwise it - // will be `"default name"` - }); - - findUser().then(function (user) { - throw "Found user, but still unhappy"; - }, function (reason) { - throw "`findUser` rejected and we're unhappy"; - }).then(function (value) { - // never reached - }, function (reason) { - // if `findUser` fulfilled, `reason` will be "Found user, but still unhappy". - // If `findUser` rejected, `reason` will be "`findUser` rejected and we're unhappy". - }); - ``` - If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. - - ```js - findUser().then(function (user) { - throw new PedagogicalException("Upstream error"); - }).then(function (value) { - // never reached - }).then(function (value) { - // never reached - }, function (reason) { - // The `PedgagocialException` is propagated all the way down to here - }); - ``` - - Assimilation - ------------ - - Sometimes the value you want to propagate to a downstream promise can only be - retrieved asynchronously. This can be achieved by returning a promise in the - fulfillment or rejection handler. The downstream promise will then be pending - until the returned promise is settled. This is called *assimilation*. - - ```js - findUser().then(function (user) { - return findCommentsByAuthor(user); - }).then(function (comments) { - // The user's comments are now available - }); - ``` - - If the assimliated promise rejects, then the downstream promise will also reject. - - ```js - findUser().then(function (user) { - return findCommentsByAuthor(user); - }).then(function (comments) { - // If `findCommentsByAuthor` fulfills, we'll have the value here - }, function (reason) { - // If `findCommentsByAuthor` rejects, we'll have the reason here - }); - ``` - - Simple Example - -------------- - - Synchronous Example - - ```javascript - var result; - - try { - result = findResult(); - // success - } catch(reason) { - // failure - } - ``` - - Errback Example - - ```js - findResult(function(result, err){ - if (err) { - // failure - } else { - // success - } - }); - ``` - - Promise Example; - - ```javacsript - findResult().then(function(result){ - - }, function(reason){ - - }); - ``` - - Advanced Example - -------------- - - Synchronous Example - - ```javascript - var author, books; - - try { - author = findAuthor(); - books = findBooksByAuthor(author); - // success - } catch(reason) { - // failure - } - ``` - - Errback Example - - ```js - - function foundBooks(books) { - - } - - function failure(reason) { - - } - - findAuthor(function(author, err){ - if (err) { - failure(err); - // failure - } else { - try { - findBoooksByAuthor(author, function(books, err) { - if (err) { - failure(err); - } else { - try { - foundBooks(books); - } catch(reason) { - failure(reason); - } - } - }); - } catch(error) { - failure(err); - } - // success - } - }); - ``` - - Promise Example; - - ```javacsript - findAuthor(). - then(findBooksByAuthor). - then(function(books){ - // found books - }).catch(function(reason){ - // something went wrong; - }); - ``` - - @method then - @param {Function} onFulfillment - @param {Function} onRejection - @param {String} label optional string for labeling the promise. - Useful for tooling. - @return {Promise} - */ - then: function(onFulfillment, onRejection, label) { - var promise = this; - this._onerror = null; - - var thenPromise = new this.constructor(noop, label); - - if (this._state) { - var callbacks = arguments; - config.async(function invokePromiseCallback() { - invokeCallback(promise._state, thenPromise, callbacks[promise._state - 1], promise._detail); - }); - } else { - subscribe(this, thenPromise, onFulfillment, onRejection); - } - - if (config.instrument) { - instrument('chained', promise, thenPromise); - } - - return thenPromise; - }, - - /** - `catch` is simply sugar for `then(null, onRejection)` which makes it the same - as the catch block, of a try/catch statement. - - ```js - function findAuthor(){ - throw new Error("couldn't find that author"); - } - - // synchronous - try { - findAuthor(); - } catch(reason) { - - } - - // async with promises - findAuthor().catch(function(reason){ - // something went wrong; - }); - ``` - - @method catch - @param {Function} onRejection - @param {String} label optional string for labeling the promise. - Useful for tooling. - @return {Promise} - */ - 'catch': function(onRejection, label) { - return this.then(null, onRejection, label); - }, - - /** - `finally` will be invoked regardless of the promise's fate just as native - try/catch/finally behaves - - ```js - findAuthor() { - if (Math.random() > 0.5) { - throw new Error(); - } - return new Author(); - } - - try { - return findAuthor(); // succeed or fail - } catch(error) { - return findOtherAuther(); - } finally { - // always runs - // doesn't effect the return value - } - - findAuthor().finally(function(){ - // author was either found, or not - }); - ``` - - @method finally - @param {Function} callback - @param {String} label optional string for labeling the promise. - Useful for tooling. - @return {Promise} - */ - 'finally': function(callback, label) { - var constructor = this.constructor; - - return this.then(function(value) { - return constructor.cast(callback()).then(function(){ - return value; - }); - }, function(reason) { - return constructor.cast(callback()).then(function(){ - throw reason; - }); - }, label); - } - }; - - function invokeCallback(settled, promise, callback, detail) { - var hasCallback = isFunction(callback), - value, error, succeeded, failed; - - if (hasCallback) { - try { - value = callback(detail); - succeeded = true; - } catch(e) { - failed = true; - error = e; - } - } else { - value = detail; - succeeded = true; - } - - if (handleThenable(promise, value)) { - return; - } else if (hasCallback && succeeded) { - resolve(promise, value); - } else if (failed) { - reject(promise, error); - } else if (settled === FULFILLED) { - resolve(promise, value); - } else if (settled === REJECTED) { - reject(promise, value); - } - } - - function handleThenable(promise, value) { - var then = null, - resolved; - - try { - if (promise === value) { - throw new TypeError("A promises callback cannot return that same promise."); - } - - if (objectOrFunction(value)) { - then = value.then; - - if (isFunction(then)) { - then.call(value, function(val) { - if (resolved) { return true; } - resolved = true; - - if (value !== val) { - resolve(promise, val); - } else { - fulfill(promise, val); - } - }, function(val) { - if (resolved) { return true; } - resolved = true; - - reject(promise, val); - }, 'derived from: ' + (promise._label || ' unknown promise')); - - return true; - } - } - } catch (error) { - if (resolved) { return true; } - reject(promise, error); - return true; - } - - return false; - } - - function resolve(promise, value) { - if (promise === value) { - fulfill(promise, value); - } else if (!handleThenable(promise, value)) { - fulfill(promise, value); - } - } - - function fulfill(promise, value) { - if (promise._state !== PENDING) { return; } - promise._state = SEALED; - promise._detail = value; - - config.async(publishFulfillment, promise); - } - - function reject(promise, reason) { - if (promise._state !== PENDING) { return; } - promise._state = SEALED; - promise._detail = reason; - - config.async(publishRejection, promise); - } - - function publishFulfillment(promise) { - publish(promise, promise._state = FULFILLED); - } - - function publishRejection(promise) { - if (promise._onerror) { - promise._onerror(promise._detail); - } - - publish(promise, promise._state = REJECTED); - } - }); -define("rsvp/promise/all", - ["../utils","exports"], - function(__dependency1__, __exports__) { - "use strict"; - var isArray = __dependency1__.isArray; - var isNonThenable = __dependency1__.isNonThenable; - - /** - - `RSVP.Promise.all` returns a new promise which is fulfilled with an array of - fulfillment values for the passed promises, or rejects with the reason of the - first passed promise that rejects. It casts all elements of the passed iterable - to promises as it runs this algorithm. - - Example: - - ```javascript - var promise1 = RSVP.resolve(1); - var promise2 = RSVP.resolve(2); - var promise3 = RSVP.resolve(3); - var promises = [ promise1, promise2, promise3 ]; - - RSVP.Promise.all(promises).then(function(array){ - // The array here would be [ 1, 2, 3 ]; - }); - ``` - - If any of the `promises` given to `RSVP.all` are rejected, the first promise - that is rejected will be given as an argument to the returned promises's - rejection handler. For example: - - Example: - - ```javascript - var promise1 = RSVP.resolve(1); - var promise2 = RSVP.reject(new Error("2")); - var promise3 = RSVP.reject(new Error("3")); - var promises = [ promise1, promise2, promise3 ]; - - RSVP.Promise.all(promises).then(function(array){ - // Code here never runs because there are rejected promises! - }, function(error) { - // error.message === "2" - }); - ``` - - @method all - @for RSVP.Promise - @param {Array} promises - @param {String} label optional string for labeling the promise. - Useful for tooling. - @return {Promise} promise that is fulfilled when all `promises` have been - fulfilled, or rejected if any of them become rejected. - */ - __exports__["default"] = function all(entries, label) { - - /*jshint validthis:true */ - var Constructor = this; - - return new Constructor(function(resolve, reject) { - if (!isArray(entries)) { - throw new TypeError('You must pass an array to all.'); - } - - var remaining = entries.length; - var results = new Array(remaining); - var entry, pending = true; - - if (remaining === 0) { - resolve(results); - return; - } - - function fulfillmentAt(index) { - return function(value) { - results[index] = value; - if (--remaining === 0) { - resolve(results); - } - }; - } - - function onRejection(reason) { - remaining = 0; - reject(reason); - } - - for (var index = 0; index < entries.length; index++) { - entry = entries[index]; - if (isNonThenable(entry)) { - results[index] = entry; - if (--remaining === 0) { - resolve(results); - } - } else { - Constructor.cast(entry).then(fulfillmentAt(index), onRejection); - } - } - }, label); - }; - }); -define("rsvp/promise/cast", - ["exports"], - function(__exports__) { - "use strict"; - /** - - `RSVP.Promise.cast` cast coerces its argument to a promise, or returns the - argument if it is already a promise which shares a constructor with the caster; - - Example: - - ```javascript - var promise = RSVP.Promise.resolve(1); - var casted = RSVP.Promise.cast(promise); - - console.log(promise === casted); // true - ``` - - In the case of a promise whose constructor does not match, it is assimilated. - The resulting promise will fulfill or reject based on the outcome of the - promise being casted. - - In the case of a non-promise, a promise which will fulfill with that value is - returned. - - Example: - - ```javascript - var value = 1; // could be a number, boolean, string, undefined... - var casted = RSVP.Promise.cast(value); - - console.log(value === casted); // false - console.log(casted instanceof RSVP.Promise) // true - - casted.then(function(val) { - val === value // => true - }); - ``` - - `RSVP.Promise.cast` is similar to `RSVP.Promise.resolve`, but `RSVP.Promise.cast` differs in the - following ways: - - * `RSVP.Promise.cast` serves as a memory-efficient way of getting a promise, when you - have something that could either be a promise or a value. RSVP.resolve - will have the same effect but will create a new promise wrapper if the - argument is a promise. - * `RSVP.Promise.cast` is a way of casting incoming thenables or promise subclasses to - promises of the exact class specified, so that the resulting object's `then` is - ensured to have the behavior of the constructor you are calling cast on (i.e., RSVP.Promise). - - @method cast - @for RSVP.Promise - @param {Object} object to be casted - @param {String} label optional string for labeling the promise. - Useful for tooling. - @return {Promise} promise - */ - - __exports__["default"] = function cast(object, label) { - /*jshint validthis:true */ - var Constructor = this; - - if (object && typeof object === 'object' && object.constructor === Constructor) { - return object; - } - - return new Constructor(function(resolve) { - resolve(object); - }, label); - }; - }); -define("rsvp/promise/race", - ["../utils","exports"], - function(__dependency1__, __exports__) { - "use strict"; - /* global toString */ - - var isArray = __dependency1__.isArray; - var isFunction = __dependency1__.isFunction; - var isNonThenable = __dependency1__.isNonThenable; - - /** - `RSVP.Promise.race` returns a new promise which is settled in the same way as the - first passed promise to settle. - - Example: - - ```javascript - var promise1 = new RSVP.Promise(function(resolve, reject){ - setTimeout(function(){ - resolve("promise 1"); - }, 200); - }); - - var promise2 = new RSVP.Promise(function(resolve, reject){ - setTimeout(function(){ - resolve("promise 2"); - }, 100); - }); - - RSVP.Promise.race([promise1, promise2]).then(function(result){ - // result === "promise 2" because it was resolved before promise1 - // was resolved. - }); - ``` - - `RSVP.Promise.race` is deterministic in that only the state of the first - completed promise matters. For example, even if other promises given to the - `promises` array argument are resolved, but the first completed promise has - become rejected before the other promises became fulfilled, the returned - promise will become rejected: - - ```javascript - var promise1 = new RSVP.Promise(function(resolve, reject){ - setTimeout(function(){ - resolve("promise 1"); - }, 200); - }); - - var promise2 = new RSVP.Promise(function(resolve, reject){ - setTimeout(function(){ - reject(new Error("promise 2")); - }, 100); - }); - - RSVP.Promise.race([promise1, promise2]).then(function(result){ - // Code here never runs because there are rejected promises! - }, function(reason){ - // reason.message === "promise2" because promise 2 became rejected before - // promise 1 became fulfilled - }); - ``` - - @method race - @for RSVP.Promise - @param {Array} promises array of promises to observe - @param {String} label optional string for describing the promise returned. - Useful for tooling. - @return {Promise} a promise which settles in the same way as the first passed - promise to settle. - */ - __exports__["default"] = function race(entries, label) { - /*jshint validthis:true */ - var Constructor = this, entry; - - return new Constructor(function(resolve, reject) { - if (!isArray(entries)) { - throw new TypeError('You must pass an array to race.'); - } - - var pending = true; - - function onFulfillment(value) { if (pending) { pending = false; resolve(value); } } - function onRejection(reason) { if (pending) { pending = false; reject(reason); } } - - for (var i = 0; i < entries.length; i++) { - entry = entries[i]; - if (isNonThenable(entry)) { - pending = false; - resolve(entry); - return; - } else { - Constructor.cast(entry).then(onFulfillment, onRejection); - } - } - }, label); - }; - }); -define("rsvp/promise/reject", - ["exports"], - function(__exports__) { - "use strict"; - /** - `RSVP.Promise.reject` returns a promise rejected with the passed `reason`. - It is essentially shorthand for the following: - - ```javascript - var promise = new RSVP.Promise(function(resolve, reject){ - reject(new Error('WHOOPS')); - }); - - promise.then(function(value){ - // Code here doesn't run because the promise is rejected! - }, function(reason){ - // reason.message === 'WHOOPS' - }); - ``` - - Instead of writing the above, your code now simply becomes the following: - - ```javascript - var promise = RSVP.Promise.reject(new Error('WHOOPS')); - - promise.then(function(value){ - // Code here doesn't run because the promise is rejected! - }, function(reason){ - // reason.message === 'WHOOPS' - }); - ``` - - @method reject - @for RSVP.Promise - @param {Any} reason value that the returned promise will be rejected with. - @param {String} label optional string for identifying the returned promise. - Useful for tooling. - @return {Promise} a promise rejected with the given `reason`. - */ - __exports__["default"] = function reject(reason, label) { - /*jshint validthis:true */ - var Constructor = this; - - return new Constructor(function (resolve, reject) { - reject(reason); - }, label); - }; - }); -define("rsvp/promise/resolve", - ["exports"], - function(__exports__) { - "use strict"; - /** - `RSVP.Promise.resolve` returns a promise that will become fulfilled with the passed - `value`. It is essentially shorthand for the following: - - ```javascript - var promise = new RSVP.Promise(function(resolve, reject){ - resolve(1); - }); - - promise.then(function(value){ - // value === 1 - }); - ``` - - Instead of writing the above, your code now simply becomes the following: - - ```javascript - var promise = RSVP.Promise.resolve(1); - - promise.then(function(value){ - // value === 1 - }); - ``` - - @method resolve - @for RSVP.Promise - @param {Any} value value that the returned promise will be resolved with - @param {String} label optional string for identifying the returned promise. - Useful for tooling. - @return {Promise} a promise that will become fulfilled with the given - `value` - */ - __exports__["default"] = function resolve(value, label) { - /*jshint validthis:true */ - var Constructor = this; - - return new Constructor(function(resolve, reject) { - resolve(value); - }, label); - }; - }); -define("rsvp/race", - ["./promise","exports"], - function(__dependency1__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - - __exports__["default"] = function race(array, label) { - return Promise.race(array, label); - }; - }); -define("rsvp/reject", - ["./promise","exports"], - function(__dependency1__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - - __exports__["default"] = function reject(reason, label) { - return Promise.reject(reason, label); - }; - }); -define("rsvp/resolve", - ["./promise","exports"], - function(__dependency1__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - - __exports__["default"] = function resolve(value, label) { - return Promise.resolve(value, label); - }; - }); -define("rsvp/rethrow", - ["exports"], - function(__exports__) { - "use strict"; - /** - `RSVP.rethrow` will rethrow an error on the next turn of the JavaScript event - loop in order to aid debugging. - - Promises A+ specifies that any exceptions that occur with a promise must be - caught by the promises implementation and bubbled to the last handler. For - this reason, it is recommended that you always specify a second rejection - handler function to `then`. However, `RSVP.rethrow` will throw the exception - outside of the promise, so it bubbles up to your console if in the browser, - or domain/cause uncaught exception in Node. `rethrow` will throw the error - again so the error can be handled by the promise. - - ```javascript - function throws(){ - throw new Error('Whoops!'); - } - - var promise = new RSVP.Promise(function(resolve, reject){ - throws(); - }); - - promise.catch(RSVP.rethrow).then(function(){ - // Code here doesn't run because the promise became rejected due to an - // error! - }, function (err){ - // handle the error here - }); - ``` - - The 'Whoops' error will be thrown on the next turn of the event loop - and you can watch for it in your console. You can also handle it using a - rejection handler given to `.then` or `.catch` on the returned promise. - - @method rethrow - @for RSVP - @param {Error} reason reason the promise became rejected. - @throws Error - */ - __exports__["default"] = function rethrow(reason) { - setTimeout(function() { - throw reason; - }); - throw reason; - }; - }); -define("rsvp/utils", - ["exports"], - function(__exports__) { - "use strict"; - function objectOrFunction(x) { - return typeof x === "function" || (typeof x === "object" && x !== null); - } - - __exports__.objectOrFunction = objectOrFunction;function isFunction(x) { - return typeof x === "function"; - } - - __exports__.isFunction = isFunction;function isNonThenable(x) { - return !objectOrFunction(x); - } - - __exports__.isNonThenable = isNonThenable;function isArray(x) { - return Object.prototype.toString.call(x) === "[object Array]"; - } - - __exports__.isArray = isArray;// Date.now is not available in browsers < IE9 - // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/now#Compatibility - var now = Date.now || function() { return new Date().getTime(); }; - __exports__.now = now; - var keysOf = Object.keys || function(object) { - var result = []; - - for (var prop in object) { - result.push(prop); - } - - return result; - }; - __exports__.keysOf = keysOf; - }); -define("rsvp", - ["./rsvp/promise","./rsvp/events","./rsvp/node","./rsvp/all","./rsvp/all_settled","./rsvp/race","./rsvp/hash","./rsvp/rethrow","./rsvp/defer","./rsvp/config","./rsvp/map","./rsvp/resolve","./rsvp/reject","./rsvp/asap","./rsvp/filter","exports"], - function(__dependency1__, __dependency2__, __dependency3__, __dependency4__, __dependency5__, __dependency6__, __dependency7__, __dependency8__, __dependency9__, __dependency10__, __dependency11__, __dependency12__, __dependency13__, __dependency14__, __dependency15__, __exports__) { - "use strict"; - var Promise = __dependency1__["default"]; - var EventTarget = __dependency2__["default"]; - var denodeify = __dependency3__["default"]; - var all = __dependency4__["default"]; - var allSettled = __dependency5__["default"]; - var race = __dependency6__["default"]; - var hash = __dependency7__["default"]; - var rethrow = __dependency8__["default"]; - var defer = __dependency9__["default"]; - var config = __dependency10__.config; - var configure = __dependency10__.configure; - var map = __dependency11__["default"]; - var resolve = __dependency12__["default"]; - var reject = __dependency13__["default"]; - var asap = __dependency14__["default"]; - var filter = __dependency15__["default"]; - - config.async = asap; // default async is asap; - - function async(callback, arg) { - config.async(callback, arg); - } - - function on() { - config.on.apply(config, arguments); - } - - function off() { - config.off.apply(config, arguments); - } - - // Set up instrumentation through `window.__PROMISE_INTRUMENTATION__` - if (typeof window !== 'undefined' && typeof window.__PROMISE_INSTRUMENTATION__ === 'object') { - var callbacks = window.__PROMISE_INSTRUMENTATION__; - configure('instrument', true); - for (var eventName in callbacks) { - if (callbacks.hasOwnProperty(eventName)) { - on(eventName, callbacks[eventName]); - } - } - } - - __exports__.Promise = Promise; - __exports__.EventTarget = EventTarget; - __exports__.all = all; - __exports__.allSettled = allSettled; - __exports__.race = race; - __exports__.hash = hash; - __exports__.rethrow = rethrow; - __exports__.defer = defer; - __exports__.denodeify = denodeify; - __exports__.configure = configure; - __exports__.on = on; - __exports__.off = off; - __exports__.resolve = resolve; - __exports__.reject = reject; - __exports__.async = async; - __exports__.map = map; - __exports__.filter = filter; - }); -global.RSVP = requireModule('rsvp'); -}(window)); -'use strict'; - -var EPUBJS = EPUBJS || {}; -EPUBJS.VERSION = "0.2.3"; - -EPUBJS.plugins = EPUBJS.plugins || {}; - -EPUBJS.filePath = EPUBJS.filePath || "/epubjs/"; - -EPUBJS.Render = {}; - -(function(root) { - - var previousEpub = root.ePub || {}; - - var ePub = root.ePub = function() { - var bookPath, options; - - //-- var book = ePub("path/to/book.epub", { restore: true }) - if(typeof(arguments[0]) != 'undefined' && - typeof arguments[0] === 'string') { - - bookPath = arguments[0]; - - if( arguments[1] && typeof arguments[1] === 'object' ) { - options = arguments[1]; - options.bookPath = bookPath; - } else { - options = { 'bookPath' : bookPath }; - } - - } - - /* - * var book = ePub({ bookPath: "path/to/book.epub", restore: true }); - * - * - OR - - * - * var book = ePub({ restore: true }); - * book.open("path/to/book.epub"); - */ - - if( arguments[0] && typeof arguments[0] === 'object' ) { - options = arguments[0]; - } - - - return new EPUBJS.Book(options); - }; - - _.extend(ePub, { - noConflict : function() { - root.ePub = previousEpub; - return this; - } - }); - - //exports to multiple environments - if (typeof define === 'function' && define.amd) - //AMD - define(function(){ return ePub; }); - else if (typeof module != "undefined" && module.exports) - //Node - module.exports = ePub; - -})(window); - -EPUBJS.Book = function(options){ - - var book = this; - - this.settings = _.defaults(options || {}, { - bookPath : null, - bookKey : null, - packageUrl : null, - storage: false, //-- true (auto) or false (none) | override: 'ram', 'websqldatabase', 'indexeddb', 'filesystem' - fromStorage : false, - saved : false, - online : true, - contained : false, - width : null, - height: null, - layoutOveride : null, // Default: { spread: 'reflowable', layout: 'auto', orientation: 'auto'} - orientation : null, - minSpreadWidth: 800, //-- overridden by spread: none (never) / both (always) - gap: "auto", //-- "auto" or int - version: 1, - restore: false, - reload : false, - goto : false, - styles : {}, - headTags : {}, - withCredentials: false, - render_method: "Iframe" - }); - - this.settings.EPUBJSVERSION = EPUBJS.VERSION; - - this.spinePos = 0; - this.stored = false; - - //-- All Book events for listening - /* - book:ready - book:stored - book:online - book:offline - book:pageChanged - book:loadFailed - book:loadChapterFailed - */ - - //-- Adds Hook methods to the Book prototype - // Hooks will all return before triggering the callback. - // EPUBJS.Hooks.mixin(this); - //-- Get pre-registered hooks for events - // this.getHooks("beforeChapterDisplay"); - - this.online = this.settings.online || navigator.onLine; - this.networkListeners(); - - this.store = false; //-- False if not using storage; - - //-- Determine storage method - //-- Override options: none | ram | websqldatabase | indexeddb | filesystem - - if(this.settings.storage !== false){ - this.storage = new fileStorage.storage(this.settings.storage); - } - - this.ready = { - manifest: new RSVP.defer(), - spine: new RSVP.defer(), - metadata: new RSVP.defer(), - cover: new RSVP.defer(), - toc: new RSVP.defer(), - pageList: new RSVP.defer() - }; - - this.readyPromises = [ - this.ready.manifest.promise, - this.ready.spine.promise, - this.ready.metadata.promise, - this.ready.cover.promise, - this.ready.toc.promise - ]; - - this.pageList = []; - this.pagination = new EPUBJS.Pagination(); - this.pageListReady = this.ready.pageList.promise; - - this.ready.all = RSVP.all(this.readyPromises); - - this.ready.all.then(this._ready.bind(this)); - - // Queue for methods used before rendering - this.isRendered = false; - this._q = EPUBJS.core.queue(this); - // Queue for rendering - this._rendering = false; - this._displayQ = EPUBJS.core.queue(this); - // Queue for going to another location - this._moving = false; - this._gotoQ = EPUBJS.core.queue(this); - - /** - * Creates a new renderer. - * The renderer will handle displaying the content using the method provided in the settings - */ - this.renderer = new EPUBJS.Renderer(this.settings.render_method); - //-- Set the width at which to switch from spreads to single pages - this.renderer.setMinSpreadWidth(this.settings.minSpreadWidth); - this.renderer.setGap(this.settings.gap); - //-- Pass through the renderer events - this.listenToRenderer(this.renderer); - - this.defer_opened = new RSVP.defer(); - this.opened = this.defer_opened.promise; - // BookUrl is optional, but if present start loading process - if(typeof this.settings.bookPath === 'string') { - this.open(this.settings.bookPath, this.settings.reload); - } - - window.addEventListener("beforeunload", this.unload.bind(this), false); - - //-- Listen for these promises: - //-- book.opened.then() - //-- book.rendered.then() -}; - -//-- Check bookUrl and start parsing book Assets or load them from storage -EPUBJS.Book.prototype.open = function(bookPath, forceReload){ - var book = this, - epubpackage, - opened = new RSVP.defer(); - - this.settings.bookPath = bookPath; - - //-- Get a absolute URL from the book path - this.bookUrl = this.urlFrom(bookPath); - - if(this.settings.contained || this.isContained(bookPath)){ - - this.settings.contained = this.contained = true; - - this.bookUrl = ''; - - epubpackage = this.unarchive(bookPath). - then(function(){ - return book.loadPackage(); - }); - - } else { - epubpackage = this.loadPackage(); - } - - if(this.settings.restore && !forceReload && localStorage){ - //-- Will load previous package json, or re-unpack if error - epubpackage.then(function(packageXml) { - var identifier = book.packageIdentifier(packageXml); - var restored = book.restore(identifier); - - if(!restored) { - book.unpack(packageXml); - } - opened.resolve(); - book.defer_opened.resolve(); - }); - - }else{ - - //-- Get package information from epub opf - epubpackage.then(function(packageXml) { - book.unpack(packageXml); - opened.resolve(); - book.defer_opened.resolve(); - }); - } - - //-- If there is network connection, store the books contents - if(this.online && this.settings.storage && !this.settings.contained){ - if(!this.settings.stored) opened.then(book.storeOffline()); - } - - this._registerReplacements(this.renderer); - - return opened.promise; - -}; - -EPUBJS.Book.prototype.loadPackage = function(_containerPath){ - var book = this, - parse = new EPUBJS.Parser(), - containerPath = _containerPath || "META-INF/container.xml", - containerXml, - packageXml; - - if(!this.settings.packageUrl) { //-- provide the packageUrl to skip this step - packageXml = book.loadXml(book.bookUrl + containerPath). - then(function(containerXml){ - return parse.container(containerXml); // Container has path to content - }). - then(function(paths){ - book.settings.contentsPath = book.bookUrl + paths.basePath; - book.settings.packageUrl = book.bookUrl + paths.packagePath; - book.settings.encoding = paths.encoding; - return book.loadXml(book.settings.packageUrl); // Containes manifest, spine and metadata - }); - } else { - packageXml = book.loadXml(book.settings.packageUrl); - } - - packageXml.catch(function(error) { - // handle errors in either of the two requests - console.error("Could not load book at: "+ containerPath); - book.trigger("book:loadFailed", containerPath); - }); - return packageXml; -}; - -EPUBJS.Book.prototype.packageIdentifier = function(packageXml){ - var book = this, - parse = new EPUBJS.Parser(); - - return parse.identifier(packageXml); -}; - -EPUBJS.Book.prototype.unpack = function(packageXml){ - var book = this, - parse = new EPUBJS.Parser(); - - book.contents = parse.packageContents(packageXml, book.settings.contentsPath); // Extract info from contents - - book.manifest = book.contents.manifest; - book.spine = book.contents.spine; - book.spineIndexByURL = book.contents.spineIndexByURL; - book.metadata = book.contents.metadata; - if(!book.settings.bookKey) { - book.settings.bookKey = book.generateBookKey(book.metadata.identifier); - } - - //-- Set Globbal Layout setting based on metadata - book.globalLayoutProperties = book.parseLayoutProperties(book.metadata); - - if(book.contents.coverPath) { - book.cover = book.contents.cover = book.settings.contentsPath + book.contents.coverPath; - } - - book.spineNodeIndex = book.contents.spineNodeIndex; - - book.ready.manifest.resolve(book.contents.manifest); - book.ready.spine.resolve(book.contents.spine); - book.ready.metadata.resolve(book.contents.metadata); - book.ready.cover.resolve(book.contents.cover); - - - //-- Load the TOC, optional; either the EPUB3 XHTML Navigation file or the EPUB2 NCX file - if(book.contents.navPath) { - book.settings.navUrl = book.settings.contentsPath + book.contents.navPath; - - book.loadXml(book.settings.navUrl). - then(function(navHtml){ - return parse.nav(navHtml, book.spineIndexByURL, book.spine); // Grab Table of Contents - }).then(function(toc){ - book.toc = book.contents.toc = toc; - book.ready.toc.resolve(book.contents.toc); - }, function(error) { - book.ready.toc.resolve(false); - }); - - // Load the optional pageList - book.loadXml(book.settings.navUrl). - then(function(navHtml){ - return parse.pageList(navHtml, book.spineIndexByURL, book.spine); - }).then(function(pageList){ - var epubcfi = new EPUBJS.EpubCFI(); - var wait = 0; // need to generate a cfi - - // No pageList found - if(pageList.length === 0) { - return; - } - - book.pageList = book.contents.pageList = pageList; - - // Replace HREFs with CFI - book.pageList.forEach(function(pg){ - if(!pg.cfi) { - wait += 1; - epubcfi.generateCfiFromHref(pg.href, book).then(function(cfi){ - pg.cfi = cfi; - pg.packageUrl = book.settings.packageUrl; - - wait -= 1; - if(wait === 0) { - book.pagination.process(book.pageList); - book.ready.pageList.resolve(book.pageList); - } - }); - } - }); - - if(!wait) { - book.pagination.process(book.pageList); - book.ready.pageList.resolve(book.pageList); - } - - }, function(error) { - book.ready.pageList.resolve([]); - }); - } else if(book.contents.tocPath) { - book.settings.tocUrl = book.settings.contentsPath + book.contents.tocPath; - - book.loadXml(book.settings.tocUrl). - then(function(tocXml){ - return parse.toc(tocXml, book.spineIndexByURL, book.spine); // Grab Table of Contents - }).then(function(toc){ - book.toc = book.contents.toc = toc; - book.ready.toc.resolve(book.contents.toc); - }, function(error) { - book.ready.toc.resolve(false); - }); - - } else { - book.ready.toc.resolve(false); - } - -}; - -EPUBJS.Book.prototype.createHiddenRender = function(renderer, _width, _height) { - var box = this.element.getBoundingClientRect(); - var width = _width || this.settings.width || box.width; - var height = _height || this.settings.height || box.height; - var hiddenContainer; - var hiddenEl; - renderer.setMinSpreadWidth(this.settings.minSpreadWidth); - renderer.setGap(this.settings.gap); - - this._registerReplacements(renderer); - if(this.settings.forceSingle) { - renderer.forceSingle(true); - } - - hiddenContainer = document.createElement("div"); - hiddenContainer.style.visibility = "hidden"; - hiddenContainer.style.overflow = "hidden"; - hiddenContainer.style.width = "0"; - hiddenContainer.style.height = "0"; - this.element.appendChild(hiddenContainer); - - hiddenEl = document.createElement("div"); - hiddenEl.style.visibility = "hidden"; - hiddenEl.style.overflow = "hidden"; - hiddenEl.style.width = width + "px";//"0"; - hiddenEl.style.height = height +"px"; //"0"; - hiddenContainer.appendChild(hiddenEl); - - renderer.initialize(hiddenEl); - return hiddenContainer; -}; - -// Generates the pageList array by loading every chapter and paging through them -EPUBJS.Book.prototype.generatePageList = function(width, height){ - var pageList = []; - var pager = new EPUBJS.Renderer(this.settings.render_method, false); //hidden - var hiddenContainer = this.createHiddenRender(pager, width, height); - var deferred = new RSVP.defer(); - var spinePos = -1; - var spineLength = this.spine.length; - var totalPages = 0; - var currentPage = 0; - var nextChapter = function(deferred){ - var chapter; - var next = spinePos + 1; - var done = deferred || new RSVP.defer(); - var loaded; - if(next >= spineLength) { - done.resolve(); - } else { - spinePos = next; - chapter = new EPUBJS.Chapter(this.spine[spinePos], this.store); - pager.displayChapter(chapter, this.globalLayoutProperties).then(function(chap){ - pager.pageMap.forEach(function(item){ - currentPage += 1; - pageList.push({ - "cfi" : item.start, - "page" : currentPage - }); - - }); - - if(pager.pageMap.length % 2 > 0 && - pager.spreads) { - currentPage += 1; // Handle Spreads - pageList.push({ - "cfi" : pager.pageMap[pager.pageMap.length - 1].end, - "page" : currentPage - }); - } - - // Load up the next chapter - setTimeout(function(){ - nextChapter(done); - }, 1); - }); - } - return done.promise; - }.bind(this); - - var finished = nextChapter().then(function(){ - pager.remove(); - this.element.removeChild(hiddenContainer); - deferred.resolve(pageList); - }.bind(this)); - - return deferred.promise; -}; - -// Render out entire book and generate the pagination -// Width and Height are optional and will default to the current dimensions -EPUBJS.Book.prototype.generatePagination = function(width, height) { - var book = this; - var defered = new RSVP.defer(); - - this.ready.spine.promise.then(function(){ - book.generatePageList(width, height).then(function(pageList){ - book.pageList = book.contents.pageList = pageList; - book.pagination.process(pageList); - book.ready.pageList.resolve(book.pageList); - defered.resolve(book.pageList); - }); - }); - - return defered.promise; -}; - -// Process the pagination from a JSON array containing the pagelist -EPUBJS.Book.prototype.loadPagination = function(pagelistJSON) { - var pageList = JSON.parse(pagelistJSON); - - if(pageList && pageList.length) { - this.pageList = pageList; - this.pagination.process(this.pageList); - this.ready.pageList.resolve(this.pageList); - } - return this.pageList; -}; - -EPUBJS.Book.prototype.getPageList = function() { - return this.ready.pageList.promise; -}; - -EPUBJS.Book.prototype.getMetadata = function() { - return this.ready.metadata.promise; -}; - -EPUBJS.Book.prototype.getToc = function() { - return this.ready.toc.promise; -}; - -/* Private Helpers */ - -//-- Listeners for browser events -EPUBJS.Book.prototype.networkListeners = function(){ - var book = this; - - window.addEventListener("offline", function(e) { - book.online = false; - book.trigger("book:offline"); - }, false); - - window.addEventListener("online", function(e) { - book.online = true; - book.trigger("book:online"); - }, false); - -}; - -// Listen to all events the renderer triggers and pass them as book events -EPUBJS.Book.prototype.listenToRenderer = function(renderer){ - var book = this; - renderer.Events.forEach(function(eventName){ - renderer.on(eventName, function(e){ - book.trigger(eventName, e); - }); - }); - - renderer.on("renderer:visibleRangeChanged", function(range) { - var startPage, endPage, percent; - var pageRange = []; - - if(this.pageList.length > 0) { - startPage = this.pagination.pageFromCfi(range.start); - percent = this.pagination.percentageFromPage(startPage); - pageRange.push(startPage); - - if(range.end) { - endPage = this.pagination.pageFromCfi(range.end); - //if(startPage != endPage) { - pageRange.push(endPage); - //} - } - this.trigger("book:pageChanged", { - "anchorPage": startPage, - "percentage": percent, - "pageRange" : pageRange - }); - - // TODO: Add event for first and last page. - // (though last is going to be hard, since it could be several reflowed pages long) - } - }.bind(this)); - - renderer.on("render:loaded", this.loadChange.bind(this)); -}; - -// Listens for load events from the Renderer and checks against the current chapter -// Prevents the Render from loading a different chapter when back button is pressed -EPUBJS.Book.prototype.loadChange = function(url){ - var uri = EPUBJS.core.uri(url); - var chapter; - - if(this.currentChapter) { - chapter = EPUBJS.core.uri(this.currentChapter.absolute); - } - - if(!this._rendering && this.currentChapter && uri.path != chapter.path){ - console.warn("Miss Match", uri.path, this.currentChapter.absolute); - this.goto(uri.filename); - } -}; - -EPUBJS.Book.prototype.unlistenToRenderer = function(renderer){ - renderer.Events.forEach(function(eventName){ - renderer.off(eventName); - } ); -}; - -//-- Choose between a request from store or a request from network -EPUBJS.Book.prototype.loadXml = function(url){ - if(this.settings.fromStorage) { - return this.storage.getXml(url, this.settings.encoding); - } else if(this.settings.contained) { - return this.zip.getXml(url, this.settings.encoding); - }else{ - return EPUBJS.core.request(url, 'xml', this.settings.withCredentials); - } -}; - -//-- Turns a url into a absolute url -EPUBJS.Book.prototype.urlFrom = function(bookPath){ - var uri = EPUBJS.core.uri(bookPath), - absolute = uri.protocol, - fromRoot = uri.path[0] == "/", - location = window.location, - //-- Get URL orgin, try for native or combine - origin = location.origin || location.protocol + "//" + location.host, - baseTag = document.getElementsByTagName('base'), - base; - - - //-- Check is Base tag is set - - if(baseTag.length) { - base = baseTag[0].href; - } - - //-- 1. Check if url is absolute - if(uri.protocol){ - return uri.origin + uri.path; - } - - //-- 2. Check if url starts with /, add base url - if(!absolute && fromRoot){ - return (base || origin) + uri.path; - } - - //-- 3. Or find full path to url and add that - if(!absolute && !fromRoot){ - return EPUBJS.core.resolveUrl(base || location.pathname, uri.path); - } - -}; - - -EPUBJS.Book.prototype.unarchive = function(bookPath){ - var book = this, - unarchived; - - //-- Must use storage - // if(this.settings.storage == false ){ - // this.settings.storage = true; - // this.storage = new fileStorage.storage(); - // } - - this.zip = new EPUBJS.Unarchiver(); - this.store = this.zip; // Use zip storaged in ram - return this.zip.openZip(bookPath); -}; - -//-- Checks if url has a .epub or .zip extension -EPUBJS.Book.prototype.isContained = function(bookUrl){ - var uri = EPUBJS.core.uri(bookUrl); - - if(uri.extension && (uri.extension == "epub" || uri.extension == "zip")){ - return true; - } - - return false; -}; - -//-- Checks if the book can be retrieved from localStorage -EPUBJS.Book.prototype.isSaved = function(bookKey) { - var storedSettings; - - if(!localStorage) { - return false; - } - - storedSettings = localStorage.getItem(bookKey); - - if( !localStorage || - storedSettings === null) { - return false; - } else { - return true; - } -}; - -// Generates the Book Key using the identifer in the manifest or other string provided -EPUBJS.Book.prototype.generateBookKey = function(identifier){ - return "epubjs:" + EPUBJS.VERSION + ":" + window.location.host + ":" + identifier; -}; - -EPUBJS.Book.prototype.saveContents = function(){ - if(!localStorage) { - return false; - } - localStorage.setItem(this.settings.bookKey, JSON.stringify(this.contents)); -}; - -EPUBJS.Book.prototype.removeSavedContents = function() { - if(!localStorage) { - return false; - } - localStorage.removeItem(this.settings.bookKey); -}; - - - -//-- Takes a string or a element -EPUBJS.Book.prototype.renderTo = function(elem){ - var book = this, - rendered; - - if(_.isElement(elem)) { - this.element = elem; - } else if (typeof elem == "string") { - this.element = EPUBJS.core.getEl(elem); - } else { - console.error("Not an Element"); - return; - } - - rendered = this.opened. - then(function(){ - // book.render = new EPUBJS.Renderer[this.settings.renderer](book); - book.renderer.initialize(book.element, book.settings.width, book.settings.height); - book._rendered(); - return book.startDisplay(); - }); - - // rendered.then(null, function(error) { console.error(error); }); - - return rendered; -}; - -EPUBJS.Book.prototype.startDisplay = function(){ - var display; - - if(this.settings.goto) { - display = this.goto(this.settings.goto); - }else if(this.settings.previousLocationCfi) { - display = this.gotoCfi(this.settings.previousLocationCfi); - }else{ - display = this.displayChapter(this.spinePos); - } - - return display; -}; - -EPUBJS.Book.prototype.restore = function(identifier){ - - var book = this, - fetch = ['manifest', 'spine', 'metadata', 'cover', 'toc', 'spineNodeIndex', 'spineIndexByURL', 'globalLayoutProperties'], - reject = false, - bookKey = this.generateBookKey(identifier), - fromStore = localStorage.getItem(bookKey), - len = fetch.length, - i; - - if(this.settings.clearSaved) reject = true; - - if(!reject && fromStore != 'undefined' && fromStore !== null){ - book.contents = JSON.parse(fromStore); - - for(i = 0; i < len; i++) { - var item = fetch[i]; - - if(!book.contents[item]) { - reject = true; - break; - } - book[item] = book.contents[item]; - } - } - - if(reject || !fromStore || !this.contents || !this.settings.contentsPath){ - return false; - }else{ - this.settings.bookKey = bookKey; - this.ready.manifest.resolve(this.manifest); - this.ready.spine.resolve(this.spine); - this.ready.metadata.resolve(this.metadata); - this.ready.cover.resolve(this.cover); - this.ready.toc.resolve(this.toc); - return true; - } - -}; - -EPUBJS.Book.prototype.displayChapter = function(chap, end, deferred){ - var book = this, - render, - cfi, - pos, - store, - defer = deferred || new RSVP.defer(); - - var chapter; - - if(!this.isRendered) { - this._q.enqueue("displayChapter", arguments); - // Reject for now. TODO: pass promise to queue - defer.reject({ - message : "Rendering", - stack : new Error().stack - }); - return defer.promise; - } - - - if(this._rendering || this._rendering) { - // Pass along the current defer - this._displayQ.enqueue("displayChapter", [chap, end, defer]); - return defer.promise; - } - - if(_.isNumber(chap)){ - pos = chap; - }else{ - cfi = new EPUBJS.EpubCFI(chap); - pos = cfi.spinePos; - } - - if(pos < 0 || pos >= this.spine.length){ - console.warn("Not A Valid Location"); - pos = 0; - end = false; - cfi = false; - } - - //-- Create a new chapter - chapter = new EPUBJS.Chapter(this.spine[pos], this.store); - - this._rendering = true; - - render = book.renderer.displayChapter(chapter, this.globalLayoutProperties); - if(cfi) { - book.renderer.gotoCfi(cfi); - } else if(end) { - book.renderer.lastPage(); - } - //-- Success, Clear render queue - render.then(function(rendered){ - // var inwait; - //-- Set the book's spine position - book.spinePos = pos; - - defer.resolve(book.renderer); - - if(!book.settings.fromStorage && - !book.settings.contained) { - book.preloadNextChapter(); - } - - book.currentChapter = chapter; - book._rendering = false; - book._displayQ.dequeue(); - if(book._displayQ.length() === 0) { - book._gotoQ.dequeue(); - } - - }, function(error) { - // handle errors in either of the two requests - console.error("Could not load Chapter: "+ chapter.absolute); - book.trigger("book:chapterLoadFailed", chapter.absolute); - book._rendering = false; - defer.reject(error); - }); - - return defer.promise; -}; - -EPUBJS.Book.prototype.nextPage = function(){ - var next; - - if(!this.isRendered) return this._q.enqueue("nextPage", arguments); - - next = this.renderer.nextPage(); - - if(!next){ - return this.nextChapter(); - } -}; - -EPUBJS.Book.prototype.prevPage = function() { - var prev; - - if(!this.isRendered) return this._q.enqueue("prevPage", arguments); - - prev = this.renderer.prevPage(); - - if(!prev){ - return this.prevChapter(); - } -}; - -EPUBJS.Book.prototype.nextChapter = function() { - var next; - if (this.spinePos < this.spine.length - 1) { - next = this.spinePos + 1; - // Skip non linear chapters - while (this.spine[next] && this.spine[next].linear && this.spine[next].linear == 'no') { - next++; - } - if (next < this.spine.length) { - return this.displayChapter(next); - } else { - this.trigger("book:atEnd"); - } - - } else { - this.trigger("book:atEnd"); - } -}; - -EPUBJS.Book.prototype.prevChapter = function() { - var prev; - if (this.spinePos > 0) { - prev = this.spinePos - 1; - while (this.spine[prev] && this.spine[prev].linear && this.spine[prev].linear == 'no') { - prev--; - } - if (prev >= 0) { - return this.displayChapter(prev, true); - } else { - this.trigger("book:atStart"); - } - - } else { - this.trigger("book:atStart"); - } -}; - -EPUBJS.Book.prototype.getCurrentLocationCfi = function() { - if(!this.isRendered) return false; - return this.renderer.currentLocationCfi; -}; - -EPUBJS.Book.prototype.goto = function(target){ - - if(target.indexOf("epubcfi(") === 0) { - return this.gotoCfi(target); - } else if(target.indexOf("%") === target.length-1) { - return this.gotoPercentage(parseInt(target.substring(0, target.length-1))/100); - } else if(typeof target === "number" || isNaN(target) === false){ - return this.gotoPage(target); - } else { - return this.gotoHref(target); - } - -}; - -EPUBJS.Book.prototype.gotoCfi = function(cfiString, defer){ - var cfi, - spinePos, - spineItem, - rendered, - deferred = defer || new RSVP.defer(); - - if(!this.isRendered) { - console.warn("Not yet Rendered"); - this.settings.previousLocationCfi = cfiString; - return false; - } - - // Currently going to a chapter - if(this._moving || this._rendering) { - console.warn("Renderer is moving"); - this._gotoQ.enqueue("gotoCfi", [cfiString, deferred]); - return false; - } - - cfi = new EPUBJS.EpubCFI(cfiString); - spinePos = cfi.spinePos; - - if(spinePos == -1) { - return false; - } - - spineItem = this.spine[spinePos]; - promise = deferred.promise; - this._moving = true; - //-- If same chapter only stay on current chapter - if(this.currentChapter && this.spinePos === spinePos){ - this.renderer.gotoCfi(cfi); - this._moving = false; - deferred.resolve(this.renderer.currentLocationCfi); - } else { - - if(!spineItem || spinePos == -1) { - spinePos = 0; - spineItem = this.spine[spinePos]; - } - - this.currentChapter = new EPUBJS.Chapter(spineItem, this.store); - - if(this.currentChapter) { - this.spinePos = spinePos; - render = this.renderer.displayChapter(this.currentChapter, this.globalLayoutProperties); - - this.renderer.gotoCfi(cfi); - render.then(function(rendered){ - this._moving = false; - deferred.resolve(rendered.currentLocationCfi); - }.bind(this)); - } - } - - promise.then(function(){ - this._gotoQ.dequeue(); - }.bind(this)); - - return promise; -}; - -EPUBJS.Book.prototype.gotoHref = function(url, defer){ - var split, chapter, section, relativeURL, spinePos; - var deferred = defer || new RSVP.defer(); - - if(!this.isRendered) { - this.settings.goto = url; - return false; - } - - // Currently going to a chapter - if(this._moving || this._rendering) { - this._gotoQ.enqueue("gotoHref", [url, deferred]); - return false; - } - - split = url.split("#"); - chapter = split[0]; - section = split[1] || false; - // absoluteURL = (chapter.search("://") === -1) ? (this.settings.contentsPath + chapter) : chapter; - relativeURL = chapter.replace(this.settings.contentsPath, ''); - spinePos = this.spineIndexByURL[relativeURL]; - - //-- If link fragment only stay on current chapter - if(!chapter){ - spinePos = this.currentChapter ? this.currentChapter.spinePos : 0; - } - - //-- Check that URL is present in the index, or stop - if(typeof(spinePos) != "number") return false; - - if(!this.currentChapter || spinePos != this.currentChapter.spinePos){ - //-- Load new chapter if different than current - return this.displayChapter(spinePos).then(function(){ - if(section){ - this.renderer.section(section); - } - deferred.resolve(this.renderer.currentLocationCfi); - }.bind(this)); - }else{ - //-- Goto section - if(section) { - this.renderer.section(section); - } else { - // Or jump to the start - this.renderer.firstPage(); - } - deferred.resolve(this.renderer.currentLocationCfi); - } - - deferred.promise.then(function(){ - this._gotoQ.dequeue(); - }.bind(this)); - - return deferred.promise; -}; - -EPUBJS.Book.prototype.gotoPage = function(pg){ - var cfi = this.pagination.cfiFromPage(pg); - return this.gotoCfi(cfi); -}; - -EPUBJS.Book.prototype.gotoPercentage = function(percent){ - var pg = this.pagination.pageFromPercentage(percent); - return this.gotoPage(pg); -}; - -EPUBJS.Book.prototype.preloadNextChapter = function() { - var next; - var chap = this.spinePos + 1; - - if(chap >= this.spine.length){ - return false; - } - - next = new EPUBJS.Chapter(this.spine[chap]); - if(next) { - EPUBJS.core.request(next.absolute); - } -}; - - -EPUBJS.Book.prototype.storeOffline = function() { - var book = this, - assets = _.values(this.manifest); - - //-- Creates a queue of all items to load - return EPUBJS.storage.batch(assets). - then(function(){ - book.settings.stored = true; - book.trigger("book:stored"); - }); -}; - -EPUBJS.Book.prototype.availableOffline = function() { - return this.settings.stored > 0 ? true : false; -}; - -/* -EPUBJS.Book.prototype.fromStorage = function(stored) { - - if(this.contained) return; - - if(!stored){ - this.online = true; - this.tell("book:online"); - }else{ - if(!this.availableOffline){ - //-- If book hasn't been cached yet, store offline - this.storeOffline(function(){ - this.online = false; - this.tell("book:offline"); - }.bind(this)); - - }else{ - this.online = false; - this.tell("book:offline"); - } - } - -} -*/ - -EPUBJS.Book.prototype.setStyle = function(style, val, prefixed) { - var noreflow = ["color", "background", "background-color"]; - - if(!this.isRendered) return this._q.enqueue("setStyle", arguments); - - this.settings.styles[style] = val; - - this.renderer.setStyle(style, val, prefixed); - - if(noreflow.indexOf(style) === -1) { - // clearTimeout(this.reformatTimeout); - // this.reformatTimeout = setTimeout(function(){ - this.renderer.reformat(); - // }.bind(this), 10); - } -}; - -EPUBJS.Book.prototype.removeStyle = function(style) { - if(!this.isRendered) return this._q.enqueue("removeStyle", arguments); - this.renderer.removeStyle(style); - this.renderer.reformat(); - delete this.settings.styles[style]; -}; - -EPUBJS.Book.prototype.addHeadTag = function(tag, attrs) { - if(!this.isRendered) return this._q.enqueue("addHeadTag", arguments); - this.settings.headTags[tag] = attrs; -}; - -EPUBJS.Book.prototype.useSpreads = function(use) { - console.warn("useSpreads is deprecated, use forceSingle or set a layoutOveride instead"); - if(use === false) { - this.forceSingle(true); - } else { - this.forceSingle(false); - } -}; - -EPUBJS.Book.prototype.forceSingle = function(_use) { - var force = typeof _use === "undefined" ? true : _use; - - this.renderer.forceSingle(force); - this.settings.forceSingle = force; - if(this.isRendered) { - this.renderer.reformat(); - } -}; - -EPUBJS.Book.prototype.setMinSpreadWidth = function(width) { - this.settings.minSpreadWidth = width; - if(this.isRendered) { - this.renderer.setMinSpreadWidth(this.settings.minSpreadWidth); - this.renderer.reformat(); - } -}; - -EPUBJS.Book.prototype.setGap = function(gap) { - this.settings.gap = gap; - if(this.isRendered) { - this.renderer.setGap(this.settings.gap); - this.renderer.reformat(); - } -}; - -EPUBJS.Book.prototype.chapter = function(path) { - var spinePos = this.spineIndexByURL[path]; - var spineItem; - var chapter; - - if(spinePos){ - spineItem = this.spine[spinePos]; - chapter = new EPUBJS.Chapter(spineItem, this.store); - chapter.load(); - } - return chapter; -}; - -EPUBJS.Book.prototype.unload = function(){ - - if(this.settings.restore && localStorage) { - this.saveContents(); - } - - this.unlistenToRenderer(this.renderer); - - this.trigger("book:unload"); -}; - -EPUBJS.Book.prototype.destroy = function() { - - window.removeEventListener("beforeunload", this.unload); - - if(this.currentChapter) this.currentChapter.unload(); - - this.unload(); - - if(this.render) this.render.remove(); - -}; - -EPUBJS.Book.prototype._ready = function() { - - this.trigger("book:ready"); - -}; - -EPUBJS.Book.prototype._rendered = function(err) { - var book = this; - - this.isRendered = true; - this.trigger("book:rendered"); - - this._q.flush(); -}; - - -EPUBJS.Book.prototype.applyStyles = function(renderer, callback){ - // if(!this.isRendered) return this._q.enqueue("applyStyles", arguments); - renderer.applyStyles(this.settings.styles); - callback(); -}; - -EPUBJS.Book.prototype.applyHeadTags = function(renderer, callback){ - // if(!this.isRendered) return this._q.enqueue("applyHeadTags", arguments); - renderer.applyHeadTags(this.settings.headTags); - callback(); -}; - -EPUBJS.Book.prototype._registerReplacements = function(renderer){ - renderer.registerHook("beforeChapterDisplay", this.applyStyles.bind(this, renderer), true); - renderer.registerHook("beforeChapterDisplay", this.applyHeadTags.bind(this, renderer), true); - renderer.registerHook("beforeChapterDisplay", EPUBJS.replace.hrefs.bind(this), true); - - if(this._needsAssetReplacement()) { - - renderer.registerHook("beforeChapterDisplay", [ - EPUBJS.replace.head, - EPUBJS.replace.resources, - EPUBJS.replace.svg - ], true); - - } - -}; - -EPUBJS.Book.prototype._needsAssetReplacement = function(){ - if(this.settings.fromStorage) { - - //-- Filesystem api links are relative, so no need to replace them - if(this.storage.getStorageType() == "filesystem") { - return false; - } - - return true; - - } else if(this.settings.contained) { - - return true; - - } else { - - return false; - - } -}; - - -//-- http://www.idpf.org/epub/fxl/ -EPUBJS.Book.prototype.parseLayoutProperties = function(metadata){ - var layout = (this.layoutOveride && this.layoutOveride.layout) || metadata.layout || "reflowable"; - var spread = (this.layoutOveride && this.layoutOveride.spread) || metadata.spread || "auto"; - var orientation = (this.layoutOveride && this.layoutOveride.orientation) || metadata.orientation || "auto"; - return { - layout : layout, - spread : spread, - orientation : orientation - }; -}; - -//-- Enable binding events to book -RSVP.EventTarget.mixin(EPUBJS.Book.prototype); - -//-- Handle RSVP Errors -RSVP.on('error', function(event) { - //console.error(event, event.detail); -}); - -RSVP.configure('instrument', true); //-- true | will logging out all RSVP rejections -// RSVP.on('created', listener); -// RSVP.on('chained', listener); -// RSVP.on('fulfilled', listener); -RSVP.on('rejected', function(event){ - console.error(event.detail.message, event.detail.stack); -}); - -EPUBJS.Chapter = function(spineObject, store){ - this.href = spineObject.href; - this.absolute = spineObject.url; - this.id = spineObject.id; - this.spinePos = spineObject.index; - this.cfiBase = spineObject.cfiBase; - this.properties = spineObject.properties; - this.manifestProperties = spineObject.manifestProperties; - this.linear = spineObject.linear; - this.pages = 1; - this.store = store; - this.epubcfi = new EPUBJS.EpubCFI(); - this.deferred = new RSVP.defer(); - this.loaded = this.deferred.promise; -}; - - -EPUBJS.Chapter.prototype.load = function(_store){ - var store = _store || this.store; - var promise; - // if(this.store && (!this.book.online || this.book.contained)) - if(store){ - promise = store.get(this.href); - }else{ - promise = EPUBJS.core.request(this.absolute, 'xml'); - } - - promise.then(function(xml){ - this.setDocument(xml); - this.deferred.resolve(this); - }.bind(this)); - - return promise; -}; - -EPUBJS.Chapter.prototype.render = function(_store){ - - return this.load().then(function(doc){ - - var serializer = new XMLSerializer(); - var contents; - var head = doc.head; - var base = doc.createElement("base"); - - base.setAttribute("href", window.location.origin + this.absolute); - head.insertBefore(base, head.firstChild); - contents = serializer.serializeToString(doc); - - return contents; - - }.bind(this)); -}; - -EPUBJS.Chapter.prototype.url = function(_store){ - var deferred = new RSVP.defer(); - var store = _store || this.store; - var loaded; - var chapter = this; - var url; - - if(store){ - if(!this.tempUrl) { - store.getUrl(this.absolute).then(function(url){ - chapter.tempUrl = url; - deferred.resolve(url); - }); - } else { - url = this.tempUrl; - deferred.resolve(url); - } - }else{ - url = this.absolute; - deferred.resolve(url); - } - /* - loaded = EPUBJS.core.request(url, 'xml', false); - loaded.then(function(contents){ - chapter.contents = contents; - deferred.resolve(chapter.absolute); - }, function(error){ - deferred.reject(error); - }); - */ - - return deferred.promise; -}; - -EPUBJS.Chapter.prototype.setPages = function(num){ - this.pages = num; -}; - -EPUBJS.Chapter.prototype.getPages = function(num){ - return this.pages; -}; - -EPUBJS.Chapter.prototype.getID = function(){ - return this.ID; -}; - -EPUBJS.Chapter.prototype.unload = function(store){ - this.document = null; - if(this.tempUrl && store) { - store.revokeUrl(this.tempUrl); - this.tempUrl = false; - } -}; - -EPUBJS.Chapter.prototype.setDocument = function(_document){ - var uri = _document.namespaceURI; - var doctype = _document.doctype; - - // Creates an empty document - this.document = _document.implementation.createDocument( - uri, - null, - null - ); - this.contents = this.document.importNode( - _document.documentElement, //node to import - true //clone its descendants - ); - - this.document.appendChild(this.contents); - - // Fix to apply wgxpath to new document in IE - if(!this.document.evaluate && document.evaluate) { - this.document.evaluate = document.evaluate; - } - - // this.deferred.resolve(this.contents); -}; - -EPUBJS.Chapter.prototype.cfiFromRange = function(_range) { - var range; - var startXpath, endXpath; - var startContainer, endContainer; - var cleanTextContent, cleanEndTextContent; - - // Check for Contents - if(!this.document) return; - startXpath = EPUBJS.core.getElementXPath(_range.startContainer); - // console.log(startContainer) - endXpath = EPUBJS.core.getElementXPath(_range.endContainer); - - startContainer = this.document.evaluate(startXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - - if(!_range.collapsed) { - endContainer = this.document.evaluate(endXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - } - - range = this.document.createRange(); - // Find Exact Range in original document - if(startContainer) { - try { - range.setStart(startContainer, _range.startOffset); - if(!_range.collapsed && endContainer) { - range.setEnd(endContainer, _range.endOffset); - } - } catch (e) { - console.log("missed"); - startContainer = false; - } - - } - - // Fuzzy Match - if(!startContainer) { - console.log("not found, try fuzzy match"); - cleanStartTextContent = EPUBJS.core.cleanStringForXpath(_range.startContainer.textContent); - startXpath = "//text()[contains(.," + cleanStartTextContent + ")]"; - - startContainer = this.document.evaluate(startXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - - if(startContainer){ - // console.log("Found with Fuzzy"); - range.setStart(startContainer, _range.startOffset); - - if(!_range.collapsed) { - cleanEndTextContent = EPUBJS.core.cleanStringForXpath(_range.endContainer.textContent); - endXpath = "//text()[contains(.," + cleanEndTextContent + ")]"; - endContainer = this.document.evaluate(endXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - if(endContainer) { - range.setEnd(endContainer, _range.endOffset); - } - } - - } - } - - // Generate the Cfi - return this.epubcfi.generateCfiFromRange(range, this.cfiBase); -}; - -EPUBJS.Chapter.prototype.find = function(_query){ - var chapter = this; - var matches = []; - var query = _query.toLowerCase(); - //var xpath = this.document.evaluate(".//text()[contains(translate(., '"+query.toUpperCase()+"', '"+query+"'),'"+query+"')]", this.document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); - var find = function(node){ - // Search String - var text = node.textContent.toLowerCase(); - var range = chapter.document.createRange(); - var cfi; - var pos; - var last = -1; - var excerpt; - var limit = 150; - - while (pos != -1) { - pos = text.indexOf(query, last + 1); - - if(pos != -1) { - // If Found, Create Range - range = chapter.document.createRange(); - range.setStart(node, pos); - range.setEnd(node, pos + query.length); - - //Generate CFI - cfi = chapter.cfiFromRange(range); - - // Generate Excerpt - if(node.textContent.length < limit) { - excerpt = node.textContent; - } else { - excerpt = node.textContent.substring(pos-limit/2,pos+limit/2); - excerpt = "..." + excerpt + "..."; - } - - //Add CFI to list - matches.push({ - cfi: cfi, - excerpt: excerpt - }); - } - - last = pos; - } - - }; - - // Grab text nodes - - /* - for ( var i=0 ; i < xpath.snapshotLength; i++ ) { - find(xpath.snapshotItem(i)); - } - */ - - this.textSprint(this.document, function(node){ - find(node); - }); - - - // Return List of CFIs - return matches; -}; - - -EPUBJS.Chapter.prototype.textSprint = function(root, func) { - var treeWalker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, { - acceptNode: function (node) { - if (node.data && ! /^\s*$/.test(node.data) ) { - return NodeFilter.FILTER_ACCEPT; - } else { - return NodeFilter.FILTER_REJECT; - } - } - }, false); - var node; - while ((node = treeWalker.nextNode())) { - func(node); - } - -}; -var EPUBJS = EPUBJS || {}; -EPUBJS.core = {}; - -//-- Get a element for an id -EPUBJS.core.getEl = function(elem) { - return document.getElementById(elem); -}; - -//-- Get all elements for a class -EPUBJS.core.getEls = function(classes) { - return document.getElementsByClassName(classes); -}; - -EPUBJS.core.request = function(url, type, withCredentials) { - var supportsURL = window.URL; - var BLOB_RESPONSE = supportsURL ? "blob" : "arraybuffer"; - - var deferred = new RSVP.defer(); - - var xhr = new XMLHttpRequest(); - - //-- Check from PDF.js: - // https://github.com/mozilla/pdf.js/blob/master/web/compatibility.js - var xhrPrototype = XMLHttpRequest.prototype; - - if (!('overrideMimeType' in xhrPrototype)) { - // IE10 might have response, but not overrideMimeType - Object.defineProperty(xhrPrototype, 'overrideMimeType', { - value: function xmlHttpRequestOverrideMimeType(mimeType) {} - }); - } - if(withCredentials) { - xhr.withCredentials = true; - } - xhr.open("GET", url, true); - xhr.onreadystatechange = handler; - - if(type == 'blob'){ - xhr.responseType = BLOB_RESPONSE; - } - - if(type == "json") { - xhr.setRequestHeader("Accept", "application/json"); - } - - if(type == 'xml') { - xhr.overrideMimeType('text/xml'); - } - - if(type == "binary") { - xhr.responseType = "arraybuffer"; - } - - xhr.send(); - - function handler() { - if (this.readyState === this.DONE) { - if (this.status === 200 || this.responseXML ) { //-- Firefox is reporting 0 for blob urls - var r; - - if(type == 'xml'){ - r = this.responseXML; - }else - if(type == 'json'){ - r = JSON.parse(this.response); - }else - if(type == 'blob'){ - - if(supportsURL) { - r = this.response; - } else { - //-- Safari doesn't support responseType blob, so create a blob from arraybuffer - r = new Blob([this.response]); - } - - }else{ - r = this.response; - } - - deferred.resolve(r); - } else { - deferred.reject({ - message : this.response, - stack : new Error().stack - }); - } - } - } - - return deferred.promise; -}; - -EPUBJS.core.toArray = function(obj) { - var arr = []; - - for (var member in obj) { - var newitm; - if ( obj.hasOwnProperty(member) ) { - newitm = obj[member]; - newitm.ident = member; - arr.push(newitm); - } - } - - return arr; -}; - -//-- Parse the different parts of a url, returning a object -EPUBJS.core.uri = function(url){ - var uri = { - protocol : '', - host : '', - path : '', - origin : '', - directory : '', - base : '', - filename : '', - extension : '', - fragment : '', - href : url - }, - blob = url.indexOf('blob:'), - doubleSlash = url.indexOf('://'), - search = url.indexOf('?'), - fragment = url.indexOf("#"), - withoutProtocol, - dot, - firstSlash; - - if(blob === 0) { - uri.protocol = "blob"; - uri.base = url.indexOf(0, fragment); - return uri; - } - - if(fragment != -1) { - uri.fragment = url.slice(fragment + 1); - url = url.slice(0, fragment); - } - - if(search != -1) { - uri.search = url.slice(search + 1); - url = url.slice(0, search); - href = url; - } - - if(doubleSlash != -1) { - uri.protocol = url.slice(0, doubleSlash); - withoutProtocol = url.slice(doubleSlash+3); - firstSlash = withoutProtocol.indexOf('/'); - - if(firstSlash === -1) { - uri.host = uri.path; - uri.path = ""; - } else { - uri.host = withoutProtocol.slice(0, firstSlash); - uri.path = withoutProtocol.slice(firstSlash); - } - - - uri.origin = uri.protocol + "://" + uri.host; - - uri.directory = EPUBJS.core.folder(uri.path); - - uri.base = uri.origin + uri.directory; - // return origin; - } else { - uri.path = url; - uri.directory = EPUBJS.core.folder(url); - uri.base = uri.directory; - } - - //-- Filename - uri.filename = url.replace(uri.base, ''); - dot = uri.filename.lastIndexOf('.'); - if(dot != -1) { - uri.extension = uri.filename.slice(dot+1); - } - return uri; -}; - -//-- Parse out the folder, will return everything before the last slash - -EPUBJS.core.folder = function(url){ - - var lastSlash = url.lastIndexOf('/'); - - if(lastSlash == -1) var folder = ''; - - folder = url.slice(0, lastSlash + 1); - - return folder; - -}; - -//-- https://github.com/ebidel/filer.js/blob/master/src/filer.js#L128 -EPUBJS.core.dataURLToBlob = function(dataURL) { - var BASE64_MARKER = ';base64,', - parts, contentType, raw, rawLength, uInt8Array; - - if (dataURL.indexOf(BASE64_MARKER) == -1) { - parts = dataURL.split(','); - contentType = parts[0].split(':')[1]; - raw = parts[1]; - - return new Blob([raw], {type: contentType}); - } - - parts = dataURL.split(BASE64_MARKER); - contentType = parts[0].split(':')[1]; - raw = window.atob(parts[1]); - rawLength = raw.length; - - uInt8Array = new Uint8Array(rawLength); - - for (var i = 0; i < rawLength; ++i) { - uInt8Array[i] = raw.charCodeAt(i); - } - - return new Blob([uInt8Array], {type: contentType}); -}; - -//-- Load scripts async: http://stackoverflow.com/questions/7718935/load-scripts-asynchronously -EPUBJS.core.addScript = function(src, callback, target) { - var s, r; - r = false; - s = document.createElement('script'); - s.type = 'text/javascript'; - s.async = false; - s.src = src; - s.onload = s.onreadystatechange = function() { - if ( !r && (!this.readyState || this.readyState == 'complete') ) { - r = true; - if(callback) callback(); - } - }; - target = target || document.body; - target.appendChild(s); -}; - -EPUBJS.core.addScripts = function(srcArr, callback, target) { - var total = srcArr.length, - curr = 0, - cb = function(){ - curr++; - if(total == curr){ - if(callback) callback(); - }else{ - EPUBJS.core.addScript(srcArr[curr], cb, target); - } - }; - - EPUBJS.core.addScript(srcArr[curr], cb, target); -}; - -EPUBJS.core.addCss = function(src, callback, target) { - var s, r; - r = false; - s = document.createElement('link'); - s.type = 'text/css'; - s.rel = "stylesheet"; - s.href = src; - s.onload = s.onreadystatechange = function() { - if ( !r && (!this.readyState || this.readyState == 'complete') ) { - r = true; - if(callback) callback(); - } - }; - target = target || document.body; - target.appendChild(s); -}; - -EPUBJS.core.prefixed = function(unprefixed) { - var vendors = ["Webkit", "Moz", "O", "ms" ], - prefixes = ['-Webkit-', '-moz-', '-o-', '-ms-'], - upper = unprefixed[0].toUpperCase() + unprefixed.slice(1), - length = vendors.length; - - if (typeof(document.body.style[unprefixed]) != 'undefined') { - return unprefixed; - } - - for ( var i=0; i < length; i++ ) { - if (typeof(document.body.style[vendors[i] + upper]) != 'undefined') { - return vendors[i] + upper; - } - } - - return unprefixed; -}; - -EPUBJS.core.resolveUrl = function(base, path) { - var url, - segments = [], - uri = EPUBJS.core.uri(path), - folders = base.split("/"), - paths; - - if(uri.host) { - return path; - } - - folders.pop(); - - paths = path.split("/"); - paths.forEach(function(p){ - if(p === ".."){ - folders.pop(); - }else{ - segments.push(p); - } - }); - - url = folders.concat(segments); - - return url.join("/"); -}; - -// http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript -EPUBJS.core.uuid = function() { - var d = new Date().getTime(); - var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = (d + Math.random()*16)%16 | 0; - d = Math.floor(d/16); - return (c=='x' ? r : (r&0x7|0x8)).toString(16); - }); - return uuid; -}; - -// Fast quicksort insert for sorted array -- based on: -// http://stackoverflow.com/questions/1344500/efficient-way-to-insert-a-number-into-a-sorted-array-of-numbers -EPUBJS.core.insert = function(item, array, compareFunction) { - var location = EPUBJS.core.locationOf(item, array, compareFunction); - array.splice(location, 0, item); - - return location; -}; - -EPUBJS.core.locationOf = function(item, array, compareFunction, _start, _end) { - var start = _start || 0; - var end = _end || array.length; - var pivot = parseInt(start + (end - start) / 2); - var compared; - if(!compareFunction){ - compareFunction = function(a, b) { - if(a > b) return 1; - if(a < b) return -1; - if(a = b) return 0; - }; - } - if(end-start <= 0) { - return pivot; - } - - compared = compareFunction(array[pivot], item); - if(end-start === 1) { - return compared > 0 ? pivot : pivot + 1; - } - - if(compared === 0) { - return pivot; - } - if(compared === -1) { - return EPUBJS.core.locationOf(item, array, compareFunction, pivot, end); - } else{ - return EPUBJS.core.locationOf(item, array, compareFunction, start, pivot); - } -}; - -EPUBJS.core.indexOfSorted = function(item, array, compareFunction, _start, _end) { - var start = _start || 0; - var end = _end || array.length; - var pivot = parseInt(start + (end - start) / 2); - var compared; - if(!compareFunction){ - compareFunction = function(a, b) { - if(a > b) return 1; - if(a < b) return -1; - if(a = b) return 0; - }; - } - if(end-start <= 0) { - return -1; // Not found - } - - compared = compareFunction(array[pivot], item); - if(end-start === 1) { - return compared === 0 ? pivot : -1; - } - if(compared === 0) { - return pivot; // Found - } - if(compared === -1) { - return EPUBJS.core.indexOfSorted(item, array, compareFunction, pivot, end); - } else{ - return EPUBJS.core.indexOfSorted(item, array, compareFunction, start, pivot); - } -}; - - -EPUBJS.core.queue = function(_scope){ - var _q = []; - var scope = _scope; - // Add an item to the queue - var enqueue = function(funcName, args, context) { - _q.push({ - "funcName" : funcName, - "args" : args, - "context" : context - }); - return _q; - }; - // Run one item - var dequeue = function(){ - var inwait; - if(_q.length) { - inwait = _q.shift(); - // Defer to any current tasks - // setTimeout(function(){ - scope[inwait.funcName].apply(inwait.context || scope, inwait.args); - // }, 0); - } - }; - - // Run All - var flush = function(){ - while(_q.length) { - dequeue(); - } - }; - // Clear all items in wait - var clear = function(){ - _q = []; - }; - - var length = function(){ - return _q.length; - }; - - return { - "enqueue" : enqueue, - "dequeue" : dequeue, - "flush" : flush, - "clear" : clear, - "length" : length - }; -}; - -// From: https://code.google.com/p/fbug/source/browse/branches/firebug1.10/content/firebug/lib/xpath.js -/** - * Gets an XPath for an element which describes its hierarchical location. +/*! + * @overview RSVP - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/tildeio/rsvp.js/master/LICENSE + * @version 3.1.0 */ -EPUBJS.core.getElementXPath = function(element) { - if (element && element.id) { - return '//*[@id="' + element.id + '"]'; - } else { - return EPUBJS.core.getElementTreeXPath(element); - } -}; - -EPUBJS.core.getElementTreeXPath = function(element) { - var paths = []; - var isXhtml = (element.ownerDocument.documentElement.getAttribute('xmlns') === "http://www.w3.org/1999/xhtml"); - var index, nodeName, tagName, pathIndex; - - if(element.nodeType === Node.TEXT_NODE){ - // index = Array.prototype.indexOf.call(element.parentNode.childNodes, element) + 1; - index = EPUBJS.core.indexOfTextNode(element) + 1; - - paths.push("text()["+index+"]"); - element = element.parentNode; - } - - // Use nodeName (instead of localName) so namespace prefix is included (if any). - for (; element && element.nodeType == 1; element = element.parentNode) - { - index = 0; - for (var sibling = element.previousSibling; sibling; sibling = sibling.previousSibling) - { - // Ignore document type declaration. - if (sibling.nodeType == Node.DOCUMENT_TYPE_NODE) { - continue; - } - if (sibling.nodeName == element.nodeName) { - ++index; - } - } - nodeName = element.nodeName.toLowerCase(); - tagName = (isXhtml ? "xhtml:" + nodeName : nodeName); - pathIndex = (index ? "[" + (index+1) + "]" : ""); - paths.splice(0, 0, tagName + pathIndex); - } - - return paths.length ? "./" + paths.join("/") : null; -}; - -EPUBJS.core.nsResolver = function(prefix) { - var ns = { - 'xhtml' : 'http://www.w3.org/1999/xhtml', - 'epub': 'http://www.idpf.org/2007/ops' - }; - return ns[prefix] || null; -}; - -//https://stackoverflow.com/questions/13482352/xquery-looking-for-text-with-single-quote/13483496#13483496 -EPUBJS.core.cleanStringForXpath = function(str) { - var parts = str.match(/[^'"]+|['"]/g); - parts = parts.map(function(part){ - if (part === "'") { - return '\"\'\"'; // output "'" - } - - if (part === '"') { - return "\'\"\'"; // output '"' - } - return "\'" + part + "\'"; - }); - return "concat(\'\'," + parts.join(",") + ")"; -}; - -EPUBJS.core.indexOfTextNode = function(textNode){ - var parent = textNode.parentNode; - var children = parent.childNodes; - var sib; - var index = -1; - for (var i = 0; i < children.length; i++) { - sib = children[i]; - if(sib.nodeType === Node.TEXT_NODE){ - index++; - } - if(sib == textNode) break; - } - - return index; -}; -EPUBJS.EpubCFI = function(cfiStr){ - if(cfiStr) return this.parse(cfiStr); -}; - -EPUBJS.EpubCFI.prototype.generateChapterComponent = function(_spineNodeIndex, _pos, id) { - var pos = parseInt(_pos), - spineNodeIndex = _spineNodeIndex + 1, - cfi = '/'+spineNodeIndex+'/'; - - cfi += (pos + 1) * 2; - - if(id) cfi += "[" + id + "]"; - - //cfi += "!"; - - return cfi; -}; - -EPUBJS.EpubCFI.prototype.generatePathComponent = function(steps) { - var parts = []; - - steps.forEach(function(part){ - var segment = ''; - segment += (part.index + 1) * 2; - - if(part.id) { - segment += "[" + part.id + "]"; - } - - parts.push(segment); - }); - - return parts.join('/'); -}; - -EPUBJS.EpubCFI.prototype.generateCfiFromElement = function(element, chapter) { - var steps = this.pathTo(element); - var path = this.generatePathComponent(steps); - if(!path.length) { - // Start of Chapter - return "epubcfi(" + chapter + "!/4/)"; - } else { - // First Text Node - return "epubcfi(" + chapter + "!" + path + "/1:0)"; - } -}; - -EPUBJS.EpubCFI.prototype.pathTo = function(node) { - var stack = [], - children; - - while(node && node.parentNode !== null && node.parentNode.nodeType != 9) { - children = node.parentNode.children; - - stack.unshift({ - 'id' : node.id, - // 'classList' : node.classList, - 'tagName' : node.tagName, - 'index' : children ? Array.prototype.indexOf.call(children, node) : 0 - }); - - node = node.parentNode; - } - - return stack; -}; - -EPUBJS.EpubCFI.prototype.getChapterComponent = function(cfiStr) { - - var splitStr = cfiStr.split("!"); - - return splitStr[0]; -}; - -EPUBJS.EpubCFI.prototype.getPathComponent = function(cfiStr) { - - var splitStr = cfiStr.split("!"); - var pathComponent = splitStr[1] ? splitStr[1].split(":") : ''; - - return pathComponent[0]; -}; - -EPUBJS.EpubCFI.prototype.getCharecterOffsetComponent = function(cfiStr) { - var splitStr = cfiStr.split(":"); - return splitStr[1] || ''; -}; - - -EPUBJS.EpubCFI.prototype.parse = function(cfiStr) { - var cfi = {}, - chapSegment, - chapterComponent, - pathComponent, - charecterOffsetComponent, - assertion, - chapId, - path, - end, - endInt, - text, - parseStep = function(part){ - var type, index, has_brackets, id; - - type = "element"; - index = parseInt(part) / 2 - 1; - has_brackets = part.match(/\[(.*)\]/); - if(has_brackets && has_brackets[1]){ - id = has_brackets[1]; - } - - return { - "type" : type, - 'index' : index, - 'id' : id || false - }; - }; - - if(typeof cfiStr !== "string") { - return {spinePos: -1}; - } - - cfi.str = cfiStr; - - if(cfiStr.indexOf("epubcfi(") === 0 && cfiStr[cfiStr.length-1] === ")") { - // Remove intial epubcfi( and ending ) - cfiStr = cfiStr.slice(8, cfiStr.length-1); - } - - chapterComponent = this.getChapterComponent(cfiStr); - pathComponent = this.getPathComponent(cfiStr) || ''; - charecterOffsetComponent = this.getCharecterOffsetComponent(cfiStr); - // Make sure this is a valid cfi or return - if(!chapterComponent) { - return {spinePos: -1}; - } - - // Chapter segment is always the second one - chapSegment = chapterComponent.split("/")[2] || ''; - if(!chapSegment) return {spinePos:-1}; - - cfi.spinePos = (parseInt(chapSegment) / 2 - 1 ) || 0; - - chapId = chapSegment.match(/\[(.*)\]/); - - cfi.spineId = chapId ? chapId[1] : false; - - if(pathComponent.indexOf(',') != -1) { - // Handle ranges -- not supported yet - console.warn("CFI Ranges are not supported"); - } - - path = pathComponent.split('/'); - end = path.pop(); - - cfi.steps = []; - - path.forEach(function(part){ - var step; - - if(part) { - step = parseStep(part); - cfi.steps.push(step); - } - }); - - //-- Check if END is a text node or element - endInt = parseInt(end); - if(!isNaN(endInt)) { - - if(endInt % 2 === 0) { // Even = is an element - cfi.steps.push(parseStep(end)); - } else { - cfi.steps.push({ - "type" : "text", - 'index' : (endInt - 1 ) / 2 - }); - } - - } - - assertion = charecterOffsetComponent.match(/\[(.*)\]/); - if(assertion && assertion[1]){ - cfi.characterOffset = parseInt(charecterOffsetComponent.split('[')[0]); - // We arent handling these assertions yet - cfi.textLocationAssertion = assertion[1]; - } else { - cfi.characterOffset = parseInt(charecterOffsetComponent); - } - - return cfi; -}; - -EPUBJS.EpubCFI.prototype.addMarker = function(cfi, _doc, _marker) { - var doc = _doc || document; - var marker = _marker || this.createMarker(doc); - var parent; - var lastStep; - var text; - var split; - - if(typeof cfi === 'string') { - cfi = this.parse(cfi); - } - // Get the terminal step - lastStep = cfi.steps[cfi.steps.length-1]; - - // check spinePos - if(cfi.spinePos === -1) { - // Not a valid CFI - return false; - } - - // Find the CFI elements parent - parent = this.findParent(cfi, doc); - - if(!parent) { - // CFI didn't return an element - // Maybe it isnt in the current chapter? - return false; - } - - if(lastStep && lastStep.type === "text") { - text = parent.childNodes[lastStep.index]; - if(cfi.characterOffset){ - split = text.splitText(cfi.characterOffset); - marker.classList.add("EPUBJS-CFI-SPLIT"); - parent.insertBefore(marker, split); - } else { - parent.insertBefore(marker, text); - } - } else { - parent.insertBefore(marker, parent.firstChild); - } - - return marker; -}; - -EPUBJS.EpubCFI.prototype.createMarker = function(_doc) { - var doc = _doc || document; - var element = doc.createElement('span'); - element.id = "EPUBJS-CFI-MARKER:"+ EPUBJS.core.uuid(); - element.classList.add("EPUBJS-CFI-MARKER"); - - return element; -}; - -EPUBJS.EpubCFI.prototype.removeMarker = function(marker, _doc) { - var doc = _doc || document; - // var id = marker.id; - - // Cleanup textnodes if they were split - if(marker.classList.contains("EPUBJS-CFI-SPLIT")){ - nextSib = marker.nextSibling; - prevSib = marker.previousSibling; - if(nextSib && - prevSib && - nextSib.nodeType === 3 && - prevSib.nodeType === 3){ - - prevSib.textContent += nextSib.textContent; - marker.parentNode.removeChild(nextSib); - } - marker.parentNode.removeChild(marker); - } else if(marker.classList.contains("EPUBJS-CFI-MARKER")) { - // Remove only elements added as markers - marker.parentNode.removeChild(marker); - } - -}; - -EPUBJS.EpubCFI.prototype.findParent = function(cfi, _doc) { - var doc = _doc || document, - element = doc.getElementsByTagName('html')[0], - children = Array.prototype.slice.call(element.children), - num, index, part, sections, - text, textBegin, textEnd; - - if(typeof cfi === 'string') { - cfi = this.parse(cfi); - } - - sections = cfi.steps.slice(0); // Clone steps array - if(!sections.length) { - return doc.getElementsByTagName('body')[0]; - } - - while(sections && sections.length > 0) { - part = sections.shift(); - // Find textNodes Parent - if(part.type === "text") { - text = element.childNodes[part.index]; - element = text.parentNode || element; - // Find element by id if present - } else if(part.id){ - element = doc.getElementById(part.id); - // Find element in parent - }else{ - element = children[part.index]; - } - // Element can't be found - if(typeof element === "undefined") { - console.error("No Element For", part, cfi.str); - return false; - } - // Get current element children and continue through steps - children = Array.prototype.slice.call(element.children); - } - - return element; -}; - -EPUBJS.EpubCFI.prototype.compare = function(cfiOne, cfiTwo) { - if(typeof cfiOne === 'string') { - cfiOne = new EPUBJS.EpubCFI(cfiOne); - } - if(typeof cfiTwo === 'string') { - cfiTwo = new EPUBJS.EpubCFI(cfiTwo); - } - // Compare Spine Positions - if(cfiOne.spinePos > cfiTwo.spinePos) { - return 1; - } - if(cfiOne.spinePos < cfiTwo.spinePos) { - return -1; - } - - - // Compare Each Step in the First item - for (var i = 0; i < cfiOne.steps.length; i++) { - if(!cfiTwo.steps[i]) { - return 1; - } - if(cfiOne.steps[i].index > cfiTwo.steps[i].index) { - return 1; - } - if(cfiOne.steps[i].index < cfiTwo.steps[i].index) { - return -1; - } - // Otherwise continue checking - } - - // All steps in First present in Second - if(cfiOne.steps.length < cfiTwo.steps.length) { - return -1; - } - - // Compare the charecter offset of the text node - if(cfiOne.characterOffset > cfiTwo.characterOffset) { - return 1; - } - if(cfiOne.characterOffset < cfiTwo.characterOffset) { - return -1; - } - - // CFI's are equal - return 0; -}; - -EPUBJS.EpubCFI.prototype.generateCfiFromHref = function(href, book) { - var uri = EPUBJS.core.uri(href); - var path = uri.path; - var fragment = uri.fragment; - var spinePos = book.spineIndexByURL[path]; - var loaded; - var deferred = new RSVP.defer(); - var epubcfi = new EPUBJS.EpubCFI(); - var spineItem; - - if(typeof spinePos !== "undefined"){ - spineItem = book.spine[spinePos]; - loaded = book.loadXml(spineItem.url); - loaded.then(function(doc){ - var element = doc.getElementById(fragment); - var cfi; - cfi = epubcfi.generateCfiFromElement(element, spineItem.cfiBase); - deferred.resolve(cfi); - }); - } - - return deferred.promise; -}; - -EPUBJS.EpubCFI.prototype.generateCfiFromTextNode = function(anchor, offset, base) { - var parent = anchor.parentNode; - var steps = this.pathTo(parent); - var path = this.generatePathComponent(steps); - var index = 1 + (2 * Array.prototype.indexOf.call(parent.childNodes, anchor)); - return "epubcfi(" + base + "!" + path + "/"+index+":"+(offset || 0)+")"; -}; - -EPUBJS.EpubCFI.prototype.generateCfiFromRangeAnchor = function(range, base) { - var anchor = range.anchorNode; - var offset = range.anchorOffset; - return this.generateCfiFromTextNode(anchor, offset, base); -}; - -EPUBJS.EpubCFI.prototype.generateCfiFromRange = function(range, base) { - var start, startElement, startSteps, startPath, startOffset, startIndex; - var end, endElement, endSteps, endPath, endOffset, endIndex; - - start = range.startContainer; - - if(start.nodeType === 3) { // text node - startElement = start.parentNode; - //startIndex = 1 + (2 * Array.prototype.indexOf.call(startElement.childNodes, start)); - startIndex = 1 + (2 * EPUBJS.core.indexOfTextNode(start)); - startSteps = this.pathTo(startElement); - } else if(range.collapsed) { - return this.generateCfiFromElement(start, base); // single element - } else { - startSteps = this.pathTo(start); - } - - startPath = this.generatePathComponent(startSteps); - startOffset = range.startOffset; - - if(!range.collapsed) { - end = range.endContainer; - - if(end.nodeType === 3) { // text node - endElement = end.parentNode; - // endIndex = 1 + (2 * Array.prototype.indexOf.call(endElement.childNodes, end)); - endIndex = 1 + (2 * EPUBJS.core.indexOfTextNode(end)); - - endSteps = this.pathTo(endElement); - } else { - endSteps = this.pathTo(end); - } - - endPath = this.generatePathComponent(endSteps); - endOffset = range.endOffset; - - return "epubcfi(" + base + "!" + startPath + "/" + startIndex + ":" + startOffset + "," + endPath + "/" + endIndex + ":" + endOffset + ")"; - - } else { - return "epubcfi(" + base + "!" + startPath + "/"+ startIndex +":"+ startOffset +")"; - } -}; - -EPUBJS.EpubCFI.prototype.generateXpathFromSteps = function(steps) { - var xpath = [".", "*"]; - - steps.forEach(function(step){ - var position = step.index + 1; - - if(step.id){ - xpath.push("*[position()=" + position + " and @id='" + step.id + "']"); - } else if(step.type === "text") { - xpath.push("text()[" + position + "]"); - } else { - xpath.push("*[" + position + "]"); - } - }); - - return xpath.join("/"); -}; - - -EPUBJS.EpubCFI.prototype.generateRangeFromCfi = function(cfi, _doc) { - var doc = _doc || document; - var range = doc.createRange(); - var lastStep; - var xpath; - var startContainer; - var textLength; - - if(typeof cfi === 'string') { - cfi = this.parse(cfi); - } - - // check spinePos - if(cfi.spinePos === -1) { - // Not a valid CFI - return false; - } - - xpath = this.generateXpathFromSteps(cfi.steps); - - // Get the terminal step - lastStep = cfi.steps[cfi.steps.length-1]; - startContainer = doc.evaluate(xpath, doc, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - - if(!startContainer) { - return null; - } - - if(startContainer && cfi.characterOffset >= 0) { - textLength = startContainer.length; - - if(cfi.characterOffset < textLength) { - range.setStart(startContainer, cfi.characterOffset); - range.setEnd(startContainer, textLength ); - } else { - console.debug("offset greater than length:", cfi.characterOffset, textLength); - range.setStart(startContainer, textLength - 1 ); - range.setEnd(startContainer, textLength ); - } - } else if(startContainer) { - range.selectNode(startContainer); - } - // doc.defaultView.getSelection().addRange(range); - return range; -}; - -EPUBJS.Events = function(obj, el){ - - this.events = {}; - - if(!el){ - this.el = document.createElement('div'); - }else{ - this.el = el; - } - - obj.createEvent = this.createEvent; - obj.tell = this.tell; - obj.listen = this.listen; - obj.deafen = this.deafen; - obj.listenUntil = this.listenUntil; - - return this; -}; - -EPUBJS.Events.prototype.createEvent = function(evt){ - var e = new CustomEvent(evt); - this.events[evt] = e; - return e; -}; - -EPUBJS.Events.prototype.tell = function(evt, msg){ - var e; - - if(!this.events[evt]){ - console.warn("No event:", evt, "defined yet, creating."); - e = this.createEvent(evt); - }else{ - e = this.events[evt]; - } - - if(msg) e.msg = msg; - this.el.dispatchEvent(e); - -}; - -EPUBJS.Events.prototype.listen = function(evt, func, bindto){ - if(!this.events[evt]){ - console.warn("No event:", evt, "defined yet, creating."); - this.createEvent(evt); - return; - } - - if(bindto){ - this.el.addEventListener(evt, func.bind(bindto), false); - }else{ - this.el.addEventListener(evt, func, false); - } - -}; - -EPUBJS.Events.prototype.deafen = function(evt, func){ - this.el.removeEventListener(evt, func, false); -}; - -EPUBJS.Events.prototype.listenUntil = function(OnEvt, OffEvt, func, bindto){ - this.listen(OnEvt, func, bindto); - - function unlisten(){ - this.deafen(OnEvt, func); - this.deafen(OffEvt, unlisten); - } - - this.listen(OffEvt, unlisten, this); -}; -EPUBJS.hooks = {}; -EPUBJS.Hooks = (function(){ - function hooks(){} - - //-- Get pre-registered hooks - hooks.prototype.getHooks = function(){ - var plugs; - this.hooks = {}; - Array.prototype.slice.call(arguments).forEach(function(arg){ - this.hooks[arg] = []; - }, this); - - for (var plugType in this.hooks) { - plugs = _.values(EPUBJS.hooks[plugType]); - - plugs.forEach(function(hook){ - this.registerHook(plugType, hook); - }, this); - } - }; - - //-- Hooks allow for injecting async functions that must all complete before continuing - // Functions must have a callback as their first argument. - hooks.prototype.registerHook = function(type, toAdd, toFront){ - - if(typeof(this.hooks[type]) != "undefined"){ - - if(typeof(toAdd) === "function"){ - if(toFront) { - this.hooks[type].unshift(toAdd); - }else{ - this.hooks[type].push(toAdd); - } - }else if(Array.isArray(toAdd)){ - toAdd.forEach(function(hook){ - if(toFront) { - this.hooks[type].unshift(hook); - }else{ - this.hooks[type].push(hook); - } - }, this); - } - }else{ - //-- Allows for undefined hooks, but maybe this should error? - this.hooks[type] = [func]; - } - }; - - hooks.prototype.triggerHooks = function(type, callback, passed){ - var hooks, count; - - if(typeof(this.hooks[type]) == "undefined") return false; - - hooks = this.hooks[type]; - - count = hooks.length; - if(count === 0 && callback) { - callback(); - } - - function countdown(){ - count--; - if(count <= 0 && callback) callback(); - } - - hooks.forEach(function(hook){ - hook(countdown, passed); - }); - }; - - return { - register: function(name) { - if(EPUBJS.hooks[name] === undefined) { EPUBJS.hooks[name] = {}; } - if(typeof EPUBJS.hooks[name] !== 'object') { throw "Already registered: "+name; } - return EPUBJS.hooks[name]; - }, - mixin: function(object) { - for (var prop in hooks.prototype) { - object[prop] = hooks.prototype[prop]; - } - } - }; -})(); - - -EPUBJS.Layout = EPUBJS.Layout || {}; - -EPUBJS.Layout.Reflowable = function(){ - this.documentElement = null; - this.spreadWidth = null; -}; - -EPUBJS.Layout.Reflowable.prototype.format = function(documentElement, _width, _height, _gap){ - // Get the prefixed CSS commands - var columnAxis = EPUBJS.core.prefixed('columnAxis'); - var columnGap = EPUBJS.core.prefixed('columnGap'); - var columnWidth = EPUBJS.core.prefixed('columnWidth'); - var columnFill = EPUBJS.core.prefixed('columnFill'); - - //-- Check the width and create even width columns - var width = Math.floor(_width); - // var width = (fullWidth % 2 === 0) ? fullWidth : fullWidth - 0; // Not needed for single - var section = Math.floor(width / 8); - var gap = (_gap >= 0) ? _gap : ((section % 2 === 0) ? section : section - 1); - this.documentElement = documentElement; - //-- Single Page - this.spreadWidth = (width + gap); - - - documentElement.style.overflow = "hidden"; - - // Must be set to the new calculated width or the columns will be off - documentElement.style.width = width + "px"; - - //-- Adjust height - documentElement.style.height = _height + "px"; - - //-- Add columns - documentElement.style[columnAxis] = "horizontal"; - documentElement.style[columnFill] = "auto"; - documentElement.style[columnWidth] = width+"px"; - documentElement.style[columnGap] = gap+"px"; - this.colWidth = width; - this.gap = gap; - - return { - pageWidth : this.spreadWidth, - pageHeight : _height - }; -}; - -EPUBJS.Layout.Reflowable.prototype.calculatePages = function() { - var totalWidth, displayedPages; - this.documentElement.style.width = "auto"; //-- reset width for calculations - totalWidth = this.documentElement.scrollWidth; - displayedPages = Math.ceil(totalWidth / this.spreadWidth); - - return { - displayedPages : displayedPages, - pageCount : displayedPages - }; -}; - -EPUBJS.Layout.ReflowableSpreads = function(){ - this.documentElement = null; - this.spreadWidth = null; -}; - -EPUBJS.Layout.ReflowableSpreads.prototype.format = function(documentElement, _width, _height, _gap){ - var columnAxis = EPUBJS.core.prefixed('columnAxis'); - var columnGap = EPUBJS.core.prefixed('columnGap'); - var columnWidth = EPUBJS.core.prefixed('columnWidth'); - var columnFill = EPUBJS.core.prefixed('columnFill'); - - var divisor = 2, - cutoff = 800; - - //-- Check the width and create even width columns - var fullWidth = Math.floor(_width); - var width = (fullWidth % 2 === 0) ? fullWidth : fullWidth - 1; - - var section = Math.floor(width / 8); - var gap = (_gap >= 0) ? _gap : ((section % 2 === 0) ? section : section - 1); - - //-- Double Page - var colWidth = Math.floor((width - gap) / divisor); - - this.documentElement = documentElement; - this.spreadWidth = (colWidth + gap) * divisor; - - - documentElement.style.overflow = "hidden"; - - // Must be set to the new calculated width or the columns will be off - documentElement.style.width = width + "px"; - - //-- Adjust height - documentElement.style.height = _height + "px"; - - //-- Add columns - documentElement.style[columnAxis] = "horizontal"; - documentElement.style[columnFill] = "auto"; - documentElement.style[columnGap] = gap+"px"; - documentElement.style[columnWidth] = colWidth+"px"; - - this.colWidth = colWidth; - this.gap = gap; - return { - pageWidth : this.spreadWidth, - pageHeight : _height - }; -}; - -EPUBJS.Layout.ReflowableSpreads.prototype.calculatePages = function() { - var totalWidth = this.documentElement.scrollWidth; - var displayedPages = Math.ceil(totalWidth / this.spreadWidth); - - //-- Add a page to the width of the document to account an for odd number of pages - this.documentElement.style.width = ((displayedPages * this.spreadWidth) - this.gap) + "px"; - - return { - displayedPages : displayedPages, - pageCount : displayedPages * 2 - }; -}; - -EPUBJS.Layout.Fixed = function(){ - this.documentElement = null; -}; - -EPUBJS.Layout.Fixed.prototype.format = function(documentElement, _width, _height, _gap){ - var columnWidth = EPUBJS.core.prefixed('columnWidth'); - var viewport = documentElement.querySelector("[name=viewport"); - var content; - var contents; - var width, height; - this.documentElement = documentElement; - /** - * check for the viewport size - * - */ - if(viewport && viewport.hasAttribute("content")) { - content = viewport.getAttribute("content"); - contents = content.split(','); - if(contents[0]){ - width = contents[0].replace("width=", ''); - } - if(contents[1]){ - height = contents[1].replace("height=", ''); - } - } - - //-- Adjust width and height - documentElement.style.width = width + "px" || "auto"; - documentElement.style.height = height + "px" || "auto"; - - //-- Remove columns - documentElement.style[columnWidth] = "auto"; - - //-- Scroll - documentElement.style.overflow = "auto"; - - this.colWidth = width; - this.gap = 0; - - return { - pageWidth : width, - pageHeight : height - }; - -}; - -EPUBJS.Layout.Fixed.prototype.calculatePages = function(){ - return { - displayedPages : 1, - pageCount : 1 - }; -}; - -EPUBJS.Pagination = function(pageList) { - this.pages = []; - this.locations = []; - this.epubcfi = new EPUBJS.EpubCFI(); - if(pageList && pageList.length) { - this.process(pageList); - } -}; - -EPUBJS.Pagination.prototype.process = function(pageList){ - pageList.forEach(function(item){ - this.pages.push(item.page); - this.locations.push(item.cfi); - }, this); - - this.pageList = pageList; - this.firstPage = parseInt(this.pages[0]); - this.lastPage = parseInt(this.pages[this.pages.length-1]); - this.totalPages = this.lastPage - this.firstPage; -}; - -EPUBJS.Pagination.prototype.pageFromCfi = function(cfi){ - var pg = -1; - - // Check if the pageList has not been set yet - if(this.locations.length === 0) { - return -1; - } - - // TODO: check if CFI is valid? - - // check if the cfi is in the location list - // var index = this.locations.indexOf(cfi); - var index = EPUBJS.core.indexOfSorted(cfi, this.locations, this.epubcfi.compare); - if(index != -1 && index < (this.pages.length-1) ) { - pg = this.pages[index]; - } else { - // Otherwise add it to the list of locations - // Insert it in the correct position in the locations page - //index = EPUBJS.core.insert(cfi, this.locations, this.epubcfi.compare); - index = EPUBJS.core.locationOf(cfi, this.locations, this.epubcfi.compare); - // Get the page at the location just before the new one, or return the first - pg = index-1 >= 0 ? this.pages[index-1] : this.pages[0]; - if(pg !== undefined) { - // Add the new page in so that the locations and page array match up - //this.pages.splice(index, 0, pg); - } else { - pg = -1; - } - - } - return pg; -}; - -EPUBJS.Pagination.prototype.cfiFromPage = function(pg){ - var cfi = -1; - // check that pg is an int - if(typeof pg != "number"){ - pg = parseInt(pg); - } - - // check if the cfi is in the page list - // Pages could be unsorted. - var index = this.pages.indexOf(pg); - if(index != -1) { - cfi = this.locations[index]; - } - // TODO: handle pages not in the list - return cfi; -}; - -EPUBJS.Pagination.prototype.pageFromPercentage = function(percent){ - var pg = Math.round(this.totalPages * percent); - return pg; -}; - -// Returns a value between 0 - 1 corresponding to the location of a page -EPUBJS.Pagination.prototype.percentageFromPage = function(pg){ - var percentage = (pg - this.firstPage) / this.totalPages; - return Math.round(percentage * 1000) / 1000; -}; - -// Returns a value between 0 - 1 corresponding to the location of a cfi -EPUBJS.Pagination.prototype.percentageFromCfi = function(cfi){ - var pg = this.pageFromCfi(cfi); - var percentage = this.percentageFromPage(pg); - return percentage; -}; -EPUBJS.Parser = function(baseUrl){ - this.baseUrl = baseUrl || ''; -}; - -EPUBJS.Parser.prototype.container = function(containerXml){ - //-- - var rootfile, fullpath, folder, encoding; - - if(!containerXml) { - console.error("Container File Not Found"); - return; - } - - rootfile = containerXml.querySelector("rootfile"); - - if(!rootfile) { - console.error("No RootFile Found"); - return; - } - - fullpath = rootfile.getAttribute('full-path'); - folder = EPUBJS.core.uri(fullpath).directory; - encoding = containerXml.xmlEncoding; - - //-- Now that we have the path we can parse the contents - return { - 'packagePath' : fullpath, - 'basePath' : folder, - 'encoding' : encoding - }; -}; - -EPUBJS.Parser.prototype.identifier = function(packageXml){ - var metadataNode; - - if(!packageXml) { - console.error("Package File Not Found"); - return; - } - - metadataNode = packageXml.querySelector("metadata"); - - if(!metadataNode) { - console.error("No Metadata Found"); - return; - } - - return this.getElementText(metadataNode, "identifier"); -}; - -EPUBJS.Parser.prototype.packageContents = function(packageXml, baseUrl){ - var parse = this; - var metadataNode, manifestNode, spineNode; - var manifest, navPath, tocPath, coverPath; - var spineNodeIndex; - var spine; - var spineIndexByURL; - - if(baseUrl) this.baseUrl = baseUrl; - - if(!packageXml) { - console.error("Package File Not Found"); - return; - } - - metadataNode = packageXml.querySelector("metadata"); - if(!metadataNode) { - console.error("No Metadata Found"); - return; - } - - manifestNode = packageXml.querySelector("manifest"); - if(!manifestNode) { - console.error("No Manifest Found"); - return; - } - - spineNode = packageXml.querySelector("spine"); - if(!spineNode) { - console.error("No Spine Found"); - return; - } - - manifest = parse.manifest(manifestNode); - navPath = parse.findNavPath(manifestNode); - tocPath = parse.findTocPath(manifestNode, spineNode); - coverPath = parse.findCoverPath(manifestNode); - - spineNodeIndex = Array.prototype.indexOf.call(spineNode.parentNode.childNodes, spineNode); - - spine = parse.spine(spineNode, manifest); - - spineIndexByURL = {}; - spine.forEach(function(item){ - spineIndexByURL[item.href] = item.index; - }); - - return { - 'metadata' : parse.metadata(metadataNode), - 'spine' : spine, - 'manifest' : manifest, - 'navPath' : navPath, - 'tocPath' : tocPath, - 'coverPath': coverPath, - 'spineNodeIndex' : spineNodeIndex, - 'spineIndexByURL' : spineIndexByURL - }; -}; - -//-- Find TOC NAV -EPUBJS.Parser.prototype.findNavPath = function(manifestNode){ - // Find item with property 'nav' - // Should catch nav irregardless of order - var node = manifestNode.querySelector("item[properties$='nav'], item[properties^='nav '], item[properties*=' nav ']"); - return node ? node.getAttribute('href') : false; -}; - -//-- Find TOC NCX: media-type="application/x-dtbncx+xml" href="toc.ncx" -EPUBJS.Parser.prototype.findTocPath = function(manifestNode, spineNode){ - var node = manifestNode.querySelector("item[media-type='application/x-dtbncx+xml']"); - var tocId; - - // If we can't find the toc by media-type then try to look for id of the item in the spine attributes as - // according to http://www.idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.4.1.2, - // "The item that describes the NCX must be referenced by the spine toc attribute." - if (!node) { - tocId = spineNode.getAttribute("toc"); - if(tocId) { - node = manifestNode.querySelector("item[id='" + tocId + "']"); - } - } - - return node ? node.getAttribute('href') : false; -}; - -//-- Find Cover: -EPUBJS.Parser.prototype.findCoverPath = function(manifestNode){ - var node = manifestNode.querySelector("item[properties='cover-image']"); - return node ? node.getAttribute('href') : false; -}; - -//-- Expanded to match Readium web components -EPUBJS.Parser.prototype.metadata = function(xml){ - var metadata = {}, - p = this; - - metadata.bookTitle = p.getElementText(xml, 'title'); - metadata.creator = p.getElementText(xml, 'creator'); - metadata.description = p.getElementText(xml, 'description'); - - metadata.pubdate = p.getElementText(xml, 'date'); - - metadata.publisher = p.getElementText(xml, 'publisher'); - - metadata.identifier = p.getElementText(xml, "identifier"); - metadata.language = p.getElementText(xml, "language"); - metadata.rights = p.getElementText(xml, "rights"); - - metadata.modified_date = p.querySelectorText(xml, "meta[property='dcterms:modified']"); - metadata.layout = p.querySelectorText(xml, "meta[property='rendition:layout']"); - metadata.orientation = p.querySelectorText(xml, "meta[property='rendition:orientation']"); - metadata.spread = p.querySelectorText(xml, "meta[property='rendition:spread']"); - // metadata.page_prog_dir = packageXml.querySelector("spine").getAttribute("page-progression-direction"); - - return metadata; -}; - -EPUBJS.Parser.prototype.getElementText = function(xml, tag){ - var found = xml.getElementsByTagNameNS("http://purl.org/dc/elements/1.1/", tag), - el; - - if(!found || found.length === 0) return ''; - - el = found[0]; - - if(el.childNodes.length){ - return el.childNodes[0].nodeValue; - } - - return ''; - -}; - -EPUBJS.Parser.prototype.querySelectorText = function(xml, q){ - var el = xml.querySelector(q); - - if(el && el.childNodes.length){ - return el.childNodes[0].nodeValue; - } - - return ''; -}; - -EPUBJS.Parser.prototype.manifest = function(manifestXml){ - var baseUrl = this.baseUrl, - manifest = {}; - - //-- Turn items into an array - var selected = manifestXml.querySelectorAll("item"), - items = Array.prototype.slice.call(selected); - - //-- Create an object with the id as key - items.forEach(function(item){ - var id = item.getAttribute('id'), - href = item.getAttribute('href') || '', - type = item.getAttribute('media-type') || '', - properties = item.getAttribute('properties') || ''; - - manifest[id] = { - 'href' : href, - 'url' : baseUrl + href, //-- Absolute URL for loading with a web worker - 'type' : type, - 'properties' : properties - }; - - }); - - return manifest; - -}; - -EPUBJS.Parser.prototype.spine = function(spineXml, manifest){ - var spine = []; - - var selected = spineXml.getElementsByTagName("itemref"), - items = Array.prototype.slice.call(selected); - - var spineNodeIndex = Array.prototype.indexOf.call(spineXml.parentNode.childNodes, spineXml); - - var epubcfi = new EPUBJS.EpubCFI(); - - //-- Add to array to mantain ordering and cross reference with manifest - items.forEach(function(item, index){ - var Id = item.getAttribute('idref'); - var cfiBase = epubcfi.generateChapterComponent(spineNodeIndex, index, Id); - var props = item.getAttribute('properties') || ''; - var propArray = props.length ? props.split(' ') : []; - var manifestProps = manifest[Id].properties; - var manifestPropArray = manifestProps.length ? manifestProps.split(' ') : []; - var vert = { - 'id' : Id, - 'linear' : item.getAttribute('linear') || '', - 'properties' : propArray, - 'manifestProperties' : manifestPropArray, - 'href' : manifest[Id].href, - 'url' : manifest[Id].url, - 'index' : index, - 'cfiBase' : cfiBase, - 'cfi' : "epub(" + cfiBase + ")" - }; - spine.push(vert); - }); - - return spine; -}; - -EPUBJS.Parser.prototype.nav = function(navHtml, spineIndexByURL, bookSpine){ - var navEl = navHtml.querySelector('nav[*|type="toc"]'), //-- [*|type="toc"] * Doesn't seem to work - idCounter = 0; - - if(!navEl) return []; - - // Implements `> ol > li` - function findListItems(parent){ - var items = []; - - Array.prototype.slice.call(parent.childNodes).forEach(function(node){ - if('ol' == node.tagName){ - Array.prototype.slice.call(node.childNodes).forEach(function(item){ - if('li' == item.tagName){ - items.push(item); - } - }); - } - }); - - return items; - - } - - // Implements `> a, > span` - function findAnchorOrSpan(parent){ - var item = null; - - Array.prototype.slice.call(parent.childNodes).forEach(function(node){ - if('a' == node.tagName || 'span' == node.tagName){ - item = node; - } - }); - - return item; - } - - function getTOC(parent){ - var list = [], - nodes = findListItems(parent), - items = Array.prototype.slice.call(nodes), - length = items.length, - node; - - if(length === 0) return false; - - items.forEach(function(item){ - var id = item.getAttribute('id') || false, - content = findAnchorOrSpan(item), - href = content.getAttribute('href') || '', - text = content.textContent || "", - split = href.split("#"), - baseUrl = split[0], - subitems = getTOC(item), - spinePos = spineIndexByURL[baseUrl], - spineItem = bookSpine[spinePos], - cfi = spineItem ? spineItem.cfi : ''; - - if(!id) { - if(spinePos) { - spineItem = bookSpine[spinePos]; - id = spineItem.id; - cfi = spineItem.cfi; - } else { - id = 'epubjs-autogen-toc-id-' + (idCounter++); - } - } - - item.setAttribute('id', id); // Ensure all elements have an id - list.push({ - "id": id, - "href": href, - "label": text, - "subitems" : subitems, - "parent" : parent ? parent.getAttribute('id') : null, - "cfi" : cfi - }); - - }); - - return list; - } - - return getTOC(navEl); -}; - -EPUBJS.Parser.prototype.toc = function(tocXml, spineIndexByURL, bookSpine){ - var navMap = tocXml.querySelector("navMap"); - if(!navMap) return []; - - function getTOC(parent){ - var list = [], - snapshot = tocXml.evaluate("*[local-name()='navPoint']", parent, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null), - length = snapshot.snapshotLength; - - if(length === 0) return []; - - for ( var i=length-1 ; i >= 0; i-- ) { - var item = snapshot.snapshotItem(i); - - var id = item.getAttribute('id') || false, - content = item.querySelector("content"), - src = content.getAttribute('src'), - navLabel = item.querySelector("navLabel"), - text = navLabel.textContent ? navLabel.textContent : "", - split = src.split("#"), - baseUrl = split[0], - spinePos = spineIndexByURL[baseUrl], - spineItem = bookSpine[spinePos], - subitems = getTOC(item), - cfi = spineItem ? spineItem.cfi : ''; - - if(!id) { - if(spinePos) { - spineItem = bookSpine[spinePos]; - id = spineItem.id; - cfi = spineItem.cfi; - } else { - id = 'epubjs-autogen-toc-id-' + (idCounter++); - } - } - - list.unshift({ - "id": id, - "href": src, - "label": text, - "spinePos": spinePos, - "subitems" : subitems, - "parent" : parent ? parent.getAttribute('id') : null, - "cfi" : cfi - }); - - } - - return list; - } - - return getTOC(navMap); -}; - -EPUBJS.Parser.prototype.pageList = function(navHtml, spineIndexByURL, bookSpine){ - var navEl = navHtml.querySelector('nav[*|type="page-list"]'), - idCounter = 0; - - if(!navEl) return []; - - // Implements `> ol > li` - function findListItems(parent){ - var items = []; - - Array.prototype.slice.call(parent.childNodes).forEach(function(node){ - if('ol' == node.tagName){ - Array.prototype.slice.call(node.childNodes).forEach(function(item){ - if('li' == item.tagName){ - items.push(item); - } - }); - } - }); - - return items; - - } - - // Implements `> a, > span` - function findAnchorOrSpan(parent){ - var item = null; - - Array.prototype.slice.call(parent.childNodes).forEach(function(node){ - if('a' == node.tagName || 'span' == node.tagName){ - item = node; - } - }); - - return item; - } - - function getPages(parent){ - var list = [], - nodes = findListItems(parent), - items = Array.prototype.slice.call(nodes), - length = items.length, - node; - - if(length === 0) return false; - - items.forEach(function(item){ - var id = item.getAttribute('id') || false, - content = findAnchorOrSpan(item), - href = content.getAttribute('href') || '', - text = content.textContent || "", - page = parseInt(text), - isCfi = href.indexOf("epubcfi"), - split, - packageUrl, - cfi; - - if(isCfi != -1) { - split = href.split("#"); - packageUrl = split[0]; - cfi = split.length > 1 ? split[1] : false; - list.push({ - "cfi" : cfi, - "href" : href, - "packageUrl" : packageUrl, - "page" : page - }); - } else { - list.push({ - "href" : href, - "page" : page - }); - } - - }); - - return list; - } - - return getPages(navEl); -}; - -EPUBJS.Render.Iframe = function() { - this.iframe = null; - this.document = null; - this.window = null; - this.docEl = null; - this.bodyEl = null; - - this.leftPos = 0; - this.pageWidth = 0; -}; - -//-- Build up any html needed -EPUBJS.Render.Iframe.prototype.create = function(){ - this.iframe = document.createElement('iframe'); - this.iframe.id = "epubjs-iframe:" + EPUBJS.core.uuid(); - this.iframe.scrolling = "no"; - this.iframe.seamless = "seamless"; - // Back up if seamless isn't supported - this.iframe.style.border = "none"; - - this.iframe.addEventListener("load", this.loaded.bind(this), false); - return this.iframe; -}; - -/** -* Sets the source of the iframe with the given URL string -* Takes: URL string -* Returns: promise with document element -*/ -EPUBJS.Render.Iframe.prototype.load = function(chapter){ - var render = this, - deferred = new RSVP.defer(); - - chapter.url().then(function(url){ - // Reset the scroll position - render.leftPos = 0; - - if(this.window) { - this.unload(); - } - - this.iframe.onload = function(e) { - render.document = render.iframe.contentDocument; - render.docEl = render.document.documentElement; - render.headEl = render.document.head; - render.bodyEl = render.document.body || render.document.querySelector("body"); - render.window = render.iframe.contentWindow; - - render.window.addEventListener("resize", render.resized.bind(render), false); - - //-- Clear Margins - if(render.bodyEl) { - render.bodyEl.style.margin = "0"; - } - - deferred.resolve(render.docEl); - }; - - this.iframe.onerror = function(e) { - //console.error("Error Loading Contents", e); - deferred.reject({ - message : "Error Loading Contents: " + e, - stack : new Error().stack - }); - }; - - this.iframe.contentWindow.location.replace(url); - - }.bind(this)); - - return deferred.promise; -}; - - -EPUBJS.Render.Iframe.prototype.loaded = function(v){ - var url = this.iframe.contentWindow.location.href; - if(url != "about:blank"){ - this.trigger("render:loaded", url); - } -}; - -// Resize the iframe to the given width and height -EPUBJS.Render.Iframe.prototype.resize = function(width, height){ - var iframeBox; - - if(!this.iframe) return; - - this.iframe.height = height; - - if(!isNaN(width) && width % 2 !== 0){ - width += 1; //-- Prevent cutting off edges of text in columns - } - - this.iframe.width = width; - // Get the fractional height and width of the iframe - // Default to orginal if bounding rect is 0 - this.width = this.iframe.getBoundingClientRect().width || width; - this.height = this.iframe.getBoundingClientRect().height || height; -}; - - -EPUBJS.Render.Iframe.prototype.resized = function(e){ - // Get the fractional height and width of the iframe - this.width = this.iframe.getBoundingClientRect().width; - this.height = this.iframe.getBoundingClientRect().height; -}; - -EPUBJS.Render.Iframe.prototype.totalWidth = function(){ - return this.docEl.scrollWidth; -}; - -EPUBJS.Render.Iframe.prototype.totalHeight = function(){ - return this.docEl.scrollHeight; -}; - -EPUBJS.Render.Iframe.prototype.setPageDimensions = function(pageWidth, pageHeight){ - this.pageWidth = pageWidth; - this.pageHeight = pageHeight; - //-- Add a page to the width of the document to account an for odd number of pages - // this.docEl.style.width = this.docEl.scrollWidth + pageWidth + "px"; -}; - -EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){ - // this.bodyEl.style.marginLeft = -leftPos + "px"; - // this.docEl.style.marginLeft = -leftPos + "px"; - // this.docEl.style[EPUBJS.Render.Iframe.transform] = 'translate('+ (-leftPos) + 'px, 0)'; - this.document.defaultView.scrollTo(leftPos, 0); -}; - -EPUBJS.Render.Iframe.prototype.setStyle = function(style, val, prefixed){ - if(prefixed) { - style = EPUBJS.core.prefixed(style); - } - - if(this.bodyEl) this.bodyEl.style[style] = val; -}; - -EPUBJS.Render.Iframe.prototype.removeStyle = function(style){ - - if(this.bodyEl) this.bodyEl.style[style] = ''; - -}; - -EPUBJS.Render.Iframe.prototype.addHeadTag = function(tag, attrs, _doc) { - var doc = _doc || this.document; - var tagEl = doc.createElement(tag); - var headEl = doc.head; - - for(var attr in attrs) { - tagEl.setAttribute(attr, attrs[attr]); - } - - if(headEl) headEl.insertBefore(tagEl, headEl.firstChild); -}; - -EPUBJS.Render.Iframe.prototype.page = function(pg){ - this.leftPos = this.pageWidth * (pg-1); //-- pages start at 1 - this.setLeft(this.leftPos); -}; - -//-- Show the page containing an Element -EPUBJS.Render.Iframe.prototype.getPageNumberByElement = function(el){ - var left, pg; - if(!el) return; - - left = this.leftPos + el.getBoundingClientRect().left; //-- Calculate left offset compaired to scrolled position - - pg = Math.floor(left / this.pageWidth) + 1; //-- pages start at 1 - - return pg; -}; - -//-- Show the page containing an Element -EPUBJS.Render.Iframe.prototype.getPageNumberByRect = function(boundingClientRect){ - var left, pg; - - left = this.leftPos + boundingClientRect.left; //-- Calculate left offset compaired to scrolled position - pg = Math.floor(left / this.pageWidth) + 1; //-- pages start at 1 - - return pg; -}; - -// Return the root element of the content -EPUBJS.Render.Iframe.prototype.getBaseElement = function(){ - return this.bodyEl; -}; - -// Checks if an element is on the screen -EPUBJS.Render.Iframe.prototype.isElementVisible = function(el){ - var rect; - var left; - - if(el && typeof el.getBoundingClientRect === 'function'){ - rect = el.getBoundingClientRect(); - left = rect.left; //+ rect.width; - if( rect.width !== 0 && - rect.height !== 0 && // Element not visible - left >= 0 && - left < this.pageWidth ) { - return true; - } - } - - return false; -}; - - -EPUBJS.Render.Iframe.prototype.scroll = function(bool){ - if(bool) { - this.iframe.scrolling = "yes"; - } else { - this.iframe.scrolling = "no"; - } -}; - -// Cleanup event listeners -EPUBJS.Render.Iframe.prototype.unload = function(){ - this.window.removeEventListener("resize", this.resized); -}; - -//-- Enable binding events to Render -RSVP.EventTarget.mixin(EPUBJS.Render.Iframe.prototype); -EPUBJS.Renderer = function(renderMethod, hidden) { - // Dom events to listen for - this.listenedEvents = ["keydown", "keyup", "keypressed", "mouseup", "mousedown", "click"]; - this.upEvent = "mouseup"; - this.downEvent = "mousedown"; - if('ontouchstart' in document.documentElement) { - this.listenedEvents.push("touchstart", "touchend"); - this.upEvent = "touchend"; - this.downEvent = "touchstart"; - } - /** - * Setup a render method. - * Options are: Iframe - */ - if(renderMethod && typeof(EPUBJS.Render[renderMethod]) != "undefined"){ - this.render = new EPUBJS.Render[renderMethod](); - } else { - console.error("Not a Valid Rendering Method"); - } - - // Listen for load events - this.render.on("render:loaded", this.loaded.bind(this)); - - // Cached for replacement urls from storage - this.caches = {}; - - // Blank Cfi for Parsing - this.epubcfi = new EPUBJS.EpubCFI(); - - this.spreads = true; - this.isForcedSingle = false; - this.resized = _.debounce(this.onResized.bind(this), 100); - - this.layoutSettings = {}; - - this.hidden = hidden || false; - //-- Adds Hook methods to the Book prototype - // Hooks will all return before triggering the callback. - EPUBJS.Hooks.mixin(this); - //-- Get pre-registered hooks for events - this.getHooks("beforeChapterDisplay"); - - //-- Queue up page changes if page map isn't ready - this._q = EPUBJS.core.queue(this); - - this._moving = false; - -}; - -//-- Renderer events for listening -EPUBJS.Renderer.prototype.Events = [ - "renderer:keydown", - "renderer:keyup", - "renderer:keypressed", - "renderer:mouseup", - "renderer:mousedown", - "renderer:click", - "renderer:touchstart", - "renderer:touchend", - "renderer:selected", - "renderer:chapterUnloaded", - "renderer:chapterDisplayed", - "renderer:locationChanged", - "renderer:visibleLocationChanged", - "renderer:resized", - "renderer:spreads" -]; - -/** -* Creates an element to render to. -* Resizes to passed width and height or to the elements size -*/ -EPUBJS.Renderer.prototype.initialize = function(element, width, height){ - this.container = element; - this.element = this.render.create(); - - this.initWidth = width; - this.initHeight = height; - - this.width = width || this.container.clientWidth; - this.height = height || this.container.clientHeight; - - this.container.appendChild(this.element); - - if(width && height){ - this.render.resize(this.width, this.height); - } else { - this.render.resize('100%', '100%'); - } - - document.addEventListener("orientationchange", this.onResized); -}; - -/** -* Display a chapter -* Takes: chapter object, global layout settings -* Returns: Promise with passed Renderer after pages has loaded -*/ -EPUBJS.Renderer.prototype.displayChapter = function(chapter, globalLayout){ - var store = false; - if(this._moving) { - console.error("Rendering In Progress"); - return; - } - this._moving = true; - // Get the url string from the chapter (may be from storage) - return chapter.url(). - then(function(url) { - - // Unload the previous chapter listener - if(this.currentChapter) { - this.currentChapter.unload(); // Remove stored blobs - - if(this.render.window){ - this.render.window.removeEventListener("resize", this.resized); - } - - this.removeEventListeners(); - this.removeSelectionListeners(); - this.trigger("renderer:chapterUnloaded"); - this.contents = null; - this.doc = null; - this.pageMap = null; - } - - this.currentChapter = chapter; - this.chapterPos = 1; - this.currentChapterCfiBase = chapter.cfiBase; - - this.layoutSettings = this.reconcileLayoutSettings(globalLayout, chapter.properties); - return this.load(chapter); - - }.bind(this)); - -}; - -/** -* Loads a url (string) and renders it, -* attaching event listeners and triggering hooks. -* Returns: Promise with the rendered contents. -*/ - -EPUBJS.Renderer.prototype.load = function(url){ - var deferred = new RSVP.defer(); - var loaded; - - // Switch to the required layout method for the settings - this.layoutMethod = this.determineLayout(this.layoutSettings); - this.layout = new EPUBJS.Layout[this.layoutMethod](); - - this.visible(false); - - render = this.render.load(url); - - render.then(function(contents) { - var formated; - this.currentChapter.setDocument(this.render.document); - this.contents = contents; - this.doc = this.render.document; - - // Format the contents using the current layout method - this.formated = this.layout.format(contents, this.render.width, this.render.height, this.gap); - this.render.setPageDimensions(this.formated.pageWidth, this.formated.pageHeight); - - // window.addEventListener("orientationchange", this.onResized.bind(this), false); - if(!this.initWidth && !this.initHeight){ - this.render.window.addEventListener("resize", this.resized, false); - } - - this.addEventListeners(); - this.addSelectionListeners(); - - //-- Trigger registered hooks before displaying - this.beforeDisplay(function(){ - var pages = this.layout.calculatePages(); - var msg = this.currentChapter; - var queued = this._q.length(); - this._moving = false; - - this.updatePages(pages); - - this.visibleRangeCfi = this.getVisibleRangeCfi(); - this.currentLocationCfi = this.visibleRangeCfi.start; - - if(queued === 0) { - this.trigger("renderer:locationChanged", this.currentLocationCfi); - this.trigger("renderer:visibleRangeChanged", this.visibleRangeCfi); - } - - msg.cfi = this.currentLocationCfi; //TODO: why is this cfi passed to chapterDisplayed - this.trigger("renderer:chapterDisplayed", msg); - - this.visible(true); - - deferred.resolve(this); //-- why does this return the renderer? - }.bind(this)); - - }.bind(this)); - - return deferred.promise; -}; - -EPUBJS.Renderer.prototype.loaded = function(url){ - this.trigger("render:loaded", url); - // var uri = EPUBJS.core.uri(url); - // var relative = uri.path.replace(book.bookUrl, ''); - // console.log(url, uri, relative); -}; - -/** -* Reconciles the current chapters layout properies with -* the global layout properities. -* Takes: global layout settings object, chapter properties string -* Returns: Object with layout properties -*/ -EPUBJS.Renderer.prototype.reconcileLayoutSettings = function(global, chapter){ - var settings = {}; - - //-- Get the global defaults - for (var attr in global) { - if (global.hasOwnProperty(attr)){ - settings[attr] = global[attr]; - } - } - //-- Get the chapter's display type - chapter.forEach(function(prop){ - var rendition = prop.replace("rendition:", ''); - var split = rendition.indexOf("-"); - var property, value; - - if(split != -1){ - property = rendition.slice(0, split); - value = rendition.slice(split+1); - - settings[property] = value; - } - }); - return settings; -}; - -/** -* Uses the settings to determine which Layout Method is needed -* Triggers events based on the method choosen -* Takes: Layout settings object -* Returns: String of appropriate for EPUBJS.Layout function -*/ -EPUBJS.Renderer.prototype.determineLayout = function(settings){ - // Default is layout: reflowable & spread: auto - var spreads = this.determineSpreads(this.minSpreadWidth); - var layoutMethod = spreads ? "ReflowableSpreads" : "Reflowable"; - var scroll = false; - - if(settings.layout === "pre-paginated") { - layoutMethod = "Fixed"; - scroll = true; - spreads = false; - } - - if(settings.layout === "reflowable" && settings.spread === "none") { - layoutMethod = "Reflowable"; - scroll = false; - spreads = false; - } - - if(settings.layout === "reflowable" && settings.spread === "both") { - layoutMethod = "ReflowableSpreads"; - scroll = false; - spreads = true; - } - - this.spreads = spreads; - this.render.scroll(scroll); - this.trigger("renderer:spreads", spreads); - return layoutMethod; -}; - -// Shortcut to trigger the hook before displaying the chapter -EPUBJS.Renderer.prototype.beforeDisplay = function(callback, renderer){ - this.triggerHooks("beforeChapterDisplay", callback, this); -}; - -// Update the renderer with the information passed by the layout -EPUBJS.Renderer.prototype.updatePages = function(layout){ - this.pageMap = this.mapPage(); - // this.displayedPages = layout.displayedPages; - - if (this.spreads) { - this.displayedPages = Math.ceil(this.pageMap.length / 2); - } else { - this.displayedPages = this.pageMap.length; - } - - // this.currentChapter.pages = layout.pageCount; - this.currentChapter.pages = this.pageMap.length; - - this._q.flush(); -}; - -// Apply the layout again and jump back to the previous cfi position -EPUBJS.Renderer.prototype.reformat = function(){ - var renderer = this; - var formated, pages; - if(!this.contents) return; - - spreads = this.determineSpreads(this.minSpreadWidth); - - // Only re-layout if the spreads have switched - if(spreads != this.spreads){ - this.spreads = spreads; - this.layoutMethod = this.determineLayout(this.layoutSettings); - this.layout = new EPUBJS.Layout[this.layoutMethod](); - } - - // Reset pages - this.chapterPos = 1; - this.render.page(1); - - // Give the css styles time to update - // clearTimeout(this.timeoutTillCfi); - // this.timeoutTillCfi = setTimeout(function(){ - - renderer.formated = renderer.layout.format(renderer.contents, renderer.render.width, renderer.render.height, renderer.gap); - renderer.render.setPageDimensions(renderer.formated.pageWidth, renderer.formated.pageHeight); - - pages = renderer.layout.calculatePages(); - renderer.updatePages(pages); - - //-- Go to current page after formating - if(renderer.currentLocationCfi){ - renderer.gotoCfi(renderer.currentLocationCfi); - } - // renderer.timeoutTillCfi = null; - -}; - -// Hide and show the render's container . -EPUBJS.Renderer.prototype.visible = function(bool){ - if(typeof(bool) === "undefined") { - return this.element.style.visibility; - } - - if(bool === true && !this.hidden){ - this.element.style.visibility = "visible"; - }else if(bool === false){ - this.element.style.visibility = "hidden"; - } -}; - -// Remove the render element and clean up listeners -EPUBJS.Renderer.prototype.remove = function() { - if(this.render.window) { - this.render.unload(); - this.render.window.removeEventListener("resize", this.resized); - this.removeEventListeners(); - this.removeSelectionListeners(); - } - - this.container.removeChild(this.element); -}; - -//-- STYLES - -EPUBJS.Renderer.prototype.applyStyles = function(styles) { - for (var style in styles) { - this.render.setStyle(style, styles[style]); - } -}; - -EPUBJS.Renderer.prototype.setStyle = function(style, val, prefixed){ - this.render.setStyle(style, val, prefixed); -}; - -EPUBJS.Renderer.prototype.removeStyle = function(style){ - this.render.removeStyle(style); -}; - -//-- HEAD TAGS -EPUBJS.Renderer.prototype.applyHeadTags = function(headTags) { - for ( var headTag in headTags ) { - this.render.addHeadTag(headTag, headTags[headTag]); - } -}; - -//-- NAVIGATION - -EPUBJS.Renderer.prototype.page = function(pg){ - if(!this.pageMap) { - console.warn("pageMap not set, queuing"); - this._q.enqueue("page", arguments); - return true; - } - - if(pg >= 1 && pg <= this.displayedPages){ - this.chapterPos = pg; - - this.render.page(pg); - this.visibleRangeCfi = this.getVisibleRangeCfi(); - this.currentLocationCfi = this.visibleRangeCfi.start; - this.trigger("renderer:locationChanged", this.currentLocationCfi); - this.trigger("renderer:visibleRangeChanged", this.visibleRangeCfi); - - return true; - } - //-- Return false if page is greater than the total - return false; -}; - -// Short cut to find next page's cfi starting at the last visible element -/* -EPUBJS.Renderer.prototype.nextPage = function(){ - var pg = this.chapterPos + 1; - if(pg <= this.displayedPages){ - this.chapterPos = pg; - - this.render.page(pg); - - this.currentLocationCfi = this.getPageCfi(this.visibileEl); - this.trigger("renderer:locationChanged", this.currentLocationCfi); - - return true; - } - //-- Return false if page is greater than the total - return false; -}; -*/ -EPUBJS.Renderer.prototype.nextPage = function(){ - return this.page(this.chapterPos + 1); -}; - -EPUBJS.Renderer.prototype.prevPage = function(){ - return this.page(this.chapterPos - 1); -}; - -//-- Show the page containing an Element -EPUBJS.Renderer.prototype.pageByElement = function(el){ - var pg; - if(!el) return; - - pg = this.render.getPageNumberByElement(el); - this.page(pg); -}; - -// Jump to the last page of the chapter -EPUBJS.Renderer.prototype.lastPage = function(){ - if(this._moving) { - return this._q.enqueue("lastPage", arguments); - } - - this.page(this.displayedPages); -}; - -// Jump to the first page of the chapter -EPUBJS.Renderer.prototype.firstPage = function(){ - this.page(1); -}; - -//-- Find a section by fragement id -EPUBJS.Renderer.prototype.section = function(fragment){ - var el = this.doc.getElementById(fragment), - left, pg; - - if(el){ - this.pageByElement(el); - } - -}; - -EPUBJS.Renderer.prototype.firstElementisTextNode = function(node) { - var children = node.childNodes; - var leng = children.length; - - if(leng && - children[0] && // First Child - children[0].nodeType === 3 && // This is a textNodes - children[0].textContent.trim().length) { // With non whitespace or return charecters - return true; - } - return false; -}; - -// Walk the node tree from a start element to next visible element -EPUBJS.Renderer.prototype.walk = function(node, x, y) { - var r, children, leng, - startNode = node, - prevNode, - stack = [startNode]; - - var STOP = 10000, ITER=0; - - while(!r && stack.length) { - node = stack.shift(); - if( this.containsPoint(node, x, y) && this.firstElementisTextNode(node)) { - r = node; - } - - if(!r && node && node.childElementCount > 0){ - children = node.children; - if (children && children.length) { - leng = children.length ? children.length : 0; - } else { - return r; - } - for (var i = leng-1; i >= 0; i--) { - if(children[i] != prevNode) stack.unshift(children[i]); - } - } - - if(!r && stack.length === 0 && startNode && startNode.parentNode !== null){ - stack.push(startNode.parentNode); - prevNode = startNode; - startNode = startNode.parentNode; - } - - - ITER++; - if(ITER > STOP) { - console.error("ENDLESS LOOP"); - break; - } - - } - - return r; -}; - -// Checks if an element is on the screen -EPUBJS.Renderer.prototype.containsPoint = function(el, x, y){ - var rect; - var left; - if(el && typeof el.getBoundingClientRect === 'function'){ - rect = el.getBoundingClientRect(); - // console.log(el, rect, x, y); - - if( rect.width !== 0 && - rect.height !== 0 && // Element not visible - rect.left >= x && - x <= rect.left + rect.width) { - return true; - } - } - - return false; -}; - -EPUBJS.Renderer.prototype.textSprint = function(root, func) { - var treeWalker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, { - acceptNode: function (node) { - if ( ! /^\s*$/.test(node.data) ) { - return NodeFilter.FILTER_ACCEPT; - } else { - return NodeFilter.FILTER_REJECT; - } - } - }, false); - var node; - while ((node = treeWalker.nextNode())) { - func(node); - } - -}; - -EPUBJS.Renderer.prototype.sprint = function(root, func) { - var treeWalker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, null, false); - var node; - while ((node = treeWalker.nextNode())) { - func(node); - } - -}; - -EPUBJS.Renderer.prototype.mapPage = function(){ - var renderer = this; - var map = []; - var root = this.render.getBaseElement(); - var page = 1; - var width = this.layout.colWidth + this.layout.gap; - var offset = this.formated.pageWidth * (this.chapterPos-1); - var limit = (width * page) - offset;// (width * page) - offset; - var elLimit = 0; - var prevRange; - var cfi; - var check = function(node) { - var elPos; - var elRange; - var children = Array.prototype.slice.call(node.childNodes); - if (node.nodeType == Node.ELEMENT_NODE) { - // elPos = node.getBoundingClientRect(); - elRange = document.createRange(); - elRange.selectNodeContents(node); - elPos = elRange.getBoundingClientRect(); - - if(!elPos || (elPos.width === 0 && elPos.height === 0)) { - return; - } - - //-- Element starts new Col - if(elPos.left > elLimit) { - children.forEach(function(node){ - if(node.nodeType == Node.TEXT_NODE && - node.textContent.trim().length) { - checkText(node); - } - }); - } - - //-- Element Spans new Col - if(elPos.right > elLimit) { - children.forEach(function(node){ - if(node.nodeType == Node.TEXT_NODE && - node.textContent.trim().length) { - checkText(node); - } - }); - } - } - - }; - var checkText = function(node){ - var ranges = renderer.splitTextNodeIntoWordsRanges(node); - ranges.forEach(function(range){ - var pos = range.getBoundingClientRect(); - - if(!pos || (pos.width === 0 && pos.height === 0)) { - return; - } - if(pos.left + pos.width < limit) { - if(!map[page-1]){ - range.collapse(true); - cfi = renderer.currentChapter.cfiFromRange(range); - // map[page-1].start = cfi; - map.push({ start: cfi, end: null }); - } - } else { - if(prevRange){ - prevRange.collapse(true); - cfi = renderer.currentChapter.cfiFromRange(prevRange); - map[map.length-1].end = cfi; - } - - range.collapse(true); - cfi = renderer.currentChapter.cfiFromRange(range); - map.push({ - start: cfi, - end: null - }); - - page += 1; - limit = (width * page) - offset; - elLimit = limit; - } - - prevRange = range; - }); - - - }; - - this.sprint(root, check); - // this.textSprint(root, checkText); - - if(prevRange){ - prevRange.collapse(true); - - cfi = renderer.currentChapter.cfiFromRange(prevRange); - map[map.length-1].end = cfi; - } - - // Handle empty map - if(!map.length) { - range = this.doc.createRange(); - range.selectNodeContents(root); - range.collapse(true); - - cfi = renderer.currentChapter.cfiFromRange(range); - - map.push({ start: cfi, end: cfi }); - - } - - // clean up - prevRange = null; - ranges = null; - range = null; - root = null; - - return map; -}; - - -EPUBJS.Renderer.prototype.indexOfBreakableChar = function (text, startPosition) { - var whiteCharacters = "\x2D\x20\t\r\n\b\f"; - // '-' \x2D - // ' ' \x20 - - if (! startPosition) { - startPosition = 0; - } - - for (var i = startPosition; i < text.length; i++) { - if (whiteCharacters.indexOf(text.charAt(i)) != -1) { - return i; - } - } - - return -1; -}; - - -EPUBJS.Renderer.prototype.splitTextNodeIntoWordsRanges = function(node){ - var ranges = []; - var text = node.textContent.trim(); - var range; - var rect; - var list; - // jaroslaw.bielski@7bulls.com - // Usage of indexOf() function for space character as word delimiter - // is not sufficient in case of other breakable characters like \r\n- etc - pos = this.indexOfBreakableChar(text); - - if(pos === -1) { - range = this.doc.createRange(); - range.selectNodeContents(node); - return [range]; - } - - range = this.doc.createRange(); - range.setStart(node, 0); - range.setEnd(node, pos); - ranges.push(range); - - // jaroslaw.bielski@7bulls.com - // there was a word miss in case of one letter words - range = this.doc.createRange(); - range.setStart(node, pos+1); - - while ( pos != -1 ) { - - pos = this.indexOfBreakableChar(text, pos + 1); - if(pos > 0) { - - if(range) { - range.setEnd(node, pos); - ranges.push(range); - } - - range = this.doc.createRange(); - range.setStart(node, pos+1); - } - } - - if(range) { - range.setEnd(node, text.length); - ranges.push(range); - } - - return ranges; -}; - -EPUBJS.Renderer.prototype.rangePosition = function(range){ - var rect; - var list; - - list = range.getClientRects(); - - if(list.length) { - rect = list[0]; - return rect; - } - - return null; -}; - -/* -// Get the cfi of the current page -EPUBJS.Renderer.prototype.getPageCfi = function(prevEl){ - var range = this.doc.createRange(); - var position; - // TODO : this might need to take margin / padding into account? - var x = 1;//this.formated.pageWidth/2; - var y = 1;//;this.formated.pageHeight/2; - - range = this.getRange(x, y); - - // var test = this.doc.defaultView.getSelection(); - // var r = this.doc.createRange(); - // test.removeAllRanges(); - // r.setStart(range.startContainer, range.startOffset); - // r.setEnd(range.startContainer, range.startOffset + 1); - // test.addRange(r); - - return this.currentChapter.cfiFromRange(range); -}; -*/ - -// Get the cfi of the current page -EPUBJS.Renderer.prototype.getPageCfi = function(){ - var pg; - if (this.spreads) { - pg = this.chapterPos*2; - startRange = this.pageMap[pg-2]; - } else { - pg = this.chapterPos; - startRange = this.pageMap[pg-1]; - } - return this.pageMap[(this.chapterPos * 2) -1].start; -}; - -EPUBJS.Renderer.prototype.getRange = function(x, y, forceElement){ - var range = this.doc.createRange(); - var position; - forceElement = true; // temp override - if(typeof document.caretPositionFromPoint !== "undefined" && !forceElement){ - position = this.doc.caretPositionFromPoint(x, y); - range.setStart(position.offsetNode, position.offset); - } else if(typeof document.caretRangeFromPoint !== "undefined" && !forceElement){ - range = this.doc.caretRangeFromPoint(x, y); - } else { - this.visibileEl = this.findElementAfter(x, y); - range.setStart(this.visibileEl, 1); - } - - // var test = this.doc.defaultView.getSelection(); - // var r = this.doc.createRange(); - // test.removeAllRanges(); - // r.setStart(range.startContainer, range.startOffset); - // r.setEnd(range.startContainer, range.startOffset + 1); - // test.addRange(r); - return range; -}; - -/* -EPUBJS.Renderer.prototype.getVisibleRangeCfi = function(prevEl){ - var startX = 0; - var startY = 0; - var endX = this.width-1; - var endY = this.height-1; - var startRange = this.getRange(startX, startY); - var endRange = this.getRange(endX, endY); //fix if carret not avail - var startCfi = this.currentChapter.cfiFromRange(startRange); - var endCfi; - if(endRange) { - endCfi = this.currentChapter.cfiFromRange(endRange); - } - - return { - start: startCfi, - end: endCfi || false - }; -}; -*/ - -EPUBJS.Renderer.prototype.pagesInCurrentChapter = function() { - var pgs; - var length; - - if(!this.pageMap) { - console.warn("page map not loaded"); - return false; - } - - length = this.pageMap.length; - - if(this.spreads){ - pgs = Math.ceil(length / 2); - } else { - pgs = length; - } - - return pgs; -}; - -EPUBJS.Renderer.prototype.currentRenderedPage = function(){ - var pg; - - if(!this.pageMap) { - console.warn("page map not loaded"); - return false; - } - - if (this.spreads && this.layout.pageCount > 1) { - pg = this.chapterPos*2; - } else { - pg = this.chapterPos; - } - - return pg; -}; - -EPUBJS.Renderer.prototype.getRenderedPagesLeft = function(){ - var pg; - var lastPage; - var pagesLeft; - - if(!this.pageMap) { - console.warn("page map not loaded"); - return false; - } - - lastPage = this.pageMap.length; - - if (this.spreads) { - pg = this.chapterPos*2; - } else { - pg = this.chapterPos; - } - - pagesLeft = lastPage - pg; - return pagesLeft; - -}; - -EPUBJS.Renderer.prototype.getVisibleRangeCfi = function(){ - var pg; - var startRange, endRange; - - if(!this.pageMap) { - console.warn("page map not loaded"); - return false; - } - - if (this.spreads) { - pg = this.chapterPos*2; - startRange = this.pageMap[pg-2]; - endRange = startRange; - - if(this.layout.pageCount > 1) { - endRange = this.pageMap[pg-1]; - } - } else { - pg = this.chapterPos; - startRange = this.pageMap[pg-1]; - endRange = startRange; - } - - if(!startRange) { - console.warn("page range miss:", pg, this.pageMap); - startRange = this.pageMap[this.pageMap.length-1]; - endRange = startRange; - } - - return { - start: startRange.start, - end: endRange.end - }; -}; - -// Goto a cfi position in the current chapter -EPUBJS.Renderer.prototype.gotoCfi = function(cfi){ - var pg; - var marker; - var range; - - if(this._moving){ - return this._q.enqueue("gotoCfi", arguments); - } - - if(_.isString(cfi)){ - cfi = this.epubcfi.parse(cfi); - } - - if(typeof document.evaluate === 'undefined') { - marker = this.epubcfi.addMarker(cfi, this.doc); - if(marker) { - pg = this.render.getPageNumberByElement(marker); - // Must Clean up Marker before going to page - this.epubcfi.removeMarker(marker, this.doc); - this.page(pg); - } - } else { - range = this.epubcfi.generateRangeFromCfi(cfi, this.doc); - if(range) { - // jaroslaw.bielski@7bulls.com - // It seems that sometimes getBoundingClientRect() returns null for first page CFI in chapter. - // It is always reproductible if few consecutive chapters have only one page. - // NOTE: This is only workaround and the issue needs an deeper investigation. - // NOTE: Observed on Android 4.2.1 using WebView widget as HTML renderer (Asus TF300T). - var rect = range.getBoundingClientRect(); - if (rect) { - pg = this.render.getPageNumberByRect(rect); - - } else { - // Goto first page in chapter - pg = 1; - } - - this.page(pg); - - // Reset the current location cfi to requested cfi - this.currentLocationCfi = cfi.str; - } - } -}; - -// Walk nodes until a visible element is found -EPUBJS.Renderer.prototype.findFirstVisible = function(startEl){ - var el = startEl || this.render.getBaseElement(); - var found; - // kgolunski@7bulls.com - // Looks like an old API usage - // Set x and y as 0 to fullfill walk method API. - found = this.walk(el, 0, 0); - - if(found) { - return found; - }else{ - return startEl; - } - -}; -// TODO: remove me - unsused -EPUBJS.Renderer.prototype.findElementAfter = function(x, y, startEl){ - var el = startEl || this.render.getBaseElement(); - var found; - found = this.walk(el, x, y); - if(found) { - return found; - }else{ - return el; - } - -}; - -/* -EPUBJS.Renderer.prototype.route = function(hash, callback){ - var location = window.location.hash.replace('#/', ''); - if(this.useHash && location.length && location != this.prevLocation){ - this.show(location, callback); - this.prevLocation = location; - return true; - } - return false; -} - -EPUBJS.Renderer.prototype.hideHashChanges = function(){ - this.useHash = false; -} - -*/ - -EPUBJS.Renderer.prototype.resize = function(width, height, setSize){ - var spreads; - - this.width = width; - this.height = height; - - if(setSize !== false) { - this.render.resize(this.width, this.height); - } - - - - if(this.contents){ - this.reformat(); - } - - this.trigger("renderer:resized", { - width: this.width, - height: this.height - }); -}; - -//-- Listeners for events in the frame - -EPUBJS.Renderer.prototype.onResized = function(e) { - var width = this.container.clientWidth; - var height = this.container.clientHeight; - - this.resize(width, height, false); -}; - -EPUBJS.Renderer.prototype.addEventListeners = function(){ - if(!this.render.document) { - return; - } - this.listenedEvents.forEach(function(eventName){ - this.render.document.addEventListener(eventName, this.triggerEvent.bind(this), false); - }, this); - -}; - -EPUBJS.Renderer.prototype.removeEventListeners = function(){ - if(!this.render.document) { - return; - } - this.listenedEvents.forEach(function(eventName){ - this.render.document.removeEventListener(eventName, this.triggerEvent, false); - }, this); - -}; - -// Pass browser events -EPUBJS.Renderer.prototype.triggerEvent = function(e){ - this.trigger("renderer:"+e.type, e); -}; - -EPUBJS.Renderer.prototype.addSelectionListeners = function(){ - this.render.document.addEventListener("selectionchange", this.onSelectionChange.bind(this), false); -}; - -EPUBJS.Renderer.prototype.removeSelectionListeners = function(){ - if(!this.render.document) { - return; - } - this.doc.removeEventListener("selectionchange", this.onSelectionChange, false); -}; - -EPUBJS.Renderer.prototype.onSelectionChange = function(e){ - if (this.selectionEndTimeout) { - clearTimeout(this.selectionEndTimeout); - } - this.selectionEndTimeout = setTimeout(function() { - this.selectedRange = this.render.window.getSelection(); - this.trigger("renderer:selected", this.selectedRange); - }.bind(this), 500); -}; - - -//-- Spreads - -EPUBJS.Renderer.prototype.setMinSpreadWidth = function(width){ - this.minSpreadWidth = width; - this.spreads = this.determineSpreads(width); -}; - -EPUBJS.Renderer.prototype.determineSpreads = function(cutoff){ - if(this.isForcedSingle || !cutoff || this.width < cutoff) { - return false; //-- Single Page - }else{ - return true; //-- Double Page - } -}; - -EPUBJS.Renderer.prototype.forceSingle = function(bool){ - if(bool) { - this.isForcedSingle = true; - // this.spreads = false; - } else { - this.isForcedSingle = false; - // this.spreads = this.determineSpreads(this.minSpreadWidth); - } -}; - -EPUBJS.Renderer.prototype.setGap = function(gap){ - this.gap = gap; //-- False == auto gap -}; - -//-- Content Replacements - -EPUBJS.Renderer.prototype.replace = function(query, func, finished, progress){ - var items = this.contents.querySelectorAll(query), - resources = Array.prototype.slice.call(items), - count = resources.length; - - - if(count === 0) { - finished(false); - return; - } - resources.forEach(function(item){ - var called = false; - var after = function(result, full){ - if(called === false) { - count--; - if(progress) progress(result, full, count); - if(count <= 0 && finished) finished(true); - called = true; - } - }; - - func(item, after); - - }.bind(this)); - -}; - -EPUBJS.Renderer.prototype.replaceWithStored = function(query, attr, func, callback) { - var _oldUrls, - _newUrls = {}, - _store = this.currentChapter.store, - _cache = this.caches[query], - _uri = EPUBJS.core.uri(this.currentChapter.absolute), - _chapterBase = _uri.base, - _attr = attr, - _wait = 2000, - progress = function(url, full, count) { - _newUrls[full] = url; - }, - finished = function(notempty) { - if(callback) callback(); - - _.each(_oldUrls, function(url){ - _store.revokeUrl(url); - }); - - _cache = _newUrls; - }; - - if(!_store) return; - - if(!_cache) _cache = {}; - _oldUrls = _.clone(_cache); - - this.replace(query, function(link, done){ - var src = link.getAttribute(_attr), - full = EPUBJS.core.resolveUrl(_chapterBase, src); - - var replaceUrl = function(url) { - var timeout; - link.onload = function(){ - clearTimeout(timeout); - done(url, full); - }; - - link.onerror = function(e){ - clearTimeout(timeout); - done(url, full); - console.error(e); - }; - - if(query == "image") { - //-- SVG needs this to trigger a load event - link.setAttribute("externalResourcesRequired", "true"); - } - - if(query == "link[href]" && link.getAttribute("rel") !== "stylesheet") { - //-- Only Stylesheet links seem to have a load events, just continue others - done(url, full); - } - - link.setAttribute(_attr, url); - - //-- If elements never fire Load Event, should continue anyways - timeout = setTimeout(function(){ - done(url, full); - }, _wait); - - }; - - if(full in _oldUrls){ - replaceUrl(_oldUrls[full]); - _newUrls[full] = _oldUrls[full]; - delete _oldUrls[full]; - }else{ - func(_store, full, replaceUrl, link); - } - - }, finished, progress); -}; - -//-- Enable binding events to Renderer -RSVP.EventTarget.mixin(EPUBJS.Renderer.prototype); - -var EPUBJS = EPUBJS || {}; -EPUBJS.replace = {}; - -//-- Replaces the relative links within the book to use our internal page changer -EPUBJS.replace.hrefs = function(callback, renderer){ - var book = this; - var replacments = function(link, done){ - var href = link.getAttribute("href"), - isRelative = href.search("://"), - directory, - relative, - location; - - if(isRelative != -1){ - - link.setAttribute("target", "_blank"); - - }else{ - // Links may need to be resolved, such as ../chp1.xhtml - directory = EPUBJS.core.uri(renderer.render.window.location.href).directory; - if(directory) { - relative = EPUBJS.core.resolveUrl(directory, href); - } else { - relative = href; - } - - link.onclick = function(){ - book.goto(relative); - return false; - }; - - } - done(); - - }; - - renderer.replace("a[href]", replacments, callback); - -}; - -EPUBJS.replace.head = function(callback, renderer) { - - renderer.replaceWithStored("link[href]", "href", EPUBJS.replace.links, callback); - -}; - - -//-- Replaces assets src's to point to stored version if browser is offline -EPUBJS.replace.resources = function(callback, renderer){ - //srcs = this.doc.querySelectorAll('[src]'); - renderer.replaceWithStored("[src]", "src", EPUBJS.replace.srcs, callback); - -}; - -EPUBJS.replace.svg = function(callback, renderer) { - - renderer.replaceWithStored("image", "xlink:href", function(_store, full, done){ - _store.getUrl(full).then(done); - }, callback); - -}; - -EPUBJS.replace.srcs = function(_store, full, done){ - - _store.getUrl(full).then(done); - -}; - -//-- Replaces links in head, such as stylesheets - link[href] -EPUBJS.replace.links = function(_store, full, done, link){ - //-- Handle replacing urls in CSS - if(link.getAttribute("rel") === "stylesheet") { - EPUBJS.replace.stylesheets(_store, full).then(function(url, full){ - // done - setTimeout(function(){ - done(url, full); - }, 5); //-- Allow for css to apply before displaying chapter - }); - }else{ - _store.getUrl(full).then(done); - } -}; - -EPUBJS.replace.stylesheets = function(_store, full) { - var deferred = new RSVP.defer(); - - if(!_store) return; - - _store.getText(full).then(function(text){ - var url; - - EPUBJS.replace.cssUrls(_store, full, text).then(function(newText){ - var _URL = window.URL || window.webkitURL || window.mozURL; - - var blob = new Blob([newText], { "type" : "text\/css" }), - url = _URL.createObjectURL(blob); - - deferred.resolve(url); - - }, function(e) { - console.error(e); - }); - - }); - - return deferred.promise; -}; - -EPUBJS.replace.cssUrls = function(_store, base, text){ - var deferred = new RSVP.defer(), - promises = [], - matches = text.match(/url\(\'?\"?([^\'|^\"^\)]*)\'?\"?\)/g); - - if(!_store) return; - - if(!matches){ - deferred.resolve(text); - return deferred.promise; - } - - matches.forEach(function(str){ - var full = EPUBJS.core.resolveUrl(base, str.replace(/url\(|[|\)|\'|\"]/g, '')); - var replaced = _store.getUrl(full).then(function(url){ - text = text.replace(str, 'url("'+url+'")'); - }); - - promises.push(replaced); - }); - - RSVP.all(promises).then(function(){ - deferred.resolve(text); - }); - - return deferred.promise; -}; - - - -EPUBJS.Unarchiver = function(url){ - - this.loadLib(); - this.urlCache = {}; - -}; - -//-- Load the zip lib and set the workerScriptsPath -EPUBJS.Unarchiver.prototype.loadLib = function(callback){ - if(typeof(JSZip) == "undefined") console.error("JSZip lib not loaded"); -}; - -EPUBJS.Unarchiver.prototype.openZip = function(zipUrl, callback){ - var deferred = new RSVP.defer(); - - return EPUBJS.core.request(zipUrl, "binary").then(function(data){ - this.zip = new JSZip(data); - }.bind(this)); -}; - -EPUBJS.Unarchiver.prototype.getXml = function(url, encoding){ - - return this.getText(url, encoding). - then(function(text){ - var parser = new DOMParser(); - return parser.parseFromString(text, "text/xml"); - }); - -}; - -EPUBJS.Unarchiver.prototype.getUrl = function(url, mime){ - var unarchiver = this; - var deferred = new RSVP.defer(); - var decodededUrl = window.decodeURIComponent(url); - var entry = this.zip.file(decodededUrl); - var _URL = window.URL || window.webkitURL || window.mozURL; - var tempUrl; - - if(!entry) { - deferred.reject({ - message : "File not found in the epub: " + url, - stack : new Error().stack - }); - return deferred.promise; - } - - if(url in this.urlCache) { - deferred.resolve(this.urlCache[url]); - return deferred.promise; - } - - blob = new Blob([entry.asUint8Array()], {type : mime || this.zip.getMimeType(entry.name)}); - - tempUrl = _URL.createObjectURL(blob); - deferred.resolve(tempUrl); - unarchiver.urlCache[url] = tempUrl; - - return deferred.promise; -}; - -EPUBJS.Unarchiver.prototype.getText = function(url, encoding){ - var unarchiver = this; - var deferred = new RSVP.defer(); - var decodededUrl = window.decodeURIComponent(url); - var entry = this.zip.file(decodededUrl); - var _URL = window.URL || window.webkitURL || window.mozURL; - - if(!entry) { - console.warn("File not found in the contained epub:", url); - return deferred.promise; - } - - text = entry.asText(); - deferred.resolve(text); - - return deferred.promise; -}; - -EPUBJS.Unarchiver.prototype.revokeUrl = function(url){ - var _URL = window.URL || window.webkitURL || window.mozURL; - var fromCache = unarchiver.urlCache[url]; - if(fromCache) _URL.revokeObjectURL(fromCache); -}; - -EPUBJS.Unarchiver.prototype.failed = function(error){ - console.error(error); -}; - -EPUBJS.Unarchiver.prototype.afterSaved = function(error){ - this.callback(); -}; - -EPUBJS.Unarchiver.prototype.toStorage = function(entries){ - var timeout = 0, - delay = 20, - that = this, - count = entries.length; - - function callback(){ - count--; - if(count === 0) that.afterSaved(); - } - - entries.forEach(function(entry){ - - setTimeout(function(entry){ - that.saveEntryFileToStorage(entry, callback); - }, timeout, entry); - - timeout += delay; - }); - - console.log("time", timeout); - - //entries.forEach(this.saveEntryFileToStorage.bind(this)); -}; - -// EPUBJS.Unarchiver.prototype.saveEntryFileToStorage = function(entry, callback){ -// var that = this; -// entry.getData(new zip.BlobWriter(), function(blob) { -// EPUBJS.storage.save(entry.filename, blob, callback); -// }); -// }; - -//# sourceMappingURL=epub.js.map \ No newline at end of file +(function(){"use strict";function a(a){return"function"==typeof a||"object"==typeof a&&null!==a}function b(a){return"function"==typeof a}function c(a){return"object"==typeof a&&null!==a}function d(){}function e(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}function f(a){var b=a._promiseCallbacks;return b||(b=a._promiseCallbacks={}),b}function g(a,b){return"onerror"===a?void va.on("error",b):2!==arguments.length?va[a]:void(va[a]=b)}function h(){setTimeout(function(){for(var a,b=0;bh;h++)u(e.resolve(a[h]),void 0,c,d);return f}function E(a,b){var c=this;if(a&&"object"==typeof a&&a.constructor===c)return a;var d=new c(k,b);return q(d,a),d}function F(a,b){var c=this,d=new c(k,b);return t(d,a),d}function G(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function H(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function I(a,c){var d=this;d._id=Ja++,d._label=c,d._state=void 0,d._result=void 0,d._subscribers=[],va.instrument&&xa("created",d),k!==a&&(b(a)||G(),d instanceof I||H(),z(d,a))}function J(a,b,c){this._superConstructor(a,b,!1,c)}function K(a,b){return new J(Ka,a,b).promise}function L(a,b){return Ka.all(a,b)}function M(a,b){Wa[Pa]=a,Wa[Pa+1]=b,Pa+=2,2===Pa&&Ma()}function N(){var a=process.nextTick,b=process.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);return Array.isArray(b)&&"0"===b[1]&&"10"===b[2]&&(a=setImmediate),function(){a(S)}}function O(){return function(){La(S)}}function P(){var a=0,b=new Ta(S),c=document.createTextNode("");return b.observe(c,{characterData:!0}),function(){c.data=a=++a%2}}function Q(){var a=new MessageChannel;return a.port1.onmessage=S,function(){a.port2.postMessage(0)}}function R(){return function(){setTimeout(S,1)}}function S(){for(var a=0;Pa>a;a+=2){var b=Wa[a],c=Wa[a+1];b(c),Wa[a]=void 0,Wa[a+1]=void 0}Pa=0}function T(){try{var a=require,b=a("vertx");return La=b.runOnLoop||b.runOnContext,O()}catch(c){return R()}}function U(a){var b={};return b.promise=new Ka(function(a,c){b.resolve=a,b.reject=c},a),b}function V(a,c,d){return Ka.all(a,d).then(function(a){if(!b(c))throw new TypeError("You must pass a function as filter's second argument.");for(var e=a.length,f=new Array(e),g=0;e>g;g++)f[g]=c(a[g]);return Ka.all(f,d).then(function(b){for(var c=new Array(e),d=0,f=0;e>f;f++)b[f]&&(c[d]=a[f],d++);return c.length=d,c})})}function W(a,b,c){this._superConstructor(a,b,!0,c)}function X(a,b,c){this._superConstructor(a,b,!1,c)}function Y(a,b){return new X(Ka,a,b).promise}function Z(a,b){return new Za(Ka,a,b).promise}function $(a,c,d){return Ka.all(a,d).then(function(a){if(!b(c))throw new TypeError("You must pass a function as map's second argument.");for(var e=a.length,f=new Array(e),g=0;e>g;g++)f[g]=c(a[g]);return Ka.all(f,d)})}function _(){this.value=void 0}function aa(a){try{return a.then}catch(b){return cb.value=b,cb}}function ba(a,b,c){try{a.apply(b,c)}catch(d){return cb.value=d,cb}}function ca(a,b){for(var c,d,e={},f=a.length,g=new Array(f),h=0;f>h;h++)g[h]=a[h];for(d=0;dd;d++)c[d-1]=a[d];return c}function ea(a,b){return{then:function(c,d){return a.call(b,c,d)}}}function fa(a,b){var c=function(){for(var c,d=this,e=arguments.length,f=new Array(e+1),g=!1,h=0;e>h;++h){if(c=arguments[h],!g){if(g=ia(c),g===db){var i=new Ka(k);return t(i,db.value),i}g&&g!==!0&&(c=ea(g,c))}f[h]=c}var j=new Ka(k);return f[e]=function(a,c){a?t(j,a):void 0===b?q(j,c):b===!0?q(j,da(arguments)):ra(b)?q(j,ca(arguments,b)):q(j,c)},g?ha(j,f,a,d):ga(j,f,a,d)};return c.__proto__=a,c}function ga(a,b,c,d){var e=ba(c,d,b);return e===cb&&t(a,e.value),a}function ha(a,b,c,d){return Ka.all(b).then(function(b){var e=ba(c,d,b);return e===cb&&t(a,e.value),a})}function ia(a){return a&&"object"==typeof a?a.constructor===Ka?!0:aa(a):!1}function ja(a,b){return Ka.race(a,b)}function ka(a,b){return Ka.reject(a,b)}function la(a,b){return Ka.resolve(a,b)}function ma(a){throw setTimeout(function(){throw a}),a}function na(a,b){va.async(a,b)}function oa(){va.on.apply(va,arguments)}function pa(){va.off.apply(va,arguments)}var qa;qa=Array.isArray?Array.isArray:function(a){return"[object Array]"===Object.prototype.toString.call(a)};var ra=qa,sa=Date.now||function(){return(new Date).getTime()},ta=Object.create||function(a){if(arguments.length>1)throw new Error("Second argument not supported");if("object"!=typeof a)throw new TypeError("Argument must be an object");return d.prototype=a,new d},ua={mixin:function(a){return a.on=this.on,a.off=this.off,a.trigger=this.trigger,a._promiseCallbacks=void 0,a},on:function(a,b){if("function"!=typeof b)throw new TypeError("Callback must be a function");var c,d=f(this);c=d[a],c||(c=d[a]=[]),-1===e(c,b)&&c.push(b)},off:function(a,b){var c,d,g=f(this);return b?(c=g[a],d=e(c,b),void(-1!==d&&c.splice(d,1))):void(g[a]=[])},trigger:function(a,b,c){var d,e,g=f(this);if(d=g[a])for(var h=0;he;e++)a._eachEntry(d[e],e)},B.prototype._eachEntry=function(a,b){var d=this,e=d._instanceConstructor;c(a)?a.constructor===e&&a._state!==ya?(a._onError=null,d._settledAt(a._state,b,a._result)):d._willSettleAt(e.resolve(a),b):(d._remaining--,d._result[b]=d._makeResult(za,b,a))},B.prototype._settledAt=function(a,b,c){var d=this,e=d.promise;e._state===ya&&(d._remaining--,d._abortOnReject&&a===Aa?t(e,c):d._result[b]=d._makeResult(a,b,c)),0===d._remaining&&s(e,d._result)},B.prototype._makeResult=function(a,b,c){return c},B.prototype._willSettleAt=function(a,b){var c=this;u(a,void 0,function(a){c._settledAt(za,b,a)},function(a){c._settledAt(Aa,b,a)})};var Ea=C,Fa=D,Ga=E,Ha=F,Ia="rsvp_"+sa()+"-",Ja=0,Ka=I;I.cast=Ga,I.all=Ea,I.race=Fa,I.resolve=Ga,I.reject=Ha,I.prototype={constructor:I,_guidKey:Ia,_onError:function(a){var b=this;va.after(function(){b._onError&&va.trigger("error",a,b._label)})},then:function(a,b,c){var d=this,e=d._state;if(e===za&&!a||e===Aa&&!b)return va.instrument&&xa("chained",d,d),d;d._onError=null;var f=new d.constructor(k,c),g=d._result;if(va.instrument&&xa("chained",d,f),e){var h=arguments[e-1];va.async(function(){y(e,f,h,g)})}else u(d,f,a,b);return f},"catch":function(a,b){return this.then(void 0,a,b)},"finally":function(a,b){var c=this,d=c.constructor;return c.then(function(b){return d.resolve(a()).then(function(){return b})},function(b){return d.resolve(a()).then(function(){throw b})},b)}},J.prototype=ta(Da.prototype),J.prototype._superConstructor=Da,J.prototype._makeResult=A,J.prototype._validationError=function(){return new Error("allSettled must be called with an array")};var La,Ma,Na=K,Oa=L,Pa=0,Qa=({}.toString,M),Ra="undefined"!=typeof window?window:void 0,Sa=Ra||{},Ta=Sa.MutationObserver||Sa.WebKitMutationObserver,Ua="undefined"==typeof self&&"undefined"!=typeof process&&"[object process]"==={}.toString.call(process),Va="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,Wa=new Array(1e3);Ma=Ua?N():Ta?P():Va?Q():void 0===Ra&&"function"==typeof require?T():R();var Xa=U,Ya=V,Za=W;W.prototype=ta(Da.prototype),W.prototype._superConstructor=Da,W.prototype._init=function(){this._result={}},W.prototype._validateInput=function(a){return a&&"object"==typeof a},W.prototype._validationError=function(){return new Error("Promise.hash must be called with an object")},W.prototype._enumerate=function(){var a=this,b=a.promise,c=a._input,d=[];for(var e in c)b._state===ya&&Object.prototype.hasOwnProperty.call(c,e)&&d.push({position:e,entry:c[e]});var f=d.length;a._remaining=f;for(var g,h=0;b._state===ya&&f>h;h++)g=d[h],a._eachEntry(g.entry,g.position)},X.prototype=ta(Za.prototype),X.prototype._superConstructor=Da,X.prototype._makeResult=A,X.prototype._validationError=function(){return new Error("hashSettled must be called with an object")};var $a,_a=Y,ab=Z,bb=$,cb=new _,db=new _,eb=fa;if("object"==typeof self)$a=self;else{if("object"!=typeof global)throw new Error("no global: `self` or `global` found");$a=global}var fb=$a,gb=ja,hb=ka,ib=la,jb=ma;va.async=Qa,va.after=function(a){setTimeout(a,0)};if("undefined"!=typeof window&&"object"==typeof window.__PROMISE_INSTRUMENTATION__){var kb=window.__PROMISE_INSTRUMENTATION__;g("instrument",!0);for(var lb in kb)kb.hasOwnProperty(lb)&&oa(lb,kb[lb])}var mb={race:gb,Promise:Ka,allSettled:Na,hash:ab,hashSettled:_a,denodeify:eb,on:oa,off:pa,map:bb,filter:Ya,resolve:ib,reject:hb,all:Oa,rethrow:jb,defer:Xa,EventTarget:ua,configure:g,async:na};"function"==typeof define&&define.amd?define(function(){return mb}):"undefined"!=typeof module&&module.exports?module.exports=mb:"undefined"!=typeof fb&&(fb.RSVP=mb)}).call(this);var EPUBJS=EPUBJS||{};EPUBJS.VERSION="0.2.12",EPUBJS.plugins=EPUBJS.plugins||{},EPUBJS.filePath=EPUBJS.filePath||"/epubjs/",EPUBJS.Render={},function(a){var b=(a.ePub||{},a.ePub=function(){var a,b;return"undefined"!=typeof arguments[0]&&("string"==typeof arguments[0]||arguments[0]instanceof ArrayBuffer)&&(a=arguments[0],arguments[1]&&"object"==typeof arguments[1]?(b=arguments[1],b.bookPath=a):b={bookPath:a}),!arguments[0]||"object"!=typeof arguments[0]||arguments[0]instanceof ArrayBuffer||(b=arguments[0]),new EPUBJS.Book(b)});"function"==typeof define&&define.amd?define(["rsvp"],function(){return b}):"undefined"!=typeof module&&module.exports&&(module.exports=b)}(window),EPUBJS.Book=function(a){this.settings=EPUBJS.core.defaults(a||{},{bookPath:void 0,bookKey:void 0,packageUrl:void 0,storage:!1,fromStorage:!1,saved:!1,online:!0,contained:!1,width:void 0,height:void 0,layoutOveride:void 0,orientation:void 0,minSpreadWidth:768,gap:"auto",version:1,restore:!1,reload:!1,"goto":!1,styles:{},headTags:{},withCredentials:!1,render_method:"Iframe"}),this.settings.EPUBJSVERSION=EPUBJS.VERSION,this.spinePos=0,this.stored=!1,this.online=this.settings.online||navigator.onLine,this.networkListeners(),this.ready={manifest:new RSVP.defer,spine:new RSVP.defer,metadata:new RSVP.defer,cover:new RSVP.defer,toc:new RSVP.defer,pageList:new RSVP.defer},this.readyPromises=[this.ready.manifest.promise,this.ready.spine.promise,this.ready.metadata.promise,this.ready.cover.promise,this.ready.toc.promise],this.pageList=[],this.pagination=new EPUBJS.Pagination,this.pageListReady=this.ready.pageList.promise,this.ready.all=RSVP.all(this.readyPromises),this.ready.all.then(this._ready.bind(this)),this.isRendered=!1,this._q=EPUBJS.core.queue(this),this._rendering=!1,this._displayQ=EPUBJS.core.queue(this),this._moving=!1,this._gotoQ=EPUBJS.core.queue(this),this.renderer=new EPUBJS.Renderer(this.settings.render_method),this.renderer.setMinSpreadWidth(this.settings.minSpreadWidth),this.renderer.setGap(this.settings.gap),this.listenToRenderer(this.renderer),this.defer_opened=new RSVP.defer,this.opened=this.defer_opened.promise,this.store=!1,this.settings.storage!==!1&&this.fromStorage(!0),("string"==typeof this.settings.bookPath||this.settings.bookPath instanceof ArrayBuffer)&&this.open(this.settings.bookPath,this.settings.reload),window.addEventListener("beforeunload",this.unload.bind(this),!1)},EPUBJS.Book.prototype.open=function(a,b){var c,d=this,e=new RSVP.defer;return this.settings.bookPath=a,this.settings.contained||this.isContained(a)?(this.settings.contained=this.contained=!0,this.bookUrl="",c=this.unarchive(a).then(function(){return d.loadPackage()})):(this.bookUrl=this.urlFrom(a),c=this.loadPackage()),this.settings.restore&&!b&&localStorage?c.then(function(a){var b=d.packageIdentifier(a),c=d.restore(b);c||d.unpack(a),e.resolve(),d.defer_opened.resolve()}):c.then(function(a){d.unpack(a),e.resolve(),d.defer_opened.resolve()}),this._registerReplacements(this.renderer),e.promise},EPUBJS.Book.prototype.loadPackage=function(a){var b,c=this,d=new EPUBJS.Parser,e=a||"META-INF/container.xml";return b=this.settings.packageUrl?c.loadXml(c.settings.packageUrl):c.loadXml(c.bookUrl+e).then(function(a){return d.container(a)}).then(function(a){return c.settings.contentsPath=c.bookUrl+a.basePath,c.settings.packageUrl=c.bookUrl+a.packagePath,c.settings.encoding=a.encoding,c.loadXml(c.settings.packageUrl)}),b["catch"](function(a){console.error("Could not load book at: "+e),c.trigger("book:loadFailed",e)}),b},EPUBJS.Book.prototype.packageIdentifier=function(a){var b=new EPUBJS.Parser;return b.identifier(a)},EPUBJS.Book.prototype.unpack=function(a){var b=this,c=new EPUBJS.Parser;b.contents=c.packageContents(a,b.settings.contentsPath),b.manifest=b.contents.manifest,b.spine=b.contents.spine,b.spineIndexByURL=b.contents.spineIndexByURL,b.metadata=b.contents.metadata,b.settings.bookKey||(b.settings.bookKey=b.generateBookKey(b.metadata.identifier)),b.globalLayoutProperties=b.parseLayoutProperties(b.metadata),b.contents.coverPath&&(b.cover=b.contents.cover=b.settings.contentsPath+b.contents.coverPath),b.spineNodeIndex=b.contents.spineNodeIndex,b.ready.manifest.resolve(b.contents.manifest),b.ready.spine.resolve(b.contents.spine),b.ready.metadata.resolve(b.contents.metadata),b.ready.cover.resolve(b.contents.cover),b.locations=new EPUBJS.Locations(b.spine,b.store,b.settings.withCredentials),b.contents.navPath?(b.settings.navUrl=b.settings.contentsPath+b.contents.navPath,b.loadXml(b.settings.navUrl).then(function(a){return c.nav(a,b.spineIndexByURL,b.spine)}).then(function(a){b.toc=b.contents.toc=a,b.ready.toc.resolve(b.contents.toc)},function(a){b.ready.toc.resolve(!1)}),b.loadXml(b.settings.navUrl).then(function(a){return c.pageList(a,b.spineIndexByURL,b.spine)}).then(function(a){var c=new EPUBJS.EpubCFI,d=0;0!==a.length&&(b.pageList=b.contents.pageList=a,b.pageList.forEach(function(a){a.cfi||(d+=1,c.generateCfiFromHref(a.href,b).then(function(c){a.cfi=c,a.packageUrl=b.settings.packageUrl,d-=1,0===d&&(b.pagination.process(b.pageList),b.ready.pageList.resolve(b.pageList))}))}),d||(b.pagination.process(b.pageList),b.ready.pageList.resolve(b.pageList)))},function(a){b.ready.pageList.resolve([])})):b.contents.tocPath?(b.settings.tocUrl=b.settings.contentsPath+b.contents.tocPath,b.loadXml(b.settings.tocUrl).then(function(a){return c.toc(a,b.spineIndexByURL,b.spine)}).then(function(a){b.toc=b.contents.toc=a,b.ready.toc.resolve(b.contents.toc)},function(a){b.ready.toc.resolve(!1)})):b.ready.toc.resolve(!1)},EPUBJS.Book.prototype.createHiddenRender=function(a,b,c){var d,e,f=this.element.getBoundingClientRect(),g=b||this.settings.width||f.width,h=c||this.settings.height||f.height;return a.setMinSpreadWidth(this.settings.minSpreadWidth),a.setGap(this.settings.gap),this._registerReplacements(a),this.settings.forceSingle&&a.forceSingle(!0),d=document.createElement("div"),d.style.visibility="hidden",d.style.overflow="hidden",d.style.width="0",d.style.height="0",this.element.appendChild(d),e=document.createElement("div"),e.style.visibility="hidden",e.style.overflow="hidden",e.style.width=g+"px",e.style.height=h+"px",d.appendChild(e),a.initialize(e),d},EPUBJS.Book.prototype.generatePageList=function(a,b){var c=[],d=new EPUBJS.Renderer(this.settings.render_method,!1),e=this.createHiddenRender(d,a,b),f=new RSVP.defer,g=-1,h=this.spine.length,i=0,j=function(a){var b,e=g+1,f=a||new RSVP.defer;return e>=h?f.resolve():(g=e,b=new EPUBJS.Chapter(this.spine[g],this.store),d.displayChapter(b,this.globalLayoutProperties).then(function(a){d.pageMap.forEach(function(a){i+=1,c.push({cfi:a.start,page:i})}),d.pageMap.length%2>0&&d.spreads&&(i+=1,c.push({cfi:d.pageMap[d.pageMap.length-1].end,page:i})),setTimeout(function(){j(f)},1)})),f.promise}.bind(this);j().then(function(){d.remove(),this.element.removeChild(e),f.resolve(c)}.bind(this));return f.promise},EPUBJS.Book.prototype.generatePagination=function(a,b){var c=this,d=new RSVP.defer;return this.ready.spine.promise.then(function(){c.generatePageList(a,b).then(function(a){c.pageList=c.contents.pageList=a,c.pagination.process(a),c.ready.pageList.resolve(c.pageList),d.resolve(c.pageList)})}),d.promise},EPUBJS.Book.prototype.loadPagination=function(a){var b=JSON.parse(a);return b&&b.length&&(this.pageList=b,this.pagination.process(this.pageList),this.ready.pageList.resolve(this.pageList)),this.pageList},EPUBJS.Book.prototype.getPageList=function(){return this.ready.pageList.promise},EPUBJS.Book.prototype.getMetadata=function(){return this.ready.metadata.promise},EPUBJS.Book.prototype.getToc=function(){return this.ready.toc.promise},EPUBJS.Book.prototype.networkListeners=function(){var a=this;window.addEventListener("offline",function(b){a.online=!1,a.settings.storage&&a.fromStorage(!0),a.trigger("book:offline")},!1),window.addEventListener("online",function(b){a.online=!0,a.settings.storage&&a.fromStorage(!1),a.trigger("book:online")},!1)},EPUBJS.Book.prototype.listenToRenderer=function(a){var b=this;a.Events.forEach(function(c){a.on(c,function(a){b.trigger(c,a)})}),a.on("renderer:visibleRangeChanged",function(a){var b,c,d,e=[];this.pageList.length>0&&(b=this.pagination.pageFromCfi(a.start),d=this.pagination.percentageFromPage(b),e.push(b),a.end&&(c=this.pagination.pageFromCfi(a.end),e.push(c)),this.trigger("book:pageChanged",{anchorPage:b,percentage:d,pageRange:e}))}.bind(this)),a.on("render:loaded",this.loadChange.bind(this))},EPUBJS.Book.prototype.loadChange=function(a){var b,c,d=EPUBJS.core.uri(a),e=EPUBJS.core.uri(this.currentChapter.absolute);d.path!=e.path?(console.warn("Miss Match",d.path,this.currentChapter.absolute),b=this.spineIndexByURL[d.filename],c=new EPUBJS.Chapter(this.spine[b],this.store),this.currentChapter=c,this.renderer.currentChapter=c,this.renderer.afterLoad(this.renderer.render.docEl),this.renderer.beforeDisplay(function(){this.renderer.afterDisplay()}.bind(this))):this._rendering||this.renderer.reformat()},EPUBJS.Book.prototype.unlistenToRenderer=function(a){a.Events.forEach(function(b){a.off(b)})},EPUBJS.Book.prototype.loadXml=function(a){return this.settings.fromStorage?this.store.getXml(a,this.settings.encoding):this.settings.contained?this.zip.getXml(a,this.settings.encoding):EPUBJS.core.request(a,"xml",this.settings.withCredentials)},EPUBJS.Book.prototype.urlFrom=function(a){var b,c=EPUBJS.core.uri(a),d=c.protocol,e="/"==c.path[0],f=window.location,g=f.origin||f.protocol+"//"+f.host,h=document.getElementsByTagName("base");return h.length&&(b=h[0].href),c.protocol?c.origin+c.path:!d&&e?(b||g)+c.path:d||e?void 0:EPUBJS.core.resolveUrl(b||f.pathname,c.path)},EPUBJS.Book.prototype.unarchive=function(a){return this.zip=new EPUBJS.Unarchiver,this.store=this.zip,this.zip.open(a)},EPUBJS.Book.prototype.isContained=function(a){if(a instanceof ArrayBuffer)return!0;var b=EPUBJS.core.uri(a);return!b.extension||"epub"!=b.extension&&"zip"!=b.extension?!1:!0},EPUBJS.Book.prototype.isSaved=function(a){var b;return localStorage?(b=localStorage.getItem(a),localStorage&&null!==b?!0:!1):!1},EPUBJS.Book.prototype.generateBookKey=function(a){return"epubjs:"+EPUBJS.VERSION+":"+window.location.host+":"+a},EPUBJS.Book.prototype.saveContents=function(){return localStorage?void localStorage.setItem(this.settings.bookKey,JSON.stringify(this.contents)):!1},EPUBJS.Book.prototype.removeSavedContents=function(){return localStorage?void localStorage.removeItem(this.settings.bookKey):!1},EPUBJS.Book.prototype.renderTo=function(a){var b,c=this;if(EPUBJS.core.isElement(a))this.element=a;else{if("string"!=typeof a)return void console.error("Not an Element");this.element=EPUBJS.core.getEl(a)}return b=this.opened.then(function(){return c.renderer.initialize(c.element,c.settings.width,c.settings.height),c.metadata.direction&&c.renderer.setDirection(c.metadata.direction),c._rendered(),c.startDisplay()})},EPUBJS.Book.prototype.startDisplay=function(){var a;return a=this.settings["goto"]?this["goto"](this.settings["goto"]):this.settings.previousLocationCfi?this.gotoCfi(this.settings.previousLocationCfi):this.displayChapter(this.spinePos)},EPUBJS.Book.prototype.restore=function(a){var b,c=this,d=["manifest","spine","metadata","cover","toc","spineNodeIndex","spineIndexByURL","globalLayoutProperties"],e=!1,f=this.generateBookKey(a),g=localStorage.getItem(f),h=d.length;if(this.settings.clearSaved&&(e=!0),!e&&"undefined"!=g&&null!==g)for(c.contents=JSON.parse(g),b=0;h>b;b++){var i=d[b];if(!c.contents[i]){e=!0;break}c[i]=c.contents[i]}return!e&&g&&this.contents&&this.settings.contentsPath?(this.settings.bookKey=f,this.ready.manifest.resolve(this.manifest),this.ready.spine.resolve(this.spine),this.ready.metadata.resolve(this.metadata),this.ready.cover.resolve(this.cover),this.ready.toc.resolve(this.toc),!0):!1},EPUBJS.Book.prototype.displayChapter=function(a,b,c){var d,e,f,g,h=this,i=c||new RSVP.defer;return this.isRendered?this._rendering||this._rendering?(this._displayQ.enqueue("displayChapter",[a,b,i]),i.promise):(EPUBJS.core.isNumber(a)?f=a:(e=new EPUBJS.EpubCFI(a),f=e.spinePos),(0>f||f>=this.spine.length)&&(console.warn("Not A Valid Location"),f=0,b=!1,e=!1),g=new EPUBJS.Chapter(this.spine[f],this.store),this._rendering=!0,this._needsAssetReplacement()&&g.registerHook("beforeChapterRender",[EPUBJS.replace.head,EPUBJS.replace.resources,EPUBJS.replace.svg],!0),h.currentChapter=g,d=h.renderer.displayChapter(g,this.globalLayoutProperties),e?h.renderer.gotoCfi(e):b&&h.renderer.lastPage(),d.then(function(a){h.spinePos=f,i.resolve(h.renderer),h.settings.fromStorage===!1&&h.settings.contained===!1&&h.preloadNextChapter(),h._rendering=!1,h._displayQ.dequeue(),0===h._displayQ.length()&&h._gotoQ.dequeue()},function(a){console.error("Could not load Chapter: "+g.absolute,a),h.trigger("book:chapterLoadFailed",g.absolute),h._rendering=!1,i.reject(a)}),i.promise):(this._q.enqueue("displayChapter",arguments),i.reject({message:"Rendering",stack:(new Error).stack}),i.promise)},EPUBJS.Book.prototype.nextPage=function(){var a;return this.isRendered?(a=this.renderer.nextPage(),a?void 0:this.nextChapter()):this._q.enqueue("nextPage",arguments)},EPUBJS.Book.prototype.prevPage=function(){var a;return this.isRendered?(a=this.renderer.prevPage(),a?void 0:this.prevChapter()):this._q.enqueue("prevPage",arguments)},EPUBJS.Book.prototype.nextChapter=function(){var a;if(this.spinePos0){for(a=this.spinePos-1;this.spine[a]&&this.spine[a].linear&&"no"==this.spine[a].linear;)a--;if(a>=0)return this.displayChapter(a,!0);this.trigger("book:atStart")}else this.trigger("book:atStart")},EPUBJS.Book.prototype.getCurrentLocationCfi=function(){return this.isRendered?this.renderer.currentLocationCfi:!1},EPUBJS.Book.prototype["goto"]=function(a){return 0===a.indexOf("epubcfi(")?this.gotoCfi(a):a.indexOf("%")===a.length-1?this.gotoPercentage(parseInt(a.substring(0,a.length-1))/100):"number"==typeof a||isNaN(a)===!1?this.gotoPage(a):this.gotoHref(a)},EPUBJS.Book.prototype.gotoCfi=function(a,b){var c,d,e,f=b||new RSVP.defer;return this.isRendered?this._moving||this._rendering?(console.warn("Renderer is moving"),this._gotoQ.enqueue("gotoCfi",[a,f]),!1):(c=new EPUBJS.EpubCFI(a),d=c.spinePos,-1==d?!1:(e=this.spine[d],promise=f.promise,this._moving=!0,this.currentChapter&&this.spinePos===d?(this.renderer.gotoCfi(c),this._moving=!1,f.resolve(this.renderer.currentLocationCfi)):(e&&-1!=d||(d=0,e=this.spine[d]),this.currentChapter=new EPUBJS.Chapter(e,this.store),this.currentChapter&&(this.spinePos=d,render=this.renderer.displayChapter(this.currentChapter,this.globalLayoutProperties),this.renderer.gotoCfi(c),render.then(function(a){this._moving=!1,f.resolve(a.currentLocationCfi)}.bind(this)))),promise.then(function(){this._gotoQ.dequeue()}.bind(this)),promise)):(console.warn("Not yet Rendered"),this.settings.previousLocationCfi=a,!1)},EPUBJS.Book.prototype.gotoHref=function(a,b){var c,d,e,f,g,h=b||new RSVP.defer;return this.isRendered?this._moving||this._rendering?(this._gotoQ.enqueue("gotoHref",[a,h]),!1):(c=a.split("#"),d=c[0],e=c[1]||!1,f=-1==d.search("://")?d.replace(EPUBJS.core.uri(this.settings.contentsPath).path,""):d.replace(this.settings.contentsPath,""),g=this.spineIndexByURL[f],d||(g=this.currentChapter?this.currentChapter.spinePos:0),"number"!=typeof g?!1:this.currentChapter&&g==this.currentChapter.spinePos?(e?this.renderer.section(e):this.renderer.firstPage(),h.resolve(this.renderer.currentLocationCfi),h.promise.then(function(){this._gotoQ.dequeue()}.bind(this)),h.promise):this.displayChapter(g).then(function(){e&&this.renderer.section(e),h.resolve(this.renderer.currentLocationCfi)}.bind(this))):(this.settings["goto"]=a,!1)},EPUBJS.Book.prototype.gotoPage=function(a){var b=this.pagination.cfiFromPage(a);return this.gotoCfi(b)},EPUBJS.Book.prototype.gotoPercentage=function(a){var b=this.pagination.pageFromPercentage(a);return this.gotoPage(b)},EPUBJS.Book.prototype.preloadNextChapter=function(){var a,b=this.spinePos+1;return b>=this.spine.length?!1:(a=new EPUBJS.Chapter(this.spine[b]),void(a&&EPUBJS.core.request(a.absolute)))},EPUBJS.Book.prototype.storeOffline=function(){var a=this,b=EPUBJS.core.values(this.manifest);return this.store.put(b).then(function(){a.settings.stored=!0,a.trigger("book:stored")})},EPUBJS.Book.prototype.availableOffline=function(){return this.settings.stored>0?!0:!1},EPUBJS.Book.prototype.toStorage=function(){var a=this.settings.bookKey;this.store.isStored(a).then(function(b){return b===!0?(this.settings.stored=!0,!0):this.storeOffline().then(function(){this.store.token(a,!0)}.bind(this))}.bind(this))},EPUBJS.Book.prototype.fromStorage=function(a){[EPUBJS.replace.head,EPUBJS.replace.resources,EPUBJS.replace.svg];this.contained||this.settings.contained||(this.online&&this.opened.then(this.toStorage.bind(this)),this.store&&this.settings.fromStorage&&a===!1?(this.settings.fromStorage=!1,this.store.off("offline"),this.store=!1):this.settings.fromStorage||(this.store=new EPUBJS.Storage(this.settings.credentials),this.store.on("offline",function(a){a?(this.offline=!0,this.settings.fromStorage=!0,this.trigger("book:offline")):(this.offline=!1,this.settings.fromStorage=!1,this.trigger("book:online"))}.bind(this))))},EPUBJS.Book.prototype.setStyle=function(a,b,c){var d=["color","background","background-color"];return this.isRendered?(this.settings.styles[a]=b,this.renderer.setStyle(a,b,c),void(-1===d.indexOf(a)&&this.renderer.reformat())):this._q.enqueue("setStyle",arguments)},EPUBJS.Book.prototype.removeStyle=function(a){return this.isRendered?(this.renderer.removeStyle(a),this.renderer.reformat(),void delete this.settings.styles[a]):this._q.enqueue("removeStyle",arguments)},EPUBJS.Book.prototype.addHeadTag=function(a,b){return this.isRendered?void(this.settings.headTags[a]=b):this._q.enqueue("addHeadTag",arguments)},EPUBJS.Book.prototype.useSpreads=function(a){console.warn("useSpreads is deprecated, use forceSingle or set a layoutOveride instead"),a===!1?this.forceSingle(!0):this.forceSingle(!1)},EPUBJS.Book.prototype.forceSingle=function(a){var b="undefined"==typeof a?!0:a;this.renderer.forceSingle(b),this.settings.forceSingle=b,this.isRendered&&this.renderer.reformat()},EPUBJS.Book.prototype.setMinSpreadWidth=function(a){this.settings.minSpreadWidth=a,this.isRendered&&(this.renderer.setMinSpreadWidth(this.settings.minSpreadWidth),this.renderer.reformat())},EPUBJS.Book.prototype.setGap=function(a){this.settings.gap=a,this.isRendered&&(this.renderer.setGap(this.settings.gap),this.renderer.reformat())},EPUBJS.Book.prototype.chapter=function(a){var b,c,d=this.spineIndexByURL[a];return d&&(b=this.spine[d],c=new EPUBJS.Chapter(b,this.store,this.settings.withCredentials),c.load()),c},EPUBJS.Book.prototype.unload=function(){this.settings.restore&&localStorage&&this.saveContents(),this.unlistenToRenderer(this.renderer),this.trigger("book:unload")},EPUBJS.Book.prototype.destroy=function(){window.removeEventListener("beforeunload",this.unload),this.currentChapter&&this.currentChapter.unload(),this.unload(),this.renderer&&this.renderer.remove()},EPUBJS.Book.prototype._ready=function(){this.trigger("book:ready")},EPUBJS.Book.prototype._rendered=function(a){this.isRendered=!0,this.trigger("book:rendered"),this._q.flush()},EPUBJS.Book.prototype.applyStyles=function(a,b){a.applyStyles(this.settings.styles),b()},EPUBJS.Book.prototype.applyHeadTags=function(a,b){a.applyHeadTags(this.settings.headTags),b()},EPUBJS.Book.prototype._registerReplacements=function(a){a.registerHook("beforeChapterDisplay",this.applyStyles.bind(this,a),!0),a.registerHook("beforeChapterDisplay",this.applyHeadTags.bind(this,a),!0),a.registerHook("beforeChapterDisplay",EPUBJS.replace.hrefs.bind(this),!0)},EPUBJS.Book.prototype._needsAssetReplacement=function(){return this.settings.fromStorage?!0:this.settings.contained?!0:!1; +},EPUBJS.Book.prototype.parseLayoutProperties=function(a){var b=this.settings.layoutOveride&&this.settings.layoutOveride.layout||a.layout||"reflowable",c=this.settings.layoutOveride&&this.settings.layoutOveride.spread||a.spread||"auto",d=this.settings.layoutOveride&&this.settings.layoutOveride.orientation||a.orientation||"auto";return{layout:b,spread:c,orientation:d}},RSVP.EventTarget.mixin(EPUBJS.Book.prototype),RSVP.on("error",function(a){}),RSVP.configure("instrument",!1),EPUBJS.Chapter=function(a,b,c){this.href=a.href,this.absolute=a.url,this.id=a.id,this.spinePos=a.index,this.cfiBase=a.cfiBase,this.properties=a.properties,this.manifestProperties=a.manifestProperties,this.linear=a.linear,this.pages=1,this.store=b,this.credentials=c,this.epubcfi=new EPUBJS.EpubCFI,this.deferred=new RSVP.defer,this.loaded=this.deferred.promise,EPUBJS.Hooks.mixin(this),this.getHooks("beforeChapterRender"),this.caches={}},EPUBJS.Chapter.prototype.load=function(a,b){var c,d=a||this.store,e=b||this.credentials;return c=d?d.getXml(this.absolute):EPUBJS.core.request(this.absolute,!1,e),c.then(function(a){this.setDocument(a),this.deferred.resolve(this)}.bind(this)),c},EPUBJS.Chapter.prototype.render=function(a){return this.load().then(function(a){var b=a.querySelector("head"),c=a.createElement("base");return c.setAttribute("href",this.absolute),b.insertBefore(c,b.firstChild),this.contents=a,new RSVP.Promise(function(b,c){this.triggerHooks("beforeChapterRender",function(){b(a)}.bind(this),this)}.bind(this))}.bind(this)).then(function(a){var b=new XMLSerializer,c=b.serializeToString(a);return c}.bind(this))},EPUBJS.Chapter.prototype.url=function(a){var b,c=new RSVP.defer,d=a||this.store,e=this;return d?this.tempUrl?(b=this.tempUrl,c.resolve(b)):d.getUrl(this.absolute).then(function(a){e.tempUrl=a,c.resolve(a)}):(b=this.absolute,c.resolve(b)),c.promise},EPUBJS.Chapter.prototype.setPages=function(a){this.pages=a},EPUBJS.Chapter.prototype.getPages=function(a){return this.pages},EPUBJS.Chapter.prototype.getID=function(){return this.ID},EPUBJS.Chapter.prototype.unload=function(a){this.document=null,this.tempUrl&&a&&(a.revokeUrl(this.tempUrl),this.tempUrl=!1)},EPUBJS.Chapter.prototype.setDocument=function(a){var b=a.namespaceURI;a.doctype;this.document=a.implementation.createDocument(b,null,null),this.contents=this.document.importNode(a.documentElement,!0),this.document.appendChild(this.contents),!this.document.evaluate&&document.evaluate&&(this.document.evaluate=document.evaluate)},EPUBJS.Chapter.prototype.cfiFromRange=function(a){var b,c,d,e,f,g;if(this.document){if("undefined"!=typeof document.evaluate){if(c=EPUBJS.core.getElementXPath(a.startContainer),d=EPUBJS.core.getElementXPath(a.endContainer),e=this.document.evaluate(c,this.document,EPUBJS.core.nsResolver,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue,a.collapsed||(f=this.document.evaluate(d,this.document,EPUBJS.core.nsResolver,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue),b=this.document.createRange(),e)try{b.setStart(e,a.startOffset),!a.collapsed&&f&&b.setEnd(f,a.endOffset)}catch(h){console.log("missed"),e=!1}e||(console.log("not found, try fuzzy match"),cleanStartTextContent=EPUBJS.core.cleanStringForXpath(a.startContainer.textContent),c="//text()[contains(.,"+cleanStartTextContent+")]",e=this.document.evaluate(c,this.document,EPUBJS.core.nsResolver,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue,e&&(b.setStart(e,a.startOffset),a.collapsed||(g=EPUBJS.core.cleanStringForXpath(a.endContainer.textContent),d="//text()[contains(.,"+g+")]",f=this.document.evaluate(d,this.document,EPUBJS.core.nsResolver,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue,f&&b.setEnd(f,a.endOffset))))}else b=a;return this.epubcfi.generateCfiFromRange(b,this.cfiBase)}},EPUBJS.Chapter.prototype.find=function(a){var b=this,c=[],d=a.toLowerCase(),e=function(a){for(var e,f,g,h=a.textContent.toLowerCase(),i=b.document.createRange(),j=-1,k=150;-1!=f;)f=h.indexOf(d,j+1),-1!=f&&(i=b.document.createRange(),i.setStart(a,f),i.setEnd(a,f+d.length),e=b.cfiFromRange(i),a.textContent.length=g&&c&&c(!0),e=!0)};b(a,f)}.bind(this))},EPUBJS.Chapter.prototype.replaceWithStored=function(a,b,c,d){var e,f={},g=this.store,h=this.caches[a],i=EPUBJS.core.uri(this.absolute),j=i.base,k=b,l=5,m=function(a,b,c){f[b]=a},n=function(a){d&&d(),EPUBJS.core.values(e).forEach(function(a){g.revokeUrl(a)}),h=f};g&&(h||(h={}),e=EPUBJS.core.clone(h),this.replace(a,function(b,d){var h=b.getAttribute(k),i=EPUBJS.core.resolveUrl(j,h),m=function(c){var e;b.onload=function(){clearTimeout(e),d(c,i)},b.onerror=function(a){clearTimeout(e),d(c,i),console.error(a)},"svg image"==a&&b.setAttribute("externalResourcesRequired","true"),"link[href]"==a&&"stylesheet"!==b.getAttribute("rel")?d(c,i):e=setTimeout(function(){d(c,i)},l),c&&b.setAttribute(k,c)};i in e?(m(e[i]),f[i]=e[i],delete e[i]):c(g,i,m,b)},n,m))};var EPUBJS=EPUBJS||{};EPUBJS.core={},EPUBJS.core.getEl=function(a){return document.getElementById(a)},EPUBJS.core.getEls=function(a){return document.getElementsByClassName(a)},EPUBJS.core.request=function(a,b,c){var d,e=window.URL,f=e?"blob":"arraybuffer",g=new RSVP.defer,h=new XMLHttpRequest,i=XMLHttpRequest.prototype,j=function(){var a;this.readyState==this.DONE&&(200===this.status||0===this.status&&this.response?(a="xml"==b?this.responseXML?this.responseXML:(new DOMParser).parseFromString(this.response,"application/xml"):"xhtml"==b?this.responseXML?this.responseXML:(new DOMParser).parseFromString(this.response,"application/xhtml+xml"):"html"==b?this.responseXML?this.responseXML:(new DOMParser).parseFromString(this.response,"text/html"):"json"==b?JSON.parse(this.response):"blob"==b?e?this.response:new Blob([this.response]):this.response,g.resolve(a)):g.reject({message:this.response,stack:(new Error).stack}))};return"overrideMimeType"in i||Object.defineProperty(i,"overrideMimeType",{value:function(a){}}),h.open("GET",a,!0),h.onreadystatechange=j,c&&(h.withCredentials=!0),b||(d=EPUBJS.core.uri(a),b=d.extension,b={htm:"html"}[b]||b),"blob"==b&&(h.responseType=f),"json"==b&&h.setRequestHeader("Accept","application/json"),"xml"==b&&(h.responseType="document",h.overrideMimeType("text/xml")),"xhtml"==b&&(h.responseType="document"),"html"==b&&(h.responseType="document"),"binary"==b&&(h.responseType="arraybuffer"),h.send(),g.promise},EPUBJS.core.toArray=function(a){var b=[];for(var c in a){var d;a.hasOwnProperty(c)&&(d=a[c],d.ident=c,b.push(d))}return b},EPUBJS.core.uri=function(a){var b,c,d,e={protocol:"",host:"",path:"",origin:"",directory:"",base:"",filename:"",extension:"",fragment:"",href:a},f=a.indexOf("blob:"),g=a.indexOf("://"),h=a.indexOf("?"),i=a.indexOf("#");return 0===f?(e.protocol="blob",e.base=a.indexOf(0,i),e):(-1!=i&&(e.fragment=a.slice(i+1),a=a.slice(0,i)),-1!=h&&(e.search=a.slice(h+1),a=a.slice(0,h),href=a),-1!=g?(e.protocol=a.slice(0,g),b=a.slice(g+3),d=b.indexOf("/"),-1===d?(e.host=e.path,e.path=""):(e.host=b.slice(0,d),e.path=b.slice(d)),e.origin=e.protocol+"://"+e.host,e.directory=EPUBJS.core.folder(e.path),e.base=e.origin+e.directory):(e.path=a,e.directory=EPUBJS.core.folder(a),e.base=e.directory),e.filename=a.replace(e.base,""),c=e.filename.lastIndexOf("."),-1!=c&&(e.extension=e.filename.slice(c+1)),e)},EPUBJS.core.folder=function(a){var b=a.lastIndexOf("/");if(-1==b)var c="";return c=a.slice(0,b+1)},EPUBJS.core.dataURLToBlob=function(a){var b,c,d,e,f,g=";base64,";if(-1==a.indexOf(g))return b=a.split(","),c=b[0].split(":")[1],d=b[1],new Blob([d],{type:c});b=a.split(g),c=b[0].split(":")[1],d=window.atob(b[1]),e=d.length,f=new Uint8Array(e);for(var h=0;e>h;++h)f[h]=d.charCodeAt(h);return new Blob([f],{type:c})},EPUBJS.core.addScript=function(a,b,c){var d,e;e=!1,d=document.createElement("script"),d.type="text/javascript",d.async=!1,d.src=a,d.onload=d.onreadystatechange=function(){e||this.readyState&&"complete"!=this.readyState||(e=!0,b&&b())},c=c||document.body,c.appendChild(d)},EPUBJS.core.addScripts=function(a,b,c){var d=a.length,e=0,f=function(){e++,d==e?b&&b():EPUBJS.core.addScript(a[e],f,c)};EPUBJS.core.addScript(a[e],f,c)},EPUBJS.core.addCss=function(a,b,c){var d,e;e=!1,d=document.createElement("link"),d.type="text/css",d.rel="stylesheet",d.href=a,d.onload=d.onreadystatechange=function(){e||this.readyState&&"complete"!=this.readyState||(e=!0,b&&b())},c=c||document.body,c.appendChild(d)},EPUBJS.core.prefixed=function(a){var b=["Webkit","Moz","O","ms"],c=a[0].toUpperCase()+a.slice(1),d=b.length;if("undefined"!=typeof document.documentElement.style[a])return a;for(var e=0;d>e;e++)if("undefined"!=typeof document.documentElement.style[b[e]+c])return b[e]+c;return a},EPUBJS.core.resolveUrl=function(a,b){var c,d,e=[],f=EPUBJS.core.uri(b),g=a.split("/");return f.host?b:(g.pop(),d=b.split("/"),d.forEach(function(a){".."===a?g.pop():e.push(a)}),c=g.concat(e),c.join("/"))},EPUBJS.core.uuid=function(){var a=(new Date).getTime(),b="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(b){var c=(a+16*Math.random())%16|0;return a=Math.floor(a/16),("x"==b?c:7&c|8).toString(16)});return b},EPUBJS.core.insert=function(a,b,c){var d=EPUBJS.core.locationOf(a,b,c);return b.splice(d,0,a),d},EPUBJS.core.locationOf=function(a,b,c,d,e){var f,g=d||0,h=e||b.length,i=parseInt(g+(h-g)/2);return c||(c=function(a,b){return a>b?1:b>a?-1:(a=b)?0:void 0}),0>=h-g?i:(f=c(b[i],a),h-g===1?f>0?i:i+1:0===f?i:-1===f?EPUBJS.core.locationOf(a,b,c,i,h):EPUBJS.core.locationOf(a,b,c,g,i))},EPUBJS.core.indexOfSorted=function(a,b,c,d,e){var f,g=d||0,h=e||b.length,i=parseInt(g+(h-g)/2);return c||(c=function(a,b){return a>b?1:b>a?-1:(a=b)?0:void 0}),0>=h-g?-1:(f=c(b[i],a),h-g===1?0===f?i:-1:0===f?i:-1===f?EPUBJS.core.indexOfSorted(a,b,c,i,h):EPUBJS.core.indexOfSorted(a,b,c,g,i))},EPUBJS.core.queue=function(a){var b=[],c=a,d=function(a,c,d){return b.push({funcName:a,args:c,context:d}),b},e=function(){var a;b.length&&(a=b.shift(),c[a.funcName].apply(a.context||c,a.args))},f=function(){for(;b.length;)e()},g=function(){b=[]},h=function(){return b.length};return{enqueue:d,dequeue:e,flush:f,clear:g,length:h}},EPUBJS.core.getElementXPath=function(a){return a&&a.id?'//*[@id="'+a.id+'"]':EPUBJS.core.getElementTreeXPath(a)},EPUBJS.core.getElementTreeXPath=function(a){var b,c,d,e,f=[],g="http://www.w3.org/1999/xhtml"===a.ownerDocument.documentElement.getAttribute("xmlns");for(a.nodeType===Node.TEXT_NODE&&(b=EPUBJS.core.indexOfTextNode(a)+1,f.push("text()["+b+"]"),a=a.parentNode);a&&1==a.nodeType;a=a.parentNode){b=0;for(var h=a.previousSibling;h;h=h.previousSibling)h.nodeType!=Node.DOCUMENT_TYPE_NODE&&h.nodeName==a.nodeName&&++b;c=a.nodeName.toLowerCase(),d=g?"xhtml:"+c:c,e=b?"["+(b+1)+"]":"",f.splice(0,0,d+e)}return f.length?"./"+f.join("/"):null},EPUBJS.core.nsResolver=function(a){var b={xhtml:"http://www.w3.org/1999/xhtml",epub:"http://www.idpf.org/2007/ops"};return b[a]||null},EPUBJS.core.cleanStringForXpath=function(a){var b=a.match(/[^'"]+|['"]/g);return b=b.map(function(a){return"'"===a?'"\'"':'"'===a?"'\"'":"'"+a+"'"}),"concat('',"+b.join(",")+")"},EPUBJS.core.indexOfTextNode=function(a){for(var b,c=a.parentNode,d=c.childNodes,e=-1,f=0;fb;b++){var d=arguments[b];for(var e in d)void 0===a[e]&&(a[e]=d[e])}return a},EPUBJS.core.extend=function(a){var b=[].slice.call(arguments,1);return b.forEach(function(b){b&&Object.getOwnPropertyNames(b).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))})}),a},EPUBJS.core.clone=function(a){return EPUBJS.core.isArray(a)?a.slice():EPUBJS.core.extend({},a)},EPUBJS.core.isElement=function(a){return!(!a||1!=a.nodeType)},EPUBJS.core.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},EPUBJS.core.isString=function(a){return"string"==typeof a||a instanceof String},EPUBJS.core.isArray=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)},EPUBJS.core.values=function(a){var b,c,d,e=-1;if(!a)return[];for(b=Object.keys(a),c=b.length,d=Array(c);++e0;){if(c=d.shift(),"text"===c.type?(e=g.childNodes[c.index],g=e.parentNode||g):g=c.id?f.getElementById(c.id):h[c.index],"undefined"==typeof g)return console.error("No Element For",c,a.str),!1;h=Array.prototype.slice.call(g.children)}return g},EPUBJS.EpubCFI.prototype.compare=function(a,b){if("string"==typeof a&&(a=new EPUBJS.EpubCFI(a)),"string"==typeof b&&(b=new EPUBJS.EpubCFI(b)),a.spinePos>b.spinePos)return 1;if(a.spinePosb.steps[c].index)return 1;if(a.steps[c].indexb.characterOffset?1:a.characterOffset")},EPUBJS.EpubCFI.prototype.generateRangeFromCfi=function(a,b){var c,d,e,f,g,h,i=b||document,j=i.createRange();return"string"==typeof a&&(a=this.parse(a)),-1===a.spinePos?!1:(c=a.steps[a.steps.length-1],"undefined"!=typeof document.evaluate?(d=this.generateXpathFromSteps(a.steps),e=i.evaluate(d,i,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue):(g=this.generateQueryFromSteps(a.steps),h=i.querySelector(g),h&&"text"==c.type&&(e=h.childNodes[c.index])),e?(e&&a.characterOffset>=0?(f=e.length,a.characterOffset-1&&this.hooks[a].splice(c,1)):Array.isArray(b)&&b.forEach(function(b){c=this.hooks[a].indexOf(b),c>-1&&this.hooks[a].splice(c,1)},this))},a.prototype.triggerHooks=function(a,b,c){function d(){f--,0>=f&&b&&b()}var e,f;return"undefined"==typeof this.hooks[a]?!1:(e=this.hooks[a],f=e.length,0===f&&b&&b(),void e.forEach(function(a){a(d,c)}))},{register:function(a){if(void 0===EPUBJS.hooks[a]&&(EPUBJS.hooks[a]={}),"object"!=typeof EPUBJS.hooks[a])throw"Already registered: "+a;return EPUBJS.hooks[a]},mixin:function(b){for(var c in a.prototype)b[c]=a.prototype[c]}}}(),EPUBJS.Layout=EPUBJS.Layout||{},EPUBJS.Layout.Reflowable=function(){this.documentElement=null,this.spreadWidth=null},EPUBJS.Layout.Reflowable.prototype.format=function(a,b,c,d){var e=EPUBJS.core.prefixed("columnAxis"),f=EPUBJS.core.prefixed("columnGap"),g=EPUBJS.core.prefixed("columnWidth"),h=EPUBJS.core.prefixed("columnFill"),i=Math.floor(b),j=Math.floor(i/8),k=d>=0?d:j%2===0?j:j-1;return this.documentElement=a,this.spreadWidth=i+k,a.style.overflow="hidden",a.style.width=i+"px",a.style.height=c+"px",a.style[e]="horizontal",a.style[h]="auto",a.style[g]=i+"px",a.style[f]=k+"px",this.colWidth=i,this.gap=k,{pageWidth:this.spreadWidth,pageHeight:c}},EPUBJS.Layout.Reflowable.prototype.calculatePages=function(){var a,b;return this.documentElement.style.width="auto",a=this.documentElement.scrollWidth,b=Math.ceil(a/this.spreadWidth),{displayedPages:b,pageCount:b}},EPUBJS.Layout.ReflowableSpreads=function(){this.documentElement=null,this.spreadWidth=null},EPUBJS.Layout.ReflowableSpreads.prototype.format=function(a,b,c,d){var e=EPUBJS.core.prefixed("columnAxis"),f=EPUBJS.core.prefixed("columnGap"),g=EPUBJS.core.prefixed("columnWidth"),h=EPUBJS.core.prefixed("columnFill"),i=2,j=Math.floor(b),k=j%2===0?j:j-1,l=Math.floor(k/8),m=d>=0?d:l%2===0?l:l-1,n=Math.floor((k-m)/i);return this.documentElement=a,this.spreadWidth=(n+m)*i,a.style.overflow="hidden",a.style.width=k+"px",a.style.height=c+"px",a.style[e]="horizontal",a.style[h]="auto",a.style[f]=m+"px",a.style[g]=n+"px",this.colWidth=n,this.gap=m,{pageWidth:this.spreadWidth,pageHeight:c}},EPUBJS.Layout.ReflowableSpreads.prototype.calculatePages=function(){var a=this.documentElement.scrollWidth,b=Math.ceil(a/this.spreadWidth);return this.documentElement.style.width=b*this.spreadWidth-this.gap+"px",{displayedPages:b,pageCount:2*b}},EPUBJS.Layout.Fixed=function(){this.documentElement=null},EPUBJS.Layout.Fixed.prototype.format=function(a,b,c,d){var e,f,g,h,i=EPUBJS.core.prefixed("columnWidth"),j=a.querySelector("[name=viewport]");return this.documentElement=a,j&&j.hasAttribute("content")&&(e=j.getAttribute("content"),f=e.split(","),f[0]&&(g=f[0].replace("width=","")),f[1]&&(h=f[1].replace("height=",""))),a.style.width=g+"px"||"auto",a.style.height=h+"px"||"auto",a.style[i]="auto",a.style.overflow="auto",this.colWidth=g,this.gap=0,{pageWidth:g,pageHeight:h}},EPUBJS.Layout.Fixed.prototype.calculatePages=function(){return{displayedPages:1,pageCount:1}},EPUBJS.Locations=function(a,b,c){this.spine=a,this.store=b,this.credentials=c,this.epubcfi=new EPUBJS.EpubCFI,this._locations=[],this.total=0,this["break"]=150,this._current=0},EPUBJS.Locations.prototype.generate=function(a){var b,c=new RSVP.defer,d=-1,e=this.spine.length,f=function(a){var b,c=d+1,g=a||new RSVP.defer;return c>=e?g.resolve():(d=c,b=new EPUBJS.Chapter(this.spine[d],this.store,this.credentials),this.process(b).then(function(){setTimeout(function(){f(g)},1)})),g.promise}.bind(this);return"number"==typeof a&&(this["break"]=a),b=f().then(function(){this.total=this._locations.length-1,this._currentCfi&&(this.currentLocation=this._currentCfi),c.resolve(this._locations)}.bind(this)),c.promise},EPUBJS.Locations.prototype.process=function(a){return a.load().then(function(b){var c,d,e=b,f=e.documentElement.querySelector("body"),g=0;this.sprint(f,function(b){var f,h=b.length,i=0;for(0===g&&(c=e.createRange(),c.setStart(b,0)),f=this["break"]-g,f>h&&(g+=h,i=h);h>i;)g=this["break"],i+=this["break"],i>=h?g=h-(i-this["break"]):(c.setEnd(b,i),cfi=a.cfiFromRange(c),this._locations.push(cfi),g=0,i+=1,c=e.createRange(),c.setStart(b,i));d=b}.bind(this)),c&&(c.setEnd(d,d.length),cfi=a.cfiFromRange(c),this._locations.push(cfi),g=0)}.bind(this))},EPUBJS.Locations.prototype.sprint=function(a,b){for(var c=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);node=c.nextNode();)b(node)},EPUBJS.Locations.prototype.locationFromCfi=function(a){return 0===this._locations.length?-1:EPUBJS.core.locationOf(a,this._locations,this.epubcfi.compare)},EPUBJS.Locations.prototype.percentageFromCfi=function(a){var b=this.locationFromCfi(a);return this.percentageFromLocation(b)},EPUBJS.Locations.prototype.percentageFromLocation=function(a){return a&&this.total?a/this.total:0},EPUBJS.Locations.prototype.cfiFromLocation=function(a){var b=-1;return"number"!=typeof a&&(a=parseInt(a)),a>=0&&a1?a/100:a,c=Math.ceil(this.total*b);return this.cfiFromLocation(c)},EPUBJS.Locations.prototype.load=function(a){return this._locations=JSON.parse(a),this.total=this._locations.length-1,this._locations},EPUBJS.Locations.prototype.save=function(a){return JSON.stringify(this._locations)},EPUBJS.Locations.prototype.getCurrent=function(a){return this._current},EPUBJS.Locations.prototype.setCurrent=function(a){var b;if("string"==typeof a)this._currentCfi=a;else{if("number"!=typeof a)return;this._current=a}0!==this._locations.length&&("string"==typeof a?(b=this.locationFromCfi(a),this._current=b):b=a,this.trigger("changed",{percentage:this.percentageFromLocation(b)}))},Object.defineProperty(EPUBJS.Locations.prototype,"currentLocation",{get:function(){return this._current},set:function(a){this.setCurrent(a)}}),RSVP.EventTarget.mixin(EPUBJS.Locations.prototype),EPUBJS.Pagination=function(a){this.pages=[],this.locations=[],this.epubcfi=new EPUBJS.EpubCFI,a&&a.length&&this.process(a)},EPUBJS.Pagination.prototype.process=function(a){a.forEach(function(a){this.pages.push(a.page),this.locations.push(a.cfi)},this),this.pageList=a,this.firstPage=parseInt(this.pages[0]),this.lastPage=parseInt(this.pages[this.pages.length-1]),this.totalPages=this.lastPage-this.firstPage},EPUBJS.Pagination.prototype.pageFromCfi=function(a){var b=-1;if(0===this.locations.length)return-1;var c=EPUBJS.core.indexOfSorted(a,this.locations,this.epubcfi.compare);return-1!=c&&c=0?this.pages[c-1]:this.pages[0],void 0!==b||(b=-1)),b},EPUBJS.Pagination.prototype.cfiFromPage=function(a){var b=-1;"number"!=typeof a&&(a=parseInt(a));var c=this.pages.indexOf(a);return-1!=c&&(b=this.locations[c]),b},EPUBJS.Pagination.prototype.pageFromPercentage=function(a){var b=Math.round(this.totalPages*a);return b},EPUBJS.Pagination.prototype.percentageFromPage=function(a){var b=(a-this.firstPage)/this.totalPages;return Math.round(1e3*b)/1e3},EPUBJS.Pagination.prototype.percentageFromCfi=function(a){var b=this.pageFromCfi(a),c=this.percentageFromPage(b);return c},EPUBJS.Parser=function(a){this.baseUrl=a||""},EPUBJS.Parser.prototype.container=function(a){var b,c,d,e;return a?(b=a.querySelector("rootfile"))?(c=b.getAttribute("full-path"),d=EPUBJS.core.uri(c).directory,e=a.xmlEncoding,{packagePath:c,basePath:d,encoding:e}):void console.error("No RootFile Found"):void console.error("Container File Not Found")},EPUBJS.Parser.prototype.identifier=function(a){var b;return a?(b=a.querySelector("metadata"),b?this.getElementText(b,"identifier"):void console.error("No Metadata Found")):void console.error("Package File Not Found")},EPUBJS.Parser.prototype.packageContents=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n=this;return b&&(this.baseUrl=b),a?(c=a.querySelector("metadata"))?(d=a.querySelector("manifest"))?(e=a.querySelector("spine"))?(f=n.manifest(d),g=n.findNavPath(d),h=n.findTocPath(d,e),i=n.findCoverPath(a),j=Array.prototype.indexOf.call(e.parentNode.childNodes,e),k=n.spine(e,f),l={},k.forEach(function(a){l[a.href]=a.index}),m=n.metadata(c),m.direction=e.getAttribute("page-progression-direction"),{metadata:m,spine:k,manifest:f,navPath:g,tocPath:h,coverPath:i,spineNodeIndex:j,spineIndexByURL:l}):void console.error("No Spine Found"):void console.error("No Manifest Found"):void console.error("No Metadata Found"):void console.error("Package File Not Found")},EPUBJS.Parser.prototype.findNavPath=function(a){var b=a.querySelector("item[properties$='nav'], item[properties^='nav '], item[properties*=' nav ']");return b?b.getAttribute("href"):!1},EPUBJS.Parser.prototype.findTocPath=function(a,b){var c,d=a.querySelector("item[media-type='application/x-dtbncx+xml']");return d||(c=b.getAttribute("toc"),c&&(d=a.querySelector("item[id='"+c+"']"))),d?d.getAttribute("href"):!1},EPUBJS.Parser.prototype.findCoverPath=function(a){var b=a.querySelector("package").getAttribute("version");if("2.0"===b){var c=a.querySelector('meta[name="cover"]').getAttribute("content");return a.querySelector("item[id='"+c+"']").getAttribute("href")}var d=a.querySelector("item[properties='cover-image']");return d?d.getAttribute("href"):!1},EPUBJS.Parser.prototype.metadata=function(a){var b={},c=this;return b.bookTitle=c.getElementText(a,"title"),b.creator=c.getElementText(a,"creator"),b.description=c.getElementText(a,"description"),b.pubdate=c.getElementText(a,"date"),b.publisher=c.getElementText(a,"publisher"),b.identifier=c.getElementText(a,"identifier"),b.language=c.getElementText(a,"language"),b.rights=c.getElementText(a,"rights"),b.modified_date=c.querySelectorText(a,"meta[property='dcterms:modified']"),b.layout=c.querySelectorText(a,"meta[property='rendition:layout']"),b.orientation=c.querySelectorText(a,"meta[property='rendition:orientation']"),b.spread=c.querySelectorText(a,"meta[property='rendition:spread']"),b},EPUBJS.Parser.prototype.getElementText=function(a,b){var c,d=a.getElementsByTagNameNS("http://purl.org/dc/elements/1.1/",b);return d&&0!==d.length?(c=d[0],c.childNodes.length?c.childNodes[0].nodeValue:""):""},EPUBJS.Parser.prototype.querySelectorText=function(a,b){var c=a.querySelector(b);return c&&c.childNodes.length?c.childNodes[0].nodeValue:""},EPUBJS.Parser.prototype.manifest=function(a){var b=this.baseUrl,c={},d=a.querySelectorAll("item"),e=Array.prototype.slice.call(d);return e.forEach(function(a){var d=a.getAttribute("id"),e=a.getAttribute("href")||"",f=a.getAttribute("media-type")||"",g=a.getAttribute("properties")||"";c[d]={href:e,url:b+e,type:f,properties:g}}),c},EPUBJS.Parser.prototype.spine=function(a,b){var c=[],d=a.getElementsByTagName("itemref"),e=Array.prototype.slice.call(d),f=Array.prototype.indexOf.call(a.parentNode.childNodes,a),g=new EPUBJS.EpubCFI; +return e.forEach(function(a,d){var e=a.getAttribute("idref"),h=g.generateChapterComponent(f,d,e),i=a.getAttribute("properties")||"",j=i.length?i.split(" "):[],k=b[e].properties,l=k.length?k.split(" "):[],m={id:e,linear:a.getAttribute("linear")||"",properties:j,manifestProperties:l,href:b[e].href,url:b[e].url,index:d,cfiBase:h,cfi:"epubcfi("+h+")"};c.push(m)}),c},EPUBJS.Parser.prototype.querySelectorByType=function(a,b,c){var d=a.querySelector(b+'[*|type="'+c+'"]');if(0!==d.length)return d;d=a.querySelectorAll(b);for(var e=0;ed;++d)e=this.navItem(h[d],b,c),j[e.id]=e,e.parent?(f=j[e.parent],f.subitems.push(e)):k.push(e);return k},EPUBJS.Parser.prototype.navItem=function(a,b,c){var d,e=a.getAttribute("id")||!1,f=a.querySelector("a, span"),g=f.getAttribute("href")||"",h=f.textContent||"",i=g.split("#"),j=i[0],k=b[j],l=c[k],m=[],n=a.parentNode,o=l?l.cfi:"";return n&&"navPoint"===n.nodeName&&(d=n.getAttribute("id")),e||(k?(l=c[k],e=l.id,o=l.cfi):(e="epubjs-autogen-toc-id-"+EPUBJS.core.uuid(),a.setAttribute("id",e))),{id:e,href:g,label:h,spinePos:k,subitems:m,parent:d,cfi:o}},EPUBJS.Parser.prototype.toc=function(a,b,c){var d,e,f,g=a.querySelectorAll("navMap navPoint"),h=g.length,i={},j=[];if(!g||0===h)return j;for(d=0;h>d;++d)e=this.tocItem(g[d],b,c),i[e.id]=e,e.parent?(f=i[e.parent],f.subitems.push(e)):j.push(e);return j},EPUBJS.Parser.prototype.tocItem=function(a,b,c){var d,e=a.getAttribute("id")||!1,f=a.querySelector("content"),g=f.getAttribute("src"),h=a.querySelector("navLabel"),i=h.textContent?h.textContent:"",j=g.split("#"),k=j[0],l=b[k],m=c[l],n=[],o=a.parentNode,p=m?m.cfi:"";return o&&"navPoint"===o.nodeName&&(d=o.getAttribute("id")),e||(l?(m=c[l],e=m.id,p=m.cfi):(e="epubjs-autogen-toc-id-"+EPUBJS.core.uuid(),a.setAttribute("id",e))),{id:e,href:g,label:i,spinePos:l,subitems:n,parent:d,cfi:p}},EPUBJS.Parser.prototype.pageList=function(a,b,c){var d,e,f=this.querySelectorByType(a,"nav","page-list"),g=f?f.querySelectorAll("ol li"):[],h=g.length,i=[];if(!g||0===h)return i;for(d=0;h>d;++d)e=this.pageListItem(g[d],b,c),i.push(e);return i},EPUBJS.Parser.prototype.pageListItem=function(a,b,c){var d,e,f,g=(a.getAttribute("id")||!1,a.querySelector("a")),h=g.getAttribute("href")||"",i=g.textContent||"",j=parseInt(i),k=h.indexOf("epubcfi");return-1!=k?(d=h.split("#"),e=d[0],f=d.length>1?d[1]:!1,{cfi:f,href:h,packageUrl:e,page:j}):{href:h,page:j}},EPUBJS.Render.Iframe=function(){this.iframe=null,this.document=null,this.window=null,this.docEl=null,this.bodyEl=null,this.leftPos=0,this.pageWidth=0},EPUBJS.Render.Iframe.prototype.create=function(){return this.iframe=document.createElement("iframe"),this.iframe.id="epubjs-iframe:"+EPUBJS.core.uuid(),this.iframe.scrolling="no",this.iframe.seamless="seamless",this.iframe.style.border="none",this.iframe.addEventListener("load",this.loaded.bind(this),!1),this.isMobile=navigator.userAgent.match(/(iPad|iPhone|iPod|Mobile|Android)/g),this.transform=EPUBJS.core.prefixed("transform"),this.iframe},EPUBJS.Render.Iframe.prototype.load=function(a,b){var c=this,d=new RSVP.defer;return this.window&&this.unload(),this.iframe.onload=function(a){c.document=c.iframe.contentDocument,c.docEl=c.document.documentElement,c.headEl=c.document.head,c.bodyEl=c.document.body||c.document.querySelector("body"),c.window=c.iframe.contentWindow,c.window.addEventListener("resize",c.resized.bind(c),!1),c.leftPos=0,c.setLeft(0),c.bodyEl&&(c.bodyEl.style.margin="0"),"rtl"==c.direction&&"rtl"!=c.docEl.dir&&(c.docEl.dir="rtl",c.docEl.style.position="absolute",c.docEl.style.right="0"),d.resolve(c.docEl)},this.iframe.onerror=function(a){d.reject({message:"Error Loading Contents: "+a,stack:(new Error).stack})},this.document=this.iframe.contentDocument,this.document?(this.document.open(),this.document.write(a),this.document.close(),d.promise):(d.reject(new Error("No Document Available")),d)},EPUBJS.Render.Iframe.prototype.loaded=function(a){var b,c,d=this.iframe.contentWindow.location.href;this.document=this.iframe.contentDocument,this.docEl=this.document.documentElement,this.headEl=this.document.head,this.bodyEl=this.document.body||this.document.querySelector("body"),this.window=this.iframe.contentWindow,"about:blank"!=d&&(b=this.iframe.contentDocument.querySelector("base"),c=b.getAttribute("href"),this.trigger("render:loaded",c))},EPUBJS.Render.Iframe.prototype.resize=function(a,b){this.iframe&&(this.iframe.height=b,isNaN(a)||a%2===0||(a+=1),this.iframe.width=a,this.width=this.iframe.getBoundingClientRect().width||a,this.height=this.iframe.getBoundingClientRect().height||b)},EPUBJS.Render.Iframe.prototype.resized=function(a){this.width=this.iframe.getBoundingClientRect().width,this.height=this.iframe.getBoundingClientRect().height},EPUBJS.Render.Iframe.prototype.totalWidth=function(){return this.docEl.scrollWidth},EPUBJS.Render.Iframe.prototype.totalHeight=function(){return this.docEl.scrollHeight},EPUBJS.Render.Iframe.prototype.setPageDimensions=function(a,b){this.pageWidth=a,this.pageHeight=b},EPUBJS.Render.Iframe.prototype.setDirection=function(a){this.direction=a,this.docEl&&"rtl"==this.docEl.dir&&(this.docEl.dir="rtl",this.docEl.style.position="static",this.docEl.style.right="auto")},EPUBJS.Render.Iframe.prototype.setLeft=function(a){this.isMobile?this.docEl.style[this.transform]="translate("+-a+"px, 0)":this.document.defaultView.scrollTo(a,0)},EPUBJS.Render.Iframe.prototype.setStyle=function(a,b,c){c&&(a=EPUBJS.core.prefixed(a)),this.bodyEl&&(this.bodyEl.style[a]=b)},EPUBJS.Render.Iframe.prototype.removeStyle=function(a){this.bodyEl&&(this.bodyEl.style[a]="")},EPUBJS.Render.Iframe.prototype.addHeadTag=function(a,b,c){var d=c||this.document,e=d.createElement(a),f=d.head;for(var g in b)e.setAttribute(g,b[g]);f&&f.insertBefore(e,f.firstChild)},EPUBJS.Render.Iframe.prototype.page=function(a){this.leftPos=this.pageWidth*(a-1),"rtl"===this.direction&&(this.leftPos=-1*this.leftPos),this.setLeft(this.leftPos)},EPUBJS.Render.Iframe.prototype.getPageNumberByElement=function(a){var b,c;if(a)return b=this.leftPos+a.getBoundingClientRect().left,c=Math.floor(b/this.pageWidth)+1},EPUBJS.Render.Iframe.prototype.getPageNumberByRect=function(a){var b,c;return b=this.leftPos+a.left,c=Math.floor(b/this.pageWidth)+1},EPUBJS.Render.Iframe.prototype.getBaseElement=function(){return this.bodyEl},EPUBJS.Render.Iframe.prototype.getDocumentElement=function(){return this.docEl},EPUBJS.Render.Iframe.prototype.isElementVisible=function(a){var b,c;return a&&"function"==typeof a.getBoundingClientRect&&(b=a.getBoundingClientRect(),c=b.left,0!==b.width&&0!==b.height&&c>=0&&c=1&&a<=this.displayedPages?(this.chapterPos=a,this.render.page(a),this.visibleRangeCfi=this.getVisibleRangeCfi(),this.currentLocationCfi=this.visibleRangeCfi.start,this.trigger("renderer:locationChanged",this.currentLocationCfi),this.trigger("renderer:visibleRangeChanged",this.visibleRangeCfi),!0):!1:(console.warn("pageMap not set, queuing"),this._q.enqueue("page",arguments),!0)},EPUBJS.Renderer.prototype.nextPage=function(){return this.page(this.chapterPos+1)},EPUBJS.Renderer.prototype.prevPage=function(){return this.page(this.chapterPos-1)},EPUBJS.Renderer.prototype.pageByElement=function(a){var b;a&&(b=this.render.getPageNumberByElement(a),this.page(b))},EPUBJS.Renderer.prototype.lastPage=function(){return this._moving?this._q.enqueue("lastPage",arguments):void this.page(this.displayedPages)},EPUBJS.Renderer.prototype.firstPage=function(){return this._moving?this._q.enqueue("firstPage",arguments):void this.page(1)},EPUBJS.Renderer.prototype.section=function(a){var b=this.doc.getElementById(a);b&&this.pageByElement(b)},EPUBJS.Renderer.prototype.firstElementisTextNode=function(a){var b=a.childNodes,c=b.length;return c&&b[0]&&3===b[0].nodeType&&b[0].textContent.trim().length?!0:!1},EPUBJS.Renderer.prototype.isGoodNode=function(a){var b=["audio","canvas","embed","iframe","img","math","object","svg","video"];return-1!==b.indexOf(a.tagName.toLowerCase())?!0:this.firstElementisTextNode(a)},EPUBJS.Renderer.prototype.walk=function(a,b,c){for(var d,e,f,g,h=a,i=[h],j=1e4,k=0;!d&&i.length;){if(a=i.shift(),this.containsPoint(a,b,c)&&this.isGoodNode(a)&&(d=a),!d&&a&&a.childElementCount>0){if(e=a.children,!e||!e.length)return d;f=e.length?e.length:0;for(var l=f-1;l>=0;l--)e[l]!=g&&i.unshift(e[l])}if(!d&&0===i.length&&h&&null!==h.parentNode&&(i.push(h.parentNode),g=h,h=h.parentNode),k++,k>j){console.error("ENDLESS LOOP");break}}return d},EPUBJS.Renderer.prototype.containsPoint=function(a,b,c){var d;return a&&"function"==typeof a.getBoundingClientRect&&(d=a.getBoundingClientRect(),0!==d.width&&0!==d.height&&d.left>=b&&b<=d.left+d.width)?!0:!1},EPUBJS.Renderer.prototype.textSprint=function(a,b){for(var c,d=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,{acceptNode:function(a){return/^\s*$/.test(a.data)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);c=d.nextNode();)b(c)},EPUBJS.Renderer.prototype.sprint=function(a,b){for(var c,d=document.createTreeWalker(a,NodeFilter.SHOW_ELEMENT,null,!1);c=d.nextNode();)b(c)},EPUBJS.Renderer.prototype.mapPage=function(){var a,b,c=this,d=[],e=this.render.getBaseElement(),f=1,g=this.layout.colWidth+this.layout.gap,h=this.formated.pageWidth*(this.chapterPos-1),i=g*f-h,j=0,k=function(a){var b,c,d=Array.prototype.slice.call(a.childNodes);if(a.nodeType==Node.ELEMENT_NODE){if(c=document.createRange(),c.selectNodeContents(a),b=c.getBoundingClientRect(),!b||0===b.width&&0===b.height)return;b.left>j&&d.forEach(function(a){a.nodeType==Node.TEXT_NODE&&a.textContent.trim().length&&l(a)}),b.right>j&&d.forEach(function(a){a.nodeType==Node.TEXT_NODE&&a.textContent.trim().length&&l(a)})}},l=function(e){var k=c.splitTextNodeIntoWordsRanges(e);k.forEach(function(e){var k=e.getBoundingClientRect();!k||0===k.width&&0===k.height||(k.left+k.width0&&(b&&(b.setEnd(a,pos),c.push(b)),b=this.doc.createRange(),b.setStart(a,pos+1));return b&&(b.setEnd(a,d.length),c.push(b)),c},EPUBJS.Renderer.prototype.rangePosition=function(a){var b,c;return c=a.getClientRects(),c.length?b=c[0]:null},EPUBJS.Renderer.prototype.getPageCfi=function(){var a=2*this.chapterPos-1;return this.pageMap[a].start},EPUBJS.Renderer.prototype.getRange=function(a,b,c){var d,e=this.doc.createRange();return c=!0,"undefined"==typeof document.caretPositionFromPoint||c?"undefined"==typeof document.caretRangeFromPoint||c?(this.visibileEl=this.findElementAfter(a,b),e.setStart(this.visibileEl,1)):e=this.doc.caretRangeFromPoint(a,b):(d=this.doc.caretPositionFromPoint(a,b),e.setStart(d.offsetNode,d.offset)),e},EPUBJS.Renderer.prototype.pagesInCurrentChapter=function(){var a,b;return this.pageMap?(b=this.pageMap.length,a=this.spreads?Math.ceil(b/2):b):(console.warn("page map not loaded"),!1)},EPUBJS.Renderer.prototype.currentRenderedPage=function(){var a;return this.pageMap?a=this.spreads&&this.layout.pageCount>1?2*this.chapterPos:this.chapterPos:(console.warn("page map not loaded"),!1)},EPUBJS.Renderer.prototype.getRenderedPagesLeft=function(){var a,b,c;return this.pageMap?(b=this.pageMap.length,a=this.spreads?2*this.chapterPos:this.chapterPos,c=b-a):(console.warn("page map not loaded"),!1)},EPUBJS.Renderer.prototype.getVisibleRangeCfi=function(){var a,b,c;return this.pageMap?(this.spreads?(a=2*this.chapterPos,b=this.pageMap[a-2],c=b,this.layout.pageCount>1&&(c=this.pageMap[a-1])):(a=this.chapterPos,b=this.pageMap[a-1],c=b),b||(console.warn("page range miss:",a,this.pageMap),b=this.pageMap[this.pageMap.length-1],c=b),{start:b.start,end:c.end}):(console.warn("page map not loaded"),!1)},EPUBJS.Renderer.prototype.gotoCfi=function(a){var b,c,d;if(this._moving)return this._q.enqueue("gotoCfi",arguments);if(EPUBJS.core.isString(a)&&(a=this.epubcfi.parse(a)),"undefined"==typeof document.evaluate)c=this.epubcfi.addMarker(a,this.doc),c&&(b=this.render.getPageNumberByElement(c),this.epubcfi.removeMarker(c,this.doc),this.page(b));else if(d=this.epubcfi.generateRangeFromCfi(a,this.doc)){var e=d.getBoundingClientRect();b=e?this.render.getPageNumberByRect(e):1,this.page(b),this.currentLocationCfi=a.str}else this.page(1)},EPUBJS.Renderer.prototype.findFirstVisible=function(a){var b,c=a||this.render.getBaseElement();return b=this.walk(c,0,0),b?b:a},EPUBJS.Renderer.prototype.findElementAfter=function(a,b,c){var d,e=c||this.render.getBaseElement();return d=this.walk(e,a,b),d?d:e},EPUBJS.Renderer.prototype.resize=function(a,b,c){this.width=a,this.height=b,c!==!1&&this.render.resize(this.width,this.height),this.contents&&this.reformat(),this.trigger("renderer:resized",{width:this.width,height:this.height})},EPUBJS.Renderer.prototype.onResized=function(a){var b=this.container.clientWidth,c=this.container.clientHeight;this.resize(b,c,!1)},EPUBJS.Renderer.prototype.addEventListeners=function(){this.render.document&&this.listenedEvents.forEach(function(a){this.render.document.addEventListener(a,this.triggerEvent.bind(this),!1)},this)},EPUBJS.Renderer.prototype.removeEventListeners=function(){this.render.document&&this.listenedEvents.forEach(function(a){this.render.document.removeEventListener(a,this.triggerEvent,!1)},this)},EPUBJS.Renderer.prototype.triggerEvent=function(a){this.trigger("renderer:"+a.type,a)},EPUBJS.Renderer.prototype.addSelectionListeners=function(){this.render.document.addEventListener("selectionchange",this.onSelectionChange.bind(this),!1)},EPUBJS.Renderer.prototype.removeSelectionListeners=function(){this.render.document&&this.doc.removeEventListener("selectionchange",this.onSelectionChange,!1)},EPUBJS.Renderer.prototype.onSelectionChange=function(a){this.selectionEndTimeout&&clearTimeout(this.selectionEndTimeout),this.selectionEndTimeout=setTimeout(function(){this.selectedRange=this.render.window.getSelection(),this.trigger("renderer:selected",this.selectedRange)}.bind(this),500)},EPUBJS.Renderer.prototype.setMinSpreadWidth=function(a){this.minSpreadWidth=a,this.spreads=this.determineSpreads(a)},EPUBJS.Renderer.prototype.determineSpreads=function(a){return this.isForcedSingle||!a||this.width=g&&c&&c(!0),e=!0)};b(a,f)}.bind(this))},RSVP.EventTarget.mixin(EPUBJS.Renderer.prototype);var EPUBJS=EPUBJS||{};EPUBJS.replace={},EPUBJS.replace.hrefs=function(a,b){var c=this,d=function(a,d){var e,f,g,h,i,j=a.getAttribute("href"),k=j.search("://");-1!=k?a.setAttribute("target","_blank"):(g=b.render.docEl.querySelector("base"),i=g.getAttribute("href"),h=EPUBJS.core.uri(i),e=h.directory,f=e?"file"===h.protocol?EPUBJS.core.resolveUrl(h.base,j):EPUBJS.core.resolveUrl(e,j):j,a.onclick=function(){return c["goto"](f),!1}),d()};b.replace("a[href]",d,a)},EPUBJS.replace.head=function(a,b){b.replaceWithStored("link[href]","href",EPUBJS.replace.links,a)},EPUBJS.replace.resources=function(a,b){b.replaceWithStored("[src]","src",EPUBJS.replace.srcs,a)},EPUBJS.replace.svg=function(a,b){b.replaceWithStored("svg image","xlink:href",function(a,b,c){a.getUrl(b).then(c)},a)},EPUBJS.replace.srcs=function(a,b,c){a.getUrl(b).then(c)},EPUBJS.replace.links=function(a,b,c,d){"stylesheet"===d.getAttribute("rel")?EPUBJS.replace.stylesheets(a,b).then(function(a,b){c(a,b)},function(a){c(null)}):a.getUrl(b).then(c,function(a){c(null)})},EPUBJS.replace.stylesheets=function(a,b){var c=new RSVP.defer;if(a)return a.getText(b).then(function(d){EPUBJS.replace.cssUrls(a,b,d).then(function(a){var b=window.URL||window.webkitURL||window.mozURL,d=new Blob([a],{type:"text/css"}),e=b.createObjectURL(d);c.resolve(e)},function(a){c.reject(a)})},function(a){c.reject(a)}),c.promise},EPUBJS.replace.cssUrls=function(a,b,c){var d=new RSVP.defer,e=[],f=c.match(/url\(\'?\"?((?!data:)[^\'|^\"^\)]*)\'?\"?\)/g);if(a)return f?(f.forEach(function(f){var g=EPUBJS.core.resolveUrl(b,f.replace(/url\(|[|\)|\'|\"]|\?.*$/g,"")),h=a.getUrl(g).then(function(a){c=c.replace(f,'url("'+a+'")')},function(a){d.reject(a)});e.push(h)}),RSVP.all(e).then(function(){d.resolve(c)}),d.promise):(d.resolve(c),d.promise)},EPUBJS.Storage=function(a){this.checkRequirements(),this.urlCache={},this.withCredentials=a,this.URL=window.URL||window.webkitURL||window.mozURL,this.offline=!1},EPUBJS.Storage.prototype.checkRequirements=function(a){"undefined"==typeof localforage&&console.error("localForage library not loaded")},EPUBJS.Storage.prototype.put=function(a,b){var c=new RSVP.defer,d=a.length,e=0,f=function(b){var c,g,h=b||new RSVP.defer;return e>=d?h.resolve():(c=a[e].url,g=window.encodeURIComponent(c),EPUBJS.core.request(c,"binary").then(function(a){return localforage.setItem(g,a)}).then(function(a){e++,setTimeout(function(){f(h)},1)})),h.promise}.bind(this);return Array.isArray(a)||(a=[a]),f().then(function(){c.resolve()}.bind(this)),c.promise},EPUBJS.Storage.prototype.token=function(a,b){var c=window.encodeURIComponent(a);return localforage.setItem(c,b).then(function(a){return null===a?!1:!0})},EPUBJS.Storage.prototype.isStored=function(a){var b=window.encodeURIComponent(a);return localforage.getItem(b).then(function(a){return null===a?!1:!0})},EPUBJS.Storage.prototype.getText=function(a){var b=window.encodeURIComponent(a);return EPUBJS.core.request(a,"arraybuffer",this.withCredentials).then(function(a){return this.offline&&(this.offline=!1,this.trigger("offline",!1)),localforage.setItem(b,a),a}.bind(this)).then(function(b){var c=new RSVP.defer,d=EPUBJS.core.getMimeType(a),e=new Blob([b],{type:d}),f=new FileReader;return f.addEventListener("loadend",function(){c.resolve(f.result)}),f.readAsText(e,d),c.promise})["catch"](function(){var c=new RSVP.defer,d=localforage.getItem(b);return this.offline||(this.offline=!0,this.trigger("offline",!0)),d?(d.then(function(b){var d=EPUBJS.core.getMimeType(a),e=new Blob([b],{type:d}),f=new FileReader;f.addEventListener("loadend",function(){c.resolve(f.result)}),f.readAsText(e,d)}),c.promise):(c.reject({message:"File not found in the storage: "+a,stack:(new Error).stack}),c.promise)}.bind(this))},EPUBJS.Storage.prototype.getUrl=function(a){var b=window.encodeURIComponent(a);return EPUBJS.core.request(a,"arraybuffer",this.withCredentials).then(function(c){return this.offline&&(this.offline=!1,this.trigger("offline",!1)),localforage.setItem(b,c),a}.bind(this))["catch"](function(){var c,d,e=new RSVP.defer,f=window.URL||window.webkitURL||window.mozURL;return this.offline||(this.offline=!0,this.trigger("offline",!0)),b in this.urlCache?(e.resolve(this.urlCache[b]),e.promise):(c=localforage.getItem(b))?(c.then(function(c){var g=new Blob([c],{type:EPUBJS.core.getMimeType(a)});d=f.createObjectURL(g),e.resolve(d),this.urlCache[b]=d}.bind(this)),e.promise):(e.reject({message:"File not found in the storage: "+a,stack:(new Error).stack}),e.promise)}.bind(this))},EPUBJS.Storage.prototype.getXml=function(a){var b=window.encodeURIComponent(a);return EPUBJS.core.request(a,"arraybuffer",this.withCredentials).then(function(a){return this.offline&&(this.offline=!1,this.trigger("offline",!1)),localforage.setItem(b,a),a}.bind(this)).then(function(b){var c=new RSVP.defer,d=EPUBJS.core.getMimeType(a),e=new Blob([b],{type:d}),f=new FileReader;return f.addEventListener("loadend",function(){var a=new DOMParser,b=a.parseFromString(f.result,"text/xml");c.resolve(b)}),f.readAsText(e,d),c.promise})["catch"](function(){var c=new RSVP.defer,d=localforage.getItem(b);return this.offline||(this.offline=!0,this.trigger("offline",!0)),d?(d.then(function(b){var d=EPUBJS.core.getMimeType(a),e=new Blob([b],{type:d}),f=new FileReader;f.addEventListener("loadend",function(){var a=new DOMParser,b=a.parseFromString(f.result,"text/xml");c.resolve(b)}),f.readAsText(e,d)}),c.promise):(c.reject({message:"File not found in the storage: "+a,stack:(new Error).stack}),c.promise)}.bind(this))},EPUBJS.Storage.prototype.revokeUrl=function(a){var b=window.URL||window.webkitURL||window.mozURL,c=this.urlCache[a];c&&b.revokeObjectURL(c)},EPUBJS.Storage.prototype.failed=function(a){console.error(a)},RSVP.EventTarget.mixin(EPUBJS.Storage.prototype),EPUBJS.Unarchiver=function(a){this.checkRequirements(),this.urlCache={}},EPUBJS.Unarchiver.prototype.checkRequirements=function(a){"undefined"==typeof JSZip&&console.error("JSZip lib not loaded")},EPUBJS.Unarchiver.prototype.open=function(a,b){if(a instanceof ArrayBuffer){this.zip=new JSZip(a);var c=new RSVP.defer;return c.resolve(),c.promise}return EPUBJS.core.request(a,"binary").then(function(a){this.zip=new JSZip(a)}.bind(this))},EPUBJS.Unarchiver.prototype.getXml=function(a,b){var c=window.decodeURIComponent(a);return this.getText(c,b).then(function(b){var c=new DOMParser,d=EPUBJS.core.getMimeType(a);return c.parseFromString(b,d)})},EPUBJS.Unarchiver.prototype.getUrl=function(a,b){var c,d,e=this,f=new RSVP.defer,g=window.decodeURIComponent(a),h=this.zip.file(g),i=window.URL||window.webkitURL||window.mozURL;return h?a in this.urlCache?(f.resolve(this.urlCache[a]),f.promise):(d=new Blob([h.asUint8Array()],{type:EPUBJS.core.getMimeType(h.name)}),c=i.createObjectURL(d),f.resolve(c),e.urlCache[a]=c,f.promise):(f.reject({message:"File not found in the epub: "+a,stack:(new Error).stack}),f.promise)},EPUBJS.Unarchiver.prototype.getText=function(a,b){var c,d=new RSVP.defer,e=window.decodeURIComponent(a),f=this.zip.file(e);return f?(c=f.asText(),d.resolve(c),d.promise):(d.reject({message:"File not found in the epub: "+a,stack:(new Error).stack}),d.promise)},EPUBJS.Unarchiver.prototype.revokeUrl=function(a){var b=window.URL||window.webkitURL||window.mozURL,c=this.urlCache[a];c&&b.revokeObjectURL(c)},EPUBJS.Unarchiver.prototype.failed=function(a){console.error(a)},EPUBJS.Unarchiver.prototype.afterSaved=function(a){this.callback()},EPUBJS.Unarchiver.prototype.toStorage=function(a){function b(){f--,0===f&&e.afterSaved()}var c=0,d=20,e=this,f=a.length;a.forEach(function(a){setTimeout(function(a){e.saveEntryFileToStorage(a,b)},c,a),c+=d}),console.log("time",c)},function(){"use strict";var a={application:{ecmascript:["es","ecma"],javascript:"js",ogg:"ogx",pdf:"pdf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],"rdf+xml":"rdf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","opf"],zip:"zip","x-httpd-eruby":"rhtml","x-latex":"latex","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-object":"o","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","epub+zip":"epub","font-tdpfr":"pfr","inkml+xml":["ink","inkml"],json:"json","jsonml+json":"jsonml","mathml+xml":"mathml","metalink+xml":"metalink",mp4:"mp4s","omdoc+xml":"omdoc",oxps:"oxps","vnd.amazon.ebook":"azw",widget:"wgt","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-mobipocket-ebook":["prc","mobi"],"x-mspublisher":"pub","x-nzb":"nzb","x-tgif":"obj","xaml+xml":"xaml","xml-dtd":"dtd","xproc+xml":"xpl","xslt+xml":"xslt","internet-property-stream":"acx","x-compress":"z","x-compressed":"tgz","x-gzip":"gz"},audio:{flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"x-aiff":["aif","aiff","aifc"],"x-ms-wma":"wma","x-wav":"wav",adpcm:"adp",mp4:"mp4a",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"x-icon":"ico",bmp:"bmp",webp:"webp","x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"], +css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx","tab-separated-values":"tsv","x-bibtex":"bib","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcard":"vcf",sgml:["sgml","sgm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"}},b=function(){var b,c,d,e,f={};for(b in a)if(a.hasOwnProperty(b))for(c in a[b])if(a[b].hasOwnProperty(c))if(d=a[b][c],"string"==typeof d)f[d]=b+"/"+c;else for(e=0;e","\"","'","/","unescape","S","RegExp","join","replace","result","mixin","D","N","uniqueId","templateSettings","evaluate","interpolate","T","q","\\","\r","\n","\t","
","
","B","template","variable","chain","_chain","define","requireModule","require","requirejs","registry","seen","name","deps","callback","resolve","child","charAt","parts","split","parentBase","part","_eak_seen","Error","mod","reified","__dependency1__","__exports__","Promise","array","label","__dependency2__","fulfilled","state","rejected","reason","isNonThenable","entries","fulfilledResolver","resolveAll","rejectedResolver","results","remaining","entry","cast","then","useNextTick","process","nextTick","flush","useMutationObserver","iterations","observer","BrowserMutationObserver","node","document","createTextNode","observe","characterData","data","useSetTimeout","queue","tuple","arg","scheduleFlush","browserGlobal","window","MutationObserver","WebKitMutationObserver","configure","config","on","EventTarget","instrument","deferred","promise","callbacks","callbacksFor","_promiseCallbacks","off","trigger","undefined","eventName","allCallbacks","splice","options","__dependency3__","promises","filterFn","filterResults","valuesLen","filtered","keysOf","fulfilledTo","property","onRejection","now","guid","_guidKey","_id","detail","_detail","childGuid","_label","timeStamp","stack","error","mapFn","resultLen","mappedResults","makeNodeCallbackFor","nodeFunc","binding","nodeArgs","thisArg","__dependency4__","__dependency5__","__dependency6__","__dependency7__","__dependency8__","__dependency9__","noop","resolver","counter","_subscribers","invokeResolver","resolvePromise","rejectPromise","subscribe","parent","onFulfillment","subscribers","FULFILLED","REJECTED","publish","settled","invokeCallback","succeeded","failed","hasCallback","handleThenable","resolved","objectOrFunction","val","fulfill","_state","PENDING","SEALED","async","publishFulfillment","publishRejection","_onerror","race","Resolve","Reject","guidKey","thenPromise","catch","finally","Constructor","fulfillmentAt","pending","getTime","prop","__dependency10__","__dependency11__","__dependency12__","__dependency13__","__dependency14__","__dependency15__","denodeify","allSettled","hash","rethrow","asap","__PROMISE_INSTRUMENTATION__","RSVP","EPUBJS","plugins","filePath","Render","root","previousEpub","ePub","bookPath","Book","amd","settings","bookKey","packageUrl","storage","fromStorage","saved","online","contained","width","height","layoutOveride","orientation","minSpreadWidth","gap","version","restore","reload","goto","styles","headTags","withCredentials","render_method","EPUBJSVERSION","spinePos","stored","navigator","onLine","networkListeners","store","fileStorage","ready","manifest","spine","metadata","cover","toc","pageList","readyPromises","pagination","Pagination","pageListReady","_ready","isRendered","_q","core","_rendering","_displayQ","_moving","_gotoQ","renderer","Renderer","setMinSpreadWidth","setGap","listenToRenderer","defer_opened","opened","open","addEventListener","unload","forceReload","epubpackage","book","bookUrl","urlFrom","isContained","unarchive","loadPackage","localStorage","packageXml","identifier","packageIdentifier","restored","unpack","storeOffline","_registerReplacements","_containerPath","parse","Parser","containerPath","loadXml","containerXml","container","paths","contentsPath","basePath","packagePath","encoding","console","contents","packageContents","spineIndexByURL","generateBookKey","globalLayoutProperties","parseLayoutProperties","coverPath","spineNodeIndex","navPath","navUrl","navHtml","nav","epubcfi","EpubCFI","wait","pg","cfi","generateCfiFromHref","href","tocPath","tocUrl","tocXml","createHiddenRender","_width","_height","hiddenContainer","hiddenEl","box","element","getBoundingClientRect","forceSingle","createElement","style","visibility","overflow","appendChild","initialize","generatePageList","pager","spineLength","currentPage","nextChapter","chapter","next","done","Chapter","displayChapter","pageMap","item","start","page","spreads","end","remove","removeChild","generatePagination","defered","loadPagination","pagelistJSON","JSON","getPageList","getMetadata","getToc","Events","startPage","endPage","percent","pageRange","pageFromCfi","percentageFromPage","anchorPage","percentage","loadChange","url","uri","currentChapter","absolute","path","warn","filename","unlistenToRenderer","getXml","request","base","protocol","fromRoot","location","origin","host","baseTag","getElementsByTagName","resolveUrl","pathname","Unarchiver","openZip","extension","isSaved","storedSettings","getItem","saveContents","setItem","stringify","removeSavedContents","removeItem","renderTo","elem","rendered","getEl","_rendered","startDisplay","display","previousLocationCfi","gotoCfi","fetch","fromStore","len","clearSaved","chap","render","pos","enqueue","lastPage","preloadNextChapter","dequeue","message","nextPage","prevPage","prev","prevChapter","linear","getCurrentLocationCfi","currentLocationCfi","target","gotoPercentage","parseInt","substring","gotoPage","gotoHref","cfiString","spineItem","section","relativeURL","firstPage","cfiFromPage","pageFromPercentage","assets","batch","availableOffline","setStyle","prefixed","noreflow","reformat","removeStyle","addHeadTag","tag","attrs","useSpreads","use","_use","force","load","destroy","removeEventListener","applyStyles","applyHeadTags","registerHook","hrefs","_needsAssetReplacement","resources","svg","getStorageType","layout","spread","event","spineObject","id","cfiBase","properties","manifestProperties","pages","loaded","_store","get","xml","setDocument","doc","serializer","XMLSerializer","setAttribute","insertBefore","firstChild","serializeToString","tempUrl","getUrl","setPages","num","getPages","getID","ID","revokeUrl","_document","namespaceURI","doctype","implementation","createDocument","importNode","documentElement","cfiFromRange","_range","startXpath","endXpath","startContainer","endContainer","cleanEndTextContent","getElementXPath","nsResolver","XPathResult","FIRST_ORDERED_NODE_TYPE","singleNodeValue","collapsed","createRange","setStart","startOffset","setEnd","endOffset","log","cleanStartTextContent","cleanStringForXpath","textContent","generateCfiFromRange","_query","matches","query","toLowerCase","excerpt","text","limit","textSprint","func","treeWalker","createTreeWalker","NodeFilter","SHOW_TEXT","acceptNode","test","FILTER_ACCEPT","FILTER_REJECT","nextNode","getElementById","getEls","classes","getElementsByClassName","type","handler","readyState","DONE","status","responseXML","response","supportsURL","Blob","URL","BLOB_RESPONSE","xhr","XMLHttpRequest","xhrPrototype","defineProperty","onreadystatechange","responseType","setRequestHeader","overrideMimeType","send","obj","arr","member","newitm","ident","withoutProtocol","dot","firstSlash","directory","fragment","blob","doubleSlash","search","folder","lastSlash","dataURLToBlob","dataURL","contentType","raw","rawLength","uInt8Array","BASE64_MARKER","atob","Uint8Array","charCodeAt","addScript","src","onload","body","addScripts","srcArr","total","curr","cb","addCss","rel","unprefixed","vendors","upper","toUpperCase","segments","folders","uuid","insert","compareFunction","locationOf","_start","_end","compared","pivot","indexOfSorted","_scope","scope","funcName","args","context","inwait","shift","clear","getElementTreeXPath","nodeName","tagName","pathIndex","isXhtml","ownerDocument","getAttribute","Node","TEXT_NODE","indexOfTextNode","parentNode","sibling","previousSibling","DOCUMENT_TYPE_NODE","prefix","ns","xhtml","epub","str","match","textNode","sib","children","childNodes","cfiStr","generateChapterComponent","_spineNodeIndex","_pos","generatePathComponent","steps","segment","generateCfiFromElement","pathTo","unshift","getChapterComponent","splitStr","getPathComponent","pathComponent","getCharecterOffsetComponent","chapSegment","chapterComponent","charecterOffsetComponent","assertion","chapId","endInt","parseStep","has_brackets","spineId","step","characterOffset","textLocationAssertion","addMarker","_doc","_marker","lastStep","marker","createMarker","findParent","splitText","classList","add","removeMarker","nextSib","nextSibling","prevSib","sections","compare","cfiOne","cfiTwo","generateCfiFromTextNode","anchor","offset","generateCfiFromRangeAnchor","anchorNode","anchorOffset","startElement","startSteps","startPath","startIndex","endElement","endSteps","endPath","endIndex","generateXpathFromSteps","xpath","position","generateRangeFromCfi","textLength","debug","selectNode","el","events","createEvent","tell","listen","deafen","listenUntil","evt","CustomEvent","msg","dispatchEvent","bindto","OnEvt","OffEvt","unlisten","hooks","Hooks","getHooks","plugs","plugType","hook","toAdd","toFront","triggerHooks","passed","countdown","count","register","Layout","Reflowable","spreadWidth","format","_gap","columnAxis","columnGap","columnWidth","columnFill","colWidth","pageWidth","pageHeight","calculatePages","totalWidth","displayedPages","scrollWidth","pageCount","ReflowableSpreads","divisor","fullWidth","Fixed","content","viewport","querySelector","hasAttribute","locations","totalPages","round","percentageFromCfi","baseUrl","rootfile","fullpath","xmlEncoding","metadataNode","getElementText","manifestNode","spineNode","findNavPath","findTocPath","findCoverPath","tocId","bookTitle","creator","description","pubdate","publisher","language","rights","modified_date","querySelectorText","found","getElementsByTagNameNS","nodeValue","manifestXml","selected","querySelectorAll","items","spineXml","Id","props","propArray","manifestProps","manifestPropArray","vert","bookSpine","findListItems","findAnchorOrSpan","getTOC","list","nodes","subitems","idCounter","navEl","snapshot","ORDERED_NODE_SNAPSHOT_TYPE","snapshotLength","snapshotItem","navLabel","navMap","isCfi","Iframe","iframe","docEl","bodyEl","leftPos","create","scrolling","seamless","border","contentDocument","headEl","contentWindow","resized","margin","onerror","resize","totalHeight","scrollHeight","setPageDimensions","setLeft","defaultView","scrollTo","tagEl","attr","getPageNumberByElement","left","getPageNumberByRect","boundingClientRect","getBaseElement","isElementVisible","rect","scroll","bool","renderMethod","hidden","listenedEvents","upEvent","downEvent","caches","isForcedSingle","onResized","layoutSettings","initWidth","initHeight","clientWidth","clientHeight","globalLayout","removeEventListeners","removeSelectionListeners","chapterPos","currentChapterCfiBase","reconcileLayoutSettings","layoutMethod","determineLayout","visible","formated","addEventListeners","addSelectionListeners","beforeDisplay","queued","updatePages","visibleRangeCfi","getVisibleRangeCfi","rendition","determineSpreads","mapPage","headTag","pageByElement","firstElementisTextNode","leng","trim","walk","prevNode","startNode","STOP","ITER","containsPoint","childElementCount","sprint","SHOW_ELEMENT","prevRange","elLimit","check","elPos","elRange","ELEMENT_NODE","selectNodeContents","checkText","right","ranges","splitTextNodeIntoWordsRanges","collapse","indexOfBreakableChar","startPosition","whiteCharacters","rangePosition","getClientRects","getPageCfi","startRange","getRange","forceElement","caretPositionFromPoint","caretRangeFromPoint","visibileEl","findElementAfter","offsetNode","pagesInCurrentChapter","pgs","currentRenderedPage","getRenderedPagesLeft","pagesLeft","endRange","findFirstVisible","startEl","setSize","triggerEvent","onSelectionChange","selectionEndTimeout","selectedRange","getSelection","cutoff","finished","progress","called","full","replaceWithStored","_oldUrls","_newUrls","_cache","_uri","_chapterBase","_attr","_wait","link","replaceUrl","timeout","replacments","relative","isRelative","onclick","links","srcs","stylesheets","getText","cssUrls","newText","_URL","webkitURL","mozURL","createObjectURL","replaced","loadLib","urlCache","zipUrl","JSZip","parser","DOMParser","parseFromString","mime","unarchiver","decodededUrl","decodeURIComponent","file","asUint8Array","getMimeType","asText","fromCache","revokeObjectURL","afterSaved","toStorage","that","saveEntryFileToStorage"],"mappings":"CAAA,WAAY,GAAIA,GAAEC,KAAKC,EAAEF,EAAEG,EAAEC,KAAKC,EAAEC,MAAMC,UAAUC,EAAEC,OAAOF,UAAUG,EAAEC,SAASJ,UAAUK,EAAEP,EAAEQ,KAAKC,EAAET,EAAEU,MAAMC,EAAEX,EAAEY,OAAOC,EAAEV,EAAEW,SAASC,EAAEZ,EAAEa,eAAeC,EAAEjB,EAAEkB,QAAQC,EAAEnB,EAAEoB,IAAIC,EAAErB,EAAEsB,OAAOC,EAAEvB,EAAEwB,YAAYC,EAAEzB,EAAE0B,OAAOC,EAAE3B,EAAE4B,MAAMC,EAAE7B,EAAE8B,KAAKC,EAAE/B,EAAEgC,QAAQC,EAAEjC,EAAEkC,YAAYC,EAAElC,MAAMmC,QAAQtC,EAAEM,OAAOiC,KAAKC,EAAEjC,EAAEkC,KAAKC,EAAE,SAAS7C,GAAG,MAAOA,aAAa6C,GAAE7C,EAAEC,eAAgB4C,QAAG5C,KAAK6C,SAAS9C,GAAU,GAAI6C,GAAE7C,GAAI,oBAAoB+C,UAAS,mBAAoBC,SAAQA,OAAOD,UAAUA,QAAQC,OAAOD,QAAQF,GAAGE,QAAQ5C,EAAE0C,GAAG7C,EAAEG,EAAE0C,EAAEA,EAAEI,QAAQ,OAAQ,IAAIC,GAAEL,EAAEM,KAAKN,EAAEtB,QAAQ,SAASvB,EAAEE,EAAEG,GAAG,GAAG,MAAML,EAAE,GAAGsB,GAAGtB,EAAEuB,UAAUD,EAAEtB,EAAEuB,QAAQrB,EAAEG,OAAQ,IAAGL,EA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OAAO+L,WAAW3iB,UAAUwoC,UAAY,SAASx6B,GAMhD,QAASvB,KACRosB,IACa,IAAVA,GAAa4P,EAAKF,aAPtB,GAAIjC,GAAU,EACbl/B,EAAQ,GACRqhC,EAAO/oC,KACPm5B,EAAQ7qB,EAAQnL,MAOjBmL,GAAQhN,QAAQ,SAASsN,GAExBjH,WAAW,SAASiH,GACnBm6B,EAAKC,uBAAuBp6B,EAAO7B,IACjC65B,EAASh4B,GAEZg4B,GAAWl/B,IAGZyV,QAAQkO,IAAI,OAAQub"} \ No newline at end of file +{"version":3,"sources":["epub.js"],"names":["lib$rsvp$utils$$objectOrFunction","x","lib$rsvp$utils$$isFunction","lib$rsvp$utils$$isMaybeThenable","lib$rsvp$utils$$F","lib$rsvp$events$$indexOf","callbacks","callback","i","l","length","lib$rsvp$events$$callbacksFor","object","_promiseCallbacks","lib$rsvp$config$$configure","name","value","lib$rsvp$config$$config","arguments","lib$rsvp$instrument$$scheduleFlush","setTimeout","entry","lib$rsvp$instrument$$queue","payload","guid","key","id","childGuid","childId","error","stack","lib$rsvp$instrument$$instrument","eventName","promise","child","push","_guidKey","_id","detail","_result","label","_label","timeStamp","lib$rsvp$utils$$now","Error","lib$rsvp$$internal$$withOwnPromise","TypeError","lib$rsvp$$internal$$noop","lib$rsvp$$internal$$getThen","then","lib$rsvp$$internal$$GET_THEN_ERROR","lib$rsvp$$internal$$tryThen","fulfillmentHandler","rejectionHandler","call","e","lib$rsvp$$internal$$handleForeignThenable","thenable","async","sealed","lib$rsvp$$internal$$resolve","lib$rsvp$$internal$$fulfill","reason","lib$rsvp$$internal$$reject","lib$rsvp$$internal$$handleOwnThenable","_state","lib$rsvp$$internal$$FULFILLED","lib$rsvp$$internal$$REJECTED","_onError","lib$rsvp$$internal$$subscribe","undefined","lib$rsvp$$internal$$handleMaybeThenable","maybeThenable","constructor","lib$rsvp$$internal$$publishRejection","lib$rsvp$$internal$$publish","lib$rsvp$$internal$$PENDING","_subscribers","instrument","lib$rsvp$instrument$$default","parent","onFulfillment","onRejection","subscribers","settled","lib$rsvp$$internal$$invokeCallback","lib$rsvp$$internal$$ErrorObject","this","lib$rsvp$$internal$$tryCatch","lib$rsvp$$internal$$TRY_CATCH_ERROR","succeeded","failed","hasCallback","lib$rsvp$$internal$$initializePromise","resolver","resolved","lib$rsvp$enumerator$$makeSettledResult","state","position","lib$rsvp$enumerator$$Enumerator","Constructor","input","abortOnReject","enumerator","_instanceConstructor","_abortOnReject","_validateInput","_input","_remaining","_init","_enumerate","_validationError","lib$rsvp$promise$all$$all","entries","lib$rsvp$enumerator$$default","lib$rsvp$promise$race$$race","lib$rsvp$utils$$isArray","resolve","lib$rsvp$promise$resolve$$resolve","lib$rsvp$promise$reject$$reject","lib$rsvp$promise$$needsResolver","lib$rsvp$promise$$needsNew","lib$rsvp$promise$$Promise","lib$rsvp$promise$$counter","lib$rsvp$all$settled$$AllSettled","_superConstructor","lib$rsvp$all$settled$$allSettled","lib$rsvp$promise$$default","lib$rsvp$all$$all","array","all","lib$rsvp$asap$$asap","arg","lib$rsvp$asap$$queue","lib$rsvp$asap$$len","lib$rsvp$asap$$scheduleFlush","lib$rsvp$asap$$useNextTick","nextTick","process","version","versions","node","match","Array","isArray","setImmediate","lib$rsvp$asap$$flush","lib$rsvp$asap$$useVertxTimer","lib$rsvp$asap$$vertxNext","lib$rsvp$asap$$useMutationObserver","iterations","observer","lib$rsvp$asap$$BrowserMutationObserver","document","createTextNode","observe","characterData","data","lib$rsvp$asap$$useMessageChannel","channel","MessageChannel","port1","onmessage","port2","postMessage","lib$rsvp$asap$$useSetTimeout","lib$rsvp$asap$$attemptVertex","r","require","vertx","runOnLoop","runOnContext","lib$rsvp$defer$$defer","deferred","reject","lib$rsvp$filter$$filter","promises","filterFn","values","filtered","results","newLength","lib$rsvp$promise$hash$$PromiseHash","lib$rsvp$hash$settled$$HashSettled","lib$rsvp$hash$settled$$hashSettled","lib$rsvp$hash$$hash","lib$rsvp$promise$hash$$default","lib$rsvp$map$$map","mapFn","lib$rsvp$node$$Result","lib$rsvp$node$$getThen","obj","lib$rsvp$node$$ERROR","lib$rsvp$node$$tryApply","f","s","a","apply","lib$rsvp$node$$makeObject","_","argumentNames","args","lib$rsvp$node$$arrayResult","lib$rsvp$node$$wrapThenable","onFulFillment","lib$rsvp$node$$denodeify","nodeFunc","options","fn","self","promiseInput","lib$rsvp$node$$needsPromiseInput","lib$rsvp$node$$GET_THEN_ERROR","p","err","val","lib$rsvp$node$$handlePromiseInput","lib$rsvp$node$$handleValueInput","__proto__","result","lib$rsvp$race$$race","race","lib$rsvp$reject$$reject","lib$rsvp$resolve$$resolve","lib$rsvp$rethrow$$rethrow","lib$rsvp$$async","lib$rsvp$$on","lib$rsvp$$off","lib$rsvp$utils$$_isArray","Object","prototype","toString","Date","now","getTime","lib$rsvp$utils$$o_create","create","o","lib$rsvp$events$$default","mixin","on","allCallbacks","off","index","splice","trigger","_eachEntry","c","_settledAt","_willSettleAt","_makeResult","lib$rsvp$promise$all$$default","lib$rsvp$promise$race$$default","lib$rsvp$promise$resolve$$default","lib$rsvp$promise$reject$$default","lib$rsvp$promise$$guidKey","cast","after","catch","finally","lib$rsvp$all$settled$$default","lib$rsvp$all$$default","lib$rsvp$asap$$default","lib$rsvp$asap$$browserWindow","window","lib$rsvp$asap$$browserGlobal","MutationObserver","WebKitMutationObserver","lib$rsvp$asap$$isNode","lib$rsvp$asap$$isWorker","Uint8ClampedArray","importScripts","lib$rsvp$defer$$default","lib$rsvp$filter$$default","hasOwnProperty","lib$rsvp$platform$$platform","lib$rsvp$hash$settled$$default","lib$rsvp$hash$$default","lib$rsvp$map$$default","lib$rsvp$node$$default","global","lib$rsvp$platform$$default","lib$rsvp$race$$default","lib$rsvp$reject$$default","lib$rsvp$resolve$$default","lib$rsvp$rethrow$$default","cb","lib$rsvp$$callbacks","lib$rsvp$$eventName","lib$rsvp$umd$$RSVP","Promise","allSettled","hash","hashSettled","denodeify","map","filter","rethrow","defer","EventTarget","configure","define","module","EPUBJS","VERSION","plugins","filePath","Render","root","ePub","bookPath","ArrayBuffer","Book","amd","exports","settings","core","defaults","bookKey","packageUrl","storage","fromStorage","saved","online","contained","width","height","layoutOveride","orientation","minSpreadWidth","gap","restore","reload","goto","styles","headTags","withCredentials","render_method","EPUBJSVERSION","spinePos","stored","navigator","onLine","networkListeners","ready","manifest","RSVP","spine","metadata","cover","toc","pageList","readyPromises","pagination","Pagination","pageListReady","_ready","bind","isRendered","_q","queue","_rendering","_displayQ","_moving","_gotoQ","renderer","Renderer","setMinSpreadWidth","setGap","listenToRenderer","defer_opened","opened","store","open","addEventListener","unload","forceReload","epubpackage","book","isContained","bookUrl","unarchive","loadPackage","urlFrom","localStorage","packageXml","identifier","packageIdentifier","restored","unpack","_registerReplacements","_containerPath","parse","Parser","containerPath","loadXml","containerXml","container","paths","contentsPath","basePath","packagePath","encoding","console","contents","packageContents","spineIndexByURL","generateBookKey","globalLayoutProperties","parseLayoutProperties","coverPath","spineNodeIndex","locations","Locations","navPath","navUrl","navHtml","nav","epubcfi","EpubCFI","wait","forEach","pg","cfi","generateCfiFromHref","href","tocPath","tocUrl","tocXml","createHiddenRender","_width","_height","hiddenContainer","hiddenEl","box","element","getBoundingClientRect","forceSingle","createElement","style","visibility","overflow","appendChild","initialize","generatePageList","pager","spineLength","currentPage","nextChapter","chapter","next","done","Chapter","displayChapter","chap","pageMap","item","start","page","spreads","end","remove","removeChild","generatePagination","defered","loadPagination","pagelistJSON","JSON","getPageList","getMetadata","getToc","Events","range","startPage","endPage","percent","pageRange","pageFromCfi","percentageFromPage","anchorPage","percentage","loadChange","url","uri","chapterUri","currentChapter","absolute","path","warn","filename","afterLoad","render","docEl","beforeDisplay","afterDisplay","reformat","unlistenToRenderer","getXml","zip","request","base","protocol","fromRoot","location","origin","host","baseTag","getElementsByTagName","resolveUrl","pathname","Unarchiver","extension","isSaved","storedSettings","getItem","saveContents","setItem","stringify","removeSavedContents","removeItem","renderTo","elem","rendered","isElement","getEl","direction","setDirection","_rendered","startDisplay","display","previousLocationCfi","gotoCfi","fetch","fromStore","len","clearSaved","pos","enqueue","isNumber","_needsAssetReplacement","registerHook","replace","head","resources","svg","lastPage","preloadNextChapter","dequeue","message","nextPage","prevPage","prev","prevChapter","linear","getCurrentLocationCfi","currentLocationCfi","target","indexOf","gotoPercentage","parseInt","substring","isNaN","gotoPage","gotoHref","cfiString","spineItem","split","section","relativeURL","search","firstPage","cfiFromPage","pageFromPercentage","storeOffline","assets","put","availableOffline","toStorage","isStored","token","Storage","credentials","offline","setStyle","prefixed","noreflow","removeStyle","addHeadTag","tag","attrs","useSpreads","use","_use","force","load","destroy","removeEventListener","flush","applyStyles","applyHeadTags","hrefs","layout","spread","event","spineObject","cfiBase","properties","manifestProperties","pages","loaded","Hooks","getHooks","caches","_store","_credentials","xml","setDocument","doc","querySelector","setAttribute","insertBefore","firstChild","triggerHooks","serializer","XMLSerializer","serializeToString","tempUrl","getUrl","setPages","num","getPages","getID","ID","revokeUrl","_document","namespaceURI","doctype","implementation","createDocument","importNode","documentElement","evaluate","cfiFromRange","_range","startXpath","endXpath","startContainer","endContainer","cleanEndTextContent","getElementXPath","nsResolver","XPathResult","FIRST_ORDERED_NODE_TYPE","singleNodeValue","collapsed","createRange","setStart","startOffset","setEnd","endOffset","log","cleanStartTextContent","cleanStringForXpath","textContent","generateCfiFromRange","find","_query","matches","query","toLowerCase","excerpt","text","last","limit","textSprint","func","treeWalker","createTreeWalker","NodeFilter","SHOW_TEXT","acceptNode","test","FILTER_ACCEPT","FILTER_REJECT","nextNode","finished","progress","items","querySelectorAll","slice","count","called","full","replaceWithStored","attr","_oldUrls","_newUrls","_cache","_uri","_chapterBase","_attr","_wait","notempty","clone","link","src","getAttribute","replaceUrl","timeout","onload","clearTimeout","onerror","getElementById","getEls","classes","getElementsByClassName","type","supportsURL","URL","BLOB_RESPONSE","xhr","XMLHttpRequest","xhrPrototype","handler","readyState","DONE","status","response","responseXML","DOMParser","parseFromString","Blob","defineProperty","mimeType","onreadystatechange","htm","responseType","setRequestHeader","overrideMimeType","send","toArray","arr","member","newitm","ident","withoutProtocol","dot","firstSlash","directory","fragment","blob","doubleSlash","folder","lastIndexOf","lastSlash","dataURLToBlob","dataURL","parts","contentType","raw","rawLength","uInt8Array","BASE64_MARKER","atob","Uint8Array","charCodeAt","addScript","body","addScripts","srcArr","total","curr","addCss","rel","unprefixed","vendors","upper","toUpperCase","segments","folders","pop","concat","join","uuid","d","Math","random","floor","insert","compareFunction","locationOf","_start","_end","compared","pivot","b","indexOfSorted","_scope","scope","funcName","context","inwait","shift","clear","getElementTreeXPath","nodeName","tagName","pathIndex","isXhtml","ownerDocument","nodeType","Node","TEXT_NODE","indexOfTextNode","parentNode","sibling","previousSibling","DOCUMENT_TYPE_NODE","prefix","ns","xhtml","epub","str","part","textNode","sib","children","childNodes","source","prop","extend","sources","getOwnPropertyNames","propName","getOwnPropertyDescriptor","n","parseFloat","isFinite","isString","String","props","keys","cfiStr","generateChapterComponent","_spineNodeIndex","_pos","generatePathComponent","steps","segment","generateCfiFromElement","pathTo","unshift","getChapterComponent","splitStr","getPathComponent","pathComponent","getCharecterOffsetComponent","chapSegment","chapterComponent","charecterOffsetComponent","assertion","chapId","endInt","parseStep","has_brackets","spineId","step","characterOffset","textLocationAssertion","addMarker","_doc","_marker","lastStep","marker","createMarker","findParent","splitText","classList","add","removeMarker","contains","nextSib","nextSibling","prevSib","sections","compare","cfiOne","cfiTwo","generateCfiFromTextNode","anchor","offset","generateCfiFromRangeAnchor","anchorNode","anchorOffset","startElement","startSteps","startPath","startIndex","endElement","endSteps","endPath","endIndex","generateXpathFromSteps","xpath","generateQueryFromSteps","generateRangeFromCfi","textLength","startContainerParent","debug","selectNode","isCfiString","el","events","createEvent","tell","listen","deafen","listenUntil","evt","CustomEvent","msg","dispatchEvent","bindto","OnEvt","OffEvt","unlisten","hooks","plugs","plugType","hook","toAdd","toFront","removeHook","toRemove","passed","countdown","register","Layout","Reflowable","spreadWidth","format","_gap","columnAxis","columnGap","columnWidth","columnFill","colWidth","pageWidth","pageHeight","calculatePages","totalWidth","displayedPages","scrollWidth","ceil","pageCount","ReflowableSpreads","divisor","fullWidth","Fixed","content","viewport","hasAttribute","_locations","_current","generate","chars","_currentCfi","currentLocation","counter","sprint","dist","locationFromCfi","percentageFromCfi","loc","percentageFromLocation","cfiFromLocation","cfiFromPercentage","save","json","getCurrent","setCurrent","get","set","totalPages","round","baseUrl","rootfile","fullpath","xmlEncoding","metadataNode","getElementText","manifestNode","spineNode","findNavPath","findTocPath","findCoverPath","tocId","epubVersion","coverId","bookTitle","creator","description","pubdate","publisher","language","rights","modified_date","querySelectorText","found","getElementsByTagNameNS","nodeValue","q","manifestXml","selected","spineXml","Id","propArray","manifestProps","manifestPropArray","vert","querySelectorByType","html","getAttributeNS","bookSpine","navElement","navItems","list","navItem","subitems","navPoints","tocItem","navLabel","pageListItem","isCfi","Iframe","iframe","bodyEl","leftPos","scrolling","seamless","border","isMobile","userAgent","transform","contentDocument","headEl","contentWindow","resized","setLeft","margin","dir","right","write","close","v","baseEl","resize","totalHeight","scrollHeight","setPageDimensions","defaultView","scrollTo","tagEl","getPageNumberByElement","left","getPageNumberByRect","boundingClientRect","getBaseElement","getDocumentElement","isElementVisible","rect","scroll","bool","renderMethod","hidden","listenedEvents","upEvent","downEvent","isForcedSingle","onResized","layoutSettings","initWidth","initHeight","clientWidth","clientHeight","globalLayout","removeEventListeners","removeSelectionListeners","chapterPos","currentChapterCfiBase","reconcileLayoutSettings","layoutMethod","determineLayout","visible","formated","addEventListeners","addSelectionListeners","queued","updatePages","visibleRangeCfi","getVisibleRangeCfi","property","rendition","determineSpreads","mapPage","headTag","pageByElement","firstElementisTextNode","leng","trim","isGoodNode","embeddedElements","walk","y","prevNode","startNode","STOP","ITER","containsPoint","childElementCount","SHOW_ELEMENT","prevRange","elLimit","check","elPos","elRange","ELEMENT_NODE","selectNodeContents","checkText","ranges","splitTextNodeIntoWordsRanges","collapse","indexOfBreakableChar","startPosition","whiteCharacters","charAt","rangePosition","getClientRects","getPageCfi","getRange","forceElement","caretPositionFromPoint","caretRangeFromPoint","visibileEl","findElementAfter","offsetNode","pagesInCurrentChapter","pgs","currentRenderedPage","getRenderedPagesLeft","pagesLeft","startRange","endRange","findFirstVisible","startEl","setSize","triggerEvent","onSelectionChange","selectionEndTimeout","selectedRange","getSelection","cutoff","replacments","relative","isRelative","onclick","links","srcs","stylesheets","getText","cssUrls","newText","_URL","webkitURL","mozURL","createObjectURL","replaced","checkRequirements","urlCache","current","encodedUrl","encodeURIComponent","localforage","buffer","getMimeType","reader","FileReader","readAsText","parser","fromCache","revokeObjectURL","zipUrl","JSZip","decodededUrl","decodeURIComponent","mime","unarchiver","file","asUint8Array","asText","afterSaved","that","delay","saveEntryFileToStorage","table","application","ecmascript","javascript","ogg","pdf","postscript","rdf+xml","smil","xhtml+xml","x-httpd-eruby","x-latex","x-maker","x-object","x-shockwave-flash","x-silverlight","epub+zip","font-tdpfr","inkml+xml","jsonml+json","mathml+xml","metalink+xml","mp4","omdoc+xml","oxps","vnd.amazon.ebook","widget","x-dtbncx+xml","x-dtbook+xml","x-dtbresource+xml","x-font-bdf","x-font-ghostscript","x-font-linux-psf","x-font-otf","x-font-pcf","x-font-snf","x-font-ttf","x-font-type1","x-font-woff","x-mobipocket-ebook","x-mspublisher","x-nzb","x-tgif","xaml+xml","xml-dtd","xproc+xml","xslt+xml","internet-property-stream","x-compress","x-compressed","x-gzip","audio","flac","midi","mpeg","mpegurl","x-aiff","x-ms-wma","x-wav","adpcm","webm","x-aac","x-caf","x-matroska","x-pn-realaudio-plugin","xm","mid","image","gif","ief","jpeg","pcx","png","svg+xml","tiff","x-icon","bmp","webp","x-pict","x-tga","cis-cod","rfc822","cache-manifest","calendar","css","csv","h323","iuls","mathml","plain","richtext","tab-separated-values","x-bibtex","x-dsrc","x-diff","x-haskell","x-java","x-literate-haskell","x-moc","x-pascal","x-pcs-gcd","x-perl","x-python","x-scala","x-setext","x-tcl","x-tex","x-vcard","sgml","x-c","x-fortran","x-opml","x-nfo","x-sfv","x-uuencode","webviewhtml","video","quicktime","vnd.mpegurl","x-flv","x-la-asf","x-mng","x-ms-asf","x-ms-wm","x-ms-wmv","x-ms-wmx","x-ms-wvx","x-msvideo","x-sgi-movie","3gpp2","h261","h263","h264","jpm","mj2","vnd.ms-playready.media.pyv","vnd.uvvu.mp4","vnd.vivo","x-f4v","x-m4v","x-ms-vob","x-smv","mimeTypes","subtype","defaultValue"],"mappings":";;;;;;;CAQA,WACI,YACA,SAASA,GAAiCC,GACxC,MAAoB,kBAANA,IAAkC,gBAANA,IAAwB,OAANA,EAG9D,QAASC,GAA2BD,GAClC,MAAoB,kBAANA,GAGhB,QAASE,GAAgCF,GACvC,MAAoB,gBAANA,IAAwB,OAANA,EAgBlC,QAASG,MAYT,QAASC,GAAyBC,EAAWC,GAC3C,IAAK,GAAIC,GAAE,EAAGC,EAAEH,EAAUI,OAAUD,EAAFD,EAAKA,IACrC,GAAIF,EAAUE,KAAOD,EAAY,MAAOC,EAG1C,OAAO,GAGT,QAASG,GAA8BC,GACrC,GAAIN,GAAYM,EAAOC,iBAMvB,OAJKP,KACHA,EAAYM,EAAOC,sBAGdP,EAkMT,QAASQ,GAA2BC,EAAMC,GACxC,MAAa,YAATD,MAIFE,IAA4B,GAAE,QAASD,GAIhB,IAArBE,UAAUR,OAGLO,GAAwBF,QAF/BE,GAAwBF,GAAQC,GAQpC,QAASG,KACPC,WAAW,WAET,IAAK,GADDC,GACKb,EAAI,EAAGA,EAAIc,GAA2BZ,OAAQF,IAAK,CAC1Da,EAAQC,GAA2Bd,EAEnC,IAAIe,GAAUF,EAAME,OAEpBA,GAAQC,KAAOD,EAAQE,IAAMF,EAAQG,GACrCH,EAAQI,UAAYJ,EAAQE,IAAMF,EAAQK,QACtCL,EAAQM,QACVN,EAAQO,MAAQP,EAAQM,MAAMC,OAGhCb,GAAiC,QAAEI,EAAMN,KAAMM,EAAME,SAEvDD,GAA2BZ,OAA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S5mC,EAAK4B,EAAO+kC,IAC/B,KAAKtnB,IAAQwe,GACZ,GAAIA,EAAMl6B,eAAe0b,GACxB,IAAKunB,IAAW/I,GAAMxe,GACrB,GAAIwe,EAAMxe,GAAM1b,eAAeijC,GAE9B,GADA5mC,EAAM69B,EAAMxe,GAAMunB,GACA,gBAAP5mC,GACV2mC,EAAU3mC,GAAOqf,EAAO,IAAMunB,MAE9B,KAAKhlC,EAAQ,EAAGA,EAAQ5B,EAAI7M,OAAQyO,IACnC+kC,EAAU3mC,EAAI4B,IAAUyd,EAAO,IAAMunB,CAO3C,OAAOD,KAGRnhC,QAAOa,KAAKo2B,YAAc,SAASvrB,GAClC,GAAI21B,GAAe,YACnB,OAAO31B,IAAYy1B,EAAUz1B,EAAS6E,MAAM,KAAKsN,MAAM/G,gBAAkBuqB","file":"epub.min.js"} \ No newline at end of file diff --git a/epub.js/epub_no_underscore.js b/epub.js/epub_no_underscore.js index 7835d6f..f328678 100644 --- a/epub.js/epub_no_underscore.js +++ b/epub.js/epub_no_underscore.js @@ -2184,7 +2184,7 @@ global.RSVP = requireModule('rsvp'); 'use strict'; var EPUBJS = EPUBJS || {}; -EPUBJS.VERSION = "0.2.3"; +EPUBJS.VERSION = "0.2.7"; EPUBJS.plugins = EPUBJS.plugins || {}; @@ -2231,7 +2231,7 @@ EPUBJS.Render = {}; return new EPUBJS.Book(options); }; - _.extend(ePub, { + EPUBJS.core.extend(ePub, { noConflict : function() { root.ePub = previousEpub; return this; @@ -2252,7 +2252,7 @@ EPUBJS.Book = function(options){ var book = this; - this.settings = _.defaults(options || {}, { + this.settings = EPUBJS.core.defaults(options || {}, { bookPath : null, bookKey : null, packageUrl : null, @@ -2302,15 +2302,6 @@ EPUBJS.Book = function(options){ this.online = this.settings.online || navigator.onLine; this.networkListeners(); - this.store = false; //-- False if not using storage; - - //-- Determine storage method - //-- Override options: none | ram | websqldatabase | indexeddb | filesystem - - if(this.settings.storage !== false){ - this.storage = new fileStorage.storage(this.settings.storage); - } - this.ready = { manifest: new RSVP.defer(), spine: new RSVP.defer(), @@ -2359,6 +2350,16 @@ EPUBJS.Book = function(options){ this.defer_opened = new RSVP.defer(); this.opened = this.defer_opened.promise; + + this.store = false; //-- False if not using storage; + + //-- Determine storage method + //-- Override options: none | ram | websqldatabase | indexeddb | filesystem + if(this.settings.storage !== false){ + // this.storage = new fileStorage.storage(this.settings.storage); + this.fromStorage(true); + } + // BookUrl is optional, but if present start loading process if(typeof this.settings.bookPath === 'string') { this.open(this.settings.bookPath, this.settings.reload); @@ -2420,11 +2421,6 @@ EPUBJS.Book.prototype.open = function(bookPath, forceReload){ }); } - //-- If there is network connection, store the books contents - if(this.online && this.settings.storage && !this.settings.contained){ - if(!this.settings.stored) opened.then(book.storeOffline()); - } - this._registerReplacements(this.renderer); return opened.promise; @@ -2484,11 +2480,11 @@ EPUBJS.Book.prototype.unpack = function(packageXml){ //-- Set Globbal Layout setting based on metadata book.globalLayoutProperties = book.parseLayoutProperties(book.metadata); - + if(book.contents.coverPath) { book.cover = book.contents.cover = book.settings.contentsPath + book.contents.coverPath; } - + book.spineNodeIndex = book.contents.spineNodeIndex; book.ready.manifest.resolve(book.contents.manifest); @@ -2496,6 +2492,7 @@ EPUBJS.Book.prototype.unpack = function(packageXml){ book.ready.metadata.resolve(book.contents.metadata); book.ready.cover.resolve(book.contents.cover); + book.locations = new EPUBJS.Locations(book.spine); //-- Load the TOC, optional; either the EPUB3 XHTML Navigation file or the EPUB2 NCX file if(book.contents.navPath) { @@ -2706,14 +2703,19 @@ EPUBJS.Book.prototype.getToc = function() { //-- Listeners for browser events EPUBJS.Book.prototype.networkListeners = function(){ var book = this; - window.addEventListener("offline", function(e) { book.online = false; + if (book.settings.storage) { + book.fromStorage(true); + } book.trigger("book:offline"); }, false); window.addEventListener("online", function(e) { book.online = true; + if (book.settings.storage) { + book.fromStorage(false); + } book.trigger("book:online"); }, false); @@ -2761,15 +2763,27 @@ EPUBJS.Book.prototype.listenToRenderer = function(renderer){ // Prevents the Render from loading a different chapter when back button is pressed EPUBJS.Book.prototype.loadChange = function(url){ var uri = EPUBJS.core.uri(url); - var chapter; - - if(this.currentChapter) { - chapter = EPUBJS.core.uri(this.currentChapter.absolute); - } - - if(!this._rendering && this.currentChapter && uri.path != chapter.path){ + var chapterUri = EPUBJS.core.uri(this.currentChapter.absolute); + var spinePos, chapter; + + if(uri.path != chapterUri.path){ console.warn("Miss Match", uri.path, this.currentChapter.absolute); - this.goto(uri.filename); + // this.goto(uri.filename); + + // Set the current chapter to what is being displayed + spinePos = this.spineIndexByURL[uri.filename]; + chapter = new EPUBJS.Chapter(this.spine[spinePos], this.store); + this.currentChapter = chapter; + + // setup the renderer with the displayed chapter + this.renderer.currentChapter = chapter; + this.renderer.afterLoad(this.renderer.render.docEl); + this.renderer.beforeDisplay(function () { + this.renderer.afterDisplay(); + }.bind(this)); + + } else if(!this._rendering) { + this.renderer.reformat(); } }; @@ -2782,7 +2796,7 @@ EPUBJS.Book.prototype.unlistenToRenderer = function(renderer){ //-- Choose between a request from store or a request from network EPUBJS.Book.prototype.loadXml = function(url){ if(this.settings.fromStorage) { - return this.storage.getXml(url, this.settings.encoding); + return this.store.getXml(url, this.settings.encoding); } else if(this.settings.contained) { return this.zip.getXml(url, this.settings.encoding); }else{ @@ -2838,7 +2852,7 @@ EPUBJS.Book.prototype.unarchive = function(bookPath){ this.zip = new EPUBJS.Unarchiver(); this.store = this.zip; // Use zip storaged in ram - return this.zip.openZip(bookPath); + return this.zip.open(bookPath); }; //-- Checks if url has a .epub or .zip extension @@ -2896,7 +2910,7 @@ EPUBJS.Book.prototype.renderTo = function(elem){ var book = this, rendered; - if(_.isElement(elem)) { + if(EPUBJS.core.isElement(elem)) { this.element = elem; } else if (typeof elem == "string") { this.element = EPUBJS.core.getEl(elem); @@ -2909,6 +2923,11 @@ EPUBJS.Book.prototype.renderTo = function(elem){ then(function(){ // book.render = new EPUBJS.Renderer[this.settings.renderer](book); book.renderer.initialize(book.element, book.settings.width, book.settings.height); + + if(book.metadata.direction) { + book.renderer.setDirection(book.metadata.direction); + } + book._rendered(); return book.startDisplay(); }); @@ -2999,7 +3018,7 @@ EPUBJS.Book.prototype.displayChapter = function(chap, end, deferred){ return defer.promise; } - if(_.isNumber(chap)){ + if(EPUBJS.core.isNumber(chap)){ pos = chap; }else{ cfi = new EPUBJS.EpubCFI(chap); @@ -3018,6 +3037,18 @@ EPUBJS.Book.prototype.displayChapter = function(chap, end, deferred){ this._rendering = true; + if(this._needsAssetReplacement()) { + + chapter.registerHook("beforeChapterRender", [ + EPUBJS.replace.head, + EPUBJS.replace.resources, + EPUBJS.replace.svg + ], true); + + } + + book.currentChapter = chapter; + render = book.renderer.displayChapter(chapter, this.globalLayoutProperties); if(cfi) { book.renderer.gotoCfi(cfi); @@ -3032,12 +3063,11 @@ EPUBJS.Book.prototype.displayChapter = function(chap, end, deferred){ defer.resolve(book.renderer); - if(!book.settings.fromStorage && - !book.settings.contained) { + if(book.settings.fromStorage === false && + book.settings.contained === false) { book.preloadNextChapter(); } - book.currentChapter = chapter; book._rendering = false; book._displayQ.dequeue(); if(book._displayQ.length() === 0) { @@ -3046,7 +3076,7 @@ EPUBJS.Book.prototype.displayChapter = function(chap, end, deferred){ }, function(error) { // handle errors in either of the two requests - console.error("Could not load Chapter: "+ chapter.absolute); + console.error("Could not load Chapter: "+ chapter.absolute, error); book.trigger("book:chapterLoadFailed", chapter.absolute); book._rendering = false; defer.reject(error); @@ -3278,13 +3308,12 @@ EPUBJS.Book.prototype.preloadNextChapter = function() { } }; - EPUBJS.Book.prototype.storeOffline = function() { var book = this, - assets = _.values(this.manifest); + assets = EPUBJS.core.values(this.manifest); //-- Creates a queue of all items to load - return EPUBJS.storage.batch(assets). + return this.store.put(assets). then(function(){ book.settings.stored = true; book.trigger("book:stored"); @@ -3295,40 +3324,74 @@ EPUBJS.Book.prototype.availableOffline = function() { return this.settings.stored > 0 ? true : false; }; -/* -EPUBJS.Book.prototype.fromStorage = function(stored) { +EPUBJS.Book.prototype.toStorage = function () { + var key = this.settings.bookKey; + this.store.isStored(key).then(function(stored) { - if(this.contained) return; + if (stored === true) { + this.settings.stored = true; + return true; + } - if(!stored){ - this.online = true; - this.tell("book:online"); - }else{ - if(!this.availableOffline){ - //-- If book hasn't been cached yet, store offline - this.storeOffline(function(){ - this.online = false; - this.tell("book:offline"); + return this.storeOffline() + .then(function() { + this.store.token(key, true); }.bind(this)); - }else{ - this.online = false; - this.tell("book:offline"); - } + }.bind(this)); + +}; +EPUBJS.Book.prototype.fromStorage = function(stored) { + var hooks = [ + EPUBJS.replace.head, + EPUBJS.replace.resources, + EPUBJS.replace.svg + ]; + + if(this.contained || this.settings.contained) return; + + //-- If there is network connection, store the books contents + if(this.online){ + this.opened.then(this.toStorage.bind(this)); } -} -*/ + if(this.store && this.settings.fromStorage && stored === false){ + this.settings.fromStorage = false; + this.store.off("offline"); + // this.renderer.removeHook("beforeChapterRender", hooks, true); + this.store = false; + }else if(!this.settings.fromStorage){ + + this.store = new EPUBJS.Storage(this.settings.credentials); + this.store.on("offline", function (offline) { + if (!offline) { + // Online + this.offline = false; + this.settings.fromStorage = false; + // this.renderer.removeHook("beforeChapterRender", hooks, true); + this.trigger("book:online"); + } else { + // Offline + this.offline = true; + this.settings.fromStorage = true; + // this.renderer.registerHook("beforeChapterRender", hooks, true); + this.trigger("book:offline"); + } + }.bind(this)); + + } + +}; EPUBJS.Book.prototype.setStyle = function(style, val, prefixed) { var noreflow = ["color", "background", "background-color"]; - + if(!this.isRendered) return this._q.enqueue("setStyle", arguments); this.settings.styles[style] = val; this.renderer.setStyle(style, val, prefixed); - + if(noreflow.indexOf(style) === -1) { // clearTimeout(this.reformatTimeout); // this.reformatTimeout = setTimeout(function(){ @@ -3360,7 +3423,7 @@ EPUBJS.Book.prototype.useSpreads = function(use) { EPUBJS.Book.prototype.forceSingle = function(_use) { var force = typeof _use === "undefined" ? true : _use; - + this.renderer.forceSingle(force); this.settings.forceSingle = force; if(this.isRendered) { @@ -3416,7 +3479,7 @@ EPUBJS.Book.prototype.destroy = function() { this.unload(); - if(this.render) this.render.remove(); + if(this.renderer) this.renderer.remove(); }; @@ -3452,26 +3515,15 @@ EPUBJS.Book.prototype._registerReplacements = function(renderer){ renderer.registerHook("beforeChapterDisplay", this.applyStyles.bind(this, renderer), true); renderer.registerHook("beforeChapterDisplay", this.applyHeadTags.bind(this, renderer), true); renderer.registerHook("beforeChapterDisplay", EPUBJS.replace.hrefs.bind(this), true); - - if(this._needsAssetReplacement()) { - - renderer.registerHook("beforeChapterDisplay", [ - EPUBJS.replace.head, - EPUBJS.replace.resources, - EPUBJS.replace.svg - ], true); - - } - }; EPUBJS.Book.prototype._needsAssetReplacement = function(){ if(this.settings.fromStorage) { //-- Filesystem api links are relative, so no need to replace them - if(this.storage.getStorageType() == "filesystem") { - return false; - } + // if(this.storage.getStorageType() == "filesystem") { + // return false; + // } return true; @@ -3507,13 +3559,13 @@ RSVP.on('error', function(event) { //console.error(event, event.detail); }); -RSVP.configure('instrument', true); //-- true | will logging out all RSVP rejections +RSVP.configure('instrument', false); //-- true | will logging out all RSVP rejections // RSVP.on('created', listener); // RSVP.on('chained', listener); // RSVP.on('fulfilled', listener); -RSVP.on('rejected', function(event){ - console.error(event.detail.message, event.detail.stack); -}); +// RSVP.on('rejected', function(event){ +// console.error(event.detail.message, event.detail.stack); +// }); EPUBJS.Chapter = function(spineObject, store){ this.href = spineObject.href; @@ -3529,6 +3581,13 @@ EPUBJS.Chapter = function(spineObject, store){ this.epubcfi = new EPUBJS.EpubCFI(); this.deferred = new RSVP.defer(); this.loaded = this.deferred.promise; + + EPUBJS.Hooks.mixin(this); + //-- Get pre-registered hooks for events + this.getHooks("beforeChapterRender"); + + // Cached for replacement urls from storage + this.caches = {}; }; @@ -3537,34 +3596,42 @@ EPUBJS.Chapter.prototype.load = function(_store){ var promise; // if(this.store && (!this.book.online || this.book.contained)) if(store){ - promise = store.get(this.href); + promise = store.getXml(this.absolute); }else{ promise = EPUBJS.core.request(this.absolute, 'xml'); } - + promise.then(function(xml){ this.setDocument(xml); this.deferred.resolve(this); }.bind(this)); - + return promise; }; EPUBJS.Chapter.prototype.render = function(_store){ - + return this.load().then(function(doc){ - - var serializer = new XMLSerializer(); - var contents; - var head = doc.head; + + var head = doc.querySelector('head'); var base = doc.createElement("base"); - - base.setAttribute("href", window.location.origin + this.absolute); + + base.setAttribute("href", this.absolute); head.insertBefore(base, head.firstChild); - contents = serializer.serializeToString(doc); - + + this.contents = doc; + + return new RSVP.Promise(function (resolve, reject) { + this.triggerHooks("beforeChapterRender", function () { + resolve(doc); + }.bind(this), this); + }.bind(this)); + + }.bind(this)) + .then(function(doc) { + var serializer = new XMLSerializer(); + var contents = serializer.serializeToString(doc); return contents; - }.bind(this)); }; @@ -3574,7 +3641,7 @@ EPUBJS.Chapter.prototype.url = function(_store){ var loaded; var chapter = this; var url; - + if(store){ if(!this.tempUrl) { store.getUrl(this.absolute).then(function(url){ @@ -3598,7 +3665,7 @@ EPUBJS.Chapter.prototype.url = function(_store){ deferred.reject(error); }); */ - + return deferred.promise; }; @@ -3652,59 +3719,65 @@ EPUBJS.Chapter.prototype.cfiFromRange = function(_range) { var startXpath, endXpath; var startContainer, endContainer; var cleanTextContent, cleanEndTextContent; - + // Check for Contents if(!this.document) return; - startXpath = EPUBJS.core.getElementXPath(_range.startContainer); - // console.log(startContainer) - endXpath = EPUBJS.core.getElementXPath(_range.endContainer); - startContainer = this.document.evaluate(startXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - - if(!_range.collapsed) { - endContainer = this.document.evaluate(endXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - } - - range = this.document.createRange(); - // Find Exact Range in original document - if(startContainer) { - try { - range.setStart(startContainer, _range.startOffset); - if(!_range.collapsed && endContainer) { - range.setEnd(endContainer, _range.endOffset); - } - } catch (e) { - console.log("missed"); - startContainer = false; - } - - } + if(typeof document.evaluate != 'undefined') { + + startXpath = EPUBJS.core.getElementXPath(_range.startContainer); + // console.log(startContainer) + endXpath = EPUBJS.core.getElementXPath(_range.endContainer); - // Fuzzy Match - if(!startContainer) { - console.log("not found, try fuzzy match"); - cleanStartTextContent = EPUBJS.core.cleanStringForXpath(_range.startContainer.textContent); - startXpath = "//text()[contains(.," + cleanStartTextContent + ")]"; - startContainer = this.document.evaluate(startXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - if(startContainer){ - // console.log("Found with Fuzzy"); - range.setStart(startContainer, _range.startOffset); + if(!_range.collapsed) { + endContainer = this.document.evaluate(endXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + } - if(!_range.collapsed) { - cleanEndTextContent = EPUBJS.core.cleanStringForXpath(_range.endContainer.textContent); - endXpath = "//text()[contains(.," + cleanEndTextContent + ")]"; - endContainer = this.document.evaluate(endXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; - if(endContainer) { + range = this.document.createRange(); + // Find Exact Range in original document + if(startContainer) { + try { + range.setStart(startContainer, _range.startOffset); + if(!_range.collapsed && endContainer) { range.setEnd(endContainer, _range.endOffset); } + } catch (e) { + console.log("missed"); + startContainer = false; } } + + // Fuzzy Match + if(!startContainer) { + console.log("not found, try fuzzy match"); + cleanStartTextContent = EPUBJS.core.cleanStringForXpath(_range.startContainer.textContent); + startXpath = "//text()[contains(.," + cleanStartTextContent + ")]"; + + startContainer = this.document.evaluate(startXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + + if(startContainer){ + // console.log("Found with Fuzzy"); + range.setStart(startContainer, _range.startOffset); + + if(!_range.collapsed) { + cleanEndTextContent = EPUBJS.core.cleanStringForXpath(_range.endContainer.textContent); + endXpath = "//text()[contains(.," + cleanEndTextContent + ")]"; + endContainer = this.document.evaluate(endXpath, this.document, EPUBJS.core.nsResolver, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + if(endContainer) { + range.setEnd(endContainer, _range.endOffset); + } + } + + } + } + } else { + range = _range; // Just evaluate the current documents range } - - // Generate the Cfi + + // Generate the Cfi return this.epubcfi.generateCfiFromRange(range, this.cfiBase); }; @@ -3722,19 +3795,19 @@ EPUBJS.Chapter.prototype.find = function(_query){ var last = -1; var excerpt; var limit = 150; - + while (pos != -1) { pos = text.indexOf(query, last + 1); - + if(pos != -1) { // If Found, Create Range range = chapter.document.createRange(); range.setStart(node, pos); range.setEnd(node, pos + query.length); - + //Generate CFI cfi = chapter.cfiFromRange(range); - + // Generate Excerpt if(node.textContent.length < limit) { excerpt = node.textContent; @@ -3742,32 +3815,32 @@ EPUBJS.Chapter.prototype.find = function(_query){ excerpt = node.textContent.substring(pos-limit/2,pos+limit/2); excerpt = "..." + excerpt + "..."; } - + //Add CFI to list matches.push({ cfi: cfi, excerpt: excerpt }); } - + last = pos; } }; - + // Grab text nodes - + /* for ( var i=0 ; i < xpath.snapshotLength; i++ ) { find(xpath.snapshotItem(i)); } */ - + this.textSprint(this.document, function(node){ find(node); }); - - + + // Return List of CFIs return matches; }; @@ -3789,6 +3862,109 @@ EPUBJS.Chapter.prototype.textSprint = function(root, func) { } }; + +EPUBJS.Chapter.prototype.replace = function(query, func, finished, progress){ + var items = this.contents.querySelectorAll(query), + resources = Array.prototype.slice.call(items), + count = resources.length; + + + if(count === 0) { + finished(false); + return; + } + resources.forEach(function(item){ + var called = false; + var after = function(result, full){ + if(called === false) { + count--; + if(progress) progress(result, full, count); + if(count <= 0 && finished) finished(true); + called = true; + } + }; + + func(item, after); + + }.bind(this)); + +}; + +EPUBJS.Chapter.prototype.replaceWithStored = function(query, attr, func, callback) { + var _oldUrls, + _newUrls = {}, + _store = this.store, + _cache = this.caches[query], + _uri = EPUBJS.core.uri(this.absolute), + _chapterBase = _uri.base, + _attr = attr, + _wait = 5, + progress = function(url, full, count) { + _newUrls[full] = url; + }, + finished = function(notempty) { + if(callback) callback(); + + _oldUrls.forEach(function(url){ + _store.revokeUrl(url); + }); + + _cache = _newUrls; + }; + + if(!_store) return; + + if(!_cache) _cache = {}; + _oldUrls = EPUBJS.core.clone(_cache); + + this.replace(query, function(link, done){ + var src = link.getAttribute(_attr), + full = EPUBJS.core.resolveUrl(_chapterBase, src); + + var replaceUrl = function(url) { + var timeout; + link.onload = function(){ + clearTimeout(timeout); + done(url, full); + }; + + link.onerror = function(e){ + clearTimeout(timeout); + done(url, full); + console.error(e); + }; + + if(query == "image") { + //-- SVG needs this to trigger a load event + link.setAttribute("externalResourcesRequired", "true"); + } + + if(query == "link[href]" && link.getAttribute("rel") !== "stylesheet") { + //-- Only Stylesheet links seem to have a load events, just continue others + done(url, full); + } else { + timeout = setTimeout(function(){ + done(url, full); + }, _wait); + } + + link.setAttribute(_attr, url); + + + + }; + + if(full in _oldUrls){ + replaceUrl(_oldUrls[full]); + _newUrls[full] = _oldUrls[full]; + delete _oldUrls[full]; + }else{ + func(_store, full, replaceUrl, link); + } + + }, finished, progress); +}; + var EPUBJS = EPUBJS || {}; EPUBJS.core = {}; @@ -3810,10 +3986,10 @@ EPUBJS.core.request = function(url, type, withCredentials) { var xhr = new XMLHttpRequest(); - //-- Check from PDF.js: + //-- Check from PDF.js: // https://github.com/mozilla/pdf.js/blob/master/web/compatibility.js var xhrPrototype = XMLHttpRequest.prototype; - + if (!('overrideMimeType' in xhrPrototype)) { // IE10 might have response, but not overrideMimeType Object.defineProperty(xhrPrototype, 'overrideMimeType', { @@ -3825,15 +4001,15 @@ EPUBJS.core.request = function(url, type, withCredentials) { } xhr.open("GET", url, true); xhr.onreadystatechange = handler; - + if(type == 'blob'){ xhr.responseType = BLOB_RESPONSE; } - + if(type == "json") { xhr.setRequestHeader("Accept", "application/json"); } - + if(type == 'xml') { xhr.overrideMimeType('text/xml'); } @@ -3841,14 +4017,14 @@ EPUBJS.core.request = function(url, type, withCredentials) { if(type == "binary") { xhr.responseType = "arraybuffer"; } - + xhr.send(); - + function handler() { if (this.readyState === this.DONE) { - if (this.status === 200 || this.responseXML ) { //-- Firefox is reporting 0 for blob urls + if (this.status === 200 || (this.status === 0 && this.response) ) { // Android & Firefox reporting 0 for local & blob urls var r; - + if(type == 'xml'){ r = this.responseXML; }else @@ -3856,18 +4032,18 @@ EPUBJS.core.request = function(url, type, withCredentials) { r = JSON.parse(this.response); }else if(type == 'blob'){ - + if(supportsURL) { r = this.response; } else { //-- Safari doesn't support responseType blob, so create a blob from arraybuffer r = new Blob([this.response]); } - + }else{ r = this.response; } - + deferred.resolve(r); } else { deferred.reject({ @@ -3917,13 +4093,13 @@ EPUBJS.core.uri = function(url){ withoutProtocol, dot, firstSlash; - + if(blob === 0) { uri.protocol = "blob"; uri.base = url.indexOf(0, fragment); return uri; } - + if(fragment != -1) { uri.fragment = url.slice(fragment + 1); url = url.slice(0, fragment); @@ -3934,12 +4110,12 @@ EPUBJS.core.uri = function(url){ url = url.slice(0, search); href = url; } - + if(doubleSlash != -1) { uri.protocol = url.slice(0, doubleSlash); withoutProtocol = url.slice(doubleSlash+3); firstSlash = withoutProtocol.indexOf('/'); - + if(firstSlash === -1) { uri.host = uri.path; uri.path = ""; @@ -3947,12 +4123,12 @@ EPUBJS.core.uri = function(url){ uri.host = withoutProtocol.slice(0, firstSlash); uri.path = withoutProtocol.slice(firstSlash); } - - + + uri.origin = uri.protocol + "://" + uri.host; - + uri.directory = EPUBJS.core.folder(uri.path); - + uri.base = uri.origin + uri.directory; // return origin; } else { @@ -3960,7 +4136,7 @@ EPUBJS.core.uri = function(url){ uri.directory = EPUBJS.core.folder(url); uri.base = uri.directory; } - + //-- Filename uri.filename = url.replace(uri.base, ''); dot = uri.filename.lastIndexOf('.'); @@ -3973,13 +4149,13 @@ EPUBJS.core.uri = function(url){ //-- Parse out the folder, will return everything before the last slash EPUBJS.core.folder = function(url){ - + var lastSlash = url.lastIndexOf('/'); - + if(lastSlash == -1) var folder = ''; - + folder = url.slice(0, lastSlash + 1); - + return folder; }; @@ -4011,7 +4187,7 @@ EPUBJS.core.dataURLToBlob = function(dataURL) { return new Blob([uInt8Array], {type: contentType}); }; -//-- Load scripts async: http://stackoverflow.com/questions/7718935/load-scripts-asynchronously +//-- Load scripts async: http://stackoverflow.com/questions/7718935/load-scripts-asynchronously EPUBJS.core.addScript = function(src, callback, target) { var s, r; r = false; @@ -4066,13 +4242,13 @@ EPUBJS.core.prefixed = function(unprefixed) { prefixes = ['-Webkit-', '-moz-', '-o-', '-ms-'], upper = unprefixed[0].toUpperCase() + unprefixed.slice(1), length = vendors.length; - - if (typeof(document.body.style[unprefixed]) != 'undefined') { + + if (typeof(document.documentElement.style[unprefixed]) != 'undefined') { return unprefixed; } for ( var i=0; i < length; i++ ) { - if (typeof(document.body.style[vendors[i] + upper]) != 'undefined') { + if (typeof(document.documentElement.style[vendors[i] + upper]) != 'undefined') { return vendors[i] + upper; } } @@ -4086,11 +4262,11 @@ EPUBJS.core.resolveUrl = function(base, path) { uri = EPUBJS.core.uri(path), folders = base.split("/"), paths; - + if(uri.host) { return path; } - + folders.pop(); paths = path.split("/"); @@ -4119,11 +4295,11 @@ EPUBJS.core.uuid = function() { }; // Fast quicksort insert for sorted array -- based on: -// http://stackoverflow.com/questions/1344500/efficient-way-to-insert-a-number-into-a-sorted-array-of-numbers +// http://stackoverflow.com/questions/1344500/efficient-way-to-insert-a-number-into-a-sorted-array-of-numbers EPUBJS.core.insert = function(item, array, compareFunction) { var location = EPUBJS.core.locationOf(item, array, compareFunction); array.splice(location, 0, item); - + return location; }; @@ -4142,12 +4318,12 @@ EPUBJS.core.locationOf = function(item, array, compareFunction, _start, _end) { if(end-start <= 0) { return pivot; } - + compared = compareFunction(array[pivot], item); if(end-start === 1) { return compared > 0 ? pivot : pivot + 1; } - + if(compared === 0) { return pivot; } @@ -4212,7 +4388,7 @@ EPUBJS.core.queue = function(_scope){ // }, 0); } }; - + // Run All var flush = function(){ while(_q.length) { @@ -4223,11 +4399,11 @@ EPUBJS.core.queue = function(_scope){ var clear = function(){ _q = []; }; - + var length = function(){ return _q.length; }; - + return { "enqueue" : enqueue, "dequeue" : dequeue, @@ -4253,7 +4429,7 @@ EPUBJS.core.getElementTreeXPath = function(element) { var paths = []; var isXhtml = (element.ownerDocument.documentElement.getAttribute('xmlns') === "http://www.w3.org/1999/xhtml"); var index, nodeName, tagName, pathIndex; - + if(element.nodeType === Node.TEXT_NODE){ // index = Array.prototype.indexOf.call(element.parentNode.childNodes, element) + 1; index = EPUBJS.core.indexOfTextNode(element) + 1; @@ -4321,511 +4497,614 @@ EPUBJS.core.indexOfTextNode = function(textNode){ } if(sib == textNode) break; } - + return index; }; + +// Underscore +EPUBJS.core.defaults = function(obj) { + for (var i = 1, length = arguments.length; i < length; i++) { + var source = arguments[i]; + for (var prop in source) { + if (obj[prop] === void 0) obj[prop] = source[prop]; + } + } + return obj; +}; + +EPUBJS.core.extend = function(target) { + var sources = [].slice.call(arguments, 1); + sources.forEach(function (source) { + if(!source) return; + Object.getOwnPropertyNames(source).forEach(function(propName) { + Object.defineProperty(target, propName, Object.getOwnPropertyDescriptor(source, propName)); + }); + }); + return target; +}; + +EPUBJS.core.clone = function(obj) { + return EPUBJS.core.isArray(obj) ? obj.slice() : EPUBJS.core.extend({}, obj); +}; + +EPUBJS.core.isElement = function(obj) { + return !!(obj && obj.nodeType == 1); +}; + +EPUBJS.core.isNumber = function(n) { + return !isNaN(parseFloat(n)) && isFinite(n); +}; + +EPUBJS.core.isString = function(str) { + return (typeof str === 'string' || str instanceof String); +}; + +EPUBJS.core.isArray = Array.isArray || function(obj) { + return Object.prototype.toString.call(obj) === '[object Array]'; +}; + +// Lodash +EPUBJS.core.values = function(object) { + var index = -1, + props = Object.keys(object), + length = props.length, + result = Array(length); + + while (++index < length) { + result[index] = object[props[index]]; + } + return result; +}; EPUBJS.EpubCFI = function(cfiStr){ - if(cfiStr) return this.parse(cfiStr); + if(cfiStr) return this.parse(cfiStr); }; EPUBJS.EpubCFI.prototype.generateChapterComponent = function(_spineNodeIndex, _pos, id) { - var pos = parseInt(_pos), - spineNodeIndex = _spineNodeIndex + 1, - cfi = '/'+spineNodeIndex+'/'; + var pos = parseInt(_pos), + spineNodeIndex = _spineNodeIndex + 1, + cfi = '/'+spineNodeIndex+'/'; - cfi += (pos + 1) * 2; + cfi += (pos + 1) * 2; - if(id) cfi += "[" + id + "]"; + if(id) cfi += "[" + id + "]"; - //cfi += "!"; + //cfi += "!"; - return cfi; + return cfi; }; EPUBJS.EpubCFI.prototype.generatePathComponent = function(steps) { - var parts = []; + var parts = []; - steps.forEach(function(part){ - var segment = ''; - segment += (part.index + 1) * 2; + steps.forEach(function(part){ + var segment = ''; + segment += (part.index + 1) * 2; - if(part.id) { - segment += "[" + part.id + "]"; - } + if(part.id) { + segment += "[" + part.id + "]"; + } - parts.push(segment); - }); + parts.push(segment); + }); - return parts.join('/'); + return parts.join('/'); }; EPUBJS.EpubCFI.prototype.generateCfiFromElement = function(element, chapter) { - var steps = this.pathTo(element); - var path = this.generatePathComponent(steps); - if(!path.length) { - // Start of Chapter - return "epubcfi(" + chapter + "!/4/)"; - } else { - // First Text Node - return "epubcfi(" + chapter + "!" + path + "/1:0)"; - } + var steps = this.pathTo(element); + var path = this.generatePathComponent(steps); + if(!path.length) { + // Start of Chapter + return "epubcfi(" + chapter + "!/4/)"; + } else { + // First Text Node + return "epubcfi(" + chapter + "!" + path + "/1:0)"; + } }; EPUBJS.EpubCFI.prototype.pathTo = function(node) { - var stack = [], - children; + var stack = [], + children; - while(node && node.parentNode !== null && node.parentNode.nodeType != 9) { - children = node.parentNode.children; + while(node && node.parentNode !== null && node.parentNode.nodeType != 9) { + children = node.parentNode.children; - stack.unshift({ - 'id' : node.id, - // 'classList' : node.classList, - 'tagName' : node.tagName, - 'index' : children ? Array.prototype.indexOf.call(children, node) : 0 - }); - - node = node.parentNode; - } - - return stack; + stack.unshift({ + 'id' : node.id, + // 'classList' : node.classList, + 'tagName' : node.tagName, + 'index' : children ? Array.prototype.indexOf.call(children, node) : 0 + }); + + node = node.parentNode; + } + + return stack; }; EPUBJS.EpubCFI.prototype.getChapterComponent = function(cfiStr) { - var splitStr = cfiStr.split("!"); + var splitStr = cfiStr.split("!"); - return splitStr[0]; + return splitStr[0]; }; EPUBJS.EpubCFI.prototype.getPathComponent = function(cfiStr) { - var splitStr = cfiStr.split("!"); - var pathComponent = splitStr[1] ? splitStr[1].split(":") : ''; + var splitStr = cfiStr.split("!"); + var pathComponent = splitStr[1] ? splitStr[1].split(":") : ''; - return pathComponent[0]; + return pathComponent[0]; }; EPUBJS.EpubCFI.prototype.getCharecterOffsetComponent = function(cfiStr) { - var splitStr = cfiStr.split(":"); - return splitStr[1] || ''; + var splitStr = cfiStr.split(":"); + return splitStr[1] || ''; }; EPUBJS.EpubCFI.prototype.parse = function(cfiStr) { - var cfi = {}, - chapSegment, - chapterComponent, - pathComponent, - charecterOffsetComponent, - assertion, - chapId, - path, - end, - endInt, - text, - parseStep = function(part){ - var type, index, has_brackets, id; - - type = "element"; - index = parseInt(part) / 2 - 1; - has_brackets = part.match(/\[(.*)\]/); - if(has_brackets && has_brackets[1]){ - id = has_brackets[1]; - } - - return { - "type" : type, - 'index' : index, - 'id' : id || false - }; - }; - - if(typeof cfiStr !== "string") { - return {spinePos: -1}; - } + var cfi = {}, + chapSegment, + chapterComponent, + pathComponent, + charecterOffsetComponent, + assertion, + chapId, + path, + end, + endInt, + text, + parseStep = function(part){ + var type, index, has_brackets, id; - cfi.str = cfiStr; + type = "element"; + index = parseInt(part) / 2 - 1; + has_brackets = part.match(/\[(.*)\]/); + if(has_brackets && has_brackets[1]){ + id = has_brackets[1]; + } - if(cfiStr.indexOf("epubcfi(") === 0 && cfiStr[cfiStr.length-1] === ")") { - // Remove intial epubcfi( and ending ) - cfiStr = cfiStr.slice(8, cfiStr.length-1); - } + return { + "type" : type, + 'index' : index, + 'id' : id || false + }; + }; - chapterComponent = this.getChapterComponent(cfiStr); - pathComponent = this.getPathComponent(cfiStr) || ''; - charecterOffsetComponent = this.getCharecterOffsetComponent(cfiStr); - // Make sure this is a valid cfi or return - if(!chapterComponent) { - return {spinePos: -1}; - } - - // Chapter segment is always the second one - chapSegment = chapterComponent.split("/")[2] || ''; - if(!chapSegment) return {spinePos:-1}; + if(typeof cfiStr !== "string") { + return {spinePos: -1}; + } - cfi.spinePos = (parseInt(chapSegment) / 2 - 1 ) || 0; + cfi.str = cfiStr; - chapId = chapSegment.match(/\[(.*)\]/); + if(cfiStr.indexOf("epubcfi(") === 0 && cfiStr[cfiStr.length-1] === ")") { + // Remove intial epubcfi( and ending ) + cfiStr = cfiStr.slice(8, cfiStr.length-1); + } - cfi.spineId = chapId ? chapId[1] : false; + chapterComponent = this.getChapterComponent(cfiStr); + pathComponent = this.getPathComponent(cfiStr) || ''; + charecterOffsetComponent = this.getCharecterOffsetComponent(cfiStr); + // Make sure this is a valid cfi or return + if(!chapterComponent) { + return {spinePos: -1}; + } - if(pathComponent.indexOf(',') != -1) { - // Handle ranges -- not supported yet - console.warn("CFI Ranges are not supported"); - } + // Chapter segment is always the second one + chapSegment = chapterComponent.split("/")[2] || ''; + if(!chapSegment) return {spinePos:-1}; - path = pathComponent.split('/'); - end = path.pop(); + cfi.spinePos = (parseInt(chapSegment) / 2 - 1 ) || 0; - cfi.steps = []; + chapId = chapSegment.match(/\[(.*)\]/); - path.forEach(function(part){ - var step; - - if(part) { - step = parseStep(part); - cfi.steps.push(step); - } - }); + cfi.spineId = chapId ? chapId[1] : false; - //-- Check if END is a text node or element - endInt = parseInt(end); - if(!isNaN(endInt)) { - - if(endInt % 2 === 0) { // Even = is an element - cfi.steps.push(parseStep(end)); - } else { - cfi.steps.push({ - "type" : "text", - 'index' : (endInt - 1 ) / 2 - }); - } + if(pathComponent.indexOf(',') != -1) { + // Handle ranges -- not supported yet + console.warn("CFI Ranges are not supported"); + } - } + path = pathComponent.split('/'); + end = path.pop(); - assertion = charecterOffsetComponent.match(/\[(.*)\]/); - if(assertion && assertion[1]){ - cfi.characterOffset = parseInt(charecterOffsetComponent.split('[')[0]); - // We arent handling these assertions yet - cfi.textLocationAssertion = assertion[1]; - } else { - cfi.characterOffset = parseInt(charecterOffsetComponent); - } - - return cfi; + cfi.steps = []; + + path.forEach(function(part){ + var step; + + if(part) { + step = parseStep(part); + cfi.steps.push(step); + } + }); + + //-- Check if END is a text node or element + endInt = parseInt(end); + if(!isNaN(endInt)) { + + if(endInt % 2 === 0) { // Even = is an element + cfi.steps.push(parseStep(end)); + } else { + cfi.steps.push({ + "type" : "text", + 'index' : (endInt - 1 ) / 2 + }); + } + + } + + assertion = charecterOffsetComponent.match(/\[(.*)\]/); + if(assertion && assertion[1]){ + cfi.characterOffset = parseInt(charecterOffsetComponent.split('[')[0]); + // We arent handling these assertions yet + cfi.textLocationAssertion = assertion[1]; + } else { + cfi.characterOffset = parseInt(charecterOffsetComponent); + } + + return cfi; }; EPUBJS.EpubCFI.prototype.addMarker = function(cfi, _doc, _marker) { - var doc = _doc || document; - var marker = _marker || this.createMarker(doc); - var parent; - var lastStep; - var text; - var split; - - if(typeof cfi === 'string') { - cfi = this.parse(cfi); - } - // Get the terminal step - lastStep = cfi.steps[cfi.steps.length-1]; + var doc = _doc || document; + var marker = _marker || this.createMarker(doc); + var parent; + var lastStep; + var text; + var split; - // check spinePos - if(cfi.spinePos === -1) { - // Not a valid CFI - return false; - } + if(typeof cfi === 'string') { + cfi = this.parse(cfi); + } + // Get the terminal step + lastStep = cfi.steps[cfi.steps.length-1]; - // Find the CFI elements parent - parent = this.findParent(cfi, doc); - - if(!parent) { - // CFI didn't return an element - // Maybe it isnt in the current chapter? - return false; - } - - if(lastStep && lastStep.type === "text") { - text = parent.childNodes[lastStep.index]; - if(cfi.characterOffset){ - split = text.splitText(cfi.characterOffset); - marker.classList.add("EPUBJS-CFI-SPLIT"); - parent.insertBefore(marker, split); - } else { - parent.insertBefore(marker, text); - } - } else { - parent.insertBefore(marker, parent.firstChild); - } - - return marker; + // check spinePos + if(cfi.spinePos === -1) { + // Not a valid CFI + return false; + } + + // Find the CFI elements parent + parent = this.findParent(cfi, doc); + + if(!parent) { + // CFI didn't return an element + // Maybe it isnt in the current chapter? + return false; + } + + if(lastStep && lastStep.type === "text") { + text = parent.childNodes[lastStep.index]; + if(cfi.characterOffset){ + split = text.splitText(cfi.characterOffset); + marker.classList.add("EPUBJS-CFI-SPLIT"); + parent.insertBefore(marker, split); + } else { + parent.insertBefore(marker, text); + } + } else { + parent.insertBefore(marker, parent.firstChild); + } + + return marker; }; EPUBJS.EpubCFI.prototype.createMarker = function(_doc) { - var doc = _doc || document; - var element = doc.createElement('span'); - element.id = "EPUBJS-CFI-MARKER:"+ EPUBJS.core.uuid(); - element.classList.add("EPUBJS-CFI-MARKER"); - - return element; + var doc = _doc || document; + var element = doc.createElement('span'); + element.id = "EPUBJS-CFI-MARKER:"+ EPUBJS.core.uuid(); + element.classList.add("EPUBJS-CFI-MARKER"); + + return element; }; EPUBJS.EpubCFI.prototype.removeMarker = function(marker, _doc) { - var doc = _doc || document; - // var id = marker.id; + var doc = _doc || document; + // var id = marker.id; - // Cleanup textnodes if they were split - if(marker.classList.contains("EPUBJS-CFI-SPLIT")){ - nextSib = marker.nextSibling; - prevSib = marker.previousSibling; - if(nextSib && - prevSib && - nextSib.nodeType === 3 && - prevSib.nodeType === 3){ + // Cleanup textnodes if they were split + if(marker.classList.contains("EPUBJS-CFI-SPLIT")){ + nextSib = marker.nextSibling; + prevSib = marker.previousSibling; + if(nextSib && + prevSib && + nextSib.nodeType === 3 && + prevSib.nodeType === 3){ - prevSib.textContent += nextSib.textContent; - marker.parentNode.removeChild(nextSib); - } - marker.parentNode.removeChild(marker); - } else if(marker.classList.contains("EPUBJS-CFI-MARKER")) { - // Remove only elements added as markers - marker.parentNode.removeChild(marker); - } + prevSib.textContent += nextSib.textContent; + marker.parentNode.removeChild(nextSib); + } + marker.parentNode.removeChild(marker); + } else if(marker.classList.contains("EPUBJS-CFI-MARKER")) { + // Remove only elements added as markers + marker.parentNode.removeChild(marker); + } }; EPUBJS.EpubCFI.prototype.findParent = function(cfi, _doc) { - var doc = _doc || document, - element = doc.getElementsByTagName('html')[0], - children = Array.prototype.slice.call(element.children), - num, index, part, sections, - text, textBegin, textEnd; + var doc = _doc || document, + element = doc.getElementsByTagName('html')[0], + children = Array.prototype.slice.call(element.children), + num, index, part, sections, + text, textBegin, textEnd; - if(typeof cfi === 'string') { - cfi = this.parse(cfi); - } - - sections = cfi.steps.slice(0); // Clone steps array - if(!sections.length) { - return doc.getElementsByTagName('body')[0]; - } + if(typeof cfi === 'string') { + cfi = this.parse(cfi); + } - while(sections && sections.length > 0) { - part = sections.shift(); - // Find textNodes Parent - if(part.type === "text") { - text = element.childNodes[part.index]; - element = text.parentNode || element; - // Find element by id if present - } else if(part.id){ - element = doc.getElementById(part.id); - // Find element in parent - }else{ - element = children[part.index]; - } - // Element can't be found - if(typeof element === "undefined") { - console.error("No Element For", part, cfi.str); - return false; - } - // Get current element children and continue through steps - children = Array.prototype.slice.call(element.children); - } + sections = cfi.steps.slice(0); // Clone steps array + if(!sections.length) { + return doc.getElementsByTagName('body')[0]; + } - return element; + while(sections && sections.length > 0) { + part = sections.shift(); + // Find textNodes Parent + if(part.type === "text") { + text = element.childNodes[part.index]; + element = text.parentNode || element; + // Find element by id if present + } else if(part.id){ + element = doc.getElementById(part.id); + // Find element in parent + }else{ + element = children[part.index]; + } + // Element can't be found + if(typeof element === "undefined") { + console.error("No Element For", part, cfi.str); + return false; + } + // Get current element children and continue through steps + children = Array.prototype.slice.call(element.children); + } + + return element; }; EPUBJS.EpubCFI.prototype.compare = function(cfiOne, cfiTwo) { - if(typeof cfiOne === 'string') { - cfiOne = new EPUBJS.EpubCFI(cfiOne); - } - if(typeof cfiTwo === 'string') { - cfiTwo = new EPUBJS.EpubCFI(cfiTwo); - } - // Compare Spine Positions - if(cfiOne.spinePos > cfiTwo.spinePos) { - return 1; - } - if(cfiOne.spinePos < cfiTwo.spinePos) { - return -1; - } - - - // Compare Each Step in the First item - for (var i = 0; i < cfiOne.steps.length; i++) { - if(!cfiTwo.steps[i]) { - return 1; - } - if(cfiOne.steps[i].index > cfiTwo.steps[i].index) { - return 1; - } - if(cfiOne.steps[i].index < cfiTwo.steps[i].index) { - return -1; - } - // Otherwise continue checking - } - - // All steps in First present in Second - if(cfiOne.steps.length < cfiTwo.steps.length) { - return -1; - } + if(typeof cfiOne === 'string') { + cfiOne = new EPUBJS.EpubCFI(cfiOne); + } + if(typeof cfiTwo === 'string') { + cfiTwo = new EPUBJS.EpubCFI(cfiTwo); + } + // Compare Spine Positions + if(cfiOne.spinePos > cfiTwo.spinePos) { + return 1; + } + if(cfiOne.spinePos < cfiTwo.spinePos) { + return -1; + } - // Compare the charecter offset of the text node - if(cfiOne.characterOffset > cfiTwo.characterOffset) { - return 1; - } - if(cfiOne.characterOffset < cfiTwo.characterOffset) { - return -1; - } - // CFI's are equal - return 0; + // Compare Each Step in the First item + for (var i = 0; i < cfiOne.steps.length; i++) { + if(!cfiTwo.steps[i]) { + return 1; + } + if(cfiOne.steps[i].index > cfiTwo.steps[i].index) { + return 1; + } + if(cfiOne.steps[i].index < cfiTwo.steps[i].index) { + return -1; + } + // Otherwise continue checking + } + + // All steps in First present in Second + if(cfiOne.steps.length < cfiTwo.steps.length) { + return -1; + } + + // Compare the charecter offset of the text node + if(cfiOne.characterOffset > cfiTwo.characterOffset) { + return 1; + } + if(cfiOne.characterOffset < cfiTwo.characterOffset) { + return -1; + } + + // CFI's are equal + return 0; }; EPUBJS.EpubCFI.prototype.generateCfiFromHref = function(href, book) { - var uri = EPUBJS.core.uri(href); - var path = uri.path; - var fragment = uri.fragment; - var spinePos = book.spineIndexByURL[path]; - var loaded; - var deferred = new RSVP.defer(); - var epubcfi = new EPUBJS.EpubCFI(); - var spineItem; - - if(typeof spinePos !== "undefined"){ - spineItem = book.spine[spinePos]; - loaded = book.loadXml(spineItem.url); - loaded.then(function(doc){ - var element = doc.getElementById(fragment); - var cfi; - cfi = epubcfi.generateCfiFromElement(element, spineItem.cfiBase); - deferred.resolve(cfi); - }); - } - - return deferred.promise; + var uri = EPUBJS.core.uri(href); + var path = uri.path; + var fragment = uri.fragment; + var spinePos = book.spineIndexByURL[path]; + var loaded; + var deferred = new RSVP.defer(); + var epubcfi = new EPUBJS.EpubCFI(); + var spineItem; + + if(typeof spinePos !== "undefined"){ + spineItem = book.spine[spinePos]; + loaded = book.loadXml(spineItem.url); + loaded.then(function(doc){ + var element = doc.getElementById(fragment); + var cfi; + cfi = epubcfi.generateCfiFromElement(element, spineItem.cfiBase); + deferred.resolve(cfi); + }); + } + + return deferred.promise; }; EPUBJS.EpubCFI.prototype.generateCfiFromTextNode = function(anchor, offset, base) { - var parent = anchor.parentNode; - var steps = this.pathTo(parent); - var path = this.generatePathComponent(steps); - var index = 1 + (2 * Array.prototype.indexOf.call(parent.childNodes, anchor)); - return "epubcfi(" + base + "!" + path + "/"+index+":"+(offset || 0)+")"; + var parent = anchor.parentNode; + var steps = this.pathTo(parent); + var path = this.generatePathComponent(steps); + var index = 1 + (2 * Array.prototype.indexOf.call(parent.childNodes, anchor)); + return "epubcfi(" + base + "!" + path + "/"+index+":"+(offset || 0)+")"; }; EPUBJS.EpubCFI.prototype.generateCfiFromRangeAnchor = function(range, base) { - var anchor = range.anchorNode; - var offset = range.anchorOffset; - return this.generateCfiFromTextNode(anchor, offset, base); + var anchor = range.anchorNode; + var offset = range.anchorOffset; + return this.generateCfiFromTextNode(anchor, offset, base); }; EPUBJS.EpubCFI.prototype.generateCfiFromRange = function(range, base) { - var start, startElement, startSteps, startPath, startOffset, startIndex; - var end, endElement, endSteps, endPath, endOffset, endIndex; + var start, startElement, startSteps, startPath, startOffset, startIndex; + var end, endElement, endSteps, endPath, endOffset, endIndex; - start = range.startContainer; - - if(start.nodeType === 3) { // text node - startElement = start.parentNode; - //startIndex = 1 + (2 * Array.prototype.indexOf.call(startElement.childNodes, start)); - startIndex = 1 + (2 * EPUBJS.core.indexOfTextNode(start)); - startSteps = this.pathTo(startElement); - } else if(range.collapsed) { - return this.generateCfiFromElement(start, base); // single element - } else { - startSteps = this.pathTo(start); - } - - startPath = this.generatePathComponent(startSteps); - startOffset = range.startOffset; - - if(!range.collapsed) { - end = range.endContainer; - - if(end.nodeType === 3) { // text node - endElement = end.parentNode; - // endIndex = 1 + (2 * Array.prototype.indexOf.call(endElement.childNodes, end)); - endIndex = 1 + (2 * EPUBJS.core.indexOfTextNode(end)); - - endSteps = this.pathTo(endElement); - } else { - endSteps = this.pathTo(end); - } + start = range.startContainer; - endPath = this.generatePathComponent(endSteps); - endOffset = range.endOffset; + if(start.nodeType === 3) { // text node + startElement = start.parentNode; + //startIndex = 1 + (2 * Array.prototype.indexOf.call(startElement.childNodes, start)); + startIndex = 1 + (2 * EPUBJS.core.indexOfTextNode(start)); + startSteps = this.pathTo(startElement); + } else if(range.collapsed) { + return this.generateCfiFromElement(start, base); // single element + } else { + startSteps = this.pathTo(start); + } - return "epubcfi(" + base + "!" + startPath + "/" + startIndex + ":" + startOffset + "," + endPath + "/" + endIndex + ":" + endOffset + ")"; - - } else { - return "epubcfi(" + base + "!" + startPath + "/"+ startIndex +":"+ startOffset +")"; - } + startPath = this.generatePathComponent(startSteps); + startOffset = range.startOffset; + + if(!range.collapsed) { + end = range.endContainer; + + if(end.nodeType === 3) { // text node + endElement = end.parentNode; + // endIndex = 1 + (2 * Array.prototype.indexOf.call(endElement.childNodes, end)); + endIndex = 1 + (2 * EPUBJS.core.indexOfTextNode(end)); + + endSteps = this.pathTo(endElement); + } else { + endSteps = this.pathTo(end); + } + + endPath = this.generatePathComponent(endSteps); + endOffset = range.endOffset; + + // Remove steps present in startPath + endPath = endPath.replace(startPath, ''); + + if (endPath.length) { + endPath = endPath + "/"; + } + + return "epubcfi(" + base + "!" + startPath + "/" + startIndex + ":" + startOffset + "," + endPath + endIndex + ":" + endOffset + ")"; + + } else { + return "epubcfi(" + base + "!" + startPath + "/"+ startIndex +":"+ startOffset +")"; + } }; EPUBJS.EpubCFI.prototype.generateXpathFromSteps = function(steps) { - var xpath = [".", "*"]; + var xpath = [".", "*"]; - steps.forEach(function(step){ - var position = step.index + 1; - - if(step.id){ - xpath.push("*[position()=" + position + " and @id='" + step.id + "']"); - } else if(step.type === "text") { - xpath.push("text()[" + position + "]"); - } else { - xpath.push("*[" + position + "]"); - } - }); + steps.forEach(function(step){ + var position = step.index + 1; - return xpath.join("/"); + if(step.id){ + xpath.push("*[position()=" + position + " and @id='" + step.id + "']"); + } else if(step.type === "text") { + xpath.push("text()[" + position + "]"); + } else { + xpath.push("*[" + position + "]"); + } + }); + + return xpath.join("/"); +}; + +EPUBJS.EpubCFI.prototype.generateQueryFromSteps = function(steps) { + var query = ["html"]; + + steps.forEach(function(step){ + var position = step.index + 1; + + if(step.id){ + query.push("#" + step.id); + } else if(step.type === "text") { + // unsupported in querySelector + // query.push("text()[" + position + "]"); + } else { + query.push("*:nth-child(" + position + ")"); + } + }); + + return query.join(">"); }; EPUBJS.EpubCFI.prototype.generateRangeFromCfi = function(cfi, _doc) { - var doc = _doc || document; - var range = doc.createRange(); - var lastStep; - var xpath; - var startContainer; - var textLength; - - if(typeof cfi === 'string') { - cfi = this.parse(cfi); - } - - // check spinePos - if(cfi.spinePos === -1) { - // Not a valid CFI - return false; - } - - xpath = this.generateXpathFromSteps(cfi.steps); - - // Get the terminal step - lastStep = cfi.steps[cfi.steps.length-1]; - startContainer = doc.evaluate(xpath, doc, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + var doc = _doc || document; + var range = doc.createRange(); + var lastStep; + var xpath; + var startContainer; + var textLength; + var query; + var startContainerParent; - if(!startContainer) { - return null; - } + if(typeof cfi === 'string') { + cfi = this.parse(cfi); + } - if(startContainer && cfi.characterOffset >= 0) { - textLength = startContainer.length; + // check spinePos + if(cfi.spinePos === -1) { + // Not a valid CFI + return false; + } - if(cfi.characterOffset < textLength) { - range.setStart(startContainer, cfi.characterOffset); - range.setEnd(startContainer, textLength ); - } else { - console.debug("offset greater than length:", cfi.characterOffset, textLength); - range.setStart(startContainer, textLength - 1 ); - range.setEnd(startContainer, textLength ); - } - } else if(startContainer) { - range.selectNode(startContainer); - } - // doc.defaultView.getSelection().addRange(range); - return range; + // Get the terminal step + lastStep = cfi.steps[cfi.steps.length-1]; + + if(typeof document.evaluate != 'undefined') { + xpath = this.generateXpathFromSteps(cfi.steps); + startContainer = doc.evaluate(xpath, doc, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; + } else { + // Get the query string + query = this.generateQueryFromSteps(cfi.steps); + // Find the containing element + startContainerParent = doc.querySelector(query); + // Find the text node within that element + if(startContainerParent && lastStep.type == "text") { + startContainer = startContainerParent.childNodes[lastStep.index]; + } + } + + if(!startContainer) { + return null; + } + + if(startContainer && cfi.characterOffset >= 0) { + textLength = startContainer.length; + + if(cfi.characterOffset < textLength) { + range.setStart(startContainer, cfi.characterOffset); + range.setEnd(startContainer, textLength ); + } else { + console.debug("offset greater than length:", cfi.characterOffset, textLength); + range.setStart(startContainer, textLength - 1 ); + range.setEnd(startContainer, textLength ); + } + } else if(startContainer) { + range.selectNode(startContainer); + } + // doc.defaultView.getSelection().addRange(range); + return range; +}; + +EPUBJS.EpubCFI.prototype.isCfiString = function(target) { + if(typeof target === "string" && + target.indexOf("epubcfi(") === 0) { + return true; + } + + return false; }; EPUBJS.Events = function(obj, el){ @@ -4900,7 +5179,7 @@ EPUBJS.Events.prototype.listenUntil = function(OnEvt, OffEvt, func, bindto){ EPUBJS.hooks = {}; EPUBJS.Hooks = (function(){ function hooks(){} - + //-- Get pre-registered hooks hooks.prototype.getHooks = function(){ var plugs; @@ -4910,20 +5189,20 @@ EPUBJS.Hooks = (function(){ }, this); for (var plugType in this.hooks) { - plugs = _.values(EPUBJS.hooks[plugType]); - + plugs = EPUBJS.core.values(EPUBJS.hooks[plugType]); + plugs.forEach(function(hook){ this.registerHook(plugType, hook); }, this); } }; - - //-- Hooks allow for injecting async functions that must all complete before continuing + + //-- Hooks allow for injecting async functions that must all complete before continuing // Functions must have a callback as their first argument. hooks.prototype.registerHook = function(type, toAdd, toFront){ - + if(typeof(this.hooks[type]) != "undefined"){ - + if(typeof(toAdd) === "function"){ if(toFront) { this.hooks[type].unshift(toAdd); @@ -4940,18 +5219,49 @@ EPUBJS.Hooks = (function(){ }, this); } }else{ - //-- Allows for undefined hooks, but maybe this should error? - this.hooks[type] = [func]; + //-- Allows for undefined hooks + this.hooks[type] = [toAdd]; + + if(typeof(toAdd) === "function"){ + this.hooks[type] = [toAdd]; + }else if(Array.isArray(toAdd)){ + this.hooks[type] = []; + toAdd.forEach(function(hook){ + this.hooks[type].push(hook); + }, this); + } + } }; - + + hooks.prototype.removeHook = function(type, toRemove){ + var index; + + if(typeof(this.hooks[type]) != "undefined"){ + + if(typeof(toRemove) === "function"){ + index = this.hooks[type].indexOf(toRemove); + if (index > -1) { + this.hooks[type].splice(index, 1); + } + }else if(Array.isArray(toRemove)){ + toRemove.forEach(function(hook){ + index = this.hooks[type].indexOf(hook); + if (index > -1) { + this.hooks[type].splice(index, 1); + } + }, this); + } + } + }; + hooks.prototype.triggerHooks = function(type, callback, passed){ var hooks, count; - + if(typeof(this.hooks[type]) == "undefined") return false; - + hooks = this.hooks[type]; - + count = hooks.length; if(count === 0 && callback) { callback(); @@ -4961,12 +5271,12 @@ EPUBJS.Hooks = (function(){ count--; if(count <= 0 && callback) callback(); } - + hooks.forEach(function(hook){ hook(countdown, passed); }); }; - + return { register: function(name) { if(EPUBJS.hooks[name] === undefined) { EPUBJS.hooks[name] = {}; } @@ -4981,7 +5291,6 @@ EPUBJS.Hooks = (function(){ }; })(); - EPUBJS.Layout = EPUBJS.Layout || {}; EPUBJS.Layout.Reflowable = function(){ @@ -5109,7 +5418,7 @@ EPUBJS.Layout.Fixed = function(){ EPUBJS.Layout.Fixed.prototype.format = function(documentElement, _width, _height, _gap){ var columnWidth = EPUBJS.core.prefixed('columnWidth'); - var viewport = documentElement.querySelector("[name=viewport"); + var viewport = documentElement.querySelector("[name=viewport]"); var content; var contents; var width, height; @@ -5156,6 +5465,234 @@ EPUBJS.Layout.Fixed.prototype.calculatePages = function(){ }; }; +EPUBJS.Locations = function(spine, store) { + this.spine = spine; + this.store = store; + + this.epubcfi = new EPUBJS.EpubCFI(); + + this._locations = []; + this.total = 0; + + this.break = 150; + + this._current = 0; + +}; + +EPUBJS.Locations.prototype.generate = function(chars) { + var deferred = new RSVP.defer(); + var spinePos = -1; + var spineLength = this.spine.length; + var nextChapter = function(deferred){ + var chapter; + var next = spinePos + 1; + var done = deferred || new RSVP.defer(); + var loaded; + if(next >= spineLength) { + done.resolve(); + } else { + spinePos = next; + chapter = new EPUBJS.Chapter(this.spine[spinePos], this.store); + + this.process(chapter).then(function() { + // Load up the next chapter + setTimeout(function(){ + nextChapter(done); + }, 1); + + }); + } + return done.promise; + }.bind(this); + + var finished = nextChapter().then(function(){ + this.total = this._locations.length-1; + + if (this._currentCfi) { + this.currentLocation = this._currentCfi; + } + deferred.resolve(this._locations); + }.bind(this)); + + return deferred.promise; +}; + +EPUBJS.Locations.prototype.process = function(chapter) { + return chapter.load(this.request) + .then(function(_doc) { + + var range; + var doc = _doc; + var contents = doc.documentElement.querySelector("body"); + var counter = 0; + var prev; + + this.sprint(contents, function(node) { + var len = node.length; + var dist; + var pos = 0; + + // Start range + if (counter === 0) { + range = doc.createRange(); + range.setStart(node, 0); + } + + dist = this.break - counter; + + // Node is smaller than a break + if(dist > len){ + counter += len; + pos = len; + } + + while (pos < len) { + counter = this.break; + pos += this.break; + + // Gone over + if(pos >= len){ + // Continue counter for next node + counter = len - (pos - this.break); + + // At End + } else { + // End the previous range + range.setEnd(node, pos); + cfi = chapter.cfiFromRange(range); + this._locations.push(cfi); + counter = 0; + + // Start new range + pos += 1; + range = doc.createRange(); + range.setStart(node, pos); + } + + } + + prev = node; + + }.bind(this)); + + // Close remaining + if (range) { + range.setEnd(prev, prev.length); + cfi = chapter.cfiFromRange(range); + this._locations.push(cfi); + counter = 0; + } + + }.bind(this)); + +}; + +EPUBJS.Locations.prototype.sprint = function(root, func) { + var treeWalker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT, null, false); + + while ((node = treeWalker.nextNode())) { + func(node); + } + +}; + +EPUBJS.Locations.prototype.locationFromCfi = function(cfi){ + // Check if the location has not been set yet + if(this._locations.length === 0) { + return -1; + } + + return EPUBJS.core.locationOf(cfi, this._locations, this.epubcfi.compare); +}; + +EPUBJS.Locations.prototype.percentageFromCfi = function(cfi) { + // Find closest cfi + var loc = this.locationFromCfi(cfi); + // Get percentage in total + return this.percentageFromLocation(loc); +}; + +EPUBJS.Locations.prototype.percentageFromLocation = function(loc) { + if (!loc || !this.total) { + return 0; + } + return (loc / this.total); +}; + +EPUBJS.Locations.prototype.cfiFromLocation = function(loc){ + var cfi = -1; + // check that pg is an int + if(typeof loc != "number"){ + loc = parseInt(loc); + } + + if(loc >= 0 && loc < this._locations.length) { + cfi = this._locations[loc]; + } + + return cfi; +}; + +EPUBJS.Locations.prototype.cfiFromPercentage = function(value){ + var percentage = (value > 1) ? value / 100 : value; // Normalize value to 0-1 + var loc = Math.ceil(this.total * percentage); + + return this.cfiFromLocation(loc); +}; + +EPUBJS.Locations.prototype.load = function(locations){ + this._locations = JSON.parse(locations); + this.total = this._locations.length-1; + return this._locations; +}; + +EPUBJS.Locations.prototype.save = function(json){ + return JSON.stringify(this._locations); +}; + +EPUBJS.Locations.prototype.getCurrent = function(json){ + return this._current; +}; + +EPUBJS.Locations.prototype.setCurrent = function(curr){ + var loc; + + if(typeof curr == "string"){ + this._currentCfi = curr; + } else if (typeof curr == "number") { + this._current = curr; + } else { + return; + } + + if(this._locations.length === 0) { + return; + } + + if(typeof curr == "string"){ + loc = this.locationFromCfi(curr); + this._current = loc; + } else { + loc = curr; + } + + this.trigger("changed", { + percentage: this.percentageFromLocation(loc) + }); +}; + +Object.defineProperty(EPUBJS.Locations.prototype, 'currentLocation', { + get: function () { + return this._current; + }, + set: function (curr) { + this.setCurrent(curr); + } +}); + +RSVP.EventTarget.mixin(EPUBJS.Locations.prototype); + EPUBJS.Pagination = function(pageList) { this.pages = []; this.locations = []; @@ -5251,19 +5788,19 @@ EPUBJS.Parser = function(baseUrl){ EPUBJS.Parser.prototype.container = function(containerXml){ //-- var rootfile, fullpath, folder, encoding; - + if(!containerXml) { console.error("Container File Not Found"); return; } - + rootfile = containerXml.querySelector("rootfile"); - + if(!rootfile) { console.error("No RootFile Found"); return; } - + fullpath = rootfile.getAttribute('full-path'); folder = EPUBJS.core.uri(fullpath).directory; encoding = containerXml.xmlEncoding; @@ -5278,19 +5815,19 @@ EPUBJS.Parser.prototype.container = function(containerXml){ EPUBJS.Parser.prototype.identifier = function(packageXml){ var metadataNode; - + if(!packageXml) { console.error("Package File Not Found"); return; } - + metadataNode = packageXml.querySelector("metadata"); - + if(!metadataNode) { console.error("No Metadata Found"); return; } - + return this.getElementText(metadataNode, "identifier"); }; @@ -5301,48 +5838,53 @@ EPUBJS.Parser.prototype.packageContents = function(packageXml, baseUrl){ var spineNodeIndex; var spine; var spineIndexByURL; - + var metadata; + if(baseUrl) this.baseUrl = baseUrl; - + if(!packageXml) { console.error("Package File Not Found"); return; } - + metadataNode = packageXml.querySelector("metadata"); if(!metadataNode) { console.error("No Metadata Found"); return; } - + manifestNode = packageXml.querySelector("manifest"); if(!manifestNode) { console.error("No Manifest Found"); return; } - + spineNode = packageXml.querySelector("spine"); if(!spineNode) { console.error("No Spine Found"); return; } - + manifest = parse.manifest(manifestNode); navPath = parse.findNavPath(manifestNode); tocPath = parse.findTocPath(manifestNode, spineNode); coverPath = parse.findCoverPath(manifestNode); spineNodeIndex = Array.prototype.indexOf.call(spineNode.parentNode.childNodes, spineNode); - + spine = parse.spine(spineNode, manifest); - + spineIndexByURL = {}; spine.forEach(function(item){ spineIndexByURL[item.href] = item.index; }); + metadata = parse.metadata(metadataNode); + + metadata.direction = spineNode.getAttribute("page-progression-direction"); + return { - 'metadata' : parse.metadata(metadataNode), + 'metadata' : metadata, 'spine' : spine, 'manifest' : manifest, 'navPath' : navPath, @@ -5365,9 +5907,9 @@ EPUBJS.Parser.prototype.findNavPath = function(manifestNode){ EPUBJS.Parser.prototype.findTocPath = function(manifestNode, spineNode){ var node = manifestNode.querySelector("item[media-type='application/x-dtbncx+xml']"); var tocId; - + // If we can't find the toc by media-type then try to look for id of the item in the spine attributes as - // according to http://www.idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.4.1.2, + // according to http://www.idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.4.1.2, // "The item that describes the NCX must be referenced by the spine toc attribute." if (!node) { tocId = spineNode.getAttribute("toc"); @@ -5375,7 +5917,7 @@ EPUBJS.Parser.prototype.findTocPath = function(manifestNode, spineNode){ node = manifestNode.querySelector("item[id='" + tocId + "']"); } } - + return node ? node.getAttribute('href') : false; }; @@ -5389,25 +5931,24 @@ EPUBJS.Parser.prototype.findCoverPath = function(manifestNode){ EPUBJS.Parser.prototype.metadata = function(xml){ var metadata = {}, p = this; - + metadata.bookTitle = p.getElementText(xml, 'title'); metadata.creator = p.getElementText(xml, 'creator'); metadata.description = p.getElementText(xml, 'description'); - + metadata.pubdate = p.getElementText(xml, 'date'); - + metadata.publisher = p.getElementText(xml, 'publisher'); - + metadata.identifier = p.getElementText(xml, "identifier"); metadata.language = p.getElementText(xml, "language"); metadata.rights = p.getElementText(xml, "rights"); - + metadata.modified_date = p.querySelectorText(xml, "meta[property='dcterms:modified']"); metadata.layout = p.querySelectorText(xml, "meta[property='rendition:layout']"); metadata.orientation = p.querySelectorText(xml, "meta[property='rendition:orientation']"); metadata.spread = p.querySelectorText(xml, "meta[property='rendition:spread']"); - // metadata.page_prog_dir = packageXml.querySelector("spine").getAttribute("page-progression-direction"); - + return metadata; }; @@ -5416,7 +5957,7 @@ EPUBJS.Parser.prototype.getElementText = function(xml, tag){ el; if(!found || found.length === 0) return ''; - + el = found[0]; if(el.childNodes.length){ @@ -5424,7 +5965,7 @@ EPUBJS.Parser.prototype.getElementText = function(xml, tag){ } return ''; - + }; EPUBJS.Parser.prototype.querySelectorText = function(xml, q){ @@ -5440,34 +5981,34 @@ EPUBJS.Parser.prototype.querySelectorText = function(xml, q){ EPUBJS.Parser.prototype.manifest = function(manifestXml){ var baseUrl = this.baseUrl, manifest = {}; - + //-- Turn items into an array var selected = manifestXml.querySelectorAll("item"), items = Array.prototype.slice.call(selected); - + //-- Create an object with the id as key items.forEach(function(item){ var id = item.getAttribute('id'), href = item.getAttribute('href') || '', type = item.getAttribute('media-type') || '', properties = item.getAttribute('properties') || ''; - + manifest[id] = { 'href' : href, 'url' : baseUrl + href, //-- Absolute URL for loading with a web worker 'type' : type, 'properties' : properties }; - + }); - + return manifest; }; EPUBJS.Parser.prototype.spine = function(spineXml, manifest){ var spine = []; - + var selected = spineXml.getElementsByTagName("itemref"), items = Array.prototype.slice.call(selected); @@ -5496,20 +6037,20 @@ EPUBJS.Parser.prototype.spine = function(spineXml, manifest){ }; spine.push(vert); }); - + return spine; }; EPUBJS.Parser.prototype.nav = function(navHtml, spineIndexByURL, bookSpine){ var navEl = navHtml.querySelector('nav[*|type="toc"]'), //-- [*|type="toc"] * Doesn't seem to work idCounter = 0; - + if(!navEl) return []; - + // Implements `> ol > li` function findListItems(parent){ var items = []; - + Array.prototype.slice.call(parent.childNodes).forEach(function(node){ if('ol' == node.tagName){ Array.prototype.slice.call(node.childNodes).forEach(function(item){ @@ -5519,33 +6060,33 @@ EPUBJS.Parser.prototype.nav = function(navHtml, spineIndexByURL, bookSpine){ }); } }); - + return items; - + } - + // Implements `> a, > span` function findAnchorOrSpan(parent){ var item = null; - + Array.prototype.slice.call(parent.childNodes).forEach(function(node){ if('a' == node.tagName || 'span' == node.tagName){ item = node; } }); - + return item; } - + function getTOC(parent){ var list = [], nodes = findListItems(parent), items = Array.prototype.slice.call(nodes), length = items.length, node; - + if(length === 0) return false; - + items.forEach(function(item){ var id = item.getAttribute('id') || false, content = findAnchorOrSpan(item), @@ -5557,7 +6098,7 @@ EPUBJS.Parser.prototype.nav = function(navHtml, spineIndexByURL, bookSpine){ spinePos = spineIndexByURL[baseUrl], spineItem = bookSpine[spinePos], cfi = spineItem ? spineItem.cfi : ''; - + if(!id) { if(spinePos) { spineItem = bookSpine[spinePos]; @@ -5567,7 +6108,7 @@ EPUBJS.Parser.prototype.nav = function(navHtml, spineIndexByURL, bookSpine){ id = 'epubjs-autogen-toc-id-' + (idCounter++); } } - + item.setAttribute('id', id); // Ensure all elements have an id list.push({ "id": id, @@ -5577,24 +6118,24 @@ EPUBJS.Parser.prototype.nav = function(navHtml, spineIndexByURL, bookSpine){ "parent" : parent ? parent.getAttribute('id') : null, "cfi" : cfi }); - + }); - + return list; } - + return getTOC(navEl); }; EPUBJS.Parser.prototype.toc = function(tocXml, spineIndexByURL, bookSpine){ var navMap = tocXml.querySelector("navMap"); if(!navMap) return []; - + function getTOC(parent){ var list = [], snapshot = tocXml.evaluate("*[local-name()='navPoint']", parent, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null), length = snapshot.snapshotLength; - + if(length === 0) return []; for ( var i=length-1 ; i >= 0; i-- ) { @@ -5645,11 +6186,11 @@ EPUBJS.Parser.prototype.pageList = function(navHtml, spineIndexByURL, bookSpine) idCounter = 0; if(!navEl) return []; - + // Implements `> ol > li` function findListItems(parent){ var items = []; - + Array.prototype.slice.call(parent.childNodes).forEach(function(node){ if('ol' == node.tagName){ Array.prototype.slice.call(node.childNodes).forEach(function(item){ @@ -5659,33 +6200,33 @@ EPUBJS.Parser.prototype.pageList = function(navHtml, spineIndexByURL, bookSpine) }); } }); - + return items; - + } - + // Implements `> a, > span` function findAnchorOrSpan(parent){ var item = null; - + Array.prototype.slice.call(parent.childNodes).forEach(function(node){ if('a' == node.tagName || 'span' == node.tagName){ item = node; } }); - + return item; } - + function getPages(parent){ var list = [], nodes = findListItems(parent), items = Array.prototype.slice.call(nodes), length = items.length, node; - + if(length === 0) return false; - + items.forEach(function(item){ var id = item.getAttribute('id') || false, content = findAnchorOrSpan(item), @@ -5696,7 +6237,7 @@ EPUBJS.Parser.prototype.pageList = function(navHtml, spineIndexByURL, bookSpine) split, packageUrl, cfi; - + if(isCfi != -1) { split = href.split("#"); packageUrl = split[0]; @@ -5715,10 +6256,10 @@ EPUBJS.Parser.prototype.pageList = function(navHtml, spineIndexByURL, bookSpine) } }); - + return list; } - + return getPages(navEl); }; @@ -5731,6 +6272,9 @@ EPUBJS.Render.Iframe = function() { this.leftPos = 0; this.pageWidth = 0; + + this.isMobile = navigator.userAgent.match(/(iPad|iPhone|iPod|Mobile|Android)/g); + this.transform = EPUBJS.core.prefixed('transform'); }; //-- Build up any html needed @@ -5741,74 +6285,103 @@ EPUBJS.Render.Iframe.prototype.create = function(){ this.iframe.seamless = "seamless"; // Back up if seamless isn't supported this.iframe.style.border = "none"; - + this.iframe.addEventListener("load", this.loaded.bind(this), false); return this.iframe; }; /** * Sets the source of the iframe with the given URL string -* Takes: URL string +* Takes: Document Contents String * Returns: promise with document element */ -EPUBJS.Render.Iframe.prototype.load = function(chapter){ +EPUBJS.Render.Iframe.prototype.load = function(contents, url){ var render = this, deferred = new RSVP.defer(); - - chapter.url().then(function(url){ + + if(this.window) { + this.unload(); + } + + this.iframe.onload = function(e) { + var title; + + render.document = render.iframe.contentDocument; + render.docEl = render.document.documentElement; + render.headEl = render.document.head; + render.bodyEl = render.document.body || render.document.querySelector("body"); + render.window = render.iframe.contentWindow; + + render.window.addEventListener("resize", render.resized.bind(render), false); + // Reset the scroll position render.leftPos = 0; - - if(this.window) { - this.unload(); + render.setLeft(0); + + //-- Clear Margins + if(render.bodyEl) { + render.bodyEl.style.margin = "0"; } - - this.iframe.onload = function(e) { - render.document = render.iframe.contentDocument; - render.docEl = render.document.documentElement; - render.headEl = render.document.head; - render.bodyEl = render.document.body || render.document.querySelector("body"); - render.window = render.iframe.contentWindow; - - render.window.addEventListener("resize", render.resized.bind(render), false); - - //-- Clear Margins - if(render.bodyEl) { - render.bodyEl.style.margin = "0"; - } - - deferred.resolve(render.docEl); - }; - - this.iframe.onerror = function(e) { - //console.error("Error Loading Contents", e); - deferred.reject({ - message : "Error Loading Contents: " + e, - stack : new Error().stack - }); - }; - - this.iframe.contentWindow.location.replace(url); - - }.bind(this)); - + + // HTML element must have direction set if RTL or columnns will + // not be in the correct direction in Firefox + // Firefox also need the html element to be position right + if(render.direction == "rtl" && render.docEl.dir != "rtl"){ + render.docEl.dir = "rtl"; + render.docEl.style.position = "absolute"; + render.docEl.style.right = "0"; + } + + deferred.resolve(render.docEl); + }; + + this.iframe.onerror = function(e) { + //console.error("Error Loading Contents", e); + deferred.reject({ + message : "Error Loading Contents: " + e, + stack : new Error().stack + }); + }; + + // this.iframe.contentWindow.location.replace(url); + this.document = this.iframe.contentDocument; + + if(!this.document) { + deferred.reject(new Error("No Document Available")); + return deferred; + } + + this.document.open(); + this.document.write(contents); + this.document.close(); + return deferred.promise; }; EPUBJS.Render.Iframe.prototype.loaded = function(v){ var url = this.iframe.contentWindow.location.href; + var baseEl, base; + + this.document = this.iframe.contentDocument; + this.docEl = this.document.documentElement; + this.headEl = this.document.head; + this.bodyEl = this.document.body || this.document.querySelector("body"); + this.window = this.iframe.contentWindow; + if(url != "about:blank"){ - this.trigger("render:loaded", url); + baseEl = this.iframe.contentDocument.querySelector("base"); + base = baseEl.getAttribute('href'); + this.trigger("render:loaded", base); } }; // Resize the iframe to the given width and height EPUBJS.Render.Iframe.prototype.resize = function(width, height){ var iframeBox; - + if(!this.iframe) return; - + this.iframe.height = height; if(!isNaN(width) && width % 2 !== 0){ @@ -5844,11 +6417,30 @@ EPUBJS.Render.Iframe.prototype.setPageDimensions = function(pageWidth, pageHeigh // this.docEl.style.width = this.docEl.scrollWidth + pageWidth + "px"; }; +EPUBJS.Render.Iframe.prototype.setDirection = function(direction){ + + this.direction = direction; + + // Undo previous changes if needed + if(this.docEl && this.docEl.dir == "rtl"){ + this.docEl.dir = "rtl"; + this.docEl.style.position = "static"; + this.docEl.style.right = "auto"; + } + +}; + EPUBJS.Render.Iframe.prototype.setLeft = function(leftPos){ // this.bodyEl.style.marginLeft = -leftPos + "px"; // this.docEl.style.marginLeft = -leftPos + "px"; // this.docEl.style[EPUBJS.Render.Iframe.transform] = 'translate('+ (-leftPos) + 'px, 0)'; - this.document.defaultView.scrollTo(leftPos, 0); + + if (this.isMobile) { + this.docEl.style[this.transform] = 'translate('+ (-leftPos) + 'px, 0)'; + } else { + this.document.defaultView.scrollTo(leftPos, 0); + } + }; EPUBJS.Render.Iframe.prototype.setStyle = function(style, val, prefixed){ @@ -5869,7 +6461,7 @@ EPUBJS.Render.Iframe.prototype.addHeadTag = function(tag, attrs, _doc) { var doc = _doc || this.document; var tagEl = doc.createElement(tag); var headEl = doc.head; - + for(var attr in attrs) { tagEl.setAttribute(attr, attrs[attr]); } @@ -5879,6 +6471,12 @@ EPUBJS.Render.Iframe.prototype.addHeadTag = function(tag, attrs, _doc) { EPUBJS.Render.Iframe.prototype.page = function(pg){ this.leftPos = this.pageWidth * (pg-1); //-- pages start at 1 + + // Reverse for rtl langs + if(this.direction === "rtl"){ + this.leftPos = this.leftPos * -1; + } + this.setLeft(this.leftPos); }; @@ -5888,9 +6486,9 @@ EPUBJS.Render.Iframe.prototype.getPageNumberByElement = function(el){ if(!el) return; left = this.leftPos + el.getBoundingClientRect().left; //-- Calculate left offset compaired to scrolled position - + pg = Math.floor(left / this.pageWidth) + 1; //-- pages start at 1 - + return pg; }; @@ -5900,7 +6498,7 @@ EPUBJS.Render.Iframe.prototype.getPageNumberByRect = function(boundingClientRect left = this.leftPos + boundingClientRect.left; //-- Calculate left offset compaired to scrolled position pg = Math.floor(left / this.pageWidth) + 1; //-- pages start at 1 - + return pg; }; @@ -5909,6 +6507,11 @@ EPUBJS.Render.Iframe.prototype.getBaseElement = function(){ return this.bodyEl; }; +// Return the document element +EPUBJS.Render.Iframe.prototype.getDocumentElement = function(){ + return this.docEl; +}; + // Checks if an element is on the screen EPUBJS.Render.Iframe.prototype.isElementVisible = function(el){ var rect; @@ -5944,6 +6547,7 @@ EPUBJS.Render.Iframe.prototype.unload = function(){ //-- Enable binding events to Render RSVP.EventTarget.mixin(EPUBJS.Render.Iframe.prototype); + EPUBJS.Renderer = function(renderMethod, hidden) { // Dom events to listen for this.listenedEvents = ["keydown", "keyup", "keypressed", "mouseup", "mousedown", "click"]; @@ -5975,7 +6579,7 @@ EPUBJS.Renderer = function(renderMethod, hidden) { this.spreads = true; this.isForcedSingle = false; - this.resized = _.debounce(this.onResized.bind(this), 100); + this.resized = this.onResized.bind(this); this.layoutSettings = {}; @@ -5988,7 +6592,7 @@ EPUBJS.Renderer = function(renderMethod, hidden) { //-- Queue up page changes if page map isn't ready this._q = EPUBJS.core.queue(this); - + this._moving = false; }; @@ -6033,7 +6637,7 @@ EPUBJS.Renderer.prototype.initialize = function(element, width, height){ } else { this.render.resize('100%', '100%'); } - + document.addEventListener("orientationchange", this.onResized); }; @@ -6050,17 +6654,17 @@ EPUBJS.Renderer.prototype.displayChapter = function(chapter, globalLayout){ } this._moving = true; // Get the url string from the chapter (may be from storage) - return chapter.url(). - then(function(url) { - + return chapter.render(). + then(function(contents) { + // Unload the previous chapter listener if(this.currentChapter) { this.currentChapter.unload(); // Remove stored blobs - + if(this.render.window){ this.render.window.removeEventListener("resize", this.resized); } - + this.removeEventListeners(); this.removeSelectionListeners(); this.trigger("renderer:chapterUnloaded"); @@ -6068,13 +6672,16 @@ EPUBJS.Renderer.prototype.displayChapter = function(chapter, globalLayout){ this.doc = null; this.pageMap = null; } - + this.currentChapter = chapter; + this.chapterPos = 1; + this.currentChapterCfiBase = chapter.cfiBase; this.layoutSettings = this.reconcileLayoutSettings(globalLayout, chapter.properties); - return this.load(chapter); + + return this.load(contents, chapter.href); }.bind(this)); @@ -6086,7 +6693,7 @@ EPUBJS.Renderer.prototype.displayChapter = function(chapter, globalLayout){ * Returns: Promise with the rendered contents. */ -EPUBJS.Renderer.prototype.load = function(url){ +EPUBJS.Renderer.prototype.load = function(contents, url){ var deferred = new RSVP.defer(); var loaded; @@ -6096,49 +6703,22 @@ EPUBJS.Renderer.prototype.load = function(url){ this.visible(false); - render = this.render.load(url); + render = this.render.load(contents, url); render.then(function(contents) { - var formated; - this.currentChapter.setDocument(this.render.document); - this.contents = contents; - this.doc = this.render.document; - // Format the contents using the current layout method - this.formated = this.layout.format(contents, this.render.width, this.render.height, this.gap); - this.render.setPageDimensions(this.formated.pageWidth, this.formated.pageHeight); - - // window.addEventListener("orientationchange", this.onResized.bind(this), false); - if(!this.initWidth && !this.initHeight){ - this.render.window.addEventListener("resize", this.resized, false); - } - - this.addEventListeners(); - this.addSelectionListeners(); + this.afterLoad(contents); //-- Trigger registered hooks before displaying this.beforeDisplay(function(){ - var pages = this.layout.calculatePages(); - var msg = this.currentChapter; - var queued = this._q.length(); - this._moving = false; - this.updatePages(pages); - - this.visibleRangeCfi = this.getVisibleRangeCfi(); - this.currentLocationCfi = this.visibleRangeCfi.start; + this.afterDisplay(); - if(queued === 0) { - this.trigger("renderer:locationChanged", this.currentLocationCfi); - this.trigger("renderer:visibleRangeChanged", this.visibleRangeCfi); - } - - msg.cfi = this.currentLocationCfi; //TODO: why is this cfi passed to chapterDisplayed - this.trigger("renderer:chapterDisplayed", msg); - this.visible(true); - + + deferred.resolve(this); //-- why does this return the renderer? + }.bind(this)); }.bind(this)); @@ -6146,6 +6726,48 @@ EPUBJS.Renderer.prototype.load = function(url){ return deferred.promise; }; +EPUBJS.Renderer.prototype.afterLoad = function(contents) { + var formated; + this.currentChapter.setDocument(this.render.document); + this.contents = contents; + this.doc = this.render.document; + + // Format the contents using the current layout method + this.formated = this.layout.format(contents, this.render.width, this.render.height, this.gap); + this.render.setPageDimensions(this.formated.pageWidth, this.formated.pageHeight); + + // window.addEventListener("orientationchange", this.onResized.bind(this), false); + if(!this.initWidth && !this.initHeight){ + this.render.window.addEventListener("resize", this.resized, false); + } + + this.addEventListeners(); + this.addSelectionListeners(); + +}; + +EPUBJS.Renderer.prototype.afterDisplay = function(contents) { + + var pages = this.layout.calculatePages(); + var msg = this.currentChapter; + var queued = this._q.length(); + this._moving = false; + + this.updatePages(pages); + + this.visibleRangeCfi = this.getVisibleRangeCfi(); + this.currentLocationCfi = this.visibleRangeCfi.start; + + if(queued === 0) { + this.trigger("renderer:locationChanged", this.currentLocationCfi); + this.trigger("renderer:visibleRangeChanged", this.visibleRangeCfi); + } + + msg.cfi = this.currentLocationCfi; //TODO: why is this cfi passed to chapterDisplayed + this.trigger("renderer:chapterDisplayed", msg); + +}; + EPUBJS.Renderer.prototype.loaded = function(url){ this.trigger("render:loaded", url); // var uri = EPUBJS.core.uri(url); @@ -6235,10 +6857,10 @@ EPUBJS.Renderer.prototype.updatePages = function(layout){ } else { this.displayedPages = this.pageMap.length; } - + // this.currentChapter.pages = layout.pageCount; this.currentChapter.pages = this.pageMap.length; - + this._q.flush(); }; @@ -6256,18 +6878,17 @@ EPUBJS.Renderer.prototype.reformat = function(){ this.layoutMethod = this.determineLayout(this.layoutSettings); this.layout = new EPUBJS.Layout[this.layoutMethod](); } - + // Reset pages this.chapterPos = 1; - this.render.page(1); + this.render.page(this.chapterPos); // Give the css styles time to update // clearTimeout(this.timeoutTillCfi); // this.timeoutTillCfi = setTimeout(function(){ - - renderer.formated = renderer.layout.format(renderer.contents, renderer.render.width, renderer.render.height, renderer.gap); + renderer.formated = renderer.layout.format(renderer.render.docEl, renderer.render.width, renderer.render.height, renderer.gap); renderer.render.setPageDimensions(renderer.formated.pageWidth, renderer.formated.pageHeight); - + pages = renderer.layout.calculatePages(); renderer.updatePages(pages); @@ -6391,12 +7012,16 @@ EPUBJS.Renderer.prototype.lastPage = function(){ if(this._moving) { return this._q.enqueue("lastPage", arguments); } - + this.page(this.displayedPages); }; // Jump to the first page of the chapter EPUBJS.Renderer.prototype.firstPage = function(){ + if(this._moving) { + return this._q.enqueue("firstPage", arguments); + } + this.page(1); }; @@ -6424,6 +7049,15 @@ EPUBJS.Renderer.prototype.firstElementisTextNode = function(node) { return false; }; +EPUBJS.Renderer.prototype.isGoodNode = function(node) { + var embeddedElements = ["audio", "canvas", "embed", "iframe", "img", "math", "object", "svg", "video"]; + if (embeddedElements.indexOf(node.tagName.toLowerCase()) !== -1) { + // Embedded elements usually do not have a text node as first element, but are also good nodes + return true; + } + return this.firstElementisTextNode(node); +}; + // Walk the node tree from a start element to next visible element EPUBJS.Renderer.prototype.walk = function(node, x, y) { var r, children, leng, @@ -6435,7 +7069,7 @@ EPUBJS.Renderer.prototype.walk = function(node, x, y) { while(!r && stack.length) { node = stack.shift(); - if( this.containsPoint(node, x, y) && this.firstElementisTextNode(node)) { + if( this.containsPoint(node, x, y) && this.isGoodNode(node)) { r = node; } @@ -6538,7 +7172,7 @@ EPUBJS.Renderer.prototype.mapPage = function(){ if(!elPos || (elPos.width === 0 && elPos.height === 0)) { return; } - + //-- Element starts new Col if(elPos.left > elLimit) { children.forEach(function(node){ @@ -6548,7 +7182,7 @@ EPUBJS.Renderer.prototype.mapPage = function(){ } }); } - + //-- Element Spans new Col if(elPos.right > elLimit) { children.forEach(function(node){ @@ -6589,7 +7223,7 @@ EPUBJS.Renderer.prototype.mapPage = function(){ start: cfi, end: null }); - + page += 1; limit = (width * page) - offset; elLimit = limit; @@ -6600,8 +7234,24 @@ EPUBJS.Renderer.prototype.mapPage = function(){ }; + var docEl = this.render.getDocumentElement(); + var dir = docEl.dir; + + // Set back to ltr before sprinting to get correct order + if(dir == "rtl") { + docEl.dir = "ltr"; + docEl.style.position = "static"; + } this.sprint(root, check); + + // Reset back to previous RTL settings + if(dir == "rtl") { + docEl.dir = dir; + docEl.style.left = "auto"; + docEl.style.right = "0"; + } + // this.textSprint(root, checkText); if(prevRange){ @@ -6618,7 +7268,7 @@ EPUBJS.Renderer.prototype.mapPage = function(){ range.collapse(true); cfi = renderer.currentChapter.cfiFromRange(range); - + map.push({ start: cfi, end: cfi }); } @@ -6637,17 +7287,17 @@ EPUBJS.Renderer.prototype.indexOfBreakableChar = function (text, startPosition) var whiteCharacters = "\x2D\x20\t\r\n\b\f"; // '-' \x2D // ' ' \x20 - + if (! startPosition) { startPosition = 0; } - + for (var i = startPosition; i < text.length; i++) { if (whiteCharacters.indexOf(text.charAt(i)) != -1) { return i; } } - + return -1; }; @@ -6659,7 +7309,7 @@ EPUBJS.Renderer.prototype.splitTextNodeIntoWordsRanges = function(node){ var rect; var list; // jaroslaw.bielski@7bulls.com - // Usage of indexOf() function for space character as word delimiter + // Usage of indexOf() function for space character as word delimiter // is not sufficient in case of other breakable characters like \r\n- etc pos = this.indexOfBreakableChar(text); @@ -6895,12 +7545,12 @@ EPUBJS.Renderer.prototype.gotoCfi = function(cfi){ var pg; var marker; var range; - + if(this._moving){ return this._q.enqueue("gotoCfi", arguments); } - - if(_.isString(cfi)){ + + if(EPUBJS.core.isString(cfi)){ cfi = this.epubcfi.parse(cfi); } @@ -6923,16 +7573,19 @@ EPUBJS.Renderer.prototype.gotoCfi = function(cfi){ var rect = range.getBoundingClientRect(); if (rect) { pg = this.render.getPageNumberByRect(rect); - - } else { + + } else { // Goto first page in chapter pg = 1; } this.page(pg); - + // Reset the current location cfi to requested cfi this.currentLocationCfi = cfi.str; + } else { + // Failed to find a range, go to first page + this.page(1); } } }; @@ -7090,6 +7743,11 @@ EPUBJS.Renderer.prototype.setGap = function(gap){ this.gap = gap; //-- False == auto gap }; +EPUBJS.Renderer.prototype.setDirection = function(direction){ + this.direction = direction; + this.render.setDirection(this.direction); +}; + //-- Content Replacements EPUBJS.Renderer.prototype.replace = function(query, func, finished, progress){ @@ -7119,80 +7777,6 @@ EPUBJS.Renderer.prototype.replace = function(query, func, finished, progress){ }; -EPUBJS.Renderer.prototype.replaceWithStored = function(query, attr, func, callback) { - var _oldUrls, - _newUrls = {}, - _store = this.currentChapter.store, - _cache = this.caches[query], - _uri = EPUBJS.core.uri(this.currentChapter.absolute), - _chapterBase = _uri.base, - _attr = attr, - _wait = 2000, - progress = function(url, full, count) { - _newUrls[full] = url; - }, - finished = function(notempty) { - if(callback) callback(); - - _.each(_oldUrls, function(url){ - _store.revokeUrl(url); - }); - - _cache = _newUrls; - }; - - if(!_store) return; - - if(!_cache) _cache = {}; - _oldUrls = _.clone(_cache); - - this.replace(query, function(link, done){ - var src = link.getAttribute(_attr), - full = EPUBJS.core.resolveUrl(_chapterBase, src); - - var replaceUrl = function(url) { - var timeout; - link.onload = function(){ - clearTimeout(timeout); - done(url, full); - }; - - link.onerror = function(e){ - clearTimeout(timeout); - done(url, full); - console.error(e); - }; - - if(query == "image") { - //-- SVG needs this to trigger a load event - link.setAttribute("externalResourcesRequired", "true"); - } - - if(query == "link[href]" && link.getAttribute("rel") !== "stylesheet") { - //-- Only Stylesheet links seem to have a load events, just continue others - done(url, full); - } - - link.setAttribute(_attr, url); - - //-- If elements never fire Load Event, should continue anyways - timeout = setTimeout(function(){ - done(url, full); - }, _wait); - - }; - - if(full in _oldUrls){ - replaceUrl(_oldUrls[full]); - _newUrls[full] = _oldUrls[full]; - delete _oldUrls[full]; - }else{ - func(_store, full, replaceUrl, link); - } - - }, finished, progress); -}; - //-- Enable binding events to Renderer RSVP.EventTarget.mixin(EPUBJS.Renderer.prototype); @@ -7214,13 +7798,24 @@ EPUBJS.replace.hrefs = function(callback, renderer){ link.setAttribute("target", "_blank"); }else{ - // Links may need to be resolved, such as ../chp1.xhtml - directory = EPUBJS.core.uri(renderer.render.window.location.href).directory; - if(directory) { - relative = EPUBJS.core.resolveUrl(directory, href); - } else { - relative = href; - } + // Links may need to be resolved, such as ../chp1.xhtml + var uri = EPUBJS.core.uri(renderer.render.window.location.href); + + directory = uri.directory; + + if(directory) { + // We must ensure that the file:// protocol is preserved for + // local file links, as in certain contexts (such as under + // Titanium), file links without the file:// protocol will not + // work + if (uri.protocol === "file") { + relative = EPUBJS.core.resolveUrl(uri.base, href); + } else { + relative = EPUBJS.core.resolveUrl(directory, href); + } + } else { + relative = href; + } link.onclick = function(){ book.goto(relative); @@ -7231,7 +7826,7 @@ EPUBJS.replace.hrefs = function(callback, renderer){ done(); }; - + renderer.replace("a[href]", replacments, callback); }; @@ -7251,7 +7846,7 @@ EPUBJS.replace.resources = function(callback, renderer){ }; EPUBJS.replace.svg = function(callback, renderer) { - + renderer.replaceWithStored("image", "xlink:href", function(_store, full, done){ _store.getUrl(full).then(done); }, callback); @@ -7261,7 +7856,7 @@ EPUBJS.replace.svg = function(callback, renderer) { EPUBJS.replace.srcs = function(_store, full, done){ _store.getUrl(full).then(done); - + }; //-- Replaces links in head, such as stylesheets - link[href] @@ -7270,12 +7865,16 @@ EPUBJS.replace.links = function(_store, full, done, link){ if(link.getAttribute("rel") === "stylesheet") { EPUBJS.replace.stylesheets(_store, full).then(function(url, full){ // done - setTimeout(function(){ - done(url, full); - }, 5); //-- Allow for css to apply before displaying chapter + done(url, full); + }, function(reason) { + // we were unable to replace the style sheets + done(null); }); }else{ - _store.getUrl(full).then(done); + _store.getUrl(full).then(done, function(reason) { + // we were unable to get the url, signal to upper layer + done(null); + }); } }; @@ -7295,10 +7894,12 @@ EPUBJS.replace.stylesheets = function(_store, full) { deferred.resolve(url); - }, function(e) { - console.error(e); + }, function(reason) { + deferred.reject(reason); }); - + + }, function(reason) { + deferred.reject(reason); }); return deferred.promise; @@ -7308,7 +7909,7 @@ EPUBJS.replace.cssUrls = function(_store, base, text){ var deferred = new RSVP.defer(), promises = [], matches = text.match(/url\(\'?\"?([^\'|^\"^\)]*)\'?\"?\)/g); - + if(!_store) return; if(!matches){ @@ -7319,34 +7920,291 @@ EPUBJS.replace.cssUrls = function(_store, base, text){ matches.forEach(function(str){ var full = EPUBJS.core.resolveUrl(base, str.replace(/url\(|[|\)|\'|\"]/g, '')); var replaced = _store.getUrl(full).then(function(url){ - text = text.replace(str, 'url("'+url+'")'); - }); - + text = text.replace(str, 'url("'+url+'")'); + }, function(reason) { + deferred.reject(reason); + }); + promises.push(replaced); }); - + RSVP.all(promises).then(function(){ deferred.resolve(text); }); - + return deferred.promise; }; +EPUBJS.Storage = function(withCredentials){ + + this.checkRequirements(); + this.urlCache = {}; + this.withCredentials = withCredentials; + this.URL = window.URL || window.webkitURL || window.mozURL; + this.offline = false; +}; + +//-- Load the zip lib and set the workerScriptsPath +EPUBJS.Storage.prototype.checkRequirements = function(callback){ + if(typeof(localforage) == "undefined") console.error("localForage library not loaded"); +}; + +EPUBJS.Storage.prototype.put = function(assets, store) { + var deferred = new RSVP.defer(); + var count = assets.length; + var current = 0; + var next = function(deferred){ + var done = deferred || new RSVP.defer(); + var url; + var encodedUrl; + + if(current >= count) { + done.resolve(); + } else { + url = assets[current].url; + encodedUrl = window.encodeURIComponent(url); + + EPUBJS.core.request(url, "binary") + .then(function (data) { + return localforage.setItem(encodedUrl, data); + }) + .then(function(data){ + current++; + // Load up the next + setTimeout(function(){ + next(done); + }, 1); + + }); + } + return done.promise; + }.bind(this); + + if(!Array.isArray(assets)) { + assets = [assets]; + } + + next().then(function(){ + deferred.resolve(); + }.bind(this)); + + return deferred.promise; +}; + +EPUBJS.Storage.prototype.token = function(url, value){ + var encodedUrl = window.encodeURIComponent(url); + return localforage.setItem(encodedUrl, value) + .then(function (result) { + if (result === null) { + return false; + } else { + return true; + } + }); +}; + +EPUBJS.Storage.prototype.isStored = function(url){ + var encodedUrl = window.encodeURIComponent(url); + return localforage.getItem(encodedUrl) + .then(function (result) { + if (result === null) { + return false; + } else { + return true; + } + }); +}; + +EPUBJS.Storage.prototype.getText = function(url){ + var encodedUrl = window.encodeURIComponent(url); + + return EPUBJS.core.request(url, 'arraybuffer', this.withCredentials) + .then(function(buffer){ + + if(this.offline){ + this.offline = false; + this.trigger("offline", false); + } + localforage.setItem(encodedUrl, buffer); + return buffer; + }.bind(this)) + .then(function(data) { + var deferred = new RSVP.defer(); + var mimeType = EPUBJS.core.getMimeType(url); + var blob = new Blob([data], {type : mimeType}); + var reader = new FileReader(); + reader.addEventListener("loadend", function() { + deferred.resolve(reader.result); + }); + reader.readAsText(blob, mimeType); + return deferred.promise; + }) + .catch(function() { + + var deferred = new RSVP.defer(); + var entry = localforage.getItem(encodedUrl); + + if(!this.offline){ + this.offline = true; + this.trigger("offline", true); + } + + if(!entry) { + deferred.reject({ + message : "File not found in the storage: " + url, + stack : new Error().stack + }); + return deferred.promise; + } + + entry.then(function(data) { + var mimeType = EPUBJS.core.getMimeType(url); + var blob = new Blob([data], {type : mimeType}); + var reader = new FileReader(); + reader.addEventListener("loadend", function() { + deferred.resolve(reader.result); + }); + reader.readAsText(blob, mimeType); + }); + + return deferred.promise; + }.bind(this)); +}; + +EPUBJS.Storage.prototype.getUrl = function(url){ + var encodedUrl = window.encodeURIComponent(url); + + return EPUBJS.core.request(url, 'arraybuffer', this.withCredentials) + .then(function(buffer){ + if(this.offline){ + this.offline = false; + this.trigger("offline", false); + } + localforage.setItem(encodedUrl, buffer); + return url; + }.bind(this)) + .catch(function() { + var deferred = new RSVP.defer(); + var entry; + var _URL = window.URL || window.webkitURL || window.mozURL; + var tempUrl; + + if(!this.offline){ + this.offline = true; + this.trigger("offline", true); + } + + if(encodedUrl in this.urlCache) { + deferred.resolve(this.urlCache[encodedUrl]); + return deferred.promise; + } + + entry = localforage.getItem(encodedUrl); + + if(!entry) { + deferred.reject({ + message : "File not found in the storage: " + url, + stack : new Error().stack + }); + return deferred.promise; + } + + entry.then(function(data) { + var blob = new Blob([data], {type : EPUBJS.core.getMimeType(url)}); + tempUrl = _URL.createObjectURL(blob); + deferred.resolve(tempUrl); + this.urlCache[encodedUrl] = tempUrl; + }.bind(this)); + + + return deferred.promise; + }.bind(this)); +}; + +EPUBJS.Storage.prototype.getXml = function(url){ + var encodedUrl = window.encodeURIComponent(url); + + return EPUBJS.core.request(url, 'arraybuffer', this.withCredentials) + .then(function(buffer){ + if(this.offline){ + this.offline = false; + this.trigger("offline", false); + } + localforage.setItem(encodedUrl, buffer); + return buffer; + }.bind(this)) + .then(function(data) { + var deferred = new RSVP.defer(); + var mimeType = EPUBJS.core.getMimeType(url); + var blob = new Blob([data], {type : mimeType}); + var reader = new FileReader(); + reader.addEventListener("loadend", function() { + var parser = new DOMParser(); + var doc = parser.parseFromString(reader.result, "text/xml"); + deferred.resolve(doc); + }); + reader.readAsText(blob, mimeType); + return deferred.promise; + }) + .catch(function() { + var deferred = new RSVP.defer(); + var entry = localforage.getItem(encodedUrl); + + if(!this.offline){ + this.offline = true; + this.trigger("offline", true); + } + + if(!entry) { + deferred.reject({ + message : "File not found in the storage: " + url, + stack : new Error().stack + }); + return deferred.promise; + } + + entry.then(function(data) { + var mimeType = EPUBJS.core.getMimeType(url); + var blob = new Blob([data], {type : mimeType}); + var reader = new FileReader(); + reader.addEventListener("loadend", function() { + var parser = new DOMParser(); + var doc = parser.parseFromString(reader.result, "text/xml"); + deferred.resolve(doc); + }); + reader.readAsText(blob, mimeType); + }); + + return deferred.promise; + }.bind(this)); +}; + +EPUBJS.Storage.prototype.revokeUrl = function(url){ + var _URL = window.URL || window.webkitURL || window.mozURL; + var fromCache = this.urlCache[url]; + if(fromCache) _URL.revokeObjectURL(fromCache); +}; + +EPUBJS.Storage.prototype.failed = function(error){ + console.error(error); +}; + +RSVP.EventTarget.mixin(EPUBJS.Storage.prototype); EPUBJS.Unarchiver = function(url){ - - this.loadLib(); + + this.checkRequirements(); this.urlCache = {}; }; //-- Load the zip lib and set the workerScriptsPath -EPUBJS.Unarchiver.prototype.loadLib = function(callback){ +EPUBJS.Unarchiver.prototype.checkRequirements = function(callback){ if(typeof(JSZip) == "undefined") console.error("JSZip lib not loaded"); }; -EPUBJS.Unarchiver.prototype.openZip = function(zipUrl, callback){ +EPUBJS.Unarchiver.prototype.open = function(zipUrl, callback){ var deferred = new RSVP.defer(); return EPUBJS.core.request(zipUrl, "binary").then(function(data){ @@ -7355,8 +8213,8 @@ EPUBJS.Unarchiver.prototype.openZip = function(zipUrl, callback){ }; EPUBJS.Unarchiver.prototype.getXml = function(url, encoding){ - - return this.getText(url, encoding). + var decodededUrl = window.decodeURIComponent(url); + return this.getText(decodededUrl, encoding). then(function(text){ var parser = new DOMParser(); return parser.parseFromString(text, "text/xml"); @@ -7371,7 +8229,8 @@ EPUBJS.Unarchiver.prototype.getUrl = function(url, mime){ var entry = this.zip.file(decodededUrl); var _URL = window.URL || window.webkitURL || window.mozURL; var tempUrl; - + var blob; + if(!entry) { deferred.reject({ message : "File not found in the epub: " + url, @@ -7379,13 +8238,13 @@ EPUBJS.Unarchiver.prototype.getUrl = function(url, mime){ }); return deferred.promise; } - + if(url in this.urlCache) { deferred.resolve(this.urlCache[url]); return deferred.promise; } - blob = new Blob([entry.asUint8Array()], {type : mime || this.zip.getMimeType(entry.name)}); + blob = new Blob([entry.asUint8Array()], {type : EPUBJS.core.getMimeType(entry.name)}); tempUrl = _URL.createObjectURL(blob); deferred.resolve(tempUrl); @@ -7399,10 +8258,13 @@ EPUBJS.Unarchiver.prototype.getText = function(url, encoding){ var deferred = new RSVP.defer(); var decodededUrl = window.decodeURIComponent(url); var entry = this.zip.file(decodededUrl); - var _URL = window.URL || window.webkitURL || window.mozURL; + var text; if(!entry) { - console.warn("File not found in the contained epub:", url); + deferred.reject({ + message : "File not found in the epub: " + url, + stack : new Error().stack + }); return deferred.promise; } @@ -7414,7 +8276,7 @@ EPUBJS.Unarchiver.prototype.getText = function(url, encoding){ EPUBJS.Unarchiver.prototype.revokeUrl = function(url){ var _URL = window.URL || window.webkitURL || window.mozURL; - var fromCache = unarchiver.urlCache[url]; + var fromCache = this.urlCache[url]; if(fromCache) _URL.revokeObjectURL(fromCache); }; @@ -7436,18 +8298,18 @@ EPUBJS.Unarchiver.prototype.toStorage = function(entries){ count--; if(count === 0) that.afterSaved(); } - + entries.forEach(function(entry){ - + setTimeout(function(entry){ that.saveEntryFileToStorage(entry, callback); }, timeout, entry); - + timeout += delay; }); - + console.log("time", timeout); - + //entries.forEach(this.saveEntryFileToStorage.bind(this)); }; @@ -7458,4 +8320,202 @@ EPUBJS.Unarchiver.prototype.toStorage = function(entries){ // }); // }; +/* + From Zip.js, by Gildas Lormeau + */ + +(function() { + "use strict"; + var table = { + "application" : { + "ecmascript" : [ "es", "ecma" ], + "javascript" : "js", + "ogg" : "ogx", + "pdf" : "pdf", + "postscript" : [ "ps", "ai", "eps", "epsi", "epsf", "eps2", "eps3" ], + "rdf+xml" : "rdf", + "smil" : [ "smi", "smil" ], + "xhtml+xml" : [ "xhtml", "xht" ], + "xml" : [ "xml", "xsl", "xsd" ], + "zip" : "zip", + "x-httpd-eruby" : "rhtml", + "x-latex" : "latex", + "x-maker" : [ "frm", "maker", "frame", "fm", "fb", "book", "fbdoc" ], + "x-object" : "o", + "x-shockwave-flash" : [ "swf", "swfl" ], + "x-silverlight" : "scr", + "epub+zip" : "epub", + "font-tdpfr" : "pfr", + "inkml+xml" : [ "ink", "inkml" ], + "json" : "json", + "jsonml+json" : "jsonml", + "mathml+xml" : "mathml", + "metalink+xml" : "metalink", + "mp4" : "mp4s", + "oebps-package+xml" : "opf", + "omdoc+xml" : "omdoc", + "oxps" : "oxps", + "vnd.amazon.ebook" : "azw", + "widget" : "wgt", + "x-dtbncx+xml" : "ncx", + "x-dtbook+xml" : "dtb", + "x-dtbresource+xml" : "res", + "x-font-bdf" : "bdf", + "x-font-ghostscript" : "gsf", + "x-font-linux-psf" : "psf", + "x-font-otf" : "otf", + "x-font-pcf" : "pcf", + "x-font-snf" : "snf", + "x-font-ttf" : [ "ttf", "ttc" ], + "x-font-type1" : [ "pfa", "pfb", "pfm", "afm" ], + "x-font-woff" : "woff", + "x-mobipocket-ebook" : [ "prc", "mobi" ], + "x-mspublisher" : "pub", + "x-nzb" : "nzb", + "x-tgif" : "obj", + "xaml+xml" : "xaml", + "xml-dtd" : "dtd", + "xproc+xml" : "xpl", + "xslt+xml" : "xslt", + "internet-property-stream" : "acx", + "x-compress" : "z", + "x-compressed" : "tgz", + "x-gzip" : "gz", + }, + "audio" : { + "flac" : "flac", + "midi" : [ "mid", "midi", "kar", "rmi" ], + "mpeg" : [ "mpga", "mpega", "mp2", "mp3", "m4a", "mp2a", "m2a", "m3a" ], + "mpegurl" : "m3u", + "ogg" : [ "oga", "ogg", "spx" ], + "x-aiff" : [ "aif", "aiff", "aifc" ], + "x-ms-wma" : "wma", + "x-wav" : "wav", + "adpcm" : "adp", + "mp4" : "mp4a", + "webm" : "weba", + "x-aac" : "aac", + "x-caf" : "caf", + "x-matroska" : "mka", + "x-pn-realaudio-plugin" : "rmp", + "xm" : "xm", + "mid" : [ "mid", "rmi" ] + }, + "image" : { + "gif" : "gif", + "ief" : "ief", + "jpeg" : [ "jpeg", "jpg", "jpe" ], + "pcx" : "pcx", + "png" : "png", + "svg+xml" : [ "svg", "svgz" ], + "tiff" : [ "tiff", "tif" ], + "x-icon" : "ico", + "bmp" : "bmp", + "webp" : "webp", + "x-pict" : [ "pic", "pct" ], + "x-tga" : "tga", + "cis-cod" : "cod", + }, + "message" : { + "rfc822" : [ "eml", "mime", "mht", "mhtml", "nws" ] + }, + "text" : { + "cache-manifest" : [ "manifest", "appcache" ], + "calendar" : [ "ics", "icz", "ifb" ], + "css" : "css", + "csv" : "csv", + "h323" : "323", + "html" : [ "html", "htm", "shtml", "stm" ], + "iuls" : "uls", + "mathml" : "mml", + "plain" : [ "txt", "text", "brf", "conf", "def", "list", "log", "in", "bas" ], + "richtext" : "rtx", + "tab-separated-values" : "tsv", + "x-bibtex" : "bib", + "x-dsrc" : "d", + "x-diff" : [ "diff", "patch" ], + "x-haskell" : "hs", + "x-java" : "java", + "x-literate-haskell" : "lhs", + "x-moc" : "moc", + "x-pascal" : [ "p", "pas" ], + "x-pcs-gcd" : "gcd", + "x-perl" : [ "pl", "pm" ], + "x-python" : "py", + "x-scala" : "scala", + "x-setext" : "etx", + "x-tcl" : [ "tcl", "tk" ], + "x-tex" : [ "tex", "ltx", "sty", "cls" ], + "x-vcard" : "vcf", + "sgml" : [ "sgml", "sgm" ], + "x-c" : [ "c", "cc", "cxx", "cpp", "h", "hh", "dic" ], + "x-fortran" : [ "f", "for", "f77", "f90" ], + "x-opml" : "opml", + "x-nfo" : "nfo", + "x-sfv" : "sfv", + "x-uuencode" : "uu", + "webviewhtml" : "htt" + }, + "video" : { + "mpeg" : [ "mpeg", "mpg", "mpe", "m1v", "m2v", "mp2", "mpa", "mpv2" ], + "mp4" : [ "mp4", "mp4v", "mpg4" ], + "quicktime" : [ "qt", "mov" ], + "ogg" : "ogv", + "vnd.mpegurl" : [ "mxu", "m4u" ], + "x-flv" : "flv", + "x-la-asf" : [ "lsf", "lsx" ], + "x-mng" : "mng", + "x-ms-asf" : [ "asf", "asx", "asr" ], + "x-ms-wm" : "wm", + "x-ms-wmv" : "wmv", + "x-ms-wmx" : "wmx", + "x-ms-wvx" : "wvx", + "x-msvideo" : "avi", + "x-sgi-movie" : "movie", + "x-matroska" : [ "mpv", "mkv", "mk3d", "mks" ], + "3gpp2" : "3g2", + "h261" : "h261", + "h263" : "h263", + "h264" : "h264", + "jpeg" : "jpgv", + "jpm" : [ "jpm", "jpgm" ], + "mj2" : [ "mj2", "mjp2" ], + "vnd.ms-playready.media.pyv" : "pyv", + "vnd.uvvu.mp4" : [ "uvu", "uvvu" ], + "vnd.vivo" : "viv", + "webm" : "webm", + "x-f4v" : "f4v", + "x-m4v" : "m4v", + "x-ms-vob" : "vob", + "x-smv" : "smv" + } + }; + + var mimeTypes = (function() { + var type, subtype, val, index, mimeTypes = {}; + for (type in table) { + if (table.hasOwnProperty(type)) { + for (subtype in table[type]) { + if (table[type].hasOwnProperty(subtype)) { + val = table[type][subtype]; + if (typeof val == "string") { + mimeTypes[val] = type + "/" + subtype; + } else { + for (index = 0; index < val.length; index++) { + mimeTypes[val[index]] = type + "/" + subtype; + } + } + } + } + } + } + return mimeTypes; + })(); + + EPUBJS.core.getMimeType = function(filename) { + var defaultValue = "text/plain";//"application/octet-stream"; + return filename && mimeTypes[filename.split(".").pop().toLowerCase()] || defaultValue; + }; + +})(); //# sourceMappingURL=epub_no_underscore.js.map \ No newline at end of file diff --git a/epub.js/epub_no_underscore.js.map b/epub.js/epub_no_underscore.js.map index afad7ad..a94c021 100644 --- a/epub.js/epub_no_underscore.js.map +++ b/epub.js/epub_no_underscore.js.map @@ -11,13 +11,16 @@ "src/events.js", "src/hooks.js", "src/layout.js", + "src/locations.js", "src/pagination.js", "src/parser.js", "src/render_iframe.js", "src/renderer.js", "src/replace.js", - "src/unarchiver.js" + "src/storage.js", + "src/unarchiver.js", + "libs/mime-types/mime-types.js" ], "names": [], - "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,Y;ACtoEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACjRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACthBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5dA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uD;AC7NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACluCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A" + "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,Y;ACtoEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACryCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AC7kBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACtiBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AClOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACheA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC3RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9sCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,K" } \ No newline at end of file diff --git a/epub.js/hooks.js b/epub.js/hooks.js index fad6409..0d62b7e 100644 --- a/epub.js/hooks.js +++ b/epub.js/hooks.js @@ -7,10 +7,10 @@ EPUBJS.Hooks.register("beforeChapterDisplay").endnotes = function(callback, rend folder = EPUBJS.core.folder(location.pathname), cssPath = (folder + EPUBJS.cssPath) || folder, popups = {}; - - EPUBJS.core.addCss(cssPath + "popup.css", false, renderer.render.document.head); - - + + EPUBJS.core.addCss(EPUBJS.cssPath + "popup.css", false, renderer.render.document.head); + + items.forEach(function(item){ var epubType = item.getAttribute(attr), href, @@ -21,17 +21,17 @@ EPUBJS.Hooks.register("beforeChapterDisplay").endnotes = function(callback, rend left, top, txt; - + if(epubType != type) return; href = item.getAttribute("href"); id = href.replace("#", ''); el = renderer.render.document.getElementById(id); - - + + item.addEventListener("mouseover", showPop, false); - item.addEventListener("mouseout", hidePop, false); - + item.addEventListener("mouseout", hidePop, false); + function showPop(){ var poppos, iheight = renderer.height, @@ -40,7 +40,7 @@ EPUBJS.Hooks.register("beforeChapterDisplay").endnotes = function(callback, rend pop, maxHeight = 225, itemRect; - + if(!txt) { pop = el.cloneNode(true); txt = pop.querySelector("p"); @@ -51,17 +51,17 @@ EPUBJS.Hooks.register("beforeChapterDisplay").endnotes = function(callback, rend if(!popups[id]) { popups[id] = document.createElement("div"); popups[id].setAttribute("class", "popup"); - - pop_content = document.createElement("div"); - + + pop_content = document.createElement("div"); + popups[id].appendChild(pop_content); - + pop_content.appendChild(txt); pop_content.setAttribute("class", "pop_content"); renderer.render.document.body.appendChild(popups[id]); - - //-- TODO: will these leak memory? - Fred + + //-- TODO: will these leak memory? - Fred popups[id].addEventListener("mouseover", onPop, false); popups[id].addEventListener("mouseout", offPop, false); @@ -72,32 +72,32 @@ EPUBJS.Hooks.register("beforeChapterDisplay").endnotes = function(callback, rend renderer.on("renderer:pageChanged", offPop, this); // chapter.book.on("renderer:chapterDestroy", hidePop, this); } - + pop = popups[id]; - - + + //-- get location of item itemRect = item.getBoundingClientRect(); left = itemRect.left; top = itemRect.top; - + //-- show the popup pop.classList.add("show"); - + //-- locations of popup popRect = pop.getBoundingClientRect(); - + //-- position the popup pop.style.left = left - popRect.width / 2 + "px"; pop.style.top = top + "px"; - - + + //-- Adjust max height if(maxHeight > iheight / 2.5) { maxHeight = iheight / 2.5; pop_content.style.maxHeight = maxHeight + "px"; } - + //-- switch above / below if(popRect.height + top >= iheight - 25) { pop.style.top = top - popRect.height + "px"; @@ -105,7 +105,7 @@ EPUBJS.Hooks.register("beforeChapterDisplay").endnotes = function(callback, rend }else{ pop.classList.remove("above"); } - + //-- switch left if(left - popRect.width <= 0) { pop.style.left = left + "px"; @@ -113,42 +113,42 @@ EPUBJS.Hooks.register("beforeChapterDisplay").endnotes = function(callback, rend }else{ pop.classList.remove("left"); } - + //-- switch right if(left + popRect.width / 2 >= iwidth) { //-- TEMP MOVE: 300 pop.style.left = left - 300 + "px"; - + popRect = pop.getBoundingClientRect(); pop.style.left = left - popRect.width + "px"; //-- switch above / below again - if(popRect.height + top >= iheight - 25) { + if(popRect.height + top >= iheight - 25) { pop.style.top = top - popRect.height + "px"; pop.classList.add("above"); }else{ pop.classList.remove("above"); } - + pop.classList.add("right"); }else{ pop.classList.remove("right"); } - - + + } - + function onPop(){ popups[id].classList.add("on"); } - + function offPop(){ popups[id].classList.remove("on"); } - + function hidePop(){ setTimeout(function(){ popups[id].classList.remove("show"); - }, 100); + }, 100); } }); @@ -164,7 +164,7 @@ EPUBJS.Hooks.register("beforeChapterDisplay").mathml = function(callback, render if(renderer.currentChapter.manifestProperties.indexOf("mathml") !== -1 ){ // Assign callback to be inside iframe window - renderer.iframe.contentWindow.mathmlCallback = callback; + renderer.render.iframe.contentWindow.mathmlCallback = callback; // add MathJax config script tag to the renderer body var s = document.createElement("script"); diff --git a/epub.js/hooks.js.map b/epub.js/hooks.js.map index 7ed25d6..2858e23 100644 --- a/epub.js/hooks.js.map +++ b/epub.js/hooks.js.map @@ -1,17 +1,12 @@ { "version": 3, - "file": "reader.js", + "file": "hooks.js", "sources": [ - "reader_src/reader.js", - "reader_src/controllers/bookmarks_controller.js", - "reader_src/controllers/controls_controller.js", - "reader_src/controllers/meta_controller.js", - "reader_src/controllers/notes_controller.js", - "reader_src/controllers/reader_controller.js", - "reader_src/controllers/settings_controller.js", - "reader_src/controllers/sidebar_controller.js", - "reader_src/controllers/toc_controller.js" + "hooks/default/endnotes.js", + "hooks/default/mathml.js", + "hooks/default/smartimages.js", + "hooks/default/transculsions.js" ], "names": [], - "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gD;ACjUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AC9RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A" + "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;AC9JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A" } \ No newline at end of file diff --git a/epub.js/hooks.min.js b/epub.js/hooks.min.js index 33049a9..5e8c36f 100644 --- a/epub.js/hooks.min.js +++ b/epub.js/hooks.min.js @@ -1,2 +1,2 @@ -EPUBJS.Hooks.register("beforeChapterDisplay").endnotes=function(a,b){var c=b.contents.querySelectorAll("a[href]"),d=Array.prototype.slice.call(c),e="epub:type",f="noteref",g=EPUBJS.core.folder(location.pathname),h=g+EPUBJS.cssPath||g,i={};EPUBJS.core.addCss(h+"popup.css",!1,b.render.document.head),d.forEach(function(a){function c(){var c,e,f=b.height,j=b.width,p=225;o||(c=l.cloneNode(!0),o=c.querySelector("p")),i[k]||(i[k]=document.createElement("div"),i[k].setAttribute("class","popup"),pop_content=document.createElement("div"),i[k].appendChild(pop_content),pop_content.appendChild(o),pop_content.setAttribute("class","pop_content"),b.render.document.body.appendChild(i[k]),i[k].addEventListener("mouseover",d,!1),i[k].addEventListener("mouseout",g,!1),b.on("renderer:pageChanged",h,this),b.on("renderer:pageChanged",g,this)),c=i[k],e=a.getBoundingClientRect(),m=e.left,n=e.top,c.classList.add("show"),popRect=c.getBoundingClientRect(),c.style.left=m-popRect.width/2+"px",c.style.top=n+"px",p>f/2.5&&(p=f/2.5,pop_content.style.maxHeight=p+"px"),popRect.height+n>=f-25?(c.style.top=n-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),m-popRect.width<=0?(c.style.left=m+"px",c.classList.add("left")):c.classList.remove("left"),m+popRect.width/2>=j?(c.style.left=m-300+"px",popRect=c.getBoundingClientRect(),c.style.left=m-popRect.width+"px",popRect.height+n>=f-25?(c.style.top=n-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),c.classList.add("right")):c.classList.remove("right")}function d(){i[k].classList.add("on")}function g(){i[k].classList.remove("on")}function h(){setTimeout(function(){i[k].classList.remove("show")},100)}var j,k,l,m,n,o,p=a.getAttribute(e);p==f&&(j=a.getAttribute("href"),k=j.replace("#",""),l=b.render.document.getElementById(k),a.addEventListener("mouseover",c,!1),a.addEventListener("mouseout",h,!1))}),a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").mathml=function(a,b){if(-1!==b.currentChapter.manifestProperties.indexOf("mathml")){b.iframe.contentWindow.mathmlCallback=a;var c=document.createElement("script");c.type="text/x-mathjax-config",c.innerHTML=' MathJax.Hub.Register.StartupHook("End",function () { window.mathmlCallback(); }); MathJax.Hub.Config({jax: ["input/TeX","input/MathML","output/SVG"],extensions: ["tex2jax.js","mml2jax.js","MathEvents.js"],TeX: {extensions: ["noErrors.js","noUndefined.js","autoload-all.js"]},MathMenu: {showRenderer: false},menuSettings: {zoom: "Click"},messageStyle: "none"}); ',b.doc.body.appendChild(c),EPUBJS.core.addScript("http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML",null,b.doc.head)}else a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").smartimages=function(a,b){var c=b.contents.querySelectorAll("img"),d=Array.prototype.slice.call(c),e=b.height;return"reflowable"!=b.layoutSettings.layout?void a():(d.forEach(function(a){function c(){var c,d=a.getBoundingClientRect(),f=d.height,g=d.top,h=a.getAttribute("data-height"),i=h||f,j=Number(getComputedStyle(a,"").fontSize.match(/(\d*(\.\d*)?)px/)[1]),k=j?j/2:0;e=b.contents.clientHeight,0>g&&(g=0),i+g>=e?(e/2>g?(c=e-g-k,a.style.maxHeight=c+"px",a.style.width="auto"):(i>e&&(a.style.maxHeight=e+"px",a.style.width="auto",d=a.getBoundingClientRect(),i=d.height),a.style.display="block",a.style.WebkitColumnBreakBefore="always",a.style.breakBefore="column"),a.setAttribute("data-height",c)):(a.style.removeProperty("max-height"),a.style.removeProperty("margin-top"))}a.addEventListener("load",c,!1),b.on("renderer:resized",c),b.on("renderer:chapterUnloaded",function(){a.removeEventListener("load",c),b.off("renderer:resized",c)}),c()}),void(a&&a()))},EPUBJS.Hooks.register("beforeChapterDisplay").transculsions=function(a,b){var c=b.contents.querySelectorAll("[transclusion]"),d=Array.prototype.slice.call(c);d.forEach(function(a){function c(){j=g,k=h,j>chapter.colWidth&&(d=chapter.colWidth/j,j=chapter.colWidth,k*=d),f.width=j,f.height=k}var d,e=a.getAttribute("ref"),f=document.createElement("iframe"),g=a.getAttribute("width"),h=a.getAttribute("height"),i=a.parentNode,j=g,k=h;c(),b.listenUntil("renderer:resized","renderer:chapterUnloaded",c),f.src=e,i.replaceChild(f,a)}),a&&a()}; +EPUBJS.Hooks.register("beforeChapterDisplay").endnotes=function(a,b){var c=b.contents.querySelectorAll("a[href]"),d=Array.prototype.slice.call(c),e="epub:type",f="noteref",g=EPUBJS.core.folder(location.pathname),h=(g+EPUBJS.cssPath||g,{});EPUBJS.core.addCss(EPUBJS.cssPath+"popup.css",!1,b.render.document.head),d.forEach(function(a){function c(){var c,e,f=b.height,j=b.width,p=225;o||(c=l.cloneNode(!0),o=c.querySelector("p")),h[k]||(h[k]=document.createElement("div"),h[k].setAttribute("class","popup"),pop_content=document.createElement("div"),h[k].appendChild(pop_content),pop_content.appendChild(o),pop_content.setAttribute("class","pop_content"),b.render.document.body.appendChild(h[k]),h[k].addEventListener("mouseover",d,!1),h[k].addEventListener("mouseout",g,!1),b.on("renderer:pageChanged",i,this),b.on("renderer:pageChanged",g,this)),c=h[k],e=a.getBoundingClientRect(),m=e.left,n=e.top,c.classList.add("show"),popRect=c.getBoundingClientRect(),c.style.left=m-popRect.width/2+"px",c.style.top=n+"px",p>f/2.5&&(p=f/2.5,pop_content.style.maxHeight=p+"px"),popRect.height+n>=f-25?(c.style.top=n-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),m-popRect.width<=0?(c.style.left=m+"px",c.classList.add("left")):c.classList.remove("left"),m+popRect.width/2>=j?(c.style.left=m-300+"px",popRect=c.getBoundingClientRect(),c.style.left=m-popRect.width+"px",popRect.height+n>=f-25?(c.style.top=n-popRect.height+"px",c.classList.add("above")):c.classList.remove("above"),c.classList.add("right")):c.classList.remove("right")}function d(){h[k].classList.add("on")}function g(){h[k].classList.remove("on")}function i(){setTimeout(function(){h[k].classList.remove("show")},100)}var j,k,l,m,n,o,p=a.getAttribute(e);p==f&&(j=a.getAttribute("href"),k=j.replace("#",""),l=b.render.document.getElementById(k),a.addEventListener("mouseover",c,!1),a.addEventListener("mouseout",i,!1))}),a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").mathml=function(a,b){if(-1!==b.currentChapter.manifestProperties.indexOf("mathml")){b.render.iframe.contentWindow.mathmlCallback=a;var c=document.createElement("script");c.type="text/x-mathjax-config",c.innerHTML=' MathJax.Hub.Register.StartupHook("End",function () { window.mathmlCallback(); }); MathJax.Hub.Config({jax: ["input/TeX","input/MathML","output/SVG"],extensions: ["tex2jax.js","mml2jax.js","MathEvents.js"],TeX: {extensions: ["noErrors.js","noUndefined.js","autoload-all.js"]},MathMenu: {showRenderer: false},menuSettings: {zoom: "Click"},messageStyle: "none"}); ',b.doc.body.appendChild(c),EPUBJS.core.addScript("http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML",null,b.doc.head)}else a&&a()},EPUBJS.Hooks.register("beforeChapterDisplay").smartimages=function(a,b){var c=b.contents.querySelectorAll("img"),d=Array.prototype.slice.call(c),e=b.height;return"reflowable"!=b.layoutSettings.layout?void a():(d.forEach(function(a){function c(){var c,d=a.getBoundingClientRect(),f=d.height,g=d.top,h=a.getAttribute("data-height"),i=h||f,j=Number(getComputedStyle(a,"").fontSize.match(/(\d*(\.\d*)?)px/)[1]),k=j?j/2:0;e=b.contents.clientHeight,0>g&&(g=0),i+g>=e?(e/2>g?(c=e-g-k,a.style.maxHeight=c+"px",a.style.width="auto"):(i>e&&(a.style.maxHeight=e+"px",a.style.width="auto",d=a.getBoundingClientRect(),i=d.height),a.style.display="block",a.style.WebkitColumnBreakBefore="always",a.style.breakBefore="column"),a.setAttribute("data-height",c)):(a.style.removeProperty("max-height"),a.style.removeProperty("margin-top"))}a.addEventListener("load",c,!1),b.on("renderer:resized",c),b.on("renderer:chapterUnloaded",function(){a.removeEventListener("load",c),b.off("renderer:resized",c)}),c()}),void(a&&a()))},EPUBJS.Hooks.register("beforeChapterDisplay").transculsions=function(a,b){var c=b.contents.querySelectorAll("[transclusion]"),d=Array.prototype.slice.call(c);d.forEach(function(a){function c(){j=g,k=h,j>chapter.colWidth&&(d=chapter.colWidth/j,j=chapter.colWidth,k*=d),f.width=j,f.height=k}var d,e=a.getAttribute("ref"),f=document.createElement("iframe"),g=a.getAttribute("width"),h=a.getAttribute("height"),i=a.parentNode,j=g,k=h;c(),b.listenUntil("renderer:resized","renderer:chapterUnloaded",c),f.src=e,i.replaceChild(f,a)}),a&&a()}; //# sourceMappingURL=hooks.min.map \ No newline at end of file diff --git a/epub.js/hooks.min.map b/epub.js/hooks.min.map index 783dac9..1f679c7 100644 --- a/epub.js/hooks.min.map +++ b/epub.js/hooks.min.map @@ -1 +1 @@ -{"version":3,"file":"hooks.min.js","sources":["hooks.js"],"names":["EPUBJS","Hooks","register","endnotes","callback","renderer","notes","contents","querySelectorAll","items","Array","prototype","slice","call","attr","type","folder","core","location","pathname","cssPath","popups","addCss","render","document","head","forEach","item","showPop","pop","itemRect","iheight","height","iwidth","width","maxHeight","txt","el","cloneNode","querySelector","id","createElement","setAttribute","pop_content","appendChild","body","addEventListener","onPop","offPop","on","hidePop","this","getBoundingClientRect","left","top","classList","add","popRect","style","remove","setTimeout","href","epubType","getAttribute","replace","getElementById","mathml","currentChapter","manifestProperties","indexOf","iframe","contentWindow","mathmlCallback","s","innerHTML","doc","addScript","smartimages","images","layoutSettings","layout","size","newHeight","rectHeight","oHeight","fontSize","Number","getComputedStyle","match","fontAdjust","clientHeight","display","removeProperty","removeEventListener","off","transculsions","trans","orginal_width","orginal_height","chapter","colWidth","ratio","src","parent","parentNode","listenUntil","replaceChild"],"mappings":"AAAAA,OAAOC,MAAMC,SAAS,wBAAwBC,SAAW,SAASC,EAAUC,GAE1E,GAAIC,GAAQD,EAASE,SAASC,iBAAiB,WAC9CC,EAAQC,MAAMC,UAAUC,MAAMC,KAAKP,GACnCQ,EAAO,YACPC,EAAO,UACPC,EAAShB,OAAOiB,KAAKD,OAAOE,SAASC,UACrCC,EAAWJ,EAAShB,OAAOoB,SAAYJ,EACvCK,IAEDrB,QAAOiB,KAAKK,OAAOF,EAAU,aAAa,EAAOf,EAASkB,OAAOC,SAASC,MAG1EhB,EAAMiB,QAAQ,SAASC,GAqBtB,QAASC,KACR,GAICC,GAEAC,EALAC,EAAU1B,EAAS2B,OACnBC,EAAS5B,EAAS6B,MAGlBC,EAAY,GAGTC,KACHP,EAAMQ,EAAGC,WAAU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GAWtB,QAASsD,KACR/C,EAAQ+D,EACRjE,EAASkE,EAENhE,EAAQiE,QAAQC,WAClBC,EAAQF,QAAQC,SAAWlE,EAE3BA,EAAQiE,QAAQC,SAChBpE,GAAkBqE,GAGnB/B,EAAOpC,MAAQA,EACfoC,EAAOtC,OAASA,EAtBjB,GAOCqE,GAPGC,EAAM3E,EAAKoC,aAAa,OAC3BO,EAAS9C,SAASiB,cAAc,UAChCwD,EAAgBtE,EAAKoC,aAAa,SAClCmC,EAAiBvE,EAAKoC,aAAa,UACnCwC,EAAS5E,EAAK6E,WACdtE,EAAQ+D,EACRjE,EAASkE,CAoBVjB,KAKA5E,EAASoG,YAAY,mBAAoB,2BAA4BxB,GAErEX,EAAOgC,IAAMA,EAGbC,EAAOG,aAAapC,EAAQ3C,KAQ1BvB,GAAUA"} \ No newline at end of file +{"version":3,"sources":["hooks.js"],"names":["EPUBJS","Hooks","register","endnotes","callback","renderer","notes","contents","querySelectorAll","items","Array","prototype","slice","call","attr","type","folder","core","location","pathname","popups","cssPath","addCss","render","document","head","forEach","item","showPop","pop","itemRect","iheight","height","iwidth","width","maxHeight","txt","el","cloneNode","querySelector","id","createElement","setAttribute","pop_content","appendChild","body","addEventListener","onPop","offPop","on","hidePop","this","getBoundingClientRect","left","top","classList","add","popRect","style","remove","setTimeout","href","epubType","getAttribute","replace","getElementById","mathml","currentChapter","manifestProperties","indexOf","iframe","contentWindow","mathmlCallback","s","innerHTML","doc","addScript","smartimages","images","layoutSettings","layout","size","newHeight","rectHeight","oHeight","fontSize","Number","getComputedStyle","match","fontAdjust","clientHeight","display","removeProperty","removeEventListener","off","transculsions","trans","orginal_width","orginal_height","chapter","colWidth","ratio","src","parent","parentNode","listenUntil","replaceChild"],"mappings":"AAAAA,OAAOC,MAAMC,SAAS,wBAAwBC,SAAW,SAASC,EAAUC,GAE1E,GAAIC,GAAQD,EAASE,SAASC,iBAAiB,WAC9CC,EAAQC,MAAMC,UAAUC,MAAMC,KAAKP,GACnCQ,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AAM,GAEpC5E,EAAS4C,GAAG,mBAAoBgC,GAEhC5E,EAAS4C,GAAG,2BAA4B,WACvCtB,EAAKkE,oBAAoB,OAAQZ,GACjC5E,EAASyF,IAAI,mBAAoBb,KAGlCA,WAIE7E,GAAUA,OAIfJ,OAAOC,MAAMC,SAAS,wBAAwB6F,cAAgB,SAAS3F,EAAUC,GAO/E,GAAI2F,GAAQ3F,EAASE,SAASC,iBAAiB,kBAC7CC,EAAQC,MAAMC,UAAUC,MAAMC,KAAKmF,EAErCvF,GAAMiB,QAAQ,SAASC,GAWtB,QAASsD,KACR/C,EAAQ+D,EACRjE,EAASkE,EAENhE,EAAQiE,QAAQC,WAClBC,EAAQF,QAAQC,SAAWlE,EAE3BA,EAAQiE,QAAQC,SAChBpE,GAAkBqE,GAGnB/B,EAAOpC,MAAQA,EACfoC,EAAOtC,OAASA,EAtBjB,GAOCqE,GAPGC,EAAM3E,EAAKoC,aAAa,OAC3BO,EAAS9C,SAASiB,cAAc,UAChCwD,EAAgBtE,EAAKoC,aAAa,SAClCmC,EAAiBvE,EAAKoC,aAAa,UACnCwC,EAAS5E,EAAK6E,WACdtE,EAAQ+D,EACRjE,EAASkE,CAoBVjB,KAKA5E,EAASoG,YAAY,mBAAoB,2BAA4BxB,GAErEX,EAAOgC,IAAMA,EAGbC,EAAOG,aAAapC,EAAQ3C,KAQ1BvB,GAAUA","file":"hooks.min.js"} \ No newline at end of file diff --git a/epub.js/img/loader.gif b/epub.js/img/loader.gif new file mode 100644 index 0000000..68005bc Binary files /dev/null and b/epub.js/img/loader.gif differ diff --git a/epub.js/libs/localforage.min.map b/epub.js/libs/localforage.min.map new file mode 100644 index 0000000..09b7624 --- /dev/null +++ b/epub.js/libs/localforage.min.map @@ -0,0 +1 @@ +{"version":3,"file":"localforage.min.js","sources":["../../node_modules/localforage/dist/localforage.min.js"],"names":["a","b","c","d","e","f","deps","callback","charAt","split","slice","length","g","pop","push","join","_eak_seen","Error","h","i","j","k","l","m","n","apply","this","TypeError","then","isArray","isFunction","all","process","nextTick","document","createTextNode","observe","characterData","data","setTimeout","window","MutationObserver","WebKitMutationObserver","global","toString","call","asap","arguments","instrument","config","configure","self","Promise","polyfill","v","_subscribers","o","q","D","E","_detail","u","p","_state","B","C","t","async","r","s","objectOrFunction","w","now","x","race","y","resolve","z","reject","A","prototype","constructor","catch","Object","Date","getTime","Blob","name","BlobBuilder","MSBlobBuilder","MozBlobBuilder","WebKitBlobBuilder","append","getBlob","type","buffer","ArrayBuffer","FileReader","onload","result","readAsArrayBuffer","JSON","stringify","console","error","substring","parse","test","match","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","indexOf","serialize","deserialize","stringToBuffer","bufferToString","module","exports","require","define","amd","localforageSerializer","charCodeAt","XMLHttpRequest","open","withCredentials","responseType","onreadystatechange","readyState","status","response","getResponseHeader","send","transaction","objectStore","put","oncomplete","get","onerror","onsuccess","target","URL","createObjectURL","revokeObjectURL","onloadend","btoa","__local_forage_encoded_blob","readAsBinaryString","atob","db","version","onupgradeneeded","createObjectStore","storeName","oldVersion","_dbInfo","warn","String","ready","openCursor","value","key","onabort","clear","count","advance","indexedDB","webkitIndexedDB","mozIndexedDB","OIndexedDB","msIndexedDB","_driver","_initStorage","iterate","getItem","setItem","removeItem","keys","asyncStorage","keyPrefix","DEFINE","EXPORT","localStorage","WINDOW","localStorageWrapper","description","size","setDriver","LOCALSTORAGE","executeSql","rows","item","code","QUOTA_ERR","openDatabase","webSQLStorage","hasOwnProperty","_config","_driverSet","_ready","driver","INDEXEDDB","WEBSQL","navigator","userAgent","IDBKeyRange","Array","replace","defineDriver","concat","_support","_getFirstSupportedDriver","_extend","supports","createInstance","localforage"],"mappings":";;;;;;CAMC,WAAW,GAAIA,GAAEC,EAAEC,EAAEC,GAAG,WAAW,GAAIC,MAAKC,IAAKL,GAAE,SAASA,EAAEC,EAAEC,GAAGE,EAAEJ,IAAIM,KAAKL,EAAEM,SA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.js @@ -9,8 +9,6 @@ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/js JSZip uses the library pako released under the MIT license : https://github.com/nodeca/pako/blob/master/LICENSE */ -!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":8}],4:[function(a,b){"use strict";var c=a("./utils"),d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var e="string"!==c.getTypeOf(a);"undefined"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=e?a[i]:a.charCodeAt(i),g=255&(b^h),f=d[g],b=b>>>8^f;return-1^b}},{"./utils":21}],5:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":21}],6:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!1,c.date=null,c.compression=null,c.comment=null},{}],7:[function(a,b,c){"use strict";var d=a("./utils");c.string2binary=function(a){return d.string2binary(a)},c.string2Uint8Array=function(a){return d.transformTo("uint8array",a)},c.uint8Array2String=function(a){return d.transformTo("string",a)},c.string2Blob=function(a){var b=d.transformTo("arraybuffer",a);return d.arrayBuffer2Blob(b)},c.arrayBuffer2Blob=function(a){return d.arrayBuffer2Blob(a)},c.transformTo=function(a,b){return d.transformTo(a,b)},c.getTypeOf=function(a){return d.getTypeOf(a)},c.checkSupport=function(a){return d.checkSupport(a)},c.MAX_VALUE_16BITS=d.MAX_VALUE_16BITS,c.MAX_VALUE_32BITS=d.MAX_VALUE_32BITS,c.pretty=function(a){return d.pretty(a)},c.findCompression=function(a){return d.findCompression(a)},c.isRegExp=function(a){return d.isRegExp(a)}},{"./utils":21}],8:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("pako");c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a){return e.deflateRaw(a)},c.uncompress=function(a){return e.inflateRaw(a)}},{pako:24}],9:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.comment=null,this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}var d=a("./base64");c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./deprecatedPublicUtils"),c.base64={encode:function(a){return d.encode(a)},decode:function(a){return d.decode(a)}},c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},t=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},x=function(a,b){return"/"!=a.slice(-1)&&(a+="/"),b="undefined"!=typeof b?b:!1,this.files[a]||v.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},y=function(a,b){var c,f=new j;return a._data instanceof j?(f.uncompressedSize=a._data.uncompressedSize,f.crc32=a._data.crc32,0===f.uncompressedSize||a.dir?(b=i.STORE,f.compressedContent="",f.crc32=0):a._data.compressionMethod===b.magic?f.compressedContent=a._data.getCompressedContent():(c=a._data.getContent(),f.compressedContent=b.compress(d.transformTo(b.compressInputType,c)))):(c=p(a),(!c||0===c.length||a.dir)&&(b=i.STORE,c=""),f.uncompressedSize=c.length,f.crc32=e(c),f.compressedContent=b.compress(d.transformTo(b.compressInputType,c))),f.compressedSize=f.compressedContent.length,f.compressionMethod=b.magic,f},z=function(a,b,c,g){var h,i,j,k,m=(c.compressedContent,d.transformTo("string",l.utf8encode(b.name))),n=b.comment||"",o=d.transformTo("string",l.utf8encode(n)),p=m.length!==b.name.length,q=o.length!==n.length,r=b.options,t="",u="",v="";j=b._initialMetadata.dir!==b.dir?b.dir:r.dir,k=b._initialMetadata.date!==b.date?b.date:r.date,h=k.getHours(),h<<=6,h|=k.getMinutes(),h<<=5,h|=k.getSeconds()/2,i=k.getFullYear()-1980,i<<=4,i|=k.getMonth()+1,i<<=5,i|=k.getDate(),p&&(u=s(1,1)+s(e(m),4)+m,t+="up"+s(u.length,2)+u),q&&(v=s(1,1)+s(this.crc32(o),4)+o,t+="uc"+s(v.length,2)+v);var w="";w+="\n\x00",w+=p||q?"\x00\b":"\x00\x00",w+=c.compressionMethod,w+=s(h,2),w+=s(i,2),w+=s(c.crc32,4),w+=s(c.compressedSize,4),w+=s(c.uncompressedSize,4),w+=s(m.length,2),w+=s(t.length,2);var x=f.LOCAL_FILE_HEADER+w+m+t,y=f.CENTRAL_FILE_HEADER+"\x00"+w+s(o.length,2)+"\x00\x00\x00\x00"+(j===!0?"\x00\x00\x00":"\x00\x00\x00\x00")+s(g,4)+m+t+o;return{fileRecord:x,dirRecord:y,compressedObject:c}},A={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new r(d.name,d._data,t(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(d.isRegExp(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}return this.filter(function(b,c){return!c.dir&&b===a})[0]||null}return a=this.root+a,v.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d.isRegExp(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=x.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5}],19:[function(a,b){"use strict";var c=a("./utils"),d=function(a){this.data=new Uint8Array(a),this.index=0};d.prototype={append:function(a){0!==a.length&&(a=c.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}},b.exports=d},{"./utils":21}],20:[function(a,b,c){"use strict";for(var d=a("./utils"),e=a("./support"),f=a("./nodeBuffer"),g=new Array(256),h=0;256>h;h++)g[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;g[254]=g[254]=1;var i=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=e.uint8array?new Uint8Array(i):new Array(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},j=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+g[a[c]]>b?c:b},k=function(a){var b,c,e,f,h=a.length,i=new Array(2*h);for(c=0,b=0;h>b;)if(e=a[b++],128>e)i[c++]=e;else if(f=g[e],f>4)i[c++]=65533,b+=f-1;else{for(e&=2===f?31:3===f?15:7;f>1&&h>b;)e=e<<6|63&a[b++],f--;f>1?i[c++]=65533:65536>e?i[c++]=e:(e-=65536,i[c++]=55296|e>>10&1023,i[c++]=56320|1023&e)}return i.length!==c&&(i.subarray?i=i.subarray(0,c):i.length=c),d.applyFromCharCode(i)};c.utf8encode=function(a){return e.nodebuffer?f(a,"utf-8"):i(a)},c.utf8decode=function(a){if(e.nodebuffer)return d.transformTo("nodebuffer",a).toString("utf-8");a=d.transformTo(e.uint8array?"uint8array":"array",a);for(var b=[],c=0,f=a.length,g=65536;f>c;){var h=j(a,Math.min(c+g,f));b.push(k(e.uint8array?a.subarray(c,h):a.slice(c,h))),c=h}return b.join("")}},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support"),k=a("./object");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength),this.zipComment=k.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==n)throw new Error(j[c]);b.header&&g.deflateSetHeader(this.strm,b.header) -};s.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?m:l,e.input="string"==typeof a?i.string2buf(a):a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new h.Buf8(f),e.next_out=0,e.avail_out=f),c=g.deflate(e,d),c!==o&&c!==n)return this.onEnd(c),this.ended=!0,!1;(0===e.avail_out||0===e.avail_in&&d===m)&&this.onData("string"===this.options.to?i.buf2binstring(h.shrinkBuf(e.output,e.next_out)):h.shrinkBuf(e.output,e.next_out))}while((e.avail_in>0||0===e.avail_out)&&c!==o);return d===m?(c=g.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===n):!0},s.prototype.onData=function(a){this.chunks.push(a)},s.prototype.onEnd=function(a){a===n&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=s,c.deflate=d,c.deflateRaw=e,c.gzip=f},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(a,b,c){"use strict";function d(a,b){var c=new m(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}var f=a("./zlib/inflate.js"),g=a("./utils/common"),h=a("./utils/strings"),i=a("./zlib/constants"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=a("./zlib/gzheader"),m=function(a){this.options=g.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=f.inflateInit2(this.strm,b.windowBits);if(c!==i.Z_OK)throw new Error(j[c]);this.header=new l,f.inflateGetHeader(this.strm,this.header)};m.prototype.push=function(a,b){var c,d,e,j,k,l=this.strm,m=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?i.Z_FINISH:i.Z_NO_FLUSH,l.input="string"==typeof a?h.binstring2buf(a):a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new g.Buf8(m),l.next_out=0,l.avail_out=m),c=f.inflate(l,i.Z_NO_FLUSH),c!==i.Z_STREAM_END&&c!==i.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0===l.avail_out||c===i.Z_STREAM_END||0===l.avail_in&&d===i.Z_FINISH)&&("string"===this.options.to?(e=h.utf8border(l.output,l.next_out),j=l.next_out-e,k=h.buf2string(l.output,e),l.next_out=j,l.avail_out=m-j,j&&g.arraySet(l.output,l.output,e,j,0),this.onData(k)):this.onData(g.shrinkBuf(l.output,l.next_out)))}while(l.avail_in>0&&c!==i.Z_STREAM_END);return c===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(c=f.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===i.Z_OK):!0},m.prototype.onData=function(a){this.chunks.push(a)},m.prototype.onEnd=function(a){a===i.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):g.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=m,c.inflate=d,c.inflateRaw=e,c.ungzip=d},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],28:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":27}],29:[function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=c},{}],30:[function(a,b){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();b.exports=d},{}],32:[function(a,b,c){"use strict";function d(a,b){return a.msg=G[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-jb?a.strstart-(a.w_size-jb):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ib,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ib-(m-f),f=m-ib,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-jb)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=hb)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sb;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sb;if(a.strstart-a.block_start>=a.w_size-jb&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sb:sb}function o(a,b){for(var c,d;;){if(a.lookahead=hb&&(a.ins_h=(a.ins_h<=hb)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-hb),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=hb){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<=hb&&(a.ins_h=(a.ins_h<4096)&&(a.match_length=hb-1)),a.prev_length>=hb&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-hb,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-hb),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<=hb&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ib;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ib-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=hb?(c=D._tr_tally(a,1,a.match_length-hb),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sb;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=hb-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fb),this.dyn_dtree=new C.Buf16(2*(2*db+1)),this.bl_tree=new C.Buf16(2*(2*eb+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(gb+1),this.heap=new C.Buf16(2*cb+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*cb+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?lb:qb,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===rb&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===lb)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=mb):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wb),h.status=qb);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=kb),m+=31-m%31,h.status=qb,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===mb)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=nb)}else h.status=nb;if(h.status===nb)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=ob)}else h.status=ob;if(h.status===ob)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pb)}else h.status=pb;if(h.status===pb&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qb)):h.status=qb),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===rb&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==rb){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ub||o===vb)&&(h.status=rb),o===sb||o===ub)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===tb&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==lb&&b!==mb&&b!==nb&&b!==ob&&b!==pb&&b!==qb&&b!==rb?d(a,O):(a.state=null,b===qb?d(a,P):M)):O}var B,C=a("../utils/common"),D=a("./trees"),E=a("./adler32"),F=a("./crc32"),G=a("./messages"),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,ab=29,bb=256,cb=bb+1+ab,db=30,eb=19,fb=2*cb+1,gb=15,hb=3,ib=258,jb=ib+hb+1,kb=32,lb=42,mb=69,nb=73,ob=91,pb=103,qb=113,rb=666,sb=1,tb=2,ub=3,vb=4,wb=3,xb=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xb(0,0,0,0,n),new xb(4,4,8,4,o),new xb(4,5,16,8,o),new xb(4,6,32,32,o),new xb(4,4,16,16,p),new xb(8,16,32,32,p),new xb(8,16,128,128,p),new xb(8,32,128,256,p),new xb(32,128,258,1024,p),new xb(32,258,258,4096,p)],c.deflateInit=y,c.deflateInit2=x,c.deflateReset=v,c.deflateResetKeep=u,c.deflateSetHeader=w,c.deflate=z,c.deflateEnd=A,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(a,b){"use strict";function c(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=c},{}],34:[function(a,b){"use strict";var c=30,d=12;b.exports=function(a,b){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;e=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=e.dmax,l=e.wsize,m=e.whave,n=e.wnext,o=e.window,p=e.hold,q=e.bits,r=e.lencode,s=e.distcode,t=(1<q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<q&&(p+=B[f++]<>>=w,q-=w),15>q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<q&&(p+=B[f++]<q&&(p+=B[f++]<k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},{}],35:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(ob),b.distcode=b.distdyn=new r.Buf32(pb),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,rb)}function k(a){if(sb){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sb=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whaven;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Bb,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=lb;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=lb;break}if(m>>>=4,n-=4,wb=(15&m)+8,0===c.wbits)c.wbits=wb;else if(wb>c.wbits){a.msg="invalid window size",c.mode=lb;break}c.dmax=1<n;){if(0===i)break a;i--,m+=e[g++]<>8&1),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,Bb[2]=m>>>16&255,Bb[3]=m>>>24&255,c.check=t(c.check,Bb,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>8),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wb=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wb)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.name+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.comment+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>=7&n,n-=7&n,c.mode=ib;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=bb,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=lb}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<>>16^65535)){a.msg="invalid stored block lengths",c.mode=lb;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=lb;break}c.have=0,c.mode=_;case _:for(;c.haven;){if(0===i)break a;i--,m+=e[g++]<>>=3,n-=3}for(;c.have<19;)c.lens[Cb[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,yb={bits:c.lenbits},xb=v(w,c.lens,0,19,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid code lengths set",c.mode=lb;break}c.have=0,c.mode=ab;case ab:for(;c.have>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<sb)m>>>=qb,n-=qb,c.lens[c.have++]=sb;else{if(16===sb){for(zb=qb+2;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,0===c.have){a.msg="invalid bit length repeat",c.mode=lb;break}wb=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sb){for(zb=qb+3;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,wb=0,q=3+(7&m),m>>>=3,n-=3}else{for(zb=qb+7;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,wb=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=lb;break}for(;q--;)c.lens[c.have++]=wb}}if(c.mode===lb)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=lb;break}if(c.lenbits=9,yb={bits:c.lenbits},xb=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid literal/lengths set",c.mode=lb;break}if(c.distbits=6,c.distcode=c.distdyn,yb={bits:c.distbits},xb=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,yb),c.distbits=yb.bits,xb){a.msg="invalid distances set",c.mode=lb;break}if(c.mode=bb,b===B)break a;case bb:c.mode=cb;case cb:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);break}for(c.back=0;Ab=c.lencode[m&(1<>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,c.length=sb,0===rb){c.mode=hb;break}if(32&rb){c.back=-1,c.mode=V;break}if(64&rb){a.msg="invalid literal/length code",c.mode=lb;break}c.extra=15&rb,c.mode=db;case db:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=eb;case eb:for(;Ab=c.distcode[m&(1<>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,64&rb){a.msg="invalid distance code",c.mode=lb;break}c.offset=sb,c.extra=15&rb,c.mode=fb;case fb:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=lb;break}c.mode=gb;case gb:if(0===j)break a; -if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=lb;break}q>c.wnext?(q-=c.wnext,ob=c.wsize-q):ob=c.wnext-q,q>c.length&&(q=c.length),pb=c.window}else pb=f,ob=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pb[ob++];while(--q);0===c.length&&(c.mode=cb);break;case hb:if(0===j)break a;f[h++]=c.length,j--,c.mode=cb;break;case ib:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<n;){if(0===i)break a;i--,m+=e[g++]<=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[n+E]]++;for(H=C,G=d;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;d>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===g||1!==G))return-1;for(Q[1]=0,D=1;d>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[n+E]&&(r[Q[b[n+E]]++]=E);if(a===g?(N=R=r,y=19):a===h?(N=j,O-=257,R=k,S-=257,y=256):(N=l,R=m,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<e||a===i&&L>f)return 1;for(var T=0;;){T++,z=D-J,r[E]y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[n+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<e||a===i&&L>f)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":27}],37:[function(a,b){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],38:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?gb[a]:gb[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ib[d]=c,a=0;a<1<<_[d];a++)hb[c++]=d;for(hb[c-1]=d,e=0,d=0;16>d;d++)for(jb[d]=e,a=0;a<1<>=7;R>d;d++)for(jb[d]=e<<7,a=0;a<1<=b;b++)f[b]=0;for(a=0;143>=a;)eb[2*a+1]=8,a++,f[8]++;for(;255>=a;)eb[2*a+1]=9,a++,f[9]++;for(;279>=a;)eb[2*a+1]=7,a++,f[7]++;for(;287>=a;)eb[2*a+1]=8,a++,f[8]++;for(l(eb,Q+1,f),a=0;R>a;a++)fb[2*a+1]=5,fb[2*a]=i(a,5);kb=new nb(eb,_,P+1,Q,U),lb=new nb(fb,ab,0,R,U),mb=new nb(new Array(0),bb,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++hh?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++jj){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*cb[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*cb[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pb||(m(),pb=!0),a.l_desc=new ob(a.dyn_ltree,kb),a.d_desc=new ob(a.dyn_dtree,lb),a.bl_desc=new ob(a.bl_tree,mb),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,eb),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,eb,fb)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(hb[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=a("../utils/common"),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ab=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],db=512,eb=new Array(2*(Q+2));d(eb);var fb=new Array(2*R);d(fb);var gb=new Array(db);d(gb);var hb=new Array(N-M+1);d(hb);var ib=new Array(O);d(ib);var jb=new Array(R);d(jb);var kb,lb,mb,nb=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},ob=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pb=!1;c._tr_init=z,c._tr_stored_block=A,c._tr_flush_block=C,c._tr_tally=D,c._tr_align=B},{"../utils/common":27}],39:[function(a,b){"use strict";function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=c},{}]},{},[9])(9)}),function(){"use strict";var a={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin",cap:["cap","pcap"],"cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",javascript:"js",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf",smil:["smi","smil"],"xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":"odm","vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-debian-package":["deb","udeb"],"x-director":["dcr","dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-koan":["skp","skd","skt","skm"],"x-kpresenter":["kpr","kpt"],"x-kword":["kwd","kwt"],"x-latex":"latex","x-lha":"lha","x-lyx":"lyx","x-lzh":"lzh","x-lzx":"lzx","x-maker":["frm","maker","frame","fm","fb","book","fbdoc"],"x-ms-wmd":"wmd","x-ms-wmz":"wmz","x-msdos-program":["com","exe","bat","dll"],"x-msi":"msi","x-netcdf":["nc","cdf"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":"rpm","x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tcl":"tcl","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-troff":["t","tr","roff"],"x-troff-man":"man","x-troff-me":"me","x-troff-ms":"ms","x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix",json:"json","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":"mathml",mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-otf":"otf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-font-woff":"woff","x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","x-msdownload":["exe","dll","com","bat","msi"],"x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tads":"gam","x-tex":"tex","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-compressed":"tgz","x-gzip":"gz","x-perfmon":["pma","pmc","pml","pmr","pmw"],"x-pkcs7-mime":["p7c","p7m"],"ynd.ms-pkipko":"pko"},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp2","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":["aif","aiff","aifc"],"x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2","x-wav":"wav",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-aac":"aac","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",mid:["mid","rmi"]},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":["mmd","mmod"],"x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":["sd","sdf"],"x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","mpc","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":["val","aso"],"x-pdb":["pdb","ent"],"x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-photoshop":"psd","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",pipeg:"jfif"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":["x3d","x3dz"],"x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",mathml:"mml",plain:["txt","text","brf","conf","def","list","log","in","bas"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:["tm","ts"],"tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":["diff","patch"],"x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas"],"x-pcs-gcd":"gcd","x-perl":["pl","pm"],"x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","cc","cxx","cpp","h","hh","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt"},video:{"3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","vrml","wrl","flr","wrz","xaf","xof"]}},b=function(){var b,c,d,e,f={}; -for(b in a)if(a.hasOwnProperty(b))for(c in a[b])if(a[b].hasOwnProperty(c))if(d=a[b][c],"string"==typeof d)f[d]=b+"/"+c;else for(e=0;e>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":8}],4:[function(a,b){"use strict";var c=a("./utils"),d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var e="string"!==c.getTypeOf(a);"undefined"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=e?a[i]:a.charCodeAt(i),g=255&(b^h),f=d[g],b=b>>>8^f;return-1^b}},{"./utils":21}],5:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.lengtha)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":21}],6:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!1,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],7:[function(a,b,c){"use strict";var d=a("./utils");c.string2binary=function(a){return d.string2binary(a)},c.string2Uint8Array=function(a){return d.transformTo("uint8array",a)},c.uint8Array2String=function(a){return d.transformTo("string",a)},c.string2Blob=function(a){var b=d.transformTo("arraybuffer",a);return d.arrayBuffer2Blob(b)},c.arrayBuffer2Blob=function(a){return d.arrayBuffer2Blob(a)},c.transformTo=function(a,b){return d.transformTo(a,b)},c.getTypeOf=function(a){return d.getTypeOf(a)},c.checkSupport=function(a){return d.checkSupport(a)},c.MAX_VALUE_16BITS=d.MAX_VALUE_16BITS,c.MAX_VALUE_32BITS=d.MAX_VALUE_32BITS,c.pretty=function(a){return d.pretty(a)},c.findCompression=function(a){return d.findCompression(a)},c.isRegExp=function(a){return d.isRegExp(a)}},{"./utils":21}],8:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("pako");c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a,b){return e.deflateRaw(a,{level:b.level||-1})},c.uncompress=function(a){return e.inflateRaw(a)}},{pako:24}],9:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.comment=null,this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}var d=a("./base64");c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./deprecatedPublicUtils"),c.base64={encode:function(a){return d.encode(a)},decode:function(a){return d.decode(a)}},c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;gc;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},t=function(){var a,b,c={};for(a=0;a0?a.substring(0,b):""},x=function(a){return"/"!=a.slice(-1)&&(a+="/"),a},y=function(a,b){return b="undefined"!=typeof b?b:!1,a=x(a),this.files[a]||v.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},z=function(a,b,c){var f,g=new j;return a._data instanceof j?(g.uncompressedSize=a._data.uncompressedSize,g.crc32=a._data.crc32,0===g.uncompressedSize||a.dir?(b=i.STORE,g.compressedContent="",g.crc32=0):a._data.compressionMethod===b.magic?g.compressedContent=a._data.getCompressedContent():(f=a._data.getContent(),g.compressedContent=b.compress(d.transformTo(b.compressInputType,f),c))):(f=p(a),(!f||0===f.length||a.dir)&&(b=i.STORE,f=""),g.uncompressedSize=f.length,g.crc32=e(f),g.compressedContent=b.compress(d.transformTo(b.compressInputType,f),c)),g.compressedSize=g.compressedContent.length,g.compressionMethod=b.magic,g},A=function(a,b){var c=a;return a||(c=b?16893:33204),(65535&c)<<16},B=function(a){return 63&(a||0)},C=function(a,b,c,g,h){var i,j,k,m,n=(c.compressedContent,d.transformTo("string",l.utf8encode(b.name))),o=b.comment||"",p=d.transformTo("string",l.utf8encode(o)),q=n.length!==b.name.length,r=p.length!==o.length,t=b.options,u="",v="",w="";k=b._initialMetadata.dir!==b.dir?b.dir:t.dir,m=b._initialMetadata.date!==b.date?b.date:t.date;var x=0,y=0;k&&(x|=16),"UNIX"===h?(y=798,x|=A(b.unixPermissions,k)):(y=20,x|=B(b.dosPermissions,k)),i=m.getHours(),i<<=6,i|=m.getMinutes(),i<<=5,i|=m.getSeconds()/2,j=m.getFullYear()-1980,j<<=4,j|=m.getMonth()+1,j<<=5,j|=m.getDate(),q&&(v=s(1,1)+s(e(n),4)+n,u+="up"+s(v.length,2)+v),r&&(w=s(1,1)+s(this.crc32(p),4)+p,u+="uc"+s(w.length,2)+w);var z="";z+="\n\x00",z+=q||r?"\x00\b":"\x00\x00",z+=c.compressionMethod,z+=s(i,2),z+=s(j,2),z+=s(c.crc32,4),z+=s(c.compressedSize,4),z+=s(c.uncompressedSize,4),z+=s(n.length,2),z+=s(u.length,2);var C=f.LOCAL_FILE_HEADER+z+n+u,D=f.CENTRAL_FILE_HEADER+s(y,2)+z+s(p.length,2)+"\x00\x00\x00\x00"+s(x,4)+s(g,4)+n+u+p;return{fileRecord:C,dirRecord:D,compressedObject:c}},D={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new r(d.name,d._data,t(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(d.isRegExp(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}return this.filter(function(b,c){return!c.dir&&b===a})[0]||null}return a=this.root+a,v.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d.isRegExp(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=y.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5}],19:[function(a,b){"use strict";var c=a("./utils"),d=function(a){this.data=new Uint8Array(a),this.index=0};d.prototype={append:function(a){0!==a.length&&(a=c.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}},b.exports=d},{"./utils":21}],20:[function(a,b,c){"use strict";for(var d=a("./utils"),e=a("./support"),f=a("./nodeBuffer"),g=new Array(256),h=0;256>h;h++)g[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;g[254]=g[254]=1;var i=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=e.uint8array?new Uint8Array(i):new Array(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},j=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+g[a[c]]>b?c:b},k=function(a){var b,c,e,f,h=a.length,i=new Array(2*h);for(c=0,b=0;h>b;)if(e=a[b++],128>e)i[c++]=e;else if(f=g[e],f>4)i[c++]=65533,b+=f-1;else{for(e&=2===f?31:3===f?15:7;f>1&&h>b;)e=e<<6|63&a[b++],f--;f>1?i[c++]=65533:65536>e?i[c++]=e:(e-=65536,i[c++]=55296|e>>10&1023,i[c++]=56320|1023&e)}return i.length!==c&&(i.subarray?i=i.subarray(0,c):i.length=c),d.applyFromCharCode(i)};c.utf8encode=function(a){return e.nodebuffer?f(a,"utf-8"):i(a)},c.utf8decode=function(a){if(e.nodebuffer)return d.transformTo("nodebuffer",a).toString("utf-8");a=d.transformTo(e.uint8array?"uint8array":"array",a);for(var b=[],c=0,f=a.length,g=65536;f>c;){var h=j(a,Math.min(c+g,f));b.push(e.uint8array?k(a.subarray(c,h)):k(a.slice(c,h))),c=h}return b.join("")}},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;cg&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;cb?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support"),k=a("./object");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength),this.zipComment=k.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a>8;this.dir=16&this.externalFileAttributes?!0:!1,a===h&&(this.dosPermissions=63&this.externalFileAttributes),a===i&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileName.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var a=new d(this.extraFields[1].value);this.uncompressedSize===e.MAX_VALUE_32BITS&&(this.uncompressedSize=a.readInt(8)),this.compressedSize===e.MAX_VALUE_32BITS&&(this.compressedSize=a.readInt(8)),this.localHeaderOffset===e.MAX_VALUE_32BITS&&(this.localHeaderOffset=a.readInt(8)),this.diskNumberStart===e.MAX_VALUE_32BITS&&(this.diskNumberStart=a.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index;for(this.extraFields=this.extraFields||{};a.index0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==n)throw new Error(j[c]);b.header&&g.deflateSetHeader(this.strm,b.header)};s.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?m:l,e.input="string"==typeof a?i.string2buf(a):a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new h.Buf8(f),e.next_out=0,e.avail_out=f),c=g.deflate(e,d),c!==o&&c!==n)return this.onEnd(c),this.ended=!0,!1;(0===e.avail_out||0===e.avail_in&&d===m)&&this.onData("string"===this.options.to?i.buf2binstring(h.shrinkBuf(e.output,e.next_out)):h.shrinkBuf(e.output,e.next_out))}while((e.avail_in>0||0===e.avail_out)&&c!==o);return d===m?(c=g.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===n):!0},s.prototype.onData=function(a){this.chunks.push(a)},s.prototype.onEnd=function(a){a===n&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=s,c.deflate=d,c.deflateRaw=e,c.gzip=f},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(a,b,c){"use strict";function d(a,b){var c=new m(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}var f=a("./zlib/inflate.js"),g=a("./utils/common"),h=a("./utils/strings"),i=a("./zlib/constants"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=a("./zlib/gzheader"),m=function(a){this.options=g.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=f.inflateInit2(this.strm,b.windowBits);if(c!==i.Z_OK)throw new Error(j[c]);this.header=new l,f.inflateGetHeader(this.strm,this.header)};m.prototype.push=function(a,b){var c,d,e,j,k,l=this.strm,m=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?i.Z_FINISH:i.Z_NO_FLUSH,l.input="string"==typeof a?h.binstring2buf(a):a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new g.Buf8(m),l.next_out=0,l.avail_out=m),c=f.inflate(l,i.Z_NO_FLUSH),c!==i.Z_STREAM_END&&c!==i.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0===l.avail_out||c===i.Z_STREAM_END||0===l.avail_in&&d===i.Z_FINISH)&&("string"===this.options.to?(e=h.utf8border(l.output,l.next_out),j=l.next_out-e,k=h.buf2string(l.output,e),l.next_out=j,l.avail_out=m-j,j&&g.arraySet(l.output,l.output,e,j,0),this.onData(k)):this.onData(g.shrinkBuf(l.output,l.next_out)))}while(l.avail_in>0&&c!==i.Z_STREAM_END);return c===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(c=f.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===i.Z_OK):!0},m.prototype.onData=function(a){this.chunks.push(a)},m.prototype.onEnd=function(a){a===i.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):g.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=m,c.inflate=d,c.inflateRaw=e,c.ungzip=d},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],28:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":27}],29:[function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=c},{}],30:[function(a,b){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();b.exports=d},{}],32:[function(a,b,c){"use strict";function d(a,b){return a.msg=G[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-jb?a.strstart-(a.w_size-jb):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ib,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ib-(m-f),f=m-ib,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-jb)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=hb)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sb;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sb;if(a.strstart-a.block_start>=a.w_size-jb&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sb:sb}function o(a,b){for(var c,d;;){if(a.lookahead=hb&&(a.ins_h=(a.ins_h<=hb)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-hb),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=hb){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<=hb&&(a.ins_h=(a.ins_h<4096)&&(a.match_length=hb-1)),a.prev_length>=hb&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-hb,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-hb),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<=hb&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ib;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ib-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=hb?(c=D._tr_tally(a,1,a.match_length-hb),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sb;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=hb-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fb),this.dyn_dtree=new C.Buf16(2*(2*db+1)),this.bl_tree=new C.Buf16(2*(2*eb+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(gb+1),this.heap=new C.Buf16(2*cb+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*cb+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?lb:qb,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===rb&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===lb)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=mb):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wb),h.status=qb);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=kb),m+=31-m%31,h.status=qb,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===mb)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=nb)}else h.status=nb;if(h.status===nb)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=ob)}else h.status=ob;if(h.status===ob)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindexk&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pb)}else h.status=pb;if(h.status===pb&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qb)):h.status=qb),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===rb&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==rb){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ub||o===vb)&&(h.status=rb),o===sb||o===ub)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===tb&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==lb&&b!==mb&&b!==nb&&b!==ob&&b!==pb&&b!==qb&&b!==rb?d(a,O):(a.state=null,b===qb?d(a,P):M)):O}var B,C=a("../utils/common"),D=a("./trees"),E=a("./adler32"),F=a("./crc32"),G=a("./messages"),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,ab=29,bb=256,cb=bb+1+ab,db=30,eb=19,fb=2*cb+1,gb=15,hb=3,ib=258,jb=ib+hb+1,kb=32,lb=42,mb=69,nb=73,ob=91,pb=103,qb=113,rb=666,sb=1,tb=2,ub=3,vb=4,wb=3,xb=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xb(0,0,0,0,n),new xb(4,4,8,4,o),new xb(4,5,16,8,o),new xb(4,6,32,32,o),new xb(4,4,16,16,p),new xb(8,16,32,32,p),new xb(8,16,128,128,p),new xb(8,32,128,256,p),new xb(32,128,258,1024,p),new xb(32,258,258,4096,p)],c.deflateInit=y,c.deflateInit2=x,c.deflateReset=v,c.deflateResetKeep=u,c.deflateSetHeader=w,c.deflate=z,c.deflateEnd=A,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(a,b){"use strict";function c(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=c},{}],34:[function(a,b){"use strict";var c=30,d=12;b.exports=function(a,b){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;e=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=e.dmax,l=e.wsize,m=e.whave,n=e.wnext,o=e.window,p=e.hold,q=e.bits,r=e.lencode,s=e.distcode,t=(1<q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<q&&(p+=B[f++]<>>=w,q-=w),15>q&&(p+=B[f++]<>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<q&&(p+=B[f++]<q&&(p+=B[f++]<k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},{}],35:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(ob),b.distcode=b.distdyn=new r.Buf32(pb),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,rb)}function k(a){if(sb){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sb=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whaven;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Bb,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=lb;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=lb;break}if(m>>>=4,n-=4,wb=(15&m)+8,0===c.wbits)c.wbits=wb;else if(wb>c.wbits){a.msg="invalid window size",c.mode=lb;break}c.dmax=1<n;){if(0===i)break a;i--,m+=e[g++]<>8&1),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,Bb[2]=m>>>16&255,Bb[3]=m>>>24&255,c.check=t(c.check,Bb,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>8),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wb=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wb)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.name+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.comment+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<>>=7&n,n-=7&n,c.mode=ib;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=bb,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=lb}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<>>16^65535)){a.msg="invalid stored block lengths",c.mode=lb;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=lb;break}c.have=0,c.mode=_;case _:for(;c.haven;){if(0===i)break a;i--,m+=e[g++]<>>=3,n-=3}for(;c.have<19;)c.lens[Cb[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,yb={bits:c.lenbits},xb=v(w,c.lens,0,19,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid code lengths set",c.mode=lb;break}c.have=0,c.mode=ab;case ab:for(;c.have>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<sb)m>>>=qb,n-=qb,c.lens[c.have++]=sb;else{if(16===sb){for(zb=qb+2;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,0===c.have){a.msg="invalid bit length repeat",c.mode=lb;break}wb=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sb){for(zb=qb+3;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,wb=0,q=3+(7&m),m>>>=3,n-=3}else{for(zb=qb+7;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=qb,n-=qb,wb=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=lb;break}for(;q--;)c.lens[c.have++]=wb}}if(c.mode===lb)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=lb;break}if(c.lenbits=9,yb={bits:c.lenbits},xb=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid literal/lengths set",c.mode=lb;break}if(c.distbits=6,c.distcode=c.distdyn,yb={bits:c.distbits},xb=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,yb),c.distbits=yb.bits,xb){a.msg="invalid distances set",c.mode=lb;break}if(c.mode=bb,b===B)break a;case bb:c.mode=cb;case cb:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1); +break}for(c.back=0;Ab=c.lencode[m&(1<>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,c.length=sb,0===rb){c.mode=hb;break}if(32&rb){c.back=-1,c.mode=V;break}if(64&rb){a.msg="invalid literal/length code",c.mode=lb;break}c.extra=15&rb,c.mode=db;case db:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=eb;case eb:for(;Ab=c.distcode[m&(1<>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,64&rb){a.msg="invalid distance code",c.mode=lb;break}c.offset=sb,c.extra=15&rb,c.mode=fb;case fb:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=lb;break}c.mode=gb;case gb:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=lb;break}q>c.wnext?(q-=c.wnext,ob=c.wsize-q):ob=c.wnext-q,q>c.length&&(q=c.length),pb=c.window}else pb=f,ob=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pb[ob++];while(--q);0===c.length&&(c.mode=cb);break;case hb:if(0===j)break a;f[h++]=c.length,j--,c.mode=cb;break;case ib:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<n;){if(0===i)break a;i--,m+=e[g++]<=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[n+E]]++;for(H=C,G=d;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;d>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===g||1!==G))return-1;for(Q[1]=0,D=1;d>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[n+E]&&(r[Q[b[n+E]]++]=E);if(a===g?(N=R=r,y=19):a===h?(N=j,O-=257,R=k,S-=257,y=256):(N=l,R=m,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<e||a===i&&L>f)return 1;for(var T=0;;){T++,z=D-J,r[E]y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[n+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<e||a===i&&L>f)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":27}],37:[function(a,b){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],38:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?gb[a]:gb[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ib[d]=c,a=0;a<1<<_[d];a++)hb[c++]=d;for(hb[c-1]=d,e=0,d=0;16>d;d++)for(jb[d]=e,a=0;a<1<>=7;R>d;d++)for(jb[d]=e<<7,a=0;a<1<=b;b++)f[b]=0;for(a=0;143>=a;)eb[2*a+1]=8,a++,f[8]++;for(;255>=a;)eb[2*a+1]=9,a++,f[9]++;for(;279>=a;)eb[2*a+1]=7,a++,f[7]++;for(;287>=a;)eb[2*a+1]=8,a++,f[8]++;for(l(eb,Q+1,f),a=0;R>a;a++)fb[2*a+1]=5,fb[2*a]=i(a,5);kb=new nb(eb,_,P+1,Q,U),lb=new nb(fb,ab,0,R,U),mb=new nb(new Array(0),bb,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++hh?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++jj){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*cb[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*cb[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pb||(m(),pb=!0),a.l_desc=new ob(a.dyn_ltree,kb),a.d_desc=new ob(a.dyn_dtree,lb),a.bl_desc=new ob(a.bl_tree,mb),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,eb),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,eb,fb)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(hb[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=a("../utils/common"),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ab=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],db=512,eb=new Array(2*(Q+2));d(eb);var fb=new Array(2*R);d(fb);var gb=new Array(db);d(gb);var hb=new Array(N-M+1);d(hb);var ib=new Array(O);d(ib);var jb=new Array(R);d(jb);var kb,lb,mb,nb=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},ob=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pb=!1;c._tr_init=z,c._tr_stored_block=A,c._tr_flush_block=C,c._tr_tally=D,c._tr_align=B},{"../utils/common":27}],39:[function(a,b){"use strict";function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=c},{}]},{},[9])(9)}); \ No newline at end of file diff --git a/epub.js/libs/zip.min.map b/epub.js/libs/zip.min.map index 0150832..f7f73f0 100644 --- a/epub.js/libs/zip.min.map +++ b/epub.js/libs/zip.min.map @@ -1 +1 @@ -{"version":3,"file":"zip.min.js","sources":["../../libs/jszip/jszip.min.js","../../libs/jszip/mime-types.js"],"names":["a","exports","module","define","amd","b","window","global","self","JSZip","c","d","e","g","h","i","require","f","Error","j","call","length",1,"encode","k","charCodeAt","isNaN","charAt","decode","replace","indexOf","String","fromCharCode",2,"this","compressedSize","uncompressedSize","crc32","compressionMethod","compressedContent","prototype","getContent","getCompressedContent",3,"STORE","magic","compress","uncompress","compressInputType","uncompressInputType","DEFLATE","./flate",4,"getTypeOf","./utils",5,"data","index","checkOffset","checkIndex","setIndex","skip","byteAt","readInt","readString","transformTo","readData","lastIndexOfSignature","readDate","Date",6,"base64","binary","dir","createFolders","date","compression","comment",7,"string2binary","string2Uint8Array","uint8Array2String","string2Blob","arrayBuffer2Blob","checkSupport","MAX_VALUE_16BITS","MAX_VALUE_32BITS","pretty","findCompression","isRegExp",8,"Uint8Array","Uint16Array","Uint32Array","deflateRaw","inflateRaw","pako",9,"files","root","load","clone","support","defaults","utils","compressions","./base64","./compressions","./defaults","./deprecatedPublicUtils","./load","./object","./support",10,"file","fileName","decompressed","optimizedBinaryString","fileComment","zipComment","./zipEntries",11,"test","isBuffer","Buffer",12,"slice","./uint8ArrayReader",13,"l","m","n","o","_data","options","set","p","nodebuffer","asBinary","q","A","utf8decode","utf8encode","r","name","_initialMetadata","asText","asNodeBuffer","asUint8Array","asArrayBuffer","buffer","s","t","arguments","hasOwnProperty","u","toUpperCase","v","w","x","substring","lastIndexOf","y","z","getHours","getMinutes","getSeconds","getFullYear","getMonth","getDate","LOCAL_FILE_HEADER","CENTRAL_FILE_HEADER","fileRecord","dirRecord","compressedObject","filter","push","folder","remove","generate","type","CENTRAL_DIRECTORY_END","toLowerCase","append","finalize","./compressedObject","./crc32","./nodeBuffer","./signature","./stringWriter","./uint8ArrayWriter","./utf8",14,"ZIP64_CENTRAL_DIRECTORY_LOCATOR","ZIP64_CENTRAL_DIRECTORY_END","DATA_DESCRIPTOR",15,"./dataReader",16,"join",17,"array","string","arraybuffer","ArrayBuffer","uint8array","blob","Blob","size","BlobBuilder","WebKitBlobBuilder","MozBlobBuilder","MSBlobBuilder","getBlob",18,"subarray",19,20,"Array","applyFromCharCode","toString","Math","min",21,"apply","floor","byteLength","Object",22,"loadOptions","checkSignature","reader","readBlockEndOfCentral","diskNumber","diskWithCentralDirStart","centralDirRecordsOnThisDisk","centralDirRecords","centralDirSize","centralDirOffset","zipCommentLength","readBlockZip64EndOfCentral","zip64EndOfCentralSize","versionMadeBy","versionNeeded","zip64ExtensibleData","id","value","readBlockZip64EndOfCentralLocator","diskWithZip64CentralDirStart","relativeOffsetEndOfZip64CentralDir","disksCount","readLocalFiles","localHeaderOffset","readLocalPart","handleUTF8","readCentralDir","zip64","readCentralPart","readEndOfCentral","prepareReader","./nodeBufferReader","./stringReader","./zipEntry",23,"isEncrypted","bitFlag","useUTF8","prepareCompressedContent","prepareContent","fileNameLength","checkCRC32","extraFieldsLength","fileCommentLength","diskNumberStart","internalFileAttributes","externalFileAttributes","readExtraFields","parseZIP64ExtraField","extraFields","findExtraFieldUnicodePath","findExtraFieldUnicodeComment",24,"assign","./lib/deflate","./lib/inflate","./lib/utils/common","./lib/zlib/constants",25,"err","msg","result","raw","gzip","level","method","chunkSize","windowBits","memLevel","strategy","to","ended","chunks","strm","avail_out","deflateInit2","header","deflateSetHeader","input","string2buf","next_in","avail_in","output","Buf8","next_out","deflate","onEnd","onData","buf2binstring","shrinkBuf","deflateEnd","flattenChunks","Deflate","./utils/common","./utils/strings","./zlib/deflate.js","./zlib/messages","./zlib/zstream",26,"inflateInit2","Z_OK","inflateGetHeader","Z_FINISH","Z_NO_FLUSH","binstring2buf","inflate","Z_STREAM_END","utf8border","buf2string","arraySet","inflateEnd","Inflate","ungzip","./zlib/constants","./zlib/gzheader","./zlib/inflate.js",27,"Int32Array","shift","TypeError","concat","setTyped","Buf16","Buf32",28,"./common",29,30,"Z_PARTIAL_FLUSH","Z_SYNC_FLUSH","Z_FULL_FLUSH","Z_BLOCK","Z_TREES","Z_NEED_DICT","Z_ERRNO","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","Z_NO_COMPRESSION","Z_BEST_SPEED","Z_BEST_COMPRESSION","Z_DEFAULT_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_FIXED","Z_DEFAULT_STRATEGY","Z_BINARY","Z_TEXT","Z_UNKNOWN","Z_DEFLATED",31,32,"G","state","pending","C","pending_buf","pending_out","total_out","D","_tr_flush_block","block_start","strstart","wrap","adler","E","F","total_in","max_chain_length","prev_length","nice_match","w_size","jb","w_mask","prev","ib","good_match","lookahead","match_start","window_size","hash_size","head","insert","hb","ins_h","hash_shift","hash_mask","pending_buf_size","H","sb","K","ub","vb","match_length","_tr_tally","max_lazy_match","last_lit","tb","prev_match","S","match_available","B","max_lazy","good_length","nice_length","max_chain","status","gzhead","gzindex","Y","last_flush","w_bits","hash_bits","dyn_ltree","fb","dyn_dtree","db","bl_tree","eb","l_desc","d_desc","bl_desc","bl_count","gb","heap","cb","heap_len","heap_max","depth","l_buf","lit_bufsize","d_buf","opt_len","static_len","matches","bi_buf","bi_valid","data_type","X","lb","qb","_tr_init","M","O","R","Z","V","$","_","W","L","rb","Q","text","hcrc","extra","time","T","os","mb","wb","kb","nb","ob","pb","U","func","I","_tr_align","_tr_stored_block","J","N","P","ab","bb","xb","deflateInit","deflateReset","deflateResetKeep","deflateInfo","../utils/common","./adler32","./messages","./trees",33,"xflags","extra_len","done",34,"dmax","wsize","whave","wnext","hold","bits","lencode","distcode","lenbits","distbits","mode","sane",35,"last","havedict","flags","check","total","wbits","offset","ncode","nlen","ndist","have","next","lens","work","lendyn","distdyn","back","was","yb","zb","Ab","Bb","Cb","inflateReset","inflateReset2","inflateResetKeep","inflateInit","inflateInfo","./inffast","./inftrees",36,37,"-1","-2","-3","-4","-5","-6",38,"dyn_tree","max_code","stat_desc","static_tree","has_stree","extra_bits","extra_base","max_length","elems",39,"table","application","andrew-inset","annodex","atom+xml","atomcat+xml","atomserv+xml","bbolin","cap","cu-seeme","davmount+xml","dsptype","ecmascript","futuresplash","hta","java-archive","java-serialized-object","java-vm","javascript","m3g","mac-binhex40","mathematica","msaccess","msword","mxf","oda","ogg","pdf","pgp-keys","pgp-signature","pics-rules","postscript","rar","rdf+xml","rss+xml","rtf","smil","xhtml+xml","xml","xspf+xml","zip","vnd.android.package-archive","vnd.cinderella","vnd.google-earth.kml+xml","vnd.google-earth.kmz","vnd.mozilla.xul+xml","vnd.ms-excel","vnd.ms-pki.seccat","vnd.ms-pki.stl","vnd.ms-powerpoint","vnd.oasis.opendocument.chart","vnd.oasis.opendocument.database","vnd.oasis.opendocument.formula","vnd.oasis.opendocument.graphics","vnd.oasis.opendocument.graphics-template","vnd.oasis.opendocument.image","vnd.oasis.opendocument.presentation","vnd.oasis.opendocument.presentation-template","vnd.oasis.opendocument.spreadsheet","vnd.oasis.opendocument.spreadsheet-template","vnd.oasis.opendocument.text","vnd.oasis.opendocument.text-master","vnd.oasis.opendocument.text-template","vnd.oasis.opendocument.text-web","vnd.openxmlformats-officedocument.spreadsheetml.sheet","vnd.openxmlformats-officedocument.spreadsheetml.template","vnd.openxmlformats-officedocument.presentationml.presentation","vnd.openxmlformats-officedocument.presentationml.slideshow","vnd.openxmlformats-officedocument.presentationml.template","vnd.openxmlformats-officedocument.wordprocessingml.document","vnd.openxmlformats-officedocument.wordprocessingml.template","vnd.smaf","vnd.stardivision.calc","vnd.stardivision.chart","vnd.stardivision.draw","vnd.stardivision.impress","vnd.stardivision.math","vnd.stardivision.writer","vnd.stardivision.writer-global","vnd.sun.xml.calc","vnd.sun.xml.calc.template","vnd.sun.xml.draw","vnd.sun.xml.draw.template","vnd.sun.xml.impress","vnd.sun.xml.impress.template","vnd.sun.xml.math","vnd.sun.xml.writer","vnd.sun.xml.writer.global","vnd.sun.xml.writer.template","vnd.symbian.install","vnd.visio","vnd.wap.wbxml","vnd.wap.wmlc","vnd.wap.wmlscriptc","vnd.wordperfect","vnd.wordperfect5.1","x-123","x-7z-compressed","x-abiword","x-apple-diskimage","x-bcpio","x-bittorrent","x-cbr","x-cbz","x-cdf","x-cdlink","x-chess-pgn","x-cpio","x-csh","x-debian-package","x-director","x-dms","x-doom","x-dvi","x-httpd-eruby","x-font","x-freemind","x-gnumeric","x-go-sgf","x-graphing-calculator","x-gtar","x-hdf","x-httpd-php","x-httpd-php-source","x-httpd-php3","x-httpd-php3-preprocessed","x-httpd-php4","x-httpd-php5","x-ica","x-info","x-internet-signup","x-iphone","x-iso9660-image","x-java-jnlp-file","x-jmol","x-killustrator","x-koan","x-kpresenter","x-kword","x-latex","x-lha","x-lyx","x-lzh","x-lzx","x-maker","x-ms-wmd","x-ms-wmz","x-msdos-program","x-msi","x-netcdf","x-ns-proxy-autoconfig","x-nwc","x-object","x-oz-application","x-pkcs7-certreqresp","x-python-code","x-qgis","x-quicktimeplayer","x-redhat-package-manager","x-ruby","x-sh","x-shar","x-shockwave-flash","x-silverlight","x-stuffit","x-sv4cpio","x-sv4crc","x-tar","x-tcl","x-tex-gf","x-tex-pk","x-texinfo","x-trash","x-troff","x-troff-man","x-troff-me","x-troff-ms","x-ustar","x-wais-source","x-wingz","x-x509-ca-cert","x-xcf","x-xfig","x-xpinstall","applixware","atomsvc+xml","ccxml+xml","cdmi-capability","cdmi-container","cdmi-domain","cdmi-object","cdmi-queue","docbook+xml","dssc+der","dssc+xml","emma+xml","epub+zip","exi","font-tdpfr","gml+xml","gpx+xml","gxf","hyperstudio","inkml+xml","ipfix","json","jsonml+json","lost+xml","mads+xml","marc","marcxml+xml","mathml+xml","mbox","mediaservercontrol+xml","metalink+xml","metalink4+xml","mets+xml","mods+xml","mp21","mp4","oebps-package+xml","omdoc+xml","onenote","oxps","patch-ops-error+xml","pgp-encrypted","pkcs10","pkcs7-mime","pkcs7-signature","pkcs8","pkix-attr-cert","pkix-crl","pkix-pkipath","pkixcmp","pls+xml","prs.cww","pskc+xml","reginfo+xml","relax-ng-compact-syntax","resource-lists+xml","resource-lists-diff+xml","rls-services+xml","rpki-ghostbusters","rpki-manifest","rpki-roa","rsd+xml","sbml+xml","scvp-cv-request","scvp-cv-response","scvp-vp-request","scvp-vp-response","sdp","set-payment-initiation","set-registration-initiation","shf+xml","sparql-query","sparql-results+xml","srgs","srgs+xml","sru+xml","ssdl+xml","ssml+xml","tei+xml","thraud+xml","timestamped-data","vnd.3gpp.pic-bw-large","vnd.3gpp.pic-bw-small","vnd.3gpp.pic-bw-var","vnd.3gpp2.tcap","vnd.3m.post-it-notes","vnd.accpac.simply.aso","vnd.accpac.simply.imp","vnd.acucobol","vnd.acucorp","vnd.adobe.air-application-installer-package+zip","vnd.adobe.formscentral.fcdt","vnd.adobe.fxp","vnd.adobe.xdp+xml","vnd.adobe.xfdf","vnd.ahead.space","vnd.airzip.filesecure.azf","vnd.airzip.filesecure.azs","vnd.amazon.ebook","vnd.americandynamics.acc","vnd.amiga.ami","vnd.anser-web-certificate-issue-initiation","vnd.anser-web-funds-transfer-initiation","vnd.antix.game-component","vnd.apple.installer+xml","vnd.apple.mpegurl","vnd.aristanetworks.swi","vnd.astraea-software.iota","vnd.audiograph","vnd.blueice.multipass","vnd.bmi","vnd.businessobjects","vnd.chemdraw+xml","vnd.chipnuts.karaoke-mmd","vnd.claymore","vnd.cloanto.rp9","vnd.clonk.c4group","vnd.cluetrust.cartomobile-config","vnd.cluetrust.cartomobile-config-pkg","vnd.commonspace","vnd.contact.cmsg","vnd.cosmocaller","vnd.crick.clicker","vnd.crick.clicker.keyboard","vnd.crick.clicker.palette","vnd.crick.clicker.template","vnd.crick.clicker.wordbank","vnd.criticaltools.wbs+xml","vnd.ctc-posml","vnd.cups-ppd","vnd.curl.car","vnd.curl.pcurl","vnd.dart","vnd.data-vision.rdz","vnd.dece.data","vnd.dece.ttml+xml","vnd.dece.unspecified","vnd.dece.zip","vnd.denovo.fcselayout-link","vnd.dna","vnd.dolby.mlp","vnd.dpgraph","vnd.dreamfactory","vnd.ds-keypoint","vnd.dvb.ait","vnd.dvb.service","vnd.dynageo","vnd.ecowin.chart","vnd.enliven","vnd.epson.esf","vnd.epson.msf","vnd.epson.quickanime","vnd.epson.salt","vnd.epson.ssf","vnd.eszigno3+xml","vnd.ezpix-album","vnd.ezpix-package","vnd.fdf","vnd.fdsn.mseed","vnd.fdsn.seed","vnd.flographit","vnd.fluxtime.clip","vnd.framemaker","vnd.frogans.fnc","vnd.frogans.ltf","vnd.fsc.weblaunch","vnd.fujitsu.oasys","vnd.fujitsu.oasys2","vnd.fujitsu.oasys3","vnd.fujitsu.oasysgp","vnd.fujitsu.oasysprs","vnd.fujixerox.ddd","vnd.fujixerox.docuworks","vnd.fujixerox.docuworks.binder","vnd.fuzzysheet","vnd.genomatix.tuxedo","vnd.geogebra.file","vnd.geogebra.tool","vnd.geometry-explorer","vnd.geonext","vnd.geoplan","vnd.geospace","vnd.gmx","vnd.grafeq","vnd.groove-account","vnd.groove-help","vnd.groove-identity-message","vnd.groove-injector","vnd.groove-tool-message","vnd.groove-tool-template","vnd.groove-vcard","vnd.hal+xml","vnd.handheld-entertainment+xml","vnd.hbci","vnd.hhe.lesson-player","vnd.hp-hpgl","vnd.hp-hpid","vnd.hp-hps","vnd.hp-jlyt","vnd.hp-pcl","vnd.hp-pclxl","vnd.hydrostatix.sof-data","vnd.ibm.minipay","vnd.ibm.modcap","vnd.ibm.rights-management","vnd.ibm.secure-container","vnd.iccprofile","vnd.igloader","vnd.immervision-ivp","vnd.immervision-ivu","vnd.insors.igm","vnd.intercon.formnet","vnd.intergeo","vnd.intu.qbo","vnd.intu.qfx","vnd.ipunplugged.rcprofile","vnd.irepository.package+xml","vnd.is-xpr","vnd.isac.fcs","vnd.jam","vnd.jcp.javame.midlet-rms","vnd.jisp","vnd.joost.joda-archive","vnd.kahootz","vnd.kde.karbon","vnd.kde.kchart","vnd.kde.kformula","vnd.kde.kivio","vnd.kde.kontour","vnd.kde.kpresenter","vnd.kde.kspread","vnd.kde.kword","vnd.kenameaapp","vnd.kidspiration","vnd.kinar","vnd.koan","vnd.kodak-descriptor","vnd.las.las+xml","vnd.llamagraphics.life-balance.desktop","vnd.llamagraphics.life-balance.exchange+xml","vnd.lotus-1-2-3","vnd.lotus-approach","vnd.lotus-freelance","vnd.lotus-notes","vnd.lotus-organizer","vnd.lotus-screencam","vnd.lotus-wordpro","vnd.macports.portpkg","vnd.mcd","vnd.medcalcdata","vnd.mediastation.cdkey","vnd.mfer","vnd.mfmp","vnd.micrografx.flo","vnd.micrografx.igx","vnd.mif","vnd.mobius.daf","vnd.mobius.dis","vnd.mobius.mbk","vnd.mobius.mqy","vnd.mobius.msl","vnd.mobius.plc","vnd.mobius.txf","vnd.mophun.application","vnd.mophun.certificate","vnd.ms-artgalry","vnd.ms-cab-compressed","vnd.ms-excel.addin.macroenabled.12","vnd.ms-excel.sheet.binary.macroenabled.12","vnd.ms-excel.sheet.macroenabled.12","vnd.ms-excel.template.macroenabled.12","vnd.ms-fontobject","vnd.ms-htmlhelp","vnd.ms-ims","vnd.ms-lrm","vnd.ms-officetheme","vnd.ms-powerpoint.addin.macroenabled.12","vnd.ms-powerpoint.presentation.macroenabled.12","vnd.ms-powerpoint.slide.macroenabled.12","vnd.ms-powerpoint.slideshow.macroenabled.12","vnd.ms-powerpoint.template.macroenabled.12","vnd.ms-project","vnd.ms-word.document.macroenabled.12","vnd.ms-word.template.macroenabled.12","vnd.ms-works","vnd.ms-wpl","vnd.ms-xpsdocument","vnd.mseq","vnd.musician","vnd.muvee.style","vnd.mynfc","vnd.neurolanguage.nlu","vnd.nitf","vnd.noblenet-directory","vnd.noblenet-sealer","vnd.noblenet-web","vnd.nokia.n-gage.data","vnd.nokia.n-gage.symbian.install","vnd.nokia.radio-preset","vnd.nokia.radio-presets","vnd.novadigm.edm","vnd.novadigm.edx","vnd.novadigm.ext","vnd.oasis.opendocument.chart-template","vnd.oasis.opendocument.formula-template","vnd.oasis.opendocument.image-template","vnd.olpc-sugar","vnd.oma.dd2+xml","vnd.openofficeorg.extension","vnd.openxmlformats-officedocument.presentationml.slide","vnd.osgeo.mapguide.package","vnd.osgi.dp","vnd.osgi.subsystem","vnd.palm","vnd.pawaafile","vnd.pg.format","vnd.pg.osasli","vnd.picsel","vnd.pmi.widget","vnd.pocketlearn","vnd.powerbuilder6","vnd.previewsystems.box","vnd.proteus.magazine","vnd.publishare-delta-tree","vnd.pvi.ptid1","vnd.quark.quarkxpress","vnd.realvnc.bed","vnd.recordare.musicxml","vnd.recordare.musicxml+xml","vnd.rig.cryptonote","vnd.rn-realmedia","vnd.rn-realmedia-vbr","vnd.route66.link66+xml","vnd.sailingtracker.track","vnd.seemail","vnd.sema","vnd.semd","vnd.semf","vnd.shana.informed.formdata","vnd.shana.informed.formtemplate","vnd.shana.informed.interchange","vnd.shana.informed.package","vnd.simtech-mindmapper","vnd.smart.teacher","vnd.solent.sdkm+xml","vnd.spotfire.dxp","vnd.spotfire.sfs","vnd.stepmania.package","vnd.stepmania.stepchart","vnd.sus-calendar","vnd.svd","vnd.syncml+xml","vnd.syncml.dm+wbxml","vnd.syncml.dm+xml","vnd.tao.intent-module-archive","vnd.tcpdump.pcap","vnd.tmobile-livetv","vnd.trid.tpt","vnd.triscape.mxs","vnd.trueapp","vnd.ufdl","vnd.uiq.theme","vnd.umajin","vnd.unity","vnd.uoml+xml","vnd.vcx","vnd.visionary","vnd.vsf","vnd.webturbo","vnd.wolfram.player","vnd.wqd","vnd.wt.stf","vnd.xara","vnd.xfdl","vnd.yamaha.hv-dic","vnd.yamaha.hv-script","vnd.yamaha.hv-voice","vnd.yamaha.openscoreformat","vnd.yamaha.openscoreformat.osfpvg+xml","vnd.yamaha.smaf-audio","vnd.yamaha.smaf-phrase","vnd.yellowriver-custom-menu","vnd.zul","vnd.zzazz.deck+xml","voicexml+xml","widget","winhlp","wsdl+xml","wspolicy+xml","x-ace-compressed","x-authorware-bin","x-authorware-map","x-authorware-seg","x-blorb","x-bzip","x-bzip2","x-cfs-compressed","x-chat","x-conference","x-dgc-compressed","x-dtbncx+xml","x-dtbook+xml","x-dtbresource+xml","x-eva","x-font-bdf","x-font-ghostscript","x-font-linux-psf","x-font-otf","x-font-pcf","x-font-snf","x-font-ttf","x-font-type1","x-font-woff","x-freearc","x-gca-compressed","x-glulx","x-gramps-xml","x-install-instructions","x-lzh-compressed","x-mie","x-mobipocket-ebook","x-ms-application","x-ms-shortcut","x-ms-xbap","x-msbinder","x-mscardfile","x-msclip","x-msdownload","x-msmediaview","x-msmetafile","x-msmoney","x-mspublisher","x-msschedule","x-msterminal","x-mswrite","x-nzb","x-pkcs12","x-pkcs7-certificates","x-research-info-systems","x-silverlight-app","x-sql","x-stuffitx","x-subrip","x-t3vm-image","x-tads","x-tex","x-tex-tfm","x-tgif","x-xliff+xml","x-xz","x-zmachine","xaml+xml","xcap-diff+xml","xenc+xml","xml-dtd","xop+xml","xproc+xml","xslt+xml","xv+xml","yang","yin+xml","envoy","fractals","internet-property-stream","olescript","vnd.ms-outlook","vnd.ms-pkicertstore","x-compress","x-compressed","x-gzip","x-perfmon","x-pkcs7-mime","ynd.ms-pkipko","audio","amr","amr-wb","basic","flac","midi","mpeg","mpegurl","prs.sid","x-aiff","x-gsm","x-ms-wma","x-ms-wax","x-pn-realaudio","x-realaudio","x-sd2","x-wav","adpcm","s3m","silk","vnd.dece.audio","vnd.digital-winds","vnd.dra","vnd.dts","vnd.dts.hd","vnd.lucent.voice","vnd.ms-playready.media.pya","vnd.nuera.ecelp4800","vnd.nuera.ecelp7470","vnd.nuera.ecelp9600","vnd.rip","webm","x-aac","x-caf","x-matroska","x-pn-realaudio-plugin","xm","mid","chemical","x-alchemy","x-cache","x-cache-csf","x-cactvs-binary","x-cdx","x-chem3d","x-cif","x-cmdf","x-cml","x-compass","x-crossfire","x-csml","x-ctx","x-cxf","x-embl-dl-nucleotide","x-gamess-input","x-gaussian-checkpoint","x-gaussian-cube","x-gaussian-input","x-gaussian-log","x-gcg8-sequence","x-genbank","x-hin","x-isostar","x-jcamp-dx","x-kinemage","x-macmolecule","x-macromodel-input","x-mdl-molfile","x-mdl-rdfile","x-mdl-rxnfile","x-mdl-sdfile","x-mdl-tgf","x-mmcif","x-mol2","x-molconn-Z","x-mopac-graph","x-mopac-input","x-mopac-out","x-ncbi-asn1","x-ncbi-asn1-ascii","x-ncbi-asn1-binary","x-pdb","x-rosdal","x-swissprot","x-vamas-iso14976","x-vmd","x-xtel","x-xyz","image","gif","ief","jpeg","pcx","png","svg+xml","tiff","vnd.djvu","vnd.wap.wbmp","x-canon-cr2","x-canon-crw","x-cmu-raster","x-coreldraw","x-coreldrawpattern","x-coreldrawtemplate","x-corelphotopaint","x-epson-erf","x-icon","x-jg","x-jng","x-nikon-nef","x-olympus-orf","x-photoshop","x-portable-anymap","x-portable-bitmap","x-portable-graymap","x-portable-pixmap","x-rgb","x-xbitmap","x-xpixmap","x-xwindowdump","bmp","cgm","g3fax","ktx","prs.btif","sgi","vnd.dece.graphic","vnd.dwg","vnd.dxf","vnd.fastbidsheet","vnd.fpx","vnd.fst","vnd.fujixerox.edmics-mmr","vnd.fujixerox.edmics-rlc","vnd.ms-modi","vnd.ms-photo","vnd.net-fpx","vnd.xiff","webp","x-3ds","x-cmx","x-freehand","x-pict","x-tga","cis-cod","pipeg","message","rfc822","model","iges","mesh","vrml","x3d+vrml","x3d+xml","x3d+binary","vnd.collada+xml","vnd.dwf","vnd.gdl","vnd.gtw","vnd.mts","vnd.vtu","cache-manifest","calendar","css","csv","h323","html","iuls","mathml","plain","richtext","scriptlet","texmacs","tab-separated-values","vnd.sun.j2me.app-descriptor","vnd.wap.wml","vnd.wap.wmlscript","x-bibtex","x-boo","x-c++hdr","x-c++src","x-component","x-dsrc","x-diff","x-haskell","x-java","x-literate-haskell","x-moc","x-pascal","x-pcs-gcd","x-perl","x-python","x-scala","x-setext","x-vcalendar","x-vcard","n3","prs.lines.tag","sgml","troff","turtle","uri-list","vcard","vnd.curl","vnd.curl.dcurl","vnd.curl.scurl","vnd.curl.mcurl","vnd.dvb.subtitle","vnd.fly","vnd.fmi.flexstor","vnd.graphviz","vnd.in3d.3dml","vnd.in3d.spot","x-asm","x-c","x-fortran","x-opml","x-nfo","x-sfv","x-uuencode","webviewhtml","video","3gpp","dl","dv","fli","gl","quicktime","vnd.mpegurl","x-flv","x-la-asf","x-mng","x-ms-asf","x-ms-wm","x-ms-wmv","x-ms-wmx","x-ms-wvx","x-msvideo","x-sgi-movie","3gpp2","h261","h263","h264","jpm","mj2","vnd.dece.hd","vnd.dece.mobile","vnd.dece.pd","vnd.dece.sd","vnd.dece.video","vnd.dvb.file","vnd.fvt","vnd.ms-playready.media.pyv","vnd.uvvu.mp4","vnd.vivo","x-f4v","x-m4v","x-ms-vob","x-smv","x-cooltalk","x-world","x-vrml","mimeTypes","subtype","val","getMimeType","filename","defaultValue","split","pop"],"mappings":";;;;;;;;;;;CAWC,SAASA,GAAG,GAAG,gBAAiBC,UAAS,mBAAoBC,QAAOA,OAAOD,QAAQD,QAAS,IAAG,kBAAmBG,SAAQA,OAAOC,IAAID,UAAUH,OAAO,CAAC,GAAIK,EAAE,oBAAoBC,QAAOD,EAAEC,OAAO,mBAAoBC,QAAOF,EA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MAAO,OAAQ,MAAO,MAAO,MAAO,MAAO,SAItDC,EAAY,WACf,GAAIxyC,GAAMyyC,EAASC,EAAKr6C,EAAOm6C,IAC/B;IAAKxyC,IAAQiZ,GACZ,GAAIA,EAAM3a,eAAe0B,GACxB,IAAKyyC,IAAWx5B,GAAMjZ,GACrB,GAAIiZ,EAAMjZ,GAAM1B,eAAem0C,GAE9B,GADAC,EAAMz5B,EAAMjZ,GAAMyyC,GACA,gBAAPC,GACVF,EAAUE,GAAO1yC,EAAO,IAAMyyC,MAE9B,KAAKp6C,EAAQ,EAAGA,EAAQq6C,EAAIz8C,OAAQoC,IACnCm6C,EAAUE,EAAIr6C,IAAU2H,EAAO,IAAMyyC,CAO3C,OAAOD,KAGRn9C,OAAM+B,UAAUu7C,YAAc,SAASC,GACtC,GAAIC,GAAe,0BACnB,OAAOD,IAAYJ,EAAUI,EAASE,MAAM,KAAKC,MAAM7yC,gBAAkB2yC"} \ No newline at end of file +{"version":3,"file":"zip.min.js","sources":["../../node_modules/jszip/lib/base64.js","../../node_modules/jszip/lib/compressedObject.js","../../node_modules/jszip/lib/dataReader.js","../../node_modules/jszip/lib/index.js","../../node_modules/jszip/lib/nodeBufferReader.js","../../node_modules/jszip/lib/stringReader.js","../../node_modules/jszip/lib/uint8ArrayReader.js","../../node_modules/jszip/lib/utils.js","../../node_modules/jszip/lib/zipEntries.js","../../node_modules/jszip/lib/zipEntry.js","../../node_modules/jszip/lib/compressions.js","../../node_modules/jszip/lib/crc32.js","../../node_modules/jszip/lib/defaults.js","../../node_modules/jszip/lib/deprecatedPublicUtils.js","../../node_modules/jszip/lib/flate.js","../../node_modules/jszip/lib/load.js","../../node_modules/jszip/lib/nodeBuffer.js","../../node_modules/jszip/lib/object.js","../../node_modules/jszip/lib/signature.js","../../node_modules/jszip/lib/stringWriter.js","../../node_modules/jszip/lib/support.js","../../node_modules/jszip/lib/uint8ArrayWriter.js","../../node_modules/jszip/lib/utf8.js"],"names":["CompressedObject","this","compressedSize","uncompressedSize","crc32","compressionMethod","compressedContent","DataReader","data","length","index","JSZip","options","files","comment","root","load","clone","newObj","i","NodeBufferReader","StringReader","optimizedBinaryString","utils","string2binary","Uint8ArrayReader","identity","input","stringToArrayLike","str","array","charCodeAt","arrayLikeToString","chunk","result","len","type","exports","getTypeOf","k","canUseApply","String","fromCharCode","apply","Uint8Array","nodeBuffer","e","resultStr","push","slice","Math","min","subarray","floor","join","arrayLikeToArrayLike","arrayFrom","arrayTo","ZipEntries","loadOptions","ZipEntry","_keyStr","encode","chr1","chr2","chr3","enc1","enc2","enc3","enc4","output","isNaN","charAt","decode","replace","indexOf","prototype","getContent","getCompressedContent","module","STORE","magic","compress","content","uncompress","compressInputType","uncompressInputType","DEFLATE","require","table","crc","isArray","x","y","b","iTop","checkOffset","offset","checkIndex","newIndex","Error","setIndex","skip","n","byteAt","readInt","size","readString","transformTo","readData","lastIndexOfSignature","readDate","dostime","Date","base64","binary","dir","createFolders","date","compression","compressionOptions","unixPermissions","dosPermissions","string2Uint8Array","uint8Array2String","string2Blob","buffer","arrayBuffer2Blob","outputType","checkSupport","MAX_VALUE_16BITS","MAX_VALUE_32BITS","pretty","findCompression","isRegExp","object","USE_TYPEDARRAY","Uint16Array","Uint32Array","pako","deflateRaw","level","inflateRaw","support","defaults","compressions","zipEntries","file","fileName","decompressed","fileComment","zipComment","encoding","Buffer","test","isBuffer","signature","utf8","StringWriter","Uint8ArrayWriter","getRawData","_data","copy","set","getBinaryData","nodebuffer","asBinary","dataToString","asUTF8","out","utf8decode","utf8encode","ZipObject","name","_initialMetadata","asText","call","asNodeBuffer","asUint8Array","asArrayBuffer","decToHex","dec","bytes","hex","extend","attr","arguments","hasOwnProperty","prepareFileAttrs","o","undefined","toUpperCase","fileAdd","parent","dataType","parseInt","forceTrailingSlash","parentFolder","folderAdd","path","substring","lastSlash","lastIndexOf","generateCompressedObjectFrom","generateUnixExternalFileAttr","isDir","generateDosExternalFileAttr","generateZipParts","compressedObject","platform","dosTime","dosDate","utfEncodedFileName","utfEncodedComment","useUTF8ForFileName","useUTF8ForComment","extraFields","unicodePathExtraField","unicodeCommentExtraField","extFileAttr","versionMadeBy","getHours","getMinutes","getSeconds","getFullYear","getMonth","getDate","header","fileRecord","LOCAL_FILE_HEADER","dirRecord","CENTRAL_FILE_HEADER","filter","search","filename","relativePath","fileClone","regexp","folder","arg","newFolder","ret","remove","kids","generate","mimeType","writer","zipData","localDirLength","centralDirLength","compressionName","zipPart","dirEnd","CENTRAL_DIRECTORY_END","typeName","toLowerCase","append","zip","finalize","string","ZIP64_CENTRAL_DIRECTORY_LOCATOR","ZIP64_CENTRAL_DIRECTORY_END","DATA_DESCRIPTOR","sig","arraybuffer","ArrayBuffer","uint8array","blob","Blob","Builder","window","BlobBuilder","WebKitBlobBuilder","MozBlobBuilder","MSBlobBuilder","builder","getBlob","sig0","sig1","sig2","sig3","_utf8len","Array","string2buf","buf","c","c2","m_pos","str_len","buf_len","utf8border","max","pos","buf2string","c_len","utf16buf","applyFromCharCode","toString","nextBoundary","transform","byteLength","inputType","Object","supported","code","res","method","jszipProto","checkSignature","expectedSignature","reader","readBlockEndOfCentral","diskNumber","diskWithCentralDirStart","centralDirRecordsOnThisDisk","centralDirRecords","centralDirSize","centralDirOffset","zipCommentLength","readBlockZip64EndOfCentral","zip64EndOfCentralSize","versionNeeded","zip64ExtensibleData","extraFieldId","extraFieldLength","extraFieldValue","extraDataSize","id","value","readBlockZip64EndOfCentralLocator","diskWithZip64CentralDirStart","relativeOffsetEndOfZip64CentralDir","disksCount","readLocalFiles","localHeaderOffset","readLocalPart","handleUTF8","processAttributes","readCentralDir","zip64","readCentralPart","readEndOfCentral","isGarbage","prepareReader","MADE_BY_DOS","MADE_BY_UNIX","isEncrypted","bitFlag","useUTF8","prepareCompressedContent","from","previousIndex","compressedFileData","prepareContent","uncompressedFileData","localExtraFieldsLength","fileNameLength","checkCRC32","extraFieldsLength","fileCommentLength","diskNumberStart","internalFileAttributes","externalFileAttributes","readExtraFields","parseZIP64ExtraField","madeBy","extraReader","start","upath","findExtraFieldUnicodePath","ucomment","findExtraFieldUnicodeComment","upathField","ucommentField"],"mappings":"AAAA,YCCA,SAASA,oBACLC,KAAKC,eAAiB,EACtBD,KAAKE,iBAAmB,EACxBF,KAAKG,MAAQ,EACbH,KAAKI,kBAAoB,KACzBJ,KAAKK,kBAAoB,KCH7B,QAASC,cACLN,KAAKO,KAAO,KACZP,KAAKQ,OAAS,EACdR,KAAKS,MAAQ,ECgBjB,QAASC,OAAMH,EAAMI,GAEjB,MAAKX,gBAAgBU,QAOrBV,KAAKY,SAELZ,KAAKa,QAAU,KAGfb,KAAKc,KAAO,GACRP,GACAP,KAAKe,KAAKR,EAAMI,QAEpBX,KAAKgB,MAAQ,WACT,GAAIC,GAAS,GAAIP,MACjB,KAAK,GAAIQ,KAAKlB,MACa,kBAAZA,MAAKkB,KACZD,EAAOC,GAAKlB,KAAKkB,GAGzB,OAAOD,MAvByB,GAAIP,OAAMH,EAAMI,GCrBxD,QAASQ,kBAAiBZ,GACtBP,KAAKO,KAAOA,EACZP,KAAKQ,OAASR,KAAKO,KAAKC,OACxBR,KAAKS,MAAQ,ECFjB,QAASW,cAAab,EAAMc,GACxBrB,KAAKO,KAAOA,EACPc,IACDrB,KAAKO,KAAOe,MAAMC,cAAcvB,KAAKO,OAEzCP,KAAKQ,OAASR,KAAKO,KAAKC,OACxBR,KAAKS,MAAQ,ECPjB,QAASe,kBAAiBjB,GAClBA,IACAP,KAAKO,KAAOA,EACZP,KAAKQ,OAASR,KAAKO,KAAKC,OACxBR,KAAKS,MAAQ,GC0CrB,QAASgB,UAASC,GACd,MAAOA,GASX,QAASC,mBAAkBC,EAAKC,GAC5B,IAAK,GAAIX,GAAI,EAAGA,EAAIU,EAAIpB,SAAUU,EAC9BW,EAAMX,GAAyB,IAApBU,EAAIE,WAAWZ,EAE9B,OAAOW,GAQX,QAASE,mBAAkBF,GAUvB,GAAIG,GAAQ,MACRC,KACAC,EAAML,EAAMrB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AAK2V,UACL3V,KAAKmJ,SAAW+J,WAAWzI,WAAWzK,KAAKmJ,UAC3CnJ,KAAKqJ,YAAc6J,WAAWzI,WAAWzK,KAAKqJ,iBAC3C,CACH,GAAI0N,GAAQ/W,KAAKgX,2BACH,QAAVD,IACA/W,KAAKmJ,SAAW4N,EAEpB,IAAIE,GAAWjX,KAAKkX,8BACH,QAAbD,IACAjX,KAAKqJ,YAAc4N,KAS/BD,0BAA2B,WACvB,GAAIG,GAAanX,KAAKuN,YAAY,MAClC,IAAI4J,EAAY,CACZ,GAAIN,GAAc,GAAIzV,cAAa+V,EAAW5C,MAG9C,OAA+B,KAA3BsC,EAAYrQ,QAAQ,GACb,KAIP0M,WAAW/S,MAAMH,KAAKmJ,YAAc0N,EAAYrQ,QAAQ,GACjD,KAGJ0M,WAAWzI,WAAWoM,EAAYnQ,WAAWyQ,EAAW3W,OAAS,IAE5E,MAAO,OAOX0W,6BAA8B,WAC1B,GAAIE,GAAgBpX,KAAKuN,YAAY,MACrC,IAAI6J,EAAe,CACf,GAAIP,GAAc,GAAIzV,cAAagW,EAAc7C,MAGjD,OAA+B,KAA3BsC,EAAYrQ,QAAQ,GACb,KAIP0M,WAAW/S,MAAMH,KAAKqJ,eAAiBwN,EAAYrQ,QAAQ,GACpD,KAGJ0M,WAAWzI,WAAWoM,EAAYnQ,WAAW0Q,EAAc5W,OAAS,IAE/E,MAAO,QAGfsE,OAAO1C,QAAUuB"} \ No newline at end of file diff --git a/epub.js/plugins/hypothesis.js b/epub.js/plugins/hypothesis.js index 0d629a5..31ccd32 100644 --- a/epub.js/plugins/hypothesis.js +++ b/epub.js/plugins/hypothesis.js @@ -1,109 +1,93 @@ -EPUBJS.reader.plugins.HypothesisController = function(Book) { +window.hypothesisConfig = function() { + var Annotator = window.Annotator; + var $main = $("#main"); + + function MySidebar(elem, options) { + options = { + server: true, + origin: true, + showHighlights: true, + Toolbar: {container: '#annotation-controls'} + } + + Annotator.Host.call(this, elem, options); + } + + MySidebar.prototype = Object.create(Annotator.Host.prototype); + + MySidebar.prototype.show = function() { + this.frame.css({ + 'margin-left': (-1 * this.frame.width()) + "px" + }); + this.frame.removeClass('annotator-collapsed'); + if (!$main.hasClass('single')) { + $main.addClass("single"); + this.toolbar.find('[name=sidebar-toggle]').removeClass('h-icon-chevron-left').addClass('h-icon-chevron-right'); + this.setVisibleHighlights(true); + } + }; + + MySidebar.prototype.hide = function() { + this.frame.css({ + 'margin-left': '' + }); + this.frame.addClass('annotator-collapsed'); + if ($main.hasClass('single')) { + $main.removeClass("single"); + this.toolbar.find('[name=sidebar-toggle]').removeClass('h-icon-chevron-right').addClass('h-icon-chevron-left'); + this.setVisibleHighlights(false); + } + }; + + return { + constructor: MySidebar, + } +}; + + +EPUBJS.reader.plugins.HypothesisController = function (Book) { var reader = this; - var book = reader.book; - var element = document.getElementById("hypothesis"); - var body = window.document.body; - var annotator; var $main = $("#main"); - - var updateAnnotations = function() { - var annotatations = [], - guestAnnotator = reader.book.renderer.render.window.annotator, - _$, - $annotations, width; - - if(!guestAnnotator) { - if(annotator) annotator.updateViewer([]); - return; - }; - - _$ = guestAnnotator.constructor.$; - - $annotations = _$(".annotator-hl"); - width = reader.book.renderer.render.iframe.clientWidth; - - //-- Find visible annotations - $annotations.each(function(){ - var $this = _$(this), - left = this.getBoundingClientRect().left; - - if(left >= 0 && left <= width) { - annotatations.push($this.data('annotation')); - } - }); - - //-- Update viewer - annotator.updateViewer(annotatations); - }; - - var attach = function(){ - annotator = window.annotator; - annotator.frame.appendTo(element); - - annotator.subscribe('annotationEditorShown', function () { - showAnnotations(true); - }); - annotator.subscribe('annotationViewerShown', function () { - showAnnotations(true); - }); - - annotator.subscribe("annotationsLoaded", function(e){ - var _$ = reader.book.renderer.render.window.annotator.constructor.$; - - - reader.annotator = annotator; - updateAnnotations(); - - _$(reader.book.renderer.contents).on("click", ".annotator-hl", function(event){ - var $this = _$(this); - - reader.annotator.updateViewer([$this.data('annotation')]); - - // $scope.$apply(function(){ - // $scope.single = true; - // $scope.noUpdate = true; - // }); - - }); - }); - - $(".h-icon-comment").on("click", function () { - if ($main.hasClass("single")) { - showAnnotations(false); - } else { - showAnnotations(true); - } - }); - - reader.book.on("renderer:locationChanged", function(){ - updateAnnotations(); - }); - } - - var showAnnotations = function(single) { - var currentPosition = reader.currentLocationCfi; - reader.settings.sidebarReflow = false; - - if(single) { - $main.addClass("single"); - window.annotator.setVisibleHighlights(true); - } else { - $main.removeClass("single"); - window.annotator.setVisibleHighlights(false); + var updateAnnotations = function () { + var annotator = Book.renderer.render.window.annotator; + if (annotator && annotator.constructor.$) { + var annotations = getVisibleAnnotations(annotator.constructor.$); + annotator.showAnnotations(annotations) } - - $main.one("transitionend", function(){ - book.gotoCfi(currentPosition); - }); - }; - - book.ready.all.then(function() { - reader.HypothesisController.attach(); - }); - return { - 'attach': attach + var getVisibleAnnotations = function ($) { + var width = Book.renderer.render.iframe.clientWidth; + return $('.annotator-hl').map(function() { + var $this = $(this), + left = this.getBoundingClientRect().left; + + if (left >= 0 && left <= width) { + return $this.data('annotation'); + } + }).get(); }; -}; \ No newline at end of file + + // $("#annotations").on("click", function () { + // var annotator = Book.renderer.render.window.annotator; + // var currentPosition = Book.getCurrentLocationCfi(); + + // if ($main.hasClass("single")) { + // $main.removeClass("single"); + // annotator.setVisibleHighlights(false); + // } else { + // $main.addClass("single"); + // annotator.setVisibleHighlights(true); + // } + + // $main.one("transitionend", function(){ + // Book.gotoCfi(currentPosition); + // }); + // }); + + Book.on("renderer:locationChanged", updateAnnotations); + // Book.on("renderer:chapterDisplayed", updateAnnotations); + + return {} +}; diff --git a/epub.js/reader.js b/epub.js/reader.js index 178a7e4..53f98c8 100644 --- a/epub.js/reader.js +++ b/epub.js/reader.js @@ -9,20 +9,14 @@ EPUBJS.reader.plugins = {}; //-- Attach extra Controllers as plugins (like searc return new EPUBJS.Reader(path, options); }; - _.extend(ePubReader, { - noConflict : function() { - root.ePubReader = previousReader; - return this; - } - }); - //exports to multiple environments - if (typeof define === 'function' && define.amd) - //AMD - define(function(){ return Reader; }); - else if (typeof module != "undefined" && module.exports) - //Node - module.exports = ePubReader; + if (typeof define === 'function' && define.amd) { + //AMD + define(function(){ return Reader; }); + } else if (typeof module != "undefined" && module.exports) { + //Node + module.exports = ePubReader; + } })(window, jQuery); @@ -34,15 +28,15 @@ EPUBJS.Reader = function(bookPath, _options) { var search = window.location.search; var parameters; - this.settings = _.defaults(_options || {}, { + this.settings = EPUBJS.core.defaults(_options || {}, { bookPath : bookPath, restore : true, reload : false, - bookmarks : null, - annotations : null, - contained : null, - bookKey : null, - styles : null, + bookmarks : undefined, + annotations : undefined, + contained : undefined, + bookKey : undefined, + styles : undefined, sidebarReflow: false, generatePagination: false, history: true @@ -55,12 +49,12 @@ EPUBJS.Reader = function(bookPath, _options) { var split = p.split("="); var name = split[0]; var value = split[1] || ''; - reader.settings[name] = value; + reader.settings[name] = decodeURIComponent(value); }); } this.setBookKey(this.settings.bookPath); //-- This could be username + path or any unique string - + if(this.settings.restore && this.isSaved()) { this.applySavedSettings(); } @@ -68,26 +62,19 @@ EPUBJS.Reader = function(bookPath, _options) { this.settings.styles = this.settings.styles || { fontSize : "100%" }; - - this.book = book = new EPUBJS.Book({ - bookPath: this.settings.bookPath, - restore: this.settings.restore, - reload: this.settings.reload, - contained: this.settings.contained, - bookKey: this.settings.bookKey, - styles: this.settings.styles - }); - + + this.book = book = new EPUBJS.Book(this.settings); + if(this.settings.previousLocationCfi) { book.gotoCfi(this.settings.previousLocationCfi); } - + this.offline = false; this.sidebarOpen = false; if(!this.settings.bookmarks) { this.settings.bookmarks = []; } - + if(!this.settings.annotations) { this.settings.annotations = []; } @@ -97,21 +84,21 @@ EPUBJS.Reader = function(bookPath, _options) { } book.renderTo("viewer"); - + reader.ReaderController = EPUBJS.reader.ReaderController.call(reader, book); reader.SettingsController = EPUBJS.reader.SettingsController.call(reader, book); reader.ControlsController = EPUBJS.reader.ControlsController.call(reader, book); reader.SidebarController = EPUBJS.reader.SidebarController.call(reader, book); reader.BookmarksController = EPUBJS.reader.BookmarksController.call(reader, book); reader.NotesController = EPUBJS.reader.NotesController.call(reader, book); - + // Call Plugins for(plugin in EPUBJS.reader.plugins) { if(EPUBJS.reader.plugins.hasOwnProperty(plugin)) { reader[plugin] = EPUBJS.reader.plugins[plugin].call(reader, book); } } - + book.ready.all.then(function() { reader.ReaderController.hideLoader(); }); @@ -123,16 +110,16 @@ EPUBJS.Reader = function(bookPath, _options) { book.getToc().then(function(toc) { reader.TocController = EPUBJS.reader.TocController.call(reader, toc); }); - + window.addEventListener("beforeunload", this.unload.bind(this), false); - + window.addEventListener("hashchange", this.hashChanged.bind(this), false); document.addEventListener('keydown', this.adjustFontSize.bind(this), false); - + book.on("renderer:keydown", this.adjustFontSize.bind(this)); book.on("renderer:keydown", reader.ReaderController.arrowKeys.bind(this)); - + book.on("renderer:selected", this.selectedRange.bind(this)); return this; @@ -145,19 +132,19 @@ EPUBJS.Reader.prototype.adjustFontSize = function(e) { var MINUS = 189; var ZERO = 48; var MOD = (e.ctrlKey || e.metaKey ); - + if(!this.settings.styles) return; - + if(!this.settings.styles.fontSize) { this.settings.styles.fontSize = "100%"; } - + fontSize = parseInt(this.settings.styles.fontSize.slice(0, -1)); if(MOD && e.keyCode == PLUS) { e.preventDefault(); this.book.setStyle("fontSize", (fontSize + interval) + "%"); - + } if(MOD && e.keyCode == MINUS){ @@ -165,7 +152,7 @@ EPUBJS.Reader.prototype.adjustFontSize = function(e) { e.preventDefault(); this.book.setStyle("fontSize", (fontSize - interval) + "%"); } - + if(MOD && e.keyCode == ZERO){ e.preventDefault(); this.book.setStyle("fontSize", "100%"); @@ -177,22 +164,22 @@ EPUBJS.Reader.prototype.addBookmark = function(cfi) { if(present > -1 ) return; this.settings.bookmarks.push(cfi); - + this.trigger("reader:bookmarked", cfi); }; EPUBJS.Reader.prototype.removeBookmark = function(cfi) { var bookmark = this.isBookmarked(cfi); if( bookmark === -1 ) return; - - delete this.settings.bookmarks[bookmark]; - + + this.settings.bookmarks.splice(bookmark, 1); + this.trigger("reader:unbookmarked", bookmark); }; EPUBJS.Reader.prototype.isBookmarked = function(cfi) { var bookmarks = this.settings.bookmarks; - + return bookmarks.indexOf(cfi); }; @@ -201,7 +188,7 @@ EPUBJS.Reader.prototype.searchBookmarked = function(cfi) { var bookmarks = this.settings.bookmarks, len = bookmarks.length, i; - + for(i = 0; i < len; i++) { if (bookmarks[i]['cfi'] === cfi) return i; } @@ -241,11 +228,11 @@ EPUBJS.Reader.prototype.setBookKey = function(identifier){ //-- Checks if the book setting can be retrieved from localStorage EPUBJS.Reader.prototype.isSaved = function(bookPath) { var storedSettings; - + if(!localStorage) { return false; } - + storedSettings = localStorage.getItem(this.settings.bookKey); if(storedSettings === null) { @@ -259,21 +246,30 @@ EPUBJS.Reader.prototype.removeSavedSettings = function() { if(!localStorage) { return false; } - + localStorage.removeItem(this.settings.bookKey); }; EPUBJS.Reader.prototype.applySavedSettings = function() { var stored; - + if(!localStorage) { return false; } - + + try { stored = JSON.parse(localStorage.getItem(this.settings.bookKey)); - + } catch (e) { // parsing error of localStorage + return false; + } + if(stored) { - this.settings = _.defaults(this.settings, stored); + // Merge styles + if(stored.styles) { + this.settings.styles = EPUBJS.core.defaults(this.settings.styles || {}, stored.styles); + } + // Merge the rest + this.settings = EPUBJS.core.defaults(this.settings, stored); return true; } else { return false; @@ -409,7 +405,7 @@ EPUBJS.reader.ControlsController = function(book) { reader.offline = true; // $store.attr("src", $icon.data("saved")); }; - + var fullscreen = false; book.on("book:online", goOnline); @@ -427,25 +423,26 @@ EPUBJS.reader.ControlsController = function(book) { } }); - $fullscreen.on("click", function() { - screenfull.toggle($('#container')[0]); - }); - - if(screenfull) { - document.addEventListener(screenfull.raw.fullscreenchange, function() { - fullscreen = screenfull.isFullscreen; - if(fullscreen) { - $fullscreen - .addClass("icon-resize-small") - .removeClass("icon-resize-full"); - } else { - $fullscreen - .addClass("icon-resize-full") - .removeClass("icon-resize-small"); - } + if(typeof screenfull !== 'undefined') { + $fullscreen.on("click", function() { + screenfull.toggle($('#container')[0]); }); + if(screenfull.raw) { + document.addEventListener(screenfull.raw.fullscreenchange, function() { + fullscreen = screenfull.isFullscreen; + if(fullscreen) { + $fullscreen + .addClass("icon-resize-small") + .removeClass("icon-resize-full"); + } else { + $fullscreen + .addClass("icon-resize-full") + .removeClass("icon-resize-small"); + } + }); + } } - + $settings.on("click", function() { reader.SettingsController.show(); }); @@ -453,17 +450,17 @@ EPUBJS.reader.ControlsController = function(book) { $bookmark.on("click", function() { var cfi = reader.book.getCurrentLocationCfi(); var bookmarked = reader.isBookmarked(cfi); - + if(bookmarked === -1) { //-- Add bookmark reader.addBookmark(cfi); $bookmark .addClass("icon-bookmark") - .removeClass("icon-bookmark-empty"); + .removeClass("icon-bookmark-empty"); } else { //-- Remove Bookmark reader.removeBookmark(cfi); $bookmark .removeClass("icon-bookmark") - .addClass("icon-bookmark-empty"); + .addClass("icon-bookmark-empty"); } }); @@ -475,15 +472,15 @@ EPUBJS.reader.ControlsController = function(book) { if(bookmarked === -1) { //-- Not bookmarked $bookmark .removeClass("icon-bookmark") - .addClass("icon-bookmark-empty"); + .addClass("icon-bookmark-empty"); } else { //-- Bookmarked $bookmark .addClass("icon-bookmark") - .removeClass("icon-bookmark-empty"); + .removeClass("icon-bookmark-empty"); } - + reader.currentLocationCfi = cfi; - + // Update the History Location if(reader.settings.history && window.location.hash != cfiFragment) { @@ -491,7 +488,7 @@ EPUBJS.reader.ControlsController = function(book) { history.pushState({}, '', cfiFragment); } }); - + book.on('book:pageChanged', function(location){ // console.log("page", location.page, location.percentage) }); @@ -500,6 +497,7 @@ EPUBJS.reader.ControlsController = function(book) { }; }; + EPUBJS.reader.MetaController = function(meta) { var title = meta.bookTitle, author = meta.creator; @@ -859,7 +857,13 @@ EPUBJS.reader.ReaderController = function(book) { var arrowKeys = function(e) { if(e.keyCode == 37) { - book.prevPage(); + + if(book.metadata.direction === "rtl") { + book.nextPage(); + } else { + book.prevPage(); + } + $prev.addClass("active"); keylock = true; @@ -870,8 +874,14 @@ EPUBJS.reader.ReaderController = function(book) { e.preventDefault(); } - if(e.keyCode == 39) { - book.nextPage(); + if(e.keyCode == 39) { + + if(book.metadata.direction === "rtl") { + book.prevPage(); + } else { + book.nextPage(); + } + $next.addClass("active"); keylock = true; @@ -887,12 +897,24 @@ EPUBJS.reader.ReaderController = function(book) { document.addEventListener('keydown', arrowKeys, false); $next.on("click", function(e){ - book.nextPage(); + + if(book.metadata.direction === "rtl") { + book.prevPage(); + } else { + book.nextPage(); + } + e.preventDefault(); }); $prev.on("click", function(e){ - book.prevPage(); + + if(book.metadata.direction === "rtl") { + book.nextPage(); + } else { + book.prevPage(); + } + e.preventDefault(); }); diff --git a/epub.js/reader.js.map b/epub.js/reader.js.map index 7ed25d6..b6b64cc 100644 --- a/epub.js/reader.js.map +++ b/epub.js/reader.js.map @@ -13,5 +13,5 @@ "reader_src/controllers/toc_controller.js" ], "names": [], - "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gD;ACjUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AC9RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACxHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A" + "mappings": "AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gD;AC7TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AC9RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AChJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A" } \ No newline at end of file diff --git a/epub.js/reader.min.js b/epub.js/reader.min.js index 4c607fe..65cd051 100644 --- a/epub.js/reader.min.js +++ b/epub.js/reader.min.js @@ -1,2 +1,2 @@ -EPUBJS.reader={},EPUBJS.reader.plugins={},function(a){var b=a.ePubReader||{},c=a.ePubReader=function(a,b){return new EPUBJS.Reader(a,b)};_.extend(c,{noConflict:function(){return a.ePubReader=b,this}}),"function"==typeof define&&define.amd?define(function(){return Reader}):"undefined"!=typeof module&&module.exports&&(module.exports=c)}(window,jQuery),EPUBJS.Reader=function(a,b){var c,d,e,f=this,g=$("#viewer"),h=window.location.search;this.settings=_.defaults(b||{},{bookPath:a,restore:!0,reload:!1,bookmarks:null,annotations:null,contained:null,bookKey:null,styles:null,sidebarReflow:!1,generatePagination:!1,history:!0}),h&&(e=h.slice(1).split("&"),e.forEach(function(a){var b=a.split("="),c=b[0],d=b[1]||"";f.settings[c]=d})),this.setBookKey(this.settings.bookPath),this.settings.restore&&this.isSaved()&&this.applySavedSettings(),this.settings.styles=this.settings.styles||{fontSize:"100%"},this.book=c=new EPUBJS.Book({bookPath:this.settings.bookPath,restore:this.settings.restore,reload:this.settings.reload,contained:this.settings.contained,bookKey:this.settings.bookKey,styles:this.settings.styles}),this.settings.previousLocationCfi&&c.gotoCfi(this.settings.previousLocationCfi),this.offline=!1,this.sidebarOpen=!1,this.settings.bookmarks||(this.settings.bookmarks=[]),this.settings.annotations||(this.settings.annotations=[]),this.settings.generatePagination&&c.generatePagination(g.width(),g.height()),c.renderTo("viewer"),f.ReaderController=EPUBJS.reader.ReaderController.call(f,c),f.SettingsController=EPUBJS.reader.SettingsController.call(f,c),f.ControlsController=EPUBJS.reader.ControlsController.call(f,c),f.SidebarController=EPUBJS.reader.SidebarController.call(f,c),f.BookmarksController=EPUBJS.reader.BookmarksController.call(f,c),f.NotesController=EPUBJS.reader.NotesController.call(f,c);for(d in EPUBJS.reader.plugins)EPUBJS.reader.plugins.hasOwnProperty(d)&&(f[d]=EPUBJS.reader.plugins[d].call(f,c));return c.ready.all.then(function(){f.ReaderController.hideLoader()}),c.getMetadata().then(function(a){f.MetaController=EPUBJS.reader.MetaController.call(f,a)}),c.getToc().then(function(a){f.TocController=EPUBJS.reader.TocController.call(f,a)}),window.addEventListener("beforeunload",this.unload.bind(this),!1),window.addEventListener("hashchange",this.hashChanged.bind(this),!1),document.addEventListener("keydown",this.adjustFontSize.bind(this),!1),c.on("renderer:keydown",this.adjustFontSize.bind(this)),c.on("renderer:keydown",f.ReaderController.arrowKeys.bind(this)),c.on("renderer:selected",this.selectedRange.bind(this)),this},EPUBJS.Reader.prototype.adjustFontSize=function(a){var b,c=2,d=187,e=189,f=48,g=a.ctrlKey||a.metaKey;this.settings.styles&&(this.settings.styles.fontSize||(this.settings.styles.fontSize="100%"),b=parseInt(this.settings.styles.fontSize.slice(0,-1)),g&&a.keyCode==d&&(a.preventDefault(),this.book.setStyle("fontSize",b+c+"%")),g&&a.keyCode==e&&(a.preventDefault(),this.book.setStyle("fontSize",b-c+"%")),g&&a.keyCode==f&&(a.preventDefault(),this.book.setStyle("fontSize","100%")))},EPUBJS.Reader.prototype.addBookmark=function(a){var b=this.isBookmarked(a);b>-1||(this.settings.bookmarks.push(a),this.trigger("reader:bookmarked",a))},EPUBJS.Reader.prototype.removeBookmark=function(a){var b=this.isBookmarked(a);-1!==b&&(delete this.settings.bookmarks[b],this.trigger("reader:unbookmarked",b))},EPUBJS.Reader.prototype.isBookmarked=function(a){var b=this.settings.bookmarks;return b.indexOf(a)},EPUBJS.Reader.prototype.clearBookmarks=function(){this.settings.bookmarks=[]},EPUBJS.Reader.prototype.addNote=function(a){this.settings.annotations.push(a)},EPUBJS.Reader.prototype.removeNote=function(a){var b=this.settings.annotations.indexOf(a);-1!==b&&delete this.settings.annotations[b]},EPUBJS.Reader.prototype.clearNotes=function(){this.settings.annotations=[]},EPUBJS.Reader.prototype.setBookKey=function(a){return this.settings.bookKey||(this.settings.bookKey="epubjsreader:"+EPUBJS.VERSION+":"+window.location.host+":"+a),this.settings.bookKey},EPUBJS.Reader.prototype.isSaved=function(){var a;return localStorage?(a=localStorage.getItem(this.settings.bookKey),null===a?!1:!0):!1},EPUBJS.Reader.prototype.removeSavedSettings=function(){return localStorage?void localStorage.removeItem(this.settings.bookKey):!1},EPUBJS.Reader.prototype.applySavedSettings=function(){var a;return localStorage?(a=JSON.parse(localStorage.getItem(this.settings.bookKey)),a?(this.settings=_.defaults(this.settings,a),!0):!1):!1},EPUBJS.Reader.prototype.saveSettings=function(){return this.book&&(this.settings.previousLocationCfi=this.book.getCurrentLocationCfi()),localStorage?void localStorage.setItem(this.settings.bookKey,JSON.stringify(this.settings)):!1},EPUBJS.Reader.prototype.unload=function(){this.settings.restore&&localStorage&&this.saveSettings()},EPUBJS.Reader.prototype.hashChanged=function(){var a=window.location.hash.slice(1);this.book.goto(a)},EPUBJS.Reader.prototype.selectedRange=function(a){var b=new EPUBJS.EpubCFI,c=b.generateCfiFromRangeAnchor(a,this.book.renderer.currentChapter.cfiBase),d="#"+c;this.settings.history&&window.location.hash!=d&&(history.pushState({},"",d),this.currentLocationCfi=c)},RSVP.EventTarget.mixin(EPUBJS.Reader.prototype),EPUBJS.reader.BookmarksController=function(){var a=this.book,b=$("#bookmarksView"),c=b.find("#bookmarks"),d=document.createDocumentFragment(),e=function(){b.show()},f=function(){b.hide()},g=0,h=function(b){var c=document.createElement("li"),d=document.createElement("a");return c.id="bookmark-"+g,c.classList.add("list_item"),d.textContent=b,d.href=b,d.classList.add("bookmark_link"),d.addEventListener("click",function(b){var c=this.getAttribute("href");a.gotoCfi(c),b.preventDefault()},!1),c.appendChild(d),g++,c};return this.settings.bookmarks.forEach(function(a){var b=h(a);d.appendChild(b)}),c.append(d),this.on("reader:bookmarked",function(a){var b=h(a);c.append(b)}),this.on("reader:unbookmarked",function(a){var b=$("#bookmark-"+a);b.remove()}),{show:e,hide:f}},EPUBJS.reader.ControlsController=function(a){var b=this,c=($("#store"),$("#fullscreen")),d=($("#fullscreenicon"),$("#cancelfullscreenicon"),$("#slider")),e=($("#main"),$("#sidebar"),$("#setting")),f=$("#bookmark"),g=function(){b.offline=!1},h=function(){b.offline=!0},i=!1;return a.on("book:online",g),a.on("book:offline",h),d.on("click",function(){b.sidebarOpen?(b.SidebarController.hide(),d.addClass("icon-menu"),d.removeClass("icon-right")):(b.SidebarController.show(),d.addClass("icon-right"),d.removeClass("icon-menu"))}),c.on("click",function(){screenfull.toggle($("#container")[0])}),screenfull&&document.addEventListener(screenfull.raw.fullscreenchange,function(){i=screenfull.isFullscreen,i?c.addClass("icon-resize-small").removeClass("icon-resize-full"):c.addClass("icon-resize-full").removeClass("icon-resize-small")}),e.on("click",function(){b.SettingsController.show()}),f.on("click",function(){var a=b.book.getCurrentLocationCfi(),c=b.isBookmarked(a);-1===c?(b.addBookmark(a),f.addClass("icon-bookmark").removeClass("icon-bookmark-empty")):(b.removeBookmark(a),f.removeClass("icon-bookmark").addClass("icon-bookmark-empty"))}),a.on("renderer:locationChanged",function(a){var c="#"+a,d=b.isBookmarked(a);-1===d?f.removeClass("icon-bookmark").addClass("icon-bookmark-empty"):f.addClass("icon-bookmark").removeClass("icon-bookmark-empty"),b.currentLocationCfi=a,b.settings.history&&window.location.hash!=c&&history.pushState({},"",c)}),a.on("book:pageChanged",function(){}),{}},EPUBJS.reader.MetaController=function(a){var b=a.bookTitle,c=a.creator,d=$("#book-title"),e=$("#chapter-title"),f=$("#title-seperator");document.title=b+" – "+c,d.html(b),e.html(c),f.show()},EPUBJS.reader.NotesController=function(){var a=this.book,b=this,c=$("#notesView"),d=$("#notes"),e=$("#note-text"),f=$("#note-anchor"),g=b.settings.annotations,h=a.renderer,i=[],j=new EPUBJS.EpubCFI,k=function(){c.show()},l=function(){c.hide()},m=function(c){var d,g,h,i,k,l=a.renderer.doc;if(l.caretPositionFromPoint?(d=l.caretPositionFromPoint(c.clientX,c.clientY),g=d.offsetNode,h=d.offset):l.caretRangeFromPoint&&(d=l.caretRangeFromPoint(c.clientX,c.clientY),g=d.startContainer,h=d.startOffset),3!==g.nodeType)for(var p=0;pm/2.5&&(o=m/2.5,pop_content.style.maxHeight=o+"px"),popRect.height+l>=m-25?(b.style.top=l-popRect.height+"px",b.classList.add("above")):b.classList.remove("above"),k-popRect.width<=0?(b.style.left=k+"px",b.classList.add("left")):b.classList.remove("left"),k+popRect.width/2>=n?(b.style.left=k-300+"px",popRect=b.getBoundingClientRect(),b.style.left=k-popRect.width+"px",popRect.height+l>=m-25?(b.style.top=l-popRect.height+"px",b.classList.add("above")):b.classList.remove("above"),b.classList.add("right")):b.classList.remove("right")},f=function(){i[d].classList.add("on")},g=function(){i[d].classList.remove("on")},j=function(){setTimeout(function(){i[d].classList.remove("show")},100)},l=function(){b.ReaderController.slideOut(),k()};a.addEventListener("mouseover",e,!1),a.addEventListener("mouseout",j,!1),a.addEventListener("click",l,!1)};return f.on("click",function(){f.text("Cancel"),e.prop("disabled","true"),a.on("renderer:click",m)}),g.forEach(function(a){n(a)}),h.registerHook("beforeChapterDisplay",function(a,b){var c=b.currentChapter;g.forEach(function(a){var b=j.parse(a.anchor);if(b.spinePos===c.spinePos)try{o(a)}catch(d){console.log("anchoring failed",a.anchor)}}),a()},!0),{show:k,hide:l}},EPUBJS.reader.ReaderController=function(a){var b=$("#main"),c=$("#divider"),d=$("#loader"),e=$("#next"),f=$("#prev"),g=this,a=this.book,h=function(){var c=a.getCurrentLocationCfi();g.settings.sidebarReflow?(b.removeClass("single"),b.one("transitionend",function(){a.gotoCfi(c)})):b.removeClass("closed")},i=function(){var c=a.getCurrentLocationCfi();g.settings.sidebarReflow?(b.addClass("single"),b.one("transitionend",function(){a.gotoCfi(c)})):b.addClass("closed")},j=function(){d.show(),m()},k=function(){d.hide()},l=function(){c.addClass("show")},m=function(){c.removeClass("show")},n=!1,o=function(b){37==b.keyCode&&(a.prevPage(),f.addClass("active"),n=!0,setTimeout(function(){n=!1,f.removeClass("active")},100),b.preventDefault()),39==b.keyCode&&(a.nextPage(),e.addClass("active"),n=!0,setTimeout(function(){n=!1,e.removeClass("active")},100),b.preventDefault())};return document.addEventListener("keydown",o,!1),e.on("click",function(b){a.nextPage(),b.preventDefault()}),f.on("click",function(b){a.prevPage(),b.preventDefault()}),a.on("renderer:spreads",function(a){a?l():m()}),{slideOut:i,slideIn:h,showLoader:j,hideLoader:k,showDivider:l,hideDivider:m,arrowKeys:o}},EPUBJS.reader.SettingsController=function(){var a=(this.book,this),b=$("#settings-modal"),c=$(".overlay"),d=function(){b.addClass("md-show")},e=function(){b.removeClass("md-show")},f=$("#sidebarReflow");return f.on("click",function(){a.settings.sidebarReflow=!a.settings.sidebarReflow}),b.find(".closer").on("click",function(){e()}),c.on("click",function(){e()}),{show:d,hide:e}},EPUBJS.reader.SidebarController=function(){var a=this,b=$("#sidebar"),c=$("#panels"),d="Toc",e=function(b){var e=b+"Controller";d!=b&&"undefined"!=typeof a[e]&&(a[d+"Controller"].hide(),a[e].show(),d=b,c.find(".active").removeClass("active"),c.find("#show-"+b).addClass("active"))},f=function(){return d},g=function(){a.sidebarOpen=!0,a.ReaderController.slideOut(),b.addClass("open")},h=function(){a.sidebarOpen=!1,a.ReaderController.slideIn(),b.removeClass("open")};return c.find(".show_view").on("click",function(a){var b=$(this).data("view");e(b),a.preventDefault()}),{show:g,hide:h,getActivePanel:f,changePanelTo:e}},EPUBJS.reader.TocController=function(a){var b=this.book,c=$("#tocView"),d=document.createDocumentFragment(),e=!1,f=function(a,b){var c=document.createElement("ul");return b||(b=1),a.forEach(function(a){var d=document.createElement("li"),e=document.createElement("a");toggle=document.createElement("a");var g;d.id="toc-"+a.id,d.classList.add("list_item"),e.textContent=a.label,e.href=a.href,e.classList.add("toc_link"),d.appendChild(e),a.subitems.length>0&&(b++,g=f(a.subitems,b),toggle.classList.add("toc_toggle"),d.insertBefore(toggle,e),d.appendChild(g)),c.appendChild(d)}),c},g=function(){c.show()},h=function(){c.hide()},i=function(a){{var b=a.id,d=c.find("#toc-"+b),f=c.find(".currentChapter");c.find(".openChapter")}d.length&&(d!=f&&d.has(e).length>0&&f.removeClass("currentChapter"),d.addClass("currentChapter"),d.parents("li").addClass("openChapter"))};b.on("renderer:chapterDisplayed",i);var j=f(a);return d.appendChild(j),c.append(d),c.find(".toc_link").on("click",function(a){var d=this.getAttribute("href");a.preventDefault(),b.goto(d),c.find(".currentChapter").addClass("openChapter").removeClass("currentChapter"),$(this).parent("li").addClass("currentChapter")}),c.find(".toc_toggle").on("click",function(a){var b=$(this).parent("li"),c=b.hasClass("openChapter");a.preventDefault(),c?b.removeClass("openChapter"):b.addClass("openChapter")}),{show:g,hide:h}}; +EPUBJS.reader={},EPUBJS.reader.plugins={},function(a,b){var c=(a.ePubReader||{},a.ePubReader=function(a,b){return new EPUBJS.Reader(a,b)});"function"==typeof define&&define.amd?define(function(){return Reader}):"undefined"!=typeof module&&module.exports&&(module.exports=c)}(window,jQuery),EPUBJS.Reader=function(a,b){var c,d,e,f=this,g=$("#viewer"),h=window.location.search;this.settings=EPUBJS.core.defaults(b||{},{bookPath:a,restore:!0,reload:!1,bookmarks:void 0,annotations:void 0,contained:void 0,bookKey:void 0,styles:void 0,sidebarReflow:!1,generatePagination:!1,history:!0}),h&&(e=h.slice(1).split("&"),e.forEach(function(a){var b=a.split("="),c=b[0],d=b[1]||"";f.settings[c]=decodeURIComponent(d)})),this.setBookKey(this.settings.bookPath),this.settings.restore&&this.isSaved()&&this.applySavedSettings(),this.settings.styles=this.settings.styles||{fontSize:"100%"},this.book=c=new EPUBJS.Book(this.settings),this.settings.previousLocationCfi&&c.gotoCfi(this.settings.previousLocationCfi),this.offline=!1,this.sidebarOpen=!1,this.settings.bookmarks||(this.settings.bookmarks=[]),this.settings.annotations||(this.settings.annotations=[]),this.settings.generatePagination&&c.generatePagination(g.width(),g.height()),c.renderTo("viewer"),f.ReaderController=EPUBJS.reader.ReaderController.call(f,c),f.SettingsController=EPUBJS.reader.SettingsController.call(f,c),f.ControlsController=EPUBJS.reader.ControlsController.call(f,c),f.SidebarController=EPUBJS.reader.SidebarController.call(f,c),f.BookmarksController=EPUBJS.reader.BookmarksController.call(f,c),f.NotesController=EPUBJS.reader.NotesController.call(f,c);for(d in EPUBJS.reader.plugins)EPUBJS.reader.plugins.hasOwnProperty(d)&&(f[d]=EPUBJS.reader.plugins[d].call(f,c));return c.ready.all.then(function(){f.ReaderController.hideLoader()}),c.getMetadata().then(function(a){f.MetaController=EPUBJS.reader.MetaController.call(f,a)}),c.getToc().then(function(a){f.TocController=EPUBJS.reader.TocController.call(f,a)}),window.addEventListener("beforeunload",this.unload.bind(this),!1),window.addEventListener("hashchange",this.hashChanged.bind(this),!1),document.addEventListener("keydown",this.adjustFontSize.bind(this),!1),c.on("renderer:keydown",this.adjustFontSize.bind(this)),c.on("renderer:keydown",f.ReaderController.arrowKeys.bind(this)),c.on("renderer:selected",this.selectedRange.bind(this)),this},EPUBJS.Reader.prototype.adjustFontSize=function(a){var b,c=2,d=187,e=189,f=48,g=a.ctrlKey||a.metaKey;this.settings.styles&&(this.settings.styles.fontSize||(this.settings.styles.fontSize="100%"),b=parseInt(this.settings.styles.fontSize.slice(0,-1)),g&&a.keyCode==d&&(a.preventDefault(),this.book.setStyle("fontSize",b+c+"%")),g&&a.keyCode==e&&(a.preventDefault(),this.book.setStyle("fontSize",b-c+"%")),g&&a.keyCode==f&&(a.preventDefault(),this.book.setStyle("fontSize","100%")))},EPUBJS.Reader.prototype.addBookmark=function(a){var b=this.isBookmarked(a);b>-1||(this.settings.bookmarks.push(a),this.trigger("reader:bookmarked",a))},EPUBJS.Reader.prototype.removeBookmark=function(a){var b=this.isBookmarked(a);-1!==b&&(this.settings.bookmarks.splice(b,1),this.trigger("reader:unbookmarked",b))},EPUBJS.Reader.prototype.isBookmarked=function(a){var b=this.settings.bookmarks;return b.indexOf(a)},EPUBJS.Reader.prototype.clearBookmarks=function(){this.settings.bookmarks=[]},EPUBJS.Reader.prototype.addNote=function(a){this.settings.annotations.push(a)},EPUBJS.Reader.prototype.removeNote=function(a){var b=this.settings.annotations.indexOf(a);-1!==b&&delete this.settings.annotations[b]},EPUBJS.Reader.prototype.clearNotes=function(){this.settings.annotations=[]},EPUBJS.Reader.prototype.setBookKey=function(a){return this.settings.bookKey||(this.settings.bookKey="epubjsreader:"+EPUBJS.VERSION+":"+window.location.host+":"+a),this.settings.bookKey},EPUBJS.Reader.prototype.isSaved=function(a){var b;return localStorage?(b=localStorage.getItem(this.settings.bookKey),null===b?!1:!0):!1},EPUBJS.Reader.prototype.removeSavedSettings=function(){return localStorage?void localStorage.removeItem(this.settings.bookKey):!1},EPUBJS.Reader.prototype.applySavedSettings=function(){var a;if(!localStorage)return!1;try{a=JSON.parse(localStorage.getItem(this.settings.bookKey))}catch(b){return!1}return a?(a.styles&&(this.settings.styles=EPUBJS.core.defaults(this.settings.styles||{},a.styles)),this.settings=EPUBJS.core.defaults(this.settings,a),!0):!1},EPUBJS.Reader.prototype.saveSettings=function(){return this.book&&(this.settings.previousLocationCfi=this.book.getCurrentLocationCfi()),localStorage?void localStorage.setItem(this.settings.bookKey,JSON.stringify(this.settings)):!1},EPUBJS.Reader.prototype.unload=function(){this.settings.restore&&localStorage&&this.saveSettings()},EPUBJS.Reader.prototype.hashChanged=function(){var a=window.location.hash.slice(1);this.book["goto"](a)},EPUBJS.Reader.prototype.selectedRange=function(a){var b=new EPUBJS.EpubCFI,c=b.generateCfiFromRangeAnchor(a,this.book.renderer.currentChapter.cfiBase),d="#"+c;this.settings.history&&window.location.hash!=d&&(history.pushState({},"",d),this.currentLocationCfi=c)},RSVP.EventTarget.mixin(EPUBJS.Reader.prototype),EPUBJS.reader.BookmarksController=function(){var a=this.book,b=$("#bookmarksView"),c=b.find("#bookmarks"),d=document.createDocumentFragment(),e=function(){b.show()},f=function(){b.hide()},g=0,h=function(b){var c=document.createElement("li"),d=document.createElement("a");return c.id="bookmark-"+g,c.classList.add("list_item"),d.textContent=b,d.href=b,d.classList.add("bookmark_link"),d.addEventListener("click",function(b){var c=this.getAttribute("href");a.gotoCfi(c),b.preventDefault()},!1),c.appendChild(d),g++,c};return this.settings.bookmarks.forEach(function(a){var b=h(a);d.appendChild(b)}),c.append(d),this.on("reader:bookmarked",function(a){var b=h(a);c.append(b)}),this.on("reader:unbookmarked",function(a){var b=$("#bookmark-"+a);b.remove()}),{show:e,hide:f}},EPUBJS.reader.ControlsController=function(a){var b=this,c=($("#store"),$("#fullscreen")),d=($("#fullscreenicon"),$("#cancelfullscreenicon"),$("#slider")),e=($("#main"),$("#sidebar"),$("#setting")),f=$("#bookmark"),g=function(){b.offline=!1},h=function(){b.offline=!0},i=!1;return a.on("book:online",g),a.on("book:offline",h),d.on("click",function(){b.sidebarOpen?(b.SidebarController.hide(),d.addClass("icon-menu"),d.removeClass("icon-right")):(b.SidebarController.show(),d.addClass("icon-right"),d.removeClass("icon-menu"))}),"undefined"!=typeof screenfull&&(c.on("click",function(){screenfull.toggle($("#container")[0])}),screenfull.raw&&document.addEventListener(screenfull.raw.fullscreenchange,function(){i=screenfull.isFullscreen,i?c.addClass("icon-resize-small").removeClass("icon-resize-full"):c.addClass("icon-resize-full").removeClass("icon-resize-small")})),e.on("click",function(){b.SettingsController.show()}),f.on("click",function(){var a=b.book.getCurrentLocationCfi(),c=b.isBookmarked(a);-1===c?(b.addBookmark(a),f.addClass("icon-bookmark").removeClass("icon-bookmark-empty")):(b.removeBookmark(a),f.removeClass("icon-bookmark").addClass("icon-bookmark-empty"))}),a.on("renderer:locationChanged",function(a){var c="#"+a,d=b.isBookmarked(a);-1===d?f.removeClass("icon-bookmark").addClass("icon-bookmark-empty"):f.addClass("icon-bookmark").removeClass("icon-bookmark-empty"),b.currentLocationCfi=a,b.settings.history&&window.location.hash!=c&&history.pushState({},"",c)}),a.on("book:pageChanged",function(a){}),{}},EPUBJS.reader.MetaController=function(a){var b=a.bookTitle,c=a.creator,d=$("#book-title"),e=$("#chapter-title"),f=$("#title-seperator");document.title=b+" – "+c,d.html(b),e.html(c),f.show()},EPUBJS.reader.NotesController=function(){var a=this.book,b=this,c=$("#notesView"),d=$("#notes"),e=$("#note-text"),f=$("#note-anchor"),g=b.settings.annotations,h=a.renderer,i=[],j=new EPUBJS.EpubCFI,k=function(){c.show()},l=function(){c.hide()},m=function(c){var d,g,h,i,k,l=a.renderer.doc;if(l.caretPositionFromPoint?(d=l.caretPositionFromPoint(c.clientX,c.clientY),g=d.offsetNode,h=d.offset):l.caretRangeFromPoint&&(d=l.caretRangeFromPoint(c.clientX,c.clientY),g=d.startContainer,h=d.startOffset),3!==g.nodeType)for(var p=0;pm/2.5&&(o=m/2.5,pop_content.style.maxHeight=o+"px"),popRect.height+l>=m-25?(b.style.top=l-popRect.height+"px",b.classList.add("above")):b.classList.remove("above"),k-popRect.width<=0?(b.style.left=k+"px",b.classList.add("left")):b.classList.remove("left"),k+popRect.width/2>=n?(b.style.left=k-300+"px",popRect=b.getBoundingClientRect(),b.style.left=k-popRect.width+"px",popRect.height+l>=m-25?(b.style.top=l-popRect.height+"px",b.classList.add("above")):b.classList.remove("above"),b.classList.add("right")):b.classList.remove("right")},f=function(){i[d].classList.add("on")},g=function(){i[d].classList.remove("on")},j=function(){setTimeout(function(){i[d].classList.remove("show")},100)},l=function(){b.ReaderController.slideOut(),k()};a.addEventListener("mouseover",e,!1),a.addEventListener("mouseout",j,!1),a.addEventListener("click",l,!1)};return f.on("click",function(b){f.text("Cancel"),e.prop("disabled","true"),a.on("renderer:click",m)}),g.forEach(function(a){n(a)}),h.registerHook("beforeChapterDisplay",function(a,b){var c=b.currentChapter;g.forEach(function(a){var b=j.parse(a.anchor);if(b.spinePos===c.spinePos)try{o(a)}catch(d){console.log("anchoring failed",a.anchor)}}),a()},!0),{show:k,hide:l}},EPUBJS.reader.ReaderController=function(a){var b=$("#main"),c=$("#divider"),d=$("#loader"),e=$("#next"),f=$("#prev"),g=this,a=this.book,h=function(){var c=a.getCurrentLocationCfi();g.settings.sidebarReflow?(b.removeClass("single"),b.one("transitionend",function(){a.gotoCfi(c)})):b.removeClass("closed")},i=function(){var c=a.getCurrentLocationCfi();g.settings.sidebarReflow?(b.addClass("single"),b.one("transitionend",function(){a.gotoCfi(c)})):b.addClass("closed")},j=function(){d.show(),m()},k=function(){d.hide()},l=function(){c.addClass("show")},m=function(){c.removeClass("show")},n=!1,o=function(b){37==b.keyCode&&("rtl"===a.metadata.direction?a.nextPage():a.prevPage(),f.addClass("active"),n=!0,setTimeout(function(){n=!1,f.removeClass("active")},100),b.preventDefault()),39==b.keyCode&&("rtl"===a.metadata.direction?a.prevPage():a.nextPage(),e.addClass("active"),n=!0,setTimeout(function(){n=!1,e.removeClass("active")},100),b.preventDefault())};return document.addEventListener("keydown",o,!1),e.on("click",function(b){"rtl"===a.metadata.direction?a.prevPage():a.nextPage(),b.preventDefault()}),f.on("click",function(b){"rtl"===a.metadata.direction?a.nextPage():a.prevPage(),b.preventDefault()}),a.on("renderer:spreads",function(a){a?l():m()}),{slideOut:i,slideIn:h,showLoader:j,hideLoader:k,showDivider:l,hideDivider:m,arrowKeys:o}},EPUBJS.reader.SettingsController=function(){var a=(this.book,this),b=$("#settings-modal"),c=$(".overlay"),d=function(){b.addClass("md-show")},e=function(){b.removeClass("md-show")},f=$("#sidebarReflow");return f.on("click",function(){a.settings.sidebarReflow=!a.settings.sidebarReflow}),b.find(".closer").on("click",function(){e()}),c.on("click",function(){e()}),{show:d,hide:e}},EPUBJS.reader.SidebarController=function(a){var b=this,c=$("#sidebar"),d=$("#panels"),e="Toc",f=function(a){var c=a+"Controller";e!=a&&"undefined"!=typeof b[c]&&(b[e+"Controller"].hide(),b[c].show(),e=a,d.find(".active").removeClass("active"),d.find("#show-"+a).addClass("active"))},g=function(){return e},h=function(){b.sidebarOpen=!0,b.ReaderController.slideOut(),c.addClass("open")},i=function(){b.sidebarOpen=!1,b.ReaderController.slideIn(),c.removeClass("open")};return d.find(".show_view").on("click",function(a){var b=$(this).data("view");f(b),a.preventDefault()}),{show:h,hide:i,getActivePanel:g,changePanelTo:f}},EPUBJS.reader.TocController=function(a){var b=this.book,c=$("#tocView"),d=document.createDocumentFragment(),e=!1,f=function(a,b){var c=document.createElement("ul");return b||(b=1),a.forEach(function(a){var d=document.createElement("li"),e=document.createElement("a");toggle=document.createElement("a");var g;d.id="toc-"+a.id,d.classList.add("list_item"),e.textContent=a.label,e.href=a.href,e.classList.add("toc_link"),d.appendChild(e),a.subitems.length>0&&(b++,g=f(a.subitems,b),toggle.classList.add("toc_toggle"),d.insertBefore(toggle,e),d.appendChild(g)),c.appendChild(d)}),c},g=function(){c.show()},h=function(){c.hide()},i=function(a){var b=a.id,d=c.find("#toc-"+b),f=c.find(".currentChapter");c.find(".openChapter");d.length&&(d!=f&&d.has(e).length>0&&f.removeClass("currentChapter"),d.addClass("currentChapter"),d.parents("li").addClass("openChapter"))};b.on("renderer:chapterDisplayed",i);var j=f(a);return d.appendChild(j),c.append(d),c.find(".toc_link").on("click",function(a){var d=this.getAttribute("href");a.preventDefault(),b["goto"](d),c.find(".currentChapter").addClass("openChapter").removeClass("currentChapter"),$(this).parent("li").addClass("currentChapter")}),c.find(".toc_toggle").on("click",function(a){var b=$(this).parent("li"),c=b.hasClass("openChapter");a.preventDefault(),c?b.removeClass("openChapter"):b.addClass("openChapter")}),{show:g,hide:h}}; //# sourceMappingURL=reader.min.map \ No newline at end of file diff --git a/epub.js/reader.min.map b/epub.js/reader.min.map index 826c439..2f4ad64 100644 --- a/epub.js/reader.min.map +++ b/epub.js/reader.min.map @@ -1 +1 @@ -{"version":3,"file":"reader.min.js","sources":["reader.js"],"names":["EPUBJS","reader","plugins","root","previousReader","ePubReader","path","options","Reader","_","extend","noConflict","this","define","amd","module","exports","window","jQuery","bookPath","_options","book","plugin","parameters","$viewer","$","search","location","settings","defaults","restore","reload","bookmarks","annotations","contained","bookKey","styles","sidebarReflow","generatePagination","history","slice","split","forEach","p","name","value","setBookKey","isSaved","applySavedSettings","fontSize","Book","previousLocationCfi","gotoCfi","offline","sidebarOpen","width","height","renderTo","ReaderController","call","SettingsController","ControlsController","SidebarController","BookmarksController","NotesController","hasOwnProperty","ready","all","then","hideLoader","getMetadata","meta","MetaController","getToc","toc","TocController","addEventListener","unload","bind","hashChanged","document","adjustFontSize","on","arrowKeys","selectedRange","prototype","e","interval","PLUS","MINUS","ZERO","MOD","ctrlKey","metaKey","parseInt","keyCode","preventDefault","setStyle","addBookmark","cfi","present","isBookmarked","push","trigger","removeBookmark","bookmark","indexOf","clearBookmarks","addNote","note","removeNote","index","clearNotes","identifier","VERSION","host","storedSettings","localStorage","getItem","removeSavedSettings","removeItem","stored","JSON","parse","saveSettings","getCurrentLocationCfi","setItem","stringify","hash","goto","range","epubcfi","EpubCFI","generateCfiFromRangeAnchor","renderer","currentChapter","cfiBase","cfiFragment","pushState","currentLocationCfi","RSVP","EventTarget","mixin","$bookmarks","$list","find","docfrag","createDocumentFragment","show","hide","counter","createBookmarkItem","listitem","createElement","link","id","classList","add","textContent","href","event","getAttribute","appendChild","append","item","$item","remove","$fullscreen","$slider","$settings","$bookmark","goOnline","goOffline","fullscreen","addClass","removeClass","screenfull","toggle","raw","fullscreenchange","isFullscreen","bookmarked","title","bookTitle","author","creator","$title","$author","$dash","html","$notesView","$notes","$text","$anchor","popups","insertAtPoint","textNode","offset","annotation","doc","caretPositionFromPoint","clientX","clientY","offsetNode","caretRangeFromPoint","startContainer","startOffset","nodeType","i","childNodes","length","generateCfiFromTextNode","annotatedAt","Date","anchor","body","val","addAnnotation","placeMarker","text","prop","off","innerHTML","onclick","marker","mark","style","verticalAlign","lineHeight","padding","backgroundColor","borderRadius","cursor","core","uuid","addMarker","markerEvents","txt","showPop","pop","itemRect","left","top","iheight","iwidth","maxHeight","setAttribute","pop_content","render","onPop","offPop","hidePop","getBoundingClientRect","popRect","setTimeout","openSidebar","slideOut","registerHook","callback","chapter","spinePos","console","log","$main","$divider","$loader","$next","$prev","slideIn","currentPosition","one","showLoader","hideDivider","showDivider","keylock","prevPage","nextPage","bool","$overlay","$sidebarReflowSetting","$sidebar","$panels","activePanel","changePanelTo","viewName","controllerName","getActivePanel","view","data","generateTocItems","level","container","subitems","label","insertBefore","onShow","onHide","chapterChange","$current","has","parents","tocitems","url","parent","$el","open","hasClass"],"mappings":"AAAAA,OAAOC,UACPD,OAAOC,OAAOC,WAEd,SAAUC,GAET,GAAIC,GAAiBD,EAAKE,eAEtBA,EAAaF,EAAKE,WAAa,SAASC,EAAMC,GACjD,MAAO,IAAIP,QAAOQ,OAAOF,EAAMC,GAGhCE,GAAEC,OAAOL,GACRM,WAAa,WAEZ,MADAR,GAAKE,WAAaD,EACXQ,QAKa,kBAAXC,SAAyBA,OAAOC,IAE3CD,OAAO,WAAY,MAAOL,UACA,mBAAVO,SAAyBA,OAAOC,UAEhDD,OAAOC,QAAUX,IAEfY,OAAQC,QAEXlB,OAAOQ,OAAS,SAASW,EAAUC,GAClC,GACIC,GACAC,EAGAC,EALAtB,EAASW,KAGTY,EAAUC,EAAE,WACZC,EAAST,OAAOU,SAASD,MAG7Bd,MAAKgB,SAAWnB,EAAEoB,SAAST,OAC1BD,SAAWA,EACXW,SAAU,EACVC,QAAS,EACTC,UAAY,KACZC,YAAc,KACdC,UAAY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S,eACTC,YAAY,kBAEftJ,EAAEb,MAAMmS,OAAO,MAAMjI,SAAS,oBAIhC9B,EAAMC,KAAK,eAAe/D,GAAG,QAAS,SAAS8E,GAC7C,GAAIgJ,GAAMvR,EAAEb,MAAMmS,OAAO,MACvBE,EAAOD,EAAIE,SAAS,cAEtBlJ,GAAMhE,iBACHiN,EACFD,EAAIjI,YAAY,eAEhBiI,EAAIlI,SAAS,kBAKf1B,KAASmJ,EACTlJ,KAASmJ"} \ No newline at end of file +{"version":3,"sources":["reader.js"],"names":["EPUBJS","reader","plugins","root","$","ePubReader","path","options","Reader","define","amd","module","exports","window","jQuery","bookPath","_options","book","plugin","parameters","this","$viewer","search","location","settings","core","defaults","restore","reload","bookmarks","undefined","annotations","contained","bookKey","styles","sidebarReflow","generatePagination","history","slice","split","forEach","p","name","value","decodeURIComponent","setBookKey","isSaved","applySavedSettings","fontSize","Book","previousLocationCfi","gotoCfi","offline","sidebarOpen","width","height","renderTo","ReaderController","call","SettingsController","ControlsController","SidebarController","BookmarksController","NotesController","hasOwnProperty","ready","all","then","hideLoader","getMetadata","meta","MetaController","getToc","toc","TocController","addEventListener","unload","bind","hashChanged","document","adjustFontSize","on","arrowKeys","selectedRange","prototype","e","interval","PLUS","MINUS","ZERO","MOD","ctrlKey","metaKey","parseInt","keyCode","preventDefault","setStyle","addBookmark","cfi","present","isBookmarked","push","trigger","removeBookmark","bookmark","splice","indexOf","clearBookmarks","addNote","note","removeNote","index","clearNotes","identifier","VERSION","host","storedSettings","localStorage","getItem","removeSavedSettings","removeItem","stored","JSON","parse","saveSettings","getCurrentLocationCfi","setItem","stringify","hash","range","epubcfi","EpubCFI","generateCfiFromRangeAnchor","renderer","currentChapter","cfiBase","cfiFragment","pushState","currentLocationCfi","RSVP","EventTarget","mixin","$bookmarks","$list","find","docfrag","createDocumentFragment","show","hide","counter","createBookmarkItem","listitem","createElement","link","id","classList","add","textContent","href","event","getAttribute","appendChild","append","item","$item","remove","$fullscreen","$slider","$settings","$bookmark","goOnline","goOffline","fullscreen","addClass","removeClass","screenfull","toggle","raw","fullscreenchange","isFullscreen","bookmarked","title","bookTitle","author","creator","$title","$author","$dash","html","$notesView","$notes","$text","$anchor","popups","insertAtPoint","textNode","offset","annotation","doc","caretPositionFromPoint","clientX","clientY","offsetNode","caretRangeFromPoint","startContainer","startOffset","nodeType","i","childNodes","length","generateCfiFromTextNode","annotatedAt","Date","anchor","body","val","addAnnotation","placeMarker","text","prop","off","innerHTML","onclick","marker","mark","style","verticalAlign","lineHeight","padding","backgroundColor","borderRadius","cursor","uuid","addMarker","markerEvents","txt","showPop","pop","itemRect","left","top","iheight","iwidth","maxHeight","setAttribute","pop_content","render","onPop","offPop","hidePop","getBoundingClientRect","popRect","setTimeout","openSidebar","slideOut","registerHook","callback","chapter","spinePos","console","log","$main","$divider","$loader","$next","$prev","slideIn","currentPosition","one","showLoader","hideDivider","showDivider","keylock","metadata","direction","nextPage","prevPage","bool","$overlay","$sidebarReflowSetting","$sidebar","$panels","activePanel","changePanelTo","viewName","controllerName","getActivePanel","view","data","generateTocItems","level","container","subitems","label","insertBefore","onShow","onHide","chapterChange","$current","has","parents","tocitems","url","parent","$el","open","hasClass"],"mappings":"AAAAA,OAAOC,UACPD,OAAOC,OAAOC,WAEd,SAAUC,EAAMC,GAEf,GAEIC,IAFiBF,EAAKE,eAETF,EAAKE,WAAa,SAASC,EAAMC,GACjD,MAAO,IAAIP,QAAOQ,OAAOF,EAAMC,IAIV,mBAAXE,SAAyBA,OAAOC,IAE1CD,OAAO,WAAY,MAAOD,UACC,mBAAVG,SAAyBA,OAAOC,UAEjDD,OAAOC,QAAUP,IAGhBQ,OAAQC,QAEXd,OAAOQ,OAAS,SAASO,EAAUC,GAClC,GACIC,GACAC,EAGAC,EALAlB,EAASmB,KAGTC,EAAUjB,EAAE,WACZkB,EAAST,OAAOU,SAASD,MAG7BF,MAAKI,SAAWxB,OAAOyB,KAAKC,SAASV,OACpCD,SAAWA,EACXY,SAAU,EACVC,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4BAA6BwN,EAErC,IAAII,GAAWZ,EAAiBxN,EAkChC,OAhCAwE,GAAQgB,YAAY4I,GAEpB9J,EAAMmB,OAAOjB,GACbF,EAAMC,KAAK,aAAa/D,GAAG,QAAS,SAAS8E,GAC3C,GAAI+I,GAAM1R,KAAK4I,aAAa,OAE5BD,GAAMhE,iBAIN9E,EAAAA,QAAU6R,GAEV/J,EAAMC,KAAK,mBACR6B,SAAS,eACTC,YAAY,kBAEf1K,EAAEgB,MAAM2R,OAAO,MAAMlI,SAAS,oBAIhC9B,EAAMC,KAAK,eAAe/D,GAAG,QAAS,SAAS8E,GAC7C,GAAIiJ,GAAM5S,EAAEgB,MAAM2R,OAAO,MACvBE,EAAOD,EAAIE,SAAS,cAEtBnJ,GAAMhE,iBACHkN,EACFD,EAAIlI,YAAY,eAEhBkI,EAAInI,SAAS,kBAKf1B,KAASoJ,EACTnJ,KAASoJ","file":"reader.min.js"} \ No newline at end of file diff --git a/epub.js/update.sh b/epub.js/update.sh new file mode 100755 index 0000000..4561e88 --- /dev/null +++ b/epub.js/update.sh @@ -0,0 +1,6 @@ +base=/src/epub.js +cp $base/build/* . +cp $base/build/libs/* ./libs/ +cp $base/reader/js/hooks/extensions/*.js ./hooks/extensions/ +cp $base/reader/js/plugins/*.js ./plugins/ +cp $base/reader/img/loader.gif img/loader.gif