1/**
2 * $Id: mxF5.js,v 1.0 2018/05/03 13:10:37 mate Exp $
3 * Copyright (c) 2006-2018, JGraph Ltd
4 */
5//**********************************************************************************************************************************************************
6//Big-IP 1600
7//**********************************************************************************************************************************************************
8/**
9* Extends mxShape.
10*/
11function mxRackF5BigIp1600(bounds, fill, stroke, strokewidth)
12{
13	mxShape.call(this);
14	this.bounds = bounds;
15	this.fill = fill;
16	this.stroke = stroke;
17	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
18};
19
20/**
21* Extends mxShape.
22*/
23mxUtils.extend(mxRackF5BigIp1600, mxShape);
24
25mxRackF5BigIp1600.prototype.cst =
26{
27		SHAPE_BIG_IP_1600 : 'mxgraph.rackF5Shapes.big_ip_1600'
28};
29
30/**
31* Function: paintVertexShape
32*
33* Paints the vertex shape.
34*/
35mxRackF5BigIp1600.prototype.paintVertexShape = function(c, x, y, w, h)
36{
37	c.translate(x, y);
38
39	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
40	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
41	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
42	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
43	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
44
45	if (hasEars)
46	{
47		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
48		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
49	}
50
51	if (isFront)
52	{
53		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_front.png', 0, 0, 0);
54	}
55	else
56	{
57		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
58
59		if (isDC)
60		{
61			if (psNum >= '1')
62			{
63				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
64			}
65
66			if (psNum >= '2')
67			{
68				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
69			}
70		}
71		else
72		{
73			if (psNum >= '2')
74			{
75				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
76			}
77		}
78	}
79};
80
81mxCellRenderer.registerShape(mxRackF5BigIp1600.prototype.cst.SHAPE_BIG_IP_1600, mxRackF5BigIp1600);
82
83//**********************************************************************************************************************************************************
84//Big-IP 2x00
85//**********************************************************************************************************************************************************
86/**
87* Extends mxShape.
88*/
89function mxRackF5BigIp2x00(bounds, fill, stroke, strokewidth)
90{
91	mxShape.call(this);
92	this.bounds = bounds;
93	this.fill = fill;
94	this.stroke = stroke;
95	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
96};
97
98/**
99* Extends mxShape.
100*/
101mxUtils.extend(mxRackF5BigIp2x00, mxShape);
102
103mxRackF5BigIp2x00.prototype.cst =
104{
105		SHAPE_BIG_IP_2x00 : 'mxgraph.rackF5Shapes.big_ip_2x00'
106};
107
108/**
109* Function: paintVertexShape
110*
111* Paints the vertex shape.
112*/
113mxRackF5BigIp2x00.prototype.paintVertexShape = function(c, x, y, w, h)
114{
115	c.translate(x, y);
116
117	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
118	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
119	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
120	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
121	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
122
123	if (hasEars)
124	{
125		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
126		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
127	}
128
129	if (isFront)
130	{
131		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_2x00_front.png', 0, 0, 0);
132	}
133	else
134	{
135		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
136
137		if (isDC)
138		{
139			if (psNum >= '1')
140			{
141				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
142			}
143
144			if (psNum >= '2')
145			{
146				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
147			}
148		}
149		else
150		{
151			if (psNum >= '2')
152			{
153				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
154			}
155		}
156	}
157};
158
159mxCellRenderer.registerShape(mxRackF5BigIp2x00.prototype.cst.SHAPE_BIG_IP_2x00, mxRackF5BigIp2x00);
160
161//**********************************************************************************************************************************************************
162//Big-IP 3600
163//**********************************************************************************************************************************************************
164/**
165* Extends mxShape.
166*/
167function mxRackF5BigIp3600(bounds, fill, stroke, strokewidth)
168{
169	mxShape.call(this);
170	this.bounds = bounds;
171	this.fill = fill;
172	this.stroke = stroke;
173	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
174};
175
176/**
177* Extends mxShape.
178*/
179mxUtils.extend(mxRackF5BigIp3600, mxShape);
180
181mxRackF5BigIp3600.prototype.cst =
182{
183		SHAPE_BIG_IP_3600 : 'mxgraph.rackF5Shapes.big_ip_3600'
184};
185
186/**
187* Function: paintVertexShape
188*
189* Paints the vertex shape.
190*/
191mxRackF5BigIp3600.prototype.paintVertexShape = function(c, x, y, w, h)
192{
193	c.translate(x, y);
194
195	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
196	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
197	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
198	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
199	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
200
201	if (hasEars)
202	{
203		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
204		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
205	}
206
207	if (isFront)
208	{
209		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_3600_front.png', 0, 0, 0);
210	}
211	else
212	{
213		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
214
215		if (isDC)
216		{
217			if (psNum >= '1')
218			{
219				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
220			}
221
222			if (psNum >= '2')
223			{
224				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
225			}
226		}
227		else
228		{
229			if (psNum >= '2')
230			{
231				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
232			}
233		}
234	}
235};
236
237mxCellRenderer.registerShape(mxRackF5BigIp3600.prototype.cst.SHAPE_BIG_IP_3600, mxRackF5BigIp3600);
238
239//**********************************************************************************************************************************************************
240//Big-IP 3900
241//**********************************************************************************************************************************************************
242/**
243* Extends mxShape.
244*/
245function mxRackF5BigIp3900(bounds, fill, stroke, strokewidth)
246{
247	mxShape.call(this);
248	this.bounds = bounds;
249	this.fill = fill;
250	this.stroke = stroke;
251	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
252};
253
254/**
255* Extends mxShape.
256*/
257mxUtils.extend(mxRackF5BigIp3900, mxShape);
258
259mxRackF5BigIp3900.prototype.cst =
260{
261		SHAPE_BIG_IP_3900 : 'mxgraph.rackF5Shapes.big_ip_3900'
262};
263
264/**
265* Function: paintVertexShape
266*
267* Paints the vertex shape.
268*/
269mxRackF5BigIp3900.prototype.paintVertexShape = function(c, x, y, w, h)
270{
271	c.translate(x, y);
272
273	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
274	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
275	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
276	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
277	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
278
279	if (hasEars)
280	{
281		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
282		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
283	}
284
285	if (isFront)
286	{
287		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_3900_front.png', 0, 0, 0);
288	}
289	else
290	{
291		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
292
293		if (isDC)
294		{
295			if (psNum >= '1')
296			{
297				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
298			}
299
300			if (psNum >= '2')
301			{
302				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
303			}
304		}
305		else
306		{
307			if (psNum >= '2')
308			{
309				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
310			}
311		}
312	}
313};
314
315mxCellRenderer.registerShape(mxRackF5BigIp3900.prototype.cst.SHAPE_BIG_IP_3900, mxRackF5BigIp3900);
316
317//**********************************************************************************************************************************************************
318//Big-IP 4x00
319//**********************************************************************************************************************************************************
320/**
321* Extends mxShape.
322*/
323function mxRackF5BigIp4x00(bounds, fill, stroke, strokewidth)
324{
325	mxShape.call(this);
326	this.bounds = bounds;
327	this.fill = fill;
328	this.stroke = stroke;
329	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
330};
331
332/**
333* Extends mxShape.
334*/
335mxUtils.extend(mxRackF5BigIp4x00, mxShape);
336
337mxRackF5BigIp4x00.prototype.cst =
338{
339		SHAPE_BIG_IP_4x00 : 'mxgraph.rackF5Shapes.big_ip_4x00'
340};
341
342/**
343* Function: paintVertexShape
344*
345* Paints the vertex shape.
346*/
347mxRackF5BigIp4x00.prototype.paintVertexShape = function(c, x, y, w, h)
348{
349	c.translate(x, y);
350
351	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
352	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
353	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
354	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
355	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
356
357	if (hasEars)
358	{
359		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
360		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
361	}
362
363	if (isFront)
364	{
365		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_4x00_front.png', 0, 0, 0);
366	}
367	else
368	{
369		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
370
371		if (isDC)
372		{
373			if (psNum >= '1')
374			{
375				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
376			}
377
378			if (psNum >= '2')
379			{
380				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
381			}
382		}
383		else
384		{
385			if (psNum >= '2')
386			{
387				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
388			}
389		}
390	}
391};
392
393mxCellRenderer.registerShape(mxRackF5BigIp4x00.prototype.cst.SHAPE_BIG_IP_4x00, mxRackF5BigIp4x00);
394
395//**********************************************************************************************************************************************************
396//Big-IP 5x00
397//**********************************************************************************************************************************************************
398/**
399* Extends mxShape.
400*/
401function mxRackF5BigIp5x00(bounds, fill, stroke, strokewidth)
402{
403	mxShape.call(this);
404	this.bounds = bounds;
405	this.fill = fill;
406	this.stroke = stroke;
407	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
408};
409
410/**
411* Extends mxShape.
412*/
413mxUtils.extend(mxRackF5BigIp5x00, mxShape);
414
415mxRackF5BigIp5x00.prototype.cst =
416{
417		SHAPE_BIG_IP_5x00 : 'mxgraph.rackF5Shapes.big_ip_5x00'
418};
419
420/**
421* Function: paintVertexShape
422*
423* Paints the vertex shape.
424*/
425mxRackF5BigIp5x00.prototype.paintVertexShape = function(c, x, y, w, h)
426{
427	c.translate(x, y);
428
429	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
430	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
431	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
432	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
433	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
434
435	if (hasEars)
436	{
437		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
438		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
439	}
440
441	if (isFront)
442	{
443		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_5x00_front.png', 0, 0, 0);
444	}
445	else
446	{
447		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
448
449		if (isDC)
450		{
451			if (psNum >= '1')
452			{
453				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
454			}
455
456			if (psNum >= '2')
457			{
458				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
459			}
460		}
461		else
462		{
463			if (psNum >= '2')
464			{
465				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
466			}
467		}
468	}
469};
470
471mxCellRenderer.registerShape(mxRackF5BigIp5x00.prototype.cst.SHAPE_BIG_IP_5x00, mxRackF5BigIp5x00);
472
473//**********************************************************************************************************************************************************
474//EM 4000
475//**********************************************************************************************************************************************************
476/**
477* Extends mxShape.
478*/
479function mxRackF5Em4000(bounds, fill, stroke, strokewidth)
480{
481	mxShape.call(this);
482	this.bounds = bounds;
483	this.fill = fill;
484	this.stroke = stroke;
485	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
486};
487
488/**
489* Extends mxShape.
490*/
491mxUtils.extend(mxRackF5Em4000, mxShape);
492
493mxRackF5Em4000.prototype.cst =
494{
495		SHAPE_EM_4000 : 'mxgraph.rackF5Shapes.em4000'
496};
497
498/**
499* Function: paintVertexShape
500*
501* Paints the vertex shape.
502*/
503mxRackF5Em4000.prototype.paintVertexShape = function(c, x, y, w, h)
504{
505	c.translate(x, y);
506
507	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
508	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
509	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
510	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
511	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
512
513	if (hasEars)
514	{
515		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
516		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
517	}
518
519	if (isFront)
520	{
521		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'em_4000_front.png', 0, 0, 0);
522	}
523	else
524	{
525		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
526
527		if (isDC)
528		{
529			if (psNum >= '1')
530			{
531				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
532			}
533
534			if (psNum >= '2')
535			{
536				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
537			}
538		}
539		else
540		{
541			if (psNum >= '2')
542			{
543				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
544			}
545		}
546	}
547};
548
549mxCellRenderer.registerShape(mxRackF5Em4000.prototype.cst.SHAPE_EM_4000, mxRackF5Em4000);
550
551//**********************************************************************************************************************************************************
552//Big-IP 6900
553//**********************************************************************************************************************************************************
554/**
555* Extends mxShape.
556*/
557function mxRackF5BigIp6900(bounds, fill, stroke, strokewidth)
558{
559	mxShape.call(this);
560	this.bounds = bounds;
561	this.fill = fill;
562	this.stroke = stroke;
563	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
564};
565
566/**
567* Extends mxShape.
568*/
569mxUtils.extend(mxRackF5BigIp6900, mxShape);
570
571mxRackF5BigIp6900.prototype.cst =
572{
573		SHAPE_BIG_IP_6900 : 'mxgraph.rackF5Shapes.big_ip_6900'
574};
575
576/**
577* Function: paintVertexShape
578*
579* Paints the vertex shape.
580*/
581mxRackF5BigIp6900.prototype.paintVertexShape = function(c, x, y, w, h)
582{
583	c.translate(x, y);
584
585	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
586	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
587	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
588	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
589	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
590
591	if (hasEars)
592	{
593		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 0, 0);
594		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 1, 0);
595	}
596
597	if (isFront)
598	{
599		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_6900_front.png', 0, 0, 0);
600	}
601	else
602	{
603		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_6900_back.png', 0, 0, 0);
604
605		if (isDC)
606		{
607			c.image(w * 0.046, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
608			c.image(w * 0.227, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
609		}
610	}
611};
612
613mxCellRenderer.registerShape(mxRackF5BigIp6900.prototype.cst.SHAPE_BIG_IP_6900, mxRackF5BigIp6900);
614
615//**********************************************************************************************************************************************************
616//Big-IP 89x0
617//**********************************************************************************************************************************************************
618/**
619* Extends mxShape.
620*/
621function mxRackF5BigIp89x0(bounds, fill, stroke, strokewidth)
622{
623	mxShape.call(this);
624	this.bounds = bounds;
625	this.fill = fill;
626	this.stroke = stroke;
627	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
628};
629
630/**
631* Extends mxShape.
632*/
633mxUtils.extend(mxRackF5BigIp89x0, mxShape);
634
635mxRackF5BigIp89x0.prototype.cst =
636{
637		SHAPE_BIG_IP_89x0 : 'mxgraph.rackF5Shapes.big_ip_89x0'
638};
639
640/**
641* Function: paintVertexShape
642*
643* Paints the vertex shape.
644*/
645mxRackF5BigIp89x0.prototype.paintVertexShape = function(c, x, y, w, h)
646{
647	c.translate(x, y);
648
649	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
650	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
651	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
652	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
653	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
654
655	if (hasEars)
656	{
657		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 0, 0);
658		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 1, 0);
659	}
660
661	if (isFront)
662	{
663		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_89x0_front.png', 0, 0, 0);
664	}
665	else
666	{
667		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_6900_back.png', 0, 0, 0);
668
669		if (isDC)
670		{
671			c.image(w * 0.046, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
672			c.image(w * 0.227, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
673		}
674	}
675};
676
677mxCellRenderer.registerShape(mxRackF5BigIp89x0.prototype.cst.SHAPE_BIG_IP_89x0, mxRackF5BigIp89x0);
678
679//**********************************************************************************************************************************************************
680//Big-IP 7x00
681//**********************************************************************************************************************************************************
682/**
683* Extends mxShape.
684*/
685function mxRackF5BigIp7x00(bounds, fill, stroke, strokewidth)
686{
687	mxShape.call(this);
688	this.bounds = bounds;
689	this.fill = fill;
690	this.stroke = stroke;
691	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
692};
693
694/**
695* Extends mxShape.
696*/
697mxUtils.extend(mxRackF5BigIp7x00, mxShape);
698
699mxRackF5BigIp7x00.prototype.cst =
700{
701		SHAPE_BIG_IP_7x00 : 'mxgraph.rackF5Shapes.big_ip_7x00'
702};
703
704/**
705* Function: paintVertexShape
706*
707* Paints the vertex shape.
708*/
709mxRackF5BigIp7x00.prototype.paintVertexShape = function(c, x, y, w, h)
710{
711	c.translate(x, y);
712
713	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
714	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
715	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
716	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
717	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
718
719	if (hasEars)
720	{
721		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 0, 0);
722		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 1, 0);
723	}
724
725	if (isFront)
726	{
727		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_7x00_front.png', 0, 0, 0);
728	}
729	else
730	{
731		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_6900_back.png', 0, 0, 0);
732
733		if (isDC)
734		{
735			c.image(w * 0.046, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
736			c.image(w * 0.227, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
737		}
738	}
739};
740
741mxCellRenderer.registerShape(mxRackF5BigIp7x00.prototype.cst.SHAPE_BIG_IP_7x00, mxRackF5BigIp7x00);
742
743//**********************************************************************************************************************************************************
744//Big-IP 10x00
745//**********************************************************************************************************************************************************
746/**
747* Extends mxShape.
748*/
749function mxRackF5BigIp10x00(bounds, fill, stroke, strokewidth)
750{
751	mxShape.call(this);
752	this.bounds = bounds;
753	this.fill = fill;
754	this.stroke = stroke;
755	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
756};
757
758/**
759* Extends mxShape.
760*/
761mxUtils.extend(mxRackF5BigIp10x00, mxShape);
762
763mxRackF5BigIp10x00.prototype.cst =
764{
765		SHAPE_BIG_IP_10x00 : 'mxgraph.rackF5Shapes.big_ip_10x00'
766};
767
768/**
769* Function: paintVertexShape
770*
771* Paints the vertex shape.
772*/
773mxRackF5BigIp10x00.prototype.paintVertexShape = function(c, x, y, w, h)
774{
775	c.translate(x, y);
776
777	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
778	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
779	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
780	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
781	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
782
783	if (hasEars)
784	{
785		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 0, 0);
786		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_6900_ear.png', 0, 1, 0);
787	}
788
789	if (isFront)
790	{
791		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_10x00_front.png', 0, 0, 0);
792	}
793	else
794	{
795		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_6900_back.png', 0, 0, 0);
796
797		if (isDC)
798		{
799			c.image(w * 0.046, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
800			c.image(w * 0.227, h * 0.025, w * 0.176, h * 0.48, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
801		}
802	}
803};
804
805mxCellRenderer.registerShape(mxRackF5BigIp10x00.prototype.cst.SHAPE_BIG_IP_10x00, mxRackF5BigIp10x00);
806
807//**********************************************************************************************************************************************************
808//Big-IP 110x0
809//**********************************************************************************************************************************************************
810/**
811* Extends mxShape.
812*/
813function mxRackF5BigIp110x0(bounds, fill, stroke, strokewidth)
814{
815	mxShape.call(this);
816	this.bounds = bounds;
817	this.fill = fill;
818	this.stroke = stroke;
819	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
820};
821
822/**
823* Extends mxShape.
824*/
825mxUtils.extend(mxRackF5BigIp110x0, mxShape);
826
827mxRackF5BigIp110x0.prototype.cst =
828{
829		SHAPE_BIG_IP_110x0 : 'mxgraph.rackF5Shapes.big_ip_110x0'
830};
831
832/**
833* Function: paintVertexShape
834*
835* Paints the vertex shape.
836*/
837mxRackF5BigIp110x0.prototype.paintVertexShape = function(c, x, y, w, h)
838{
839	c.translate(x, y);
840
841	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
842	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
843	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
844	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
845	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
846
847	if (hasEars)
848	{
849		c.image(0, h * 0.33, w * 0.04, h * 0.67, stencilPath + 'big_ip_6900_ear.png', 0, 0, 0);
850		c.image(w * 0.96, h * 0.33, w * 0.04, h * 0.67, stencilPath + 'big_ip_6900_ear.png', 0, 1, 0);
851	}
852
853	if (isFront)
854	{
855		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_110x0_front.png', 0, 0, 0);
856	}
857	else
858	{
859		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_110x0_back.png', 0, 0, 0);
860
861		if (isDC)
862		{
863			c.image(w * 0.085, h * 0.025, w * 0.177, h * 0.31, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
864			c.image(w * 0.271, h * 0.025, w * 0.179, h * 0.31, stencilPath + 'big_ip_6900_dc.png', 0, 0, 0);
865		}
866	}
867};
868
869mxCellRenderer.registerShape(mxRackF5BigIp110x0.prototype.cst.SHAPE_BIG_IP_110x0, mxRackF5BigIp110x0);
870
871//**********************************************************************************************************************************************************
872//Viprion 2400
873//**********************************************************************************************************************************************************
874/**
875* Extends mxShape.
876*/
877function mxRackF5Viprion2400(bounds, fill, stroke, strokewidth)
878{
879	mxShape.call(this);
880	this.bounds = bounds;
881	this.fill = fill;
882	this.stroke = stroke;
883	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
884};
885
886/**
887* Extends mxShape.
888*/
889mxUtils.extend(mxRackF5Viprion2400, mxShape);
890
891mxRackF5Viprion2400.prototype.cst =
892{
893		SHAPE_VIPRION_2400 : 'mxgraph.rackF5Shapes.viprion_2400'
894};
895
896/**
897* Function: paintVertexShape
898*
899* Paints the vertex shape.
900*/
901mxRackF5Viprion2400.prototype.paintVertexShape = function(c, x, y, w, h)
902{
903	c.translate(x, y);
904
905	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
906	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
907	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
908	var bladeNum = parseInt(mxUtils.getValue(this.style, 'bladeNum', '4'));
909	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
910
911	if (hasEars)
912	{
913		c.image(0, 0, w * 0.04, h, stencilPath + 'viprion_2400_ear.png', 0, 0, 0);
914		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'viprion_2400_ear.png', 0, 1, 0);
915	}
916
917	if (isFront)
918	{
919		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_2400_front.png', 0, 0, 0);
920
921		if (isDC)
922		{
923			c.image(w * 0.178, h * 0.025, w * 0.301, h * 0.273, stencilPath + 'viprion_2400_dc.png', 0, 0, 0);
924			c.image(w * 0.52, h * 0.025, w * 0.301, h * 0.273, stencilPath + 'viprion_2400_dc.png', 0, 0, 0);
925		}
926
927		if (bladeNum >= 1)
928		{
929			c.image(w * 0.052, h * 0.337, w * 0.45, h * 0.29, stencilPath + 'viprion_2400_blade.png', 0, 0, 0);
930		}
931
932		if (bladeNum >= 2)
933		{
934			c.image(w * 0.495, h * 0.337, w * 0.45, h * 0.29, stencilPath + 'viprion_2400_blade.png', 0, 0, 0);
935		}
936
937		if (bladeNum >= 3)
938		{
939			c.image(w * 0.052, h * 0.655, w * 0.45, h * 0.29, stencilPath + 'viprion_2400_blade.png', 0, 0, 0);
940		}
941
942		if (bladeNum >= 4)
943		{
944			c.image(w * 0.495, h * 0.655, w * 0.45, h * 0.29, stencilPath + 'viprion_2400_blade.png', 0, 0, 0);
945		}
946	}
947	else
948	{
949		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_2400_back.png', 0, 0, 0);
950	}
951};
952
953mxCellRenderer.registerShape(mxRackF5Viprion2400.prototype.cst.SHAPE_VIPRION_2400, mxRackF5Viprion2400);
954
955//**********************************************************************************************************************************************************
956//Viprion 4400
957//**********************************************************************************************************************************************************
958/**
959* Extends mxShape.
960*/
961function mxRackF5Viprion4400(bounds, fill, stroke, strokewidth)
962{
963	mxShape.call(this);
964	this.bounds = bounds;
965	this.fill = fill;
966	this.stroke = stroke;
967	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
968};
969
970/**
971* Extends mxShape.
972*/
973mxUtils.extend(mxRackF5Viprion4400, mxShape);
974
975mxRackF5Viprion4400.prototype.cst =
976{
977		SHAPE_VIPRION_4400 : 'mxgraph.rackF5Shapes.viprion_4400'
978};
979
980/**
981* Function: paintVertexShape
982*
983* Paints the vertex shape.
984*/
985mxRackF5Viprion4400.prototype.paintVertexShape = function(c, x, y, w, h)
986{
987	c.translate(x, y);
988
989	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
990	var hasMask = mxUtils.getValue(this.style, 'hasMask', '1');
991	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
992	var bladeType = mxUtils.getValue(this.style, 'bladeType', '0');
993	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
994	var bladeNum = parseInt(mxUtils.getValue(this.style, 'bladeNum', '0'));
995	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
996
997	if (hasEars)
998	{
999		c.image(0, 0, w * 0.04, h, stencilPath + 'viprion_4400_ear.png', 0, 0, 0);
1000		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'viprion_4400_ear.png', 0, 1, 0);
1001	}
1002
1003	if (isFront)
1004	{
1005		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_4400_front_chassis.png', 0, 0, 0);
1006
1007		if (hasMask)
1008		{
1009			c.image(w * 0.033, h * 0.005, w * 0.934, h * 0.282, stencilPath + 'viprion_4400_front.png', 0, 0, 0);
1010		}
1011
1012		var bladeStr = stencilPath + 'viprion_4400_pb100_blade.png';
1013
1014		if (bladeType == 1)
1015		{
1016			bladeStr = stencilPath + 'viprion_4400_pb200_blade.png';
1017		}
1018		else if (bladeType == 2)
1019		{
1020			bladeStr = stencilPath + 'viprion_4400_b4300_blade.png';
1021		}
1022
1023
1024		if (bladeNum >= 1)
1025		{
1026			c.image(w * 0.182, h * 0.3, w * 0.74, h * 0.145, bladeStr, 0, 0, 0);
1027		}
1028
1029		if (bladeNum >= 2)
1030		{
1031			c.image(w * 0.182, h * 0.462, w * 0.74, h * 0.145, bladeStr, 0, 0, 0);
1032		}
1033
1034		if (bladeNum >= 3)
1035		{
1036			c.image(w * 0.182, h * 0.625, w * 0.74, h * 0.145, bladeStr, 0, 0, 0);
1037		}
1038
1039		if (bladeNum >= 4)
1040		{
1041			c.image(w * 0.182, h * 0.788, w * 0.74, h * 0.145, bladeStr, 0, 0, 0);
1042		}
1043	}
1044	else
1045	{
1046		if (isDC)
1047		{
1048			c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_4400_back_dc.png', 0, 0, 0);
1049		}
1050		else
1051		{
1052			c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_4400_back_ac.png', 0, 0, 0);
1053		}
1054	}
1055};
1056
1057mxCellRenderer.registerShape(mxRackF5Viprion4400.prototype.cst.SHAPE_VIPRION_4400, mxRackF5Viprion4400);
1058
1059//**********************************************************************************************************************************************************
1060//Viprion 4800
1061//**********************************************************************************************************************************************************
1062/**
1063* Extends mxShape.
1064*/
1065function mxRackF5Viprion4800(bounds, fill, stroke, strokewidth)
1066{
1067	mxShape.call(this);
1068	this.bounds = bounds;
1069	this.fill = fill;
1070	this.stroke = stroke;
1071	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
1072};
1073
1074/**
1075* Extends mxShape.
1076*/
1077mxUtils.extend(mxRackF5Viprion4800, mxShape);
1078
1079mxRackF5Viprion4800.prototype.cst =
1080{
1081		SHAPE_VIPRION_4800 : 'mxgraph.rackF5Shapes.viprion_4800'
1082};
1083
1084/**
1085* Function: paintVertexShape
1086*
1087* Paints the vertex shape.
1088*/
1089mxRackF5Viprion4800.prototype.paintVertexShape = function(c, x, y, w, h)
1090{
1091	c.translate(x, y);
1092
1093	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
1094	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
1095	var bladeNum = parseInt(mxUtils.getValue(this.style, 'bladeNum', '0'));
1096	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
1097
1098	if (hasEars)
1099	{
1100		c.image(0, h * 0.09, w * 0.04, h * 0.8, stencilPath + 'viprion_4800_ear.png', 0, 0, 0);
1101		c.image(w * 0.96, h * 0.09, w * 0.04, h * 0.8, stencilPath + 'viprion_4800_ear.png', 0, 1, 0);
1102	}
1103
1104	if (isFront)
1105	{
1106		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_4800_front.png', 0, 0, 0);
1107
1108
1109		if (bladeNum >= 1)
1110		{
1111			c.image(w * 0.075, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
1112		}
1113
1114		if (bladeNum >= 2)
1115		{
1116			c.image(w * 0.182, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
1117		}
1118
1119		if (bladeNum >= 3)
1120		{
1121			c.image(w * 0.289, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
1122		}
1123
1124		if (bladeNum >= 4)
1125		{
1126			c.image(w * 0.396, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
1127		}
1128
1129		if (bladeNum >= 5)
1130		{
1131			c.image(w * 0.503, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
1132		}
1133
1134		if (bladeNum >= 6)
1135		{
1136			c.image(w * 0.61, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
1137		}
1138
1139		if (bladeNum >= 7)
1140		{
1141			c.image(w * 0.717, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
1142		}
1143
1144		if (bladeNum >= 8)
1145		{
1146			c.image(w * 0.824, h * 0.245, w * 0.104, h * 0.516, stencilPath + 'viprion_4800_blade.png', 0, 0, 0);
1147		}
1148	}
1149	else
1150	{
1151		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'viprion_4800_back.png', 0, 0, 0);
1152	}
1153};
1154
1155mxCellRenderer.registerShape(mxRackF5Viprion4800.prototype.cst.SHAPE_VIPRION_4800, mxRackF5Viprion4800);
1156
1157//**********************************************************************************************************************************************************
1158//Big-IP i2000
1159//**********************************************************************************************************************************************************
1160/**
1161* Extends mxShape.
1162*/
1163function mxRackF5BigIpi2000(bounds, fill, stroke, strokewidth)
1164{
1165	mxShape.call(this);
1166	this.bounds = bounds;
1167	this.fill = fill;
1168	this.stroke = stroke;
1169	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
1170};
1171
1172/**
1173* Extends mxShape.
1174*/
1175mxUtils.extend(mxRackF5BigIpi2000, mxShape);
1176
1177mxRackF5BigIpi2000.prototype.cst =
1178{
1179		SHAPE_BIG_IP_I2000 : 'mxgraph.rackF5Shapes.big_ip_i2000'
1180};
1181
1182/**
1183* Function: paintVertexShape
1184*
1185* Paints the vertex shape.
1186*/
1187mxRackF5BigIpi2000.prototype.paintVertexShape = function(c, x, y, w, h)
1188{
1189	c.translate(x, y);
1190
1191	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
1192	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
1193	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
1194	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
1195	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
1196
1197	if (hasEars)
1198	{
1199		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
1200		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
1201	}
1202
1203	if (isFront)
1204	{
1205		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_i2000_front.png', 0, 0, 0);
1206	}
1207	else
1208	{
1209		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
1210
1211		if (isDC)
1212		{
1213			if (psNum >= '1')
1214			{
1215				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
1216			}
1217
1218			if (psNum >= '2')
1219			{
1220				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
1221			}
1222		}
1223		else
1224		{
1225			if (psNum >= '2')
1226			{
1227				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
1228			}
1229		}
1230	}
1231};
1232
1233mxCellRenderer.registerShape(mxRackF5BigIpi2000.prototype.cst.SHAPE_BIG_IP_I2000, mxRackF5BigIpi2000);
1234
1235//**********************************************************************************************************************************************************
1236//Big-IP i4000
1237//**********************************************************************************************************************************************************
1238/**
1239* Extends mxShape.
1240*/
1241function mxRackF5BigIpi4000(bounds, fill, stroke, strokewidth)
1242{
1243	mxShape.call(this);
1244	this.bounds = bounds;
1245	this.fill = fill;
1246	this.stroke = stroke;
1247	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
1248};
1249
1250/**
1251* Extends mxShape.
1252*/
1253mxUtils.extend(mxRackF5BigIpi4000, mxShape);
1254
1255mxRackF5BigIpi4000.prototype.cst =
1256{
1257		SHAPE_BIG_IP_I4000 : 'mxgraph.rackF5Shapes.big_ip_i4000'
1258};
1259
1260/**
1261* Function: paintVertexShape
1262*
1263* Paints the vertex shape.
1264*/
1265mxRackF5BigIpi4000.prototype.paintVertexShape = function(c, x, y, w, h)
1266{
1267	c.translate(x, y);
1268
1269	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
1270	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
1271	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
1272	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
1273	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
1274
1275	if (hasEars)
1276	{
1277		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
1278		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
1279	}
1280
1281	if (isFront)
1282	{
1283		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_i4000_front.png', 0, 0, 0);
1284	}
1285	else
1286	{
1287		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
1288
1289		if (isDC)
1290		{
1291			if (psNum >= '1')
1292			{
1293				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
1294			}
1295
1296			if (psNum >= '2')
1297			{
1298				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
1299			}
1300		}
1301		else
1302		{
1303			if (psNum >= '2')
1304			{
1305				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
1306			}
1307		}
1308	}
1309};
1310
1311mxCellRenderer.registerShape(mxRackF5BigIpi4000.prototype.cst.SHAPE_BIG_IP_I4000, mxRackF5BigIpi4000);
1312
1313//**********************************************************************************************************************************************************
1314//Big-IP i5000
1315//**********************************************************************************************************************************************************
1316/**
1317* Extends mxShape.
1318*/
1319function mxRackF5BigIpi5000(bounds, fill, stroke, strokewidth)
1320{
1321	mxShape.call(this);
1322	this.bounds = bounds;
1323	this.fill = fill;
1324	this.stroke = stroke;
1325	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
1326};
1327
1328/**
1329* Extends mxShape.
1330*/
1331mxUtils.extend(mxRackF5BigIpi5000, mxShape);
1332
1333mxRackF5BigIpi5000.prototype.cst =
1334{
1335		SHAPE_BIG_IP_I5000 : 'mxgraph.rackF5Shapes.big_ip_i5000'
1336};
1337
1338/**
1339* Function: paintVertexShape
1340*
1341* Paints the vertex shape.
1342*/
1343mxRackF5BigIpi5000.prototype.paintVertexShape = function(c, x, y, w, h)
1344{
1345	c.translate(x, y);
1346
1347	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
1348	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
1349	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
1350	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
1351	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
1352
1353	if (hasEars)
1354	{
1355		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
1356		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
1357	}
1358
1359	if (isFront)
1360	{
1361		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_i5000_front.png', 0, 0, 0);
1362	}
1363	else
1364	{
1365		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
1366
1367		if (isDC)
1368		{
1369			if (psNum >= '1')
1370			{
1371				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
1372			}
1373
1374			if (psNum >= '2')
1375			{
1376				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
1377			}
1378		}
1379		else
1380		{
1381			if (psNum >= '2')
1382			{
1383				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
1384			}
1385		}
1386	}
1387};
1388
1389mxCellRenderer.registerShape(mxRackF5BigIpi5000.prototype.cst.SHAPE_BIG_IP_I5000, mxRackF5BigIpi5000);
1390
1391//**********************************************************************************************************************************************************
1392//Big-IP i7000
1393//**********************************************************************************************************************************************************
1394/**
1395* Extends mxShape.
1396*/
1397function mxRackF5BigIpi7000(bounds, fill, stroke, strokewidth)
1398{
1399	mxShape.call(this);
1400	this.bounds = bounds;
1401	this.fill = fill;
1402	this.stroke = stroke;
1403	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
1404};
1405
1406/**
1407* Extends mxShape.
1408*/
1409mxUtils.extend(mxRackF5BigIpi7000, mxShape);
1410
1411mxRackF5BigIpi7000.prototype.cst =
1412{
1413		SHAPE_BIG_IP_I7000 : 'mxgraph.rackF5Shapes.big_ip_i7000'
1414};
1415
1416/**
1417* Function: paintVertexShape
1418*
1419* Paints the vertex shape.
1420*/
1421mxRackF5BigIpi7000.prototype.paintVertexShape = function(c, x, y, w, h)
1422{
1423	c.translate(x, y);
1424
1425	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
1426	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
1427	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
1428	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
1429	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
1430
1431	if (hasEars)
1432	{
1433		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
1434		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
1435	}
1436
1437	if (isFront)
1438	{
1439		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_i7000_front.png', 0, 0, 0);
1440	}
1441	else
1442	{
1443		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
1444
1445		if (isDC)
1446		{
1447			if (psNum >= '1')
1448			{
1449				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
1450			}
1451
1452			if (psNum >= '2')
1453			{
1454				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
1455			}
1456		}
1457		else
1458		{
1459			if (psNum >= '2')
1460			{
1461				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
1462			}
1463		}
1464	}
1465};
1466
1467mxCellRenderer.registerShape(mxRackF5BigIpi7000.prototype.cst.SHAPE_BIG_IP_I7000, mxRackF5BigIpi7000);
1468
1469//**********************************************************************************************************************************************************
1470//Big-IP i10000
1471//**********************************************************************************************************************************************************
1472/**
1473* Extends mxShape.
1474*/
1475function mxRackF5BigIpi10000(bounds, fill, stroke, strokewidth)
1476{
1477	mxShape.call(this);
1478	this.bounds = bounds;
1479	this.fill = fill;
1480	this.stroke = stroke;
1481	this.strokewidth = (strokewidth != null) ? strokewidth : 1;
1482};
1483
1484/**
1485* Extends mxShape.
1486*/
1487mxUtils.extend(mxRackF5BigIpi10000, mxShape);
1488
1489mxRackF5BigIpi10000.prototype.cst =
1490{
1491		SHAPE_BIG_IP_I10000 : 'mxgraph.rackF5Shapes.big_ip_i10000'
1492};
1493
1494/**
1495* Function: paintVertexShape
1496*
1497* Paints the vertex shape.
1498*/
1499mxRackF5BigIpi10000.prototype.paintVertexShape = function(c, x, y, w, h)
1500{
1501	c.translate(x, y);
1502
1503	var hasEars = mxUtils.getValue(this.style, 'hasEars', '1');
1504	var isFront = mxUtils.getValue(this.style, 'isFront', '0');
1505	var isDC = mxUtils.getValue(this.style, 'isDC', '0');
1506	var psNum = parseInt(mxUtils.getValue(this.style, 'psNum', '2'));
1507	var stencilPath = mxUtils.getValue(this.style, 'path', 'img/lib/f5/');
1508
1509	if (hasEars)
1510	{
1511		c.image(0, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 0, 0);
1512		c.image(w * 0.96, 0, w * 0.04, h, stencilPath + 'big_ip_5x00_ear.png', 0, 1, 0);
1513	}
1514
1515	if (isFront)
1516	{
1517		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_i10000_front.png', 0, 0, 0);
1518	}
1519	else
1520	{
1521		c.image(w * 0.04, 0, w * 0.92, h, stencilPath + 'big_ip_1600_back.png', 0, 0, 0);
1522
1523		if (isDC)
1524		{
1525			if (psNum >= '1')
1526			{
1527				c.image(w * 0.425, h * 0.05, w * 0.244, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
1528			}
1529
1530			if (psNum >= '2')
1531			{
1532				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_dc.png', 0, 0, 0);
1533			}
1534		}
1535		else
1536		{
1537			if (psNum >= '2')
1538			{
1539				c.image(w * 0.672, h * 0.05, w * 0.245, h * 0.92, stencilPath + 'big_ip_4x00_ac.png', 0, 0, 0);
1540			}
1541		}
1542	}
1543};
1544
1545mxCellRenderer.registerShape(mxRackF5BigIpi10000.prototype.cst.SHAPE_BIG_IP_I10000, mxRackF5BigIpi10000);
1546
1547/**
1548 * Order is relevant. Do not move to start of file!
1549 */
1550Draw.loadPlugin(function(ui)
1551{
1552	var w = 100;
1553	var h = 100;
1554	var stencilPath = "path=https://jgraph.github.io/drawio-libs/libs/f5/;";
1555	var s = stencilPath + 'strokeColor=#666666;html=1;labelPosition=right;align=left;spacingLeft=15;shadow=0;dashed=0;fillColor=#ffffff;outlineConnect=0;shape=mxgraph.rackF5Shapes.';
1556
1557	var gn = 'mxgraph.rackF5Shapes';
1558	var dt = '';
1559
1560	// Avoids having to bind all functions to "this"
1561	var sb = ui.sidebar;
1562
1563	// Default tags
1564	var dt = 'rack f5 network ';
1565
1566	var fns = [
1567		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_1600;hasEars=0;isFront=1;isDC=0;psNum=1;',
1568				168, 16, '', 'Big-IP 1600', null, null, dt + 'big ip 1600'),
1569		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_1600;hasEars=1;isFront=0;isDC=1;psNum=2;',
1570				168, 16, '', 'Big-IP 1600', null, null, dt + 'big ip 1600'),
1571
1572		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_2x00;hasEars=0;isFront=1;isDC=0;psNum=1;',
1573				168, 16, '', 'Big-IP 2x00', null, null, dt + 'big ip 2x00'),
1574		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_2x00;hasEars=1;isFront=0;isDC=1;psNum=2;',
1575				168, 16, '', 'Big-IP 2x00', null, null, dt + 'big ip 2x00'),
1576
1577		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_3600;hasEars=0;isFront=1;isDC=0;psNum=1;',
1578				168, 16, '', 'Big-IP 3600', null, null, dt + 'big ip 3600'),
1579		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_3600;hasEars=1;isFront=0;isDC=1;psNum=2;',
1580				168, 16, '', 'Big-IP 3600', null, null, dt + 'big ip 3600'),
1581
1582		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_3900;hasEars=0;isFront=1;isDC=0;psNum=1;',
1583				168, 16, '', 'Big-IP 3900', null, null, dt + 'big ip 3900'),
1584		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_3900;hasEars=1;isFront=0;isDC=1;psNum=2;',
1585				168, 16, '', 'Big-IP 3900', null, null, dt + 'big ip 3900'),
1586
1587		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_4x00;hasEars=0;isFront=1;isDC=0;psNum=1;',
1588				168, 16, '', 'Big-IP 4x00', null, null, dt + 'big ip 4x00'),
1589		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_4x00;hasEars=1;isFront=0;isDC=1;psNum=2;',
1590				168, 16, '', 'Big-IP 4x00', null, null, dt + 'big ip 4x00'),
1591
1592		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_5x00;hasEars=0;isFront=1;isDC=0;psNum=1;',
1593				168, 16, '', 'Big-IP 5x00', null, null, dt + 'big ip 5x00'),
1594		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_5x00;hasEars=1;isFront=0;isDC=1;psNum=2;',
1595				168, 16, '', 'Big-IP 5x00', null, null, dt + 'big ip 5x00'),
1596
1597		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.em4000;hasEars=0;isFront=1;isDC=0;psNum=1;',
1598				168, 16, '', 'EM 4000', null, null, dt + 'em 4000'),
1599		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.em4000;hasEars=1;isFront=0;isDC=1;psNum=2;',
1600				168, 16, '', 'EM 4000', null, null, dt + 'em 4000'),
1601
1602		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_6900;hasEars=0;isFront=1;isDC=0;',
1603				168, 32, '', 'Big-IP 6900', null, null, dt + 'big ip 6900'),
1604		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_6900;hasEars=1;isFront=0;isDC=1;',
1605				168, 32, '', 'Big-IP 6900', null, null, dt + 'big ip 6900'),
1606
1607		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_89x0;hasEars=0;isFront=1;isDC=0;',
1608				168, 32, '', 'Big-IP 89x0', null, null, dt + 'big ip 89x0'),
1609		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_6900;hasEars=1;isFront=0;isDC=1;',
1610				168, 32, '', 'Big-IP 89x0', null, null, dt + 'big ip 89x0'),
1611
1612		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_7x00;hasEars=0;isFront=1;isDC=0;',
1613				168, 32, '', 'Big-IP 7x00', null, null, dt + 'big ip 7x00'),
1614		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_7x00;hasEars=1;isFront=0;isDC=1;',
1615				168, 32, '', 'Big-IP 7x00', null, null, dt + 'big ip 7x00'),
1616
1617		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_10x00;hasEars=0;isFront=1;isDC=0;',
1618				168, 32, '', 'Big-IP 10x00', null, null, dt + 'big ip 10x00'),
1619		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_10x00;hasEars=1;isFront=0;isDC=1;',
1620				168, 32, '', 'Big-IP 10x00', null, null, dt + 'big ip 10x00'),
1621
1622		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_110x0;hasEars=0;isFront=1;isDC=0;',
1623				168, 48, '', 'Big-IP 110x0', null, null, dt + 'big ip 110x0'),
1624		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_110x0;hasEars=1;isFront=0;isDC=1;',
1625				168, 48, '', 'Big-IP 110x0', null, null, dt + 'big ip 110x0'),
1626
1627		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_2400;hasEars=0;isFront=1;isDC=1;bladeNum=4;',
1628				168, 64, '', 'VIPRION 2400', null, null, dt + 'viprion 2400'),
1629		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_2400;hasEars=1;isFront=0;isDC=0;bladeNum=4;',
1630				168, 64, '', 'VIPRION 2400', null, null, dt + 'viprion 2400'),
1631
1632		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_4400;hasMask=1;bladeType=0;hasEars=0;isFront=1;isDC=1;bladeNum=4;',
1633				168, 112, '', 'VIPRION 4400', null, null, dt + 'viprion 4400'),
1634		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_4400;hasMask=1;bladeType=0;hasEars=1;isFront=0;isDC=0;bladeNum=4;',
1635				168, 112, '', 'VIPRION 4400', null, null, dt + 'viprion 4400'),
1636
1637		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_4800;hasEars=1;isFront=1;bladeNum=8;',
1638				168, 224, '', 'VIPRION 4800', null, null, dt + 'viprion 4800'),
1639		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.viprion_4800;hasEars=0;isFront=0;bladeNum=8;',
1640				168, 224, '', 'VIPRION 4800', null, null, dt + 'viprion 4800'),
1641
1642		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i2000;hasEars=0;isFront=1;isDC=0;psNum=1;',
1643				168, 16, '', 'Big-IP i2000', null, null, dt + 'big ip i2000'),
1644		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i2000;hasEars=1;isFront=0;isDC=1;psNum=2;',
1645				168, 16, '', 'Big-IP i2000', null, null, dt + 'big ip i2000'),
1646
1647		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i4000;hasEars=0;isFront=1;isDC=0;psNum=1;',
1648				168, 16, '', 'Big-IP i4000', null, null, dt + 'big ip i4000'),
1649		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i4000;hasEars=1;isFront=0;isDC=1;psNum=2;',
1650				168, 16, '', 'Big-IP i4000', null, null, dt + 'big ip i4000'),
1651
1652		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i5000;hasEars=0;isFront=1;isDC=0;psNum=1;',
1653				168, 16, '', 'Big-IP i5000', null, null, dt + 'big ip i5000'),
1654		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i5000;hasEars=1;isFront=0;isDC=1;psNum=2;',
1655				168, 16, '', 'Big-IP i5000', null, null, dt + 'big ip i5000'),
1656
1657		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i7000;hasEars=0;isFront=1;isDC=0;psNum=1;',
1658				168, 16, '', 'Big-IP i7000', null, null, dt + 'big ip i7000'),
1659		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i7000;hasEars=1;isFront=0;isDC=1;psNum=2;',
1660				168, 16, '', 'Big-IP i7000', null, null, dt + 'big ip i7000'),
1661
1662		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i10000;hasEars=0;isFront=1;isDC=0;psNum=1;',
1663				168, 16, '', 'Big-IP i10000', null, null, dt + 'big ip i10000'),
1664		sb.createVertexTemplateEntry(stencilPath + 'shape=mxgraph.rackF5Shapes.big_ip_i10000;hasEars=1;isFront=0;isDC=1;psNum=2;',
1665				168, 16, '', 'Big-IP i10000', null, null, dt + 'big ip i10000')
1666	];
1667
1668	ui.sidebar.addPaletteFunctions('rackF5Shapes', 'Rack / F5 v2', true, fns);
1669
1670    // Collapses default sidebar entry and inserts this before
1671    var c = ui.sidebar.container;
1672    c.firstChild.click();
1673    c.insertBefore(c.lastChild, c.firstChild);
1674    c.insertBefore(c.lastChild, c.firstChild);
1675});
1676