parlement 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. data/CHANGES +16 -0
  2. data/README +36 -3
  3. data/Rakefile +8 -12
  4. data/app/controllers/account_controller.rb +2 -0
  5. data/app/controllers/elt_controller.rb +1 -5
  6. data/app/controllers/subscriber_controller.rb +1 -1
  7. data/app/helpers/elt_helper.rb +30 -10
  8. data/app/models/elt.rb +2 -1
  9. data/app/models/mail.rb +41 -41
  10. data/app/models/mail_notify.rb +27 -10
  11. data/app/views/account/_login.rhtml +9 -7
  12. data/app/views/account/_show.rhtml +4 -4
  13. data/app/views/elt/_elt.rhtml +52 -51
  14. data/app/views/elt/_list.rhtml +22 -14
  15. data/app/views/elt/new.rhtml +1 -1
  16. data/app/views/elt/show.rhtml +15 -16
  17. data/app/views/layouts/top.rhtml +13 -1
  18. data/app/views/person/show.rhtml +1 -7
  19. data/config/boot.rb +32 -7
  20. data/config/database.yml +3 -0
  21. data/config/environment.rb +3 -1
  22. data/config/environments/development.rb +1 -1
  23. data/db/ROOT/parlement/ddRing.txt +14 -0
  24. data/db/ROOT/parlement/top-politics.txt +12 -0
  25. data/db/ROOT/perso.txt +1 -1
  26. data/db/development_structure.sql +30 -16
  27. data/db/schema.rb +18 -10
  28. data/db/schema.sql +34 -34
  29. data/public/javascripts/application.js +2 -0
  30. data/public/javascripts/blank.gif +0 -0
  31. data/public/javascripts/borders.js +687 -0
  32. data/public/javascripts/controls.js +95 -30
  33. data/public/javascripts/dragdrop.js +161 -21
  34. data/public/javascripts/effects.js +310 -211
  35. data/public/javascripts/ie7-load.htc +1 -0
  36. data/public/javascripts/prototype.js +228 -28
  37. data/test/fixtures/attachments.yml +3 -0
  38. data/test/fixtures/mail/mail_ruby +1 -0
  39. data/test/fixtures/people.yml +14 -0
  40. data/test/functional/account_controller_test.rb +3 -2
  41. data/test/unit/mail_notify_test.rb +2 -0
  42. data/test/unit/mail_test.rb +59 -6
  43. data/test/unit/person_test.rb +1 -1
  44. data/vendor/plugins/engines/CHANGELOG +92 -0
  45. data/vendor/plugins/engines/MIT-LICENSE +21 -0
  46. data/vendor/plugins/engines/README +325 -39
  47. data/vendor/plugins/engines/generators/engine/USAGE +26 -0
  48. data/vendor/plugins/engines/generators/engine/engine_generator.rb +199 -0
  49. data/vendor/plugins/engines/generators/engine/templates/README +85 -0
  50. data/vendor/plugins/engines/generators/engine/templates/init_engine.erb +13 -0
  51. data/vendor/plugins/engines/generators/engine/templates/install.erb +4 -0
  52. data/vendor/plugins/engines/generators/engine/templates/lib/engine.erb +6 -0
  53. data/vendor/plugins/engines/generators/engine/templates/licenses/GPL +18 -0
  54. data/vendor/plugins/engines/generators/engine/templates/licenses/LGPL +19 -0
  55. data/vendor/plugins/engines/generators/engine/templates/licenses/MIT +22 -0
  56. data/vendor/plugins/engines/generators/engine/templates/licenses/None +1 -0
  57. data/vendor/plugins/engines/generators/engine/templates/public/javascripts/engine.js +0 -0
  58. data/vendor/plugins/engines/generators/engine/templates/public/stylesheets/engine.css +0 -0
  59. data/vendor/plugins/engines/generators/engine/templates/tasks/engine.rake +0 -0
  60. data/vendor/plugins/engines/generators/engine/templates/test/test_helper.erb +13 -0
  61. data/vendor/plugins/engines/init.rb +18 -3
  62. data/vendor/plugins/engines/lib/bundles/require_resource.rb +124 -0
  63. data/vendor/plugins/engines/lib/bundles.rb +77 -0
  64. data/vendor/plugins/engines/lib/{action_mailer_extensions.rb → engines/action_mailer_extensions.rb} +15 -36
  65. data/vendor/plugins/engines/lib/{action_view_extensions.rb → engines/action_view_extensions.rb} +40 -33
  66. data/vendor/plugins/engines/lib/engines/active_record_extensions.rb +19 -0
  67. data/vendor/plugins/engines/lib/engines/dependencies_extensions.rb +118 -0
  68. data/vendor/plugins/engines/lib/engines/migration_extensions.rb +53 -0
  69. data/vendor/plugins/engines/lib/{ruby_extensions.rb → engines/ruby_extensions.rb} +14 -28
  70. data/vendor/plugins/engines/lib/engines/testing_extensions.rb +323 -0
  71. data/vendor/plugins/engines/lib/engines.rb +258 -148
  72. data/vendor/plugins/engines/tasks/engines.rake +161 -0
  73. data/vendor/plugins/engines/test/action_view_extensions_test.rb +9 -0
  74. data/vendor/plugins/engines/test/ruby_extensions_test.rb +24 -3
  75. data/vendor/plugins/guid/README.TXT +14 -4
  76. data/vendor/plugins/guid/init.rb +9 -2
  77. data/vendor/plugins/guid/lib/uuidtools.rb +22 -15
  78. data/vendor/plugins/login_engine/CHANGELOG +14 -0
  79. data/vendor/plugins/login_engine/README +93 -7
  80. data/vendor/plugins/login_engine/app/controllers/user_controller.rb +30 -20
  81. data/vendor/plugins/login_engine/app/helpers/user_helper.rb +1 -1
  82. data/vendor/plugins/login_engine/app/views/user/forgot_password.rhtml +2 -2
  83. data/vendor/plugins/login_engine/db/migrate/001_initial_schema.rb +25 -0
  84. data/vendor/plugins/login_engine/install.rb +4 -0
  85. data/vendor/plugins/login_engine/lib/login_engine/authenticated_system.rb +11 -5
  86. data/vendor/plugins/login_engine/lib/login_engine/authenticated_user.rb +15 -9
  87. data/vendor/plugins/login_engine/lib/login_engine.rb +7 -3
  88. data/vendor/plugins/login_engine/test/functional/user_controller_test.rb +22 -19
  89. data/vendor/plugins/login_engine/test/test_helper.rb +4 -8
  90. data/vendor/plugins/login_engine/test/unit/user_test.rb +31 -11
  91. metadata +60 -57
  92. data/app/models/attachment.rb +0 -6
  93. data/public/attachment/file/architecture.png +0 -0
  94. data/public/attachment/file/architecture.svg +0 -8972
  95. data/public/attachment/file/security.svg +0 -8960
  96. data/public/engine_files/login_engine/stylesheets/login_engine.css +0 -81
  97. data/public/oldREADME +0 -190
  98. data/public/stylesheets/default.css +0 -235
  99. data/public/stylesheets/live_tree.css +0 -62
  100. data/public/stylesheets/scaffold.css +0 -74
  101. data/script/about +0 -3
  102. data/script/benchmarker +0 -19
  103. data/script/breakpointer +0 -3
  104. data/script/console +0 -3
  105. data/script/create_db +0 -7
  106. data/script/destroy +0 -3
  107. data/script/generate +0 -3
  108. data/script/performance/benchmarker +0 -3
  109. data/script/performance/profiler +0 -3
  110. data/script/plugin +0 -3
  111. data/script/process/reaper +0 -3
  112. data/script/process/spawner +0 -3
  113. data/script/process/spinner +0 -3
  114. data/script/profiler +0 -34
  115. data/script/runner +0 -3
  116. data/script/server +0 -3
  117. data/test/unit/user_test.rb +0 -94
  118. data/vendor/plugins/engines/lib/dependencies_extensions.rb +0 -56
  119. data/vendor/plugins/engines/lib/testing_extensions.rb +0 -33
  120. data/vendor/plugins/login_engine/db/schema.rb +0 -25
  121. data/vendor/plugins/login_engine/test/fixtures/templates/users.yml +0 -41
  122. /data/public/images/{eltBackground.png → eltBackground.jng} +0 -0
