fastman2 3.0.0-alpha.1 → 3.0.0-alpha.2
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/actionsheetman.js +1 -96
- package/alertman.js +1 -79
- package/annotationman.js +17 -2912
- package/baseman.js +1 -115
- package/blankpageman.js +1 -171
- package/cascadepickerman.js +1 -322
- package/confirmman.js +1 -87
- package/coreman.js +3 -2182
- package/cryptoman.js +2 -8931
- package/datetimepickerman.js +1 -181
- package/domman.js +1 -2759
- package/eventemitterman.js +1 -112
- package/fileuploadman.js +1 -2970
- package/formvalidateman.js +1 -335
- package/jsbridgeman.js +1 -992
- package/lazyloadman.js +1 -133
- package/loadingman.js +1 -81
- package/modalman.js +1 -264
- package/mutationobserverman.js +1 -356
- package/package.json +1 -1
- package/passguardman.js +1 -1722
- package/persistman.js +1 -60
- package/pickerman.js +1 -680
- package/popupman.js +1 -61
- package/postman.js +1 -1649
- package/preloadman.js +2 -8760
- package/resultpageman.js +1 -153
- package/routerman.js +1 -1201
- package/scrollman-infiniteRefresh.js +1 -117
- package/scrollman-pullDownRefresh.js +1 -302
- package/scrollman.js +2 -2567
- package/storeman.js +1 -585
- package/swiperman.js +1 -4702
- package/swiperoldman.js +1 -3005
- package/tabman.js +1 -145
- package/tipman.js +1 -110
- package/toastman.js +1 -78
- package/toolman.js +1 -22
- package/whenman.js +1 -774
- package/wsman.js +1 -7624
package/storeman.js
CHANGED
|
@@ -1,585 +1 @@
|
|
|
1
|
-
(function
|
|
2
|
-
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory();
|
|
4
|
-
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define([], factory);
|
|
6
|
-
else if(typeof exports === 'object')
|
|
7
|
-
exports["fastman"] = factory();
|
|
8
|
-
else
|
|
9
|
-
root["fastman"] = factory();
|
|
10
|
-
})(this, function() {
|
|
11
|
-
return webpackJsonpfastman([5],{
|
|
12
|
-
|
|
13
|
-
/***/ 104:
|
|
14
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
15
|
-
|
|
16
|
-
"use strict";
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Object.defineProperty(exports, "__esModule", {
|
|
20
|
-
value: true
|
|
21
|
-
});
|
|
22
|
-
/*
|
|
23
|
-
* @Author: shenzhiwei
|
|
24
|
-
* @Date: 2017-04-17 08:53:38
|
|
25
|
-
* @Company: orientsec.com.cn
|
|
26
|
-
* @Description: Store
|
|
27
|
-
*/
|
|
28
|
-
// 解决store中针对assign不支持在低端机型上不兼容的问题
|
|
29
|
-
if (typeof Object.assign !== 'function') {
|
|
30
|
-
// Must be writable: true, enumerable: false, configurable: true
|
|
31
|
-
Object.defineProperty(Object, "assign", {
|
|
32
|
-
value: function assign(target, varArgs) {
|
|
33
|
-
// .length of function is 2
|
|
34
|
-
'use strict';
|
|
35
|
-
|
|
36
|
-
if (target === null || target === undefined) {
|
|
37
|
-
throw new TypeError('Cannot convert undefined or null to object');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
var to = Object(target);
|
|
41
|
-
|
|
42
|
-
for (var index = 1; index < arguments.length; index++) {
|
|
43
|
-
var nextSource = arguments[index];
|
|
44
|
-
|
|
45
|
-
if (nextSource !== null && nextSource !== undefined) {
|
|
46
|
-
for (var nextKey in nextSource) {
|
|
47
|
-
// Avoid bugs when hasOwnProperty is shadowed
|
|
48
|
-
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
|
|
49
|
-
to[nextKey] = nextSource[nextKey];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
return to;
|
|
55
|
-
},
|
|
56
|
-
writable: true,
|
|
57
|
-
configurable: true
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
var engine = __webpack_require__(208);
|
|
62
|
-
var storages = [__webpack_require__(209)];
|
|
63
|
-
var plugins = [__webpack_require__(206), __webpack_require__(207)];
|
|
64
|
-
var store = engine.createStore(storages, plugins);
|
|
65
|
-
exports.default = store;
|
|
66
|
-
|
|
67
|
-
/***/ }),
|
|
68
|
-
|
|
69
|
-
/***/ 206:
|
|
70
|
-
/***/ (function(module, exports) {
|
|
71
|
-
|
|
72
|
-
module.exports = defaultsPlugin
|
|
73
|
-
|
|
74
|
-
function defaultsPlugin() {
|
|
75
|
-
var defaultValues = {}
|
|
76
|
-
|
|
77
|
-
return {
|
|
78
|
-
defaults: defaults,
|
|
79
|
-
get: get
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
function defaults(_, values) {
|
|
83
|
-
defaultValues = values
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function get(super_fn, key) {
|
|
87
|
-
var val = super_fn()
|
|
88
|
-
return (val !== undefined ? val : defaultValues[key])
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/***/ }),
|
|
94
|
-
|
|
95
|
-
/***/ 207:
|
|
96
|
-
/***/ (function(module, exports) {
|
|
97
|
-
|
|
98
|
-
var namespace = 'expire_mixin'
|
|
99
|
-
|
|
100
|
-
module.exports = expirePlugin
|
|
101
|
-
|
|
102
|
-
function expirePlugin() {
|
|
103
|
-
var expirations = this.createStore(this.storage, null, this._namespacePrefix+namespace)
|
|
104
|
-
|
|
105
|
-
return {
|
|
106
|
-
set: expire_set,
|
|
107
|
-
get: expire_get,
|
|
108
|
-
remove: expire_remove,
|
|
109
|
-
getExpiration: getExpiration,
|
|
110
|
-
removeExpiredKeys: removeExpiredKeys
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function expire_set(super_fn, key, val, expiration) {
|
|
114
|
-
if (!this.hasNamespace(namespace)) {
|
|
115
|
-
expirations.set(key, expiration)
|
|
116
|
-
}
|
|
117
|
-
return super_fn()
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function expire_get(super_fn, key) {
|
|
121
|
-
if (!this.hasNamespace(namespace)) {
|
|
122
|
-
_checkExpiration.call(this, key)
|
|
123
|
-
}
|
|
124
|
-
return super_fn()
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
function expire_remove(super_fn, key) {
|
|
128
|
-
if (!this.hasNamespace(namespace)) {
|
|
129
|
-
expirations.remove(key)
|
|
130
|
-
}
|
|
131
|
-
return super_fn()
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function getExpiration(_, key) {
|
|
135
|
-
return expirations.get(key)
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function removeExpiredKeys(_) {
|
|
139
|
-
var keys = []
|
|
140
|
-
this.each(function(val, key) {
|
|
141
|
-
keys.push(key)
|
|
142
|
-
})
|
|
143
|
-
for (var i=0; i<keys.length; i++) {
|
|
144
|
-
_checkExpiration.call(this, keys[i])
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
function _checkExpiration(key) {
|
|
149
|
-
var expiration = expirations.get(key, Number.MAX_VALUE)
|
|
150
|
-
if (expiration <= new Date().getTime()) {
|
|
151
|
-
this.raw.remove(key)
|
|
152
|
-
expirations.remove(key)
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
/***/ }),
|
|
160
|
-
|
|
161
|
-
/***/ 208:
|
|
162
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
163
|
-
|
|
164
|
-
var util = __webpack_require__(75)
|
|
165
|
-
var slice = util.slice
|
|
166
|
-
var pluck = util.pluck
|
|
167
|
-
var each = util.each
|
|
168
|
-
var bind = util.bind
|
|
169
|
-
var create = util.create
|
|
170
|
-
var isList = util.isList
|
|
171
|
-
var isFunction = util.isFunction
|
|
172
|
-
var isObject = util.isObject
|
|
173
|
-
|
|
174
|
-
module.exports = {
|
|
175
|
-
createStore: createStore
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
var storeAPI = {
|
|
179
|
-
version: '2.0.12',
|
|
180
|
-
enabled: false,
|
|
181
|
-
|
|
182
|
-
// get returns the value of the given key. If that value
|
|
183
|
-
// is undefined, it returns optionalDefaultValue instead.
|
|
184
|
-
get: function(key, optionalDefaultValue) {
|
|
185
|
-
var data = this.storage.read(this._namespacePrefix + key)
|
|
186
|
-
return this._deserialize(data, optionalDefaultValue)
|
|
187
|
-
},
|
|
188
|
-
|
|
189
|
-
// set will store the given value at key and returns value.
|
|
190
|
-
// Calling set with value === undefined is equivalent to calling remove.
|
|
191
|
-
set: function(key, value) {
|
|
192
|
-
if (value === undefined) {
|
|
193
|
-
return this.remove(key)
|
|
194
|
-
}
|
|
195
|
-
this.storage.write(this._namespacePrefix + key, this._serialize(value))
|
|
196
|
-
return value
|
|
197
|
-
},
|
|
198
|
-
|
|
199
|
-
// remove deletes the key and value stored at the given key.
|
|
200
|
-
remove: function(key) {
|
|
201
|
-
this.storage.remove(this._namespacePrefix + key)
|
|
202
|
-
},
|
|
203
|
-
|
|
204
|
-
// each will call the given callback once for each key-value pair
|
|
205
|
-
// in this store.
|
|
206
|
-
each: function(callback) {
|
|
207
|
-
var self = this
|
|
208
|
-
this.storage.each(function(val, namespacedKey) {
|
|
209
|
-
callback.call(self, self._deserialize(val), (namespacedKey || '').replace(self._namespaceRegexp, ''))
|
|
210
|
-
})
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
// clearAll will remove all the stored key-value pairs in this store.
|
|
214
|
-
clearAll: function() {
|
|
215
|
-
this.storage.clearAll()
|
|
216
|
-
},
|
|
217
|
-
|
|
218
|
-
// additional functionality that can't live in plugins
|
|
219
|
-
// ---------------------------------------------------
|
|
220
|
-
|
|
221
|
-
// hasNamespace returns true if this store instance has the given namespace.
|
|
222
|
-
hasNamespace: function(namespace) {
|
|
223
|
-
return (this._namespacePrefix == '__storejs_'+namespace+'_')
|
|
224
|
-
},
|
|
225
|
-
|
|
226
|
-
// createStore creates a store.js instance with the first
|
|
227
|
-
// functioning storage in the list of storage candidates,
|
|
228
|
-
// and applies the the given mixins to the instance.
|
|
229
|
-
createStore: function() {
|
|
230
|
-
return createStore.apply(this, arguments)
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
addPlugin: function(plugin) {
|
|
234
|
-
this._addPlugin(plugin)
|
|
235
|
-
},
|
|
236
|
-
|
|
237
|
-
namespace: function(namespace) {
|
|
238
|
-
return createStore(this.storage, this.plugins, namespace)
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
function _warn() {
|
|
243
|
-
var _console = (typeof console == 'undefined' ? null : console)
|
|
244
|
-
if (!_console) { return }
|
|
245
|
-
var fn = (_console.warn ? _console.warn : _console.log)
|
|
246
|
-
fn.apply(_console, arguments)
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
function createStore(storages, plugins, namespace) {
|
|
250
|
-
if (!namespace) {
|
|
251
|
-
namespace = ''
|
|
252
|
-
}
|
|
253
|
-
if (storages && !isList(storages)) {
|
|
254
|
-
storages = [storages]
|
|
255
|
-
}
|
|
256
|
-
if (plugins && !isList(plugins)) {
|
|
257
|
-
plugins = [plugins]
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
var namespacePrefix = (namespace ? '__storejs_'+namespace+'_' : '')
|
|
261
|
-
var namespaceRegexp = (namespace ? new RegExp('^'+namespacePrefix) : null)
|
|
262
|
-
var legalNamespaces = /^[a-zA-Z0-9_\-]*$/ // alpha-numeric + underscore and dash
|
|
263
|
-
if (!legalNamespaces.test(namespace)) {
|
|
264
|
-
throw new Error('store.js namespaces can only have alphanumerics + underscores and dashes')
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
var _privateStoreProps = {
|
|
268
|
-
_namespacePrefix: namespacePrefix,
|
|
269
|
-
_namespaceRegexp: namespaceRegexp,
|
|
270
|
-
|
|
271
|
-
_testStorage: function(storage) {
|
|
272
|
-
try {
|
|
273
|
-
var testStr = '__storejs__test__'
|
|
274
|
-
storage.write(testStr, testStr)
|
|
275
|
-
var ok = (storage.read(testStr) === testStr)
|
|
276
|
-
storage.remove(testStr)
|
|
277
|
-
return ok
|
|
278
|
-
} catch(e) {
|
|
279
|
-
return false
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
|
-
|
|
283
|
-
_assignPluginFnProp: function(pluginFnProp, propName) {
|
|
284
|
-
var oldFn = this[propName]
|
|
285
|
-
this[propName] = function pluginFn() {
|
|
286
|
-
var args = slice(arguments, 0)
|
|
287
|
-
var self = this
|
|
288
|
-
|
|
289
|
-
// super_fn calls the old function which was overwritten by
|
|
290
|
-
// this mixin.
|
|
291
|
-
function super_fn() {
|
|
292
|
-
if (!oldFn) { return }
|
|
293
|
-
each(arguments, function(arg, i) {
|
|
294
|
-
args[i] = arg
|
|
295
|
-
})
|
|
296
|
-
return oldFn.apply(self, args)
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// Give mixing function access to super_fn by prefixing all mixin function
|
|
300
|
-
// arguments with super_fn.
|
|
301
|
-
var newFnArgs = [super_fn].concat(args)
|
|
302
|
-
|
|
303
|
-
return pluginFnProp.apply(self, newFnArgs)
|
|
304
|
-
}
|
|
305
|
-
},
|
|
306
|
-
|
|
307
|
-
_serialize: function(obj) {
|
|
308
|
-
return JSON.stringify(obj)
|
|
309
|
-
},
|
|
310
|
-
|
|
311
|
-
_deserialize: function(strVal, defaultVal) {
|
|
312
|
-
if (!strVal) { return defaultVal }
|
|
313
|
-
// It is possible that a raw string value has been previously stored
|
|
314
|
-
// in a storage without using store.js, meaning it will be a raw
|
|
315
|
-
// string value instead of a JSON serialized string. By defaulting
|
|
316
|
-
// to the raw string value in case of a JSON parse error, we allow
|
|
317
|
-
// for past stored values to be forwards-compatible with store.js
|
|
318
|
-
var val = ''
|
|
319
|
-
try { val = JSON.parse(strVal) }
|
|
320
|
-
catch(e) { val = strVal }
|
|
321
|
-
|
|
322
|
-
return (val !== undefined ? val : defaultVal)
|
|
323
|
-
},
|
|
324
|
-
|
|
325
|
-
_addStorage: function(storage) {
|
|
326
|
-
if (this.enabled) { return }
|
|
327
|
-
if (this._testStorage(storage)) {
|
|
328
|
-
this.storage = storage
|
|
329
|
-
this.enabled = true
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
|
|
333
|
-
_addPlugin: function(plugin) {
|
|
334
|
-
var self = this
|
|
335
|
-
|
|
336
|
-
// If the plugin is an array, then add all plugins in the array.
|
|
337
|
-
// This allows for a plugin to depend on other plugins.
|
|
338
|
-
if (isList(plugin)) {
|
|
339
|
-
each(plugin, function(plugin) {
|
|
340
|
-
self._addPlugin(plugin)
|
|
341
|
-
})
|
|
342
|
-
return
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
// Keep track of all plugins we've seen so far, so that we
|
|
346
|
-
// don't add any of them twice.
|
|
347
|
-
var seenPlugin = pluck(this.plugins, function(seenPlugin) {
|
|
348
|
-
return (plugin === seenPlugin)
|
|
349
|
-
})
|
|
350
|
-
if (seenPlugin) {
|
|
351
|
-
return
|
|
352
|
-
}
|
|
353
|
-
this.plugins.push(plugin)
|
|
354
|
-
|
|
355
|
-
// Check that the plugin is properly formed
|
|
356
|
-
if (!isFunction(plugin)) {
|
|
357
|
-
throw new Error('Plugins must be function values that return objects')
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
var pluginProperties = plugin.call(this)
|
|
361
|
-
if (!isObject(pluginProperties)) {
|
|
362
|
-
throw new Error('Plugins must return an object of function properties')
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
// Add the plugin function properties to this store instance.
|
|
366
|
-
each(pluginProperties, function(pluginFnProp, propName) {
|
|
367
|
-
if (!isFunction(pluginFnProp)) {
|
|
368
|
-
throw new Error('Bad plugin property: '+propName+' from plugin '+plugin.name+'. Plugins should only return functions.')
|
|
369
|
-
}
|
|
370
|
-
self._assignPluginFnProp(pluginFnProp, propName)
|
|
371
|
-
})
|
|
372
|
-
},
|
|
373
|
-
|
|
374
|
-
// Put deprecated properties in the private API, so as to not expose it to accidential
|
|
375
|
-
// discovery through inspection of the store object.
|
|
376
|
-
|
|
377
|
-
// Deprecated: addStorage
|
|
378
|
-
addStorage: function(storage) {
|
|
379
|
-
_warn('store.addStorage(storage) is deprecated. Use createStore([storages])')
|
|
380
|
-
this._addStorage(storage)
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
var store = create(_privateStoreProps, storeAPI, {
|
|
385
|
-
plugins: []
|
|
386
|
-
})
|
|
387
|
-
store.raw = {}
|
|
388
|
-
each(store, function(prop, propName) {
|
|
389
|
-
if (isFunction(prop)) {
|
|
390
|
-
store.raw[propName] = bind(store, prop)
|
|
391
|
-
}
|
|
392
|
-
})
|
|
393
|
-
each(storages, function(storage) {
|
|
394
|
-
store._addStorage(storage)
|
|
395
|
-
})
|
|
396
|
-
each(plugins, function(plugin) {
|
|
397
|
-
store._addPlugin(plugin)
|
|
398
|
-
})
|
|
399
|
-
return store
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
/***/ }),
|
|
404
|
-
|
|
405
|
-
/***/ 209:
|
|
406
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
407
|
-
|
|
408
|
-
var util = __webpack_require__(75)
|
|
409
|
-
var Global = util.Global
|
|
410
|
-
|
|
411
|
-
module.exports = {
|
|
412
|
-
name: 'localStorage',
|
|
413
|
-
read: read,
|
|
414
|
-
write: write,
|
|
415
|
-
each: each,
|
|
416
|
-
remove: remove,
|
|
417
|
-
clearAll: clearAll,
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
function localStorage() {
|
|
421
|
-
return Global.localStorage
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
function read(key) {
|
|
425
|
-
return localStorage().getItem(key)
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
function write(key, data) {
|
|
429
|
-
return localStorage().setItem(key, data)
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
function each(fn) {
|
|
433
|
-
for (var i = localStorage().length - 1; i >= 0; i--) {
|
|
434
|
-
var key = localStorage().key(i)
|
|
435
|
-
fn(read(key), key)
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
function remove(key) {
|
|
440
|
-
return localStorage().removeItem(key)
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
function clearAll() {
|
|
444
|
-
return localStorage().clear()
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
/***/ }),
|
|
449
|
-
|
|
450
|
-
/***/ 239:
|
|
451
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
452
|
-
|
|
453
|
-
module.exports = __webpack_require__(104);
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
/***/ }),
|
|
457
|
-
|
|
458
|
-
/***/ 75:
|
|
459
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
460
|
-
|
|
461
|
-
/* WEBPACK VAR INJECTION */(function(global) {var assign = make_assign()
|
|
462
|
-
var create = make_create()
|
|
463
|
-
var trim = make_trim()
|
|
464
|
-
var Global = (typeof window !== 'undefined' ? window : global)
|
|
465
|
-
|
|
466
|
-
module.exports = {
|
|
467
|
-
assign: assign,
|
|
468
|
-
create: create,
|
|
469
|
-
trim: trim,
|
|
470
|
-
bind: bind,
|
|
471
|
-
slice: slice,
|
|
472
|
-
each: each,
|
|
473
|
-
map: map,
|
|
474
|
-
pluck: pluck,
|
|
475
|
-
isList: isList,
|
|
476
|
-
isFunction: isFunction,
|
|
477
|
-
isObject: isObject,
|
|
478
|
-
Global: Global
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
function make_assign() {
|
|
482
|
-
if (Object.assign) {
|
|
483
|
-
return Object.assign
|
|
484
|
-
} else {
|
|
485
|
-
return function shimAssign(obj, props1, props2, etc) {
|
|
486
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
487
|
-
each(Object(arguments[i]), function(val, key) {
|
|
488
|
-
obj[key] = val
|
|
489
|
-
})
|
|
490
|
-
}
|
|
491
|
-
return obj
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
function make_create() {
|
|
497
|
-
if (Object.create) {
|
|
498
|
-
return function create(obj, assignProps1, assignProps2, etc) {
|
|
499
|
-
var assignArgsList = slice(arguments, 1)
|
|
500
|
-
return assign.apply(this, [Object.create(obj)].concat(assignArgsList))
|
|
501
|
-
}
|
|
502
|
-
} else {
|
|
503
|
-
function F() {} // eslint-disable-line no-inner-declarations
|
|
504
|
-
return function create(obj, assignProps1, assignProps2, etc) {
|
|
505
|
-
var assignArgsList = slice(arguments, 1)
|
|
506
|
-
F.prototype = obj
|
|
507
|
-
return assign.apply(this, [new F()].concat(assignArgsList))
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
|
|
512
|
-
function make_trim() {
|
|
513
|
-
if (String.prototype.trim) {
|
|
514
|
-
return function trim(str) {
|
|
515
|
-
return String.prototype.trim.call(str)
|
|
516
|
-
}
|
|
517
|
-
} else {
|
|
518
|
-
return function trim(str) {
|
|
519
|
-
return str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '')
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
function bind(obj, fn) {
|
|
525
|
-
return function() {
|
|
526
|
-
return fn.apply(obj, Array.prototype.slice.call(arguments, 0))
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
function slice(arr, index) {
|
|
531
|
-
return Array.prototype.slice.call(arr, index || 0)
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
function each(obj, fn) {
|
|
535
|
-
pluck(obj, function(val, key) {
|
|
536
|
-
fn(val, key)
|
|
537
|
-
return false
|
|
538
|
-
})
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
function map(obj, fn) {
|
|
542
|
-
var res = (isList(obj) ? [] : {})
|
|
543
|
-
pluck(obj, function(v, k) {
|
|
544
|
-
res[k] = fn(v, k)
|
|
545
|
-
return false
|
|
546
|
-
})
|
|
547
|
-
return res
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
function pluck(obj, fn) {
|
|
551
|
-
if (isList(obj)) {
|
|
552
|
-
for (var i=0; i<obj.length; i++) {
|
|
553
|
-
if (fn(obj[i], i)) {
|
|
554
|
-
return obj[i]
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
} else {
|
|
558
|
-
for (var key in obj) {
|
|
559
|
-
if (obj.hasOwnProperty(key)) {
|
|
560
|
-
if (fn(obj[key], key)) {
|
|
561
|
-
return obj[key]
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
function isList(val) {
|
|
569
|
-
return (val != null && typeof val != 'function' && typeof val.length == 'number')
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
function isFunction(val) {
|
|
573
|
-
return val && {}.toString.call(val) === '[object Function]'
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
function isObject(val) {
|
|
577
|
-
return val && {}.toString.call(val) === '[object Object]'
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3)))
|
|
581
|
-
|
|
582
|
-
/***/ })
|
|
583
|
-
|
|
584
|
-
},[239]);
|
|
585
|
-
});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.fastman=e():t.fastman=e()}(this,function(){return webpackJsonpfastman([5],{104:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t,e){if(null===t||void 0===t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1;r<arguments.length;r++){var i=arguments[r];if(null!==i&&void 0!==i)for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])}return n},writable:!0,configurable:!0});var r=n(208),i=[n(209)],o=[n(206),n(207)],a=r.createStore(i,o);e.default=a},206:function(t,e){function n(){function t(t,e){n=e}function e(t,e){var r=t();return void 0!==r?r:n[e]}var n={};return{defaults:t,get:e}}t.exports=n},207:function(t,e){function n(){function t(t,e,n,i){return this.hasNamespace(r)||u.set(e,i),t()}function e(t,e){return this.hasNamespace(r)||a.call(this,e),t()}function n(t,e){return this.hasNamespace(r)||u.remove(e),t()}function i(t,e){return u.get(e)}function o(t){var e=[];this.each(function(t,n){e.push(n)});for(var n=0;n<e.length;n++)a.call(this,e[n])}function a(t){u.get(t,Number.MAX_VALUE)<=(new Date).getTime()&&(this.raw.remove(t),u.remove(t))}var u=this.createStore(this.storage,null,this._namespacePrefix+r);return{set:t,get:e,remove:n,getExpiration:i,removeExpiredKeys:o}}var r="expire_mixin";t.exports=n},208:function(t,e,n){function r(){var t="undefined"==typeof console?null:console;if(t){(t.warn?t.warn:t.log).apply(t,arguments)}}function i(t,e,n){n||(n=""),t&&!l(t)&&(t=[t]),e&&!l(e)&&(e=[e]);var i=n?"__storejs_"+n+"_":"",o=n?new RegExp("^"+i):null;if(!/^[a-zA-Z0-9_\-]*$/.test(n))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var d={_namespacePrefix:i,_namespaceRegexp:o,_testStorage:function(t){try{var e="__storejs__test__";t.write(e,e);var n=t.read(e)===e;return t.remove(e),n}catch(t){return!1}},_assignPluginFnProp:function(t,e){var n=this[e];this[e]=function(){function e(){if(n)return c(arguments,function(t,e){r[e]=t}),n.apply(i,r)}var r=a(arguments,0),i=this,o=[e].concat(r);return t.apply(i,o)}},_serialize:function(t){return JSON.stringify(t)},_deserialize:function(t,e){if(!t)return e;var n="";try{n=JSON.parse(t)}catch(e){n=t}return void 0!==n?n:e},_addStorage:function(t){this.enabled||this._testStorage(t)&&(this.storage=t,this.enabled=!0)},_addPlugin:function(t){var e=this;if(l(t))return void c(t,function(t){e._addPlugin(t)});if(!u(this.plugins,function(e){return t===e})){if(this.plugins.push(t),!p(t))throw new Error("Plugins must be function values that return objects");var n=t.call(this);if(!h(n))throw new Error("Plugins must return an object of function properties");c(n,function(n,r){if(!p(n))throw new Error("Bad plugin property: "+r+" from plugin "+t.name+". Plugins should only return functions.");e._assignPluginFnProp(n,r)})}},addStorage:function(t){r("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(t)}},v=f(d,g,{plugins:[]});return v.raw={},c(v,function(t,e){p(t)&&(v.raw[e]=s(v,t))}),c(t,function(t){v._addStorage(t)}),c(e,function(t){v._addPlugin(t)}),v}var o=n(75),a=o.slice,u=o.pluck,c=o.each,s=o.bind,f=o.create,l=o.isList,p=o.isFunction,h=o.isObject;t.exports={createStore:i};var g={version:"2.0.12",enabled:!1,get:function(t,e){var n=this.storage.read(this._namespacePrefix+t);return this._deserialize(n,e)},set:function(t,e){return void 0===e?this.remove(t):(this.storage.write(this._namespacePrefix+t,this._serialize(e)),e)},remove:function(t){this.storage.remove(this._namespacePrefix+t)},each:function(t){var e=this;this.storage.each(function(n,r){t.call(e,e._deserialize(n),(r||"").replace(e._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(t){return this._namespacePrefix=="__storejs_"+t+"_"},createStore:function(){return i.apply(this,arguments)},addPlugin:function(t){this._addPlugin(t)},namespace:function(t){return i(this.storage,this.plugins,t)}}},209:function(t,e,n){function r(){return f.localStorage}function i(t){return r().getItem(t)}function o(t,e){return r().setItem(t,e)}function a(t){for(var e=r().length-1;e>=0;e--){var n=r().key(e);t(i(n),n)}}function u(t){return r().removeItem(t)}function c(){return r().clear()}var s=n(75),f=s.Global;t.exports={name:"localStorage",read:i,write:o,each:a,remove:u,clearAll:c}},239:function(t,e,n){t.exports=n(104)},75:function(t,e,n){(function(e){function n(t,e){return function(){return e.apply(t,Array.prototype.slice.call(arguments,0))}}function r(t,e){return Array.prototype.slice.call(t,e||0)}function i(t,e){a(t,function(t,n){return e(t,n),!1})}function o(t,e){var n=u(t)?[]:{};return a(t,function(t,r){return n[r]=e(t,r),!1}),n}function a(t,e){if(u(t)){for(var n=0;n<t.length;n++)if(e(t[n],n))return t[n]}else for(var r in t)if(t.hasOwnProperty(r)&&e(t[r],r))return t[r]}function u(t){return null!=t&&"function"!=typeof t&&"number"==typeof t.length}function c(t){return t&&"[object Function]"==={}.toString.call(t)}function s(t){return t&&"[object Object]"==={}.toString.call(t)}var f=function(){return Object.assign?Object.assign:function(t,e,n,r){for(var o=1;o<arguments.length;o++)i(Object(arguments[o]),function(e,n){t[n]=e});return t}}(),l=function(){function t(){}return Object.create?function(t,e,n,i){var o=r(arguments,1);return f.apply(this,[Object.create(t)].concat(o))}:function(e,n,i,o){var a=r(arguments,1);return t.prototype=e,f.apply(this,[new t].concat(a))}}(),p=function(){return String.prototype.trim?function(t){return String.prototype.trim.call(t)}:function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}(),h="undefined"!=typeof window?window:e;t.exports={assign:f,create:l,trim:p,bind:n,slice:r,each:i,map:o,pluck:a,isList:u,isFunction:c,isObject:s,Global:h}}).call(e,n(3))}},[239])});
|