@internetarchive/bookreader 5.0.0-100 → 5.0.0-102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BookReader/474.js +1 -1
- package/BookReader/474.js.map +1 -1
- package/BookReader/BookReader.css +79 -8
- package/BookReader/BookReader.js +1 -1
- package/BookReader/BookReader.js.LICENSE.txt +1 -1
- package/BookReader/BookReader.js.map +1 -1
- package/BookReader/ia-bookreader-bundle.js +52 -52
- package/BookReader/ia-bookreader-bundle.js.LICENSE.txt +7 -1
- package/BookReader/ia-bookreader-bundle.js.map +1 -1
- package/BookReader/icons/1up.svg +1 -1
- package/BookReader/icons/2up.svg +1 -1
- package/BookReader/icons/advance.svg +1 -1
- package/BookReader/icons/chevron-right.svg +1 -1
- package/BookReader/icons/close-circle-dark.svg +1 -1
- package/BookReader/icons/close-circle.svg +1 -1
- package/BookReader/icons/fullscreen.svg +1 -1
- package/BookReader/icons/fullscreen_exit.svg +1 -1
- package/BookReader/icons/hamburger.svg +1 -1
- package/BookReader/icons/left-arrow.svg +1 -1
- package/BookReader/icons/magnify-minus.svg +1 -1
- package/BookReader/icons/magnify-plus.svg +1 -1
- package/BookReader/icons/magnify.svg +1 -1
- package/BookReader/icons/pause.svg +1 -1
- package/BookReader/icons/play.svg +1 -1
- package/BookReader/icons/playback-speed.svg +1 -1
- package/BookReader/icons/read-aloud.svg +1 -1
- package/BookReader/icons/review.svg +1 -1
- package/BookReader/icons/slider-toggle.svg +1 -0
- package/BookReader/icons/thumbnails.svg +1 -1
- package/BookReader/icons/voice.svg +1 -1
- package/BookReader/icons/volume-full.svg +1 -1
- package/BookReader/images/BRicons.svg +2 -2
- package/BookReader/images/books_graphic.svg +1 -1
- package/BookReader/images/icon_book.svg +1 -1
- package/BookReader/images/icon_bookmark.svg +1 -1
- package/BookReader/images/icon_gear.svg +1 -1
- package/BookReader/images/icon_hamburger.svg +1 -1
- package/BookReader/images/icon_home.svg +1 -1
- package/BookReader/images/icon_info.svg +1 -1
- package/BookReader/images/icon_one_page.svg +1 -1
- package/BookReader/images/icon_pause.svg +1 -1
- package/BookReader/images/icon_play.svg +1 -1
- package/BookReader/images/icon_playback-rate.svg +1 -1
- package/BookReader/images/icon_search_button.svg +1 -1
- package/BookReader/images/icon_share.svg +1 -1
- package/BookReader/images/icon_skip-back.svg +1 -1
- package/BookReader/images/icon_speaker.svg +1 -1
- package/BookReader/images/icon_speaker_open.svg +1 -1
- package/BookReader/images/icon_thumbnails.svg +1 -1
- package/BookReader/images/icon_toc.svg +1 -1
- package/BookReader/images/icon_two_pages.svg +1 -1
- package/BookReader/images/marker_chap-off.svg +1 -1
- package/BookReader/images/marker_chap-on.svg +1 -1
- package/BookReader/images/marker_srch-on.svg +1 -1
- package/BookReader/images/translate.svg +1 -1
- package/BookReader/jquery-3.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js +1 -1
- package/BookReader/plugins/plugin.archive_analytics.js.map +1 -1
- package/BookReader/plugins/plugin.autoplay.js +1 -1
- package/BookReader/plugins/plugin.autoplay.js.map +1 -1
- package/BookReader/plugins/plugin.chapters.js +2 -2
- package/BookReader/plugins/plugin.chapters.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.chapters.js.map +1 -1
- package/BookReader/plugins/plugin.experiments.js +1 -1
- package/BookReader/plugins/plugin.experiments.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.experiments.js.map +1 -1
- package/BookReader/plugins/plugin.iframe.js +1 -1
- package/BookReader/plugins/plugin.iframe.js.map +1 -1
- package/BookReader/plugins/plugin.iiif.js +1 -1
- package/BookReader/plugins/plugin.iiif.js.map +1 -1
- package/BookReader/plugins/plugin.resume.js +1 -1
- package/BookReader/plugins/plugin.resume.js.map +1 -1
- package/BookReader/plugins/plugin.search.js +1 -1
- package/BookReader/plugins/plugin.search.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.search.js.map +1 -1
- package/BookReader/plugins/plugin.text_selection.js +1 -1
- package/BookReader/plugins/plugin.text_selection.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.text_selection.js.map +1 -1
- package/BookReader/plugins/plugin.translate.js +4 -4
- package/BookReader/plugins/plugin.translate.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.translate.js.map +1 -1
- package/BookReader/plugins/plugin.tts.js +1 -1
- package/BookReader/plugins/plugin.tts.js.LICENSE.txt +1 -1
- package/BookReader/plugins/plugin.tts.js.map +1 -1
- package/BookReader/plugins/plugin.url.js +1 -1
- package/BookReader/plugins/plugin.url.js.map +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js +1 -1
- package/BookReader/plugins/plugin.vendor-fullscreen.js.map +1 -1
- package/BookReader/plugins/translator-worker.js +1 -1
- package/BookReader/plugins/translator-worker.js.map +1 -1
- package/BookReader/webcomponents-bundle.js +1 -1
- package/BookReader/webcomponents-bundle.js.map +1 -1
- package/package.json +20 -20
- package/src/BookNavigator/search/search-results.js +84 -63
- package/src/BookNavigator/visual-adjustments/visual-adjustments-provider.js +4 -4
- package/src/BookNavigator/visual-adjustments/visual-adjustments.js +77 -59
- package/src/BookReader/Navbar/Navbar.js +54 -71
- package/src/BookReader/options.js +6 -0
- package/src/BookReader.js +12 -0
- package/src/assets/icons/slider-toggle.svg +1 -0
- package/src/css/_BRnav.scss +57 -4
- package/src/css/_BRpages.scss +9 -0
- package/src/css/_icons.scss +7 -0
- package/src/plugins/plugin.text_selection.js +9 -0
- package/src/plugins/search/plugin.search.js +4 -0
- package/src/plugins/search/utils.js +8 -1
- package/src/plugins/search/view.js +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see plugin.text_selection.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[326],{706:function(t,e,n){var r=n(350).PROPER,a=n(9039),o=n(7452);t.exports=function(t){return a((function(){return!!o[t]()||"
"!=="
"[t]()||r&&o[t].name!==t}))}},2762:function(t,e,n){var r=n(6518),a=n(3802).trim;r({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return a(this)}})},1041:function(t,e,n){function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,o(r.key),r)}}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,"string");if("object"!=r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.d(e,{S:function(){return i}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(9085),n(6099),n(7764),n(2953);var i=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.br=e,this.options},(e=[{key:"setup",value:function(t){this.options=Object.assign({},this.options,t)}},{key:"init",value:function(){}},{key:"_configurePageContainer",value:function(t){}},{key:"_configureToolbar",value:function(t){}},{key:"_bindNavigationHandlers",value:function(){}},{key:"extendNavBar",value:function(t){}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},296:function(t,e,n){n(2675),n(9463),n(6412),n(2259),n(5700),n(8125),n(8706),n(113),n(3418),n(3792),n(8598),n(2062),n(4490),n(4782),n(6910),n(9572),n(2010),n(4731),n(6033),n(479),n(8130),n(9085),n(875),n(6099),n(8459),n(3362),n(825),n(7495),n(8781),n(9449),n(7764),n(2762),n(3500),n(2953);var r=n(4907),a=n(1041),o=n(9073),i=n(4565),u=n(4160),l=n(593),c=n(1669);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}var f=g().mark(N),h=g().mark(I),p=g().mark(B);function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,o,i,u=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);l=!0);}catch(t){c=!0,a=t}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw a}}return u}}(t,e)||v(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=v(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,a=function(){};return{s:a,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){u=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw o}}}}function v(t,e){if(t){if("string"==typeof t)return m(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(t,e):void 0}}function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function g(){g=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new _(r||[]);return a(i,"_invoke",{value:O(t,n,u)}),i}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",d="suspendedYield",y="executing",v="completed",m={};function b(){}function w(){}function k(){}var x={};c(x,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(R([])));E&&E!==n&&r.call(E,i)&&(x=E);var j=k.prototype=b.prototype=Object.create(x);function L(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(a,o,i,u){var l=h(t[a],t,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==s(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(f).then((function(t){c.value=t,i(c)}),(function(t){return n("throw",t,i,u)}))}u(l.arg)}var o;a(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,a){n(t,r,e,a)}))}return o=o?o.then(a,a):a()}})}function O(e,n,r){var a=p;return function(o,i){if(a===y)throw Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:t,done:!0}}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var l=C(u,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===p)throw a=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=y;var c=h(e,n,r);if("normal"===c.type){if(a=r.done?v:d,c.arg===m)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(a=v,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,a=e.iterator[r];if(a===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(a,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function R(e){if(e||""===e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function n(){for(;++a<e.length;)if(r.call(e,a))return n.value=e[a],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(s(e)+" is not iterable")}return w.prototype=k,a(j,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:w,configurable:!0}),w.displayName=c(k,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,c(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},L(P.prototype),c(P.prototype,u,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new P(f(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(j),c(j,l,"Generator"),c(j,i,(function(){return this})),c(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=R,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function a(r,a){return u.type="throw",u.arg=e,n.next=r,a&&(n.method="next",n.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;T(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function b(t,e,n,r,a,o,i){try{var u=t[o](i),l=u.value}catch(t){return void n(t)}u.done?e(l):Promise.resolve(l).then(r,a)}function w(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function i(t){b(o,r,a,i,u,"next",t)}function u(t){b(o,r,a,i,u,"throw",t)}i(void 0)}))}}function k(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function x(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,C(r.key),r)}}function S(t,e,n){return e&&x(t.prototype,e),n&&x(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function E(t,e,n){return e=L(e),function(t,e){if(e&&("object"==s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,j()?Reflect.construct(e,n||[],L(t).constructor):e.apply(t,n))}function j(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(j=function(){return!!t})()}function L(t){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},L(t)}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}function O(t,e,n){return(e=C(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function C(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var A=window.BookReader,T=function(t){function e(t){var n;return k(this,e),O(n=E(this,e,[t]),"options",{enabled:!0,fullDjvuXmlUrl:null,singlePageDjvuXmlUrl:null,jsonp:!1,maxProtectedWords:200}),O(n,"djvuPagesPromise",null),O(n,"pageTextCache",new i.l),O(n,"maxWordRendered",2500),n.rtl="rl"===n.br.pageProgression,n.textSelectionManager=new l.bg(".BRtextLayer",n.br,{selectionElement:[".BRwordElement",".BRspace"]},n.options.maxProtectedWords),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}(e,t),S(e,[{key:"init",value:function(){this.options.enabled&&(this.loadData(),this.textSelectionManager.init())}},{key:"_configurePageContainer",value:function(t){return this.br.mode!==this.br.constModeThumb&&t.page&&this.createTextLayer(t),t}},{key:"loadData",value:function(){this.options.singlePageDjvuXmlUrl||(this.djvuPagesPromise=c.ajax({type:"GET",url:(0,o.g)(this.options.fullDjvuXmlUrl,this.br.options.vars),dataType:this.options.jsonp?"jsonp":"html",cache:!0,xhrFields:{withCredentials:this.br.protected},error:function(t){}}).then((function(t){try{var e=c.parseXML(t);return e&&c(e).find("OBJECT")}catch(t){return}})))}},{key:"getPageText",value:(a=w(g().mark((function t(e){var n,r,a,i,u;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.singlePageDjvuXmlUrl){t.next=19;break}if(!(n=this.pageTextCache.entries.find((function(t){return t.index==e})))){t.next=4;break}return t.abrupt("return",n.response);case 4:return t.next=6,c.ajax({type:"GET",url:(0,o.g)(this.options.singlePageDjvuXmlUrl,this.br.options.vars,{pageIndex:e}),dataType:this.options.jsonp?"jsonp":"html",cache:!0,xhrFields:{withCredentials:this.br.protected},error:function(t){}});case 6:return r=t.sent,t.prev=7,a=c.parseXML(r),i=a&&c(a).find("OBJECT")[0],this.pageTextCache.add({index:e,response:i}),t.abrupt("return",i);case 14:return t.prev=14,t.t0=t.catch(7),t.abrupt("return",void 0);case 17:t.next=24;break;case 19:return t.next=21,this.djvuPagesPromise;case 21:if(!(u=t.sent)){t.next=24;break}return t.abrupt("return",u[e]);case 24:case"end":return t.stop()}}),t,this,[[7,14]])}))),function(t){return a.apply(this,arguments)})},{key:"createTextLayer",value:(n=w(g().mark((function t(e){var n,a,o,i,l,s,f,h,p,v,m,b,w,k,x,S,E,j,L,P,O,C,A,T,R,N=this;return g().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.page.index,!(a=e.$container).find(".BRtextLayer").length){t.next=5;break}return t.abrupt("return");case 5:return t.next=7,this.getPageText(n);case 7:if(o=t.sent){t.next=10;break}return t.abrupt("return");case 10:if(z(o),!((i=c(o).find("WORD").length)>this.maxWordRendered)){t.next=15;break}return console.log("Page ".concat(n," has too many words (").concat(i," > ").concat(this.maxWordRendered,"). Not rendering text layer.")),t.abrupt("return");case 15:return l=(0,r.Ql)(e.page,"BRtextLayer"),t.next=18,Promise.resolve();case 18:s=parseFloat(e.$container[0].style.width)/e.page.width,f=parseFloat(e.$container[0].style.height)/e.page.height,l.style.transform="scale(".concat(s,", ").concat(f,")"),(h=(0,u.YH)(this.br.options.bookLanguage))&&l.setAttribute("lang",h),l.setAttribute("dir",this.rtl?"rtl":"ltr"),p=c(o).find("PARAGRAPH[coords]").toArray(),v=p.map((function(t){var e=N.renderParagraph(t);return l.appendChild(e),e})),m=_(l,".BRparagraphElement"),b=0,w=y(B(p,v));try{for(w.s();!(k=w.n()).done;)x=d(k.value,2),S=x[0],E=x[1],j=c(S).attr("coords").split(",").map(parseFloat),L=m.get(E),P=d(j,4),O=P[0],C=P[2],A=P[3],T=this.rtl?L.right-C:O-L.left,R=A-(L.top+b),E.style[this.rtl?"marginRight":"marginLeft"]="".concat(T,"px"),E.style.marginTop="".concat(R,"px"),b+=R,l.appendChild(E)}catch(t){w.e(t)}finally{w.f()}a.append(l),this.textSelectionManager.stopPageFlip(a),this.br.trigger("textLayerRendered",{pageIndex:n,pageContainer:e});case 33:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"renderParagraph",value:function(t){var e=document.createElement("p");e.classList.add("BRparagraphElement"),t.getAttribute("x-role")&&(e.classList.add("ocr-role-header-footer"),e.ariaHidden="true");var n=d(c(t).attr("coords").split(",").map(parseFloat),4),r=n[0],a=n[1],o=n[2],i=n[3],u=[],l=c(t).find("LINE[coords]").toArray();if(!l.length)return e;var s,f=y(I(N(l,R)));try{for(f.s();!(s=f.n()).done;){var h=d(s.value,3),p=h[0],g=h[1],b=h[2],w=g.ocrElement==l[l.length-1],k=document.createElement("span");k.classList.add("BRlineElement");var x,S=y(g.words.entries());try{for(S.s();!(x=S.n()).done;){var E=d(x.value,2),j=E[0],L=E[1],P=d(c(L).attr("coords").split(",").map(parseFloat),4),O=P[1],C=P[2],A=P[3],T=O-A;if(u.push(T),0==j&&null!=p&&p.lastWord.textContent.trim().endsWith("-")){var z=d(c((b||p).firstWord).attr("coords").split(",").map(parseFloat),3)[0];c(L).attr("coords","".concat(z,",").concat(O,",").concat(C,",").concat(A))}var M=document.createElement("span");if(M.setAttribute("class","BRwordElement"),M.textContent=L.textContent.trim(),j>0){var G=document.createElement("span");G.classList.add("BRspace"),G.textContent=" ",k.append(G),k.appendChild(document.createTextNode(" "))}k.appendChild(M)}}catch(t){S.e(t)}finally{S.f()}var F=g.lastWord.textContent.trim().endsWith("-"),D=k.children[k.children.length-1];F&&!w&&(D.textContent=D.textContent.trim().slice(0,-1),D.classList.add("BRwordElement--hyphen")),e.appendChild(k),w||F||e.appendChild(document.createTextNode(" "))}}catch(t){f.e(t)}finally{f.f()}u.sort((function(t,e){return t-e}));var W=u[Math.floor(.85*u.length)]+4;e.style.left="".concat(r,"px"),e.style.top="".concat(i,"px"),e.style.width="".concat(o-r,"px"),e.style.height="".concat(a-i,"px"),e.style.fontSize="".concat(W,"px");var K,H=_(e,".BRwordElement"),U=y(B(c(t).find("WORD").toArray(),e.querySelectorAll(".BRwordElement")));try{for(U.s();!(K=U.n()).done;){var q=d(K.value,2),Y=q[0],X=q[1],$=H.get(X),V=d(c(Y).attr("coords").split(",").map(parseFloat),3),J=V[0],Z=V[2]-J;Y.textContent.endsWith(" ")&&(Z=Z*(Y.textContent.length-1)/Y.textContent.length);var Q=Z-$.width;X.style.letterSpacing="".concat(Q/(Y.textContent.length-1),"px")}}catch(t){U.e(t)}finally{U.f()}H=_(e,".BRwordElement");var tt,et,nt=_(e,".BRspace"),rt=c(t).find("LINE[coords]").toArray(),at=Array.from(e.querySelectorAll(".BRlineElement")),ot=i,it=y(B(rt,at));try{for(it.s();!(tt=it.n()).done;){var ut,lt=d(tt.value,2),ct=lt[0],st=lt[1],ft=c(ct).find("WORD").toArray(),ht=this.rtl?o:r,pt=y(B(ft,st.querySelectorAll(".BRwordElement")));try{for(pt.s();!(ut=pt.n()).done;){var dt=d(ut.value,2),yt=dt[0],vt=dt[1],mt=H.get(vt),gt=d(c(yt).attr("coords").split(",").map(parseFloat),3),bt=gt[0],wt=gt[2],kt=this.rtl?-(wt-ht):bt-ht;if(vt.previousElementSibling){var xt=vt.previousElementSibling;xt.style.letterSpacing="".concat(kt-nt.get(xt).width,"px")}else vt.style[this.rtl?"paddingRight":"paddingLeft"]="".concat(kt,"px");this.rtl?ht-=kt+mt.width:ht+=kt+mt.width}}catch(t){pt.e(t)}finally{pt.f()}var St=Math.min.apply(Math,function(t){if(Array.isArray(t))return m(t)}(et=ft.map((function(t){return parseFloat(c(t).attr("coords").split(",")[3])})))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(et)||v(et)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())-ot;st.previousElementSibling&&(st.previousElementSibling.style.lineHeight="".concat(St,"px"),ot+=St)}}catch(t){it.e(t)}finally{it.f()}return at[at.length-1].style.lineHeight="".concat(a-ot,"px"),e.appendChild(document.createElement("br")),e}}]);var n,a}(a.S);function _(t,e){var n={position:t.style.position,visibility:t.style.visibility,top:t.style.top,left:t.style.left,transform:t.style.transform};t.style.position="absolute",t.style.visibility="hidden",t.style.top="0",t.style.left="0",t.style.transform="none",document.body.appendChild(t);var r=new Map(Array.from(t.querySelectorAll(e)).map((function(t){var e=t.getBoundingClientRect();return[t,new M(e.left+window.scrollX,e.top+window.scrollY,e.width,e.height)]})));return document.body.removeChild(t),Object.assign(t.style,n),r}function R(t){var e=c(t).find("WORD").toArray();return{ocrElement:t,words:e,firstWord:e[0],lastWord:e[e.length-1]}}function N(t,e){var n,r,a;return g().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:n=y(t),o.prev=1,n.s();case 3:if((r=n.n()).done){o.next=9;break}return a=r.value,o.next=7,e(a);case 7:o.next=3;break;case 9:o.next=14;break;case 11:o.prev=11,o.t0=o.catch(1),n.e(o.t0);case 14:return o.prev=14,n.f(),o.finish(14);case 17:case"end":return o.stop()}}),f,null,[[1,11,14,17]])}function I(t){var e,n,r,a,o,i;return g().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:e=void 0,n=void 0,r=void 0,a=y(t),u.prev=4,a.s();case 6:if((o=a.n()).done){u.next=17;break}if(i=o.value,void 0===n){u.next=12;break}return r=i,u.next=12,[e,n,r];case 12:e=n,n=i,r=void 0;case 15:u.next=6;break;case 17:u.next=22;break;case 19:u.prev=19,u.t0=u.catch(4),a.e(u.t0);case 22:return u.prev=22,a.f(),u.finish(22);case 25:if(void 0===n){u.next=28;break}return u.next=28,[e,n,r];case 28:case"end":return u.stop()}}),h,null,[[4,19,22,25]])}function B(t,e){var n,r,a,o;return g().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:n=t[Symbol.iterator](),r=e[Symbol.iterator]();case 2:if(a=n.next(),o=r.next(),!a.done||!o.done){i.next=7;break}return i.abrupt("return");case 7:if(!a.done&&!o.done){i.next=9;break}throw new Error("zip: one of the iterators is done");case 9:return i.next=11,[a.value,o.value];case 11:i.next=2;break;case 13:case"end":return i.stop()}}),p)}function z(t){if(!c(t).attr("coords")&&t.children){var e=c(t).children().toArray();if(0!==e.length){var n,r=y(e);try{for(r.s();!(n=r.n()).done;)z(n.value)}catch(t){r.e(t)}finally{r.f()}var a,o=[],i=y(e);try{for(i.s();!(a=i.n()).done;){var u=a.value;c(u).attr("coords")&&o.push(c(u).attr("coords").split(",").map(parseFloat))}}catch(t){i.e(t)}finally{i.f()}var l=function(t){var e,n=1/0,r=-1/0,a=-1/0,o=1/0,i=y(t);try{for(i.s();!(e=i.n()).done;){var u=d(e.value,4),l=u[0],c=u[1],s=u[2],f=u[3];n=Math.min(n,l),r=Math.max(r,c),a=Math.max(a,s),o=Math.min(o,f)}}catch(t){i.e(t)}finally{i.f()}return[n,r,a,o]}(o);Math.abs(l[0])!=1/0&&c(t).attr("coords",l.join(","))}}}null==A||A.registerPlugin("textSelection",T);var M=function(){return S((function t(e,n,r,a){k(this,t),this.x=e,this.y=n,this.width=r,this.height=a}),[{key:"right",get:function(){return this.x+this.width}},{key:"bottom",get:function(){return this.y+this.height}},{key:"top",get:function(){return this.y}},{key:"left",get:function(){return this.x}}])}()},4160:function(t,e,n){n.d(e,{$x:function(){return v},EF:function(){return s},ND:function(){return y},m0:function(){return f},YH:function(){return p}}),n(2675),n(9463),n(6412),n(2259),n(8125),n(8706),n(3418),n(3792),n(2062),n(4490),n(4782),n(2010),n(4731),n(479),n(875),n(6099),n(3362),n(7495),n(8781),n(7764),n(1761),n(3500),n(2953);var r=[],a={},o={},i={};[["Serbian","српски језик","sr","srp","srp"],["Romanian, Moldavian, Moldovan","Română","ro","ron","rum"],["Sichuan Yi, Nuosu","ꆈꌠ꒿ Nuosuhxop","ii","iii","iii"],["Tahitian","Reo Tahiti","ty","tah","tah"],["Tagalog","Wikang Tagalog","tl","tgl","tgl"],["Yiddish","ייִדיש","yi","yid","yid"],["Akan","Akan","ak","aka","aka"],["Malay","Bahasa Melayu, بهاس ملايو","ms","msa","may"],["Arabic","العربية","ar","ara","ara"],["Norwegian","Norsk","no","nor","nor"],["Ojibwa","ᐊᓂᔑᓈᐯᒧᐎᓐ","oj","oji","oji"],["Fulah","Fulfulde, Pulaar, Pular","ff","ful","ful"],["Persian","فارسی","fa","fas","per"],["Albanian","Shqip","sq","sqi","alb"],["Aymara","aymar aru","ay","aym","aym"],["Azerbaijani","azərbaycan dili","az","aze","aze"],["Chinese","中文 (Zhōngwén), 汉语, 漢語","zh","zho","chi"],["Cree","ᓀᐦᐃᔭᐍᐏᐣ","cr","cre","cre"],["Estonian","eesti, eesti keel","et","est","est"],["Guaraní","Avañe'ẽ","gn","grn","grn"],["Inupiaq","Iñupiaq, Iñupiatun","ik","ipk","ipk"],["Inuktitut","ᐃᓄᒃᑎᑐᑦ","iu","iku","iku"],["Kanuri","Kanuri","kr","kau","kau"],["Komi","коми кыв","kv","kom","kom"],["Kongo","Kikongo","kg","kon","kon"],["Kurdish","Kurdî, أۇزبېك","ku","kur","kur"],["Latvian","latviešu valoda","lv","lav","lav"],["Malagasy","fiteny malagasy","mg","mlg","mlg"],["Mongolian","Монгол хэл","mn","mon","mon"],["Oromo","Afaan Oromoo","om","orm","orm"],["Pashto, Pushto","پښتو","ps","pus","pus"],["Quechua","Runa Simi, Kichwa","qu","que","que"],["Sardinian","sardu","sc","srd","srd"],["Swahili","Kiswahili","sw","swa","swa"],["Uzbek","Oʻzbek, Ўзбек, ","uz","uzb","uzb"],["Zhuang, Chuang","Saɯ cueŋƅ, Saw cuengh","za","zha","zha"],["Bislama","Bislama","bi","bis","bis"],["Norwegian Bokmål","Norsk Bokmål","nb","nob","nob"],["Norwegian Nynorsk","Norsk Nynorsk","nn","nno","nno"],["Indonesian","Bahasa Indonesia","id","ind","ind"],["Twi","Twi","tw","twi","twi"],["Esperanto","Esperanto","eo","epo","epo"],["Interlingua","Interlingua","ia","ina","ina"],["Interlingue","Originally called Occidental; then Interlingue after WWII","ie","ile","ile"],["Ido","Ido","io","ido","ido"],["Volapük","Volapük","vo","vol","vol"],["Bihari languages","भोजपुरी","bh","bih","bih"],["Hebrew (modern)","עברית","he","heb","heb"],["Sanskrit","संस्कृतम्","sa","san","san"],["Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian","ѩзыкъ словѣньскъ","cu","chu","chu"],["Pali","पाऴि","pi","pli","pli"],["Avestan","avesta","ae","ave","ave"],["Latin","latine, lingua latina","la","lat","lat"],["Armenian","Հայերեն","hy","hye","arm"],["Swati","SiSwati","ss","ssw","ssw"],["Tibetan","བོད་ཡིག","bo","bod","tib"],["South Ndebele","isiNdebele","nr","nbl","nbl"],["Slovene","Slovenski Jezik, Slovenščina","sl","slv","slv"],["Oriya","ଓଡ଼ିଆ","or","ori","ori"],["North Ndebele","isiNdebele","nd","nde","nde"],["Nauru","Dorerin Naoero","na","nau","nau"],["Maori","te reo Māori","mi","mri","mao"],["Marathi","मराठी","mr","mar","mar"],["Luba-Katanga","Kiluba","lu","lub","lub"],["Rundi","Ikirundi","rn","run","run"],["Central Khmer","ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ","km","khm","khm"],["Western Frisian","Frysk","fy","fry","fry"],["Bengali","বাংলা","bn","ben","ben"],["Avaric","авар мацӀ, магӀарул мацӀ","av","ava","ava"],["Abkhazian","аҧсуа бызшәа, аҧсшәа","ab","abk","abk"],["Afar","Afaraf","aa","aar","aar"],["Afrikaans","Afrikaans","af","afr","afr"],["Amharic","አማርኛ","am","amh","amh"],["Aragonese","aragonés","an","arg","arg"],["Assamese","অসমীয়া","as","asm","asm"],["Bambara","bamanankan","bm","bam","bam"],["Bashkir","башҡорт теле","ba","bak","bak"],["Basque","euskara, euskera","eu","eus","baq"],["Belarusian","беларуская мова","be","bel","bel"],["Bosnian","bosanski jezik","bs","bos","bos"],["Breton","brezhoneg","br","bre","bre"],["Bulgarian","български език","bg","bul","bul"],["Burmese","ဗမာစာ","my","mya","bur"],["Catalan, Valencian","català, valencià","ca","cat","cat"],["Chamorro","Chamoru","ch","cha","cha"],["Chechen","нохчийн мотт","ce","che","che"],["Chichewa, Chewa, Nyanja","chiCheŵa, chinyanja","ny","nya","nya"],["Chuvash","чӑваш чӗлхи","cv","chv","chv"],["Cornish","Kernewek","kw","cor","cor"],["Corsican","corsu, lingua corsa","co","cos","cos"],["Croatian","hrvatski jezik","hr","hrv","hrv"],["Czech","čeština, český jazyk","cs","ces","cze"],["Danish","dansk","da","dan","dan"],["Divehi, Dhivehi, Maldivian","ދިވެހި","dv","div","div"],["Dutch, Flemish","Nederlands, Vlaams","nl","nld","dut"],["Dzongkha","རྫོང་ཁ","dz","dzo","dzo"],["English","English","en","eng","eng"],["Ewe","Eʋegbe","ee","ewe","ewe"],["Faroese","føroyskt","fo","fao","fao"],["Fijian","vosa Vakaviti","fj","fij","fij"],["Finnish","suomi, suomen kieli","fi","fin","fin"],["French","français, langue française","fr","fra","fre"],["Galician","Galego","gl","glg","glg"],["Georgian","ქართული","ka","kat","geo"],["German","Deutsch","de","deu","ger"],["Greek (modern)","ελληνικά","el","ell","gre"],["Gujarati","ગુજરાતી","gu","guj","guj"],["Haitian, Haitian Creole","Kreyòl ayisyen","ht","hat","hat"],["Hausa","(Hausa) هَوُسَ","ha","hau","hau"],["Herero","Otjiherero","hz","her","her"],["Hindi","हिन्दी, हिंदी","hi","hin","hin"],["Hiri Motu","Hiri Motu","ho","hmo","hmo"],["Hungarian","magyar","hu","hun","hun"],["Irish","Gaeilge","ga","gle","gle"],["Igbo","Asụsụ Igbo","ig","ibo","ibo"],["Icelandic","Íslenska","is","isl","ice"],["Italian","Italiano","it","ita","ita"],["Japanese","日本語 (にほんご)","ja","jpn","jpn"],["Javanese","ꦧꦱꦗꦮ, Basa Jawa","jv","jav","jav"],["Kalaallisut, Greenlandic","kalaallisut, kalaallit oqaasii","kl","kal","kal"],["Kannada","ಕನ್ನಡ","kn","kan","kan"],["Kashmiri","कश्मीरी, كشميري","ks","kas","kas"],["Kazakh","қазақ тілі","kk","kaz","kaz"],["Kikuyu, Gikuyu","Gĩkũyũ","ki","kik","kik"],["Kinyarwanda","Ikinyarwanda","rw","kin","kin"],["Kirghiz, Kyrgyz","Кыргызча, Кыргыз тили","ky","kir","kir"],["Korean","한국어","ko","kor","kor"],["Kuanyama, Kwanyama","Kuanyama","kj","kua","kua"],["Luxembourgish, Letzeburgesch","Lëtzebuergesch","lb","ltz","ltz"],["Ganda","Luganda","lg","lug","lug"],["Limburgan, Limburger, Limburgish","Limburgs","li","lim","lim"],["Lingala","Lingála","ln","lin","lin"],["Lao","ພາສາລາວ","lo","lao","lao"],["Lithuanian","lietuvių kalba","lt","lit","lit"],["Manx","Gaelg, Gailck","gv","glv","glv"],["Macedonian","македонски јазик","mk","mkd","mac"],["Malayalam","മലയാളം","ml","mal","mal"],["Maltese","Malti","mt","mlt","mlt"],["Marshallese","Kajin M̧ajeļ","mh","mah","mah"],["Navajo, Navaho","Diné bizaad","nv","nav","nav"],["Nepali","नेपाली","ne","nep","nep"],["Ndonga","Owambo","ng","ndo","ndo"],["Occitan","occitan, lenga d'òc","oc","oci","oci"],["Ossetian, Ossetic","ирон æвзаг","os","oss","oss"],["Panjabi, Punjabi","ਪੰਜਾਬੀ","pa","pan","pan"],["Polish","język polski, polszczyzna","pl","pol","pol"],["Portuguese","Português","pt","por","por"],["Romansh","Rumantsch Grischun","rm","roh","roh"],["Russian","русский","ru","rus","rus"],["Sindhi","सिन्धी, سنڌي، سندھی","sd","snd","snd"],["Northern Sami","Davvisámegiella","se","sme","sme"],["Samoan","gagana fa'a Samoa","sm","smo","smo"],["Sango","yângâ tî sängö","sg","sag","sag"],["Gaelic, Scottish Gaelic","Gàidhlig","gd","gla","gla"],["Shona","chiShona","sn","sna","sna"],["Sinhala, Sinhalese","සිංහල","si","sin","sin"],["Slovak","Slovenčina, Slovenský Jazyk","sk","slk","slo"],["Somali","Soomaaliga, af Soomaali","so","som","som"],["Southern Sotho","Sesotho","st","sot","sot"],["Spanish, Castilian","Español","es","spa","spa"],["Sundanese","Basa Sunda","su","sun","sun"],["Swedish","Svenska","sv","swe","swe"],["Tamil","தமிழ்","ta","tam","tam"],["Telugu","తెలుగు","te","tel","tel"],["Tajik","тоҷикӣ, toçikī, تاجیکی","tg","tgk","tgk"],["Thai","ไทย","th","tha","tha"],["Tigrinya","ትግርኛ","ti","tir","tir"],["Turkmen","Türkmen, Түркмен","tk","tuk","tuk"],["Tswana","Setswana","tn","tsn","tsn"],["Tongan (Tonga Islands)","Faka Tonga","to","ton","ton"],["Turkish","Türkçe","tr","tur","tur"],["Tsonga","Xitsonga","ts","tso","tso"],["Tatar","татар теле, tatar tele","tt","tat","tat"],["Uighur, Uyghur","ئۇيغۇرچە, Uyghurche","ug","uig","uig"],["Ukrainian","Українська","uk","ukr","ukr"],["Urdu","اردو","ur","urd","urd"],["Venda","Tshivenḓa","ve","ven","ven"],["Vietnamese","Tiếng Việt","vi","vie","vie"],["Walloon","Walon","wa","wln","wln"],["Welsh","Cymraeg","cy","cym","wel"],["Wolof","Wollof","wo","wol","wol"],["Xhosa","isiXhosa","xh","xho","xho"],["Yoruba","Yorùbá","yo","yor","yor"],["Zulu","isiZulu","zu","zul","zul"]].forEach((t=>{var e={name:t[0],nativeName:t[1],iso639_1:t[2],iso639_2T:t[3],iso639_2B:t[4]};a[t[2]]=o[t[3]]=i[t[4]]=e,r.push(e)}));var u=r;function l(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return c(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,a=function(){};return{s:a,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){u=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw o}}}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function s(t){var e=t.match(/\S+/g);return e?e.length:0}function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(t)}var h={"zh-hans":"中文 (Zhōngwén)"};function p(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t?d(t=t.toLowerCase(),["iso639_1"],e)||d(t,["iso639_2T"],e)||d(t,["iso639_2B","nativeName","name"],e):null}function d(t,e,n){var r,a=l(u);try{for(a.s();!(r=a.n()).done;){var o,i=r.value,c=l(e);try{for(c.s();!(o=c.n()).done;)if(-1!=i[o.value].split(", ").map((function(t){return t.toLowerCase()})).indexOf(t))return n?"".concat(i.nativeName.split(", ")[0]," (").concat(i.iso639_1,")"):i.iso639_1}catch(t){c.e(t)}finally{c.f()}}}catch(t){a.e(t)}finally{a.f()}return h[t]?"".concat(h[t]," (").concat(t,")"):null}function y(){try{return!!window.localStorage}catch(t){return!1}}var v=-1!=location.toString().indexOf("_debugReadAloud=true")},593:function(t,e,n){n.d(e,{bg:function(){return b}}),n(2675),n(9463),n(6412),n(2259),n(5700),n(8125),n(113),n(3418),n(3792),n(8598),n(4490),n(4782),n(9572),n(2010),n(4731),n(479),n(8130),n(875),n(6099),n(3362),n(7495),n(8781),n(7764),n(5440),n(3500),n(2953);var r=n(1669);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function i(t,e,n){return(e=u(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}var l=function(){return t=function t(e,n){var a=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i(this,"selecting",!1),i(this,"startedInSelector",!1),i(this,"target",null),i(this,"_onSelectionChange",(function(){var t=window.getSelection();if(!a.selecting&&t.toString()){var e=r(t.anchorNode).closest(a.selector)[0];if(!e)return;a.target=e,a.selecting=!0,a.handler("started",a.target)}!a.selecting||!t.isCollapsed&&t.toString()&&r(t.anchorNode).closest(a.selector)[0]||(a.selecting=!1,a.handler("cleared",a.target))})),this.selector=e,this.handler=n},(e=[{key:"attach",value:function(){document.addEventListener("selectionchange",this._onSelectionChange)}},{key:"detach",value:function(){document.removeEventListener("selectionchange",this._onSelectionChange)}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),c=n(1669);function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function f(){f=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new _(r||[]);return a(i,"_invoke",{value:O(t,n,u)}),i}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",v="executing",m="completed",g={};function b(){}function w(){}function k(){}var x={};c(x,i,(function(){return this}));var S=Object.getPrototypeOf,E=S&&S(S(R([])));E&&E!==n&&r.call(E,i)&&(x=E);var j=k.prototype=b.prototype=Object.create(x);function L(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function P(t,e){function n(a,o,i,u){var l=p(t[a],t,o);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==s(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(f).then((function(t){c.value=t,i(c)}),(function(t){return n("throw",t,i,u)}))}u(l.arg)}var o;a(this,"_invoke",{value:function(t,r){function a(){return new e((function(e,a){n(t,r,e,a)}))}return o=o?o.then(a,a):a()}})}function O(e,n,r){var a=d;return function(o,i){if(a===v)throw Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:t,done:!0}}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var l=C(u,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(a===d)throw a=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);a=v;var c=p(e,n,r);if("normal"===c.type){if(a=r.done?m:y,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(a=m,r.method="throw",r.arg=c.arg)}}}function C(e,n){var r=n.method,a=e.iterator[r];if(a===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var o=p(a,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,g;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function A(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(A,this),this.reset(!0)}function R(e){if(e||""===e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function n(){for(;++a<e.length;)if(r.call(e,a))return n.value=e[a],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(s(e)+" is not iterable")}return w.prototype=k,a(j,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:w,configurable:!0}),w.displayName=c(k,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,c(t,l,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},L(P.prototype),c(P.prototype,u,(function(){return this})),e.AsyncIterator=P,e.async=function(t,n,r,a,o){void 0===o&&(o=Promise);var i=new P(h(t,n,r,a),o);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(j),c(j,l,"Generator"),c(j,i,(function(){return this})),c(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=R,_.prototype={constructor:_,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function a(r,a){return u.type="throw",u.arg=e,n.next=r,a&&(n.method="next",n.arg=t),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;T(n)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}var h=f().mark(w),p=f().mark(k);function d(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return y(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,a=function(){};return{s:a,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return i=t.done,t},e:function(t){u=!0,o=t},f:function(){try{i||null==n.return||n.return()}finally{if(u)throw o}}}}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,g(r.key),r)}}function m(t,e,n){return(e=g(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}var b=function(){return t=function t(e,n,r,a){var o=this,i=r.selectionElement;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),m(this,"options",{maxProtectedWords:200}),m(this,"_onSelectionChange",(function(t,e){if("started"===t)o.textSelectingMode(e);else{if("cleared"!==t)throw new Error("Unknown type ".concat(t));o.defaultMode(e)}})),m(this,"_limitSelection",(function(){var t=window.getSelection();if(t.rangeCount){var e=t.getRangeAt(0),n=!!e.startContainer.parentElement.closest(".BRcontainer"),r=!!e.endContainer.parentElement.closest(".BRcontainer");if(n||r)if(n&&r){var a=function(t,e){var n,r=0,a=d(t);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(r==e)return o;r++}}catch(t){a.e(t)}finally{a.f()}}(w(k(e.startContainer,e.endContainer),(function(t){var e;return null===(e=t.classList)||void 0===e?void 0:e.contains(o.selectionElement[0].replace(".",""))})),o.options.maxProtectedWords-1);if(a&&e.endContainer.parentNode!=a){var i=document.createRange();i.setStart(e.startContainer,e.startOffset),i.setEnd(a.firstChild,a.textContent.length),t.removeAllRanges(),t.addRange(i)}}else t.removeAllRanges()}})),this.layer=e,this.br=n,this.selectionElement=i,this.selectionObserver=new l(this.layer,this._onSelectionChange),this.options.maxProtectedWords=a||200},e=[{key:"init",value:function(){var t=this;this.attach(),new l(this.layer,(function(e){var n;"started"==e&&(null===(n=t.br.plugins.archiveAnalytics)||void 0===n||n.sendEvent("BookReader","SelectStart"),t.br.refs.$br.find(".BRpagecontainer--hasSelection").removeClass("BRpagecontainer--hasSelection"),c(window.getSelection().anchorNode).closest(".BRpagecontainer").addClass("BRpagecontainer--hasSelection"))})).attach()}},{key:"attach",value:function(){var t=this;this.selectionObserver.attach(),this.br.protected&&(document.addEventListener("selectionchange",this._limitSelection),c(document.body).on("contextmenu dragstart copy",(function(e){var n=document.getSelection();if(null!=n&&n.toString()&&c(t.layer).toArray().some((function(t){return n.containsNode(t,!0)})))return e.preventDefault(),!1})))}},{key:"detach",value:function(){this.selectionObserver.detach(),this.br.protected&&document.removeEventListener("selectionchange",this._limitSelection)}},{key:"interceptCopy",value:function(t){t[0].addEventListener("copy",(function(t){var e=document.getSelection();t.clipboardData.setData("text/plain",e.toString()),t.preventDefault()}))}},{key:"stopPageFlip",value:function(t){var e=this,n=t.find(this.layer);n.length&&(n.each((function(t,n){return e.defaultMode(n)})),this.br.protected||this.interceptCopy(t))}},{key:"defaultMode",value:function(t){var e=this,n=c(t).closest(".BRpagecontainer");t.style.pointerEvents="none",n.find("img").css("pointer-events","auto"),c(t).off(".textSelectPluginHandler");var r=this.mouseIsDown,a=this.mouseIsDown;r&&(t.style.pointerEvents="auto"),c(t).on("mousedown.textSelectPluginHandler",(function(t){e.mouseIsDown=!0,c(t.target).is(e.selectionElement.join(", "))&&t.stopPropagation()})),c(t).on("mouseup.textSelectPluginHandler",(function(n){e.mouseIsDown=!1,t.style.pointerEvents="none",a&&(a=!1,n.stopPropagation())}))}},{key:"textSelectingMode",value:function(t){var e=this,n=c(t).closest(".BRpagecontainer");t.style.pointerEvents="all",n.find("img").css("pointer-events","none"),c(t).off(".textSelectPluginHandler"),c(t).on("mousedown.textSelectPluginHandler",(function(t){e.mouseIsDown=!0,t.stopPropagation()})),c(t).on("mouseup.textSelectPluginHandler",(function(t){e.mouseIsDown=!1,t.stopPropagation()}))}}],e&&v(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function w(t,e){var n,r,a;return f().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:n=d(t),o.prev=1,n.s();case 3:if((r=n.n()).done){o.next=10;break}if(a=r.value,!e(a)){o.next=8;break}return o.next=8,a;case 8:o.next=3;break;case 10:o.next=15;break;case 12:o.prev=12,o.t0=o.catch(1),n.e(o.t0);case 15:return o.prev=15,n.f(),o.finish(15);case 18:case"end":return o.stop()}}),h,null,[[1,12,15,18]])}function k(t,e){var n,r;return f().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return r=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=a.children,i=void 0===o||o,u=a.parents,l=void 0===u||u,c=a.siblings,s=void 0===c||c;return f().mark((function a(){var o;return f().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(t!==e){a.next=5;break}return n=!0,a.next=4,t;case 4:return a.abrupt("return");case 5:return a.next=7,t;case 7:if(!i||!t.firstChild){a.next=11;break}return a.delegateYield(r(t.firstChild,{children:!0,parents:!1,siblings:!0}),"t0",9);case 9:if(!n){a.next=11;break}return a.abrupt("return");case 11:if(!s){a.next=20;break}o=t.nextSibling;case 13:if(!o){a.next=20;break}return a.delegateYield(r(o,{children:!0,parents:!1,siblings:!1}),"t1",15);case 15:if(!n){a.next=17;break}return a.abrupt("return");case 17:o=o.nextSibling,a.next=13;break;case 20:if(!l||!t.parentNode){a.next=24;break}return a.delegateYield(r(t.parentNode,{children:!1,parents:!0,siblings:!0}),"t2",22);case 22:if(!n){a.next=24;break}return a.abrupt("return");case 24:case"end":return a.stop()}}),a)}))()},n=!1,a.delegateYield(r(t),"t0",3);case 3:case"end":return a.stop()}}),p)}},4565:function(t,e,n){function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function a(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,o(r.key),r)}}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var a=n.call(t,"string");if("object"!=r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.d(e,{l:function(){return i}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(6099),n(7764),n(2953);var i=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.maxSize=e,this.entries=[]},(e=[{key:"add",value:function(t){this.entries.length>=this.maxSize&&this.entries.shift(),this.entries.push(t)}}])&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}()},9073:function(t,e,n){function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;return null==t?void 0:t.replace(/\{\{([^}]*?)\}\}/g,(function(t,o){if(!o)return t;var i,u=function(t){if(Array.isArray(t))return t}(i=o.split("|").map((function(t){return t.trim()})))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),l=u[0],c=u.slice(1);if(!(l in n)&&!(l in e))return t;var s=l in n?n[l]:l in e?e[l]:null;return c.map((function(t){return a[t]})).reduce((function(t,e){return e(t)}),s&&s.toString())}))}n.d(e,{g:function(){return a}}),n(2675),n(9463),n(2259),n(3418),n(3792),n(2062),n(2712),n(4782),n(2010),n(6099),n(7495),n(8781),n(7764),n(5440),n(2762),n(2953);var o={urlencode:encodeURIComponent}}},function(t){t(t.s=296)}]);
|
|
2
|
+
"use strict";(self.webpackChunk_internetarchive_bookreader=self.webpackChunk_internetarchive_bookreader||[]).push([[326],{296:function(e,t,n){n(2675),n(9463),n(2259),n(5700),n(8706),n(2008),n(113),n(3418),n(3792),n(8598),n(2062),n(4782),n(6910),n(9572),n(2010),n(6033),n(8130),n(9085),n(875),n(6099),n(8459),n(3362),n(825),n(7495),n(8781),n(9449),n(7764),n(2762),n(2953);var r=n(4907),a=n(1041),o=n(9073),i=n(4565),l=n(4160),u=n(593),s=n(1669);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var f=b().m(N),h=b().m(_),d=b().m(M);function p(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=m(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,l=[],u=!0,s=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(e){s=!0,a=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(s)throw a}}return l}}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return g(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return k(s,"_invoke",function(n,r,a){var o,l,u,s=0,c=a||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return o=t,l=0,u=e,h.n=n,i}};function d(n,r){for(l=n,u=r,t=0;!f&&s&&!a&&t<c.length;t++){var a,o=c[t],d=h.p,p=o[2];n>3?(a=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=d&&((a=n<2&&d<o[1])?(l=0,h.v=r,h.n=o[1]):d<p&&(a=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,l=0))}if(a||n>1)return i;throw f=!0,r}return function(a,c,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),l=c,u=p;(t=l<2?e:u)||!f;){o||(l?l<3?(l>1&&(h.n=-1),d(l,u)):h.n=u:h.v=u);try{if(s=2,o){if(l||(a="next"),t=o[a]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),l=1);o=e}else if((t=(f=h.n<0)?u:n.call(r,h))!==i)break}catch(t){o=e,l=1,u=t}finally{s=1}}return{value:t,done:f}}}(n,a,o),!0),s}var i={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(k(t={},r,function(){return this}),t),f=s.prototype=l.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,k(e,a,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=s,k(f,"constructor",s),k(s,"constructor",u),u.displayName="GeneratorFunction",k(s,a,"GeneratorFunction"),k(f),k(f,a,"Generator"),k(f,r,function(){return this}),k(f,"toString",function(){return"[object Generator]"}),(b=function(){return{w:o,m:h}})()}function k(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}k=function(e,t,n,r){function o(t,n){k(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},k(e,t,n,r)}function w(e,t,n,r,a,o,i){try{var l=e[o](i),u=l.value}catch(e){return void n(e)}l.done?t(u):Promise.resolve(u).then(r,a)}function S(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var o=e.apply(t,n);function i(e){w(o,r,a,i,l,"next",e)}function l(e){w(o,r,a,i,l,"throw",e)}i(void 0)})}}function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,T(r.key),r)}}function P(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(C=function(){return!!e})()}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function A(e,t,n){return(t=T(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function T(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var R=window.BookReader,B=function(e){function t(e){var n,r,a,o;return j(this,t),A((r=this,o=[e],a=E(a=t),n=function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(r,C()?Reflect.construct(a,o||[],E(r).constructor):a.apply(r,o))),"options",{enabled:!0,fullDjvuXmlUrl:null,singlePageDjvuXmlUrl:null,jsonp:!1,maxProtectedWords:200}),A(n,"djvuPagesPromise",null),A(n,"pageTextCache",new i.l),A(n,"maxWordRendered",2500),n.rtl="rl"===n.br.pageProgression,n.textSelectionManager=new u.bg(".BRtextLayer",n.br,{selectionElement:[".BRwordElement",".BRspace"]},n.options.maxProtectedWords),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(t,e),P(t,[{key:"init",value:function(){this.options.enabled&&(this.loadData(),this.textSelectionManager.init())}},{key:"_configurePageContainer",value:function(e){return this.br.mode!==this.br.constModeThumb&&e.page&&this.createTextLayer(e),e}},{key:"loadData",value:function(){this.options.singlePageDjvuXmlUrl||(this.djvuPagesPromise=s.ajax({type:"GET",url:(0,o.g)(this.options.fullDjvuXmlUrl,this.br.options.vars),dataType:this.options.jsonp?"jsonp":"html",cache:!0,xhrFields:{withCredentials:this.br.protected},error:function(e){}}).then(function(e){try{var t=s.parseXML(e);return t&&s(t).find("OBJECT")}catch(e){return}}))}},{key:"getPageText",value:(a=S(b().m(function e(t){var n,r,a,i,l;return b().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!this.options.singlePageDjvuXmlUrl){e.n=5;break}if(!(n=this.pageTextCache.entries.find(function(e){return e.index==t}))){e.n=1;break}return e.a(2,n.response);case 1:return e.n=2,s.ajax({type:"GET",url:(0,o.g)(this.options.singlePageDjvuXmlUrl,this.br.options.vars,{pageIndex:t}),dataType:this.options.jsonp?"jsonp":"html",cache:!0,xhrFields:{withCredentials:this.br.protected},error:function(e){}});case 2:return r=e.v,e.p=3,a=s.parseXML(r),i=a&&s(a).find("OBJECT")[0],this.pageTextCache.add({index:t,response:i}),e.a(2,i);case 4:return e.p=4,e.v,e.a(2,void 0);case 5:return e.n=6,this.djvuPagesPromise;case 6:if(!(l=e.v)){e.n=7;break}return e.a(2,l[t]);case 7:return e.a(2)}},e,this,[[3,4]])})),function(e){return a.apply(this,arguments)})},{key:"createTextLayer",value:(n=S(b().m(function e(t){var n,a,o,i,u,c,f,h,d,p,m,g,k,w,S,j,x,P,C,E,O,A,T,R,B,I=this;return b().w(function(e){for(;;)switch(e.n){case 0:if(n=t.page.index,!(a=t.$container).find(".BRtextLayer").length){e.n=1;break}return e.a(2);case 1:return e.n=2,this.getPageText(n);case 2:if(o=e.v){e.n=3;break}return e.a(2);case 3:if(s(o).find("WORD").filter(function(e,t){var n=v(t.getAttribute("coords").split(",").map(parseFloat),4),r=n[0],a=n[3];if(0==r&&0==a)return console.error("Found invalid ocr word coordinates"),!0}).remove(),L(o),!((i=s(o).find("WORD").length)>this.maxWordRendered)){e.n=4;break}return console.log("Page ".concat(n," has too many words (").concat(i," > ").concat(this.maxWordRendered,"). Not rendering text layer.")),e.a(2);case 4:return u=(0,r.Ql)(t.page,"BRtextLayer"),e.n=5,Promise.resolve();case 5:c=parseFloat(t.$container[0].style.width)/t.page.width,f=parseFloat(t.$container[0].style.height)/t.page.height,u.style.transform="scale(".concat(c,", ").concat(f,")"),(h=(0,l.YH)(this.br.options.bookLanguage))&&u.setAttribute("lang",h),u.setAttribute("dir",this.rtl?"rtl":"ltr"),d=s(o).find("PARAGRAPH[coords]").toArray(),p=d.map(function(e){var t=I.renderParagraph(e);return u.appendChild(t),t}),m=z(u,".BRparagraphElement"),g=0,k=y(M(d,p));try{for(k.s();!(w=k.n()).done;)S=v(w.value,2),j=S[0],x=S[1],P=s(j).attr("coords").split(",").map(parseFloat),C=m.get(x),E=v(P,4),O=E[0],A=E[2],T=E[3],R=this.rtl?C.right-A:O-C.left,B=T-(C.top+g),x.style[this.rtl?"marginRight":"marginLeft"]="".concat(R,"px"),x.style.marginTop="".concat(B,"px"),g+=B,u.appendChild(x)}catch(e){k.e(e)}finally{k.f()}a.append(u),this.textSelectionManager.stopPageFlip(a),this.br.trigger("textLayerRendered",{pageIndex:n,pageContainer:t});case 6:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"renderParagraph",value:function(e){var t=document.createElement("p");t.classList.add("BRparagraphElement"),e.getAttribute("x-role")&&(t.classList.add("ocr-role-header-footer"),t.ariaHidden="true");var n=v(s(e).attr("coords").split(",").map(parseFloat),4),r=n[0],a=n[1],o=n[2],i=n[3],l=[],u=s(e).find("LINE[coords]").toArray();if(!u.length)return t;var c,f=y(_(N(u,I)));try{for(f.s();!(c=f.n()).done;){var h=v(c.value,3),d=h[0],m=h[1],g=h[2],b=m.ocrElement==u[u.length-1],k=document.createElement("span");k.classList.add("BRlineElement");var w,S=y(m.words.entries());try{for(S.s();!(w=S.n()).done;){var j=v(w.value,2),x=j[0],P=j[1],C=v(s(P).attr("coords").split(",").map(parseFloat),4),E=C[1],O=C[2],A=C[3],T=E-A;if(l.push(T),0==x&&null!=d&&d.lastWord.textContent.trim().endsWith("-")){var R=v(s((g||d).firstWord).attr("coords").split(",").map(parseFloat),3)[0];s(P).attr("coords","".concat(R,",").concat(E,",").concat(O,",").concat(A))}var B=document.createElement("span");if(B.setAttribute("class","BRwordElement"),B.textContent=P.textContent.trim(),x>0){var L=document.createElement("span");L.classList.add("BRspace"),L.textContent=" ",k.append(L),k.appendChild(document.createTextNode(" "))}k.appendChild(B)}}catch(e){S.e(e)}finally{S.f()}var D=m.lastWord.textContent.trim().endsWith("-"),F=k.children[k.children.length-1];D&&!b&&(F.textContent=F.textContent.trim().slice(0,-1),F.classList.add("BRwordElement--hyphen")),t.appendChild(k),b||D||t.appendChild(document.createTextNode(" "))}}catch(e){f.e(e)}finally{f.f()}l.sort(function(e,t){return e-t});var G=l[Math.floor(.85*l.length)]+4;t.style.left="".concat(r,"px"),t.style.top="".concat(i,"px"),t.style.width="".concat(o-r,"px"),t.style.height="".concat(a-i,"px"),t.style.fontSize="".concat(G,"px");var W,K=z(t,".BRwordElement"),H=y(M(s(e).find("WORD").toArray(),t.querySelectorAll(".BRwordElement")));try{for(H.s();!(W=H.n()).done;){var U=v(W.value,2),q=U[0],X=U[1],$=K.get(X),V=v(s(q).attr("coords").split(",").map(parseFloat),3),J=V[0],Y=V[2]-J;q.textContent.endsWith(" ")&&(Y=Y*(q.textContent.length-1)/q.textContent.length);var Z=Y-$.width;X.style.letterSpacing="".concat(Z/(q.textContent.length-1),"px")}}catch(e){H.e(e)}finally{H.f()}K=z(t,".BRwordElement");var Q,ee=z(t,".BRspace"),te=s(e).find("LINE[coords]").toArray(),ne=Array.from(t.querySelectorAll(".BRlineElement")),re=i,ae=y(M(te,ne));try{for(ae.s();!(Q=ae.n()).done;){var oe,ie=v(Q.value,2),le=ie[0],ue=ie[1],se=s(le).find("WORD").toArray(),ce=this.rtl?o:r,fe=y(M(se,ue.querySelectorAll(".BRwordElement")));try{for(fe.s();!(oe=fe.n()).done;){var he=v(oe.value,2),de=he[0],pe=he[1],ye=K.get(pe),ve=v(s(de).attr("coords").split(",").map(parseFloat),3),me=ve[0],ge=ve[2],be=this.rtl?-(ge-ce):me-ce;if(pe.previousElementSibling){var ke=pe.previousElementSibling;ke.style.letterSpacing="".concat(be-ee.get(ke).width,"px")}else pe.style[this.rtl?"paddingRight":"paddingLeft"]="".concat(be,"px");this.rtl?ce-=be+ye.width:ce+=be+ye.width}}catch(e){fe.e(e)}finally{fe.f()}var we=Math.min.apply(Math,p(se.map(function(e){return parseFloat(s(e).attr("coords").split(",")[3])})))-re;ue.previousElementSibling&&(ue.previousElementSibling.style.lineHeight="".concat(we,"px"),re+=we)}}catch(e){ae.e(e)}finally{ae.f()}return ne[ne.length-1].style.lineHeight="".concat(a-re,"px"),t.appendChild(document.createElement("br")),t}}]);var n,a}(a.S);function z(e,t){var n={position:e.style.position,visibility:e.style.visibility,top:e.style.top,left:e.style.left,transform:e.style.transform};e.style.position="absolute",e.style.visibility="hidden",e.style.top="0",e.style.left="0",e.style.transform="none",document.body.appendChild(e);var r=new Map(Array.from(e.querySelectorAll(t)).map(function(e){var t=e.getBoundingClientRect();return[e,new D(t.left+window.scrollX,t.top+window.scrollY,t.width,t.height)]}));return document.body.removeChild(e),Object.assign(e.style,n),r}function I(e){var t=s(e).find("WORD").toArray();return{ocrElement:e,words:t,firstWord:t[0],lastWord:t[t.length-1]}}function N(e,t){var n,r,a,o;return b().w(function(i){for(;;)switch(i.p=i.n){case 0:n=y(e),i.p=1,n.s();case 2:if((r=n.n()).done){i.n=4;break}return a=r.value,i.n=3,t(a);case 3:i.n=2;break;case 4:i.n=6;break;case 5:i.p=5,o=i.v,n.e(o);case 6:return i.p=6,n.f(),i.f(6);case 7:return i.a(2)}},f,null,[[1,5,6,7]])}function _(e){var t,n,r,a,o,i,l;return b().w(function(u){for(;;)switch(u.p=u.n){case 0:t=void 0,n=void 0,r=void 0,a=y(e),u.p=1,a.s();case 2:if((o=a.n()).done){u.n=5;break}if(i=o.value,void 0===n){u.n=3;break}return r=i,u.n=3,[t,n,r];case 3:t=n,n=i,r=void 0;case 4:u.n=2;break;case 5:u.n=7;break;case 6:u.p=6,l=u.v,a.e(l);case 7:return u.p=7,a.f(),u.f(7);case 8:if(void 0===n){u.n=9;break}return u.n=9,[t,n,r];case 9:return u.a(2)}},h,null,[[1,6,7,8]])}function M(e,t){var n,r,a,o;return b().w(function(i){for(;;)switch(i.n){case 0:n=e[Symbol.iterator](),r=t[Symbol.iterator]();case 1:if(a=n.next(),o=r.next(),!a.done||!o.done){i.n=2;break}return i.a(2);case 2:if(!a.done&&!o.done){i.n=3;break}throw new Error("zip: one of the iterators is done");case 3:return i.n=4,[a.value,o.value];case 4:i.n=1;break;case 5:return i.a(2)}},d)}function L(e){if(!s(e).attr("coords")&&e.children){var t=s(e).children().toArray();if(0!==t.length){var n,r=y(t);try{for(r.s();!(n=r.n()).done;)L(n.value)}catch(e){r.e(e)}finally{r.f()}var a,o=[],i=y(t);try{for(i.s();!(a=i.n()).done;){var l=a.value;s(l).attr("coords")&&o.push(s(l).attr("coords").split(",").map(parseFloat))}}catch(e){i.e(e)}finally{i.f()}var u=function(e){var t,n=1/0,r=-1/0,a=-1/0,o=1/0,i=y(e);try{for(i.s();!(t=i.n()).done;){var l=v(t.value,4),u=l[0],s=l[1],c=l[2],f=l[3];n=Math.min(n,u),r=Math.max(r,s),a=Math.max(a,c),o=Math.min(o,f)}}catch(e){i.e(e)}finally{i.f()}return[n,r,a,o]}(o);Math.abs(u[0])!=1/0&&s(e).attr("coords",u.join(","))}}}null==R||R.registerPlugin("textSelection",B);var D=function(){return P(function e(t,n,r,a){j(this,e),this.x=t,this.y=n,this.width=r,this.height=a},[{key:"right",get:function(){return this.x+this.width}},{key:"bottom",get:function(){return this.y+this.height}},{key:"top",get:function(){return this.y}},{key:"left",get:function(){return this.x}}])}()},593:function(e,t,n){n.d(t,{bg:function(){return w}}),n(2675),n(9463),n(2259),n(5700),n(113),n(3418),n(3792),n(8598),n(4782),n(9572),n(2010),n(8130),n(875),n(6099),n(3362),n(7495),n(8781),n(7764),n(5440),n(2953);var r=n(1669);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function i(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){var t=function(e){if("object"!=a(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==a(t)?t:t+""}var u=function(){return e=function e(t,n){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),i(this,"selecting",!1),i(this,"startedInSelector",!1),i(this,"target",null),i(this,"_onSelectionChange",function(){var e=window.getSelection();if(!a.selecting&&e.toString()){var t=r(e.anchorNode).closest(a.selector)[0];if(!t)return;a.target=t,a.selecting=!0,a.handler("started",a.target)}!a.selecting||!e.isCollapsed&&e.toString()&&r(e.anchorNode).closest(a.selector)[0]||(a.selecting=!1,a.handler("cleared",a.target))}),this.selector=t,this.handler=n},(t=[{key:"attach",value:function(){document.addEventListener("selectionchange",this._onSelectionChange)}},{key:"detach",value:function(){document.removeEventListener("selectionchange",this._onSelectionChange)}}])&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),s=n(1669);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(c(e)+" is not iterable")}function h(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return d(s,"_invoke",function(n,r,a){var o,l,u,s=0,c=a||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return o=t,l=0,u=e,h.n=n,i}};function d(n,r){for(l=n,u=r,t=0;!f&&s&&!a&&t<c.length;t++){var a,o=c[t],d=h.p,p=o[2];n>3?(a=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=e):o[0]<=d&&((a=n<2&&d<o[1])?(l=0,h.v=r,h.n=o[1]):d<p&&(a=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,l=0))}if(a||n>1)return i;throw f=!0,r}return function(a,c,p){if(s>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),l=c,u=p;(t=l<2?e:u)||!f;){o||(l?l<3?(l>1&&(h.n=-1),d(l,u)):h.n=u:h.v=u);try{if(s=2,o){if(l||(a="next"),t=o[a]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,l<2&&(l=0)}else 1===l&&(t=o.return)&&t.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),l=1);o=e}else if((t=(f=h.n<0)?u:n.call(r,h))!==i)break}catch(t){o=e,l=1,u=t}finally{s=1}}return{value:t,done:f}}}(n,a,o),!0),s}var i={};function l(){}function u(){}function s(){}t=Object.getPrototypeOf;var c=[][r]?t(t([][r]())):(d(t={},r,function(){return this}),t),f=s.prototype=l.prototype=Object.create(c);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,s):(e.__proto__=s,d(e,a,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=s,d(f,"constructor",s),d(s,"constructor",u),u.displayName="GeneratorFunction",d(s,a,"GeneratorFunction"),d(f),d(f,a,"Generator"),d(f,r,function(){return this}),d(f,"toString",function(){return"[object Generator]"}),(h=function(){return{w:o,m:p}})()}function d(e,t,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}d=function(e,t,n,r){function o(t,n){d(e,t,function(e){return this._invoke(t,n,e)})}t?a?a(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(o("next",0),o("throw",1),o("return",2))},d(e,t,n,r)}var p=h().m(S),y=h().m(j);function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,k(r.key),r)}}function b(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var w=function(){return e=function e(t,n,r,a){var o=this,i=r.selectionElement;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),b(this,"options",{maxProtectedWords:200}),b(this,"_onSelectionChange",function(e,t){if("started"===e)o.textSelectingMode(t);else{if("cleared"!==e)throw new Error("Unknown type ".concat(e));o.defaultMode(t)}}),b(this,"_limitSelection",function(){var e=window.getSelection();if(e.rangeCount){var t=e.getRangeAt(0),n=!!t.startContainer.parentElement.closest(".BRcontainer"),r=!!t.endContainer.parentElement.closest(".BRcontainer");if(n||r)if(n&&r){var a=function(e,t){var n,r=0,a=v(e);try{for(a.s();!(n=a.n()).done;){var o=n.value;if(r==t)return o;r++}}catch(e){a.e(e)}finally{a.f()}}(S(j(t.startContainer,t.endContainer),function(e){var t;return null===(t=e.classList)||void 0===t?void 0:t.contains(o.selectionElement[0].replace(".",""))}),o.options.maxProtectedWords-1);if(a&&t.endContainer.parentNode!=a){var i=document.createRange();i.setStart(t.startContainer,t.startOffset),i.setEnd(a.firstChild,a.textContent.length),e.removeAllRanges(),e.addRange(i)}}else e.removeAllRanges()}}),this.layer=t,this.br=n,this.selectionElement=i,this.selectionObserver=new u(this.layer,this._onSelectionChange),this.options.maxProtectedWords=a||200},t=[{key:"init",value:function(){var e=this;this.attach(),new u(this.layer,function(t){var n;"started"==t&&(null===(n=e.br.plugins.archiveAnalytics)||void 0===n||n.sendEvent("BookReader","SelectStart"),e.br.refs.$br.find(".BRpagecontainer--hasSelection").removeClass("BRpagecontainer--hasSelection"),s(window.getSelection().anchorNode).closest(".BRpagecontainer").addClass("BRpagecontainer--hasSelection"))}).attach()}},{key:"attach",value:function(){var e=this;this.selectionObserver.attach(),this.br.protected&&(document.addEventListener("selectionchange",this._limitSelection),s(document.body).on("contextmenu dragstart copy",function(t){var n=document.getSelection();if(null!=n&&n.toString()&&s(e.layer).toArray().some(function(e){return n.containsNode(e,!0)}))return t.preventDefault(),!1}))}},{key:"detach",value:function(){this.selectionObserver.detach(),this.br.protected&&document.removeEventListener("selectionchange",this._limitSelection)}},{key:"interceptCopy",value:function(e){e[0].addEventListener("copy",function(e){var t=document.getSelection();e.clipboardData.setData("text/plain",t.toString()),e.preventDefault()})}},{key:"stopPageFlip",value:function(e){var t=this,n=e.find(this.layer);n.length&&(n.each(function(e,n){return t.defaultMode(n)}),this.br.protected||this.interceptCopy(e))}},{key:"defaultMode",value:function(e){var t=this,n=s(e).closest(".BRpagecontainer");e.style.pointerEvents="none",n.find("img").css("pointer-events","auto"),s(e).off(".textSelectPluginHandler");var r=this.mouseIsDown,a=this.mouseIsDown;r&&(e.style.pointerEvents="auto"),s(e).on("mousedown.textSelectPluginHandler",function(e){t.mouseIsDown=!0,s(e.target).is(t.selectionElement.join(", "))&&e.stopPropagation()}),s(e).on("mouseup.textSelectPluginHandler",function(n){t.mouseIsDown=!1,e.style.pointerEvents="none",a&&(a=!1,n.stopPropagation())})}},{key:"textSelectingMode",value:function(e){var t=this,n=s(e).closest(".BRpagecontainer");e.style.pointerEvents="all",n.find("img").css("pointer-events","none"),s(e).off(".textSelectPluginHandler"),s(e).on("mousedown.textSelectPluginHandler",function(e){t.mouseIsDown=!0,e.stopPropagation()}),s(e).on("mouseup.textSelectPluginHandler",function(e){t.mouseIsDown=!1,e.stopPropagation()})}}],t&&g(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function S(e,t){var n,r,a,o;return h().w(function(i){for(;;)switch(i.p=i.n){case 0:n=v(e),i.p=1,n.s();case 2:if((r=n.n()).done){i.n=4;break}if(a=r.value,!t(a)){i.n=3;break}return i.n=3,a;case 3:i.n=2;break;case 4:i.n=6;break;case 5:i.p=5,o=i.v,n.e(o);case 6:return i.p=6,n.f(),i.f(6);case 7:return i.a(2)}},p,null,[[1,5,6,7]])}function j(e,t){var n,r;return h().w(function(a){for(;;)switch(a.n){case 0:return r=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=a.children,i=void 0===o||o,l=a.parents,u=void 0===l||l,s=a.siblings,c=void 0===s||s;return h().m(function a(){var o;return h().w(function(a){for(;;)switch(a.n){case 0:if(e!==t){a.n=2;break}return n=!0,a.n=1,e;case 1:return a.a(2);case 2:return a.n=3,e;case 3:if(!i||!e.firstChild){a.n=5;break}return a.d(f(r(e.firstChild,{children:!0,parents:!1,siblings:!0})),4);case 4:if(!n){a.n=5;break}return a.a(2);case 5:if(!c){a.n=9;break}o=e.nextSibling;case 6:if(!o){a.n=9;break}return a.d(f(r(o,{children:!0,parents:!1,siblings:!1})),7);case 7:if(!n){a.n=8;break}return a.a(2);case 8:o=o.nextSibling,a.n=6;break;case 9:if(!u||!e.parentNode){a.n=11;break}return a.d(f(r(e.parentNode,{children:!1,parents:!0,siblings:!0})),10);case 10:if(!n){a.n=11;break}return a.a(2);case 11:return a.a(2)}},a)})()},n=!1,a.d(f(r(e)),1);case 1:return a.a(2)}},y)}},706:function(e,t,n){var r=n(350).PROPER,a=n(9039),o=n(7452);e.exports=function(e){return a(function(){return!!o[e]()||"
"!=="
"[e]()||r&&o[e].name!==e})}},1041:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}n.d(t,{S:function(){return i}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(9085),n(6099),n(7764),n(2953);var i=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.br=t,this.options},(t=[{key:"setup",value:function(e){this.options=Object.assign({},this.options,e)}},{key:"init",value:function(){}},{key:"_configurePageContainer",value:function(e){}},{key:"_configureToolbar",value:function(e){}},{key:"_bindNavigationHandlers",value:function(){}},{key:"extendNavBar",value:function(e){}}])&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},2762:function(e,t,n){var r=n(6518),a=n(3802).trim;r({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return a(this)}})},4160:function(e,t,n){n.d(t,{$x:function(){return v},EF:function(){return c},ND:function(){return y},m0:function(){return f},YH:function(){return d}}),n(2675),n(9463),n(2259),n(8706),n(3418),n(3792),n(2062),n(4782),n(2010),n(875),n(6099),n(3362),n(7495),n(8781),n(7764),n(1761),n(2953);var r=[],a={},o={},i={};[["Serbian","српски језик","sr","srp","srp"],["Romanian, Moldavian, Moldovan","Română","ro","ron","rum"],["Sichuan Yi, Nuosu","ꆈꌠ꒿ Nuosuhxop","ii","iii","iii"],["Tahitian","Reo Tahiti","ty","tah","tah"],["Tagalog","Wikang Tagalog","tl","tgl","tgl"],["Yiddish","ייִדיש","yi","yid","yid"],["Akan","Akan","ak","aka","aka"],["Malay","Bahasa Melayu, بهاس ملايو","ms","msa","may"],["Arabic","العربية","ar","ara","ara"],["Norwegian","Norsk","no","nor","nor"],["Ojibwa","ᐊᓂᔑᓈᐯᒧᐎᓐ","oj","oji","oji"],["Fulah","Fulfulde, Pulaar, Pular","ff","ful","ful"],["Persian","فارسی","fa","fas","per"],["Albanian","Shqip","sq","sqi","alb"],["Aymara","aymar aru","ay","aym","aym"],["Azerbaijani","azərbaycan dili","az","aze","aze"],["Chinese","中文 (Zhōngwén), 汉语, 漢語","zh","zho","chi"],["Cree","ᓀᐦᐃᔭᐍᐏᐣ","cr","cre","cre"],["Estonian","eesti, eesti keel","et","est","est"],["Guaraní","Avañe'ẽ","gn","grn","grn"],["Inupiaq","Iñupiaq, Iñupiatun","ik","ipk","ipk"],["Inuktitut","ᐃᓄᒃᑎᑐᑦ","iu","iku","iku"],["Kanuri","Kanuri","kr","kau","kau"],["Komi","коми кыв","kv","kom","kom"],["Kongo","Kikongo","kg","kon","kon"],["Kurdish","Kurdî, أۇزبېك","ku","kur","kur"],["Latvian","latviešu valoda","lv","lav","lav"],["Malagasy","fiteny malagasy","mg","mlg","mlg"],["Mongolian","Монгол хэл","mn","mon","mon"],["Oromo","Afaan Oromoo","om","orm","orm"],["Pashto, Pushto","پښتو","ps","pus","pus"],["Quechua","Runa Simi, Kichwa","qu","que","que"],["Sardinian","sardu","sc","srd","srd"],["Swahili","Kiswahili","sw","swa","swa"],["Uzbek","Oʻzbek, Ўзбек, ","uz","uzb","uzb"],["Zhuang, Chuang","Saɯ cueŋƅ, Saw cuengh","za","zha","zha"],["Bislama","Bislama","bi","bis","bis"],["Norwegian Bokmål","Norsk Bokmål","nb","nob","nob"],["Norwegian Nynorsk","Norsk Nynorsk","nn","nno","nno"],["Indonesian","Bahasa Indonesia","id","ind","ind"],["Twi","Twi","tw","twi","twi"],["Esperanto","Esperanto","eo","epo","epo"],["Interlingua","Interlingua","ia","ina","ina"],["Interlingue","Originally called Occidental; then Interlingue after WWII","ie","ile","ile"],["Ido","Ido","io","ido","ido"],["Volapük","Volapük","vo","vol","vol"],["Bihari languages","भोजपुरी","bh","bih","bih"],["Hebrew (modern)","עברית","he","heb","heb"],["Sanskrit","संस्कृतम्","sa","san","san"],["Church Slavic, Church Slavonic, Old Church Slavonic, Old Slavonic, Old Bulgarian","ѩзыкъ словѣньскъ","cu","chu","chu"],["Pali","पाऴि","pi","pli","pli"],["Avestan","avesta","ae","ave","ave"],["Latin","latine, lingua latina","la","lat","lat"],["Armenian","Հայերեն","hy","hye","arm"],["Swati","SiSwati","ss","ssw","ssw"],["Tibetan","བོད་ཡིག","bo","bod","tib"],["South Ndebele","isiNdebele","nr","nbl","nbl"],["Slovene","Slovenski Jezik, Slovenščina","sl","slv","slv"],["Oriya","ଓଡ଼ିଆ","or","ori","ori"],["North Ndebele","isiNdebele","nd","nde","nde"],["Nauru","Dorerin Naoero","na","nau","nau"],["Maori","te reo Māori","mi","mri","mao"],["Marathi","मराठी","mr","mar","mar"],["Luba-Katanga","Kiluba","lu","lub","lub"],["Rundi","Ikirundi","rn","run","run"],["Central Khmer","ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ","km","khm","khm"],["Western Frisian","Frysk","fy","fry","fry"],["Bengali","বাংলা","bn","ben","ben"],["Avaric","авар мацӀ, магӀарул мацӀ","av","ava","ava"],["Abkhazian","аҧсуа бызшәа, аҧсшәа","ab","abk","abk"],["Afar","Afaraf","aa","aar","aar"],["Afrikaans","Afrikaans","af","afr","afr"],["Amharic","አማርኛ","am","amh","amh"],["Aragonese","aragonés","an","arg","arg"],["Assamese","অসমীয়া","as","asm","asm"],["Bambara","bamanankan","bm","bam","bam"],["Bashkir","башҡорт теле","ba","bak","bak"],["Basque","euskara, euskera","eu","eus","baq"],["Belarusian","беларуская мова","be","bel","bel"],["Bosnian","bosanski jezik","bs","bos","bos"],["Breton","brezhoneg","br","bre","bre"],["Bulgarian","български език","bg","bul","bul"],["Burmese","ဗမာစာ","my","mya","bur"],["Catalan, Valencian","català, valencià","ca","cat","cat"],["Chamorro","Chamoru","ch","cha","cha"],["Chechen","нохчийн мотт","ce","che","che"],["Chichewa, Chewa, Nyanja","chiCheŵa, chinyanja","ny","nya","nya"],["Chuvash","чӑваш чӗлхи","cv","chv","chv"],["Cornish","Kernewek","kw","cor","cor"],["Corsican","corsu, lingua corsa","co","cos","cos"],["Croatian","hrvatski jezik","hr","hrv","hrv"],["Czech","čeština, český jazyk","cs","ces","cze"],["Danish","dansk","da","dan","dan"],["Divehi, Dhivehi, Maldivian","ދިވެހި","dv","div","div"],["Dutch, Flemish","Nederlands, Vlaams","nl","nld","dut"],["Dzongkha","རྫོང་ཁ","dz","dzo","dzo"],["English","English","en","eng","eng"],["Ewe","Eʋegbe","ee","ewe","ewe"],["Faroese","føroyskt","fo","fao","fao"],["Fijian","vosa Vakaviti","fj","fij","fij"],["Finnish","suomi, suomen kieli","fi","fin","fin"],["French","français, langue française","fr","fra","fre"],["Galician","Galego","gl","glg","glg"],["Georgian","ქართული","ka","kat","geo"],["German","Deutsch","de","deu","ger"],["Greek (modern)","ελληνικά","el","ell","gre"],["Gujarati","ગુજરાતી","gu","guj","guj"],["Haitian, Haitian Creole","Kreyòl ayisyen","ht","hat","hat"],["Hausa","(Hausa) هَوُسَ","ha","hau","hau"],["Herero","Otjiherero","hz","her","her"],["Hindi","हिन्दी, हिंदी","hi","hin","hin"],["Hiri Motu","Hiri Motu","ho","hmo","hmo"],["Hungarian","magyar","hu","hun","hun"],["Irish","Gaeilge","ga","gle","gle"],["Igbo","Asụsụ Igbo","ig","ibo","ibo"],["Icelandic","Íslenska","is","isl","ice"],["Italian","Italiano","it","ita","ita"],["Japanese","日本語 (にほんご)","ja","jpn","jpn"],["Javanese","ꦧꦱꦗꦮ, Basa Jawa","jv","jav","jav"],["Kalaallisut, Greenlandic","kalaallisut, kalaallit oqaasii","kl","kal","kal"],["Kannada","ಕನ್ನಡ","kn","kan","kan"],["Kashmiri","कश्मीरी, كشميري","ks","kas","kas"],["Kazakh","қазақ тілі","kk","kaz","kaz"],["Kikuyu, Gikuyu","Gĩkũyũ","ki","kik","kik"],["Kinyarwanda","Ikinyarwanda","rw","kin","kin"],["Kirghiz, Kyrgyz","Кыргызча, Кыргыз тили","ky","kir","kir"],["Korean","한국어","ko","kor","kor"],["Kuanyama, Kwanyama","Kuanyama","kj","kua","kua"],["Luxembourgish, Letzeburgesch","Lëtzebuergesch","lb","ltz","ltz"],["Ganda","Luganda","lg","lug","lug"],["Limburgan, Limburger, Limburgish","Limburgs","li","lim","lim"],["Lingala","Lingála","ln","lin","lin"],["Lao","ພາສາລາວ","lo","lao","lao"],["Lithuanian","lietuvių kalba","lt","lit","lit"],["Manx","Gaelg, Gailck","gv","glv","glv"],["Macedonian","македонски јазик","mk","mkd","mac"],["Malayalam","മലയാളം","ml","mal","mal"],["Maltese","Malti","mt","mlt","mlt"],["Marshallese","Kajin M̧ajeļ","mh","mah","mah"],["Navajo, Navaho","Diné bizaad","nv","nav","nav"],["Nepali","नेपाली","ne","nep","nep"],["Ndonga","Owambo","ng","ndo","ndo"],["Occitan","occitan, lenga d'òc","oc","oci","oci"],["Ossetian, Ossetic","ирон æвзаг","os","oss","oss"],["Panjabi, Punjabi","ਪੰਜਾਬੀ","pa","pan","pan"],["Polish","język polski, polszczyzna","pl","pol","pol"],["Portuguese","Português","pt","por","por"],["Romansh","Rumantsch Grischun","rm","roh","roh"],["Russian","русский","ru","rus","rus"],["Sindhi","सिन्धी, سنڌي، سندھی","sd","snd","snd"],["Northern Sami","Davvisámegiella","se","sme","sme"],["Samoan","gagana fa'a Samoa","sm","smo","smo"],["Sango","yângâ tî sängö","sg","sag","sag"],["Gaelic, Scottish Gaelic","Gàidhlig","gd","gla","gla"],["Shona","chiShona","sn","sna","sna"],["Sinhala, Sinhalese","සිංහල","si","sin","sin"],["Slovak","Slovenčina, Slovenský Jazyk","sk","slk","slo"],["Somali","Soomaaliga, af Soomaali","so","som","som"],["Southern Sotho","Sesotho","st","sot","sot"],["Spanish, Castilian","Español","es","spa","spa"],["Sundanese","Basa Sunda","su","sun","sun"],["Swedish","Svenska","sv","swe","swe"],["Tamil","தமிழ்","ta","tam","tam"],["Telugu","తెలుగు","te","tel","tel"],["Tajik","тоҷикӣ, toçikī, تاجیکی","tg","tgk","tgk"],["Thai","ไทย","th","tha","tha"],["Tigrinya","ትግርኛ","ti","tir","tir"],["Turkmen","Türkmen, Түркмен","tk","tuk","tuk"],["Tswana","Setswana","tn","tsn","tsn"],["Tongan (Tonga Islands)","Faka Tonga","to","ton","ton"],["Turkish","Türkçe","tr","tur","tur"],["Tsonga","Xitsonga","ts","tso","tso"],["Tatar","татар теле, tatar tele","tt","tat","tat"],["Uighur, Uyghur","ئۇيغۇرچە, Uyghurche","ug","uig","uig"],["Ukrainian","Українська","uk","ukr","ukr"],["Urdu","اردو","ur","urd","urd"],["Venda","Tshivenḓa","ve","ven","ven"],["Vietnamese","Tiếng Việt","vi","vie","vie"],["Walloon","Walon","wa","wln","wln"],["Welsh","Cymraeg","cy","cym","wel"],["Wolof","Wollof","wo","wol","wol"],["Xhosa","isiXhosa","xh","xho","xho"],["Yoruba","Yorùbá","yo","yor","yor"],["Zulu","isiZulu","zu","zul","zul"]].forEach(e=>{var t={name:e[0],nativeName:e[1],iso639_1:e[2],iso639_2T:e[3],iso639_2B:e[4]};a[e[2]]=o[e[3]]=i[e[4]]=t,r.push(t)});var l=r;function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return s(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw o}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){var t=e.match(/\S+/g);return t?t.length:0}function f(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return/android/i.test(e)}var h={"zh-hans":"中文 (Zhōngwén)"};function d(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?p(e=e.toLowerCase(),["iso639_1"],t)||p(e,["iso639_2T"],t)||p(e,["iso639_2B","nativeName","name"],t):null}function p(e,t,n){var r,a=u(l);try{for(a.s();!(r=a.n()).done;){var o,i=r.value,s=u(t);try{for(s.s();!(o=s.n()).done;)if(-1!=i[o.value].split(", ").map(function(e){return e.toLowerCase()}).indexOf(e))return n?"".concat(i.nativeName.split(", ")[0]," (").concat(i.iso639_1,")"):i.iso639_1}catch(e){s.e(e)}finally{s.f()}}}catch(e){a.e(e)}finally{a.f()}return h[e]?"".concat(h[e]," (").concat(e,")"):null}function y(){try{return!!window.localStorage}catch(e){return!1}}var v=-1!=location.toString().indexOf("_debugReadAloud=true")},4565:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}function o(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}n.d(t,{l:function(){return i}}),n(2675),n(9463),n(2259),n(5700),n(3792),n(9572),n(8130),n(6099),n(7764),n(2953);var i=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.maxSize=t,this.entries=[]},(t=[{key:"add",value:function(e){this.entries.length>=this.maxSize&&this.entries.shift(),this.entries.push(e)}}])&&a(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},9073:function(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function a(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:o;return null==e?void 0:e.replace(/\{\{([^}]*?)\}\}/g,function(e,o){if(!o)return e;var i,l=function(e){if(Array.isArray(e))return e}(i=o.split("|").map(function(e){return e.trim()}))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),u=l[0],s=r(l).slice(1);if(!(u in n)&&!(u in t))return e;var c=u in n?n[u]:u in t?t[u]:null;return s.map(function(e){return a[e]}).reduce(function(e,t){return t(e)},c&&c.toString())})}n.d(t,{g:function(){return a}}),n(2675),n(9463),n(2259),n(3418),n(3792),n(2062),n(2712),n(4782),n(2010),n(6099),n(7495),n(8781),n(7764),n(5440),n(2762),n(2953);var o={urlencode:encodeURIComponent}}},function(e){e(e.s=296)}]);
|
|
3
3
|
//# sourceMappingURL=plugin.text_selection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|