Merge branch 'andy' of https://forge.ibisc.univ-evry.fr/jdelahous/snakes into andy
Showing
21 changed files
with
3244 additions
and
0 deletions
bin/andy
0 → 100755
doc/examples/andy/example.py
0 → 100644
1 | +# entities: tuple of name of the entities, initial level, tuple of decays 0 | ||
2 | +# denotes unbounded decay (omega) | ||
3 | +# examples: | ||
4 | +# entities = ( ('B',4, (0,2,2,2,3)), ('P',0, (0,0)), ('C',0, (0,0)), | ||
5 | +# ('G',0, (0,0)) ) | ||
6 | +# entities = ( ('Sugar',1, (0,2)), ('Aspartame',0, (0,2)), | ||
7 | +# ('Glycemia',2, (0,2,2,2)), ('Glucagon',0, (0,2)), | ||
8 | +# ('Insulin',0,(0,2,2)) ) | ||
9 | + | ||
10 | +entities = ( ('s1',0, (0,1)), ('s2',0, (0,1)), ('s3',0, (0,1)) ) | ||
11 | + | ||
12 | +# Activities: Tuple of (activators, inhibitors, results, duration) | ||
13 | +# activators, inhibitors are dictionaries of pairs | ||
14 | +# (entity, level) | ||
15 | +# results are dictionaries of pairs (entity, +z) | ||
16 | + | ||
17 | +# potential activities examples: | ||
18 | +# potential = ( (dict([('P',0)]),dict([('P',1)]),dict([('P',1)]),0), | ||
19 | +# (dict([('P',1)]),dict(),dict([('P',-1)]),0), | ||
20 | +# (dict([('C',0)]),dict([('C',1)]),dict([('C',1)]),0), | ||
21 | +# (dict([('C',1)]),dict(),dict([('C',-1)]),0), | ||
22 | +# (dict([('G',0)]),dict([('G',1)]),dict([('G',1)]),0), | ||
23 | +# (dict([('G',1)]),dict(),dict([('G',-1)]),0) ) | ||
24 | +# potential = ( (dict([('Sugar',1)]),dict(), | ||
25 | +# dict([('Insulin',1),('Glycemia',1)]),0), | ||
26 | +# (dict([('Aspartame',1)]),dict(),dict([('Insulin',1)]),0), | ||
27 | +# (dict(),dict([('Glycemia',1)]),dict([('Glucagon',1)]),0), | ||
28 | +# (dict([('Glycemia',3)]),dict(),dict([('Insulin',1)]),0), | ||
29 | +# (dict([('Insulin',2)]),dict(),dict([('Glycemia',-1)]),0), | ||
30 | +# (dict([('Insulin',1),('Glycemia',3)]), dict(), | ||
31 | +# dict([('Glycemia',-1)]),0), | ||
32 | +# (dict([('Insulin',1)]),dict([('Glycemia',2)]), | ||
33 | +# dict([('Glycemia',-1)]),0), | ||
34 | +# (dict([('Glucagon',1)]),dict(),dict([('Glycemia',+1)]),0) | ||
35 | +# ) | ||
36 | + | ||
37 | +potential = ( (dict(), dict([('s1',1)]), dict([('s2',1)]), 1), | ||
38 | + (dict(), dict([('s2',1)]), dict([('s3',1)]), 1), | ||
39 | + (dict(), dict([('s3',1)]), dict([('s1',1)]), 1) ) | ||
40 | + | ||
41 | +# obligatory activities examples: | ||
42 | +# obligatory = ( (dict([('P',1)]),dict(),dict([('B',1)]),1), | ||
43 | +# (dict([('C',1)]),dict(),dict([('B',-1)]),3), | ||
44 | +# (dict([('G',1)]),dict(),dict([('B',-2)]),3)) | ||
45 | + | ||
46 | +obligatory = () | ||
47 | + |
snakes/utils/andy/__init__.py
0 → 100644
1 | +"""This package features the Andy compiler, this is mainly a | ||
2 | +command-line tool but it can be called also from Python. The API is | ||
3 | +very simple and mimics the command line interface | ||
4 | + | ||
5 | +### Function `snakes.utils.andy.main.main` ### | ||
6 | + | ||
7 | + :::python | ||
8 | + def main (args=sys.argv[1:]) : ... | ||
9 | + | ||
10 | +Entry point of the compiler | ||
11 | + | ||
12 | +##### Call API ##### | ||
13 | + | ||
14 | + * `list args`: | ||
15 | + * `return PetriNet`: | ||
16 | + | ||
17 | +##### Exceptions ##### | ||
18 | + | ||
19 | + * `DeclarationError`: when | ||
20 | + * `CompilationError`: when | ||
21 | + | ||
22 | +""" | ||
23 | + | ||
24 | +# apidoc stop | ||
25 | +from snakes import SnakesError | ||
26 | + | ||
27 | +class CompilationError (SnakesError) : | ||
28 | + pass | ||
29 | + | ||
30 | +class DeclarationError (SnakesError) : | ||
31 | + pass |
snakes/utils/andy/andy.py
0 → 100644
1 | +############################################################################### | ||
2 | +## AUXILIARY FUNCTIONS ######################################################## | ||
3 | + | ||
4 | +def clockt(obligatory, name, ls, us, lambdas, deltas, inputlist, D): | ||
5 | + '''This function computes the action of clock + decay + obligatory | ||
6 | + activities. | ||
7 | + obligatory = set of obligatory activities | ||
8 | + name = entity concerned | ||
9 | + ls = ls of entity | ||
10 | + us = us of entity | ||
11 | + lambdas = lambdas of entity | ||
12 | + deltas = list of the decays duration of entity | ||
13 | + inputlist = tuples for all other entities''' | ||
14 | + | ||
15 | + #print (obligatory, name, ls, us, lambdas, deltas, inputlist,D) | ||
16 | + l1=ls | ||
17 | + u1=us | ||
18 | + lambda1=[] | ||
19 | + | ||
20 | + # progression of time in lambda | ||
21 | + for i in range(0,len(lambdas)): | ||
22 | + lambda1.append(min(lambdas[i]+1, D)) | ||
23 | + | ||
24 | + # progression of time for u (only for bounded levels) | ||
25 | + if deltas[ls] <> 0: | ||
26 | + u1=us+1 | ||
27 | + | ||
28 | + # decay | ||
29 | + if us+1 > deltas[ls]: | ||
30 | + l1 = max(0, ls -1) | ||
31 | + u1 = 0 | ||
32 | + | ||
33 | + # search of obligatory activities where entity name is in results | ||
34 | + act = [] | ||
35 | + for alpha in range(0, len(obligatory)): | ||
36 | + obname = 'ob'+str(alpha) | ||
37 | + if name in obligatory[alpha][2] \ | ||
38 | + and inputlist[obname]>= obligatory[alpha][3]: | ||
39 | + act.append(obligatory[alpha]) | ||
40 | + | ||
41 | + # computation of the effect on entity name | ||
42 | + for alpha in range(0, len(act)): | ||
43 | + # check if the obligatory activity is enabled or not | ||
44 | + check = 0 | ||
45 | + activators = act[alpha][0] | ||
46 | + for ent in activators: | ||
47 | + t = inputlist[ent] | ||
48 | + if t[0] >= activators[ent] \ | ||
49 | + and t[2][activators[ent]] >= act[alpha][3]: | ||
50 | + check = 1 | ||
51 | + inhibitors = act[alpha][1] | ||
52 | + for ent in inhibitors: | ||
53 | + t = inputlist[ent] | ||
54 | + if t[0] < inhibitors[ent] \ | ||
55 | + and t[2][inhibitors[ent]] >= act[alpha][3]: | ||
56 | + check = 1 | ||
57 | + # if enabled compute the effect | ||
58 | + if check: | ||
59 | + z = act[alpha][2][name] | ||
60 | + l1 = max(0, min(l1 + z, len(lambda1)-1)) | ||
61 | + u1 = 0 | ||
62 | + | ||
63 | + # update lambda with the proper dates | ||
64 | + temp = l1 - ls | ||
65 | + if temp > 0 : | ||
66 | + for i in range(ls+1,l1): | ||
67 | + lambda1[i]=0 | ||
68 | + if temp < 0: | ||
69 | + for i in range(l1+1,ls): | ||
70 | + lambda1[i]=0 | ||
71 | + | ||
72 | + return (l1, u1, tuple(lambda1)) | ||
73 | + | ||
74 | + | ||
75 | +def clockbetat (obligatory, name, w, inputlist,D) : | ||
76 | + '''This function computes the action of clock on obligatory activities | ||
77 | + places. | ||
78 | + obligatory = set of obligatory activities | ||
79 | + name = obligatory activity under consideration | ||
80 | + w = current value | ||
81 | + inputlist = tuples for all other entities''' | ||
82 | + | ||
83 | + check = 0 | ||
84 | + activators = obligatory[name][0] | ||
85 | + for ent in activators: | ||
86 | + t = inputlist[ent] | ||
87 | + if t[0] >= activators[ent] \ | ||
88 | + and t[2][activators[ent]] >= obligatory[name][3]: | ||
89 | + check = 1 | ||
90 | + inhibitors = obligatory[name][1] | ||
91 | + for ent in inhibitors: | ||
92 | + t = inputlist[ent] | ||
93 | + if t[0] < inhibitors[ent] \ | ||
94 | + and t[2][inhibitors[ent]] >= obligatory[name][3]: | ||
95 | + check = 1 | ||
96 | + # if enabled compute the effect | ||
97 | + if check and w >= obligatory[name][3]: | ||
98 | + return(0) | ||
99 | + else: | ||
100 | + return(min(w+1, D)) | ||
101 | + | ||
102 | +def potentialt (name, lp, up, lambdap, R) : | ||
103 | + '''This function computes the action on an entity of a potential activity. | ||
104 | + name = entity under consideration | ||
105 | + lp, up, lambdap = its values | ||
106 | + R = set of results of the activity''' | ||
107 | + | ||
108 | + #print (name, lp, up, lambdap, R) | ||
109 | + # is entity a result? | ||
110 | + if name in R: | ||
111 | + lambda2 = list(lambdap) | ||
112 | + levelp = max(0,min(len(lambdap)-1, lp+R[name])) | ||
113 | + change = levelp-lp | ||
114 | + if change > 0: | ||
115 | + for i in range(lp+1,levelp+1): | ||
116 | + lambda2[i]=0 | ||
117 | + if change < 0: | ||
118 | + for i in range(levelp+1,lp+1): | ||
119 | + lambda2[i]=0 | ||
120 | + return (levelp, 0, tuple(lambda2)) | ||
121 | + else: | ||
122 | + return (lp, up, lambdap) | ||
123 | + | ||
124 | +## END ######################################################################## | ||
125 | +############################################################################### | ||
126 | + | ||
127 | + | ||
128 | +############################################################################### | ||
129 | +## MAIN ####################################################################### | ||
130 | +def andy2snakes(snk, entities, potential, obligatory): | ||
131 | + # compute maximal duration of activities | ||
132 | + D=0 | ||
133 | + for alpha in potential : D = max(D, alpha[3]) | ||
134 | + | ||
135 | + for alpha in obligatory : D = max(D, alpha[3]) | ||
136 | + | ||
137 | + n = snk.PetriNet('andy') | ||
138 | + | ||
139 | + n.globals["obligatory"] = obligatory | ||
140 | + n.globals["D"] = D | ||
141 | + n.globals["clockt"] = clockt | ||
142 | + n.globals["clockbetat"] = clockbetat | ||
143 | + n.globals["potentialt"] = potentialt | ||
144 | + | ||
145 | + ################# Places for entities | ||
146 | + for i in range(0,len(entities)): | ||
147 | + name=entities[i][0] | ||
148 | + level = entities[i][1] | ||
149 | + deltas = entities[i][2] | ||
150 | + vector = [0]*len(deltas) | ||
151 | + n.add_place(snk.Place(name, [(level,0, tuple(vector))])) | ||
152 | + | ||
153 | + ################# clock transition | ||
154 | + inputlist = dict() | ||
155 | + n.globals["inputlist"] = inputlist | ||
156 | + | ||
157 | + n.add_transition(snk.Transition('tc')) | ||
158 | + | ||
159 | + | ||
160 | + # connect all obligatory clocks | ||
161 | + for i in range(0,len(obligatory)): | ||
162 | + # transition name | ||
163 | + obname = 'ob'+str(i) | ||
164 | + # for every obligatory activity connect corresponding place to clock | ||
165 | + n.add_place(snk.Place('p'+obname, [0])) | ||
166 | + n.add_input('p'+obname, 'tc', Variable('w'+obname)) | ||
167 | + inputlist.update({obname:'w'+obname}) | ||
168 | + | ||
169 | + | ||
170 | + # all entities are connected | ||
171 | + for i in range(0,len(entities)): | ||
172 | + name=entities[i][0] | ||
173 | + deltas = entities[i][2] | ||
174 | + n.globals["deltas"+name] = deltas | ||
175 | + n.globals[name] = name | ||
176 | + n.add_input(name, 'tc', snk.Tuple([snk.Variable('l'+name), snk.Variable('u'+name), snk.Variable('lambda'+name) ])) | ||
177 | + inputlist.update({name:['l'+name, 'u'+name, 'lambda'+name ]}) | ||
178 | + | ||
179 | + | ||
180 | + | ||
181 | + for i in range(0,len(entities)): | ||
182 | + name=entities[i][0] | ||
183 | + n.add_output(name, 'tc', snk.Expression("clockt(obligatory,"+name+",l"+name+',u'+name+',lambda'+name+',deltas'+name+',inputlist,D)')) | ||
184 | + | ||
185 | + | ||
186 | + for i in range(0,len(obligatory)): | ||
187 | + obname = 'ob'+str(i) | ||
188 | + # for every obligatory activity connect corresponding place to clock | ||
189 | + n.add_output('p'+obname, 'tc', snk.Expression("clockbetat(obligatory,"+str(i)+',w'+obname+',inputlist,D)')) | ||
190 | + | ||
191 | + | ||
192 | + ## potential activities | ||
193 | + for i in range(0,len(potential)): | ||
194 | + # transition name | ||
195 | + trname = 'tr'+str(i) | ||
196 | + | ||
197 | + # for every potential activity connect corresponding place to clock | ||
198 | + n.add_place(snk.Place('p'+trname, [0])) | ||
199 | + n.add_input('p'+trname, 'tc', snk.Variable('w'+trname)) | ||
200 | + n.add_output('p'+trname, 'tc', snk.Expression('min(D,w'+trname+'+1)')) | ||
201 | + | ||
202 | + | ||
203 | + activators = potential[i][0] | ||
204 | + inhibitors = potential[i][1] | ||
205 | + results = potential[i][2] | ||
206 | + #print results | ||
207 | + n.globals["results"+trname] = results | ||
208 | + duration = potential[i][3] | ||
209 | + | ||
210 | + # compute entities involved in the activity | ||
211 | + nameactivators = activators.keys() | ||
212 | + nameinhib = inhibitors.keys() | ||
213 | + nameresults = results.keys() | ||
214 | + names = [] | ||
215 | + # check they appear only once | ||
216 | + for i in nameactivators : names.append(i) | ||
217 | + for i in nameinhib: | ||
218 | + if not (i in activators) : names.append(i) | ||
219 | + for i in nameresults: | ||
220 | + if not ( (i in activators) or (i in inhibitors)) : names.append(i) | ||
221 | + | ||
222 | + # compute guard of the activity | ||
223 | + # activity may be executed once every dur | ||
224 | + guard = 'w>='+str(duration) | ||
225 | + | ||
226 | + # activators | ||
227 | + for j in range(0,len(nameactivators)) : | ||
228 | + spec = nameactivators[j] | ||
229 | + level = str(activators[nameactivators[j]]) | ||
230 | + guard += ' and l'+spec+'>= '+ level + ' and lambda' +spec+'['+level+']>='+str(duration) | ||
231 | + | ||
232 | + # inhibitors | ||
233 | + for j in range(0,len(nameinhib)) : | ||
234 | + spec = nameinhib[j] | ||
235 | + level = str(inhibitors[nameinhib[j]]) | ||
236 | + guard += ' and l'+spec+'< '+ level + ' and lambda' +spec+'['+level+']>='+str(duration) | ||
237 | + | ||
238 | + n.add_transition(snk.Transition(trname, snk.Expression(guard))) | ||
239 | + n.add_input('p'+trname, trname, snk.Variable('w')) | ||
240 | + n.add_output('p'+trname, trname, snk.Expression('0')) | ||
241 | + | ||
242 | + # arcs of the transition from and to involved entities | ||
243 | + for j in range(0,len(names)) : | ||
244 | + n.add_input(names[j], trname, snk.Tuple([snk.Variable('l'+names[j]), snk.Variable('u'+names[j]), snk.Variable('lambda'+names[j]) ])) | ||
245 | + n.add_output(names[j], trname, snk.Expression("potentialt(" +names[j]+",l"+names[j]+',u'+names[j]+',lambda'+names[j]+', results'+trname+')')) | ||
246 | + | ||
247 | + return n | ||
248 | + | ||
249 | +######## depict Petri net | ||
250 | +def draw_net(net, out_name='repress'): | ||
251 | + net.draw(out_name+'.ps') | ||
252 | + | ||
253 | +def draw_stategraph(snk, net, entities_names, out_name='repressgraph', | ||
254 | + with_dot=True): | ||
255 | + def node_attr (state, graph, attr) : | ||
256 | + marking = graph[state] | ||
257 | + attr["label"] = ":".join( str(list(marking(s))[0][0]) | ||
258 | + for s in entities_names ) | ||
259 | + def edge_attr (trans, mode, attr) : | ||
260 | + attr["label"] = trans.name | ||
261 | + | ||
262 | + s = snk.StateGraph(net) | ||
263 | + s.build() | ||
264 | + | ||
265 | + s.draw(out_name+'.ps', node_attr=node_attr, edge_attr=edge_attr, | ||
266 | + engine='dot') | ||
267 | + | ||
268 | + if with_dot: | ||
269 | + g = s.draw(None, node_attr=node_attr, edge_attr=edge_attr, | ||
270 | + engine='dot') | ||
271 | + with open(out_name+".dot", "w") as out: | ||
272 | + out.write(g.dot()) | ||
273 | + g.render(out_name+"-layout.dot", engine="dot") | ||
274 | + | ||
275 | +if __name__=='__main__': | ||
276 | + import snakes.plugins | ||
277 | + snakes.plugins.load(['gv', 'ops'], 'snakes.nets', 'snk') | ||
278 | + | ||
279 | + # entities: tuple of name of the entities, initial level, tuple of decays 0 | ||
280 | + # denotes unbounded decay (omega) | ||
281 | + # examples: | ||
282 | + # entities = ( ('B',4, (0,2,2,2,3)), ('P',0, (0,0)), ('C',0, (0,0)), | ||
283 | + # ('G',0, (0,0)) ) | ||
284 | + # entities = ( ('Sugar',1, (0,2)), ('Aspartame',0, (0,2)), | ||
285 | + # ('Glycemia',2, (0,2,2,2)), ('Glucagon',0, (0,2)), | ||
286 | + # ('Insulin',0,(0,2,2)) ) | ||
287 | + | ||
288 | + entities = ( ('s1',0, (0,1)), ('s2',0, (0,1)), ('s3',0, (0,1)) ) | ||
289 | + | ||
290 | + # Activities: Tuple of (activators, inhibitors, results, duration) | ||
291 | + # activators, inhibitors are dictionaries of pairs | ||
292 | + # (entity, level) | ||
293 | + # results are dictionaries of pairs (entity, +z) | ||
294 | + | ||
295 | + # potential activities examples: | ||
296 | + # potential = ( (dict([('P',0)]),dict([('P',1)]),dict([('P',1)]),0), | ||
297 | + # (dict([('P',1)]),dict(),dict([('P',-1)]),0), | ||
298 | + # (dict([('C',0)]),dict([('C',1)]),dict([('C',1)]),0), | ||
299 | + # (dict([('C',1)]),dict(),dict([('C',-1)]),0), | ||
300 | + # (dict([('G',0)]),dict([('G',1)]),dict([('G',1)]),0), | ||
301 | + # (dict([('G',1)]),dict(),dict([('G',-1)]),0) ) | ||
302 | + # potential = ( (dict([('Sugar',1)]),dict(), | ||
303 | + # dict([('Insulin',1),('Glycemia',1)]),0), | ||
304 | + # (dict([('Aspartame',1)]),dict(),dict([('Insulin',1)]),0), | ||
305 | + # (dict(),dict([('Glycemia',1)]),dict([('Glucagon',1)]),0), | ||
306 | + # (dict([('Glycemia',3)]),dict(),dict([('Insulin',1)]),0), | ||
307 | + # (dict([('Insulin',2)]),dict(),dict([('Glycemia',-1)]),0), | ||
308 | + # (dict([('Insulin',1),('Glycemia',3)]), dict(), | ||
309 | + # dict([('Glycemia',-1)]),0), | ||
310 | + # (dict([('Insulin',1)]),dict([('Glycemia',2)]), | ||
311 | + # dict([('Glycemia',-1)]),0), | ||
312 | + # (dict([('Glucagon',1)]),dict(),dict([('Glycemia',+1)]),0) | ||
313 | + # ) | ||
314 | + | ||
315 | + potential = ( (dict(), dict([('s1',1)]), dict([('s2',1)]), 1), | ||
316 | + (dict(), dict([('s2',1)]), dict([('s3',1)]), 1), | ||
317 | + (dict(), dict([('s3',1)]), dict([('s1',1)]), 1) ) | ||
318 | + | ||
319 | + # obligatory activities examples: | ||
320 | + # obligatory = ( (dict([('P',1)]),dict(),dict([('B',1)]),1), | ||
321 | + # (dict([('C',1)]),dict(),dict([('B',-1)]),3), | ||
322 | + # (dict([('G',1)]),dict(),dict([('B',-2)]),3)) | ||
323 | + | ||
324 | + obligatory = () | ||
325 | + | ||
326 | + net = andy2snakes(snk, entities, potential, obligatory) | ||
327 | + draw_net(net, out_name="repress") | ||
328 | + draw_stategraph(snk, net, ("s1", "s2", "s3"), out_name="repressgraph") | ||
329 | + |
snakes/utils/andy/main.py
0 → 100644
1 | +import sys, optparse, os.path, webbrowser | ||
2 | +import pdb, traceback | ||
3 | +import snakes.plugins | ||
4 | +from snakes.utils.andy import CompilationError, DeclarationError | ||
5 | +from snakes.utils.andy.simul import Simulator, AndySimulator | ||
6 | +from snakes.utils.andy.andy import andy2snakes | ||
7 | +from snakes.utils.simul.html import json | ||
8 | + | ||
9 | +## | ||
10 | +## error messages | ||
11 | +## | ||
12 | + | ||
13 | +options = None | ||
14 | + | ||
15 | +ERR_ARG = 1 | ||
16 | +ERR_OPT = 2 | ||
17 | +ERR_IO = 3 | ||
18 | +ERR_PARSE = 4 | ||
19 | +ERR_PLUGIN = 5 | ||
20 | +ERR_COMPILE = 6 | ||
21 | +ERR_OUTPUT = 7 | ||
22 | +ERR_BUG = 255 | ||
23 | + | ||
24 | +def log (message) : | ||
25 | + sys.stdout.write("andy: %s\n" % message.strip()) | ||
26 | + sys.stdout.flush() | ||
27 | + | ||
28 | +def err (message) : | ||
29 | + sys.stderr.write("andy: %s\n" % message.strip()) | ||
30 | + sys.stderr.flush() | ||
31 | + | ||
32 | +def die (code, message=None) : | ||
33 | + global options | ||
34 | + if message : | ||
35 | + err(message) | ||
36 | + if options.debug : | ||
37 | + pdb.post_mortem(sys.exc_info()[2]) | ||
38 | + else : | ||
39 | + sys.exit(code) | ||
40 | + | ||
41 | +def bug () : | ||
42 | + global options | ||
43 | + sys.stderr.write(""" | ||
44 | + ******************************************************************** | ||
45 | + *** An unexpected error ocurred. Please report this bug to *** | ||
46 | + *** <franck.pommereau@gmail.com>, together with the execution *** | ||
47 | + *** trace below and, if possible, a stripped-down version of the *** | ||
48 | + *** ABCD source code that caused this bug. Thank you for your *** | ||
49 | + *** help in improving SNAKES! *** | ||
50 | + ******************************************************************** | ||
51 | + | ||
52 | +""") | ||
53 | + traceback.print_exc() | ||
54 | + if options.debug : | ||
55 | + pdb.post_mortem(sys.exc_info()[2]) | ||
56 | + else : | ||
57 | + sys.exit(ERR_BUG) | ||
58 | + | ||
59 | +## | ||
60 | +## options parsing | ||
61 | +## | ||
62 | + | ||
63 | +gv_engines = ("dot", "neato", "twopi", "circo", "fdp") | ||
64 | + | ||
65 | +opt = optparse.OptionParser(prog="andy", | ||
66 | + usage="%prog [OPTION]... FILE") | ||
67 | +opt.add_option("-l", "--load", | ||
68 | + dest="plugins", action="append", default=[], | ||
69 | + help="load plugin (this option can be repeated)", | ||
70 | + metavar="PLUGIN") | ||
71 | +opt.add_option("-p", "--pnml", | ||
72 | + dest="pnml", action="store", default=None, | ||
73 | + help="save net as PNML", | ||
74 | + metavar="OUTFILE") | ||
75 | +for engine in gv_engines : | ||
76 | + opt.add_option("-" + engine[0], "--" + engine, | ||
77 | + dest="gv" + engine, action="store", default=None, | ||
78 | + help="draw net using '%s' (from GraphViz)" % engine, | ||
79 | + metavar="OUTFILE") | ||
80 | +opt.add_option("--debug", | ||
81 | + dest="debug", action="store_true", default=False, | ||
82 | + help="launch debugger on compiler error (default: no)") | ||
83 | +opt.add_option("-s", "--simul", | ||
84 | + dest="simul", action="store_true", default=False, | ||
85 | + help="launch interactive code simulator") | ||
86 | +opt.add_option("--headless", | ||
87 | + dest="headless", action="store", default=None, | ||
88 | + help="headless code simulator, with saved parameters", | ||
89 | + metavar="JSONFILE") | ||
90 | +opt.add_option("--port", | ||
91 | + dest="port", action="store", default=8000, type=int, | ||
92 | + help="port on which the simulator server runs", | ||
93 | + metavar="PORT") | ||
94 | + | ||
95 | +def getopts (args) : | ||
96 | + global options, andy, tmp | ||
97 | + (options, args) = opt.parse_args(args) | ||
98 | + plugins = [] | ||
99 | + for p in options.plugins : | ||
100 | + plugins.extend(t.strip() for t in p.split(",")) | ||
101 | + if "labels" not in plugins : | ||
102 | + plugins.append("labels") | ||
103 | + for engine in gv_engines : | ||
104 | + gvopt = getattr(options, "gv%s" % engine) | ||
105 | + if gvopt and "gv" not in plugins : | ||
106 | + plugins.append("gv") | ||
107 | + break | ||
108 | + if (options.simul) and "gv" not in plugins : | ||
109 | + plugins.append("gv") | ||
110 | + options.plugins = plugins | ||
111 | + if len(args) < 1 : | ||
112 | + err("no input file provided") | ||
113 | + opt.print_help() | ||
114 | + die(ERR_ARG) | ||
115 | + elif len(args) > 1 : | ||
116 | + err("more than one input file provided") | ||
117 | + opt.print_help() | ||
118 | + die(ERR_ARG) | ||
119 | + andy = args[0] | ||
120 | + if options.pnml == andy : | ||
121 | + err("input file also used as output (--pnml)") | ||
122 | + opt.print_help() | ||
123 | + die(ERR_ARG) | ||
124 | + for engine in gv_engines : | ||
125 | + if getattr(options, "gv%s" % engine) == andy : | ||
126 | + err("input file also used as output (--%s)" % engine) | ||
127 | + opt.print_help() | ||
128 | + die(ERR_ARG) | ||
129 | + | ||
130 | +## | ||
131 | +## drawing nets | ||
132 | +## | ||
133 | + | ||
134 | +def draw (net, target, engine="dot") : | ||
135 | + try : | ||
136 | + return net.draw(target, engine=engine) | ||
137 | + except : | ||
138 | + die(ERR_OUTPUT, str(sys.exc_info()[1])) | ||
139 | + | ||
140 | +## | ||
141 | +## save pnml | ||
142 | +## | ||
143 | + | ||
144 | +def save_pnml (net, target) : | ||
145 | + try : | ||
146 | + out = open(target, "w") | ||
147 | + out.write(snk.dumps(net)) | ||
148 | + out.close() | ||
149 | + except : | ||
150 | + die(ERR_OUTPUT, str(sys.exc_info()[1])) | ||
151 | + | ||
152 | +## | ||
153 | +## simulator (not standalone) | ||
154 | +## | ||
155 | + | ||
156 | +def simulate (entities, potential, obligatory, filename='<string>') : | ||
157 | + global options, snk | ||
158 | + getopts(["--simul", filename]) | ||
159 | + snk = snakes.plugins.load(options.plugins, "snakes.nets", "snk") | ||
160 | + net = andy2snakes(snk, entities, potential, obligatory) | ||
161 | + net.label(srcfile=filename, snakes=snk) | ||
162 | + return AndySimulator(net) | ||
163 | + | ||
164 | +## | ||
165 | +## main | ||
166 | +## | ||
167 | + | ||
168 | +def main (args=sys.argv[1:]) : | ||
169 | + global options, snk | ||
170 | + # get options | ||
171 | + try: | ||
172 | + getopts(args) | ||
173 | + except SystemExit : | ||
174 | + raise | ||
175 | + except : | ||
176 | + die(ERR_OPT, str(sys.exc_info()[1])) | ||
177 | + # read andy spec | ||
178 | + try: | ||
179 | + env = {} | ||
180 | + execfile(andy, env) | ||
181 | + del env['__builtins__'] | ||
182 | + except: | ||
183 | + die(ERR_IO, "could not read input file %r" % andy) | ||
184 | + # compile to net | ||
185 | + dirname = os.path.dirname(andy) | ||
186 | + if dirname and dirname not in sys.path : | ||
187 | + sys.path.append(dirname) | ||
188 | + elif "." not in sys.path : | ||
189 | + sys.path.append(".") | ||
190 | + try : | ||
191 | + snk = snakes.plugins.load(options.plugins, "snakes.nets", "snk") | ||
192 | + except : | ||
193 | + die(ERR_PLUGIN, str(sys.exc_info()[1])) | ||
194 | + | ||
195 | + try: | ||
196 | + net = andy2snakes(snk, env['entities'], env['potential'], | ||
197 | + env['obligatory']) | ||
198 | + except: | ||
199 | + bug() | ||
200 | + | ||
201 | + # output | ||
202 | + if options.pnml : | ||
203 | + save_pnml(net, options.pnml) | ||
204 | + for engine in gv_engines : | ||
205 | + target = getattr(options, "gv%s" % engine) | ||
206 | + if target : | ||
207 | + draw(net, target, engine) | ||
208 | + trace, lineno = [], None | ||
209 | + if options.simul : | ||
210 | + try : | ||
211 | + simul = Simulator(net, options.port) | ||
212 | + except : | ||
213 | + bug() | ||
214 | + simul.start() | ||
215 | + if options.headless : | ||
216 | + with open(options.headless, "w") as out : | ||
217 | + out.write(json({"res" : "%sr" % simul.url, | ||
218 | + "url" : simul.url, | ||
219 | + "key" : simul.server.httpd.key, | ||
220 | + "host" : "127.0.0.1", | ||
221 | + "port" : simul.port})) | ||
222 | + else : | ||
223 | + webbrowser.open(simul.url) | ||
224 | + simul.wait() | ||
225 | + elif trace : | ||
226 | + if lineno is None : | ||
227 | + print("unsafe execution:") | ||
228 | + else : | ||
229 | + asserts = dict((a.lineno, a) for a in net.label("asserts")) | ||
230 | + print("line %s, %r failed:" | ||
231 | + % (lineno, asserts[lineno].st.source())) | ||
232 | + for trans, mode in trace : | ||
233 | + print(" %s %s" % (trans, mode)) | ||
234 | + return net | ||
235 | + | ||
236 | +if __name__ == "__main__" : | ||
237 | + main() |
1 | +/*! | ||
2 | + * Bootstrap v3.1.1 (http://getbootstrap.com) | ||
3 | + * Copyright 2011-2014 Twitter, Inc. | ||
4 | + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
5 | + */ | ||
6 | + | ||
7 | +.btn-default, | ||
8 | +.btn-primary, | ||
9 | +.btn-success, | ||
10 | +.btn-info, | ||
11 | +.btn-warning, | ||
12 | +.btn-danger { | ||
13 | + text-shadow: 0 -1px 0 rgba(0, 0, 0, .2); | ||
14 | + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); | ||
15 | + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075); | ||
16 | +} | ||
17 | +.btn-default:active, | ||
18 | +.btn-primary:active, | ||
19 | +.btn-success:active, | ||
20 | +.btn-info:active, | ||
21 | +.btn-warning:active, | ||
22 | +.btn-danger:active, | ||
23 | +.btn-default.active, | ||
24 | +.btn-primary.active, | ||
25 | +.btn-success.active, | ||
26 | +.btn-info.active, | ||
27 | +.btn-warning.active, | ||
28 | +.btn-danger.active { | ||
29 | + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); | ||
30 | + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); | ||
31 | +} | ||
32 | +.btn:active, | ||
33 | +.btn.active { | ||
34 | + background-image: none; | ||
35 | +} | ||
36 | +.btn-default { | ||
37 | + text-shadow: 0 1px 0 #fff; | ||
38 | + background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%); | ||
39 | + background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%); | ||
40 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0); | ||
41 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | ||
42 | + background-repeat: repeat-x; | ||
43 | + border-color: #dbdbdb; | ||
44 | + border-color: #ccc; | ||
45 | +} | ||
46 | +.btn-default:hover, | ||
47 | +.btn-default:focus { | ||
48 | + background-color: #e0e0e0; | ||
49 | + background-position: 0 -15px; | ||
50 | +} | ||
51 | +.btn-default:active, | ||
52 | +.btn-default.active { | ||
53 | + background-color: #e0e0e0; | ||
54 | + border-color: #dbdbdb; | ||
55 | +} | ||
56 | +.btn-primary { | ||
57 | + background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%); | ||
58 | + background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%); | ||
59 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0); | ||
60 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | ||
61 | + background-repeat: repeat-x; | ||
62 | + border-color: #2b669a; | ||
63 | +} | ||
64 | +.btn-primary:hover, | ||
65 | +.btn-primary:focus { | ||
66 | + background-color: #2d6ca2; | ||
67 | + background-position: 0 -15px; | ||
68 | +} | ||
69 | +.btn-primary:active, | ||
70 | +.btn-primary.active { | ||
71 | + background-color: #2d6ca2; | ||
72 | + border-color: #2b669a; | ||
73 | +} | ||
74 | +.btn-success { | ||
75 | + background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%); | ||
76 | + background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%); | ||
77 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0); | ||
78 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | ||
79 | + background-repeat: repeat-x; | ||
80 | + border-color: #3e8f3e; | ||
81 | +} | ||
82 | +.btn-success:hover, | ||
83 | +.btn-success:focus { | ||
84 | + background-color: #419641; | ||
85 | + background-position: 0 -15px; | ||
86 | +} | ||
87 | +.btn-success:active, | ||
88 | +.btn-success.active { | ||
89 | + background-color: #419641; | ||
90 | + border-color: #3e8f3e; | ||
91 | +} | ||
92 | +.btn-info { | ||
93 | + background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%); | ||
94 | + background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%); | ||
95 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0); | ||
96 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | ||
97 | + background-repeat: repeat-x; | ||
98 | + border-color: #28a4c9; | ||
99 | +} | ||
100 | +.btn-info:hover, | ||
101 | +.btn-info:focus { | ||
102 | + background-color: #2aabd2; | ||
103 | + background-position: 0 -15px; | ||
104 | +} | ||
105 | +.btn-info:active, | ||
106 | +.btn-info.active { | ||
107 | + background-color: #2aabd2; | ||
108 | + border-color: #28a4c9; | ||
109 | +} | ||
110 | +.btn-warning { | ||
111 | + background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%); | ||
112 | + background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%); | ||
113 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0); | ||
114 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | ||
115 | + background-repeat: repeat-x; | ||
116 | + border-color: #e38d13; | ||
117 | +} | ||
118 | +.btn-warning:hover, | ||
119 | +.btn-warning:focus { | ||
120 | + background-color: #eb9316; | ||
121 | + background-position: 0 -15px; | ||
122 | +} | ||
123 | +.btn-warning:active, | ||
124 | +.btn-warning.active { | ||
125 | + background-color: #eb9316; | ||
126 | + border-color: #e38d13; | ||
127 | +} | ||
128 | +.btn-danger { | ||
129 | + background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%); | ||
130 | + background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%); | ||
131 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0); | ||
132 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | ||
133 | + background-repeat: repeat-x; | ||
134 | + border-color: #b92c28; | ||
135 | +} | ||
136 | +.btn-danger:hover, | ||
137 | +.btn-danger:focus { | ||
138 | + background-color: #c12e2a; | ||
139 | + background-position: 0 -15px; | ||
140 | +} | ||
141 | +.btn-danger:active, | ||
142 | +.btn-danger.active { | ||
143 | + background-color: #c12e2a; | ||
144 | + border-color: #b92c28; | ||
145 | +} | ||
146 | +.thumbnail, | ||
147 | +.img-thumbnail { | ||
148 | + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | ||
149 | + box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | ||
150 | +} | ||
151 | +.dropdown-menu > li > a:hover, | ||
152 | +.dropdown-menu > li > a:focus { | ||
153 | + background-color: #e8e8e8; | ||
154 | + background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); | ||
155 | + background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); | ||
156 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); | ||
157 | + background-repeat: repeat-x; | ||
158 | +} | ||
159 | +.dropdown-menu > .active > a, | ||
160 | +.dropdown-menu > .active > a:hover, | ||
161 | +.dropdown-menu > .active > a:focus { | ||
162 | + background-color: #357ebd; | ||
163 | + background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); | ||
164 | + background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); | ||
165 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); | ||
166 | + background-repeat: repeat-x; | ||
167 | +} | ||
168 | +.navbar-default { | ||
169 | + background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%); | ||
170 | + background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%); | ||
171 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0); | ||
172 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | ||
173 | + background-repeat: repeat-x; | ||
174 | + border-radius: 4px; | ||
175 | + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); | ||
176 | + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075); | ||
177 | +} | ||
178 | +.navbar-default .navbar-nav > .active > a { | ||
179 | + background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%); | ||
180 | + background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%); | ||
181 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0); | ||
182 | + background-repeat: repeat-x; | ||
183 | + -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); | ||
184 | + box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075); | ||
185 | +} | ||
186 | +.navbar-brand, | ||
187 | +.navbar-nav > li > a { | ||
188 | + text-shadow: 0 1px 0 rgba(255, 255, 255, .25); | ||
189 | +} | ||
190 | +.navbar-inverse { | ||
191 | + background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%); | ||
192 | + background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%); | ||
193 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0); | ||
194 | + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); | ||
195 | + background-repeat: repeat-x; | ||
196 | +} | ||
197 | +.navbar-inverse .navbar-nav > .active > a { | ||
198 | + background-image: -webkit-linear-gradient(top, #222 0%, #282828 100%); | ||
199 | + background-image: linear-gradient(to bottom, #222 0%, #282828 100%); | ||
200 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0); | ||
201 | + background-repeat: repeat-x; | ||
202 | + -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); | ||
203 | + box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25); | ||
204 | +} | ||
205 | +.navbar-inverse .navbar-brand, | ||
206 | +.navbar-inverse .navbar-nav > li > a { | ||
207 | + text-shadow: 0 -1px 0 rgba(0, 0, 0, .25); | ||
208 | +} | ||
209 | +.navbar-static-top, | ||
210 | +.navbar-fixed-top, | ||
211 | +.navbar-fixed-bottom { | ||
212 | + border-radius: 0; | ||
213 | +} | ||
214 | +.alert { | ||
215 | + text-shadow: 0 1px 0 rgba(255, 255, 255, .2); | ||
216 | + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); | ||
217 | + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05); | ||
218 | +} | ||
219 | +.alert-success { | ||
220 | + background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%); | ||
221 | + background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%); | ||
222 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0); | ||
223 | + background-repeat: repeat-x; | ||
224 | + border-color: #b2dba1; | ||
225 | +} | ||
226 | +.alert-info { | ||
227 | + background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%); | ||
228 | + background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%); | ||
229 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0); | ||
230 | + background-repeat: repeat-x; | ||
231 | + border-color: #9acfea; | ||
232 | +} | ||
233 | +.alert-warning { | ||
234 | + background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%); | ||
235 | + background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%); | ||
236 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0); | ||
237 | + background-repeat: repeat-x; | ||
238 | + border-color: #f5e79e; | ||
239 | +} | ||
240 | +.alert-danger { | ||
241 | + background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%); | ||
242 | + background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%); | ||
243 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0); | ||
244 | + background-repeat: repeat-x; | ||
245 | + border-color: #dca7a7; | ||
246 | +} | ||
247 | +.progress { | ||
248 | + background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%); | ||
249 | + background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%); | ||
250 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0); | ||
251 | + background-repeat: repeat-x; | ||
252 | +} | ||
253 | +.progress-bar { | ||
254 | + background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%); | ||
255 | + background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%); | ||
256 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0); | ||
257 | + background-repeat: repeat-x; | ||
258 | +} | ||
259 | +.progress-bar-success { | ||
260 | + background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%); | ||
261 | + background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%); | ||
262 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0); | ||
263 | + background-repeat: repeat-x; | ||
264 | +} | ||
265 | +.progress-bar-info { | ||
266 | + background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%); | ||
267 | + background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%); | ||
268 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0); | ||
269 | + background-repeat: repeat-x; | ||
270 | +} | ||
271 | +.progress-bar-warning { | ||
272 | + background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%); | ||
273 | + background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%); | ||
274 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0); | ||
275 | + background-repeat: repeat-x; | ||
276 | +} | ||
277 | +.progress-bar-danger { | ||
278 | + background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%); | ||
279 | + background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%); | ||
280 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0); | ||
281 | + background-repeat: repeat-x; | ||
282 | +} | ||
283 | +.list-group { | ||
284 | + border-radius: 4px; | ||
285 | + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | ||
286 | + box-shadow: 0 1px 2px rgba(0, 0, 0, .075); | ||
287 | +} | ||
288 | +.list-group-item.active, | ||
289 | +.list-group-item.active:hover, | ||
290 | +.list-group-item.active:focus { | ||
291 | + text-shadow: 0 -1px 0 #3071a9; | ||
292 | + background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%); | ||
293 | + background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%); | ||
294 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0); | ||
295 | + background-repeat: repeat-x; | ||
296 | + border-color: #3278b3; | ||
297 | +} | ||
298 | +.panel { | ||
299 | + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05); | ||
300 | + box-shadow: 0 1px 2px rgba(0, 0, 0, .05); | ||
301 | +} | ||
302 | +.panel-default > .panel-heading { | ||
303 | + background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%); | ||
304 | + background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%); | ||
305 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0); | ||
306 | + background-repeat: repeat-x; | ||
307 | +} | ||
308 | +.panel-primary > .panel-heading { | ||
309 | + background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%); | ||
310 | + background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); | ||
311 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); | ||
312 | + background-repeat: repeat-x; | ||
313 | +} | ||
314 | +.panel-success > .panel-heading { | ||
315 | + background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%); | ||
316 | + background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%); | ||
317 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0); | ||
318 | + background-repeat: repeat-x; | ||
319 | +} | ||
320 | +.panel-info > .panel-heading { | ||
321 | + background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%); | ||
322 | + background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%); | ||
323 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0); | ||
324 | + background-repeat: repeat-x; | ||
325 | +} | ||
326 | +.panel-warning > .panel-heading { | ||
327 | + background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%); | ||
328 | + background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%); | ||
329 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0); | ||
330 | + background-repeat: repeat-x; | ||
331 | +} | ||
332 | +.panel-danger > .panel-heading { | ||
333 | + background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%); | ||
334 | + background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%); | ||
335 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0); | ||
336 | + background-repeat: repeat-x; | ||
337 | +} | ||
338 | +.well { | ||
339 | + background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%); | ||
340 | + background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%); | ||
341 | + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0); | ||
342 | + background-repeat: repeat-x; | ||
343 | + border-color: #dcdcdc; | ||
344 | + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); | ||
345 | + box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1); | ||
346 | +} | ||
347 | +/*# sourceMappingURL=bootstrap-theme.css.map */ |
1 | +{"version":3,"sources":["less/theme.less","less/mixins.less"],"names":[],"mappings":"AAeA;AACA;AACA;AACA;AACA;AACA;EACE,wCAAA;ECoGA,2FAAA;EACQ,mFAAA;;ADhGR,YAAC;AAAD,YAAC;AAAD,YAAC;AAAD,SAAC;AAAD,YAAC;AAAD,WAAC;AACD,YAAC;AAAD,YAAC;AAAD,YAAC;AAAD,SAAC;AAAD,YAAC;AAAD,WAAC;EC8FD,wDAAA;EACQ,gDAAA;;ADnER,IAAC;AACD,IAAC;EACC,sBAAA;;AAKJ;EC4PI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EAEA,sHAAA;EAoCF,mEAAA;ED7TA,2BAAA;EACA,qBAAA;EAyB2C,yBAAA;EAA2B,kBAAA;;AAvBtE,YAAC;AACD,YAAC;EACC,yBAAA;EACA,4BAAA;;AAGF,YAAC;AACD,YAAC;EACC,yBAAA;EACA,qBAAA;;AAeJ;EC2PI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EAEA,sHAAA;EAoCF,mEAAA;ED7TA,2BAAA;EACA,qBAAA;;AAEA,YAAC;AACD,YAAC;EACC,yBAAA;EACA,4BAAA;;AAGF,YAAC;AACD,YAAC;EACC,yBAAA;EACA,qBAAA;;AAgBJ;EC0PI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EAEA,sHAAA;EAoCF,mEAAA;ED7TA,2BAAA;EACA,qBAAA;;AAEA,YAAC;AACD,YAAC;EACC,yBAAA;EACA,4BAAA;;AAGF,YAAC;AACD,YAAC;EACC,yBAAA;EACA,qBAAA;;AAiBJ;ECyPI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EAEA,sHAAA;EAoCF,mEAAA;ED7TA,2BAAA;EACA,qBAAA;;AAEA,SAAC;AACD,SAAC;EACC,yBAAA;EACA,4BAAA;;AAGF,SAAC;AACD,SAAC;EACC,yBAAA;EACA,qBAAA;;AAkBJ;ECwPI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EAEA,sHAAA;EAoCF,mEAAA;ED7TA,2BAAA;EACA,qBAAA;;AAEA,YAAC;AACD,YAAC;EACC,yBAAA;EACA,4BAAA;;AAGF,YAAC;AACD,YAAC;EACC,yBAAA;EACA,qBAAA;;AAmBJ;ECuPI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EAEA,sHAAA;EAoCF,mEAAA;ED7TA,2BAAA;EACA,qBAAA;;AAEA,WAAC;AACD,WAAC;EACC,yBAAA;EACA,4BAAA;;AAGF,WAAC;AACD,WAAC;EACC,yBAAA;EACA,qBAAA;;AA2BJ;AACA;EC6CE,kDAAA;EACQ,0CAAA;;ADpCV,cAAe,KAAK,IAAG;AACvB,cAAe,KAAK,IAAG;ECmOnB,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;EDpOF,yBAAA;;AAEF,cAAe,UAAU;AACzB,cAAe,UAAU,IAAG;AAC5B,cAAe,UAAU,IAAG;EC6NxB,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;ED9NF,yBAAA;;AAUF;ECiNI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;EAoCF,mEAAA;EDrPA,kBAAA;ECaA,2FAAA;EACQ,mFAAA;;ADjBV,eAOE,YAAY,UAAU;EC0MpB,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;EApMF,wDAAA;EACQ,gDAAA;;ADLV;AACA,WAAY,KAAK;EACf,8CAAA;;AAIF;EC+LI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;EAoCF,mEAAA;;ADtOF,eAIE,YAAY,UAAU;EC2LpB,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;EApMF,uDAAA;EACQ,+CAAA;;ADCV,eASE;AATF,eAUE,YAAY,KAAK;EACf,yCAAA;;AAKJ;AACA;AACA;EACE,gBAAA;;AAUF;EACE,6CAAA;EChCA,0FAAA;EACQ,kFAAA;;AD2CV;ECqJI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;ED5JF,qBAAA;;AAKF;ECoJI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;ED5JF,qBAAA;;AAMF;ECmJI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;ED5JF,qBAAA;;AAOF;ECkJI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;ED5JF,qBAAA;;AAgBF;ECyII,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;ADlIJ;EC+HI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;ADjIJ;EC8HI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;ADhIJ;EC6HI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;AD/HJ;EC4HI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;AD9HJ;EC2HI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;ADtHJ;EACE,kBAAA;EC/EA,kDAAA;EACQ,0CAAA;;ADiFV,gBAAgB;AAChB,gBAAgB,OAAO;AACvB,gBAAgB,OAAO;EACrB,6BAAA;EC4GE,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;ED7GF,qBAAA;;AAUF;ECjGE,iDAAA;EACQ,yCAAA;;AD0GV,cAAe;ECsFX,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;ADxFJ,cAAe;ECqFX,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;ADvFJ,cAAe;ECoFX,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;ADtFJ,WAAY;ECmFR,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;ADrFJ,cAAe;ECkFX,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;ADpFJ,aAAc;ECiFV,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;;AD5EJ;ECyEI,kBAAkB,sDAAlB;EACA,kBAAkB,oDAAlB;EACA,2BAAA;EACA,sHAAA;ED1EF,qBAAA;EC1HA,yFAAA;EACQ,iFAAA","sourcesContent":["\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-bg, 5%); @end-color: darken(@navbar-default-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-bg; @end-color: lighten(@navbar-inverse-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n}\n\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","//\n// Mixins\n// --------------------------------------------------\n\n\n// Utilities\n// -------------------------\n\n// Clearfix\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n// contenteditable attribute is included anywhere else in the document.\n// Otherwise it causes space to appear at the top and bottom of elements\n// that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n// `:before` to contain the top-margins of child elements.\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n\n// WebKit-style focus\n.tab-focus() {\n // Default\n outline: thin dotted;\n // WebKit\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n\n// Center-align a block level element\n.center-block() {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n\n// Sizing shortcuts\n.size(@width; @height) {\n width: @width;\n height: @height;\n}\n.square(@size) {\n .size(@size; @size);\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n &::-moz-placeholder { color: @color; // Firefox\n opacity: 1; } // See https://github.com/twbs/bootstrap/pull/11526\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Text overflow\n// Requires inline-block or block for proper styling\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n// CSS image replacement\n//\n// Heads up! v3 launched with with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. Note\n// that we cannot chain the mixins together in Less, so they are repeated.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (will be removed in v4)\n.hide-text() {\n font: ~\"0/0\" a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n// New mixin to use as of v3.0.1\n.text-hide() {\n .hide-text();\n}\n\n\n\n// CSS3 PROPERTIES\n// --------------------------------------------------\n\n// Single side border-radius\n.border-top-radius(@radius) {\n border-top-right-radius: @radius;\n border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n border-bottom-left-radius: @radius;\n border-top-left-radius: @radius;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support the\n// standard `box-shadow` property.\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Transitions\n.transition(@transition) {\n -webkit-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n// Transformations\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n transform: rotate(@degrees);\n}\n.scale(@ratio; @ratio-y...) {\n -webkit-transform: scale(@ratio, @ratio-y);\n -ms-transform: scale(@ratio, @ratio-y); // IE9 only\n transform: scale(@ratio, @ratio-y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n transform: translate(@x, @y);\n}\n.skew(@x; @y) {\n -webkit-transform: skew(@x, @y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n transform: skew(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n.backface-visibility(@visibility){\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// User select\n// For selecting text on the page\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n\n// Resize anything\n.resizable(@direction) {\n resize: @direction; // Options: horizontal, vertical, both\n overflow: auto; // Safari fix\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Opacity\n.opacity(@opacity) {\n opacity: @opacity;\n // IE8 filter\n @opacity-ie: (@opacity * 100);\n filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n\n\n\n// GRADIENTS\n// --------------------------------------------------\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, color-stop(@start-color @start-percent), color-stop(@end-color @end-percent)); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n\n// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n\n\n\n// Retina images\n//\n// Short retina mixin for setting background-image and -size\n\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// COMPONENT MIXINS\n// --------------------------------------------------\n\n// Horizontal dividers\n// -------------------------\n// Dividers (basically an hr) within dropdowns and nav lists\n.nav-divider(@color: #e5e5e5) {\n height: 1px;\n margin: ((@line-height-computed / 2) - 1) 0;\n overflow: hidden;\n background-color: @color;\n}\n\n// Panels\n// -------------------------\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n border-color: @border;\n\n & > .panel-heading {\n color: @heading-text-color;\n background-color: @heading-bg-color;\n border-color: @heading-border;\n\n + .panel-collapse .panel-body {\n border-top-color: @border;\n }\n }\n & > .panel-footer {\n + .panel-collapse .panel-body {\n border-bottom-color: @border;\n }\n }\n}\n\n// Alerts\n// -------------------------\n.alert-variant(@background; @border; @text-color) {\n background-color: @background;\n border-color: @border;\n color: @text-color;\n\n hr {\n border-top-color: darken(@border, 5%);\n }\n .alert-link {\n color: darken(@text-color, 10%);\n }\n}\n\n// Tables\n// -------------------------\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n\n// List Groups\n// -------------------------\n.list-group-item-variant(@state; @background; @color) {\n .list-group-item-@{state} {\n color: @color;\n background-color: @background;\n\n a& {\n color: @color;\n\n .list-group-item-heading { color: inherit; }\n\n &:hover,\n &:focus {\n color: @color;\n background-color: darken(@background, 5%);\n }\n &.active,\n &.active:hover,\n &.active:focus {\n color: #fff;\n background-color: @color;\n border-color: @color;\n }\n }\n }\n}\n\n// Button variants\n// -------------------------\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n.button-variant(@color; @background; @border) {\n color: @color;\n background-color: @background;\n border-color: @border;\n\n &:hover,\n &:focus,\n &:active,\n &.active,\n .open .dropdown-toggle& {\n color: @color;\n background-color: darken(@background, 8%);\n border-color: darken(@border, 12%);\n }\n &:active,\n &.active,\n .open .dropdown-toggle& {\n background-image: none;\n }\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: @background;\n border-color: @border;\n }\n }\n\n .badge {\n color: @background;\n background-color: @color;\n }\n}\n\n// Button sizes\n// -------------------------\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n}\n\n// Pagination\n// -------------------------\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) {\n > li {\n > a,\n > span {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n }\n &:first-child {\n > a,\n > span {\n .border-left-radius(@border-radius);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius);\n }\n }\n }\n}\n\n// Labels\n// -------------------------\n.label-variant(@color) {\n background-color: @color;\n &[href] {\n &:hover,\n &:focus {\n background-color: darken(@color, 10%);\n }\n }\n}\n\n// Contextual backgrounds\n// -------------------------\n.bg-variant(@color) {\n background-color: @color;\n a&:hover {\n background-color: darken(@color, 10%);\n }\n}\n\n// Typography\n// -------------------------\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover {\n color: darken(@color, 10%);\n }\n}\n\n// Navbar vertical align\n// -------------------------\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n.navbar-vertical-align(@element-height) {\n margin-top: ((@navbar-height - @element-height) / 2);\n margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n\n// Progress bars\n// -------------------------\n.progress-bar-variant(@color) {\n background-color: @color;\n .progress-striped & {\n #gradient > .striped();\n }\n}\n\n// Responsive utilities\n// -------------------------\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n display: block !important;\n table& { display: table; }\n tr& { display: table-row !important; }\n th&,\n td& { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n display: none !important;\n}\n\n\n// Grid System\n// -----------\n\n// Centered container element\n.container-fixed() {\n margin-right: auto;\n margin-left: auto;\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: (@gutter / -2);\n margin-right: (@gutter / -2);\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n @media (min-width: @screen-xs-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-xs-column-push(@columns) {\n @media (min-width: @screen-xs-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-xs-column-pull(@columns) {\n @media (min-width: @screen-xs-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) when (@index = 1) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) when (@index = 1) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n\n// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and successes.\n\n.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {\n // Color the label and help text\n .help-block,\n .control-label,\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline {\n color: @text-color;\n }\n // Set the border and box shadow on specific inputs to match\n .form-control {\n border-color: @border-color;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work\n &:focus {\n border-color: darken(@border-color, 10%);\n @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);\n .box-shadow(@shadow);\n }\n }\n // Set validation states also for addons\n .input-group-addon {\n color: @text-color;\n border-color: @border-color;\n background-color: @background-color;\n }\n // Optional feedback icon\n .form-control-feedback {\n color: @text-color;\n }\n}\n\n// Form control focus state\n//\n// Generate a customized focus state and for any input with the specified color,\n// which defaults to the `@input-focus-border` variable.\n//\n// We highly encourage you to not customize the default value, but instead use\n// this to tweak colors on an as-needed basis. This aesthetic change is based on\n// WebKit's default styles, but applicable to a wider range of browsers. Its\n// usability and accessibility should be taken into account with any change.\n//\n// Example usage: change the default blue border and shadow to white for better\n// contrast against a dark gray background.\n\n.form-control-focus(@color: @input-border-focus) {\n @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);\n &:focus {\n border-color: @color;\n outline: 0;\n .box-shadow(~\"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}\");\n }\n}\n\n// Form control sizing\n//\n// Relative text size, padding, and border-radii changes for form controls. For\n// horizontal sizing, wrap controls in the predefined grid classes. `<select>`\n// element gets special love because it's special, and that's a fact!\n\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n height: @input-height;\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n\n select& {\n height: @input-height;\n line-height: @input-height;\n }\n\n textarea&,\n select[multiple]& {\n height: auto;\n }\n}\n"]} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
1 | +<?xml version="1.0" standalone="no"?> | ||
2 | +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > | ||
3 | +<svg xmlns="http://www.w3.org/2000/svg"> | ||
4 | +<metadata></metadata> | ||
5 | +<defs> | ||
6 | +<font id="glyphicons_halflingsregular" horiz-adv-x="1200" > | ||
7 | +<font-face units-per-em="1200" ascent="960" descent="-240" /> | ||
8 | +<missing-glyph horiz-adv-x="500" /> | ||
9 | +<glyph /> | ||
10 | +<glyph /> | ||
11 | +<glyph unicode="
" /> | ||
12 | +<glyph unicode=" " /> | ||
13 | +<glyph unicode="*" d="M100 500v200h259l-183 183l141 141l183 -183v259h200v-259l183 183l141 -141l-183 -183h259v-200h-259l183 -183l-141 -141l-183 183v-259h-200v259l-183 -183l-141 141l183 183h-259z" /> | ||
14 | +<glyph unicode="+" d="M0 400v300h400v400h300v-400h400v-300h-400v-400h-300v400h-400z" /> | ||
15 | +<glyph unicode=" " /> | ||
16 | +<glyph unicode=" " horiz-adv-x="652" /> | ||
17 | +<glyph unicode=" " horiz-adv-x="1304" /> | ||
18 | +<glyph unicode=" " horiz-adv-x="652" /> | ||
19 | +<glyph unicode=" " horiz-adv-x="1304" /> | ||
20 | +<glyph unicode=" " horiz-adv-x="434" /> | ||
21 | +<glyph unicode=" " horiz-adv-x="326" /> | ||
22 | +<glyph unicode=" " horiz-adv-x="217" /> | ||
23 | +<glyph unicode=" " horiz-adv-x="217" /> | ||
24 | +<glyph unicode=" " horiz-adv-x="163" /> | ||
25 | +<glyph unicode=" " horiz-adv-x="260" /> | ||
26 | +<glyph unicode=" " horiz-adv-x="72" /> | ||
27 | +<glyph unicode=" " horiz-adv-x="260" /> | ||
28 | +<glyph unicode=" " horiz-adv-x="326" /> | ||
29 | +<glyph unicode="€" d="M100 500l100 100h113q0 47 5 100h-218l100 100h135q37 167 112 257q117 141 297 141q242 0 354 -189q60 -103 66 -209h-181q0 55 -25.5 99t-63.5 68t-75 36.5t-67 12.5q-24 0 -52.5 -10t-62.5 -32t-65.5 -67t-50.5 -107h379l-100 -100h-300q-6 -46 -6 -100h406l-100 -100 h-300q9 -74 33 -132t52.5 -91t62 -54.5t59 -29t46.5 -7.5q29 0 66 13t75 37t63.5 67.5t25.5 96.5h174q-31 -172 -128 -278q-107 -117 -274 -117q-205 0 -324 158q-36 46 -69 131.5t-45 205.5h-217z" /> | ||
30 | +<glyph unicode="−" d="M200 400h900v300h-900v-300z" /> | ||
31 | +<glyph unicode="◼" horiz-adv-x="500" d="M0 0z" /> | ||
32 | +<glyph unicode="☁" d="M-14 494q0 -80 56.5 -137t135.5 -57h750q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5z" /> | ||
33 | +<glyph unicode="✉" d="M0 100l400 400l200 -200l200 200l400 -400h-1200zM0 300v600l300 -300zM0 1100l600 -603l600 603h-1200zM900 600l300 300v-600z" /> | ||
34 | +<glyph unicode="✏" d="M-13 -13l333 112l-223 223zM187 403l214 -214l614 614l-214 214zM887 1103l214 -214l99 92q13 13 13 32.5t-13 33.5l-153 153q-15 13 -33 13t-33 -13z" /> | ||
35 | +<glyph unicode="" d="M0 1200h1200l-500 -550v-550h300v-100h-800v100h300v550z" /> | ||
36 | +<glyph unicode="" d="M14 84q18 -55 86 -75.5t147 5.5q65 21 109 69t44 90v606l600 155v-521q-64 16 -138 -7q-79 -26 -122.5 -83t-25.5 -111q18 -55 86 -75.5t147 4.5q70 23 111.5 63.5t41.5 95.5v881q0 10 -7 15.5t-17 2.5l-752 -193q-10 -3 -17 -12.5t-7 -19.5v-689q-64 17 -138 -7 q-79 -25 -122.5 -82t-25.5 -112z" /> | ||
37 | +<glyph unicode="" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233z" /> | ||
38 | +<glyph unicode="" d="M100 784q0 64 28 123t73 100.5t104.5 64t119 20.5t120 -38.5t104.5 -104.5q48 69 109.5 105t121.5 38t118.5 -20.5t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-149.5 152.5t-126.5 127.5 t-94 124.5t-33.5 117.5z" /> | ||
39 | +<glyph unicode="" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1z" /> | ||
40 | +<glyph unicode="" d="M-72 800h479l146 400h2l146 -400h472l-382 -278l145 -449l-384 275l-382 -275l146 447zM168 71l2 1zM237 700l196 -142l-73 -226l192 140l195 -141l-74 229l193 140h-235l-77 211l-78 -211h-239z" /> | ||
41 | +<glyph unicode="" d="M0 0v143l400 257v100q-37 0 -68.5 74.5t-31.5 125.5v200q0 124 88 212t212 88t212 -88t88 -212v-200q0 -51 -31.5 -125.5t-68.5 -74.5v-100l400 -257v-143h-1200z" /> | ||
42 | +<glyph unicode="" d="M0 0v1100h1200v-1100h-1200zM100 100h100v100h-100v-100zM100 300h100v100h-100v-100zM100 500h100v100h-100v-100zM100 700h100v100h-100v-100zM100 900h100v100h-100v-100zM300 100h600v400h-600v-400zM300 600h600v400h-600v-400zM1000 100h100v100h-100v-100z M1000 300h100v100h-100v-100zM1000 500h100v100h-100v-100zM1000 700h100v100h-100v-100zM1000 900h100v100h-100v-100z" /> | ||
43 | +<glyph unicode="" d="M0 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM0 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5zM600 50v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5zM600 650v400q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5z" /> | ||
44 | +<glyph unicode="" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 450v200q0 21 14.5 35.5t35.5 14.5h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM800 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5z" /> | ||
45 | +<glyph unicode="" d="M0 50v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM0 450q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v200q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5 t-14.5 -35.5v-200zM0 850v200q0 21 14.5 35.5t35.5 14.5h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5zM400 50v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5 t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 450v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5zM400 850v200q0 21 14.5 35.5t35.5 14.5h700q21 0 35.5 -14.5t14.5 -35.5 v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5z" /> | ||
46 | +<glyph unicode="" d="M29 454l419 -420l818 820l-212 212l-607 -607l-206 207z" /> | ||
47 | +<glyph unicode="" d="M106 318l282 282l-282 282l212 212l282 -282l282 282l212 -212l-282 -282l282 -282l-212 -212l-282 282l-282 -282z" /> | ||
48 | +<glyph unicode="" d="M23 693q0 200 142 342t342 142t342 -142t142 -342q0 -142 -78 -261l300 -300q7 -8 7 -18t-7 -18l-109 -109q-8 -7 -18 -7t-18 7l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 693q0 -136 97 -233t234 -97t233.5 96.5t96.5 233.5t-96.5 233.5t-233.5 96.5 t-234 -97t-97 -233zM300 600v200h100v100h200v-100h100v-200h-100v-100h-200v100h-100z" /> | ||
49 | +<glyph unicode="" d="M23 694q0 200 142 342t342 142t342 -142t142 -342q0 -141 -78 -262l300 -299q7 -7 7 -18t-7 -18l-109 -109q-8 -8 -18 -8t-18 8l-300 300q-119 -78 -261 -78q-200 0 -342 142t-142 342zM176 694q0 -136 97 -233t234 -97t233.5 97t96.5 233t-96.5 233t-233.5 97t-234 -97 t-97 -233zM300 601h400v200h-400v-200z" /> | ||
50 | +<glyph unicode="" d="M23 600q0 183 105 331t272 210v-166q-103 -55 -165 -155t-62 -220q0 -177 125 -302t302 -125t302 125t125 302q0 120 -62 220t-165 155v166q167 -62 272 -210t105 -331q0 -118 -45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5 zM500 750q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v400q0 21 -14.5 35.5t-35.5 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-400z" /> | ||
51 | +<glyph unicode="" d="M100 1h200v300h-200v-300zM400 1v500h200v-500h-200zM700 1v800h200v-800h-200zM1000 1v1200h200v-1200h-200z" /> | ||
52 | +<glyph unicode="" d="M26 601q0 -33 6 -74l151 -38l2 -6q14 -49 38 -93l3 -5l-80 -134q45 -59 105 -105l133 81l5 -3q45 -26 94 -39l5 -2l38 -151q40 -5 74 -5q27 0 74 5l38 151l6 2q46 13 93 39l5 3l134 -81q56 44 104 105l-80 134l3 5q24 44 39 93l1 6l152 38q5 40 5 74q0 28 -5 73l-152 38 l-1 6q-16 51 -39 93l-3 5l80 134q-44 58 -104 105l-134 -81l-5 3q-45 25 -93 39l-6 1l-38 152q-40 5 -74 5q-27 0 -74 -5l-38 -152l-5 -1q-50 -14 -94 -39l-5 -3l-133 81q-59 -47 -105 -105l80 -134l-3 -5q-25 -47 -38 -93l-2 -6l-151 -38q-6 -48 -6 -73zM385 601 q0 88 63 151t152 63t152 -63t63 -151q0 -89 -63 -152t-152 -63t-152 63t-63 152z" /> | ||
53 | +<glyph unicode="" d="M100 1025v50q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-50q0 -11 -7 -18t-18 -7h-1050q-11 0 -18 7t-7 18zM200 100v800h900v-800q0 -41 -29.5 -71t-70.5 -30h-700q-41 0 -70.5 30 t-29.5 71zM300 100h100v700h-100v-700zM500 100h100v700h-100v-700zM500 1100h300v100h-300v-100zM700 100h100v700h-100v-700zM900 100h100v700h-100v-700z" /> | ||
54 | +<glyph unicode="" d="M1 601l656 644l644 -644h-200v-600h-300v400h-300v-400h-300v600h-200z" /> | ||
55 | +<glyph unicode="" d="M100 25v1150q0 11 7 18t18 7h475v-500h400v-675q0 -11 -7 -18t-18 -7h-850q-11 0 -18 7t-7 18zM700 800v300l300 -300h-300z" /> | ||
56 | +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 500v400h100 v-300h200v-100h-300z" /> | ||
57 | +<glyph unicode="" d="M-100 0l431 1200h209l-21 -300h162l-20 300h208l431 -1200h-538l-41 400h-242l-40 -400h-539zM488 500h224l-27 300h-170z" /> | ||
58 | +<glyph unicode="" d="M0 0v400h490l-290 300h200v500h300v-500h200l-290 -300h490v-400h-1100zM813 200h175v100h-175v-100z" /> | ||
59 | +<glyph unicode="" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM188 600q0 -170 121 -291t291 -121t291 121t121 291t-121 291t-291 121 t-291 -121t-121 -291zM350 600h150v300h200v-300h150l-250 -300z" /> | ||
60 | +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM350 600l250 300 l250 -300h-150v-300h-200v300h-150z" /> | ||
61 | +<glyph unicode="" d="M0 25v475l200 700h800l199 -700l1 -475q0 -11 -7 -18t-18 -7h-1150q-11 0 -18 7t-7 18zM200 500h200l50 -200h300l50 200h200l-97 500h-606z" /> | ||
62 | +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM500 397v401 l297 -200z" /> | ||
63 | +<glyph unicode="" d="M23 600q0 -118 45.5 -224.5t123 -184t184 -123t224.5 -45.5t224.5 45.5t184 123t123 184t45.5 224.5h-150q0 -177 -125 -302t-302 -125t-302 125t-125 302t125 302t302 125q136 0 246 -81l-146 -146h400v400l-145 -145q-157 122 -355 122q-118 0 -224.5 -45.5t-184 -123 t-123 -184t-45.5 -224.5z" /> | ||
64 | +<glyph unicode="" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5q198 0 355 -122l145 145v-400h-400l147 147q-112 80 -247 80q-177 0 -302 -125t-125 -302h-150zM100 0v400h400l-147 -147q112 -80 247 -80q177 0 302 125t125 302h150q0 -118 -45.5 -224.5t-123 -184t-184 -123 t-224.5 -45.5q-198 0 -355 122z" /> | ||
65 | +<glyph unicode="" d="M100 0h1100v1200h-1100v-1200zM200 100v900h900v-900h-900zM300 200v100h100v-100h-100zM300 400v100h100v-100h-100zM300 600v100h100v-100h-100zM300 800v100h100v-100h-100zM500 200h500v100h-500v-100zM500 400v100h500v-100h-500zM500 600v100h500v-100h-500z M500 800v100h500v-100h-500z" /> | ||
66 | +<glyph unicode="" d="M0 100v600q0 41 29.5 70.5t70.5 29.5h100v200q0 82 59 141t141 59h300q82 0 141 -59t59 -141v-200h100q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-900q-41 0 -70.5 29.5t-29.5 70.5zM400 800h300v150q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-150z" /> | ||
67 | +<glyph unicode="" d="M100 0v1100h100v-1100h-100zM300 400q60 60 127.5 84t127.5 17.5t122 -23t119 -30t110 -11t103 42t91 120.5v500q-40 -81 -101.5 -115.5t-127.5 -29.5t-138 25t-139.5 40t-125.5 25t-103 -29.5t-65 -115.5v-500z" /> | ||
68 | +<glyph unicode="" d="M0 275q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 127 70.5 231.5t184.5 161.5t245 57t245 -57t184.5 -161.5t70.5 -231.5v-300q0 -11 7 -18t18 -7h50q11 0 18 7t7 18v300q0 116 -49.5 227t-131 192.5t-192.5 131t-227 49.5t-227 -49.5t-192.5 -131t-131 -192.5 t-49.5 -227v-300zM200 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14zM800 20v460q0 8 6 14t14 6h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14z" /> | ||
69 | +<glyph unicode="" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM688 459l141 141l-141 141l71 71l141 -141l141 141l71 -71l-141 -141l141 -141l-71 -71l-141 141l-141 -141z" /> | ||
70 | +<glyph unicode="" d="M0 400h300l300 -200v800l-300 -200h-300v-400zM700 857l69 53q111 -135 111 -310q0 -169 -106 -302l-67 54q86 110 86 248q0 146 -93 257z" /> | ||
71 | +<glyph unicode="" d="M0 401v400h300l300 200v-800l-300 200h-300zM702 858l69 53q111 -135 111 -310q0 -170 -106 -303l-67 55q86 110 86 248q0 145 -93 257zM889 951l7 -8q123 -151 123 -344q0 -189 -119 -339l-7 -8l81 -66l6 8q142 178 142 405q0 230 -144 408l-6 8z" /> | ||
72 | +<glyph unicode="" d="M0 0h500v500h-200v100h-100v-100h-200v-500zM0 600h100v100h400v100h100v100h-100v300h-500v-600zM100 100v300h300v-300h-300zM100 800v300h300v-300h-300zM200 200v100h100v-100h-100zM200 900h100v100h-100v-100zM500 500v100h300v-300h200v-100h-100v-100h-200v100 h-100v100h100v200h-200zM600 0v100h100v-100h-100zM600 1000h100v-300h200v-300h300v200h-200v100h200v500h-600v-200zM800 800v300h300v-300h-300zM900 0v100h300v-100h-300zM900 900v100h100v-100h-100zM1100 200v100h100v-100h-100z" /> | ||
73 | +<glyph unicode="" d="M0 200h100v1000h-100v-1000zM100 0v100h300v-100h-300zM200 200v1000h100v-1000h-100zM500 0v91h100v-91h-100zM500 200v1000h200v-1000h-200zM700 0v91h100v-91h-100zM800 200v1000h100v-1000h-100zM900 0v91h200v-91h-200zM1000 200v1000h200v-1000h-200z" /> | ||
74 | +<glyph unicode="" d="M0 700l1 475q0 10 7.5 17.5t17.5 7.5h474l700 -700l-500 -500zM148 953q0 -42 29 -71q30 -30 71.5 -30t71.5 30q29 29 29 71t-29 71q-30 30 -71.5 30t-71.5 -30q-29 -29 -29 -71z" /> | ||
75 | +<glyph unicode="" d="M1 700l1 475q0 11 7 18t18 7h474l700 -700l-500 -500zM148 953q0 -42 30 -71q29 -30 71 -30t71 30q30 29 30 71t-30 71q-29 30 -71 30t-71 -30q-30 -29 -30 -71zM701 1200h100l700 -700l-500 -500l-50 50l450 450z" /> | ||
76 | +<glyph unicode="" d="M100 0v1025l175 175h925v-1000l-100 -100v1000h-750l-100 -100h750v-1000h-900z" /> | ||
77 | +<glyph unicode="" d="M200 0l450 444l450 -443v1150q0 20 -14.5 35t-35.5 15h-800q-21 0 -35.5 -15t-14.5 -35v-1151z" /> | ||
78 | +<glyph unicode="" d="M0 100v700h200l100 -200h600l100 200h200v-700h-200v200h-800v-200h-200zM253 829l40 -124h592l62 124l-94 346q-2 11 -10 18t-18 7h-450q-10 0 -18 -7t-10 -18zM281 24l38 152q2 10 11.5 17t19.5 7h500q10 0 19.5 -7t11.5 -17l38 -152q2 -10 -3.5 -17t-15.5 -7h-600 q-10 0 -15.5 7t-3.5 17z" /> | ||
79 | +<glyph unicode="" d="M0 200q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-150q-4 8 -11.5 21.5t-33 48t-53 61t-69 48t-83.5 21.5h-200q-41 0 -82 -20.5t-70 -50t-52 -59t-34 -50.5l-12 -20h-150q-41 0 -70.5 -29.5t-29.5 -70.5v-600z M356 500q0 100 72 172t172 72t172 -72t72 -172t-72 -172t-172 -72t-172 72t-72 172zM494 500q0 -44 31 -75t75 -31t75 31t31 75t-31 75t-75 31t-75 -31t-31 -75zM900 700v100h100v-100h-100z" /> | ||
80 | +<glyph unicode="" d="M53 0h365v66q-41 0 -72 11t-49 38t1 71l92 234h391l82 -222q16 -45 -5.5 -88.5t-74.5 -43.5v-66h417v66q-34 1 -74 43q-18 19 -33 42t-21 37l-6 13l-385 998h-93l-399 -1006q-24 -48 -52 -75q-12 -12 -33 -25t-36 -20l-15 -7v-66zM416 521l178 457l46 -140l116 -317h-340 z" /> | ||
81 | +<glyph unicode="" d="M100 0v89q41 7 70.5 32.5t29.5 65.5v827q0 28 -1 39.5t-5.5 26t-15.5 21t-29 14t-49 14.5v71l471 -1q120 0 213 -88t93 -228q0 -55 -11.5 -101.5t-28 -74t-33.5 -47.5t-28 -28l-12 -7q8 -3 21.5 -9t48 -31.5t60.5 -58t47.5 -91.5t21.5 -129q0 -84 -59 -156.5t-142 -111 t-162 -38.5h-500zM400 200h161q89 0 153 48.5t64 132.5q0 90 -62.5 154.5t-156.5 64.5h-159v-400zM400 700h139q76 0 130 61.5t54 138.5q0 82 -84 130.5t-239 48.5v-379z" /> | ||
82 | +<glyph unicode="" d="M200 0v57q77 7 134.5 40.5t65.5 80.5l173 849q10 56 -10 74t-91 37q-6 1 -10.5 2.5t-9.5 2.5v57h425l2 -57q-33 -8 -62 -25.5t-46 -37t-29.5 -38t-17.5 -30.5l-5 -12l-128 -825q-10 -52 14 -82t95 -36v-57h-500z" /> | ||
83 | +<glyph unicode="" d="M-75 200h75v800h-75l125 167l125 -167h-75v-800h75l-125 -167zM300 900v300h150h700h150v-300h-50q0 29 -8 48.5t-18.5 30t-33.5 15t-39.5 5.5t-50.5 1h-200v-850l100 -50v-100h-400v100l100 50v850h-200q-34 0 -50.5 -1t-40 -5.5t-33.5 -15t-18.5 -30t-8.5 -48.5h-49z " /> | ||
84 | +<glyph unicode="" d="M33 51l167 125v-75h800v75l167 -125l-167 -125v75h-800v-75zM100 901v300h150h700h150v-300h-50q0 29 -8 48.5t-18 30t-33.5 15t-40 5.5t-50.5 1h-200v-650l100 -50v-100h-400v100l100 50v650h-200q-34 0 -50.5 -1t-39.5 -5.5t-33.5 -15t-18.5 -30t-8 -48.5h-50z" /> | ||
85 | +<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 350q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM0 650q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1000q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 950q0 -20 14.5 -35t35.5 -15h600q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-600q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" /> | ||
86 | +<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM0 650q0 -20 14.5 -35t35.5 -15h1100q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5 v-100zM200 350q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM200 950q0 -20 14.5 -35t35.5 -15h700q21 0 35.5 15t14.5 35v100q0 21 -14.5 35.5t-35.5 14.5h-700q-21 0 -35.5 -14.5 t-14.5 -35.5v-100z" /> | ||
87 | +<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1000q-21 0 -35.5 15 t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-600 q-21 0 -35.5 15t-14.5 35z" /> | ||
88 | +<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-1100 q-21 0 -35.5 15t-14.5 35z" /> | ||
89 | +<glyph unicode="" d="M0 50v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 350v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM0 650v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35zM0 950v100q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-100q-21 0 -35.5 15 t-14.5 35zM300 50v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800 q-21 0 -35.5 15t-14.5 35zM300 650v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15h-800q-21 0 -35.5 15t-14.5 35zM300 950v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -20 -14.5 -35t-35.5 -15 h-800q-21 0 -35.5 15t-14.5 35z" /> | ||
90 | +<glyph unicode="" d="M-101 500v100h201v75l166 -125l-166 -125v75h-201zM300 0h100v1100h-100v-1100zM500 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35 v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 650q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM500 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100 q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100z" /> | ||
91 | +<glyph unicode="" d="M1 50q0 -20 14.5 -35t35.5 -15h600q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-600q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 350q0 -20 14.5 -35t35.5 -15h300q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 650 q0 -20 14.5 -35t35.5 -15h500q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM1 950q0 -20 14.5 -35t35.5 -15h100q20 0 35 15t15 35v100q0 21 -15 35.5t-35 14.5h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-100zM801 0v1100h100v-1100 h-100zM934 550l167 -125v75h200v100h-200v75z" /> | ||
92 | +<glyph unicode="" d="M0 275v650q0 31 22 53t53 22h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53zM900 600l300 300v-600z" /> | ||
93 | +<glyph unicode="" d="M0 44v1012q0 18 13 31t31 13h1112q19 0 31.5 -13t12.5 -31v-1012q0 -18 -12.5 -31t-31.5 -13h-1112q-18 0 -31 13t-13 31zM100 263l247 182l298 -131l-74 156l293 318l236 -288v500h-1000v-737zM208 750q0 56 39 95t95 39t95 -39t39 -95t-39 -95t-95 -39t-95 39t-39 95z " /> | ||
94 | +<glyph unicode="" d="M148 745q0 124 60.5 231.5t165 172t226.5 64.5q123 0 227 -63t164.5 -169.5t60.5 -229.5t-73 -272q-73 -114 -166.5 -237t-150.5 -189l-57 -66q-10 9 -27 26t-66.5 70.5t-96 109t-104 135.5t-100.5 155q-63 139 -63 262zM342 772q0 -107 75.5 -182.5t181.5 -75.5 q107 0 182.5 75.5t75.5 182.5t-75.5 182t-182.5 75t-182 -75.5t-75 -181.5z" /> | ||
95 | +<glyph unicode="" d="M1 600q0 122 47.5 233t127.5 191t191 127.5t233 47.5t233 -47.5t191 -127.5t127.5 -191t47.5 -233t-47.5 -233t-127.5 -191t-191 -127.5t-233 -47.5t-233 47.5t-191 127.5t-127.5 191t-47.5 233zM173 600q0 -177 125.5 -302t301.5 -125v854q-176 0 -301.5 -125 t-125.5 -302z" /> | ||
96 | +<glyph unicode="" d="M117 406q0 94 34 186t88.5 172.5t112 159t115 177t87.5 194.5q21 -71 57.5 -142.5t76 -130.5t83 -118.5t82 -117t70 -116t50 -125.5t18.5 -136q0 -89 -39 -165.5t-102 -126.5t-140 -79.5t-156 -33.5q-114 6 -211.5 53t-161.5 139t-64 210zM243 414q14 -82 59.5 -136 t136.5 -80l16 98q-7 6 -18 17t-34 48t-33 77q-15 73 -14 143.5t10 122.5l9 51q-92 -110 -119.5 -185t-12.5 -156z" /> | ||
97 | +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5q366 -6 397 -14l-186 -186h-311q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v125l200 200v-225q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM436 341l161 50l412 412l-114 113l-405 -405zM995 1015l113 -113l113 113l-21 85l-92 28z" /> | ||
98 | +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h261l2 -80q-133 -32 -218 -120h-145q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-53q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5 zM423 524q30 38 81.5 64t103 35.5t99 14t77.5 3.5l29 -1v-209l360 324l-359 318v-216q-7 0 -19 -1t-48 -8t-69.5 -18.5t-76.5 -37t-76.5 -59t-62 -88t-39.5 -121.5z" /> | ||
99 | +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q61 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-169q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5 t-117.5 282.5zM342 632l283 -284l567 567l-137 137l-430 -431l-146 147z" /> | ||
100 | +<glyph unicode="" d="M0 603l300 296v-198h200v200h-200l300 300l295 -300h-195v-200h200v198l300 -296l-300 -300v198h-200v-200h195l-295 -300l-300 300h200v200h-200v-198z" /> | ||
101 | +<glyph unicode="" d="M200 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-1100l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" /> | ||
102 | +<glyph unicode="" d="M0 50v1000q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-437l500 487v-487l500 487v-1100l-500 488v-488l-500 488v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5z" /> | ||
103 | +<glyph unicode="" d="M136 550l564 550v-487l500 487v-1100l-500 488v-488z" /> | ||
104 | +<glyph unicode="" d="M200 0l900 550l-900 550v-1100z" /> | ||
105 | +<glyph unicode="" d="M200 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200q-21 0 -35.5 -14.5t-14.5 -35.5v-800zM600 150q0 -21 14.5 -35.5t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v800q0 21 -14.5 35.5t-35.5 14.5h-200 q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" /> | ||
106 | +<glyph unicode="" d="M200 150q0 -20 14.5 -35t35.5 -15h800q21 0 35.5 15t14.5 35v800q0 21 -14.5 35.5t-35.5 14.5h-800q-21 0 -35.5 -14.5t-14.5 -35.5v-800z" /> | ||
107 | +<glyph unicode="" d="M0 0v1100l500 -487v487l564 -550l-564 -550v488z" /> | ||
108 | +<glyph unicode="" d="M0 0v1100l500 -487v487l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-500 -488v488z" /> | ||
109 | +<glyph unicode="" d="M300 0v1100l500 -487v437q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438z" /> | ||
110 | +<glyph unicode="" d="M100 250v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5zM100 500h1100l-550 564z" /> | ||
111 | +<glyph unicode="" d="M185 599l592 -592l240 240l-353 353l353 353l-240 240z" /> | ||
112 | +<glyph unicode="" d="M272 194l353 353l-353 353l241 240l572 -571l21 -22l-1 -1v-1l-592 -591z" /> | ||
113 | +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h200v-200h200v200h200v200h-200v200h-200v-200h-200v-200z" /> | ||
114 | +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM300 500h600v200h-600v-200z" /> | ||
115 | +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM246 459l213 -213l141 142l141 -142l213 213l-142 141l142 141l-213 212l-141 -141l-141 142l-212 -213l141 -141 z" /> | ||
116 | +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM270 551l276 -277l411 411l-175 174l-236 -236l-102 102z" /> | ||
117 | +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM364 700h143q4 0 11.5 -1t11 -1t6.5 3t3 9t1 11t3.5 8.5t3.5 6t5.5 4t6.5 2.5t9 1.5t9 0.5h11.5h12.5 q19 0 30 -10t11 -26q0 -22 -4 -28t-27 -22q-5 -1 -12.5 -3t-27 -13.5t-34 -27t-26.5 -46t-11 -68.5h200q5 3 14 8t31.5 25.5t39.5 45.5t31 69t14 94q0 51 -17.5 89t-42 58t-58.5 32t-58.5 15t-51.5 3q-50 0 -90.5 -12t-75 -38.5t-53.5 -74.5t-19 -114zM500 300h200v100h-200 v-100z" /> | ||
118 | +<glyph unicode="" d="M3 600q0 162 80 299.5t217.5 217.5t299.5 80t299.5 -80t217.5 -217.5t80 -299.5t-80 -299.5t-217.5 -217.5t-299.5 -80t-299.5 80t-217.5 217.5t-80 299.5zM400 300h400v100h-100v300h-300v-100h100v-200h-100v-100zM500 800h200v100h-200v-100z" /> | ||
119 | +<glyph unicode="" d="M0 500v200h195q31 125 98.5 199.5t206.5 100.5v200h200v-200q54 -20 113 -60t112.5 -105.5t71.5 -134.5h203v-200h-203q-25 -102 -116.5 -186t-180.5 -117v-197h-200v197q-140 27 -208 102.5t-98 200.5h-194zM290 500q24 -73 79.5 -127.5t130.5 -78.5v206h200v-206 q149 48 201 206h-201v200h200q-25 74 -75.5 127t-124.5 77v-204h-200v203q-75 -23 -130 -77t-79 -126h209v-200h-210z" /> | ||
120 | +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM356 465l135 135 l-135 135l109 109l135 -135l135 135l109 -109l-135 -135l135 -135l-109 -109l-135 135l-135 -135z" /> | ||
121 | +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM322 537l141 141 l87 -87l204 205l142 -142l-346 -345z" /> | ||
122 | +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -115 62 -215l568 567q-100 62 -216 62q-171 0 -292.5 -121.5t-121.5 -292.5zM391 245q97 -59 209 -59q171 0 292.5 121.5t121.5 292.5 q0 112 -59 209z" /> | ||
123 | +<glyph unicode="" d="M0 547l600 453v-300h600v-300h-600v-301z" /> | ||
124 | +<glyph unicode="" d="M0 400v300h600v300l600 -453l-600 -448v301h-600z" /> | ||
125 | +<glyph unicode="" d="M204 600l450 600l444 -600h-298v-600h-300v600h-296z" /> | ||
126 | +<glyph unicode="" d="M104 600h296v600h300v-600h298l-449 -600z" /> | ||
127 | +<glyph unicode="" d="M0 200q6 132 41 238.5t103.5 193t184 138t271.5 59.5v271l600 -453l-600 -448v301q-95 -2 -183 -20t-170 -52t-147 -92.5t-100 -135.5z" /> | ||
128 | +<glyph unicode="" d="M0 0v400l129 -129l294 294l142 -142l-294 -294l129 -129h-400zM635 777l142 -142l294 294l129 -129v400h-400l129 -129z" /> | ||
129 | +<glyph unicode="" d="M34 176l295 295l-129 129h400v-400l-129 130l-295 -295zM600 600v400l129 -129l295 295l142 -141l-295 -295l129 -130h-400z" /> | ||
130 | +<glyph unicode="" d="M23 600q0 118 45.5 224.5t123 184t184 123t224.5 45.5t224.5 -45.5t184 -123t123 -184t45.5 -224.5t-45.5 -224.5t-123 -184t-184 -123t-224.5 -45.5t-224.5 45.5t-184 123t-123 184t-45.5 224.5zM456 851l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5 t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5h-207q-21 0 -33 -14.5t-8 -34.5zM500 300h200v100h-200v-100z" /> | ||
131 | +<glyph unicode="" d="M0 800h100v-200h400v300h200v-300h400v200h100v100h-111q1 1 1 6.5t-1.5 15t-3.5 17.5l-34 172q-11 39 -41.5 63t-69.5 24q-32 0 -61 -17l-239 -144q-22 -13 -40 -35q-19 24 -40 36l-238 144q-33 18 -62 18q-39 0 -69.5 -23t-40.5 -61l-35 -177q-2 -8 -3 -18t-1 -15v-6 h-111v-100zM100 0h400v400h-400v-400zM200 900q-3 0 14 48t36 96l18 47l213 -191h-281zM700 0v400h400v-400h-400zM731 900l202 197q5 -12 12 -32.5t23 -64t25 -72t7 -28.5h-269z" /> | ||
132 | +<glyph unicode="" d="M0 -22v143l216 193q-9 53 -13 83t-5.5 94t9 113t38.5 114t74 124q47 60 99.5 102.5t103 68t127.5 48t145.5 37.5t184.5 43.5t220 58.5q0 -189 -22 -343t-59 -258t-89 -181.5t-108.5 -120t-122 -68t-125.5 -30t-121.5 -1.5t-107.5 12.5t-87.5 17t-56.5 7.5l-99 -55z M238.5 300.5q19.5 -6.5 86.5 76.5q55 66 367 234q70 38 118.5 69.5t102 79t99 111.5t86.5 148q22 50 24 60t-6 19q-7 5 -17 5t-26.5 -14.5t-33.5 -39.5q-35 -51 -113.5 -108.5t-139.5 -89.5l-61 -32q-369 -197 -458 -401q-48 -111 -28.5 -117.5z" /> | ||
133 | +<glyph unicode="" d="M111 408q0 -33 5 -63q9 -56 44 -119.5t105 -108.5q31 -21 64 -16t62 23.5t57 49.5t48 61.5t35 60.5q32 66 39 184.5t-13 157.5q79 -80 122 -164t26 -184q-5 -33 -20.5 -69.5t-37.5 -80.5q-10 -19 -14.5 -29t-12 -26t-9 -23.5t-3 -19t2.5 -15.5t11 -9.5t19.5 -5t30.5 2.5 t42 8q57 20 91 34t87.5 44.5t87 64t65.5 88.5t47 122q38 172 -44.5 341.5t-246.5 278.5q22 -44 43 -129q39 -159 -32 -154q-15 2 -33 9q-79 33 -120.5 100t-44 175.5t48.5 257.5q-13 -8 -34 -23.5t-72.5 -66.5t-88.5 -105.5t-60 -138t-8 -166.5q2 -12 8 -41.5t8 -43t6 -39.5 t3.5 -39.5t-1 -33.5t-6 -31.5t-13.5 -24t-21 -20.5t-31 -12q-38 -10 -67 13t-40.5 61.5t-15 81.5t10.5 75q-52 -46 -83.5 -101t-39 -107t-7.5 -85z" /> | ||
134 | +<glyph unicode="" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5t145.5 -23.5t132.5 -59t116.5 -83.5t97 -90t74.5 -85.5t49 -63.5t20 -30l26 -40l-26 -40q-6 -10 -20 -30t-49 -63.5t-74.5 -85.5t-97 -90t-116.5 -83.5t-132.5 -59t-145.5 -23.5 t-145.5 23.5t-132.5 59t-116.5 83.5t-97 90t-74.5 85.5t-49 63.5t-20 30zM120 600q7 -10 40.5 -58t56 -78.5t68 -77.5t87.5 -75t103 -49.5t125 -21.5t123.5 20t100.5 45.5t85.5 71.5t66.5 75.5t58 81.5t47 66q-1 1 -28.5 37.5t-42 55t-43.5 53t-57.5 63.5t-58.5 54 q49 -74 49 -163q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l105 105q-37 24 -75 72t-57 84l-20 36z" /> | ||
135 | +<glyph unicode="" d="M-61 600l26 40q6 10 20 30t49 63.5t74.5 85.5t97 90t116.5 83.5t132.5 59t145.5 23.5q61 0 121 -17l37 142h148l-314 -1200h-148l37 143q-82 21 -165 71.5t-140 102t-109.5 112t-72 88.5t-29.5 43zM120 600q210 -282 393 -336l37 141q-107 18 -178.5 101.5t-71.5 193.5 q0 85 46 158q-102 -87 -226 -258zM377 656q49 -124 154 -191l47 47l23 87q-30 28 -59 69t-44 68l-14 26zM780 161l38 145q22 15 44.5 34t46 44t40.5 44t41 50.5t33.5 43.5t33 44t24.5 34q-97 127 -140 175l39 146q67 -54 131.5 -125.5t87.5 -103.5t36 -52l26 -40l-26 -40 q-7 -12 -25.5 -38t-63.5 -79.5t-95.5 -102.5t-124 -100t-146.5 -79z" /> | ||
136 | +<glyph unicode="" d="M-97.5 34q13.5 -34 50.5 -34h1294q37 0 50.5 35.5t-7.5 67.5l-642 1056q-20 34 -48 36.5t-48 -29.5l-642 -1066q-21 -32 -7.5 -66zM155 200l445 723l445 -723h-345v100h-200v-100h-345zM500 600l100 -300l100 300v100h-200v-100z" /> | ||
137 | +<glyph unicode="" d="M100 262v41q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44t106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -91 100 -113v-64q0 -20 -13 -28.5t-32 0.5l-94 78h-222l-94 -78q-19 -9 -32 -0.5t-13 28.5 v64q0 22 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5z" /> | ||
138 | +<glyph unicode="" d="M0 50q0 -20 14.5 -35t35.5 -15h1000q21 0 35.5 15t14.5 35v750h-1100v-750zM0 900h1100v150q0 21 -14.5 35.5t-35.5 14.5h-150v100h-100v-100h-500v100h-100v-100h-150q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 100v100h100v-100h-100zM100 300v100h100v-100h-100z M100 500v100h100v-100h-100zM300 100v100h100v-100h-100zM300 300v100h100v-100h-100zM300 500v100h100v-100h-100zM500 100v100h100v-100h-100zM500 300v100h100v-100h-100zM500 500v100h100v-100h-100zM700 100v100h100v-100h-100zM700 300v100h100v-100h-100zM700 500 v100h100v-100h-100zM900 100v100h100v-100h-100zM900 300v100h100v-100h-100zM900 500v100h100v-100h-100z" /> | ||
139 | +<glyph unicode="" d="M0 200v200h259l600 600h241v198l300 -295l-300 -300v197h-159l-600 -600h-341zM0 800h259l122 -122l141 142l-181 180h-341v-200zM678 381l141 142l122 -123h159v198l300 -295l-300 -300v197h-241z" /> | ||
140 | +<glyph unicode="" d="M0 400v600q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5z" /> | ||
141 | +<glyph unicode="" d="M100 600v200h300v-250q0 -113 6 -145q17 -92 102 -117q39 -11 92 -11q37 0 66.5 5.5t50 15.5t36 24t24 31.5t14 37.5t7 42t2.5 45t0 47v25v250h300v-200q0 -42 -3 -83t-15 -104t-31.5 -116t-58 -109.5t-89 -96.5t-129 -65.5t-174.5 -25.5t-174.5 25.5t-129 65.5t-89 96.5 t-58 109.5t-31.5 116t-15 104t-3 83zM100 900v300h300v-300h-300zM800 900v300h300v-300h-300z" /> | ||
142 | +<glyph unicode="" d="M-30 411l227 -227l352 353l353 -353l226 227l-578 579z" /> | ||
143 | +<glyph unicode="" d="M70 797l580 -579l578 579l-226 227l-353 -353l-352 353z" /> | ||
144 | +<glyph unicode="" d="M-198 700l299 283l300 -283h-203v-400h385l215 -200h-800v600h-196zM402 1000l215 -200h381v-400h-198l299 -283l299 283h-200v600h-796z" /> | ||
145 | +<glyph unicode="" d="M18 939q-5 24 10 42q14 19 39 19h896l38 162q5 17 18.5 27.5t30.5 10.5h94q20 0 35 -14.5t15 -35.5t-15 -35.5t-35 -14.5h-54l-201 -961q-2 -4 -6 -10.5t-19 -17.5t-33 -11h-31v-50q0 -20 -14.5 -35t-35.5 -15t-35.5 15t-14.5 35v50h-300v-50q0 -20 -14.5 -35t-35.5 -15 t-35.5 15t-14.5 35v50h-50q-21 0 -35.5 15t-14.5 35q0 21 14.5 35.5t35.5 14.5h535l48 200h-633q-32 0 -54.5 21t-27.5 43z" /> | ||
146 | +<glyph unicode="" d="M0 0v800h1200v-800h-1200zM0 900v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-100h-1200z" /> | ||
147 | +<glyph unicode="" d="M1 0l300 700h1200l-300 -700h-1200zM1 400v600h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500v-200h-1000z" /> | ||
148 | +<glyph unicode="" d="M302 300h198v600h-198l298 300l298 -300h-198v-600h198l-298 -300z" /> | ||
149 | +<glyph unicode="" d="M0 600l300 298v-198h600v198l300 -298l-300 -297v197h-600v-197z" /> | ||
150 | +<glyph unicode="" d="M0 100v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM31 400l172 739q5 22 23 41.5t38 19.5h672q19 0 37.5 -22.5t23.5 -45.5l172 -732h-1138zM800 100h100v100h-100v-100z M1000 100h100v100h-100v-100z" /> | ||
151 | +<glyph unicode="" d="M-101 600v50q0 24 25 49t50 38l25 13v-250l-11 5.5t-24 14t-30 21.5t-24 27.5t-11 31.5zM100 500v250v8v8v7t0.5 7t1.5 5.5t2 5t3 4t4.5 3.5t6 1.5t7.5 0.5h200l675 250v-850l-675 200h-38l47 -276q2 -12 -3 -17.5t-11 -6t-21 -0.5h-8h-83q-20 0 -34.5 14t-18.5 35 q-55 337 -55 351zM1100 200v850q0 21 14.5 35.5t35.5 14.5q20 0 35 -14.5t15 -35.5v-850q0 -20 -15 -35t-35 -15q-21 0 -35.5 15t-14.5 35z" /> | ||
152 | +<glyph unicode="" d="M74 350q0 21 13.5 35.5t33.5 14.5h18l117 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3 32t29 13h94q20 0 29 -10.5t3 -29.5q-18 -36 -18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q20 0 33.5 -14.5t13.5 -35.5q0 -20 -13 -40t-31 -27q-8 -3 -23 -8.5 t-65 -20t-103 -25t-132.5 -19.5t-158.5 -9q-125 0 -245.5 20.5t-178.5 40.5l-58 20q-18 7 -31 27.5t-13 40.5zM497 110q12 -49 40 -79.5t63 -30.5t63 30.5t39 79.5q-48 -6 -102 -6t-103 6z" /> | ||
153 | +<glyph unicode="" d="M21 445l233 -45l-78 -224l224 78l45 -233l155 179l155 -179l45 233l224 -78l-78 224l234 45l-180 155l180 156l-234 44l78 225l-224 -78l-45 233l-155 -180l-155 180l-45 -233l-224 78l78 -225l-233 -44l179 -156z" /> | ||
154 | +<glyph unicode="" d="M0 200h200v600h-200v-600zM300 275q0 -75 100 -75h61q124 -100 139 -100h250q46 0 83 57l238 344q29 31 29 74v100q0 44 -30.5 84.5t-69.5 40.5h-328q28 118 28 125v150q0 44 -30.5 84.5t-69.5 40.5h-50q-27 0 -51 -20t-38 -48l-96 -198l-145 -196q-20 -26 -20 -63v-400z M400 300v375l150 213l100 212h50v-175l-50 -225h450v-125l-250 -375h-214l-136 100h-100z" /> | ||
155 | +<glyph unicode="" d="M0 400v600h200v-600h-200zM300 525v400q0 75 100 75h61q124 100 139 100h250q46 0 83 -57l238 -344q29 -31 29 -74v-100q0 -44 -30.5 -84.5t-69.5 -40.5h-328q28 -118 28 -125v-150q0 -44 -30.5 -84.5t-69.5 -40.5h-50q-27 0 -51 20t-38 48l-96 198l-145 196 q-20 26 -20 63zM400 525l150 -212l100 -213h50v175l-50 225h450v125l-250 375h-214l-136 -100h-100v-375z" /> | ||
156 | +<glyph unicode="" d="M8 200v600h200v-600h-200zM308 275v525q0 17 14 35.5t28 28.5l14 9l362 230q14 6 25 6q17 0 29 -12l109 -112q14 -14 14 -34q0 -18 -11 -32l-85 -121h302q85 0 138.5 -38t53.5 -110t-54.5 -111t-138.5 -39h-107l-130 -339q-7 -22 -20.5 -41.5t-28.5 -19.5h-341 q-7 0 -90 81t-83 94zM408 289l100 -89h293l131 339q6 21 19.5 41t28.5 20h203q16 0 25 15t9 36q0 20 -9 34.5t-25 14.5h-457h-6.5h-7.5t-6.5 0.5t-6 1t-5 1.5t-5.5 2.5t-4 4t-4 5.5q-5 12 -5 20q0 14 10 27l147 183l-86 83l-339 -236v-503z" /> | ||
157 | +<glyph unicode="" d="M-101 651q0 72 54 110t139 38l302 -1l-85 121q-11 16 -11 32q0 21 14 34l109 113q13 12 29 12q11 0 25 -6l365 -230q7 -4 17 -10.5t26.5 -26t16.5 -36.5v-526q0 -13 -86 -93.5t-94 -80.5h-341q-16 0 -29.5 20t-19.5 41l-130 339h-107q-84 0 -139 39t-55 111zM-1 601h222 q15 0 28.5 -20.5t19.5 -40.5l131 -339h293l107 89v502l-343 237l-87 -83l145 -184q10 -11 10 -26q0 -11 -5 -20q-1 -3 -3.5 -5.5l-4 -4t-5 -2.5t-5.5 -1.5t-6.5 -1t-6.5 -0.5h-7.5h-6.5h-476v-100zM1000 201v600h200v-600h-200z" /> | ||
158 | +<glyph unicode="" d="M97 719l230 -363q4 -6 10.5 -15.5t26 -25t36.5 -15.5h525q13 0 94 83t81 90v342q0 15 -20 28.5t-41 19.5l-339 131v106q0 84 -39 139t-111 55t-110 -53.5t-38 -138.5v-302l-121 84q-15 12 -33.5 11.5t-32.5 -13.5l-112 -110q-22 -22 -6 -53zM172 739l83 86l183 -146 q22 -18 47 -5q3 1 5.5 3.5l4 4t2.5 5t1.5 5.5t1 6.5t0.5 6.5v7.5v6.5v456q0 22 25 31t50 -0.5t25 -30.5v-202q0 -16 20 -29.5t41 -19.5l339 -130v-294l-89 -100h-503zM400 0v200h600v-200h-600z" /> | ||
159 | +<glyph unicode="" d="M2 585q-16 -31 6 -53l112 -110q13 -13 32 -13.5t34 10.5l121 85q0 -51 -0.5 -153.5t-0.5 -148.5q0 -84 38.5 -138t110.5 -54t111 55t39 139v106l339 131q20 6 40.5 19.5t20.5 28.5v342q0 7 -81 90t-94 83h-525q-17 0 -35.5 -14t-28.5 -28l-10 -15zM77 565l236 339h503 l89 -100v-294l-340 -130q-20 -6 -40 -20t-20 -29v-202q0 -22 -25 -31t-50 0t-25 31v456v14.5t-1.5 11.5t-5 12t-9.5 7q-24 13 -46 -5l-184 -146zM305 1104v200h600v-200h-600z" /> | ||
160 | +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM298 701l2 -201h300l-2 -194l402 294l-402 298v-197h-300z" /> | ||
161 | +<glyph unicode="" d="M0 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t231.5 47.5q122 0 232.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-218 -217.5t-300 -80t-299.5 80t-217.5 217.5t-80 299.5zM200 600l402 -294l-2 194h300l2 201h-300v197z" /> | ||
162 | +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600h200v-300h200v300h200l-300 400z" /> | ||
163 | +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q162 0 299.5 -80t217.5 -218t80 -300t-80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM300 600l300 -400l300 400h-200v300h-200v-300h-200z" /> | ||
164 | +<glyph unicode="" d="M5 597q0 122 47.5 232.5t127.5 190.5t190.5 127.5t232.5 47.5q121 0 231.5 -47.5t190.5 -127.5t127.5 -190.5t47.5 -232.5q0 -162 -80 -299.5t-217.5 -217.5t-299.5 -80t-300 80t-218 217.5t-80 299.5zM254 780q-8 -33 5.5 -92.5t7.5 -87.5q0 -9 17 -44t16 -60 q12 0 23 -5.5t23 -15t20 -13.5q24 -12 108 -42q22 -8 53 -31.5t59.5 -38.5t57.5 -11q8 -18 -15 -55t-20 -57q42 -71 87 -80q0 -6 -3 -15.5t-3.5 -14.5t4.5 -17q104 -3 221 112q30 29 47 47t34.5 49t20.5 62q-14 9 -37 9.5t-36 7.5q-14 7 -49 15t-52 19q-9 0 -39.5 -0.5 t-46.5 -1.5t-39 -6.5t-39 -16.5q-50 -35 -66 -12q-4 2 -3.5 25.5t0.5 25.5q-6 13 -26.5 17t-24.5 7q2 22 -2 41t-16.5 28t-38.5 -20q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q12 -19 32 -37.5t34 -27.5l14 -8q0 3 9.5 39.5t5.5 57.5 q-4 23 14.5 44.5t22.5 31.5q5 14 10 35t8.5 31t15.5 22.5t34 21.5q-6 18 10 37q8 0 23.5 -1.5t24.5 -1.5t20.5 4.5t20.5 15.5q-10 23 -30.5 42.5t-38 30t-49 26.5t-43.5 23q11 39 2 44q31 -13 58 -14.5t39 3.5l11 4q7 36 -16.5 53.5t-64.5 28.5t-56 23q-19 -3 -37 0 q-15 -12 -36.5 -21t-34.5 -12t-44 -8t-39 -6q-15 -3 -45.5 0.5t-45.5 -2.5q-21 -7 -52 -26.5t-34 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -90.5t-29.5 -79.5zM518 916q3 12 16 30t16 25q10 -10 18.5 -10t14 6t14.5 14.5t16 12.5q0 -24 17 -66.5t17 -43.5 q-9 2 -31 5t-36 5t-32 8t-30 14zM692 1003h1h-1z" /> | ||
165 | +<glyph unicode="" d="M0 164.5q0 21.5 15 37.5l600 599q-33 101 6 201.5t135 154.5q164 92 306 -9l-259 -138l145 -232l251 126q13 -175 -151 -267q-123 -70 -253 -23l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5z" /> | ||
166 | +<glyph unicode="" horiz-adv-x="1220" d="M0 196v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 596v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5zM0 996v100q0 41 29.5 70.5t70.5 29.5h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM600 596h500v100h-500v-100zM800 196h300v100h-300v-100zM900 996h200v100h-200v-100z" /> | ||
167 | +<glyph unicode="" d="M100 1100v100h1000v-100h-1000zM150 1000h900l-350 -500v-300l-200 -200v500z" /> | ||
168 | +<glyph unicode="" d="M0 200v200h1200v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5zM0 500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500z M500 1000h200v100h-200v-100z" /> | ||
169 | +<glyph unicode="" d="M0 0v400l129 -129l200 200l142 -142l-200 -200l129 -129h-400zM0 800l129 129l200 -200l142 142l-200 200l129 129h-400v-400zM729 329l142 142l200 -200l129 129v-400h-400l129 129zM729 871l200 200l-129 129h400v-400l-129 129l-200 -200z" /> | ||
170 | +<glyph unicode="" d="M0 596q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 596q0 -172 121.5 -293t292.5 -121t292.5 121t121.5 293q0 171 -121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM291 655 q0 23 15.5 38.5t38.5 15.5t39 -16t16 -38q0 -23 -16 -39t-39 -16q-22 0 -38 16t-16 39zM400 850q0 22 16 38.5t39 16.5q22 0 38 -16t16 -39t-16 -39t-38 -16q-23 0 -39 16.5t-16 38.5zM514 609q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 22 16 38.5t39 16.5 q22 0 38 -16t16 -39t-16 -39t-38 -16q-14 0 -29 10l-55 -145q17 -22 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5zM800 655q0 22 16 38t39 16t38.5 -15.5t15.5 -38.5t-16 -39t-38 -16q-23 0 -39 16t-16 39z" /> | ||
171 | +<glyph unicode="" d="M-40 375q-13 -95 35 -173q35 -57 94 -89t129 -32q63 0 119 28q33 16 65 40.5t52.5 45.5t59.5 64q40 44 57 61l394 394q35 35 47 84t-3 96q-27 87 -117 104q-20 2 -29 2q-46 0 -78.5 -16.5t-67.5 -51.5l-389 -396l-7 -7l69 -67l377 373q20 22 39 38q23 23 50 23 q38 0 53 -36q16 -39 -20 -75l-547 -547q-52 -52 -125 -52q-55 0 -100 33t-54 96q-5 35 2.5 66t31.5 63t42 50t56 54q24 21 44 41l348 348q52 52 82.5 79.5t84 54t107.5 26.5q25 0 48 -4q95 -17 154 -94.5t51 -175.5q-7 -101 -98 -192l-252 -249l-253 -256l7 -7l69 -60 l517 511q67 67 95 157t11 183q-16 87 -67 154t-130 103q-69 33 -152 33q-107 0 -197 -55q-40 -24 -111 -95l-512 -512q-68 -68 -81 -163z" /> | ||
172 | +<glyph unicode="" d="M80 784q0 131 98.5 229.5t230.5 98.5q143 0 241 -129q103 129 246 129q129 0 226 -98.5t97 -229.5q0 -46 -17.5 -91t-61 -99t-77 -89.5t-104.5 -105.5q-197 -191 -293 -322l-17 -23l-16 23q-43 58 -100 122.5t-92 99.5t-101 100q-71 70 -104.5 105.5t-77 89.5t-61 99 t-17.5 91zM250 784q0 -27 30.5 -70t61.5 -75.5t95 -94.5l22 -22q93 -90 190 -201q82 92 195 203l12 12q64 62 97.5 97t64.5 79t31 72q0 71 -48 119.5t-105 48.5q-74 0 -132 -83l-118 -171l-114 174q-51 80 -123 80q-60 0 -109.5 -49.5t-49.5 -118.5z" /> | ||
173 | +<glyph unicode="" d="M57 353q0 -95 66 -159l141 -142q68 -66 159 -66q93 0 159 66l283 283q66 66 66 159t-66 159l-141 141q-8 9 -19 17l-105 -105l212 -212l-389 -389l-247 248l95 95l-18 18q-46 45 -75 101l-55 -55q-66 -66 -66 -159zM269 706q0 -93 66 -159l141 -141q7 -7 19 -17l105 105 l-212 212l389 389l247 -247l-95 -96l18 -17q47 -49 77 -100l29 29q35 35 62.5 88t27.5 96q0 93 -66 159l-141 141q-66 66 -159 66q-95 0 -159 -66l-283 -283q-66 -64 -66 -159z" /> | ||
174 | +<glyph unicode="" d="M200 100v953q0 21 30 46t81 48t129 38t163 15t162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5zM300 300h600v700h-600v-700zM496 150q0 -43 30.5 -73.5t73.5 -30.5t73.5 30.5t30.5 73.5t-30.5 73.5t-73.5 30.5 t-73.5 -30.5t-30.5 -73.5z" /> | ||
175 | +<glyph unicode="" d="M0 0l303 380l207 208l-210 212h300l267 279l-35 36q-15 14 -15 35t15 35q14 15 35 15t35 -15l283 -282q15 -15 15 -36t-15 -35q-14 -15 -35 -15t-35 15l-36 35l-279 -267v-300l-212 210l-208 -207z" /> | ||
176 | +<glyph unicode="" d="M295 433h139q5 -77 48.5 -126.5t117.5 -64.5v335q-6 1 -15.5 4t-11.5 3q-46 14 -79 26.5t-72 36t-62.5 52t-40 72.5t-16.5 99q0 92 44 159.5t109 101t144 40.5v78h100v-79q38 -4 72.5 -13.5t75.5 -31.5t71 -53.5t51.5 -84t24.5 -118.5h-159q-8 72 -35 109.5t-101 50.5 v-307l64 -14q34 -7 64 -16.5t70 -31.5t67.5 -52t47.5 -80.5t20 -112.5q0 -139 -89 -224t-244 -96v-77h-100v78q-152 17 -237 104q-40 40 -52.5 93.5t-15.5 139.5zM466 889q0 -29 8 -51t16.5 -34t29.5 -22.5t31 -13.5t38 -10q7 -2 11 -3v274q-61 -8 -97.5 -37.5t-36.5 -102.5 zM700 237q170 18 170 151q0 64 -44 99.5t-126 60.5v-311z" /> | ||
177 | +<glyph unicode="" d="M100 600v100h166q-24 49 -44 104q-10 26 -14.5 55.5t-3 72.5t25 90t68.5 87q97 88 263 88q129 0 230 -89t101 -208h-153q0 52 -34 89.5t-74 51.5t-76 14q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -28 16.5 -69.5t28 -62.5t41.5 -72h241v-100h-197q8 -50 -2.5 -115 t-31.5 -94q-41 -59 -99 -113q35 11 84 18t70 7q33 1 103 -16t103 -17q76 0 136 30l50 -147q-41 -25 -80.5 -36.5t-59 -13t-61.5 -1.5q-23 0 -128 33t-155 29q-39 -4 -82 -17t-66 -25l-24 -11l-55 145l16.5 11t15.5 10t13.5 9.5t14.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221z" /> | ||
178 | +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM602 900l298 300l298 -300h-198v-900h-200v900h-198z" /> | ||
179 | +<glyph unicode="" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v200h100v-100h200v-100h-300zM700 400v100h300v-200h-99v-100h-100v100h99v100h-200zM700 700v500h300v-500h-100v100h-100v-100h-100zM801 900h100v200h-100v-200z" /> | ||
180 | +<glyph unicode="" d="M2 300h198v900h200v-900h198l-298 -300zM700 0v500h300v-500h-100v100h-100v-100h-100zM700 700v200h100v-100h200v-100h-300zM700 1100v100h300v-200h-99v-100h-100v100h99v100h-200zM801 200h100v200h-100v-200z" /> | ||
181 | +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 100v400h300v-500h-100v100h-200zM800 1100v100h200v-500h-100v400h-100zM901 200h100v200h-100v-200z" /> | ||
182 | +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM800 400v100h200v-500h-100v400h-100zM800 800v400h300v-500h-100v100h-200zM901 900h100v200h-100v-200z" /> | ||
183 | +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h500v-200h-500zM700 400v200h400v-200h-400zM700 700v200h300v-200h-300zM700 1000v200h200v-200h-200z" /> | ||
184 | +<glyph unicode="" d="M2 300l298 -300l298 300h-198v900h-200v-900h-198zM700 100v200h200v-200h-200zM700 400v200h300v-200h-300zM700 700v200h400v-200h-400zM700 1000v200h500v-200h-500z" /> | ||
185 | +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q162 0 281 -118.5t119 -281.5v-300q0 -165 -118.5 -282.5t-281.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500z" /> | ||
186 | +<glyph unicode="" d="M0 400v300q0 163 119 281.5t281 118.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-163 0 -281.5 117.5t-118.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM400 300l333 250l-333 250v-500z" /> | ||
187 | +<glyph unicode="" d="M0 400v300q0 163 117.5 281.5t282.5 118.5h300q163 0 281.5 -119t118.5 -281v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-300q-165 0 -282.5 117.5t-117.5 282.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 700l250 -333l250 333h-500z" /> | ||
188 | +<glyph unicode="" d="M0 400v300q0 165 117.5 282.5t282.5 117.5h300q165 0 282.5 -117.5t117.5 -282.5v-300q0 -162 -118.5 -281t-281.5 -119h-300q-165 0 -282.5 118.5t-117.5 281.5zM200 300q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5 h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM300 400h500l-250 333z" /> | ||
189 | +<glyph unicode="" d="M0 400v300h300v200l400 -350l-400 -350v200h-300zM500 0v200h500q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-500v200h400q165 0 282.5 -117.5t117.5 -282.5v-300q0 -165 -117.5 -282.5t-282.5 -117.5h-400z" /> | ||
190 | +<glyph unicode="" d="M217 519q8 -19 31 -19h302q-155 -438 -160 -458q-5 -21 4 -32l9 -8h9q14 0 26 15q11 13 274.5 321.5t264.5 308.5q14 19 5 36q-8 17 -31 17l-301 -1q1 4 78 219.5t79 227.5q2 15 -5 27l-9 9h-9q-15 0 -25 -16q-4 -6 -98 -111.5t-228.5 -257t-209.5 -237.5q-16 -19 -6 -41 z" /> | ||
191 | +<glyph unicode="" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q47 0 100 15v185h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h500v185q-14 4 -114 7.5t-193 5.5l-93 2q-165 0 -282.5 -117.5t-117.5 -282.5v-300zM600 400v300h300v200l400 -350l-400 -350v200h-300z " /> | ||
192 | +<glyph unicode="" d="M0 400q0 -165 117.5 -282.5t282.5 -117.5h300q163 0 281.5 117.5t118.5 282.5v98l-78 73l-122 -123v-148q0 -41 -29.5 -70.5t-70.5 -29.5h-500q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5h156l118 122l-74 78h-100q-165 0 -282.5 -117.5t-117.5 -282.5 v-300zM496 709l353 342l-149 149h500v-500l-149 149l-342 -353z" /> | ||
193 | +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM406 600 q0 80 57 137t137 57t137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137z" /> | ||
194 | +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 800l445 -500l450 500h-295v400h-300v-400h-300zM900 150h100v50h-100v-50z" /> | ||
195 | +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 700h300v-300h300v300h295l-445 500zM900 150h100v50h-100v-50z" /> | ||
196 | +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 705l305 -305l596 596l-154 155l-442 -442l-150 151zM900 150h100v50h-100v-50z" /> | ||
197 | +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM100 988l97 -98l212 213l-97 97zM200 400l697 1l3 699l-250 -239l-149 149l-212 -212l149 -149zM900 150h100v50h-100v-50z" /> | ||
198 | +<glyph unicode="" d="M0 0v275q0 11 7 18t18 7h1048q11 0 19 -7.5t8 -17.5v-275h-1100zM200 612l212 -212l98 97l-213 212zM300 1200l239 -250l-149 -149l212 -212l149 148l249 -237l-1 697zM900 150h100v50h-100v-50z" /> | ||
199 | +<glyph unicode="" d="M23 415l1177 784v-1079l-475 272l-310 -393v416h-392zM494 210l672 938l-672 -712v-226z" /> | ||
200 | +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-850q0 -21 -15 -35.5t-35 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200z" /> | ||
201 | +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-218l-276 -275l-120 120l-126 -127h-378v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM581 306l123 123l120 -120l353 352l123 -123l-475 -476zM600 1000h100v200h-100v-200z" /> | ||
202 | +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-269l-103 -103l-170 170l-298 -298h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 1000h100v200h-100v-200zM700 133l170 170l-170 170l127 127l170 -170l170 170l127 -128l-170 -169l170 -170 l-127 -127l-170 170l-170 -170z" /> | ||
203 | +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-300h-400v-200h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300l300 -300l300 300h-200v300h-200v-300h-200zM600 1000v200h100v-200h-100z" /> | ||
204 | +<glyph unicode="" d="M0 150v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100l200 -200v-402l-200 200l-298 -298h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5zM600 300h200v-300h200v300h200l-300 300zM600 1000v200h100v-200h-100z" /> | ||
205 | +<glyph unicode="" d="M0 250q0 -21 14.5 -35.5t35.5 -14.5h1100q21 0 35.5 14.5t14.5 35.5v550h-1200v-550zM0 900h1200v150q0 21 -14.5 35.5t-35.5 14.5h-1100q-21 0 -35.5 -14.5t-14.5 -35.5v-150zM100 300v200h400v-200h-400z" /> | ||
206 | +<glyph unicode="" d="M0 400l300 298v-198h400v-200h-400v-198zM100 800v200h100v-200h-100zM300 800v200h100v-200h-100zM500 800v200h400v198l300 -298l-300 -298v198h-400zM800 300v200h100v-200h-100zM1000 300h100v200h-100v-200z" /> | ||
207 | +<glyph unicode="" d="M100 700v400l50 100l50 -100v-300h100v300l50 100l50 -100v-300h100v300l50 100l50 -100v-400l-100 -203v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447zM800 597q0 -29 10.5 -55.5t25 -43t29 -28.5t25.5 -18l10 -5v-397q0 -21 14.5 -35.5 t35.5 -14.5h200q21 0 35.5 14.5t14.5 35.5v1106q0 31 -18 40.5t-44 -7.5l-276 -116q-25 -17 -43.5 -51.5t-18.5 -65.5v-359z" /> | ||
208 | +<glyph unicode="" d="M100 0h400v56q-75 0 -87.5 6t-12.5 44v394h500v-394q0 -38 -12.5 -44t-87.5 -6v-56h400v56q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v888q0 22 25 34.5t50 13.5l25 2v56h-400v-56q75 0 87.5 -6t12.5 -44v-394h-500v394q0 38 12.5 44t87.5 6v56h-400v-56q4 0 11 -0.5 t24 -3t30 -7t24 -15t11 -24.5v-888q0 -22 -25 -34.5t-50 -13.5l-25 -2v-56z" /> | ||
209 | +<glyph unicode="" d="M0 300q0 -41 29.5 -70.5t70.5 -29.5h300q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-300q-41 0 -70.5 -29.5t-29.5 -70.5v-500zM100 100h400l200 200h105l295 98v-298h-425l-100 -100h-375zM100 300v200h300v-200h-300zM100 600v200h300v-200h-300z M100 1000h400l200 -200v-98l295 98h105v200h-425l-100 100h-375zM700 402v163l400 133v-163z" /> | ||
210 | +<glyph unicode="" d="M16.5 974.5q0.5 -21.5 16 -90t46.5 -140t104 -177.5t175 -208q103 -103 207.5 -176t180 -103.5t137 -47t92.5 -16.5l31 1l163 162q17 18 13.5 41t-22.5 37l-192 136q-19 14 -45 12t-42 -19l-118 -118q-142 101 -268 227t-227 268l118 118q17 17 20 41.5t-11 44.5 l-139 194q-14 19 -36.5 22t-40.5 -14l-162 -162q-1 -11 -0.5 -32.5z" /> | ||
211 | +<glyph unicode="" d="M0 50v212q0 20 10.5 45.5t24.5 39.5l365 303v50q0 4 1 10.5t12 22.5t30 28.5t60 23t97 10.5t97 -10t60 -23.5t30 -27.5t12 -24l1 -10v-50l365 -303q14 -14 24.5 -39.5t10.5 -45.5v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-20 0 -35 14.5t-15 35.5zM0 712 q0 -21 14.5 -33.5t34.5 -8.5l202 33q20 4 34.5 21t14.5 38v146q141 24 300 24t300 -24v-146q0 -21 14.5 -38t34.5 -21l202 -33q20 -4 34.5 8.5t14.5 33.5v200q-6 8 -19 20.5t-63 45t-112 57t-171 45t-235 20.5q-92 0 -175 -10.5t-141.5 -27t-108.5 -36.5t-81.5 -40 t-53.5 -36.5t-31 -27.5l-9 -10v-200z" /> | ||
212 | +<glyph unicode="" d="M100 0v100h1100v-100h-1100zM175 200h950l-125 150v250l100 100v400h-100v-200h-100v200h-200v-200h-100v200h-200v-200h-100v200h-100v-400l100 -100v-250z" /> | ||
213 | +<glyph unicode="" d="M100 0h300v400q0 41 -29.5 70.5t-70.5 29.5h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-400zM500 0v1000q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-1000h-300zM900 0v700q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-700h-300z" /> | ||
214 | +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" /> | ||
215 | +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h100v200h100v-200h100v500h-100v-200h-100v200h-100v-500zM600 300h200v100h100v300h-100v100h-200v-500 zM700 400v300h100v-300h-100z" /> | ||
216 | +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v100h-200v300h200v100h-300v-500zM600 300h300v100h-200v300h200v100h-300v-500z" /> | ||
217 | +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 550l300 -150v300zM600 400l300 150l-300 150v-300z" /> | ||
218 | +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300v500h700v-500h-700zM300 400h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130v-300zM575 549 q0 -65 27 -107t68 -42h130v300h-130q-38 0 -66.5 -43t-28.5 -108z" /> | ||
219 | +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v300h-200v100h200v100h-300v-300h200v-100h-200v-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" /> | ||
220 | +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 300h300v400h-200v100h-100v-500zM301 400v200h100v-200h-100zM601 300h100v100h-100v-100zM700 700h100 v-400h100v500h-200v-100z" /> | ||
221 | +<glyph unicode="" d="M-100 300v500q0 124 88 212t212 88h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212zM100 200h900v700h-900v-700zM200 700v100h300v-300h-99v-100h-100v100h99v200h-200zM201 300v100h100v-100h-100zM601 300v100h100v-100h-100z M700 700v100h200v-500h-100v400h-100z" /> | ||
222 | +<glyph unicode="" d="M4 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM186 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 500v200 l100 100h300v-100h-300v-200h300v-100h-300z" /> | ||
223 | +<glyph unicode="" d="M0 600q0 162 80 299t217 217t299 80t299 -80t217 -217t80 -299t-80 -299t-217 -217t-299 -80t-299 80t-217 217t-80 299zM182 600q0 -171 121.5 -292.5t292.5 -121.5t292.5 121.5t121.5 292.5t-121.5 292.5t-292.5 121.5t-292.5 -121.5t-121.5 -292.5zM400 400v400h300 l100 -100v-100h-100v100h-200v-100h200v-100h-200v-100h-100zM700 400v100h100v-100h-100z" /> | ||
224 | +<glyph unicode="" d="M-14 494q0 -80 56.5 -137t135.5 -57h222v300h400v-300h128q120 0 205 86.5t85 207.5t-85 207t-205 86q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200h200v300h200v-300h200 l-300 -300z" /> | ||
225 | +<glyph unicode="" d="M-14 494q0 -80 56.5 -137t135.5 -57h8l414 414l403 -403q94 26 154.5 104.5t60.5 178.5q0 120 -85 206.5t-205 86.5q-46 0 -90 -14q-44 97 -134.5 156.5t-200.5 59.5q-152 0 -260 -107.5t-108 -260.5q0 -25 2 -37q-66 -14 -108.5 -67.5t-42.5 -122.5zM300 200l300 300 l300 -300h-200v-300h-200v300h-200z" /> | ||
226 | +<glyph unicode="" d="M100 200h400v-155l-75 -45h350l-75 45v155h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170z" /> | ||
227 | +<glyph unicode="" d="M121 700q0 -53 28.5 -97t75.5 -65q-4 -16 -4 -38q0 -74 52.5 -126.5t126.5 -52.5q56 0 100 30v-306l-75 -45h350l-75 45v306q46 -30 100 -30q74 0 126.5 52.5t52.5 126.5q0 24 -9 55q50 32 79.5 83t29.5 112q0 90 -61.5 155.5t-150.5 71.5q-26 89 -99.5 145.5 t-167.5 56.5q-116 0 -197.5 -81.5t-81.5 -197.5q0 -4 1 -11.5t1 -11.5q-14 2 -23 2q-74 0 -126.5 -52.5t-52.5 -126.5z" /> | ||
228 | +</font> | ||
229 | +</defs></svg> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
No preview for this file type
No preview for this file type
snakes/utils/andy/resources/index.html
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | + <link type="text/css" href="r/css/bootstrap-theme.css" rel="stylesheet"/> | ||
5 | + <link type="text/css" href="r/css/bootstrap.css" rel="stylesheet"/> | ||
6 | + <script src="r/js/jquery.min.js"></script> | ||
7 | + <script src="r/js/jquery.periodic.js"></script> | ||
8 | + <script src="r/js/bootstrap.min.js"></script> | ||
9 | + <script src="r/js/d3.min.js"></script> | ||
10 | + <script src="r/js/simulator.js"></script> | ||
11 | + <style> | ||
12 | + path { stroke: steelblue; | ||
13 | + stroke-width: 2; | ||
14 | + fill: none; } | ||
15 | + line { stroke: black; } | ||
16 | + text { font-family: Arial; | ||
17 | + font-size: 9pt; } | ||
18 | + </style> | ||
19 | +</head> | ||
20 | +<body> | ||
21 | + <header class="navbar navbar-static-top"> | ||
22 | + <nav class="navbar navbar-default" role="navigation"> | ||
23 | + <div class="container-fluid"> | ||
24 | + <div class="navbar-header"> | ||
25 | + <button type="button" class="navbar-toggle" | ||
26 | + data-toggle="collapse" | ||
27 | + data-target="#bs-example-navbar-collapse-6"> | ||
28 | + <span class="sr-only">Toggle navigation</span> | ||
29 | + </button> | ||
30 | + <a class="navbar-brand" href="#">Simulation SNAKES</a> | ||
31 | + </div> | ||
32 | + <div class="collapse navbar-collapse" | ||
33 | + id="bs-example-navbar-collapse-6"> | ||
34 | + <ul class="nav navbar-nav" id="nav_sim"> | ||
35 | + <li><a id="ui-reset">Reset Simulation</a></li> | ||
36 | + <li><a id="ui-quit">Stop Simulation</a></li> | ||
37 | + <li><a id="ui-help">Help</a></li> | ||
38 | + </ul> | ||
39 | + </div><!-- /.navbar-collapse --> | ||
40 | + </div> | ||
41 | + </nav> | ||
42 | + </header> | ||
43 | + <!-- model to be simulated --> | ||
44 | + %(model)s | ||
45 | + | ||
46 | + <!-- information about the simulator --> | ||
47 | + <div aria-hidden="true" aria-labelledby="myModalLabel" class="modal fade" | ||
48 | + id="about" role="dialog" tabindex="-1"> | ||
49 | + <div class="modal-dialog"> | ||
50 | + <div class="modal-content"> | ||
51 | + <div class="modal-header"> | ||
52 | + <button aria-hidden="true" class="close" | ||
53 | + data-dismiss="modal" type="button">x</button> | ||
54 | + <h4 class="modal-title" id="myModalLabel">Petri Net</h4> | ||
55 | + </div> | ||
56 | + <div class="modal-body"> | ||
57 | + <p> | ||
58 | + <span class="title">Andy simulator is part of the | ||
59 | + SNAKES toolkit</span><br /> | ||
60 | + (C) 2014 Franck Pommereau | ||
61 | + </p> | ||
62 | + <p> | ||
63 | + <a href="http://www.ibisc.univ-evry.fr/~fpommereau/SNAKES" | ||
64 | + target="_blank">SNAKES homepage</a> | ||
65 | + </p> | ||
66 | + </div> | ||
67 | + <div class="modal-footer"> | ||
68 | + <button class="btn btn-default" data-dismiss="modal" | ||
69 | + type="button">Close</button> | ||
70 | + </div> | ||
71 | + </div> | ||
72 | + </div> | ||
73 | + </div> | ||
74 | + <script> | ||
75 | + $(document).ready(function(){ | ||
76 | + $.simisc({ "nav":{ "about": { "text": "About", | ||
77 | + "attr": { "id":"ui-about", | ||
78 | + "data-toggle": "modal", | ||
79 | + "data-target": "#about" | ||
80 | + } } }, | ||
81 | + "graph": { "color": { "y":"red", | ||
82 | + "x":"blue" } } }); | ||
83 | + }); | ||
84 | + </script> | ||
85 | +</body> | ||
86 | +</html> |
1 | +/*! | ||
2 | + * Bootstrap v3.1.1 (http://getbootstrap.com) | ||
3 | + * Copyright 2011-2014 Twitter, Inc. | ||
4 | + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | ||
5 | + */ | ||
6 | +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).focus()}}}};var g=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new f(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=f,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=g,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",e,f.prototype.toggle).on("keydown.bs.dropdown.data-api",e+", [role=menu], [role=listbox]",f.prototype.keydown)}(jQuery),+function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};b.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},b.prototype.toggle=function(a){return this[this.isShown?"hide":"show"](a)},b.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(document.body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{relatedTarget:b});d?c.$element.find(".modal-dialog").one(a.support.transition.end,function(){c.$element.focus().trigger(e)}).emulateTransitionEnd(300):c.$element.focus().trigger(e)}))},b.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one(a.support.transition.end,a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},b.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.focus()},this))},b.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},b.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden.bs.modal")})},b.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},b.prototype.backdrop=function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i<p?"right":e,d.removeClass(l).addClass(e)}var q=this.getCalculatedOffset(e,h,i,j);this.applyPlacement(q,e),this.hoverState=null;var r=function(){c.$element.trigger("shown.bs."+c.type)};a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,r).emulateTransitionEnd(150):r()}},b.prototype.applyPlacement=function(b,c){var d,e=this.tip(),f=e[0].offsetWidth,g=e[0].offsetHeight,h=parseInt(e.css("margin-top"),10),i=parseInt(e.css("margin-left"),10);isNaN(h)&&(h=0),isNaN(i)&&(i=0),b.top=b.top+h,b.left=b.left+i,a.offset.setOffset(e[0],a.extend({using:function(a){e.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),e.addClass("in");var j=e[0].offsetWidth,k=e[0].offsetHeight;if("top"==c&&k!=g&&(d=!0,b.top=b.top+g-k),/bottom|top/.test(c)){var l=0;b.left<0&&(l=-2*b.left,b.left=0,e.offset(b),j=e[0].offsetWidth,k=e[0].offsetHeight),this.replaceArrow(l-f+j,j,"left")}else this.replaceArrow(k-g,k,"top");d&&e.offset(b)},b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},b.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one(a.support.transition.end,b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},b.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},b.prototype.hasContent=function(){return this.getTitle()},b.prototype.getPosition=function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},b.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},b.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},b.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},b.prototype.enable=function(){this.enabled=!0},b.prototype.disable=function(){this.enabled=!1},b.prototype.toggleEnabled=function(){this.enabled=!this.enabled},b.prototype.toggle=function(b){var c=b?a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type):this;c.tip().hasClass("in")?c.leave(c):c.enter(c)},b.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.tooltip",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.tooltip.Constructor=b,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(jQuery),+function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");b.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
snakes/utils/andy/resources/js/d3.min.js
0 → 100644
This diff could not be displayed because it is too large.
snakes/utils/andy/resources/js/jquery.min.js
0 → 100644
This diff could not be displayed because it is too large.
1 | +/*! | ||
2 | + * jQuery periodic plugin | ||
3 | + * | ||
4 | + * Copyright 2010, Tom Anderson | ||
5 | + * Dual licensed under the MIT or GPL Version 2 licenses. | ||
6 | + * | ||
7 | + */ | ||
8 | + | ||
9 | +$.periodic = function (options, callback) { | ||
10 | + | ||
11 | + // if the first argument is a function then assume the options aren't being passed | ||
12 | + if (jQuery.isFunction(options)) { | ||
13 | + callback = options; | ||
14 | + options = {}; | ||
15 | + } | ||
16 | + | ||
17 | + // Merge passed settings with default values | ||
18 | + var settings = jQuery.extend({}, jQuery.periodic.defaults, { | ||
19 | + ajax_complete : ajaxComplete, | ||
20 | + increment : increment, | ||
21 | + reset : reset, | ||
22 | + cancel : cancel | ||
23 | + }, options); | ||
24 | + | ||
25 | + // bookkeeping variables | ||
26 | + settings.cur_period = settings.period; | ||
27 | + settings.tid = false; | ||
28 | + var prev_ajax_response = ''; | ||
29 | + | ||
30 | + run(); | ||
31 | + | ||
32 | + // return settings so user can tweak them externally | ||
33 | + return settings; | ||
34 | + | ||
35 | + // run (or restart if already running) the looping construct | ||
36 | + function run() { | ||
37 | + // clear/stop existing timer (multiple calls to run() won't result in multiple timers) | ||
38 | + cancel(); | ||
39 | + // let it rip! | ||
40 | + settings.tid = setTimeout(function() { | ||
41 | + // set the context (this) for the callback to the settings object | ||
42 | + callback.call(settings); | ||
43 | + | ||
44 | + // compute the next value for cur_period | ||
45 | + increment(); | ||
46 | + | ||
47 | + // queue up the next run | ||
48 | + if(settings.tid) | ||
49 | + run(); | ||
50 | + }, settings.cur_period); | ||
51 | + } | ||
52 | + | ||
53 | + // utility function for use with ajax calls | ||
54 | + function ajaxComplete(xhr, status) { | ||
55 | + if (status === 'success' && prev_ajax_response !== xhr.responseText) { | ||
56 | + // reset the period whenever the response changes | ||
57 | + prev_ajax_response = xhr.responseText; | ||
58 | + reset(); | ||
59 | + } | ||
60 | + } | ||
61 | + | ||
62 | + // compute the next delay | ||
63 | + function increment() { | ||
64 | + settings.cur_period *= settings.decay; | ||
65 | + if (settings.cur_period < settings.period) { | ||
66 | + // don't let it drop below the minimum | ||
67 | + reset(); | ||
68 | + } else if (settings.cur_period > settings.max_period) { | ||
69 | + settings.cur_period = settings.max_period; | ||
70 | + if (settings.on_max !== undefined) { | ||
71 | + // call the user-supplied callback if we reach max_period | ||
72 | + settings.on_max.call(settings); | ||
73 | + } | ||
74 | + } | ||
75 | + } | ||
76 | + | ||
77 | + function reset() { | ||
78 | + settings.cur_period = settings.period; | ||
79 | + // restart with the new timeout | ||
80 | + run(); | ||
81 | + } | ||
82 | + | ||
83 | + function cancel() { | ||
84 | + clearTimeout(settings.tid); | ||
85 | + settings.tid = null; | ||
86 | + } | ||
87 | + | ||
88 | + // other functions we might want to implement | ||
89 | + function pause() {} | ||
90 | + function resume() {} | ||
91 | + function log() {} | ||
92 | +}; | ||
93 | + | ||
94 | +jQuery.periodic.defaults = { | ||
95 | + period : 4000, // 4 sec. | ||
96 | + max_period : 1800000, // 30 min. | ||
97 | + decay : 1.5, // time period multiplier | ||
98 | + on_max : undefined // called if max_period is reached | ||
99 | +}; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
snakes/utils/andy/resources/js/simulator.js
0 → 100644
1 | +/*! | ||
2 | + * jQuery simulator plugin | ||
3 | + * version 2.4.2 | ||
4 | + * Copyright 2014, IBISC University Evry Val d'Essonne, dev by Jean-Baptiste Munieres | ||
5 | + * | ||
6 | + */ | ||
7 | + | ||
8 | +//TOTEST :S => Success, B => Bug, N => Non tested, R => new version retry all test | ||
9 | +/* | ||
10 | + | ||
11 | +1er jet de test => trace only: | ||
12 | + | ||
13 | + Faire des successions d'etat : S | ||
14 | + Revenir dans la trace : S | ||
15 | + Ecraser la trace pour une nouvelle : S => probleme avec le off(click **) | ||
16 | + Revenir Init : S | ||
17 | + Revenir a la Fin : S | ||
18 | + Repartir de la fin pour continuer la trace : S | ||
19 | + Lancer le player : S | ||
20 | + Stoper le player en cours : S | ||
21 | + Stop et Play succesivement : S | ||
22 | + Accelerer la vitesse : S | ||
23 | + Baisser la vitesse : S | ||
24 | + Faire en play milieu de la trace : S | ||
25 | + Test l'aide : N | ||
26 | + Test Stop simulation : R | ||
27 | + Test Reset simulation : S | ||
28 | + | ||
29 | +2eme jeu de test => graph & trace: | ||
30 | + | ||
31 | + A faire dans le graph : | ||
32 | + | ||
33 | + Faire des successions d'etat : S | ||
34 | + Revenir dans la trace : S | ||
35 | + Ecraser la trace pour une nouvelle : S | ||
36 | + Lancer le player : S | ||
37 | + Stoper le player en cours : S | ||
38 | + Stop et Play succesivement : S | ||
39 | + Accelerer la vitesse : S | ||
40 | + Baisser la vitesse : S | ||
41 | + Faire en play milieu de la trace : S | ||
42 | + Test Reset simulation : S | ||
43 | + | ||
44 | + Decocher la case pour afficher toutes les variables : S | ||
45 | + Decocher les variables une par une : S | ||
46 | + Cocher la case pour afficher toutes les variables : S | ||
47 | + Cocher les variables une par une : S | ||
48 | + | ||
49 | + Afficher les tooltips depuis l'axe des x : S | ||
50 | + Afficher un tooltip depuis un point : S | ||
51 | + | ||
52 | + A faire dans la trace avec nouvelle version : | ||
53 | + Tester tout dans 1er jeu | ||
54 | + | ||
55 | + Changer le debut de l'interval : S | ||
56 | + Avec un debut d'interval modifier : | ||
57 | + Faire des succesions d'etat : S | ||
58 | + Ecraser la trace pour une nouvelle : S | ||
59 | + Changer la fin de trace : S | ||
60 | + Impossibilite d'avoir fin < debut : S | ||
61 | + Revenir direct a la fin depuis le graphe : S | ||
62 | + Choisir le debut sur la trace & fin sur le graph : S | ||
63 | + | ||
64 | + Groups | ||
65 | + Decocher la case qui active toutes les transitions : S | ||
66 | + Decocher les transitions un par un : S | ||
67 | + Cocher la case qui active toutes les transitions : S | ||
68 | + Cocher les transitions une par une : S | ||
69 | + | ||
70 | + Refaire ce qu'il y a plus haut avec en plus : | ||
71 | + Changer l'interval : S S S S | ||
72 | +*/ | ||
73 | + | ||
74 | +(function($) { | ||
75 | + | ||
76 | + //Plugin for function who need object | ||
77 | + //Ne pas rebind plusieur fois sur le meme objet sous peine de gros lag | ||
78 | + jQuery.fn.simisc = function(option, callback){ | ||
79 | + | ||
80 | + /** | ||
81 | + * @description Add attribute and click handler for get_state | ||
82 | + * @param {Integer} key The state number to get | ||
83 | + * @param {Integer} instance_key The key for get the data (only for next version (3.0)) | ||
84 | + */ | ||
85 | + $.fn.get_attr_link = function(key, instance_key) { | ||
86 | + console.log("get_attr_link") | ||
87 | + $(this).attr({"data-num": key}) | ||
88 | + $(this).on("click",get_trace) | ||
89 | + } | ||
90 | + | ||
91 | + /** | ||
92 | + * @description Add attributes and click handler for set_state | ||
93 | + * @param {Integer} value Dictionnary for set a new state : { action : String, state : Integer, mode : Integer } | ||
94 | + * @param {Integer} instance_key The key for get the data (only for next version (3.0)) | ||
95 | + */ | ||
96 | + $.fn.set_attr_link = function(value, instance_key){ | ||
97 | + console.log("set_attr_link") | ||
98 | + $(this).attr({"data-action": value.action , "data-state" : value.state, "data-mode" : value.mode, "data-groups" : value.groups}) | ||
99 | + $(this).on("click",set_trace) | ||
100 | + } | ||
101 | + | ||
102 | + /** | ||
103 | + * @description @see $.fn.set_attr_link | ||
104 | + */ | ||
105 | + function set_trace(object, instance_key) { | ||
106 | + $.simisc.set_trace(this, instance_key ); | ||
107 | + } | ||
108 | + | ||
109 | + /** | ||
110 | + * @description @see $.fn.get_attr_link | ||
111 | + */ | ||
112 | + function get_trace(object, instance_key) { | ||
113 | + $.simisc.get_trace(this, instance_key ); | ||
114 | + } | ||
115 | + | ||
116 | + //Remove all handler on object (optimise for just delete the handler of click) | ||
117 | + $(this).off() | ||
118 | + | ||
119 | + //Reset the attributes for object | ||
120 | + $(this).removeAttr("data-num data-action data-mode data-state") | ||
121 | + | ||
122 | + return $(this) | ||
123 | + } | ||
124 | + | ||
125 | + //Plugin principal | ||
126 | + jQuery.simisc = function (options, callback) { | ||
127 | + | ||
128 | + // if the first argument is a function then assume the options aren't being passed | ||
129 | + if (jQuery.isFunction(options)) { | ||
130 | + callback = options; | ||
131 | + options = {}; | ||
132 | + } | ||
133 | + else{ | ||
134 | + | ||
135 | + // Merge passed settings with default values | ||
136 | + $.simisc.instance.push($.extend(true, {}, $.simisc.defaults, options)); | ||
137 | + | ||
138 | + //For version 3.0 with multiple simulator in same page | ||
139 | + var instance_key = $.simisc.instance.length-1, | ||
140 | + settings = $.extend(true, {}, $.simisc.defaults, options), | ||
141 | + //Contains all the history | ||
142 | + _history, | ||
143 | + _data, | ||
144 | + //Contains the current state num for user | ||
145 | + _clk_end, | ||
146 | + //Contains the begin state | ||
147 | + _clk_begin, | ||
148 | + //Current trace | ||
149 | + _trace, | ||
150 | + //Current modes | ||
151 | + _modes, | ||
152 | + //Current variables | ||
153 | + _variables, | ||
154 | + //Current groups to see | ||
155 | + _groups, | ||
156 | + //True if we look into the history | ||
157 | + _isHistory, | ||
158 | + //Contain all variables for graph | ||
159 | + _graph = {}, | ||
160 | + //variables for player | ||
161 | + _record = { | ||
162 | + "speed":1, | ||
163 | + "max_speed":16, | ||
164 | + "play": false | ||
165 | + }, | ||
166 | + //Function can be call by simulator | ||
167 | + update = { | ||
168 | + settext : function (action) { | ||
169 | + $(action.select).text(action.text); | ||
170 | + }, | ||
171 | + sethtml : function (action) { | ||
172 | + $(action.select).html(action.html); | ||
173 | + }, | ||
174 | + clear : function (action) { | ||
175 | + $(action.select).html(""); | ||
176 | + }, | ||
177 | + setlist : function (action) { | ||
178 | + ul = $(action.select); | ||
179 | + ul.html(""); | ||
180 | + $.each(action.items, function (num, item) { | ||
181 | + ul.append("<li>" + item + "</li>"); | ||
182 | + }); | ||
183 | + }, | ||
184 | + dropclass : function (action) { | ||
185 | + $(action.select).removeClass(action.class); | ||
186 | + }, | ||
187 | + addclass : function (action) { | ||
188 | + $(action.select).addClass(action.class); | ||
189 | + } | ||
190 | + }; | ||
191 | + //Init all the simulator | ||
192 | + init(); | ||
193 | + } | ||
194 | + | ||
195 | + /** | ||
196 | + * @description Function for create/add the player to the view | ||
197 | + */ | ||
198 | + function init_player() { | ||
199 | + console.log("init player") | ||
200 | + div = document.createElement("div") | ||
201 | + | ||
202 | + div_gauche = document.createElement("div") | ||
203 | + div_bouton = document.createElement("div") | ||
204 | + | ||
205 | + span = document.createElement("span") | ||
206 | + input = document.createElement("input") | ||
207 | + | ||
208 | + div_droite = document.createElement("div") | ||
209 | + span = document.createElement("span") | ||
210 | + | ||
211 | + $(div).attr({ | ||
212 | + "class": "input-group col-md-12", | ||
213 | + "id": "frames" | ||
214 | + }); | ||
215 | + | ||
216 | + $(div_bouton).attr({ | ||
217 | + "class": "btn-group" | ||
218 | + }) | ||
219 | + | ||
220 | + //Left part of player | ||
221 | + span = document.createElement("span") | ||
222 | + $(span).addClass("glyphicon glyphicon-play") | ||
223 | + | ||
224 | + bouton_play = document.createElement("div") | ||
225 | + $(bouton_play).attr({ | ||
226 | + "id": "simisc_play", | ||
227 | + "type": "button", | ||
228 | + "class": "btn btn-default", | ||
229 | + }) | ||
230 | + .tooltip({ | ||
231 | + title: "Launch the player", | ||
232 | + trigger: "hover", | ||
233 | + placement: "top", | ||
234 | + delay: { show: 500, hide: 100 } | ||
235 | + }) | ||
236 | + .append(span) | ||
237 | + .click(function(){ | ||
238 | + play(this) | ||
239 | + }) | ||
240 | + | ||
241 | + | ||
242 | + span = document.createElement("span") | ||
243 | + $(span).addClass("glyphicon glyphicon-stop") | ||
244 | + | ||
245 | + bouton_stop = document.createElement("div") | ||
246 | + $(bouton_stop).attr({ | ||
247 | + "id": "simisc_stop", | ||
248 | + "type": "button", | ||
249 | + "class": "btn btn-default", | ||
250 | + "style": "display:none;" | ||
251 | + }) | ||
252 | + .tooltip({ | ||
253 | + title: "Stop the player", | ||
254 | + trigger: "hover", | ||
255 | + placement: "top", | ||
256 | + delay: { show: 500, hide: 100 } | ||
257 | + }) | ||
258 | + .append(span) | ||
259 | + .click(function(){ | ||
260 | + stop(this) | ||
261 | + }) | ||
262 | + | ||
263 | + $(div_gauche).attr({ | ||
264 | + "class": "input-group-btn", | ||
265 | + "id": "simisc_left_player" | ||
266 | + }) | ||
267 | + .append([bouton_play, bouton_stop]) | ||
268 | + | ||
269 | + //Input in middle | ||
270 | + $(input).attr({ | ||
271 | + "value": 10, | ||
272 | + "type": "text", | ||
273 | + "class": "form-control" | ||
274 | + }); | ||
275 | + | ||
276 | + | ||
277 | + //Right part of player | ||
278 | + span = document.createElement("span") | ||
279 | + $(span).addClass("glyphicon glyphicon-minus-sign") | ||
280 | + | ||
281 | + bouton_moins = document.createElement("div") | ||
282 | + $(bouton_moins).attr({ | ||
283 | + "id": "simisc_down", | ||
284 | + "type": "button", | ||
285 | + "class": "btn btn-default" | ||
286 | + }) | ||
287 | + .tooltip({ | ||
288 | + title: "Click for down the speed per tick", | ||
289 | + trigger: "hover", | ||
290 | + placement: "top", | ||
291 | + delay: { show: 500, hide: 100 } | ||
292 | + }) | ||
293 | + .append(span) | ||
294 | + .click(function(){ | ||
295 | + down_speed() | ||
296 | + }) | ||
297 | + | ||
298 | + | ||
299 | + span = document.createElement("span") | ||
300 | + $(span).addClass("glyphicon glyphicon-plus-sign") | ||
301 | + | ||
302 | + bouton_plus = document.createElement("div") | ||
303 | + $(bouton_plus).attr({ | ||
304 | + "id": "simisc_up", | ||
305 | + "type": "button", | ||
306 | + "class": "btn btn-default" | ||
307 | + }) | ||
308 | + .tooltip({ | ||
309 | + title: "Click for up the speed per tick", | ||
310 | + trigger: "hover", | ||
311 | + placement: "top", | ||
312 | + delay: { show: 500, hide: 100 } | ||
313 | + }) | ||
314 | + .append(span) | ||
315 | + .click(function(){ | ||
316 | + up_speed() | ||
317 | + }) | ||
318 | + | ||
319 | + $(div_droite).attr({ | ||
320 | + "class": "input-group-btn" | ||
321 | + }) | ||
322 | + .append([bouton_moins, bouton_plus]) | ||
323 | + | ||
324 | + span = document.createElement("span") | ||
325 | + $(span).attr({ | ||
326 | + "class": "input-group-addon", | ||
327 | + "style": "width:56px;text-align:left" | ||
328 | + }) | ||
329 | + | ||
330 | + | ||
331 | + $(div).append([div_gauche, input, span, div_droite]) | ||
332 | + | ||
333 | + $(settings.player.id).append(div); | ||
334 | + set_speed(); | ||
335 | + | ||
336 | + create_modal(settings.player.modal) | ||
337 | + | ||
338 | + $(settings.player.modal.id + " .btn-primary").on("click",function(){ | ||
339 | + play(this, true) | ||
340 | + }) | ||
341 | + } | ||
342 | + | ||
343 | + /** | ||
344 | + * @description Launch the player | ||
345 | + */ | ||
346 | + function play(object, force){ | ||
347 | + console.log("play"); | ||
348 | + | ||
349 | + //If we are in history, we ask the conform to delete trace | ||
350 | + if(force != true && _clk_end < _history.trace.length-1){ | ||
351 | + $(settings.player.modal.id).modal(); | ||
352 | + } | ||
353 | + else{ | ||
354 | + _record.play = true; | ||
355 | + | ||
356 | + _record.begin_frame = _clk_end | ||
357 | + _record.end_frame = _clk_end + parseInt($("#frames input").val(),10); | ||
358 | + | ||
359 | + //Hide all and show stop | ||
360 | + $(settings.player.id + " #simisc_play").hide().appendTo("#simisc_left_player"); | ||
361 | + $(settings.player.id + " #simisc_stop").show(); | ||
362 | + | ||
363 | + //Disabled up & down | ||
364 | + $(settings.player.id + " #simisc_up").attr("disabled",""); | ||
365 | + $(settings.player.id + " #simisc_down").attr("disabled",""); | ||
366 | + if (_clk_end < _history.trace.length-1) { | ||
367 | + cut_trace(0,_clk_end+1) | ||
368 | + } | ||
369 | + _isHistory = false; | ||
370 | + | ||
371 | + $.periodic({period: _record.speed * 1000, decay:1, max_period: _record.speed * 1000}, function() { | ||
372 | + this.cur_period = _record.speed * 1000; | ||
373 | + this.max_period = _record.speed * 1000; | ||
374 | + | ||
375 | + //If there is no more modes to run we stop the player | ||
376 | + if (!_history.modes[_clk_end] || _history.modes[_clk_end].length == 0){ | ||
377 | + stop(object); | ||
378 | + this.cancel(); | ||
379 | + } | ||
380 | + else{ | ||
381 | + _record.begin_frame++; | ||
382 | + | ||
383 | + rdn = Math.floor((Math.random()*_history.modes[_clk_end].length)); | ||
384 | + | ||
385 | + //Create the fake object a for force an set_trace with rdn mode | ||
386 | + a = document.createElement("a"); | ||
387 | + | ||
388 | + $(a).simisc().set_attr_link(_history.modes[_clk_end][rdn], instance_key); | ||
389 | + $(a).html($(a).attr("data-action")) | ||
390 | + | ||
391 | + //If stop is push we stop | ||
392 | + if (_record.play == false || _record.begin_frame == _record.end_frame){ | ||
393 | + stop(object); | ||
394 | + this.cancel(); | ||
395 | + } | ||
396 | + | ||
397 | + //GO to the new state | ||
398 | + $.simisc.set_trace($(a)); | ||
399 | + } | ||
400 | + }); | ||
401 | + } | ||
402 | + } | ||
403 | + | ||
404 | + /** | ||
405 | + * @description Stop the player | ||
406 | + */ | ||
407 | + function stop(object){ | ||
408 | + console.log("stop"); | ||
409 | + _record.play = false; | ||
410 | + //Hide all and show stop | ||
411 | + $(settings.player.id + " #simisc_play").show(); | ||
412 | + $(settings.player.id + " #simisc_stop").hide().appendTo("#simisc_left_player"); | ||
413 | + | ||
414 | + //Disabled up & down | ||
415 | + $(settings.player.id + " #simisc_up").removeAttr("disabled"); | ||
416 | + $(settings.player.id + " #simisc_down").removeAttr("disabled"); | ||
417 | + } | ||
418 | + | ||
419 | + /** | ||
420 | + * @description Down the speed between each ticks | ||
421 | + */ | ||
422 | + function down_speed(){ | ||
423 | + console.log("down speed"); | ||
424 | + _record.speed = Math.min(_record.max_speed,_record.speed * 2); | ||
425 | + set_speed(); | ||
426 | + } | ||
427 | + | ||
428 | + /** | ||
429 | + * @description Up the speed between each ticks | ||
430 | + */ | ||
431 | + function up_speed(){ | ||
432 | + console.log("up_speed"); | ||
433 | + _record.speed = Math.max(1/_record.max_speed,_record.speed / 2); | ||
434 | + set_speed(); | ||
435 | + } | ||
436 | + | ||
437 | + //TODO : afficher le speed avec une fraction => moins rapide = 1/16 plus rapide 16 | ||
438 | + /** | ||
439 | + * @description Set the speed in variable and in view | ||
440 | + */ | ||
441 | + function set_speed(){ | ||
442 | + console.log("set_speed") | ||
443 | + | ||
444 | + text = "16" | ||
445 | + | ||
446 | + switch (_record.speed) { | ||
447 | + case 8 : ; | ||
448 | + case 4 : ; | ||
449 | + case 2 : ; | ||
450 | + case 1 : text = _record.speed; break; | ||
451 | + case 0.5 : text = "<sup>1</sup>/<sub>2</sub>"; break; | ||
452 | + case 0.25 : text = "<sup>1</sup>/<sub>4</sub>"; break; | ||
453 | + case 0.125 : text = "<sup>1</sup>/<sub>8</sub>"; break; | ||
454 | + case 0.0625 : text = "<sup>1</sup>/<sub>16</sub>"; break; | ||
455 | + } | ||
456 | + | ||
457 | + $("#frames .input-group-addon").html("×" + text) | ||
458 | + } | ||
459 | + | ||
460 | + /** | ||
461 | + * @description Init the trace, by creating the table, who will contain all history | ||
462 | + */ | ||
463 | + function init_trace(){ | ||
464 | + table = document.createElement("table") | ||
465 | + thead = document.createElement("thead") | ||
466 | + tbody = document.createElement("tbody") | ||
467 | + tr = document.createElement("tr") | ||
468 | + | ||
469 | + $(table).addClass("table table-hover") | ||
470 | + | ||
471 | + th = document.createElement("th") | ||
472 | + $(th).addClass("col-md-1") | ||
473 | + .html("#") | ||
474 | + $(tr).append(th) | ||
475 | + | ||
476 | + th = document.createElement("th") | ||
477 | + $(th).html("Action") | ||
478 | + $(tr).append(th) | ||
479 | + | ||
480 | + th = document.createElement("th") | ||
481 | + $(th).html("Modes") | ||
482 | + $(tr).append(th) | ||
483 | + | ||
484 | + th = document.createElement("th") | ||
485 | + $(th).html("States") | ||
486 | + $(tr).append(th) | ||
487 | + | ||
488 | + if (settings.graph.groups === true) { | ||
489 | + th = document.createElement("th") | ||
490 | + $(th).html("Groups") | ||
491 | + $(tr).append(th) | ||
492 | + } | ||
493 | + | ||
494 | + | ||
495 | + th = document.createElement("th") | ||
496 | + $(th).addClass("col-md-1") | ||
497 | + $(tr).append(th) | ||
498 | + | ||
499 | + if (settings.graph.interval) { | ||
500 | + th = document.createElement("th") | ||
501 | + $(th).addClass("col-md-1") | ||
502 | + $(tr).append(th) | ||
503 | + } | ||
504 | + | ||
505 | + $(tbody).attr("id","simisc_trace") | ||
506 | + | ||
507 | + $(thead).append(tr) | ||
508 | + $(table).append(thead,tbody) | ||
509 | + | ||
510 | + $(settings.trace.id).append(table) | ||
511 | + } | ||
512 | + | ||
513 | + /** | ||
514 | + * @description Init all variables | ||
515 | + */ | ||
516 | + function init_vars(){ | ||
517 | + //Load initial state | ||
518 | + _trace = { | ||
519 | + "action": settings.init.action, | ||
520 | + "mode": settings.init.mode, | ||
521 | + "state": settings.init.state, | ||
522 | + } | ||
523 | + _isHistory = false | ||
524 | + _history = { | ||
525 | + "trace": new Array(_trace), | ||
526 | + "modes": new Array(), | ||
527 | + "variables": new Array(), | ||
528 | + "data": new Array() | ||
529 | + } | ||
530 | + _clk_end = 0; | ||
531 | + _clk_begin = 0; | ||
532 | + _variables = {} | ||
533 | + } | ||
534 | + | ||
535 | + /** | ||
536 | + * @description Init the helper | ||
537 | + * @param {Dict} helper Contain a dictionnary with all content for help, cf bootstrap / popover for the dictionary syntaxe | ||
538 | + */ | ||
539 | + function init_help(helper){ | ||
540 | + console.log("init_help") | ||
541 | + //console.log(helper) | ||
542 | + $.each(helper, function(key, value){ | ||
543 | + value = $.extend({ | ||
544 | + "placement":"auto", | ||
545 | + "trigger": "manual" | ||
546 | + | ||
547 | + }, value); | ||
548 | + //console.log(value); | ||
549 | + $(key).popover(value); | ||
550 | + $(key).addClass("help-ui"); | ||
551 | + $(key).click(function(event){ | ||
552 | + event.stopImmediatePropagation(); | ||
553 | + }); | ||
554 | + }); | ||
555 | + } | ||
556 | + | ||
557 | + /** | ||
558 | + * @description Init the graph using D3.js | ||
559 | + * @param {Dict<String:Integer>} variables Contains a dictionnary with couples name value | ||
560 | + */ | ||
561 | + function init_graph(variables,groups) { | ||
562 | + console.log("init graph variables") | ||
563 | + _graph.variables = new Array(); | ||
564 | + _graph.groups = new Array(); | ||
565 | + | ||
566 | + if(!settings.graph.color) | ||
567 | + settings.graph.color = {} | ||
568 | + | ||
569 | + for(key in groups){ | ||
570 | + _graph.groups.push(groups[key]) | ||
571 | + } | ||
572 | + | ||
573 | + _groups = _graph.groups | ||
574 | + _groups.push("others") | ||
575 | + | ||
576 | + for(key in variables){ | ||
577 | + _graph.variables.push(key) | ||
578 | + | ||
579 | + if(!(key in settings.graph.color)) | ||
580 | + settings.graph.color[key] = "pink" | ||
581 | + } | ||
582 | + | ||
583 | + console.log(_graph.groups) | ||
584 | + console.log("init graph") | ||
585 | + | ||
586 | + $.extend(true, variables, {"transition": settings.init.action, "groups": settings.init.groups}) | ||
587 | + | ||
588 | + set_history(_clk_end, {"variables":variables}) | ||
589 | + | ||
590 | + var max = [0] | ||
591 | + _data = _history.variables | ||
592 | + | ||
593 | + if (_clk_end == _clk_begin) { | ||
594 | + _data.push(_data[0]) | ||
595 | + } | ||
596 | + | ||
597 | + //Init the marge & width of graph | ||
598 | + _graph.margin = {top: 30, right: 20, bottom: 200, left: 40}, | ||
599 | + _graph.width = $(settings.graph.id).width() - _graph.margin.left - _graph.margin.right, | ||
600 | + _graph.height = 150 - _graph.margin.top + _graph.margin.bottom; | ||
601 | + | ||
602 | + | ||
603 | + _graph.x = d3.scale.linear().range([0, _graph.width]); | ||
604 | + | ||
605 | + _graph.y = d3.scale.linear().range([_graph.height, 0]); | ||
606 | + | ||
607 | + //We create the x axis | ||
608 | + _graph.xAxis = d3.svg.axis().scale(_graph.x) | ||
609 | + .orient("bottom") | ||
610 | + .tickFormat(function(d,i){ | ||
611 | + //We take only the integer part & return the transition cross | ||
612 | + if(parseFloat(d,10) == parseInt(d,10)){ | ||
613 | + if (_clk_end == _clk_begin && d == 1) { | ||
614 | + return "" | ||
615 | + } | ||
616 | + return _data[d]['transition'] | ||
617 | + } | ||
618 | + return '' | ||
619 | + }); | ||
620 | + | ||
621 | + //We create the y axis | ||
622 | + _graph.yAxis = d3.svg.axis().scale(_graph.y) | ||
623 | + .orient("left").ticks(5); | ||
624 | + | ||
625 | + //Reset the zone if user write element on it (dumbproof) | ||
626 | + $(settings.graph.id).html("") | ||
627 | + | ||
628 | + //Add the table with variable | ||
629 | + init_control_command() | ||
630 | + | ||
631 | + //Add the graph | ||
632 | + _graph.svg = d3.select(settings.graph.id) | ||
633 | + .append("svg") | ||
634 | + .attr("width", _graph.width + _graph.margin.left + _graph.margin.right) | ||
635 | + .attr("height", _graph.height + _graph.margin.top + _graph.margin.bottom) | ||
636 | + .append("g") | ||
637 | + .attr("transform", "translate(" + _graph.margin.left + "," + _graph.margin.top + ")"); | ||
638 | + | ||
639 | + //Contains the lines for each variable | ||
640 | + _graph.line = [] | ||
641 | + | ||
642 | + _graph.x.domain([0,1]); | ||
643 | + | ||
644 | + //Create the x axis in view | ||
645 | + _graph.svg.append("g") | ||
646 | + .attr("class", "x axis") | ||
647 | + .attr("transform", "translate(0," + _graph.height + ")") | ||
648 | + .call(_graph.xAxis); | ||
649 | + | ||
650 | + //Create the y axis in view | ||
651 | + _graph.svg.append("g") | ||
652 | + .attr("class", "y axis") | ||
653 | + .call(_graph.yAxis); | ||
654 | + | ||
655 | + _graph.variables.forEach(function(v){ | ||
656 | + _graph.line[v] = d3.svg.line() | ||
657 | + .interpolate("step-after") | ||
658 | + .x(function(d,i) { | ||
659 | + return _graph.x(i); | ||
660 | + }) | ||
661 | + .y(function(d) { | ||
662 | + return _graph.y(d[v]); | ||
663 | + }) | ||
664 | + | ||
665 | + max.push(d3.max(_data, function(d) { return d[v]; })); | ||
666 | + | ||
667 | + _graph.svg.append("path") | ||
668 | + .attr("class", "line line-" + v) | ||
669 | + .attr("var",v) | ||
670 | + .attr("d", _graph.line[v](_data)) | ||
671 | + .attr("style","cursor:pointer;") | ||
672 | + .style("stroke", settings.graph.color[v]) | ||
673 | + | ||
674 | + }); | ||
675 | + //TODO : quand on clique trop vite dans le tableau : les points apparaissent | ||
676 | + | ||
677 | + _graph.y.domain([0, d3.max(max, function(d) { return d; })]) | ||
678 | + } | ||
679 | + | ||
680 | + //TOREDO parce que D3 pour du tableau c'est moyen | ||
681 | + /** | ||
682 | + * @description Init the control command for variable, with the tab pannel for (un)select variables and change the interval of visualisation | ||
683 | + */ | ||
684 | + function init_control_command() { | ||
685 | + console.log("init_control_command") | ||
686 | + //We add the table on the zone for graph (it's better when call first) | ||
687 | + _graph.table = d3.select(settings.graph.control_panel) | ||
688 | + .append("table") | ||
689 | + .attr("class","table table-bordered table_var") | ||
690 | + | ||
691 | + //ADD variable | ||
692 | + _graph.thead = _graph.table.append("thead") | ||
693 | + | ||
694 | + _graph.tbody = _graph.table.append("tbody") | ||
695 | + | ||
696 | + // append the header row | ||
697 | + _graph.thead.append("tr") | ||
698 | + .selectAll("th") | ||
699 | + //Tab for thead | ||
700 | + .data(["vars","<input class='check_all_vars' type='checkbox' checked />"]) | ||
701 | + .enter() | ||
702 | + .append("th") | ||
703 | + .attr("class","active") | ||
704 | + .html(function(column) { | ||
705 | + console.log(column) | ||
706 | + return column; | ||
707 | + }); | ||
708 | + | ||
709 | + var tab_var = [] | ||
710 | + | ||
711 | + _graph.variables.forEach(function(d){ | ||
712 | + tab_var.push([d, "<input class='check_var' type='checkbox' checked var='" + d + "' />"]) | ||
713 | + }) | ||
714 | + | ||
715 | + // create a row for each object in the data | ||
716 | + _graph.rows = _graph.tbody.selectAll("tr") | ||
717 | + .data(tab_var) | ||
718 | + .enter() | ||
719 | + .append("tr"); | ||
720 | + | ||
721 | + // create a cell in each row for each column | ||
722 | + _graph.cells = _graph.rows.selectAll("td") | ||
723 | + .data(function(row) { | ||
724 | + return ([0,1]).map(function(column) { | ||
725 | + console.log(column) | ||
726 | + return {column: column, value: row[column]}; | ||
727 | + }); | ||
728 | + }) | ||
729 | + .enter() | ||
730 | + .append("td") | ||
731 | + .attr("style", "font-family: Courier") | ||
732 | + .html(function(d) { return d.value; }); | ||
733 | + | ||
734 | + if (settings.graph.groups) { | ||
735 | + _graph.thead_groups = _graph.table.append("thead") | ||
736 | + | ||
737 | + _graph.tbody_groups = _graph.table.append("tbody") | ||
738 | + | ||
739 | + // append the header row | ||
740 | + _graph.thead_groups.append("tr") | ||
741 | + .selectAll("th") | ||
742 | + //Tab for thead | ||
743 | + .data(["groups","<input class='check_all_groups' type='checkbox' checked />"]) | ||
744 | + .enter() | ||
745 | + .append("th") | ||
746 | + .attr("class","active") | ||
747 | + .html(function(column) { | ||
748 | + return column; | ||
749 | + }); | ||
750 | + | ||
751 | + var tab_groups = [] | ||
752 | + | ||
753 | + _graph.groups.forEach(function(d){ | ||
754 | + tab_groups.push([d, "<input class='check_group' type='checkbox' checked group='" + d + "' />"]) | ||
755 | + }); | ||
756 | + | ||
757 | + // create a row for each object in the data | ||
758 | + _graph.rows_groups = _graph.tbody_groups.selectAll("tr") | ||
759 | + .data(tab_groups) | ||
760 | + .enter() | ||
761 | + .append("tr"); | ||
762 | + | ||
763 | + // create a cell in each row for each column | ||
764 | + _graph.cells_groups = _graph.rows_groups.selectAll("td") | ||
765 | + .data(function(row) { | ||
766 | + return ([0,1]).map(function(column) { | ||
767 | + return {column: column, value: row[column]}; | ||
768 | + }); | ||
769 | + }) | ||
770 | + .enter() | ||
771 | + .append("td") | ||
772 | + .attr("style", "font-family: Courier") | ||
773 | + .html(function(d) { return d.value; }); | ||
774 | + | ||
775 | + $('.check_all_groups').click(function(){ | ||
776 | + if ($(this).is(":checked")) { | ||
777 | + $('.check_group').prop("checked", true); | ||
778 | + _groups = _graph.groups | ||
779 | + toggle_path("",true) | ||
780 | + } | ||
781 | + else{ | ||
782 | + $('.check_group').prop("checked", false); | ||
783 | + _groups = Array() | ||
784 | + fade_path("",true) | ||
785 | + } | ||
786 | + }) | ||
787 | + | ||
788 | + $('.check_group').click(function(){ | ||
789 | + var _group = $(this).attr("group") | ||
790 | + if ($(this).is(":checked")) { | ||
791 | + if ( $(".check_group:checked").length == $(".check_group").length){ | ||
792 | + $('.check_all_groups').prop("checked", true); | ||
793 | + } | ||
794 | + _groups.push(_group) | ||
795 | + toggle_path("",true) | ||
796 | + | ||
797 | + } | ||
798 | + else{ | ||
799 | + $('.check_all_groups').prop("checked", false); | ||
800 | + _groups = Array() | ||
801 | + | ||
802 | + $(".check_group:checked").each(function(){ | ||
803 | + _groups.push($(this).attr("group")) | ||
804 | + }) | ||
805 | + | ||
806 | + if ( $(".check_group:checked").length == 0){ | ||
807 | + fade_path("",true) | ||
808 | + } | ||
809 | + else{ | ||
810 | + print_option(); | ||
811 | + } | ||
812 | + } | ||
813 | + | ||
814 | + }) | ||
815 | + } | ||
816 | + | ||
817 | + if (settings.graph.interval) { | ||
818 | + _graph.thead_interval = _graph.table.append("thead") | ||
819 | + _graph.tbody_interval = _graph.table.append("tbody") | ||
820 | + | ||
821 | + _graph.thead_interval.append("tr") | ||
822 | + .selectAll("th") | ||
823 | + .data(["Interval","<a id='reset_interval'> Reset</a>"]) | ||
824 | + .enter() | ||
825 | + .append("th") | ||
826 | + .attr("class","active") | ||
827 | + .html(function(column) { | ||
828 | + console.log(column) | ||
829 | + return column; | ||
830 | + }) | ||
831 | + | ||
832 | + _graph.rows_interval = _graph.tbody_interval.selectAll("tr") | ||
833 | + .data([["Begin","<input id='begin_interval' class='form-control col-md-3' type='number' value='0' />"],["End","<input id='end_interval' class='form-control col-md-3' type='number' value='0' />"]]) | ||
834 | + .enter() | ||
835 | + .append("tr"); | ||
836 | + | ||
837 | + _graph.cells_interval = _graph.rows_interval.selectAll("td") | ||
838 | + .data(function(row) { | ||
839 | + return ([0,1]).map(function(column) { | ||
840 | + console.log(column) | ||
841 | + return {column: column, value: row[column]}; | ||
842 | + }); | ||
843 | + }) | ||
844 | + .enter() | ||
845 | + .append("td") | ||
846 | + .attr("style", "font-family: Courier") | ||
847 | + .html(function(d) { return d.value; }); | ||
848 | + | ||
849 | + $("#reset_interval").on("click", function(){ | ||
850 | + change_begin(0) | ||
851 | + }).get_attr_link(0, instance_key) | ||
852 | + | ||
853 | + | ||
854 | + $("#begin_interval").on("change",function(){ | ||
855 | + val = parseInt($(this).val(),10) | ||
856 | + if (val != _clk_begin) { | ||
857 | + if (val > _clk_end) { | ||
858 | + val = _clk_end | ||
859 | + } | ||
860 | + else if(val < 0){ | ||
861 | + val = 0 | ||
862 | + } | ||
863 | + change_begin(val) | ||
864 | + } | ||
865 | + }) | ||
866 | + | ||
867 | + $("#end_interval").get_attr_link(0, instance_key) | ||
868 | + | ||
869 | + $("#end_interval").on("change",function(){ | ||
870 | + val = parseInt($(this).val(),10) | ||
871 | + if(val != _clk_end){ | ||
872 | + if (val < _clk_begin) { | ||
873 | + val = _clk_begin | ||
874 | + } | ||
875 | + else if (val >= _history.trace.length) { | ||
876 | + val = _history.trace.length-1 | ||
877 | + } | ||
878 | + $(this).attr("data-num",val) | ||
879 | + $.simisc.get_trace($(this)); | ||
880 | + } | ||
881 | + }) | ||
882 | + | ||
883 | + } | ||
884 | + | ||
885 | + | ||
886 | + //Check all is the checkbox on thead, you can affich/desable all variables | ||
887 | + $('.check_all_vars').click(function(){ | ||
888 | + if ($(this).is(":checked")) { | ||
889 | + $('.check_var').prop("checked", true); | ||
890 | + toggle_path("",true) | ||
891 | + } | ||
892 | + else{ | ||
893 | + $('.check_var').prop("checked", false); | ||
894 | + fade_path("",true) | ||
895 | + } | ||
896 | + }) | ||
897 | + | ||
898 | + | ||
899 | + | ||
900 | + //For fade or toggle variable one per one | ||
901 | + $('.check_var').click(function(){ | ||
902 | + var _var = $(this).attr("var") | ||
903 | + if ($(this).is(":checked")) { | ||
904 | + if ( $(".check_var:checked").length == $(".check_var").length){ | ||
905 | + $('.check_all_vars').prop("checked", true); | ||
906 | + } | ||
907 | + toggle_path($(this).attr("var"),false) | ||
908 | + } | ||
909 | + else{ | ||
910 | + $('.check_all_vars').prop("checked", false); | ||
911 | + fade_path($(this).attr("var"),false) | ||
912 | + } | ||
913 | + }) | ||
914 | + } | ||
915 | + | ||
916 | + /** | ||
917 | + * @description Change the begin in graph visualisation | ||
918 | + */ | ||
919 | + function change_begin(num) { | ||
920 | + _clk_begin = num | ||
921 | + print_option() | ||
922 | + update_command_center() | ||
923 | + } | ||
924 | + | ||
925 | + /** | ||
926 | + * @description Create a Bootstrap modal with custom id, title, text & button primary text | ||
927 | + * @param {Dict} modal Dict with id, title, text, button_text for modal | ||
928 | + */ | ||
929 | + function create_modal(modal){ | ||
930 | + $("body").append('<div class="modal fade" id="' + modal.id.substring(1) + '"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h4 class="modal-title">' + modal.title + '</h4></div><div class="modal-body"><p>' + modal.text + '</p></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> <button type="button" class="btn btn-primary" data-dismiss="modal">' + modal.button + '</button></div></div>') | ||
931 | + } | ||
932 | + | ||
933 | + function get_server(action){ | ||
934 | + if(settings.api.server == ""){ | ||
935 | + return action | ||
936 | + } | ||
937 | + else{ | ||
938 | + return settings.api.server | ||
939 | + } | ||
940 | + } | ||
941 | + | ||
942 | + function get_param_server(func, dict){ | ||
943 | + if(settings.api.server == ""){ | ||
944 | + return [func, dict] | ||
945 | + } | ||
946 | + else{ | ||
947 | + $.extend(dict, {token: settings.api.token, method : "POST", function : action}) | ||
948 | + return [settings.api.server, dict] | ||
949 | + } | ||
950 | + } | ||
951 | + | ||
952 | + /** | ||
953 | + * @description Init the simulator | ||
954 | + */ | ||
955 | + function init(){ | ||
956 | + console.log("init simulator") | ||
957 | + | ||
958 | + init_vars(); | ||
959 | + init_player(); | ||
960 | + | ||
961 | + create_modal(settings.api.modal) | ||
962 | + | ||
963 | + if (settings.trace.activate) { | ||
964 | + init_trace(); | ||
965 | + } | ||
966 | + | ||
967 | + | ||
968 | + params = get_param_server(settings.init.action, {state: settings.init.state}) | ||
969 | + $.get(params[0], params[1],function(data){ | ||
970 | + console.log(typeof(data)) | ||
971 | + if (data.help) | ||
972 | + init_help(data.help) | ||
973 | + | ||
974 | + console.log(_variables) | ||
975 | + | ||
976 | + set_modes(data.state); | ||
977 | + | ||
978 | + apply_trace(data.state); | ||
979 | + | ||
980 | + if (settings.graph.activate && data.state.variables && typeof(settings.graph) == typeof({})) | ||
981 | + init_graph(data.state.variables, data.state.groups) | ||
982 | + | ||
983 | + print_option(); | ||
984 | + }); | ||
985 | + | ||
986 | + //add click event | ||
987 | + $(settings.api.quit).click(function() { | ||
988 | + console.log("quit"); | ||
989 | + params = get_param_server("quit", {}) | ||
990 | + $.get(params[0], params[1],function(data){ | ||
991 | + $("#alive .ui").html("").text(data); | ||
992 | + window.location.reload(); | ||
993 | + }); | ||
994 | + }); | ||
995 | + | ||
996 | + //add reset event | ||
997 | + $(settings.api.reset).click(function() { | ||
998 | + reset(instance_key) | ||
999 | + }); | ||
1000 | + | ||
1001 | + $(settings.api.help).click(function(){ | ||
1002 | + console.log("change trigger"); | ||
1003 | + //We disabled the help | ||
1004 | + if($(".help-ui").hasClass("help-activate")){ | ||
1005 | + $(this).parent().removeClass("active"); | ||
1006 | + $(".help-ui").removeClass("help-activate"); | ||
1007 | + $(".help-ui").off( "mouseenter mouseleave" ); | ||
1008 | + } | ||
1009 | + else{ | ||
1010 | + $(this).parent().addClass("active"); | ||
1011 | + $(".help-ui").addClass("help-activate"); | ||
1012 | + $(".help-activate").hover(function(){ | ||
1013 | + $(this).popover("show"); | ||
1014 | + $(this).addClass("highlight_help") | ||
1015 | + event.stopImmediatePropagation(); | ||
1016 | + },function(){ | ||
1017 | + $(this).popover("hide"); | ||
1018 | + $(this).removeClass("highlight_help") | ||
1019 | + event.stopImmediatePropagation(); | ||
1020 | + }); | ||
1021 | + } | ||
1022 | + }); | ||
1023 | + | ||
1024 | + //add ping | ||
1025 | + if (settings.api.token == ""){ | ||
1026 | + | ||
1027 | + $("#alive .ping").text("Stayin alive!"); | ||
1028 | + $.periodic({period: 10000, decay:1, max_period: 10000}, function() { | ||
1029 | + params = get_param_server("ping", {}) | ||
1030 | + $.get(params[0], params[1],function(data){ | ||
1031 | + $(".ping").text(data); | ||
1032 | + }); | ||
1033 | + }); | ||
1034 | + } | ||
1035 | + | ||
1036 | + ul = $(settings.api.nav) | ||
1037 | + | ||
1038 | + $.each(settings.nav, function(key, value){ | ||
1039 | + li = document.createElement("li"); | ||
1040 | + a = document.createElement("a"); | ||
1041 | + | ||
1042 | + $(a).html(value.text); | ||
1043 | + $(a).attr("href","#"); | ||
1044 | + | ||
1045 | + $.each(value.attr, function(key, value){ | ||
1046 | + $(a).attr(key,value); | ||
1047 | + }); | ||
1048 | + | ||
1049 | + $(li).append(a); | ||
1050 | + $(ul).append(li); | ||
1051 | + }); | ||
1052 | + } | ||
1053 | + | ||
1054 | + /** | ||
1055 | + * @description Add a trace to the history | ||
1056 | + * @param {Integer} key Contains the id where the trace will be set in history | ||
1057 | + * @param {Dict} trace Contains all part to add at history, at max we use { trace: , modes: , variables: , data:} | ||
1058 | + */ | ||
1059 | + function set_history(key, trace) { | ||
1060 | + console.log("set_history") | ||
1061 | + console.log(key) | ||
1062 | + console.log(trace) | ||
1063 | + $.each(trace, function(k,v){ | ||
1064 | + _history[k][key] = v | ||
1065 | + }) | ||
1066 | + | ||
1067 | + } | ||
1068 | + | ||
1069 | + /** | ||
1070 | + * @description Set modes to the history and to the view, like get_modes with update modes in history | ||
1071 | + * @param {Dict} data Contains all data for get states & modes | ||
1072 | + */ | ||
1073 | + function set_modes(data){ | ||
1074 | + console.log("set_modes") | ||
1075 | + | ||
1076 | + //We have possibilité to do function in each state | ||
1077 | + $.each(data.states, function (num, item) { | ||
1078 | + update[item.do](item); | ||
1079 | + }); | ||
1080 | + | ||
1081 | + //New modes | ||
1082 | + _modes = new Array(); | ||
1083 | + | ||
1084 | + //For each modes & action, we create a list of modes | ||
1085 | + $.each(data.modes, function(num, action){ | ||
1086 | + div = $(action.select); | ||
1087 | + div.html(""); | ||
1088 | + | ||
1089 | + div_group = document.createElement("div") | ||
1090 | + | ||
1091 | + $(div_group).addClass("btn-group-vertical") | ||
1092 | + | ||
1093 | + | ||
1094 | + $.each(action.items, function (pos, item) { | ||
1095 | + button = document.createElement("button"); | ||
1096 | + | ||
1097 | + newtrace = { | ||
1098 | + action : item.html, | ||
1099 | + mode : item.mode, | ||
1100 | + state : item.state, | ||
1101 | + groups : item.groups | ||
1102 | + }; | ||
1103 | + | ||
1104 | + //We create the link for get the succ of this state | ||
1105 | + $(button).html(item.html) | ||
1106 | + .attr({ | ||
1107 | + type: "button", | ||
1108 | + class: "btn btn-default" | ||
1109 | + }) | ||
1110 | + | ||
1111 | + $(button).simisc().set_attr_link(newtrace, instance_key) | ||
1112 | + | ||
1113 | + _modes.push(newtrace) | ||
1114 | + | ||
1115 | + $(div_group).append(button); | ||
1116 | + }); | ||
1117 | + | ||
1118 | + $(div).append(div_group) | ||
1119 | + }); | ||
1120 | + } | ||
1121 | + | ||
1122 | + /** | ||
1123 | + * @description Set modes to the history and to the view, like set_modes without update modes in history | ||
1124 | + * @param {Dict} data Contains all data for get states & modes | ||
1125 | + */ | ||
1126 | + function get_modes(data) { | ||
1127 | + console.log("get_modes") | ||
1128 | + set_modes(data) | ||
1129 | + } | ||
1130 | + | ||
1131 | + /** | ||
1132 | + * @description Reset the player to initial state, without call init | ||
1133 | + */ | ||
1134 | + function reset(key){ | ||
1135 | + console.log("reset") | ||
1136 | + _isHistory = false | ||
1137 | + _clk_end = 0; | ||
1138 | + _clk_begin = 0; | ||
1139 | + cut_trace(0,1); | ||
1140 | + | ||
1141 | + //We get the data without pass by get_trace | ||
1142 | + _trace = _history.trace[0] | ||
1143 | + _variables = _history.variables[0] | ||
1144 | + _modes = _history.modes[0] | ||
1145 | + | ||
1146 | + get_modes(_history.data[0]) | ||
1147 | + apply_trace(_history.data[0]) | ||
1148 | + print_option() | ||
1149 | + console.log(_history) | ||
1150 | + } | ||
1151 | + | ||
1152 | + /** | ||
1153 | + * @description Add a new trace to the history, call function @see set_modes, @see apply_trace and @see print_option | ||
1154 | + * @param {HTML Object} object Contain the object to calll the data from server | ||
1155 | + * @param {Integer} key Contain the key for settings (only use for 3.0) | ||
1156 | + */ | ||
1157 | + $.simisc.set_trace = function(object, key){ | ||
1158 | + console.log("set_trace") | ||
1159 | + _clk_end++; | ||
1160 | + console.log(_clk_end) | ||
1161 | + | ||
1162 | + //TOBETTER | ||
1163 | + tmp = document.createElement("a") | ||
1164 | + | ||
1165 | + $(tmp).html($(object).attr("data-action")) | ||
1166 | + | ||
1167 | + _trace = { | ||
1168 | + "action": $(tmp).text(), | ||
1169 | + "state": $(object).attr("data-state"), | ||
1170 | + "mode": $(object).attr("data-mode") | ||
1171 | + } | ||
1172 | + | ||
1173 | + console.log(_trace) | ||
1174 | + | ||
1175 | + params = get_param_server("succ", {state: _trace.state, mode: _trace.mode}) | ||
1176 | + $.get(params[0], params[1],function(data){ | ||
1177 | + if (settings.graph.activate && data.variables) { | ||
1178 | + _variables = data.variables | ||
1179 | + _variables.transition = _trace.action | ||
1180 | + | ||
1181 | + if($(object).attr("data-groups")) | ||
1182 | + _variables.groups = $(object).attr("data-groups").split(",") | ||
1183 | + } | ||
1184 | + | ||
1185 | + console.log(_history.variables) | ||
1186 | + | ||
1187 | + set_modes(data); | ||
1188 | + | ||
1189 | + apply_trace(data); | ||
1190 | + | ||
1191 | + print_option(); | ||
1192 | + | ||
1193 | + }); | ||
1194 | + } | ||
1195 | + | ||
1196 | + /** | ||
1197 | + * @description Get a trace from the history, call function @see get_modes, @see apply_trace and @see print_option | ||
1198 | + * @param {HTML Object} object Contain the object to calll the data from server | ||
1199 | + * @param {Integer} key Contain the key for settings (only use for 3.0) | ||
1200 | + */ | ||
1201 | + $.simisc.get_trace = function(object, key) { | ||
1202 | + console.log("get_trace") | ||
1203 | + console.log(_history) | ||
1204 | + | ||
1205 | + _clk_end = parseInt($(object).attr("data-num"),10); | ||
1206 | + _isHistory = true; | ||
1207 | + console.log(_clk_end) | ||
1208 | + | ||
1209 | + _trace = _history.trace[_clk_end] | ||
1210 | + _variables = _history.variables[_clk_end] | ||
1211 | + _modes = _history.modes[_clk_end] | ||
1212 | + | ||
1213 | + if (_clk_end == _history.trace.length-1) { | ||
1214 | + _isHistory = false | ||
1215 | + } | ||
1216 | + | ||
1217 | + get_modes(_history.data[_clk_end]) | ||
1218 | + apply_trace(_history.data[_clk_end]); | ||
1219 | + print_option(); | ||
1220 | + } | ||
1221 | + | ||
1222 | + /** | ||
1223 | + * @description Apply the trace of current state, and check if we need to cut or juste set a new history | ||
1224 | + * @param {Dict} data Contain the data for the current state | ||
1225 | + */ | ||
1226 | + function apply_trace(data) { | ||
1227 | + console.log("apply_trace") | ||
1228 | + console.log(_history) | ||
1229 | + if (_isHistory) { | ||
1230 | + if (!compare_trace(_history.trace[_clk_end], _trace)){ | ||
1231 | + console.log("destroy jenkins"); | ||
1232 | + console.log(_history) | ||
1233 | + console.log(_clk_end) | ||
1234 | + cut_trace(0,_clk_end) | ||
1235 | + console.log(_history) | ||
1236 | + _isHistory = false; | ||
1237 | + } | ||
1238 | + else{ | ||
1239 | + console.log("get the old trace") | ||
1240 | + $.each(data.modes, function(num, action){ | ||
1241 | + $(action.select + " button").each(function(){ | ||
1242 | + console.log(this) | ||
1243 | + | ||
1244 | + if(compare_trace({"state":$(this).attr("data-state"), "mode":$(this).attr("data-mode")},_history.trace[_clk_end+1])) | ||
1245 | + { | ||
1246 | + console.log($(this)) | ||
1247 | + $(this).addClass("btn-primary") | ||
1248 | + //We switch to get, because we know the content | ||
1249 | + $(this).simisc().get_attr_link(_clk_end+1, instance_key) | ||
1250 | + | ||
1251 | + } | ||
1252 | + else{ | ||
1253 | + trace = { | ||
1254 | + "action": $(this).attr("data-action"), | ||
1255 | + "state": $(this).attr("data-state"), | ||
1256 | + "mode": $(this).attr("data-mode"), | ||
1257 | + "groups": $(this).attr("data-groups") | ||
1258 | + } | ||
1259 | + | ||
1260 | + $(this).simisc() | ||
1261 | + .addClass("btn-warning") | ||
1262 | + .on("click",function(){ | ||
1263 | + $(settings.api.modal.id + ' .btn-primary').simisc().set_attr_link(trace, instance_key) | ||
1264 | + $(settings.api.modal.id).modal('show') | ||
1265 | + }); | ||
1266 | + } | ||
1267 | + }); | ||
1268 | + }); | ||
1269 | + } | ||
1270 | + } | ||
1271 | + console.log("set_history ici") | ||
1272 | + console.log(_variables) | ||
1273 | + | ||
1274 | + set_history(_clk_end, { | ||
1275 | + "trace": _trace, | ||
1276 | + "variables": _variables, | ||
1277 | + "modes": _modes, | ||
1278 | + "data": data | ||
1279 | + }) | ||
1280 | + | ||
1281 | + update_command_center() | ||
1282 | + } | ||
1283 | + | ||
1284 | + /** | ||
1285 | + * @description print on the view all option activated in the settings | ||
1286 | + */ | ||
1287 | + function print_option() { | ||
1288 | + console.log(_groups) | ||
1289 | + if(settings.trace.activate && ('id' in settings.trace)){ | ||
1290 | + print_trace(); | ||
1291 | + } | ||
1292 | + | ||
1293 | + if(settings.graph.activate && ('id' in settings.graph)){ | ||
1294 | + print_graph(); | ||
1295 | + } | ||
1296 | + } | ||
1297 | + | ||
1298 | + /** | ||
1299 | + * @description Delete from data all transition, where transition hasn't a group in activate groups. | ||
1300 | + * @param Array data All data to process in graph | ||
1301 | + */ | ||
1302 | + function extract_groups(data) { | ||
1303 | + console.log("extract_groups") | ||
1304 | + data = jQuery.grep(data, function(v, i){ | ||
1305 | + return (process_group(v.groups)); | ||
1306 | + }) | ||
1307 | + | ||
1308 | + return data | ||
1309 | + } | ||
1310 | + | ||
1311 | + /** | ||
1312 | + * @description Take an Array of groups and return true if one or more of this group are activate in control panel, false else. | ||
1313 | + * @param Array groups contains groups of current data to process | ||
1314 | + */ | ||
1315 | + function process_group(groups) { | ||
1316 | + console.log("process group") | ||
1317 | + if (groups.length == 0) { | ||
1318 | + console.log("length 0") | ||
1319 | + return (_groups.indexOf("others") > -1) | ||
1320 | + } | ||
1321 | + else{ | ||
1322 | + ok = false | ||
1323 | + | ||
1324 | + for (g in groups) { | ||
1325 | + console.log(g) | ||
1326 | + if ( (g == "" && _groups.indexOf("others") > -1) || _groups.indexOf(groups[g]) > -1) { | ||
1327 | + ok = true | ||
1328 | + } | ||
1329 | + } | ||
1330 | + return ok | ||
1331 | + } | ||
1332 | + } | ||
1333 | + | ||
1334 | + /** | ||
1335 | + * @description print the graph with the new data, use D3.js | ||
1336 | + */ | ||
1337 | + function print_graph(){ | ||
1338 | + console.log("print_graph") | ||
1339 | + $(settings.graph.id + " .tooltip").hide(); | ||
1340 | + | ||
1341 | + _data = _history.variables | ||
1342 | + _data = _data.slice(_clk_begin,_clk_end+1); | ||
1343 | + | ||
1344 | + _data = extract_groups(_data) | ||
1345 | + | ||
1346 | + if (_data.length == 1) { | ||
1347 | + _data.push(_data[0]) | ||
1348 | + } | ||
1349 | + | ||
1350 | + taille = _data.length | ||
1351 | + | ||
1352 | + console.log("lance graphe avec") | ||
1353 | + console.log(_history.variables); | ||
1354 | + console.log(_data); | ||
1355 | + console.log(_clk_end); | ||
1356 | + | ||
1357 | + //Update the x length | ||
1358 | + _graph.x.domain([0, _data.length-1]); | ||
1359 | + | ||
1360 | + //Var for get the max for all variable | ||
1361 | + var max = [0] | ||
1362 | + | ||
1363 | + //We destroy all point & text for var | ||
1364 | + _graph.svg.selectAll(".text-var").remove(); | ||
1365 | + _graph.svg.selectAll("circle").remove(); | ||
1366 | + | ||
1367 | + //We get the max only for actif variables | ||
1368 | + _graph.variables.forEach(function(v){ | ||
1369 | + if ($(".check_var[var='" + v + "']").prop("checked") && taille > 0) { | ||
1370 | + max.push(d3.max(_data, function(d) { return d[v]; })); | ||
1371 | + } | ||
1372 | + }); | ||
1373 | + | ||
1374 | + //Update the y axis | ||
1375 | + _graph.y.domain([0, d3.max(max, function(d) { return d; })]); | ||
1376 | + | ||
1377 | + //Create the transition | ||
1378 | + _graph.transition = d3.select(settings.graph.id).transition(); | ||
1379 | + | ||
1380 | + //Update the number of tick on x axis | ||
1381 | + _graph.xAxis.ticks(d3.min([_data.length, settings.graph.max_it])); | ||
1382 | + | ||
1383 | + //DO the translation for the axis object | ||
1384 | + _graph.transition.select(".x.axis") | ||
1385 | + .duration(750) | ||
1386 | + .call(_graph.xAxis) | ||
1387 | + .selectAll("text") | ||
1388 | + .style("text-anchor", "end") | ||
1389 | + .style("cursor", "pointer") | ||
1390 | + .attr("dx", "-.8em") | ||
1391 | + .attr("dy", ".15em") | ||
1392 | + .attr("transform", function(d) { | ||
1393 | + return "rotate(-65)" | ||
1394 | + }); | ||
1395 | + | ||
1396 | + //We update each actif variable, the text & circles too | ||
1397 | + _graph.variables.forEach(function(v){ | ||
1398 | + if ($(".check_var[var='" + v + "']").prop("checked") && taille > 0) { | ||
1399 | + console.log("variables") | ||
1400 | + console.log(v) | ||
1401 | + _graph.transition.select(".line-" + v) | ||
1402 | + .duration(750) | ||
1403 | + .attr("d", _graph.line[v](_data)) | ||
1404 | + //Call back | ||
1405 | + .each("end",function(){ | ||
1406 | + _graph.svg.selectAll("dot") | ||
1407 | + .data(_data) | ||
1408 | + .enter().append("circle") | ||
1409 | + .attr("r", 3.5) | ||
1410 | + .attr("cx", function(d, i) { return _graph.x(i); }) | ||
1411 | + .attr("cy", function(d) { return _graph.y(d[v]); }) | ||
1412 | + //We give the attr data-num for toggle the tooltip on this transition when axis x is hover | ||
1413 | + .attr("data-num", function(d,i) { | ||
1414 | + //We create all tooltip | ||
1415 | + $(this).tooltip({ | ||
1416 | + 'title': "transition " + d['transition'] + " : " + v + " = " + d[v], | ||
1417 | + 'trigger': 'manual', | ||
1418 | + 'container':"body" | ||
1419 | + }); | ||
1420 | + | ||
1421 | + return i; | ||
1422 | + }) | ||
1423 | + .attr("style","cursor:pointer;fill:" + settings.graph.color[v]) | ||
1424 | + .attr("class","dot dot-"+v) | ||
1425 | + .on("mouseover", function(d) { | ||
1426 | + $(this).tooltip('show') | ||
1427 | + }) | ||
1428 | + .on("mouseout", function(d){ | ||
1429 | + $(this).tooltip('hide') | ||
1430 | + }) | ||
1431 | + }); | ||
1432 | + | ||
1433 | + _graph.svg.append("text") | ||
1434 | + .attr("transform", "translate("+(_graph.width+10)+","+_graph.y(_data[taille-1][v])+")") | ||
1435 | + .attr("dy", ".35em") | ||
1436 | + .attr("text-anchor", "start") | ||
1437 | + .attr("class", "text-var text-"+v) | ||
1438 | + .style("fill", settings.graph.color[v]) | ||
1439 | + .text(v); | ||
1440 | + } | ||
1441 | + }); | ||
1442 | + | ||
1443 | + | ||
1444 | + //TODO : permet de faire la trace dans le graph : à améliorer pour direct le mettre dans le x axis, un peu brouillon a mon gout (c'est le compteur qui me gene) | ||
1445 | + cmp = 0 | ||
1446 | + | ||
1447 | + $(".x.axis text").each(function(){ | ||
1448 | + //text is empty when there isn't not enought transition pass | ||
1449 | + if ($(this).html() != "") { | ||
1450 | + var tmp_clk = cmp; | ||
1451 | + | ||
1452 | + $(this).unbind("mouseover") | ||
1453 | + .mouseover(function(){ | ||
1454 | + $(".dot[data-num=" + tmp_clk + "]").each(function(){ | ||
1455 | + console.log($(this).css('opacity')) | ||
1456 | + if ( $(this).css('opacity') == 1 ) { | ||
1457 | + $(this).tooltip('show') | ||
1458 | + } | ||
1459 | + }); | ||
1460 | + }) | ||
1461 | + .mouseout(function(){ | ||
1462 | + $(".dot[data-num=" + tmp_clk + "]").each(function(){ | ||
1463 | + $(this).tooltip('hide') | ||
1464 | + }); | ||
1465 | + }) | ||
1466 | + cmp++ | ||
1467 | + } | ||
1468 | + }); | ||
1469 | + | ||
1470 | + _graph.transition.select(".y.axis") // change the y axis | ||
1471 | + .duration(750) | ||
1472 | + .call(_graph.yAxis); | ||
1473 | + | ||
1474 | + } | ||
1475 | + | ||
1476 | + /** | ||
1477 | + * @description print the trace for see history | ||
1478 | + */ | ||
1479 | + function print_trace(){ | ||
1480 | + console.log("print_trace") | ||
1481 | + | ||
1482 | + //At each state we rewrite the trace, can be optimised with prepend when just add, and add style when cross the path | ||
1483 | + $("#simisc_trace").html(""); | ||
1484 | + | ||
1485 | + $.each(_history.trace, function(key,value){ | ||
1486 | + a = document.createElement("a"); | ||
1487 | + td = document.createElement("td"); | ||
1488 | + tr = document.createElement("tr"); | ||
1489 | + title = "" | ||
1490 | + span = document.createElement("span") | ||
1491 | + | ||
1492 | + $(span).addClass("glyphicon") | ||
1493 | + $(tr).html("<td>" + key + "</td><td>" + value.action + "</td><td>" + value.mode + "</td><td>" + value.state + "</td>"); | ||
1494 | + | ||
1495 | + if (settings.graph.interval && settings.graph.activate) { | ||
1496 | + //When interval we have a second part, for begin | ||
1497 | + tdb = document.createElement("td") | ||
1498 | + ab = document.createElement("a") | ||
1499 | + spanb = document.createElement("span") | ||
1500 | + titleb = "" | ||
1501 | + | ||
1502 | + $(spanb).addClass("glyphicon") | ||
1503 | + | ||
1504 | + if (key == _clk_end) { | ||
1505 | + $(tr).addClass("info") | ||
1506 | + $(span).addClass("glyphicon-arrow-left") | ||
1507 | + title = "current ending state" | ||
1508 | + | ||
1509 | + $(ab).click(function(){ | ||
1510 | + change_begin(key) | ||
1511 | + }) | ||
1512 | + $(spanb).addClass("glyphicon-indent-left") | ||
1513 | + titleb = "Set the new end interval" | ||
1514 | + } | ||
1515 | + //Part we can change the end interval | ||
1516 | + else if (key > _clk_begin) { | ||
1517 | + $(tr).addClass("warning") | ||
1518 | + $(a).simisc().get_attr_link(key,instance_key) | ||
1519 | + $(span).addClass("glyphicon-indent-right") | ||
1520 | + title = "Set the new end interval" | ||
1521 | + | ||
1522 | + } | ||
1523 | + | ||
1524 | + if (key == _clk_begin) { | ||
1525 | + $(tr).addClass("info") | ||
1526 | + $(spanb).addClass("glyphicon-arrow-right") | ||
1527 | + titleb = "current ending state" | ||
1528 | + | ||
1529 | + $(a).simisc().get_attr_link(key,instance_key) | ||
1530 | + $(span).addClass("glyphicon-indent-right") | ||
1531 | + title = "Set the new end interval" | ||
1532 | + } | ||
1533 | + //Part we can change the begin interval | ||
1534 | + else if (key < _clk_end) { | ||
1535 | + $(tr).addClass("warning") | ||
1536 | + $(ab).click(function(){ | ||
1537 | + change_begin(key) | ||
1538 | + }) | ||
1539 | + $(spanb).addClass("glyphicon-indent-left") | ||
1540 | + titleb = "Set the new end interval" | ||
1541 | + } | ||
1542 | + | ||
1543 | + if (key < _clk_end && key > _clk_begin) { | ||
1544 | + $(tr).removeClass("warning danger") | ||
1545 | + | ||
1546 | + if (settings.graph.groups && !process_group(_history.variables[key].groups)) { | ||
1547 | + $(tr).addClass("danger") | ||
1548 | + } | ||
1549 | + else{ | ||
1550 | + $(tr).addClass("success") | ||
1551 | + } | ||
1552 | + } | ||
1553 | + | ||
1554 | + if (settings.graph.groups) { | ||
1555 | + $(tr).append("<td>" + _history.variables[key].groups.join(',') + "</td>") | ||
1556 | + } | ||
1557 | + | ||
1558 | + | ||
1559 | + $(ab).append(spanb) | ||
1560 | + $(tdb).append(ab) | ||
1561 | + | ||
1562 | + $(a).append(span) | ||
1563 | + $(td).append(a) | ||
1564 | + | ||
1565 | + $(tr).append(tdb,td) | ||
1566 | + } | ||
1567 | + //Normal mode without interval choice | ||
1568 | + else{ | ||
1569 | + if(key === _clk_end){ | ||
1570 | + $(tr).addClass("info"); | ||
1571 | + title = "current state" | ||
1572 | + $(span).addClass("glyphicon-arrow-left") | ||
1573 | + } | ||
1574 | + else{ | ||
1575 | + $(tr).addClass("success"); | ||
1576 | + $(span).addClass("glyphicon-share-alt") | ||
1577 | + $(a).simisc().get_attr_link(key, instance_key); | ||
1578 | + } | ||
1579 | + | ||
1580 | + if (key > _clk_end) { | ||
1581 | + $(tr).addClass("warning"); | ||
1582 | + } | ||
1583 | + | ||
1584 | + | ||
1585 | + $(a).append(span) | ||
1586 | + $(td).append(a) | ||
1587 | + $(tr).append(td) | ||
1588 | + } | ||
1589 | + | ||
1590 | + $("#simisc_trace").append(tr); | ||
1591 | + | ||
1592 | + }); | ||
1593 | + } | ||
1594 | + | ||
1595 | + /** | ||
1596 | + * @description Compare a couple of 'state'/'mode' | ||
1597 | + * @returns {Boolean} True if the couple have same state & mode, false else | ||
1598 | + */ | ||
1599 | + function compare_trace(t1,t2){ | ||
1600 | + if(t1.mode === t2.mode && t1.state === t2.state) | ||
1601 | + return true; | ||
1602 | + return false; | ||
1603 | + } | ||
1604 | + | ||
1605 | + /** | ||
1606 | + * @description Cut for trace all between the two param given | ||
1607 | + * @param {Integer} begin The id where the cut is begin | ||
1608 | + * @param {Integer} end The id where the cut is stop | ||
1609 | + */ | ||
1610 | + function cut_trace(begin, end){ | ||
1611 | + console.log("cut_trace") | ||
1612 | + | ||
1613 | + $.each(_history, function(k,v){ | ||
1614 | + _history[k] = _history[k].slice(begin,end) | ||
1615 | + }) | ||
1616 | + } | ||
1617 | + | ||
1618 | + /** | ||
1619 | + * @description Update value in interval of command center | ||
1620 | + */ | ||
1621 | + function update_command_center(){ | ||
1622 | + console.log("update command center") | ||
1623 | + $("#end_interval").val(_clk_end) | ||
1624 | + $("#begin_interval").val(_clk_begin) | ||
1625 | + $("#reset_interval").attr("data-num",_history.trace.length-1) | ||
1626 | + } | ||
1627 | + | ||
1628 | + /** | ||
1629 | + * @description Set the opacity to 1 to path with var : variable, if "not" is true is all path except this one will be toggle | ||
1630 | + * @param {String} variable Variable to show | ||
1631 | + * @param {Boolean} not If not is true all variables will be show except @see variable | ||
1632 | + */ | ||
1633 | + function toggle_path(variable, not) { | ||
1634 | + console.log("toogle_path") | ||
1635 | + //Not mean : if you want toggle other than the path for the variable | ||
1636 | + print_option() | ||
1637 | + if (not) { | ||
1638 | + $(".line:not(.line-"+ variable + ")").fadeTo("slow",1) | ||
1639 | + $(".dot:not(.dot-"+ variable + ")").fadeTo("slow",1) | ||
1640 | + $(".text-var:not(.text-"+ variable + ")").fadeTo("slow",1) | ||
1641 | + } | ||
1642 | + else{ | ||
1643 | + $(".line-" + variable).fadeTo("slow",1) | ||
1644 | + $(".dot-" + variable).fadeTo("slow",1) | ||
1645 | + $(".text-" + variable).fadeTo("slow",1) | ||
1646 | + } | ||
1647 | + } | ||
1648 | + | ||
1649 | + /** | ||
1650 | + * @description Set the opacity to 0 to path with var : variable, if "not" is true is all path except this one will be fade | ||
1651 | + * @param {String} variable Variable to hide | ||
1652 | + * @param {Boolean} not If not is true all variables will be hide except @see variable | ||
1653 | + */ | ||
1654 | + function fade_path(variable, not){ | ||
1655 | + print_option() | ||
1656 | + if (not) { | ||
1657 | + $(".line:not(.line-"+ variable + ")").fadeTo("slow",0) | ||
1658 | + $(".dot:not(.dot-"+ variable + ")").fadeTo("slow",0) | ||
1659 | + $(".text-var:not(.text-"+ variable + ")").fadeTo("slow",0) | ||
1660 | + } | ||
1661 | + else{ | ||
1662 | + $(".line-" + variable).fadeTo("slow",0) | ||
1663 | + $(".dot-" + variable).fadeTo("slow",0) | ||
1664 | + $(".text-" + variable).fadeTo("slow",0) | ||
1665 | + } | ||
1666 | + } | ||
1667 | + | ||
1668 | + }; | ||
1669 | + | ||
1670 | + //For the 3.0 version : multiple simulators in same time | ||
1671 | + $.simisc.instance = new Array() | ||
1672 | + | ||
1673 | + //The default value for simulator | ||
1674 | + $.simisc.defaults = { | ||
1675 | + "api":{ | ||
1676 | + //Id for reset button | ||
1677 | + "reset": "#ui-reset", | ||
1678 | + //If localhost let him empty | ||
1679 | + "token": "", | ||
1680 | + //Server for call function, if you are in localhost let him empty | ||
1681 | + "server":"", | ||
1682 | + //Id for stop button | ||
1683 | + "quit": "#ui-quit", | ||
1684 | + //Id for help button | ||
1685 | + "help":"#ui-help", | ||
1686 | + //Where model is stock | ||
1687 | + "model": "#model", | ||
1688 | + //Where nav will be added | ||
1689 | + "nav": "#nav_sim", | ||
1690 | + "modal":{ | ||
1691 | + "id":"#simisc_trace_alert", | ||
1692 | + "text":"The trace isn't same as history, will you change this trace ?", | ||
1693 | + "title":"Warning : new trace detected", | ||
1694 | + "button": "Go new trace" | ||
1695 | + }, | ||
1696 | + }, | ||
1697 | + //Where is the player & if he is activate | ||
1698 | + "player":{ | ||
1699 | + //Where the player is added | ||
1700 | + "id":"#player", | ||
1701 | + "modal":{ | ||
1702 | + "id":"#simisc_player_alert", | ||
1703 | + "text":"The trace isn't same as history, will you change this trace ?", | ||
1704 | + "title":"Warning : new trace detected", | ||
1705 | + "button": "Go new trace" | ||
1706 | + }, | ||
1707 | + //When true the player will be add | ||
1708 | + "activate": true | ||
1709 | + }, | ||
1710 | + //Nav optionnal content, add to reset/quit & help button | ||
1711 | + "nav": { | ||
1712 | + //Sample of new content to nav | ||
1713 | + "about": { | ||
1714 | + "script": "", | ||
1715 | + "text": "About", | ||
1716 | + "attr": { | ||
1717 | + "data-toggle": "modal", | ||
1718 | + "data-target": "#ui-about" | ||
1719 | + } | ||
1720 | + } | ||
1721 | + }, | ||
1722 | + //Init state | ||
1723 | + "init": { | ||
1724 | + "state": 0, | ||
1725 | + "mode": 0, | ||
1726 | + //How we call the init state | ||
1727 | + "action": "init", | ||
1728 | + "groups": Array() | ||
1729 | + }, | ||
1730 | + //Option for trace | ||
1731 | + "trace": { | ||
1732 | + //Where the trace will be added | ||
1733 | + "id": "#trace_zone", | ||
1734 | + //If the trace is activated | ||
1735 | + "activate": true | ||
1736 | + }, | ||
1737 | + //Option for graph | ||
1738 | + "graph": { | ||
1739 | + //Where the graph will be added | ||
1740 | + 'id' : '#graph', | ||
1741 | + 'control_panel': '#Command_center', | ||
1742 | + //The number max of tick with label in x axis | ||
1743 | + "max_iteration" : 50, | ||
1744 | + //If we can change the begin & the end for zoom in graph | ||
1745 | + "interval": true, | ||
1746 | + //Where the command pannel will be add | ||
1747 | + "command_bord": "#graph_bord", | ||
1748 | + //If the graph is activated | ||
1749 | + "activate": true, | ||
1750 | + //If typed transition are active | ||
1751 | + "groups": true | ||
1752 | + } | ||
1753 | + }; | ||
1754 | + | ||
1755 | +})(jQuery) |
snakes/utils/andy/resources/model.html
0 → 100644
1 | +<div class="container-fluid"> | ||
2 | +<div class="row"> | ||
3 | + <div class="col-md-1"></div> | ||
4 | + <div class="col-md-10"> | ||
5 | + <div class="page-header"> | ||
6 | + <h1><tt>Andy Simulator</tt> <small> powered by SNAKES</small></h1> | ||
7 | + </div> | ||
8 | + | ||
9 | + <div class="row"> | ||
10 | + <h3>Player</h3> | ||
11 | + <div id="player"> </div> | ||
12 | + </div> | ||
13 | + <div class="row"> | ||
14 | + <h3>Modes</h3> | ||
15 | + <div id="modes"> </div> | ||
16 | + </div> | ||
17 | + <div class="row"> | ||
18 | + <h3>Net Graph</h3> | ||
19 | + <div id="graph"> </div> | ||
20 | + </div> | ||
21 | + <div class="row"> | ||
22 | + <div id="trace_zone"> </div> | ||
23 | + </div> | ||
24 | + <div class="row"> | ||
25 | + <h3>Command Panel</h3> | ||
26 | + <div id="Command_center"> </div> | ||
27 | + </div> | ||
28 | + </div> | ||
29 | + <div class="col-md-1"></div> | ||
30 | +</div> | ||
31 | +</div> |
snakes/utils/andy/simul.py
0 → 100644
1 | +from snakes.utils.simul import BaseSimulator, BaseHTTPSimulator | ||
2 | + | ||
3 | +class AndySimulator (BaseSimulator) : | ||
4 | + def getstate (self, state) : | ||
5 | + ret = BaseSimulator.getstate(self, state) | ||
6 | + marking = self.states[state] | ||
7 | + ret["variables"] = dict((place, tokens.items()[0]) | ||
8 | + for place, tokens in marking.items()) | ||
9 | + ret["groups"] = ["timed", "even", "odd"] | ||
10 | + modes = [] | ||
11 | + for i, (trans, binding) in enumerate(marking.modes) : | ||
12 | + if (state + i) % 5 == 0 : | ||
13 | + groups = ["timed"] | ||
14 | + else : | ||
15 | + groups = [] | ||
16 | + modes.append( | ||
17 | + {"state" : state, | ||
18 | + "mode" : i, | ||
19 | + "html" : "%s (%s)" % (trans.name[7:], binding), | ||
20 | + "groups" : groups + ["odd" if (state % 2) else "even"] | ||
21 | + }) | ||
22 | + ret["modes"] = [{"select": "#modes", "items": modes}] | ||
23 | + return ret | ||
24 | + | ||
25 | +#class Simulator (BaseHTTPSimulator) : | ||
26 | +# def __init__ (self, **system) : | ||
27 | +# simul = AndySimulator(**system) | ||
28 | +# BaseHTTPSimulator.__init__(self, simulator=simul) | ||
29 | + | ||
30 | +class Simulator (BaseHTTPSimulator) : | ||
31 | + def __init__ (self, net, port) : | ||
32 | + simul = AndySimulator(net) | ||
33 | + BaseHTTPSimulator.__init__(self, net, simulator=simul, port=port) | ||
34 | +# def init_model (self) : | ||
35 | +# return self.res["model.html"] % self.simul.info | ||
36 | +# def init_ui (self) : | ||
37 | +# return BaseHTTPSimulator.init_ui(self)[:-1] + [{ | ||
38 | +# "label" : "Show net", | ||
39 | +# "id" : "ui-shownet", | ||
40 | +# "href" : "#", | ||
41 | +# "script" : "dialog($('#model .petrinet').html())" | ||
42 | +# }] | ||
43 | + |
-
Please register or login to post a comment