line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# This file is generated by author/assets.pl. Do not edit manually. |
2
|
|
|
|
|
|
|
use strict; |
3
|
1
|
|
|
1
|
|
340
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
5
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
111
|
|
5
|
|
|
|
|
|
|
<<',,,'; |
6
|
|
|
|
|
|
|
<script src="<: uri_for('/static/js/micro-location.js') :>"></script> |
7
|
1
|
|
|
1
|
0
|
4
|
,,, |
8
|
|
|
|
|
|
|
} |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
return { |
11
|
|
|
|
|
|
|
'js/micro-location.js' => '/** |
12
|
|
|
|
|
|
|
* https://github.com/cho45/micro-location.js |
13
|
|
|
|
|
|
|
* (c) cho45 http://cho45.github.com/mit-license |
14
|
0
|
|
|
0
|
0
|
|
*/ |
15
|
|
|
|
|
|
|
// immutable object, should not assign a value to properties |
16
|
|
|
|
|
|
|
function Location () { this.init.apply(this, arguments) } |
17
|
|
|
|
|
|
|
Location.prototype = { |
18
|
|
|
|
|
|
|
init : function (protocol, host, hostname, port, pathname, search, hash) { |
19
|
|
|
|
|
|
|
this.protocol = protocol; |
20
|
|
|
|
|
|
|
this.host = host; |
21
|
|
|
|
|
|
|
this.hostname = hostname; |
22
|
|
|
|
|
|
|
this.port = port || ""; |
23
|
|
|
|
|
|
|
this.pathname = pathname || ""; |
24
|
|
|
|
|
|
|
this.search = search || ""; |
25
|
|
|
|
|
|
|
this.hash = hash || ""; |
26
|
|
|
|
|
|
|
if (protocol) { |
27
|
|
|
|
|
|
|
with (this) this.href = protocol + \'//\' + host + pathname + search + hash; |
28
|
|
|
|
|
|
|
} else |
29
|
|
|
|
|
|
|
if (host) { |
30
|
|
|
|
|
|
|
with (this) this.href = \'//\' + host + pathname + search + hash; |
31
|
|
|
|
|
|
|
} else { |
32
|
|
|
|
|
|
|
with (this) this.href = pathname + search + hash; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
}, |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
params : function (name) { |
37
|
|
|
|
|
|
|
if (!this._params) { |
38
|
|
|
|
|
|
|
var params = {}; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
var pairs = this.search.substring(1).split(/[;&]/); |
41
|
|
|
|
|
|
|
for (var i = 0, len = pairs.length; i < len; i++) { |
42
|
|
|
|
|
|
|
if (!pairs[i]) continue; |
43
|
|
|
|
|
|
|
var pair = pairs[i].split(/=/); |
44
|
|
|
|
|
|
|
var key = decodeURIComponent(pair[0].replace(/\\+/g, \'%20\')); |
45
|
|
|
|
|
|
|
var val = decodeURIComponent(pair[1].replace(/\\+/g, \'%20\')); |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
if (!params[key]) params[key] = []; |
48
|
|
|
|
|
|
|
params[key].push(val); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
this._params = params; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
switch (typeof name) { |
55
|
|
|
|
|
|
|
case "undefined": return this._params; |
56
|
|
|
|
|
|
|
case "object" : return this.build(name); |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
return this._params[name] ? this._params[name][0] : null; |
59
|
|
|
|
|
|
|
}, |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
build : function (params) { |
62
|
|
|
|
|
|
|
if (!params) params = this._params; |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
var ret = new Location(); |
65
|
|
|
|
|
|
|
var _search = this.search; |
66
|
|
|
|
|
|
|
if (params) { |
67
|
|
|
|
|
|
|
var search = []; |
68
|
|
|
|
|
|
|
for (var key in params) if (params.hasOwnProperty(key)) { |
69
|
|
|
|
|
|
|
var val = params[key]; |
70
|
|
|
|
|
|
|
switch (typeof val) { |
71
|
|
|
|
|
|
|
case "object": |
72
|
|
|
|
|
|
|
for (var i = 0, len = val.length; i < len; i++) { |
73
|
|
|
|
|
|
|
search.push(encodeURIComponent(key) + \'=\' + encodeURIComponent(val[i])); |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
break; |
76
|
|
|
|
|
|
|
default: |
77
|
|
|
|
|
|
|
search.push(encodeURIComponent(key) + \'=\' + encodeURIComponent(val)); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
_search = \'?\' + search.join(\'&\'); |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
with (this) ret.init.apply(ret, [ |
84
|
|
|
|
|
|
|
protocol, |
85
|
|
|
|
|
|
|
host, |
86
|
|
|
|
|
|
|
hostname, |
87
|
|
|
|
|
|
|
port, |
88
|
|
|
|
|
|
|
pathname, |
89
|
|
|
|
|
|
|
_search, |
90
|
|
|
|
|
|
|
hash |
91
|
|
|
|
|
|
|
]); |
92
|
|
|
|
|
|
|
return ret; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
}; |
95
|
|
|
|
|
|
|
Location.regexp = new RegExp(\'^(?:(https?:)//(([^:/]+)(:[^/]+)?))?([^#?]*)(\\\\?[^#]*)?(#.*)?$\'); |
96
|
|
|
|
|
|
|
Location.parse = function (string) { |
97
|
|
|
|
|
|
|
var matched = String(string).match(this.regexp); |
98
|
|
|
|
|
|
|
var ret = new Location(); |
99
|
|
|
|
|
|
|
ret.init.apply(ret, matched.slice(1)); |
100
|
|
|
|
|
|
|
return ret; |
101
|
|
|
|
|
|
|
}; |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
(function (root, factory) { |
104
|
|
|
|
|
|
|
if (typeof module === "object" && module.exports) { |
105
|
|
|
|
|
|
|
module.exports = { |
106
|
|
|
|
|
|
|
Location: factory() |
107
|
|
|
|
|
|
|
}; |
108
|
|
|
|
|
|
|
} else if (typeof define === \'function\' && define.amd) { |
109
|
|
|
|
|
|
|
define([], function () { |
110
|
|
|
|
|
|
|
return { |
111
|
|
|
|
|
|
|
Location: factory() |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
}); |
114
|
|
|
|
|
|
|
} else { |
115
|
|
|
|
|
|
|
root.Location = factory(); |
116
|
|
|
|
|
|
|
} |
117
|
|
|
|
|
|
|
}(this, function () { |
118
|
|
|
|
|
|
|
return Location; |
119
|
|
|
|
|
|
|
})); |
120
|
|
|
|
|
|
|
' |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
1; |