@@ -0,0 +1,687 @@
1
+ { // written by Kae - kae@verens.com
2
+ /*
3
+ Use this as you wish. Please retain this notice.
4
+ This source has elements coded by Dean Edwards - please read his notices before copying
5
+ */
6
+ }
7
+ function getCss(){
8
+ var a=document.getElementsByTagName('style'),b=document.getElementsByTagName('link'),i=0;getCss_done=1;
9
+ /* get internal styles */ {
10
+ for(;i<a.length;)getCss_text+=a[i++].innerHTML;
11
+ }
12
+ /* get external stylesheets */ {
13
+ for(i=0;i<b.length;++i){
14
+ if(b[i].type=='text/css'&&b[i].href){
15
+ getCss_done=0;
16
+ getCss_leftToDo++;
17
+ var x=new XMLHttpRequest();
18
+ x.open('GET',b[i].href,true);
19
+ x.onreadystatechange=function(){
20
+ if(x.readyState==4&&(x.status==200||x.status==304)){
21
+ getCss_text+=x.responseText;
22
+ getCss_leftToDo--;
23
+ if(!getCss_leftToDo)getCss_parseCssText();
24
+ }
25
+ }
26
+ x.send(null);
27
+ }
28
+ }
29
+ }
30
+ if(!getCss_leftToDo)getCss_parseCssText();
31
+ }
32
+ function fillArr(arr,keys,val){
33
+ for(i in keys)arr[keys[i]]=val;
34
+ return arr;
35
+ }
36
+ function getCss_parseCssText(){
37
+ getCss_done=1;
38
+ var a,rules=[],i,j=0,rules2,b;
39
+ /* get CSS parts */ {
40
+ getCss_text=getCss_text.replace(/<!--|\n|\r| +|\t/g,' ');
41
+ getCss_text=getCss_text.replace(/( +|)(:|{|}|;)( +|)/g,'$2');
42
+ b=getCss_text.split(/}/);
43
+ for(a in b)if(b[a]!=''&&/\{/.test(b[a]))rules.push(b[a]);
44
+ }
45
+ for(j in rules){ // separate rules into selectors, then build parameters array
46
+ a=-1;
47
+ parts=rules[j].split(/{/);
48
+ for(i in getCss_rules)if(getCss_rules[i][0]==parts[0])a=i;
49
+ if(a==-1){
50
+ a=getCss_rules.length;
51
+ getCss_rules[a]=[parts[0],[]];
52
+ }
53
+ rules2=parts[1].split(/;/);
54
+ if(rules2[rules2.length-1]=='')rules2.pop();
55
+ var elRules=[];
56
+ elRules['border-bottom-left-radius']='0px 0px';
57
+ elRules['border-bottom-right-radius']='0px 0px';
58
+ elRules['border-top-left-radius']='0px 0px';
59
+ elRules['border-top-right-radius']='0px 0px';
60
+ elRules['border-bottom-width']=0;
61
+ elRules['border-left-width']=0;
62
+ elRules['border-right-width']=0;
63
+ elRules['border-top-width']=0;
64
+ for(i in rules2){
65
+ parts2=rules2[i].split(/:/);
66
+ parts2[0]=parts2[0].toLowerCase();
67
+ parts3=parts2[1].split(/ /);
68
+ parts3L=parts3.length;
69
+ switch(parts2[0]){
70
+ case 'background': {
71
+ lefttop=0;
72
+ for(k=0;k<parts3.length;++k){
73
+ if(parts3[k].match(/repeat/))elRules['background-repeat']=parts3[k];
74
+ else if(parts3[k].match(/^url/))elRules['background-image']=parts3[k];
75
+ else if(parts3[k].match(/^[0-9]|center|top|right|bottom|left/)){
76
+ if(lefttop++)elRules['background-position-horizontal']=parts3[k];
77
+ else elRules['background-position-vertical']=parts3[k];
78
+ }
79
+ else elRules['background-color']=parts3[k];
80
+ }
81
+ break; }
82
+ case 'border': {
83
+ for(k=0;k<parts3.length;++k){
84
+ if(parts3[k].match(/px$/))elRules=fillArr(elRules,['border-top-width','border-right-width','border-bottom-width','border-left-width'],parts3[k]);
85
+ else if(parts3[k].match(/solid|dashed|dotted|none/))elRules=fillArr(elRules,['border-top-style','border-right-style','border-bottom-style','border-left-style'],parts3[k]);
86
+ else elRules=fillArr(elRules,['border-top-color','border-right-color','border-bottom-color','border-left-color'],parts3[k]);
87
+ }
88
+ break; }
89
+ case 'border-radius': {
90
+ elRules=fillArr(elRules,['border-top-right-radius','border-top-left-radius','border-bottom-right-radius','border-bottom-left-radius'],(parts3L>1)?parts3[0]+' '+parts3[1]:parts3[0]+' '+parts3[0]);
91
+ break; }
92
+ case 'border-top-right-radius': case 'border-top-left-radius': case 'border-bottom-right-radius': case 'border-bottom-left-radius': {
93
+ elRules['border-'+parts2[0].replace(/border-|-radius/g,'')+'-radius']=(parts3L>1)?parts3[0]+' '+parts3[1]:parts3[0]+' '+parts3[0];
94
+ break; }
95
+ case 'border-color': case 'border-style': case 'border-width': {
96
+ var suffix=parts2[0].substring(6);
97
+ elRules['border-top'+suffix]=parts3[0];
98
+ elRules['border-right'+suffix]=parts3L>1?parts3[1]:parts3[0];
99
+ elRules['border-bottom'+suffix]=parts3L>2?parts3[2]:parts3[0];
100
+ elRules['border-left'+suffix]=parts3L>3?parts3[3]:(parts3L>1?parts3[1]:parts3[0]);
101
+ break; }
102
+ default: {
103
+ elRules[parts2[0]]=parts2[1]; }
104
+ }
105
+ }
106
+ getCss_rules[a][1]=elRules;
107
+ }
108
+ }
109
+ function borders(){
110
+ if(getCss_done)return borders_generateBorders();
111
+ getCss();
112
+ borders_waitForCss();
113
+ }
114
+ function borders_waitForCss(){
115
+ if(!getCss_done)return setTimeout('borders_waitForCss()',20);
116
+ borders_generateBorders();
117
+ }
118
+ function borders_generateBorders(){
119
+ /* common variables */ {
120
+ var i=0,x,y,k,tpp=2;
121
+ }
122
+ for(;i<getCss_rules.length;++i){
123
+ /* variables */ {
124
+ var rules=getCss_rules[i][1];
125
+ var wt=parseInt(rules['border-top-width']),wr=parseInt(rules['border-right-width']);
126
+ var wb=parseInt(rules['border-bottom-width']),wl=parseInt(rules['border-left-width']);
127
+ }
128
+ if(wt||wr||wb||wl){
129
+ /* common variables */ {
130
+ var tr=rules['border-top-right-radius'].split(' '),br=rules['border-bottom-right-radius'].split(' ');
131
+ var bl=rules['border-bottom-left-radius'].split(' '),tl=rules['border-top-left-radius'].split(' ');
132
+ var bl0=parseInt(bl[0]),br0=parseInt(br[0]),tl0=parseInt(tl[0]),tr0=parseInt(tr[0]);
133
+ var bl1=parseInt(bl[1]),br1=parseInt(br[1]),tl1=parseInt(tl[1]),tr1=parseInt(tr[1]);
134
+ var els=cssQuery(getCss_rules[i][0]),j=0,tpp2=tpp*tpp;
135
+ }
136
+ for(;j<els.length;++j){ /* draw border and background */
137
+ /* setup border array and common variables */ {
138
+ var a,theEl=els[j];
139
+ var x=parseInt(theEl.offsetLeft),y=parseInt(theEl.offsetTop),xw=parseInt(theEl.offsetWidth);
140
+ var yh=parseInt(theEl.offsetHeight),b_arr=[],k=0,tppTR0=tr0*tpp,tppTR1=tr1*tpp;
141
+ var tppBR0=br0*tpp,tppBR1=br1*tpp,tppBL0=bl0*tpp,tppBL1=bl1*tpp,tppTL0=tl0*tpp,tppTL1=tl1*tpp;
142
+ var tppWR=wr*tpp,tppWL=wl*tpp,tppWidth=xw*tpp,tppHeight=yh*tpp,b_arrInnerTop=wt*tpp,tppWB=wb*tpp;
143
+ var b_arrInnerBottom=tppHeight-tppWB;
144
+ for(;k<tppWidth;++k)b_arr[k]=[0,b_arrInnerTop,b_arrInnerBottom,tppHeight]; // array of borders for the curves
145
+ if(isKonqueror){
146
+ x+=parseInt(document.defaultView.getComputedStyle(theEl.offsetParent,'').getPropertyValue('margin-left'));
147
+ y+=parseInt(document.defaultView.getComputedStyle(theEl.offsetParent,'').getPropertyValue('margin-top'));
148
+ }
149
+ if(isMSIE){
150
+ var ml=parseInt(theEl.offsetParent.currentStyle.marginLeft);
151
+ if(!isNaN(ml))x+=ml;
152
+ var mt=parseInt(theEl.offsetParent.currentStyle.marginTop);
153
+ if(!isNaN(mt))y+=mt;
154
+ }
155
+ }
156
+ /* create background element */ {
157
+ var bgwNum=theEl.backgroundwrapper?theEl.backgroundwrapper:(++backgroundwrappers);
158
+ var bgwZ=(theEl.style.zIndex && parseInt(theEl.style.zIndex)>1)?parseInt(theEl.style.zIndex)-1:1;
159
+ theEl.backgroundwrapper=bgwNum;
160
+ theEl.style.zIndex=bgwZ+1;
161
+ theEl.style.position='relative';
162
+ var bgw=document.getElementById('borderradiuswrapper'+bgwNum);
163
+ if(bgw)bgw.parentNode.removeChild(bgw);
164
+ var bgw=document.createElement('pseudo');
165
+ bgw.id='borderradiuswrapper'+bgwNum;
166
+ var bgwStyle=bgw.style;
167
+ bgwStyle.zIndex=bgwZ;
168
+ bgwStyle.position='absolute';
169
+ bgwStyle.left=x+'px';
170
+ bgwStyle.top=y+'px';
171
+ bgwStyle.width=xw;
172
+ bgwStyle.height=yh;
173
+ }
174
+ /* generate curved borders */ {
175
+ if(tr0){ // top right corner
176
+ var irx=tppTR0-tppWR,iry=tppTR1-b_arrInnerTop;
177
+ var irx2=irx*irx,iry2=iry*iry,tppTR0_2=tppTR0*tppTR0,tppTR1_2=tppTR1*tppTR1;
178
+ for(var cx=tppTR0-1;cx>-1;--cx){
179
+ var cx2=cx*cx,ind=tppWidth-tppTR0+cx;
180
+ if(ind>-1){
181
+ var h=(cx<irx)?Math.sqrt(iry2*(1-cx2/irx2)):0;
182
+ b_arr[ind][0]=tppTR1-Math.sqrt(tppTR1_2*(1-cx2/tppTR0_2));
183
+ b_arr[ind][1]=tppTR1-h;
184
+ }
185
+ }
186
+ }
187
+ if(br0){ // bottom right corner
188
+ var irx=tppBR0-tppWR,iry=tppBR1-tppWB;
189
+ var irx2=irx*irx,tmp2=tppHeight-tppBR1,tppBR0_2=tppBR0*tppBR0,tppBR1_2=tppBR1*tppBR1;
190
+ for(var cx=tppBR0-1;cx>-1;--cx){
191
+ var cx2=cx*cx,ind=tppWidth-tppBR0+cx;
192
+ if(ind>-1){
193
+ var h=(cx<irx)?Math.sqrt(iry*iry*(1-cx2/irx2)):0;
194
+ b_arr[ind][2]=tmp2+h;
195
+ b_arr[ind][3]=tmp2+Math.sqrt(tppBR1_2*(1-cx2/tppBR0_2));
196
+ }
197
+ }
198
+ }
199
+ if(bl0){ // bottom left corner
200
+ var bl02=tppBL0*tppBL0,bl12=tppBL1*tppBL1,irx=tppBL0-tppWL,iry=tppBL1-tppWB;
201
+ var irx2=irx*irx,iry2=iry*iry,tmp1=bl0*tpp-1,tmp2=tppHeight-tppBL1;
202
+ for(var cx=tppBL0-1;cx>-1;--cx){
203
+ var cx2=cx*cx,ind=tmp1-cx;
204
+ if(ind>-1){
205
+ var h=(cx<irx)?Math.sqrt(iry2*(1-cx2/irx2)):0;
206
+ b_arr[ind][2]=tmp2+h;
207
+ b_arr[ind][3]=tmp2+Math.sqrt(bl12*(1-cx2/(bl02)));
208
+ }
209
+ }
210
+ }
211
+ if(tl0){ // top left corner
212
+ var tl02=tppTL0*tppTL0,tl12=tppTL1*tppTL1,irx=tppTL0-tppWL,iry=tppTL1-b_arrInnerTop;
213
+ var irx2=irx*irx,iry2=iry*iry,tmp1=tppTL0-1;
214
+ for(cx=tppTL0-1;cx>-1;--cx){
215
+ var cx2=cx*cx,ind=tmp1-cx;
216
+ if(ind>-1){
217
+ var h=(cx<irx)?Math.sqrt(iry2*(1-cx2/irx2)):0;
218
+ b_arr[ind][0]=tppTL1-Math.sqrt(tl12*(1-cx2/(tl02)));
219
+ b_arr[ind][1]=tppTL1-h;
220
+ }
221
+ }
222
+ }
223
+ }
224
+ /* fill in the background */ {
225
+ var px1=(tl0>bl0)?tppTL0:tppBL0;
226
+ var px2=(tr0>br0)?tppWidth-tppTR0:tppWidth-tppBR0;
227
+ for(k=0;k<px1;k+=tpp){
228
+ var top,bottom,l=0;
229
+ for(;l<tpp;++l){
230
+ if(!l || b_arr[k+l][0]>top)top=b_arr[k+l][0];
231
+ if(!l || b_arr[k+l][3]<bottom)bottom=b_arr[k+l][3];
232
+ }
233
+ top=Math.ceil(top/tpp);
234
+ bottom=Math.floor(bottom/tpp);
235
+ drawRect(bgw,k/tpp,top,1,bottom-top,rules['background-color'],rules['background-image']);
236
+ }
237
+ drawRect(bgw,px1/tpp,0,(px2-px1)/tpp,yh,rules['background-color'],rules['background-image']);
238
+ for(k=px2;k<tppWidth;k+=tpp){
239
+ var top,bottom,l=0;
240
+ for(;l<tpp;++l){
241
+ if(!l || b_arr[k+l][0]>top)top=b_arr[k+l][0];
242
+ if(!l || b_arr[k+l][3]<bottom)bottom=b_arr[k+l][3];
243
+ }
244
+ top=Math.ceil(top/tpp);
245
+ bottom=Math.floor(bottom/tpp);
246
+ drawRect(bgw,k/tpp,top,1,bottom-top,rules['background-color'],rules['background-image']);
247
+ }
248
+ }
249
+ /* draw borders */ {
250
+ var commonvars=[bgw,tpp,b_arr];
251
+ if(wt || (tr0&&wr) || (tl0&&wl)){ // top
252
+ commonvars[3]=rules['border-top-color'];
253
+ if(wt) { /* draw straight border */
254
+ /* common variables */ {
255
+ var left=(tl0>wl)?tl0:wl;
256
+ var right=(tr0>wt)?tr0:wr;
257
+ var toplength=xw-left-right;
258
+ }
259
+ switch(rules['border-top-style']){
260
+ case 'dotted': case 'dashed': {
261
+ var dashlength=(rules['border-top-style']=='dotted')?wt:wt*dashmultiplier,toggle=true,tc=rules['border-top-color'];
262
+ /* straight line */ {
263
+ if(dashlength>toplength){
264
+ drawRect(bgw,left,0,toplength,wt,tc);
265
+ var xoff=dashlength*1.5;
266
+ }else{
267
+ var halflength=toplength/2;
268
+ var xcenter=left+halflength;
269
+ drawRect(bgw,xcenter-dashlength/2,0,dashlength,wt,tc);
270
+ for(xoff=dashlength*1.5;xoff<halflength;xoff+=dashlength*2){
271
+ if(xoff+dashlength>halflength){
272
+ var w=halflength-xoff;
273
+ drawRect(bgw,xcenter-halflength,0,w,wt,tc);
274
+ drawRect(bgw,xcenter+halflength-w,0,w,wt,tc);
275
+ }else{
276
+ drawRect(bgw,xcenter-xoff-dashlength,0,dashlength,wt,tc);
277
+ drawRect(bgw,xcenter+xoff,0,dashlength,wt,tc);
278
+ }
279
+ }
280
+ }
281
+ }
282
+ if(left){
283
+ if(tl0)if(wt || wl)drawSolidCurve(commonvars,[0,0-tl1/tl0],0,tppTL0,0,1,0,0);
284
+ else{
285
+ var tan=wt/wl;
286
+ var overlap=xoff-halflength-dashlength;
287
+ if(overlap>0){
288
+ var y1=wt-overlap*tan,x1=left-overlap;
289
+ drawRect(bgw,x1,0,overlap,y1,tc);
290
+ drawBevelTop(commonvars,x1,y1,overlap,tan,1)
291
+ }
292
+ for(var x2=xoff;xcenter>x2;x2+=dashlength*2){
293
+ if(x2+dashlength>=xcenter){
294
+ drawBevelTop(commonvars,0,0,xcenter-x2,tan,1);
295
+ }else{
296
+ var x1=xcenter-x2-dashlength;
297
+ var y1=x1*tan;
298
+ drawBevelTop(commonvars,x1,y1,dashlength,tan,1)
299
+ drawRect(bgw,x1,0,dashlength,y1,tc);
300
+ }
301
+ }
302
+ }
303
+ }
304
+ if(right){
305
+ var overlap=xoff-halflength-dashlength;
306
+ if(tr0){
307
+ if(wt || wr){
308
+ var cutofftan=tppTR1/tppTR0,rx=tppWidth-tppTR0;
309
+ var presx=rx,presy=0,findleft=0,preslength=0,findright=(overlap+(dashlength*2))*tpp;
310
+ if(overlap<=0)findleft=(overlap+dashlength)*tpp;
311
+ do{
312
+ var fromtan=0,totan=0;
313
+ if(findleft!=0){
314
+ do{
315
+ if(presy<b_arr[presx+1][0])++presy;
316
+ else ++presx;
317
+ ++preslength;
318
+ }while(preslength<findleft);
319
+ fromtan=(tppTR1-presy)/(presx-rx);
320
+ }
321
+ do{
322
+ if(presy<b_arr[presx+1][0])++presy;
323
+ else ++presx;
324
+ ++preslength;
325
+ }while(preslength<findright);
326
+ totan=(tppTR1-presy)/(presx-rx);
327
+ if(totan<cutofftan)totan=cutofftan;
328
+ if(!fromtan||fromtan>cutofftan)drawSolidCurve(commonvars,[fromtan,totan],tppWidth-tppTR0,tppWidth,0,1,tppWidth-tppTR0,tppTR1);
329
+ findright+=dashlength*2*tpp;
330
+ findleft=findright-dashlength*tpp;
331
+ }while(totan>cutofftan);
332
+ }
333
+ }else{
334
+ var maxtan=wt/wl,rlength=xw-xcenter;
335
+ if(overlap>0){
336
+ var y1=wt-overlap*maxtan,x1=xw-right;
337
+ drawRect(bgw,x1,0,overlap,y1,rules['border-top-color']);
338
+ drawBevelTop(commonvars,x1+overlap-1,y1,overlap,maxtan,-1)
339
+ }
340
+ for(var x2=xoff;rlength>x2;x2+=dashlength*2){
341
+ if(x2+dashlength>=rlength)drawBevelTop(commonvars,xw-1,0,rlength-x2,maxtan,-1);
342
+ else{
343
+ var x1=xcenter+x2+dashlength;
344
+ var y1=(xw-x1)*maxtan;
345
+ drawBevelTop(commonvars,x1-1,y1,dashlength,maxtan,-1)
346
+ drawRect(bgw,x1-dashlength,0,dashlength,y1,rules['border-top-color']);
347
+ }
348
+ }
349
+ }
350
+ }
351
+ break;
352
+ }
353
+ default: {
354
+ drawRect(bgw,left,0,toplength,wt,rules['border-top-color']);
355
+ if(left){
356
+ if(tl0)if(wt || wl)drawSolidCurve(commonvars,[0,0-tl1/tl0],0,tppTL0,0,1,0,0);
357
+ else drawBevelTop(commonvars,0,0,left,wt/wl,1);
358
+ }
359
+ if(right){
360
+ if(tr0){
361
+ if(wt||wr){
362
+ var rx=tppWidth-tppTR0;
363
+ drawSolidCurve(commonvars,[0,tr1/tr0],rx,tppWidth,0,1,rx,tppTR1);
364
+ }
365
+ }
366
+ else drawBevelTop(commonvars,xw-1,0,right,wt/wr,-1);
367
+ }
368
+ }
369
+ }
370
+ }
371
+ }
372
+ if(wb || (bl0&&wl) || (br0&&wr)){ // bottom
373
+ commonvars[3]=rules['border-bottom-color'];
374
+ if(wb){ /* draw straight border */
375
+ /* draw straight bit */ {
376
+ var left=(bl0>wl)?bl0:wl,right=(br0>wr)?br0:wr;
377
+ var bottomlength=xw-left-right;
378
+ drawRect(bgw,left,yh-wb,bottomlength,wb,rules['border-bottom-color']);
379
+ }
380
+ if(!bl0 && left)drawBevelBottom(commonvars,0,yh,left,wb/wl,1);
381
+ if(!br0 && right)drawBevelBottom(commonvars,xw-1,yh,right,wb/wl,-1);
382
+ }
383
+ /* draw corners */ {
384
+ if(bl0&&(wb||wl))drawSolidCurve(commonvars,[bl1/bl0,0],0,tppBL0,2,3,0,tppHeight);
385
+ if(br0&&(wb||wr))drawSolidCurve(commonvars,[0-br1/br0,0],tppWidth-tppTR0,tppWidth,2,3,tppWidth-tppBR0,tppHeight-tppBR1);
386
+ }
387
+ }
388
+ if(wr || (tr0&&wt) || (br0&&wb)){ // right
389
+ commonvars[3]=rules['border-right-color'];
390
+ if(wr){ /* draw straight border */
391
+ /* draw straight bit */ {
392
+ var top=(tr1>wt)?tr1:wt,bottom=(br1>wb)?br1:wb;
393
+ var sideheight=yh-top-bottom;
394
+ drawRect(bgw,xw-wr,top,wr,sideheight,rules['border-right-color']);
395
+ }
396
+ if(!br1 && bottom)drawBevelTop(commonvars,xw-wr,yh-wb,wr,wb/wr,1);
397
+ if(!tr1 && top)drawBevelBottom(commonvars,xw-wr,wb,wr,wb/wr,1);
398
+ }
399
+ /* draw corners */ {
400
+ if(tr0&&(wt||wr))drawSolidCurve(commonvars,[tr1/tr0,0],tppWidth-tppTR0,tppWidth,0,1,tppWidth-tppTR0,tppTR1);
401
+ if(br0&&(wb||wr))drawSolidCurve(commonvars,[0,0-br1/br0],tppWidth-tppTR0,tppWidth,2,3,tppWidth-tppBR0,tppHeight-tppBR1);
402
+ }
403
+ }
404
+ if(wl || (tl0&&wt) || (bl0&&wb)){ // left
405
+ commonvars[3]=rules['border-left-color'];
406
+ if(wl){ /* draw straight border */
407
+ /* draw straight bit */ {
408
+ var top=(tl1>wt)?tl1:wt,bottom=(bl1>wb)?bl1:wb;
409
+ var sideheight=yh-top-bottom;
410
+ drawRect(bgw,0,top,wl,sideheight,rules['border-left-color']);
411
+ }
412
+ if(!bl1 && bottom)drawBevelTop(commonvars,wl-1,yh-wb,wl,wb/wl,-1);
413
+ if(!tl1 && top)drawBevelBottom(commonvars,wl-1,wb,wl,wb/wl,-1);
414
+ }
415
+ /* draw curved corners */ {
416
+ commonvars[3]=rules['border-left-color'];
417
+ if(tl0&&(wt||wl))drawSolidCurve(commonvars,[0-tl1/tl0],0,tppTL0,0,1,0,0);
418
+ if(bl0&&(wb||wl))drawSolidCurve(commonvars,[0,bl1/bl0],0,tppBL0,2,3,0,tppHeight);
419
+ }
420
+ }
421
+ }
422
+ /* remove the original border and adjust the padding accordingly */ {
423
+ if(document.defaultView){
424
+ a=document.defaultView.getComputedStyle(theEl,'');
425
+ p1=a.getPropertyValue('padding-top').replace(/[^0-9]/g,'');
426
+ p2=a.getPropertyValue('padding-right').replace(/[^0-9]/g,'');
427
+ p3=a.getPropertyValue('padding-bottom').replace(/[^0-9]/g,'');
428
+ p4=a.getPropertyValue('padding-left').replace(/[^0-9]/g,'');
429
+ }else{
430
+ a=theEl.currentStyle;
431
+ p1=a.paddingTop.replace(/[^0-9]/g,'');
432
+ p2=a.paddingRight.replace(/[^0-9]/g,'');
433
+ p3=a.paddingBottom.replace(/[^0-9]/g,'');
434
+ p4=a.paddingLeft.replace(/[^0-9]/g,'');
435
+ }
436
+ theEl.style.borderWidth='0px';
437
+ theEl.style.paddingTop=(parseInt(p1)+parseInt(rules['border-top-width']))+'px';
438
+ theEl.style.paddingRight=(parseInt(p2)+parseInt(rules['border-right-width']))+'px';
439
+ theEl.style.paddingBottom=(parseInt(p3)+parseInt(rules['border-bottom-width']))+'px';
440
+ theEl.style.paddingLeft=(parseInt(p4)+parseInt(rules['border-left-width']))+'px';
441
+ theEl.style.background='none';
442
+ }
443
+ theEl.parentNode.insertBefore(bgw,theEl);
444
+ }
445
+ }
446
+ }
447
+ /* show timer */ {
448
+ window.status=((new Date().getTime()-timer1.getTime())+' milliseconds');
449
+ }
450
+ document.getElementsByTagName('body')[0].style.visibility="visible";
451
+ }
452
+ function drawBevelBottom(commonvars,left,bottom,width,slope,direction){
453
+ for(var i=0;i<width;++i){
454
+ var h=i*slope,x=left+(i*direction);
455
+ var h1=Math.floor(h); // non-aliased bit
456
+ var h2=h+slope-h1-.01; // aliased
457
+ var h3=Math.ceil(h2);
458
+ drawRect(commonvars[0],x,bottom-h1,1,h1,commonvars[3]);
459
+ drawRect(commonvars[0],x,bottom-(h1+h3),1,h3,commonvars[3],0,h2/h3);
460
+ }
461
+ }
462
+ function drawBevelTop(commonvars,left,top,width,slope,direction){
463
+ for(var i=0;i<width;++i){
464
+ var h=i*slope,x=left+(i*direction);
465
+ var h1=Math.floor(h); // non-aliased bit
466
+ var h2=h+slope-h1-.01; // aliased
467
+ var h3=Math.ceil(h2);
468
+ drawRect(commonvars[0],x,top,1,h1,commonvars[3]);
469
+ drawRect(commonvars[0],x,top+h1,1,h3,commonvars[3],0,h2/h3);
470
+ }
471
+ }
472
+ function drawSolidCurve(vars,ratios,left,right,top,bottom,ratioX,ratioY){
473
+ var tpp=vars[1],b_arr=vars[2];
474
+ for(var k=left;k<right;k+=tpp){
475
+ var topArr=[],bottomArr=[];
476
+ for(var l=0;l<tpp;++l){
477
+ var m=k+l;
478
+ topArr[l]=b_arr[m][top];
479
+ bottomArr[l]=b_arr[m][bottom];
480
+ }
481
+ drawSegments(vars,topArr,bottomArr,k/tpp,ratioX,ratioY,[ratios],tpp);
482
+ }
483
+ }
484
+ function drawSegments(vars,topArrOrig,bottomArrOrig,x,ratioX,ratioY,ratios,tpp){
485
+ var l=topArrOrig.length;
486
+ for(var i=0;i<ratios.length;++i){
487
+ /* fix top */ {
488
+ if(ratios[i][0]){
489
+ var topArr=[];
490
+ for(var j=0;j<l;++j){
491
+ var y=topArrOrig[j];
492
+ var maxY=ratioY-((x*tpp+j)-ratioX)*ratios[i][0];
493
+ if(y<maxY)y=maxY;
494
+ topArr[j]=y/tpp;
495
+ }
496
+ }else{
497
+ var topArr=topArrOrig;
498
+ for(var j=0;j<l;++j)topArr[j]/=tpp;
499
+ }
500
+ }
501
+ /* fix bottom */ {
502
+ if(ratios[i][1]){
503
+ var bottomArr=[];
504
+ for(var j=0;j<l;++j){
505
+ var y=bottomArrOrig[j];
506
+ var maxY=ratioY-((x*tpp+j)-ratioX)*ratios[i][1];
507
+ if(y>maxY)y=maxY;
508
+ bottomArr[j]=y/tpp;
509
+ }
510
+ }else{
511
+ var bottomArr=bottomArrOrig;
512
+ for(var j=0;j<l;++j)bottomArr[j]/=tpp;
513
+ }
514
+ }
515
+ /* draw segment if possible */ {
516
+ var pixels=0;
517
+ for(var j=0;j<l;++j)pixels+=bottomArr[j]-topArr[j];
518
+ if(pixels>0)drawAntiAliasSection(vars,topArr,bottomArr,x);
519
+ }
520
+ }
521
+ }
522
+ function drawAntiAliasSection(vars,topArr,bottomArr,x){
523
+ var l=topArr.length,adj=isMSIE?1:0;
524
+ /* get y1,y2,y3,y4 */ {
525
+ var y1=Math.floor(topArr[topArr[0]<topArr[l-1]?0:l-1]);
526
+ var y2=Math.ceil(topArr[topArr[0]>topArr[l-1]?0:l-1]);
527
+ var y3=Math.floor(bottomArr[bottomArr[0]<bottomArr[l-1]?0:l-1]);
528
+ var y4=Math.ceil(bottomArr[bottomArr[0]>bottomArr[l-1]?0:l-1]);
529
+ if(y4-y1==1)return;
530
+ }
531
+ /* prepare anti-alias numbers */ {
532
+ for(var a=0;a<l;++a){
533
+ topArr[a]=y2-topArr[a];
534
+ bottomArr[a]=bottomArr[a]-y3;
535
+ }
536
+ }
537
+ drawRect(vars[0],x,y2,1,y3-y2,vars[3]);
538
+ /* draw top anti-aliased section */ {
539
+ for(var a=y2-1;a>=y1;--a){
540
+ var opacity=0;
541
+ for(var b=0;b<l;++b){
542
+ if(topArr[b]){
543
+ if(topArr[b]>1){
544
+ ++opacity;
545
+ --topArr[b];
546
+ }else{
547
+ opacity+=topArr[b];
548
+ topArr[b]=0;
549
+ }
550
+ }
551
+ }
552
+ var o=opacity/l;
553
+ if(o>.01)drawRect(vars[0],x,a,1,1,vars[3],0,o);
554
+ }
555
+ }
556
+ /* draw bottom anti-aliased section */ {
557
+ for(var a=y3;a<y4;++a){
558
+ var opacity=0;
559
+ for(var b=0;b<l;++b){
560
+ if(bottomArr[b]){
561
+ if(bottomArr[b]>1){
562
+ ++opacity;
563
+ --bottomArr[b];
564
+ }else{
565
+ opacity+=bottomArr[b];
566
+ bottomArr[b]=0;
567
+ }
568
+ }
569
+ }
570
+ var o=opacity/l;
571
+ if(o>.01)drawRect(vars[0],x,a,1,1,vars[3],0,o);
572
+ }
573
+ }
574
+ }
575
+ function drawRect(el,x,y,w,h,bc,bi,op){
576
+ window.drawRect=drawRect_generic;
577
+ if(isGecko)window.drawRect=drawRect_gecko;
578
+ else if(isKonqueror)window.drawRect=drawRect_konqueror;
579
+ drawRect(el,x,y,w,h,bc,bi,op);
580
+ }
581
+ function drawRect_gecko(el,x,y,w,h,bc,bi,op){
582
+ var el2=pixelCache[w+'_'+h+'_'+bc+'_'+bi+'_'+op];
583
+ if(el2)el2=el2.cloneNode('false');
584
+ else{
585
+ el2=backgroundEl.cloneNode('false');
586
+ var style=el2.style;
587
+ if(op)style.opacity=op;
588
+ style.backgroundColor=bc;
589
+ if(bi){
590
+ style.backgroundImage=bi;
591
+ style.backgroundPosition='-'+x+'px -'+y+'px';
592
+ }
593
+ style.height=h+'px';
594
+ style.width=w+'px';
595
+ pixelCache[w+'_'+h+'_'+bc+'_'+bi+'_'+op]=el2;
596
+ }
597
+ el2.style.left=x+'px';
598
+ el2.style.top=y+'px';
599
+ el.appendChild(el2);
600
+ }
601
+ function drawRect_konqueror(el,x,y,w,h,bc,bi,op){
602
+ if(op&&op<.5)return;
603
+ var el2=pixelCache[w+'_'+h+'_'+bc+'_'+bi+'_'+op];
604
+ if(el2)el2=el2.cloneNode('false');
605
+ else{
606
+ el2=backgroundEl.cloneNode('false');
607
+ var style=el2.style;
608
+ style.backgroundColor=bc;
609
+ if(bi){
610
+ style.backgroundImage=bi;
611
+ style.backgroundPosition='-'+x+'px -'+y+'px';
612
+ }
613
+ style.height=h+'px';
614
+ style.width=w+'px';
615
+ pixelCache[w+'_'+h+'_'+bc+'_'+bi+'_'+op]=el2;
616
+ }
617
+ el2.style.left=x+'px';
618
+ el2.style.top=y+'px';
619
+ el.appendChild(el2);
620
+ }
621
+ function drawRect_generic(el,x,y,w,h,bc,bi,op){
622
+ if(w<1||h<1)return;
623
+ var el2=pixelCache[w+'_'+h+'_'+bc+'_'+bi+'_'+op];
624
+ if(el2)el2=el2.cloneNode('false');
625
+ else{
626
+ el2=backgroundEl.cloneNode('false');
627
+ if(op){
628
+ if(opacityWorks){
629
+ el2.style.opacity=op;
630
+ el2.style.KhtmlOpacity=op;
631
+ if(isMSIE)el2.style.filter='alpha(opacity='+(op*100)+')';
632
+ }else{
633
+ if(op<.5)return;
634
+ }
635
+ }
636
+ el2.style.backgroundColor=bc;
637
+ if(bi){
638
+ el2.style.backgroundImage=bi;
639
+ el2.style.backgroundPosition='-'+x+'px -'+y+'px';
640
+ }
641
+ el2.style.height=h+'px';
642
+ el2.style.width=w+'px';
643
+ pixelCache[w+'_'+h+'_'+bc+'_'+bi+'_'+op]=el2;
644
+ }
645
+ el2.style.left=x+'px';
646
+ el2.style.top=y+'px';
647
+ el.appendChild(el2);
648
+ }
649
+ function init(){
650
+ document.getElementsByTagName('body')[0].style.visibility="hidden";
651
+ borders();
652
+ }
653
+ /* global variables */ {
654
+ var getCss_done=0,getCss_leftToDo=0,getCss_rules=[],getCss_text='',backgroundwrappers=0,dashmultiplier=3,timer1=new Date();
655
+ var isKonqueror= /Konqueror/.test(navigator.userAgent);
656
+ var isGecko= /Gecko/.test(navigator.userAgent) && !isKonqueror;
657
+ var isOpera= /Opera/.test(navigator.userAgent);
658
+ var opacityWorks=!(isKonqueror||isOpera);
659
+ var isMSIE = /MSIE/.test(navigator.appVersion) && !isOpera;
660
+ var pixelCache=[]; // cache of already created rectangles, to help reduce drawing time
661
+ /* create a sample blank layer, to be cloned for drawing with */ {
662
+ var backgroundEl=document.createElement('pseudo');
663
+ backgroundEl.style.position='absolute';
664
+ backgroundEl.style.fontSize=0;
665
+ backgroundEl.style.lineHeight=0;
666
+ backgroundEl.style.borderWidth=0;
667
+ if(isMSIE)backgroundEl.appendChild(document.createTextNode(' ')); // IE bug
668
+ }
669
+ }
670
+ /* load xmlhttprequest compatibility layer, if required */ {
671
+ if(isMSIE)document.write('<script src="xmlhttprequest.js"></script>');
672
+ }
673
+ /* attach the onload event */ {
674
+ if(window.addEventListener){
675
+ window.addEventListener('load',init,false);
676
+ window.addEventListener('resize',init,false);
677
+ }else if(window.attachEvent){
678
+ window.attachEvent('onload',init);
679
+ // window.attachEvent('onresize',reload);
680
+ }else{
681
+ window.onload=init;
682
+ window.onresize=init;
683
+ }
684
+ }
685
+ /* the following code was not written by Kae Verens. licenses have been kept */ {
686
+ eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7 x=6(){7 1D="2.0.2";7 C=/\\s*,\\s*/;7 x=6(s,A){33{7 m=[];7 u=1z.32.2c&&!A;7 b=(A)?(A.31==22)?A:[A]:[1g];7 1E=18(s).1l(C),i;9(i=0;i<1E.y;i++){s=1y(1E[i]);8(U&&s.Z(0,3).2b("")==" *#"){s=s.Z(2);A=24([],b,s[1])}1A A=b;7 j=0,t,f,a,c="";H(j<s.y){t=s[j++];f=s[j++];c+=t+f;a="";8(s[j]=="("){H(s[j++]!=")")a+=s[j];a=a.Z(0,-1);c+="("+a+")"}A=(u&&V[c])?V[c]:21(A,t,f,a);8(u)V[c]=A}m=m.30(A)}2a x.2d;5 m}2Z(e){x.2d=e;5[]}};x.1Z=6(){5"6 x() {\\n [1D "+1D+"]\\n}"};7 V={};x.2c=L;x.2Y=6(s){8(s){s=1y(s).2b("");2a V[s]}1A V={}};7 29={};7 19=L;x.15=6(n,s){8(19)1i("s="+1U(s));29[n]=12 s()};x.2X=6(c){5 c?1i(c):o};7 D={};7 h={};7 q={P:/\\[([\\w-]+(\\|[\\w-]+)?)\\s*(\\W?=)?\\s*([^\\]]*)\\]/};7 T=[];D[" "]=6(r,f,t,n){7 e,i,j;9(i=0;i<f.y;i++){7 s=X(f[i],t,n);9(j=0;(e=s[j]);j++){8(M(e)&&14(e,n))r.z(e)}}};D["#"]=6(r,f,i){7 e,j;9(j=0;(e=f[j]);j++)8(e.B==i)r.z(e)};D["."]=6(r,f,c){c=12 1t("(^|\\\\s)"+c+"(\\\\s|$)");7 e,i;9(i=0;(e=f[i]);i++)8(c.l(e.1V))r.z(e)};D[":"]=6(r,f,p,a){7 t=h[p],e,i;8(t)9(i=0;(e=f[i]);i++)8(t(e,a))r.z(e)};h["2W"]=6(e){7 d=Q(e);8(d.1C)9(7 i=0;i<d.1C.y;i++){8(d.1C[i]==e)5 K}};h["2V"]=6(e){};7 M=6(e){5(e&&e.1c==1&&e.1f!="!")?e:23};7 16=6(e){H(e&&(e=e.2U)&&!M(e))28;5 e};7 G=6(e){H(e&&(e=e.2T)&&!M(e))28;5 e};7 1r=6(e){5 M(e.27)||G(e.27)};7 1P=6(e){5 M(e.26)||16(e.26)};7 1o=6(e){7 c=[];e=1r(e);H(e){c.z(e);e=G(e)}5 c};7 U=K;7 1h=6(e){7 d=Q(e);5(2S d.25=="2R")?/\\.1J$/i.l(d.2Q):2P(d.25=="2O 2N")};7 Q=6(e){5 e.2M||e.1g};7 X=6(e,t){5(t=="*"&&e.1B)?e.1B:e.X(t)};7 17=6(e,t,n){8(t=="*")5 M(e);8(!14(e,n))5 L;8(!1h(e))t=t.2L();5 e.1f==t};7 14=6(e,n){5!n||(n=="*")||(e.2K==n)};7 1e=6(e){5 e.1G};6 24(r,f,B){7 m,i,j;9(i=0;i<f.y;i++){8(m=f[i].1B.2J(B)){8(m.B==B)r.z(m);1A 8(m.y!=23){9(j=0;j<m.y;j++){8(m[j].B==B)r.z(m[j])}}}}5 r};8(![].z)22.2I.z=6(){9(7 i=0;i<1z.y;i++){o[o.y]=1z[i]}5 o.y};7 N=/\\|/;6 21(A,t,f,a){8(N.l(f)){f=f.1l(N);a=f[0];f=f[1]}7 r=[];8(D[t]){D[t](r,A,f,a)}5 r};7 S=/^[^\\s>+~]/;7 20=/[\\s#.:>+~()@]|[^\\s#.:>+~()@]+/g;6 1y(s){8(S.l(s))s=" "+s;5 s.P(20)||[]};7 W=/\\s*([\\s>+~(),]|^|$)\\s*/g;7 I=/([\\s>+~,]|[^(]\\+|^)([#.:@])/g;7 18=6(s){5 s.O(W,"$1").O(I,"$1*$2")};7 1u={1Z:6(){5"\'"},P:/^(\'[^\']*\')|("[^"]*")$/,l:6(s){5 o.P.l(s)},1S:6(s){5 o.l(s)?s:o+s+o},1Y:6(s){5 o.l(s)?s.Z(1,-1):s}};7 1s=6(t){5 1u.1Y(t)};7 E=/([\\/()[\\]?{}|*+-])/g;6 R(s){5 s.O(E,"\\\\$1")};x.15("1j-2H",6(){D[">"]=6(r,f,t,n){7 e,i,j;9(i=0;i<f.y;i++){7 s=1o(f[i]);9(j=0;(e=s[j]);j++)8(17(e,t,n))r.z(e)}};D["+"]=6(r,f,t,n){9(7 i=0;i<f.y;i++){7 e=G(f[i]);8(e&&17(e,t,n))r.z(e)}};D["@"]=6(r,f,a){7 t=T[a].l;7 e,i;9(i=0;(e=f[i]);i++)8(t(e))r.z(e)};h["2G-10"]=6(e){5!16(e)};h["1x"]=6(e,c){c=12 1t("^"+c,"i");H(e&&!e.13("1x"))e=e.1n;5 e&&c.l(e.13("1x"))};q.1X=/\\\\:/g;q.1w="@";q.J={};q.O=6(m,a,n,c,v){7 k=o.1w+m;8(!T[k]){a=o.1W(a,c||"",v||"");T[k]=a;T.z(a)}5 T[k].B};q.1Q=6(s){s=s.O(o.1X,"|");7 m;H(m=s.P(o.P)){7 r=o.O(m[0],m[1],m[2],m[3],m[4]);s=s.O(o.P,r)}5 s};q.1W=6(p,t,v){7 a={};a.B=o.1w+T.y;a.2F=p;t=o.J[t];t=t?t(o.13(p),1s(v)):L;a.l=12 2E("e","5 "+t);5 a};q.13=6(n){1d(n.2D()){F"B":5"e.B";F"2C":5"e.1V";F"9":5"e.2B";F"1T":8(U){5"1U((e.2A.P(/1T=\\\\1v?([^\\\\s\\\\1v]*)\\\\1v?/)||[])[1]||\'\')"}}5"e.13(\'"+n.O(N,":")+"\')"};q.J[""]=6(a){5 a};q.J["="]=6(a,v){5 a+"=="+1u.1S(v)};q.J["~="]=6(a,v){5"/(^| )"+R(v)+"( |$)/.l("+a+")"};q.J["|="]=6(a,v){5"/^"+R(v)+"(-|$)/.l("+a+")"};7 1R=18;18=6(s){5 1R(q.1Q(s))}});x.15("1j-2z",6(){D["~"]=6(r,f,t,n){7 e,i;9(i=0;(e=f[i]);i++){H(e=G(e)){8(17(e,t,n))r.z(e)}}};h["2y"]=6(e,t){t=12 1t(R(1s(t)));5 t.l(1e(e))};h["2x"]=6(e){5 e==Q(e).1H};h["2w"]=6(e){7 n,i;9(i=0;(n=e.1F[i]);i++){8(M(n)||n.1c==3)5 L}5 K};h["1N-10"]=6(e){5!G(e)};h["2v-10"]=6(e){e=e.1n;5 1r(e)==1P(e)};h["2u"]=6(e,s){7 n=x(s,Q(e));9(7 i=0;i<n.y;i++){8(n[i]==e)5 L}5 K};h["1O-10"]=6(e,a){5 1p(e,a,16)};h["1O-1N-10"]=6(e,a){5 1p(e,a,G)};h["2t"]=6(e){5 e.B==2s.2r.Z(1)};h["1M"]=6(e){5 e.1M};h["2q"]=6(e){5 e.1q===L};h["1q"]=6(e){5 e.1q};h["1L"]=6(e){5 e.1L};q.J["^="]=6(a,v){5"/^"+R(v)+"/.l("+a+")"};q.J["$="]=6(a,v){5"/"+R(v)+"$/.l("+a+")"};q.J["*="]=6(a,v){5"/"+R(v)+"/.l("+a+")"};6 1p(e,a,t){1d(a){F"n":5 K;F"2p":a="2n";1a;F"2o":a="2n+1"}7 1m=1o(e.1n);6 1k(i){7 i=(t==G)?1m.y-i:i-1;5 1m[i]==e};8(!Y(a))5 1k(a);a=a.1l("n");7 m=1K(a[0]);7 s=1K(a[1]);8((Y(m)||m==1)&&s==0)5 K;8(m==0&&!Y(s))5 1k(s);8(Y(s))s=0;7 c=1;H(e=t(e))c++;8(Y(m)||m==1)5(t==G)?(c<=s):(s>=c);5(c%m)==s}});x.15("1j-2m",6(){U=1i("L;/*@2l@8(@\\2k)U=K@2j@*/");8(!U){X=6(e,t,n){5 n?e.2i("*",t):e.X(t)};14=6(e,n){5!n||(n=="*")||(e.2h==n)};1h=1g.1I?6(e){5/1J/i.l(Q(e).1I)}:6(e){5 Q(e).1H.1f!="2g"};1e=6(e){5 e.2f||e.1G||1b(e)};6 1b(e){7 t="",n,i;9(i=0;(n=e.1F[i]);i++){1d(n.1c){F 11:F 1:t+=1b(n);1a;F 3:t+=n.2e;1a}}5 t}}});19=K;5 x}();',62,190,'|||||return|function|var|if|for||||||||pseudoClasses||||test|||this||AttributeSelector|||||||cssQuery|length|push|fr|id||selectors||case|nextElementSibling|while||tests|true|false|thisElement||replace|match|getDocument|regEscape||attributeSelectors|isMSIE|cache||getElementsByTagName|isNaN|slice|child||new|getAttribute|compareNamespace|addModule|previousElementSibling|compareTagName|parseSelector|loaded|break|_0|nodeType|switch|getTextContent|tagName|document|isXML|eval|css|_1|split|ch|parentNode|childElements|nthChild|disabled|firstElementChild|getText|RegExp|Quote|x22|PREFIX|lang|_2|arguments|else|all|links|version|se|childNodes|innerText|documentElement|contentType|xml|parseInt|indeterminate|checked|last|nth|lastElementChild|parse|_3|add|href|String|className|create|NS_IE|remove|toString|ST|select|Array|null|_4|mimeType|lastChild|firstChild|continue|modules|delete|join|caching|error|nodeValue|textContent|HTML|prefix|getElementsByTagNameNS|end|x5fwin32|cc_on|standard||odd|even|enabled|hash|location|target|not|only|empty|root|contains|level3|outerHTML|htmlFor|class|toLowerCase|Function|name|first|level2|prototype|item|scopeName|toUpperCase|ownerDocument|Document|XML|Boolean|URL|unknown|typeof|nextSibling|previousSibling|visited|link|valueOf|clearCache|catch|concat|constructor|callee|try'.split('|'),0,{}))
687
+ }