{"version":3,"sources":["https:\/\/immet-dist.spbstu.ru\/lib\/amd\/src\/localstorage.js"],"names":["define","config","StorageWrapper","storage","window","localStorage","get","key","set","value"],"mappings":"AAyBAA,OAAM,qBAAC,CAAC,aAAD,CAAgB,qBAAhB,CAAD,CAAyC,SAASC,CAAT,CAAiBC,CAAjB,CAAiC,CAI5E,GAAIC,CAAAA,CAAO,CAAG,GAAID,CAAAA,CAAJ,CAAmBE,MAAM,CAACC,YAA1B,CAAd,CAEA,MAA8C,CAQ1CC,GAAG,CAAE,aAASC,CAAT,CAAc,CACf,MAAOJ,CAAAA,CAAO,CAACG,GAAR,CAAYC,CAAZ,CACV,CAVyC,CAoB1CC,GAAG,CAAE,aAASD,CAAT,CAAcE,CAAd,CAAqB,CACtB,MAAON,CAAAA,CAAO,CAACK,GAAR,CAAYD,CAAZ,CAAiBE,CAAjB,CACV,CAtByC,CAyBjD,CA\/BK,CAAN","sourcesContent":["\/\/ This file is part of Moodle - http:\/\/moodle.org\/\n\/\/\n\/\/ Moodle is free software: you can redistribute it and\/or modify\n\/\/ it under the terms of the GNU General Public License as published by\n\/\/ the Free Software Foundation, either version 3 of the License, or\n\/\/ (at your option) any later version.\n\/\/\n\/\/ Moodle is distributed in the hope that it will be useful,\n\/\/ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\/\/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\/\/ GNU General Public License for more details.\n\/\/\n\/\/ You should have received a copy of the GNU General Public License\n\/\/ along with Moodle. If not, see .\n\n\/**\n * Simple API for set\/get to localstorage, with cacherev expiration.\n *\n * @module core\/localstorage\n * @package core\n * @class localstorage\n * @copyright 2015 Damyon Wiese \n * @license http:\/\/www.gnu.org\/copyleft\/gpl.html GNU GPL v3 or later\n * @since 2.9\n *\/\ndefine(['core\/config', 'core\/storagewrapper'], function(config, StorageWrapper) {\n\n \/\/ Private functions and variables.\n \/** @var {Object} StorageWrapper - Wraps browsers localStorage object *\/\n var storage = new StorageWrapper(window.localStorage);\n\n return \/** @alias module:core\/localstorage *\/ {\n \/**\n * Get a value from local storage. Remember - all values must be strings.\n *\n * @method get\n * @param {string} key The cache key to check.\n * @return {boolean|string} False if the value is not in the cache, or some other error - a string otherwise.\n *\/\n get: function(key) {\n return storage.get(key);\n },\n\n \/**\n * Set a value to local storage. Remember - all values must be strings.\n *\n * @method set\n * @param {string} key The cache key to set.\n * @param {string} value The value to set.\n * @return {boolean} False if the value can't be saved in the cache, or some other error - true otherwise.\n *\/\n set: function(key, value) {\n return storage.set(key, value);\n }\n\n };\n});\n"],"file":"localstorage.min.js"}