cours/.obsidian/pdfjs/epub/js/chunk-f468e2d6.a57e1fe0.js
oscar.plaisant@icloud.com 717479f658 update
2023-10-23 23:30:51 +02:00

8 lines
53 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f468e2d6"],{"01f9":function(e,t,n){"use strict";var r=n("2d00"),o=n("5ca1"),i=n("2aba"),c=n("32e9"),a=n("84f2"),u=n("41a0"),f=n("7f20"),s=n("38fd"),l=n("2b4c")("iterator"),d=!([].keys&&"next"in[].keys()),v="@@iterator",p="keys",h="values",y=function(){return this};e.exports=function(e,t,n,b,g,m,_){u(n,t,b);var S,w,I,x=function(e){if(!d&&e in N)return N[e];switch(e){case p:return function(){return new n(this,e)};case h:return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",j=g==h,O=!1,N=e.prototype,A=N[l]||N[v]||g&&N[g],k=A||x(g),R=g?j?x("entries"):k:void 0,T="Array"==t&&N.entries||A;if(T&&(I=s(T.call(new e)),I!==Object.prototype&&I.next&&(f(I,E,!0),r||"function"==typeof I[l]||c(I,l,y))),j&&A&&A.name!==h&&(O=!0,k=function(){return A.call(this)}),r&&!_||!d&&!O&&N[l]||c(N,l,k),a[t]=k,a[E]=y,g)if(S={values:j?k:x(h),keys:m?k:x(p),entries:R},_)for(w in S)w in N||i(N,w,S[w]);else o(o.P+o.F*(d||O),t,S);return S}},"02f4":function(e,t,n){var r=n("4588"),o=n("be13");e.exports=function(e){return function(t,n){var i,c,a=String(o(t)),u=r(n),f=a.length;return u<0||u>=f?e?"":void 0:(i=a.charCodeAt(u),i<55296||i>56319||u+1===f||(c=a.charCodeAt(u+1))<56320||c>57343?e?a.charAt(u):i:e?a.slice(u,u+2):c-56320+(i-55296<<10)+65536)}}},"0390":function(e,t,n){"use strict";var r=n("02f4")(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},"0a49":function(e,t,n){var r=n("9b43"),o=n("626a"),i=n("4bf8"),c=n("9def"),a=n("cd1c");e.exports=function(e,t){var n=1==e,u=2==e,f=3==e,s=4==e,l=6==e,d=5==e||l,v=t||a;return function(t,a,p){for(var h,y,b=i(t),g=o(b),m=r(a,p,3),_=c(g.length),S=0,w=n?v(t,_):u?v(t,0):void 0;_>S;S++)if((d||S in g)&&(h=g[S],y=m(h,S,b),e))if(n)w[S]=y;else if(y)switch(e){case 3:return!0;case 5:return h;case 6:return S;case 2:w.push(h)}else if(s)return!1;return l?-1:f||s?s:w}}},"0bfb":function(e,t,n){"use strict";var r=n("cb7c");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0d58":function(e,t,n){var r=n("ce10"),o=n("e11e");e.exports=Object.keys||function(e){return r(e,o)}},"101f":function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return u}));var r=n("a002"),o=n.n(r);function i(e,t,n,r){o.a.setItem(e,t).then((function(e){n&&n(e)})).catch((function(e){r&&r(e)}))}function c(e,t){o.a.getItem(e,(function(e,n){t(e,n)}))}function a(e,t,n){o.a.removeItem(e).then((function(){t()})).catch((function(e){n(e)}))}function u(e,t){o.a.clear().then((function(){e()})).catch((function(e){t(e)}))}},1169:function(e,t,n){var r=n("2d95");e.exports=Array.isArray||function(e){return"Array"==r(e)}},"11e9":function(e,t,n){var r=n("52a7"),o=n("4630"),i=n("6821"),c=n("6a99"),a=n("69a8"),u=n("c69a"),f=Object.getOwnPropertyDescriptor;t.f=n("9e1e")?f:function(e,t){if(e=i(e),t=c(t,!0),u)try{return f(e,t)}catch(n){}if(a(e,t))return o(!r.f.call(e,t),e[t])}},1495:function(e,t,n){var r=n("86cc"),o=n("cb7c"),i=n("0d58");e.exports=n("9e1e")?Object.defineProperties:function(e,t){o(e);var n,c=i(t),a=c.length,u=0;while(a>u)r.f(e,n=c[u++],t[n]);return e}},"20d6":function(e,t,n){"use strict";var r=n("5ca1"),o=n("0a49")(6),i="findIndex",c=!0;i in[]&&Array(1)[i]((function(){c=!1})),r(r.P+r.F*c,"Array",{findIndex:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")(i)},"214f":function(e,t,n){"use strict";n("b0c5");var r=n("2aba"),o=n("32e9"),i=n("79e5"),c=n("be13"),a=n("2b4c"),u=n("520a"),f=a("species"),s=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=a(e),v=!i((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),p=v?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[f]=function(){return n}),n[d](""),!t})):void 0;if(!v||!p||"replace"===e&&!s||"split"===e&&!l){var h=/./[d],y=n(c,d,""[e],(function(e,t,n,r,o){return t.exec===u?v&&!o?{done:!0,value:h.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),b=y[0],g=y[1];r(String.prototype,e,b),o(RegExp.prototype,d,2==t?function(e,t){return g.call(e,this,t)}:function(e){return g.call(e,this)})}}},"230e":function(e,t,n){var r=n("d3f4"),o=n("7726").document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},"23c6":function(e,t,n){var r=n("2d95"),o=n("2b4c")("toStringTag"),i="Arguments"==r(function(){return arguments}()),c=function(e,t){try{return e[t]}catch(n){}};e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=c(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},"2aba":function(e,t,n){var r=n("7726"),o=n("32e9"),i=n("69a8"),c=n("ca5a")("src"),a=n("fa5b"),u="toString",f=(""+a).split(u);n("8378").inspectSource=function(e){return a.call(e)},(e.exports=function(e,t,n,a){var u="function"==typeof n;u&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(u&&(i(n,c)||o(n,c,e[t]?""+e[t]:f.join(String(t)))),e===r?e[t]=n:a?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,u,(function(){return"function"==typeof this&&this[c]||a.call(this)}))},"2aeb":function(e,t,n){var r=n("cb7c"),o=n("1495"),i=n("e11e"),c=n("613b")("IE_PROTO"),a=function(){},u="prototype",f=function(){var e,t=n("230e")("iframe"),r=i.length,o="<",c=">";t.style.display="none",n("fab2").appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write(o+"script"+c+"document.F=Object"+o+"/script"+c),e.close(),f=e.F;while(r--)delete f[u][i[r]];return f()};e.exports=Object.create||function(e,t){var n;return null!==e?(a[u]=r(e),n=new a,a[u]=null,n[c]=e):n=f(),void 0===t?n:o(n,t)}},"2b4c":function(e,t,n){var r=n("5537")("wks"),o=n("ca5a"),i=n("7726").Symbol,c="function"==typeof i,a=e.exports=function(e){return r[e]||(r[e]=c&&i[e]||(c?i:o)("Symbol."+e))};a.store=r},"2d00":function(e,t){e.exports=!1},"2d95":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"32e9":function(e,t,n){var r=n("86cc"),o=n("4630");e.exports=n("9e1e")?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},"38fd":function(e,t,n){var r=n("69a8"),o=n("4bf8"),i=n("613b")("IE_PROTO"),c=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?c:null}},"41a0":function(e,t,n){"use strict";var r=n("2aeb"),o=n("4630"),i=n("7f20"),c={};n("32e9")(c,n("2b4c")("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(c,{next:o(1,n)}),i(e,t+" Iterator")}},4588:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"4bf8":function(e,t,n){var r=n("be13");e.exports=function(e){return Object(r(e))}},"520a":function(e,t,n){"use strict";var r=n("0bfb"),o=RegExp.prototype.exec,i=String.prototype.replace,c=o,a="lastIndex",u=function(){var e=/a/,t=/b*/g;return o.call(e,"a"),o.call(t,"a"),0!==e[a]||0!==t[a]}(),f=void 0!==/()??/.exec("")[1],s=u||f;s&&(c=function(e){var t,n,c,s,l=this;return f&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),u&&(t=l[a]),c=o.call(l,e),u&&c&&(l[a]=l.global?c.index+c[0].length:t),f&&c&&c.length>1&&i.call(c[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(c[s]=void 0)})),c}),e.exports=c},"52a7":function(e,t){t.f={}.propertyIsEnumerable},5537:function(e,t,n){var r=n("8378"),o=n("7726"),i="__core-js_shared__",c=o[i]||(o[i]={});(e.exports=function(e,t){return c[e]||(c[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(e,t,n){var r=n("7726"),o=n("8378"),i=n("32e9"),c=n("2aba"),a=n("9b43"),u="prototype",f=function(e,t,n){var s,l,d,v,p=e&f.F,h=e&f.G,y=e&f.S,b=e&f.P,g=e&f.B,m=h?r:y?r[t]||(r[t]={}):(r[t]||{})[u],_=h?o:o[t]||(o[t]={}),S=_[u]||(_[u]={});for(s in h&&(n=t),n)l=!p&&m&&void 0!==m[s],d=(l?m:n)[s],v=g&&l?a(d,r):b&&"function"==typeof d?a(Function.call,d):d,m&&c(m,s,d,e&f.U),_[s]!=d&&i(_,s,v),b&&S[s]!=d&&(S[s]=d)};r.core=o,f.F=1,f.G=2,f.S=4,f.P=8,f.B=16,f.W=32,f.U=64,f.R=128,e.exports=f},"5dbc":function(e,t,n){var r=n("d3f4"),o=n("8b97").set;e.exports=function(e,t,n){var i,c=t.constructor;return c!==n&&"function"==typeof c&&(i=c.prototype)!==n.prototype&&r(i)&&o&&o(e,i),e}},"5de6":function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return a})),n.d(t,"o",(function(){return u})),n.d(t,"i",(function(){return f})),n.d(t,"h",(function(){return s})),n.d(t,"e",(function(){return l})),n.d(t,"m",(function(){return d})),n.d(t,"d",(function(){return v})),n.d(t,"c",(function(){return h})),n.d(t,"k",(function(){return g})),n.d(t,"g",(function(){return m})),n.d(t,"f",(function(){return _})),n.d(t,"j",(function(){return S})),n.d(t,"n",(function(){return w})),n.d(t,"l",(function(){return I}));n("7514"),n("20d6"),n("c5f6"),n("87f3"),n("ac6a");var r=n("e8ec"),o=n("101f"),i=n("fa7d"),c=[{fontSize:12},{fontSize:14},{fontSize:16},{fontSize:18},{fontSize:20},{fontSize:22},{fontSize:24}],a=[{font:"Default"},{font:"Cabin"},{font:"Days One"},{font:"Montserrat"},{font:"Tangerine"}];function u(e){return[{alias:e.$t("book.themeDefault"),name:"Default",style:{body:{color:"#4c5059",background:"#cecece","padding-top":"".concat(Object(i["d"])(48),"px!important"),"padding-bottom":"".concat(Object(i["d"])(48),"px!important")},img:{width:"100%"},".epubjs-hl":{fill:"red","fill-opacity":"0.3","mix-blend-mode":"multiply"}}},{alias:e.$t("book.themeGold"),name:"Gold",style:{body:{color:"#5c5b56",background:"#c6c2b6","padding-top":"".concat(Object(i["d"])(48),"px!important"),"padding-bottom":"".concat(Object(i["d"])(48),"px!important")},img:{width:"100%"},".epubjs-hl":{fill:"red","fill-opacity":"0.3","mix-blend-mode":"multiply"}}},{alias:e.$t("book.themeEye"),name:"Eye",style:{body:{color:"#404c42",background:"#a9c1a9","padding-top":"".concat(Object(i["d"])(48),"px!important"),"padding-bottom":"".concat(Object(i["d"])(48),"px!important")},img:{width:"100%"},".epubjs-hl":{fill:"red","fill-opacity":"0.3","mix-blend-mode":"multiply"}}},{alias:e.$t("book.themeNight"),name:"Night",style:{body:{color:"#cecece",background:"#000000","padding-top":"".concat(Object(i["d"])(48),"px!important"),"padding-bottom":"".concat(Object(i["d"])(48),"px!important")},img:{width:"100%"},".epubjs-hl":{fill:"red","fill-opacity":"0.3","mix-blend-mode":"multiply"}}}]}function f(e){return Object(r["i"])(e)?Math.ceil(Object(r["i"])(e)/60):0}function s(e){switch(e){case 1:return"ComputerScience";case 2:return"SocialSciences";case 3:return"Economics";case 4:return"Education";case 5:return"Engineering";case 6:return"Environment";case 7:return"Geography";case 8:return"History";case 9:return"Laws";case 10:return"LifeSciences";case 11:return"Literature";case 12:return"Biomedicine";case 13:return"BusinessandManagement";case 14:return"EarthSciences";case 15:return"MaterialsScience";case 16:return"Mathematics";case 17:return"MedicineAndPublicHealth";case 18:return"Philosophy";case 19:return"Physics";case 20:return"PoliticalScienceAndInternationalRelations";case 21:return"Psychology";case 22:return"Statistics"}}function l(e,t){switch(e){case 1:return t.$t("category.computerScience");case 2:return t.$t("category.socialSciences");case 3:return t.$t("category.economics");case 4:return t.$t("category.education");case 5:return t.$t("category.engineering");case 6:return t.$t("category.environment");case 7:return t.$t("category.geography");case 8:return t.$t("category.history");case 9:return t.$t("category.laws");case 10:return t.$t("category.lifeSciences");case 11:return t.$t("category.literature");case 12:return t.$t("category.biomedicine");case 13:return t.$t("category.businessandManagement");case 14:return t.$t("category.earthSciences");case 15:return t.$t("category.materialsScience");case 16:return t.$t("category.mathematics");case 17:return t.$t("category.medicineAndPublicHealth");case 18:return t.$t("category.philosophy");case 19:return t.$t("category.physics");case 20:return t.$t("category.politicalScienceAndInternationalRelations");case 21:return t.$t("category.psychology");case 22:return t.$t("category.statistics")}}function d(e,t){e.$router.push({path:"/book-store/detail",query:{fileName:t.fileName,category:t.categoryText}})}var v={ComputerScience:1,SocialSciences:2,Economics:3,Education:4,Engineering:5,Environment:6,Geography:7,History:8,Laws:9,LifeSciences:10,Literature:11,Biomedicine:12,BusinessandManagement:13,EarthSciences:14,MaterialsScience:15,Mathematics:16,MedicineAndPublicHealth:17,Philosophy:18,Physics:19,PoliticalScienceAndInternationalRelations:20,Psychology:21,Statistics:22},p="bookShelf";function h(e){var t=Object(r["f"])(p);t=b(t),e.type=1,t.push(e),t.forEach((function(e,t){e.id=t+1})),y(t),Object(r["v"])(p,t)}function y(e){e.push({cover:"",title:"",type:3,id:Number.MAX_SAFE_INTEGER})}function b(e){return e.filter((function(e){return 3!==e.type}))}function g(e){var t=Object(r["f"])(p);t=t.filter((function(t){return t.itemList&&(t.itemList=t.itemList.filter((function(t){return t.fileName!==e.fileName}))),t.fileName!==e.fileName})),Object(r["v"])(p,t)}function m(e){if(e){var t=e.filter((function(e){return 3!==e.type})),n=e.filter((function(e){return 2===e.type}));return n.forEach((function(e){var n=t.findIndex((function(t){return t.id===e.id}));e.itemList&&e.itemList.forEach((function(e){t.splice(n,0,e)}))})),t.forEach((function(e,t){e.id=t+1})),t=t.filter((function(e){return 2!==e.type})),t}return[]}function _(e){var t=Object(r["f"])(p);return m(t).find((function(t){return t.fileName===e}))}function S(e){return new Promise((function(t,n){Object(r["k"])(e),Object(r["k"])("".concat(e,"-info")),Object(o["c"])(e,(function(){console.log("[".concat(e,"]删除成功...")),t()}),n)}))}function w(e,t){t?e.$i18n.locale=t:"en"===e.$i18n.locale?e.$i18n.locale="cn":e.$i18n.locale="en",Object(r["v"])("locale",e.$i18n.locale)}function I(e){e.$store.dispatch("setMenuVisible",!1),e.$store.dispatch("setSettingVisible",0),e.$store.dispatch("setFontFamilyVisible",!1),e.$store.dispatch("setSpeakingIconBottom",Object(i["d"])(58))}},"5f1b":function(e,t,n){"use strict";var r=n("23c6"),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"===typeof n){var i=n.call(e,t);if("object"!==typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},"613b":function(e,t,n){var r=n("5537")("keys"),o=n("ca5a");e.exports=function(e){return r[e]||(r[e]=o(e))}},"626a":function(e,t,n){var r=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},6821:function(e,t,n){var r=n("626a"),o=n("be13");e.exports=function(e){return r(o(e))}},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"6a99":function(e,t,n){var r=n("d3f4");e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},7514:function(e,t,n){"use strict";var r=n("5ca1"),o=n("0a49")(5),i="find",c=!0;i in[]&&Array(1)[i]((function(){c=!1})),r(r.P+r.F*c,"Array",{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")(i)},7726:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"77f1":function(e,t,n){var r=n("4588"),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):i(e,t)}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},"7f20":function(e,t,n){var r=n("86cc").f,o=n("69a8"),i=n("2b4c")("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},8378:function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},"84f2":function(e,t){e.exports={}},"86cc":function(e,t,n){var r=n("cb7c"),o=n("c69a"),i=n("6a99"),c=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return c(e,t,n)}catch(a){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},"87f3":function(e,t,n){var r=n("5ca1");r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},"8b97":function(e,t,n){var r=n("d3f4"),o=n("cb7c"),i=function(e,t){if(o(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{r=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),r(e,[]),t=!(e instanceof Array)}catch(o){t=!0}return function(e,n){return i(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:i}},9093:function(e,t,n){var r=n("ce10"),o=n("e11e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},"9b43":function(e,t,n){var r=n("d8e8");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},"9c6c":function(e,t,n){var r=n("2b4c")("unscopables"),o=Array.prototype;void 0==o[r]&&n("32e9")(o,r,{}),e.exports=function(e){o[r][e]=!0}},"9def":function(e,t,n){var r=n("4588"),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a002:function(e,t,n){(function(t){var n;
/*!
localForage -- Offline Storage, Improved
Version 1.10.0
https://localforage.github.io/localForage
(c) 2013-2017 Mozilla, Apache License 2.0
*/
(function(t){e.exports=t()})((function(){return function e(t,r,o){function i(a,u){if(!r[a]){if(!t[a]){var f="function"==typeof n&&n;if(!u&&f)return n(a,!0);if(c)return c(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var l=r[a]={exports:{}};t[a][0].call(l.exports,(function(e){var n=t[a][1][e];return i(n||e)}),l,l.exports,e,t,r,o)}return r[a].exports}for(var c="function"==typeof n&&n,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(e,n,r){(function(e){"use strict";var t,r,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,c=new o(s),a=e.document.createTextNode("");c.observe(a,{characterData:!0}),t=function(){a.data=i=++i%2}}else if(e.setImmediate||"undefined"===typeof e.MessageChannel)t="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){s(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(s,0)};else{var u=new e.MessageChannel;u.port1.onmessage=s,t=function(){u.port2.postMessage(0)}}var f=[];function s(){var e,t;r=!0;var n=f.length;while(n){t=f,f=[],e=-1;while(++e<n)t[e]();n=f.length}r=!1}function l(e){1!==f.push(e)||r||t()}n.exports=l}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{}],2:[function(e,t,n){"use strict";var r=e(1);function o(){}var i={},c=["REJECTED"],a=["FULFILLED"],u=["PENDING"];function f(e){if("function"!==typeof e)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,e!==o&&v(this,e)}function s(e,t,n){this.promise=e,"function"===typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"===typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function l(e,t,n){r((function(){var r;try{r=t(n)}catch(o){return i.reject(e,o)}r===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,r)}))}function d(e){var t=e&&e.then;if(e&&("object"===typeof e||"function"===typeof e)&&"function"===typeof t)return function(){t.apply(e,arguments)}}function v(e,t){var n=!1;function r(t){n||(n=!0,i.reject(e,t))}function o(t){n||(n=!0,i.resolve(e,t))}function c(){t(o,r)}var a=p(c);"error"===a.status&&r(a.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(r){n.status="error",n.value=r}return n}function h(e){return e instanceof this?e:i.resolve(new this(o),e)}function y(e){var t=new this(o);return i.reject(t,e)}function b(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);var c=new Array(n),a=0,u=-1,f=new this(o);while(++u<n)s(e[u],u);return f;function s(e,o){function u(e){c[o]=e,++a!==n||r||(r=!0,i.resolve(f,c))}t.resolve(e).then(u,(function(e){r||(r=!0,i.reject(f,e))}))}}function g(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);var c=-1,a=new this(o);while(++c<n)u(e[c]);return a;function u(e){t.resolve(e).then((function(e){r||(r=!0,i.resolve(a,e))}),(function(e){r||(r=!0,i.reject(a,e))}))}}t.exports=f,f.prototype["catch"]=function(e){return this.then(null,e)},f.prototype.then=function(e,t){if("function"!==typeof e&&this.state===a||"function"!==typeof t&&this.state===c)return this;var n=new this.constructor(o);if(this.state!==u){var r=this.state===a?e:t;l(n,r,this.outcome)}else this.queue.push(new s(n,e,t));return n},s.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},s.prototype.otherCallFulfilled=function(e){l(this.promise,this.onFulfilled,e)},s.prototype.callRejected=function(e){i.reject(this.promise,e)},s.prototype.otherCallRejected=function(e){l(this.promise,this.onRejected,e)},i.resolve=function(e,t){var n=p(d,t);if("error"===n.status)return i.reject(e,n.value);var r=n.value;if(r)v(e,r);else{e.state=a,e.outcome=t;var o=-1,c=e.queue.length;while(++o<c)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=c,e.outcome=t;var n=-1,r=e.queue.length;while(++n<r)e.queue[n].callRejected(t);return e},f.resolve=h,f.reject=y,f.all=b,f.race=g},{1:1}],3:[function(e,n,r){(function(t){"use strict";"function"!==typeof t.Promise&&(t.Promise=e(2))}).call(this,"undefined"!==typeof t?t:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{2:2}],4:[function(e,t,n){"use strict";var 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};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){try{if("undefined"!==typeof indexedDB)return indexedDB;if("undefined"!==typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!==typeof mozIndexedDB)return mozIndexedDB;if("undefined"!==typeof OIndexedDB)return OIndexedDB;if("undefined"!==typeof msIndexedDB)return msIndexedDB}catch(e){return}}var c=i();function a(){try{if(!c||!c.open)return!1;var e="undefined"!==typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"===typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!==typeof indexedDB&&"undefined"!==typeof IDBKeyRange}catch(n){return!1}}function u(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n="undefined"!==typeof BlobBuilder?BlobBuilder:"undefined"!==typeof MSBlobBuilder?MSBlobBuilder:"undefined"!==typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder,r=new n,o=0;o<e.length;o+=1)r.append(e[o]);return r.getBlob(t.type)}}"undefined"===typeof Promise&&e(3);var f=Promise;function s(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function l(e,t,n){"function"===typeof t&&e.then(t),"function"===typeof n&&e["catch"](n)}function d(e){return"string"!==typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function v(){if(arguments.length&&"function"===typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var p="local-forage-detect-blob-support",h=void 0,y={},b=Object.prototype.toString,g="readonly",m="readwrite";function _(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;o<t;o++)r[o]=e.charCodeAt(o);return n}function S(e){return new f((function(t){var n=e.transaction(p,m),r=u([""]);n.objectStore(p).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}}))["catch"]((function(){return!1}))}function w(e){return"boolean"===typeof h?f.resolve(h):S(e).then((function(e){return h=e,h}))}function I(e){var t=y[e.name],n={};n.promise=new f((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function x(e){var t=y[e.name],n=t.deferredOperations.pop();if(n)return n.resolve(),n.promise}function E(e,t){var n=y[e.name],r=n.deferredOperations.pop();if(r)return r.reject(t),r.promise}function j(e,t){return new f((function(n,r){if(y[e.name]=y[e.name]||P(),e.db){if(!t)return n(e.db);I(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var i=c.open.apply(c,o);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(p)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),r(i.error)},i.onsuccess=function(){var t=i.result;t.onversionchange=function(e){e.target.close()},n(t),x(e)}}))}function O(e){return j(e,!1)}function N(e){return j(e,!0)}function A(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,o=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function k(e){return new f((function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)}))}function R(e){var t=_(atob(e.data));return u([t],{type:e.type})}function T(e){return e&&e.__local_forage_encoded_blob}function L(e){var t=this,n=t._initReady().then((function(){var e=y[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return l(n,e,e),n}function M(e){I(e);for(var t=y[e.name],n=t.forages,r=0;r<n.length;r++){var o=n[r];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return e.db=null,O(e).then((function(t){return e.db=t,A(e)?N(e):t})).then((function(r){e.db=t.db=r;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=r}))["catch"]((function(t){throw E(e,t),t}))}function D(e,t,n,r){void 0===r&&(r=1);try{var o=e.db.transaction(e.storeName,t);n(null,o)}catch(i){if(r>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return f.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),N(e)})).then((function(){return M(e).then((function(){D(e,t,n,r-1)}))}))["catch"](n);n(i)}}function P(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function C(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var o=y[n.name];o||(o=P(),y[n.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=L);var i=[];function c(){return f.resolve()}for(var a=0;a<o.forages.length;a++){var u=o.forages[a];u!==t&&i.push(u._initReady()["catch"](c))}var s=o.forages.slice(0);return f.all(i).then((function(){return n.db=o.db,O(n)})).then((function(e){return n.db=e,A(n,t._defaultConfig.version)?N(n):e})).then((function(e){n.db=o.db=e,t._dbInfo=n;for(var r=0;r<s.length;r++){var i=s[r];i!==t&&(i._dbInfo.db=n.db,i._dbInfo.version=n.version)}}))}function F(e,t){var n=this;e=d(e);var r=new f((function(t,r){n.ready().then((function(){D(n._dbInfo,g,(function(o,i){if(o)return r(o);try{var c=i.objectStore(n._dbInfo.storeName),a=c.get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),T(e)&&(e=R(e)),t(e)},a.onerror=function(){r(a.error)}}catch(u){r(u)}}))}))["catch"](r)}));return s(r,t),r}function B(e,t){var n=this,r=new f((function(t,r){n.ready().then((function(){D(n._dbInfo,g,(function(o,i){if(o)return r(o);try{var c=i.objectStore(n._dbInfo.storeName),a=c.openCursor(),u=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;T(r)&&(r=R(r));var o=e(r,n.key,u++);void 0!==o?t(o):n["continue"]()}else t()},a.onerror=function(){r(a.error)}}catch(f){r(f)}}))}))["catch"](r)}));return s(r,t),r}function $(e,t,n){var r=this;e=d(e);var o=new f((function(n,o){var i;r.ready().then((function(){return i=r._dbInfo,"[object Blob]"===b.call(t)?w(i.db).then((function(e){return e?t:k(t)})):t})).then((function(t){D(r._dbInfo,m,(function(i,c){if(i)return o(i);try{var a=c.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var u=a.put(t,e);c.oncomplete=function(){void 0===t&&(t=null),n(t)},c.onabort=c.onerror=function(){var e=u.error?u.error:u.transaction.error;o(e)}}catch(f){o(f)}}))}))["catch"](o)}));return s(o,n),o}function z(e,t){var n=this;e=d(e);var r=new f((function(t,r){n.ready().then((function(){D(n._dbInfo,m,(function(o,i){if(o)return r(o);try{var c=i.objectStore(n._dbInfo.storeName),a=c["delete"](e);i.oncomplete=function(){t()},i.onerror=function(){r(a.error)},i.onabort=function(){var e=a.error?a.error:a.transaction.error;r(e)}}catch(u){r(u)}}))}))["catch"](r)}));return s(r,t),r}function U(e){var t=this,n=new f((function(e,n){t.ready().then((function(){D(t._dbInfo,m,(function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName),c=i.clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=c.error?c.error:c.transaction.error;n(e)}}catch(a){n(a)}}))}))["catch"](n)}));return s(n,e),n}function G(e){var t=this,n=new f((function(e,n){t.ready().then((function(){D(t._dbInfo,g,(function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName),c=i.count();c.onsuccess=function(){e(c.result)},c.onerror=function(){n(c.error)}}catch(a){n(a)}}))}))["catch"](n)}));return s(n,e),n}function V(e,t){var n=this,r=new f((function(t,r){e<0?t(null):n.ready().then((function(){D(n._dbInfo,g,(function(o,i){if(o)return r(o);try{var c=i.objectStore(n._dbInfo.storeName),a=!1,u=c.openKeyCursor();u.onsuccess=function(){var n=u.result;n?0===e||a?t(n.key):(a=!0,n.advance(e)):t(null)},u.onerror=function(){r(u.error)}}catch(f){r(f)}}))}))["catch"](r)}));return s(r,t),r}function q(e){var t=this,n=new f((function(e,n){t.ready().then((function(){D(t._dbInfo,g,(function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName),c=i.openKeyCursor(),a=[];c.onsuccess=function(){var t=c.result;t?(a.push(t.key),t["continue"]()):e(a)},c.onerror=function(){n(c.error)}}catch(u){n(u)}}))}))["catch"](n)}));return s(n,e),n}function W(e,t){t=v.apply(this,arguments);var n=this.config();e="function"!==typeof e&&e||{},e.name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,o=this;if(e.name){var i=e.name===n.name&&o._dbInfo.db,a=i?f.resolve(o._dbInfo.db):O(e).then((function(t){var n=y[e.name],r=n.forages;n.db=t;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=t;return t}));r=e.storeName?a.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;I(e);var r=y[e.name],o=r.forages;t.close();for(var i=0;i<o.length;i++){var a=o[i];a._dbInfo.db=null,a._dbInfo.version=n}var u=new f((function(t,r){var o=c.open(e.name,n);o.onerror=function(e){var t=o.result;t.close(),r(e)},o.onupgradeneeded=function(){var t=o.result;t.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}}));return u.then((function(e){r.db=e;for(var t=0;t<o.length;t++){var n=o[t];n._dbInfo.db=e,x(n._dbInfo)}}))["catch"]((function(t){throw(E(e,t)||f.resolve())["catch"]((function(){})),t}))}})):a.then((function(t){I(e);var n=y[e.name],r=n.forages;t.close();for(var o=0;o<r.length;o++){var i=r[o];i._dbInfo.db=null}var a=new f((function(t,n){var r=c.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}}));return a.then((function(e){n.db=e;for(var t=0;t<r.length;t++){var o=r[t];x(o._dbInfo)}}))["catch"]((function(t){throw(E(e,t)||f.resolve())["catch"]((function(){})),t}))}))}else r=f.reject("Invalid arguments");return s(r,t),r}var H={_driver:"asyncStorage",_initStorage:C,_support:a(),iterate:B,getItem:F,setItem:$,removeItem:z,clear:U,length:G,key:V,keys:q,dropInstance:W};function X(){return"function"===typeof openDatabase}var K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",J="~~local_forage_type~",Q=/^~~local_forage_type~([^~]+)~/,Y="__lfsc__:",Z=Y.length,ee="arbf",te="blob",ne="si08",re="ui08",oe="uic8",ie="si16",ce="si32",ae="ur16",ue="ui32",fe="fl32",se="fl64",le=Z+ee.length,de=Object.prototype.toString;function ve(e){var t,n,r,o,i,c=.75*e.length,a=e.length,u=0;"="===e[e.length-1]&&(c--,"="===e[e.length-2]&&c--);var f=new ArrayBuffer(c),s=new Uint8Array(f);for(t=0;t<a;t+=4)n=K.indexOf(e[t]),r=K.indexOf(e[t+1]),o=K.indexOf(e[t+2]),i=K.indexOf(e[t+3]),s[u++]=n<<2|r>>4,s[u++]=(15&r)<<4|o>>2,s[u++]=(3&o)<<6|63&i;return f}function pe(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=K[n[t]>>2],r+=K[(3&n[t])<<4|n[t+1]>>4],r+=K[(15&n[t+1])<<2|n[t+2]>>6],r+=K[63&n[t+2]];return n.length%3===2?r=r.substring(0,r.length-1)+"=":n.length%3===1&&(r=r.substring(0,r.length-2)+"=="),r}function he(e,t){var n="";if(e&&(n=de.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===de.call(e.buffer))){var r,o=Y;e instanceof ArrayBuffer?(r=e,o+=ee):(r=e.buffer,"[object Int8Array]"===n?o+=ne:"[object Uint8Array]"===n?o+=re:"[object Uint8ClampedArray]"===n?o+=oe:"[object Int16Array]"===n?o+=ie:"[object Uint16Array]"===n?o+=ae:"[object Int32Array]"===n?o+=ce:"[object Uint32Array]"===n?o+=ue:"[object Float32Array]"===n?o+=fe:"[object Float64Array]"===n?o+=se:t(new Error("Failed to get type for BinaryArray"))),t(o+pe(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=J+e.type+"~"+pe(this.result);t(Y+te+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(c){console.error("Couldn't convert value into a JSON string: ",e),t(null,c)}}function ye(e){if(e.substring(0,Z)!==Y)return JSON.parse(e);var t,n=e.substring(le),r=e.substring(Z,le);if(r===te&&Q.test(n)){var o=n.match(Q);t=o[1],n=n.substring(o[0].length)}var i=ve(n);switch(r){case ee:return i;case te:return u([i],{type:t});case ne:return new Int8Array(i);case re:return new Uint8Array(i);case oe:return new Uint8ClampedArray(i);case ie:return new Int16Array(i);case ae:return new Uint16Array(i);case ce:return new Int32Array(i);case ue:return new Uint32Array(i);case fe:return new Float32Array(i);case se:return new Float64Array(i);default:throw new Error("Unkown type: "+r)}}var be={serialize:he,deserialize:ye,stringToBuffer:ve,bufferToString:pe};function ge(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function me(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!==typeof e[r]?e[r].toString():e[r];var o=new f((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(o){return r(o)}n.db.transaction((function(o){ge(o,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=be,o}function _e(e,t,n,r,o,i){e.executeSql(n,r,o,(function(e,c){c.code===c.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?i(e,c):ge(e,t,(function(){e.executeSql(n,r,o,i)}),i)}),i):i(e,c)}),i)}function Se(e,t){var n=this;e=d(e);var r=new f((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)}),(function(e,t){r(t)}))}))}))["catch"](r)}));return s(r,t),r}function we(e,t){var n=this,r=new f((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT * FROM "+o.storeName,[],(function(n,r){for(var i=r.rows,c=i.length,a=0;a<c;a++){var u=i.item(a),f=u.value;if(f&&(f=o.serializer.deserialize(f)),f=e(f,u.key,a+1),void 0!==f)return void t(f)}t()}),(function(e,t){r(t)}))}))}))["catch"](r)}));return s(r,t),r}function Ie(e,t,n,r){var o=this;e=d(e);var i=new f((function(i,c){o.ready().then((function(){void 0===t&&(t=null);var a=t,u=o._dbInfo;u.serializer.serialize(t,(function(t,f){f?c(f):u.db.transaction((function(n){_e(n,u,"INSERT OR REPLACE INTO "+u.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){i(a)}),(function(e,t){c(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void i(Ie.apply(o,[e,a,n,r-1]));c(t)}}))}))}))["catch"](c)}));return s(i,n),i}function xe(e,t,n){return Ie.apply(this,[e,t,n,1])}function Ee(e,t){var n=this;e=d(e);var r=new f((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))}))["catch"](r)}));return s(r,t),r}function je(e){var t=this,n=new f((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))}))["catch"](n)}));return s(n,e),n}function Oe(e){var t=this,n=new f((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))}))["catch"](n)}));return s(n,e),n}function Ne(e,t){var n=this,r=new f((function(t,r){n.ready().then((function(){var o=n._dbInfo;o.db.transaction((function(n){_e(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)}),(function(e,t){r(t)}))}))}))["catch"](r)}));return s(r,t),r}function Ae(e){var t=this,n=new f((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){_e(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).key);e(r)}),(function(e,t){n(t)}))}))}))["catch"](n)}));return s(n,e),n}function ke(e){return new f((function(t,n){e.transaction((function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var o=[],i=0;i<r.rows.length;i++)o.push(r.rows.item(i).name);t({db:e,storeNames:o})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}function Re(e,t){t=v.apply(this,arguments);var n=this.config();e="function"!==typeof e&&e||{},e.name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,o=this;return r=e.name?new f((function(t){var r;r=e.name===n.name?o._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(ke(r))})).then((function(e){return new f((function(t,n){e.db.transaction((function(r){function o(e){return new f((function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var i=[],c=0,a=e.storeNames.length;c<a;c++)i.push(o(e.storeNames[c]));f.all(i).then((function(){t()}))["catch"]((function(e){n(e)}))}),(function(e){n(e)}))}))})):f.reject("Invalid arguments"),s(r,t),r}var Te={_driver:"webSQLStorage",_initStorage:me,_support:X(),iterate:we,getItem:Se,setItem:xe,removeItem:Ee,clear:je,length:Oe,key:Ne,keys:Ae,dropInstance:Re};function Le(){try{return"undefined"!==typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function Me(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function De(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(t){return!0}}function Pe(){return!De()||localStorage.length>0}function Ce(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=Me(e,t._defaultConfig),Pe()?(t._dbInfo=n,n.serializer=be,f.resolve()):f.reject()}function Fe(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return s(n,e),n}function Be(e,t){var n=this;e=d(e);var r=n.ready().then((function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r}));return s(r,t),r}function $e(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,c=1,a=0;a<i;a++){var u=localStorage.key(a);if(0===u.indexOf(r)){var f=localStorage.getItem(u);if(f&&(f=t.serializer.deserialize(f)),f=e(f,u.substring(o),c++),void 0!==f)return f}}}));return s(r,t),r}function ze(e,t){var n=this,r=n.ready().then((function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(o){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t}));return s(r,t),r}function Ue(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,r=[],o=0;o<n;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&r.push(i.substring(e.keyPrefix.length))}return r}));return s(n,e),n}function Ge(e){var t=this,n=t.keys().then((function(e){return e.length}));return s(n,e),n}function Ve(e,t){var n=this;e=d(e);var r=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return s(r,t),r}function qe(e,t,n){var r=this;e=d(e);var o=r.ready().then((function(){void 0===t&&(t=null);var n=t;return new f((function(o,i){var c=r._dbInfo;c.serializer.serialize(t,(function(t,r){if(r)i(r);else try{localStorage.setItem(c.keyPrefix+e,t),o(n)}catch(a){"QuotaExceededError"!==a.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==a.name||i(a),i(a)}}))}))}));return s(o,n),o}function We(e,t){if(t=v.apply(this,arguments),e="function"!==typeof e&&e||{},!e.name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,o=this;return r=e.name?new f((function(t){e.storeName?t(Me(e,o._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):f.reject("Invalid arguments"),s(r,t),r}var He={_driver:"localStorageWrapper",_initStorage:Ce,_support:Le(),iterate:$e,getItem:Be,setItem:qe,removeItem:Ve,clear:Fe,length:Ge,key:ze,keys:Ue,dropInstance:We},Xe=function(e,t){return e===t||"number"===typeof e&&"number"===typeof t&&isNaN(e)&&isNaN(t)},Ke=function(e,t){var n=e.length,r=0;while(r<n){if(Xe(e[r],t))return!0;r++}return!1},Je=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Qe={},Ye={},Ze={INDEXEDDB:H,WEBSQL:Te,LOCALSTORAGE:He},et=[Ze.INDEXEDDB._driver,Ze.WEBSQL._driver,Ze.LOCALSTORAGE._driver],tt=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt),rt={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ot(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function it(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(Je(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var ct=function(){function e(t){for(var n in o(this,e),Ze)if(Ze.hasOwnProperty(n)){var r=Ze[n],i=r._driver;this[n]=i,Qe[i]||this.defineDriver(r)}this._defaultConfig=it({},rt),this._config=it({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver)["catch"]((function(){}))}return e.prototype.config=function(e){if("object"===("undefined"===typeof e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!==typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"===typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new f((function(t,n){try{var r=e._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(o);for(var i=nt.concat("_initStorage"),c=0,a=i.length;c<a;c++){var u=i[c],l=!Ke(tt,u);if((l||e[u])&&"function"!==typeof e[u])return void n(o)}var d=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=f.reject(t);return s(n,arguments[arguments.length-1]),n}},n=0,r=tt.length;n<r;n++){var o=tt[n];e[o]||(e[o]=t(o))}};d();var v=function(n){Qe[r]&&console.info("Redefining LocalForage driver: "+r),Qe[r]=e,Ye[r]=n,t()};"_support"in e?e._support&&"function"===typeof e._support?e._support().then(v,n):v(!!e._support):v(!0)}catch(p){n(p)}}));return l(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=Qe[e]?f.resolve(Qe[e]):f.reject(new Error("Driver not found."));return l(r,t,n),r},e.prototype.getSerializer=function(e){var t=f.resolve(be);return l(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return l(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;Je(e)||(e=[e]);var o=this._getSupportedDrivers(e);function i(){r._config.driver=r.driver()}function c(e){return r._extend(e),i(),r._ready=r._initStorage(r._config),r._ready}function a(e){return function(){var t=0;function n(){while(t<e.length){var o=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(o).then(c)["catch"](n)}i();var a=new Error("No available storage method found.");return r._driverSet=f.reject(a),r._driverSet}return n()}}var u=null!==this._driverSet?this._driverSet["catch"]((function(){return f.resolve()})):f.resolve();return this._driverSet=u.then((function(){var e=o[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then((function(e){r._driver=e._driver,i(),r._wrapLibraryMethodsWithReady(),r._initDriver=a(o)}))}))["catch"]((function(){i();var e=new Error("No available storage method found.");return r._driverSet=f.reject(e),r._driverSet})),l(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!Ye[e]},e.prototype._extend=function(e){it(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];this.supports(o)&&t.push(o)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=nt.length;e<t;e++)ot(this,nt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),at=new ct;t.exports=at},{3:3}]},{},[4])(4)}))}).call(this,n("c8ba"))},a481:function(e,t,n){"use strict";var r=n("cb7c"),o=n("4bf8"),i=n("9def"),c=n("4588"),a=n("0390"),u=n("5f1b"),f=Math.max,s=Math.min,l=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,v=/\$([$&`']|\d\d?)/g,p=function(e){return void 0===e?e:String(e)};n("214f")("replace",2,(function(e,t,n,h){return[function(r,o){var i=e(this),c=void 0==r?void 0:r[t];return void 0!==c?c.call(r,i,o):n.call(String(i),r,o)},function(e,t){var o=h(n,e,this,t);if(o.done)return o.value;var l=r(e),d=String(this),v="function"===typeof t;v||(t=String(t));var b=l.global;if(b){var g=l.unicode;l.lastIndex=0}var m=[];while(1){var _=u(l,d);if(null===_)break;if(m.push(_),!b)break;var S=String(_[0]);""===S&&(l.lastIndex=a(d,i(l.lastIndex),g))}for(var w="",I=0,x=0;x<m.length;x++){_=m[x];for(var E=String(_[0]),j=f(s(c(_.index),d.length),0),O=[],N=1;N<_.length;N++)O.push(p(_[N]));var A=_.groups;if(v){var k=[E].concat(O,j,d);void 0!==A&&k.push(A);var R=String(t.apply(void 0,k))}else R=y(E,d,j,O,A,t);j>=I&&(w+=d.slice(I,j)+R,I=j+E.length)}return w+d.slice(I)}];function y(e,t,r,i,c,a){var u=r+e.length,f=i.length,s=v;return void 0!==c&&(c=o(c),s=d),n.call(a,s,(function(n,o){var a;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":a=c[o.slice(1,-1)];break;default:var s=+o;if(0===s)return n;if(s>f){var d=l(s/10);return 0===d?n:d<=f?void 0===i[d-1]?o.charAt(1):i[d-1]+o.charAt(1):n}a=i[s-1]}return void 0===a?"":a}))}}))},aa77:function(e,t,n){var r=n("5ca1"),o=n("be13"),i=n("79e5"),c=n("fdef"),a="["+c+"]",u="…",f=RegExp("^"+a+a+"*"),s=RegExp(a+a+"*$"),l=function(e,t,n){var o={},a=i((function(){return!!c[e]()||u[e]()!=u})),f=o[e]=a?t(d):c[e];n&&(o[n]=f),r(r.P+r.F*a,"String",o)},d=l.trim=function(e,t){return e=String(o(e)),1&t&&(e=e.replace(f,"")),2&t&&(e=e.replace(s,"")),e};e.exports=l},ac6a:function(e,t,n){for(var r=n("cadf"),o=n("0d58"),i=n("2aba"),c=n("7726"),a=n("32e9"),u=n("84f2"),f=n("2b4c"),s=f("iterator"),l=f("toStringTag"),d=u.Array,v={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=o(v),h=0;h<p.length;h++){var y,b=p[h],g=v[b],m=c[b],_=m&&m.prototype;if(_&&(_[s]||a(_,s,d),_[l]||a(_,l,b),u[b]=d,g))for(y in r)_[y]||i(_,y,r[y],!0)}},b0c5:function(e,t,n){"use strict";var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},be13:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},c366:function(e,t,n){var r=n("6821"),o=n("9def"),i=n("77f1");e.exports=function(e){return function(t,n,c){var a,u=r(t),f=o(u.length),s=i(c,f);if(e&&n!=n){while(f>s)if(a=u[s++],a!=a)return!0}else for(;f>s;s++)if((e||s in u)&&u[s]===n)return e||s||0;return!e&&-1}}},c5f6:function(e,t,n){"use strict";var r=n("7726"),o=n("69a8"),i=n("2d95"),c=n("5dbc"),a=n("6a99"),u=n("79e5"),f=n("9093").f,s=n("11e9").f,l=n("86cc").f,d=n("aa77").trim,v="Number",p=r[v],h=p,y=p.prototype,b=i(n("2aeb")(y))==v,g="trim"in String.prototype,m=function(e){var t=a(e,!1);if("string"==typeof t&&t.length>2){t=g?t.trim():d(t,3);var n,r,o,i=t.charCodeAt(0);if(43===i||45===i){if(n=t.charCodeAt(2),88===n||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+t}for(var c,u=t.slice(2),f=0,s=u.length;f<s;f++)if(c=u.charCodeAt(f),c<48||c>o)return NaN;return parseInt(u,r)}}return+t};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof p&&(b?u((function(){y.valueOf.call(n)})):i(n)!=v)?c(new h(m(t)),n,p):m(t)};for(var _,S=n("9e1e")?f(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;S.length>w;w++)o(h,_=S[w])&&!o(p,_)&&l(p,_,s(h,_));p.prototype=y,y.constructor=p,n("2aba")(r,v,p)}},c69a:function(e,t,n){e.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},ca5a:function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},cadf:function(e,t,n){"use strict";var r=n("9c6c"),o=n("d53b"),i=n("84f2"),c=n("6821");e.exports=n("01f9")(Array,"Array",(function(e,t){this._t=c(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},cb7c:function(e,t,n){var r=n("d3f4");e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},cd1c:function(e,t,n){var r=n("e853");e.exports=function(e,t){return new(r(e))(t)}},ce10:function(e,t,n){var r=n("69a8"),o=n("6821"),i=n("c366")(!1),c=n("613b")("IE_PROTO");e.exports=function(e,t){var n,a=o(e),u=0,f=[];for(n in a)n!=c&&r(a,n)&&f.push(n);while(t.length>u)r(a,n=t[u++])&&(~i(f,n)||f.push(n));return f}},d3f4:function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},d53b:function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},d8e8:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},e11e:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e853:function(e,t,n){var r=n("d3f4"),o=n("1169"),i=n("2b4c")("species");e.exports=function(e){var t;return o(e)&&(t=e.constructor,"function"!=typeof t||t!==Array&&!o(t.prototype)||(t=void 0),r(t)&&(t=t[i],null===t&&(t=void 0))),void 0===t?Array:t}},fa5b:function(e,t,n){e.exports=n("5537")("native-function-to-string",Function.toString)},fab2:function(e,t,n){var r=n("7726").document;e.exports=r&&r.documentElement},fdef:function(e,t){e.exports="\t\n\v\f\r    \u2028\u2029\ufeff"}}]);