Your IP : 52.15.183.154
(function(e){if(e.BX.indexedDB)return;var n=e.BX;n.indexedDB=function(n){var t=e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB;e.IDBTransaction=e.IDBTransaction||e.webkitIDBTransaction||e.msIDBTransaction;e.IDBKeyRange=e.IDBKeyRange||e.webkitIDBKeyRange||e.msIDBKeyRange;if(typeof t=="undefined"||typeof e.IDBTransaction=="undefined"||typeof e.IDBKeyRange=="undefined"){return}var r=t.open(n.name,parseInt(n.version));if(r==null){return}r.onsuccess=function(e){if(typeof n.callback=="function"){n.callback(this.result)}};r.onupgradeneeded=function(e){if(typeof n.oScheme!="undefined"){var t=e.target.result;var r=null;var o=null;var c=null;var i=n.oScheme.length;var a,f=null;for(a=0;a<i;a++){r=n.oScheme[a];if(typeof r=="object"&&!t.objectStoreNames.contains(r.name)){o=t.createObjectStore(r.name,{keyPath:typeof r.keyPath!="undefined"&&r.keyPath?r.keyPath:undefined,autoIncrement:typeof r.autoIncrement!="undefined"&&!!r.autoIncrement});if(typeof r.indexes!="undefined"){for(f=0;f<r.indexes.length;f++){o.createIndex(r.indexes[f].name,r.indexes[f].keyPath,{unique:!!r.indexes[f].unique})}}}}var d=null;length=t.objectStoreNames.length;for(a=0;a<length;a++){d=false;for(f=0;f<i;f++){r=n.oScheme[f];if(r.name==t.objectStoreNames[a]){d=true;break}}if(!d){t.deleteObjectStore(t.objectStoreNames[a])}}}}};n.indexedDB.checkDbObject=function(e){return typeof e=="object"};n.indexedDB.getObjectStore=function(e,t,r){if(!n.indexedDB.checkDbObject(e)){return}try{var o=e.transaction(t,r);o.onsuccess=function(){};o.onerror=function(){};return o.objectStore(t)}catch(c){return false}};n.indexedDB.clearObjectStore=function(e,t){var r=null;var o=n.indexedDB.getObjectStore(e,t,"readwrite");r=n.indexedDB.getObjectStore(e,t,"readwrite").clear()};n.indexedDB.addValue=function(e,t,r,o,c){var i=null;try{i=n.indexedDB.getObjectStore(e,t,"readwrite").add(r,o)}catch(a){}i.onerror=function(e){if(typeof c.error=="function"){c.error(e)}};i.onsuccess=function(e){if(typeof c.callback=="function"){c.callback(e)}}};n.indexedDB.updateValue=function(e,t,r,o,c){var i=n.indexedDB.getObjectStore(e,t,"readwrite");var a=null;try{a=i.put(r)}catch(f){}a.onerror=function(e){if(typeof c!="undefined"&&typeof c.error=="function"){c.error(e,o)}};a.onsuccess=function(e){if(typeof c!="undefined"&&typeof c.callback=="function"){c.callback(e)}}};n.indexedDB.deleteValue=function(e,t,r,o){var c=n.indexedDB.getObjectStore(e,t,"readwrite")["delete"](r);c.onerror=function(e){if(typeof o!="undefined"&&typeof o.error=="function"){o.error(e)}};c.onsuccess=function(e){if(typeof o!="undefined"&&typeof o.callback=="function"){o.callback(e)}}};n.indexedDB.deleteValueByIndex=function(e,t,r,o,c){var i=null;try{i=n.indexedDB.getObjectStore(e,t,"readwrite").index(r).getKey(o)}catch(a){}i.onsuccess=function(r){var o=null;try{o=n.indexedDB.getObjectStore(e,t,"readwrite")["delete"](r.target.result);o.onsuccess=function(e){if(typeof c!="undefined"&&typeof c.callback=="function"){c.callback(e)}};o.onerror=function(e){if(typeof c!="undefined"&&typeof c.error=="function"){c.error(e)}}}catch(i){}};i.onerror=function(e){if(typeof c.error=="function"){c.error(e)}}};n.indexedDB.getValue=function(e,t,r,o){var c=n.indexedDB.getObjectStore(e,t,"readonly").get(r);c.onerror=function(e){if(typeof o.error=="function"){o.error(e)}};c.onsuccess=function(e){if(typeof o.callback=="function"){o.callback(e.target.result)}}};n.indexedDB.getValueByIndex=function(e,t,r,o,c){var i=n.indexedDB.getObjectStore(e,t,"readonly").index(r).get(o);i.onerror=function(e){if(typeof c.error=="function"){c.error(e)}};i.onsuccess=function(e){if(typeof c.callback=="function"){c.callback(e.target.result)}}};n.indexedDB.openCursor=function(t,r,o,c){var i=null;if(typeof o.lower!="undefined"){if(typeof o.upper!="undefined"){i=e.IDBKeyRange.bound(o.lower,o.upper,!!o.lowerOpen,!!o.upperOpen)}else{i=e.IDBKeyRange.lowerBound(o.lower,!!o.lowerOpen)}}else if(typeof o.upper!="undefined"){i=e.IDBKeyRange.upperBound(o.upper,!!o.upperOpen)}var a=n.indexedDB.getObjectStore(t,r,"readonly").openCursor(i);a.onerror=function(e){if(typeof c.error=="function"){c.error(e)}};a.onsuccess=function(e){if(typeof c.callback=="function"){var n=e.target.result;if(n){c.callback(n.value);n["continue"]()}}}};n.indexedDB.count=function(e,t,r){var o=n.indexedDB.getObjectStore(e,t,"readonly").count();o.onerror=function(e){if(typeof r.error=="function"){r.error(e)}};o.onsuccess=function(){if(typeof r.callback=="function"){r.callback(o.result)}}};n.indexedDB.deleteDatabase=function(n,t){var r=e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB;r.deleteDatabase(n)}})(window);
//# sourceMappingURL=core_db_indexeddb.map.js