filesbox/web/dist/reader/js/libs/localforage.min.js

7 lines
25 KiB
JavaScript
Raw Normal View History

2024-07-26 06:10:54 +00:00
/*!
localForage -- Offline Storage, Improved
Version 1.5.0
https://localforage.github.io/localForage
(c) 2013-2017 Mozilla, Apache License 2.0
*/(function(R){if(typeof exports=="object"&&typeof module!="undefined")module.exports=R();else if(typeof define=="function"&&define.amd)define([],R);else{var A;A=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this,A.localforage=R()}})(function(){return function R(A,B,b){function D(S,L){if(!B[S]){if(!A[S]){var h=typeof require=="function"&&require;if(!L&&h)return h(S,!0);if(x)return x(S,!0);var O=new Error("Cannot find module '"+S+"'");throw O.code="MODULE_NOT_FOUND",O}var F=B[S]={exports:{}};A[S][0].call(F.exports,function(z){var C=A[S][1][z];return D(C||z)},F,F.exports,R,A,B,b)}return B[S].exports}for(var x=typeof require=="function"&&require,N=0;N<b.length;N++)D(b[N]);return D}({1:[function(R,A,B){(function(b){"use strict";function D(){z=!0;for(var E,w,P=C.length;P;){for(w=C,C=[],E=-1;++E<P;)w[E]();P=C.length}z=!1}function x(E){C.push(E)!==1||z||N()}var N,S=b.MutationObserver||b.WebKitMutationObserver;if(S){var L=0,h=new S(D),O=b.document.createTextNode("");h.observe(O,{characterData:!0}),N=function(){O.data=L=++L%2}}else if(b.setImmediate||typeof b.MessageChannel=="undefined")N="document"in b&&"onreadystatechange"in b.document.createElement("script")?function(){var E=b.document.createElement("script");E.onreadystatechange=function(){D(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},b.document.documentElement.appendChild(E)}:function(){setTimeout(D,0)};else{var F=new b.MessageChannel;F.port1.onmessage=D,N=function(){F.port2.postMessage(0)}}var z,C=[];A.exports=x}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(R,A,B){"use strict";function b(){}function D(s){if(typeof s!="function")throw new TypeError("resolver must be a function");this.state=J,this.queue=[],this.outcome=void 0,s!==b&&L(this,s)}function x(s,p,y){this.promise=s,typeof p=="function"&&(this.onFulfilled=p,this.callFulfilled=this.otherCallFulfilled),typeof y=="function"&&(this.onRejected=y,this.callRejected=this.otherCallRejected)}function N(s,p,y){E(function(){var m;try{m=p(y)}catch(_){return w.reject(s,_)}m===s?w.reject(s,new TypeError("Cannot resolve promise with itself")):w.resolve(s,m)})}function S(s){var p=s&&s.then;if(s&&typeof s=="object"&&typeof p=="function")return function(){p.apply(s,arguments)}}function L(s,p){function y(T){k||(k=!0,w.reject(s,T))}function m(T){k||(k=!0,w.resolve(s,T))}function _(){p(m,y)}var k=!1,M=h(_);M.status==="error"&&y(M.value)}function h(s,p){var y={};try{y.value=s(p),y.status="success"}catch(m){y.status="error",y.value=m}return y}function O(s){return s instanceof this?s:w.resolve(new this(b),s)}function F(s){var p=new this(b);return w.reject(p,s)}function z(s){function p(V,Y){function Z(X){k[Y]=X,++M!==m||_||(_=!0,w.resolve(q,k))}y.resolve(V).then(Z,function(X){_||(_=!0,w.reject(q,X))})}var y=this;if(Object.prototype.toString.call(s)!=="[object Array]")return this.reject(new TypeError("must be an array"));var m=s.length,_=!1;if(!m)return this.resolve([]);for(var k=new Array(m),M=0,T=-1,q=new this(b);++T<m;)p(s[T],T);return q}function C(s){function p(T){y.resolve(T).then(function(q){_||(_=!0,w.resolve(M,q))},function(q){_||(_=!0,w.reject(M,q))})}var y=this;if(Object.prototype.toString.call(s)!=="[object Array]")return this.reject(new TypeError("must be an array"));var m=s.length,_=!1;if(!m)return this.resolve([]);for(var k=-1,M=new this(b);++k<m;)p(s[k]);return M}var E=R(1),w={},P=["REJECTED"],G=["FULFILLED"],J=["PENDING"];A.exports=B=D,D.prototype.catch=function(s){return this.then(null,s)},D.prototype.then=function(s,p){if(typeof s!="function"&&this.state===G||typeof p!="function"&&this.state===P)return this;var y=new this.constructor(b);if(this.state!==J){var m=this.state===G?s:p;N(y,m,this.outcome)}else this.queue.push(new x(y,s,p));return y},x.prototype.callFulfilled=function(s){w.resolve(this.promise,s)},x.prototype.otherCallFulfilled=function(s){N(this.promise,this.onFulfilled,s)},x.prototype.callRejected=function(s){w.reject(this.promise,s)},x.prototype.otherCallRej