1/*
2 * Copyright (c) 2021. ComboStrap, Inc. and its affiliates. All Rights Reserved.
3 *
4 * This source code is licensed under the GPL license found in the
5 * COPYING  file in the root directory of this source tree.
6 *
7 * @license  GPL 3 (https://www.gnu.org/licenses/gpl-3.0.en.html)
8 * @author   ComboStrap <support@combostrap.com>
9 *
10 */
11
12(function(){
13/**************************************************************
14 *
15 *    Firebug Lite 1.4.0
16 *
17 *      Copyright (c) 2007, Parakey Inc.
18 *      Released under BSD license.
19 *      More information: http://getfirebug.com/firebuglite
20 *
21 **************************************************************/
22/*
23 * CSS selectors powered by:
24 *
25 * Sizzle CSS Selector Engine - v1.0
26 *  Copyright 2009, The Dojo Foundation
27 *  Released under the MIT, BSD, and GPL Licenses.
28 *  More information: http://sizzlejs.com/
29 */
30var FBL={};
31(function(){var productionDir="http://getfirebug.com/releases/lite/";
32var bookmarkletVersion=4;
33var reNotWhitespace=/[^\s]/;
34var reSplitFile=/:\/{1,3}(.*?)\/([^\/]*?)\/?($|\?.*)/;
35this.reJavascript=/\s*javascript:\s*(.*)/;
36this.reChrome=/chrome:\/\/([^\/]*)\//;
37this.reFile=/file:\/\/([^\/]*)\//;
38var userAgent=navigator.userAgent.toLowerCase();
39this.isFirefox=/firefox/.test(userAgent);
40this.isOpera=/opera/.test(userAgent);
41this.isSafari=/webkit/.test(userAgent);
42this.isIE=/msie/.test(userAgent)&&!/opera/.test(userAgent);
43this.isIE6=/msie 6/i.test(navigator.appVersion);
44this.browserVersion=(userAgent.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1];
45this.isIElt8=this.isIE&&(this.browserVersion-0<8);
46this.NS=null;
47this.pixelsPerInch=null;
48var namespaces=[];
49this.ns=function(fn){var ns={};
50namespaces.push(fn,ns);
51return ns
52};
53var FBTrace=null;
54this.initialize=function(){if(window.firebug&&firebug.firebuglite||window.console&&console.firebuglite){return
55}if(FBL.FBTrace){FBTrace=FBL.FBTrace
56}else{FBTrace=FBL.FBTrace={}
57}var isChromeContext=window.Firebug&&typeof window.Firebug.SharedEnv=="object";
58if(isChromeContext){sharedEnv=window.Firebug.SharedEnv;
59delete window.Firebug.SharedEnv;
60FBL.Env=sharedEnv;
61FBL.Env.isChromeContext=true;
62FBTrace.messageQueue=FBL.Env.traceMessageQueue
63}else{FBL.NS=document.documentElement.namespaceURI;
64FBL.Env.browser=window;
65FBL.Env.destroy=destroyEnvironment;
66if(document.documentElement.getAttribute("debug")=="true"){FBL.Env.Options.startOpened=true
67}findLocation();
68var prefs=FBL.Store.get("FirebugLite")||{};
69FBL.Env.DefaultOptions=FBL.Env.Options;
70FBL.Env.Options=FBL.extend(FBL.Env.Options,prefs.options||{});
71if(FBL.isFirefox&&typeof FBL.Env.browser.console=="object"&&FBL.Env.browser.console.firebug&&FBL.Env.Options.disableWhenFirebugActive){return
72}}if(FBL.Env.isDebugMode){FBL.Env.browser.FBL=FBL
73}this.isQuiksMode=FBL.Env.browser.document.compatMode=="BackCompat";
74this.isIEQuiksMode=this.isIE&&this.isQuiksMode;
75this.isIEStantandMode=this.isIE&&!this.isQuiksMode;
76this.noFixedPosition=this.isIE6||this.isIEQuiksMode;
77if(FBL.Env.Options.enableTrace){FBTrace.initialize()
78}if(FBTrace.DBG_INITIALIZE&&isChromeContext){FBTrace.sysout("FBL.initialize - persistent application","initialize chrome context")
79}if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("FBL.initialize",namespaces.length/2+" namespaces BEGIN")
80}for(var i=0;
81i<namespaces.length;
82i+=2){var fn=namespaces[i];
83var ns=namespaces[i+1];
84fn.apply(ns)
85}if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("FBL.initialize",namespaces.length/2+" namespaces END");
86FBTrace.sysout("FBL waitForDocument","waiting document load")
87}FBL.Ajax.initialize();
88FBL.Firebug.loadPrefs();
89if(FBL.Env.Options.enablePersistent){if(isChromeContext){FBL.FirebugChrome.clone(FBL.Env.FirebugChrome)
90}else{FBL.Env.FirebugChrome=FBL.FirebugChrome;
91FBL.Env.traceMessageQueue=FBTrace.messageQueue
92}}waitForDocument()
93};
94var waitForDocument=function waitForDocument(){var doc=FBL.Env.browser.document;
95var body=doc.getElementsByTagName("body")[0];
96if(body){calculatePixelsPerInch(doc,body);
97onDocumentLoad()
98}else{setTimeout(waitForDocument,50)
99}};
100var onDocumentLoad=function onDocumentLoad(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("FBL onDocumentLoad","document loaded")
101}if(FBL.isIE6){fixIE6BackgroundImageCache()
102}if(FBL.Env.Options.enablePersistent&&FBL.Env.isChromeContext){FBL.Firebug.initialize();
103if(!FBL.Env.isDevelopmentMode){sharedEnv.destroy();
104sharedEnv=null
105}}else{FBL.FirebugChrome.create()
106}};
107var sharedEnv;
108this.Env={Options:{saveCookies:true,saveWindowPosition:false,saveCommandLineHistory:false,startOpened:false,startInNewWindow:false,showIconWhenHidden:true,overrideConsole:true,ignoreFirebugElements:true,disableWhenFirebugActive:true,disableXHRListener:false,disableResourceFetching:false,enableTrace:false,enablePersistent:false},Location:{sourceDir:null,baseDir:null,skinDir:null,skin:null,app:null},skin:"xp",useLocalSkin:false,isDevelopmentMode:false,isDebugMode:false,isChromeContext:false,browser:null,chrome:null};
109var destroyEnvironment=function destroyEnvironment(){setTimeout(function(){FBL=null
110},100)
111};
112var findLocation=function findLocation(){var reFirebugFile=/(firebug-lite(?:-\w+)?(?:\.js|\.jgz))(?:#(.+))?$/;
113var reGetFirebugSite=/(?:http|https):\/\/getfirebug.com\//;
114var isGetFirebugSite;
115var rePath=/^(.*\/)/;
116var reProtocol=/^\w+:\/\//;
117var path=null;
118var doc=document;
119var script=doc.getElementById("FirebugLite");
120var scriptSrc;
121var hasSrcAttribute=true;
122if(script){scriptSrc=script.src;
123file=reFirebugFile.exec(scriptSrc);
124var version=script.getAttribute("FirebugLite");
125var number=version?parseInt(version):0;
126if(!version||!number||number<bookmarkletVersion){FBL.Env.bookmarkletOutdated=true
127}}else{for(var i=0,s=doc.getElementsByTagName("script"),si;
128si=s[i];
129i++){var file=null;
130if(si.nodeName.toLowerCase()=="script"){if(file=reFirebugFile.exec(si.getAttribute("firebugSrc"))){scriptSrc=si.getAttribute("firebugSrc");
131hasSrcAttribute=false
132}else{if(file=reFirebugFile.exec(si.src)){scriptSrc=si.src
133}else{continue
134}}script=si;
135break
136}}}if(script){script.firebugIgnore=true
137}if(file){var fileName=file[1];
138var fileOptions=file[2];
139if(reProtocol.test(scriptSrc)){path=rePath.exec(scriptSrc)[1]
140}else{var r=rePath.exec(scriptSrc);
141var src=r?r[1]:scriptSrc;
142var backDir=/^((?:\.\.\/)+)(.*)/.exec(src);
143var reLastDir=/^(.*\/)[^\/]+\/$/;
144path=rePath.exec(location.href)[1];
145if(backDir){var j=backDir[1].length/3;
146var p;
147while(j-->0){path=reLastDir.exec(path)[1]
148}path+=backDir[2]
149}else{if(src.indexOf("/")!=-1){if(/^\.\/./.test(src)){path+=src.substring(2)
150}else{if(/^\/./.test(src)){var domain=/^(\w+:\/\/[^\/]+)/.exec(path);
151path=domain[1]+src
152}else{path+=src
153}}}}}}FBL.Env.isChromeExtension=script&&script.getAttribute("extension")=="Chrome";
154if(FBL.Env.isChromeExtension){path=productionDir;
155FBL.Env.bookmarkletOutdated=false;
156script={innerHTML:"{showIconWhenHidden:false}"}
157}isGetFirebugSite=reGetFirebugSite.test(path);
158if(isGetFirebugSite&&path.indexOf("/releases/lite/")==-1){path+="releases/lite/"+(fileName=="firebug-lite-beta.js"?"beta/":"latest/")
159}var m=path&&path.match(/([^\/]+)\/$/)||null;
160if(path&&m){var Env=FBL.Env;
161Env.useLocalSkin=path.indexOf(location.protocol+"//"+location.host+"/")==0&&!isGetFirebugSite;
162if(fileName=="firebug-lite-dev.js"){Env.isDevelopmentMode=true;
163Env.isDebugMode=true
164}else{if(fileName=="firebug-lite-debug.js"){Env.isDebugMode=true
165}}if(Env.browser.document.documentElement.getAttribute("debug")=="true"){Env.Options.startOpened=true
166}if(fileOptions){var options=fileOptions.split(",");
167for(var i=0,length=options.length;
168i<length;
169i++){var option=options[i];
170var name,value;
171if(option.indexOf("=")!=-1){var parts=option.split("=");
172name=parts[0];
173value=eval(unescape(parts[1]))
174}else{name=option;
175value=true
176}if(name=="debug"){Env.isDebugMode=!!value
177}else{if(name in Env.Options){Env.Options[name]=value
178}else{Env[name]=value
179}}}}if(hasSrcAttribute){var innerOptions=FBL.trim(script.innerHTML);
180if(innerOptions){var innerOptionsObject=eval("("+innerOptions+")");
181for(var name in innerOptionsObject){var value=innerOptionsObject[name];
182if(name=="debug"){Env.isDebugMode=!!value
183}else{if(name in Env.Options){Env.Options[name]=value
184}else{Env[name]=value
185}}}}}if(!Env.Options.saveCookies){FBL.Store.remove("FirebugLite")
186}if(Env.isDebugMode){Env.Options.startOpened=true;
187Env.Options.enableTrace=true;
188Env.Options.disableWhenFirebugActive=false
189}var loc=Env.Location;
190var isProductionRelease=path.indexOf(productionDir)!=-1;
191loc.sourceDir=path;
192loc.baseDir=path.substr(0,path.length-m[1].length-1);
193loc.skinDir=(isProductionRelease?path:loc.baseDir)+"skin/"+Env.skin+"/";
194loc.skin=loc.skinDir+"firebug.html";
195loc.app=path+fileName
196}else{throw new Error("Firebug Error: Library path not found")
197}};
198this.bind=function(){var args=cloneArray(arguments),fn=args.shift(),object=args.shift();
199return function(){return fn.apply(object,arrayInsert(cloneArray(args),0,arguments))
200}
201};
202this.bindFixed=function(){var args=cloneArray(arguments),fn=args.shift(),object=args.shift();
203return function(){return fn.apply(object,args)
204}
205};
206this.extend=function(l,r){var newOb={};
207for(var n in l){newOb[n]=l[n]
208}for(var n in r){newOb[n]=r[n]
209}return newOb
210};
211this.descend=function(prototypeParent,childProperties){function protoSetter(){}protoSetter.prototype=prototypeParent;
212var newOb=new protoSetter();
213for(var n in childProperties){newOb[n]=childProperties[n]
214}return newOb
215};
216this.append=function(l,r){for(var n in r){l[n]=r[n]
217}return l
218};
219this.keys=function(map){var keys=[];
220try{for(var name in map){keys.push(name)
221}}catch(exc){}return keys
222};
223this.values=function(map){var values=[];
224try{for(var name in map){try{values.push(map[name])
225}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("lib.values FAILED ",exc)
226}}}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("lib.values FAILED ",exc)
227}}return values
228};
229this.remove=function(list,item){for(var i=0;
230i<list.length;
231++i){if(list[i]==item){list.splice(i,1);
232break
233}}};
234this.sliceArray=function(array,index){var slice=[];
235for(var i=index;
236i<array.length;
237++i){slice.push(array[i])
238}return slice
239};
240function cloneArray(array,fn){var newArray=[];
241if(fn){for(var i=0;
242i<array.length;
243++i){newArray.push(fn(array[i]))
244}}else{for(var i=0;
245i<array.length;
246++i){newArray.push(array[i])
247}}return newArray
248}function extendArray(array,array2){var newArray=[];
249newArray.push.apply(newArray,array);
250newArray.push.apply(newArray,array2);
251return newArray
252}this.extendArray=extendArray;
253this.cloneArray=cloneArray;
254function arrayInsert(array,index,other){for(var i=0;
255i<other.length;
256++i){array.splice(i+index,0,other[i])
257}return array
258}this.createStyleSheet=function(doc,url){var style=this.createElement("link");
259style.setAttribute("charset","utf-8");
260style.firebugIgnore=true;
261style.setAttribute("rel","stylesheet");
262style.setAttribute("type","text/css");
263style.setAttribute("href",url);
264return style
265};
266this.addStyleSheet=function(doc,style){var heads=doc.getElementsByTagName("head");
267if(heads.length){heads[0].appendChild(style)
268}else{doc.documentElement.appendChild(style)
269}};
270this.appendStylesheet=function(doc,uri){if(this.$(uri,doc)){return
271}var styleSheet=this.createStyleSheet(doc,uri);
272styleSheet.setAttribute("id",uri);
273this.addStyleSheet(doc,styleSheet)
274};
275this.addScript=function(doc,id,src){var element=doc.createElementNS("http://www.w3.org/1999/xhtml","html:script");
276element.setAttribute("type","text/javascript");
277element.setAttribute("id",id);
278if(!FBTrace.DBG_CONSOLE){FBL.unwrapObject(element).firebugIgnore=true
279}element.innerHTML=src;
280if(doc.documentElement){doc.documentElement.appendChild(element)
281}else{if(FBTrace.DBG_ERRORS){FBTrace.sysout("lib.addScript doc has no documentElement:",doc)
282}}return element
283};
284this.getStyle=this.isIE?function(el,name){return el.currentStyle[name]||el.style[name]||undefined
285}:function(el,name){return el.ownerDocument.defaultView.getComputedStyle(el,null)[name]||el.style[name]||undefined
286};
287var entityConversionLists=this.entityConversionLists={normal:{whitespace:{"\t":"\u200c\u2192","\n":"\u200c\u00b6","\r":"\u200c\u00ac"," ":"\u200c\u00b7"}},reverse:{whitespace:{"&Tab;":"\t","&NewLine;":"\n","\u200c\u2192":"\t","\u200c\u00b6":"\n","\u200c\u00ac":"\r","\u200c\u00b7":" "}}};
288var normal=entityConversionLists.normal,reverse=entityConversionLists.reverse;
289function addEntityMapToList(ccode,entity){var lists=Array.prototype.slice.call(arguments,2),len=lists.length,ch=String.fromCharCode(ccode);
290for(var i=0;
291i<len;
292i++){var list=lists[i];
293normal[list]=normal[list]||{};
294normal[list][ch]="&"+entity+";";
295reverse[list]=reverse[list]||{};
296reverse[list]["&"+entity+";"]=ch
297}}var e=addEntityMapToList,white="whitespace",text="text",attr="attributes",css="css",editor="editor";
298e(34,"quot",attr,css);
299e(38,"amp",attr,text,css);
300e(39,"apos",css);
301e(60,"lt",attr,text,css);
302e(62,"gt",attr,text,css);
303e(169,"copy",text,editor);
304e(174,"reg",text,editor);
305e(8482,"trade",text,editor);
306e(8210,"#8210",attr,text,editor);
307e(8211,"ndash",attr,text,editor);
308e(8212,"mdash",attr,text,editor);
309e(8213,"#8213",attr,text,editor);
310e(160,"nbsp",attr,text,white,editor);
311e(8194,"ensp",attr,text,white,editor);
312e(8195,"emsp",attr,text,white,editor);
313e(8201,"thinsp",attr,text,white,editor);
314e(8204,"zwnj",attr,text,white,editor);
315e(8205,"zwj",attr,text,white,editor);
316e(8206,"lrm",attr,text,white,editor);
317e(8207,"rlm",attr,text,white,editor);
318e(8203,"#8203",attr,text,white,editor);
319var entityConversionRegexes={normal:{},reverse:{}};
320var escapeEntitiesRegEx={normal:function(list){var chars=[];
321for(var ch in list){chars.push(ch)
322}return new RegExp("(["+chars.join("")+"])","gm")
323},reverse:function(list){var chars=[];
324for(var ch in list){chars.push(ch)
325}return new RegExp("("+chars.join("|")+")","gm")
326}};
327function getEscapeRegexp(direction,lists){var name="",re;
328var groups=[].concat(lists);
329for(i=0;
330i<groups.length;
331i++){name+=groups[i].group
332}re=entityConversionRegexes[direction][name];
333if(!re){var list={};
334if(groups.length>1){for(var i=0;
335i<groups.length;
336i++){var aList=entityConversionLists[direction][groups[i].group];
337for(var item in aList){list[item]=aList[item]
338}}}else{if(groups.length==1){list=entityConversionLists[direction][groups[0].group]
339}else{list={}
340}}re=entityConversionRegexes[direction][name]=escapeEntitiesRegEx[direction](list)
341}return re
342}function createSimpleEscape(name,direction){return function(value){var list=entityConversionLists[direction][name];
343return String(value).replace(getEscapeRegexp(direction,{group:name,list:list}),function(ch){return list[ch]
344})
345}
346}function escapeGroupsForEntities(str,lists){lists=[].concat(lists);
347var re=getEscapeRegexp("normal",lists),split=String(str).split(re),len=split.length,results=[],cur,r,i,ri=0,l,list,last="";
348if(!len){return[{str:String(str),group:"",name:""}]
349}for(i=0;
350i<len;
351i++){cur=split[i];
352if(cur==""){continue
353}for(l=0;
354l<lists.length;
355l++){list=lists[l];
356r=entityConversionLists.normal[list.group][cur];
357if(r){results[ri]={str:r,"class":list["class"],extra:list.extra[cur]?list["class"]+list.extra[cur]:""};
358break
359}}if(!r){results[ri]={str:cur,"class":"",extra:""}
360}ri++
361}return results
362}this.escapeGroupsForEntities=escapeGroupsForEntities;
363function unescapeEntities(str,lists){var re=getEscapeRegexp("reverse",lists),split=String(str).split(re),len=split.length,results=[],cur,r,i,ri=0,l,list;
364if(!len){return str
365}lists=[].concat(lists);
366for(i=0;
367i<len;
368i++){cur=split[i];
369if(cur==""){continue
370}for(l=0;
371l<lists.length;
372l++){list=lists[l];
373r=entityConversionLists.reverse[list.group][cur];
374if(r){results[ri]=r;
375break
376}}if(!r){results[ri]=cur
377}ri++
378}return results.join("")||""
379}var escapeForTextNode=this.escapeForTextNode=createSimpleEscape("text","normal");
380var escapeForHtmlEditor=this.escapeForHtmlEditor=createSimpleEscape("editor","normal");
381var escapeForElementAttribute=this.escapeForElementAttribute=createSimpleEscape("attributes","normal");
382var escapeForCss=this.escapeForCss=createSimpleEscape("css","normal");
383var escapeForSourceLine=this.escapeForSourceLine=createSimpleEscape("text","normal");
384var unescapeWhitespace=createSimpleEscape("whitespace","reverse");
385this.unescapeForTextNode=function(str){if(Firebug.showTextNodesWithWhitespace){str=unescapeWhitespace(str)
386}if(!Firebug.showTextNodesWithEntities){str=escapeForElementAttribute(str)
387}return str
388};
389this.escapeNewLines=function(value){return value.replace(/\r/g,"\\r").replace(/\n/g,"\\n")
390};
391this.stripNewLines=function(value){return typeof(value)=="string"?value.replace(/[\r\n]/g," "):value
392};
393this.escapeJS=function(value){return value.replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace('"','\\"',"g")
394};
395function escapeHTMLAttribute(value){function replaceChars(ch){switch(ch){case"&":return"&amp;";
396case"'":return apos;
397case'"':return quot
398}return"?"
399}var apos="&#39;",quot="&quot;",around='"';
400if(value.indexOf('"')==-1){quot='"';
401apos="'"
402}else{if(value.indexOf("'")==-1){quot='"';
403around="'"
404}}return around+(String(value).replace(/[&'"]/g,replaceChars))+around
405}function escapeHTML(value){function replaceChars(ch){switch(ch){case"<":return"&lt;";
406case">":return"&gt;";
407case"&":return"&amp;";
408case"'":return"&#39;";
409case'"':return"&quot;"
410}return"?"
411}return String(value).replace(/[<>&"']/g,replaceChars)
412}this.escapeHTML=escapeHTML;
413this.cropString=function(text,limit){text=text+"";
414if(!limit){var halfLimit=50
415}else{var halfLimit=limit/2
416}if(text.length>limit){return this.escapeNewLines(text.substr(0,halfLimit)+"..."+text.substr(text.length-halfLimit))
417}else{return this.escapeNewLines(text)
418}};
419this.isWhitespace=function(text){return !reNotWhitespace.exec(text)
420};
421this.splitLines=function(text){var reSplitLines2=/.*(:?\r\n|\n|\r)?/mg;
422var lines;
423if(text.match){lines=text.match(reSplitLines2)
424}else{var str=text+"";
425lines=str.match(reSplitLines2)
426}lines.pop();
427return lines
428};
429this.safeToString=function(ob){if(this.isIE){try{return ob+""
430}catch(E){FBTrace.sysout("Lib.safeToString() failed for ",ob);
431return""
432}}try{if(ob&&"toString" in ob&&typeof ob.toString=="function"){return ob.toString()
433}}catch(exc){return ob+""
434}};
435this.hasProperties=function(ob){try{for(var name in ob){return true
436}}catch(exc){}return false
437};
438var reTrim=/^\s+|\s+$/g;
439this.trim=function(s){return s.replace(reTrim,"")
440};
441this.emptyFn=function(){};
442this.isVisible=function(elt){return this.getStyle(elt,"visibility")!="hidden"&&(elt.offsetWidth>0||elt.offsetHeight>0||elt.tagName in invisibleTags||elt.namespaceURI=="http://www.w3.org/2000/svg"||elt.namespaceURI=="http://www.w3.org/1998/Math/MathML")
443};
444this.collapse=function(elt,collapsed){if(this.isIElt8){if(collapsed){this.setClass(elt,"collapsed")
445}else{this.removeClass(elt,"collapsed")
446}}else{elt.setAttribute("collapsed",collapsed?"true":"false")
447}};
448this.obscure=function(elt,obscured){if(obscured){this.setClass(elt,"obscured")
449}else{this.removeClass(elt,"obscured")
450}};
451this.hide=function(elt,hidden){elt.style.visibility=hidden?"hidden":"visible"
452};
453this.clearNode=function(node){var nodeName=" "+node.nodeName.toLowerCase()+" ";
454var ignoreTags=" table tbody thead tfoot th tr td ";
455if(this.isIE&&ignoreTags.indexOf(nodeName)!=-1){this.eraseNode(node)
456}else{node.innerHTML=""
457}};
458this.eraseNode=function(node){while(node.lastChild){node.removeChild(node.lastChild)
459}};
460this.iterateWindows=function(win,handler){if(!win||!win.document){return
461}handler(win);
462if(win==top||!win.frames){return
463}for(var i=0;
464i<win.frames.length;
465++i){var subWin=win.frames[i];
466if(subWin!=win){this.iterateWindows(subWin,handler)
467}}};
468this.getRootWindow=function(win){for(;
469win;
470win=win.parent){if(!win.parent||win==win.parent||!this.instanceOf(win.parent,"Window")){return win
471}}return null
472};
473this.getClientOffset=function(elt){var addOffset=function addOffset(elt,coords,view){var p=elt.offsetParent;
474var chrome=Firebug.chrome;
475if(elt.offsetLeft){coords.x+=elt.offsetLeft+chrome.getMeasurementInPixels(elt,"borderLeft")
476}if(elt.offsetTop){coords.y+=elt.offsetTop+chrome.getMeasurementInPixels(elt,"borderTop")
477}if(p){if(p.nodeType==1){addOffset(p,coords,view)
478}}else{var otherView=isIE?elt.ownerDocument.parentWindow:elt.ownerDocument.defaultView;
479if(!otherView.opener&&otherView.frameElement){addOffset(otherView.frameElement,coords,otherView)
480}}};
481var isIE=this.isIE;
482var coords={x:0,y:0};
483if(elt){var view=isIE?elt.ownerDocument.parentWindow:elt.ownerDocument.defaultView;
484addOffset(elt,coords,view)
485}return coords
486};
487this.getViewOffset=function(elt,singleFrame){function addOffset(elt,coords,view){var p=elt.offsetParent;
488coords.x+=elt.offsetLeft-(p?p.scrollLeft:0);
489coords.y+=elt.offsetTop-(p?p.scrollTop:0);
490if(p){if(p.nodeType==1){var parentStyle=view.getComputedStyle(p,"");
491if(parentStyle.position!="static"){coords.x+=parseInt(parentStyle.borderLeftWidth);
492coords.y+=parseInt(parentStyle.borderTopWidth);
493if(p.localName=="TABLE"){coords.x+=parseInt(parentStyle.paddingLeft);
494coords.y+=parseInt(parentStyle.paddingTop)
495}else{if(p.localName=="BODY"){var style=view.getComputedStyle(elt,"");
496coords.x+=parseInt(style.marginLeft);
497coords.y+=parseInt(style.marginTop)
498}}}else{if(p.localName=="BODY"){coords.x+=parseInt(parentStyle.borderLeftWidth);
499coords.y+=parseInt(parentStyle.borderTopWidth)
500}}var parent=elt.parentNode;
501while(p!=parent){coords.x-=parent.scrollLeft;
502coords.y-=parent.scrollTop;
503parent=parent.parentNode
504}addOffset(p,coords,view)
505}}else{if(elt.localName=="BODY"){var style=view.getComputedStyle(elt,"");
506coords.x+=parseInt(style.borderLeftWidth);
507coords.y+=parseInt(style.borderTopWidth);
508var htmlStyle=view.getComputedStyle(elt.parentNode,"");
509coords.x-=parseInt(htmlStyle.paddingLeft);
510coords.y-=parseInt(htmlStyle.paddingTop)
511}if(elt.scrollLeft){coords.x+=elt.scrollLeft
512}if(elt.scrollTop){coords.y+=elt.scrollTop
513}var win=elt.ownerDocument.defaultView;
514if(win&&(!singleFrame&&win.frameElement)){addOffset(win.frameElement,coords,win)
515}}}var coords={x:0,y:0};
516if(elt){addOffset(elt,coords,elt.ownerDocument.defaultView)
517}return coords
518};
519this.getLTRBWH=function(elt){var bcrect,dims={left:0,top:0,right:0,bottom:0,width:0,height:0};
520if(elt){bcrect=elt.getBoundingClientRect();
521dims.left=bcrect.left;
522dims.top=bcrect.top;
523dims.right=bcrect.right;
524dims.bottom=bcrect.bottom;
525if(bcrect.width){dims.width=bcrect.width;
526dims.height=bcrect.height
527}else{dims.width=dims.right-dims.left;
528dims.height=dims.bottom-dims.top
529}}return dims
530};
531this.applyBodyOffsets=function(elt,clientRect){var od=elt.ownerDocument;
532if(!od.body){return clientRect
533}var style=od.defaultView.getComputedStyle(od.body,null);
534var pos=style.getPropertyValue("position");
535if(pos==="absolute"||pos==="relative"){var borderLeft=parseInt(style.getPropertyValue("border-left-width").replace("px",""),10)||0;
536var borderTop=parseInt(style.getPropertyValue("border-top-width").replace("px",""),10)||0;
537var paddingLeft=parseInt(style.getPropertyValue("padding-left").replace("px",""),10)||0;
538var paddingTop=parseInt(style.getPropertyValue("padding-top").replace("px",""),10)||0;
539var marginLeft=parseInt(style.getPropertyValue("margin-left").replace("px",""),10)||0;
540var marginTop=parseInt(style.getPropertyValue("margin-top").replace("px",""),10)||0;
541var offsetX=borderLeft+paddingLeft+marginLeft;
542var offsetY=borderTop+paddingTop+marginTop;
543clientRect.left-=offsetX;
544clientRect.top-=offsetY;
545clientRect.right-=offsetX;
546clientRect.bottom-=offsetY
547}return clientRect
548};
549this.getOffsetSize=function(elt){return{width:elt.offsetWidth,height:elt.offsetHeight}
550};
551this.getOverflowParent=function(element){for(var scrollParent=element.parentNode;
552scrollParent;
553scrollParent=scrollParent.offsetParent){if(scrollParent.scrollHeight>scrollParent.offsetHeight){return scrollParent
554}}};
555this.isScrolledToBottom=function(element){var onBottom=(element.scrollTop+element.offsetHeight)==element.scrollHeight;
556if(FBTrace.DBG_CONSOLE){FBTrace.sysout("isScrolledToBottom offsetHeight: "+element.offsetHeight+" onBottom:"+onBottom)
557}return onBottom
558};
559this.scrollToBottom=function(element){element.scrollTop=element.scrollHeight;
560if(FBTrace.DBG_CONSOLE){FBTrace.sysout("scrollToBottom reset scrollTop "+element.scrollTop+" = "+element.scrollHeight);
561if(element.scrollHeight==element.offsetHeight){FBTrace.sysout("scrollToBottom attempt to scroll non-scrollable element "+element,element)
562}}return(element.scrollTop==element.scrollHeight)
563};
564this.move=function(element,x,y){element.style.left=x+"px";
565element.style.top=y+"px"
566};
567this.resize=function(element,w,h){element.style.width=w+"px";
568element.style.height=h+"px"
569};
570this.linesIntoCenterView=function(element,scrollBox){if(!scrollBox){scrollBox=this.getOverflowParent(element)
571}if(!scrollBox){return
572}var offset=this.getClientOffset(element);
573var topSpace=offset.y-scrollBox.scrollTop;
574var bottomSpace=(scrollBox.scrollTop+scrollBox.clientHeight)-(offset.y+element.offsetHeight);
575if(topSpace<0||bottomSpace<0){var split=(scrollBox.clientHeight/2);
576var centerY=offset.y-split;
577scrollBox.scrollTop=centerY;
578topSpace=split;
579bottomSpace=split-element.offsetHeight
580}return{before:Math.round((topSpace/element.offsetHeight)+0.5),after:Math.round((bottomSpace/element.offsetHeight)+0.5)}
581};
582this.scrollIntoCenterView=function(element,scrollBox,notX,notY){if(!element){return
583}if(!scrollBox){scrollBox=this.getOverflowParent(element)
584}if(!scrollBox){return
585}var offset=this.getClientOffset(element);
586if(!notY){var topSpace=offset.y-scrollBox.scrollTop;
587var bottomSpace=(scrollBox.scrollTop+scrollBox.clientHeight)-(offset.y+element.offsetHeight);
588if(topSpace<0||bottomSpace<0){var centerY=offset.y-(scrollBox.clientHeight/2);
589scrollBox.scrollTop=centerY
590}}if(!notX){var leftSpace=offset.x-scrollBox.scrollLeft;
591var rightSpace=(scrollBox.scrollLeft+scrollBox.clientWidth)-(offset.x+element.clientWidth);
592if(leftSpace<0||rightSpace<0){var centerX=offset.x-(scrollBox.clientWidth/2);
593scrollBox.scrollLeft=centerX
594}}if(FBTrace.DBG_SOURCEFILES){FBTrace.sysout("lib.scrollIntoCenterView ","Element:"+element.innerHTML)
595}};
596var cssKeywordMap=null;
597var cssPropNames=null;
598var cssColorNames=null;
599var imageRules=null;
600this.getCSSKeywordsByProperty=function(propName){if(!cssKeywordMap){cssKeywordMap={};
601for(var name in this.cssInfo){var list=[];
602var types=this.cssInfo[name];
603for(var i=0;
604i<types.length;
605++i){var keywords=this.cssKeywords[types[i]];
606if(keywords){list.push.apply(list,keywords)
607}}cssKeywordMap[name]=list
608}}return propName in cssKeywordMap?cssKeywordMap[propName]:[]
609};
610this.getCSSPropertyNames=function(){if(!cssPropNames){cssPropNames=[];
611for(var name in this.cssInfo){cssPropNames.push(name)
612}}return cssPropNames
613};
614this.isColorKeyword=function(keyword){if(keyword=="transparent"){return false
615}if(!cssColorNames){cssColorNames=[];
616var colors=this.cssKeywords.color;
617for(var i=0;
618i<colors.length;
619++i){cssColorNames.push(colors[i].toLowerCase())
620}var systemColors=this.cssKeywords.systemColor;
621for(var i=0;
622i<systemColors.length;
623++i){cssColorNames.push(systemColors[i].toLowerCase())
624}}return cssColorNames.indexOf?cssColorNames.indexOf(keyword.toLowerCase())!=-1:(" "+cssColorNames.join(" ")+" ").indexOf(" "+keyword.toLowerCase()+" ")!=-1
625};
626this.isImageRule=function(rule){if(!imageRules){imageRules=[];
627for(var i in this.cssInfo){var r=i.toLowerCase();
628var suffix="image";
629if(r.match(suffix+"$")==suffix||r=="background"){imageRules.push(r)
630}}}return imageRules.indexOf?imageRules.indexOf(rule.toLowerCase())!=-1:(" "+imageRules.join(" ")+" ").indexOf(" "+rule.toLowerCase()+" ")!=-1
631};
632this.copyTextStyles=function(fromNode,toNode,style){var view=this.isIE?fromNode.ownerDocument.parentWindow:fromNode.ownerDocument.defaultView;
633if(view){if(!style){style=this.isIE?fromNode.currentStyle:view.getComputedStyle(fromNode,"")
634}toNode.style.fontFamily=style.fontFamily;
635toNode.style.fontSize=style.fontSize;
636toNode.style.fontWeight=style.fontWeight;
637toNode.style.fontStyle=style.fontStyle;
638return style
639}};
640this.copyBoxStyles=function(fromNode,toNode,style){var view=this.isIE?fromNode.ownerDocument.parentWindow:fromNode.ownerDocument.defaultView;
641if(view){if(!style){style=this.isIE?fromNode.currentStyle:view.getComputedStyle(fromNode,"")
642}toNode.style.marginTop=style.marginTop;
643toNode.style.marginRight=style.marginRight;
644toNode.style.marginBottom=style.marginBottom;
645toNode.style.marginLeft=style.marginLeft;
646toNode.style.borderTopWidth=style.borderTopWidth;
647toNode.style.borderRightWidth=style.borderRightWidth;
648toNode.style.borderBottomWidth=style.borderBottomWidth;
649toNode.style.borderLeftWidth=style.borderLeftWidth;
650return style
651}};
652this.readBoxStyles=function(style){var styleNames={"margin-top":"marginTop","margin-right":"marginRight","margin-left":"marginLeft","margin-bottom":"marginBottom","border-top-width":"borderTop","border-right-width":"borderRight","border-left-width":"borderLeft","border-bottom-width":"borderBottom","padding-top":"paddingTop","padding-right":"paddingRight","padding-left":"paddingLeft","padding-bottom":"paddingBottom","z-index":"zIndex"};
653var styles={};
654for(var styleName in styleNames){styles[styleNames[styleName]]=parseInt(style.getPropertyCSSValue(styleName).cssText)||0
655}if(FBTrace.DBG_INSPECT){FBTrace.sysout("readBoxStyles ",styles)
656}return styles
657};
658this.getBoxFromStyles=function(style,element){var args=this.readBoxStyles(style);
659args.width=element.offsetWidth-(args.paddingLeft+args.paddingRight+args.borderLeft+args.borderRight);
660args.height=element.offsetHeight-(args.paddingTop+args.paddingBottom+args.borderTop+args.borderBottom);
661return args
662};
663this.getElementCSSSelector=function(element){var label=element.localName.toLowerCase();
664if(element.id){label+="#"+element.id
665}if(element.hasAttribute("class")){label+="."+element.getAttribute("class").split(" ")[0]
666}return label
667};
668this.getURLForStyleSheet=function(styleSheet){return(styleSheet.href?styleSheet.href:styleSheet.ownerNode.ownerDocument.URL)
669};
670this.getDocumentForStyleSheet=function(styleSheet){while(styleSheet.parentStyleSheet&&!styleSheet.ownerNode){styleSheet=styleSheet.parentStyleSheet
671}if(styleSheet.ownerNode){return styleSheet.ownerNode.ownerDocument
672}};
673this.getInstanceForStyleSheet=function(styleSheet,ownerDocument){if(FBL.isSystemStyleSheet(styleSheet)){return 0
674}if(FBTrace.DBG_CSS){FBTrace.sysout("getInstanceForStyleSheet: "+styleSheet.href+" "+styleSheet.media.mediaText+" "+(styleSheet.ownerNode&&FBL.getElementXPath(styleSheet.ownerNode)),ownerDocument)
675}ownerDocument=ownerDocument||FBL.getDocumentForStyleSheet(styleSheet);
676var ret=0,styleSheets=ownerDocument.styleSheets,href=styleSheet.href;
677for(var i=0;
678i<styleSheets.length;
679i++){var curSheet=styleSheets[i];
680if(FBTrace.DBG_CSS){FBTrace.sysout("getInstanceForStyleSheet: compare href "+i+" "+curSheet.href+" "+curSheet.media.mediaText+" "+(curSheet.ownerNode&&FBL.getElementXPath(curSheet.ownerNode)))
681}if(curSheet==styleSheet){break
682}if(curSheet.href==href){ret++
683}}return ret
684};
685var getElementType=this.getElementType=function(node){if(isElementXUL(node)){return"xul"
686}else{if(isElementSVG(node)){return"svg"
687}else{if(isElementMathML(node)){return"mathml"
688}else{if(isElementXHTML(node)){return"xhtml"
689}else{if(isElementHTML(node)){return"html"
690}}}}}};
691var getElementSimpleType=this.getElementSimpleType=function(node){if(isElementSVG(node)){return"svg"
692}else{if(isElementMathML(node)){return"mathml"
693}else{return"html"
694}}};
695var isElementHTML=this.isElementHTML=function(node){return node.nodeName==node.nodeName.toUpperCase()
696};
697var isElementXHTML=this.isElementXHTML=function(node){return node.nodeName==node.nodeName.toLowerCase()
698};
699var isElementMathML=this.isElementMathML=function(node){return node.namespaceURI=="http://www.w3.org/1998/Math/MathML"
700};
701var isElementSVG=this.isElementSVG=function(node){return node.namespaceURI=="http://www.w3.org/2000/svg"
702};
703var isElementXUL=this.isElementXUL=function(node){return node instanceof XULElement
704};
705this.isSelfClosing=function(element){if(isElementSVG(element)||isElementMathML(element)){return true
706}var tag=element.localName.toLowerCase();
707return(this.selfClosingTags.hasOwnProperty(tag))
708};
709this.getElementHTML=function(element){var self=this;
710function toHTML(elt){if(elt.nodeType==Node.ELEMENT_NODE){if(unwrapObject(elt).firebugIgnore){return
711}html.push("<",elt.nodeName.toLowerCase());
712for(var i=0;
713i<elt.attributes.length;
714++i){var attr=elt.attributes[i];
715if(attr.localName.indexOf("firebug-")==0){continue
716}if(attr.localName.indexOf("-moz-math")==0){continue
717}html.push(" ",attr.nodeName,'="',escapeForElementAttribute(attr.nodeValue),'"')
718}if(elt.firstChild){html.push(">");
719var pureText=true;
720for(var child=element.firstChild;
721child;
722child=child.nextSibling){pureText=pureText&&(child.nodeType==Node.TEXT_NODE)
723}if(pureText){html.push(escapeForHtmlEditor(elt.textContent))
724}else{for(var child=elt.firstChild;
725child;
726child=child.nextSibling){toHTML(child)
727}}html.push("</",elt.nodeName.toLowerCase(),">")
728}else{if(isElementSVG(elt)||isElementMathML(elt)){html.push("/>")
729}else{if(self.isSelfClosing(elt)){html.push((isElementXHTML(elt))?"/>":">")
730}else{html.push("></",elt.nodeName.toLowerCase(),">")
731}}}}else{if(elt.nodeType==Node.TEXT_NODE){html.push(escapeForTextNode(elt.textContent))
732}else{if(elt.nodeType==Node.CDATA_SECTION_NODE){html.push("<![CDATA[",elt.nodeValue,"]]>")
733}else{if(elt.nodeType==Node.COMMENT_NODE){html.push("<!--",elt.nodeValue,"-->")
734}}}}}var html=[];
735toHTML(element);
736return html.join("")
737};
738this.getElementXML=function(element){function toXML(elt){if(elt.nodeType==Node.ELEMENT_NODE){if(unwrapObject(elt).firebugIgnore){return
739}xml.push("<",elt.nodeName.toLowerCase());
740for(var i=0;
741i<elt.attributes.length;
742++i){var attr=elt.attributes[i];
743if(attr.localName.indexOf("firebug-")==0){continue
744}if(attr.localName.indexOf("-moz-math")==0){continue
745}xml.push(" ",attr.nodeName,'="',escapeForElementAttribute(attr.nodeValue),'"')
746}if(elt.firstChild){xml.push(">");
747for(var child=elt.firstChild;
748child;
749child=child.nextSibling){toXML(child)
750}xml.push("</",elt.nodeName.toLowerCase(),">")
751}else{xml.push("/>")
752}}else{if(elt.nodeType==Node.TEXT_NODE){xml.push(elt.nodeValue)
753}else{if(elt.nodeType==Node.CDATA_SECTION_NODE){xml.push("<![CDATA[",elt.nodeValue,"]]>")
754}else{if(elt.nodeType==Node.COMMENT_NODE){xml.push("<!--",elt.nodeValue,"-->")
755}}}}}var xml=[];
756toXML(element);
757return xml.join("")
758};
759this.hasClass=function(node,name){if(arguments.length==2){return(" "+node.className+" ").indexOf(" "+name+" ")!=-1
760}if(!node||node.nodeType!=1){return false
761}else{for(var i=1;
762i<arguments.length;
763++i){var name=arguments[i];
764var re=new RegExp("(^|\\s)"+name+"($|\\s)");
765if(!re.exec(node.className)){return false
766}}return true
767}};
768this.old_hasClass=function(node,name){if(!node||node.nodeType!=1){return false
769}else{for(var i=1;
770i<arguments.length;
771++i){var name=arguments[i];
772var re=new RegExp("(^|\\s)"+name+"($|\\s)");
773if(!re.exec(node.className)){return false
774}}return true
775}};
776this.setClass=function(node,name){if(node&&(" "+node.className+" ").indexOf(" "+name+" ")==-1){node.className+=" "+name
777}};
778this.getClassValue=function(node,name){var re=new RegExp(name+"-([^ ]+)");
779var m=re.exec(node.className);
780return m?m[1]:""
781};
782this.removeClass=function(node,name){if(node&&node.className){var index=node.className.indexOf(name);
783if(index>=0){var size=name.length;
784node.className=node.className.substr(0,index-1)+node.className.substr(index+size)
785}}};
786this.toggleClass=function(elt,name){if((" "+elt.className+" ").indexOf(" "+name+" ")!=-1){this.removeClass(elt,name)
787}else{this.setClass(elt,name)
788}};
789this.setClassTimed=function(elt,name,context,timeout){if(!timeout){timeout=1300
790}if(elt.__setClassTimeout){context.clearTimeout(elt.__setClassTimeout)
791}else{this.setClass(elt,name)
792}elt.__setClassTimeout=context.setTimeout(function(){delete elt.__setClassTimeout;
793FBL.removeClass(elt,name)
794},timeout)
795};
796this.cancelClassTimed=function(elt,name,context){if(elt.__setClassTimeout){FBL.removeClass(elt,name);
797context.clearTimeout(elt.__setClassTimeout);
798delete elt.__setClassTimeout
799}};
800this.$=function(id,doc){if(doc){return doc.getElementById(id)
801}else{return FBL.Firebug.chrome.document.getElementById(id)
802}};
803this.$$=function(selector,doc){if(doc||!FBL.Firebug.chrome){return FBL.Firebug.Selector(selector,doc)
804}else{return FBL.Firebug.Selector(selector,FBL.Firebug.chrome.document)
805}};
806this.getChildByClass=function(node){for(var i=1;
807i<arguments.length;
808++i){var className=arguments[i];
809var child=node.firstChild;
810node=null;
811for(;
812child;
813child=child.nextSibling){if(this.hasClass(child,className)){node=child;
814break
815}}}return node
816};
817this.getAncestorByClass=function(node,className){for(var parent=node;
818parent;
819parent=parent.parentNode){if(this.hasClass(parent,className)){return parent
820}}return null
821};
822this.getElementsByClass=function(node,className){var result=[];
823for(var child=node.firstChild;
824child;
825child=child.nextSibling){if(this.hasClass(child,className)){result.push(child)
826}}return result
827};
828this.getElementByClass=function(node,className){var args=cloneArray(arguments);
829args.splice(0,1);
830for(var child=node.firstChild;
831child;
832child=child.nextSibling){var args1=cloneArray(args);
833args1.unshift(child);
834if(FBL.hasClass.apply(null,args1)){return child
835}else{var found=FBL.getElementByClass.apply(null,args1);
836if(found){return found
837}}}return null
838};
839this.isAncestor=function(node,potentialAncestor){for(var parent=node;
840parent;
841parent=parent.parentNode){if(parent==potentialAncestor){return true
842}}return false
843};
844this.getNextElement=function(node){while(node&&node.nodeType!=1){node=node.nextSibling
845}return node
846};
847this.getPreviousElement=function(node){while(node&&node.nodeType!=1){node=node.previousSibling
848}return node
849};
850this.getBody=function(doc){if(doc.body){return doc.body
851}var body=doc.getElementsByTagName("body")[0];
852if(body){return body
853}return doc.firstChild
854};
855this.findNextDown=function(node,criteria){if(!node){return null
856}for(var child=node.firstChild;
857child;
858child=child.nextSibling){if(criteria(child)){return child
859}var next=this.findNextDown(child,criteria);
860if(next){return next
861}}};
862this.findPreviousUp=function(node,criteria){if(!node){return null
863}for(var child=node.lastChild;
864child;
865child=child.previousSibling){var next=this.findPreviousUp(child,criteria);
866if(next){return next
867}if(criteria(child)){return child
868}}};
869this.findNext=function(node,criteria,upOnly,maxRoot){if(!node){return null
870}if(!upOnly){var next=this.findNextDown(node,criteria);
871if(next){return next
872}}for(var sib=node.nextSibling;
873sib;
874sib=sib.nextSibling){if(criteria(sib)){return sib
875}var next=this.findNextDown(sib,criteria);
876if(next){return next
877}}if(node.parentNode&&node.parentNode!=maxRoot){return this.findNext(node.parentNode,criteria,true)
878}};
879this.findPrevious=function(node,criteria,downOnly,maxRoot){if(!node){return null
880}for(var sib=node.previousSibling;
881sib;
882sib=sib.previousSibling){var prev=this.findPreviousUp(sib,criteria);
883if(prev){return prev
884}if(criteria(sib)){return sib
885}}if(!downOnly){var next=this.findPreviousUp(node,criteria);
886if(next){return next
887}}if(node.parentNode&&node.parentNode!=maxRoot){if(criteria(node.parentNode)){return node.parentNode
888}return this.findPrevious(node.parentNode,criteria,true)
889}};
890this.getNextByClass=function(root,state){var iter=function iter(node){return node.nodeType==1&&FBL.hasClass(node,state)
891};
892return this.findNext(root,iter)
893};
894this.getPreviousByClass=function(root,state){var iter=function iter(node){return node.nodeType==1&&FBL.hasClass(node,state)
895};
896return this.findPrevious(root,iter)
897};
898this.isElement=function(o){try{return o&&this.instanceOf(o,"Element")
899}catch(ex){return false
900}};
901var appendFragment=null;
902this.appendInnerHTML=function(element,html,referenceElement){referenceElement=referenceElement||null;
903var doc=element.ownerDocument;
904if(doc.createRange){var range=doc.createRange();
905range.selectNodeContents(element);
906var fragment=range.createContextualFragment(html);
907var firstChild=fragment.firstChild;
908element.insertBefore(fragment,referenceElement)
909}else{if(!appendFragment||appendFragment.ownerDocument!=doc){appendFragment=doc.createDocumentFragment()
910}var div=doc.createElement("div");
911div.innerHTML=html;
912var firstChild=div.firstChild;
913while(div.firstChild){appendFragment.appendChild(div.firstChild)
914}element.insertBefore(appendFragment,referenceElement);
915div=null
916}return firstChild
917};
918this.createElement=function(tagName,properties){properties=properties||{};
919var doc=properties.document||FBL.Firebug.chrome.document;
920var element=doc.createElement(tagName);
921for(var name in properties){if(name!="document"){element[name]=properties[name]
922}}return element
923};
924this.createGlobalElement=function(tagName,properties){properties=properties||{};
925var doc=FBL.Env.browser.document;
926var element=this.NS&&doc.createElementNS?doc.createElementNS(FBL.NS,tagName):doc.createElement(tagName);
927for(var name in properties){var propname=name;
928if(FBL.isIE&&name=="class"){propname="className"
929}if(name!="document"){element.setAttribute(propname,properties[name])
930}}return element
931};
932this.safeGetWindowLocation=function(window){try{if(window){if(window.closed){return"(window.closed)"
933}if("location" in window){return window.location+""
934}else{return"(no window.location)"
935}}else{return"(no context.window)"
936}}catch(exc){if(FBTrace.DBG_WINDOWS||FBTrace.DBG_ERRORS){FBTrace.sysout("TabContext.getWindowLocation failed "+exc,exc)
937}FBTrace.sysout("TabContext.getWindowLocation failed window:",window);
938return"(getWindowLocation: "+exc+")"
939}};
940this.isLeftClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==1:event.button==0)&&this.noKeyModifiers(event)
941};
942this.isMiddleClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==4:event.button==1)&&this.noKeyModifiers(event)
943};
944this.isRightClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==2:event.button==2)&&this.noKeyModifiers(event)
945};
946this.noKeyModifiers=function(event){return !event.ctrlKey&&!event.shiftKey&&!event.altKey&&!event.metaKey
947};
948this.isControlClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==1:event.button==0)&&this.isControl(event)
949};
950this.isShiftClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==1:event.button==0)&&this.isShift(event)
951};
952this.isControl=function(event){return(event.metaKey||event.ctrlKey)&&!event.shiftKey&&!event.altKey
953};
954this.isAlt=function(event){return event.altKey&&!event.ctrlKey&&!event.shiftKey&&!event.metaKey
955};
956this.isAltClick=function(event){return(this.isIE&&event.type!="click"&&event.type!="dblclick"?event.button==1:event.button==0)&&this.isAlt(event)
957};
958this.isControlShift=function(event){return(event.metaKey||event.ctrlKey)&&event.shiftKey&&!event.altKey
959};
960this.isShift=function(event){return event.shiftKey&&!event.metaKey&&!event.ctrlKey&&!event.altKey
961};
962this.addEvent=function(object,name,handler,useCapture){if(object.addEventListener){object.addEventListener(name,handler,useCapture)
963}else{object.attachEvent("on"+name,handler)
964}};
965this.removeEvent=function(object,name,handler,useCapture){try{if(object.removeEventListener){object.removeEventListener(name,handler,useCapture)
966}else{object.detachEvent("on"+name,handler)
967}}catch(e){if(FBTrace.DBG_ERRORS){FBTrace.sysout("FBL.removeEvent error: ",object,name)
968}}};
969this.cancelEvent=function(e,preventDefault){if(!e){return
970}if(preventDefault){if(e.preventDefault){e.preventDefault()
971}else{e.returnValue=false
972}}if(e.stopPropagation){e.stopPropagation()
973}else{e.cancelBubble=true
974}};
975this.addGlobalEvent=function(name,handler){var doc=this.Firebug.browser.document;
976var frames=this.Firebug.browser.window.frames;
977this.addEvent(doc,name,handler);
978if(this.Firebug.chrome.type=="popup"){this.addEvent(this.Firebug.chrome.document,name,handler)
979}for(var i=0,frame;
980frame=frames[i];
981i++){try{this.addEvent(frame.document,name,handler)
982}catch(E){}}};
983this.removeGlobalEvent=function(name,handler){var doc=this.Firebug.browser.document;
984var frames=this.Firebug.browser.window.frames;
985this.removeEvent(doc,name,handler);
986if(this.Firebug.chrome.type=="popup"){this.removeEvent(this.Firebug.chrome.document,name,handler)
987}for(var i=0,frame;
988frame=frames[i];
989i++){try{this.removeEvent(frame.document,name,handler)
990}catch(E){}}};
991this.dispatch=function(listeners,name,args){if(!listeners){return
992}try{if(typeof listeners.length!="undefined"){if(FBTrace.DBG_DISPATCH){FBTrace.sysout("FBL.dispatch",name+" to "+listeners.length+" listeners")
993}for(var i=0;
994i<listeners.length;
995++i){var listener=listeners[i];
996if(listener[name]){listener[name].apply(listener,args)
997}}}else{if(FBTrace.DBG_DISPATCH){FBTrace.sysout("FBL.dispatch",name+" to listeners of an object")
998}for(var prop in listeners){var listener=listeners[prop];
999if(listener[name]){listener[name].apply(listener,args)
1000}}}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout(" Exception in lib.dispatch "+name,exc)
1001}}};
1002var disableTextSelectionHandler=function(event){FBL.cancelEvent(event,true);
1003return false
1004};
1005this.disableTextSelection=function(e){if(typeof e.onselectstart!="undefined"){this.addEvent(e,"selectstart",disableTextSelectionHandler)
1006}else{e.style.cssText="user-select: none; -khtml-user-select: none; -moz-user-select: none;";
1007if(!this.isFirefox){this.addEvent(e,"mousedown",disableTextSelectionHandler)
1008}}e.style.cursor="default"
1009};
1010this.restoreTextSelection=function(e){if(typeof e.onselectstart!="undefined"){this.removeEvent(e,"selectstart",disableTextSelectionHandler)
1011}else{e.style.cssText="cursor: default;";
1012if(!this.isFirefox){this.removeEvent(e,"mousedown",disableTextSelectionHandler)
1013}}};
1014var eventTypes={composition:["composition","compositionstart","compositionend"],contextmenu:["contextmenu"],drag:["dragenter","dragover","dragexit","dragdrop","draggesture"],focus:["focus","blur"],form:["submit","reset","change","select","input"],key:["keydown","keyup","keypress"],load:["load","beforeunload","unload","abort","error"],mouse:["mousedown","mouseup","click","dblclick","mouseover","mouseout","mousemove"],mutation:["DOMSubtreeModified","DOMNodeInserted","DOMNodeRemoved","DOMNodeRemovedFromDocument","DOMNodeInsertedIntoDocument","DOMAttrModified","DOMCharacterDataModified"],paint:["paint","resize","scroll"],scroll:["overflow","underflow","overflowchanged"],text:["text"],ui:["DOMActivate","DOMFocusIn","DOMFocusOut"],xul:["popupshowing","popupshown","popuphiding","popuphidden","close","command","broadcast","commandupdate"]};
1015this.getEventFamily=function(eventType){if(!this.families){this.families={};
1016for(var family in eventTypes){var types=eventTypes[family];
1017for(var i=0;
1018i<types.length;
1019++i){this.families[types[i]]=family
1020}}}return this.families[eventType]
1021};
1022this.getFileName=function(url){var split=this.splitURLBase(url);
1023return split.name
1024};
1025this.splitURLBase=function(url){if(this.isDataURL(url)){return this.splitDataURL(url)
1026}return this.splitURLTrue(url)
1027};
1028this.splitDataURL=function(url){var mark=url.indexOf(":",3);
1029if(mark!=4){return false
1030}var point=url.indexOf(",",mark+1);
1031if(point<mark){return false
1032}var props={encodedContent:url.substr(point+1)};
1033var metadataBuffer=url.substr(mark+1,point);
1034var metadata=metadataBuffer.split(";");
1035for(var i=0;
1036i<metadata.length;
1037i++){var nv=metadata[i].split("=");
1038if(nv.length==2){props[nv[0]]=nv[1]
1039}}if(props.hasOwnProperty("fileName")){var caller_URL=decodeURIComponent(props.fileName);
1040var caller_split=this.splitURLTrue(caller_URL);
1041if(props.hasOwnProperty("baseLineNumber")){props.path=caller_split.path;
1042props.line=props.baseLineNumber;
1043var hint=decodeURIComponent(props.encodedContent.substr(0,200)).replace(/\s*$/,"");
1044props.name="eval->"+hint
1045}else{props.name=caller_split.name;
1046props.path=caller_split.path
1047}}else{if(!props.hasOwnProperty("path")){props.path="data:"
1048}if(!props.hasOwnProperty("name")){props.name=decodeURIComponent(props.encodedContent.substr(0,200)).replace(/\s*$/,"")
1049}}return props
1050};
1051this.splitURLTrue=function(url){var m=reSplitFile.exec(url);
1052if(!m){return{name:url,path:url}
1053}else{if(!m[2]){return{path:m[1],name:m[1]}
1054}else{return{path:m[1],name:m[2]+m[3]}
1055}}};
1056this.getFileExtension=function(url){if(!url){return null
1057}var queryString=url.indexOf("?");
1058if(queryString!=-1){url=url.substr(0,queryString)
1059}var lastDot=url.lastIndexOf(".");
1060return url.substr(lastDot+1)
1061};
1062this.isSystemURL=function(url){if(!url){return true
1063}if(url.length==0){return true
1064}if(url[0]=="h"){return false
1065}if(url.substr(0,9)=="resource:"){return true
1066}else{if(url.substr(0,16)=="chrome://firebug"){return true
1067}else{if(url=="XPCSafeJSObjectWrapper.cpp"){return true
1068}else{if(url.substr(0,6)=="about:"){return true
1069}else{if(url.indexOf("firebug-service.js")!=-1){return true
1070}else{return false
1071}}}}}};
1072this.isSystemPage=function(win){try{var doc=win.document;
1073if(!doc){return false
1074}if((doc.styleSheets.length&&doc.styleSheets[0].href=="chrome://global/content/xml/XMLPrettyPrint.css")||(doc.styleSheets.length>1&&doc.styleSheets[1].href=="chrome://browser/skin/feeds/subscribe.css")){return true
1075}return FBL.isSystemURL(win.location.href)
1076}catch(exc){ERROR("tabWatcher.isSystemPage document not ready:"+exc);
1077return false
1078}};
1079this.isSystemStyleSheet=function(sheet){var href=sheet&&sheet.href;
1080return href&&FBL.isSystemURL(href)
1081};
1082this.getURIHost=function(uri){try{if(uri){return uri.host
1083}else{return""
1084}}catch(exc){return""
1085}};
1086this.isLocalURL=function(url){if(url.substr(0,5)=="file:"){return true
1087}else{if(url.substr(0,8)=="wyciwyg:"){return true
1088}else{return false
1089}}};
1090this.isDataURL=function(url){return(url&&url.substr(0,5)=="data:")
1091};
1092this.getLocalPath=function(url){if(this.isLocalURL(url)){var fileHandler=ioService.getProtocolHandler("file").QueryInterface(Ci.nsIFileProtocolHandler);
1093var file=fileHandler.getFileFromURLSpec(url);
1094return file.path
1095}};
1096this.getURLFromLocalFile=function(file){var fileHandler=ioService.getProtocolHandler("file").QueryInterface(Ci.nsIFileProtocolHandler);
1097var URL=fileHandler.getURLSpecFromFile(file);
1098return URL
1099};
1100this.getDataURLForContent=function(content,url){var uri="data:text/html;";
1101uri+="fileName="+encodeURIComponent(url)+",";
1102uri+=encodeURIComponent(content);
1103return uri
1104},this.getDomain=function(url){var m=/[^:]+:\/{1,3}([^\/]+)/.exec(url);
1105return m?m[1]:""
1106};
1107this.getURLPath=function(url){var m=/[^:]+:\/{1,3}[^\/]+(\/.*?)$/.exec(url);
1108return m?m[1]:""
1109};
1110this.getPrettyDomain=function(url){var m=/[^:]+:\/{1,3}(www\.)?([^\/]+)/.exec(url);
1111return m?m[2]:""
1112};
1113this.absoluteURL=function(url,baseURL){return this.absoluteURLWithDots(url,baseURL).replace("/./","/","g")
1114};
1115this.absoluteURLWithDots=function(url,baseURL){if(url[0]=="?"){return baseURL+url
1116}var reURL=/(([^:]+:)\/{1,2}[^\/]*)(.*?)$/;
1117var m=reURL.exec(url);
1118if(m){return url
1119}var m=reURL.exec(baseURL);
1120if(!m){return""
1121}var head=m[1];
1122var tail=m[3];
1123if(url.substr(0,2)=="//"){return m[2]+url
1124}else{if(url[0]=="/"){return head+url
1125}else{if(tail[tail.length-1]=="/"){return baseURL+url
1126}else{var parts=tail.split("/");
1127return head+parts.slice(0,parts.length-1).join("/")+"/"+url
1128}}}};
1129this.normalizeURL=function(url){if(!url){return""
1130}if(url.length<255){url=url.replace(/[^\/]+\/\.\.\//,"","g");
1131url=url.replace(/#.*/,"");
1132url=url.replace(/file:\/([^\/])/g,"file:///$1");
1133if(url.indexOf("chrome:")==0){var m=reChromeCase.exec(url);
1134if(m){url="chrome://"+m[1].toLowerCase()+"/"+m[2]
1135}}}return url
1136};
1137this.denormalizeURL=function(url){return url.replace(/file:\/\/\//g,"file:/")
1138};
1139this.parseURLParams=function(url){var q=url?url.indexOf("?"):-1;
1140if(q==-1){return[]
1141}var search=url.substr(q+1);
1142var h=search.lastIndexOf("#");
1143if(h!=-1){search=search.substr(0,h)
1144}if(!search){return[]
1145}return this.parseURLEncodedText(search)
1146};
1147this.parseURLEncodedText=function(text){var maxValueLength=25000;
1148var params=[];
1149text=text.replace(/\+/g," ");
1150var args=text.split("&");
1151for(var i=0;
1152i<args.length;
1153++i){try{var parts=args[i].split("=");
1154if(parts.length==2){if(parts[1].length>maxValueLength){parts[1]=this.$STR("LargeData")
1155}params.push({name:decodeURIComponent(parts[0]),value:decodeURIComponent(parts[1])})
1156}else{params.push({name:decodeURIComponent(parts[0]),value:""})
1157}}catch(e){if(FBTrace.DBG_ERRORS){FBTrace.sysout("parseURLEncodedText EXCEPTION ",e);
1158FBTrace.sysout("parseURLEncodedText EXCEPTION URI",args[i])
1159}}}params.sort(function(a,b){return a.name<=b.name?-1:1
1160});
1161return params
1162};
1163this.parseURLParamsArray=function(url){var q=url?url.indexOf("?"):-1;
1164if(q==-1){return[]
1165}var search=url.substr(q+1);
1166var h=search.lastIndexOf("#");
1167if(h!=-1){search=search.substr(0,h)
1168}if(!search){return[]
1169}return this.parseURLEncodedTextArray(search)
1170};
1171this.parseURLEncodedTextArray=function(text){var maxValueLength=25000;
1172var params=[];
1173text=text.replace(/\+/g," ");
1174var args=text.split("&");
1175for(var i=0;
1176i<args.length;
1177++i){try{var parts=args[i].split("=");
1178if(parts.length==2){if(parts[1].length>maxValueLength){parts[1]=this.$STR("LargeData")
1179}params.push({name:decodeURIComponent(parts[0]),value:[decodeURIComponent(parts[1])]})
1180}else{params.push({name:decodeURIComponent(parts[0]),value:[""]})
1181}}catch(e){if(FBTrace.DBG_ERRORS){FBTrace.sysout("parseURLEncodedText EXCEPTION ",e);
1182FBTrace.sysout("parseURLEncodedText EXCEPTION URI",args[i])
1183}}}params.sort(function(a,b){return a.name<=b.name?-1:1
1184});
1185return params
1186};
1187this.reEncodeURL=function(file,text){var lines=text.split("\n");
1188var params=this.parseURLEncodedText(lines[lines.length-1]);
1189var args=[];
1190for(var i=0;
1191i<params.length;
1192++i){args.push(encodeURIComponent(params[i].name)+"="+encodeURIComponent(params[i].value))
1193}var url=file.href;
1194url+=(url.indexOf("?")==-1?"?":"&")+args.join("&");
1195return url
1196};
1197this.getResource=function(aURL){try{var channel=ioService.newChannel(aURL,null,null);
1198var input=channel.open();
1199return FBL.readFromStream(input)
1200}catch(e){if(FBTrace.DBG_ERRORS){FBTrace.sysout("lib.getResource FAILS for "+aURL,e)
1201}}};
1202this.parseJSONString=function(jsonString,originURL){var regex=new RegExp(/^\/\*-secure-([\s\S]*)\*\/\s*$/);
1203var matches=regex.exec(jsonString);
1204if(matches){jsonString=matches[1];
1205if(jsonString[0]=="\\"&&jsonString[1]=="n"){jsonString=jsonString.substr(2)
1206}if(jsonString[jsonString.length-2]=="\\"&&jsonString[jsonString.length-1]=="n"){jsonString=jsonString.substr(0,jsonString.length-2)
1207}}if(jsonString.indexOf("&&&START&&&")){regex=new RegExp(/&&&START&&& (.+) &&&END&&&/);
1208matches=regex.exec(jsonString);
1209if(matches){jsonString=matches[1]
1210}}jsonString="("+jsonString+")";
1211var jsonObject=null;
1212try{jsonObject=Firebug.context.evaluate(jsonString,null,null,function(){return null
1213})
1214}catch(e){if(FBTrace.DBG_ERRORS||FBTrace.DBG_JSONVIEWER){FBTrace.sysout("jsonviewer.parseJSON EXCEPTION",e)
1215}return null
1216}return jsonObject
1217};
1218this.objectToString=function(object){try{return object+""
1219}catch(exc){return null
1220}};
1221this.setSelectionRange=function(input,start,length){if(input.createTextRange){var range=input.createTextRange();
1222range.moveStart("character",start);
1223range.moveEnd("character",length-input.value.length);
1224range.select()
1225}else{if(input.setSelectionRange){input.setSelectionRange(start,length);
1226input.focus()
1227}}};
1228this.getInputSelectionStart=function(input){if(document.selection){var range=input.ownerDocument.selection.createRange();
1229var text=range.text;
1230if(text){return input.value.indexOf(text)
1231}else{range.moveStart("character",-input.value.length);
1232return range.text.length
1233}}else{if(typeof input.selectionStart!="undefined"){return input.selectionStart
1234}}return 0
1235};
1236function onOperaTabBlur(e){if(this.lastKey==9){this.focus()
1237}}function onOperaTabKeyDown(e){this.lastKey=e.keyCode
1238}function onOperaTabFocus(e){this.lastKey=null
1239}this.fixOperaTabKey=function(el){el.onfocus=onOperaTabFocus;
1240el.onblur=onOperaTabBlur;
1241el.onkeydown=onOperaTabKeyDown
1242};
1243this.Property=function(object,name){this.object=object;
1244this.name=name;
1245this.getObject=function(){return object[name]
1246}
1247};
1248this.ErrorCopy=function(message){this.message=message
1249};
1250function EventCopy(event){for(var name in event){try{this[name]=event[name]
1251}catch(exc){}}}this.EventCopy=EventCopy;
1252var toString=Object.prototype.toString;
1253var reFunction=/^\s*function(\s+[\w_$][\w\d_$]*)?\s*\(/;
1254this.isArray=function(object){return toString.call(object)==="[object Array]"
1255};
1256this.isFunction=function(object){if(!object){return false
1257}try{return toString.call(object)==="[object Function]"||this.isIE&&typeof object!="string"&&reFunction.test(""+object)
1258}catch(E){FBTrace.sysout("Lib.isFunction() failed for ",object);
1259return false
1260}};
1261this.instanceOf=function(object,className){if(!object||typeof object!="object"){return false
1262}if(object.ownerDocument){var win=object.ownerDocument.defaultView||object.ownerDocument.parentWindow;
1263if(className in win&&object instanceof win[className]){return true
1264}}else{var win=Firebug.browser.window;
1265if(className in win){return object instanceof win[className]
1266}}var cache=instanceCheckMap[className];
1267if(!cache){return false
1268}for(var n in cache){var obj=cache[n];
1269var type=typeof obj;
1270obj=type=="object"?obj:[obj];
1271for(var name in obj){if(!obj.hasOwnProperty(name)){continue
1272}var value=obj[name];
1273if(n=="property"&&!(value in object)||n=="method"&&!this.isFunction(object[value])||n=="value"&&(""+object[name]).toLowerCase()!=(""+value).toLowerCase()){return false
1274}}}return true
1275};
1276var instanceCheckMap={Window:{property:["window","document"],method:"setTimeout"},Document:{property:["body","cookie"],method:"getElementById"},Node:{property:"ownerDocument",method:"appendChild"},Element:{property:"tagName",value:{nodeType:1}},Location:{property:["hostname","protocol"],method:"assign"},HTMLImageElement:{property:"useMap",value:{nodeType:1,tagName:"img"}},HTMLAnchorElement:{property:"hreflang",value:{nodeType:1,tagName:"a"}},HTMLInputElement:{property:"form",value:{nodeType:1,tagName:"input"}},HTMLButtonElement:{},HTMLFormElement:{method:"submit",value:{nodeType:1,tagName:"form"}},HTMLBodyElement:{},HTMLHtmlElement:{},CSSStyleRule:{property:["selectorText","style"]}};
1277var domMemberMap2={};
1278var domMemberMap2Sandbox=null;
1279var getDomMemberMap2=function(name){if(!domMemberMap2Sandbox){var doc=Firebug.chrome.document;
1280var frame=doc.createElement("iframe");
1281frame.id="FirebugSandbox";
1282frame.style.display="none";
1283frame.src="about:blank";
1284doc.body.appendChild(frame);
1285domMemberMap2Sandbox=frame.window||frame.contentWindow
1286}var props=[];
1287var object=null;
1288if(name=="Window"){object=domMemberMap2Sandbox.window
1289}else{if(name=="Document"){object=domMemberMap2Sandbox.document
1290}else{if(name=="HTMLScriptElement"){object=domMemberMap2Sandbox.document.createElement("script")
1291}else{if(name=="HTMLAnchorElement"){object=domMemberMap2Sandbox.document.createElement("a")
1292}else{if(name.indexOf("Element")!=-1){object=domMemberMap2Sandbox.document.createElement("div")
1293}}}}}if(object){for(var n in object){props.push(n)
1294}}return props;
1295return extendArray(props,domMemberMap[name])
1296};
1297this.getDOMMembers=function(object){if(!domMemberCache){FBL.domMemberCache=domMemberCache={};
1298for(var name in domMemberMap){var builtins=getDomMemberMap2(name);
1299var cache=domMemberCache[name]={};
1300for(var i=0;
1301i<builtins.length;
1302++i){cache[builtins[i]]=i
1303}}}try{if(this.instanceOf(object,"Window")){return domMemberCache.Window
1304}else{if(this.instanceOf(object,"Document")||this.instanceOf(object,"XMLDocument")){return domMemberCache.Document
1305}else{if(this.instanceOf(object,"Location")){return domMemberCache.Location
1306}else{if(this.instanceOf(object,"HTMLImageElement")){return domMemberCache.HTMLImageElement
1307}else{if(this.instanceOf(object,"HTMLAnchorElement")){return domMemberCache.HTMLAnchorElement
1308}else{if(this.instanceOf(object,"HTMLInputElement")){return domMemberCache.HTMLInputElement
1309}else{if(this.instanceOf(object,"HTMLButtonElement")){return domMemberCache.HTMLButtonElement
1310}else{if(this.instanceOf(object,"HTMLFormElement")){return domMemberCache.HTMLFormElement
1311}else{if(this.instanceOf(object,"HTMLBodyElement")){return domMemberCache.HTMLBodyElement
1312}else{if(this.instanceOf(object,"HTMLHtmlElement")){return domMemberCache.HTMLHtmlElement
1313}else{if(this.instanceOf(object,"HTMLScriptElement")){return domMemberCache.HTMLScriptElement
1314}else{if(this.instanceOf(object,"HTMLTableElement")){return domMemberCache.HTMLTableElement
1315}else{if(this.instanceOf(object,"HTMLTableRowElement")){return domMemberCache.HTMLTableRowElement
1316}else{if(this.instanceOf(object,"HTMLTableCellElement")){return domMemberCache.HTMLTableCellElement
1317}else{if(this.instanceOf(object,"HTMLIFrameElement")){return domMemberCache.HTMLIFrameElement
1318}else{if(this.instanceOf(object,"SVGSVGElement")){return domMemberCache.SVGSVGElement
1319}else{if(this.instanceOf(object,"SVGElement")){return domMemberCache.SVGElement
1320}else{if(this.instanceOf(object,"Element")){return domMemberCache.Element
1321}else{if(this.instanceOf(object,"Text")||this.instanceOf(object,"CDATASection")){return domMemberCache.Text
1322}else{if(this.instanceOf(object,"Attr")){return domMemberCache.Attr
1323}else{if(this.instanceOf(object,"Node")){return domMemberCache.Node
1324}else{if(this.instanceOf(object,"Event")||this.instanceOf(object,"EventCopy")){return domMemberCache.Event
1325}else{return{}
1326}}}}}}}}}}}}}}}}}}}}}}}catch(E){if(FBTrace.DBG_ERRORS){FBTrace.sysout("lib.getDOMMembers FAILED ",E)
1327}return{}
1328}};
1329this.isDOMMember=function(object,propName){var members=this.getDOMMembers(object);
1330return members&&propName in members
1331};
1332var domMemberCache=null;
1333var domMemberMap={};
1334domMemberMap.Window=["document","frameElement","innerWidth","innerHeight","outerWidth","outerHeight","screenX","screenY","pageXOffset","pageYOffset","scrollX","scrollY","scrollMaxX","scrollMaxY","status","defaultStatus","parent","opener","top","window","content","self","location","history","frames","navigator","screen","menubar","toolbar","locationbar","personalbar","statusbar","directories","scrollbars","fullScreen","netscape","java","console","Components","controllers","closed","crypto","pkcs11","name","property","length","sessionStorage","globalStorage","setTimeout","setInterval","clearTimeout","clearInterval","addEventListener","removeEventListener","dispatchEvent","getComputedStyle","captureEvents","releaseEvents","routeEvent","enableExternalCapture","disableExternalCapture","moveTo","moveBy","resizeTo","resizeBy","scroll","scrollTo","scrollBy","scrollByLines","scrollByPages","sizeToContent","setResizable","getSelection","open","openDialog","close","alert","confirm","prompt","dump","focus","blur","find","back","forward","home","stop","print","atob","btoa","updateCommands","XPCNativeWrapper","GeckoActiveXObject","applicationCache"];
1335domMemberMap.Location=["href","protocol","host","hostname","port","pathname","search","hash","assign","reload","replace"];
1336domMemberMap.Node=["id","className","nodeType","tagName","nodeName","localName","prefix","namespaceURI","nodeValue","ownerDocument","parentNode","offsetParent","nextSibling","previousSibling","firstChild","lastChild","childNodes","attributes","dir","baseURI","textContent","innerHTML","addEventListener","removeEventListener","dispatchEvent","cloneNode","appendChild","insertBefore","replaceChild","removeChild","compareDocumentPosition","hasAttributes","hasChildNodes","lookupNamespaceURI","lookupPrefix","normalize","isDefaultNamespace","isEqualNode","isSameNode","isSupported","getFeature","getUserData","setUserData"];
1337domMemberMap.Document=extendArray(domMemberMap.Node,["documentElement","body","title","location","referrer","cookie","contentType","lastModified","characterSet","inputEncoding","xmlEncoding","xmlStandalone","xmlVersion","strictErrorChecking","documentURI","URL","defaultView","doctype","implementation","styleSheets","images","links","forms","anchors","embeds","plugins","applets","width","height","designMode","compatMode","async","preferredStylesheetSet","alinkColor","linkColor","vlinkColor","bgColor","fgColor","domain","addEventListener","removeEventListener","dispatchEvent","captureEvents","releaseEvents","routeEvent","clear","open","close","execCommand","execCommandShowHelp","getElementsByName","getSelection","queryCommandEnabled","queryCommandIndeterm","queryCommandState","queryCommandSupported","queryCommandText","queryCommandValue","write","writeln","adoptNode","appendChild","removeChild","renameNode","cloneNode","compareDocumentPosition","createAttribute","createAttributeNS","createCDATASection","createComment","createDocumentFragment","createElement","createElementNS","createEntityReference","createEvent","createExpression","createNSResolver","createNodeIterator","createProcessingInstruction","createRange","createTextNode","createTreeWalker","domConfig","evaluate","evaluateFIXptr","evaluateXPointer","getAnonymousElementByAttribute","getAnonymousNodes","addBinding","removeBinding","getBindingParent","getBoxObjectFor","setBoxObjectFor","getElementById","getElementsByTagName","getElementsByTagNameNS","hasAttributes","hasChildNodes","importNode","insertBefore","isDefaultNamespace","isEqualNode","isSameNode","isSupported","load","loadBindingDocument","lookupNamespaceURI","lookupPrefix","normalize","normalizeDocument","getFeature","getUserData","setUserData"]);
1338domMemberMap.Element=extendArray(domMemberMap.Node,["clientWidth","clientHeight","offsetLeft","offsetTop","offsetWidth","offsetHeight","scrollLeft","scrollTop","scrollWidth","scrollHeight","style","tabIndex","title","lang","align","spellcheck","addEventListener","removeEventListener","dispatchEvent","focus","blur","cloneNode","appendChild","insertBefore","replaceChild","removeChild","compareDocumentPosition","getElementsByTagName","getElementsByTagNameNS","getAttribute","getAttributeNS","getAttributeNode","getAttributeNodeNS","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS","removeAttribute","removeAttributeNS","removeAttributeNode","hasAttribute","hasAttributeNS","hasAttributes","hasChildNodes","lookupNamespaceURI","lookupPrefix","normalize","isDefaultNamespace","isEqualNode","isSameNode","isSupported","getFeature","getUserData","setUserData"]);
1339domMemberMap.SVGElement=extendArray(domMemberMap.Element,["x","y","width","height","rx","ry","transform","href","ownerSVGElement","viewportElement","farthestViewportElement","nearestViewportElement","getBBox","getCTM","getScreenCTM","getTransformToElement","getPresentationAttribute","preserveAspectRatio"]);
1340domMemberMap.SVGSVGElement=extendArray(domMemberMap.Element,["x","y","width","height","rx","ry","transform","viewBox","viewport","currentView","useCurrentView","pixelUnitToMillimeterX","pixelUnitToMillimeterY","screenPixelToMillimeterX","screenPixelToMillimeterY","currentScale","currentTranslate","zoomAndPan","ownerSVGElement","viewportElement","farthestViewportElement","nearestViewportElement","contentScriptType","contentStyleType","getBBox","getCTM","getScreenCTM","getTransformToElement","getEnclosureList","getIntersectionList","getViewboxToViewportTransform","getPresentationAttribute","getElementById","checkEnclosure","checkIntersection","createSVGAngle","createSVGLength","createSVGMatrix","createSVGNumber","createSVGPoint","createSVGRect","createSVGString","createSVGTransform","createSVGTransformFromMatrix","deSelectAll","preserveAspectRatio","forceRedraw","suspendRedraw","unsuspendRedraw","unsuspendRedrawAll","getCurrentTime","setCurrentTime","animationsPaused","pauseAnimations","unpauseAnimations"]);
1341domMemberMap.HTMLImageElement=extendArray(domMemberMap.Element,["src","naturalWidth","naturalHeight","width","height","x","y","name","alt","longDesc","lowsrc","border","complete","hspace","vspace","isMap","useMap"]);
1342domMemberMap.HTMLAnchorElement=extendArray(domMemberMap.Element,["name","target","accessKey","href","protocol","host","hostname","port","pathname","search","hash","hreflang","coords","shape","text","type","rel","rev","charset"]);
1343domMemberMap.HTMLIFrameElement=extendArray(domMemberMap.Element,["contentDocument","contentWindow","frameBorder","height","longDesc","marginHeight","marginWidth","name","scrolling","src","width"]);
1344domMemberMap.HTMLTableElement=extendArray(domMemberMap.Element,["bgColor","border","caption","cellPadding","cellSpacing","frame","rows","rules","summary","tBodies","tFoot","tHead","width","createCaption","createTFoot","createTHead","deleteCaption","deleteRow","deleteTFoot","deleteTHead","insertRow"]);
1345domMemberMap.HTMLTableRowElement=extendArray(domMemberMap.Element,["bgColor","cells","ch","chOff","rowIndex","sectionRowIndex","vAlign","deleteCell","insertCell"]);
1346domMemberMap.HTMLTableCellElement=extendArray(domMemberMap.Element,["abbr","axis","bgColor","cellIndex","ch","chOff","colSpan","headers","height","noWrap","rowSpan","scope","vAlign","width"]);
1347domMemberMap.HTMLScriptElement=extendArray(domMemberMap.Element,["src"]);
1348domMemberMap.HTMLButtonElement=extendArray(domMemberMap.Element,["accessKey","disabled","form","name","type","value","click"]);
1349domMemberMap.HTMLInputElement=extendArray(domMemberMap.Element,["type","value","checked","accept","accessKey","alt","controllers","defaultChecked","defaultValue","disabled","form","maxLength","name","readOnly","selectionEnd","selectionStart","size","src","textLength","useMap","click","select","setSelectionRange"]);
1350domMemberMap.HTMLFormElement=extendArray(domMemberMap.Element,["acceptCharset","action","author","elements","encoding","enctype","entry_id","length","method","name","post","target","text","url","reset","submit"]);
1351domMemberMap.HTMLBodyElement=extendArray(domMemberMap.Element,["aLink","background","bgColor","link","text","vLink"]);
1352domMemberMap.HTMLHtmlElement=extendArray(domMemberMap.Element,["version"]);
1353domMemberMap.Text=extendArray(domMemberMap.Node,["data","length","appendData","deleteData","insertData","replaceData","splitText","substringData"]);
1354domMemberMap.Attr=extendArray(domMemberMap.Node,["name","value","specified","ownerElement"]);
1355domMemberMap.Event=["type","target","currentTarget","originalTarget","explicitOriginalTarget","relatedTarget","rangeParent","rangeOffset","view","keyCode","charCode","screenX","screenY","clientX","clientY","layerX","layerY","pageX","pageY","detail","button","which","ctrlKey","shiftKey","altKey","metaKey","eventPhase","timeStamp","bubbles","cancelable","cancelBubble","isTrusted","isChar","getPreventDefault","initEvent","initMouseEvent","initKeyEvent","initUIEvent","preventBubble","preventCapture","preventDefault","stopPropagation"];
1356this.domConstantMap={ELEMENT_NODE:1,ATTRIBUTE_NODE:1,TEXT_NODE:1,CDATA_SECTION_NODE:1,ENTITY_REFERENCE_NODE:1,ENTITY_NODE:1,PROCESSING_INSTRUCTION_NODE:1,COMMENT_NODE:1,DOCUMENT_NODE:1,DOCUMENT_TYPE_NODE:1,DOCUMENT_FRAGMENT_NODE:1,NOTATION_NODE:1,DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:1,DOCUMENT_POSITION_FOLLOWING:1,DOCUMENT_POSITION_CONTAINS:1,DOCUMENT_POSITION_CONTAINED_BY:1,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:1,UNKNOWN_RULE:1,STYLE_RULE:1,CHARSET_RULE:1,IMPORT_RULE:1,MEDIA_RULE:1,FONT_FACE_RULE:1,PAGE_RULE:1,CAPTURING_PHASE:1,AT_TARGET:1,BUBBLING_PHASE:1,SCROLL_PAGE_UP:1,SCROLL_PAGE_DOWN:1,MOUSEUP:1,MOUSEDOWN:1,MOUSEOVER:1,MOUSEOUT:1,MOUSEMOVE:1,MOUSEDRAG:1,CLICK:1,DBLCLICK:1,KEYDOWN:1,KEYUP:1,KEYPRESS:1,DRAGDROP:1,FOCUS:1,BLUR:1,SELECT:1,CHANGE:1,RESET:1,SUBMIT:1,SCROLL:1,LOAD:1,UNLOAD:1,XFER_DONE:1,ABORT:1,ERROR:1,LOCATE:1,MOVE:1,RESIZE:1,FORWARD:1,HELP:1,BACK:1,TEXT:1,ALT_MASK:1,CONTROL_MASK:1,SHIFT_MASK:1,META_MASK:1,DOM_VK_TAB:1,DOM_VK_PAGE_UP:1,DOM_VK_PAGE_DOWN:1,DOM_VK_UP:1,DOM_VK_DOWN:1,DOM_VK_LEFT:1,DOM_VK_RIGHT:1,DOM_VK_CANCEL:1,DOM_VK_HELP:1,DOM_VK_BACK_SPACE:1,DOM_VK_CLEAR:1,DOM_VK_RETURN:1,DOM_VK_ENTER:1,DOM_VK_SHIFT:1,DOM_VK_CONTROL:1,DOM_VK_ALT:1,DOM_VK_PAUSE:1,DOM_VK_CAPS_LOCK:1,DOM_VK_ESCAPE:1,DOM_VK_SPACE:1,DOM_VK_END:1,DOM_VK_HOME:1,DOM_VK_PRINTSCREEN:1,DOM_VK_INSERT:1,DOM_VK_DELETE:1,DOM_VK_0:1,DOM_VK_1:1,DOM_VK_2:1,DOM_VK_3:1,DOM_VK_4:1,DOM_VK_5:1,DOM_VK_6:1,DOM_VK_7:1,DOM_VK_8:1,DOM_VK_9:1,DOM_VK_SEMICOLON:1,DOM_VK_EQUALS:1,DOM_VK_A:1,DOM_VK_B:1,DOM_VK_C:1,DOM_VK_D:1,DOM_VK_E:1,DOM_VK_F:1,DOM_VK_G:1,DOM_VK_H:1,DOM_VK_I:1,DOM_VK_J:1,DOM_VK_K:1,DOM_VK_L:1,DOM_VK_M:1,DOM_VK_N:1,DOM_VK_O:1,DOM_VK_P:1,DOM_VK_Q:1,DOM_VK_R:1,DOM_VK_S:1,DOM_VK_T:1,DOM_VK_U:1,DOM_VK_V:1,DOM_VK_W:1,DOM_VK_X:1,DOM_VK_Y:1,DOM_VK_Z:1,DOM_VK_CONTEXT_MENU:1,DOM_VK_NUMPAD0:1,DOM_VK_NUMPAD1:1,DOM_VK_NUMPAD2:1,DOM_VK_NUMPAD3:1,DOM_VK_NUMPAD4:1,DOM_VK_NUMPAD5:1,DOM_VK_NUMPAD6:1,DOM_VK_NUMPAD7:1,DOM_VK_NUMPAD8:1,DOM_VK_NUMPAD9:1,DOM_VK_MULTIPLY:1,DOM_VK_ADD:1,DOM_VK_SEPARATOR:1,DOM_VK_SUBTRACT:1,DOM_VK_DECIMAL:1,DOM_VK_DIVIDE:1,DOM_VK_F1:1,DOM_VK_F2:1,DOM_VK_F3:1,DOM_VK_F4:1,DOM_VK_F5:1,DOM_VK_F6:1,DOM_VK_F7:1,DOM_VK_F8:1,DOM_VK_F9:1,DOM_VK_F10:1,DOM_VK_F11:1,DOM_VK_F12:1,DOM_VK_F13:1,DOM_VK_F14:1,DOM_VK_F15:1,DOM_VK_F16:1,DOM_VK_F17:1,DOM_VK_F18:1,DOM_VK_F19:1,DOM_VK_F20:1,DOM_VK_F21:1,DOM_VK_F22:1,DOM_VK_F23:1,DOM_VK_F24:1,DOM_VK_NUM_LOCK:1,DOM_VK_SCROLL_LOCK:1,DOM_VK_COMMA:1,DOM_VK_PERIOD:1,DOM_VK_SLASH:1,DOM_VK_BACK_QUOTE:1,DOM_VK_OPEN_BRACKET:1,DOM_VK_BACK_SLASH:1,DOM_VK_CLOSE_BRACKET:1,DOM_VK_QUOTE:1,DOM_VK_META:1,SVG_ZOOMANDPAN_DISABLE:1,SVG_ZOOMANDPAN_MAGNIFY:1,SVG_ZOOMANDPAN_UNKNOWN:1};
1357this.cssInfo={background:["bgRepeat","bgAttachment","bgPosition","color","systemColor","none"],"background-attachment":["bgAttachment"],"background-color":["color","systemColor"],"background-image":["none"],"background-position":["bgPosition"],"background-repeat":["bgRepeat"],border:["borderStyle","thickness","color","systemColor","none"],"border-top":["borderStyle","borderCollapse","color","systemColor","none"],"border-right":["borderStyle","borderCollapse","color","systemColor","none"],"border-bottom":["borderStyle","borderCollapse","color","systemColor","none"],"border-left":["borderStyle","borderCollapse","color","systemColor","none"],"border-collapse":["borderCollapse"],"border-color":["color","systemColor"],"border-top-color":["color","systemColor"],"border-right-color":["color","systemColor"],"border-bottom-color":["color","systemColor"],"border-left-color":["color","systemColor"],"border-spacing":[],"border-style":["borderStyle"],"border-top-style":["borderStyle"],"border-right-style":["borderStyle"],"border-bottom-style":["borderStyle"],"border-left-style":["borderStyle"],"border-width":["thickness"],"border-top-width":["thickness"],"border-right-width":["thickness"],"border-bottom-width":["thickness"],"border-left-width":["thickness"],bottom:["auto"],"caption-side":["captionSide"],clear:["clear","none"],clip:["auto"],color:["color","systemColor"],content:["content"],"counter-increment":["none"],"counter-reset":["none"],cursor:["cursor","none"],direction:["direction"],display:["display","none"],"empty-cells":[],"float":["float","none"],font:["fontStyle","fontVariant","fontWeight","fontFamily"],"font-family":["fontFamily"],"font-size":["fontSize"],"font-size-adjust":[],"font-stretch":[],"font-style":["fontStyle"],"font-variant":["fontVariant"],"font-weight":["fontWeight"],height:["auto"],left:["auto"],"letter-spacing":[],"line-height":[],"list-style":["listStyleType","listStylePosition","none"],"list-style-image":["none"],"list-style-position":["listStylePosition"],"list-style-type":["listStyleType","none"],margin:[],"margin-top":[],"margin-right":[],"margin-bottom":[],"margin-left":[],"marker-offset":["auto"],"min-height":["none"],"max-height":["none"],"min-width":["none"],"max-width":["none"],outline:["borderStyle","color","systemColor","none"],"outline-color":["color","systemColor"],"outline-style":["borderStyle"],"outline-width":[],overflow:["overflow","auto"],"overflow-x":["overflow","auto"],"overflow-y":["overflow","auto"],padding:[],"padding-top":[],"padding-right":[],"padding-bottom":[],"padding-left":[],position:["position"],quotes:["none"],right:["auto"],"table-layout":["tableLayout","auto"],"text-align":["textAlign"],"text-decoration":["textDecoration","none"],"text-indent":[],"text-shadow":[],"text-transform":["textTransform","none"],top:["auto"],"unicode-bidi":[],"vertical-align":["verticalAlign"],"white-space":["whiteSpace"],width:["auto"],"word-spacing":[],"z-index":[],"-moz-appearance":["mozAppearance"],"-moz-border-radius":[],"-moz-border-radius-bottomleft":[],"-moz-border-radius-bottomright":[],"-moz-border-radius-topleft":[],"-moz-border-radius-topright":[],"-moz-border-top-colors":["color","systemColor"],"-moz-border-right-colors":["color","systemColor"],"-moz-border-bottom-colors":["color","systemColor"],"-moz-border-left-colors":["color","systemColor"],"-moz-box-align":["mozBoxAlign"],"-moz-box-direction":["mozBoxDirection"],"-moz-box-flex":[],"-moz-box-ordinal-group":[],"-moz-box-orient":["mozBoxOrient"],"-moz-box-pack":["mozBoxPack"],"-moz-box-sizing":["mozBoxSizing"],"-moz-opacity":[],"-moz-user-focus":["userFocus","none"],"-moz-user-input":["userInput"],"-moz-user-modify":[],"-moz-user-select":["userSelect","none"],"-moz-background-clip":[],"-moz-background-inline-policy":[],"-moz-background-origin":[],"-moz-binding":[],"-moz-column-count":[],"-moz-column-gap":[],"-moz-column-width":[],"-moz-image-region":[]};
1358this.inheritedStyleNames={"border-collapse":1,"border-spacing":1,"border-style":1,"caption-side":1,color:1,cursor:1,direction:1,"empty-cells":1,font:1,"font-family":1,"font-size-adjust":1,"font-size":1,"font-style":1,"font-variant":1,"font-weight":1,"letter-spacing":1,"line-height":1,"list-style":1,"list-style-image":1,"list-style-position":1,"list-style-type":1,quotes:1,"text-align":1,"text-decoration":1,"text-indent":1,"text-shadow":1,"text-transform":1,"white-space":1,"word-spacing":1};
1359this.cssKeywords={appearance:["button","button-small","checkbox","checkbox-container","checkbox-small","dialog","listbox","menuitem","menulist","menulist-button","menulist-textfield","menupopup","progressbar","radio","radio-container","radio-small","resizer","scrollbar","scrollbarbutton-down","scrollbarbutton-left","scrollbarbutton-right","scrollbarbutton-up","scrollbartrack-horizontal","scrollbartrack-vertical","separator","statusbar","tab","tab-left-edge","tabpanels","textfield","toolbar","toolbarbutton","toolbox","tooltip","treeheadercell","treeheadersortarrow","treeitem","treetwisty","treetwistyopen","treeview","window"],systemColor:["ActiveBorder","ActiveCaption","AppWorkspace","Background","ButtonFace","ButtonHighlight","ButtonShadow","ButtonText","CaptionText","GrayText","Highlight","HighlightText","InactiveBorder","InactiveCaption","InactiveCaptionText","InfoBackground","InfoText","Menu","MenuText","Scrollbar","ThreeDDarkShadow","ThreeDFace","ThreeDHighlight","ThreeDLightShadow","ThreeDShadow","Window","WindowFrame","WindowText","-moz-field","-moz-fieldtext","-moz-workspace","-moz-visitedhyperlinktext","-moz-use-text-color"],color:["AliceBlue","AntiqueWhite","Aqua","Aquamarine","Azure","Beige","Bisque","Black","BlanchedAlmond","Blue","BlueViolet","Brown","BurlyWood","CadetBlue","Chartreuse","Chocolate","Coral","CornflowerBlue","Cornsilk","Crimson","Cyan","DarkBlue","DarkCyan","DarkGoldenRod","DarkGray","DarkGreen","DarkKhaki","DarkMagenta","DarkOliveGreen","DarkOrange","DarkOrchid","DarkRed","DarkSalmon","DarkSeaGreen","DarkSlateBlue","DarkSlateGray","DarkTurquoise","DarkViolet","DeepPink","DarkSkyBlue","DimGray","DodgerBlue","Feldspar","FireBrick","FloralWhite","ForestGreen","Fuchsia","Gainsboro","GhostWhite","Gold","GoldenRod","Gray","Green","GreenYellow","HoneyDew","HotPink","IndianRed","Indigo","Ivory","Khaki","Lavender","LavenderBlush","LawnGreen","LemonChiffon","LightBlue","LightCoral","LightCyan","LightGoldenRodYellow","LightGrey","LightGreen","LightPink","LightSalmon","LightSeaGreen","LightSkyBlue","LightSlateBlue","LightSlateGray","LightSteelBlue","LightYellow","Lime","LimeGreen","Linen","Magenta","Maroon","MediumAquaMarine","MediumBlue","MediumOrchid","MediumPurple","MediumSeaGreen","MediumSlateBlue","MediumSpringGreen","MediumTurquoise","MediumVioletRed","MidnightBlue","MintCream","MistyRose","Moccasin","NavajoWhite","Navy","OldLace","Olive","OliveDrab","Orange","OrangeRed","Orchid","PaleGoldenRod","PaleGreen","PaleTurquoise","PaleVioletRed","PapayaWhip","PeachPuff","Peru","Pink","Plum","PowderBlue","Purple","Red","RosyBrown","RoyalBlue","SaddleBrown","Salmon","SandyBrown","SeaGreen","SeaShell","Sienna","Silver","SkyBlue","SlateBlue","SlateGray","Snow","SpringGreen","SteelBlue","Tan","Teal","Thistle","Tomato","Turquoise","Violet","VioletRed","Wheat","White","WhiteSmoke","Yellow","YellowGreen","transparent","invert"],auto:["auto"],none:["none"],captionSide:["top","bottom","left","right"],clear:["left","right","both"],cursor:["auto","cell","context-menu","crosshair","default","help","pointer","progress","move","e-resize","all-scroll","ne-resize","nw-resize","n-resize","se-resize","sw-resize","s-resize","w-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","col-resize","row-resize","text","vertical-text","wait","alias","copy","move","no-drop","not-allowed","-moz-alias","-moz-cell","-moz-copy","-moz-grab","-moz-grabbing","-moz-contextmenu","-moz-zoom-in","-moz-zoom-out","-moz-spinning"],direction:["ltr","rtl"],bgAttachment:["scroll","fixed"],bgPosition:["top","center","bottom","left","right"],bgRepeat:["repeat","repeat-x","repeat-y","no-repeat"],borderStyle:["hidden","dotted","dashed","solid","double","groove","ridge","inset","outset","-moz-bg-inset","-moz-bg-outset","-moz-bg-solid"],borderCollapse:["collapse","separate"],overflow:["visible","hidden","scroll","-moz-scrollbars-horizontal","-moz-scrollbars-none","-moz-scrollbars-vertical"],listStyleType:["disc","circle","square","decimal","decimal-leading-zero","lower-roman","upper-roman","lower-greek","lower-alpha","lower-latin","upper-alpha","upper-latin","hebrew","armenian","georgian","cjk-ideographic","hiragana","katakana","hiragana-iroha","katakana-iroha","inherit"],listStylePosition:["inside","outside"],content:["open-quote","close-quote","no-open-quote","no-close-quote","inherit"],fontStyle:["normal","italic","oblique","inherit"],fontVariant:["normal","small-caps","inherit"],fontWeight:["normal","bold","bolder","lighter","inherit"],fontSize:["xx-small","x-small","small","medium","large","x-large","xx-large","smaller","larger"],fontFamily:["Arial","Comic Sans MS","Georgia","Tahoma","Verdana","Times New Roman","Trebuchet MS","Lucida Grande","Helvetica","serif","sans-serif","cursive","fantasy","monospace","caption","icon","menu","message-box","small-caption","status-bar","inherit"],display:["block","inline","inline-block","list-item","marker","run-in","compact","table","inline-table","table-row-group","table-column","table-column-group","table-header-group","table-footer-group","table-row","table-cell","table-caption","-moz-box","-moz-compact","-moz-deck","-moz-grid","-moz-grid-group","-moz-grid-line","-moz-groupbox","-moz-inline-block","-moz-inline-box","-moz-inline-grid","-moz-inline-stack","-moz-inline-table","-moz-marker","-moz-popup","-moz-runin","-moz-stack"],position:["static","relative","absolute","fixed","inherit"],"float":["left","right"],textAlign:["left","right","center","justify"],tableLayout:["fixed"],textDecoration:["underline","overline","line-through","blink"],textTransform:["capitalize","lowercase","uppercase","inherit"],unicodeBidi:["normal","embed","bidi-override"],whiteSpace:["normal","pre","nowrap"],verticalAlign:["baseline","sub","super","top","text-top","middle","bottom","text-bottom","inherit"],thickness:["thin","medium","thick"],userFocus:["ignore","normal"],userInput:["disabled","enabled"],userSelect:["normal"],mozBoxSizing:["content-box","padding-box","border-box"],mozBoxAlign:["start","center","end","baseline","stretch"],mozBoxDirection:["normal","reverse"],mozBoxOrient:["horizontal","vertical"],mozBoxPack:["start","center","end"]};
1360this.nonEditableTags={HTML:1,HEAD:1,html:1,head:1};
1361this.innerEditableTags={BODY:1,body:1};
1362this.selfClosingTags={meta:1,link:1,area:1,base:1,col:1,input:1,img:1,br:1,hr:1,param:1,embed:1};
1363var invisibleTags=this.invisibleTags={HTML:1,HEAD:1,TITLE:1,META:1,LINK:1,STYLE:1,SCRIPT:1,NOSCRIPT:1,BR:1,PARAM:1,COL:1,html:1,head:1,title:1,meta:1,link:1,style:1,script:1,noscript:1,br:1,param:1,col:1};
1364if(typeof KeyEvent=="undefined"){this.KeyEvent={DOM_VK_CANCEL:3,DOM_VK_HELP:6,DOM_VK_BACK_SPACE:8,DOM_VK_TAB:9,DOM_VK_CLEAR:12,DOM_VK_RETURN:13,DOM_VK_ENTER:14,DOM_VK_SHIFT:16,DOM_VK_CONTROL:17,DOM_VK_ALT:18,DOM_VK_PAUSE:19,DOM_VK_CAPS_LOCK:20,DOM_VK_ESCAPE:27,DOM_VK_SPACE:32,DOM_VK_PAGE_UP:33,DOM_VK_PAGE_DOWN:34,DOM_VK_END:35,DOM_VK_HOME:36,DOM_VK_LEFT:37,DOM_VK_UP:38,DOM_VK_RIGHT:39,DOM_VK_DOWN:40,DOM_VK_PRINTSCREEN:44,DOM_VK_INSERT:45,DOM_VK_DELETE:46,DOM_VK_0:48,DOM_VK_1:49,DOM_VK_2:50,DOM_VK_3:51,DOM_VK_4:52,DOM_VK_5:53,DOM_VK_6:54,DOM_VK_7:55,DOM_VK_8:56,DOM_VK_9:57,DOM_VK_SEMICOLON:59,DOM_VK_EQUALS:61,DOM_VK_A:65,DOM_VK_B:66,DOM_VK_C:67,DOM_VK_D:68,DOM_VK_E:69,DOM_VK_F:70,DOM_VK_G:71,DOM_VK_H:72,DOM_VK_I:73,DOM_VK_J:74,DOM_VK_K:75,DOM_VK_L:76,DOM_VK_M:77,DOM_VK_N:78,DOM_VK_O:79,DOM_VK_P:80,DOM_VK_Q:81,DOM_VK_R:82,DOM_VK_S:83,DOM_VK_T:84,DOM_VK_U:85,DOM_VK_V:86,DOM_VK_W:87,DOM_VK_X:88,DOM_VK_Y:89,DOM_VK_Z:90,DOM_VK_CONTEXT_MENU:93,DOM_VK_NUMPAD0:96,DOM_VK_NUMPAD1:97,DOM_VK_NUMPAD2:98,DOM_VK_NUMPAD3:99,DOM_VK_NUMPAD4:100,DOM_VK_NUMPAD5:101,DOM_VK_NUMPAD6:102,DOM_VK_NUMPAD7:103,DOM_VK_NUMPAD8:104,DOM_VK_NUMPAD9:105,DOM_VK_MULTIPLY:106,DOM_VK_ADD:107,DOM_VK_SEPARATOR:108,DOM_VK_SUBTRACT:109,DOM_VK_DECIMAL:110,DOM_VK_DIVIDE:111,DOM_VK_F1:112,DOM_VK_F2:113,DOM_VK_F3:114,DOM_VK_F4:115,DOM_VK_F5:116,DOM_VK_F6:117,DOM_VK_F7:118,DOM_VK_F8:119,DOM_VK_F9:120,DOM_VK_F10:121,DOM_VK_F11:122,DOM_VK_F12:123,DOM_VK_F13:124,DOM_VK_F14:125,DOM_VK_F15:126,DOM_VK_F16:127,DOM_VK_F17:128,DOM_VK_F18:129,DOM_VK_F19:130,DOM_VK_F20:131,DOM_VK_F21:132,DOM_VK_F22:133,DOM_VK_F23:134,DOM_VK_F24:135,DOM_VK_NUM_LOCK:144,DOM_VK_SCROLL_LOCK:145,DOM_VK_COMMA:188,DOM_VK_PERIOD:190,DOM_VK_SLASH:191,DOM_VK_BACK_QUOTE:192,DOM_VK_OPEN_BRACKET:219,DOM_VK_BACK_SLASH:220,DOM_VK_CLOSE_BRACKET:221,DOM_VK_QUOTE:222,DOM_VK_META:224}
1365}this.Ajax={requests:[],transport:null,states:["Uninitialized","Loading","Loaded","Interactive","Complete"],initialize:function(){this.transport=FBL.getNativeXHRObject()
1366},getXHRObject:function(){var xhrObj=false;
1367try{xhrObj=new XMLHttpRequest()
1368}catch(e){var progid=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
1369for(var i=0;
1370i<progid.length;
1371++i){try{xhrObj=new ActiveXObject(progid[i])
1372}catch(e){continue
1373}break
1374}}finally{return xhrObj
1375}},request:function(options){var o=FBL.extend({type:"get",async:true,dataType:"text",contentType:"application/x-www-form-urlencoded"},options||{});
1376this.requests.push(o);
1377var s=this.getState();
1378if(s=="Uninitialized"||s=="Complete"||s=="Loaded"){this.sendRequest()
1379}},serialize:function(data){var r=[""],rl=0;
1380if(data){if(typeof data=="string"){r[rl++]=data
1381}else{if(data.innerHTML&&data.elements){for(var i=0,el,l=(el=data.elements).length;
1382i<l;
1383i++){if(el[i].name){r[rl++]=encodeURIComponent(el[i].name);
1384r[rl++]="=";
1385r[rl++]=encodeURIComponent(el[i].value);
1386r[rl++]="&"
1387}}}else{for(var param in data){r[rl++]=encodeURIComponent(param);
1388r[rl++]="=";
1389r[rl++]=encodeURIComponent(data[param]);
1390r[rl++]="&"
1391}}}}return r.join("").replace(/&$/,"")
1392},sendRequest:function(){var t=FBL.Ajax.transport,r=FBL.Ajax.requests.shift(),data;
1393t.open(r.type,r.url,r.async);
1394t.setRequestHeader("X-Requested-With","XMLHttpRequest");
1395if(data=FBL.Ajax.serialize(r.data)){t.setRequestHeader("Content-Type",r.contentType)
1396}t.onreadystatechange=function(){FBL.Ajax.onStateChange(r)
1397};
1398t.send(data)
1399},onStateChange:function(options){var fn,o=options,t=this.transport;
1400var state=this.getState(t);
1401if(fn=o["on"+state]){fn(this.getResponse(o),o)
1402}if(state=="Complete"){var success=t.status==200,response=this.getResponse(o);
1403if(fn=o.onUpdate){fn(response,o)
1404}if(fn=o["on"+(success?"Success":"Failure")]){fn(response,o)
1405}t.onreadystatechange=FBL.emptyFn;
1406if(this.requests.length>0){setTimeout(this.sendRequest,10)
1407}}},getResponse:function(options){var t=this.transport,type=options.dataType;
1408if(t.status!=200){return t.statusText
1409}else{if(type=="text"){return t.responseText
1410}else{if(type=="html"){return t.responseText
1411}else{if(type=="xml"){return t.responseXML
1412}else{if(type=="json"){return eval("("+t.responseText+")")
1413}}}}}},getState:function(){return this.states[this.transport.readyState]
1414}};
1415this.createCookie=function(name,value,days){if("cookie" in document){if(days){var date=new Date();
1416date.setTime(date.getTime()+(days*24*60*60*1000));
1417var expires="; expires="+date.toGMTString()
1418}else{var expires=""
1419}document.cookie=name+"="+value+expires+"; path=/"
1420}};
1421this.readCookie=function(name){if("cookie" in document){var nameEQ=name+"=";
1422var ca=document.cookie.split(";");
1423for(var i=0;
1424i<ca.length;
1425i++){var c=ca[i];
1426while(c.charAt(0)==" "){c=c.substring(1,c.length)
1427}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length)
1428}}}return null
1429};
1430this.removeCookie=function(name){this.createCookie(name,"",-1)
1431};
1432var fixIE6BackgroundImageCache=function(doc){doc=doc||document;
1433try{doc.execCommand("BackgroundImageCache",false,true)
1434}catch(E){}};
1435var resetStyle="margin:0; padding:0; border:0; position:absolute; overflow:hidden; display:block;";
1436var calculatePixelsPerInch=function calculatePixelsPerInch(doc,body){var inch=FBL.createGlobalElement("div");
1437inch.style.cssText=resetStyle+"width:1in; height:1in; position:absolute; top:-1234px; left:-1234px;";
1438body.appendChild(inch);
1439FBL.pixelsPerInch={x:inch.offsetWidth,y:inch.offsetHeight};
1440body.removeChild(inch)
1441};
1442this.SourceLink=function(url,line,type,object,instance){this.href=url;
1443this.instance=instance;
1444this.line=line;
1445this.type=type;
1446this.object=object
1447};
1448this.SourceLink.prototype={toString:function(){return this.href
1449},toJSON:function(){return'{"href":"'+this.href+'", '+(this.line?('"line":'+this.line+","):"")+(this.type?(' "type":"'+this.type+'",'):"")+"}"
1450}};
1451this.SourceText=function(lines,owner){this.lines=lines;
1452this.owner=owner
1453};
1454this.SourceText.getLineAsHTML=function(lineNo){return escapeForSourceLine(this.lines[lineNo-1])
1455}
1456}).apply(FBL);
1457FBL.ns(function(){with(FBL){var oSTR={NoMembersWarning:"There are no properties to show for this object.",EmptyStyleSheet:"There are no rules in this stylesheet.",EmptyElementCSS:"This element has no style rules.",AccessRestricted:"Access to restricted URI denied.","net.label.Parameters":"Parameters","net.label.Source":"Source",URLParameters:"Params",EditStyle:"Edit Element Style...",NewRule:"New Rule...",NewProp:"New Property...",EditProp:'Edit "%s"',DeleteProp:'Delete "%s"',DisableProp:'Disable "%s"'};
1458FBL.$STR=function(name){return oSTR.hasOwnProperty(name)?oSTR[name]:name
1459};
1460FBL.$STRF=function(name,args){if(!oSTR.hasOwnProperty(name)){return name
1461}var format=oSTR[name];
1462var objIndex=0;
1463var parts=parseFormat(format);
1464var trialIndex=objIndex;
1465var objects=args;
1466for(var i=0;
1467i<parts.length;
1468i++){var part=parts[i];
1469if(part&&typeof(part)=="object"){if(++trialIndex>objects.length){format="";
1470objIndex=-1;
1471parts.length=0;
1472break
1473}}}var result=[];
1474for(var i=0;
1475i<parts.length;
1476++i){var part=parts[i];
1477if(part&&typeof(part)=="object"){result.push(""+args.shift())
1478}else{result.push(part)
1479}}return result.join("")
1480};
1481var parseFormat=function parseFormat(format){var parts=[];
1482if(format.length<=0){return parts
1483}var reg=/((^%|.%)(\d+)?(\.)([a-zA-Z]))|((^%|.%)([a-zA-Z]))/;
1484for(var m=reg.exec(format);
1485m;
1486m=reg.exec(format)){if(m[0].substr(0,2)=="%%"){parts.push(format.substr(0,m.index));
1487parts.push(m[0].substr(1))
1488}else{var type=m[8]?m[8]:m[5];
1489var precision=m[3]?parseInt(m[3]):(m[4]=="."?-1:0);
1490var rep=null;
1491switch(type){case"s":rep=FirebugReps.Text;
1492break;
1493case"f":case"i":case"d":rep=FirebugReps.Number;
1494break;
1495case"o":rep=null;
1496break
1497}parts.push(format.substr(0,m[0][0]=="%"?m.index:m.index+1));
1498parts.push({rep:rep,precision:precision,type:("%"+type)})
1499}format=format.substr(m.index+m[0].length)
1500}parts.push(format);
1501return parts
1502}
1503}});
1504FBL.ns(function(){with(FBL){var modules=[];
1505var panelTypes=[];
1506var panelTypeMap={};
1507var reps=[];
1508var parentPanelMap={};
1509FBL.Firebug={version:"Firebug Lite 1.4.0",revision:"$Revision: 11967 $",modules:modules,panelTypes:panelTypes,panelTypeMap:panelTypeMap,reps:reps,initialize:function(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.initialize","initializing application")
1510}Firebug.browser=new Context(Env.browser);
1511Firebug.context=Firebug.browser;
1512Firebug.loadPrefs();
1513Firebug.context.persistedState.isOpen=false;
1514cacheDocument();
1515if(Firebug.Inspector&&Firebug.Inspector.create){Firebug.Inspector.create()
1516}if(FBL.CssAnalyzer&&FBL.CssAnalyzer.processAllStyleSheets){FBL.CssAnalyzer.processAllStyleSheets(Firebug.browser.document)
1517}FirebugChrome.initialize();
1518dispatch(modules,"initialize",[]);
1519if(Firebug.disableResourceFetching){Firebug.Console.logFormatted(['Some Firebug Lite features are not working because resource fetching is disabled. To enabled it set the Firebug Lite option "disableResourceFetching" to "false". More info at http://getfirebug.com/firebuglite#Options'],Firebug.context,"warn")
1520}if(Env.onLoad){var onLoad=Env.onLoad;
1521delete Env.onLoad;
1522setTimeout(onLoad,200)
1523}},shutdown:function(){if(Firebug.saveCookies){Firebug.savePrefs()
1524}if(Firebug.Inspector){Firebug.Inspector.destroy()
1525}dispatch(modules,"shutdown",[]);
1526var chromeMap=FirebugChrome.chromeMap;
1527for(var name in chromeMap){if(chromeMap.hasOwnProperty(name)){try{chromeMap[name].destroy()
1528}catch(E){if(FBTrace.DBG_ERRORS){FBTrace.sysout("chrome.destroy() failed to: "+name)
1529}}}}Firebug.Lite.Cache.Element.clear();
1530Firebug.Lite.Cache.StyleSheet.clear();
1531Firebug.browser=null;
1532Firebug.context=null
1533},registerModule:function(){modules.push.apply(modules,arguments);
1534if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.registerModule")
1535}},registerPanel:function(){panelTypes.push.apply(panelTypes,arguments);
1536for(var i=0,panelType;
1537panelType=arguments[i];
1538++i){panelTypeMap[panelType.prototype.name]=arguments[i];
1539if(panelType.prototype.parentPanel){parentPanelMap[panelType.prototype.parentPanel]=1
1540}}if(FBTrace.DBG_INITIALIZE){for(var i=0;
1541i<arguments.length;
1542++i){FBTrace.sysout("Firebug.registerPanel",arguments[i].prototype.name)
1543}}},registerRep:function(){reps.push.apply(reps,arguments)
1544},unregisterRep:function(){for(var i=0;
1545i<arguments.length;
1546++i){remove(reps,arguments[i])
1547}},setDefaultReps:function(funcRep,rep){FBL.defaultRep=rep;
1548FBL.defaultFuncRep=funcRep
1549},getRep:function(object){var type=typeof object;
1550if(isIE&&isFunction(object)){type="function"
1551}for(var i=0;
1552i<reps.length;
1553++i){var rep=reps[i];
1554try{if(rep.supportsObject(object,type)){if(FBTrace.DBG_DOM){FBTrace.sysout("getRep type: "+type+" object: "+object,rep)
1555}return rep
1556}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("firebug.getRep FAILS: ",exc.message||exc);
1557FBTrace.sysout("firebug.getRep reps["+i+"/"+reps.length+"]: Rep="+reps[i].className)
1558}}}return(type=="function")?defaultFuncRep:defaultRep
1559},getRepObject:function(node){var target=null;
1560for(var child=node;
1561child;
1562child=child.parentNode){if(hasClass(child,"repTarget")){target=child
1563}if(child.repObject){if(!target&&hasClass(child,"repIgnore")){break
1564}else{return child.repObject
1565}}}},getRepNode:function(node){for(var child=node;
1566child;
1567child=child.parentNode){if(child.repObject){return child
1568}}},getElementByRepObject:function(element,object){for(var child=element.firstChild;
1569child;
1570child=child.nextSibling){if(child.repObject==object){return child
1571}}},getPref:function(name){return Firebug[name]
1572},setPref:function(name,value){Firebug[name]=value;
1573Firebug.savePrefs()
1574},setPrefs:function(prefs){for(var name in prefs){if(prefs.hasOwnProperty(name)){Firebug[name]=prefs[name]
1575}}Firebug.savePrefs()
1576},restorePrefs:function(){var Options=Env.DefaultOptions;
1577for(var name in Options){Firebug[name]=Options[name]
1578}},loadPrefs:function(){this.restorePrefs();
1579var prefs=Store.get("FirebugLite")||{};
1580var options=prefs.options;
1581var persistedState=prefs.persistedState||FBL.defaultPersistedState;
1582for(var name in options){if(options.hasOwnProperty(name)){Firebug[name]=options[name]
1583}}if(Firebug.context&&persistedState){Firebug.context.persistedState=persistedState
1584}},savePrefs:function(){var prefs={options:{}};
1585var EnvOptions=Env.Options;
1586var options=prefs.options;
1587for(var name in EnvOptions){if(EnvOptions.hasOwnProperty(name)){options[name]=Firebug[name]
1588}}var persistedState=Firebug.context.persistedState;
1589if(!persistedState){persistedState=Firebug.context.persistedState=FBL.defaultPersistedState
1590}prefs.persistedState=persistedState;
1591Store.set("FirebugLite",prefs)
1592},erasePrefs:function(){Store.remove("FirebugLite");
1593this.restorePrefs()
1594}};
1595Firebug.restorePrefs();
1596window.Firebug=FBL.Firebug;
1597if(!Env.Options.enablePersistent||Env.Options.enablePersistent&&Env.isChromeContext||Env.isDebugMode){Env.browser.window.Firebug=FBL.Firebug
1598}FBL.cacheDocument=function cacheDocument(){var ElementCache=Firebug.Lite.Cache.Element;
1599var els=Firebug.browser.document.getElementsByTagName("*");
1600for(var i=0,l=els.length,el;
1601i<l;
1602i++){el=els[i];
1603ElementCache(el)
1604}};
1605Firebug.Listener=function(){this.fbListeners=null
1606};
1607Firebug.Listener.prototype={addListener:function(listener){if(!this.fbListeners){this.fbListeners=[]
1608}this.fbListeners.push(listener)
1609},removeListener:function(listener){remove(this.fbListeners,listener)
1610}};
1611Firebug.Module=extend(new Firebug.Listener(),{initialize:function(){},shutdown:function(){},initContext:function(context){},reattachContext:function(browser,context){},destroyContext:function(context,persistedState){},showContext:function(browser,context){},loadedContext:function(context){},showPanel:function(browser,panel){},showSidePanel:function(browser,panel){},updateOption:function(name,value){},getObjectByURL:function(context,url){}});
1612Firebug.Panel={name:"HelloWorld",title:"Hello World!",parentPanel:null,options:{hasCommandLine:false,hasStatusBar:false,hasToolButtons:false,isPreRendered:false,innerHTMLSync:false},tabNode:null,panelNode:null,sidePanelNode:null,statusBarNode:null,toolButtonsNode:null,panelBarNode:null,sidePanelBarBoxNode:null,sidePanelBarNode:null,sidePanelBar:null,searchable:false,editable:true,order:2147483647,statusSeparator:"<",create:function(context,doc){this.hasSidePanel=parentPanelMap.hasOwnProperty(this.name);
1613this.panelBarNode=$("fbPanelBar1");
1614this.sidePanelBarBoxNode=$("fbPanelBar2");
1615if(this.hasSidePanel){this.sidePanelBar=extend({},PanelBar);
1616this.sidePanelBar.create(this)
1617}var options=this.options=extend(Firebug.Panel.options,this.options);
1618var panelId="fb"+this.name;
1619if(options.isPreRendered){this.panelNode=$(panelId);
1620this.tabNode=$(panelId+"Tab");
1621this.tabNode.style.display="block";
1622if(options.hasToolButtons){this.toolButtonsNode=$(panelId+"Buttons")
1623}if(options.hasStatusBar){this.statusBarBox=$("fbStatusBarBox");
1624this.statusBarNode=$(panelId+"StatusBar")
1625}}else{var containerSufix=this.parentPanel?"2":"1";
1626var panelNode=this.panelNode=createElement("div",{id:panelId,className:"fbPanel"});
1627$("fbPanel"+containerSufix).appendChild(panelNode);
1628var tabHTML='<span class="fbTabL"></span><span class="fbTabText">'+this.title+'</span><span class="fbTabR"></span>';
1629var tabNode=this.tabNode=createElement("a",{id:panelId+"Tab",className:"fbTab fbHover",innerHTML:tabHTML});
1630if(isIE6){tabNode.href="javascript:void(0)"
1631}var panelBarNode=this.parentPanel?Firebug.chrome.getPanel(this.parentPanel).sidePanelBarNode:this.panelBarNode;
1632panelBarNode.appendChild(tabNode);
1633tabNode.style.display="block";
1634if(options.hasToolButtons){this.toolButtonsNode=createElement("span",{id:panelId+"Buttons",className:"fbToolbarButtons"});
1635$("fbToolbarButtons").appendChild(this.toolButtonsNode)
1636}if(options.hasStatusBar){this.statusBarBox=$("fbStatusBarBox");
1637this.statusBarNode=createElement("span",{id:panelId+"StatusBar",className:"fbToolbarButtons fbStatusBar"});
1638this.statusBarBox.appendChild(this.statusBarNode)
1639}}this.containerNode=this.panelNode.parentNode;
1640if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.Panel.create",this.name)
1641}this.onContextMenu=bind(this.onContextMenu,this)
1642},destroy:function(state){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.Panel.destroy",this.name)
1643}if(this.hasSidePanel){this.sidePanelBar.destroy();
1644this.sidePanelBar=null
1645}this.options=null;
1646this.name=null;
1647this.parentPanel=null;
1648this.tabNode=null;
1649this.panelNode=null;
1650this.containerNode=null;
1651this.toolButtonsNode=null;
1652this.statusBarBox=null;
1653this.statusBarNode=null
1654},initialize:function(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.Panel.initialize",this.name)
1655}if(this.hasSidePanel){this.sidePanelBar.initialize()
1656}var options=this.options=extend(Firebug.Panel.options,this.options);
1657var panelId="fb"+this.name;
1658this.panelNode=$(panelId);
1659this.tabNode=$(panelId+"Tab");
1660this.tabNode.style.display="block";
1661if(options.hasStatusBar){this.statusBarBox=$("fbStatusBarBox");
1662this.statusBarNode=$(panelId+"StatusBar")
1663}if(options.hasToolButtons){this.toolButtonsNode=$(panelId+"Buttons")
1664}this.containerNode=this.panelNode.parentNode;
1665this.containerNode.scrollTop=this.lastScrollTop;
1666addEvent(this.containerNode,"contextmenu",this.onContextMenu);
1667Firebug.chrome.currentPanel=Firebug.chrome.selectedPanel&&Firebug.chrome.selectedPanel.sidePanelBar?Firebug.chrome.selectedPanel.sidePanelBar.selectedPanel:Firebug.chrome.selectedPanel;
1668Firebug.showInfoTips=true;
1669if(Firebug.InfoTip){Firebug.InfoTip.initializeBrowser(Firebug.chrome)
1670}},shutdown:function(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.Panel.shutdown",this.name)
1671}if(Firebug.InfoTip){Firebug.InfoTip.uninitializeBrowser(Firebug.chrome)
1672}if(Firebug.chrome.largeCommandLineVisible){Firebug.chrome.hideLargeCommandLine()
1673}if(this.hasSidePanel){}this.lastScrollTop=this.containerNode.scrollTop;
1674removeEvent(this.containerNode,"contextmenu",this.onContextMenu)
1675},detach:function(oldChrome,newChrome){if(oldChrome&&oldChrome.selectedPanel&&oldChrome.selectedPanel.name==this.name){this.lastScrollTop=oldChrome.selectedPanel.containerNode.scrollTop
1676}},reattach:function(doc){if(this.options.innerHTMLSync){this.synchronizeUI()
1677}},synchronizeUI:function(){this.containerNode.scrollTop=this.lastScrollTop||0
1678},show:function(state){var options=this.options;
1679if(options.hasStatusBar){this.statusBarBox.style.display="inline";
1680this.statusBarNode.style.display="inline"
1681}if(options.hasToolButtons){this.toolButtonsNode.style.display="inline"
1682}this.panelNode.style.display="block";
1683this.visible=true;
1684if(!this.parentPanel){Firebug.chrome.layout(this)
1685}},hide:function(state){var options=this.options;
1686if(options.hasStatusBar){this.statusBarBox.style.display="none";
1687this.statusBarNode.style.display="none"
1688}if(options.hasToolButtons){this.toolButtonsNode.style.display="none"
1689}this.panelNode.style.display="none";
1690this.visible=false
1691},watchWindow:function(win){},unwatchWindow:function(win){},updateOption:function(name,value){},showToolbarButtons:function(buttonsId,show){try{if(!this.context.browser){if(FBTrace.DBG_ERRORS){FBTrace.sysout("firebug.Panel showToolbarButtons this.context has no browser, this:",this)
1692}return
1693}var buttons=this.context.browser.chrome.$(buttonsId);
1694if(buttons){collapse(buttons,show?"false":"true")
1695}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.dumpProperties("firebug.Panel showToolbarButtons FAILS",exc);
1696if(!this.context.browser){FBTrace.dumpStack("firebug.Panel showToolbarButtons no browser")
1697}}}},supportsObject:function(object){return 0
1698},hasObject:function(object){return false
1699},select:function(object,forceUpdate){if(!object){object=this.getDefaultSelection(this.context)
1700}if(FBTrace.DBG_PANELS){FBTrace.sysout("firebug.select "+this.name+" forceUpdate: "+forceUpdate+" "+object+((object==this.selection)?"==":"!=")+this.selection)
1701}if(forceUpdate||object!=this.selection){this.selection=object;
1702this.updateSelection(object)
1703}},updateSelection:function(object){},markChange:function(skipSelf){if(this.dependents){if(skipSelf){for(var i=0;
1704i<this.dependents.length;
1705++i){var panelName=this.dependents[i];
1706if(panelName!=this.name){this.context.invalidatePanels(panelName)
1707}}}else{this.context.invalidatePanels.apply(this.context,this.dependents)
1708}}},startInspecting:function(){},stopInspecting:function(object,cancelled){},search:function(text,reverse){},getSearchOptionsMenuItems:function(){return[Firebug.Search.searchOptionMenu("search.Case Sensitive","searchCaseSensitive")]
1709},navigateToNextDocument:function(match,reverse){var self=this;
1710function compare(a,b){var locA=self.getObjectDescription(a);
1711var locB=self.getObjectDescription(b);
1712if(locA.path>locB.path){return 1
1713}if(locA.path<locB.path){return -1
1714}if(locA.name>locB.name){return 1
1715}if(locA.name<locB.name){return -1
1716}return 0
1717}var allLocs=this.getLocationList().sort(compare);
1718for(var curPos=0;
1719curPos<allLocs.length&&allLocs[curPos]!=this.location;
1720curPos++){}function transformIndex(index){if(reverse){var intermediate=curPos-index-1;
1721return(intermediate<0?allLocs.length:0)+intermediate
1722}else{return(curPos+index+1)%allLocs.length
1723}}for(var next=0;
1724next<allLocs.length-1;
1725next++){var object=allLocs[transformIndex(next)];
1726if(match(object)){this.navigate(object);
1727return object
1728}}},getOptionsMenuItems:function(){return null
1729},getContextMenuItems:function(object,target){return[]
1730},getBreakOnMenuItems:function(){return[]
1731},getEditor:function(target,value){},getDefaultSelection:function(){return null
1732},browseObject:function(object){},getPopupObject:function(target){return Firebug.getRepObject(target)
1733},getTooltipObject:function(target){return Firebug.getRepObject(target)
1734},showInfoTip:function(infoTip,x,y){},getObjectPath:function(object){return null
1735},getLocationList:function(){return null
1736},getDefaultLocation:function(){return null
1737},getObjectLocation:function(object){return""
1738},getObjectDescription:function(object){var url=this.getObjectLocation(object);
1739return FBL.splitURLBase(url)
1740},highlight:function(show){var tab=this.getTab();
1741if(!tab){return
1742}if(show){tab.setAttribute("highlight","true")
1743}else{tab.removeAttribute("highlight")
1744}},getTab:function(){var chrome=Firebug.chrome;
1745var tab=chrome.$("fbPanelBar2").getTab(this.name);
1746if(!tab){tab=chrome.$("fbPanelBar1").getTab(this.name)
1747}return tab
1748},breakOnNext:function(armed){},shouldBreakOnNext:function(){return false
1749},getBreakOnNextTooltip:function(enabled){return null
1750},onContextMenu:function(event){if(!this.getContextMenuItems){return
1751}cancelEvent(event,true);
1752var target=event.target||event.srcElement;
1753var menu=this.getContextMenuItems(this.selection,target);
1754if(!menu){return
1755}var contextMenu=new Menu({id:"fbPanelContextMenu",items:menu});
1756contextMenu.show(event.clientX,event.clientY);
1757return true
1758}};
1759Firebug.MeasureBox={startMeasuring:function(target){if(!this.measureBox){this.measureBox=target.ownerDocument.createElement("span");
1760this.measureBox.className="measureBox"
1761}copyTextStyles(target,this.measureBox);
1762target.ownerDocument.body.appendChild(this.measureBox)
1763},getMeasuringElement:function(){return this.measureBox
1764},measureText:function(value){this.measureBox.innerHTML=value?escapeForSourceLine(value):"m";
1765return{width:this.measureBox.offsetWidth,height:this.measureBox.offsetHeight-1}
1766},measureInputText:function(value){value=value?escapeForTextNode(value):"m";
1767if(!Firebug.showTextNodesWithWhitespace){value=value.replace(/\t/g,"mmmmmm").replace(/\ /g,"m")
1768}this.measureBox.innerHTML=value;
1769return{width:this.measureBox.offsetWidth,height:this.measureBox.offsetHeight-1}
1770},getBox:function(target){var style=this.measureBox.ownerDocument.defaultView.getComputedStyle(this.measureBox,"");
1771var box=getBoxFromStyles(style,this.measureBox);
1772return box
1773},stopMeasuring:function(){this.measureBox.parentNode.removeChild(this.measureBox)
1774}};
1775if(FBL.domplate){Firebug.Rep=domplate({className:"",inspectable:true,supportsObject:function(object,type){return false
1776},inspectObject:function(object,context){Firebug.chrome.select(object)
1777},browseObject:function(object,context){},persistObject:function(object,context){},getRealObject:function(object,context){return object
1778},getTitle:function(object){var label=safeToString(object);
1779var re=/\[object (.*?)\]/;
1780var m=re.exec(label);
1781if(m){return m[1]
1782}else{if(isIE&&(label=="[object]"||typeof object=="object"&&typeof label=="undefined")){return"Object"
1783}else{return label
1784}}},getTooltip:function(object){return null
1785},getContextMenuItems:function(object,target,context){return[]
1786},STR:function(name){return $STR(name)
1787},cropString:function(text){return cropString(text)
1788},cropMultipleLines:function(text,limit){return cropMultipleLines(text,limit)
1789},toLowerCase:function(text){return text?text.toLowerCase():text
1790},plural:function(n){return n==1?"":"s"
1791}})
1792}}});
1793FBL.ns(function(){with(FBL){FBL.Controller={controllers:null,controllerContext:null,initialize:function(context){this.controllers=[];
1794this.controllerContext=context||Firebug.chrome
1795},shutdown:function(){this.removeControllers()
1796},addController:function(){for(var i=0,arg;
1797arg=arguments[i];
1798i++){if(typeof arg[0]=="string"){arg[0]=$$(arg[0],this.controllerContext)
1799}var handler=arg[2];
1800arg[2]=bind(handler,this);
1801arg[3]=handler;
1802this.controllers.push(arg);
1803addEvent.apply(this,arg)
1804}},removeController:function(){for(var i=0,arg;
1805arg=arguments[i];
1806i++){for(var j=0,c;
1807c=this.controllers[j];
1808j++){if(arg[0]==c[0]&&arg[1]==c[1]&&arg[2]==c[3]){removeEvent.apply(this,c)
1809}}}},removeControllers:function(){for(var i=0,c;
1810c=this.controllers[i];
1811i++){removeEvent.apply(this,c)
1812}}};
1813FBL.PanelBar={panelMap:null,selectedPanel:null,parentPanelName:null,create:function(ownerPanel){this.panelMap={};
1814this.ownerPanel=ownerPanel;
1815if(ownerPanel){ownerPanel.sidePanelBarNode=createElement("span");
1816ownerPanel.sidePanelBarNode.style.display="none";
1817ownerPanel.sidePanelBarBoxNode.appendChild(ownerPanel.sidePanelBarNode)
1818}var panels=Firebug.panelTypes;
1819for(var i=0,p;
1820p=panels[i];
1821i++){if(!ownerPanel&&!p.prototype.parentPanel||ownerPanel&&p.prototype.parentPanel&&ownerPanel.name==p.prototype.parentPanel){this.addPanel(p.prototype.name)
1822}}},destroy:function(){PanelBar.shutdown.call(this);
1823for(var name in this.panelMap){this.removePanel(name);
1824var panel=this.panelMap[name];
1825panel.destroy();
1826this.panelMap[name]=null;
1827delete this.panelMap[name]
1828}this.panelMap=null;
1829this.ownerPanel=null
1830},initialize:function(){if(this.ownerPanel){this.ownerPanel.sidePanelBarNode.style.display="inline"
1831}for(var name in this.panelMap){(function(self,name){var onTabClick=function onTabClick(){self.selectPanel(name);
1832return false
1833};
1834Firebug.chrome.addController([self.panelMap[name].tabNode,"mousedown",onTabClick])
1835})(this,name)
1836}},shutdown:function(){var selectedPanel=this.selectedPanel;
1837if(selectedPanel){removeClass(selectedPanel.tabNode,"fbSelectedTab");
1838selectedPanel.hide();
1839selectedPanel.shutdown()
1840}if(this.ownerPanel){this.ownerPanel.sidePanelBarNode.style.display="none"
1841}this.selectedPanel=null
1842},addPanel:function(panelName,parentPanel){var PanelType=Firebug.panelTypeMap[panelName];
1843var panel=this.panelMap[panelName]=new PanelType();
1844panel.create()
1845},removePanel:function(panelName){var panel=this.panelMap[panelName];
1846if(panel.hasOwnProperty(panelName)){panel.destroy()
1847}},selectPanel:function(panelName){var selectedPanel=this.selectedPanel;
1848var panel=this.panelMap[panelName];
1849if(panel&&selectedPanel!=panel){if(selectedPanel){removeClass(selectedPanel.tabNode,"fbSelectedTab");
1850selectedPanel.shutdown();
1851selectedPanel.hide()
1852}if(!panel.parentPanel){Firebug.context.persistedState.selectedPanelName=panelName
1853}this.selectedPanel=panel;
1854setClass(panel.tabNode,"fbSelectedTab");
1855panel.show();
1856panel.initialize()
1857}},getPanel:function(panelName){var panel=this.panelMap[panelName];
1858return panel
1859}};
1860FBL.Button=function(options){options=options||{};
1861append(this,options);
1862this.state="unpressed";
1863this.display="unpressed";
1864if(this.element){this.container=this.element.parentNode
1865}else{this.shouldDestroy=true;
1866this.container=this.owner.getPanel().toolButtonsNode;
1867this.element=createElement("a",{className:this.baseClassName+" "+this.className+" fbHover",innerHTML:this.caption});
1868if(this.title){this.element.title=this.title
1869}this.container.appendChild(this.element)
1870}};
1871Button.prototype=extend(Controller,{type:"normal",caption:"caption",title:null,className:"",baseClassName:"fbButton",pressedClassName:"fbBtnPressed",element:null,container:null,owner:null,state:null,display:null,destroy:function(){this.shutdown();
1872if(this.shouldDestroy){this.container.removeChild(this.element)
1873}this.element=null;
1874this.container=null;
1875this.owner=null
1876},initialize:function(){Controller.initialize.apply(this);
1877var element=this.element;
1878this.addController([element,"mousedown",this.handlePress]);
1879if(this.type=="normal"){this.addController([element,"mouseup",this.handleUnpress],[element,"mouseout",this.handleUnpress],[element,"click",this.handleClick])
1880}},shutdown:function(){Controller.shutdown.apply(this)
1881},restore:function(){this.changeState("unpressed")
1882},changeState:function(state){this.state=state;
1883this.changeDisplay(state)
1884},changeDisplay:function(display){if(display!=this.display){if(display=="pressed"){setClass(this.element,this.pressedClassName)
1885}else{if(display=="unpressed"){removeClass(this.element,this.pressedClassName)
1886}}this.display=display
1887}},handlePress:function(event){cancelEvent(event,true);
1888if(this.type=="normal"){this.changeDisplay("pressed");
1889this.beforeClick=true
1890}else{if(this.type=="toggle"){if(this.state=="pressed"){this.changeState("unpressed");
1891if(this.onUnpress){this.onUnpress.apply(this.owner,arguments)
1892}}else{this.changeState("pressed");
1893if(this.onPress){this.onPress.apply(this.owner,arguments)
1894}}if(this.onClick){this.onClick.apply(this.owner,arguments)
1895}}}return false
1896},handleUnpress:function(event){cancelEvent(event,true);
1897if(this.beforeClick){this.changeDisplay("unpressed")
1898}return false
1899},handleClick:function(event){cancelEvent(event,true);
1900if(this.type=="normal"){if(this.onClick){this.onClick.apply(this.owner)
1901}this.changeState("unpressed")
1902}this.beforeClick=false;
1903return false
1904}});
1905FBL.IconButton=function(){Button.apply(this,arguments)
1906};
1907IconButton.prototype=extend(Button.prototype,{baseClassName:"fbIconButton",pressedClassName:"fbIconPressed"});
1908var menuItemProps={"class":"$item.className",type:"$item.type",value:"$item.value",_command:"$item.command"};
1909if(isIE6){menuItemProps.href="javascript:void(0)"
1910}if(FBL.domplate){var MenuPlate=domplate(Firebug.Rep,{tag:DIV({"class":"fbMenu fbShadow"},DIV({"class":"fbMenuContent fbShadowContent"},FOR("item","$object.items|memberIterator",TAG("$item.tag",{item:"$item"})))),itemTag:A(menuItemProps,"$item.label"),checkBoxTag:A(extend(menuItemProps,{checked:"$item.checked"}),"$item.label"),radioButtonTag:A(extend(menuItemProps,{selected:"$item.selected"}),"$item.label"),groupTag:A(extend(menuItemProps,{child:"$item.child"}),"$item.label"),shortcutTag:A(menuItemProps,"$item.label",SPAN({"class":"fbMenuShortcutKey"},"$item.key")),separatorTag:SPAN({"class":"fbMenuSeparator"}),memberIterator:function(items){var result=[];
1911for(var i=0,length=items.length;
1912i<length;
1913i++){var item=items[i];
1914if(typeof item=="string"&&item.indexOf("-")==0){result.push({tag:this.separatorTag});
1915continue
1916}item=extend(item,{});
1917item.type=item.type||"";
1918item.value=item.value||"";
1919var type=item.type;
1920item.tag=this.itemTag;
1921var className=item.className||"";
1922className+="fbMenuOption fbHover ";
1923if(type=="checkbox"){className+="fbMenuCheckBox ";
1924item.tag=this.checkBoxTag
1925}else{if(type=="radiobutton"){className+="fbMenuRadioButton ";
1926item.tag=this.radioButtonTag
1927}else{if(type=="group"){className+="fbMenuGroup ";
1928item.tag=this.groupTag
1929}else{if(type=="shortcut"){className+="fbMenuShortcut ";
1930item.tag=this.shortcutTag
1931}}}}if(item.checked){className+="fbMenuChecked "
1932}else{if(item.selected){className+="fbMenuRadioSelected "
1933}}if(item.disabled){className+="fbMenuDisabled "
1934}item.className=className;
1935item.label=$STR(item.label);
1936result.push(item)
1937}return result
1938}})
1939}FBL.Menu=function(options){if(!options.element){if(options.getItems){options.items=options.getItems()
1940}options.element=MenuPlate.tag.append({object:options},getElementByClass(Firebug.chrome.document,"fbBody"),MenuPlate)
1941}append(this,options);
1942if(typeof this.element=="string"){this.id=this.element;
1943this.element=$(this.id)
1944}else{if(this.id){this.element.id=this.id
1945}}this.element.firebugIgnore=true;
1946this.elementStyle=this.element.style;
1947this.isVisible=false;
1948this.handleMouseDown=bind(this.handleMouseDown,this);
1949this.handleMouseOver=bind(this.handleMouseOver,this);
1950this.handleMouseOut=bind(this.handleMouseOut,this);
1951this.handleWindowMouseDown=bind(this.handleWindowMouseDown,this)
1952};
1953var menuMap={};
1954Menu.prototype=extend(Controller,{destroy:function(){this.hide();
1955if(this.parentMenu){this.parentMenu.childMenu=null
1956}this.element.parentNode.removeChild(this.element);
1957this.element=null;
1958this.elementStyle=null;
1959this.parentMenu=null;
1960this.parentTarget=null
1961},initialize:function(){Controller.initialize.call(this);
1962this.addController([this.element,"mousedown",this.handleMouseDown],[this.element,"mouseover",this.handleMouseOver])
1963},shutdown:function(){Controller.shutdown.call(this)
1964},show:function(x,y){this.initialize();
1965if(this.isVisible){return
1966}x=x||0;
1967y=y||0;
1968if(this.parentMenu){var oldChildMenu=this.parentMenu.childMenu;
1969if(oldChildMenu&&oldChildMenu!=this){oldChildMenu.destroy()
1970}this.parentMenu.childMenu=this
1971}else{addEvent(Firebug.chrome.document,"mousedown",this.handleWindowMouseDown)
1972}this.elementStyle.display="block";
1973this.elementStyle.visibility="hidden";
1974var size=Firebug.chrome.getSize();
1975x=Math.min(x,size.width-this.element.clientWidth-10);
1976x=Math.max(x,0);
1977y=Math.min(y,size.height-this.element.clientHeight-10);
1978y=Math.max(y,0);
1979this.elementStyle.left=x+"px";
1980this.elementStyle.top=y+"px";
1981this.elementStyle.visibility="visible";
1982this.isVisible=true;
1983if(isFunction(this.onShow)){this.onShow.apply(this,arguments)
1984}},hide:function(){this.clearHideTimeout();
1985this.clearShowChildTimeout();
1986if(!this.isVisible){return
1987}this.elementStyle.display="none";
1988if(this.childMenu){this.childMenu.destroy();
1989this.childMenu=null
1990}if(this.parentTarget){removeClass(this.parentTarget,"fbMenuGroupSelected")
1991}this.isVisible=false;
1992this.shutdown();
1993if(isFunction(this.onHide)){this.onHide.apply(this,arguments)
1994}},showChildMenu:function(target){var id=target.getAttribute("child");
1995var parent=this;
1996var target=target;
1997this.showChildTimeout=Firebug.chrome.window.setTimeout(function(){var box=Firebug.chrome.getElementBox(target);
1998var childMenuObject=menuMap.hasOwnProperty(id)?menuMap[id]:{element:$(id)};
1999var childMenu=new Menu(extend(childMenuObject,{parentMenu:parent,parentTarget:target}));
2000var offsetLeft=isIE6?-1:-6;
2001childMenu.show(box.left+box.width+offsetLeft,box.top-6);
2002setClass(target,"fbMenuGroupSelected")
2003},350)
2004},clearHideTimeout:function(){if(this.hideTimeout){Firebug.chrome.window.clearTimeout(this.hideTimeout);
2005delete this.hideTimeout
2006}},clearShowChildTimeout:function(){if(this.showChildTimeout){Firebug.chrome.window.clearTimeout(this.showChildTimeout);
2007this.showChildTimeout=null
2008}},handleMouseDown:function(event){cancelEvent(event,true);
2009var topParent=this;
2010while(topParent.parentMenu){topParent=topParent.parentMenu
2011}var target=event.target||event.srcElement;
2012target=getAncestorByClass(target,"fbMenuOption");
2013if(!target||hasClass(target,"fbMenuGroup")){return false
2014}if(target&&!hasClass(target,"fbMenuDisabled")){var type=target.getAttribute("type");
2015if(type=="checkbox"){var checked=target.getAttribute("checked");
2016var value=target.getAttribute("value");
2017var wasChecked=hasClass(target,"fbMenuChecked");
2018if(wasChecked){removeClass(target,"fbMenuChecked");
2019target.setAttribute("checked","")
2020}else{setClass(target,"fbMenuChecked");
2021target.setAttribute("checked","true")
2022}if(isFunction(this.onCheck)){this.onCheck.call(this,target,value,!wasChecked)
2023}}if(type=="radiobutton"){var selectedRadios=getElementsByClass(target.parentNode,"fbMenuRadioSelected");
2024var group=target.getAttribute("group");
2025for(var i=0,length=selectedRadios.length;
2026i<length;
2027i++){radio=selectedRadios[i];
2028if(radio.getAttribute("group")==group){removeClass(radio,"fbMenuRadioSelected");
2029radio.setAttribute("selected","")
2030}}setClass(target,"fbMenuRadioSelected");
2031target.setAttribute("selected","true")
2032}var handler=null;
2033var cmd=target.command;
2034if(isFunction(cmd)){handler=cmd
2035}else{if(typeof cmd=="string"){handler=this[cmd]
2036}}var closeMenu=true;
2037if(handler){closeMenu=handler.call(this,target)!==false
2038}if(closeMenu){topParent.hide()
2039}}return false
2040},handleWindowMouseDown:function(event){var target=event.target||event.srcElement;
2041target=getAncestorByClass(target,"fbMenu");
2042if(!target){removeEvent(Firebug.chrome.document,"mousedown",this.handleWindowMouseDown);
2043this.hide()
2044}},handleMouseOver:function(event){this.clearHideTimeout();
2045this.clearShowChildTimeout();
2046var target=event.target||event.srcElement;
2047target=getAncestorByClass(target,"fbMenuOption");
2048if(!target){return
2049}var childMenu=this.childMenu;
2050if(childMenu){removeClass(childMenu.parentTarget,"fbMenuGroupSelected");
2051if(childMenu.parentTarget!=target&&childMenu.isVisible){childMenu.clearHideTimeout();
2052childMenu.hideTimeout=Firebug.chrome.window.setTimeout(function(){childMenu.destroy()
2053},300)
2054}}if(hasClass(target,"fbMenuGroup")){this.showChildMenu(target)
2055}}});
2056append(Menu,{register:function(object){menuMap[object.id]=object
2057},check:function(element){setClass(element,"fbMenuChecked");
2058element.setAttribute("checked","true")
2059},uncheck:function(element){removeClass(element,"fbMenuChecked");
2060element.setAttribute("checked","")
2061},disable:function(element){setClass(element,"fbMenuDisabled")
2062},enable:function(element){removeClass(element,"fbMenuDisabled")
2063}});
2064function StatusBar(){}StatusBar.prototype=extend(Controller,{})
2065}});
2066FBL.ns(function(){with(FBL){var refreshDelay=300;
2067var shouldFixElementFromPoint=isOpera||isSafari&&browserVersion<"532";
2068var evalError="___firebug_evaluation_error___";
2069var pixelsPerInch;
2070var resetStyle="margin:0; padding:0; border:0; position:absolute; overflow:hidden; display:block;";
2071var offscreenStyle=resetStyle+"top:-1234px; left:-1234px;";
2072FBL.Context=function(win){this.window=win.window;
2073this.document=win.document;
2074this.browser=Env.browser;
2075if(isIE&&!this.window.eval){this.window.execScript("null");
2076if(!this.window.eval){throw new Error("Firebug Error: eval() method not found in this window")
2077}}this.eval=this.window.eval("new Function('try{ return window.eval.apply(window,arguments) }catch(E){ E."+evalError+"=true; return E }')")
2078};
2079FBL.Context.prototype={browser:null,loaded:true,setTimeout:function(fn,delay){var win=this.window;
2080if(win.setTimeout==this.setTimeout){throw new Error("setTimeout recursion")
2081}var timeout=win.setTimeout.apply?win.setTimeout.apply(win,arguments):win.setTimeout(fn,delay);
2082if(!this.timeouts){this.timeouts={}
2083}this.timeouts[timeout]=1;
2084return timeout
2085},clearTimeout:function(timeout){clearTimeout(timeout);
2086if(this.timeouts){delete this.timeouts[timeout]
2087}},setInterval:function(fn,delay){var win=this.window;
2088var timeout=win.setInterval.apply?win.setInterval.apply(win,arguments):win.setInterval(fn,delay);
2089if(!this.intervals){this.intervals={}
2090}this.intervals[timeout]=1;
2091return timeout
2092},clearInterval:function(timeout){clearInterval(timeout);
2093if(this.intervals){delete this.intervals[timeout]
2094}},invalidatePanels:function(){if(!this.invalidPanels){this.invalidPanels={}
2095}for(var i=0;
2096i<arguments.length;
2097++i){var panelName=arguments[i];
2098if(!Firebug.chrome||!Firebug.chrome.selectedPanel){return
2099}var panel=Firebug.chrome.selectedPanel.sidePanelBar?Firebug.chrome.selectedPanel.sidePanelBar.getPanel(panelName,true):null;
2100if(panel&&!panel.noRefresh){this.invalidPanels[panelName]=1
2101}}if(this.refreshTimeout){this.clearTimeout(this.refreshTimeout);
2102delete this.refreshTimeout
2103}this.refreshTimeout=this.setTimeout(bindFixed(function(){var invalids=[];
2104for(var panelName in this.invalidPanels){var panel=Firebug.chrome.selectedPanel.sidePanelBar?Firebug.chrome.selectedPanel.sidePanelBar.getPanel(panelName,true):null;
2105if(panel){if(panel.visible&&!panel.editing){panel.refresh()
2106}else{panel.needsRefresh=true
2107}if(panel.editing){invalids.push(panelName)
2108}}}delete this.invalidPanels;
2109delete this.refreshTimeout;
2110if(invalids.length){this.invalidatePanels.apply(this,invalids)
2111}},this),refreshDelay)
2112},evaluate:function(expr,context,api,errorHandler){context=context||"window";
2113var isObjectLiteral=trim(expr).indexOf("{")==0,cmd,result;
2114if(context=="window"){if(isObjectLiteral){cmd=api?"with("+api+"){ ("+expr+") }":"("+expr+")"
2115}else{cmd=api?"with("+api+"){ "+expr+" }":expr
2116}}else{cmd=api?"(function(arguments){ with("+api+"){ "+expr+" } }).call("+context+",undefined)":"(function(arguments){ "+expr+" }).call("+context+",undefined)"
2117}result=this.eval(cmd);
2118if(result&&result[evalError]){var msg=result.name?(result.name+": "):"";
2119msg+=result.message||result;
2120if(errorHandler){result=errorHandler(msg)
2121}else{result=msg
2122}}return result
2123},getWindowSize:function(){var width=0,height=0,el;
2124if(typeof this.window.innerWidth=="number"){width=this.window.innerWidth;
2125height=this.window.innerHeight
2126}else{if((el=this.document.documentElement)&&(el.clientHeight||el.clientWidth)){width=el.clientWidth;
2127height=el.clientHeight
2128}else{if((el=this.document.body)&&(el.clientHeight||el.clientWidth)){width=el.clientWidth;
2129height=el.clientHeight
2130}}}return{width:width,height:height}
2131},getWindowScrollSize:function(){var width=0,height=0,el;
2132if(!isIEQuiksMode&&(el=this.document.documentElement)&&(el.scrollHeight||el.scrollWidth)){width=el.scrollWidth;
2133height=el.scrollHeight
2134}if((el=this.document.body)&&(el.scrollHeight||el.scrollWidth)&&(el.scrollWidth>width||el.scrollHeight>height)){width=el.scrollWidth;
2135height=el.scrollHeight
2136}return{width:width,height:height}
2137},getWindowScrollPosition:function(){var top=0,left=0,el;
2138if(typeof this.window.pageYOffset=="number"){top=this.window.pageYOffset;
2139left=this.window.pageXOffset
2140}else{if((el=this.document.body)&&(el.scrollTop||el.scrollLeft)){top=el.scrollTop;
2141left=el.scrollLeft
2142}else{if((el=this.document.documentElement)&&(el.scrollTop||el.scrollLeft)){top=el.scrollTop;
2143left=el.scrollLeft
2144}}}return{top:top,left:left}
2145},getElementFromPoint:function(x,y){if(shouldFixElementFromPoint){var scroll=this.getWindowScrollPosition();
2146return this.document.elementFromPoint(x+scroll.left,y+scroll.top)
2147}else{return this.document.elementFromPoint(x,y)
2148}},getElementPosition:function(el){var left=0;
2149var top=0;
2150do{left+=el.offsetLeft;
2151top+=el.offsetTop
2152}while(el=el.offsetParent);
2153return{left:left,top:top}
2154},getElementBox:function(el){var result={};
2155if(el.getBoundingClientRect){var rect=el.getBoundingClientRect();
2156var offset=isIE?this.document.body.clientTop||this.document.documentElement.clientTop:0;
2157var scroll=this.getWindowScrollPosition();
2158result.top=Math.round(rect.top-offset+scroll.top);
2159result.left=Math.round(rect.left-offset+scroll.left);
2160result.height=Math.round(rect.bottom-rect.top);
2161result.width=Math.round(rect.right-rect.left)
2162}else{var position=this.getElementPosition(el);
2163result.top=position.top;
2164result.left=position.left;
2165result.height=el.offsetHeight;
2166result.width=el.offsetWidth
2167}return result
2168},getMeasurement:function(el,name){var result={value:0,unit:"px"};
2169var cssValue=this.getStyle(el,name);
2170if(!cssValue){return result
2171}if(cssValue.toLowerCase()=="auto"){return result
2172}var reMeasure=/(\d+\.?\d*)(.*)/;
2173var m=cssValue.match(reMeasure);
2174if(m){result.value=m[1]-0;
2175result.unit=m[2].toLowerCase()
2176}return result
2177},getMeasurementInPixels:function(el,name){if(!el){return null
2178}var m=this.getMeasurement(el,name);
2179var value=m.value;
2180var unit=m.unit;
2181if(unit=="px"){return value
2182}else{if(unit=="pt"){return this.pointsToPixels(name,value)
2183}else{if(unit=="em"){return this.emToPixels(el,value)
2184}else{if(unit=="%"){return this.percentToPixels(el,value)
2185}else{if(unit=="ex"){return this.exToPixels(el,value)
2186}}}}}},getMeasurementBox1:function(el,name){var sufixes=["Top","Left","Bottom","Right"];
2187var result=[];
2188for(var i=0,sufix;
2189sufix=sufixes[i];
2190i++){result[i]=Math.round(this.getMeasurementInPixels(el,name+sufix))
2191}return{top:result[0],left:result[1],bottom:result[2],right:result[3]}
2192},getMeasurementBox:function(el,name){var result=[];
2193var sufixes=name=="border"?["TopWidth","LeftWidth","BottomWidth","RightWidth"]:["Top","Left","Bottom","Right"];
2194if(isIE){var propName,cssValue;
2195var autoMargin=null;
2196for(var i=0,sufix;
2197sufix=sufixes[i];
2198i++){propName=name+sufix;
2199cssValue=el.currentStyle[propName]||el.style[propName];
2200if(cssValue=="auto"){if(!autoMargin){autoMargin=this.getCSSAutoMarginBox(el)
2201}result[i]=autoMargin[sufix.toLowerCase()]
2202}else{result[i]=this.getMeasurementInPixels(el,propName)
2203}}}else{for(var i=0,sufix;
2204sufix=sufixes[i];
2205i++){result[i]=this.getMeasurementInPixels(el,name+sufix)
2206}}return{top:result[0],left:result[1],bottom:result[2],right:result[3]}
2207},getCSSAutoMarginBox:function(el){if(isIE&&" meta title input script link a ".indexOf(" "+el.nodeName.toLowerCase()+" ")!=-1){return{top:0,left:0,bottom:0,right:0}
2208}if(isIE&&" h1 h2 h3 h4 h5 h6 h7 ul p ".indexOf(" "+el.nodeName.toLowerCase()+" ")==-1){return{top:0,left:0,bottom:0,right:0}
2209}var offsetTop=0;
2210if(false&&isIEStantandMode){var scrollSize=Firebug.browser.getWindowScrollSize();
2211offsetTop=scrollSize.height
2212}var box=this.document.createElement("div");
2213box.style.cssText="margin:0; padding:1px; border: 0; visibility: hidden;";
2214var clone=el.cloneNode(false);
2215var text=this.document.createTextNode("&nbsp;");
2216clone.appendChild(text);
2217box.appendChild(clone);
2218this.document.body.appendChild(box);
2219var marginTop=clone.offsetTop-box.offsetTop-1;
2220var marginBottom=box.offsetHeight-clone.offsetHeight-2-marginTop;
2221var marginLeft=clone.offsetLeft-box.offsetLeft-1;
2222var marginRight=box.offsetWidth-clone.offsetWidth-2-marginLeft;
2223this.document.body.removeChild(box);
2224return{top:marginTop+offsetTop,left:marginLeft,bottom:marginBottom-offsetTop,right:marginRight}
2225},getFontSizeInPixels:function(el){var size=this.getMeasurement(el,"fontSize");
2226if(size.unit=="px"){return size.value
2227}var computeDirtyFontSize=function(el,calibration){var div=this.document.createElement("div");
2228var divStyle=offscreenStyle;
2229if(calibration){divStyle+=" font-size:"+calibration+"px;"
2230}div.style.cssText=divStyle;
2231div.innerHTML="A";
2232el.appendChild(div);
2233var value=div.offsetHeight;
2234el.removeChild(div);
2235return value
2236};
2237var rate=200/225;
2238var value=computeDirtyFontSize(el);
2239return value*rate
2240},pointsToPixels:function(name,value,returnFloat){var axis=/Top$|Bottom$/.test(name)?"y":"x";
2241var result=value*pixelsPerInch[axis]/72;
2242return returnFloat?result:Math.round(result)
2243},emToPixels:function(el,value){if(!el){return null
2244}var fontSize=this.getFontSizeInPixels(el);
2245return Math.round(value*fontSize)
2246},exToPixels:function(el,value){if(!el){return null
2247}var div=this.document.createElement("div");
2248div.style.cssText=offscreenStyle+"width:"+value+"ex;";
2249el.appendChild(div);
2250var value=div.offsetWidth;
2251el.removeChild(div);
2252return value
2253},percentToPixels:function(el,value){if(!el){return null
2254}var div=this.document.createElement("div");
2255div.style.cssText=offscreenStyle+"width:"+value+"%;";
2256el.appendChild(div);
2257var value=div.offsetWidth;
2258el.removeChild(div);
2259return value
2260},getStyle:isIE?function(el,name){return el.currentStyle[name]||el.style[name]||undefined
2261}:function(el,name){return this.document.defaultView.getComputedStyle(el,null)[name]||el.style[name]||undefined
2262}}
2263}});
2264FBL.ns(function(){with(FBL){var WindowDefaultOptions={type:"frame",id:"FirebugUI"},commandLine,fbTop,fbContent,fbContentStyle,fbBottom,fbBtnInspect,fbToolbar,fbPanelBox1,fbPanelBox1Style,fbPanelBox2,fbPanelBox2Style,fbPanelBar2Box,fbPanelBar2BoxStyle,fbHSplitter,fbVSplitter,fbVSplitterStyle,fbPanel1,fbPanel1Style,fbPanel2,fbPanel2Style,fbConsole,fbConsoleStyle,fbHTML,fbCommandLine,fbLargeCommandLine,fbLargeCommandButtons,topHeight,topPartialHeight,chromeRedrawSkipRate=isIE?75:isOpera?80:75,lastSelectedPanelName,focusCommandLineState=0,lastFocusedPanelName,lastHSplitterMouseMove=0,onHSplitterMouseMoveBuffer=null,onHSplitterMouseMoveTimer=null,lastVSplitterMouseMove=0;
2265FBL.defaultPersistedState={isOpen:false,height:300,sidePanelWidth:350,selectedPanelName:"Console",selectedHTMLElementId:null,htmlSelectionStack:[]};
2266FBL.FirebugChrome={chromeMap:{},htmlSelectionStack:[],create:function(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("FirebugChrome.create","creating chrome window")
2267}createChromeWindow()
2268},initialize:function(){if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("FirebugChrome.initialize","initializing chrome window")
2269}if(Env.chrome.type=="frame"||Env.chrome.type=="div"){ChromeMini.create(Env.chrome)
2270}var chrome=Firebug.chrome=new Chrome(Env.chrome);
2271FirebugChrome.chromeMap[chrome.type]=chrome;
2272addGlobalEvent("keydown",onGlobalKeyDown);
2273if(Env.Options.enablePersistent&&chrome.type=="popup"){var frame=FirebugChrome.chromeMap.frame;
2274if(frame){frame.close()
2275}chrome.initialize()
2276}},clone:function(FBChrome){for(var name in FBChrome){var prop=FBChrome[name];
2277if(FBChrome.hasOwnProperty(name)&&!isFunction(prop)){this[name]=prop
2278}}}};
2279var createChromeWindow=function(options){options=extend(WindowDefaultOptions,options||{});
2280var browserWin=Env.browser.window;
2281var browserContext=new Context(browserWin);
2282var prefs=Store.get("FirebugLite");
2283var persistedState=prefs&&prefs.persistedState||defaultPersistedState;
2284var chrome={},context=options.context||Env.browser,type=chrome.type=Env.Options.enablePersistent?"popup":options.type,isChromeFrame=type=="frame",useLocalSkin=Env.useLocalSkin,url=useLocalSkin?Env.Location.skin:"about:blank",body=context.document.getElementsByTagName("body")[0],formatNode=function(node){if(!Env.isDebugMode){node.firebugIgnore=true
2285}var browserWinSize=browserContext.getWindowSize();
2286var height=persistedState.height||300;
2287height=Math.min(browserWinSize.height,height);
2288height=Math.max(200,height);
2289node.style.border="0";
2290node.style.visibility="hidden";
2291node.style.zIndex="2147483647";
2292node.style.position=noFixedPosition?"absolute":"fixed";
2293node.style.width="100%";
2294node.style.left="0";
2295node.style.bottom=noFixedPosition?"-1px":"0";
2296node.style.height=height+"px"
2297},createChromeDiv=function(){var node=chrome.node=createGlobalElement("div"),style=createGlobalElement("style"),css=FirebugChrome.Skin.CSS,rules=".fbBody *{margin:0;padding:0;font-size:11px;line-height:13px;color:inherit;}"+css+".fbBody #fbHSplitter{position:absolute !important;} .fbBody #fbHTML span{line-height:14px;} .fbBody .lineNo div{line-height:inherit !important;}";
2298style.type="text/css";
2299if(style.styleSheet){style.styleSheet.cssText=rules
2300}else{style.appendChild(context.document.createTextNode(rules))
2301}document.getElementsByTagName("head")[0].appendChild(style);
2302node.className="fbBody";
2303node.style.overflow="hidden";
2304node.innerHTML=getChromeDivTemplate();
2305if(isIE){setTimeout(function(){node.firstChild.style.height="1px";
2306node.firstChild.style.position="static"
2307},0)
2308}formatNode(node);
2309body.appendChild(node);
2310chrome.window=window;
2311chrome.document=document;
2312onChromeLoad(chrome)
2313};
2314try{if(type=="div"){createChromeDiv();
2315return
2316}else{if(isChromeFrame){var node=chrome.node=createGlobalElement("iframe");
2317node.setAttribute("src",url);
2318node.setAttribute("frameBorder","0");
2319formatNode(node);
2320body.appendChild(node);
2321node.id=options.id
2322}else{var height=persistedState.popupHeight||300;
2323var browserWinSize=browserContext.getWindowSize();
2324var browserWinLeft=typeof browserWin.screenX=="number"?browserWin.screenX:browserWin.screenLeft;
2325var popupLeft=typeof persistedState.popupLeft=="number"?persistedState.popupLeft:browserWinLeft;
2326var browserWinTop=typeof browserWin.screenY=="number"?browserWin.screenY:browserWin.screenTop;
2327var popupTop=typeof persistedState.popupTop=="number"?persistedState.popupTop:Math.max(0,Math.min(browserWinTop+browserWinSize.height-height,screen.availHeight-height-61));
2328var popupWidth=typeof persistedState.popupWidth=="number"?persistedState.popupWidth:Math.max(0,Math.min(browserWinSize.width,screen.availWidth-10));
2329var popupHeight=typeof persistedState.popupHeight=="number"?persistedState.popupHeight:300;
2330var options=["true,top=",popupTop,",left=",popupLeft,",height=",popupHeight,",width=",popupWidth,",resizable"].join(""),node=chrome.node=context.window.open(url,"popup",options);
2331if(node){try{node.focus()
2332}catch(E){alert("Firebug Error: Firebug popup was blocked.");
2333return
2334}}else{alert("Firebug Error: Firebug popup was blocked.");
2335return
2336}}}if(!useLocalSkin){var tpl=getChromeTemplate(!isChromeFrame),doc=isChromeFrame?node.contentWindow.document:node.document;
2337doc.write(tpl);
2338doc.close()
2339}var win,waitDelay=useLocalSkin?isChromeFrame?200:300:100,waitForWindow=function(){if(isChromeFrame&&(win=node.contentWindow)&&node.contentWindow.document.getElementById("fbCommandLine")||!isChromeFrame&&(win=node.window)&&node.document&&node.document.getElementById("fbCommandLine")){chrome.window=win.window;
2340chrome.document=win.document;
2341setTimeout(function(){onChromeLoad(chrome)
2342},useLocalSkin?200:0)
2343}else{setTimeout(waitForWindow,waitDelay)
2344}};
2345waitForWindow()
2346}catch(e){var msg=e.message||e;
2347if(/access/i.test(msg)){if(isChromeFrame){body.removeChild(node)
2348}else{if(type=="popup"){node.close()
2349}}createChromeDiv()
2350}else{alert("Firebug Error: Firebug GUI could not be created.")
2351}}};
2352var onChromeLoad=function onChromeLoad(chrome){Env.chrome=chrome;
2353if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Chrome onChromeLoad","chrome window loaded")
2354}if(Env.Options.enablePersistent){Env.FirebugChrome=FirebugChrome;
2355chrome.window.Firebug=chrome.window.Firebug||{};
2356chrome.window.Firebug.SharedEnv=Env;
2357if(Env.isDevelopmentMode){Env.browser.window.FBDev.loadChromeApplication(chrome)
2358}else{var doc=chrome.document;
2359var script=doc.createElement("script");
2360script.src=Env.Location.app+"#remote,persist";
2361doc.getElementsByTagName("head")[0].appendChild(script)
2362}}else{if(chrome.type=="frame"||chrome.type=="div"){setTimeout(function(){FBL.Firebug.initialize()
2363},0)
2364}else{if(chrome.type=="popup"){var oldChrome=FirebugChrome.chromeMap.frame;
2365var newChrome=new Chrome(chrome);
2366dispatch(newChrome.panelMap,"detach",[oldChrome,newChrome]);
2367newChrome.reattach(oldChrome,newChrome)
2368}}}};
2369var getChromeDivTemplate=function(){return FirebugChrome.Skin.HTML
2370};
2371var getChromeTemplate=function(isPopup){var tpl=FirebugChrome.Skin;
2372var r=[],i=-1;
2373r[++i]='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/DTD/strict.dtd">';
2374r[++i]="<html><head><title>";
2375r[++i]=Firebug.version;
2376r[++i]="</title><style>html,body{margin:0;padding:0;overflow:hidden;}";
2377r[++i]=tpl.CSS;
2378r[++i]="</style>";
2379r[++i]='</head><body class="fbBody'+(isPopup?" FirebugPopup":"")+'">';
2380r[++i]=tpl.HTML;
2381r[++i]="</body></html>";
2382return r.join("")
2383};
2384var Chrome=function Chrome(chrome){var type=chrome.type;
2385var Base=type=="frame"||type=="div"?ChromeFrameBase:ChromePopupBase;
2386append(this,Base);
2387append(this,chrome);
2388append(this,new Context(chrome.window));
2389FirebugChrome.chromeMap[type]=this;
2390Firebug.chrome=this;
2391Env.chrome=chrome.window;
2392this.commandLineVisible=false;
2393this.sidePanelVisible=false;
2394this.create();
2395return this
2396};
2397var ChromeBase={};
2398append(ChromeBase,Controller);
2399append(ChromeBase,PanelBar);
2400append(ChromeBase,{node:null,type:null,document:null,window:null,sidePanelVisible:false,commandLineVisible:false,largeCommandLineVisible:false,inspectButton:null,create:function(){PanelBar.create.call(this);
2401if(Firebug.Inspector){this.inspectButton=new Button({type:"toggle",element:$("fbChrome_btInspect"),owner:Firebug.Inspector,onPress:Firebug.Inspector.startInspecting,onUnpress:Firebug.Inspector.stopInspecting})
2402}},destroy:function(){if(Firebug.Inspector){this.inspectButton.destroy()
2403}PanelBar.destroy.call(this);
2404this.shutdown()
2405},testMenu:function(){var firebugMenu=new Menu({id:"fbFirebugMenu",items:[{label:"Open Firebug",type:"shortcut",key:isFirefox?"Shift+F12":"F12",checked:true,command:"toggleChrome"},{label:"Open Firebug in New Window",type:"shortcut",key:isFirefox?"Ctrl+Shift+F12":"Ctrl+F12",command:"openPopup"},{label:"Inspect Element",type:"shortcut",key:"Ctrl+Shift+C",command:"toggleInspect"},{label:"Command Line",type:"shortcut",key:"Ctrl+Shift+L",command:"focusCommandLine"},"-",{label:"Options",type:"group",child:"fbFirebugOptionsMenu"},"-",{label:"Firebug Lite Website...",command:"visitWebsite"},{label:"Discussion Group...",command:"visitDiscussionGroup"},{label:"Issue Tracker...",command:"visitIssueTracker"}],onHide:function(){iconButton.restore()
2406},toggleChrome:function(){Firebug.chrome.toggle()
2407},openPopup:function(){Firebug.chrome.toggle(true,true)
2408},toggleInspect:function(){Firebug.Inspector.toggleInspect()
2409},focusCommandLine:function(){Firebug.chrome.focusCommandLine()
2410},visitWebsite:function(){this.visit("http://getfirebug.com/lite.html")
2411},visitDiscussionGroup:function(){this.visit("http://groups.google.com/group/firebug")
2412},visitIssueTracker:function(){this.visit("http://code.google.com/p/fbug/issues/list")
2413},visit:function(url){window.open(url)
2414}});
2415var firebugOptionsMenu={id:"fbFirebugOptionsMenu",getItems:function(){var cookiesDisabled=!Firebug.saveCookies;
2416return[{label:"Start Opened",type:"checkbox",value:"startOpened",checked:Firebug.startOpened,disabled:cookiesDisabled},{label:"Start in New Window",type:"checkbox",value:"startInNewWindow",checked:Firebug.startInNewWindow,disabled:cookiesDisabled},{label:"Show Icon When Hidden",type:"checkbox",value:"showIconWhenHidden",checked:Firebug.showIconWhenHidden,disabled:cookiesDisabled},{label:"Override Console Object",type:"checkbox",value:"overrideConsole",checked:Firebug.overrideConsole,disabled:cookiesDisabled},{label:"Ignore Firebug Elements",type:"checkbox",value:"ignoreFirebugElements",checked:Firebug.ignoreFirebugElements,disabled:cookiesDisabled},{label:"Disable When Firebug Active",type:"checkbox",value:"disableWhenFirebugActive",checked:Firebug.disableWhenFirebugActive,disabled:cookiesDisabled},{label:"Disable XHR Listener",type:"checkbox",value:"disableXHRListener",checked:Firebug.disableXHRListener,disabled:cookiesDisabled},{label:"Disable Resource Fetching",type:"checkbox",value:"disableResourceFetching",checked:Firebug.disableResourceFetching,disabled:cookiesDisabled},{label:"Enable Trace Mode",type:"checkbox",value:"enableTrace",checked:Firebug.enableTrace,disabled:cookiesDisabled},{label:"Enable Persistent Mode (experimental)",type:"checkbox",value:"enablePersistent",checked:Firebug.enablePersistent,disabled:cookiesDisabled},"-",{label:"Reset All Firebug Options",command:"restorePrefs",disabled:cookiesDisabled}]
2417},onCheck:function(target,value,checked){Firebug.setPref(value,checked)
2418},restorePrefs:function(target){Firebug.erasePrefs();
2419if(target){this.updateMenu(target)
2420}},updateMenu:function(target){var options=getElementsByClass(target.parentNode,"fbMenuOption");
2421var firstOption=options[0];
2422var enabled=Firebug.saveCookies;
2423if(enabled){Menu.check(firstOption)
2424}else{Menu.uncheck(firstOption)
2425}if(enabled){Menu.check(options[0])
2426}else{Menu.uncheck(options[0])
2427}for(var i=1,length=options.length;
2428i<length;
2429i++){var option=options[i];
2430var value=option.getAttribute("value");
2431var pref=Firebug[value];
2432if(pref){Menu.check(option)
2433}else{Menu.uncheck(option)
2434}if(enabled){Menu.enable(option)
2435}else{Menu.disable(option)
2436}}}};
2437Menu.register(firebugOptionsMenu);
2438var menu=firebugMenu;
2439var testMenuClick=function(event){cancelEvent(event,true);
2440var target=event.target||event.srcElement;
2441if(menu.isVisible){menu.hide()
2442}else{var offsetLeft=isIE6?1:-4,chrome=Firebug.chrome,box=chrome.getElementBox(target),offset=chrome.type=="div"?chrome.getElementPosition(chrome.node):{top:0,left:0};
2443menu.show(box.left+offsetLeft-offset.left,box.top+box.height-5-offset.top)
2444}return false
2445};
2446var iconButton=new IconButton({type:"toggle",element:$("fbFirebugButton"),onClick:testMenuClick});
2447iconButton.initialize()
2448},initialize:function(){if(Env.bookmarkletOutdated){Firebug.Console.logFormatted(["A new bookmarklet version is available. Please visit http://getfirebug.com/firebuglite#Install and update it."],Firebug.context,"warn")
2449}if(Firebug.Console){Firebug.Console.flush()
2450}if(Firebug.Trace){FBTrace.flush(Firebug.Trace)
2451}if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.chrome.initialize","initializing chrome application")
2452}Controller.initialize.call(this);
2453PanelBar.initialize.call(this);
2454fbTop=$("fbTop");
2455fbContent=$("fbContent");
2456fbContentStyle=fbContent.style;
2457fbBottom=$("fbBottom");
2458fbBtnInspect=$("fbBtnInspect");
2459fbToolbar=$("fbToolbar");
2460fbPanelBox1=$("fbPanelBox1");
2461fbPanelBox1Style=fbPanelBox1.style;
2462fbPanelBox2=$("fbPanelBox2");
2463fbPanelBox2Style=fbPanelBox2.style;
2464fbPanelBar2Box=$("fbPanelBar2Box");
2465fbPanelBar2BoxStyle=fbPanelBar2Box.style;
2466fbHSplitter=$("fbHSplitter");
2467fbVSplitter=$("fbVSplitter");
2468fbVSplitterStyle=fbVSplitter.style;
2469fbPanel1=$("fbPanel1");
2470fbPanel1Style=fbPanel1.style;
2471fbPanel2=$("fbPanel2");
2472fbPanel2Style=fbPanel2.style;
2473fbConsole=$("fbConsole");
2474fbConsoleStyle=fbConsole.style;
2475fbHTML=$("fbHTML");
2476fbCommandLine=$("fbCommandLine");
2477fbLargeCommandLine=$("fbLargeCommandLine");
2478fbLargeCommandButtons=$("fbLargeCommandButtons");
2479topHeight=fbTop.offsetHeight;
2480topPartialHeight=fbToolbar.offsetHeight;
2481disableTextSelection($("fbToolbar"));
2482disableTextSelection($("fbPanelBarBox"));
2483disableTextSelection($("fbPanelBar1"));
2484disableTextSelection($("fbPanelBar2"));
2485if(isIE6&&Firebug.Selector){var as=$$(".fbHover");
2486for(var i=0,a;
2487a=as[i];
2488i++){a.setAttribute("href","javascript:void(0)")
2489}}if(Firebug.Inspector){this.inspectButton.initialize()
2490}this.addController([$("fbLargeCommandLineIcon"),"click",this.showLargeCommandLine]);
2491var self=this;
2492setTimeout(function(){self.selectPanel(Firebug.context.persistedState.selectedPanelName);
2493if(Firebug.context.persistedState.selectedPanelName=="Console"&&Firebug.CommandLine){Firebug.chrome.focusCommandLine()
2494}},0);
2495var onPanelMouseDown=function onPanelMouseDown(event){var target=event.target||event.srcElement;
2496if(FBL.isLeftClick(event)){var editable=FBL.getAncestorByClass(target,"editable");
2497if(editable){Firebug.Editor.startEditing(editable);
2498FBL.cancelEvent(event)
2499}else{if(!hasClass(target,"textEditorInner")){Firebug.Editor.stopEditing()
2500}}}else{if(FBL.isMiddleClick(event)&&Firebug.getRepNode(target)){FBL.cancelEvent(event)
2501}}};
2502Firebug.getElementPanel=function(element){var panelNode=getAncestorByClass(element,"fbPanel");
2503var id=panelNode.id.substr(2);
2504var panel=Firebug.chrome.panelMap[id];
2505if(!panel){if(Firebug.chrome.selectedPanel.sidePanelBar){panel=Firebug.chrome.selectedPanel.sidePanelBar.panelMap[id]
2506}}return panel
2507};
2508var onKeyCodeListenersMap=[];
2509var onKeyCodeListen=function(event){for(var keyCode in onKeyCodeListenersMap){var listeners=onKeyCodeListenersMap[keyCode];
2510for(var i=0,listener;
2511listener=listeners[i];
2512i++){var filter=listener.filter||FBL.noKeyModifiers;
2513if(event.keyCode==keyCode&&(!filter||filter(event))){listener.listener();
2514FBL.cancelEvent(event,true);
2515return false
2516}}}};
2517addEvent(Firebug.chrome.document,"keydown",onKeyCodeListen);
2518Firebug.chrome.keyCodeListen=function(key,filter,listener,capture){var keyCode=KeyEvent["DOM_VK_"+key];
2519if(!onKeyCodeListenersMap[keyCode]){onKeyCodeListenersMap[keyCode]=[]
2520}onKeyCodeListenersMap[keyCode].push({filter:filter,listener:listener});
2521return keyCode
2522};
2523Firebug.chrome.keyIgnore=function(keyCode){onKeyCodeListenersMap[keyCode]=null;
2524delete onKeyCodeListenersMap[keyCode]
2525};
2526this.addController([fbPanel1,"mousedown",onPanelMouseDown],[fbPanel2,"mousedown",onPanelMouseDown]);
2527if(FBL.domplate){this.testMenu()
2528}},shutdown:function(){if(Firebug.Inspector){this.inspectButton.shutdown()
2529}restoreTextSelection($("fbToolbar"));
2530restoreTextSelection($("fbPanelBarBox"));
2531restoreTextSelection($("fbPanelBar1"));
2532restoreTextSelection($("fbPanelBar2"));
2533Controller.shutdown.call(this);
2534PanelBar.shutdown.call(this);
2535fbTop=null;
2536fbContent=null;
2537fbContentStyle=null;
2538fbBottom=null;
2539fbBtnInspect=null;
2540fbToolbar=null;
2541fbPanelBox1=null;
2542fbPanelBox1Style=null;
2543fbPanelBox2=null;
2544fbPanelBox2Style=null;
2545fbPanelBar2Box=null;
2546fbPanelBar2BoxStyle=null;
2547fbHSplitter=null;
2548fbVSplitter=null;
2549fbVSplitterStyle=null;
2550fbPanel1=null;
2551fbPanel1Style=null;
2552fbPanel2=null;
2553fbConsole=null;
2554fbConsoleStyle=null;
2555fbHTML=null;
2556fbCommandLine=null;
2557fbLargeCommandLine=null;
2558fbLargeCommandButtons=null;
2559topHeight=null;
2560topPartialHeight=null
2561},toggle:function(forceOpen,popup){if(popup){this.detach()
2562}else{if(isOpera&&Firebug.chrome.type=="popup"&&Firebug.chrome.node.closed){var frame=FirebugChrome.chromeMap.frame;
2563frame.reattach();
2564FirebugChrome.chromeMap.popup=null;
2565frame.open();
2566return
2567}if(Firebug.chrome.type=="popup"){return
2568}var shouldOpen=forceOpen||!Firebug.context.persistedState.isOpen;
2569if(shouldOpen){this.open()
2570}else{this.close()
2571}}},detach:function(){if(!FirebugChrome.chromeMap.popup){this.close();
2572createChromeWindow({type:"popup"})
2573}},reattach:function(oldChrome,newChrome){Firebug.browser.window.Firebug=Firebug;
2574var newPanelMap=newChrome.panelMap;
2575var oldPanelMap=oldChrome.panelMap;
2576var panel;
2577for(var name in newPanelMap){panel=newPanelMap[name];
2578if(panel.options.innerHTMLSync){panel.panelNode.innerHTML=oldPanelMap[name].panelNode.innerHTML
2579}}Firebug.chrome=newChrome;
2580if(newChrome.type=="popup"){newChrome.initialize()
2581}else{Firebug.context.persistedState.selectedPanelName=oldChrome.selectedPanel.name
2582}dispatch(newPanelMap,"reattach",[oldChrome,newChrome])
2583},draw:function(){var size=this.getSize();
2584var commandLineHeight=Firebug.chrome.commandLineVisible?fbCommandLine.offsetHeight:0,y=Math.max(size.height,topHeight),heightValue=Math.max(y-topHeight-commandLineHeight,0),height=heightValue+"px",sideWidthValue=Firebug.chrome.sidePanelVisible?Firebug.context.persistedState.sidePanelWidth:0,width=Math.max(size.width-sideWidthValue,0)+"px";
2585fbPanelBox1Style.height=height;
2586fbPanel1Style.height=height;
2587if(isIE||isOpera){fbVSplitterStyle.height=Math.max(y-topPartialHeight-commandLineHeight,0)+"px"
2588}fbPanelBox1Style.width=width;
2589fbPanel1Style.width=width;
2590if(Firebug.chrome.sidePanelVisible){sideWidthValue=Math.max(sideWidthValue-6,0);
2591var sideWidth=sideWidthValue+"px";
2592fbPanelBox2Style.width=sideWidth;
2593fbVSplitterStyle.right=sideWidth;
2594if(Firebug.chrome.largeCommandLineVisible){fbLargeCommandLine=$("fbLargeCommandLine");
2595fbLargeCommandLine.style.height=heightValue-4+"px";
2596fbLargeCommandLine.style.width=sideWidthValue-2+"px";
2597fbLargeCommandButtons=$("fbLargeCommandButtons");
2598fbLargeCommandButtons.style.width=sideWidth
2599}else{fbPanel2Style.height=height;
2600fbPanel2Style.width=sideWidth;
2601fbPanelBar2BoxStyle.width=sideWidth
2602}}},getSize:function(){return this.type=="div"?{height:this.node.offsetHeight,width:this.node.offsetWidth}:this.getWindowSize()
2603},resize:function(){var self=this;
2604setTimeout(function(){self.draw();
2605if(noFixedPosition&&(self.type=="frame"||self.type=="div")){self.fixIEPosition()
2606}},0)
2607},layout:function(panel){if(FBTrace.DBG_CHROME){FBTrace.sysout("Chrome.layout","")
2608}var options=panel.options;
2609changeCommandLineVisibility(options.hasCommandLine);
2610changeSidePanelVisibility(panel.hasSidePanel);
2611Firebug.chrome.draw()
2612},showLargeCommandLine:function(hideToggleIcon){var chrome=Firebug.chrome;
2613if(!chrome.largeCommandLineVisible){chrome.largeCommandLineVisible=true;
2614if(chrome.selectedPanel.options.hasCommandLine){if(Firebug.CommandLine){Firebug.CommandLine.blur()
2615}changeCommandLineVisibility(false)
2616}changeSidePanelVisibility(true);
2617fbLargeCommandLine.style.display="block";
2618fbLargeCommandButtons.style.display="block";
2619fbPanel2Style.display="none";
2620fbPanelBar2BoxStyle.display="none";
2621chrome.draw();
2622fbLargeCommandLine.focus();
2623if(Firebug.CommandLine){Firebug.CommandLine.setMultiLine(true)
2624}}},hideLargeCommandLine:function(){if(Firebug.chrome.largeCommandLineVisible){Firebug.chrome.largeCommandLineVisible=false;
2625if(Firebug.CommandLine){Firebug.CommandLine.setMultiLine(false)
2626}fbLargeCommandLine.blur();
2627fbPanel2Style.display="block";
2628fbPanelBar2BoxStyle.display="block";
2629fbLargeCommandLine.style.display="none";
2630fbLargeCommandButtons.style.display="none";
2631changeSidePanelVisibility(false);
2632if(Firebug.chrome.selectedPanel.options.hasCommandLine){changeCommandLineVisibility(true)
2633}Firebug.chrome.draw()
2634}},focusCommandLine:function(){var selectedPanelName=this.selectedPanel.name,panelToSelect;
2635if(focusCommandLineState==0||selectedPanelName!="Console"){focusCommandLineState=0;
2636lastFocusedPanelName=selectedPanelName;
2637panelToSelect="Console"
2638}if(focusCommandLineState==1){panelToSelect=lastFocusedPanelName
2639}this.selectPanel(panelToSelect);
2640try{if(Firebug.CommandLine){if(panelToSelect=="Console"){Firebug.CommandLine.focus()
2641}else{Firebug.CommandLine.blur()
2642}}}catch(e){}focusCommandLineState=++focusCommandLineState%2
2643}});
2644var ChromeFrameBase=extend(ChromeBase,{create:function(){ChromeBase.create.call(this);
2645if(isFirefox){this.node.style.display="block"
2646}if(Env.Options.startInNewWindow){this.close();
2647this.toggle(true,true);
2648return
2649}if(Env.Options.startOpened){this.open()
2650}else{this.close()
2651}},destroy:function(){var size=Firebug.chrome.getWindowSize();
2652Firebug.context.persistedState.height=size.height;
2653if(Firebug.saveCookies){Firebug.savePrefs()
2654}removeGlobalEvent("keydown",onGlobalKeyDown);
2655ChromeBase.destroy.call(this);
2656this.document=null;
2657delete this.document;
2658this.window=null;
2659delete this.window;
2660this.node.parentNode.removeChild(this.node);
2661this.node=null;
2662delete this.node
2663},initialize:function(){ChromeBase.initialize.call(this);
2664this.addController([Firebug.browser.window,"resize",this.resize],[$("fbWindow_btClose"),"click",this.close],[$("fbWindow_btDetach"),"click",this.detach],[$("fbWindow_btDeactivate"),"click",this.deactivate]);
2665if(!Env.Options.enablePersistent){this.addController([Firebug.browser.window,"unload",Firebug.shutdown])
2666}if(noFixedPosition){this.addController([Firebug.browser.window,"scroll",this.fixIEPosition])
2667}fbVSplitter.onmousedown=onVSplitterMouseDown;
2668fbHSplitter.onmousedown=onHSplitterMouseDown;
2669this.isInitialized=true
2670},shutdown:function(){fbVSplitter.onmousedown=null;
2671fbHSplitter.onmousedown=null;
2672ChromeBase.shutdown.apply(this);
2673this.isInitialized=false
2674},reattach:function(){var frame=FirebugChrome.chromeMap.frame;
2675ChromeBase.reattach(FirebugChrome.chromeMap.popup,this)
2676},open:function(){if(!Firebug.context.persistedState.isOpen){Firebug.context.persistedState.isOpen=true;
2677if(Env.isChromeExtension){localStorage.setItem("Firebug","1,1")
2678}var node=this.node;
2679node.style.visibility="hidden";
2680if(Firebug.showIconWhenHidden){if(ChromeMini.isInitialized){ChromeMini.shutdown()
2681}}else{node.style.display="block"
2682}var main=$("fbChrome");
2683main.style.display="";
2684var self=this;
2685node.style.visibility="visible";
2686setTimeout(function(){self.initialize();
2687if(noFixedPosition){self.fixIEPosition()
2688}self.draw()
2689},10)
2690}},close:function(){if(Firebug.context.persistedState.isOpen){if(this.isInitialized){this.shutdown()
2691}Firebug.context.persistedState.isOpen=false;
2692if(Env.isChromeExtension){localStorage.setItem("Firebug","1,0")
2693}var node=this.node;
2694if(Firebug.showIconWhenHidden){node.style.visibility="hidden";
2695var main=$("fbChrome",FirebugChrome.chromeMap.frame.document);
2696main.style.display="none";
2697ChromeMini.initialize();
2698node.style.visibility="visible"
2699}else{node.style.display="none"
2700}}},deactivate:function(){if(Env.isChromeExtension){localStorage.removeItem("Firebug");
2701Firebug.GoogleChrome.dispatch("FB_deactivate");
2702Firebug.chrome.close()
2703}else{Firebug.shutdown()
2704}},fixIEPosition:function(){var doc=this.document;
2705var offset=isIE?doc.body.clientTop||doc.documentElement.clientTop:0;
2706var size=Firebug.browser.getWindowSize();
2707var scroll=Firebug.browser.getWindowScrollPosition();
2708var maxHeight=size.height;
2709var height=this.node.offsetHeight;
2710var bodyStyle=doc.body.currentStyle;
2711this.node.style.top=maxHeight-height+scroll.top+"px";
2712if((this.type=="frame"||this.type=="div")&&(bodyStyle.marginLeft||bodyStyle.marginRight)){this.node.style.width=size.width+"px"
2713}if(fbVSplitterStyle){fbVSplitterStyle.right=Firebug.context.persistedState.sidePanelWidth+"px"
2714}this.draw()
2715}});
2716var ChromeMini=extend(Controller,{create:function(chrome){append(this,chrome);
2717this.type="mini"
2718},initialize:function(){Controller.initialize.apply(this);
2719var doc=FirebugChrome.chromeMap.frame.document;
2720var mini=$("fbMiniChrome",doc);
2721mini.style.display="block";
2722var miniIcon=$("fbMiniIcon",doc);
2723var width=miniIcon.offsetWidth+10;
2724miniIcon.title="Open "+Firebug.version;
2725var errors=$("fbMiniErrors",doc);
2726if(errors.offsetWidth){width+=errors.offsetWidth+10
2727}var node=this.node;
2728node.style.height="27px";
2729node.style.width=width+"px";
2730node.style.left="";
2731node.style.right=0;
2732if(this.node.nodeName.toLowerCase()=="iframe"){node.setAttribute("allowTransparency","true");
2733this.document.body.style.backgroundColor="transparent"
2734}else{node.style.background="transparent"
2735}if(noFixedPosition){this.fixIEPosition()
2736}this.addController([$("fbMiniIcon",doc),"click",onMiniIconClick]);
2737if(noFixedPosition){this.addController([Firebug.browser.window,"scroll",this.fixIEPosition])
2738}this.isInitialized=true
2739},shutdown:function(){var node=this.node;
2740node.style.height=Firebug.context.persistedState.height+"px";
2741node.style.width="100%";
2742node.style.left=0;
2743node.style.right="";
2744if(this.node.nodeName.toLowerCase()=="iframe"){node.setAttribute("allowTransparency","false");
2745this.document.body.style.backgroundColor="#fff"
2746}else{node.style.background="#fff"
2747}if(noFixedPosition){this.fixIEPosition()
2748}var doc=FirebugChrome.chromeMap.frame.document;
2749var mini=$("fbMiniChrome",doc);
2750mini.style.display="none";
2751Controller.shutdown.apply(this);
2752this.isInitialized=false
2753},draw:function(){},fixIEPosition:ChromeFrameBase.fixIEPosition});
2754var ChromePopupBase=extend(ChromeBase,{initialize:function(){setClass(this.document.body,"FirebugPopup");
2755ChromeBase.initialize.call(this);
2756this.addController([Firebug.chrome.window,"resize",this.resize],[Firebug.chrome.window,"unload",this.destroy]);
2757if(Env.Options.enablePersistent){this.persist=bind(this.persist,this);
2758addEvent(Firebug.browser.window,"unload",this.persist)
2759}else{this.addController([Firebug.browser.window,"unload",this.close])
2760}fbVSplitter.onmousedown=onVSplitterMouseDown
2761},destroy:function(){var chromeWin=Firebug.chrome.window;
2762var left=chromeWin.screenX||chromeWin.screenLeft;
2763var top=chromeWin.screenY||chromeWin.screenTop;
2764var size=Firebug.chrome.getWindowSize();
2765Firebug.context.persistedState.popupTop=top;
2766Firebug.context.persistedState.popupLeft=left;
2767Firebug.context.persistedState.popupWidth=size.width;
2768Firebug.context.persistedState.popupHeight=size.height;
2769if(Firebug.saveCookies){Firebug.savePrefs()
2770}var frame=FirebugChrome.chromeMap.frame;
2771if(frame){dispatch(frame.panelMap,"detach",[this,frame]);
2772frame.reattach(this,frame)
2773}if(Env.Options.enablePersistent){removeEvent(Firebug.browser.window,"unload",this.persist)
2774}ChromeBase.destroy.apply(this);
2775FirebugChrome.chromeMap.popup=null;
2776this.node.close()
2777},persist:function(){persistTimeStart=new Date().getTime();
2778removeEvent(Firebug.browser.window,"unload",this.persist);
2779Firebug.Inspector.destroy();
2780Firebug.browser.window.FirebugOldBrowser=true;
2781var persistTimeStart=new Date().getTime();
2782var waitMainWindow=function(){var doc,head;
2783try{if(window.opener&&!window.opener.FirebugOldBrowser&&(doc=window.opener.document)){try{if(Env.isDebugMode){window.FBL=FBL
2784}window.Firebug=Firebug;
2785window.opener.Firebug=Firebug;
2786Env.browser=window.opener;
2787Firebug.browser=Firebug.context=new Context(Env.browser);
2788Firebug.loadPrefs();
2789registerConsole();
2790var persistDelay=new Date().getTime()-persistTimeStart;
2791var chrome=Firebug.chrome;
2792addEvent(Firebug.browser.window,"unload",chrome.persist);
2793FBL.cacheDocument();
2794Firebug.Inspector.create();
2795Firebug.Console.logFormatted(["Firebug could not capture console calls during "+persistDelay+"ms"],Firebug.context,"info");
2796setTimeout(function(){var htmlPanel=chrome.getPanel("HTML");
2797htmlPanel.createUI()
2798},50)
2799}catch(pE){alert("persist error: "+(pE.message||pE))
2800}}else{window.setTimeout(waitMainWindow,0)
2801}}catch(E){window.close()
2802}};
2803waitMainWindow()
2804},close:function(){this.destroy()
2805}});
2806var changeCommandLineVisibility=function changeCommandLineVisibility(visibility){var last=Firebug.chrome.commandLineVisible;
2807var visible=Firebug.chrome.commandLineVisible=typeof visibility=="boolean"?visibility:!Firebug.chrome.commandLineVisible;
2808if(visible!=last){if(visible){fbBottom.className="";
2809if(Firebug.CommandLine){Firebug.CommandLine.activate()
2810}}else{if(Firebug.CommandLine){Firebug.CommandLine.deactivate()
2811}fbBottom.className="hide"
2812}}};
2813var changeSidePanelVisibility=function changeSidePanelVisibility(visibility){var last=Firebug.chrome.sidePanelVisible;
2814Firebug.chrome.sidePanelVisible=typeof visibility=="boolean"?visibility:!Firebug.chrome.sidePanelVisible;
2815if(Firebug.chrome.sidePanelVisible!=last){fbPanelBox2.className=Firebug.chrome.sidePanelVisible?"":"hide";
2816fbPanelBar2Box.className=Firebug.chrome.sidePanelVisible?"":"hide"
2817}};
2818var onGlobalKeyDown=function onGlobalKeyDown(event){var keyCode=event.keyCode;
2819var shiftKey=event.shiftKey;
2820var ctrlKey=event.ctrlKey;
2821if(keyCode==123&&(!isFirefox&&!shiftKey||shiftKey&&isFirefox)){Firebug.chrome.toggle(false,ctrlKey);
2822cancelEvent(event,true);
2823if(Env.isChromeExtension){Firebug.GoogleChrome.dispatch("FB_enableIcon")
2824}}else{if(keyCode==67&&ctrlKey&&shiftKey){Firebug.Inspector.toggleInspect();
2825cancelEvent(event,true)
2826}else{if(keyCode==76&&ctrlKey&&shiftKey){Firebug.chrome.focusCommandLine();
2827cancelEvent(event,true)
2828}}}};
2829var onMiniIconClick=function onMiniIconClick(event){Firebug.chrome.toggle(false,event.ctrlKey);
2830cancelEvent(event,true)
2831};
2832var onHSplitterMouseDown=function onHSplitterMouseDown(event){addGlobalEvent("mousemove",onHSplitterMouseMove);
2833addGlobalEvent("mouseup",onHSplitterMouseUp);
2834if(isIE){addEvent(Firebug.browser.document.documentElement,"mouseleave",onHSplitterMouseUp)
2835}fbHSplitter.className="fbOnMovingHSplitter";
2836return false
2837};
2838var onHSplitterMouseMove=function onHSplitterMouseMove(event){cancelEvent(event,true);
2839var clientY=event.clientY;
2840var win=isIE?event.srcElement.ownerDocument.parentWindow:event.target.defaultView||event.target.ownerDocument&&event.target.ownerDocument.defaultView;
2841if(!win){return
2842}if(win!=win.parent){var frameElement=win.frameElement;
2843if(frameElement){var framePos=Firebug.browser.getElementPosition(frameElement).top;
2844clientY+=framePos;
2845if(frameElement.style.position!="fixed"){clientY-=Firebug.browser.getWindowScrollPosition().top
2846}}}if(isOpera&&isQuiksMode&&win.frameElement.id=="FirebugUI"){clientY=Firebug.browser.getWindowSize().height-win.frameElement.offsetHeight+clientY
2847}onHSplitterMouseMoveBuffer=clientY;
2848if(new Date().getTime()-lastHSplitterMouseMove>chromeRedrawSkipRate){lastHSplitterMouseMove=new Date().getTime();
2849handleHSplitterMouseMove()
2850}else{if(!onHSplitterMouseMoveTimer){onHSplitterMouseMoveTimer=setTimeout(handleHSplitterMouseMove,chromeRedrawSkipRate)
2851}}cancelEvent(event,true);
2852return false
2853};
2854var handleHSplitterMouseMove=function(){if(onHSplitterMouseMoveTimer){clearTimeout(onHSplitterMouseMoveTimer);
2855onHSplitterMouseMoveTimer=null
2856}var clientY=onHSplitterMouseMoveBuffer;
2857var windowSize=Firebug.browser.getWindowSize();
2858var scrollSize=Firebug.browser.getWindowScrollSize();
2859var commandLineHeight=Firebug.chrome.commandLineVisible?fbCommandLine.offsetHeight:0;
2860var fixedHeight=topHeight+commandLineHeight;
2861var chromeNode=Firebug.chrome.node;
2862var scrollbarSize=!isIE&&(scrollSize.width>windowSize.width)?17:0;
2863var height=windowSize.height;
2864var chromeHeight=Math.max(height-clientY+5-scrollbarSize,fixedHeight);
2865chromeHeight=Math.min(chromeHeight,windowSize.height-scrollbarSize);
2866Firebug.context.persistedState.height=chromeHeight;
2867chromeNode.style.height=chromeHeight+"px";
2868if(noFixedPosition){Firebug.chrome.fixIEPosition()
2869}Firebug.chrome.draw()
2870};
2871var onHSplitterMouseUp=function onHSplitterMouseUp(event){removeGlobalEvent("mousemove",onHSplitterMouseMove);
2872removeGlobalEvent("mouseup",onHSplitterMouseUp);
2873if(isIE){removeEvent(Firebug.browser.document.documentElement,"mouseleave",onHSplitterMouseUp)
2874}fbHSplitter.className="";
2875Firebug.chrome.draw();
2876return false
2877};
2878var onVSplitterMouseDown=function onVSplitterMouseDown(event){addGlobalEvent("mousemove",onVSplitterMouseMove);
2879addGlobalEvent("mouseup",onVSplitterMouseUp);
2880return false
2881};
2882var onVSplitterMouseMove=function onVSplitterMouseMove(event){if(new Date().getTime()-lastVSplitterMouseMove>chromeRedrawSkipRate){var target=event.target||event.srcElement;
2883if(target&&target.ownerDocument){var clientX=event.clientX;
2884var win=document.all?event.srcElement.ownerDocument.parentWindow:event.target.ownerDocument.defaultView;
2885if(win!=win.parent){clientX+=win.frameElement?win.frameElement.offsetLeft:0
2886}var size=Firebug.chrome.getSize();
2887var x=Math.max(size.width-clientX+3,6);
2888Firebug.context.persistedState.sidePanelWidth=x;
2889Firebug.chrome.draw()
2890}lastVSplitterMouseMove=new Date().getTime()
2891}cancelEvent(event,true);
2892return false
2893};
2894var onVSplitterMouseUp=function onVSplitterMouseUp(event){removeGlobalEvent("mousemove",onVSplitterMouseMove);
2895removeGlobalEvent("mouseup",onVSplitterMouseUp);
2896Firebug.chrome.draw()
2897}
2898}});
2899FBL.ns(function(){with(FBL){Firebug.Lite={}
2900}});
2901FBL.ns(function(){with(FBL){Firebug.Lite.Cache={ID:"firebug-"+new Date().getTime()};
2902var cacheUID=0;
2903var createCache=function(){var map={};
2904var data={};
2905var CID=Firebug.Lite.Cache.ID;
2906var supportsDeleteExpando=!document.all;
2907var cacheFunction=function(element){return cacheAPI.set(element)
2908};
2909var cacheAPI={get:function(key){return map.hasOwnProperty(key)?map[key]:null
2910},set:function(element){var id=getValidatedKey(element);
2911if(!id){id=++cacheUID;
2912element[CID]=id
2913}if(!map.hasOwnProperty(id)){map[id]=element;
2914data[id]={}
2915}return id
2916},unset:function(element){var id=getValidatedKey(element);
2917if(!id){return
2918}if(supportsDeleteExpando){delete element[CID]
2919}else{if(element.removeAttribute){element.removeAttribute(CID)
2920}}delete map[id];
2921delete data[id]
2922},key:function(element){return getValidatedKey(element)
2923},has:function(element){var id=getValidatedKey(element);
2924return id&&map.hasOwnProperty(id)
2925},each:function(callback){for(var key in map){if(map.hasOwnProperty(key)){callback(key,map[key])
2926}}},data:function(element,name,value){if(value){if(!name){return null
2927}var id=cacheAPI.set(element);
2928return data[id][name]=value
2929}else{var id=cacheAPI.key(element);
2930return data.hasOwnProperty(id)&&data[id].hasOwnProperty(name)?data[id][name]:null
2931}},clear:function(){for(var id in map){var element=map[id];
2932cacheAPI.unset(element)
2933}}};
2934var getValidatedKey=function(element){var id=element[CID];
2935if(!supportsDeleteExpando&&id&&map.hasOwnProperty(id)&&map[id]!=element){element.removeAttribute(CID);
2936id=null
2937}return id
2938};
2939FBL.append(cacheFunction,cacheAPI);
2940return cacheFunction
2941};
2942Firebug.Lite.Cache.StyleSheet=createCache();
2943Firebug.Lite.Cache.Element=createCache();
2944Firebug.Lite.Cache.Event=createCache()
2945}});
2946FBL.ns(function(){with(FBL){var sourceMap={};
2947Firebug.Lite.Proxy={_callbacks:{},load:function(url){var resourceDomain=getDomain(url);
2948var isLocalResource=!resourceDomain||resourceDomain==Firebug.context.window.location.host;
2949return isLocalResource?fetchResource(url):fetchProxyResource(url)
2950},loadJSONP:function(url,callback){var script=createGlobalElement("script"),doc=Firebug.context.document,uid=""+new Date().getTime(),callbackName="callback=Firebug.Lite.Proxy._callbacks."+uid,jsonpURL=url.indexOf("?")!=-1?url+"&"+callbackName:url+"?"+callbackName;
2951Firebug.Lite.Proxy._callbacks[uid]=function(data){if(callback){callback(data)
2952}script.parentNode.removeChild(script);
2953delete Firebug.Lite.Proxy._callbacks[uid]
2954};
2955script.src=jsonpURL;
2956if(doc.documentElement){doc.documentElement.appendChild(script)
2957}},YQL:function(url,callback){var yql="http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22"+encodeURIComponent(url)+"%22&format=xml";
2958this.loadJSONP(yql,function(data){var source=data.results[0];
2959var match=/<body>\s+<p>([\s\S]+)<\/p>\s+<\/body>$/.exec(source);
2960if(match){source=match[1]
2961}console.log(source)
2962})
2963}};
2964Firebug.Lite.Proxy.fetchResourceDisabledMessage='/* Firebug Lite resource fetching is disabled.\nTo enabled it set the Firebug Lite option "disableResourceFetching" to "false".\nMore info at http://getfirebug.com/firebuglite#Options */';
2965var fetchResource=function(url){if(Firebug.disableResourceFetching){var source=sourceMap[url]=Firebug.Lite.Proxy.fetchResourceDisabledMessage;
2966return source
2967}if(sourceMap.hasOwnProperty(url)){return sourceMap[url]
2968}var xhr=FBL.getNativeXHRObject();
2969xhr.open("get",url,false);
2970xhr.send();
2971var source=sourceMap[url]=xhr.responseText;
2972return source
2973};
2974var fetchProxyResource=function(url){if(sourceMap.hasOwnProperty(url)){return sourceMap[url]
2975}var proxyURL=Env.Location.baseDir+"plugin/proxy/proxy.php?url="+encodeURIComponent(url);
2976var response=fetchResource(proxyURL);
2977try{var data=eval("("+response+")")
2978}catch(E){return"ERROR: Firebug Lite Proxy plugin returned an invalid response."
2979}var source=data?data.contents:"";
2980return source
2981}
2982}});
2983FBL.ns(function(){with(FBL){Firebug.Lite.Style={}
2984}});
2985FBL.ns(function(){with(FBL){Firebug.Lite.Script=function(window){this.fileName=null;
2986this.isValid=null;
2987this.baseLineNumber=null;
2988this.lineExtent=null;
2989this.tag=null;
2990this.functionName=null;
2991this.functionSource=null
2992};
2993Firebug.Lite.Script.prototype={isLineExecutable:function(){},pcToLine:function(){},lineToPc:function(){},toString:function(){return"Firebug.Lite.Script"
2994}}
2995}});
2996FBL.ns(function(){with(FBL){Firebug.Lite.Browser=function(window){this.contentWindow=window;
2997this.contentDocument=window.document;
2998this.currentURI={spec:window.location.href}
2999};
3000Firebug.Lite.Browser.prototype={toString:function(){return"Firebug.Lite.Browser"
3001}}
3002}});
3003var JSON=window.JSON||{};
3004(function(){function f(n){return n<10?"0"+n:n
3005}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null
3006};
3007String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf()
3008}
3009}var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;
3010function quote(string){escapable.lastIndex=0;
3011return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];
3012return typeof c==="string"?c:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)
3013})+'"':'"'+string+'"'
3014}function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];
3015if(value&&typeof value==="object"&&typeof value.toJSON==="function"){value=value.toJSON(key)
3016}if(typeof rep==="function"){value=rep.call(holder,key,value)
3017}switch(typeof value){case"string":return quote(value);
3018case"number":return isFinite(value)?String(value):"null";
3019case"boolean":case"null":return String(value);
3020case"object":if(!value){return"null"
3021}gap+=indent;
3022partial=[];
3023if(Object.prototype.toString.apply(value)==="[object Array]"){length=value.length;
3024for(i=0;
3025i<length;
3026i+=1){partial[i]=str(i,value)||"null"
3027}v=partial.length===0?"[]":gap?"[\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"]":"["+partial.join(",")+"]";
3028gap=mind;
3029return v
3030}if(rep&&typeof rep==="object"){length=rep.length;
3031for(i=0;
3032i<length;
3033i+=1){k=rep[i];
3034if(typeof k==="string"){v=str(k,value);
3035if(v){partial.push(quote(k)+(gap?": ":":")+v)
3036}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);
3037if(v){partial.push(quote(k)+(gap?": ":":")+v)
3038}}}}v=partial.length===0?"{}":gap?"{\n"+gap+partial.join(",\n"+gap)+"\n"+mind+"}":"{"+partial.join(",")+"}";
3039gap=mind;
3040return v
3041}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(value,replacer,space){var i;
3042gap="";
3043indent="";
3044if(typeof space==="number"){for(i=0;
3045i<space;
3046i+=1){indent+=" "
3047}}else{if(typeof space==="string"){indent=space
3048}}rep=replacer;
3049if(replacer&&typeof replacer!=="function"&&(typeof replacer!=="object"||typeof replacer.length!=="number")){throw new Error("JSON.stringify")
3050}return str("",{"":value})
3051}
3052}if(typeof JSON.parse!=="function"){JSON.parse=function(text,reviver){var j;
3053function walk(holder,key){var k,v,value=holder[key];
3054if(value&&typeof value==="object"){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);
3055if(v!==undefined){value[k]=v
3056}else{delete value[k]
3057}}}}return reviver.call(holder,key,value)
3058}text=String(text);
3059cx.lastIndex=0;
3060if(cx.test(text)){text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)
3061})
3062}if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){j=eval("("+text+")");
3063return typeof reviver==="function"?walk({"":j},""):j
3064}throw new SyntaxError("JSON.parse")
3065}
3066}FBL.JSON=JSON
3067}());
3068(function(){var store=(function(){var api={},win=window,doc=win.document,localStorageName="localStorage",globalStorageName="globalStorage",namespace="__firebug__storejs__",storage;
3069api.disabled=false;
3070api.set=function(key,value){};
3071api.get=function(key){};
3072api.remove=function(key){};
3073api.clear=function(){};
3074api.transact=function(key,transactionFn){var val=api.get(key);
3075if(typeof val=="undefined"){val={}
3076}transactionFn(val);
3077api.set(key,val)
3078};
3079api.serialize=function(value){return JSON.stringify(value)
3080};
3081api.deserialize=function(value){if(typeof value!="string"){return undefined
3082}return JSON.parse(value)
3083};
3084function isLocalStorageNameSupported(){try{return(localStorageName in win&&win[localStorageName])
3085}catch(err){return false
3086}}function isGlobalStorageNameSupported(){try{return(globalStorageName in win&&win[globalStorageName]&&win[globalStorageName][win.location.hostname])
3087}catch(err){return false
3088}}if(isLocalStorageNameSupported()){storage=win[localStorageName];
3089api.set=function(key,val){storage.setItem(key,api.serialize(val))
3090};
3091api.get=function(key){return api.deserialize(storage.getItem(key))
3092};
3093api.remove=function(key){storage.removeItem(key)
3094};
3095api.clear=function(){storage.clear()
3096}
3097}else{if(isGlobalStorageNameSupported()){storage=win[globalStorageName][win.location.hostname];
3098api.set=function(key,val){storage[key]=api.serialize(val)
3099};
3100api.get=function(key){return api.deserialize(storage[key]&&storage[key].value)
3101};
3102api.remove=function(key){delete storage[key]
3103};
3104api.clear=function(){for(var key in storage){delete storage[key]
3105}}
3106}else{if(doc.documentElement.addBehavior){var storage=doc.createElement("div");
3107function withIEStorage(storeFunction){return function(){var args=Array.prototype.slice.call(arguments,0);
3108args.unshift(storage);
3109doc.documentElement.appendChild(storage);
3110storage.addBehavior("#default#userData");
3111storage.load(localStorageName);
3112var result=storeFunction.apply(api,args);
3113doc.documentElement.removeChild(storage);
3114return result
3115}
3116}api.set=withIEStorage(function(storage,key,val){storage.setAttribute(key,api.serialize(val));
3117storage.save(localStorageName)
3118});
3119api.get=withIEStorage(function(storage,key){return api.deserialize(storage.getAttribute(key))
3120});
3121api.remove=withIEStorage(function(storage,key){storage.removeAttribute(key);
3122storage.save(localStorageName)
3123});
3124api.clear=withIEStorage(function(storage){var attributes=storage.XMLDocument.documentElement.attributes;
3125storage.load(localStorageName);
3126for(var i=0,attr;
3127attr=attributes[i];
3128i++){storage.removeAttribute(attr.name)
3129}storage.save(localStorageName)
3130})
3131}}}try{api.set(namespace,namespace);
3132if(api.get(namespace)!=namespace){api.disabled=true
3133}api.remove(namespace)
3134}catch(e){api.disabled=true
3135}return api
3136})();
3137if(typeof module!="undefined"){module.exports=store
3138}FBL.Store=store
3139})();
3140FBL.ns(function(){with(FBL){var chunker=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;
3141[0,0].sort(function(){baseHasDuplicate=false;
3142return 0
3143});
3144var Sizzle=function(selector,context,results,seed){results=results||[];
3145var origContext=context=context||document;
3146if(context.nodeType!==1&&context.nodeType!==9){return[]
3147}if(!selector||typeof selector!=="string"){return results
3148}var parts=[],m,set,checkSet,check,mode,extra,prune=true,contextXML=isXML(context),soFar=selector;
3149while((chunker.exec(""),m=chunker.exec(soFar))!==null){soFar=m[3];
3150parts.push(m[1]);
3151if(m[2]){extra=m[3];
3152break
3153}}if(parts.length>1&&origPOS.exec(selector)){if(parts.length===2&&Expr.relative[parts[0]]){set=posProcess(parts[0]+parts[1],context)
3154}else{set=Expr.relative[parts[0]]?[context]:Sizzle(parts.shift(),context);
3155while(parts.length){selector=parts.shift();
3156if(Expr.relative[selector]){selector+=parts.shift()
3157}set=posProcess(selector,set)
3158}}}else{if(!seed&&parts.length>1&&context.nodeType===9&&!contextXML&&Expr.match.ID.test(parts[0])&&!Expr.match.ID.test(parts[parts.length-1])){var ret=Sizzle.find(parts.shift(),context,contextXML);
3159context=ret.expr?Sizzle.filter(ret.expr,ret.set)[0]:ret.set[0]
3160}if(context){var ret=seed?{expr:parts.pop(),set:makeArray(seed)}:Sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentNode?context.parentNode:context,contextXML);
3161set=ret.expr?Sizzle.filter(ret.expr,ret.set):ret.set;
3162if(parts.length>0){checkSet=makeArray(set)
3163}else{prune=false
3164}while(parts.length){var cur=parts.pop(),pop=cur;
3165if(!Expr.relative[cur]){cur=""
3166}else{pop=parts.pop()
3167}if(pop==null){pop=context
3168}Expr.relative[cur](checkSet,pop,contextXML)
3169}}else{checkSet=parts=[]
3170}}if(!checkSet){checkSet=set
3171}if(!checkSet){throw"Syntax error, unrecognized expression: "+(cur||selector)
3172}if(toString.call(checkSet)==="[object Array]"){if(!prune){results.push.apply(results,checkSet)
3173}else{if(context&&context.nodeType===1){for(var i=0;
3174checkSet[i]!=null;
3175i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&contains(context,checkSet[i]))){results.push(set[i])
3176}}}else{for(var i=0;
3177checkSet[i]!=null;
3178i++){if(checkSet[i]&&checkSet[i].nodeType===1){results.push(set[i])
3179}}}}}else{makeArray(checkSet,results)
3180}if(extra){Sizzle(extra,origContext,results,seed);
3181Sizzle.uniqueSort(results)
3182}return results
3183};
3184Sizzle.uniqueSort=function(results){if(sortOrder){hasDuplicate=baseHasDuplicate;
3185results.sort(sortOrder);
3186if(hasDuplicate){for(var i=1;
3187i<results.length;
3188i++){if(results[i]===results[i-1]){results.splice(i--,1)
3189}}}}return results
3190};
3191Sizzle.matches=function(expr,set){return Sizzle(expr,null,null,set)
3192};
3193Sizzle.find=function(expr,context,isXML){var set,match;
3194if(!expr){return[]
3195}for(var i=0,l=Expr.order.length;
3196i<l;
3197i++){var type=Expr.order[i],match;
3198if((match=Expr.leftMatch[type].exec(expr))){var left=match[1];
3199match.splice(1,1);
3200if(left.substr(left.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");
3201set=Expr.find[type](match,context,isXML);
3202if(set!=null){expr=expr.replace(Expr.match[type],"");
3203break
3204}}}}if(!set){set=context.getElementsByTagName("*")
3205}return{set:set,expr:expr}
3206};
3207Sizzle.filter=function(expr,set,inplace,not){var old=expr,result=[],curLoop=set,match,anyFound,isXMLFilter=set&&set[0]&&isXML(set[0]);
3208while(expr&&set.length){for(var type in Expr.filter){if((match=Expr.match[type].exec(expr))!=null){var filter=Expr.filter[type],found,item;
3209anyFound=false;
3210if(curLoop==result){result=[]
3211}if(Expr.preFilter[type]){match=Expr.preFilter[type](match,curLoop,inplace,result,not,isXMLFilter);
3212if(!match){anyFound=found=true
3213}else{if(match===true){continue
3214}}}if(match){for(var i=0;
3215(item=curLoop[i])!=null;
3216i++){if(item){found=filter(item,match,i,curLoop);
3217var pass=not^!!found;
3218if(inplace&&found!=null){if(pass){anyFound=true
3219}else{curLoop[i]=false
3220}}else{if(pass){result.push(item);
3221anyFound=true
3222}}}}}if(found!==undefined){if(!inplace){curLoop=result
3223}expr=expr.replace(Expr.match[type],"");
3224if(!anyFound){return[]
3225}break
3226}}}if(expr==old){if(anyFound==null){throw"Syntax error, unrecognized expression: "+expr
3227}else{break
3228}}old=expr
3229}return curLoop
3230};
3231var Expr=Sizzle.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(elem){return elem.getAttribute("href")
3232}},relative:{"+":function(checkSet,part,isXML){var isPartStr=typeof part==="string",isTag=isPartStr&&!/\W/.test(part),isPartStrNotTag=isPartStr&&!isTag;
3233if(isTag&&!isXML){part=part.toUpperCase()
3234}for(var i=0,l=checkSet.length,elem;
3235i<l;
3236i++){if((elem=checkSet[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}checkSet[i]=isPartStrNotTag||elem&&elem.nodeName===part?elem||false:elem===part
3237}}if(isPartStrNotTag){Sizzle.filter(part,checkSet,true)
3238}},">":function(checkSet,part,isXML){var isPartStr=typeof part==="string";
3239if(isPartStr&&!/\W/.test(part)){part=isXML?part:part.toUpperCase();
3240for(var i=0,l=checkSet.length;
3241i<l;
3242i++){var elem=checkSet[i];
3243if(elem){var parent=elem.parentNode;
3244checkSet[i]=parent.nodeName===part?parent:false
3245}}}else{for(var i=0,l=checkSet.length;
3246i<l;
3247i++){var elem=checkSet[i];
3248if(elem){checkSet[i]=isPartStr?elem.parentNode:elem.parentNode===part
3249}}if(isPartStr){Sizzle.filter(part,checkSet,true)
3250}}},"":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;
3251if(!/\W/.test(part)){var nodeCheck=part=isXML?part:part.toUpperCase();
3252checkFn=dirNodeCheck
3253}checkFn("parentNode",part,doneName,checkSet,nodeCheck,isXML)
3254},"~":function(checkSet,part,isXML){var doneName=done++,checkFn=dirCheck;
3255if(typeof part==="string"&&!/\W/.test(part)){var nodeCheck=part=isXML?part:part.toUpperCase();
3256checkFn=dirNodeCheck
3257}checkFn("previousSibling",part,doneName,checkSet,nodeCheck,isXML)
3258}},find:{ID:function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);
3259return m?[m]:[]
3260}},NAME:function(match,context,isXML){if(typeof context.getElementsByName!=="undefined"){var ret=[],results=context.getElementsByName(match[1]);
3261for(var i=0,l=results.length;
3262i<l;
3263i++){if(results[i].getAttribute("name")===match[1]){ret.push(results[i])
3264}}return ret.length===0?null:ret
3265}},TAG:function(match,context){return context.getElementsByTagName(match[1])
3266}},preFilter:{CLASS:function(match,curLoop,inplace,result,not,isXML){match=" "+match[1].replace(/\\/g,"")+" ";
3267if(isXML){return match
3268}for(var i=0,elem;
3269(elem=curLoop[i])!=null;
3270i++){if(elem){if(not^(elem.className&&(" "+elem.className+" ").indexOf(match)>=0)){if(!inplace){result.push(elem)
3271}}else{if(inplace){curLoop[i]=false
3272}}}}return false
3273},ID:function(match){return match[1].replace(/\\/g,"")
3274},TAG:function(match,curLoop){for(var i=0;
3275curLoop[i]===false;
3276i++){}return curLoop[i]&&isXML(curLoop[i])?match[1]:match[1].toUpperCase()
3277},CHILD:function(match){if(match[1]=="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]=="even"&&"2n"||match[2]=="odd"&&"2n+1"||!/\D/.test(match[2])&&"0n+"+match[2]||match[2]);
3278match[2]=(test[1]+(test[2]||1))-0;
3279match[3]=test[3]-0
3280}match[0]=done++;
3281return match
3282},ATTR:function(match,curLoop,inplace,result,not,isXML){var name=match[1].replace(/\\/g,"");
3283if(!isXML&&Expr.attrMap[name]){match[1]=Expr.attrMap[name]
3284}if(match[2]==="~="){match[4]=" "+match[4]+" "
3285}return match
3286},PSEUDO:function(match,curLoop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=Sizzle(match[3],null,null,curLoop)
3287}else{var ret=Sizzle.filter(match[3],curLoop,inplace,true^not);
3288if(!inplace){result.push.apply(result,ret)
3289}return false
3290}}else{if(Expr.match.POS.test(match[0])||Expr.match.CHILD.test(match[0])){return true
3291}}return match
3292},POS:function(match){match.unshift(true);
3293return match
3294}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"
3295},disabled:function(elem){return elem.disabled===true
3296},checked:function(elem){return elem.checked===true
3297},selected:function(elem){elem.parentNode.selectedIndex;
3298return elem.selected===true
3299},parent:function(elem){return !!elem.firstChild
3300},empty:function(elem){return !elem.firstChild
3301},has:function(elem,i,match){return !!Sizzle(match[3],elem).length
3302},header:function(elem){return/h\d/i.test(elem.nodeName)
3303},text:function(elem){return"text"===elem.type
3304},radio:function(elem){return"radio"===elem.type
3305},checkbox:function(elem){return"checkbox"===elem.type
3306},file:function(elem){return"file"===elem.type
3307},password:function(elem){return"password"===elem.type
3308},submit:function(elem){return"submit"===elem.type
3309},image:function(elem){return"image"===elem.type
3310},reset:function(elem){return"reset"===elem.type
3311},button:function(elem){return"button"===elem.type||elem.nodeName.toUpperCase()==="BUTTON"
3312},input:function(elem){return/input|select|textarea|button/i.test(elem.nodeName)
3313}},setFilters:{first:function(elem,i){return i===0
3314},last:function(elem,i,match,array){return i===array.length-1
3315},even:function(elem,i){return i%2===0
3316},odd:function(elem,i){return i%2===1
3317},lt:function(elem,i,match){return i<match[3]-0
3318},gt:function(elem,i,match){return i>match[3]-0
3319},nth:function(elem,i,match){return match[3]-0==i
3320},eq:function(elem,i,match){return match[3]-0==i
3321}},filter:{PSEUDO:function(elem,match,i,array){var name=match[1],filter=Expr.filters[name];
3322if(filter){return filter(elem,i,match,array)
3323}else{if(name==="contains"){return(elem.textContent||elem.innerText||"").indexOf(match[3])>=0
3324}else{if(name==="not"){var not=match[3];
3325for(var i=0,l=not.length;
3326i<l;
3327i++){if(not[i]===elem){return false
3328}}return true
3329}}}},CHILD:function(elem,match){var type=match[1],node=elem;
3330switch(type){case"only":case"first":while((node=node.previousSibling)){if(node.nodeType===1){return false
3331}}if(type=="first"){return true
3332}node=elem;
3333case"last":while((node=node.nextSibling)){if(node.nodeType===1){return false
3334}}return true;
3335case"nth":var first=match[2],last=match[3];
3336if(first==1&&last==0){return true
3337}var doneName=match[0],parent=elem.parentNode;
3338if(parent&&(parent.sizcache!==doneName||!elem.nodeIndex)){var count=0;
3339for(node=parent.firstChild;
3340node;
3341node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++count
3342}}parent.sizcache=doneName
3343}var diff=elem.nodeIndex-last;
3344if(first==0){return diff==0
3345}else{return(diff%first==0&&diff/first>=0)
3346}}},ID:function(elem,match){return elem.nodeType===1&&elem.getAttribute("id")===match
3347},TAG:function(elem,match){return(match==="*"&&elem.nodeType===1)||elem.nodeName===match
3348},CLASS:function(elem,match){return(" "+(elem.className||elem.getAttribute("class"))+" ").indexOf(match)>-1
3349},ATTR:function(elem,match){var name=match[1],result=Expr.attrHandle[name]?Expr.attrHandle[name](elem):elem[name]!=null?elem[name]:elem.getAttribute(name),value=result+"",type=match[2],check=match[4];
3350return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexOf(check)>=0:type==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:type==="!="?value!=check:type==="^="?value.indexOf(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false
3351},POS:function(elem,match,i,array){var name=match[2],filter=Expr.setFilters[name];
3352if(filter){return filter(elem,i,match,array)
3353}}}};
3354var origPOS=Expr.match.POS;
3355for(var type in Expr.match){Expr.match[type]=new RegExp(Expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);
3356Expr.leftMatch[type]=new RegExp(/(^(?:.|\r|\n)*?)/.source+Expr.match[type].source)
3357}var makeArray=function(array,results){array=Array.prototype.slice.call(array,0);
3358if(results){results.push.apply(results,array);
3359return results
3360}return array
3361};
3362try{Array.prototype.slice.call(document.documentElement.childNodes,0)
3363}catch(e){makeArray=function(array,results){var ret=results||[];
3364if(toString.call(array)==="[object Array]"){Array.prototype.push.apply(ret,array)
3365}else{if(typeof array.length==="number"){for(var i=0,l=array.length;
3366i<l;
3367i++){ret.push(array[i])
3368}}else{for(var i=0;
3369array[i];
3370i++){ret.push(array[i])
3371}}}return ret
3372}
3373}var sortOrder;
3374if(document.documentElement.compareDocumentPosition){sortOrder=function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition){if(a==b){hasDuplicate=true
3375}return 0
3376}var ret=a.compareDocumentPosition(b)&4?-1:a===b?0:1;
3377if(ret===0){hasDuplicate=true
3378}return ret
3379}
3380}else{if("sourceIndex" in document.documentElement){sortOrder=function(a,b){if(!a.sourceIndex||!b.sourceIndex){if(a==b){hasDuplicate=true
3381}return 0
3382}var ret=a.sourceIndex-b.sourceIndex;
3383if(ret===0){hasDuplicate=true
3384}return ret
3385}
3386}else{if(document.createRange){sortOrder=function(a,b){if(!a.ownerDocument||!b.ownerDocument){if(a==b){hasDuplicate=true
3387}return 0
3388}var aRange=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();
3389aRange.setStart(a,0);
3390aRange.setEnd(a,0);
3391bRange.setStart(b,0);
3392bRange.setEnd(b,0);
3393var ret=aRange.compareBoundaryPoints(Range.START_TO_END,bRange);
3394if(ret===0){hasDuplicate=true
3395}return ret
3396}
3397}}}(function(){var form=document.createElement("div"),id="script"+(new Date).getTime();
3398form.innerHTML="<a name='"+id+"'/>";
3399var root=document.documentElement;
3400root.insertBefore(form,root.firstChild);
3401if(!!document.getElementById(id)){Expr.find.ID=function(match,context,isXML){if(typeof context.getElementById!=="undefined"&&!isXML){var m=context.getElementById(match[1]);
3402return m?m.id===match[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===match[1]?[m]:undefined:[]
3403}};
3404Expr.filter.ID=function(elem,match){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");
3405return elem.nodeType===1&&node&&node.nodeValue===match
3406}
3407}root.removeChild(form);
3408root=form=null
3409})();
3410(function(){var div=document.createElement("div");
3411div.appendChild(document.createComment(""));
3412if(div.getElementsByTagName("*").length>0){Expr.find.TAG=function(match,context){var results=context.getElementsByTagName(match[1]);
3413if(match[1]==="*"){var tmp=[];
3414for(var i=0;
3415results[i];
3416i++){if(results[i].nodeType===1){tmp.push(results[i])
3417}}results=tmp
3418}return results
3419}
3420}div.innerHTML="<a href='#'></a>";
3421if(div.firstChild&&typeof div.firstChild.getAttribute!=="undefined"&&div.firstChild.getAttribute("href")!=="#"){Expr.attrHandle.href=function(elem){return elem.getAttribute("href",2)
3422}
3423}div=null
3424})();
3425if(document.querySelectorAll){(function(){var oldSizzle=Sizzle,div=document.createElement("div");
3426div.innerHTML="<p class='TEST'></p>";
3427if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return
3428}Sizzle=function(query,context,extra,seed){context=context||document;
3429if(!seed&&context.nodeType===9&&!isXML(context)){try{return makeArray(context.querySelectorAll(query),extra)
3430}catch(e){}}return oldSizzle(query,context,extra,seed)
3431};
3432for(var prop in oldSizzle){Sizzle[prop]=oldSizzle[prop]
3433}div=null
3434})()
3435}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var div=document.createElement("div");
3436div.innerHTML="<div class='test e'></div><div class='test'></div>";
3437if(div.getElementsByClassName("e").length===0){return
3438}div.lastChild.className="e";
3439if(div.getElementsByClassName("e").length===1){return
3440}Expr.order.splice(1,0,"CLASS");
3441Expr.find.CLASS=function(match,context,isXML){if(typeof context.getElementsByClassName!=="undefined"&&!isXML){return context.getElementsByClassName(match[1])
3442}};
3443div=null
3444})()
3445}function dirNodeCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;
3446for(var i=0,l=checkSet.length;
3447i<l;
3448i++){var elem=checkSet[i];
3449if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;
3450elem.sizset=i
3451}elem=elem[dir];
3452var match=false;
3453while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];
3454break
3455}if(elem.nodeType===1&&!isXML){elem.sizcache=doneName;
3456elem.sizset=i
3457}if(elem.nodeName===cur){match=elem;
3458break
3459}elem=elem[dir]
3460}checkSet[i]=match
3461}}}function dirCheck(dir,cur,doneName,checkSet,nodeCheck,isXML){var sibDir=dir=="previousSibling"&&!isXML;
3462for(var i=0,l=checkSet.length;
3463i<l;
3464i++){var elem=checkSet[i];
3465if(elem){if(sibDir&&elem.nodeType===1){elem.sizcache=doneName;
3466elem.sizset=i
3467}elem=elem[dir];
3468var match=false;
3469while(elem){if(elem.sizcache===doneName){match=checkSet[elem.sizset];
3470break
3471}if(elem.nodeType===1){if(!isXML){elem.sizcache=doneName;
3472elem.sizset=i
3473}if(typeof cur!=="string"){if(elem===cur){match=true;
3474break
3475}}else{if(Sizzle.filter(cur,[elem]).length>0){match=elem;
3476break
3477}}}elem=elem[dir]
3478}checkSet[i]=match
3479}}}var contains=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16
3480}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)
3481};
3482var isXML=function(elem){return elem.nodeType===9&&elem.documentElement.nodeName!=="HTML"||!!elem.ownerDocument&&elem.ownerDocument.documentElement.nodeName!=="HTML"
3483};
3484var posProcess=function(selector,context){var tmpSet=[],later="",match,root=context.nodeType?[context]:context;
3485while((match=Expr.match.PSEUDO.exec(selector))){later+=match[0];
3486selector=selector.replace(Expr.match.PSEUDO,"")
3487}selector=Expr.relative[selector]?selector+"*":selector;
3488for(var i=0,l=root.length;
3489i<l;
3490i++){Sizzle(selector,root[i],tmpSet)
3491}return Sizzle.filter(later,tmpSet)
3492};
3493Firebug.Selector=Sizzle
3494}});
3495FBL.ns(function(){with(FBL){var ElementCache=Firebug.Lite.Cache.Element;
3496var inspectorTS,inspectorTimer,isInspecting;
3497Firebug.Inspector={create:function(){offlineFragment=Env.browser.document.createDocumentFragment();
3498createBoxModelInspector();
3499createOutlineInspector()
3500},destroy:function(){destroyBoxModelInspector();
3501destroyOutlineInspector();
3502offlineFragment=null
3503},toggleInspect:function(){if(isInspecting){this.stopInspecting()
3504}else{Firebug.chrome.inspectButton.changeState("pressed");
3505this.startInspecting()
3506}},startInspecting:function(){isInspecting=true;
3507Firebug.chrome.selectPanel("HTML");
3508createInspectorFrame();
3509var size=Firebug.browser.getWindowScrollSize();
3510fbInspectFrame.style.width=size.width+"px";
3511fbInspectFrame.style.height=size.height+"px";
3512addEvent(fbInspectFrame,"mousemove",Firebug.Inspector.onInspecting);
3513addEvent(fbInspectFrame,"mousedown",Firebug.Inspector.onInspectingClick)
3514},stopInspecting:function(){isInspecting=false;
3515if(outlineVisible){this.hideOutline()
3516}removeEvent(fbInspectFrame,"mousemove",Firebug.Inspector.onInspecting);
3517removeEvent(fbInspectFrame,"mousedown",Firebug.Inspector.onInspectingClick);
3518destroyInspectorFrame();
3519Firebug.chrome.inspectButton.restore();
3520if(Firebug.chrome.type=="popup"){Firebug.chrome.node.focus()
3521}},onInspectingClick:function(e){fbInspectFrame.style.display="none";
3522var targ=Firebug.browser.getElementFromPoint(e.clientX,e.clientY);
3523fbInspectFrame.style.display="block";
3524var id=targ.id;
3525if(id&&/^fbOutline\w$/.test(id)){return
3526}if(id=="FirebugUI"){return
3527}while(targ.nodeType!=1){targ=targ.parentNode
3528}Firebug.Inspector.stopInspecting()
3529},onInspecting:function(e){if(new Date().getTime()-lastInspecting>30){fbInspectFrame.style.display="none";
3530var targ=Firebug.browser.getElementFromPoint(e.clientX,e.clientY);
3531fbInspectFrame.style.display="block";
3532var id=targ.id;
3533if(id&&/^fbOutline\w$/.test(id)){return
3534}if(id=="FirebugUI"){return
3535}while(targ.nodeType!=1){targ=targ.parentNode
3536}if(targ.nodeName.toLowerCase()=="body"){return
3537}Firebug.Inspector.drawOutline(targ);
3538if(ElementCache(targ)){var target=""+ElementCache.key(targ);
3539var lazySelect=function(){inspectorTS=new Date().getTime();
3540if(Firebug.HTML){Firebug.HTML.selectTreeNode(""+ElementCache.key(targ))
3541}};
3542if(inspectorTimer){clearTimeout(inspectorTimer);
3543inspectorTimer=null
3544}if(new Date().getTime()-inspectorTS>200){setTimeout(lazySelect,0)
3545}else{inspectorTimer=setTimeout(lazySelect,300)
3546}}lastInspecting=new Date().getTime()
3547}},onInspectingBody:function(e){if(new Date().getTime()-lastInspecting>30){var targ=e.target;
3548var id=targ.id;
3549if(id&&/^fbOutline\w$/.test(id)){return
3550}if(id=="FirebugUI"){return
3551}while(targ.nodeType!=1){targ=targ.parentNode
3552}if(targ.nodeName.toLowerCase()=="body"){return
3553}Firebug.Inspector.drawOutline(targ);
3554if(ElementCache.has(targ)){FBL.Firebug.HTML.selectTreeNode(""+ElementCache.key(targ))
3555}lastInspecting=new Date().getTime()
3556}},drawOutline:function(el){var border=2;
3557var scrollbarSize=17;
3558var windowSize=Firebug.browser.getWindowSize();
3559var scrollSize=Firebug.browser.getWindowScrollSize();
3560var scrollPosition=Firebug.browser.getWindowScrollPosition();
3561var box=Firebug.browser.getElementBox(el);
3562var top=box.top;
3563var left=box.left;
3564var height=box.height;
3565var width=box.width;
3566var freeHorizontalSpace=scrollPosition.left+windowSize.width-left-width-(!isIE&&scrollSize.height>windowSize.height?scrollbarSize:0);
3567var freeVerticalSpace=scrollPosition.top+windowSize.height-top-height-(!isIE&&scrollSize.width>windowSize.width?scrollbarSize:0);
3568var numVerticalBorders=freeVerticalSpace>0?2:1;
3569var o=outlineElements;
3570var style;
3571style=o.fbOutlineT.style;
3572style.top=top-border+"px";
3573style.left=left+"px";
3574style.height=border+"px";
3575style.width=width+"px";
3576style=o.fbOutlineL.style;
3577style.top=top-border+"px";
3578style.left=left-border+"px";
3579style.height=height+numVerticalBorders*border+"px";
3580style.width=border+"px";
3581style=o.fbOutlineB.style;
3582if(freeVerticalSpace>0){style.top=top+height+"px";
3583style.left=left+"px";
3584style.width=width+"px"
3585}else{style.top=-2*border+"px";
3586style.left=-2*border+"px";
3587style.width=border+"px"
3588}style=o.fbOutlineR.style;
3589if(freeHorizontalSpace>0){style.top=top-border+"px";
3590style.left=left+width+"px";
3591style.height=height+numVerticalBorders*border+"px";
3592style.width=(freeHorizontalSpace<border?freeHorizontalSpace:border)+"px"
3593}else{style.top=-2*border+"px";
3594style.left=-2*border+"px";
3595style.height=border+"px";
3596style.width=border+"px"
3597}if(!outlineVisible){this.showOutline()
3598}},hideOutline:function(){if(!outlineVisible){return
3599}for(var name in outline){offlineFragment.appendChild(outlineElements[name])
3600}outlineVisible=false
3601},showOutline:function(){if(outlineVisible){return
3602}if(boxModelVisible){this.hideBoxModel()
3603}for(var name in outline){Firebug.browser.document.getElementsByTagName("body")[0].appendChild(outlineElements[name])
3604}outlineVisible=true
3605},drawBoxModel:function(el){if(!el||!el.parentNode){return
3606}var box=Firebug.browser.getElementBox(el);
3607var windowSize=Firebug.browser.getWindowSize();
3608var scrollPosition=Firebug.browser.getWindowScrollPosition();
3609var offsetHeight=Firebug.chrome.type=="frame"?Firebug.context.persistedState.height:0;
3610if(box.top>scrollPosition.top+windowSize.height-offsetHeight||box.left>scrollPosition.left+windowSize.width||scrollPosition.top>box.top+box.height||scrollPosition.left>box.left+box.width){return
3611}var top=box.top;
3612var left=box.left;
3613var height=box.height;
3614var width=box.width;
3615var margin=Firebug.browser.getMeasurementBox(el,"margin");
3616var padding=Firebug.browser.getMeasurementBox(el,"padding");
3617var border=Firebug.browser.getMeasurementBox(el,"border");
3618boxModelStyle.top=top-margin.top+"px";
3619boxModelStyle.left=left-margin.left+"px";
3620boxModelStyle.height=height+margin.top+margin.bottom+"px";
3621boxModelStyle.width=width+margin.left+margin.right+"px";
3622boxBorderStyle.top=margin.top+"px";
3623boxBorderStyle.left=margin.left+"px";
3624boxBorderStyle.height=height+"px";
3625boxBorderStyle.width=width+"px";
3626boxPaddingStyle.top=margin.top+border.top+"px";
3627boxPaddingStyle.left=margin.left+border.left+"px";
3628boxPaddingStyle.height=height-border.top-border.bottom+"px";
3629boxPaddingStyle.width=width-border.left-border.right+"px";
3630boxContentStyle.top=margin.top+border.top+padding.top+"px";
3631boxContentStyle.left=margin.left+border.left+padding.left+"px";
3632boxContentStyle.height=height-border.top-padding.top-padding.bottom-border.bottom+"px";
3633boxContentStyle.width=width-border.left-padding.left-padding.right-border.right+"px";
3634if(!boxModelVisible){this.showBoxModel()
3635}},hideBoxModel:function(){if(!boxModelVisible){return
3636}offlineFragment.appendChild(boxModel);
3637boxModelVisible=false
3638},showBoxModel:function(){if(boxModelVisible){return
3639}if(outlineVisible){this.hideOutline()
3640}Firebug.browser.document.getElementsByTagName("body")[0].appendChild(boxModel);
3641boxModelVisible=true
3642}};
3643var offlineFragment=null;
3644var boxModelVisible=false;
3645var boxModel,boxModelStyle,boxMargin,boxMarginStyle,boxBorder,boxBorderStyle,boxPadding,boxPaddingStyle,boxContent,boxContentStyle;
3646var resetStyle="margin:0; padding:0; border:0; position:absolute; overflow:hidden; display:block;";
3647var offscreenStyle=resetStyle+"top:-1234px; left:-1234px;";
3648var inspectStyle=resetStyle+"z-index: 2147483500;";
3649var inspectFrameStyle=resetStyle+"z-index: 2147483550; top:0; left:0; background:url("+Env.Location.skinDir+"pixel_transparent.gif);";
3650var inspectModelOpacity=isIE?"filter:alpha(opacity=80);":"opacity:0.8;";
3651var inspectModelStyle=inspectStyle+inspectModelOpacity;
3652var inspectMarginStyle=inspectStyle+"background: #EDFF64; height:100%; width:100%;";
3653var inspectBorderStyle=inspectStyle+"background: #666;";
3654var inspectPaddingStyle=inspectStyle+"background: SlateBlue;";
3655var inspectContentStyle=inspectStyle+"background: SkyBlue;";
3656var outlineStyle={fbHorizontalLine:"background: #3875D7;height: 2px;",fbVerticalLine:"background: #3875D7;width: 2px;"};
3657var lastInspecting=0;
3658var fbInspectFrame=null;
3659var outlineVisible=false;
3660var outlineElements={};
3661var outline={fbOutlineT:"fbHorizontalLine",fbOutlineL:"fbVerticalLine",fbOutlineB:"fbHorizontalLine",fbOutlineR:"fbVerticalLine"};
3662var getInspectingTarget=function(){};
3663var createInspectorFrame=function createInspectorFrame(){fbInspectFrame=createGlobalElement("div");
3664fbInspectFrame.id="fbInspectFrame";
3665fbInspectFrame.firebugIgnore=true;
3666fbInspectFrame.style.cssText=inspectFrameStyle;
3667Firebug.browser.document.getElementsByTagName("body")[0].appendChild(fbInspectFrame)
3668};
3669var destroyInspectorFrame=function destroyInspectorFrame(){if(fbInspectFrame){Firebug.browser.document.getElementsByTagName("body")[0].removeChild(fbInspectFrame);
3670fbInspectFrame=null
3671}};
3672var createOutlineInspector=function createOutlineInspector(){for(var name in outline){var el=outlineElements[name]=createGlobalElement("div");
3673el.id=name;
3674el.firebugIgnore=true;
3675el.style.cssText=inspectStyle+outlineStyle[outline[name]];
3676offlineFragment.appendChild(el)
3677}};
3678var destroyOutlineInspector=function destroyOutlineInspector(){for(var name in outline){var el=outlineElements[name];
3679el.parentNode.removeChild(el)
3680}};
3681var createBoxModelInspector=function createBoxModelInspector(){boxModel=createGlobalElement("div");
3682boxModel.id="fbBoxModel";
3683boxModel.firebugIgnore=true;
3684boxModelStyle=boxModel.style;
3685boxModelStyle.cssText=inspectModelStyle;
3686boxMargin=createGlobalElement("div");
3687boxMargin.id="fbBoxMargin";
3688boxMarginStyle=boxMargin.style;
3689boxMarginStyle.cssText=inspectMarginStyle;
3690boxModel.appendChild(boxMargin);
3691boxBorder=createGlobalElement("div");
3692boxBorder.id="fbBoxBorder";
3693boxBorderStyle=boxBorder.style;
3694boxBorderStyle.cssText=inspectBorderStyle;
3695boxModel.appendChild(boxBorder);
3696boxPadding=createGlobalElement("div");
3697boxPadding.id="fbBoxPadding";
3698boxPaddingStyle=boxPadding.style;
3699boxPaddingStyle.cssText=inspectPaddingStyle;
3700boxModel.appendChild(boxPadding);
3701boxContent=createGlobalElement("div");
3702boxContent.id="fbBoxContent";
3703boxContentStyle=boxContent.style;
3704boxContentStyle.cssText=inspectContentStyle;
3705boxModel.appendChild(boxContent);
3706offlineFragment.appendChild(boxModel)
3707};
3708var destroyBoxModelInspector=function destroyBoxModelInspector(){boxModel.parentNode.removeChild(boxModel)
3709}
3710}});
3711(function(){FBL.DomplateTag=function DomplateTag(tagName){this.tagName=tagName
3712};
3713FBL.DomplateEmbed=function DomplateEmbed(){};
3714FBL.DomplateLoop=function DomplateLoop(){};
3715var DomplateTag=FBL.DomplateTag;
3716var DomplateEmbed=FBL.DomplateEmbed;
3717var DomplateLoop=FBL.DomplateLoop;
3718var womb=null;
3719FBL.domplate=function(){var lastSubject;
3720for(var i=0;
3721i<arguments.length;
3722++i){lastSubject=lastSubject?copyObject(lastSubject,arguments[i]):arguments[i]
3723}for(var name in lastSubject){var val=lastSubject[name];
3724if(isTag(val)){val.tag.subject=lastSubject
3725}}return lastSubject
3726};
3727var domplate=FBL.domplate;
3728FBL.domplate.context=function(context,fn){var lastContext=domplate.lastContext;
3729domplate.topContext=context;
3730fn.apply(context);
3731domplate.topContext=lastContext
3732};
3733FBL.TAG=function(){var embed=new DomplateEmbed();
3734return embed.merge(arguments)
3735};
3736FBL.FOR=function(){var loop=new DomplateLoop();
3737return loop.merge(arguments)
3738};
3739FBL.DomplateTag.prototype={merge:function(args,oldTag){if(oldTag){this.tagName=oldTag.tagName
3740}this.context=oldTag?oldTag.context:null;
3741this.subject=oldTag?oldTag.subject:null;
3742this.attrs=oldTag?copyObject(oldTag.attrs):{};
3743this.classes=oldTag?copyObject(oldTag.classes):{};
3744this.props=oldTag?copyObject(oldTag.props):null;
3745this.listeners=oldTag?copyArray(oldTag.listeners):null;
3746this.children=oldTag?copyArray(oldTag.children):[];
3747this.vars=oldTag?copyArray(oldTag.vars):[];
3748var attrs=args.length?args[0]:null;
3749var hasAttrs=typeof(attrs)=="object"&&!isTag(attrs);
3750this.children=[];
3751if(domplate.topContext){this.context=domplate.topContext
3752}if(args.length){parseChildren(args,hasAttrs?1:0,this.vars,this.children)
3753}if(hasAttrs){this.parseAttrs(attrs)
3754}return creator(this,DomplateTag)
3755},parseAttrs:function(args){for(var name in args){var val=parseValue(args[name]);
3756readPartNames(val,this.vars);
3757if(name.indexOf("on")==0){var eventName=name.substr(2);
3758if(!this.listeners){this.listeners=[]
3759}this.listeners.push(eventName,val)
3760}else{if(name.indexOf("_")==0){var propName=name.substr(1);
3761if(!this.props){this.props={}
3762}this.props[propName]=val
3763}else{if(name.indexOf("$")==0){var className=name.substr(1);
3764if(!this.classes){this.classes={}
3765}this.classes[className]=val
3766}else{if(name=="class"&&this.attrs.hasOwnProperty(name)){this.attrs[name]+=" "+val
3767}else{this.attrs[name]=val
3768}}}}}},compile:function(){if(this.renderMarkup){return
3769}this.compileMarkup();
3770this.compileDOM()
3771},compileMarkup:function(){this.markupArgs=[];
3772var topBlock=[],topOuts=[],blocks=[],info={args:this.markupArgs,argIndex:0};
3773this.generateMarkup(topBlock,topOuts,blocks,info);
3774this.addCode(topBlock,topOuts,blocks);
3775var fnBlock=["r=(function (__code__, __context__, __in__, __out__"];
3776for(var i=0;
3777i<info.argIndex;
3778++i){fnBlock.push(", s",i)
3779}fnBlock.push(") {");
3780if(this.subject){fnBlock.push("with (this) {")
3781}if(this.context){fnBlock.push("with (__context__) {")
3782}fnBlock.push("with (__in__) {");
3783fnBlock.push.apply(fnBlock,blocks);
3784if(this.subject){fnBlock.push("}")
3785}if(this.context){fnBlock.push("}")
3786}fnBlock.push("}})");
3787function __link__(tag,code,outputs,args){if(!tag||!tag.tag){return
3788}tag.tag.compile();
3789var tagOutputs=[];
3790var markupArgs=[code,tag.tag.context,args,tagOutputs];
3791markupArgs.push.apply(markupArgs,tag.tag.markupArgs);
3792tag.tag.renderMarkup.apply(tag.tag.subject,markupArgs);
3793outputs.push(tag);
3794outputs.push(tagOutputs)
3795}function __escape__(value){function replaceChars(ch){switch(ch){case"<":return"&lt;";
3796case">":return"&gt;";
3797case"&":return"&amp;";
3798case"'":return"&#39;";
3799case'"':return"&quot;"
3800}return"?"
3801}return String(value).replace(/[<>&"']/g,replaceChars)
3802}function __loop__(iter,outputs,fn){var iterOuts=[];
3803outputs.push(iterOuts);
3804if(iter instanceof Array){iter=new ArrayIterator(iter)
3805}try{while(1){var value=iter.next();
3806var itemOuts=[0,0];
3807iterOuts.push(itemOuts);
3808fn.apply(this,[value,itemOuts])
3809}}catch(exc){if(exc!=StopIteration){throw exc
3810}}}var js=fnBlock.join("");
3811var r=null;
3812eval(js);
3813this.renderMarkup=r
3814},getVarNames:function(args){if(this.vars){args.push.apply(args,this.vars)
3815}for(var i=0;
3816i<this.children.length;
3817++i){var child=this.children[i];
3818if(isTag(child)){child.tag.getVarNames(args)
3819}else{if(child instanceof Parts){for(var i=0;
3820i<child.parts.length;
3821++i){if(child.parts[i] instanceof Variable){var name=child.parts[i].name;
3822var names=name.split(".");
3823args.push(names[0])
3824}}}}}},generateMarkup:function(topBlock,topOuts,blocks,info){topBlock.push(',"<',this.tagName,'"');
3825for(var name in this.attrs){if(name!="class"){var val=this.attrs[name];
3826topBlock.push(', " ',name,'=\\""');
3827addParts(val,",",topBlock,info,true);
3828topBlock.push(', "\\""')
3829}}if(this.listeners){for(var i=0;
3830i<this.listeners.length;
3831i+=2){readPartNames(this.listeners[i+1],topOuts)
3832}}if(this.props){for(var name in this.props){readPartNames(this.props[name],topOuts)
3833}}if(this.attrs.hasOwnProperty("class")||this.classes){topBlock.push(', " class=\\""');
3834if(this.attrs.hasOwnProperty("class")){addParts(this.attrs["class"],",",topBlock,info,true)
3835}topBlock.push(', " "');
3836for(var name in this.classes){topBlock.push(", (");
3837addParts(this.classes[name],"",topBlock,info);
3838topBlock.push(' ? "',name,'" + " " : "")')
3839}topBlock.push(', "\\""')
3840}topBlock.push(',">"');
3841this.generateChildMarkup(topBlock,topOuts,blocks,info);
3842topBlock.push(',"</',this.tagName,'>"')
3843},generateChildMarkup:function(topBlock,topOuts,blocks,info){for(var i=0;
3844i<this.children.length;
3845++i){var child=this.children[i];
3846if(isTag(child)){child.tag.generateMarkup(topBlock,topOuts,blocks,info)
3847}else{addParts(child,",",topBlock,info,true)
3848}}},addCode:function(topBlock,topOuts,blocks){if(topBlock.length){blocks.push('__code__.push(""',topBlock.join(""),");")
3849}if(topOuts.length){blocks.push("__out__.push(",topOuts.join(","),");")
3850}topBlock.splice(0,topBlock.length);
3851topOuts.splice(0,topOuts.length)
3852},addLocals:function(blocks){var varNames=[];
3853this.getVarNames(varNames);
3854var map={};
3855for(var i=0;
3856i<varNames.length;
3857++i){var name=varNames[i];
3858if(map.hasOwnProperty(name)){continue
3859}map[name]=1;
3860var names=name.split(".");
3861blocks.push("var ",names[0]+" = __in__."+names[0]+";")
3862}},compileDOM:function(){var path=[];
3863var blocks=[];
3864this.domArgs=[];
3865path.embedIndex=0;
3866path.loopIndex=0;
3867path.staticIndex=0;
3868path.renderIndex=0;
3869var nodeCount=this.generateDOM(path,blocks,this.domArgs);
3870var fnBlock=["r=(function (root, context, o"];
3871for(var i=0;
3872i<path.staticIndex;
3873++i){fnBlock.push(", ","s"+i)
3874}for(var i=0;
3875i<path.renderIndex;
3876++i){fnBlock.push(", ","d"+i)
3877}fnBlock.push(") {");
3878for(var i=0;
3879i<path.loopIndex;
3880++i){fnBlock.push("var l",i," = 0;")
3881}for(var i=0;
3882i<path.embedIndex;
3883++i){fnBlock.push("var e",i," = 0;")
3884}if(this.subject){fnBlock.push("with (this) {")
3885}if(this.context){fnBlock.push("with (context) {")
3886}fnBlock.push(blocks.join(""));
3887if(this.subject){fnBlock.push("}")
3888}if(this.context){fnBlock.push("}")
3889}fnBlock.push("return ",nodeCount,";");
3890fnBlock.push("})");
3891function __bind__(object,fn){return function(event){return fn.apply(object,[event])
3892}
3893}function __link__(node,tag,args){if(!tag||!tag.tag){return
3894}tag.tag.compile();
3895var domArgs=[node,tag.tag.context,0];
3896domArgs.push.apply(domArgs,tag.tag.domArgs);
3897domArgs.push.apply(domArgs,args);
3898return tag.tag.renderDOM.apply(tag.tag.subject,domArgs)
3899}var self=this;
3900function __loop__(iter,fn){var nodeCount=0;
3901for(var i=0;
3902i<iter.length;
3903++i){iter[i][0]=i;
3904iter[i][1]=nodeCount;
3905nodeCount+=fn.apply(this,iter[i])
3906}return nodeCount
3907}function __path__(parent,offset){var root=parent;
3908for(var i=2;
3909i<arguments.length;
3910++i){var index=arguments[i];
3911if(i==3){index+=offset
3912}if(index==-1){parent=parent.parentNode
3913}else{parent=parent.childNodes[index]
3914}}return parent
3915}var js=fnBlock.join("");
3916var r=null;
3917eval(js);
3918this.renderDOM=r
3919},generateDOM:function(path,blocks,args){if(this.listeners||this.props){this.generateNodePath(path,blocks)
3920}if(this.listeners){for(var i=0;
3921i<this.listeners.length;
3922i+=2){var val=this.listeners[i+1];
3923var arg=generateArg(val,path,args);
3924blocks.push('addEvent(node, "',this.listeners[i],'", __bind__(this, ',arg,"), false);")
3925}}if(this.props){for(var name in this.props){var val=this.props[name];
3926var arg=generateArg(val,path,args);
3927blocks.push("node.",name," = ",arg,";")
3928}}this.generateChildDOM(path,blocks,args);
3929return 1
3930},generateNodePath:function(path,blocks){blocks.push("var node = __path__(root, o");
3931for(var i=0;
3932i<path.length;
3933++i){blocks.push(",",path[i])
3934}blocks.push(");")
3935},generateChildDOM:function(path,blocks,args){path.push(0);
3936for(var i=0;
3937i<this.children.length;
3938++i){var child=this.children[i];
3939if(isTag(child)){path[path.length-1]+="+"+child.tag.generateDOM(path,blocks,args)
3940}else{path[path.length-1]+="+1"
3941}}path.pop()
3942}};
3943FBL.DomplateEmbed.prototype=copyObject(FBL.DomplateTag.prototype,{merge:function(args,oldTag){this.value=oldTag?oldTag.value:parseValue(args[0]);
3944this.attrs=oldTag?oldTag.attrs:{};
3945this.vars=oldTag?copyArray(oldTag.vars):[];
3946var attrs=args[1];
3947for(var name in attrs){var val=parseValue(attrs[name]);
3948this.attrs[name]=val;
3949readPartNames(val,this.vars)
3950}return creator(this,DomplateEmbed)
3951},getVarNames:function(names){if(this.value instanceof Parts){names.push(this.value.parts[0].name)
3952}if(this.vars){names.push.apply(names,this.vars)
3953}},generateMarkup:function(topBlock,topOuts,blocks,info){this.addCode(topBlock,topOuts,blocks);
3954blocks.push("__link__(");
3955addParts(this.value,"",blocks,info);
3956blocks.push(", __code__, __out__, {");
3957var lastName=null;
3958for(var name in this.attrs){if(lastName){blocks.push(",")
3959}lastName=name;
3960var val=this.attrs[name];
3961blocks.push('"',name,'":');
3962addParts(val,"",blocks,info)
3963}blocks.push("});")
3964},generateDOM:function(path,blocks,args){var embedName="e"+path.embedIndex++;
3965this.generateNodePath(path,blocks);
3966var valueName="d"+path.renderIndex++;
3967var argsName="d"+path.renderIndex++;
3968blocks.push(embedName+" = __link__(node, ",valueName,", ",argsName,");");
3969return embedName
3970}});
3971FBL.DomplateLoop.prototype=copyObject(FBL.DomplateTag.prototype,{merge:function(args,oldTag){this.varName=oldTag?oldTag.varName:args[0];
3972this.iter=oldTag?oldTag.iter:parseValue(args[1]);
3973this.vars=[];
3974this.children=oldTag?copyArray(oldTag.children):[];
3975var offset=Math.min(args.length,2);
3976parseChildren(args,offset,this.vars,this.children);
3977return creator(this,DomplateLoop)
3978},getVarNames:function(names){if(this.iter instanceof Parts){names.push(this.iter.parts[0].name)
3979}DomplateTag.prototype.getVarNames.apply(this,[names])
3980},generateMarkup:function(topBlock,topOuts,blocks,info){this.addCode(topBlock,topOuts,blocks);
3981var iterName;
3982if(this.iter instanceof Parts){var part=this.iter.parts[0];
3983iterName=part.name;
3984if(part.format){for(var i=0;
3985i<part.format.length;
3986++i){iterName=part.format[i]+"("+iterName+")"
3987}}}else{iterName=this.iter
3988}blocks.push("__loop__.apply(this, [",iterName,", __out__, function(",this.varName,", __out__) {");
3989this.generateChildMarkup(topBlock,topOuts,blocks,info);
3990this.addCode(topBlock,topOuts,blocks);
3991blocks.push("}]);")
3992},generateDOM:function(path,blocks,args){var iterName="d"+path.renderIndex++;
3993var counterName="i"+path.loopIndex;
3994var loopName="l"+path.loopIndex++;
3995if(!path.length){path.push(-1,0)
3996}var preIndex=path.renderIndex;
3997path.renderIndex=0;
3998var nodeCount=0;
3999var subBlocks=[];
4000var basePath=path[path.length-1];
4001for(var i=0;
4002i<this.children.length;
4003++i){path[path.length-1]=basePath+"+"+loopName+"+"+nodeCount;
4004var child=this.children[i];
4005if(isTag(child)){nodeCount+="+"+child.tag.generateDOM(path,subBlocks,args)
4006}else{nodeCount+="+1"
4007}}path[path.length-1]=basePath+"+"+loopName;
4008blocks.push(loopName," = __loop__.apply(this, [",iterName,", function(",counterName,",",loopName);
4009for(var i=0;
4010i<path.renderIndex;
4011++i){blocks.push(",d"+i)
4012}blocks.push(") {");
4013blocks.push(subBlocks.join(""));
4014blocks.push("return ",nodeCount,";");
4015blocks.push("}]);");
4016path.renderIndex=preIndex;
4017return loopName
4018}});
4019function Variable(name,format){this.name=name;
4020this.format=format
4021}function Parts(parts){this.parts=parts
4022}function parseParts(str){var re=/\$([_A-Za-z][_A-Za-z0-9.|]*)/g;
4023var index=0;
4024var parts=[];
4025var m;
4026while(m=re.exec(str)){var pre=str.substr(index,(re.lastIndex-m[0].length)-index);
4027if(pre){parts.push(pre)
4028}var expr=m[1].split("|");
4029parts.push(new Variable(expr[0],expr.slice(1)));
4030index=re.lastIndex
4031}if(!index){return str
4032}var post=str.substr(index);
4033if(post){parts.push(post)
4034}return new Parts(parts)
4035}function parseValue(val){return typeof(val)=="string"?parseParts(val):val
4036}function parseChildren(args,offset,vars,children){for(var i=offset;
4037i<args.length;
4038++i){var val=parseValue(args[i]);
4039children.push(val);
4040readPartNames(val,vars)
4041}}function readPartNames(val,vars){if(val instanceof Parts){for(var i=0;
4042i<val.parts.length;
4043++i){var part=val.parts[i];
4044if(part instanceof Variable){vars.push(part.name)
4045}}}}function generateArg(val,path,args){if(val instanceof Parts){var vals=[];
4046for(var i=0;
4047i<val.parts.length;
4048++i){var part=val.parts[i];
4049if(part instanceof Variable){var varName="d"+path.renderIndex++;
4050if(part.format){for(var j=0;
4051j<part.format.length;
4052++j){varName=part.format[j]+"("+varName+")"
4053}}vals.push(varName)
4054}else{vals.push('"'+part.replace(/"/g,'\\"')+'"')
4055}}return vals.join("+")
4056}else{args.push(val);
4057return"s"+path.staticIndex++
4058}}function addParts(val,delim,block,info,escapeIt){var vals=[];
4059if(val instanceof Parts){for(var i=0;
4060i<val.parts.length;
4061++i){var part=val.parts[i];
4062if(part instanceof Variable){var partName=part.name;
4063if(part.format){for(var j=0;
4064j<part.format.length;
4065++j){partName=part.format[j]+"("+partName+")"
4066}}if(escapeIt){vals.push("__escape__("+partName+")")
4067}else{vals.push(partName)
4068}}else{vals.push('"'+part+'"')
4069}}}else{if(isTag(val)){info.args.push(val);
4070vals.push("s"+info.argIndex++)
4071}else{vals.push('"'+val+'"')
4072}}var parts=vals.join(delim);
4073if(parts){block.push(delim,parts)
4074}}function isTag(obj){return(typeof(obj)=="function"||obj instanceof Function)&&!!obj.tag
4075}function creator(tag,cons){var fn=new Function("var tag = arguments.callee.tag;var cons = arguments.callee.cons;var newTag = new cons();return newTag.merge(arguments, tag);");
4076fn.tag=tag;
4077fn.cons=cons;
4078extend(fn,Renderer);
4079return fn
4080}function copyArray(oldArray){var ary=[];
4081if(oldArray){for(var i=0;
4082i<oldArray.length;
4083++i){ary.push(oldArray[i])
4084}}return ary
4085}function copyObject(l,r){var m={};
4086extend(m,l);
4087extend(m,r);
4088return m
4089}function extend(l,r){for(var n in r){l[n]=r[n]
4090}}function addEvent(object,name,handler){if(document.all){object.attachEvent("on"+name,handler)
4091}else{object.addEventListener(name,handler,false)
4092}}function ArrayIterator(array){var index=-1;
4093this.next=function(){if(++index>=array.length){throw StopIteration
4094}return array[index]
4095}
4096}function StopIteration(){}FBL.$break=function(){throw StopIteration
4097};
4098var Renderer={renderHTML:function(args,outputs,self){var code=[];
4099var markupArgs=[code,this.tag.context,args,outputs];
4100markupArgs.push.apply(markupArgs,this.tag.markupArgs);
4101this.tag.renderMarkup.apply(self?self:this.tag.subject,markupArgs);
4102return code.join("")
4103},insertRows:function(args,before,self){this.tag.compile();
4104var outputs=[];
4105var html=this.renderHTML(args,outputs,self);
4106var doc=before.ownerDocument;
4107var div=doc.createElement("div");
4108div.innerHTML="<table><tbody>"+html+"</tbody></table>";
4109var tbody=div.firstChild.firstChild;
4110var parent=before.tagName=="TR"?before.parentNode:before;
4111var after=before.tagName=="TR"?before.nextSibling:null;
4112var firstRow=tbody.firstChild,lastRow;
4113while(tbody.firstChild){lastRow=tbody.firstChild;
4114if(after){parent.insertBefore(lastRow,after)
4115}else{parent.appendChild(lastRow)
4116}}var offset=0;
4117if(before.tagName=="TR"){var node=firstRow.parentNode.firstChild;
4118for(;
4119node&&node!=firstRow;
4120node=node.nextSibling){++offset
4121}}var domArgs=[firstRow,this.tag.context,offset];
4122domArgs.push.apply(domArgs,this.tag.domArgs);
4123domArgs.push.apply(domArgs,outputs);
4124this.tag.renderDOM.apply(self?self:this.tag.subject,domArgs);
4125return[firstRow,lastRow]
4126},insertBefore:function(args,before,self){return this.insertNode(args,before.ownerDocument,before,false,self)
4127},insertAfter:function(args,after,self){return this.insertNode(args,after.ownerDocument,after,true,self)
4128},insertNode:function(args,doc,element,isAfter,self){if(!args){args={}
4129}this.tag.compile();
4130var outputs=[];
4131var html=this.renderHTML(args,outputs,self);
4132var doc=element.ownerDocument;
4133if(!womb||womb.ownerDocument!=doc){womb=doc.createElement("div")
4134}womb.innerHTML=html;
4135var root=womb.firstChild;
4136if(isAfter){while(womb.firstChild){if(element.nextSibling){element.parentNode.insertBefore(womb.firstChild,element.nextSibling)
4137}else{element.parentNode.appendChild(womb.firstChild)
4138}}}else{while(womb.lastChild){element.parentNode.insertBefore(womb.lastChild,element)
4139}}var domArgs=[root,this.tag.context,0];
4140domArgs.push.apply(domArgs,this.tag.domArgs);
4141domArgs.push.apply(domArgs,outputs);
4142this.tag.renderDOM.apply(self?self:this.tag.subject,domArgs);
4143return root
4144},replace:function(args,parent,self){this.tag.compile();
4145var outputs=[];
4146var html=this.renderHTML(args,outputs,self);
4147var root;
4148if(parent.nodeType==1){parent.innerHTML=html;
4149root=parent.firstChild
4150}else{if(!parent||parent.nodeType!=9){parent=document
4151}if(!womb||womb.ownerDocument!=parent){womb=parent.createElement("div")
4152}womb.innerHTML=html;
4153root=womb.firstChild
4154}var domArgs=[root,this.tag.context,0];
4155domArgs.push.apply(domArgs,this.tag.domArgs);
4156domArgs.push.apply(domArgs,outputs);
4157this.tag.renderDOM.apply(self?self:this.tag.subject,domArgs);
4158return root
4159},append:function(args,parent,self){this.tag.compile();
4160var outputs=[];
4161var html=this.renderHTML(args,outputs,self);
4162if(!womb||womb.ownerDocument!=parent.ownerDocument){womb=parent.ownerDocument.createElement("div")
4163}womb.innerHTML=html;
4164var root=womb.firstChild;
4165while(womb.firstChild){parent.appendChild(womb.firstChild)
4166}womb=null;
4167var domArgs=[root,this.tag.context,0];
4168domArgs.push.apply(domArgs,this.tag.domArgs);
4169domArgs.push.apply(domArgs,outputs);
4170this.tag.renderDOM.apply(self?self:this.tag.subject,domArgs);
4171return root
4172}};
4173function defineTags(){for(var i=0;
4174i<arguments.length;
4175++i){var tagName=arguments[i];
4176var fn=new Function("var newTag = new arguments.callee.DomplateTag('"+tagName+"'); return newTag.merge(arguments);");
4177fn.DomplateTag=DomplateTag;
4178var fnName=tagName.toUpperCase();
4179FBL[fnName]=fn
4180}}defineTags("a","button","br","canvas","code","col","colgroup","div","fieldset","form","h1","h2","h3","hr","img","input","label","legend","li","ol","optgroup","option","p","pre","select","span","strong","table","tbody","td","textarea","tfoot","th","thead","tr","tt","ul","iframe")
4181})();
4182var FirebugReps=FBL.ns(function(){with(FBL){var OBJECTBOX=this.OBJECTBOX=SPAN({"class":"objectBox objectBox-$className"});
4183var OBJECTBLOCK=this.OBJECTBLOCK=DIV({"class":"objectBox objectBox-$className"});
4184var OBJECTLINK=this.OBJECTLINK=isIE6?A({"class":"objectLink objectLink-$className a11yFocus",href:"javascript:void(0)",title:"$object|FBL.getElementXPath",_repObject:"$object"}):A({"class":"objectLink objectLink-$className a11yFocus",title:"$object|FBL.getElementXPath",_repObject:"$object"});
4185this.Undefined=domplate(Firebug.Rep,{tag:OBJECTBOX("undefined"),className:"undefined",supportsObject:function(object,type){return type=="undefined"
4186}});
4187this.Null=domplate(Firebug.Rep,{tag:OBJECTBOX("null"),className:"null",supportsObject:function(object,type){return object==null
4188}});
4189this.Nada=domplate(Firebug.Rep,{tag:SPAN(""),className:"nada"});
4190this.Number=domplate(Firebug.Rep,{tag:OBJECTBOX("$object"),className:"number",supportsObject:function(object,type){return type=="boolean"||type=="number"
4191}});
4192this.String=domplate(Firebug.Rep,{tag:OBJECTBOX("&quot;$object&quot;"),shortTag:OBJECTBOX("&quot;$object|cropString&quot;"),className:"string",supportsObject:function(object,type){return type=="string"
4193}});
4194this.Text=domplate(Firebug.Rep,{tag:OBJECTBOX("$object"),shortTag:OBJECTBOX("$object|cropString"),className:"text"});
4195this.Caption=domplate(Firebug.Rep,{tag:SPAN({"class":"caption"},"$object")});
4196this.Warning=domplate(Firebug.Rep,{tag:DIV({"class":"warning focusRow",role:"listitem"},"$object|STR")});
4197this.Func=domplate(Firebug.Rep,{tag:OBJECTLINK("$object|summarizeFunction"),summarizeFunction:function(fn){var fnRegex=/function ([^(]+\([^)]*\)) \{/;
4198var fnText=safeToString(fn);
4199var m=fnRegex.exec(fnText);
4200return m?m[1]:"function()"
4201},copySource:function(fn){copyToClipboard(safeToString(fn))
4202},monitor:function(fn,script,monitored){if(monitored){Firebug.Debugger.unmonitorScript(fn,script,"monitor")
4203}else{Firebug.Debugger.monitorScript(fn,script,"monitor")
4204}},className:"function",supportsObject:function(object,type){return isFunction(object)
4205},inspectObject:function(fn,context){var sourceLink=findSourceForFunction(fn,context);
4206if(sourceLink){Firebug.chrome.select(sourceLink)
4207}if(FBTrace.DBG_FUNCTION_NAME){FBTrace.sysout("reps.function.inspectObject selected sourceLink is ",sourceLink)
4208}},getTooltip:function(fn,context){var script=findScriptForFunctionInContext(context,fn);
4209if(script){return $STRF("Line",[normalizeURL(script.fileName),script.baseLineNumber])
4210}else{if(fn.toString){return fn.toString()
4211}}},getTitle:function(fn,context){var name=fn.name?fn.name:"function";
4212return name+"()"
4213},getContextMenuItems:function(fn,target,context,script){if(!script){script=findScriptForFunctionInContext(context,fn)
4214}if(!script){return
4215}var scriptInfo=getSourceFileAndLineByScript(context,script);
4216var monitored=scriptInfo?fbs.isMonitored(scriptInfo.sourceFile.href,scriptInfo.lineNo):false;
4217var name=script?getFunctionName(script,context):fn.name;
4218return[{label:"CopySource",command:bindFixed(this.copySource,this,fn)},"-",{label:$STRF("ShowCallsInConsole",[name]),nol10n:true,type:"checkbox",checked:monitored,command:bindFixed(this.monitor,this,fn,script,monitored)}]
4219}});
4220this.Obj=domplate(Firebug.Rep,{tag:OBJECTLINK(SPAN({"class":"objectTitle"},"$object|getTitle "),SPAN({"class":"objectProps"},SPAN({"class":"objectLeftBrace",role:"presentation"},"{"),FOR("prop","$object|propIterator",SPAN({"class":"objectPropName",role:"presentation"},"$prop.name"),SPAN({"class":"objectEqual",role:"presentation"},"$prop.equal"),TAG("$prop.tag",{object:"$prop.object"}),SPAN({"class":"objectComma",role:"presentation"},"$prop.delim")),SPAN({"class":"objectRightBrace"},"}"))),propNumberTag:SPAN({"class":"objectProp-number"},"$object"),propStringTag:SPAN({"class":"objectProp-string"},"&quot;$object&quot;"),propObjectTag:SPAN({"class":"objectProp-object"},"$object"),propIterator:function(object){var maxLength=55;
4221if(!object){return[]
4222}var props=[];
4223var length=0;
4224var numProperties=0;
4225var numPropertiesShown=0;
4226var maxLengthReached=false;
4227var lib=this;
4228var propRepsMap={"boolean":this.propNumberTag,number:this.propNumberTag,string:this.propStringTag,object:this.propObjectTag};
4229try{var title=Firebug.Rep.getTitle(object);
4230length+=title.length;
4231for(var name in object){var value;
4232try{value=object[name]
4233}catch(exc){continue
4234}var type=typeof(value);
4235if(type=="boolean"||type=="number"||(type=="string"&&value)||(type=="object"&&value&&value.toString)){var tag=propRepsMap[type];
4236var value=(type=="object")?Firebug.getRep(value).getTitle(value):value+"";
4237length+=name.length+value.length+4;
4238if(length<=maxLength){props.push({tag:tag,name:name,object:value,equal:"=",delim:", "});
4239numPropertiesShown++
4240}else{maxLengthReached=true
4241}}numProperties++;
4242if(maxLengthReached&&numProperties>numPropertiesShown){break
4243}}if(numProperties>numPropertiesShown){props.push({object:"...",tag:FirebugReps.Caption.tag,name:"",equal:"",delim:""})
4244}else{if(props.length>0){props[props.length-1].delim=""
4245}}}catch(exc){}return props
4246},fb_1_6_propIterator:function(object,max){max=max||3;
4247if(!object){return[]
4248}var props=[];
4249var len=0,count=0;
4250try{for(var name in object){var value;
4251try{value=object[name]
4252}catch(exc){continue
4253}var t=typeof(value);
4254if(t=="boolean"||t=="number"||(t=="string"&&value)||(t=="object"&&value&&value.toString)){var rep=Firebug.getRep(value);
4255var tag=rep.shortTag||rep.tag;
4256if(t=="object"){value=rep.getTitle(value);
4257tag=rep.titleTag
4258}count++;
4259if(count<=max){props.push({tag:tag,name:name,object:value,equal:"=",delim:", "})
4260}else{break
4261}}}if(count>max){props[Math.max(1,max-1)]={object:"more...",tag:FirebugReps.Caption.tag,name:"",equal:"",delim:""}
4262}else{if(props.length>0){props[props.length-1].delim=""
4263}}}catch(exc){}return props
4264},className:"object",supportsObject:function(object,type){return true
4265}});
4266this.Arr=domplate(Firebug.Rep,{tag:OBJECTBOX({_repObject:"$object"},SPAN({"class":"arrayLeftBracket",role:"presentation"},"["),FOR("item","$object|arrayIterator",TAG("$item.tag",{object:"$item.object"}),SPAN({"class":"arrayComma",role:"presentation"},"$item.delim")),SPAN({"class":"arrayRightBracket",role:"presentation"},"]")),shortTag:OBJECTBOX({_repObject:"$object"},SPAN({"class":"arrayLeftBracket",role:"presentation"},"["),FOR("item","$object|shortArrayIterator",TAG("$item.tag",{object:"$item.object"}),SPAN({"class":"arrayComma",role:"presentation"},"$item.delim")),SPAN({"class":"arrayRightBracket"},"]")),arrayIterator:function(array){var items=[];
4267for(var i=0;
4268i<array.length;
4269++i){var value=array[i];
4270var rep=Firebug.getRep(value);
4271var tag=rep.shortTag?rep.shortTag:rep.tag;
4272var delim=(i==array.length-1?"":", ");
4273items.push({object:value,tag:tag,delim:delim})
4274}return items
4275},shortArrayIterator:function(array){var items=[];
4276for(var i=0;
4277i<array.length&&i<3;
4278++i){var value=array[i];
4279var rep=Firebug.getRep(value);
4280var tag=rep.shortTag?rep.shortTag:rep.tag;
4281var delim=(i==array.length-1?"":", ");
4282items.push({object:value,tag:tag,delim:delim})
4283}if(array.length>3){items.push({object:(array.length-3)+" more...",tag:FirebugReps.Caption.tag,delim:""})
4284}return items
4285},shortPropIterator:this.Obj.propIterator,getItemIndex:function(child){var arrayIndex=0;
4286for(child=child.previousSibling;
4287child;
4288child=child.previousSibling){if(child.repObject){++arrayIndex
4289}}return arrayIndex
4290},className:"array",supportsObject:function(object){return this.isArray(object)
4291},isArray:function(obj){try{if(!obj){return false
4292}else{if(isIE&&!isFunction(obj)&&typeof obj=="object"&&isFinite(obj.length)&&obj.nodeType!=8){return true
4293}else{if(isFinite(obj.length)&&isFunction(obj.splice)){return true
4294}else{if(isFinite(obj.length)&&isFunction(obj.callee)){return true
4295}else{if(instanceOf(obj,"HTMLCollection")){return true
4296}else{if(instanceOf(obj,"NodeList")){return true
4297}else{return false
4298}}}}}}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("isArray FAILS:",exc);
4299FBTrace.sysout("isArray Fails on obj",obj)
4300}}return false
4301},getTitle:function(object,context){return"["+object.length+"]"
4302}});
4303this.Property=domplate(Firebug.Rep,{supportsObject:function(object){return object instanceof Property
4304},getRealObject:function(prop,context){return prop.object[prop.name]
4305},getTitle:function(prop,context){return prop.name
4306}});
4307this.NetFile=domplate(this.Obj,{supportsObject:function(object){return object instanceof Firebug.NetFile
4308},browseObject:function(file,context){openNewTab(file.href);
4309return true
4310},getRealObject:function(file,context){return null
4311}});
4312this.Except=domplate(Firebug.Rep,{tag:OBJECTBOX({_repObject:"$object"},"$object.message"),className:"exception",supportsObject:function(object){return object instanceof ErrorCopy
4313}});
4314this.Element=domplate(Firebug.Rep,{tag:OBJECTLINK("&lt;",SPAN({"class":"nodeTag"},"$object.nodeName|toLowerCase"),FOR("attr","$object|attrIterator","&nbsp;$attr.nodeName=&quot;",SPAN({"class":"nodeValue"},"$attr.nodeValue"),"&quot;"),"&gt;"),shortTag:OBJECTLINK(SPAN({"class":"$object|getVisible"},SPAN({"class":"selectorTag"},"$object|getSelectorTag"),SPAN({"class":"selectorId"},"$object|getSelectorId"),SPAN({"class":"selectorClass"},"$object|getSelectorClass"),SPAN({"class":"selectorValue"},"$object|getValue"))),getVisible:function(elt){return isVisible(elt)?"":"selectorHidden"
4315},getSelectorTag:function(elt){return elt.nodeName.toLowerCase()
4316},getSelectorId:function(elt){return elt.id?"#"+elt.id:""
4317},getSelectorClass:function(elt){return elt.className?"."+elt.className.split(" ")[0]:""
4318},getValue:function(elt){return"";
4319var value;
4320if(elt instanceof HTMLImageElement){value=getFileName(elt.src)
4321}else{if(elt instanceof HTMLAnchorElement){value=getFileName(elt.href)
4322}else{if(elt instanceof HTMLInputElement){value=elt.value
4323}else{if(elt instanceof HTMLFormElement){value=getFileName(elt.action)
4324}else{if(elt instanceof HTMLScriptElement){value=getFileName(elt.src)
4325}}}}}return value?" "+cropString(value,20):""
4326},attrIterator:function(elt){var attrs=[];
4327var idAttr,classAttr;
4328if(elt.attributes){for(var i=0;
4329i<elt.attributes.length;
4330++i){var attr=elt.attributes[i];
4331if(!attr.specified||attr.nodeName&&attr.nodeName.indexOf("firebug-")!=-1){continue
4332}else{if(attr.nodeName=="id"){idAttr=attr
4333}else{if(attr.nodeName=="class"){classAttr=attr
4334}else{if(attr.nodeName=="style"){attrs.push({nodeName:attr.nodeName,nodeValue:attr.nodeValue||elt.style.cssText.replace(/([^\s]+)\s*:/g,function(m,g){return g.toLowerCase()+":"
4335})})
4336}else{attrs.push(attr)
4337}}}}}}if(classAttr){attrs.splice(0,0,classAttr)
4338}if(idAttr){attrs.splice(0,0,idAttr)
4339}return attrs
4340},shortAttrIterator:function(elt){var attrs=[];
4341if(elt.attributes){for(var i=0;
4342i<elt.attributes.length;
4343++i){var attr=elt.attributes[i];
4344if(attr.nodeName=="id"||attr.nodeName=="class"){attrs.push(attr)
4345}}}return attrs
4346},getHidden:function(elt){return isVisible(elt)?"":"nodeHidden"
4347},getXPath:function(elt){return getElementTreeXPath(elt)
4348},getNodeText:function(element){var text=element.textContent;
4349if(Firebug.showFullTextNodes){return text
4350}else{return cropString(text,50)
4351}},getNodeTextGroups:function(element){var text=element.textContent;
4352if(!Firebug.showFullTextNodes){text=cropString(text,50)
4353}var escapeGroups=[];
4354if(Firebug.showTextNodesWithWhitespace){escapeGroups.push({group:"whitespace","class":"nodeWhiteSpace",extra:{"\t":"_Tab","\n":"_Para"," ":"_Space"}})
4355}if(Firebug.showTextNodesWithEntities){escapeGroups.push({group:"text","class":"nodeTextEntity",extra:{}})
4356}if(escapeGroups.length){return escapeGroupsForEntities(text,escapeGroups)
4357}else{return[{str:text,"class":"",extra:""}]
4358}},copyHTML:function(elt){var html=getElementXML(elt);
4359copyToClipboard(html)
4360},copyInnerHTML:function(elt){copyToClipboard(elt.innerHTML)
4361},copyXPath:function(elt){var xpath=getElementXPath(elt);
4362copyToClipboard(xpath)
4363},persistor:function(context,xpath){var elts=xpath?getElementsByXPath(context.window.document,xpath):null;
4364return elts&&elts.length?elts[0]:null
4365},className:"element",supportsObject:function(object){return instanceOf(object,"Element")
4366},browseObject:function(elt,context){var tag=elt.nodeName.toLowerCase();
4367if(tag=="script"){openNewTab(elt.src)
4368}else{if(tag=="link"){openNewTab(elt.href)
4369}else{if(tag=="a"){openNewTab(elt.href)
4370}else{if(tag=="img"){openNewTab(elt.src)
4371}}}}return true
4372},persistObject:function(elt,context){var xpath=getElementXPath(elt);
4373return bind(this.persistor,top,xpath)
4374},getTitle:function(element,context){return getElementCSSSelector(element)
4375},getTooltip:function(elt){return this.getXPath(elt)
4376},getContextMenuItems:function(elt,target,context){var monitored=areEventsMonitored(elt,null,context);
4377return[{label:"CopyHTML",command:bindFixed(this.copyHTML,this,elt)},{label:"CopyInnerHTML",command:bindFixed(this.copyInnerHTML,this,elt)},{label:"CopyXPath",command:bindFixed(this.copyXPath,this,elt)},"-",{label:"ShowEventsInConsole",type:"checkbox",checked:monitored,command:bindFixed(toggleMonitorEvents,FBL,elt,null,monitored,context)},"-",{label:"ScrollIntoView",command:bindFixed(elt.scrollIntoView,elt)}]
4378}});
4379this.TextNode=domplate(Firebug.Rep,{tag:OBJECTLINK("&lt;",SPAN({"class":"nodeTag"},"TextNode"),"&nbsp;textContent=&quot;",SPAN({"class":"nodeValue"},"$object.textContent|cropString"),"&quot;","&gt;"),className:"textNode",supportsObject:function(object){return object instanceof Text
4380}});
4381this.Document=domplate(Firebug.Rep,{tag:OBJECTLINK("Document ",SPAN({"class":"objectPropValue"},"$object|getLocation")),getLocation:function(doc){return doc.location?getFileName(doc.location.href):""
4382},className:"object",supportsObject:function(object){return instanceOf(object,"Document")
4383},browseObject:function(doc,context){openNewTab(doc.location.href);
4384return true
4385},persistObject:function(doc,context){return this.persistor
4386},persistor:function(context){return context.window.document
4387},getTitle:function(win,context){return"document"
4388},getTooltip:function(doc){return doc.location.href
4389}});
4390this.StyleSheet=domplate(Firebug.Rep,{tag:OBJECTLINK("StyleSheet ",SPAN({"class":"objectPropValue"},"$object|getLocation")),getLocation:function(styleSheet){return getFileName(styleSheet.href)
4391},copyURL:function(styleSheet){copyToClipboard(styleSheet.href)
4392},openInTab:function(styleSheet){openNewTab(styleSheet.href)
4393},className:"object",supportsObject:function(object){return instanceOf(object,"CSSStyleSheet")
4394},browseObject:function(styleSheet,context){openNewTab(styleSheet.href);
4395return true
4396},persistObject:function(styleSheet,context){return bind(this.persistor,top,styleSheet.href)
4397},getTooltip:function(styleSheet){return styleSheet.href
4398},getContextMenuItems:function(styleSheet,target,context){return[{label:"CopyLocation",command:bindFixed(this.copyURL,this,styleSheet)},"-",{label:"OpenInTab",command:bindFixed(this.openInTab,this,styleSheet)}]
4399},persistor:function(context,href){return getStyleSheetByHref(href,context)
4400}});
4401this.Window=domplate(Firebug.Rep,{tag:OBJECTLINK("Window ",SPAN({"class":"objectPropValue"},"$object|getLocation")),getLocation:function(win){try{return(win&&win.location&&!win.closed)?getFileName(win.location.href):""
4402}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("reps.Window window closed?")
4403}}},className:"object",supportsObject:function(object){return instanceOf(object,"Window")
4404},browseObject:function(win,context){openNewTab(win.location.href);
4405return true
4406},persistObject:function(win,context){return this.persistor
4407},persistor:function(context){return context.window
4408},getTitle:function(win,context){return"window"
4409},getTooltip:function(win){if(win&&!win.closed){return win.location.href
4410}}});
4411this.Event=domplate(Firebug.Rep,{tag:TAG("$copyEventTag",{object:"$object|copyEvent"}),copyEventTag:OBJECTLINK("$object|summarizeEvent"),summarizeEvent:function(event){var info=[event.type," "];
4412var eventFamily=getEventFamily(event.type);
4413if(eventFamily=="mouse"){info.push("clientX=",event.clientX,", clientY=",event.clientY)
4414}else{if(eventFamily=="key"){info.push("charCode=",event.charCode,", keyCode=",event.keyCode)
4415}}return info.join("")
4416},copyEvent:function(event){return new EventCopy(event)
4417},className:"object",supportsObject:function(object){return instanceOf(object,"Event")||instanceOf(object,"EventCopy")
4418},getTitle:function(event,context){return"Event "+event.type
4419}});
4420this.SourceLink=domplate(Firebug.Rep,{tag:OBJECTLINK({$collapsed:"$object|hideSourceLink"},"$object|getSourceLinkTitle"),hideSourceLink:function(sourceLink){return sourceLink?sourceLink.href.indexOf("XPCSafeJSObjectWrapper")!=-1:true
4421},getSourceLinkTitle:function(sourceLink){if(!sourceLink){return""
4422}try{var fileName=getFileName(sourceLink.href);
4423fileName=decodeURIComponent(fileName);
4424fileName=cropString(fileName,17)
4425}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("reps.getSourceLinkTitle decodeURIComponent fails for '"+fileName+"': "+exc,exc)
4426}}return typeof sourceLink.line=="number"?fileName+" (line "+sourceLink.line+")":fileName
4427},copyLink:function(sourceLink){copyToClipboard(sourceLink.href)
4428},openInTab:function(sourceLink){openNewTab(sourceLink.href)
4429},className:"sourceLink",supportsObject:function(object){return object instanceof SourceLink
4430},getTooltip:function(sourceLink){return decodeURI(sourceLink.href)
4431},inspectObject:function(sourceLink,context){if(sourceLink.type=="js"){var scriptFile=getSourceFileByHref(sourceLink.href,context);
4432if(scriptFile){return Firebug.chrome.select(sourceLink)
4433}}else{if(sourceLink.type=="css"){if(sourceLink.object){Firebug.chrome.select(sourceLink.object);
4434return
4435}var stylesheet=getStyleSheetByHref(sourceLink.href,context);
4436if(stylesheet){var ownerNode=stylesheet.ownerNode;
4437if(ownerNode){Firebug.chrome.select(sourceLink,"html");
4438return
4439}var panel=context.getPanel("stylesheet");
4440if(panel&&panel.getRuleByLine(stylesheet,sourceLink.line)){return Firebug.chrome.select(sourceLink)
4441}}}}viewSource(sourceLink.href,sourceLink.line)
4442},browseObject:function(sourceLink,context){openNewTab(sourceLink.href);
4443return true
4444},getContextMenuItems:function(sourceLink,target,context){return[{label:"CopyLocation",command:bindFixed(this.copyLink,this,sourceLink)},"-",{label:"OpenInTab",command:bindFixed(this.openInTab,this,sourceLink)}]
4445}});
4446this.SourceFile=domplate(this.SourceLink,{tag:OBJECTLINK({$collapsed:"$object|hideSourceLink"},"$object|getSourceLinkTitle"),persistor:function(context,href){return getSourceFileByHref(href,context)
4447},className:"sourceFile",supportsObject:function(object){return object instanceof SourceFile
4448},persistObject:function(sourceFile){return bind(this.persistor,top,sourceFile.href)
4449},browseObject:function(sourceLink,context){},getTooltip:function(sourceFile){return sourceFile.href
4450}});
4451this.StackFrame=domplate(Firebug.Rep,{tag:OBJECTBLOCK(A({"class":"objectLink objectLink-function focusRow a11yFocus",_repObject:"$object.fn"},"$object|getCallName")," ( ",FOR("arg","$object|argIterator",TAG("$arg.tag",{object:"$arg.value"}),SPAN({"class":"arrayComma"},"$arg.delim"))," )",SPAN({"class":"objectLink-sourceLink objectLink"},"$object|getSourceLinkTitle")),getCallName:function(frame){return frame.name||"anonymous"
4452},getSourceLinkTitle:function(frame){var fileName=cropString(getFileName(frame.href),20);
4453return fileName+(frame.lineNo?" (line "+frame.lineNo+")":"");
4454var fileName=cropString(getFileName(frame.href),17);
4455return $STRF("Line",[fileName,frame.lineNo])
4456},argIterator:function(frame){if(!frame.args){return[]
4457}var items=[];
4458for(var i=0;
4459i<frame.args.length;
4460++i){var arg=frame.args[i];
4461if(!arg){break
4462}var rep=Firebug.getRep(arg.value);
4463var tag=rep.shortTag?rep.shortTag:rep.tag;
4464var delim=(i==frame.args.length-1?"":", ");
4465items.push({name:arg.name,value:arg.value,tag:tag,delim:delim})
4466}return items
4467},className:"stackFrame",supportsObject:function(object){return object instanceof StackFrame
4468},inspectObject:function(stackFrame,context){var sourceLink=new SourceLink(stackFrame.href,stackFrame.lineNo,"js");
4469Firebug.chrome.select(sourceLink)
4470},getTooltip:function(stackFrame,context){return $STRF("Line",[stackFrame.href,stackFrame.lineNo])
4471}});
4472this.StackTrace=domplate(Firebug.Rep,{tag:FOR("frame","$object.frames focusRow",TAG(this.StackFrame.tag,{object:"$frame"})),className:"stackTrace",supportsObject:function(object){return object instanceof StackTrace
4473}});
4474this.jsdStackFrame=domplate(Firebug.Rep,{inspectable:false,supportsObject:function(object){return(object instanceof jsdIStackFrame)&&(object.isValid)
4475},getTitle:function(frame,context){if(!frame.isValid){return"(invalid frame)"
4476}return getFunctionName(frame.script,context)
4477},getTooltip:function(frame,context){if(!frame.isValid){return"(invalid frame)"
4478}var sourceInfo=FBL.getSourceFileAndLineByScript(context,frame.script,frame);
4479if(sourceInfo){return $STRF("Line",[sourceInfo.sourceFile.href,sourceInfo.lineNo])
4480}else{return $STRF("Line",[frame.script.fileName,frame.line])
4481}},getContextMenuItems:function(frame,target,context){var fn=frame.script.functionObject.getWrappedValue();
4482return FirebugReps.Func.getContextMenuItems(fn,target,context,frame.script)
4483}});
4484this.ErrorMessage=domplate(Firebug.Rep,{tag:OBJECTBOX({$hasTwisty:"$object|hasStackTrace",$hasBreakSwitch:"$object|hasBreakSwitch",$breakForError:"$object|hasErrorBreak",_repObject:"$object",_stackTrace:"$object|getLastErrorStackTrace",onclick:"$onToggleError"},DIV({"class":"errorTitle a11yFocus",role:"checkbox","aria-checked":"false"},"$object.message|getMessage"),DIV({"class":"errorTrace"}),DIV({"class":"errorSourceBox errorSource-$object|getSourceType"},IMG({"class":"errorBreak a11yFocus",src:"blank.gif",role:"checkbox","aria-checked":"false",title:"Break on this error"}),A({"class":"errorSource a11yFocus"},"$object|getLine")),TAG(this.SourceLink.tag,{object:"$object|getSourceLink"})),getLastErrorStackTrace:function(error){return error.trace
4485},hasStackTrace:function(error){var url=error.href.toString();
4486var fromCommandLine=(url.indexOf("XPCSafeJSObjectWrapper")!=-1);
4487return !fromCommandLine&&error.trace
4488},hasBreakSwitch:function(error){return error.href&&error.lineNo>0
4489},hasErrorBreak:function(error){return fbs.hasErrorBreakpoint(error.href,error.lineNo)
4490},getMessage:function(message){var re=/\[Exception... "(.*?)" nsresult:/;
4491var m=re.exec(message);
4492return m?m[1]:message
4493},getLine:function(error){if(error.category=="js"){if(error.source){return cropString(error.source,80)
4494}else{if(error.href&&error.href.indexOf("XPCSafeJSObjectWrapper")==-1){return cropString(error.getSourceLine(),80)
4495}}}},getSourceLink:function(error){var ext=error.category=="css"?"css":"js";
4496return error.lineNo?new SourceLink(error.href,error.lineNo,ext):null
4497},getSourceType:function(error){if(error.source){return"syntax"
4498}else{if(error.lineNo==1&&getFileExtension(error.href)!="js"){return"none"
4499}else{if(error.category=="css"){return"none"
4500}else{if(!error.href||!error.lineNo){return"none"
4501}else{return"exec"
4502}}}}},onToggleError:function(event){var target=event.currentTarget;
4503if(hasClass(event.target,"errorBreak")){this.breakOnThisError(target.repObject)
4504}else{if(hasClass(event.target,"errorSource")){var panel=Firebug.getElementPanel(event.target);
4505this.inspectObject(target.repObject,panel.context)
4506}else{if(hasClass(event.target,"errorTitle")){var traceBox=target.childNodes[1];
4507toggleClass(target,"opened");
4508event.target.setAttribute("aria-checked",hasClass(target,"opened"));
4509if(hasClass(target,"opened")){if(target.stackTrace){var node=FirebugReps.StackTrace.tag.append({object:target.stackTrace},traceBox)
4510}if(Firebug.A11yModel.enabled){var panel=Firebug.getElementPanel(event.target);
4511dispatch([Firebug.A11yModel],"onLogRowContentCreated",[panel,traceBox])
4512}}else{clearNode(traceBox)
4513}}}}},copyError:function(error){var message=[this.getMessage(error.message),error.href,"Line "+error.lineNo];
4514copyToClipboard(message.join("\n"))
4515},breakOnThisError:function(error){if(this.hasErrorBreak(error)){Firebug.Debugger.clearErrorBreakpoint(error.href,error.lineNo)
4516}else{Firebug.Debugger.setErrorBreakpoint(error.href,error.lineNo)
4517}},className:"errorMessage",inspectable:false,supportsObject:function(object){return object instanceof ErrorMessage
4518},inspectObject:function(error,context){var sourceLink=this.getSourceLink(error);
4519FirebugReps.SourceLink.inspectObject(sourceLink,context)
4520},getContextMenuItems:function(error,target,context){var breakOnThisError=this.hasErrorBreak(error);
4521var items=[{label:"CopyError",command:bindFixed(this.copyError,this,error)}];
4522if(error.category=="css"){items.push("-",{label:"BreakOnThisError",type:"checkbox",checked:breakOnThisError,command:bindFixed(this.breakOnThisError,this,error)},optionMenu("BreakOnAllErrors","breakOnErrors"))
4523}return items
4524}});
4525this.Assert=domplate(Firebug.Rep,{tag:DIV(DIV({"class":"errorTitle"}),DIV({"class":"assertDescription"})),className:"assert",inspectObject:function(error,context){var sourceLink=this.getSourceLink(error);
4526Firebug.chrome.select(sourceLink)
4527},getContextMenuItems:function(error,target,context){var breakOnThisError=this.hasErrorBreak(error);
4528return[{label:"CopyError",command:bindFixed(this.copyError,this,error)},"-",{label:"BreakOnThisError",type:"checkbox",checked:breakOnThisError,command:bindFixed(this.breakOnThisError,this,error)},{label:"BreakOnAllErrors",type:"checkbox",checked:Firebug.breakOnErrors,command:bindFixed(this.breakOnAllErrors,this,error)}]
4529}});
4530this.SourceText=domplate(Firebug.Rep,{tag:DIV(FOR("line","$object|lineIterator",DIV({"class":"sourceRow",role:"presentation"},SPAN({"class":"sourceLine",role:"presentation"},"$line.lineNo"),SPAN({"class":"sourceRowText",role:"presentation"},"$line.text")))),lineIterator:function(sourceText){var maxLineNoChars=(sourceText.lines.length+"").length;
4531var list=[];
4532for(var i=0;
4533i<sourceText.lines.length;
4534++i){var lineNo=(i+1)+"";
4535while(lineNo.length<maxLineNoChars){lineNo=" "+lineNo
4536}list.push({lineNo:lineNo,text:sourceText.lines[i]})
4537}return list
4538},getHTML:function(sourceText){return getSourceLineRange(sourceText,1,sourceText.lines.length)
4539}});
4540this.nsIDOMHistory=domplate(Firebug.Rep,{tag:OBJECTBOX({onclick:"$showHistory"},OBJECTLINK("$object|summarizeHistory")),className:"nsIDOMHistory",summarizeHistory:function(history){try{var items=history.length;
4541return items+" history entries"
4542}catch(exc){return"object does not support history (nsIDOMHistory)"
4543}},showHistory:function(history){try{var items=history.length;
4544Firebug.chrome.select(history)
4545}catch(exc){}},supportsObject:function(object,type){return(object instanceof Ci.nsIDOMHistory)
4546}});
4547this.ApplicationCache=domplate(Firebug.Rep,{tag:OBJECTBOX({onclick:"$showApplicationCache"},OBJECTLINK("$object|summarizeCache")),summarizeCache:function(applicationCache){try{return applicationCache.length+" items in offline cache"
4548}catch(exc){return"https://bugzilla.mozilla.org/show_bug.cgi?id=422264"
4549}},showApplicationCache:function(event){openNewTab("https://bugzilla.mozilla.org/show_bug.cgi?id=422264")
4550},className:"applicationCache",supportsObject:function(object,type){if(Ci.nsIDOMOfflineResourceList){return(object instanceof Ci.nsIDOMOfflineResourceList)
4551}}});
4552this.Storage=domplate(Firebug.Rep,{tag:OBJECTBOX({onclick:"$show"},OBJECTLINK("$object|summarize")),summarize:function(storage){return storage.length+" items in Storage"
4553},show:function(storage){openNewTab("http://dev.w3.org/html5/webstorage/#storage-0")
4554},className:"Storage",supportsObject:function(object,type){return(object instanceof Storage)
4555}});
4556Firebug.registerRep(this.Undefined,this.Null,this.Number,this.String,this.Window,this.Element,this.Document,this.StyleSheet,this.Event,this.Property,this.Except,this.Arr);
4557Firebug.setDefaultReps(this.Func,this.Obj)
4558}});
4559FBL.ns(function(){with(FBL){var saveTimeout=400;
4560var pageAmount=10;
4561var currentTarget=null;
4562var currentGroup=null;
4563var currentPanel=null;
4564var currentEditor=null;
4565var defaultEditor=null;
4566var originalClassName=null;
4567var originalValue=null;
4568var defaultValue=null;
4569var previousValue=null;
4570var invalidEditor=false;
4571var ignoreNextInput=false;
4572Firebug.Editor=extend(Firebug.Module,{supportsStopEvent:true,dispatchName:"editor",tabCharacter:"    ",startEditing:function(target,value,editor){this.stopEditing();
4573if(hasClass(target,"insertBefore")||hasClass(target,"insertAfter")){return
4574}var panel=Firebug.getElementPanel(target);
4575if(!panel.editable){return
4576}if(FBTrace.DBG_EDITOR){FBTrace.sysout("editor.startEditing "+value,target)
4577}defaultValue=target.getAttribute("defaultValue");
4578if(value==undefined){var textContent=isIE?"innerText":"textContent";
4579value=target[textContent];
4580if(value==defaultValue){value=""
4581}}originalValue=previousValue=value;
4582invalidEditor=false;
4583currentTarget=target;
4584currentPanel=panel;
4585currentGroup=getAncestorByClass(target,"editGroup");
4586currentPanel.editing=true;
4587var panelEditor=currentPanel.getEditor(target,value);
4588currentEditor=editor?editor:panelEditor;
4589if(!currentEditor){currentEditor=getDefaultEditor(currentPanel)
4590}var inlineParent=getInlineParent(target);
4591var targetSize=getOffsetSize(inlineParent);
4592setClass(panel.panelNode,"editing");
4593setClass(target,"editing");
4594if(currentGroup){setClass(currentGroup,"editing")
4595}currentEditor.show(target,currentPanel,value,targetSize);
4596currentEditor.beginEditing(target,value);
4597if(FBTrace.DBG_EDITOR){FBTrace.sysout("Editor start panel "+currentPanel.name)
4598}this.attachListeners(currentEditor,panel.context)
4599},stopEditing:function(cancel){if(!currentTarget){return
4600}if(FBTrace.DBG_EDITOR){FBTrace.sysout("editor.stopEditing cancel:"+cancel+" saveTimeout: "+this.saveTimeout)
4601}clearTimeout(this.saveTimeout);
4602delete this.saveTimeout;
4603this.detachListeners(currentEditor,currentPanel.context);
4604removeClass(currentPanel.panelNode,"editing");
4605removeClass(currentTarget,"editing");
4606if(currentGroup){removeClass(currentGroup,"editing")
4607}var value=currentEditor.getValue();
4608if(value==defaultValue){value=""
4609}var removeGroup=currentEditor.endEditing(currentTarget,value,cancel);
4610try{if(cancel){if(value!=originalValue){this.saveEditAndNotifyListeners(currentTarget,originalValue,previousValue)
4611}if(removeGroup&&!originalValue&&currentGroup){currentGroup.parentNode.removeChild(currentGroup)
4612}}else{if(!value){this.saveEditAndNotifyListeners(currentTarget,null,previousValue);
4613if(removeGroup&&currentGroup){currentGroup.parentNode.removeChild(currentGroup)
4614}}else{this.save(value)
4615}}}catch(exc){}currentEditor.hide();
4616currentPanel.editing=false;
4617currentTarget=null;
4618currentGroup=null;
4619currentPanel=null;
4620currentEditor=null;
4621originalValue=null;
4622invalidEditor=false;
4623return value
4624},cancelEditing:function(){return this.stopEditing(true)
4625},update:function(saveNow){if(this.saveTimeout){clearTimeout(this.saveTimeout)
4626}invalidEditor=true;
4627currentEditor.layout();
4628if(saveNow){this.save()
4629}else{var context=currentPanel.context;
4630this.saveTimeout=context.setTimeout(bindFixed(this.save,this),saveTimeout);
4631if(FBTrace.DBG_EDITOR){FBTrace.sysout("editor.update saveTimeout: "+this.saveTimeout)
4632}}},save:function(value){if(!invalidEditor){return
4633}if(value==undefined){value=currentEditor.getValue()
4634}if(FBTrace.DBG_EDITOR){FBTrace.sysout("editor.save saveTimeout: "+this.saveTimeout+" currentPanel: "+(currentPanel?currentPanel.name:"null"))
4635}try{this.saveEditAndNotifyListeners(currentTarget,value,previousValue);
4636previousValue=value;
4637invalidEditor=false
4638}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("editor.save FAILS "+exc,exc)
4639}}},saveEditAndNotifyListeners:function(currentTarget,value,previousValue){currentEditor.saveEdit(currentTarget,value,previousValue)
4640},setEditTarget:function(element){if(!element){dispatch([Firebug.A11yModel],"onInlineEditorClose",[currentPanel,currentTarget,true]);
4641this.stopEditing()
4642}else{if(hasClass(element,"insertBefore")){this.insertRow(element,"before")
4643}else{if(hasClass(element,"insertAfter")){this.insertRow(element,"after")
4644}else{this.startEditing(element)
4645}}}},tabNextEditor:function(){if(!currentTarget){return
4646}var value=currentEditor.getValue();
4647var nextEditable=currentTarget;
4648do{nextEditable=!value&&currentGroup?getNextOutsider(nextEditable,currentGroup):getNextByClass(nextEditable,"editable")
4649}while(nextEditable&&!nextEditable.offsetHeight);
4650this.setEditTarget(nextEditable)
4651},tabPreviousEditor:function(){if(!currentTarget){return
4652}var value=currentEditor.getValue();
4653var prevEditable=currentTarget;
4654do{prevEditable=!value&&currentGroup?getPreviousOutsider(prevEditable,currentGroup):getPreviousByClass(prevEditable,"editable")
4655}while(prevEditable&&!prevEditable.offsetHeight);
4656this.setEditTarget(prevEditable)
4657},insertRow:function(relative,insertWhere){var group=relative||getAncestorByClass(currentTarget,"editGroup")||currentTarget;
4658var value=this.stopEditing();
4659currentPanel=Firebug.getElementPanel(group);
4660currentEditor=currentPanel.getEditor(group,value);
4661if(!currentEditor){currentEditor=getDefaultEditor(currentPanel)
4662}currentGroup=currentEditor.insertNewRow(group,insertWhere);
4663if(!currentGroup){return
4664}var editable=hasClass(currentGroup,"editable")?currentGroup:getNextByClass(currentGroup,"editable");
4665if(editable){this.setEditTarget(editable)
4666}},insertRowForObject:function(relative){var container=getAncestorByClass(relative,"insertInto");
4667if(container){relative=getChildByClass(container,"insertBefore");
4668if(relative){this.insertRow(relative,"before")
4669}}},attachListeners:function(editor,context){var win=isIE?currentTarget.ownerDocument.parentWindow:currentTarget.ownerDocument.defaultView;
4670addEvent(win,"resize",this.onResize);
4671addEvent(win,"blur",this.onBlur);
4672var chrome=Firebug.chrome;
4673this.listeners=[chrome.keyCodeListen("ESCAPE",null,bind(this.cancelEditing,this))];
4674if(editor.arrowCompletion){this.listeners.push(chrome.keyCodeListen("UP",null,bindFixed(editor.completeValue,editor,-1)),chrome.keyCodeListen("DOWN",null,bindFixed(editor.completeValue,editor,1)),chrome.keyCodeListen("PAGE_UP",null,bindFixed(editor.completeValue,editor,-pageAmount)),chrome.keyCodeListen("PAGE_DOWN",null,bindFixed(editor.completeValue,editor,pageAmount)))
4675}if(currentEditor.tabNavigation){this.listeners.push(chrome.keyCodeListen("RETURN",null,bind(this.tabNextEditor,this)),chrome.keyCodeListen("RETURN",isControl,bind(this.insertRow,this,null,"after")),chrome.keyCodeListen("TAB",null,bind(this.tabNextEditor,this)),chrome.keyCodeListen("TAB",isShift,bind(this.tabPreviousEditor,this)))
4676}else{if(currentEditor.multiLine){this.listeners.push(chrome.keyCodeListen("TAB",null,insertTab))
4677}else{this.listeners.push(chrome.keyCodeListen("RETURN",null,bindFixed(this.stopEditing,this)));
4678if(currentEditor.tabCompletion){this.listeners.push(chrome.keyCodeListen("TAB",null,bind(editor.completeValue,editor,1)),chrome.keyCodeListen("TAB",isShift,bind(editor.completeValue,editor,-1)))
4679}}}},detachListeners:function(editor,context){if(!this.listeners){return
4680}var win=isIE?currentTarget.ownerDocument.parentWindow:currentTarget.ownerDocument.defaultView;
4681removeEvent(win,"resize",this.onResize);
4682removeEvent(win,"blur",this.onBlur);
4683var chrome=Firebug.chrome;
4684if(chrome){for(var i=0;
4685i<this.listeners.length;
4686++i){chrome.keyIgnore(this.listeners[i])
4687}}delete this.listeners
4688},onResize:function(event){currentEditor.layout(true)
4689},onBlur:function(event){if(currentEditor.enterOnBlur&&isAncestor(event.target,currentEditor.box)){this.stopEditing()
4690}},initialize:function(){Firebug.Module.initialize.apply(this,arguments);
4691this.onResize=bindFixed(this.onResize,this);
4692this.onBlur=bind(this.onBlur,this)
4693},disable:function(){this.stopEditing()
4694},showContext:function(browser,context){this.stopEditing()
4695},showPanel:function(browser,panel){this.stopEditing()
4696}});
4697Firebug.BaseEditor=extend(Firebug.MeasureBox,{getValue:function(){},setValue:function(value){},show:function(target,panel,value,textSize,targetSize){},hide:function(){},layout:function(forceAll){},getContextMenuItems:function(target){var items=[];
4698items.push({label:"Cut",commandID:"cmd_cut"});
4699items.push({label:"Copy",commandID:"cmd_copy"});
4700items.push({label:"Paste",commandID:"cmd_paste"});
4701return items
4702},beginEditing:function(target,value){},saveEdit:function(target,value,previousValue){},endEditing:function(target,value,cancel){return true
4703},insertNewRow:function(target,insertWhere){}});
4704var inlineEditorAttributes={"class":"textEditorInner",type:"text",spellcheck:"false",onkeypress:"$onKeyPress",onoverflow:"$onOverflow",oncontextmenu:"$onContextMenu"};
4705if(isIE){inlineEditorAttributes.onpropertychange="$onInput";
4706inlineEditorAttributes.onkeydown="$onKeyDown"
4707}else{inlineEditorAttributes.oninput="$onInput"
4708}Firebug.InlineEditor=function(doc){this.initializeInline(doc)
4709};
4710Firebug.InlineEditor.prototype=domplate(Firebug.BaseEditor,{enterOnBlur:true,outerMargin:8,shadowExpand:7,tag:DIV({"class":"inlineEditor"},DIV({"class":"textEditorTop1"},DIV({"class":"textEditorTop2"})),DIV({"class":"textEditorInner1"},DIV({"class":"textEditorInner2"},INPUT(inlineEditorAttributes))),DIV({"class":"textEditorBottom1"},DIV({"class":"textEditorBottom2"}))),inputTag:INPUT({"class":"textEditorInner",type:"text",onkeypress:"$onKeyPress",onoverflow:"$onOverflow"}),expanderTag:IMG({"class":"inlineExpander",src:"blank.gif"}),initialize:function(){this.fixedWidth=false;
4711this.completeAsYouType=true;
4712this.tabNavigation=true;
4713this.multiLine=false;
4714this.tabCompletion=false;
4715this.arrowCompletion=true;
4716this.noWrap=true;
4717this.numeric=false
4718},destroy:function(){this.destroyInput()
4719},initializeInline:function(doc){if(FBTrace.DBG_EDITOR){FBTrace.sysout("Firebug.InlineEditor initializeInline()")
4720}this.box=this.tag.append({},doc.body,this);
4721this.input=this.box.getElementsByTagName("input")[0];
4722if(isIElt8){this.input.style.top="-8px"
4723}this.expander=this.expanderTag.replace({},doc,this);
4724this.initialize()
4725},destroyInput:function(){},getValue:function(){return this.input.value
4726},setValue:function(value){return this.input.value=stripNewLines(value)
4727},show:function(target,panel,value,targetSize){this.target=target;
4728this.panel=panel;
4729this.targetSize=targetSize;
4730var innerHTML=target.innerHTML;
4731var isEmptyElement=!innerHTML;
4732if(isEmptyElement){target.innerHTML="."
4733}this.targetOffset={x:target.offsetLeft,y:target.offsetTop};
4734if(isEmptyElement){target.innerHTML=innerHTML
4735}this.originalClassName=this.box.className;
4736var classNames=target.className.split(" ");
4737for(var i=0;
4738i<classNames.length;
4739++i){setClass(this.box,"editor-"+classNames[i])
4740}copyTextStyles(target,this.box);
4741this.setValue(value);
4742if(this.fixedWidth){this.updateLayout(true)
4743}else{this.startMeasuring(target);
4744this.textSize=this.measureInputText(value);
4745var parent=this.input.parentNode;
4746if(hasClass(parent,"textEditorInner2")){var yDiff=this.textSize.height-this.shadowExpand;
4747if(isIE6){yDiff-=2
4748}parent.style.height=yDiff+"px";
4749parent.parentNode.style.height=yDiff+"px"
4750}this.updateLayout(true)
4751}this.getAutoCompleter().reset();
4752if(isIElt8){panel.panelNode.appendChild(this.box)
4753}else{target.offsetParent.appendChild(this.box)
4754}if(isIE){this.input.style.fontFamily="Monospace";
4755this.input.style.fontSize="11px"
4756}if(!this.fixedWidth){copyBoxStyles(target,this.expander);
4757target.parentNode.replaceChild(this.expander,target);
4758collapse(target,true);
4759this.expander.parentNode.insertBefore(target,this.expander)
4760}this.box.style.display="block";
4761var self=this;
4762setTimeout(function(){self.input.focus();
4763self.input.select()
4764},0)
4765},hide:function(){this.box.className=this.originalClassName;
4766if(!this.fixedWidth){this.stopMeasuring();
4767collapse(this.target,false);
4768if(this.expander.parentNode){this.expander.parentNode.removeChild(this.expander)
4769}}if(this.box.parentNode){this.input.blur();
4770this.box.parentNode.removeChild(this.box)
4771}delete this.target;
4772delete this.panel
4773},layout:function(forceAll){if(!this.fixedWidth){this.textSize=this.measureInputText(this.input.value)
4774}if(forceAll){this.targetOffset=getClientOffset(this.expander)
4775}this.updateLayout(false,forceAll)
4776},beginEditing:function(target,value){},saveEdit:function(target,value,previousValue){},endEditing:function(target,value,cancel){return true
4777},insertNewRow:function(target,insertWhere){},advanceToNext:function(target,charCode){return false
4778},getAutoCompleteRange:function(value,offset){},getAutoCompleteList:function(preExpr,expr,postExpr){},getAutoCompleter:function(){if(!this.autoCompleter){this.autoCompleter=new Firebug.AutoCompleter(null,bind(this.getAutoCompleteRange,this),bind(this.getAutoCompleteList,this),true,false)
4779}return this.autoCompleter
4780},completeValue:function(amt){var selectRangeCallback=this.getAutoCompleter().complete(currentPanel.context,this.input,true,amt<0);
4781if(selectRangeCallback){Firebug.Editor.update(true);
4782if(isSafari){setTimeout(selectRangeCallback,0)
4783}else{selectRangeCallback()
4784}}else{this.incrementValue(amt)
4785}},incrementValue:function(amt){var value=this.input.value;
4786if(isIE){var start=getInputSelectionStart(this.input),end=start
4787}else{var start=this.input.selectionStart,end=this.input.selectionEnd
4788}var range=this.getAutoCompleteRange(value,start);
4789if(!range||range.type!="int"){range={start:0,end:value.length-1}
4790}var expr=value.substr(range.start,range.end-range.start+1);
4791preExpr=value.substr(0,range.start);
4792postExpr=value.substr(range.end+1);
4793var intValue=parseInt(expr);
4794if(!!intValue||intValue==0){var m=/\d+/.exec(expr);
4795var digitPost=expr.substr(m.index+m[0].length);
4796var completion=intValue-amt;
4797this.input.value=preExpr+completion+digitPost+postExpr;
4798setSelectionRange(this.input,start,end);
4799Firebug.Editor.update(true);
4800return true
4801}else{return false
4802}},onKeyPress:function(event){if(event.keyCode==27&&!this.completeAsYouType){var reverted=this.getAutoCompleter().revert(this.input);
4803if(reverted){cancelEvent(event)
4804}}else{if(event.charCode&&this.advanceToNext(this.target,event.charCode)){Firebug.Editor.tabNextEditor();
4805cancelEvent(event)
4806}else{if(this.numeric&&event.charCode&&(event.charCode<48||event.charCode>57)&&event.charCode!=45&&event.charCode!=46){FBL.cancelEvent(event)
4807}else{this.ignoreNextInput=event.keyCode==8
4808}}}},onOverflow:function(){this.updateLayout(false,false,3)
4809},onKeyDown:function(event){if(event.keyCode>46||event.keyCode==32||event.keyCode==8){this.keyDownPressed=true
4810}},onInput:function(event){if(isIE){if(event.propertyName!="value"||!isVisible(this.input)||!this.keyDownPressed){return
4811}this.keyDownPressed=false
4812}var selectRangeCallback;
4813if(this.ignoreNextInput){this.ignoreNextInput=false;
4814this.getAutoCompleter().reset()
4815}else{if(this.completeAsYouType){selectRangeCallback=this.getAutoCompleter().complete(currentPanel.context,this.input,false)
4816}else{this.getAutoCompleter().reset()
4817}}Firebug.Editor.update();
4818if(selectRangeCallback){if(isSafari){setTimeout(selectRangeCallback,0)
4819}else{selectRangeCallback()
4820}}},onContextMenu:function(event){cancelEvent(event);
4821var popup=$("fbInlineEditorPopup");
4822FBL.eraseNode(popup);
4823var target=event.target||event.srcElement;
4824var menu=this.getContextMenuItems(target);
4825if(menu){for(var i=0;
4826i<menu.length;
4827++i){FBL.createMenuItem(popup,menu[i])
4828}}if(!popup.firstChild){return false
4829}popup.openPopupAtScreen(event.screenX,event.screenY,true);
4830return true
4831},updateLayout:function(initial,forceAll,extraWidth){if(this.fixedWidth){this.box.style.left=(this.targetOffset.x)+"px";
4832this.box.style.top=(this.targetOffset.y)+"px";
4833var w=this.target.offsetWidth;
4834var h=this.target.offsetHeight;
4835this.input.style.width=w+"px";
4836this.input.style.height=(h-3)+"px"
4837}else{if(initial||forceAll){this.box.style.left=this.targetOffset.x+"px";
4838this.box.style.top=this.targetOffset.y+"px"
4839}var approxTextWidth=this.textSize.width;
4840var maxWidth=(currentPanel.panelNode.scrollWidth-this.targetOffset.x)-this.outerMargin;
4841var wrapped=initial?this.noWrap&&this.targetSize.height>this.textSize.height+3:this.noWrap&&approxTextWidth>maxWidth;
4842if(wrapped){var style=isIE?this.target.currentStyle:this.target.ownerDocument.defaultView.getComputedStyle(this.target,"");
4843targetMargin=parseInt(style.marginLeft)+parseInt(style.marginRight);
4844approxTextWidth=maxWidth-targetMargin;
4845this.input.style.width="100%";
4846this.box.style.width=approxTextWidth+"px"
4847}else{var charWidth=this.measureInputText("m").width;
4848if(extraWidth){charWidth*=extraWidth
4849}var inputWidth=approxTextWidth+charWidth;
4850if(initial){if(isIE){var xDiff=13;
4851this.box.style.width=(inputWidth+xDiff)+"px"
4852}else{this.box.style.width="auto"
4853}}else{var xDiff=isIE?13:this.box.scrollWidth-this.input.offsetWidth;
4854this.box.style.width=(inputWidth+xDiff)+"px"
4855}this.input.style.width=inputWidth+"px"
4856}this.expander.style.width=approxTextWidth+"px";
4857this.expander.style.height=Math.max(this.textSize.height-3,0)+"px"
4858}if(forceAll){scrollIntoCenterView(this.box,null,true)
4859}}});
4860Firebug.AutoCompleter=function(getExprOffset,getRange,evaluator,selectMode,caseSensitive){var candidates=null;
4861var originalValue=null;
4862var originalOffset=-1;
4863var lastExpr=null;
4864var lastOffset=-1;
4865var exprOffset=0;
4866var lastIndex=0;
4867var preParsed=null;
4868var preExpr=null;
4869var postExpr=null;
4870this.revert=function(textBox){if(originalOffset!=-1){textBox.value=originalValue;
4871setSelectionRange(textBox,originalOffset,originalOffset);
4872this.reset();
4873return true
4874}else{this.reset();
4875return false
4876}};
4877this.reset=function(){candidates=null;
4878originalValue=null;
4879originalOffset=-1;
4880lastExpr=null;
4881lastOffset=0;
4882exprOffset=0
4883};
4884this.complete=function(context,textBox,cycle,reverse){var value=textBox.value;
4885var offset=getInputSelectionStart(textBox);
4886if(isSafari&&!cycle&&offset>=0){offset++
4887}if(!selectMode&&originalOffset!=-1){offset=originalOffset
4888}if(!candidates||!cycle||offset!=lastOffset){originalOffset=offset;
4889originalValue=value;
4890var parseStart=getExprOffset?getExprOffset(value,offset,context):0;
4891preParsed=value.substr(0,parseStart);
4892var parsed=value.substr(parseStart);
4893var range=getRange?getRange(parsed,offset-parseStart,context):null;
4894if(!range){range={start:0,end:parsed.length-1}
4895}var expr=parsed.substr(range.start,range.end-range.start+1);
4896preExpr=parsed.substr(0,range.start);
4897postExpr=parsed.substr(range.end+1);
4898exprOffset=parseStart+range.start;
4899if(!cycle){if(!expr){return
4900}else{if(lastExpr&&lastExpr.indexOf(expr)!=0){candidates=null
4901}else{if(lastExpr&&lastExpr.length>=expr.length){candidates=null;
4902lastExpr=expr;
4903return
4904}}}}lastExpr=expr;
4905lastOffset=offset;
4906var searchExpr;
4907if(expr&&offset!=parseStart+range.end+1){if(cycle){offset=range.start;
4908searchExpr=expr;
4909expr=""
4910}else{return
4911}}var values=evaluator(preExpr,expr,postExpr,context);
4912if(!values){return
4913}if(expr){candidates=[];
4914if(caseSensitive){for(var i=0;
4915i<values.length;
4916++i){var name=values[i];
4917if(name.indexOf&&name.indexOf(expr)==0){candidates.push(name)
4918}}}else{var lowerExpr=caseSensitive?expr:expr.toLowerCase();
4919for(var i=0;
4920i<values.length;
4921++i){var name=values[i];
4922if(name.indexOf&&name.toLowerCase().indexOf(lowerExpr)==0){candidates.push(name)
4923}}}lastIndex=reverse?candidates.length-1:0
4924}else{if(searchExpr){var searchIndex=-1;
4925if(caseSensitive){searchIndex=values.indexOf(expr)
4926}else{var lowerExpr=searchExpr.toLowerCase();
4927for(var i=0;
4928i<values.length;
4929++i){var name=values[i];
4930if(name&&name.toLowerCase().indexOf(lowerExpr)==0){searchIndex=i;
4931break
4932}}}if(searchIndex==-1){return this.reset()
4933}expr=searchExpr;
4934candidates=cloneArray(values);
4935lastIndex=searchIndex
4936}else{expr="";
4937candidates=[];
4938for(var i=0;
4939i<values.length;
4940++i){if(values[i].substr){candidates.push(values[i])
4941}}lastIndex=-1
4942}}}if(cycle){expr=lastExpr;
4943lastIndex+=reverse?-1:1
4944}if(!candidates.length){return
4945}if(lastIndex>=candidates.length){lastIndex=0
4946}else{if(lastIndex<0){lastIndex=candidates.length-1
4947}}var completion=candidates[lastIndex];
4948var preCompletion=expr.substr(0,offset-exprOffset);
4949var postCompletion=completion.substr(offset-exprOffset);
4950textBox.value=preParsed+preExpr+preCompletion+postCompletion+postExpr;
4951var offsetEnd=preParsed.length+preExpr.length+completion.length;
4952return function(){if(selectMode){setSelectionRange(textBox,offset,offsetEnd)
4953}else{setSelectionRange(textBox,offsetEnd,offsetEnd)
4954}}
4955}
4956};
4957var getDefaultEditor=function getDefaultEditor(panel){if(!defaultEditor){var doc=panel.document;
4958defaultEditor=new Firebug.InlineEditor(doc)
4959}return defaultEditor
4960};
4961var getOutsider=function getOutsider(element,group,stepper){var parentGroup=getAncestorByClass(group.parentNode,"editGroup");
4962var next;
4963do{next=stepper(next||element)
4964}while(isAncestor(next,group)||isGroupInsert(next,parentGroup));
4965return next
4966};
4967var isGroupInsert=function isGroupInsert(next,group){return(!group||isAncestor(next,group))&&(hasClass(next,"insertBefore")||hasClass(next,"insertAfter"))
4968};
4969var getNextOutsider=function getNextOutsider(element,group){return getOutsider(element,group,bind(getNextByClass,FBL,"editable"))
4970};
4971var getPreviousOutsider=function getPreviousOutsider(element,group){return getOutsider(element,group,bind(getPreviousByClass,FBL,"editable"))
4972};
4973var getInlineParent=function getInlineParent(element){var lastInline=element;
4974for(;
4975element;
4976element=element.parentNode){var s=isIE?element.currentStyle:element.ownerDocument.defaultView.getComputedStyle(element,"");
4977if(s.display!="inline"){return lastInline
4978}else{lastInline=element
4979}}return null
4980};
4981var insertTab=function insertTab(){insertTextIntoElement(currentEditor.input,Firebug.Editor.tabCharacter)
4982};
4983Firebug.registerModule(Firebug.Editor)
4984}});
4985FBL.ns(function(){with(FBL){if(Env.Options.disableXHRListener){return
4986}var XHRSpy=function(){this.requestHeaders=[];
4987this.responseHeaders=[]
4988};
4989XHRSpy.prototype={method:null,url:null,async:null,xhrRequest:null,href:null,loaded:false,logRow:null,responseText:null,requestHeaders:null,responseHeaders:null,sourceLink:null,getURL:function(){return this.href
4990}};
4991var XMLHttpRequestWrapper=function(activeXObject){var xhrRequest=typeof activeXObject!="undefined"?activeXObject:new _XMLHttpRequest(),spy=new XHRSpy(),self=this,reqType,reqUrl,reqStartTS;
4992var updateSelfPropertiesIgnore={abort:1,channel:1,getAllResponseHeaders:1,getInterface:1,getResponseHeader:1,mozBackgroundRequest:1,multipart:1,onreadystatechange:1,open:1,send:1,setRequestHeader:1};
4993var updateSelfProperties=function(){if(supportsXHRIterator){for(var propName in xhrRequest){if(propName in updateSelfPropertiesIgnore){continue
4994}try{var propValue=xhrRequest[propName];
4995if(propValue&&!isFunction(propValue)){self[propName]=propValue
4996}}catch(E){}}}else{if(xhrRequest.readyState==4){self.status=xhrRequest.status;
4997self.statusText=xhrRequest.statusText;
4998self.responseText=xhrRequest.responseText;
4999self.responseXML=xhrRequest.responseXML
5000}}};
5001var updateXHRPropertiesIgnore={channel:1,onreadystatechange:1,readyState:1,responseBody:1,responseText:1,responseXML:1,status:1,statusText:1,upload:1};
5002var updateXHRProperties=function(){for(var propName in self){if(propName in updateXHRPropertiesIgnore){continue
5003}try{var propValue=self[propName];
5004if(propValue&&!xhrRequest[propName]){xhrRequest[propName]=propValue
5005}}catch(E){}}};
5006var logXHR=function(){var row=Firebug.Console.log(spy,null,"spy",Firebug.Spy.XHR);
5007if(row){setClass(row,"loading");
5008spy.logRow=row
5009}};
5010var finishXHR=function(){var duration=new Date().getTime()-reqStartTS;
5011var success=xhrRequest.status==200;
5012var responseHeadersText=xhrRequest.getAllResponseHeaders();
5013var responses=responseHeadersText?responseHeadersText.split(/[\n\r]/):[];
5014var reHeader=/^(\S+):\s*(.*)/;
5015for(var i=0,l=responses.length;
5016i<l;
5017i++){var text=responses[i];
5018var match=text.match(reHeader);
5019if(match){var name=match[1];
5020var value=match[2];
5021if(name=="Content-Type"){spy.mimeType=value
5022}spy.responseHeaders.push({name:[name],value:[value]})
5023}}with({row:spy.logRow,status:xhrRequest.status==0?"":xhrRequest.status+" "+xhrRequest.statusText,time:duration,success:success}){setTimeout(function(){spy.responseText=xhrRequest.responseText;
5024row=row||spy.logRow;
5025if(!row){return
5026}handleRequestStatus(success,status,time)
5027},200)
5028}spy.loaded=true;
5029updateSelfProperties()
5030};
5031var handleStateChange=function(){self.readyState=xhrRequest.readyState;
5032if(xhrRequest.readyState==4){finishXHR();
5033xhrRequest.onreadystatechange=function(){}
5034}self.onreadystatechange()
5035};
5036var handleRequestStatus=function(success,status,time){var row=spy.logRow;
5037FBL.removeClass(row,"loading");
5038if(!success){FBL.setClass(row,"error")
5039}var item=FBL.$$(".spyStatus",row)[0];
5040item.innerHTML=status;
5041if(time){var item=FBL.$$(".spyTime",row)[0];
5042item.innerHTML=time+"ms"
5043}};
5044this.readyState=0;
5045this.onreadystatechange=function(){};
5046this.open=function(method,url,async,user,password){updateSelfProperties();
5047if(spy.loaded){spy=new XHRSpy()
5048}spy.method=method;
5049spy.url=url;
5050spy.async=async;
5051spy.href=url;
5052spy.xhrRequest=xhrRequest;
5053spy.urlParams=parseURLParamsArray(url);
5054try{if(supportsApply){xhrRequest.open.apply(xhrRequest,arguments)
5055}else{xhrRequest.open(method,url,async,user,password)
5056}}catch(e){}xhrRequest.onreadystatechange=handleStateChange
5057};
5058this.send=function(data){spy.data=data;
5059reqStartTS=new Date().getTime();
5060updateXHRProperties();
5061try{xhrRequest.send(data)
5062}catch(e){}finally{logXHR();
5063if(!spy.async){self.readyState=xhrRequest.readyState;
5064try{finishXHR()
5065}catch(E){}}}};
5066this.setRequestHeader=function(header,value){spy.requestHeaders.push({name:[header],value:[value]});
5067return xhrRequest.setRequestHeader(header,value)
5068};
5069this.abort=function(){xhrRequest.abort();
5070updateSelfProperties();
5071handleRequestStatus(false,"Aborted")
5072};
5073this.getResponseHeader=function(header){return xhrRequest.getResponseHeader(header)
5074};
5075this.getAllResponseHeaders=function(){return xhrRequest.getAllResponseHeaders()
5076};
5077var supportsApply=!isIE6&&xhrRequest&&xhrRequest.open&&typeof xhrRequest.open.apply!="undefined";
5078var numberOfXHRProperties=0;
5079for(var propName in xhrRequest){numberOfXHRProperties++;
5080if(propName in updateSelfPropertiesIgnore){continue
5081}try{var propValue=xhrRequest[propName];
5082if(isFunction(propValue)){if(typeof self[propName]=="undefined"){this[propName]=(function(name,xhr){return supportsApply?function(){return xhr[name].apply(xhr,arguments)
5083}:function(a,b,c,d,e){return xhr[name](a,b,c,d,e)
5084}
5085})(propName,xhrRequest)
5086}}else{this[propName]=propValue
5087}}catch(E){}}var supportsXHRIterator=numberOfXHRProperties>0;
5088return this
5089};
5090var _ActiveXObject;
5091var isIE6=/msie 6/i.test(navigator.appVersion);
5092if(isIE6){_ActiveXObject=window.ActiveXObject;
5093var xhrObjects=" MSXML2.XMLHTTP.5.0 MSXML2.XMLHTTP.4.0 MSXML2.XMLHTTP.3.0 MSXML2.XMLHTTP Microsoft.XMLHTTP ";
5094window.ActiveXObject=function(name){var error=null;
5095try{var activeXObject=new _ActiveXObject(name)
5096}catch(e){error=e
5097}finally{if(!error){if(xhrObjects.indexOf(" "+name+" ")!=-1){return new XMLHttpRequestWrapper(activeXObject)
5098}else{return activeXObject
5099}}else{throw error.message
5100}}}
5101}if(!isIE6){var _XMLHttpRequest=XMLHttpRequest;
5102window.XMLHttpRequest=function(){return new XMLHttpRequestWrapper()
5103}
5104}FBL.getNativeXHRObject=function(){var xhrObj=false;
5105try{xhrObj=new _XMLHttpRequest()
5106}catch(e){var progid=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
5107for(var i=0;
5108i<progid.length;
5109++i){try{xhrObj=new _ActiveXObject(progid[i])
5110}catch(e){continue
5111}break
5112}}finally{return xhrObj
5113}}
5114}});
5115FBL.ns(function(){with(FBL){var reIgnore=/about:|javascript:|resource:|chrome:|jar:/;
5116var layoutInterval=300;
5117var indentWidth=18;
5118var cacheSession=null;
5119var contexts=new Array();
5120var panelName="net";
5121var maxQueueRequests=500;
5122var activeRequests=[];
5123var mimeExtensionMap={txt:"text/plain",html:"text/html",htm:"text/html",xhtml:"text/html",xml:"text/xml",css:"text/css",js:"application/x-javascript",jss:"application/x-javascript",jpg:"image/jpg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",bmp:"image/bmp",swf:"application/x-shockwave-flash",flv:"video/x-flv"};
5124var fileCategories={"undefined":1,html:1,css:1,js:1,xhr:1,image:1,flash:1,txt:1,bin:1};
5125var textFileCategories={txt:1,html:1,xhr:1,css:1,js:1};
5126var binaryFileCategories={bin:1,flash:1};
5127var mimeCategoryMap={"text/plain":"txt","application/octet-stream":"bin","text/html":"html","text/xml":"html","text/css":"css","application/x-javascript":"js","text/javascript":"js","application/javascript":"js","image/jpeg":"image","image/jpg":"image","image/gif":"image","image/png":"image","image/bmp":"image","application/x-shockwave-flash":"flash","video/x-flv":"flash"};
5128var binaryCategoryMap={image:1,flash:1};
5129Firebug.NetMonitor=extend(Firebug.ActivableModule,{dispatchName:"netMonitor",clear:function(context){var panel=context.getPanel(panelName,true);
5130if(panel){panel.clear()
5131}},initialize:function(){return;
5132this.panelName=panelName;
5133Firebug.ActivableModule.initialize.apply(this,arguments);
5134if(Firebug.TraceModule){Firebug.TraceModule.addListener(this.TraceListener)
5135}NetHttpObserver.registerObserver();
5136NetHttpActivityObserver.registerObserver();
5137Firebug.Debugger.addListener(this.DebuggerListener)
5138},shutdown:function(){return;
5139prefs.removeObserver(Firebug.prefDomain,this,false);
5140if(Firebug.TraceModule){Firebug.TraceModule.removeListener(this.TraceListener)
5141}NetHttpObserver.unregisterObserver();
5142NetHttpActivityObserver.unregisterObserver();
5143Firebug.Debugger.removeListener(this.DebuggerListener)
5144}});
5145Firebug.NetMonitor.NetInfoBody=domplate(Firebug.Rep,new Firebug.Listener(),{tag:DIV({"class":"netInfoBody",_repObject:"$file"},TAG("$infoTabs",{file:"$file"}),TAG("$infoBodies",{file:"$file"})),infoTabs:DIV({"class":"netInfoTabs focusRow subFocusRow",role:"tablist"},A({"class":"netInfoParamsTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Params",$collapsed:"$file|hideParams"},$STR("URLParameters")),A({"class":"netInfoHeadersTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Headers"},$STR("Headers")),A({"class":"netInfoPostTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Post",$collapsed:"$file|hidePost"},$STR("Post")),A({"class":"netInfoPutTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Put",$collapsed:"$file|hidePut"},$STR("Put")),A({"class":"netInfoResponseTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Response",$collapsed:"$file|hideResponse"},$STR("Response")),A({"class":"netInfoCacheTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Cache",$collapsed:"$file|hideCache"},$STR("Cache")),A({"class":"netInfoHtmlTab netInfoTab a11yFocus",onclick:"$onClickTab",role:"tab",view:"Html",$collapsed:"$file|hideHtml"},$STR("HTML"))),infoBodies:DIV({"class":"netInfoBodies outerFocusRow"},TABLE({"class":"netInfoParamsText netInfoText netInfoParamsTable",role:"tabpanel",cellpadding:0,cellspacing:0},TBODY()),DIV({"class":"netInfoHeadersText netInfoText",role:"tabpanel"}),DIV({"class":"netInfoPostText netInfoText",role:"tabpanel"}),DIV({"class":"netInfoPutText netInfoText",role:"tabpanel"}),PRE({"class":"netInfoResponseText netInfoText",role:"tabpanel"}),DIV({"class":"netInfoCacheText netInfoText",role:"tabpanel"},TABLE({"class":"netInfoCacheTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("Cache")}))),DIV({"class":"netInfoHtmlText netInfoText",role:"tabpanel"},IFRAME({"class":"netInfoHtmlPreview",role:"document"}))),headerDataTag:FOR("param","$headers",TR({role:"listitem"},TD({"class":"netInfoParamName",role:"presentation"},TAG("$param|getNameTag",{param:"$param"})),TD({"class":"netInfoParamValue",role:"list","aria-label":"$param.name"},FOR("line","$param|getParamValueIterator",CODE({"class":"focusRow subFocusRow",role:"listitem"},"$line"))))),customTab:A({"class":"netInfo$tabId\\Tab netInfoTab",onclick:"$onClickTab",view:"$tabId",role:"tab"},"$tabTitle"),customBody:DIV({"class":"netInfo$tabId\\Text netInfoText",role:"tabpanel"}),nameTag:SPAN("$param|getParamName"),nameWithTooltipTag:SPAN({title:"$param.name"},"$param|getParamName"),getNameTag:function(param){return(this.getParamName(param)==param.name)?this.nameTag:this.nameWithTooltipTag
5146},getParamName:function(param){var limit=25;
5147var name=param.name;
5148if(name.length>limit){name=name.substr(0,limit)+"..."
5149}return name
5150},getParamTitle:function(param){var limit=25;
5151var name=param.name;
5152if(name.length>limit){return name
5153}return""
5154},hideParams:function(file){return !file.urlParams||!file.urlParams.length
5155},hidePost:function(file){return file.method.toUpperCase()!="POST"
5156},hidePut:function(file){return file.method.toUpperCase()!="PUT"
5157},hideResponse:function(file){return false
5158},hideCache:function(file){return true;
5159return !file.cacheEntry
5160},hideHtml:function(file){return(file.mimeType!="text/html")&&(file.mimeType!="application/xhtml+xml")
5161},onClickTab:function(event){this.selectTab(event.currentTarget||event.srcElement)
5162},getParamValueIterator:function(param){return param.value;
5163return wrapText(param.value,true)
5164},appendTab:function(netInfoBox,tabId,tabTitle){var args={tabId:tabId,tabTitle:tabTitle};
5165this.customTab.append(args,$$(".netInfoTabs",netInfoBox)[0]);
5166this.customBody.append(args,$$(".netInfoBodies",netInfoBox)[0])
5167},selectTabByName:function(netInfoBox,tabName){var tab=getChildByClass(netInfoBox,"netInfoTabs","netInfo"+tabName+"Tab");
5168if(tab){this.selectTab(tab)
5169}},selectTab:function(tab){var view=tab.getAttribute("view");
5170var netInfoBox=getAncestorByClass(tab,"netInfoBody");
5171var selectedTab=netInfoBox.selectedTab;
5172if(selectedTab){removeClass(netInfoBox.selectedText,"netInfoTextSelected");
5173removeClass(selectedTab,"netInfoTabSelected");
5174selectedTab.setAttribute("aria-selected","false")
5175}var textBodyName="netInfo"+view+"Text";
5176selectedTab=netInfoBox.selectedTab=tab;
5177netInfoBox.selectedText=$$("."+textBodyName,netInfoBox)[0];
5178setClass(netInfoBox.selectedText,"netInfoTextSelected");
5179setClass(selectedTab,"netInfoTabSelected");
5180selectedTab.setAttribute("selected","true");
5181selectedTab.setAttribute("aria-selected","true");
5182var file=Firebug.getRepObject(netInfoBox);
5183var context=Firebug.chrome;
5184this.updateInfo(netInfoBox,file,context)
5185},updateInfo:function(netInfoBox,file,context){if(FBTrace.DBG_NET){FBTrace.sysout("net.updateInfo; file",file)
5186}if(!netInfoBox){if(FBTrace.DBG_NET||FBTrace.DBG_ERRORS){FBTrace.sysout("net.updateInfo; ERROR netInfo == null "+file.href,file)
5187}return
5188}var tab=netInfoBox.selectedTab;
5189if(hasClass(tab,"netInfoParamsTab")){if(file.urlParams&&!netInfoBox.urlParamsPresented){netInfoBox.urlParamsPresented=true;
5190this.insertHeaderRows(netInfoBox,file.urlParams,"Params")
5191}}else{if(hasClass(tab,"netInfoHeadersTab")){var headersText=$$(".netInfoHeadersText",netInfoBox)[0];
5192if(file.responseHeaders&&!netInfoBox.responseHeadersPresented){netInfoBox.responseHeadersPresented=true;
5193NetInfoHeaders.renderHeaders(headersText,file.responseHeaders,"ResponseHeaders")
5194}if(file.requestHeaders&&!netInfoBox.requestHeadersPresented){netInfoBox.requestHeadersPresented=true;
5195NetInfoHeaders.renderHeaders(headersText,file.requestHeaders,"RequestHeaders")
5196}}else{if(hasClass(tab,"netInfoPostTab")){if(!netInfoBox.postPresented){netInfoBox.postPresented=true;
5197var postText=$$(".netInfoPostText",netInfoBox)[0];
5198NetInfoPostData.render(context,postText,file)
5199}}else{if(hasClass(tab,"netInfoPutTab")){if(!netInfoBox.putPresented){netInfoBox.putPresented=true;
5200var putText=$$(".netInfoPutText",netInfoBox)[0];
5201NetInfoPostData.render(context,putText,file)
5202}}else{if(hasClass(tab,"netInfoResponseTab")&&file.loaded&&!netInfoBox.responsePresented){var responseTextBox=$$(".netInfoResponseText",netInfoBox)[0];
5203if(file.category=="image"){netInfoBox.responsePresented=true;
5204var responseImage=netInfoBox.ownerDocument.createElement("img");
5205responseImage.src=file.href;
5206clearNode(responseTextBox);
5207responseTextBox.appendChild(responseImage,responseTextBox)
5208}else{this.setResponseText(file,netInfoBox,responseTextBox,context)
5209}}else{if(hasClass(tab,"netInfoCacheTab")&&file.loaded&&!netInfoBox.cachePresented){var responseTextBox=netInfoBox.getElementsByClassName("netInfoCacheText").item(0);
5210if(file.cacheEntry){netInfoBox.cachePresented=true;
5211this.insertHeaderRows(netInfoBox,file.cacheEntry,"Cache")
5212}}else{if(hasClass(tab,"netInfoHtmlTab")&&file.loaded&&!netInfoBox.htmlPresented){netInfoBox.htmlPresented=true;
5213var text=Utils.getResponseText(file,context);
5214var iframe=$$(".netInfoHtmlPreview",netInfoBox)[0];
5215var reScript=/<script(.|\s)*?\/script>/gi;
5216text=text.replace(reScript,"");
5217iframe.contentWindow.document.write(text);
5218iframe.contentWindow.document.close()
5219}}}}}}}dispatch(NetInfoBody.fbListeners,"updateTabBody",[netInfoBox,file,context])
5220},setResponseText:function(file,netInfoBox,responseTextBox,context){netInfoBox.responsePresented=true;
5221if(isIE){responseTextBox.style.whiteSpace="nowrap"
5222}responseTextBox[typeof responseTextBox.textContent!="undefined"?"textContent":"innerText"]=file.responseText;
5223return;
5224var text=Utils.getResponseText(file,context);
5225var limit=Firebug.netDisplayedResponseLimit+15;
5226var limitReached=text?(text.length>limit):false;
5227if(limitReached){text=text.substr(0,limit)+"..."
5228}if(text){insertWrappedText(text,responseTextBox)
5229}else{insertWrappedText("",responseTextBox)
5230}if(limitReached){var object={text:$STR("net.responseSizeLimitMessage"),onClickLink:function(){var panel=context.getPanel("net",true);
5231panel.openResponseInTab(file)
5232}};
5233Firebug.NetMonitor.ResponseSizeLimit.append(object,responseTextBox)
5234}netInfoBox.responsePresented=true;
5235if(FBTrace.DBG_NET){FBTrace.sysout("net.setResponseText; response text updated")
5236}},insertHeaderRows:function(netInfoBox,headers,tableName,rowName){if(!headers.length){return
5237}var headersTable=$$(".netInfo"+tableName+"Table",netInfoBox)[0];
5238var tbody=getChildByClass(headersTable,"netInfo"+rowName+"Body");
5239if(!tbody){tbody=headersTable.firstChild
5240}var titleRow=getChildByClass(tbody,"netInfo"+rowName+"Title");
5241this.headerDataTag.insertRows({headers:headers},titleRow?titleRow:tbody);
5242removeClass(titleRow,"collapsed")
5243}});
5244var NetInfoBody=Firebug.NetMonitor.NetInfoBody;
5245Firebug.NetMonitor.NetInfoHeaders=domplate(Firebug.Rep,{tag:DIV({"class":"netInfoHeadersTable",role:"tabpanel"},DIV({"class":"netInfoHeadersGroup netInfoResponseHeadersTitle"},SPAN($STR("ResponseHeaders")),SPAN({"class":"netHeadersViewSource response collapsed",onclick:"$onViewSource",_sourceDisplayed:false,_rowName:"ResponseHeaders"},$STR("net.headers.view source"))),TABLE({cellpadding:0,cellspacing:0},TBODY({"class":"netInfoResponseHeadersBody",role:"list","aria-label":$STR("ResponseHeaders")})),DIV({"class":"netInfoHeadersGroup netInfoRequestHeadersTitle"},SPAN($STR("RequestHeaders")),SPAN({"class":"netHeadersViewSource request collapsed",onclick:"$onViewSource",_sourceDisplayed:false,_rowName:"RequestHeaders"},$STR("net.headers.view source"))),TABLE({cellpadding:0,cellspacing:0},TBODY({"class":"netInfoRequestHeadersBody",role:"list","aria-label":$STR("RequestHeaders")}))),sourceTag:TR({role:"presentation"},TD({colspan:2,role:"presentation"},PRE({"class":"source"}))),onViewSource:function(event){var target=event.target;
5246var requestHeaders=(target.rowName=="RequestHeaders");
5247var netInfoBox=getAncestorByClass(target,"netInfoBody");
5248var file=netInfoBox.repObject;
5249if(target.sourceDisplayed){var headers=requestHeaders?file.requestHeaders:file.responseHeaders;
5250this.insertHeaderRows(netInfoBox,headers,target.rowName);
5251target.innerHTML=$STR("net.headers.view source")
5252}else{var source=requestHeaders?file.requestHeadersText:file.responseHeadersText;
5253this.insertSource(netInfoBox,source,target.rowName);
5254target.innerHTML=$STR("net.headers.pretty print")
5255}target.sourceDisplayed=!target.sourceDisplayed;
5256cancelEvent(event)
5257},insertSource:function(netInfoBox,source,rowName){var tbody=$$(".netInfo"+rowName+"Body",netInfoBox)[0];
5258var node=this.sourceTag.replace({},tbody);
5259var sourceNode=$$(".source",node)[0];
5260sourceNode.innerHTML=source
5261},insertHeaderRows:function(netInfoBox,headers,rowName){var headersTable=$$(".netInfoHeadersTable",netInfoBox)[0];
5262var tbody=$$(".netInfo"+rowName+"Body",headersTable)[0];
5263clearNode(tbody);
5264if(!headers.length){return
5265}NetInfoBody.headerDataTag.insertRows({headers:headers},tbody);
5266var titleRow=getChildByClass(headersTable,"netInfo"+rowName+"Title");
5267removeClass(titleRow,"collapsed")
5268},init:function(parent){var rootNode=this.tag.append({},parent);
5269var netInfoBox=getAncestorByClass(parent,"netInfoBody");
5270var file=netInfoBox.repObject;
5271var viewSource;
5272viewSource=$$(".request",rootNode)[0];
5273if(file.requestHeadersText){removeClass(viewSource,"collapsed")
5274}viewSource=$$(".response",rootNode)[0];
5275if(file.responseHeadersText){removeClass(viewSource,"collapsed")
5276}},renderHeaders:function(parent,headers,rowName){if(!parent.firstChild){this.init(parent)
5277}this.insertHeaderRows(parent,headers,rowName)
5278}});
5279var NetInfoHeaders=Firebug.NetMonitor.NetInfoHeaders;
5280Firebug.NetMonitor.NetInfoPostData=domplate(Firebug.Rep,{paramsTable:TABLE({"class":"netInfoPostParamsTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("net.label.Parameters")},TR({"class":"netInfoPostParamsTitle",role:"presentation"},TD({colspan:3,role:"presentation"},DIV({"class":"netInfoPostParams"},$STR("net.label.Parameters"),SPAN({"class":"netInfoPostContentType"},"application/x-www-form-urlencoded")))))),partsTable:TABLE({"class":"netInfoPostPartsTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("net.label.Parts")},TR({"class":"netInfoPostPartsTitle",role:"presentation"},TD({colspan:2,role:"presentation"},DIV({"class":"netInfoPostParams"},$STR("net.label.Parts"),SPAN({"class":"netInfoPostContentType"},"multipart/form-data")))))),jsonTable:TABLE({"class":"netInfoPostJSONTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("JSON")},TR({"class":"netInfoPostJSONTitle",role:"presentation"},TD({role:"presentation"},DIV({"class":"netInfoPostParams"},$STR("JSON")))),TR(TD({"class":"netInfoPostJSONBody"})))),xmlTable:TABLE({"class":"netInfoPostXMLTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("xmlviewer.tab.XML")},TR({"class":"netInfoPostXMLTitle",role:"presentation"},TD({role:"presentation"},DIV({"class":"netInfoPostParams"},$STR("xmlviewer.tab.XML")))),TR(TD({"class":"netInfoPostXMLBody"})))),sourceTable:TABLE({"class":"netInfoPostSourceTable",cellpadding:0,cellspacing:0,role:"presentation"},TBODY({role:"list","aria-label":$STR("net.label.Source")},TR({"class":"netInfoPostSourceTitle",role:"presentation"},TD({colspan:2,role:"presentation"},DIV({"class":"netInfoPostSource"},$STR("net.label.Source")))))),sourceBodyTag:TR({role:"presentation"},TD({colspan:2,role:"presentation"},FOR("line","$param|getParamValueIterator",CODE({"class":"focusRow subFocusRow",role:"listitem"},"$line")))),getParamValueIterator:function(param){return NetInfoBody.getParamValueIterator(param)
5281},render:function(context,parentNode,file){var spy=getAncestorByClass(parentNode,"spyHead");
5282var spyObject=spy.repObject;
5283var data=spyObject.data;
5284var contentType=file.mimeType;
5285if(contentType&&contentType=="application/x-www-form-urlencoded"||data&&data.indexOf("=")!=-1){var params=parseURLEncodedTextArray(data);
5286if(params){this.insertParameters(parentNode,params)
5287}}var jsonData={responseText:data};
5288if(Firebug.JSONViewerModel.isJSON(contentType,data)){this.insertJSON(parentNode,jsonData,context)
5289}var postText=data;
5290if(postText){this.insertSource(parentNode,postText)
5291}},insertParameters:function(parentNode,params){if(!params||!params.length){return
5292}var paramTable=this.paramsTable.append({object:{}},parentNode);
5293var row=$$(".netInfoPostParamsTitle",paramTable)[0];
5294var tbody=paramTable.getElementsByTagName("tbody")[0];
5295NetInfoBody.headerDataTag.insertRows({headers:params},row)
5296},insertParts:function(parentNode,data){if(!data.params||!data.params.length){return
5297}var partsTable=this.partsTable.append({object:{}},parentNode);
5298var row=$$(".netInfoPostPartsTitle",paramTable)[0];
5299NetInfoBody.headerDataTag.insertRows({headers:data.params},row)
5300},insertJSON:function(parentNode,file,context){var text=file.responseText;
5301var data=parseJSONString(text);
5302if(!data){return
5303}var jsonTable=this.jsonTable.append({},parentNode);
5304var jsonBody=$$(".netInfoPostJSONBody",jsonTable)[0];
5305if(!this.toggles){this.toggles={}
5306}Firebug.DOMPanel.DirTable.tag.replace({object:data,toggles:this.toggles},jsonBody)
5307},insertXML:function(parentNode,file,context){var text=Utils.getPostText(file,context);
5308var jsonTable=this.xmlTable.append(null,parentNode);
5309var jsonBody=$$(".netInfoPostXMLBody",jsonTable)[0];
5310Firebug.XMLViewerModel.insertXML(jsonBody,text)
5311},insertSource:function(parentNode,text){var sourceTable=this.sourceTable.append({object:{}},parentNode);
5312var row=$$(".netInfoPostSourceTitle",sourceTable)[0];
5313var param={value:[text]};
5314this.sourceBodyTag.insertRows({param:param},row)
5315},parseMultiPartText:function(file,context){var text=Utils.getPostText(file,context);
5316if(text==undefined){return null
5317}FBTrace.sysout("net.parseMultiPartText; boundary: ",text);
5318var boundary=text.match(/\s*boundary=\s*(.*)/)[1];
5319var divider="\r\n\r\n";
5320var bodyStart=text.indexOf(divider);
5321var body=text.substr(bodyStart+divider.length);
5322var postData={};
5323postData.mimeType="multipart/form-data";
5324postData.params=[];
5325var parts=body.split("--"+boundary);
5326for(var i=0;
5327i<parts.length;
5328i++){var part=parts[i].split(divider);
5329if(part.length!=2){continue
5330}var m=part[0].match(/\s*name=\"(.*)\"(;|$)/);
5331postData.params.push({name:(m&&m.length>1)?m[1]:"",value:trim(part[1])})
5332}return postData
5333}});
5334var NetInfoPostData=Firebug.NetMonitor.NetInfoPostData;
5335var $STRP=function(a){return a
5336};
5337Firebug.NetMonitor.NetLimit=domplate(Firebug.Rep,{collapsed:true,tableTag:DIV(TABLE({width:"100%",cellpadding:0,cellspacing:0},TBODY())),limitTag:TR({"class":"netRow netLimitRow",$collapsed:"$isCollapsed"},TD({"class":"netCol netLimitCol",colspan:6},TABLE({cellpadding:0,cellspacing:0},TBODY(TR(TD(SPAN({"class":"netLimitLabel"},$STRP("plural.Limit_Exceeded",[0]))),TD({style:"width:100%"}),TD(BUTTON({"class":"netLimitButton",title:"$limitPrefsTitle",onclick:"$onPreferences"},$STR("LimitPrefs"))),TD("&nbsp;")))))),isCollapsed:function(){return this.collapsed
5338},onPreferences:function(event){openNewTab("about:config")
5339},updateCounter:function(row){removeClass(row,"collapsed");
5340var limitLabel=row.getElementsByClassName("netLimitLabel").item(0);
5341limitLabel.firstChild.nodeValue=$STRP("plural.Limit_Exceeded",[row.limitInfo.totalCount])
5342},createTable:function(parent,limitInfo){var table=this.tableTag.replace({},parent);
5343var row=this.createRow(table.firstChild.firstChild,limitInfo);
5344return[table,row]
5345},createRow:function(parent,limitInfo){var row=this.limitTag.insertRows(limitInfo,parent,this)[0];
5346row.limitInfo=limitInfo;
5347return row
5348},observe:function(subject,topic,data){if(topic!="nsPref:changed"){return
5349}if(data.indexOf("net.logLimit")!=-1){this.updateMaxLimit()
5350}},updateMaxLimit:function(){var value=Firebug.getPref(Firebug.prefDomain,"net.logLimit");
5351maxQueueRequests=value?value:maxQueueRequests
5352}});
5353var NetLimit=Firebug.NetMonitor.NetLimit;
5354Firebug.NetMonitor.ResponseSizeLimit=domplate(Firebug.Rep,{tag:DIV({"class":"netInfoResponseSizeLimit"},SPAN("$object.beforeLink"),A({"class":"objectLink",onclick:"$onClickLink"},"$object.linkText"),SPAN("$object.afterLink")),reLink:/^(.*)<a>(.*)<\/a>(.*$)/,append:function(obj,parent){var m=obj.text.match(this.reLink);
5355return this.tag.append({onClickLink:obj.onClickLink,object:{beforeLink:m[1],linkText:m[2],afterLink:m[3]}},parent,this)
5356}});
5357Firebug.NetMonitor.Utils={findHeader:function(headers,name){if(!headers){return null
5358}name=name.toLowerCase();
5359for(var i=0;
5360i<headers.length;
5361++i){var headerName=headers[i].name.toLowerCase();
5362if(headerName==name){return headers[i].value
5363}}},formatPostText:function(text){if(text instanceof XMLDocument){return getElementXML(text.documentElement)
5364}else{return text
5365}},getPostText:function(file,context,noLimit){if(!file.postText){file.postText=readPostTextFromRequest(file.request,context);
5366if(!file.postText&&context){file.postText=readPostTextFromPage(file.href,context)
5367}}if(!file.postText){return file.postText
5368}var limit=Firebug.netDisplayedPostBodyLimit;
5369if(file.postText.length>limit&&!noLimit){return cropString(file.postText,limit,"\n\n... "+$STR("net.postDataSizeLimitMessage")+" ...\n\n")
5370}return file.postText
5371},getResponseText:function(file,context){return(typeof(file.responseText)!="undefined")?file.responseText:context.sourceCache.loadText(file.href,file.method,file)
5372},isURLEncodedRequest:function(file,context){var text=Utils.getPostText(file,context);
5373if(text&&text.toLowerCase().indexOf("content-type: application/x-www-form-urlencoded")==0){return true
5374}var headerValue=Utils.findHeader(file.requestHeaders,"content-type");
5375if(headerValue&&headerValue.indexOf("application/x-www-form-urlencoded")==0){return true
5376}return false
5377},isMultiPartRequest:function(file,context){var text=Utils.getPostText(file,context);
5378if(text&&text.toLowerCase().indexOf("content-type: multipart/form-data")==0){return true
5379}return false
5380},getMimeType:function(mimeType,uri){if(!mimeType||!(mimeCategoryMap.hasOwnProperty(mimeType))){var ext=getFileExtension(uri);
5381if(!ext){return mimeType
5382}else{var extMimeType=mimeExtensionMap[ext.toLowerCase()];
5383return extMimeType?extMimeType:mimeType
5384}}else{return mimeType
5385}},getDateFromSeconds:function(s){var d=new Date();
5386d.setTime(s*1000);
5387return d
5388},getHttpHeaders:function(request,file){try{var http=QI(request,Ci.nsIHttpChannel);
5389file.status=request.responseStatus;
5390file.method=http.requestMethod;
5391file.urlParams=parseURLParams(file.href);
5392file.mimeType=Utils.getMimeType(request.contentType,request.name);
5393if(!file.responseHeaders&&Firebug.collectHttpHeaders){var requestHeaders=[],responseHeaders=[];
5394http.visitRequestHeaders({visitHeader:function(name,value){requestHeaders.push({name:name,value:value})
5395}});
5396http.visitResponseHeaders({visitHeader:function(name,value){responseHeaders.push({name:name,value:value})
5397}});
5398file.requestHeaders=requestHeaders;
5399file.responseHeaders=responseHeaders
5400}}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("net.getHttpHeaders FAILS "+file.href,exc)
5401}}},isXHR:function(request){try{var callbacks=request.notificationCallbacks;
5402var xhrRequest=callbacks?callbacks.getInterface(Ci.nsIXMLHttpRequest):null;
5403if(FBTrace.DBG_NET){FBTrace.sysout("net.isXHR; "+(xhrRequest!=null)+", "+safeGetName(request))
5404}return(xhrRequest!=null)
5405}catch(exc){}return false
5406},getFileCategory:function(file){if(file.category){if(FBTrace.DBG_NET){FBTrace.sysout("net.getFileCategory; current: "+file.category+" for: "+file.href,file)
5407}return file.category
5408}if(file.isXHR){if(FBTrace.DBG_NET){FBTrace.sysout("net.getFileCategory; XHR for: "+file.href,file)
5409}return file.category="xhr"
5410}if(!file.mimeType){var ext=getFileExtension(file.href);
5411if(ext){file.mimeType=mimeExtensionMap[ext.toLowerCase()]
5412}}if(!file.mimeType){return""
5413}var mimeType=file.mimeType;
5414if(mimeType){mimeType=mimeType.split(";")[0]
5415}return(file.category=mimeCategoryMap[mimeType])
5416}};
5417var Utils=Firebug.NetMonitor.Utils;
5418Firebug.registerModule(Firebug.NetMonitor)
5419}});
5420FBL.ns(function(){with(FBL){var contexts=[];
5421Firebug.Spy=extend(Firebug.Module,{dispatchName:"spy",initialize:function(){if(Firebug.TraceModule){Firebug.TraceModule.addListener(this.TraceListener)
5422}Firebug.Module.initialize.apply(this,arguments)
5423},shutdown:function(){Firebug.Module.shutdown.apply(this,arguments);
5424if(Firebug.TraceModule){Firebug.TraceModule.removeListener(this.TraceListener)
5425}},initContext:function(context){context.spies=[];
5426if(Firebug.showXMLHttpRequests&&Firebug.Console.isAlwaysEnabled()){this.attachObserver(context,context.window)
5427}if(FBTrace.DBG_SPY){FBTrace.sysout("spy.initContext "+contexts.length+" ",context.getName())
5428}},destroyContext:function(context){this.detachObserver(context,null);
5429if(FBTrace.DBG_SPY&&context.spies.length){FBTrace.sysout("spy.destroyContext; ERROR There are leaking Spies ("+context.spies.length+") "+context.getName())
5430}delete context.spies;
5431if(FBTrace.DBG_SPY){FBTrace.sysout("spy.destroyContext "+contexts.length+" ",context.getName())
5432}},watchWindow:function(context,win){if(Firebug.showXMLHttpRequests&&Firebug.Console.isAlwaysEnabled()){this.attachObserver(context,win)
5433}},unwatchWindow:function(context,win){try{this.detachObserver(context,win)
5434}catch(ex){ERROR(ex)
5435}},updateOption:function(name,value){if(name=="showXMLHttpRequests"){var tach=value?this.attachObserver:this.detachObserver;
5436for(var i=0;
5437i<TabWatcher.contexts.length;
5438++i){var context=TabWatcher.contexts[i];
5439iterateWindows(context.window,function(win){tach.apply(this,[context,win])
5440})
5441}}},skipSpy:function(win){if(!win){return true
5442}var uri=safeGetWindowLocation(win);
5443if(uri&&(uri.indexOf("about:")==0||uri.indexOf("chrome:")==0)){return true
5444}},attachObserver:function(context,win){if(Firebug.Spy.skipSpy(win)){return
5445}for(var i=0;
5446i<contexts.length;
5447++i){if((contexts[i].context==context)&&(contexts[i].win==win)){return
5448}}if(contexts.length==0){httpObserver.addObserver(SpyHttpObserver,"firebug-http-event",false);
5449SpyHttpActivityObserver.registerObserver()
5450}contexts.push({context:context,win:win});
5451if(FBTrace.DBG_SPY){FBTrace.sysout("spy.attachObserver (HTTP) "+contexts.length+" ",context.getName())
5452}},detachObserver:function(context,win){for(var i=0;
5453i<contexts.length;
5454++i){if(contexts[i].context==context){if(win&&(contexts[i].win!=win)){continue
5455}contexts.splice(i,1);
5456if(contexts.length==0){httpObserver.removeObserver(SpyHttpObserver,"firebug-http-event");
5457SpyHttpActivityObserver.unregisterObserver()
5458}if(FBTrace.DBG_SPY){FBTrace.sysout("spy.detachObserver (HTTP) "+contexts.length+" ",context.getName())
5459}return
5460}}},getXHR:function(request){if(!(request instanceof Ci.nsIHttpChannel)){return null
5461}try{var callbacks=request.notificationCallbacks;
5462return(callbacks?callbacks.getInterface(Ci.nsIXMLHttpRequest):null)
5463}catch(exc){if(exc.name=="NS_NOINTERFACE"){if(FBTrace.DBG_SPY){FBTrace.sysout("spy.getXHR; Request is not nsIXMLHttpRequest: "+safeGetRequestName(request))
5464}}}return null
5465}});
5466Firebug.Spy.XHR=domplate(Firebug.Rep,{tag:DIV({"class":"spyHead",_repObject:"$object"},TABLE({"class":"spyHeadTable focusRow outerFocusRow",cellpadding:0,cellspacing:0,role:"listitem","aria-expanded":"false"},TBODY({role:"presentation"},TR({"class":"spyRow"},TD({"class":"spyTitleCol spyCol",onclick:"$onToggleBody"},DIV({"class":"spyTitle"},"$object|getCaption"),DIV({"class":"spyFullTitle spyTitle"},"$object|getFullUri")),TD({"class":"spyCol"},DIV({"class":"spyStatus"},"$object|getStatus")),TD({"class":"spyCol"},SPAN({"class":"spyIcon"})),TD({"class":"spyCol"},SPAN({"class":"spyTime"})),TD({"class":"spyCol"},TAG(FirebugReps.SourceLink.tag,{object:"$object.sourceLink"})))))),getCaption:function(spy){return spy.method.toUpperCase()+" "+cropString(spy.getURL(),100)
5467},getFullUri:function(spy){return spy.method.toUpperCase()+" "+spy.getURL()
5468},getStatus:function(spy){var text="";
5469if(spy.statusCode){text+=spy.statusCode+" "
5470}if(spy.statusText){return text+=spy.statusText
5471}return text
5472},onToggleBody:function(event){var target=event.currentTarget||event.srcElement;
5473var logRow=getAncestorByClass(target,"logRow-spy");
5474if(isLeftClick(event)){toggleClass(logRow,"opened");
5475var spy=getChildByClass(logRow,"spyHead").repObject;
5476var spyHeadTable=getAncestorByClass(target,"spyHeadTable");
5477if(hasClass(logRow,"opened")){updateHttpSpyInfo(spy,logRow);
5478if(spyHeadTable){spyHeadTable.setAttribute("aria-expanded","true")
5479}}else{}}},copyURL:function(spy){copyToClipboard(spy.getURL())
5480},copyParams:function(spy){var text=spy.postText;
5481if(!text){return
5482}var url=reEncodeURL(spy,text,true);
5483copyToClipboard(url)
5484},copyResponse:function(spy){copyToClipboard(spy.responseText)
5485},openInTab:function(spy){openNewTab(spy.getURL(),spy.postText)
5486},supportsObject:function(object){return false;
5487return object instanceof Firebug.Spy.XMLHttpRequestSpy
5488},browseObject:function(spy,context){var url=spy.getURL();
5489openNewTab(url);
5490return true
5491},getRealObject:function(spy,context){return spy.xhrRequest
5492},getContextMenuItems:function(spy){var items=[{label:"CopyLocation",command:bindFixed(this.copyURL,this,spy)}];
5493if(spy.postText){items.push({label:"CopyLocationParameters",command:bindFixed(this.copyParams,this,spy)})
5494}items.push({label:"CopyResponse",command:bindFixed(this.copyResponse,this,spy)},"-",{label:"OpenInTab",command:bindFixed(this.openInTab,this,spy)});
5495return items
5496}});
5497function updateTime(spy){var timeBox=spy.logRow.getElementsByClassName("spyTime").item(0);
5498if(spy.responseTime){timeBox.textContent=" "+formatTime(spy.responseTime)
5499}}function updateLogRow(spy){updateTime(spy);
5500var statusBox=spy.logRow.getElementsByClassName("spyStatus").item(0);
5501statusBox.textContent=Firebug.Spy.XHR.getStatus(spy);
5502removeClass(spy.logRow,"loading");
5503setClass(spy.logRow,"loaded");
5504try{var errorRange=Math.floor(spy.xhrRequest.status/100);
5505if(errorRange==4||errorRange==5){setClass(spy.logRow,"error")
5506}}catch(exc){}}var updateHttpSpyInfo=function updateHttpSpyInfo(spy,logRow){if(!spy.logRow&&logRow){spy.logRow=logRow
5507}if(!spy.logRow||!hasClass(spy.logRow,"opened")){return
5508}if(!spy.params){spy.params=parseURLParams(spy.href+"")
5509}if(!spy.requestHeaders){spy.requestHeaders=getRequestHeaders(spy)
5510}if(!spy.responseHeaders&&spy.loaded){spy.responseHeaders=getResponseHeaders(spy)
5511}var template=Firebug.NetMonitor.NetInfoBody;
5512var netInfoBox=getChildByClass(spy.logRow,"spyHead","netInfoBody");
5513if(!netInfoBox){var head=getChildByClass(spy.logRow,"spyHead");
5514netInfoBox=template.tag.append({file:spy},head);
5515dispatch(template.fbListeners,"initTabBody",[netInfoBox,spy]);
5516template.selectTabByName(netInfoBox,"Response")
5517}else{template.updateInfo(netInfoBox,spy,spy.context)
5518}};
5519function getRequestHeaders(spy){var headers=[];
5520var channel=spy.xhrRequest.channel;
5521if(channel instanceof Ci.nsIHttpChannel){channel.visitRequestHeaders({visitHeader:function(name,value){headers.push({name:name,value:value})
5522}})
5523}return headers
5524}function getResponseHeaders(spy){var headers=[];
5525try{var channel=spy.xhrRequest.channel;
5526if(channel instanceof Ci.nsIHttpChannel){channel.visitResponseHeaders({visitHeader:function(name,value){headers.push({name:name,value:value})
5527}})
5528}}catch(exc){if(FBTrace.DBG_SPY||FBTrace.DBG_ERRORS){FBTrace.sysout("spy.getResponseHeaders; EXCEPTION "+safeGetRequestName(spy.request),exc)
5529}}return headers
5530}Firebug.registerModule(Firebug.Spy)
5531}});
5532FBL.ns(function(){with(FBL){var contentTypes={"text/javascript":1,"text/x-javascript":1,"text/json":1,"text/x-json":1,"application/json":1,"application/x-json":1,"application/javascript":1,"application/x-javascript":1,"application/json-rpc":1};
5533Firebug.JSONViewerModel=extend(Firebug.Module,{dispatchName:"jsonViewer",initialize:function(){Firebug.NetMonitor.NetInfoBody.addListener(this);
5534this.toggles={}
5535},shutdown:function(){Firebug.NetMonitor.NetInfoBody.removeListener(this)
5536},initTabBody:function(infoBox,file){if(FBTrace.DBG_JSONVIEWER){FBTrace.sysout("jsonviewer.initTabBody",infoBox)
5537}dispatch(this.fbListeners,"onParseJSON",[file]);
5538if(!file.jsonObject){if(this.isJSON(file.mimeType,file.responseText)){file.jsonObject=this.parseJSON(file)
5539}}if(file.jsonObject&&hasProperties(file.jsonObject)){Firebug.NetMonitor.NetInfoBody.appendTab(infoBox,"JSON",$STR("JSON"));
5540if(FBTrace.DBG_JSONVIEWER){FBTrace.sysout("jsonviewer.initTabBody; JSON object available "+(typeof(file.jsonObject)!="undefined"),file.jsonObject)
5541}}},isJSON:function(contentType,data){var responseText=data?trim(data):null;
5542if(responseText&&responseText.indexOf("{")==0){return true
5543}if(!contentType){return false
5544}contentType=contentType.split(";")[0];
5545contentType=trim(contentType);
5546return contentTypes[contentType]
5547},updateTabBody:function(infoBox,file,context){var tab=infoBox.selectedTab;
5548var tabBody=$$(".netInfoJSONText",infoBox)[0];
5549if(!hasClass(tab,"netInfoJSONTab")||tabBody.updated){return
5550}tabBody.updated=true;
5551if(file.jsonObject){Firebug.DOMPanel.DirTable.tag.replace({object:file.jsonObject,toggles:this.toggles},tabBody)
5552}},parseJSON:function(file){var jsonString=new String(file.responseText);
5553return parseJSONString(jsonString)
5554}});
5555Firebug.registerModule(Firebug.JSONViewerModel)
5556}});
5557FBL.ns(function(){with(FBL){var xmlContentTypes=["text/xml","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml",,"application/vnd.mozilla.maybe.feed","application/rdf+xml","application/vnd.mozilla.xul+xml"];
5558Firebug.XMLViewerModel=extend(Firebug.Module,{dispatchName:"xmlViewer",initialize:function(){Firebug.Module.initialize.apply(this,arguments);
5559Firebug.NetMonitor.NetInfoBody.addListener(this)
5560},shutdown:function(){Firebug.Module.shutdown.apply(this,arguments);
5561Firebug.NetMonitor.NetInfoBody.removeListener(this)
5562},initTabBody:function(infoBox,file){if(FBTrace.DBG_XMLVIEWER){FBTrace.sysout("xmlviewer.initTabBody",infoBox)
5563}if(this.isXML(file.mimeType,file.responseText)){Firebug.NetMonitor.NetInfoBody.appendTab(infoBox,"XML",$STR("XML"));
5564if(FBTrace.DBG_XMLVIEWER){FBTrace.sysout("xmlviewer.initTabBody; XML response available")
5565}}},isXML:function(contentType){if(!contentType){return false
5566}for(var i=0;
5567i<xmlContentTypes.length;
5568i++){if(contentType.indexOf(xmlContentTypes[i])==0){return true
5569}}return false
5570},updateTabBody:function(infoBox,file,context){var tab=infoBox.selectedTab;
5571var tabBody=$$(".netInfoXMLText",infoBox)[0];
5572if(!hasClass(tab,"netInfoXMLTab")||tabBody.updated){return
5573}tabBody.updated=true;
5574this.insertXML(tabBody,Firebug.NetMonitor.Utils.getResponseText(file,context))
5575},insertXML:function(parentNode,text){var xmlText=text.replace(/^\s*<?.+?>\s*/,"");
5576var div=parentNode.ownerDocument.createElement("div");
5577div.innerHTML=xmlText;
5578var root=div.getElementsByTagName("*")[0];
5579if(FBTrace.DBG_XMLVIEWER){FBTrace.sysout("xmlviewer.updateTabBody; XML response parsed",doc)
5580}var html=[];
5581Firebug.Reps.appendNode(root,html);
5582parentNode.innerHTML=html.join("")
5583}});
5584Firebug.XMLViewerModel.ParseError=domplate(Firebug.Rep,{tag:DIV({"class":"xmlInfoError"},DIV({"class":"xmlInfoErrorMsg"},"$error.message"),PRE({"class":"xmlInfoErrorSource"},"$error|getSource")),getSource:function(error){var parts=error.source.split("\n");
5585if(parts.length!=2){return error.source
5586}var limit=50;
5587var column=parts[1].length;
5588if(column>=limit){parts[0]="..."+parts[0].substr(column-limit);
5589parts[1]="..."+parts[1].substr(column-limit)
5590}if(parts[0].length>80){parts[0]=parts[0].substr(0,80)+"..."
5591}return parts.join("\n")
5592}});
5593Firebug.registerModule(Firebug.XMLViewerModel)
5594}});
5595FBL.ns(function(){with(FBL){var consoleQueue=[];
5596var lastHighlightedObject;
5597var FirebugContext=Env.browser;
5598var maxQueueRequests=500;
5599Firebug.ConsoleBase={log:function(object,context,className,rep,noThrottle,sourceLink){return this.logRow(appendObject,object,context,className,rep,sourceLink,noThrottle)
5600},logFormatted:function(objects,context,className,noThrottle,sourceLink){return this.logRow(appendFormatted,objects,context,className,null,sourceLink,noThrottle)
5601},openGroup:function(objects,context,className,rep,noThrottle,sourceLink,noPush){return this.logRow(appendOpenGroup,objects,context,className,rep,sourceLink,noThrottle)
5602},closeGroup:function(context,noThrottle){return this.logRow(appendCloseGroup,null,context,null,null,null,noThrottle,true)
5603},logRow:function(appender,objects,context,className,rep,sourceLink,noThrottle,noRow){noThrottle=true;
5604if(!context){context=FirebugContext
5605}if(FBTrace.DBG_ERRORS&&!context){FBTrace.sysout("Console.logRow has no context, skipping objects",objects)
5606}if(!context){return
5607}if(noThrottle||!context){var panel=this.getPanel(context);
5608if(panel){var row=panel.append(appender,objects,className,rep,sourceLink,noRow);
5609var container=panel.panelNode;
5610return row
5611}else{consoleQueue.push([appender,objects,context,className,rep,sourceLink,noThrottle,noRow])
5612}}else{if(!context.throttle){return
5613}var args=[appender,objects,context,className,rep,sourceLink,true,noRow];
5614context.throttle(this.logRow,this,args)
5615}},appendFormatted:function(args,row,context){if(!context){context=FirebugContext
5616}var panel=this.getPanel(context);
5617panel.appendFormatted(args,row)
5618},clear:function(context){if(!context){context=Firebug.context
5619}var panel=this.getPanel(context,true);
5620if(panel){panel.clear()
5621}},getPanel:function(context,noCreate){return Firebug.chrome?Firebug.chrome.getPanel("Console"):null
5622}};
5623var ActivableConsole=extend(Firebug.ConsoleBase,{isAlwaysEnabled:function(){return true
5624}});
5625Firebug.Console=Firebug.Console=extend(ActivableConsole,{dispatchName:"console",error:function(){Firebug.Console.logFormatted(arguments,Firebug.browser,"error")
5626},flush:function(){dispatch(this.fbListeners,"flush",[]);
5627for(var i=0,length=consoleQueue.length;
5628i<length;
5629i++){var args=consoleQueue[i];
5630this.logRow.apply(this,args)
5631}},showPanel:function(browser,panel){},getFirebugConsoleElement:function(context,win){var element=win.document.getElementById("_firebugConsole");
5632if(!element){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("getFirebugConsoleElement forcing element")
5633}var elementForcer="(function(){var r=null; try { r = window._getFirebugConsoleElement();}catch(exc){r=exc;} return r;})();";
5634if(context.stopped){Firebug.Console.injector.evaluateConsoleScript(context)
5635}else{var r=Firebug.CommandLine.evaluateInWebPage(elementForcer,context,win)
5636}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("getFirebugConsoleElement forcing element result "+r,r)
5637}var element=win.document.getElementById("_firebugConsole");
5638if(!element){if(FBTrace.DBG_ERRORS){FBTrace.sysout("console.getFirebugConsoleElement: no _firebugConsole in win:",win)
5639}Firebug.Console.logFormatted(["Firebug cannot find _firebugConsole element",r,win],context,"error",true)
5640}}return element
5641},isReadyElsePreparing:function(context,win){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.isReadyElsePreparing, win is "+(win?"an argument: ":"null, context.window: ")+(win?win.location:context.window.location),(win?win:context.window))
5642}if(win){return this.injector.attachIfNeeded(context,win)
5643}else{var attached=true;
5644for(var i=0;
5645i<context.windows.length;
5646i++){attached=attached&&this.injector.attachIfNeeded(context,context.windows[i])
5647}if(context.windows.indexOf(context.window)==-1){FBTrace.sysout("isReadyElsePreparing ***************** context.window not in context.windows")
5648}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.isReadyElsePreparing attached to "+context.windows.length+" and returns "+attached)
5649}return attached
5650}},initialize:function(){this.panelName="console"
5651},enable:function(){if(Firebug.Console.isAlwaysEnabled()){this.watchForErrors()
5652}},disable:function(){if(Firebug.Console.isAlwaysEnabled()){this.unwatchForErrors()
5653}},initContext:function(context,persistedState){Firebug.ActivableModule.initContext.apply(this,arguments);
5654context.consoleReloadWarning=true
5655},loadedContext:function(context){for(var url in context.sourceFileMap){return
5656}this.clearReloadWarning(context)
5657},clearReloadWarning:function(context){if(context.consoleReloadWarning){var panel=context.getPanel(this.panelName);
5658panel.clearReloadWarning();
5659delete context.consoleReloadWarning
5660}},togglePersist:function(context){var panel=context.getPanel(this.panelName);
5661panel.persistContent=panel.persistContent?false:true;
5662Firebug.chrome.setGlobalAttribute("cmd_togglePersistConsole","checked",panel.persistContent)
5663},showContext:function(browser,context){Firebug.chrome.setGlobalAttribute("cmd_clearConsole","disabled",!context);
5664Firebug.ActivableModule.showContext.apply(this,arguments)
5665},destroyContext:function(context,persistedState){Firebug.Console.injector.detachConsole(context,context.window)
5666},onPanelEnable:function(panelName){if(panelName!=this.panelName){return
5667}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onPanelEnable**************")
5668}this.watchForErrors();
5669Firebug.Debugger.addDependentModule(this)
5670},onPanelDisable:function(panelName){if(panelName!=this.panelName){return
5671}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onPanelDisable**************")
5672}Firebug.Debugger.removeDependentModule(this);
5673this.unwatchForErrors();
5674this.clear()
5675},onSuspendFirebug:function(){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onSuspendFirebug\n")
5676}if(Firebug.Console.isAlwaysEnabled()){this.unwatchForErrors()
5677}},onResumeFirebug:function(){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onResumeFirebug\n")
5678}if(Firebug.Console.isAlwaysEnabled()){this.watchForErrors()
5679}},watchForErrors:function(){Firebug.Errors.checkEnabled();
5680$("fbStatusIcon").setAttribute("console","on")
5681},unwatchForErrors:function(){Firebug.Errors.checkEnabled();
5682$("fbStatusIcon").removeAttribute("console")
5683},onMonitorScript:function(context,frame){Firebug.Console.log(frame,context)
5684},onFunctionCall:function(context,frame,depth,calling){if(calling){Firebug.Console.openGroup([frame,"depth:"+depth],context)
5685}else{Firebug.Console.closeGroup(context)
5686}},logRow:function(appender,objects,context,className,rep,sourceLink,noThrottle,noRow){if(!context){context=FirebugContext
5687}if(FBTrace.DBG_WINDOWS&&!context){FBTrace.sysout("Console.logRow: no context \n")
5688}if(this.isAlwaysEnabled()){return Firebug.ConsoleBase.logRow.apply(this,arguments)
5689}}});
5690Firebug.ConsoleListener={log:function(context,object,className,sourceLink){},logFormatted:function(context,objects,className,sourceLink){}};
5691Firebug.ConsolePanel=function(){};
5692Firebug.ConsolePanel.prototype=extend(Firebug.Panel,{wasScrolledToBottom:false,messageCount:0,lastLogTime:0,groups:null,limit:null,append:function(appender,objects,className,rep,sourceLink,noRow){var container=this.getTopContainer();
5693if(noRow){appender.apply(this,[objects])
5694}else{var row=this.createRow("logRow",className);
5695appender.apply(this,[objects,row,rep]);
5696if(sourceLink){FirebugReps.SourceLink.tag.append({object:sourceLink},row)
5697}container.appendChild(row);
5698this.filterLogRow(row,this.wasScrolledToBottom);
5699if(this.wasScrolledToBottom){scrollToBottom(this.panelNode)
5700}return row
5701}},clear:function(){if(this.panelNode){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("ConsolePanel.clear")
5702}clearNode(this.panelNode);
5703this.insertLogLimit(this.context)
5704}},insertLogLimit:function(){var row=this.createRow("limitRow");
5705var limitInfo={totalCount:0,limitPrefsTitle:$STRF("LimitPrefsTitle",[Firebug.prefDomain+".console.logLimit"])};
5706return;
5707var netLimitRep=Firebug.NetMonitor.NetLimit;
5708var nodes=netLimitRep.createTable(row,limitInfo);
5709this.limit=nodes[1];
5710var container=this.panelNode;
5711container.insertBefore(nodes[0],container.firstChild)
5712},insertReloadWarning:function(){this.warningRow=this.append(appendObject,$STR("message.Reload to activate window console"),"info")
5713},clearReloadWarning:function(){if(this.warningRow){this.warningRow.parentNode.removeChild(this.warningRow);
5714delete this.warningRow
5715}},appendObject:function(object,row,rep){if(!rep){rep=Firebug.getRep(object)
5716}return rep.tag.append({object:object},row)
5717},appendFormatted:function(objects,row,rep){if(!objects||!objects.length){return
5718}function logText(text,row){var node=row.ownerDocument.createTextNode(text);
5719row.appendChild(node)
5720}var format=objects[0];
5721var objIndex=0;
5722if(typeof(format)!="string"){format="";
5723objIndex=-1
5724}else{if(objects.length===1){if(format.length<1){logText("(an empty string)",row);
5725return
5726}}}var parts=parseFormat(format);
5727var trialIndex=objIndex;
5728for(var i=0;
5729i<parts.length;
5730i++){var part=parts[i];
5731if(part&&typeof(part)=="object"){if(++trialIndex>objects.length){format="";
5732objIndex=-1;
5733parts.length=0;
5734break
5735}}}for(var i=0;
5736i<parts.length;
5737++i){var part=parts[i];
5738if(part&&typeof(part)=="object"){var object=objects[++objIndex];
5739if(typeof(object)!="undefined"){this.appendObject(object,row,part.rep)
5740}else{this.appendObject(part.type,row,FirebugReps.Text)
5741}}else{FirebugReps.Text.tag.append({object:part},row)
5742}}for(var i=objIndex+1;
5743i<objects.length;
5744++i){logText(" ",row);
5745var object=objects[i];
5746if(typeof(object)=="string"){FirebugReps.Text.tag.append({object:object},row)
5747}else{this.appendObject(object,row)
5748}}},appendOpenGroup:function(objects,row,rep){if(!this.groups){this.groups=[]
5749}setClass(row,"logGroup");
5750setClass(row,"opened");
5751var innerRow=this.createRow("logRow");
5752setClass(innerRow,"logGroupLabel");
5753if(rep){rep.tag.replace({objects:objects},innerRow)
5754}else{this.appendFormatted(objects,innerRow,rep)
5755}row.appendChild(innerRow);
5756var groupBody=this.createRow("logGroupBody");
5757row.appendChild(groupBody);
5758groupBody.setAttribute("role","group");
5759this.groups.push(groupBody);
5760addEvent(innerRow,"mousedown",function(event){if(isLeftClick(event)){var target=event.target||event.srcElement;
5761target=getAncestorByClass(target,"logGroupLabel");
5762var groupRow=target.parentNode;
5763if(hasClass(groupRow,"opened")){removeClass(groupRow,"opened");
5764target.setAttribute("aria-expanded","false")
5765}else{setClass(groupRow,"opened");
5766target.setAttribute("aria-expanded","true")
5767}}})
5768},appendCloseGroup:function(object,row,rep){if(this.groups){this.groups.pop()
5769}},onMouseMove:function(event){if(!Firebug.Inspector){return
5770}var target=event.srcElement||event.target;
5771var object=getAncestorByClass(target,"objectLink-element");
5772object=object?object.repObject:null;
5773if(object&&instanceOf(object,"Element")&&object.nodeType==1){if(object!=lastHighlightedObject){Firebug.Inspector.drawBoxModel(object);
5774object=lastHighlightedObject
5775}}else{Firebug.Inspector.hideBoxModel()
5776}},onMouseDown:function(event){var target=event.srcElement||event.target;
5777var object=getAncestorByClass(target,"objectLink");
5778var repObject=object?object.repObject:null;
5779if(!repObject){return
5780}if(hasClass(object,"objectLink-object")){Firebug.chrome.selectPanel("DOM");
5781Firebug.chrome.getPanel("DOM").select(repObject,true)
5782}else{if(hasClass(object,"objectLink-element")){Firebug.chrome.selectPanel("HTML");
5783Firebug.chrome.getPanel("HTML").select(repObject,true)
5784}}},name:"Console",title:"Console",options:{hasCommandLine:true,hasToolButtons:true,isPreRendered:true},create:function(){Firebug.Panel.create.apply(this,arguments);
5785this.context=Firebug.browser.window;
5786this.document=Firebug.chrome.document;
5787this.onMouseMove=bind(this.onMouseMove,this);
5788this.onMouseDown=bind(this.onMouseDown,this);
5789this.clearButton=new Button({element:$("fbConsole_btClear"),owner:Firebug.Console,onClick:Firebug.Console.clear})
5790},initialize:function(){Firebug.Panel.initialize.apply(this,arguments);
5791if(!this.persistedContent&&Firebug.Console.isAlwaysEnabled()){this.insertLogLimit(this.context);
5792this.updateMaxLimit();
5793if(this.context.consoleReloadWarning){this.insertReloadWarning()
5794}}addEvent(this.panelNode,"mouseover",this.onMouseMove);
5795addEvent(this.panelNode,"mousedown",this.onMouseDown);
5796this.clearButton.initialize()
5797},initializeNode:function(){if(FBTrace.DBG_CONSOLE){this.onScroller=bind(this.onScroll,this);
5798addEvent(this.panelNode,"scroll",this.onScroller)
5799}this.onResizer=bind(this.onResize,this);
5800this.resizeEventTarget=Firebug.chrome.$("fbContentBox");
5801addEvent(this.resizeEventTarget,"resize",this.onResizer)
5802},destroyNode:function(){if(this.onScroller){removeEvent(this.panelNode,"scroll",this.onScroller)
5803}},shutdown:function(){this.clearButton.shutdown();
5804removeEvent(this.panelNode,"mousemove",this.onMouseMove);
5805removeEvent(this.panelNode,"mousedown",this.onMouseDown);
5806this.destroyNode();
5807Firebug.Panel.shutdown.apply(this,arguments)
5808},ishow:function(state){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.panel show; "+this.context.getName(),state)
5809}var enabled=Firebug.Console.isAlwaysEnabled();
5810if(enabled){Firebug.Console.disabledPanelPage.hide(this);
5811this.showCommandLine(true);
5812this.showToolbarButtons("fbConsoleButtons",true);
5813Firebug.chrome.setGlobalAttribute("cmd_togglePersistConsole","checked",this.persistContent);
5814if(state&&state.wasScrolledToBottom){this.wasScrolledToBottom=state.wasScrolledToBottom;
5815delete state.wasScrolledToBottom
5816}if(this.wasScrolledToBottom){scrollToBottom(this.panelNode)
5817}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.show ------------------ wasScrolledToBottom: "+this.wasScrolledToBottom+", "+this.context.getName())
5818}}else{this.hide(state);
5819Firebug.Console.disabledPanelPage.show(this)
5820}},ihide:function(state){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.panel hide; "+this.context.getName(),state)
5821}this.showToolbarButtons("fbConsoleButtons",false);
5822this.showCommandLine(false);
5823if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.hide ------------------ wasScrolledToBottom: "+this.wasScrolledToBottom+", "+this.context.getName())
5824}},destroy:function(state){if(this.panelNode.offsetHeight){this.wasScrolledToBottom=isScrolledToBottom(this.panelNode)
5825}if(state){state.wasScrolledToBottom=this.wasScrolledToBottom
5826}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.destroy ------------------ wasScrolledToBottom: "+this.wasScrolledToBottom+", "+this.context.getName())
5827}},shouldBreakOnNext:function(){return Firebug.getPref(Firebug.servicePrefDomain,"breakOnErrors")
5828},getBreakOnNextTooltip:function(enabled){return(enabled?$STR("console.Disable Break On All Errors"):$STR("console.Break On All Errors"))
5829},enablePanel:function(module){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.ConsolePanel.enablePanel; "+this.context.getName())
5830}Firebug.ActivablePanel.enablePanel.apply(this,arguments);
5831this.showCommandLine(true);
5832if(this.wasScrolledToBottom){scrollToBottom(this.panelNode)
5833}},disablePanel:function(module){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.ConsolePanel.disablePanel; "+this.context.getName())
5834}Firebug.ActivablePanel.disablePanel.apply(this,arguments);
5835this.showCommandLine(false)
5836},getOptionsMenuItems:function(){return[optionMenu("ShowJavaScriptErrors","showJSErrors"),optionMenu("ShowJavaScriptWarnings","showJSWarnings"),optionMenu("ShowCSSErrors","showCSSErrors"),optionMenu("ShowXMLErrors","showXMLErrors"),optionMenu("ShowXMLHttpRequests","showXMLHttpRequests"),optionMenu("ShowChromeErrors","showChromeErrors"),optionMenu("ShowChromeMessages","showChromeMessages"),optionMenu("ShowExternalErrors","showExternalErrors"),optionMenu("ShowNetworkErrors","showNetworkErrors"),this.getShowStackTraceMenuItem(),this.getStrictOptionMenuItem(),"-",optionMenu("LargeCommandLine","largeCommandLine")]
5837},getShowStackTraceMenuItem:function(){var menuItem=serviceOptionMenu("ShowStackTrace","showStackTrace");
5838if(FirebugContext&&!Firebug.Debugger.isAlwaysEnabled()){menuItem.disabled=true
5839}return menuItem
5840},getStrictOptionMenuItem:function(){var strictDomain="javascript.options";
5841var strictName="strict";
5842var strictValue=prefs.getBoolPref(strictDomain+"."+strictName);
5843return{label:"JavascriptOptionsStrict",type:"checkbox",checked:strictValue,command:bindFixed(Firebug.setPref,Firebug,strictDomain,strictName,!strictValue)}
5844},getBreakOnMenuItems:function(){return[]
5845},search:function(text){if(!text){return
5846}if(this.matchSet){for(var i in this.matchSet){removeClass(this.matchSet[i],"matched")
5847}}this.matchSet=[];
5848function findRow(node){return getAncestorByClass(node,"logRow")
5849}var search=new TextSearch(this.panelNode,findRow);
5850var logRow=search.find(text);
5851if(!logRow){dispatch([Firebug.A11yModel],"onConsoleSearchMatchFound",[this,text,[]]);
5852return false
5853}for(;
5854logRow;
5855logRow=search.findNext()){setClass(logRow,"matched");
5856this.matchSet.push(logRow)
5857}dispatch([Firebug.A11yModel],"onConsoleSearchMatchFound",[this,text,this.matchSet]);
5858return true
5859},breakOnNext:function(breaking){Firebug.setPref(Firebug.servicePrefDomain,"breakOnErrors",breaking)
5860},createRow:function(rowName,className){var elt=this.document.createElement("div");
5861elt.className=rowName+(className?" "+rowName+"-"+className:"");
5862return elt
5863},getTopContainer:function(){if(this.groups&&this.groups.length){return this.groups[this.groups.length-1]
5864}else{return this.panelNode
5865}},filterLogRow:function(logRow,scrolledToBottom){if(this.searchText){setClass(logRow,"matching");
5866setClass(logRow,"matched");
5867setTimeout(bindFixed(function(){if(this.searchFilter(this.searchText,logRow)){this.matchSet.push(logRow)
5868}else{removeClass(logRow,"matched")
5869}removeClass(logRow,"matching");
5870if(scrolledToBottom){scrollToBottom(this.panelNode)
5871}},this),100)
5872}},searchFilter:function(text,logRow){var count=this.panelNode.childNodes.length;
5873var searchRange=this.document.createRange();
5874searchRange.setStart(this.panelNode,0);
5875searchRange.setEnd(this.panelNode,count);
5876var startPt=this.document.createRange();
5877startPt.setStartBefore(logRow);
5878var endPt=this.document.createRange();
5879endPt.setStartAfter(logRow);
5880return finder.Find(text,searchRange,startPt,endPt)!=null
5881},observe:function(subject,topic,data){if(topic!="nsPref:changed"){return
5882}var prefDomain="Firebug.extension.";
5883var prefName=data.substr(prefDomain.length);
5884if(prefName=="console.logLimit"){this.updateMaxLimit()
5885}},updateMaxLimit:function(){var value=1000;
5886maxQueueRequests=value?value:maxQueueRequests
5887},showCommandLine:function(shouldShow){return;
5888if(shouldShow){collapse(Firebug.chrome.$("fbCommandBox"),false);
5889Firebug.CommandLine.setMultiLine(Firebug.largeCommandLine,Firebug.chrome)
5890}else{Firebug.CommandLine.setMultiLine(false,Firebug.chrome,Firebug.largeCommandLine);
5891collapse(Firebug.chrome.$("fbCommandBox"),true)
5892}},onScroll:function(event){this.wasScrolledToBottom=FBL.isScrolledToBottom(this.panelNode);
5893if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onScroll ------------------ wasScrolledToBottom: "+this.wasScrolledToBottom+", wasScrolledToBottom: "+this.context.getName(),event)
5894}},onResize:function(event){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("console.onResize ------------------ wasScrolledToBottom: "+this.wasScrolledToBottom+", offsetHeight: "+this.panelNode.offsetHeight+", scrollTop: "+this.panelNode.scrollTop+", scrollHeight: "+this.panelNode.scrollHeight+", "+this.context.getName(),event)
5895}if(this.wasScrolledToBottom){scrollToBottom(this.panelNode)
5896}}});
5897function parseFormat(format){var parts=[];
5898if(format.length<=0){return parts
5899}var reg=/((^%|.%)(\d+)?(\.)([a-zA-Z]))|((^%|.%)([a-zA-Z]))/;
5900for(var m=reg.exec(format);
5901m;
5902m=reg.exec(format)){if(m[0].substr(0,2)=="%%"){parts.push(format.substr(0,m.index));
5903parts.push(m[0].substr(1))
5904}else{var type=m[8]?m[8]:m[5];
5905var precision=m[3]?parseInt(m[3]):(m[4]=="."?-1:0);
5906var rep=null;
5907switch(type){case"s":rep=FirebugReps.Text;
5908break;
5909case"f":case"i":case"d":rep=FirebugReps.Number;
5910break;
5911case"o":rep=null;
5912break
5913}parts.push(format.substr(0,m[0][0]=="%"?m.index:m.index+1));
5914parts.push({rep:rep,precision:precision,type:("%"+type)})
5915}format=format.substr(m.index+m[0].length)
5916}parts.push(format);
5917return parts
5918}var appendObject=Firebug.ConsolePanel.prototype.appendObject;
5919var appendFormatted=Firebug.ConsolePanel.prototype.appendFormatted;
5920var appendOpenGroup=Firebug.ConsolePanel.prototype.appendOpenGroup;
5921var appendCloseGroup=Firebug.ConsolePanel.prototype.appendCloseGroup;
5922Firebug.registerModule(Firebug.Console);
5923Firebug.registerPanel(Firebug.ConsolePanel)
5924}});
5925FBL.ns(function(){with(FBL){var frameCounters={};
5926var traceRecursion=0;
5927Firebug.Console.injector={install:function(context){var win=context.window;
5928var consoleHandler=new FirebugConsoleHandler(context,win);
5929var properties=["log","debug","info","warn","error","assert","dir","dirxml","group","groupCollapsed","groupEnd","time","timeEnd","count","trace","profile","profileEnd","clear","open","close"];
5930var Handler=function(name){var c=consoleHandler;
5931var f=consoleHandler[name];
5932return function(){return f.apply(c,arguments)
5933}
5934};
5935var installer=function(c){for(var i=0,l=properties.length;
5936i<l;
5937i++){var name=properties[i];
5938c[name]=new Handler(name);
5939c.firebuglite=Firebug.version
5940}};
5941var sandbox;
5942if(win.console){if(Env.Options.overrideConsole){sandbox=new win.Function("arguments.callee.install(window.console={})")
5943}else{return
5944}}else{try{sandbox=new win.Function("arguments.callee.install(window.console={})")
5945}catch(E){sandbox=new win.Function("arguments.callee.install(window.firebug={})")
5946}}sandbox.install=installer;
5947sandbox()
5948},isAttached:function(context,win){if(win.wrappedJSObject){var attached=(win.wrappedJSObject._getFirebugConsoleElement?true:false);
5949if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.isAttached:"+attached+" to win.wrappedJSObject "+safeGetWindowLocation(win.wrappedJSObject))
5950}return attached
5951}else{if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.isAttached? to win "+win.location+" fnc:"+win._getFirebugConsoleElement)
5952}return(win._getFirebugConsoleElement?true:false)
5953}},attachIfNeeded:function(context,win){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.attachIfNeeded has win "+(win?((win.wrappedJSObject?"YES":"NO")+" wrappedJSObject"):"null"))
5954}if(this.isAttached(context,win)){return true
5955}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("Console.attachIfNeeded found isAttached false ")
5956}this.attachConsoleInjector(context,win);
5957this.addConsoleListener(context,win);
5958Firebug.Console.clearReloadWarning(context);
5959var attached=this.isAttached(context,win);
5960if(attached){dispatch(Firebug.Console.fbListeners,"onConsoleInjected",[context,win])
5961}return attached
5962},attachConsoleInjector:function(context,win){var consoleInjection=this.getConsoleInjectionScript();
5963if(FBTrace.DBG_CONSOLE){FBTrace.sysout("attachConsoleInjector evaluating in "+win.location,consoleInjection)
5964}Firebug.CommandLine.evaluateInWebPage(consoleInjection,context,win);
5965if(FBTrace.DBG_CONSOLE){FBTrace.sysout("attachConsoleInjector evaluation completed for "+win.location)
5966}},getConsoleInjectionScript:function(){if(!this.consoleInjectionScript){var script="";
5967script+="window.__defineGetter__('console', function() {\n";
5968script+=" return (window._firebug ? window._firebug : window.loadFirebugConsole()); })\n\n";
5969script+="window.loadFirebugConsole = function() {\n";
5970script+="window._firebug =  new _FirebugConsole();";
5971if(FBTrace.DBG_CONSOLE){script+=" window.dump('loadFirebugConsole '+window.location+'\\n');\n"
5972}script+=" return window._firebug };\n";
5973var theFirebugConsoleScript=getResource("chrome://firebug/content/consoleInjected.js");
5974script+=theFirebugConsoleScript;
5975this.consoleInjectionScript=script
5976}return this.consoleInjectionScript
5977},forceConsoleCompilationInPage:function(context,win){if(!win){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("no win in forceConsoleCompilationInPage!")
5978}return
5979}var consoleForcer="window.loadFirebugConsole();";
5980if(context.stopped){Firebug.Console.injector.evaluateConsoleScript(context)
5981}else{Firebug.CommandLine.evaluateInWebPage(consoleForcer,context,win)
5982}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("forceConsoleCompilationInPage "+win.location,consoleForcer)
5983}},evaluateConsoleScript:function(context){var scriptSource=this.getConsoleInjectionScript();
5984Firebug.Debugger.evaluate(scriptSource,context)
5985},addConsoleListener:function(context,win){if(!context.activeConsoleHandlers){context.activeConsoleHandlers=[]
5986}else{for(var i=0;
5987i<context.activeConsoleHandlers.length;
5988i++){if(context.activeConsoleHandlers[i].window==win){context.activeConsoleHandlers[i].detach();
5989if(FBTrace.DBG_CONSOLE){FBTrace.sysout("consoleInjector addConsoleListener removed handler("+context.activeConsoleHandlers[i].handler_name+") from _firebugConsole in : "+win.location+"\n")
5990}context.activeConsoleHandlers.splice(i,1)
5991}}}var element=Firebug.Console.getFirebugConsoleElement(context,win);
5992if(element){element.setAttribute("FirebugVersion",Firebug.version)
5993}else{return false
5994}var handler=new FirebugConsoleHandler(context,win);
5995handler.attachTo(element);
5996context.activeConsoleHandlers.push(handler);
5997if(FBTrace.DBG_CONSOLE){FBTrace.sysout("consoleInjector addConsoleListener attached handler("+handler.handler_name+") to _firebugConsole in : "+win.location+"\n")
5998}return true
5999},detachConsole:function(context,win){if(win&&win.document){var element=win.document.getElementById("_firebugConsole");
6000if(element){element.parentNode.removeChild(element)
6001}}}};
6002var total_handlers=0;
6003var FirebugConsoleHandler=function FirebugConsoleHandler(context,win){this.window=win;
6004this.attachTo=function(element){this.element=element;
6005this.boundHandler=bind(this.handleEvent,this);
6006this.element.addEventListener("firebugAppendConsole",this.boundHandler,true)
6007};
6008this.detach=function(){this.element.removeEventListener("firebugAppendConsole",this.boundHandler,true)
6009};
6010this.handler_name=++total_handlers;
6011this.handleEvent=function(event){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("FirebugConsoleHandler("+this.handler_name+") "+event.target.getAttribute("methodName")+", event",event)
6012}if(!Firebug.CommandLine.CommandHandler.handle(event,this,win)){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("FirebugConsoleHandler",this)
6013}var methodName=event.target.getAttribute("methodName");
6014Firebug.Console.log($STRF("console.MethodNotSupported",[methodName]))
6015}};
6016this.firebuglite=Firebug.version;
6017this.init=function(){var consoleElement=win.document.getElementById("_firebugConsole");
6018consoleElement.setAttribute("FirebugVersion",Firebug.version)
6019};
6020this.log=function(){logFormatted(arguments,"log")
6021};
6022this.debug=function(){logFormatted(arguments,"debug",true)
6023};
6024this.info=function(){logFormatted(arguments,"info",true)
6025};
6026this.warn=function(){logFormatted(arguments,"warn",true)
6027};
6028this.error=function(){logFormatted(arguments,"error",true)
6029};
6030this.exception=function(){logAssert("error",arguments)
6031};
6032this.assert=function(x){if(!x){var rest=[];
6033for(var i=1;
6034i<arguments.length;
6035i++){rest.push(arguments[i])
6036}logAssert("assert",rest)
6037}};
6038this.dir=function(o){Firebug.Console.log(o,context,"dir",Firebug.DOMPanel.DirTable)
6039};
6040this.dirxml=function(o){if(instanceOf(o,"Window")){o=o.document.documentElement
6041}else{if(instanceOf(o,"Document")){o=o.documentElement
6042}}Firebug.Console.log(o,context,"dirxml",Firebug.HTMLPanel.SoloElement)
6043};
6044this.group=function(){var sourceLink=null;
6045Firebug.Console.openGroup(arguments,null,"group",null,false,sourceLink)
6046};
6047this.groupEnd=function(){Firebug.Console.closeGroup(context)
6048};
6049this.groupCollapsed=function(){var sourceLink=getStackLink();
6050var row=Firebug.Console.openGroup(arguments,null,"group",null,true,sourceLink);
6051removeClass(row,"opened")
6052};
6053this.profile=function(title){logFormatted(["console.profile() not supported."],"warn",true)
6054};
6055this.profileEnd=function(){logFormatted(["console.profile() not supported."],"warn",true)
6056};
6057this.count=function(key){var frameId="0";
6058if(frameId){if(!frameCounters){frameCounters={}
6059}if(key!=undefined){frameId+=key
6060}var frameCounter=frameCounters[frameId];
6061if(!frameCounter){var logRow=logFormatted(["0"],null,true,true);
6062frameCounter={logRow:logRow,count:1};
6063frameCounters[frameId]=frameCounter
6064}else{++frameCounter.count
6065}var label=key==undefined?frameCounter.count:key+" "+frameCounter.count;
6066frameCounter.logRow.firstChild.firstChild.nodeValue=label
6067}};
6068this.trace=function(){var getFuncName=function getFuncName(f){if(f.getName instanceof Function){return f.getName()
6069}if(f.name){return f.name
6070}var name=f.toString().match(/function\s*([_$\w\d]*)/)[1];
6071return name||"anonymous"
6072};
6073var wasVisited=function(fn){for(var i=0,l=frames.length;
6074i<l;
6075i++){if(frames[i].fn==fn){return true
6076}}return false
6077};
6078traceRecursion++;
6079if(traceRecursion>1){traceRecursion--;
6080return
6081}var frames=[];
6082for(var fn=arguments.callee.caller.caller;
6083fn;
6084fn=fn.caller){if(wasVisited(fn)){break
6085}var args=[];
6086for(var i=0,l=fn.arguments.length;
6087i<l;
6088++i){args.push({value:fn.arguments[i]})
6089}frames.push({fn:fn,name:getFuncName(fn),args:args})
6090}try{(0)()
6091}catch(e){var result=e;
6092var stack=result.stack||result.stacktrace||"";
6093stack=stack.replace(/\n\r|\r\n/g,"\n");
6094var items=stack.split(/[\n\r]/);
6095if(FBL.isSafari){var reChromeStackItem=/^\s+at\s+(.*)((?:http|https|ftp|file):\/\/.*)$/;
6096var reChromeStackItemName=/\s*\($/;
6097var reChromeStackItemValue=/^(.+)\:(\d+\:\d+)\)?$/;
6098var framePos=0;
6099for(var i=4,length=items.length;
6100i<length;
6101i++,framePos++){var frame=frames[framePos];
6102var item=items[i];
6103var match=item.match(reChromeStackItem);
6104if(match){var name=match[1];
6105if(name){name=name.replace(reChromeStackItemName,"");
6106frame.name=name
6107}var value=match[2].match(reChromeStackItemValue);
6108if(value){frame.href=value[1];
6109frame.lineNo=value[2]
6110}}}}else{if(FBL.isFirefox){var reFirefoxStackItem=/^(.*)@(.*)$/;
6111var reFirefoxStackItemValue=/^(.+)\:(\d+)$/;
6112var framePos=0;
6113for(var i=2,length=items.length;
6114i<length;
6115i++,framePos++){var frame=frames[framePos]||{};
6116var item=items[i];
6117var match=item.match(reFirefoxStackItem);
6118if(match){var name=match[1];
6119var value=match[2].match(reFirefoxStackItemValue);
6120if(value){frame.href=value[1];
6121frame.lineNo=value[2]
6122}}}}}}Firebug.Console.log({frames:frames},context,"stackTrace",FirebugReps.StackTrace);
6123traceRecursion--
6124};
6125this.trace_ok=function(){var getFuncName=function getFuncName(f){if(f.getName instanceof Function){return f.getName()
6126}if(f.name){return f.name
6127}var name=f.toString().match(/function\s*([_$\w\d]*)/)[1];
6128return name||"anonymous"
6129};
6130var wasVisited=function(fn){for(var i=0,l=frames.length;
6131i<l;
6132i++){if(frames[i].fn==fn){return true
6133}}return false
6134};
6135var frames=[];
6136for(var fn=arguments.callee.caller;
6137fn;
6138fn=fn.caller){if(wasVisited(fn)){break
6139}var args=[];
6140for(var i=0,l=fn.arguments.length;
6141i<l;
6142++i){args.push({value:fn.arguments[i]})
6143}frames.push({fn:fn,name:getFuncName(fn),args:args})
6144}Firebug.Console.log({frames:frames},context,"stackTrace",FirebugReps.StackTrace)
6145};
6146this.clear=function(){Firebug.Console.clear(context)
6147};
6148this.time=function(name,reset){if(!name){return
6149}var time=new Date().getTime();
6150if(!this.timeCounters){this.timeCounters={}
6151}var key="KEY"+name.toString();
6152if(!reset&&this.timeCounters[key]){return
6153}this.timeCounters[key]=time
6154};
6155this.timeEnd=function(name){var time=new Date().getTime();
6156if(!this.timeCounters){return
6157}var key="KEY"+name.toString();
6158var timeCounter=this.timeCounters[key];
6159if(timeCounter){var diff=time-timeCounter;
6160var label=name+": "+diff+"ms";
6161this.info(label);
6162delete this.timeCounters[key]
6163}return diff
6164};
6165this.evaluated=function(result,context){if(FBTrace.DBG_CONSOLE){FBTrace.sysout("consoleInjector.FirebugConsoleHandler evalutated default called",result)
6166}Firebug.Console.log(result,context)
6167};
6168this.evaluateError=function(result,context){Firebug.Console.log(result,context,"errorMessage")
6169};
6170function logFormatted(args,className,linkToSource,noThrottle){var sourceLink=linkToSource?getStackLink():null;
6171return Firebug.Console.logFormatted(args,context,className,noThrottle,sourceLink)
6172}function logAssert(category,args){Firebug.Errors.increaseCount(context);
6173if(!args||!args.length||args.length==0){var msg=[FBL.$STR("Assertion")]
6174}else{var msg=args[0]
6175}if(Firebug.errorStackTrace){var trace=Firebug.errorStackTrace;
6176delete Firebug.errorStackTrace;
6177if(FBTrace.DBG_CONSOLE){FBTrace.sysout("logAssert trace from errorStackTrace",trace)
6178}}else{if(msg.stack){var trace=parseToStackTrace(msg.stack);
6179if(FBTrace.DBG_CONSOLE){FBTrace.sysout("logAssert trace from msg.stack",trace)
6180}}else{var trace=getJSDUserStack();
6181if(FBTrace.DBG_CONSOLE){FBTrace.sysout("logAssert trace from getJSDUserStack",trace)
6182}}}var errorObject=new FBL.ErrorMessage(msg,(msg.fileName?msg.fileName:win.location),(msg.lineNumber?msg.lineNumber:0),"",category,context,trace);
6183if(trace&&trace.frames&&trace.frames[0]){errorObject.correctWithStackTrace(trace)
6184}errorObject.resetSource();
6185var objects=errorObject;
6186if(args.length>1){objects=[errorObject];
6187for(var i=1;
6188i<args.length;
6189i++){objects.push(args[i])
6190}}var row=Firebug.Console.log(objects,context,"errorMessage",null,true);
6191row.scrollIntoView()
6192}function getComponentsStackDump(){var frame=Components.stack;
6193var userURL=win.location.href.toString();
6194if(FBTrace.DBG_CONSOLE){FBTrace.sysout("consoleInjector.getComponentsStackDump initial stack for userURL "+userURL,frame)
6195}while(frame&&FBL.isSystemURL(frame.filename)){frame=frame.caller
6196}if(frame){frame=frame.caller
6197}if(frame){frame=frame.caller
6198}if(FBTrace.DBG_CONSOLE){FBTrace.sysout("consoleInjector.getComponentsStackDump final stack for userURL "+userURL,frame)
6199}return frame
6200}function getStackLink(){return
6201}function getJSDUserStack(){var trace=FBL.getCurrentStackTrace(context);
6202var frames=trace?trace.frames:null;
6203if(frames&&(frames.length>0)){var oldest=frames.length-1;
6204for(var i=0;
6205i<frames.length;
6206i++){if(frames[oldest-i].href.indexOf("chrome:")==0){break
6207}var fn=frames[oldest-i].fn+"";
6208if(fn&&(fn.indexOf("_firebugEvalEvent")!=-1)){break
6209}}FBTrace.sysout("consoleInjector getJSDUserStack: "+frames.length+" oldest: "+oldest+" i: "+i+" i - oldest + 2: "+(i-oldest+2),trace);
6210trace.frames=trace.frames.slice(2-i);
6211return trace
6212}else{return"Firebug failed to get stack trace with any frames"
6213}}};
6214FBL.registerConsole=function(){var win=Env.browser.window;
6215Firebug.Console.injector.install(win)
6216};
6217registerConsole()
6218}});
6219FBL.ns(function(){with(FBL){var commandPrefix=">>>";
6220var reOpenBracket=/[\[\(\{]/;
6221var reCloseBracket=/[\]\)\}]/;
6222var commandHistory=[];
6223var commandPointer=-1;
6224var isAutoCompleting=null;
6225var autoCompletePrefix=null;
6226var autoCompleteExpr=null;
6227var autoCompleteBuffer=null;
6228var autoCompletePosition=null;
6229var fbCommandLine=null;
6230var fbLargeCommandLine=null;
6231var fbLargeCommandButtons=null;
6232var _completion={window:["console"],document:["getElementById","getElementsByTagName"]};
6233var _stack=function(command){Firebug.context.persistedState.commandHistory.push(command);
6234Firebug.context.persistedState.commandPointer=Firebug.context.persistedState.commandHistory.length
6235};
6236Firebug.CommandLine=extend(Firebug.Module,{element:null,isMultiLine:false,isActive:false,initialize:function(doc){this.clear=bind(this.clear,this);
6237this.enter=bind(this.enter,this);
6238this.onError=bind(this.onError,this);
6239this.onKeyDown=bind(this.onKeyDown,this);
6240this.onMultiLineKeyDown=bind(this.onMultiLineKeyDown,this);
6241addEvent(Firebug.browser.window,"error",this.onError);
6242addEvent(Firebug.chrome.window,"error",this.onError)
6243},shutdown:function(doc){this.deactivate();
6244removeEvent(Firebug.browser.window,"error",this.onError);
6245removeEvent(Firebug.chrome.window,"error",this.onError)
6246},activate:function(multiLine,hideToggleIcon,onRun){defineCommandLineAPI();
6247Firebug.context.persistedState.commandHistory=Firebug.context.persistedState.commandHistory||[];
6248Firebug.context.persistedState.commandPointer=Firebug.context.persistedState.commandPointer||-1;
6249if(this.isActive){if(this.isMultiLine==multiLine){return
6250}this.deactivate()
6251}fbCommandLine=$("fbCommandLine");
6252fbLargeCommandLine=$("fbLargeCommandLine");
6253fbLargeCommandButtons=$("fbLargeCommandButtons");
6254if(multiLine){onRun=onRun||this.enter;
6255this.isMultiLine=true;
6256this.element=fbLargeCommandLine;
6257addEvent(this.element,"keydown",this.onMultiLineKeyDown);
6258addEvent($("fbSmallCommandLineIcon"),"click",Firebug.chrome.hideLargeCommandLine);
6259this.runButton=new Button({element:$("fbCommand_btRun"),owner:Firebug.CommandLine,onClick:onRun});
6260this.runButton.initialize();
6261this.clearButton=new Button({element:$("fbCommand_btClear"),owner:Firebug.CommandLine,onClick:this.clear});
6262this.clearButton.initialize()
6263}else{this.isMultiLine=false;
6264this.element=fbCommandLine;
6265if(!fbCommandLine){return
6266}addEvent(this.element,"keydown",this.onKeyDown)
6267}if(isOpera){fixOperaTabKey(this.element)
6268}if(this.lastValue){this.element.value=this.lastValue
6269}this.isActive=true
6270},deactivate:function(){if(!this.isActive){return
6271}this.isActive=false;
6272this.lastValue=this.element.value;
6273if(this.isMultiLine){removeEvent(this.element,"keydown",this.onMultiLineKeyDown);
6274removeEvent($("fbSmallCommandLineIcon"),"click",Firebug.chrome.hideLargeCommandLine);
6275this.runButton.destroy();
6276this.clearButton.destroy()
6277}else{removeEvent(this.element,"keydown",this.onKeyDown)
6278}this.element=null;
6279delete this.element;
6280fbCommandLine=null;
6281fbLargeCommandLine=null;
6282fbLargeCommandButtons=null
6283},focus:function(){this.element.focus()
6284},blur:function(){this.element.blur()
6285},clear:function(){this.element.value=""
6286},evaluate:function(expr){var api="Firebug.CommandLine.API";
6287var result=Firebug.context.evaluate(expr,"window",api,Firebug.Console.error);
6288return result
6289},enter:function(){var command=this.element.value;
6290if(!command){return
6291}_stack(command);
6292Firebug.Console.log(commandPrefix+" "+stripNewLines(command),Firebug.browser,"command",FirebugReps.Text);
6293var result=this.evaluate(command);
6294Firebug.Console.log(result)
6295},prevCommand:function(){if(Firebug.context.persistedState.commandPointer>0&&Firebug.context.persistedState.commandHistory.length>0){this.element.value=Firebug.context.persistedState.commandHistory[--Firebug.context.persistedState.commandPointer]
6296}},nextCommand:function(){var element=this.element;
6297var limit=Firebug.context.persistedState.commandHistory.length-1;
6298var i=Firebug.context.persistedState.commandPointer;
6299if(i<limit){element.value=Firebug.context.persistedState.commandHistory[++Firebug.context.persistedState.commandPointer]
6300}else{if(i==limit){++Firebug.context.persistedState.commandPointer;
6301element.value=""
6302}}},autocomplete:function(reverse){var element=this.element;
6303var command=element.value;
6304var offset=getExpressionOffset(command);
6305var valBegin=offset?command.substr(0,offset):"";
6306var val=command.substr(offset);
6307var buffer,obj,objName,commandBegin,result,prefix;
6308if(!isAutoCompleting){var reObj=/(.*[^_$\w\d\.])?((?:[_$\w][_$\w\d]*\.)*)([_$\w][_$\w\d]*)?$/;
6309var r=reObj.exec(val);
6310if(r[1]||r[2]||r[3]){commandBegin=r[1]||"";
6311objName=r[2]||"";
6312prefix=r[3]||""
6313}else{if(val==""){commandBegin=objName=prefix=""
6314}else{return
6315}}isAutoCompleting=true;
6316if(objName==""){obj=window
6317}else{objName=objName.replace(/\.$/,"");
6318var n=objName.split(".");
6319var target=window,o;
6320for(var i=0,ni;
6321ni=n[i];
6322i++){if(o=target[ni]){target=o
6323}else{target=null;
6324break
6325}}obj=target
6326}if(obj){autoCompletePrefix=prefix;
6327autoCompleteExpr=valBegin+commandBegin+(objName?objName+".":"");
6328autoCompletePosition=-1;
6329buffer=autoCompleteBuffer=isIE?_completion[objName||"window"]||[]:[];
6330for(var p in obj){buffer.push(p)
6331}}}else{buffer=autoCompleteBuffer
6332}if(buffer){prefix=autoCompletePrefix;
6333var diff=reverse?-1:1;
6334for(var i=autoCompletePosition+diff,l=buffer.length,bi;
6335i>=0&&i<l;
6336i+=diff){bi=buffer[i];
6337if(bi.indexOf(prefix)==0){autoCompletePosition=i;
6338result=bi;
6339break
6340}}}if(result){element.value=autoCompleteExpr+result
6341}},setMultiLine:function(multiLine){if(multiLine==this.isMultiLine){return
6342}this.activate(multiLine)
6343},onError:function(msg,href,lineNo){href=href||"";
6344var lastSlash=href.lastIndexOf("/");
6345var fileName=lastSlash==-1?href:href.substr(lastSlash+1);
6346var html=['<span class="errorMessage">',msg,"</span>",'<div class="objectBox-sourceLink">',fileName," (line ",lineNo,")</div>"]
6347},onKeyDown:function(e){e=e||event;
6348var code=e.keyCode;
6349if(code!=9&&code!=16&&code!=17&&code!=18){isAutoCompleting=false
6350}if(code==13){this.enter();
6351this.clear()
6352}else{if(code==27){setTimeout(this.clear,0)
6353}else{if(code==38){this.prevCommand()
6354}else{if(code==40){this.nextCommand()
6355}else{if(code==9){this.autocomplete(e.shiftKey)
6356}else{return
6357}}}}}cancelEvent(e,true);
6358return false
6359},onMultiLineKeyDown:function(e){e=e||event;
6360var code=e.keyCode;
6361if(code==13&&e.ctrlKey){this.enter()
6362}}});
6363Firebug.registerModule(Firebug.CommandLine);
6364function getExpressionOffset(command){var bracketCount=0;
6365var start=command.length-1;
6366for(;
6367start>=0;
6368--start){var c=command[start];
6369if((c==","||c==";"||c==" ")&&!bracketCount){break
6370}if(reOpenBracket.test(c)){if(bracketCount){--bracketCount
6371}else{break
6372}}else{if(reCloseBracket.test(c)){++bracketCount
6373}}}return start+1
6374}var CommandLineAPI={$:function(id){return Firebug.browser.document.getElementById(id)
6375},$$:function(selector,context){context=context||Firebug.browser.document;
6376return Firebug.Selector?Firebug.Selector(selector,context):Firebug.Console.error("Firebug.Selector module not loaded.")
6377},$0:null,$1:null,dir:function(o){Firebug.Console.log(o,Firebug.context,"dir",Firebug.DOMPanel.DirTable)
6378},dirxml:function(o){if(instanceOf(o,"Window")){o=o.document.documentElement
6379}else{if(instanceOf(o,"Document")){o=o.documentElement
6380}}Firebug.Console.log(o,Firebug.context,"dirxml",Firebug.HTMLPanel.SoloElement)
6381}};
6382var defineCommandLineAPI=function defineCommandLineAPI(){Firebug.CommandLine.API={};
6383for(var m in CommandLineAPI){if(!Env.browser.window[m]){Firebug.CommandLine.API[m]=CommandLineAPI[m]
6384}}var stack=FirebugChrome.htmlSelectionStack;
6385if(stack){Firebug.CommandLine.API.$0=stack[0];
6386Firebug.CommandLine.API.$1=stack[1]
6387}}
6388}});
6389FBL.ns(function(){with(FBL){var ElementCache=Firebug.Lite.Cache.Element;
6390var cacheID=Firebug.Lite.Cache.ID;
6391var ignoreHTMLProps={sizcache:1,sizset:1};
6392if(Firebug.ignoreFirebugElements){ignoreHTMLProps[cacheID]=1
6393}Firebug.HTML=extend(Firebug.Module,{appendTreeNode:function(nodeArray,html){var reTrim=/^\s+|\s+$/g;
6394if(!nodeArray.length){nodeArray=[nodeArray]
6395}for(var n=0,node;
6396node=nodeArray[n];
6397n++){if(node.nodeType==1){if(Firebug.ignoreFirebugElements&&node.firebugIgnore){continue
6398}var uid=ElementCache(node);
6399var child=node.childNodes;
6400var childLength=child.length;
6401var nodeName=node.nodeName.toLowerCase();
6402var nodeVisible=isVisible(node);
6403var hasSingleTextChild=childLength==1&&node.firstChild.nodeType==3&&nodeName!="script"&&nodeName!="style";
6404var nodeControl=!hasSingleTextChild&&childLength>0?('<div class="nodeControl"></div>'):"";
6405if(isIE&&nodeControl){html.push(nodeControl)
6406}if(typeof uid!="undefined"){html.push('<div class="objectBox-element" ','id="',uid,'">',!isIE&&nodeControl?nodeControl:"","<span ",cacheID,'="',uid,'"  class="nodeBox',nodeVisible?"":" nodeHidden",'">&lt;<span class="nodeTag">',nodeName,"</span>")
6407}else{html.push('<div class="objectBox-element"><span class="nodeBox',nodeVisible?"":" nodeHidden",'">&lt;<span class="nodeTag">',nodeName,"</span>")
6408}for(var i=0;
6409i<node.attributes.length;
6410++i){var attr=node.attributes[i];
6411if(!attr.specified||isIE&&(browserVersion-0<9)&&typeof attr.nodeValue!="string"||Firebug.ignoreFirebugElements&&ignoreHTMLProps.hasOwnProperty(attr.nodeName)){continue
6412}var name=attr.nodeName.toLowerCase();
6413var value=name=="style"?formatStyles(node.style.cssText):attr.nodeValue;
6414html.push('&nbsp;<span class="nodeName">',name,'</span>=&quot;<span class="nodeValue">',escapeHTML(value),"</span>&quot;")
6415}if(hasSingleTextChild){var value=child[0].nodeValue.replace(reTrim,"");
6416if(value){html.push('&gt;<span class="nodeText">',escapeHTML(value),'</span>&lt;/<span class="nodeTag">',nodeName,"</span>&gt;</span></div>")
6417}else{html.push("/&gt;</span></div>")
6418}}else{if(childLength>0){html.push("&gt;</span></div>")
6419}else{html.push("/&gt;</span></div>")
6420}}}else{if(node.nodeType==3){if(node.parentNode&&(node.parentNode.nodeName.toLowerCase()=="script"||node.parentNode.nodeName.toLowerCase()=="style")){var value=node.nodeValue.replace(reTrim,"");
6421if(isIE){var src=value+"\n"
6422}else{var src="\n"+value+"\n"
6423}var match=src.match(/\n/g);
6424var num=match?match.length:0;
6425var s=[],sl=0;
6426for(var c=1;
6427c<num;
6428c++){s[sl++]='<div line="'+c+'">'+c+"</div>"
6429}html.push('<div class="lineNo">',s.join(""),'</div><pre class="sourceCode">',escapeHTML(src),"</pre>")
6430}else{var value=node.nodeValue.replace(reTrim,"");
6431if(value){html.push('<div class="nodeText">',escapeHTML(value),"</div>")
6432}}}}}},appendTreeChildren:function(treeNode){var doc=Firebug.chrome.document;
6433var uid=treeNode.id;
6434var parentNode=ElementCache.get(uid);
6435if(parentNode.childNodes.length==0){return
6436}var treeNext=treeNode.nextSibling;
6437var treeParent=treeNode.parentNode;
6438var control=isIE?treeNode.previousSibling:treeNode.firstChild;
6439control.className="nodeControl nodeMaximized";
6440var html=[];
6441var children=doc.createElement("div");
6442children.className="nodeChildren";
6443this.appendTreeNode(parentNode.childNodes,html);
6444children.innerHTML=html.join("");
6445treeParent.insertBefore(children,treeNext);
6446var closeElement=doc.createElement("div");
6447closeElement.className="objectBox-element";
6448closeElement.innerHTML='&lt;/<span class="nodeTag">'+parentNode.nodeName.toLowerCase()+"&gt;</span>";
6449treeParent.insertBefore(closeElement,treeNext)
6450},removeTreeChildren:function(treeNode){var children=treeNode.nextSibling;
6451var closeTag=children.nextSibling;
6452var control=isIE?treeNode.previousSibling:treeNode.firstChild;
6453control.className="nodeControl";
6454children.parentNode.removeChild(children);
6455closeTag.parentNode.removeChild(closeTag)
6456},isTreeNodeVisible:function(id){return $(id)
6457},select:function(el){var id=el&&ElementCache(el);
6458if(id){this.selectTreeNode(id)
6459}},selectTreeNode:function(id){id=""+id;
6460var node,stack=[];
6461while(id&&!this.isTreeNodeVisible(id)){stack.push(id);
6462var node=ElementCache.get(id).parentNode;
6463if(node){id=ElementCache(node)
6464}else{break
6465}}stack.push(id);
6466while(stack.length>0){id=stack.pop();
6467node=$(id);
6468if(stack.length>0&&ElementCache.get(id).childNodes.length>0){this.appendTreeChildren(node)
6469}}selectElement(node);
6470if(fbPanel1){fbPanel1.scrollTop=Math.round(node.offsetTop-fbPanel1.clientHeight/2)
6471}}});
6472Firebug.registerModule(Firebug.HTML);
6473function HTMLPanel(){}HTMLPanel.prototype=extend(Firebug.Panel,{name:"HTML",title:"HTML",options:{hasSidePanel:true,isPreRendered:!Firebug.flexChromeEnabled,innerHTMLSync:true},create:function(){Firebug.Panel.create.apply(this,arguments);
6474this.panelNode.style.padding="4px 3px 1px 15px";
6475this.panelNode.style.minWidth="500px";
6476if(Env.Options.enablePersistent||Firebug.chrome.type!="popup"){this.createUI()
6477}if(this.sidePanelBar&&!this.sidePanelBar.selectedPanel){this.sidePanelBar.selectPanel("css")
6478}},destroy:function(){selectedElement=null;
6479fbPanel1=null;
6480selectedSidePanelTS=null;
6481selectedSidePanelTimer=null;
6482Firebug.Panel.destroy.apply(this,arguments)
6483},createUI:function(){var rootNode=Firebug.browser.document.documentElement;
6484var html=[];
6485Firebug.HTML.appendTreeNode(rootNode,html);
6486this.panelNode.innerHTML=html.join("")
6487},initialize:function(){Firebug.Panel.initialize.apply(this,arguments);
6488addEvent(this.panelNode,"click",Firebug.HTML.onTreeClick);
6489fbPanel1=$("fbPanel1");
6490if(!selectedElement){Firebug.context.persistedState.selectedHTMLElementId=Firebug.context.persistedState.selectedHTMLElementId&&ElementCache.get(Firebug.context.persistedState.selectedHTMLElementId)?Firebug.context.persistedState.selectedHTMLElementId:ElementCache(Firebug.browser.document.body);
6491Firebug.HTML.selectTreeNode(Firebug.context.persistedState.selectedHTMLElementId)
6492}addEvent(fbPanel1,"mousemove",Firebug.HTML.onListMouseMove);
6493addEvent($("fbContent"),"mouseout",Firebug.HTML.onListMouseMove);
6494addEvent(Firebug.chrome.node,"mouseout",Firebug.HTML.onListMouseMove)
6495},shutdown:function(){removeEvent(fbPanel1,"mousemove",Firebug.HTML.onListMouseMove);
6496removeEvent($("fbContent"),"mouseout",Firebug.HTML.onListMouseMove);
6497removeEvent(Firebug.chrome.node,"mouseout",Firebug.HTML.onListMouseMove);
6498removeEvent(this.panelNode,"click",Firebug.HTML.onTreeClick);
6499fbPanel1=null;
6500Firebug.Panel.shutdown.apply(this,arguments)
6501},reattach:function(){if(Firebug.context.persistedState.selectedHTMLElementId){Firebug.HTML.selectTreeNode(Firebug.context.persistedState.selectedHTMLElementId)
6502}},updateSelection:function(object){var id=ElementCache(object);
6503if(id){Firebug.HTML.selectTreeNode(id)
6504}}});
6505Firebug.registerPanel(HTMLPanel);
6506var formatStyles=function(styles){return isIE?styles.replace(/([^\s]+)\s*:/g,function(m,g){return g.toLowerCase()+":"
6507}):styles
6508};
6509var selectedElement=null;
6510var fbPanel1=null;
6511var selectedSidePanelTS,selectedSidePanelTimer;
6512var selectElement=function selectElement(e){if(e!=selectedElement){if(selectedElement){selectedElement.className="objectBox-element"
6513}e.className=e.className+" selectedElement";
6514if(FBL.isFirefox){e.style.MozBorderRadius="2px"
6515}else{if(FBL.isSafari){e.style.WebkitBorderRadius="2px"
6516}}e.style.borderRadius="2px";
6517selectedElement=e;
6518Firebug.context.persistedState.selectedHTMLElementId=e.id;
6519var target=ElementCache.get(e.id);
6520var sidePanelBar=Firebug.chrome.getPanel("HTML").sidePanelBar;
6521var selectedSidePanel=sidePanelBar?sidePanelBar.selectedPanel:null;
6522var stack=FirebugChrome.htmlSelectionStack;
6523stack.unshift(target);
6524if(stack.length>2){stack.pop()
6525}var lazySelect=function(){selectedSidePanelTS=new Date().getTime();
6526if(selectedSidePanel){selectedSidePanel.select(target,true)
6527}};
6528if(selectedSidePanelTimer){clearTimeout(selectedSidePanelTimer);
6529selectedSidePanelTimer=null
6530}if(new Date().getTime()-selectedSidePanelTS>100){setTimeout(lazySelect,0)
6531}else{selectedSidePanelTimer=setTimeout(lazySelect,150)
6532}}};
6533Firebug.HTML.onTreeClick=function(e){e=e||event;
6534var targ;
6535if(e.target){targ=e.target
6536}else{if(e.srcElement){targ=e.srcElement
6537}}if(targ.nodeType==3){targ=targ.parentNode
6538}if(targ.className.indexOf("nodeControl")!=-1||targ.className=="nodeTag"){if(targ.className=="nodeTag"){var control=isIE?(targ.parentNode.previousSibling||targ):(targ.parentNode.previousSibling||targ);
6539selectElement(targ.parentNode.parentNode);
6540if(control.className.indexOf("nodeControl")==-1){return
6541}}else{control=targ
6542}FBL.cancelEvent(e);
6543var treeNode=isIE?control.nextSibling:control.parentNode;
6544if(control.className.indexOf(" nodeMaximized")!=-1){FBL.Firebug.HTML.removeTreeChildren(treeNode)
6545}else{FBL.Firebug.HTML.appendTreeChildren(treeNode)
6546}}else{if(targ.className=="nodeValue"||targ.className=="nodeName"){}}};
6547function onListMouseOut(e){e=e||event||window;
6548var targ;
6549if(e.target){targ=e.target
6550}else{if(e.srcElement){targ=e.srcElement
6551}}if(targ.nodeType==3){targ=targ.parentNode
6552}if(hasClass(targ,"fbPanel")){FBL.Firebug.Inspector.hideBoxModel();
6553hoverElement=null
6554}}var hoverElement=null;
6555var hoverElementTS=0;
6556Firebug.HTML.onListMouseMove=function onListMouseMove(e){try{e=e||event||window;
6557var targ;
6558if(e.target){targ=e.target
6559}else{if(e.srcElement){targ=e.srcElement
6560}}if(targ.nodeType==3){targ=targ.parentNode
6561}var found=false;
6562while(targ&&!found){if(!/\snodeBox\s|\sobjectBox-selector\s/.test(" "+targ.className+" ")){targ=targ.parentNode
6563}else{found=true
6564}}if(!targ){FBL.Firebug.Inspector.hideBoxModel();
6565hoverElement=null;
6566return
6567}if(typeof targ.attributes[cacheID]=="undefined"){return
6568}var uid=targ.attributes[cacheID];
6569if(!uid){return
6570}var el=ElementCache.get(uid.value);
6571var nodeName=el.nodeName.toLowerCase();
6572if(FBL.isIE&&" meta title script link ".indexOf(" "+nodeName+" ")!=-1){return
6573}if(!/\snodeBox\s|\sobjectBox-selector\s/.test(" "+targ.className+" ")){return
6574}if(el.id=="FirebugUI"||" html head body br script link iframe ".indexOf(" "+nodeName+" ")!=-1){FBL.Firebug.Inspector.hideBoxModel();
6575hoverElement=null;
6576return
6577}if((new Date().getTime()-hoverElementTS>40)&&hoverElement!=el){hoverElementTS=new Date().getTime();
6578hoverElement=el;
6579FBL.Firebug.Inspector.drawBoxModel(el)
6580}}catch(E){}};
6581Firebug.Reps={appendText:function(object,html){html.push(escapeHTML(objectToString(object)))
6582},appendNull:function(object,html){html.push('<span class="objectBox-null">',escapeHTML(objectToString(object)),"</span>")
6583},appendString:function(object,html){html.push('<span class="objectBox-string">&quot;',escapeHTML(objectToString(object)),"&quot;</span>")
6584},appendInteger:function(object,html){html.push('<span class="objectBox-number">',escapeHTML(objectToString(object)),"</span>")
6585},appendFloat:function(object,html){html.push('<span class="objectBox-number">',escapeHTML(objectToString(object)),"</span>")
6586},appendFunction:function(object,html){var reName=/function ?(.*?)\(/;
6587var m=reName.exec(objectToString(object));
6588var name=m&&m[1]?m[1]:"function";
6589html.push('<span class="objectBox-function">',escapeHTML(name),"()</span>")
6590},appendObject:function(object,html){try{if(object==undefined){this.appendNull("undefined",html)
6591}else{if(object==null){this.appendNull("null",html)
6592}else{if(typeof object=="string"){this.appendString(object,html)
6593}else{if(typeof object=="number"){this.appendInteger(object,html)
6594}else{if(typeof object=="boolean"){this.appendInteger(object,html)
6595}else{if(typeof object=="function"){this.appendFunction(object,html)
6596}else{if(object.nodeType==1){this.appendSelector(object,html)
6597}else{if(typeof object=="object"){if(typeof object.length!="undefined"){this.appendArray(object,html)
6598}else{this.appendObjectFormatted(object,html)
6599}}else{this.appendText(object,html)
6600}}}}}}}}}catch(exc){}},appendObjectFormatted:function(object,html){var text=objectToString(object);
6601var reObject=/\[object (.*?)\]/;
6602var m=reObject.exec(text);
6603html.push('<span class="objectBox-object">',m?m[1]:text,"</span>")
6604},appendSelector:function(object,html){var uid=ElementCache(object);
6605var uidString=uid?[cacheID,'="',uid,'"'].join(""):"";
6606html.push('<span class="objectBox-selector"',uidString,">");
6607html.push('<span class="selectorTag">',escapeHTML(object.nodeName.toLowerCase()),"</span>");
6608if(object.id){html.push('<span class="selectorId">#',escapeHTML(object.id),"</span>")
6609}if(object.className){html.push('<span class="selectorClass">.',escapeHTML(object.className),"</span>")
6610}html.push("</span>")
6611},appendNode:function(node,html){if(node.nodeType==1){var uid=ElementCache(node);
6612var uidString=uid?[cacheID,'="',uid,'"'].join(""):"";
6613html.push('<div class="objectBox-element"',uidString,'">',"<span ",cacheID,'="',uid,'" class="nodeBox">','&lt;<span class="nodeTag">',node.nodeName.toLowerCase(),"</span>");
6614for(var i=0;
6615i<node.attributes.length;
6616++i){var attr=node.attributes[i];
6617if(!attr.specified||attr.nodeName==cacheID){continue
6618}var name=attr.nodeName.toLowerCase();
6619var value=name=="style"?node.style.cssText:attr.nodeValue;
6620html.push('&nbsp;<span class="nodeName">',name,'</span>=&quot;<span class="nodeValue">',escapeHTML(value),"</span>&quot;")
6621}if(node.firstChild){html.push('&gt;</div><div class="nodeChildren">');
6622for(var child=node.firstChild;
6623child;
6624child=child.nextSibling){this.appendNode(child,html)
6625}html.push('</div><div class="objectBox-element">&lt;/<span class="nodeTag">',node.nodeName.toLowerCase(),"&gt;</span></span></div>")
6626}else{html.push("/&gt;</span></div>")
6627}}else{if(node.nodeType==3){var value=trim(node.nodeValue);
6628if(value){html.push('<div class="nodeText">',escapeHTML(value),"</div>")
6629}}}},appendArray:function(object,html){html.push('<span class="objectBox-array"><b>[</b> ');
6630for(var i=0,l=object.length,obj;
6631i<l;
6632++i){this.appendObject(object[i],html);
6633if(i<l-1){html.push(", ")
6634}}html.push(" <b>]</b></span>")
6635}}
6636}});
6637FBL.ns(function(){with(FBL){var maxWidth=100,maxHeight=80;
6638var infoTipMargin=10;
6639var infoTipWindowPadding=25;
6640Firebug.InfoTip=extend(Firebug.Module,{dispatchName:"infoTip",tags:domplate({infoTipTag:DIV({"class":"infoTip"}),colorTag:DIV({style:"background: $rgbValue; width: 100px; height: 40px"},"&nbsp;"),imgTag:DIV({"class":"infoTipImageBox infoTipLoading"},IMG({"class":"infoTipImage",src:"$urlValue",repeat:"$repeat",onload:"$onLoadImage"}),IMG({"class":"infoTipBgImage",collapsed:true,src:"blank.gif"}),DIV({"class":"infoTipCaption"})),onLoadImage:function(event){var img=event.currentTarget||event.srcElement;
6641var innerBox=img.parentNode;
6642var caption=getElementByClass(innerBox,"infoTipCaption");
6643var bgImg=getElementByClass(innerBox,"infoTipBgImage");
6644if(!bgImg){return
6645}if(isIE){removeClass(innerBox,"infoTipLoading")
6646}var updateInfoTip=function(){var w=img.naturalWidth||img.width||10,h=img.naturalHeight||img.height||10;
6647var repeat=img.getAttribute("repeat");
6648if(repeat=="repeat-x"||(w==1&&h>1)){collapse(img,true);
6649collapse(bgImg,false);
6650bgImg.style.background="url("+img.src+") repeat-x";
6651bgImg.style.width=maxWidth+"px";
6652if(h>maxHeight){bgImg.style.height=maxHeight+"px"
6653}else{bgImg.style.height=h+"px"
6654}}else{if(repeat=="repeat-y"||(h==1&&w>1)){collapse(img,true);
6655collapse(bgImg,false);
6656bgImg.style.background="url("+img.src+") repeat-y";
6657bgImg.style.height=maxHeight+"px";
6658if(w>maxWidth){bgImg.style.width=maxWidth+"px"
6659}else{bgImg.style.width=w+"px"
6660}}else{if(repeat=="repeat"||(w==1&&h==1)){collapse(img,true);
6661collapse(bgImg,false);
6662bgImg.style.background="url("+img.src+") repeat";
6663bgImg.style.width=maxWidth+"px";
6664bgImg.style.height=maxHeight+"px"
6665}else{if(w>maxWidth||h>maxHeight){if(w>h){img.style.width=maxWidth+"px";
6666img.style.height=Math.round((h/w)*maxWidth)+"px"
6667}else{img.style.width=Math.round((w/h)*maxHeight)+"px";
6668img.style.height=maxHeight+"px"
6669}}}}}caption.innerHTML=$STRF(w+" x "+h)
6670};
6671if(isIE){setTimeout(updateInfoTip,0)
6672}else{updateInfoTip();
6673removeClass(innerBox,"infoTipLoading")
6674}}}),initializeBrowser:function(browser){browser.onInfoTipMouseOut=bind(this.onMouseOut,this,browser);
6675browser.onInfoTipMouseMove=bind(this.onMouseMove,this,browser);
6676var doc=browser.document;
6677if(!doc){return
6678}addEvent(doc,"mouseover",browser.onInfoTipMouseMove);
6679addEvent(doc,"mouseout",browser.onInfoTipMouseOut);
6680addEvent(doc,"mousemove",browser.onInfoTipMouseMove);
6681return browser.infoTip=this.tags.infoTipTag.append({},getBody(doc))
6682},uninitializeBrowser:function(browser){if(browser.infoTip){var doc=browser.document;
6683removeEvent(doc,"mouseover",browser.onInfoTipMouseMove);
6684removeEvent(doc,"mouseout",browser.onInfoTipMouseOut);
6685removeEvent(doc,"mousemove",browser.onInfoTipMouseMove);
6686browser.infoTip.parentNode.removeChild(browser.infoTip);
6687delete browser.infoTip;
6688delete browser.onInfoTipMouseMove
6689}},showInfoTip:function(infoTip,panel,target,x,y,rangeParent,rangeOffset){if(!Firebug.showInfoTips){return
6690}var scrollParent=getOverflowParent(target);
6691var scrollX=x+(scrollParent?scrollParent.scrollLeft:0);
6692if(panel.showInfoTip(infoTip,target,scrollX,y,rangeParent,rangeOffset)){var htmlElt=infoTip.ownerDocument.documentElement;
6693var panelWidth=htmlElt.clientWidth;
6694var panelHeight=htmlElt.clientHeight;
6695if(x+infoTip.offsetWidth+infoTipMargin>panelWidth){infoTip.style.left=Math.max(0,panelWidth-(infoTip.offsetWidth+infoTipMargin))+"px";
6696infoTip.style.right="auto"
6697}else{infoTip.style.left=(x+infoTipMargin)+"px";
6698infoTip.style.right="auto"
6699}if(y+infoTip.offsetHeight+infoTipMargin>panelHeight){infoTip.style.top=Math.max(0,panelHeight-(infoTip.offsetHeight+infoTipMargin))+"px";
6700infoTip.style.bottom="auto"
6701}else{infoTip.style.top=(y+infoTipMargin)+"px";
6702infoTip.style.bottom="auto"
6703}if(FBTrace.DBG_INFOTIP){FBTrace.sysout("infotip.showInfoTip; top: "+infoTip.style.top+", left: "+infoTip.style.left+", bottom: "+infoTip.style.bottom+", right:"+infoTip.style.right+", offsetHeight: "+infoTip.offsetHeight+", offsetWidth: "+infoTip.offsetWidth+", x: "+x+", panelWidth: "+panelWidth+", y: "+y+", panelHeight: "+panelHeight)
6704}infoTip.setAttribute("active","true")
6705}else{this.hideInfoTip(infoTip)
6706}},hideInfoTip:function(infoTip){if(infoTip){infoTip.removeAttribute("active")
6707}},onMouseOut:function(event,browser){if(!event.relatedTarget){this.hideInfoTip(browser.infoTip)
6708}},onMouseMove:function(event,browser){if(getAncestorByClass(event.target,"infoTip")){return
6709}if(browser.currentPanel){var x=event.clientX,y=event.clientY,target=event.target||event.srcElement;
6710this.showInfoTip(browser.infoTip,browser.currentPanel,target,x,y,event.rangeParent,event.rangeOffset)
6711}else{this.hideInfoTip(browser.infoTip)
6712}},populateColorInfoTip:function(infoTip,color){this.tags.colorTag.replace({rgbValue:color},infoTip);
6713return true
6714},populateImageInfoTip:function(infoTip,url,repeat){if(!repeat){repeat="no-repeat"
6715}this.tags.imgTag.replace({urlValue:url,repeat:repeat},infoTip);
6716return true
6717},disable:function(){},showPanel:function(browser,panel){if(panel){var infoTip=panel.panelBrowser.infoTip;
6718if(!infoTip){infoTip=this.initializeBrowser(panel.panelBrowser)
6719}this.hideInfoTip(infoTip)
6720}},showSidePanel:function(browser,panel){this.showPanel(browser,panel)
6721}});
6722Firebug.registerModule(Firebug.InfoTip)
6723}});
6724FBL.ns(function(){with(FBL){var CssParser=null;
6725CssParser=(function(){function rule(start,body_start,end){return{start:start||0,body_start:body_start||0,end:end||0,line:-1,selector:null,parent:null,children:[],addChild:function(start,body_start,end){var r=rule(start,body_start,end);
6726r.parent=this;
6727this.children.push(r);
6728return r
6729},lastChild:function(){return this.children[this.children.length-1]
6730}}
6731}function removeAll(str,re){var m;
6732while(m=str.match(re)){str=str.substring(m[0].length)
6733}return str
6734}function trim(str){return str.replace(/^\s+|\s+$/g,"")
6735}function normalizeSelector(selector){selector=selector.replace(/[\n\r]/g," ");
6736selector=trim(selector);
6737selector=selector.replace(/\s*,\s*/g,",");
6738return selector
6739}function preprocessRules(text,rule_node){for(var i=0,il=rule_node.children.length;
6740i<il;
6741i++){var r=rule_node.children[i],rule_start=text.substring(r.start,r.body_start),cur_len=rule_start.length;
6742rule_start=rule_start.replace(/[\n\r]/g," ");
6743rule_start=removeAll(rule_start,/^\s*\/\*.*?\*\/[\s\t]*/);
6744rule_start=rule_start.replace(/^[\s\t]+/,"");
6745r.start+=(cur_len-rule_start.length);
6746r.selector=normalizeSelector(rule_start)
6747}return rule_node
6748}function saveLineIndexes(text){var result=[0],i=0,il=text.length,ch,ch2;
6749while(i<il){ch=text.charAt(i);
6750if(ch=="\n"||ch=="\r"){if(ch=="\r"&&i<il-1&&text.charAt(i+1)=="\n"){i++
6751}result.push(i+1)
6752}i++
6753}return result
6754}function saveLineNumbers(text,rule_node,line_indexes,startLine){preprocessRules(text,rule_node);
6755startLine=startLine||0;
6756if(!line_indexes){var line_indexes=saveLineIndexes(text)
6757}for(var i=0,il=rule_node.children.length;
6758i<il;
6759i++){var r=rule_node.children[i];
6760r.line=line_indexes.length+startLine;
6761for(var j=0,jl=line_indexes.length-1;
6762j<jl;
6763j++){var line_ix=line_indexes[j];
6764if(r.start>=line_indexes[j]&&r.start<line_indexes[j+1]){r.line=j+1+startLine;
6765break
6766}}saveLineNumbers(text,r,line_indexes)
6767}return rule_node
6768}return{read:function(text,startLine){var rule_start=[],rule_body_start=[],rules=[],in_comment=0,root=rule(),cur_parent=root,last_rule=null,stack=[],ch,ch2;
6769stack.last=function(){return this[this.length-1]
6770};
6771function hasStr(pos,substr){return text.substr(pos,substr.length)==substr
6772}for(var i=0,il=text.length;
6773i<il;
6774i++){ch=text.charAt(i);
6775ch2=i<il-1?text.charAt(i+1):"";
6776if(!rule_start.length){rule_start.push(i)
6777}switch(ch){case"@":if(!in_comment){if(hasStr(i,"@import")){var m=text.substr(i).match(/^@import\s*url\((['"])?.+?\1?\)\;?/);
6778if(m){cur_parent.addChild(i,i+7,i+m[0].length);
6779i+=m[0].length;
6780rule_start.pop()
6781}break
6782}}case"/":if(!in_comment&&ch2=="*"){in_comment++
6783}break;
6784case"*":if(ch2=="/"){in_comment--
6785}break;
6786case"{":if(!in_comment){rule_body_start.push(i);
6787cur_parent=cur_parent.addChild(rule_start.pop());
6788stack.push(cur_parent)
6789}break;
6790case"}":if(!in_comment){var last_rule=stack.pop();
6791rule_start.pop();
6792last_rule.body_start=rule_body_start.pop();
6793last_rule.end=i;
6794cur_parent=last_rule.parent||root
6795}break
6796}}return saveLineNumbers(text,root,null,startLine)
6797},normalizeSelector:normalizeSelector,findBySelector:function(rule_node,selector,source){var selector=normalizeSelector(selector),result=[];
6798if(rule_node){for(var i=0,il=rule_node.children.length;
6799i<il;
6800i++){var r=rule_node.children[i];
6801if(r.selector==selector){result.push(r)
6802}}}if(result.length){return result
6803}else{return null
6804}}}
6805})();
6806FBL.CssParser=CssParser
6807}});
6808FBL.ns(function(){with(FBL){var CssAnalyzer={};
6809var CSSRuleMap={};
6810var ElementCSSRulesMap={};
6811var internalStyleSheetIndex=-1;
6812var reSelectorTag=/(^|\s)(?:\w+)/g;
6813var reSelectorClass=/\.[\w\d_-]+/g;
6814var reSelectorId=/#[\w\d_-]+/g;
6815var globalCSSRuleIndex;
6816var processAllStyleSheetsTimeout=null;
6817var externalStyleSheetURLs=[];
6818var ElementCache=Firebug.Lite.Cache.Element;
6819var StyleSheetCache=Firebug.Lite.Cache.StyleSheet;
6820CssAnalyzer.externalStyleSheetWarning=domplate(Firebug.Rep,{tag:DIV({"class":"warning focusRow",style:"font-weight:normal;",role:"listitem"},SPAN("$object|STR"),A({href:"$href",target:"_blank"},"$link|STR"))});
6821CssAnalyzer.processAllStyleSheets=function(doc,styleSheetIterator){try{processAllStyleSheets(doc,styleSheetIterator)
6822}catch(e){FBTrace.sysout("CssAnalyzer.processAllStyleSheets fails: ",e)
6823}};
6824CssAnalyzer.getElementCSSRules=function(element){try{return getElementCSSRules(element)
6825}catch(e){FBTrace.sysout("CssAnalyzer.getElementCSSRules fails: ",e)
6826}};
6827CssAnalyzer.getRuleData=function(ruleId){return CSSRuleMap[ruleId]
6828};
6829CssAnalyzer.getRuleLine=function(){};
6830CssAnalyzer.hasExternalStyleSheet=function(){return externalStyleSheetURLs.length>0
6831};
6832CssAnalyzer.parseStyleSheet=function(href){var sourceData=extractSourceData(href);
6833var parsedObj=CssParser.read(sourceData.source,sourceData.startLine);
6834var parsedRules=parsedObj.children;
6835for(var i=0;
6836i<parsedRules.length;
6837){if(parsedRules[i].selector.indexOf("@")!=-1){parsedRules.splice(i,1)
6838}else{i++
6839}}return parsedRules
6840};
6841var processAllStyleSheets=function(doc,styleSheetIterator){styleSheetIterator=styleSheetIterator||processStyleSheet;
6842globalCSSRuleIndex=-1;
6843var styleSheets=doc.styleSheets;
6844var importedStyleSheets=[];
6845if(FBTrace.DBG_CSS){var start=new Date().getTime()
6846}for(var i=0,length=styleSheets.length;
6847i<length;
6848i++){try{var styleSheet=styleSheets[i];
6849if("firebugIgnore" in styleSheet){continue
6850}var rules=isIE?styleSheet.rules:styleSheet.cssRules;
6851rules.length
6852}catch(e){externalStyleSheetURLs.push(styleSheet.href);
6853styleSheet.restricted=true;
6854var ssid=StyleSheetCache(styleSheet)
6855}styleSheetIterator(doc,styleSheet);
6856var importedStyleSheet,importedRules;
6857if(isIE){var imports=styleSheet.imports;
6858for(var j=0,importsLength=imports.length;
6859j<importsLength;
6860j++){try{importedStyleSheet=imports[j];
6861importedRules=importedStyleSheet.rules;
6862importedRules.length
6863}catch(e){externalStyleSheetURLs.push(styleSheet.href);
6864importedStyleSheet.restricted=true;
6865var ssid=StyleSheetCache(importedStyleSheet)
6866}styleSheetIterator(doc,importedStyleSheet)
6867}}else{if(rules){for(var j=0,rulesLength=rules.length;
6868j<rulesLength;
6869j++){try{var rule=rules[j];
6870importedStyleSheet=rule.styleSheet;
6871if(importedStyleSheet){importedRules=importedStyleSheet.cssRules;
6872importedRules.length
6873}else{break
6874}}catch(e){externalStyleSheetURLs.push(styleSheet.href);
6875importedStyleSheet.restricted=true;
6876var ssid=StyleSheetCache(importedStyleSheet)
6877}styleSheetIterator(doc,importedStyleSheet)
6878}}}}if(FBTrace.DBG_CSS){FBTrace.sysout("FBL.processAllStyleSheets","all stylesheet rules processed in "+(new Date().getTime()-start)+"ms")
6879}};
6880var processStyleSheet=function(doc,styleSheet){if(styleSheet.restricted){return
6881}var rules=isIE?styleSheet.rules:styleSheet.cssRules;
6882var ssid=StyleSheetCache(styleSheet);
6883var href=styleSheet.href;
6884var shouldParseCSS=typeof CssParser!="undefined"&&!Firebug.disableResourceFetching;
6885if(shouldParseCSS){try{var parsedRules=CssAnalyzer.parseStyleSheet(href)
6886}catch(e){if(FBTrace.DBG_ERRORS){FBTrace.sysout("processStyleSheet FAILS",e.message||e)
6887}shouldParseCSS=false
6888}finally{var parsedRulesIndex=0;
6889var dontSupportGroupedRules=isIE&&browserVersion<9;
6890var group=[];
6891var groupItem
6892}}for(var i=0,length=rules.length;
6893i<length;
6894i++){var rid=ssid+":"+i;
6895var rule=rules[i];
6896var selector=rule.selectorText||"";
6897var lineNo=null;
6898if(!selector||selector.indexOf("@")!=-1){continue
6899}if(isIE){selector=selector.replace(reSelectorTag,function(s){return s.toLowerCase()
6900})
6901}if(shouldParseCSS){var parsedRule=parsedRules[parsedRulesIndex];
6902var parsedSelector=parsedRule.selector;
6903if(dontSupportGroupedRules&&parsedSelector.indexOf(",")!=-1&&group.length==0){group=parsedSelector.split(",")
6904}if(dontSupportGroupedRules&&group.length>0){groupItem=group.shift();
6905if(CssParser.normalizeSelector(selector)==groupItem){lineNo=parsedRule.line
6906}if(group.length==0){parsedRulesIndex++
6907}}else{if(CssParser.normalizeSelector(selector)==parsedRule.selector){lineNo=parsedRule.line;
6908parsedRulesIndex++
6909}}}CSSRuleMap[rid]={styleSheetId:ssid,styleSheetIndex:i,order:++globalCSSRuleIndex,specificity:selector&&selector.indexOf(",")==-1?getCSSRuleSpecificity(selector):0,rule:rule,lineNo:lineNo,selector:selector,cssText:rule.style?rule.style.cssText:rule.cssText?rule.cssText:""};
6910var elements=Firebug.Selector(selector,doc);
6911for(var j=0,elementsLength=elements.length;
6912j<elementsLength;
6913j++){var element=elements[j];
6914var eid=ElementCache(element);
6915if(!ElementCSSRulesMap[eid]){ElementCSSRulesMap[eid]=[]
6916}ElementCSSRulesMap[eid].push(rid)
6917}}};
6918var loadExternalStylesheet=function(doc,styleSheetIterator,styleSheet){var url=styleSheet.href;
6919styleSheet.firebugIgnore=true;
6920var source=Firebug.Lite.Proxy.load(url);
6921source=source.replace(/url\(([^\)]+)\)/g,function(a,name){var hasDomain=/\w+:\/\/./.test(name);
6922if(!hasDomain){name=name.replace(/^(["'])(.+)\1$/,"$2");
6923var first=name.charAt(0);
6924if(first=="/"){var m=/^([^:]+:\/{1,3}[^\/]+)/.exec(url);
6925return m?"url("+m[1]+name+")":"url("+name+")"
6926}else{var path=url.replace(/[^\/]+\.[\w\d]+(\?.+|#.+)?$/g,"");
6927path=path+name;
6928var reBack=/[^\/]+\/\.\.\//;
6929while(reBack.test(path)){path=path.replace(reBack,"")
6930}return"url("+path+")"
6931}}return a
6932});
6933var oldStyle=styleSheet.ownerNode;
6934if(!oldStyle){return
6935}if(!oldStyle.parentNode){return
6936}var style=createGlobalElement("style");
6937style.setAttribute("charset","utf-8");
6938style.setAttribute("type","text/css");
6939style.innerHTML=source;
6940oldStyle.parentNode.insertBefore(style,oldStyle.nextSibling);
6941oldStyle.parentNode.removeChild(oldStyle);
6942doc.styleSheets[doc.styleSheets.length-1].externalURL=url;
6943console.log(url,"call "+externalStyleSheetURLs.length,source);
6944externalStyleSheetURLs.pop();
6945if(processAllStyleSheetsTimeout){clearTimeout(processAllStyleSheetsTimeout)
6946}processAllStyleSheetsTimeout=setTimeout(function(){console.log("processing");
6947FBL.processAllStyleSheets(doc,styleSheetIterator);
6948processAllStyleSheetsTimeout=null
6949},200)
6950};
6951var getElementCSSRules=function(element){var eid=ElementCache(element);
6952var rules=ElementCSSRulesMap[eid];
6953if(!rules){return
6954}var arr=[element];
6955var Selector=Firebug.Selector;
6956var ruleId,rule;
6957for(var i=0,length=rules.length;
6958i<length;
6959i++){ruleId=rules[i];
6960rule=CSSRuleMap[ruleId];
6961if(rule.selector.indexOf(",")!=-1){var selectors=rule.selector.split(",");
6962var maxSpecificity=-1;
6963var sel,spec,mostSpecificSelector;
6964for(var j,len=selectors.length;
6965j<len;
6966j++){sel=selectors[j];
6967if(Selector.matches(sel,arr).length==1){spec=getCSSRuleSpecificity(sel);
6968if(spec>maxSpecificity){maxSpecificity=spec;
6969mostSpecificSelector=sel
6970}}}rule.specificity=maxSpecificity
6971}}rules.sort(sortElementRules);
6972return rules
6973};
6974var sortElementRules=function(a,b){var ruleA=CSSRuleMap[a];
6975var ruleB=CSSRuleMap[b];
6976var specificityA=ruleA.specificity;
6977var specificityB=ruleB.specificity;
6978if(specificityA>specificityB){return 1
6979}else{if(specificityA<specificityB){return -1
6980}else{return ruleA.order>ruleB.order?1:-1
6981}}};
6982var solveRulesTied=function(a,b){var ruleA=CSSRuleMap[a];
6983var ruleB=CSSRuleMap[b];
6984if(ruleA.specificity==ruleB.specificity){return ruleA.order>ruleB.order?1:-1
6985}return null
6986};
6987var getCSSRuleSpecificity=function(selector){var match=selector.match(reSelectorTag);
6988var tagCount=match?match.length:0;
6989match=selector.match(reSelectorClass);
6990var classCount=match?match.length:0;
6991match=selector.match(reSelectorId);
6992var idCount=match?match.length:0;
6993return tagCount+10*classCount+100*idCount
6994};
6995var extractSourceData=function(href){var sourceData={source:null,startLine:0};
6996if(href){sourceData.source=Firebug.Lite.Proxy.load(href)
6997}else{var index=0;
6998var ssIndex=++internalStyleSheetIndex;
6999var reStyleTag=/\<\s*style.*\>/gi;
7000var reEndStyleTag=/\<\/\s*style.*\>/gi;
7001var source=Firebug.Lite.Proxy.load(Env.browser.location.href);
7002source=source.replace(/\n\r|\r\n/g,"\n");
7003var startLine=0;
7004do{var matchStyleTag=source.match(reStyleTag);
7005var i0=source.indexOf(matchStyleTag[0])+matchStyleTag[0].length;
7006for(var i=0;
7007i<i0;
7008i++){if(source.charAt(i)=="\n"){startLine++
7009}}source=source.substr(i0);
7010index++
7011}while(index<=ssIndex);
7012var matchEndStyleTag=source.match(reEndStyleTag);
7013var i1=source.indexOf(matchEndStyleTag[0]);
7014var extractedSource=source.substr(0,i1);
7015sourceData.source=extractedSource;
7016sourceData.startLine=startLine
7017}return sourceData
7018};
7019FBL.CssAnalyzer=CssAnalyzer
7020}});
7021(function(){this.getElementXPath=function(element){try{if(element&&element.id){return'//*[@id="'+element.id+'"]'
7022}else{return this.getElementTreeXPath(element)
7023}}catch(E){}};
7024this.getElementTreeXPath=function(element){var paths=[];
7025for(;
7026element&&element.nodeType==1;
7027element=element.parentNode){var index=0;
7028var nodeName=element.nodeName;
7029for(var sibling=element.previousSibling;
7030sibling;
7031sibling=sibling.previousSibling){if(sibling.nodeType!=1){continue
7032}if(sibling.nodeName==nodeName){++index
7033}}var tagName=element.nodeName.toLowerCase();
7034var pathIndex=(index?"["+(index+1)+"]":"");
7035paths.splice(0,0,tagName+pathIndex)
7036}return paths.length?"/"+paths.join("/"):null
7037};
7038this.getElementsByXPath=function(doc,xpath){var nodes=[];
7039try{var result=doc.evaluate(xpath,doc,null,XPathResult.ANY_TYPE,null);
7040for(var item=result.iterateNext();
7041item;
7042item=result.iterateNext()){nodes.push(item)
7043}}catch(exc){}return nodes
7044};
7045this.getRuleMatchingElements=function(rule,doc){var css=rule.selectorText;
7046var xpath=this.cssToXPath(css);
7047return this.getElementsByXPath(doc,xpath)
7048}
7049}).call(FBL);
7050FBL.ns(function(){with(FBL){var toCamelCase=function toCamelCase(s){return s.replace(reSelectorCase,toCamelCaseReplaceFn)
7051};
7052var toSelectorCase=function toSelectorCase(s){return s.replace(reCamelCase,"-$1").toLowerCase()
7053};
7054var reCamelCase=/([A-Z])/g;
7055var reSelectorCase=/\-(.)/g;
7056var toCamelCaseReplaceFn=function toCamelCaseReplaceFn(m,g){return g.toUpperCase()
7057};
7058var ElementCache=Firebug.Lite.Cache.Element;
7059var StyleSheetCache=Firebug.Lite.Cache.StyleSheet;
7060Firebug.SourceBoxPanel=Firebug.Panel;
7061var reSelectorTag=/(^|\s)(?:\w+)/g;
7062var domUtils=null;
7063var textContent=isIE?"innerText":"textContent";
7064var CSSDomplateBase={isEditable:function(rule){return !rule.isSystemSheet
7065},isSelectorEditable:function(rule){return rule.isSelectorEditable&&this.isEditable(rule)
7066}};
7067var CSSPropTag=domplate(CSSDomplateBase,{tag:DIV({"class":"cssProp focusRow",$disabledStyle:"$prop.disabled",$editGroup:"$rule|isEditable",$cssOverridden:"$prop.overridden",role:"option"},A({"class":"cssPropDisable"},"&nbsp;&nbsp;"),SPAN({"class":"cssPropName",$editable:"$rule|isEditable"},"$prop.name"),SPAN({"class":"cssColon"},":"),SPAN({"class":"cssPropValue",$editable:"$rule|isEditable"},"$prop.value$prop.important"),SPAN({"class":"cssSemi"},";"))});
7068var CSSRuleTag=TAG("$rule.tag",{rule:"$rule"});
7069var CSSImportRuleTag=domplate({tag:DIV({"class":"cssRule insertInto focusRow importRule",_repObject:"$rule.rule"},"@import &quot;",A({"class":"objectLink",_repObject:"$rule.rule.styleSheet"},"$rule.rule.href"),"&quot;;")});
7070var CSSStyleRuleTag=domplate(CSSDomplateBase,{tag:DIV({"class":"cssRule insertInto",$cssEditableRule:"$rule|isEditable",$editGroup:"$rule|isSelectorEditable",_repObject:"$rule.rule",ruleId:"$rule.id",role:"presentation"},DIV({"class":"cssHead focusRow",role:"listitem"},SPAN({"class":"cssSelector",$editable:"$rule|isSelectorEditable"},"$rule.selector")," {"),DIV({role:"group"},DIV({"class":"cssPropertyListBox",role:"listbox"},FOR("prop","$rule.props",TAG(CSSPropTag.tag,{rule:"$rule",prop:"$prop"})))),DIV({"class":"editable insertBefore",role:"presentation"},"}"))});
7071var reSplitCSS=/(url\("?[^"\)]+?"?\))|(rgb\(.*?\))|(#[\dA-Fa-f]+)|(-?\d+(\.\d+)?(%|[a-z]{1,2})?)|([^,\s]+)|"(.*?)"/;
7072var reURL=/url\("?([^"\)]+)?"?\)/;
7073var reRepeat=/no-repeat|repeat-x|repeat-y|repeat/;
7074var sothinkInstalled=false;
7075var styleGroups={text:["font-family","font-size","font-weight","font-style","color","text-transform","text-decoration","letter-spacing","word-spacing","line-height","text-align","vertical-align","direction","column-count","column-gap","column-width"],background:["background-color","background-image","background-repeat","background-position","background-attachment","opacity"],box:["width","height","top","right","bottom","left","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","-moz-border-top-radius","-moz-border-right-radius","-moz-border-bottom-radius","-moz-border-left-radius","outline-top-width","outline-right-width","outline-bottom-width","outline-left-width","outline-top-color","outline-right-color","outline-bottom-color","outline-left-color","outline-top-style","outline-right-style","outline-bottom-style","outline-left-style"],layout:["position","display","visibility","z-index","overflow-x","overflow-y","overflow-clip","white-space","clip","float","clear","-moz-box-sizing"],other:["cursor","list-style-image","list-style-position","list-style-type","marker-offset","user-focus","user-select","user-modify","user-input"]};
7076var styleGroupTitles={text:"Text",background:"Background",box:"Box Model",layout:"Layout",other:"Other"};
7077Firebug.CSSModule=extend(Firebug.Module,{freeEdit:function(styleSheet,value){if(!styleSheet.editStyleSheet){var ownerNode=getStyleSheetOwnerNode(styleSheet);
7078styleSheet.disabled=true;
7079var url=CCSV("@mozilla.org/network/standard-url;1",Components.interfaces.nsIURL);
7080url.spec=styleSheet.href;
7081var editStyleSheet=ownerNode.ownerDocument.createElementNS("http://www.w3.org/1999/xhtml","style");
7082unwrapObject(editStyleSheet).firebugIgnore=true;
7083editStyleSheet.setAttribute("type","text/css");
7084editStyleSheet.setAttributeNS("http://www.w3.org/XML/1998/namespace","base",url.directory);
7085if(ownerNode.hasAttribute("media")){editStyleSheet.setAttribute("media",ownerNode.getAttribute("media"))
7086}ownerNode.parentNode.insertBefore(editStyleSheet,ownerNode.nextSibling);
7087styleSheet.editStyleSheet=editStyleSheet
7088}styleSheet.editStyleSheet.innerHTML=value;
7089if(FBTrace.DBG_CSS){FBTrace.sysout("css.saveEdit styleSheet.href:"+styleSheet.href+" got innerHTML:"+value+"\n")
7090}dispatch(this.fbListeners,"onCSSFreeEdit",[styleSheet,value])
7091},insertRule:function(styleSheet,cssText,ruleIndex){if(FBTrace.DBG_CSS){FBTrace.sysout("Insert: "+ruleIndex+" "+cssText)
7092}var insertIndex=styleSheet.insertRule(cssText,ruleIndex);
7093dispatch(this.fbListeners,"onCSSInsertRule",[styleSheet,cssText,ruleIndex]);
7094return insertIndex
7095},deleteRule:function(styleSheet,ruleIndex){if(FBTrace.DBG_CSS){FBTrace.sysout("deleteRule: "+ruleIndex+" "+styleSheet.cssRules.length,styleSheet.cssRules)
7096}dispatch(this.fbListeners,"onCSSDeleteRule",[styleSheet,ruleIndex]);
7097styleSheet.deleteRule(ruleIndex)
7098},setProperty:function(rule,propName,propValue,propPriority){var style=rule.style||rule;
7099var baseText=style.cssText;
7100if(style.getPropertyValue){var prevValue=style.getPropertyValue(propName);
7101var prevPriority=style.getPropertyPriority(propName);
7102style.removeProperty(propName);
7103style.setProperty(propName,propValue,propPriority)
7104}else{style[toCamelCase(propName)]=propValue
7105}if(propName){dispatch(this.fbListeners,"onCSSSetProperty",[style,propName,propValue,propPriority,prevValue,prevPriority,rule,baseText])
7106}},removeProperty:function(rule,propName,parent){var style=rule.style||rule;
7107var baseText=style.cssText;
7108if(style.getPropertyValue){var prevValue=style.getPropertyValue(propName);
7109var prevPriority=style.getPropertyPriority(propName);
7110style.removeProperty(propName)
7111}else{style[toCamelCase(propName)]=""
7112}if(propName){dispatch(this.fbListeners,"onCSSRemoveProperty",[style,propName,prevValue,prevPriority,rule,baseText])
7113}}});
7114Firebug.CSSStyleSheetPanel=function(){};
7115Firebug.CSSStyleSheetPanel.prototype=extend(Firebug.SourceBoxPanel,{template:domplate({tag:DIV({"class":"cssSheet insertInto a11yCSSView"},FOR("rule","$rules",CSSRuleTag),DIV({"class":"cssSheet editable insertBefore"},""))}),refresh:function(){if(this.location){this.updateLocation(this.location)
7116}else{if(this.selection){this.updateSelection(this.selection)
7117}}},toggleEditing:function(){if(!this.stylesheetEditor){this.stylesheetEditor=new StyleSheetEditor(this.document)
7118}if(this.editing){Firebug.Editor.stopEditing()
7119}else{if(!this.location){return
7120}var styleSheet=this.location.editStyleSheet?this.location.editStyleSheet.sheet:this.location;
7121var css=getStyleSheetCSS(styleSheet,this.context);
7122this.stylesheetEditor.styleSheet=this.location;
7123Firebug.Editor.startEditing(this.panelNode,css,this.stylesheetEditor)
7124}},getStylesheetURL:function(rule){if(this.location.href){return this.location.href
7125}else{return this.context.window.location.href
7126}},getRuleByLine:function(styleSheet,line){if(!domUtils){return null
7127}var cssRules=styleSheet.cssRules;
7128for(var i=0;
7129i<cssRules.length;
7130++i){var rule=cssRules[i];
7131if(rule instanceof CSSStyleRule){var ruleLine=domUtils.getRuleLine(rule);
7132if(ruleLine>=line){return rule
7133}}}},highlightRule:function(rule){var ruleElement=Firebug.getElementByRepObject(this.panelNode.firstChild,rule);
7134if(ruleElement){scrollIntoCenterView(ruleElement,this.panelNode);
7135setClassTimed(ruleElement,"jumpHighlight",this.context)
7136}},getStyleSheetRules:function(context,styleSheet){var isSystemSheet=isSystemStyleSheet(styleSheet);
7137function appendRules(cssRules){for(var i=0;
7138i<cssRules.length;
7139++i){var rule=cssRules[i];
7140if(instanceOf(rule,"CSSStyleRule")){var props=this.getRuleProperties(context,rule);
7141var line=null;
7142var selector=rule.selectorText;
7143if(isIE){selector=selector.replace(reSelectorTag,function(s){return s.toLowerCase()
7144})
7145}var ruleId=rule.selectorText+"/"+line;
7146rules.push({tag:CSSStyleRuleTag.tag,rule:rule,id:ruleId,selector:selector,props:props,isSystemSheet:isSystemSheet,isSelectorEditable:true})
7147}else{if(instanceOf(rule,"CSSImportRule")){rules.push({tag:CSSImportRuleTag.tag,rule:rule})
7148}else{if(instanceOf(rule,"CSSMediaRule")){appendRules.apply(this,[rule.cssRules])
7149}else{if(FBTrace.DBG_ERRORS||FBTrace.DBG_CSS){FBTrace.sysout("css getStyleSheetRules failed to classify a rule ",rule)
7150}}}}}}var rules=[];
7151appendRules.apply(this,[styleSheet.cssRules||styleSheet.rules]);
7152return rules
7153},parseCSSProps:function(style,inheritMode){var props=[];
7154if(Firebug.expandShorthandProps){var count=style.length-1,index=style.length;
7155while(index--){var propName=style.item(count-index);
7156this.addProperty(propName,style.getPropertyValue(propName),!!style.getPropertyPriority(propName),false,inheritMode,props)
7157}}else{var lines=style.cssText.match(/(?:[^;\(]*(?:\([^\)]*?\))?[^;\(]*)*;?/g);
7158var propRE=/\s*([^:\s]*)\s*:\s*(.*?)\s*(! important)?;?$/;
7159var line,i=0;
7160var m;
7161while(line=lines[i++]){m=propRE.exec(line);
7162if(!m){continue
7163}if(m[2]){this.addProperty(m[1],m[2],!!m[3],false,inheritMode,props)
7164}}}return props
7165},getRuleProperties:function(context,rule,inheritMode){var props=this.parseCSSProps(rule.style,inheritMode);
7166var line;
7167var ruleId=rule.selectorText+"/"+line;
7168this.addOldProperties(context,ruleId,inheritMode,props);
7169sortProperties(props);
7170return props
7171},addOldProperties:function(context,ruleId,inheritMode,props){if(context.selectorMap&&context.selectorMap.hasOwnProperty(ruleId)){var moreProps=context.selectorMap[ruleId];
7172for(var i=0;
7173i<moreProps.length;
7174++i){var prop=moreProps[i];
7175this.addProperty(prop.name,prop.value,prop.important,true,inheritMode,props)
7176}}},addProperty:function(name,value,important,disabled,inheritMode,props){name=name.toLowerCase();
7177if(inheritMode&&!inheritedStyleNames[name]){return
7178}name=this.translateName(name,value);
7179if(name){value=stripUnits(rgbToHex(value));
7180important=important?" !important":"";
7181var prop={name:name,value:value,important:important,disabled:disabled};
7182props.push(prop)
7183}},translateName:function(name,value){if((value=="-moz-initial"&&(name=="-moz-background-clip"||name=="-moz-background-origin"||name=="-moz-background-inline-policy"))||(value=="physical"&&(name=="margin-left-ltr-source"||name=="margin-left-rtl-source"||name=="margin-right-ltr-source"||name=="margin-right-rtl-source"))||(value=="physical"&&(name=="padding-left-ltr-source"||name=="padding-left-rtl-source"||name=="padding-right-ltr-source"||name=="padding-right-rtl-source"))){return null
7184}if(name=="margin-left-value"){return"margin-left"
7185}else{if(name=="margin-right-value"){return"margin-right"
7186}else{if(name=="margin-top-value"){return"margin-top"
7187}else{if(name=="margin-bottom-value"){return"margin-bottom"
7188}else{if(name=="padding-left-value"){return"padding-left"
7189}else{if(name=="padding-right-value"){return"padding-right"
7190}else{if(name=="padding-top-value"){return"padding-top"
7191}else{if(name=="padding-bottom-value"){return"padding-bottom"
7192}else{return name
7193}}}}}}}}},editElementStyle:function(){var rulesBox=$$(".cssElementRuleContainer",this.panelNode)[0];
7194var styleRuleBox=rulesBox&&Firebug.getElementByRepObject(rulesBox,this.selection);
7195if(!styleRuleBox){var rule={rule:this.selection,inherited:false,selector:"element.style",props:[]};
7196if(!rulesBox){styleRuleBox=this.template.cascadedTag.replace({rules:[rule],inherited:[],inheritLabel:"Inherited from"},this.panelNode);
7197styleRuleBox=$$(".cssElementRuleContainer",styleRuleBox)[0]
7198}else{styleRuleBox=this.template.ruleTag.insertBefore({rule:rule},rulesBox)
7199}styleRuleBox=$$(".insertInto",styleRuleBox)[0]
7200}Firebug.Editor.insertRowForObject(styleRuleBox)
7201},insertPropertyRow:function(row){Firebug.Editor.insertRowForObject(row)
7202},insertRule:function(row){var location=getAncestorByClass(row,"cssRule");
7203if(!location){location=getChildByClass(this.panelNode,"cssSheet");
7204Firebug.Editor.insertRowForObject(location)
7205}else{Firebug.Editor.insertRow(location,"before")
7206}},editPropertyRow:function(row){var propValueBox=getChildByClass(row,"cssPropValue");
7207Firebug.Editor.startEditing(propValueBox)
7208},deletePropertyRow:function(row){var rule=Firebug.getRepObject(row);
7209var propName=getChildByClass(row,"cssPropName")[textContent];
7210Firebug.CSSModule.removeProperty(rule,propName);
7211var ruleId=Firebug.getRepNode(row).getAttribute("ruleId");
7212if(this.context.selectorMap&&this.context.selectorMap.hasOwnProperty(ruleId)){var map=this.context.selectorMap[ruleId];
7213for(var i=0;
7214i<map.length;
7215++i){if(map[i].name==propName){map.splice(i,1);
7216break
7217}}}if(this.name=="stylesheet"){dispatch([Firebug.A11yModel],"onInlineEditorClose",[this,row.firstChild,true])
7218}row.parentNode.removeChild(row);
7219this.markChange(this.name=="stylesheet")
7220},disablePropertyRow:function(row){toggleClass(row,"disabledStyle");
7221var rule=Firebug.getRepObject(row);
7222var propName=getChildByClass(row,"cssPropName")[textContent];
7223if(!this.context.selectorMap){this.context.selectorMap={}
7224}var ruleId=Firebug.getRepNode(row).getAttribute("ruleId");
7225if(!(this.context.selectorMap.hasOwnProperty(ruleId))){this.context.selectorMap[ruleId]=[]
7226}var map=this.context.selectorMap[ruleId];
7227var propValue=getChildByClass(row,"cssPropValue")[textContent];
7228var parsedValue=parsePriority(propValue);
7229if(hasClass(row,"disabledStyle")){Firebug.CSSModule.removeProperty(rule,propName);
7230map.push({name:propName,value:parsedValue.value,important:parsedValue.priority})
7231}else{Firebug.CSSModule.setProperty(rule,propName,parsedValue.value,parsedValue.priority);
7232var index=findPropByName(map,propName);
7233map.splice(index,1)
7234}this.markChange(this.name=="stylesheet")
7235},onMouseDown:function(event){var offset=event.clientX-this.panelNode.parentNode.offsetLeft;
7236if(!isLeftClick(event)||offset>20){return
7237}var target=event.target||event.srcElement;
7238if(hasClass(target,"textEditor")){return
7239}var row=getAncestorByClass(target,"cssProp");
7240if(row&&hasClass(row,"editGroup")){this.disablePropertyRow(row);
7241cancelEvent(event)
7242}},onDoubleClick:function(event){var offset=event.clientX-this.panelNode.parentNode.offsetLeft;
7243if(!isLeftClick(event)||offset<=20){return
7244}var target=event.target||event.srcElement;
7245if(hasClass(target,"textEditorInner")){return
7246}var row=getAncestorByClass(target,"cssRule");
7247if(row&&!getAncestorByClass(target,"cssPropName")&&!getAncestorByClass(target,"cssPropValue")){this.insertPropertyRow(row);
7248cancelEvent(event)
7249}},name:"stylesheet",title:"CSS",parentPanel:null,searchable:true,dependents:["css","stylesheet","dom","domSide","layout"],options:{hasToolButtons:true},create:function(){Firebug.Panel.create.apply(this,arguments);
7250this.onMouseDown=bind(this.onMouseDown,this);
7251this.onDoubleClick=bind(this.onDoubleClick,this);
7252if(this.name=="stylesheet"){this.onChangeSelect=bind(this.onChangeSelect,this);
7253var doc=Firebug.browser.document;
7254var selectNode=this.selectNode=createElement("select");
7255CssAnalyzer.processAllStyleSheets(doc,function(doc,styleSheet){var key=StyleSheetCache.key(styleSheet);
7256var fileName=getFileName(styleSheet.href)||getFileName(doc.location.href);
7257var option=createElement("option",{value:key});
7258option.appendChild(Firebug.chrome.document.createTextNode(fileName));
7259selectNode.appendChild(option)
7260});
7261this.toolButtonsNode.appendChild(selectNode)
7262}},onChangeSelect:function(event){event=event||window.event;
7263var target=event.srcElement||event.currentTarget;
7264var key=target.value;
7265var styleSheet=StyleSheetCache.get(key);
7266this.updateLocation(styleSheet)
7267},initialize:function(){Firebug.Panel.initialize.apply(this,arguments);
7268this.context=Firebug.chrome;
7269this.document=Firebug.chrome.document;
7270this.initializeNode();
7271if(this.name=="stylesheet"){var styleSheets=Firebug.browser.document.styleSheets;
7272if(styleSheets.length>0){addEvent(this.selectNode,"change",this.onChangeSelect);
7273this.updateLocation(styleSheets[0])
7274}}},shutdown:function(){Firebug.Editor.stopEditing();
7275if(this.name=="stylesheet"){removeEvent(this.selectNode,"change",this.onChangeSelect)
7276}this.destroyNode();
7277Firebug.Panel.shutdown.apply(this,arguments)
7278},destroy:function(state){Firebug.Panel.destroy.apply(this,arguments)
7279},initializeNode:function(oldPanelNode){addEvent(this.panelNode,"mousedown",this.onMouseDown);
7280addEvent(this.panelNode,"dblclick",this.onDoubleClick)
7281},destroyNode:function(){removeEvent(this.panelNode,"mousedown",this.onMouseDown);
7282removeEvent(this.panelNode,"dblclick",this.onDoubleClick)
7283},ishow:function(state){Firebug.Inspector.stopInspecting(true);
7284this.showToolbarButtons("fbCSSButtons",true);
7285if(this.context.loaded&&!this.location){restoreObjects(this,state);
7286if(!this.location){this.location=this.getDefaultLocation()
7287}if(state&&state.scrollTop){this.panelNode.scrollTop=state.scrollTop
7288}}},ihide:function(){this.showToolbarButtons("fbCSSButtons",false);
7289this.lastScrollTop=this.panelNode.scrollTop
7290},supportsObject:function(object){if(object instanceof CSSStyleSheet){return 1
7291}else{if(object instanceof CSSStyleRule){return 2
7292}else{if(object instanceof CSSStyleDeclaration){return 2
7293}else{if(object instanceof SourceLink&&object.type=="css"&&reCSS.test(object.href)){return 2
7294}else{return 0
7295}}}}},updateLocation:function(styleSheet){if(!styleSheet){return
7296}if(styleSheet.editStyleSheet){styleSheet=styleSheet.editStyleSheet.sheet
7297}if(styleSheet.restricted){FirebugReps.Warning.tag.replace({object:"AccessRestricted"},this.panelNode);
7298CssAnalyzer.externalStyleSheetWarning.tag.append({object:"The stylesheet could not be loaded due to access restrictions. ",link:"more...",href:"http://getfirebug.com/wiki/index.php/Firebug_Lite_FAQ#I_keep_seeing_.22Access_to_restricted_URI_denied.22"},this.panelNode);
7299return
7300}var rules=this.getStyleSheetRules(this.context,styleSheet);
7301var result;
7302if(rules.length){result=this.template.tag.replace({rules:rules},this.panelNode)
7303}else{result=FirebugReps.Warning.tag.replace({object:"EmptyStyleSheet"},this.panelNode)
7304}},updateSelection:function(object){this.selection=null;
7305if(object instanceof CSSStyleDeclaration){object=object.parentRule
7306}if(object instanceof CSSStyleRule){this.navigate(object.parentStyleSheet);
7307this.highlightRule(object)
7308}else{if(object instanceof CSSStyleSheet){this.navigate(object)
7309}else{if(object instanceof SourceLink){try{var sourceLink=object;
7310var sourceFile=getSourceFileByHref(sourceLink.href,this.context);
7311if(sourceFile){clearNode(this.panelNode);
7312this.showSourceFile(sourceFile);
7313var lineNo=object.line;
7314if(lineNo){this.scrollToLine(lineNo,this.jumpHighlightFactory(lineNo,this.context))
7315}}else{var stylesheet=getStyleSheetByHref(sourceLink.href,this.context);
7316if(stylesheet){this.navigate(stylesheet)
7317}else{if(FBTrace.DBG_CSS){FBTrace.sysout("css.updateSelection no sourceFile for "+sourceLink.href,sourceLink)
7318}}}}catch(exc){if(FBTrace.DBG_CSS){FBTrace.sysout("css.upDateSelection FAILS "+exc,exc)
7319}}}}}},updateOption:function(name,value){if(name=="expandShorthandProps"){this.refresh()
7320}},getLocationList:function(){var styleSheets=getAllStyleSheets(this.context);
7321return styleSheets
7322},getOptionsMenuItems:function(){return[{label:"Expand Shorthand Properties",type:"checkbox",checked:Firebug.expandShorthandProps,command:bindFixed(Firebug.togglePref,Firebug,"expandShorthandProps")},"-",{label:"Refresh",command:bind(this.refresh,this)}]
7323},getContextMenuItems:function(style,target){var items=[];
7324if(this.infoTipType=="color"){items.push({label:"CopyColor",command:bindFixed(copyToClipboard,FBL,this.infoTipObject)})
7325}else{if(this.infoTipType=="image"){items.push({label:"CopyImageLocation",command:bindFixed(copyToClipboard,FBL,this.infoTipObject)},{label:"OpenImageInNewTab",command:bindFixed(openNewTab,FBL,this.infoTipObject)})
7326}}if(isElement(this.selection)){items.push({label:"EditStyle",command:bindFixed(this.editElementStyle,this)})
7327}else{if(!isSystemStyleSheet(this.selection)){items.push({label:"NewRule",command:bindFixed(this.insertRule,this,target)})
7328}}var cssRule=getAncestorByClass(target,"cssRule");
7329if(cssRule&&hasClass(cssRule,"cssEditableRule")){items.push("-",{label:"NewProp",command:bindFixed(this.insertPropertyRow,this,target)});
7330var propRow=getAncestorByClass(target,"cssProp");
7331if(propRow){var propName=getChildByClass(propRow,"cssPropName")[textContent];
7332var isDisabled=hasClass(propRow,"disabledStyle");
7333items.push({label:$STRF("EditProp",[propName]),nol10n:true,command:bindFixed(this.editPropertyRow,this,propRow)},{label:$STRF("DeleteProp",[propName]),nol10n:true,command:bindFixed(this.deletePropertyRow,this,propRow)},{label:$STRF("DisableProp",[propName]),nol10n:true,type:"checkbox",checked:isDisabled,command:bindFixed(this.disablePropertyRow,this,propRow)})
7334}}items.push("-",{label:"Refresh",command:bind(this.refresh,this)});
7335return items
7336},browseObject:function(object){if(this.infoTipType=="image"){openNewTab(this.infoTipObject);
7337return true
7338}},showInfoTip:function(infoTip,target,x,y){var propValue=getAncestorByClass(target,"cssPropValue");
7339if(propValue){var offset=getClientOffset(propValue);
7340var offsetX=x-offset.x;
7341var text=propValue[textContent];
7342var charWidth=propValue.offsetWidth/text.length;
7343var charOffset=Math.floor(offsetX/charWidth);
7344var cssValue=parseCSSValue(text,charOffset);
7345if(cssValue){if(cssValue.value==this.infoTipValue){return true
7346}this.infoTipValue=cssValue.value;
7347if(cssValue.type=="rgb"||(!cssValue.type&&isColorKeyword(cssValue.value))){this.infoTipType="color";
7348this.infoTipObject=cssValue.value;
7349return Firebug.InfoTip.populateColorInfoTip(infoTip,cssValue.value)
7350}else{if(cssValue.type=="url"){var propNameNode=getElementByClass(target.parentNode,"cssPropName");
7351if(propNameNode&&isImageRule(propNameNode[textContent])){var rule=Firebug.getRepObject(target);
7352var baseURL=this.getStylesheetURL(rule);
7353var relURL=parseURLValue(cssValue.value);
7354var absURL=isDataURL(relURL)?relURL:absoluteURL(relURL,baseURL);
7355var repeat=parseRepeatValue(text);
7356this.infoTipType="image";
7357this.infoTipObject=absURL;
7358return Firebug.InfoTip.populateImageInfoTip(infoTip,absURL,repeat)
7359}}}}}delete this.infoTipType;
7360delete this.infoTipValue;
7361delete this.infoTipObject
7362},getEditor:function(target,value){if(target==this.panelNode||hasClass(target,"cssSelector")||hasClass(target,"cssRule")||hasClass(target,"cssSheet")){if(!this.ruleEditor){this.ruleEditor=new CSSRuleEditor(this.document)
7363}return this.ruleEditor
7364}else{if(!this.editor){this.editor=new CSSEditor(this.document)
7365}return this.editor
7366}},getDefaultLocation:function(){try{var styleSheets=this.context.window.document.styleSheets;
7367if(styleSheets.length){var sheet=styleSheets[0];
7368return(Firebug.filterSystemURLs&&isSystemURL(getURLForStyleSheet(sheet)))?null:sheet
7369}}catch(exc){if(FBTrace.DBG_LOCATIONS){FBTrace.sysout("css.getDefaultLocation FAILS "+exc,exc)
7370}}},getObjectDescription:function(styleSheet){var url=getURLForStyleSheet(styleSheet);
7371var instance=getInstanceForStyleSheet(styleSheet);
7372var baseDescription=splitURLBase(url);
7373if(instance){baseDescription.name=baseDescription.name+" #"+(instance+1)
7374}return baseDescription
7375},search:function(text,reverse){var curDoc=this.searchCurrentDoc(!Firebug.searchGlobal,text,reverse);
7376if(!curDoc&&Firebug.searchGlobal){return this.searchOtherDocs(text,reverse)
7377}return curDoc
7378},searchOtherDocs:function(text,reverse){var scanRE=Firebug.Search.getTestingRegex(text);
7379function scanDoc(styleSheet){for(var i=0;
7380i<styleSheet.cssRules.length;
7381i++){if(scanRE.test(styleSheet.cssRules[i].cssText)){return true
7382}}}if(this.navigateToNextDocument(scanDoc,reverse)){return this.searchCurrentDoc(true,text,reverse)
7383}},searchCurrentDoc:function(wrapSearch,text,reverse){if(!text){delete this.currentSearch;
7384return false
7385}var row;
7386if(this.currentSearch&&text==this.currentSearch.text){row=this.currentSearch.findNext(wrapSearch,false,reverse,Firebug.Search.isCaseSensitive(text))
7387}else{if(this.editing){this.currentSearch=new TextSearch(this.stylesheetEditor.box);
7388row=this.currentSearch.find(text,reverse,Firebug.Search.isCaseSensitive(text));
7389if(row){var sel=this.document.defaultView.getSelection();
7390sel.removeAllRanges();
7391sel.addRange(this.currentSearch.range);
7392scrollSelectionIntoView(this);
7393return true
7394}else{return false
7395}}else{function findRow(node){return node.nodeType==1?node:node.parentNode
7396}this.currentSearch=new TextSearch(this.panelNode,findRow);
7397row=this.currentSearch.find(text,reverse,Firebug.Search.isCaseSensitive(text))
7398}}if(row){this.document.defaultView.getSelection().selectAllChildren(row);
7399scrollIntoCenterView(row,this.panelNode);
7400dispatch([Firebug.A11yModel],"onCSSSearchMatchFound",[this,text,row]);
7401return true
7402}else{dispatch([Firebug.A11yModel],"onCSSSearchMatchFound",[this,text,null]);
7403return false
7404}},getSearchOptionsMenuItems:function(){return[Firebug.Search.searchOptionMenu("search.Case_Sensitive","searchCaseSensitive"),Firebug.Search.searchOptionMenu("search.Multiple_Files","searchGlobal")]
7405}});
7406function CSSElementPanel(){}CSSElementPanel.prototype=extend(Firebug.CSSStyleSheetPanel.prototype,{template:domplate({cascadedTag:DIV({"class":"a11yCSSView",role:"presentation"},DIV({role:"list","aria-label":$STR("aria.labels.style rules")},FOR("rule","$rules",TAG("$ruleTag",{rule:"$rule"}))),DIV({role:"list","aria-label":$STR("aria.labels.inherited style rules")},FOR("section","$inherited",H1({"class":"cssInheritHeader groupHeader focusRow",role:"listitem"},SPAN({"class":"cssInheritLabel"},"$inheritLabel"),TAG(FirebugReps.Element.shortTag,{object:"$section.element"})),DIV({role:"group"},FOR("rule","$section.rules",TAG("$ruleTag",{rule:"$rule"})))))),ruleTag:isIE?DIV({"class":"cssElementRuleContainer"},TAG(FirebugReps.SourceLink.tag,{object:"$rule.sourceLink"}),TAG(CSSStyleRuleTag.tag,{rule:"$rule"})):DIV({"class":"cssElementRuleContainer"},TAG(CSSStyleRuleTag.tag,{rule:"$rule"}),TAG(FirebugReps.SourceLink.tag,{object:"$rule.sourceLink"}))}),updateCascadeView:function(element){var rules=[],sections=[],usedProps={};
7407this.getInheritedRules(element,sections,usedProps);
7408this.getElementRules(element,rules,usedProps);
7409if(rules.length||sections.length){var inheritLabel="Inherited from";
7410var result=this.template.cascadedTag.replace({rules:rules,inherited:sections,inheritLabel:inheritLabel},this.panelNode)
7411}else{var result=FirebugReps.Warning.tag.replace({object:"EmptyElementCSS"},this.panelNode)
7412}if(CssAnalyzer.hasExternalStyleSheet()){CssAnalyzer.externalStyleSheetWarning.tag.append({object:"The results here may be inaccurate because some stylesheets could not be loaded due to access restrictions. ",link:"more...",href:"http://getfirebug.com/wiki/index.php/Firebug_Lite_FAQ#I_keep_seeing_.22This_element_has_no_style_rules.22"},this.panelNode)
7413}},getStylesheetURL:function(rule){if(rule&&rule.parentStyleSheet&&rule.parentStyleSheet.href){return rule.parentStyleSheet.href
7414}else{return this.selection.ownerDocument.location.href
7415}},getInheritedRules:function(element,sections,usedProps){var parent=element.parentNode;
7416if(parent&&parent.nodeType==1){this.getInheritedRules(parent,sections,usedProps);
7417var rules=[];
7418this.getElementRules(parent,rules,usedProps,true);
7419if(rules.length){sections.splice(0,0,{element:parent,rules:rules})
7420}}},getElementRules:function(element,rules,usedProps,inheritMode){var inspectedRules,displayedRules={};
7421inspectedRules=CssAnalyzer.getElementCSSRules(element);
7422if(inspectedRules){for(var i=0,length=inspectedRules.length;
7423i<length;
7424++i){var ruleId=inspectedRules[i];
7425var ruleData=CssAnalyzer.getRuleData(ruleId);
7426var rule=ruleData.rule;
7427var ssid=ruleData.styleSheetId;
7428var parentStyleSheet=StyleSheetCache.get(ssid);
7429var href=parentStyleSheet.externalURL?parentStyleSheet.externalURL:parentStyleSheet.href;
7430var instance=null;
7431var isSystemSheet=false;
7432if(!Firebug.showUserAgentCSS&&isSystemSheet){continue
7433}if(!href){href=element.ownerDocument.location.href
7434}var props=this.getRuleProperties(this.context,rule,inheritMode);
7435if(inheritMode&&!props.length){continue
7436}var line=ruleData.lineNo;
7437var ruleId=rule.selectorText+"/"+line;
7438var sourceLink=new SourceLink(href,line,"css",rule,instance);
7439this.markOverridenProps(props,usedProps,inheritMode);
7440rules.splice(0,0,{rule:rule,id:ruleId,selector:ruleData.selector,sourceLink:sourceLink,props:props,inherited:inheritMode,isSystemSheet:isSystemSheet})
7441}}if(element.style){this.getStyleProperties(element,rules,usedProps,inheritMode)
7442}if(FBTrace.DBG_CSS){FBTrace.sysout("getElementRules "+rules.length+" rules for "+getElementXPath(element),rules)
7443}},markOverridenProps:function(props,usedProps,inheritMode){for(var i=0;
7444i<props.length;
7445++i){var prop=props[i];
7446if(usedProps.hasOwnProperty(prop.name)){var deadProps=usedProps[prop.name];
7447for(var j=0;
7448j<deadProps.length;
7449++j){var deadProp=deadProps[j];
7450if(!deadProp.disabled&&!deadProp.wasInherited&&deadProp.important&&!prop.important){prop.overridden=true
7451}else{if(!prop.disabled){deadProp.overridden=true
7452}}}}else{usedProps[prop.name]=[]
7453}prop.wasInherited=inheritMode?true:false;
7454usedProps[prop.name].push(prop)
7455}},getStyleProperties:function(element,rules,usedProps,inheritMode){var props=this.parseCSSProps(element.style,inheritMode);
7456this.addOldProperties(this.context,getElementXPath(element),inheritMode,props);
7457sortProperties(props);
7458this.markOverridenProps(props,usedProps,inheritMode);
7459if(props.length){rules.splice(0,0,{rule:element,id:getElementXPath(element),selector:"element.style",props:props,inherited:inheritMode})
7460}},name:"css",title:"Style",parentPanel:"HTML",order:0,initialize:function(){this.context=Firebug.chrome;
7461this.document=Firebug.chrome.document;
7462Firebug.CSSStyleSheetPanel.prototype.initialize.apply(this,arguments);
7463var selection=ElementCache.get(Firebug.context.persistedState.selectedHTMLElementId);
7464if(selection){this.select(selection,true)
7465}},ishow:function(state){},watchWindow:function(win){if(domUtils){var doc=win.document
7466}},unwatchWindow:function(win){var doc=win.document;
7467if(isAncestor(this.stateChangeEl,doc)){this.removeStateChangeHandlers()
7468}},supportsObject:function(object){return object instanceof Element?1:0
7469},updateView:function(element){this.updateCascadeView(element);
7470if(domUtils){this.contentState=safeGetContentState(element);
7471this.addStateChangeHandlers(element)
7472}},updateSelection:function(element){if(!instanceOf(element,"Element")){return
7473}if(sothinkInstalled){FirebugReps.Warning.tag.replace({object:"SothinkWarning"},this.panelNode);
7474return
7475}if(!element){return
7476}this.updateView(element)
7477},updateOption:function(name,value){if(name=="showUserAgentCSS"||name=="expandShorthandProps"){this.refresh()
7478}},getOptionsMenuItems:function(){var ret=[{label:"Show User Agent CSS",type:"checkbox",checked:Firebug.showUserAgentCSS,command:bindFixed(Firebug.togglePref,Firebug,"showUserAgentCSS")},{label:"Expand Shorthand Properties",type:"checkbox",checked:Firebug.expandShorthandProps,command:bindFixed(Firebug.togglePref,Firebug,"expandShorthandProps")}];
7479if(domUtils&&this.selection){var state=safeGetContentState(this.selection);
7480ret.push("-");
7481ret.push({label:":active",type:"checkbox",checked:state&STATE_ACTIVE,command:bindFixed(this.updateContentState,this,STATE_ACTIVE,state&STATE_ACTIVE)});
7482ret.push({label:":hover",type:"checkbox",checked:state&STATE_HOVER,command:bindFixed(this.updateContentState,this,STATE_HOVER,state&STATE_HOVER)})
7483}return ret
7484},updateContentState:function(state,remove){domUtils.setContentState(remove?this.selection.ownerDocument.documentElement:this.selection,state);
7485this.refresh()
7486},addStateChangeHandlers:function(el){this.removeStateChangeHandlers();
7487this.stateChangeEl=el
7488},removeStateChangeHandlers:function(){var sel=this.stateChangeEl;
7489if(sel){}},contentStateCheck:function(state){if(!state||this.contentState&state){var timeoutRunner=bindFixed(function(){var newState=safeGetContentState(this.selection);
7490if(newState!=this.contentState){this.context.invalidatePanels(this.name)
7491}},this);
7492setTimeout(timeoutRunner,0)
7493}}});
7494function safeGetContentState(selection){try{return domUtils.getContentState(selection)
7495}catch(e){if(FBTrace.DBG_ERRORS){FBTrace.sysout("css.safeGetContentState; EXCEPTION",e)
7496}}}function CSSComputedElementPanel(){}CSSComputedElementPanel.prototype=extend(CSSElementPanel.prototype,{template:domplate({computedTag:DIV({"class":"a11yCSSView",role:"list","aria-label":$STR("aria.labels.computed styles")},FOR("group","$groups",H1({"class":"cssInheritHeader groupHeader focusRow",role:"listitem"},SPAN({"class":"cssInheritLabel"},"$group.title")),TABLE({width:"100%",role:"group"},TBODY({role:"presentation"},FOR("prop","$group.props",TR({"class":"focusRow computedStyleRow",role:"listitem"},TD({"class":"stylePropName",role:"presentation"},"$prop.name"),TD({"class":"stylePropValue",role:"presentation"},"$prop.value")))))))}),updateComputedView:function(element){var win=isIE?element.ownerDocument.parentWindow:element.ownerDocument.defaultView;
7497var style=isIE?element.currentStyle:win.getComputedStyle(element,"");
7498var groups=[];
7499for(var groupName in styleGroups){var title=styleGroupTitles[groupName];
7500var group={title:title,props:[]};
7501groups.push(group);
7502var props=styleGroups[groupName];
7503for(var i=0;
7504i<props.length;
7505++i){var propName=props[i];
7506var propValue=style.getPropertyValue?style.getPropertyValue(propName):""+style[toCamelCase(propName)];
7507if(propValue===undefined||propValue===null){continue
7508}propValue=stripUnits(rgbToHex(propValue));
7509if(propValue){group.props.push({name:propName,value:propValue})
7510}}}var result=this.template.computedTag.replace({groups:groups},this.panelNode)
7511},name:"computed",title:"Computed",parentPanel:"HTML",order:1,updateView:function(element){this.updateComputedView(element)
7512},getOptionsMenuItems:function(){return[{label:"Refresh",command:bind(this.refresh,this)}]
7513}});
7514function CSSEditor(doc){this.initializeInline(doc)
7515}CSSEditor.prototype=domplate(Firebug.InlineEditor.prototype,{insertNewRow:function(target,insertWhere){var rule=Firebug.getRepObject(target);
7516var emptyProp={name:"",value:"",important:""};
7517if(insertWhere=="before"){return CSSPropTag.tag.insertBefore({prop:emptyProp,rule:rule},target)
7518}else{return CSSPropTag.tag.insertAfter({prop:emptyProp,rule:rule},target)
7519}},saveEdit:function(target,value,previousValue){if(!value){return
7520}target.innerHTML=escapeForCss(value);
7521var row=getAncestorByClass(target,"cssProp");
7522if(hasClass(row,"disabledStyle")){toggleClass(row,"disabledStyle")
7523}var rule=Firebug.getRepObject(target);
7524if(hasClass(target,"cssPropName")){if(value&&previousValue!=value){var propValue=getChildByClass(row,"cssPropValue")[textContent];
7525var parsedValue=parsePriority(propValue);
7526if(propValue&&propValue!="undefined"){if(FBTrace.DBG_CSS){FBTrace.sysout("CSSEditor.saveEdit : "+previousValue+"->"+value+" = "+propValue+"\n")
7527}if(previousValue){Firebug.CSSModule.removeProperty(rule,previousValue)
7528}Firebug.CSSModule.setProperty(rule,value,parsedValue.value,parsedValue.priority)
7529}}else{if(!value){Firebug.CSSModule.removeProperty(rule,previousValue)
7530}}}else{if(getAncestorByClass(target,"cssPropValue")){var propName=getChildByClass(row,"cssPropName")[textContent];
7531var propValue=getChildByClass(row,"cssPropValue")[textContent];
7532if(FBTrace.DBG_CSS){FBTrace.sysout("CSSEditor.saveEdit propName=propValue: "+propName+" = "+propValue+"\n")
7533}if(value&&value!="null"){var parsedValue=parsePriority(value);
7534Firebug.CSSModule.setProperty(rule,propName,parsedValue.value,parsedValue.priority)
7535}else{if(previousValue&&previousValue!="null"){Firebug.CSSModule.removeProperty(rule,propName)
7536}}}}this.panel.markChange(this.panel.name=="stylesheet")
7537},advanceToNext:function(target,charCode){if(charCode==58&&hasClass(target,"cssPropName")){return true
7538}},getAutoCompleteRange:function(value,offset){if(hasClass(this.target,"cssPropName")){return{start:0,end:value.length-1}
7539}else{return parseCSSValue(value,offset)
7540}},getAutoCompleteList:function(preExpr,expr,postExpr){if(hasClass(this.target,"cssPropName")){return getCSSPropertyNames()
7541}else{var row=getAncestorByClass(this.target,"cssProp");
7542var propName=getChildByClass(row,"cssPropName")[textContent];
7543return getCSSKeywordsByProperty(propName)
7544}}});
7545function CSSRuleEditor(doc){this.initializeInline(doc);
7546this.completeAsYouType=false
7547}CSSRuleEditor.uniquifier=0;
7548CSSRuleEditor.prototype=domplate(Firebug.InlineEditor.prototype,{insertNewRow:function(target,insertWhere){var emptyRule={selector:"",id:"",props:[],isSelectorEditable:true};
7549if(insertWhere=="before"){return CSSStyleRuleTag.tag.insertBefore({rule:emptyRule},target)
7550}else{return CSSStyleRuleTag.tag.insertAfter({rule:emptyRule},target)
7551}},saveEdit:function(target,value,previousValue){if(FBTrace.DBG_CSS){FBTrace.sysout("CSSRuleEditor.saveEdit: '"+value+"'  '"+previousValue+"'",target)
7552}target.innerHTML=escapeForCss(value);
7553if(value===previousValue){return
7554}var row=getAncestorByClass(target,"cssRule");
7555var styleSheet=this.panel.location;
7556styleSheet=styleSheet.editStyleSheet?styleSheet.editStyleSheet.sheet:styleSheet;
7557var cssRules=styleSheet.cssRules;
7558var rule=Firebug.getRepObject(target),oldRule=rule;
7559var ruleIndex=cssRules.length;
7560if(rule||Firebug.getRepObject(row.nextSibling)){var searchRule=rule||Firebug.getRepObject(row.nextSibling);
7561for(ruleIndex=0;
7562ruleIndex<cssRules.length&&searchRule!=cssRules[ruleIndex];
7563ruleIndex++){}}if(oldRule){Firebug.CSSModule.deleteRule(styleSheet,ruleIndex)
7564}if(value){var cssText=[value,"{"];
7565var props=row.getElementsByClassName("cssProp");
7566for(var i=0;
7567i<props.length;
7568i++){var propEl=props[i];
7569if(!hasClass(propEl,"disabledStyle")){cssText.push(getChildByClass(propEl,"cssPropName")[textContent]);
7570cssText.push(":");
7571cssText.push(getChildByClass(propEl,"cssPropValue")[textContent]);
7572cssText.push(";")
7573}}cssText.push("}");
7574cssText=cssText.join("");
7575try{var insertLoc=Firebug.CSSModule.insertRule(styleSheet,cssText,ruleIndex);
7576rule=cssRules[insertLoc];
7577ruleIndex++
7578}catch(err){if(FBTrace.DBG_CSS||FBTrace.DBG_ERRORS){FBTrace.sysout("CSS Insert Error: "+err,err)
7579}target.innerHTML=escapeForCss(previousValue);
7580row.repObject=undefined;
7581return
7582}}else{rule=undefined
7583}row.repObject=rule;
7584if(!oldRule){var ruleId="new/"+value+"/"+(++CSSRuleEditor.uniquifier);
7585row.setAttribute("ruleId",ruleId)
7586}this.panel.markChange(this.panel.name=="stylesheet")
7587}});
7588function StyleSheetEditor(doc){this.box=this.tag.replace({},doc,this);
7589this.input=this.box.firstChild
7590}StyleSheetEditor.prototype=domplate(Firebug.BaseEditor,{multiLine:true,tag:DIV(TEXTAREA({"class":"styleSheetEditor fullPanelEditor",oninput:"$onInput"})),getValue:function(){return this.input.value
7591},setValue:function(value){return this.input.value=value
7592},show:function(target,panel,value,textSize,targetSize){this.target=target;
7593this.panel=panel;
7594this.panel.panelNode.appendChild(this.box);
7595this.input.value=value;
7596this.input.focus();
7597var command=Firebug.chrome.$("cmd_toggleCSSEditing");
7598command.setAttribute("checked",true)
7599},hide:function(){var command=Firebug.chrome.$("cmd_toggleCSSEditing");
7600command.setAttribute("checked",false);
7601if(this.box.parentNode==this.panel.panelNode){this.panel.panelNode.removeChild(this.box)
7602}delete this.target;
7603delete this.panel;
7604delete this.styleSheet
7605},saveEdit:function(target,value,previousValue){Firebug.CSSModule.freeEdit(this.styleSheet,value)
7606},endEditing:function(){this.panel.refresh();
7607return true
7608},onInput:function(){Firebug.Editor.update()
7609},scrollToLine:function(line,offset){this.startMeasuring(this.input);
7610var lineHeight=this.measureText().height;
7611this.stopMeasuring();
7612this.input.scrollTop=(line*lineHeight)+offset
7613}});
7614var rgbToHex=function rgbToHex(value){return value.replace(/\brgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)/gi,rgbToHexReplacer)
7615};
7616var rgbToHexReplacer=function(_,r,g,b){return"#"+((1<<24)+(r<<16)+(g<<8)+(b<<0)).toString(16).substr(-6).toUpperCase()
7617};
7618var stripUnits=function stripUnits(value){return value.replace(/(url\(.*?\)|[^0]\S*\s*)|0(%|em|ex|px|in|cm|mm|pt|pc)(\s|$)/gi,stripUnitsReplacer)
7619};
7620var stripUnitsReplacer=function(_,skip,remove,whitespace){return skip||("0"+whitespace)
7621};
7622function parsePriority(value){var rePriority=/(.*?)\s*(!important)?$/;
7623var m=rePriority.exec(value);
7624var propValue=m?m[1]:"";
7625var priority=m&&m[2]?"important":"";
7626return{value:propValue,priority:priority}
7627}function parseURLValue(value){var m=reURL.exec(value);
7628return m?m[1]:""
7629}function parseRepeatValue(value){var m=reRepeat.exec(value);
7630return m?m[0]:""
7631}function parseCSSValue(value,offset){var start=0;
7632var m;
7633while(1){m=reSplitCSS.exec(value);
7634if(m&&m.index+m[0].length<offset){value=value.substr(m.index+m[0].length);
7635start+=m.index+m[0].length;
7636offset-=m.index+m[0].length
7637}else{break
7638}}if(m){var type;
7639if(m[1]){type="url"
7640}else{if(m[2]||m[3]){type="rgb"
7641}else{if(m[4]){type="int"
7642}}}return{value:m[0],start:start+m.index,end:start+m.index+(m[0].length-1),type:type}
7643}}function findPropByName(props,name){for(var i=0;
7644i<props.length;
7645++i){if(props[i].name==name){return i
7646}}}function sortProperties(props){props.sort(function(a,b){return a.name>b.name?1:-1
7647})
7648}function getTopmostRuleLine(panelNode){for(var child=panelNode.firstChild;
7649child;
7650child=child.nextSibling){if(child.offsetTop+child.offsetHeight>panelNode.scrollTop){var rule=child.repObject;
7651if(rule){return{line:domUtils.getRuleLine(rule),offset:panelNode.scrollTop-child.offsetTop}
7652}}}return 0
7653}function getStyleSheetCSS(sheet,context){if(sheet.ownerNode instanceof HTMLStyleElement){return sheet.ownerNode.innerHTML
7654}else{return context.sourceCache.load(sheet.href).join("")
7655}}function getStyleSheetOwnerNode(sheet){for(;
7656sheet&&!sheet.ownerNode;
7657sheet=sheet.parentStyleSheet){}return sheet.ownerNode
7658}function scrollSelectionIntoView(panel){var selCon=getSelectionController(panel);
7659selCon.scrollSelectionIntoView(nsISelectionController.SELECTION_NORMAL,nsISelectionController.SELECTION_FOCUS_REGION,true)
7660}function getSelectionController(panel){var browser=Firebug.chrome.getPanelBrowser(panel);
7661return browser.docShell.QueryInterface(nsIInterfaceRequestor).getInterface(nsISelectionDisplay).QueryInterface(nsISelectionController)
7662}Firebug.registerModule(Firebug.CSSModule);
7663Firebug.registerPanel(Firebug.CSSStyleSheetPanel);
7664Firebug.registerPanel(CSSElementPanel);
7665Firebug.registerPanel(CSSComputedElementPanel)
7666}});
7667FBL.ns(function(){with(FBL){Firebug.Script=extend(Firebug.Module,{getPanel:function(){return Firebug.chrome?Firebug.chrome.getPanel("Script"):null
7668},selectSourceCode:function(index){this.getPanel().selectSourceCode(index)
7669}});
7670Firebug.registerModule(Firebug.Script);
7671function ScriptPanel(){}ScriptPanel.prototype=extend(Firebug.Panel,{name:"Script",title:"Script",selectIndex:0,sourceIndex:-1,options:{hasToolButtons:true},create:function(){Firebug.Panel.create.apply(this,arguments);
7672this.onChangeSelect=bind(this.onChangeSelect,this);
7673var doc=Firebug.browser.document;
7674var scripts=doc.getElementsByTagName("script");
7675var selectNode=this.selectNode=createElement("select");
7676for(var i=0,script;
7677script=scripts[i];
7678i++){if(Firebug.ignoreFirebugElements&&script.getAttribute("firebugIgnore")){continue
7679}var fileName=getFileName(script.src)||getFileName(doc.location.href);
7680var option=createElement("option",{value:i});
7681option.appendChild(Firebug.chrome.document.createTextNode(fileName));
7682selectNode.appendChild(option)
7683}this.toolButtonsNode.appendChild(selectNode)
7684},initialize:function(){this.selectSourceCode(this.selectIndex);
7685Firebug.Panel.initialize.apply(this,arguments);
7686addEvent(this.selectNode,"change",this.onChangeSelect)
7687},shutdown:function(){removeEvent(this.selectNode,"change",this.onChangeSelect);
7688Firebug.Panel.shutdown.apply(this,arguments)
7689},detach:function(oldChrome,newChrome){Firebug.Panel.detach.apply(this,arguments);
7690var oldPanel=oldChrome.getPanel("Script");
7691var index=oldPanel.selectIndex;
7692this.selectNode.selectedIndex=index;
7693this.selectIndex=index;
7694this.sourceIndex=-1
7695},onChangeSelect:function(event){var select=this.selectNode;
7696this.selectIndex=select.selectedIndex;
7697var option=select.options[select.selectedIndex];
7698if(!option){return
7699}var selectedSourceIndex=parseInt(option.value);
7700this.renderSourceCode(selectedSourceIndex)
7701},selectSourceCode:function(index){var select=this.selectNode;
7702select.selectedIndex=index;
7703var option=select.options[index];
7704if(!option){return
7705}var selectedSourceIndex=parseInt(option.value);
7706this.renderSourceCode(selectedSourceIndex)
7707},renderSourceCode:function(index){if(this.sourceIndex!=index){var renderProcess=function renderProcess(src){var html=[],hl=0;
7708src=isIE&&!isExternal?src+"\n":"\n"+src;
7709src=src.replace(/\n\r|\r\n/g,"\n");
7710var match=src.match(/[\n]/g);
7711var lines=match?match.length:0;
7712html[hl++]='<div><div class="sourceBox" style="left:';
7713html[hl++]=35+7*(lines+"").length;
7714html[hl++]='px;"><pre class="sourceCode">';
7715html[hl++]=escapeHTML(src);
7716html[hl++]='</pre></div><div class="lineNo">';
7717for(var l=1,lines;
7718l<=lines;
7719l++){html[hl++]='<div line="';
7720html[hl++]=l;
7721html[hl++]='">';
7722html[hl++]=l;
7723html[hl++]="</div>"
7724}html[hl++]="</div></div>";
7725updatePanel(html)
7726};
7727var updatePanel=function(html){self.panelNode.innerHTML=html.join("");
7728setTimeout(function(){self.synchronizeUI()
7729},0)
7730};
7731var onFailure=function(){FirebugReps.Warning.tag.replace({object:"AccessRestricted"},self.panelNode)
7732};
7733var self=this;
7734var doc=Firebug.browser.document;
7735var script=doc.getElementsByTagName("script")[index];
7736var url=getScriptURL(script);
7737var isExternal=url&&url!=doc.location.href;
7738try{if(Firebug.disableResourceFetching){renderProcess(Firebug.Lite.Proxy.fetchResourceDisabledMessage)
7739}else{if(isExternal){Ajax.request({url:url,onSuccess:renderProcess,onFailure:onFailure})
7740}else{var src=script.innerHTML;
7741renderProcess(src)
7742}}}catch(e){onFailure()
7743}this.sourceIndex=index
7744}}});
7745Firebug.registerPanel(ScriptPanel);
7746var getScriptURL=function getScriptURL(script){var reFile=/([^\/\?#]+)(#.+)?$/;
7747var rePath=/^(.*\/)/;
7748var reProtocol=/^\w+:\/\//;
7749var path=null;
7750var doc=Firebug.browser.document;
7751var file=reFile.exec(script.src);
7752if(file){var fileName=file[1];
7753var fileOptions=file[2];
7754if(reProtocol.test(script.src)){path=rePath.exec(script.src)[1]
7755}else{var r=rePath.exec(script.src);
7756var src=r?r[1]:script.src;
7757var backDir=/^((?:\.\.\/)+)(.*)/.exec(src);
7758var reLastDir=/^(.*\/)[^\/]+\/$/;
7759path=rePath.exec(doc.location.href)[1];
7760if(backDir){var j=backDir[1].length/3;
7761var p;
7762while(j-->0){path=reLastDir.exec(path)[1]
7763}path+=backDir[2]
7764}else{if(src.indexOf("/")!=-1){if(/^\.\/./.test(src)){path+=src.substring(2)
7765}else{if(/^\/./.test(src)){var domain=/^(\w+:\/\/[^\/]+)/.exec(path);
7766path=domain[1]+src
7767}else{path+=src
7768}}}}}}var m=path&&path.match(/([^\/]+)\/$/)||null;
7769if(path&&m){return path+fileName
7770}};
7771var getFileName=function getFileName(path){if(!path){return""
7772}var match=path&&path.match(/[^\/]+(\?.*)?(#.*)?$/);
7773return match&&match[0]||path
7774}
7775}});
7776FBL.ns(function(){with(FBL){var ElementCache=Firebug.Lite.Cache.Element;
7777var insertSliceSize=18;
7778var insertInterval=40;
7779var ignoreVars={__firebug__:1,"eval":1,java:1,sun:1,Packages:1,JavaArray:1,JavaMember:1,JavaObject:1,JavaClass:1,JavaPackage:1,_firebug:1,_FirebugConsole:1,_FirebugCommandLine:1};
7780if(Firebug.ignoreFirebugElements){ignoreVars[Firebug.Lite.Cache.ID]=1
7781}var memberPanelRep=isIE6?{"class":"memberLabel $member.type\\Label",href:"javacript:void(0)"}:{"class":"memberLabel $member.type\\Label"};
7782var RowTag=TR({"class":"memberRow $member.open $member.type\\Row",$hasChildren:"$member.hasChildren",role:"presentation",level:"$member.level"},TD({"class":"memberLabelCell",style:"padding-left: $member.indent\\px",role:"presentation"},A(memberPanelRep,SPAN({},"$member.name"))),TD({"class":"memberValueCell",role:"presentation"},TAG("$member.tag",{object:"$member.value"})));
7783var WatchRowTag=TR({"class":"watchNewRow",level:0},TD({"class":"watchEditCell",colspan:2},DIV({"class":"watchEditBox a11yFocusNoTab",role:"button",tabindex:"0","aria-label":$STR("press enter to add new watch expression")},$STR("NewWatch"))));
7784var SizerRow=TR({role:"presentation"},TD({width:"30%"}),TD({width:"70%"}));
7785var domTableClass=isIElt8?"domTable domTableIE":"domTable";
7786var DirTablePlate=domplate(Firebug.Rep,{tag:TABLE({"class":domTableClass,cellpadding:0,cellspacing:0,onclick:"$onClick",role:"tree"},TBODY({role:"presentation"},SizerRow,FOR("member","$object|memberIterator",RowTag))),watchTag:TABLE({"class":domTableClass,cellpadding:0,cellspacing:0,_toggles:"$toggles",_domPanel:"$domPanel",onclick:"$onClick",role:"tree"},TBODY({role:"presentation"},SizerRow,WatchRowTag)),tableTag:TABLE({"class":domTableClass,cellpadding:0,cellspacing:0,_toggles:"$toggles",_domPanel:"$domPanel",onclick:"$onClick",role:"tree"},TBODY({role:"presentation"},SizerRow)),rowTag:FOR("member","$members",RowTag),memberIterator:function(object,level){return getMembers(object,level)
7787},onClick:function(event){if(!isLeftClick(event)){return
7788}var target=event.target||event.srcElement;
7789var row=getAncestorByClass(target,"memberRow");
7790var label=getAncestorByClass(target,"memberLabel");
7791if(label&&hasClass(row,"hasChildren")){var row=label.parentNode.parentNode;
7792this.toggleRow(row)
7793}else{var object=Firebug.getRepObject(target);
7794if(typeof(object)=="function"){Firebug.chrome.select(object,"script");
7795cancelEvent(event)
7796}else{if(event.detail==2&&!object){var panel=row.parentNode.parentNode.domPanel;
7797if(panel){var rowValue=panel.getRowPropertyValue(row);
7798if(typeof(rowValue)=="boolean"){panel.setPropertyValue(row,!rowValue)
7799}else{panel.editProperty(row)
7800}cancelEvent(event)
7801}}}}return false
7802},toggleRow:function(row){var level=parseInt(row.getAttribute("level"));
7803var toggles=row.parentNode.parentNode.toggles;
7804if(hasClass(row,"opened")){removeClass(row,"opened");
7805if(toggles){var path=getPath(row);
7806for(var i=0;
7807i<path.length;
7808++i){if(i==path.length-1){delete toggles[path[i]]
7809}else{toggles=toggles[path[i]]
7810}}}var rowTag=this.rowTag;
7811var tbody=row.parentNode;
7812setTimeout(function(){for(var firstRow=row.nextSibling;
7813firstRow;
7814firstRow=row.nextSibling){if(parseInt(firstRow.getAttribute("level"))<=level){break
7815}tbody.removeChild(firstRow)
7816}},row.insertTimeout?row.insertTimeout:0)
7817}else{setClass(row,"opened");
7818if(toggles){var path=getPath(row);
7819for(var i=0;
7820i<path.length;
7821++i){var name=path[i];
7822if(toggles.hasOwnProperty(name)){toggles=toggles[name]
7823}else{toggles=toggles[name]={}
7824}}}var value=row.lastChild.firstChild.repObject;
7825var members=getMembers(value,level+1);
7826var rowTag=this.rowTag;
7827var lastRow=row;
7828var delay=0;
7829while(members.length){with({slice:members.splice(0,insertSliceSize),isLast:!members.length}){setTimeout(function(){if(lastRow.parentNode){var result=rowTag.insertRows({members:slice},lastRow);
7830lastRow=result[1]
7831}if(isLast){row.removeAttribute("insertTimeout")
7832}},delay)
7833}delay+=insertInterval
7834}row.insertTimeout=delay
7835}}});
7836Firebug.DOMBasePanel=function(){};
7837Firebug.DOMBasePanel.prototype=extend(Firebug.Panel,{tag:DirTablePlate.tableTag,getRealObject:function(object){if(!object){return object
7838}if(object.wrappedJSObject){return object.wrappedJSObject
7839}return object
7840},rebuild:function(update,scrollTop){var members=getMembers(this.selection);
7841expandMembers(members,this.toggles,0,0);
7842this.showMembers(members,update,scrollTop);
7843if(!this.parentPanel){updateStatusBar(this)
7844}},showMembers:function(members,update,scrollTop){if(this.timeouts){for(var i=0;
7845i<this.timeouts.length;
7846++i){this.context.clearTimeout(this.timeouts[i])
7847}delete this.timeouts
7848}if(!members.length){return this.showEmptyMembers()
7849}var panelNode=this.panelNode;
7850var priorScrollTop=scrollTop==undefined?panelNode.scrollTop:scrollTop;
7851var offscreen=update&&panelNode.firstChild;
7852var dest=offscreen?panelNode.ownerDocument:panelNode;
7853var table=this.tag.replace({domPanel:this,toggles:this.toggles},dest);
7854var tbody=table.lastChild;
7855var rowTag=DirTablePlate.rowTag;
7856var panel=this;
7857var result;
7858var timeouts=[];
7859var delay=0;
7860var renderStart=new Date().getTime();
7861while(members.length){with({slice:members.splice(0,insertSliceSize),isLast:!members.length}){timeouts.push(this.context.setTimeout(function(){if(!tbody.lastChild){return
7862}result=rowTag.insertRows({members:slice},tbody.lastChild);
7863if((panelNode.scrollHeight+panelNode.offsetHeight)>=priorScrollTop){panelNode.scrollTop=priorScrollTop
7864}},delay));
7865delay+=insertInterval
7866}}if(offscreen){timeouts.push(this.context.setTimeout(function(){if(panelNode.firstChild){panelNode.replaceChild(table,panelNode.firstChild)
7867}else{panelNode.appendChild(table)
7868}panelNode.scrollTop=priorScrollTop
7869},delay))
7870}else{timeouts.push(this.context.setTimeout(function(){panelNode.scrollTop=scrollTop==undefined?0:scrollTop
7871},delay))
7872}this.timeouts=timeouts
7873},showEmptyMembers:function(){FirebugReps.Warning.tag.replace({object:"NoMembersWarning"},this.panelNode)
7874},findPathObject:function(object){var pathIndex=-1;
7875for(var i=0;
7876i<this.objectPath.length;
7877++i){if(this.getPathObject(i)===object){return i
7878}}return -1
7879},getPathObject:function(index){var object=this.objectPath[index];
7880if(object instanceof Property){return object.getObject()
7881}else{return object
7882}},getRowObject:function(row){var object=getRowOwnerObject(row);
7883return object?object:this.selection
7884},getRowPropertyValue:function(row){var object=this.getRowObject(row);
7885object=this.getRealObject(object);
7886if(object){var propName=getRowName(row);
7887if(object instanceof jsdIStackFrame){return Firebug.Debugger.evaluate(propName,this.context)
7888}else{return object[propName]
7889}}},onMouseMove:function(event){var target=event.srcElement||event.target;
7890var object=getAncestorByClass(target,"objectLink-element");
7891object=object?object.repObject:null;
7892if(object&&instanceOf(object,"Element")&&object.nodeType==1){if(object!=lastHighlightedObject){Firebug.Inspector.drawBoxModel(object);
7893object=lastHighlightedObject
7894}}else{Firebug.Inspector.hideBoxModel()
7895}},create:function(){this.context=Firebug.browser;
7896this.objectPath=[];
7897this.propertyPath=[];
7898this.viewPath=[];
7899this.pathIndex=-1;
7900this.toggles={};
7901Firebug.Panel.create.apply(this,arguments);
7902this.panelNode.style.padding="0 1px"
7903},initialize:function(){Firebug.Panel.initialize.apply(this,arguments);
7904addEvent(this.panelNode,"mousemove",this.onMouseMove)
7905},shutdown:function(){removeEvent(this.panelNode,"mousemove",this.onMouseMove);
7906Firebug.Panel.shutdown.apply(this,arguments)
7907},ishow:function(state){if(this.context.loaded&&!this.selection){if(!state){this.select(null);
7908return
7909}if(state.viewPath){this.viewPath=state.viewPath
7910}if(state.propertyPath){this.propertyPath=state.propertyPath
7911}var defaultObject=this.getDefaultSelection(this.context);
7912var selectObject=defaultObject;
7913if(state.firstSelection){var restored=state.firstSelection(this.context);
7914if(restored){selectObject=restored;
7915this.objectPath=[defaultObject,restored]
7916}else{this.objectPath=[defaultObject]
7917}}else{this.objectPath=[defaultObject]
7918}if(this.propertyPath.length>1){for(var i=1;
7919i<this.propertyPath.length;
7920++i){var name=this.propertyPath[i];
7921if(!name){continue
7922}var object=selectObject;
7923try{selectObject=object[name]
7924}catch(exc){selectObject=null
7925}if(selectObject){this.objectPath.push(new Property(object,name))
7926}else{this.viewPath.splice(i);
7927this.propertyPath.splice(i);
7928this.objectPath.splice(i);
7929selectObject=this.getPathObject(this.objectPath.length-1);
7930break
7931}}}var selection=state.pathIndex<=this.objectPath.length-1?this.getPathObject(state.pathIndex):this.getPathObject(this.objectPath.length-1);
7932this.select(selection)
7933}},supportsObject:function(object){if(object==null){return 1000
7934}if(typeof(object)=="undefined"){return 1000
7935}else{if(object instanceof SourceLink){return 0
7936}else{return 1
7937}}},refresh:function(){this.rebuild(true)
7938},updateSelection:function(object){var previousIndex=this.pathIndex;
7939var previousView=previousIndex==-1?null:this.viewPath[previousIndex];
7940var newPath=this.pathToAppend;
7941delete this.pathToAppend;
7942var pathIndex=this.findPathObject(object);
7943if(newPath||pathIndex==-1){this.toggles={};
7944if(newPath){if(previousView){if(this.panelNode.scrollTop){previousView.scrollTop=this.panelNode.scrollTop
7945}var start=previousIndex+1,length=this.objectPath.length-start;
7946this.objectPath.splice(start,length);
7947this.propertyPath.splice(start,length);
7948this.viewPath.splice(start,length)
7949}var value=this.getPathObject(previousIndex);
7950if(!value){if(FBTrace.DBG_ERRORS){FBTrace.sysout("dom.updateSelection no pathObject for "+previousIndex+"\n")
7951}return
7952}for(var i=0,length=newPath.length;
7953i<length;
7954++i){var name=newPath[i];
7955var object=value;
7956try{value=value[name]
7957}catch(exc){if(FBTrace.DBG_ERRORS){FBTrace.sysout("dom.updateSelection FAILS at path_i="+i+" for name:"+name+"\n")
7958}return
7959}++this.pathIndex;
7960this.objectPath.push(new Property(object,name));
7961this.propertyPath.push(name);
7962this.viewPath.push({toggles:this.toggles,scrollTop:0})
7963}}else{this.toggles={};
7964var win=Firebug.browser.window;
7965if(object===win){this.pathIndex=0;
7966this.objectPath=[win];
7967this.propertyPath=[null];
7968this.viewPath=[{toggles:this.toggles,scrollTop:0}]
7969}else{this.pathIndex=1;
7970this.objectPath=[win,object];
7971this.propertyPath=[null,null];
7972this.viewPath=[{toggles:{},scrollTop:0},{toggles:this.toggles,scrollTop:0}]
7973}}this.panelNode.scrollTop=0;
7974this.rebuild()
7975}else{this.pathIndex=pathIndex;
7976var view=this.viewPath[pathIndex];
7977this.toggles=view.toggles;
7978if(previousView&&this.panelNode.scrollTop){previousView.scrollTop=this.panelNode.scrollTop
7979}this.rebuild(false,view.scrollTop)
7980}},getObjectPath:function(object){return this.objectPath
7981},getDefaultSelection:function(){return Firebug.browser.window
7982}});
7983var updateStatusBar=function(panel){var path=panel.propertyPath;
7984var index=panel.pathIndex;
7985var r=[];
7986for(var i=0,l=path.length;
7987i<l;
7988i++){r.push(i==index?'<a class="fbHover fbButton fbBtnSelected" ':'<a class="fbHover fbButton" ');
7989r.push("pathIndex=");
7990r.push(i);
7991if(isIE6){r.push(' href="javascript:void(0)"')
7992}r.push(">");
7993r.push(i==0?"window":path[i]||"Object");
7994r.push("</a>");
7995if(i<l-1){r.push('<span class="fbStatusSeparator">&gt;</span>')
7996}}panel.statusBarNode.innerHTML=r.join("")
7997};
7998var DOMMainPanel=Firebug.DOMPanel=function(){};
7999Firebug.DOMPanel.DirTable=DirTablePlate;
8000DOMMainPanel.prototype=extend(Firebug.DOMBasePanel.prototype,{onClickStatusBar:function(event){var target=event.srcElement||event.target;
8001var element=getAncestorByClass(target,"fbHover");
8002if(element){var pathIndex=element.getAttribute("pathIndex");
8003if(pathIndex){this.select(this.getPathObject(pathIndex))
8004}}},selectRow:function(row,target){if(!target){target=row.lastChild.firstChild
8005}if(!target||!target.repObject){return
8006}this.pathToAppend=getPath(row);
8007var valueBox=row.lastChild.firstChild;
8008if(hasClass(valueBox,"objectBox-array")){var arrayIndex=FirebugReps.Arr.getItemIndex(target);
8009this.pathToAppend.push(arrayIndex)
8010}this.select(target.repObject,true)
8011},onClick:function(event){var target=event.srcElement||event.target;
8012var repNode=Firebug.getRepNode(target);
8013if(repNode){var row=getAncestorByClass(target,"memberRow");
8014if(row){this.selectRow(row,repNode);
8015cancelEvent(event)
8016}}},name:"DOM",title:"DOM",searchable:true,statusSeparator:">",options:{hasToolButtons:true,hasStatusBar:true},create:function(){Firebug.DOMBasePanel.prototype.create.apply(this,arguments);
8017this.onClick=bind(this.onClick,this);
8018this.onClickStatusBar=bind(this.onClickStatusBar,this);
8019this.panelNode.style.padding="0 1px"
8020},initialize:function(oldPanelNode){Firebug.DOMBasePanel.prototype.initialize.apply(this,arguments);
8021addEvent(this.panelNode,"click",this.onClick);
8022this.ishow();
8023addEvent(this.statusBarNode,"click",this.onClickStatusBar)
8024},shutdown:function(){removeEvent(this.panelNode,"click",this.onClick);
8025Firebug.DOMBasePanel.prototype.shutdown.apply(this,arguments)
8026}});
8027Firebug.registerPanel(DOMMainPanel);
8028var getMembers=function getMembers(object,level){if(!level){level=0
8029}var ordinals=[],userProps=[],userClasses=[],userFuncs=[],domProps=[],domFuncs=[],domConstants=[];
8030try{var domMembers=getDOMMembers(object);
8031if(object.wrappedJSObject){var insecureObject=object.wrappedJSObject
8032}else{var insecureObject=object
8033}if(isIE&&isFunction(object)){addMember("user",userProps,"prototype",object.prototype,level)
8034}for(var name in insecureObject){if(ignoreVars[name]==1){continue
8035}var val;
8036try{val=insecureObject[name]
8037}catch(exc){if(FBTrace.DBG_ERRORS&&FBTrace.DBG_DOM){FBTrace.sysout("dom.getMembers cannot access "+name,exc)
8038}}var ordinal=parseInt(name);
8039if(ordinal||ordinal==0){addMember("ordinal",ordinals,name,val,level)
8040}else{if(isFunction(val)){if(isClassFunction(val)&&!(name in domMembers)){addMember("userClass",userClasses,name,val,level)
8041}else{if(name in domMembers){addMember("domFunction",domFuncs,name,val,level,domMembers[name])
8042}else{addMember("userFunction",userFuncs,name,val,level)
8043}}}else{var prefix="";
8044if(name in domMembers&&!(name in domConstantMap)){addMember("dom",domProps,(prefix+name),val,level,domMembers[name])
8045}else{if(name in domConstantMap){addMember("dom",domConstants,(prefix+name),val,level)
8046}else{addMember("user",userProps,(prefix+name),val,level)
8047}}}}}}catch(exc){throw exc;
8048if(FBTrace.DBG_ERRORS&&FBTrace.DBG_DOM){FBTrace.sysout("dom.getMembers FAILS: ",exc)
8049}}function sortName(a,b){return a.name>b.name?1:-1
8050}function sortOrder(a,b){return a.order>b.order?1:-1
8051}var members=[];
8052members.push.apply(members,ordinals);
8053Firebug.showUserProps=true;
8054Firebug.showUserFuncs=true;
8055Firebug.showDOMProps=true;
8056Firebug.showDOMFuncs=true;
8057Firebug.showDOMConstants=true;
8058if(Firebug.showUserProps){userProps.sort(sortName);
8059members.push.apply(members,userProps)
8060}if(Firebug.showUserFuncs){userClasses.sort(sortName);
8061members.push.apply(members,userClasses);
8062userFuncs.sort(sortName);
8063members.push.apply(members,userFuncs)
8064}if(Firebug.showDOMProps){domProps.sort(sortName);
8065members.push.apply(members,domProps)
8066}if(Firebug.showDOMFuncs){domFuncs.sort(sortName);
8067members.push.apply(members,domFuncs)
8068}if(Firebug.showDOMConstants){members.push.apply(members,domConstants)
8069}return members
8070};
8071function expandMembers(members,toggles,offset,level){var expanded=0;
8072for(var i=offset;
8073i<members.length;
8074++i){var member=members[i];
8075if(member.level>level){break
8076}if(toggles.hasOwnProperty(member.name)){member.open="opened";
8077var newMembers=getMembers(member.value,level+1);
8078var args=[i+1,0];
8079args.push.apply(args,newMembers);
8080members.splice.apply(members,args);
8081expanded+=newMembers.length;
8082i+=newMembers.length+expandMembers(members,toggles[member.name],i+1,level+1)
8083}}return expanded
8084}function isClassFunction(fn){try{for(var name in fn.prototype){return true
8085}}catch(exc){}return false
8086}FBL.ErrorCopy=function(message){this.message=message
8087};
8088var addMember=function addMember(type,props,name,value,level,order){var rep=Firebug.getRep(value);
8089var tag=rep.shortTag?rep.shortTag:rep.tag;
8090var ErrorCopy=function(){};
8091var valueType=typeof(value);
8092var hasChildren=hasProperties(value)&&!(value instanceof ErrorCopy)&&(isFunction(value)||(valueType=="object"&&value!=null)||(valueType=="string"&&value.length>Firebug.stringCropLength));
8093props.push({name:name,value:value,type:type,rowClass:"memberRow-"+type,open:"",order:order,level:level,indent:level*16,hasChildren:hasChildren,tag:tag})
8094};
8095var getWatchRowIndex=function getWatchRowIndex(row){var index=-1;
8096for(;
8097row&&hasClass(row,"watchRow");
8098row=row.previousSibling){++index
8099}return index
8100};
8101var getRowName=function getRowName(row){var node=row.firstChild;
8102return node.textContent?node.textContent:node.innerText
8103};
8104var getRowValue=function getRowValue(row){return row.lastChild.firstChild.repObject
8105};
8106var getRowOwnerObject=function getRowOwnerObject(row){var parentRow=getParentRow(row);
8107if(parentRow){return getRowValue(parentRow)
8108}};
8109var getParentRow=function getParentRow(row){var level=parseInt(row.getAttribute("level"))-1;
8110for(row=row.previousSibling;
8111row;
8112row=row.previousSibling){if(parseInt(row.getAttribute("level"))==level){return row
8113}}};
8114var getPath=function getPath(row){var name=getRowName(row);
8115var path=[name];
8116var level=parseInt(row.getAttribute("level"))-1;
8117for(row=row.previousSibling;
8118row;
8119row=row.previousSibling){if(parseInt(row.getAttribute("level"))==level){var name=getRowName(row);
8120path.splice(0,0,name);
8121--level
8122}}return path
8123};
8124Firebug.DOM=extend(Firebug.Module,{getPanel:function(){return Firebug.chrome?Firebug.chrome.getPanel("DOM"):null
8125}});
8126Firebug.registerModule(Firebug.DOM);
8127var lastHighlightedObject;
8128function DOMSidePanel(){}DOMSidePanel.prototype=extend(Firebug.DOMBasePanel.prototype,{selectRow:function(row,target){if(!target){target=row.lastChild.firstChild
8129}if(!target||!target.repObject){return
8130}this.pathToAppend=getPath(row);
8131var valueBox=row.lastChild.firstChild;
8132if(hasClass(valueBox,"objectBox-array")){var arrayIndex=FirebugReps.Arr.getItemIndex(target);
8133this.pathToAppend.push(arrayIndex)
8134}var object=target.repObject;
8135if(instanceOf(object,"Element")){Firebug.HTML.selectTreeNode(ElementCache(object))
8136}else{Firebug.chrome.selectPanel("DOM");
8137Firebug.chrome.getPanel("DOM").select(object,true)
8138}},onClick:function(event){var target=event.srcElement||event.target;
8139var repNode=Firebug.getRepNode(target);
8140if(repNode){var row=getAncestorByClass(target,"memberRow");
8141if(row){this.selectRow(row,repNode);
8142cancelEvent(event)
8143}}},name:"DOMSidePanel",parentPanel:"HTML",title:"DOM",options:{hasToolButtons:true},isInitialized:false,create:function(){Firebug.DOMBasePanel.prototype.create.apply(this,arguments);
8144this.onClick=bind(this.onClick,this)
8145},initialize:function(){Firebug.DOMBasePanel.prototype.initialize.apply(this,arguments);
8146addEvent(this.panelNode,"click",this.onClick);
8147var selection=ElementCache.get(Firebug.context.persistedState.selectedHTMLElementId);
8148if(selection){this.select(selection,true)
8149}},shutdown:function(){removeEvent(this.panelNode,"click",this.onClick);
8150Firebug.DOMBasePanel.prototype.shutdown.apply(this,arguments)
8151},reattach:function(oldChrome){this.toggles=oldChrome.getPanel("DOMSidePanel").toggles
8152}});
8153Firebug.registerPanel(DOMSidePanel)
8154}});
8155FBL.FBTrace={};
8156(function(){var traceOptions={DBG_TIMESTAMP:1,DBG_INITIALIZE:1,DBG_CHROME:1,DBG_ERRORS:1,DBG_DISPATCH:1,DBG_CSS:1};
8157this.module=null;
8158this.initialize=function(){if(!this.messageQueue){this.messageQueue=[]
8159}for(var name in traceOptions){this[name]=traceOptions[name]
8160}};
8161this.sysout=function(){return this.logFormatted(arguments,"")
8162};
8163this.dumpProperties=function(title,object){return this.logFormatted("dumpProperties() not supported.","warning")
8164};
8165this.dumpStack=function(){return this.logFormatted("dumpStack() not supported.","warning")
8166};
8167this.flush=function(module){this.module=module;
8168var queue=this.messageQueue;
8169this.messageQueue=[];
8170for(var i=0;
8171i<queue.length;
8172++i){this.writeMessage(queue[i][0],queue[i][1],queue[i][2])
8173}};
8174this.getPanel=function(){return this.module?this.module.getPanel():null
8175};
8176this.logFormatted=function(objects,className){var html=this.DBG_TIMESTAMP?[getTimestamp()," | "]:[];
8177var length=objects.length;
8178for(var i=0;
8179i<length;
8180++i){appendText(" ",html);
8181var object=objects[i];
8182if(i==0){html.push("<b>");
8183appendText(object,html);
8184html.push("</b>")
8185}else{appendText(object,html)
8186}}return this.logRow(html,className)
8187};
8188this.logRow=function(message,className){var panel=this.getPanel();
8189if(panel&&panel.panelNode){this.writeMessage(message,className)
8190}else{this.messageQueue.push([message,className])
8191}return this.LOG_COMMAND
8192};
8193this.writeMessage=function(message,className){var container=this.getPanel().containerNode;
8194var isScrolledToBottom=container.scrollTop+container.offsetHeight>=container.scrollHeight;
8195this.writeRow.call(this,message,className);
8196if(isScrolledToBottom){container.scrollTop=container.scrollHeight-container.offsetHeight
8197}};
8198this.appendRow=function(row){var container=this.getPanel().panelNode;
8199container.appendChild(row)
8200};
8201this.writeRow=function(message,className){var row=this.getPanel().panelNode.ownerDocument.createElement("div");
8202row.className="logRow"+(className?" logRow-"+className:"");
8203row.innerHTML=message.join("");
8204this.appendRow(row)
8205};
8206function appendText(object,html){html.push(escapeHTML(objectToString(object)))
8207}function getTimestamp(){var now=new Date();
8208var ms=""+(now.getMilliseconds()/1000).toFixed(3);
8209ms=ms.substr(2);
8210return now.toLocaleTimeString()+"."+ms
8211}var HTMLtoEntity={"<":"&lt;",">":"&gt;","&":"&amp;","'":"&#39;",'"':"&quot;"};
8212function replaceChars(ch){return HTMLtoEntity[ch]
8213}function escapeHTML(value){return(value+"").replace(/[<>&"']/g,replaceChars)
8214}function objectToString(object){try{return object+""
8215}catch(exc){return null
8216}}}).apply(FBL.FBTrace);
8217FBL.ns(function(){with(FBL){if(!Env.Options.enableTrace){return
8218}Firebug.Trace=extend(Firebug.Module,{getPanel:function(){return Firebug.chrome?Firebug.chrome.getPanel("Trace"):null
8219},clear:function(){this.getPanel().panelNode.innerHTML=""
8220}});
8221Firebug.registerModule(Firebug.Trace);
8222function TracePanel(){}TracePanel.prototype=extend(Firebug.Panel,{name:"Trace",title:"Trace",options:{hasToolButtons:true,innerHTMLSync:true},create:function(){Firebug.Panel.create.apply(this,arguments);
8223this.clearButton=new Button({caption:"Clear",title:"Clear FBTrace logs",owner:Firebug.Trace,onClick:Firebug.Trace.clear})
8224},initialize:function(){Firebug.Panel.initialize.apply(this,arguments);
8225this.clearButton.initialize()
8226},shutdown:function(){this.clearButton.shutdown();
8227Firebug.Panel.shutdown.apply(this,arguments)
8228}});
8229Firebug.registerPanel(TracePanel)
8230}});
8231FBL.ns(function(){with(FBL){var modules=[];
8232var panelTypes=[];
8233var panelTypeMap={};
8234var parentPanelMap={};
8235var registerModule=Firebug.registerModule;
8236var registerPanel=Firebug.registerPanel;
8237append(Firebug,{extend:function(fn){if(Firebug.chrome&&Firebug.chrome.addPanel){var namespace=ns(fn);
8238fn.call(namespace,FBL)
8239}else{setTimeout(function(){Firebug.extend(fn)
8240},100)
8241}},registerModule:function(){registerModule.apply(Firebug,arguments);
8242modules.push.apply(modules,arguments);
8243dispatch(modules,"initialize",[]);
8244if(FBTrace.DBG_INITIALIZE){FBTrace.sysout("Firebug.registerModule")
8245}},registerPanel:function(){registerPanel.apply(Firebug,arguments);
8246panelTypes.push.apply(panelTypes,arguments);
8247for(var i=0,panelType;
8248panelType=arguments[i];
8249++i){if(panelType.prototype.name=="Dev"){continue
8250}panelTypeMap[panelType.prototype.name]=arguments[i];
8251var parentPanelName=panelType.prototype.parentPanel;
8252if(parentPanelName){parentPanelMap[parentPanelName]=1
8253}else{var panelName=panelType.prototype.name;
8254var chrome=Firebug.chrome;
8255chrome.addPanel(panelName);
8256var onTabClick=function onTabClick(){chrome.selectPanel(panelName);
8257return false
8258};
8259chrome.addController([chrome.panelMap[panelName].tabNode,"mousedown",onTabClick])
8260}}if(FBTrace.DBG_INITIALIZE){for(var i=0;
8261i<arguments.length;
8262++i){FBTrace.sysout("Firebug.registerPanel",arguments[i].prototype.name)
8263}}}})
8264}});
8265FBL.ns(function(){with(FBL){FirebugChrome.Skin={CSS:'.obscured{left:-999999px !important;}.collapsed{display:none;}[collapsed="true"]{display:none;}#fbCSS{padding:0 !important;}.cssPropDisable{float:left;display:block;width:2em;cursor:default;}.infoTip{z-index:2147483647;position:fixed;padding:2px 3px;border:1px solid #CBE087;background:LightYellow;font-family:Monaco,monospace;color:#000000;display:none;white-space:nowrap;pointer-events:none;}.infoTip[active="true"]{display:block;}.infoTipLoading{width:16px;height:16px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/loading_16.gif) no-repeat;}.infoTipImageBox{font-size:11px;min-width:100px;text-align:center;}.infoTipCaption{font-size:11px;font:Monaco,monospace;}.infoTipLoading > .infoTipImage,.infoTipLoading > .infoTipCaption{display:none;}h1.groupHeader{padding:2px 4px;margin:0 0 4px 0;border-top:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;background:#eee url(https://getfirebug.com/releases/lite/latest/skin/xp/group.gif) repeat-x;font-size:11px;font-weight:bold;_position:relative;}.inlineEditor,.fixedWidthEditor{z-index:2147483647;position:absolute;display:none;}.inlineEditor{margin-left:-6px;margin-top:-3px;}.textEditorInner,.fixedWidthEditor{margin:0 0 0 0 !important;padding:0;border:none !important;font:inherit;text-decoration:inherit;background-color:#FFFFFF;}.fixedWidthEditor{border-top:1px solid #888888 !important;border-bottom:1px solid #888888 !important;}.textEditorInner{position:relative;top:-7px;left:-5px;outline:none;resize:none;}.textEditorInner1{padding-left:11px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.png) repeat-y;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.gif) repeat-y;_overflow:hidden;}.textEditorInner2{position:relative;padding-right:2px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.png) repeat-y 100% 0;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorBorders.gif) repeat-y 100% 0;_position:fixed;}.textEditorTop1{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat 100% 0;margin-left:11px;height:10px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat 100% 0;_overflow:hidden;}.textEditorTop2{position:relative;left:-11px;width:11px;height:10px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat;}.textEditorBottom1{position:relative;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat 100% 100%;margin-left:11px;height:12px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat 100% 100%;}.textEditorBottom2{position:relative;left:-11px;width:11px;height:12px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.png) no-repeat 0 100%;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/textEditorCorners.gif) no-repeat 0 100%;}.panelNode-css{overflow-x:hidden;}.cssSheet > .insertBefore{height:1.5em;}.cssRule{position:relative;margin:0;padding:1em 0 0 6px;font-family:Monaco,monospace;color:#000000;}.cssRule:first-child{padding-top:6px;}.cssElementRuleContainer{position:relative;}.cssHead{padding-right:150px;}.cssProp{}.cssPropName{color:DarkGreen;}.cssPropValue{margin-left:8px;color:DarkBlue;}.cssOverridden span{text-decoration:line-through;}.cssInheritedRule{}.cssInheritLabel{margin-right:0.5em;font-weight:bold;}.cssRule .objectLink-sourceLink{top:0;}.cssProp.editGroup:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disable.png) no-repeat 2px 1px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disable.gif) no-repeat 2px 1px;}.cssProp.editGroup.editing{background:none;}.cssProp.disabledStyle{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disableHover.png) no-repeat 2px 1px;_background:url(https://getfirebug.com/releases/lite/latest/skin/xp/disableHover.gif) no-repeat 2px 1px;opacity:1;color:#CCCCCC;}.disabledStyle .cssPropName,.disabledStyle .cssPropValue{color:#CCCCCC;}.cssPropValue.editing + .cssSemi,.inlineExpander + .cssSemi{display:none;}.cssPropValue.editing{white-space:nowrap;}.stylePropName{font-weight:bold;padding:0 4px 4px 4px;width:50%;}.stylePropValue{width:50%;}.panelNode-net{overflow-x:hidden;}.netTable{width:100%;}.hideCategory-undefined .category-undefined,.hideCategory-html .category-html,.hideCategory-css .category-css,.hideCategory-js .category-js,.hideCategory-image .category-image,.hideCategory-xhr .category-xhr,.hideCategory-flash .category-flash,.hideCategory-txt .category-txt,.hideCategory-bin .category-bin{display:none;}.netHeadRow{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/group.gif) repeat-x #FFFFFF;}.netHeadCol{border-bottom:1px solid #CCCCCC;padding:2px 4px 2px 18px;font-weight:bold;}.netHeadLabel{white-space:nowrap;overflow:hidden;}.netHeaderRow{height:16px;}.netHeaderCell{cursor:pointer;-moz-user-select:none;border-bottom:1px solid #9C9C9C;padding:0 !important;font-weight:bold;background:#BBBBBB url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeader.gif) repeat-x;white-space:nowrap;}.netHeaderRow > .netHeaderCell:first-child > .netHeaderCellBox{padding:2px 14px 2px 18px;}.netHeaderCellBox{padding:2px 14px 2px 10px;border-left:1px solid #D9D9D9;border-right:1px solid #9C9C9C;}.netHeaderCell:hover:active{background:#959595 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeaderActive.gif) repeat-x;}.netHeaderSorted{background:#7D93B2 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeaderSorted.gif) repeat-x;}.netHeaderSorted > .netHeaderCellBox{border-right-color:#6B7C93;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/arrowDown.png) no-repeat right;}.netHeaderSorted.sortedAscending > .netHeaderCellBox{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/arrowUp.png);}.netHeaderSorted:hover:active{background:#536B90 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/tableHeaderSortedActive.gif) repeat-x;}.panelNode-net .netRowHeader{display:block;}.netRowHeader{cursor:pointer;display:none;height:15px;margin-right:0 !important;}.netRow .netRowHeader{background-position:5px 1px;}.netRow[breakpoint="true"] .netRowHeader{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/breakpoint.png);}.netRow[breakpoint="true"][disabledBreakpoint="true"] .netRowHeader{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/breakpointDisabled.png);}.netRow.category-xhr:hover .netRowHeader{background-color:#F6F6F6;}#netBreakpointBar{max-width:38px;}#netHrefCol > .netHeaderCellBox{border-left:0px;}.netRow .netRowHeader{width:3px;}.netInfoRow .netRowHeader{display:table-cell;}.netTable[hiddenCols~=netHrefCol] TD[id="netHrefCol"],.netTable[hiddenCols~=netHrefCol] TD.netHrefCol,.netTable[hiddenCols~=netStatusCol] TD[id="netStatusCol"],.netTable[hiddenCols~=netStatusCol] TD.netStatusCol,.netTable[hiddenCols~=netDomainCol] TD[id="netDomainCol"],.netTable[hiddenCols~=netDomainCol] TD.netDomainCol,.netTable[hiddenCols~=netSizeCol] TD[id="netSizeCol"],.netTable[hiddenCols~=netSizeCol] TD.netSizeCol,.netTable[hiddenCols~=netTimeCol] TD[id="netTimeCol"],.netTable[hiddenCols~=netTimeCol] TD.netTimeCol{display:none;}.netRow{background:LightYellow;}.netRow.loaded{background:#FFFFFF;}.netRow.loaded:hover{background:#EFEFEF;}.netCol{padding:0;vertical-align:top;border-bottom:1px solid #EFEFEF;white-space:nowrap;height:17px;}.netLabel{width:100%;}.netStatusCol{padding-left:10px;color:rgb(128,128,128);}.responseError > .netStatusCol{color:red;}.netDomainCol{padding-left:5px;}.netSizeCol{text-align:right;padding-right:10px;}.netHrefLabel{-moz-box-sizing:padding-box;overflow:hidden;z-index:10;position:absolute;padding-left:18px;padding-top:1px;max-width:15%;font-weight:bold;}.netFullHrefLabel{display:none;-moz-user-select:none;padding-right:10px;padding-bottom:3px;max-width:100%;background:#FFFFFF;z-index:200;}.netHrefCol:hover > .netFullHrefLabel{display:block;}.netRow.loaded:hover .netCol > .netFullHrefLabel{background-color:#EFEFEF;}.useA11y .a11yShowFullLabel{display:block;background-image:none !important;border:1px solid #CBE087;background-color:LightYellow;font-family:Monaco,monospace;color:#000000;font-size:10px;z-index:2147483647;}.netSizeLabel{padding-left:6px;}.netStatusLabel,.netDomainLabel,.netSizeLabel,.netBar{padding:1px 0 2px 0 !important;}.responseError{color:red;}.hasHeaders .netHrefLabel:hover{cursor:pointer;color:blue;text-decoration:underline;}.netLoadingIcon{position:absolute;border:0;margin-left:14px;width:16px;height:16px;background:transparent no-repeat 0 0;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/loading_16.gif);display:inline-block;}.loaded .netLoadingIcon{display:none;}.netBar,.netSummaryBar{position:relative;border-right:50px solid transparent;}.netResolvingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarResolving.gif) repeat-x;z-index:60;}.netConnectingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarConnecting.gif) repeat-x;z-index:50;}.netBlockingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarWaiting.gif) repeat-x;z-index:40;}.netSendingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarSending.gif) repeat-x;z-index:30;}.netWaitingBar{position:absolute;left:0;top:0;bottom:0;background:#FFFFFF url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarResponded.gif) repeat-x;z-index:20;min-width:1px;}.netReceivingBar{position:absolute;left:0;top:0;bottom:0;background:#38D63B url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarLoading.gif) repeat-x;z-index:10;}.netWindowLoadBar,.netContentLoadBar{position:absolute;left:0;top:0;bottom:0;width:1px;background-color:red;z-index:70;opacity:0.5;display:none;margin-bottom:-1px;}.netContentLoadBar{background-color:Blue;}.netTimeLabel{-moz-box-sizing:padding-box;position:absolute;top:1px;left:100%;padding-left:6px;color:#444444;min-width:16px;}.loaded .netReceivingBar,.loaded.netReceivingBar{background:#B6B6B6 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarLoaded.gif) repeat-x;border-color:#B6B6B6;}.fromCache .netReceivingBar,.fromCache.netReceivingBar{background:#D6D6D6 url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/netBarCached.gif) repeat-x;border-color:#D6D6D6;}.netSummaryRow .netTimeLabel,.loaded .netTimeLabel{background:transparent;}.timeInfoTip{width:150px; height:40px}.timeInfoTipBar,.timeInfoTipEventBar{position:relative;display:block;margin:0;opacity:1;height:15px;width:4px;}.timeInfoTipEventBar{width:1px !important;}.timeInfoTipCell.startTime{padding-right:8px;}.timeInfoTipCell.elapsedTime{text-align:right;padding-right:8px;}.sizeInfoLabelCol{font-weight:bold;padding-right:10px;font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;}.sizeInfoSizeCol{font-weight:bold;}.sizeInfoDetailCol{color:gray;text-align:right;}.sizeInfoDescCol{font-style:italic;}.netSummaryRow .netReceivingBar{background:#BBBBBB;border:none;}.netSummaryLabel{color:#222222;}.netSummaryRow{background:#BBBBBB !important;font-weight:bold;}.netSummaryRow .netBar{border-right-color:#BBBBBB;}.netSummaryRow > .netCol{border-top:1px solid #999999;border-bottom:2px solid;-moz-border-bottom-colors:#EFEFEF #999999;padding-top:1px;padding-bottom:2px;}.netSummaryRow > .netHrefCol:hover{background:transparent !important;}.netCountLabel{padding-left:18px;}.netTotalSizeCol{text-align:right;padding-right:10px;}.netTotalTimeCol{text-align:right;}.netCacheSizeLabel{position:absolute;z-index:1000;left:0;top:0;}.netLimitRow{background:rgb(255,255,225) !important;font-weight:normal;color:black;font-weight:normal;}.netLimitLabel{padding-left:18px;}.netLimitRow > .netCol{border-bottom:2px solid;-moz-border-bottom-colors:#EFEFEF #999999;vertical-align:middle !important;padding-top:2px;padding-bottom:2px;}.netLimitButton{font-size:11px;padding-top:1px;padding-bottom:1px;}.netInfoCol{border-top:1px solid #EEEEEE;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/group.gif) repeat-x #FFFFFF;}.netInfoBody{margin:10px 0 4px 10px;}.netInfoTabs{position:relative;padding-left:17px;}.netInfoTab{position:relative;top:-3px;margin-top:10px;padding:4px 6px;border:1px solid transparent;border-bottom:none;_border:none;font-weight:bold;color:#565656;cursor:pointer;}.netInfoTabSelected{cursor:default !important;border:1px solid #D7D7D7 !important;border-bottom:none !important;-moz-border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;background-color:#FFFFFF;}.logRow-netInfo.error .netInfoTitle{color:red;}.logRow-netInfo.loading .netInfoResponseText{font-style:italic;color:#888888;}.loading .netInfoResponseHeadersTitle{display:none;}.netInfoResponseSizeLimit{font-family:Lucida Grande,Tahoma,sans-serif;padding-top:10px;font-size:11px;}.netInfoText{display:none;margin:0;border:1px solid #D7D7D7;border-right:none;padding:8px;background-color:#FFFFFF;font-family:Monaco,monospace;white-space:pre-wrap;}.netInfoTextSelected{display:block;}.netInfoParamName{padding-right:10px;font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;vertical-align:top;text-align:right;white-space:nowrap;}.netInfoPostText .netInfoParamName{width:1px;}.netInfoParamValue{width:100%;}.netInfoHeadersText,.netInfoPostText,.netInfoPutText{padding-top:0;}.netInfoHeadersGroup,.netInfoPostParams,.netInfoPostSource{margin-bottom:4px;border-bottom:1px solid #D7D7D7;padding-top:8px;padding-bottom:2px;font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;color:#565656;}.netInfoPostParamsTable,.netInfoPostPartsTable,.netInfoPostJSONTable,.netInfoPostXMLTable,.netInfoPostSourceTable{margin-bottom:10px;width:100%;}.netInfoPostContentType{color:#bdbdbd;padding-left:50px;font-weight:normal;}.netInfoHtmlPreview{border:0;width:100%;height:100%;}.netHeadersViewSource{color:#bdbdbd;margin-left:200px;font-weight:normal;}.netHeadersViewSource:hover{color:blue;cursor:pointer;}.netActivationRow,.netPageSeparatorRow{background:rgb(229,229,229) !important;font-weight:normal;color:black;}.netActivationLabel{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/chrome://firebug/skin/infoIcon.png) no-repeat 3px 2px;padding-left:22px;}.netPageSeparatorRow{height:5px !important;}.netPageSeparatorLabel{padding-left:22px;height:5px !important;}.netPageRow{background-color:rgb(255,255,255);}.netPageRow:hover{background:#EFEFEF;}.netPageLabel{padding:1px 0 2px 18px !important;font-weight:bold;}.netActivationRow > .netCol{border-bottom:2px solid;-moz-border-bottom-colors:#EFEFEF #999999;padding-top:2px;padding-bottom:3px;}.twisty,.logRow-errorMessage > .hasTwisty > .errorTitle,.logRow-log > .objectBox-array.hasTwisty,.logRow-spy .spyHead .spyTitle,.logGroup > .logRow,.memberRow.hasChildren > .memberLabelCell > .memberLabel,.hasHeaders .netHrefLabel,.netPageRow > .netCol > .netPageTitle{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_open.gif);background-repeat:no-repeat;background-position:2px 2px;min-height:12px;}.logRow-errorMessage > .hasTwisty.opened > .errorTitle,.logRow-log > .objectBox-array.hasTwisty.opened,.logRow-spy.opened .spyHead .spyTitle,.logGroup.opened > .logRow,.memberRow.hasChildren.opened > .memberLabelCell > .memberLabel,.nodeBox.highlightOpen > .nodeLabel > .twisty,.nodeBox.open > .nodeLabel > .twisty,.netRow.opened > .netCol > .netHrefLabel,.netPageRow.opened > .netCol > .netPageTitle{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_close.gif);}.twisty{background-position:4px 4px;}* html .logRow-spy .spyHead .spyTitle,* html .logGroup .logGroupLabel,* html .hasChildren .memberLabelCell .memberLabel,* html .hasHeaders .netHrefLabel{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_open.gif);background-repeat:no-repeat;background-position:2px 2px;}* html .opened .spyHead .spyTitle,* html .opened .logGroupLabel,* html .opened .memberLabelCell .memberLabel{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_close.gif);background-repeat:no-repeat;background-position:2px 2px;}.panelNode-console{overflow-x:hidden;}.objectLink{text-decoration:none;}.objectLink:hover{cursor:pointer;text-decoration:underline;}.logRow{position:relative;margin:0;border-bottom:1px solid #D7D7D7;padding:2px 4px 1px 6px;background-color:#FFFFFF;overflow:hidden !important;}.useA11y .logRow:focus{border-bottom:1px solid #000000 !important;outline:none !important;background-color:#FFFFAD !important;}.useA11y .logRow:focus a.objectLink-sourceLink{background-color:#FFFFAD;}.useA11y .a11yFocus:focus,.useA11y .objectBox:focus{outline:2px solid #FF9933;background-color:#FFFFAD;}.useA11y .objectBox-null:focus,.useA11y .objectBox-undefined:focus{background-color:#888888 !important;}.useA11y .logGroup.opened > .logRow{border-bottom:1px solid #ffffff;}.logGroup{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/group.gif) repeat-x #FFFFFF;padding:0 !important;border:none !important;}.logGroupBody{display:none;margin-left:16px;border-left:1px solid #D7D7D7;border-top:1px solid #D7D7D7;background:#FFFFFF;}.logGroup > .logRow{background-color:transparent !important;font-weight:bold;}.logGroup.opened > .logRow{border-bottom:none;}.logGroup.opened > .logGroupBody{display:block;}.logRow-command > .objectBox-text{font-family:Monaco,monospace;color:#0000FF;white-space:pre-wrap;}.logRow-info,.logRow-warn,.logRow-error,.logRow-assert,.logRow-warningMessage,.logRow-errorMessage{padding-left:22px;background-repeat:no-repeat;background-position:4px 2px;}.logRow-assert,.logRow-warningMessage,.logRow-errorMessage{padding-top:0;padding-bottom:0;}.logRow-info,.logRow-info .objectLink-sourceLink{background-color:#FFFFFF;}.logRow-warn,.logRow-warningMessage,.logRow-warn .objectLink-sourceLink,.logRow-warningMessage .objectLink-sourceLink{background-color:cyan;}.logRow-error,.logRow-assert,.logRow-errorMessage,.logRow-error .objectLink-sourceLink,.logRow-errorMessage .objectLink-sourceLink{background-color:LightYellow;}.logRow-error,.logRow-assert,.logRow-errorMessage{color:#FF0000;}.logRow-info{}.logRow-warn,.logRow-warningMessage{}.logRow-error,.logRow-assert,.logRow-errorMessage{}.objectBox-string,.objectBox-text,.objectBox-number,.objectLink-element,.objectLink-textNode,.objectLink-function,.objectBox-stackTrace,.objectLink-profile{font-family:Monaco,monospace;}.objectBox-string,.objectBox-text,.objectLink-textNode{white-space:pre-wrap;}.objectBox-number,.objectLink-styleRule,.objectLink-element,.objectLink-textNode{color:#000088;}.objectBox-string{color:#FF0000;}.objectLink-function,.objectBox-stackTrace,.objectLink-profile{color:DarkGreen;}.objectBox-null,.objectBox-undefined{padding:0 2px;border:1px solid #666666;background-color:#888888;color:#FFFFFF;}.objectBox-exception{padding:0 2px 0 18px;color:red;}.objectLink-sourceLink{position:absolute;right:4px;top:2px;padding-left:8px;font-family:Lucida Grande,sans-serif;font-weight:bold;color:#0000FF;}.errorTitle{margin-top:0px;margin-bottom:1px;padding-top:2px;padding-bottom:2px;}.errorTrace{margin-left:17px;}.errorSourceBox{margin:2px 0;}.errorSource-none{display:none;}.errorSource-syntax > .errorBreak{visibility:hidden;}.errorSource{cursor:pointer;font-family:Monaco,monospace;color:DarkGreen;}.errorSource:hover{text-decoration:underline;}.errorBreak{cursor:pointer;display:none;margin:0 6px 0 0;width:13px;height:14px;vertical-align:bottom;opacity:0.1;}.hasBreakSwitch .errorBreak{display:inline;}.breakForError .errorBreak{opacity:1;}.assertDescription{margin:0;}.logRow-profile > .logRow > .objectBox-text{font-family:Lucida Grande,Tahoma,sans-serif;color:#000000;}.logRow-profile > .logRow > .objectBox-text:last-child{color:#555555;font-style:italic;}.logRow-profile.opened > .logRow{padding-bottom:4px;}.profilerRunning > .logRow{padding-left:22px !important;}.profileSizer{width:100%;overflow-x:auto;overflow-y:scroll;}.profileTable{border-bottom:1px solid #D7D7D7;padding:0 0 4px 0;}.profileTable tr[odd="1"]{background-color:#F5F5F5;vertical-align:middle;}.profileTable a{vertical-align:middle;}.profileTable td{padding:1px 4px 0 4px;}.headerCell{cursor:pointer;-moz-user-select:none;border-bottom:1px solid #9C9C9C;padding:0 !important;font-weight:bold;}.headerCellBox{padding:2px 4px;border-left:1px solid #D9D9D9;border-right:1px solid #9C9C9C;}.headerCell:hover:active{}.headerSorted{}.headerSorted > .headerCellBox{border-right-color:#6B7C93;}.headerSorted.sortedAscending > .headerCellBox{}.headerSorted:hover:active{}.linkCell{text-align:right;}.linkCell > .objectLink-sourceLink{position:static;}.logRow-stackTrace{padding-top:0;background:#f8f8f8;}.logRow-stackTrace > .objectBox-stackFrame{position:relative;padding-top:2px;}.objectLink-object{font-family:Lucida Grande,sans-serif;font-weight:bold;color:DarkGreen;white-space:pre-wrap;}.objectProp-object{color:DarkGreen;}.objectProps{color:#000;font-weight:normal;}.objectPropName{color:#777;}.objectProps .objectProp-string{color:#f55;}.objectProps .objectProp-number{color:#55a;}.objectProps .objectProp-object{color:#585;}.selectorTag,.selectorId,.selectorClass{font-family:Monaco,monospace;font-weight:normal;}.selectorTag{color:#0000FF;}.selectorId{color:DarkBlue;}.selectorClass{color:red;}.selectorHidden > .selectorTag{color:#5F82D9;}.selectorHidden > .selectorId{color:#888888;}.selectorHidden > .selectorClass{color:#D86060;}.selectorValue{font-family:Lucida Grande,sans-serif;font-style:italic;color:#555555;}.panelNode.searching .logRow{display:none;}.logRow.matched{display:block !important;}.logRow.matching{position:absolute;left:-1000px;top:-1000px;max-width:0;max-height:0;overflow:hidden;}.objectLeftBrace,.objectRightBrace,.objectEqual,.objectComma,.arrayLeftBracket,.arrayRightBracket,.arrayComma{font-family:Monaco,monospace;}.objectLeftBrace,.objectRightBrace,.arrayLeftBracket,.arrayRightBracket{font-weight:bold;}.objectLeftBrace,.arrayLeftBracket{margin-right:4px;}.objectRightBrace,.arrayRightBracket{margin-left:4px;}.logRow-dir{padding:0;}.logRow-errorMessage .hasTwisty .errorTitle,.logRow-spy .spyHead .spyTitle,.logGroup .logRow{cursor:pointer;padding-left:18px;background-repeat:no-repeat;background-position:3px 3px;}.logRow-errorMessage > .hasTwisty > .errorTitle{background-position:2px 3px;}.logRow-errorMessage > .hasTwisty > .errorTitle:hover,.logRow-spy .spyHead .spyTitle:hover,.logGroup > .logRow:hover{text-decoration:underline;}.logRow-spy{padding:0 !important;}.logRow-spy,.logRow-spy .objectLink-sourceLink{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/group.gif) repeat-x #FFFFFF;padding-right:4px;right:0;}.logRow-spy.opened{padding-bottom:4px;border-bottom:none;}.spyTitle{color:#000000;font-weight:bold;-moz-box-sizing:padding-box;overflow:hidden;z-index:100;padding-left:18px;}.spyCol{padding:0;white-space:nowrap;height:16px;}.spyTitleCol:hover > .objectLink-sourceLink,.spyTitleCol:hover > .spyTime,.spyTitleCol:hover > .spyStatus,.spyTitleCol:hover > .spyTitle{display:none;}.spyFullTitle{display:none;-moz-user-select:none;max-width:100%;background-color:Transparent;}.spyTitleCol:hover > .spyFullTitle{display:block;}.spyStatus{padding-left:10px;color:rgb(128,128,128);}.spyTime{margin-left:4px;margin-right:4px;color:rgb(128,128,128);}.spyIcon{margin-right:4px;margin-left:4px;width:16px;height:16px;vertical-align:middle;background:transparent no-repeat 0 0;display:none;}.loading .spyHead .spyRow .spyIcon{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/loading_16.gif);display:block;}.logRow-spy.loaded:not(.error) .spyHead .spyRow .spyIcon{width:0;margin:0;}.logRow-spy.error .spyHead .spyRow .spyIcon{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon-sm.png);display:block;background-position:2px 2px;}.logRow-spy .spyHead .netInfoBody{display:none;}.logRow-spy.opened .spyHead .netInfoBody{margin-top:10px;display:block;}.logRow-spy.error .spyTitle,.logRow-spy.error .spyStatus,.logRow-spy.error .spyTime{color:red;}.logRow-spy.loading .spyResponseText{font-style:italic;color:#888888;}.caption{font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;color:#444444;}.warning{padding:10px;font-family:Lucida Grande,Tahoma,sans-serif;font-weight:bold;color:#888888;}.panelNode-dom{overflow-x:hidden !important;}.domTable{font-size:1em;width:100%;table-layout:fixed;background:#fff;}.domTableIE{width:auto;}.memberLabelCell{padding:2px 0 2px 0;vertical-align:top;}.memberValueCell{padding:1px 0 1px 5px;display:block;overflow:hidden;}.memberLabel{display:block;cursor:default;-moz-user-select:none;overflow:hidden;padding-left:18px;background-color:#FFFFFF;text-decoration:none;}.memberRow.hasChildren .memberLabelCell .memberLabel:hover{cursor:pointer;color:blue;text-decoration:underline;}.userLabel{color:#000000;font-weight:bold;}.userClassLabel{color:#E90000;font-weight:bold;}.userFunctionLabel{color:#025E2A;font-weight:bold;}.domLabel{color:#000000;}.domFunctionLabel{color:#025E2A;}.ordinalLabel{color:SlateBlue;font-weight:bold;}.scopesRow{padding:2px 18px;background-color:LightYellow;border-bottom:5px solid #BEBEBE;color:#666666;}.scopesLabel{background-color:LightYellow;}.watchEditCell{padding:2px 18px;background-color:LightYellow;border-bottom:1px solid #BEBEBE;color:#666666;}.editor-watchNewRow,.editor-memberRow{font-family:Monaco,monospace !important;}.editor-memberRow{padding:1px 0 !important;}.editor-watchRow{padding-bottom:0 !important;}.watchRow > .memberLabelCell{font-family:Monaco,monospace;padding-top:1px;padding-bottom:1px;}.watchRow > .memberLabelCell > .memberLabel{background-color:transparent;}.watchRow > .memberValueCell{padding-top:2px;padding-bottom:2px;}.watchRow > .memberLabelCell,.watchRow > .memberValueCell{background-color:#F5F5F5;border-bottom:1px solid #BEBEBE;}.watchToolbox{z-index:2147483647;position:absolute;right:0;padding:1px 2px;}#fbConsole{overflow-x:hidden !important;}#fbCSS{font:1em Monaco,monospace;padding:0 7px;}#fbstylesheetButtons select,#fbScriptButtons select{font:11px Lucida Grande,Tahoma,sans-serif;margin-top:1px;padding-left:3px;background:#fafafa;border:1px inset #fff;width:220px;outline:none;}.Selector{margin-top:10px}.CSSItem{margin-left:4%}.CSSText{padding-left:20px;}.CSSProperty{color:#005500;}.CSSValue{padding-left:5px; color:#000088;}#fbHTMLStatusBar{display:inline;}.fbToolbarButtons{display:none;}.fbStatusSeparator{display:block;float:left;padding-top:4px;}#fbStatusBarBox{display:none;}#fbToolbarContent{display:block;position:absolute;_position:absolute;top:0;padding-top:4px;height:23px;clip:rect(0,2048px,27px,0);}.fbTabMenuTarget{display:none !important;float:left;width:10px;height:10px;margin-top:6px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuTarget.png);}.fbTabMenuTarget:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuTargetHover.png);}.fbShadow{float:left;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/shadowAlpha.png) no-repeat bottom right !important;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/shadow2.gif) no-repeat bottom right;margin:10px 0 0 10px !important;margin:10px 0 0 5px;}.fbShadowContent{display:block;position:relative;background-color:#fff;border:1px solid #a9a9a9;top:-6px;left:-6px;}.fbMenu{display:none;position:absolute;font-size:11px;line-height:13px;z-index:2147483647;}.fbMenuContent{padding:2px;}.fbMenuSeparator{display:block;position:relative;padding:1px 18px 0;text-decoration:none;color:#000;cursor:default;background:#ACA899;margin:4px 0;}.fbMenuOption{display:block;position:relative;padding:2px 18px;text-decoration:none;color:#000;cursor:default;}.fbMenuOption:hover{color:#fff;background:#316AC5;}.fbMenuGroup{background:transparent url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuPin.png) no-repeat right 0;}.fbMenuGroup:hover{background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuPin.png) no-repeat right -17px;}.fbMenuGroupSelected{color:#fff;background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuPin.png) no-repeat right -17px;}.fbMenuChecked{background:transparent url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuCheckbox.png) no-repeat 4px 0;}.fbMenuChecked:hover{background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuCheckbox.png) no-repeat 4px -17px;}.fbMenuRadioSelected{background:transparent url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuRadio.png) no-repeat 4px 0;}.fbMenuRadioSelected:hover{background:#316AC5 url(https://getfirebug.com/releases/lite/latest/skin/xp/tabMenuRadio.png) no-repeat 4px -17px;}.fbMenuShortcut{padding-right:85px;}.fbMenuShortcutKey{position:absolute;right:0;top:2px;width:77px;}#fbFirebugMenu{top:22px;left:0;}.fbMenuDisabled{color:#ACA899 !important;}#fbFirebugSettingsMenu{left:245px;top:99px;}#fbConsoleMenu{top:42px;left:48px;}.fbIconButton{display:block;}.fbIconButton{display:block;}.fbIconButton{display:block;float:left;height:20px;width:20px;color:#000;margin-right:2px;text-decoration:none;cursor:default;}.fbIconButton:hover{position:relative;top:-1px;left:-1px;margin-right:0;_margin-right:1px;color:#333;border:1px solid #fff;border-bottom:1px solid #bbb;border-right:1px solid #bbb;}.fbIconPressed{position:relative;margin-right:0;_margin-right:1px;top:0 !important;left:0 !important;height:19px;color:#333 !important;border:1px solid #bbb !important;border-bottom:1px solid #cfcfcf !important;border-right:1px solid #ddd !important;}#fbErrorPopup{position:absolute;right:0;bottom:0;height:19px;width:75px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;z-index:999;}#fbErrorPopupContent{position:absolute;right:0;top:1px;height:18px;width:75px;_width:74px;border-left:1px solid #aca899;}#fbErrorIndicator{position:absolute;top:2px;right:5px;}.fbBtnInspectActive{background:#aaa;color:#fff !important;}.fbBody{margin:0;padding:0;overflow:hidden;font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;background:#fff;}.clear{clear:both;}#fbMiniChrome{display:none;right:0;height:27px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;margin-left:1px;}#fbMiniContent{display:block;position:relative;left:-1px;right:0;top:1px;height:25px;border-left:1px solid #aca899;}#fbToolbarSearch{float:right;border:1px solid #ccc;margin:0 5px 0 0;background:#fff url(https://getfirebug.com/releases/lite/latest/skin/xp/search.png) no-repeat 4px 2px !important;background:#fff url(https://getfirebug.com/releases/lite/latest/skin/xp/search.gif) no-repeat 4px 2px;padding-left:20px;font-size:11px;}#fbToolbarErrors{float:right;margin:1px 4px 0 0;font-size:11px;}#fbLeftToolbarErrors{float:left;margin:7px 0px 0 5px;font-size:11px;}.fbErrors{padding-left:20px;height:14px;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.png) no-repeat !important;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.gif) no-repeat;color:#f00;font-weight:bold;}#fbMiniErrors{display:inline;display:none;float:right;margin:5px 2px 0 5px;}#fbMiniIcon{float:right;margin:3px 4px 0;height:20px;width:20px;float:right;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -135px;cursor:pointer;}#fbChrome{font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;position:absolute;_position:static;top:0;left:0;height:100%;width:100%;border-collapse:collapse;border-spacing:0;background:#fff;overflow:hidden;}#fbChrome > tbody > tr > td{padding:0;}#fbTop{height:49px;}#fbToolbar{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;height:27px;font-size:11px;line-height:13px;}#fbPanelBarBox{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #dbd9c9 0 -27px;height:22px;}#fbContent{height:100%;vertical-align:top;}#fbBottom{height:18px;background:#fff;}#fbToolbarIcon{float:left;padding:0 5px 0;}#fbToolbarIcon a{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -135px;}#fbToolbarButtons{padding:0 2px 0 5px;}#fbToolbarButtons{padding:0 2px 0 5px;}.fbButton{text-decoration:none;display:block;float:left;color:#000;padding:4px 6px 4px 7px;cursor:default;}.fbButton:hover{color:#333;background:#f5f5ef url(https://getfirebug.com/releases/lite/latest/skin/xp/buttonBg.png);padding:3px 5px 3px 6px;border:1px solid #fff;border-bottom:1px solid #bbb;border-right:1px solid #bbb;}.fbBtnPressed{background:#e3e3db url(https://getfirebug.com/releases/lite/latest/skin/xp/buttonBgHover.png) !important;padding:3px 4px 2px 6px !important;margin:1px 0 0 1px !important;border:1px solid #ACA899 !important;border-color:#ACA899 #ECEBE3 #ECEBE3 #ACA899 !important;}#fbStatusBarBox{top:4px;cursor:default;}.fbToolbarSeparator{overflow:hidden;border:1px solid;border-color:transparent #fff transparent #777;_border-color:#eee #fff #eee #777;height:7px;margin:6px 3px;float:left;}.fbBtnSelected{font-weight:bold;}.fbStatusBar{color:#aca899;}.fbStatusBar a{text-decoration:none;color:black;}.fbStatusBar a:hover{color:blue;cursor:pointer;}#fbWindowButtons{position:absolute;white-space:nowrap;right:0;top:0;height:17px;width:48px;padding:5px;z-index:6;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 0;}#fbPanelBar1{width:1024px; z-index:8;left:0;white-space:nowrap;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #dbd9c9 0 -27px;position:absolute;left:4px;}#fbPanelBar2Box{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #dbd9c9 0 -27px;position:absolute;height:22px;width:300px; z-index:9;right:0;}#fbPanelBar2{position:absolute;width:290px; height:22px;padding-left:4px;}.fbPanel{display:none;}#fbPanelBox1,#fbPanelBox2{max-height:inherit;height:100%;font-size:1em;}#fbPanelBox2{background:#fff;}#fbPanelBox2{width:300px;background:#fff;}#fbPanel2{margin-left:6px;background:#fff;}#fbLargeCommandLine{display:none;position:absolute;z-index:9;top:27px;right:0;width:294px;height:201px;border-width:0;margin:0;padding:2px 0 0 2px;resize:none;outline:none;font-size:11px;overflow:auto;border-top:1px solid #B9B7AF;_right:-1px;_border-left:1px solid #fff;}#fbLargeCommandButtons{display:none;background:#ECE9D8;bottom:0;right:0;width:294px;height:21px;padding-top:1px;position:fixed;border-top:1px solid #ACA899;z-index:9;}#fbSmallCommandLineIcon{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/down.png) no-repeat;position:absolute;right:2px;bottom:3px;z-index:99;}#fbSmallCommandLineIcon:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/downHover.png) no-repeat;}.hide{overflow:hidden !important;position:fixed !important;display:none !important;visibility:hidden !important;}#fbCommand{height:18px;}#fbCommandBox{position:fixed;_position:absolute;width:100%;height:18px;bottom:0;overflow:hidden;z-index:9;background:#fff;border:0;border-top:1px solid #ccc;}#fbCommandIcon{position:absolute;color:#00f;top:2px;left:6px;display:inline;font:11px Monaco,monospace;z-index:10;}#fbCommandLine{position:absolute;width:100%;top:0;left:0;border:0;margin:0;padding:2px 0 2px 32px;font:11px Monaco,monospace;z-index:9;outline:none;}#fbLargeCommandLineIcon{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/up.png) no-repeat;position:absolute;right:1px;bottom:1px;z-index:10;}#fbLargeCommandLineIcon:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/upHover.png) no-repeat;}div.fbFitHeight{overflow:auto;position:relative;}.fbSmallButton{overflow:hidden;width:16px;height:16px;display:block;text-decoration:none;cursor:default;}#fbWindowButtons .fbSmallButton{float:right;}#fbWindow_btClose{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/min.png);}#fbWindow_btClose:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/minHover.png);}#fbWindow_btDetach{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/detach.png);}#fbWindow_btDetach:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/detachHover.png);}#fbWindow_btDeactivate{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/off.png);}#fbWindow_btDeactivate:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/offHover.png);}.fbTab{text-decoration:none;display:none;float:left;width:auto;float:left;cursor:default;font-family:Lucida Grande,Tahoma,sans-serif;font-size:11px;line-height:13px;font-weight:bold;height:22px;color:#565656;}.fbPanelBar span{float:left;}.fbPanelBar .fbTabL,.fbPanelBar .fbTabR{height:22px;width:8px;}.fbPanelBar .fbTabText{padding:4px 1px 0;}a.fbTab:hover{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -73px;}a.fbTab:hover .fbTabL{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) -16px -96px;}a.fbTab:hover .fbTabR{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) -24px -96px;}.fbSelectedTab{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) #f1f2ee 0 -50px !important;color:#000;}.fbSelectedTab .fbTabL{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) 0 -96px !important;}.fbSelectedTab .fbTabR{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/sprite.png) -8px -96px !important;}#fbHSplitter{position:fixed;_position:absolute;left:0;top:0;width:100%;height:5px;overflow:hidden;cursor:n-resize !important;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/pixel_transparent.gif);z-index:9;}#fbHSplitter.fbOnMovingHSplitter{height:100%;z-index:100;}.fbVSplitter{background:#ece9d8;color:#000;border:1px solid #716f64;border-width:0 1px;border-left-color:#aca899;width:4px;cursor:e-resize;overflow:hidden;right:294px;text-decoration:none;z-index:10;position:absolute;height:100%;top:27px;}div.lineNo{font:1em/1.4545em Monaco,monospace;position:relative;float:left;top:0;left:0;margin:0 5px 0 0;padding:0 5px 0 10px;background:#eee;color:#888;border-right:1px solid #ccc;text-align:right;}.sourceBox{position:absolute;}.sourceCode{font:1em Monaco,monospace;overflow:hidden;white-space:pre;display:inline;}.nodeControl{margin-top:3px;margin-left:-14px;float:left;width:9px;height:9px;overflow:hidden;cursor:default;background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_open.gif);_float:none;_display:inline;_position:absolute;}div.nodeMaximized{background:url(https://getfirebug.com/releases/lite/latest/skin/xp/tree_close.gif);}div.objectBox-element{padding:1px 3px;}.objectBox-selector{cursor:default;}.selectedElement{background:highlight;color:#fff !important;}.selectedElement span{color:#fff !important;}* html .selectedElement{position:relative;}@media screen and (-webkit-min-device-pixel-ratio:0){.selectedElement{background:#316AC5;color:#fff !important;}}.logRow *{font-size:1em;}.logRow{position:relative;border-bottom:1px solid #D7D7D7;padding:2px 4px 1px 6px;zbackground-color:#FFFFFF;}.logRow-command{font-family:Monaco,monospace;color:blue;}.objectBox-string,.objectBox-text,.objectBox-number,.objectBox-function,.objectLink-element,.objectLink-textNode,.objectLink-function,.objectBox-stackTrace,.objectLink-profile{font-family:Monaco,monospace;}.objectBox-null{padding:0 2px;border:1px solid #666666;background-color:#888888;color:#FFFFFF;}.objectBox-string{color:red;}.objectBox-number{color:#000088;}.objectBox-function{color:DarkGreen;}.objectBox-object{color:DarkGreen;font-weight:bold;font-family:Lucida Grande,sans-serif;}.objectBox-array{color:#000;}.logRow-info,.logRow-error,.logRow-warn{background:#fff no-repeat 2px 2px;padding-left:20px;padding-bottom:3px;}.logRow-info{background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/infoIcon.png) !important;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/infoIcon.gif);}.logRow-warn{background-color:cyan;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/warningIcon.png) !important;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/warningIcon.gif);}.logRow-error{background-color:LightYellow;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.png) !important;background-image:url(https://getfirebug.com/releases/lite/latest/skin/xp/errorIcon.gif);color:#f00;}.errorMessage{vertical-align:top;color:#f00;}.objectBox-sourceLink{position:absolute;right:4px;top:2px;padding-left:8px;font-family:Lucida Grande,sans-serif;font-weight:bold;color:#0000FF;}.selectorTag,.selectorId,.selectorClass{font-family:Monaco,monospace;font-weight:normal;}.selectorTag{color:#0000FF;}.selectorId{color:DarkBlue;}.selectorClass{color:red;}.objectBox-element{font-family:Monaco,monospace;color:#000088;}.nodeChildren{padding-left:26px;}.nodeTag{color:blue;cursor:pointer;}.nodeValue{color:#FF0000;font-weight:normal;}.nodeText,.nodeComment{margin:0 2px;vertical-align:top;}.nodeText{color:#333333;font-family:Monaco,monospace;}.nodeComment{color:DarkGreen;}.nodeHidden,.nodeHidden *{color:#888888;}.nodeHidden .nodeTag{color:#5F82D9;}.nodeHidden .nodeValue{color:#D86060;}.selectedElement .nodeHidden,.selectedElement .nodeHidden *{color:SkyBlue !important;}.log-object{}.property{position:relative;clear:both;height:15px;}.propertyNameCell{vertical-align:top;float:left;width:28%;position:absolute;left:0;z-index:0;}.propertyValueCell{float:right;width:68%;background:#fff;position:absolute;padding-left:5px;display:table-cell;right:0;z-index:1;}.propertyName{font-weight:bold;}.FirebugPopup{height:100% !important;}.FirebugPopup #fbWindowButtons{display:none !important;}.FirebugPopup #fbHSplitter{display:none !important;}',HTML:'<table id="fbChrome" cellpadding="0" cellspacing="0" border="0"><tbody><tr><td id="fbTop" colspan="2"><div id="fbWindowButtons"><a id="fbWindow_btDeactivate" class="fbSmallButton fbHover" title="Deactivate Firebug for this web page">&nbsp;</a><a id="fbWindow_btDetach" class="fbSmallButton fbHover" title="Open Firebug in popup window">&nbsp;</a><a id="fbWindow_btClose" class="fbSmallButton fbHover" title="Minimize Firebug">&nbsp;</a></div><div id="fbToolbar"><div id="fbToolbarContent"><span id="fbToolbarIcon"><a id="fbFirebugButton" class="fbIconButton" class="fbHover" target="_blank">&nbsp;</a></span><span id="fbToolbarButtons"><span id="fbFixedButtons"><a id="fbChrome_btInspect" class="fbButton fbHover" title="Click an element in the page to inspect">Inspect</a></span><span id="fbConsoleButtons" class="fbToolbarButtons"><a id="fbConsole_btClear" class="fbButton fbHover" title="Clear the console">Clear</a></span></span><span id="fbStatusBarBox"><span class="fbToolbarSeparator"></span></span></div></div><div id="fbPanelBarBox"><div id="fbPanelBar1" class="fbPanelBar"><a id="fbConsoleTab" class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">Console</span><span class="fbTabMenuTarget"></span><span class="fbTabR"></span></a><a id="fbHTMLTab" class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">HTML</span><span class="fbTabR"></span></a><a class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">CSS</span><span class="fbTabR"></span></a><a class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">Script</span><span class="fbTabR"></span></a><a class="fbTab fbHover"><span class="fbTabL"></span><span class="fbTabText">DOM</span><span class="fbTabR"></span></a></div><div id="fbPanelBar2Box" class="hide"><div id="fbPanelBar2" class="fbPanelBar"></div></div></div><div id="fbHSplitter">&nbsp;</div></td></tr><tr id="fbContent"><td id="fbPanelBox1"><div id="fbPanel1" class="fbFitHeight"><div id="fbConsole" class="fbPanel"></div><div id="fbHTML" class="fbPanel"></div></div></td><td id="fbPanelBox2" class="hide"><div id="fbVSplitter" class="fbVSplitter">&nbsp;</div><div id="fbPanel2" class="fbFitHeight"><div id="fbHTML_Style" class="fbPanel"></div><div id="fbHTML_Layout" class="fbPanel"></div><div id="fbHTML_DOM" class="fbPanel"></div></div><textarea id="fbLargeCommandLine" class="fbFitHeight"></textarea><div id="fbLargeCommandButtons"><a id="fbCommand_btRun" class="fbButton fbHover">Run</a><a id="fbCommand_btClear" class="fbButton fbHover">Clear</a><a id="fbSmallCommandLineIcon" class="fbSmallButton fbHover"></a></div></td></tr><tr id="fbBottom" class="hide"><td id="fbCommand" colspan="2"><div id="fbCommandBox"><div id="fbCommandIcon">&gt;&gt;&gt;</div><input id="fbCommandLine" name="fbCommandLine" type="text"/><a id="fbLargeCommandLineIcon" class="fbSmallButton fbHover"></a></div></td></tr></tbody></table><span id="fbMiniChrome"><span id="fbMiniContent"><span id="fbMiniIcon" title="Open Firebug Lite"></span><span id="fbMiniErrors" class="fbErrors"></span></span></span>'}
8266}});
8267FBL.initialize()
8268})();
8269