/* See license.txt for terms of usage */ /** * @license RequireJS i18n 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/requirejs/i18n for details */ /** * JSONSchema Validator - Validates JavaScript objects using JSON Schemas * (http://www.json.com/json-schema-proposal/) * * Copyright (c) 2007 Kris Zyp SitePen (www.sitepen.com) * Licensed under the MIT (MIT-LICENSE.txt) license. To use the validator call JSONSchema.validate with an instance object and an optional schema object. If a schema is provided, it will be used to validate. If the instance object refers to a schema (self-validating), that schema will be used to validate and the schema parameter is not necessary (if both exist, both validations will occur). The validate method will return an array of validation errors. If there are no errors, then an empty list will be returned. A validation error will have two properties: "property" which indicates which property had the error "message" which indicates what the error was */ /** * Code Syntax Highlighter. * Version 1.5.1 * Copyright (C) 2004-2007 Alex Gorbatchev. * http://www.dreamprojections.com/syntaxhighlighter/ * * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General * Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) * any later version. * * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more * details. * * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ define("core/lib",["core/trace"],function(e){var t={},n=navigator.userAgent.toLowerCase();t.isFirefox=/firefox/.test(n),t.isOpera=/opera/.test(n),t.isWebkit=/webkit/.test(n),t.isSafari=/webkit/.test(n),t.isIE=/msie/.test(n)&&!/opera/.test(n),t.isIE6=/msie 6/i.test(navigator.appVersion),t.browserVersion=(n.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],t.isIElt8=t.isIE&&t.browserVersion-0<8,t.supportsSelectElementText=window.getSelection&&window.document.createRange||window.document.body.createTextRange,t.extend=function(n,r){var i={};return t.append(i,n),t.append(i,r),i},t.append=function(e,t){for(var n in t)e[n]=t[n];return e},t.bind=function(){var e=t.cloneArray(arguments),n=e.shift(),r=e.shift();return function(){return n.apply(r,t.arrayInsert(t.cloneArray(e),0,arguments))}},t.bindFixed=function(){var e=t.cloneArray(arguments),n=e.shift(),r=e.shift();return function(){return n.apply(r,e)}},t.dispatch=function(t,n,r){for(var i=0;t&&i=e.top&&n<=e.top+e.height&&t>=e.left&&t<=e.left+e.width},t.cloneArray=function(e,t){var n=[];if(t)for(var r=0;r2?2:t,t=t<-1?-1:t;if(t==-1)return e+" B";var n=Math.pow(10,t);return e==-1||e==undefined?"?":e==0?"0":e<1024?e+" B":e<1048576?Math.round(e/1024*n)/n+" KB":Math.round(e/1048576*n)/n+" MB"},t.formatTime=function(e){return e==-1?"-":e<1e3?e+"ms":e<6e4?Math.ceil(e/10)/100+"s":Math.ceil(e/6e4*100)/100+"m"},t.formatNumber=function(e){e+="";var t=e.split("."),n=t[0],r=t.length>1?"."+t[1]:"",i=/(\d+)(\d{3})/;while(i.test(n))n=n.replace(i,"$1 $2");return n+r},t.formatString=function(e){var n=t.cloneArray(arguments),e=n.shift();for(var r=0;r0?"-":"+")+t(Math.abs(i))+":"+t(Math.abs(s));return n+o},t.getFileName=function(n){try{var r=t.splitURLBase(n);return r.name}catch(i){e.log(unescape(n))}return n},t.getFileExtension=function(e){if(!e)return null;var t=e.indexOf("?");t!=-1&&(e=e.substr(0,t));var n=e.lastIndexOf(".");return e.substr(n+1)},t.splitURLBase=function(e){return t.isDataURL(e)?t.splitDataURL(e):t.splitURLTrue(e)},t.isDataURL=function(e){return e&&e.substr(0,5)=="data:"},t.splitDataURL=function(e){var n=e.indexOf(":",3);if(n!=4)return!1;var r=e.indexOf(",",n+1);if(r"+c}else i.name=l.name,i.path=l.path}else i.hasOwnProperty("path")||(i.path="data:"),i.hasOwnProperty("name")||(i.name=decodeURIComponent(i.encodedContent.substr(0,200)).replace(/\s*$/,""));return i},t.splitURLTrue=function(e){var t=/:\/{1,3}(.*?)\/([^\/]*?)\/?($|\?.*)/,n=t.exec(e);return n?n[2]?{path:n[1],name:n[2]+n[3]}:{path:n[1],name:n[1]}:{name:e,path:e}},t.getURLParameter=function(e){var t=window.location.search.substring(1),n=t.split("&");for(var r=0;rr&&!n&&(l=t.$STR("LargeData")),i.push({name:s(f),value:s(l)})}else{var f=o[u];i.push({name:s(f),value:""})}}catch(c){}return i.sort(function(e,t){return e.name<=t.name?-1:1}),i},t.getBody=function(e){if(e.body)return e.body;var t=e.getElementsByTagName("body")[0];return t?t:null},t.getHead=function(e){return e.getElementsByTagName("head")[0]},t.getAncestorByClass=function(e,n){for(var r=e;r;r=r.parentNode)if(t.hasClass(r,n))return r;return null},t.$=function(){return t.getElementByClass.apply(this,arguments)},t.getElementByClass=function(e,n){if(!e)return null;var r=t.cloneArray(arguments);r.splice(0,1);for(var i=e.firstChild;i;i=i.nextSibling){var s=t.cloneArray(r);s.unshift(i);if(t.hasClass.apply(this,s))return i;var o=t.getElementByClass.apply(this,s);if(o)return o}return null},t.getElementsByClass=function(e,n){function s(e,n,r){for(var i=e.firstChild;i;i=i.nextSibling){var o=t.cloneArray(n);o.unshift(i),t.hasClass.apply(null,o)&&r.push(i),s(i,n,r)}}if(e.querySelectorAll){var r=t.cloneArray(arguments);r.shift();var i="."+r.join(".");return e.querySelectorAll(i)}var o=[],r=t.cloneArray(arguments);return r.shift(),s(e,r,o),o},t.getChildByClass=function(e){for(var n=1;n=0){var r=t.length;e.className=e.className.substr(0,n-1)+e.className.substr(n+r)}}},t.toggleClass=function(e,n){return t.hasClass(e,n)?(t.removeClass(e,n),!1):(t.setClass(e,n),!0)},t.setClassTimed=function(e,n,r){r||(r=1300),e.__setClassTimeout?clearTimeout(e.__setClassTimeout):t.setClass(e,n),e.__setClassTimeout=setTimeout(function(){delete e.__setClassTimeout,t.removeClass(e,n)},r)},t.startsWith=function(e,t,n){return n=n||0,e.indexOf(t,n)===n},t.trim=function(e){return e.replace(/^\s*|\s*$/g,"")},t.wrapText=function(e,n){var r=/[^A-Za-z_$0-9'"-]/,i=[],s=100,o=t.splitLines(e);for(var u=0;us){var f=r.exec(a.substr(s,100)),l=s+(f?f.index:0),c=a.substr(0,l);a=a.substr(l),n||i.push("
"),i.push(n?c:t.escapeHTML(c)),n||i.push("
")}n||i.push("
"),i.push(n?a:t.escapeHTML(a)),n||i.push("
")}return i.join(n?"\n":"")},t.insertWrappedText=function(e,n,r){n.innerHTML="
"+t.wrapText(e,r)+"
"},t.splitLines=function(e){var t=/\r\n|\r|\n/;if(!e)return[];if(e.split)return e.split(t);var n=e+"",r=n.split(t);return r},t.getPrettyDomain=function(e){var t=/^(?!data:)[^:]+:\/{1,3}(www\.)?([^\/]{1,256})/.exec(e);return t?t[2]:""},t.escapeHTML=function(e){function t(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}return"?"}return String(e).replace(/[<>&"']/g,t)},t.cropString=function(e,n){e+="";if(!n)var r=50;else var r=n/2;return e.length>n?t.escapeNewLines(e.substr(0,r)+"..."+e.substr(e.length-r)):t.escapeNewLines(e)},t.escapeNewLines=function(e){return e.replace(/\r/g,"\\r").replace(/\n/g,"\\n")},t.cloneJSON=function(t){if(t==null||typeof t!="object")return t;try{var n=t.constructor();for(var r in t)n[r]=this.cloneJSON(t[r]);return n}catch(i){e.exception(i)}return null},t.getOverflowParent=function(e){for(var t=e.parentNode;t;t=t.offsetParent)if(t.scrollHeight>t.offsetHeight)return t},t.getElementBox=function(e){var n={};if(e.getBoundingClientRect){var r=e.getBoundingClientRect(),i=t.isIE?document.body.clientTop||document.documentElement.clientTop:0,s=t.getWindowScrollPosition();n.top=Math.round(r.top-i+s.top),n.left=Math.round(r.left-i+s.left),n.height=Math.round(r.bottom-r.top),n.width=Math.round(r.right-r.left)}else{var o=t.getElementPosition(e);n.top=o.top,n.left=o.left,n.height=e.offsetHeight,n.width=e.offsetWidth}return n},t.getElementPosition=function(e){var t=0,n=0;do t+=e.offsetLeft,n+=e.offsetTop;while(e=e.offsetParent);return{left:t,top:n}},t.getWindowSize=function(){var e=0,t=0,n;return typeof window.innerWidth=="number"?(e=window.innerWidth,t=window.innerHeight):(n=document.documentElement)&&(n.clientHeight||n.clientWidth)?(e=n.clientWidth,t=n.clientHeight):(n=document.body)&&(n.clientHeight||n.clientWidth)&&(e=n.clientWidth,t=n.clientHeight),{width:e,height:t}},t.getWindowScrollSize=function(){var e=0,n=0,r;return!t.isIEQuiksMode&&(r=document.documentElement)&&(r.scrollHeight||r.scrollWidth)&&(e=r.scrollWidth,n=r.scrollHeight),(r=document.body)&&(r.scrollHeight||r.scrollWidth)&&(r.scrollWidth>e||r.scrollHeight>n)&&(e=r.scrollWidth,n=r.scrollHeight),{width:e,height:n}},t.getWindowScrollPosition=function(){var e=0,t=0,n;return typeof window.pageYOffset=="number"?(e=window.pageYOffset,t=window.pageXOffset):(n=document.body)&&(n.scrollTop||n.scrollLeft)?(e=n.scrollTop,t=n.scrollLeft):(n=document.documentElement)&&(n.scrollTop||n.scrollLeft)&&(e=n.scrollTop,t=n.scrollLeft),{top:e,left:t}},t.scrollIntoCenterView=function(e,n,r,i){if(!e)return;n||(n=t.getOverflowParent(e));if(!n)return;var s=t.getClientOffset(e);if(!i){var o=s.y-n.scrollTop,u=n.scrollTop+n.clientHeight-(s.y+e.offsetHeight);if(o<0||u<0){var a=s.y-n.clientHeight/2;n.scrollTop=a}}if(!r){var f=s.x-n.scrollLeft,l=n.scrollLeft+n.clientWidth-(s.x+e.clientWidth);if(f<0||l<0){var c=s.x-n.clientWidth/2;n.scrollLeft=c}}},t.getClientOffset=function(e){function t(e,n,r){var i=e.offsetParent,s=r.getComputedStyle(e,"");e.offsetLeft&&(n.x+=e.offsetLeft+parseInt(s.borderLeftWidth)),e.offsetTop&&(n.y+=e.offsetTop+parseInt(s.borderTopWidth)),i?i.nodeType==1&&t(i,n,r):e.ownerDocument.defaultView.frameElement&&t(e.ownerDocument.defaultView.frameElement,n,e.ownerDocument.defaultView)}var n={x:0,y:0};if(e){var r=e.ownerDocument.defaultView;t(e,n,r)}return n},t.addStyleSheet=function(e,n){if(e.getElementById(n))return;var r=e.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=n,r.setAttribute("id",n);var i=t.getHead(e);i.appendChild(r)},t.selectElementText=function(e,t,n){var r=window,i=r.document;if(r.getSelection&&i.createRange){var s=r.getSelection(),o=i.createRange();o.setStart(e,t),o.setEnd(e,n),s.removeAllRanges(),s.addRange(o)}else i.body.createTextRange&&(o=i.body.createTextRange(),o.moveToElementText(e),o.select())},t}),function(){"use strict";function t(e,t,n,r,i,s){t[e]&&(n.push(e),(t[e]===!0||t[e]===1)&&r.push(i+e+"/"+s))}function n(e,t,n,r,i){var s=r+t+"/"+i;require._fileExists(e.toUrl(s+".js"))&&n.push(s)}function r(e,t,n){var i;for(i in t)t.hasOwnProperty(i)&&(!e.hasOwnProperty(i)||n)?e[i]=t[i]:typeof t[i]=="object"&&(!e[i]&&t[i]&&(e[i]={}),r(e[i],t[i],n))}var e=/(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;define("i18n",["module"],function(i){var s=i.config?i.config():{};return{version:"2.0.5",load:function(i,o,u,a){a=a||{},a.locale&&(s.locale=a.locale);var f,l=e.exec(i),c=l[1],h=l[4],p=l[5],d=h.split("-"),v=[],m={},g,y,b="";l[5]?(c=l[1],f=c+p):(f=i,p=l[4],h=s.locale,h||(h=s.locale=typeof navigator=="undefined"?"root":(navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage||"root").toLowerCase()),d=h.split("-"));if(a.isBuild){v.push(f),n(o,"root",v,c,p);for(g=0;g-1&&n[t];t--){s=n[t],i=e[s];if(i===!0||i===1)i=o(c+s+"/"+p);r(m,i)}u(m)})})}}})}(),define("nls/requestList",{root:{fromCache:"From Cache",menuBreakLayout:"Break Timeline Layout",menuOpenRequestInWindow:"Open Request in New Window",menuOpenResponseInWindow:"Open Response in New Window",request:"Request",requests:"Requests",tooltipSize:"%S (%S bytes)",tooltipZippedSize:"%S (%S bytes) - compressed",tooltipUnzippedSize:"%S (%S bytes) - uncompressed",unknownSize:"Unknown size","request.Started":"Request start time since the beginning","request.phases.label":"Request phases start and elapsed time relative to the request start:","request.phase.Resolving":"DNS Lookup","request.phase.Connecting":"Connecting","request.phase.Blocking":"Blocking","request.phase.Sending":"Sending","request.phase.Waiting":"Waiting","request.phase.Receiving":"Receiving","request.timings.label":"Event timing relative to the request start:",ContentLoad:"DOM Loaded",WindowLoad:"Page Loaded","page.event.Load":"Page Loaded",menuBreakTimeline:"Break Timeline Layout",menuOpenRequest:"Open Request in New Window",menuOpenResponse:"Open Response in New Window"}}),define("preview/jsonSchema",[],function(){var e={validate:function(e,t){return this._validate(e,t,!1)},checkPropertyChange:function(e,t,n){return this._validate(e,t,n||"property")},_validate:function(e,t,n){function i(e,t,o,u){function f(e){r.push({property:o,message:e})}function l(e,t){if(e){if(!(typeof e!="string"||e=="any"||(e=="null"?t===null:typeof t==e)||t instanceof Array&&e=="array"||e=="integer"&&t%1===0))return[{property:o,message:typeof t+" value found, but a "+e+" is required"}];if(e instanceof Array){var n=[];for(var s=0;st.maxItems&&f("There must be a maximum of "+t.maxItems+" in the array")}else t.properties&&r.concat(s(e,t.properties,o,t.additionalProperties));t.pattern&&typeof e=="string"&&!e.match(t.pattern)&&f("does not match the regex pattern "+t.pattern),t.maxLength&&typeof e=="string"&&e.length>t.maxLength&&f("may only be "+t.maxLength+" characters long"),t.minLength&&typeof e=="string"&&e.lengthe&&f("must have a minimum value of "+t.minimum),typeof t.maximum!==undefined&&typeof e==typeof t.maximum&&t.maximum=32&&t<127||t==10||t==13)return e.charAt(0);var n=t.toString(16).toUpperCase();while(n.length<4)n="0"+n;return"\\u"+n}).join(""),e):e}return u.prototype={append:function(t){if(!t){s.error("HarModel.append; Trying to append null input!");return}t.log.entries.sort(function(t,n){var r=e.parseISO8601(t.startedDateTime),i=e.parseISO8601(n.startedDateTime);return ri?1:0});if(this.input){if(!t.log.pages)return s.error("Import of additional data without a page is not yet supported."),null;for(var n=0;n0?e[0]:null},getPageEntries:function(e){return u.getPageEntries(this.input,e)},getAllEntries:function(e){return this.input?this.input.log.entries:[]},getParentPage:function(e){return u.getParentPage(this.input,e)},importPage:function(e,t){var n=this.getUniquePageID(e.id),r=e.id;e.id=n,this.input.log.pages.push(e);for(var i=0;i0)&&u.length>0)return this.loadRemoteArchive(u,s,t,n);var f=e.getURLParameter("path");if(f)return this.loadLocalArchive(f,t,n)},loadExample:function(e,t){var n=document.location.href,r=n.indexOf("?");document.location=n.substr(0,r)+"?path="+e,i.setCookie("timeline",!0),i.setCookie("stats",!0)},loadLocalArchive:function(e,t,n){return $.ajax({url:e,context:this,dataType:"json",success:function(e){t(e)},error:function(e,t,r){n(e,t,r)}}),!0},loadRemoteArchive:function(e,t,n,r){if(!e.length)return!1;var i=e.shift();return t||(t="onInputData"),$.ajax({url:i,context:this,dataType:"jsonp",jsonp:"callback",jsonpCallback:t,success:function(i){n&&n(i);if(e.length){var s=this;setTimeout(function(){s.loadRemoteArchive(e,t,n,r)},300)}},error:function(e,t,n){r&&r(e,t,n)}}),!0},load:function(e,t,n,r,i,s){function o(t){e.appendPreview&&e.appendPreview(t),i&&i.call(e,t)}function u(t,n,r){e.onLoadError&&e.onLoadError(t,n,r),s&&s.call(e,t,n,r)}return n?this.loadRemoteArchive([t],r,o,u):this.loadLocalArchive(t,o,u)}},u}),define("nls/requestBody",{root:{RequestHeaders:"Request Headers",ResponseHeaders:"Response Headers",RequestCookies:"Request Cookies",ResponseCookies:"Response Cookies",URLParameters:"Params",Headers:"Headers",Post:"Post",Put:"Put",Cookies:"Cookies",Response:"Response",Cache:"Cache",HTML:"HTML",DataURL:"Data URL"}}),define("domplate/tabView",["domplate/domplate","core/lib","core/trace"],function(Domplate,Lib,Trace){with(Domplate){var TabViewTempl=domplate({tag:TABLE({"class":"tabView",cellpadding:0,cellspacing:0,_repObject:"$tabView"},TBODY(TR({"class":"tabViewRow"},TD({"class":"tabViewCol",valign:"top"},TAG("$tabList",{tabView:"$tabView"}))))),tabList:DIV({"class":"tabViewBody",onclick:"$onClickTab"},DIV({"class":"$tabView.id\\Bar tabBar"}),DIV({"class":"$tabView.id\\Bodies tabBodies"})),tabHeaderTag:A({"class":"$tab.id\\Tab tab",view:"$tab.id",_repObject:"$tab"},"$tab.label"),tabBodyTag:DIV({"class":"tab$tab.id\\Body tabBody",_repObject:"$tab"}),hideTab:function(e){return!1},onClickTab:function(e){var t=Lib.fixEvent(e),n=this.getTabView(t.target);n.onClickTab(t)},getTabView:function(e){var t=Lib.getAncestorByClass(e,"tabView");return t.repObject}});function TabView(e){this.id=e,this.tabs=[],this.listeners=[],this.tabBarVisibility=!0}return TabView.prototype={appendTab:function(e){return this.tabs.push(e),e.tabView=this,e},removeTab:function(e){for(var t in this.tabs){var n=this.tabs[t];if(n.id==e){this.tabs.splice(t,1);break}}},getTab:function(e){for(var t in this.tabs){var n=this.tabs[t];if(n.id==e)return n}},selectTabByName:function(e){var t=Lib.getElementByClass(this.element,e+"Tab");t&&this.selectTab(t)},showTabBar:function(e){this.element?e?this.element.removeAttribute("hideTabBar"):this.element.setAttribute("hideTabBar","true"):this.tabBarVisibility=e},addListener:function(e){this.listeners.push(e)},removeListener:function(e){Lib.remove(this.listeners,e)},onClickTab:function(e){var t=Lib.getAncestorByClass(e.target,"tab");t&&this.selectTab(t)},selectTab:function(e){if(!Lib.hasClass(e,"tab"))return;if(Lib.hasClass(e,"selected")&&e._updated)return;var t=e.getAttribute("view");if(!t)return;var n=Lib.getAncestorByClass(e,"tabViewBody");n.selectedTab&&(n.selectedTab.removeAttribute("selected"),n.selectedBody.removeAttribute("selected"),Lib.removeClass(n.selectedTab,"selected"),Lib.removeClass(n.selectedBody,"selected"));var r=Lib.getElementByClass(n,"tab"+t+"Body");r||Trace.error("TabView.selectTab; Missing tab body",e),n.selectedTab=e,n.selectedBody=r,n.selectedTab.setAttribute("selected","true"),n.selectedBody.setAttribute("selected","true"),Lib.setClass(n.selectedBody,"selected"),Lib.setClass(n.selectedTab,"selected"),this.updateTabBody(n,t)},updateTabBody:function(e,t){var n=e.selectedTab.repObject;if(n._body._updated)return;n._body._updated=!0,n.bodyTag&&n.bodyTag.replace({tab:n},n._body),n&&n.onUpdateBody&&n.onUpdateBody(this,n._body);for(var r=0;rAbout...

dp.SyntaxHighlighter

Version: {V}

http://www.dreamprojections.com/syntaxhighlighter

©2004-2007 Alex Gorbatchev.
'},ClipboardSwf:null,Version:"1.5.1"}};return e.SyntaxHighlighter=e.sh,e.sh.Toolbar.Commands={ExpandSource:{label:"+ expand source",check:function(e){return e.collapse},func:function(e,t){e.parentNode.removeChild(e),t.div.className=t.div.className.replace("collapsed","")}},ViewSource:{label:"view plain",func:function(t,n){var r=e.sh.Utils.FixForBlogger(n.originalCode).replace(/'+r+""),i.document.close()}},CopyToClipboard:{label:"copy to clipboard",check:function(){return window.clipboardData!=null||e.sh.ClipboardSwf!=null},func:function(t,n){var r=e.sh.Utils.FixForBlogger(n.originalCode).replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&");if(window.clipboardData)window.clipboardData.setData("text",r);else if(e.sh.ClipboardSwf!=null){var i=n.flashCopier;i==null&&(i=document.createElement("div"),n.flashCopier=i,n.div.appendChild(i)),i.innerHTML=''}alert("The code is in your clipboard now")}},PrintSource:{label:"print",func:function(t,n){var r=document.createElement("IFRAME"),i=null;r.style.cssText="position:absolute;width:0px;height:0px;left:-500px;top:-500px;",document.body.appendChild(r),i=r.contentWindow.document,e.sh.Utils.CopyStyles(i,window.document),i.write('
'+n.div.innerHTML+"
"),i.close(),r.contentWindow.focus(),r.contentWindow.print(),alert("Printing..."),document.body.removeChild(r)}},About:{label:"?",func:function(t){var n=window.open("","_blank","dialog,width=300,height=150,scrollbars=0"),r=n.document;e.sh.Utils.CopyStyles(r,window.document),r.write(e.sh.Strings.AboutDialog.replace("{V}",e.sh.Version)),r.close(),n.focus()}}},e.sh.Toolbar.Create=function(t){var n=document.createElement("DIV");n.className="tools";for(var r in e.sh.Toolbar.Commands){var i=e.sh.Toolbar.Commands[r];if(i.check!=null&&!i.check(t))continue;n.innerHTML+='"+i.label+""}return n},e.sh.Toolbar.Command=function(t,n){var r=n;while(r!=null&&r.className.indexOf("dp-highlighter")==-1)r=r.parentNode;r!=null&&e.sh.Toolbar.Commands[t].func(n,r.highlighter)},e.sh.Utils.CopyStyles=function(e,t){var n=t.getElementsByTagName("link");for(var r=0;r')},e.sh.Utils.FixForBlogger=function(t){return e.sh.isBloggerMode==1?t.replace(/|<br\s*\/?>/gi,"\n"):t},e.sh.RegexLib={MultiLineCComments:new RegExp("/\\*[\\s\\S]*?\\*/","gm"),SingleLineCComments:new RegExp("//.*$","gm"),SingleLinePerlComments:new RegExp("#.*$","gm"),DoubleQuotedString:new RegExp('"(?:\\.|(\\\\\\")|[^\\""\\n])*"',"g"),SingleQuotedString:new RegExp("'(?:\\.|(\\\\\\')|[^\\''\\n])*'","g")},e.sh.Match=function(e,t,n){this.value=e,this.index=t,this.length=e.length,this.css=n},e.sh.Highlighter=function(){this.noGutter=!1,this.addControls=!0,this.collapse=!1,this.tabsToSpaces=!0,this.wrapColumn=80,this.showColumns=!0},e.sh.Highlighter.SortCallback=function(e,t){return e.indext.index?1:e.lengtht.length?1:0},e.sh.Highlighter.prototype.CreateElement=function(e){var t=document.createElement(e);return t.highlighter=this,t},e.sh.Highlighter.prototype.GetMatches=function(t,n){var r=0,i=null;while((i=t.exec(this.code))!=null)this.matches[this.matches.length]=new e.sh.Match(i[0],i.index,n)},e.sh.Highlighter.prototype.AddBit=function(e,t){if(e==null||e.length==0)return;var n=this.CreateElement("SPAN");e=e.replace(/ /g," "),e=e.replace(/");if(t!=null)if(/br/gi.test(e)){var r=e.split(" 
");for(var i=0;in.index&&e.index/gi,"\n"),n=t.split("\n");this.addControls==1&&this.bar.appendChild(e.sh.Toolbar.Create(this));if(this.showColumns){var r=this.CreateElement("div"),i=this.CreateElement("div"),s=10,o=1;while(o<=150)o%s==0?(r.innerHTML+=o,o+=(o+"").length):(r.innerHTML+="·",o++);i.className="columns",i.appendChild(r),this.bar.appendChild(i)}for(var o=0,u=this.firstLine;o0;u++){if(n(r[u]).length==0)continue;var a=s.exec(r[u]);a!=null&&a.length>0&&(o=Math.min(a[0].length,o))}if(o>0)for(var u=0;u0&&n.appendTab(new HeadersTab(t)),t.request.queryString&&t.request.queryString.length&&n.appendTab(new ParamsTab(t)),t.request.postData&&n.appendTab(new SentDataTab(t,t.request.method)),t.response.content.text&&t.response.content.text.length>0&&n.appendTab(new ResponseTab(t)),this.showCache(t)&&n.appendTab(new CacheTab(t)),this.showHtml(t)&&n.appendTab(new HtmlTab(t)),this.showDataURL(t)&&n.appendTab(new DataURLTab(t));var r=n.render(e);return n.tabs.length>0&&n.selectTabByName(n.tabs[0].id),r},showCache:function(e){return e.cache?e.cache.afterRequest?e.category=="image"?!1:!0:!1:!1},showHtml:function(e){var t=e.response.content.mimeType||"",n=e.mimeType||"";return Lib.startsWith(t,"text/html")||Lib.startsWith(n,"application/xhtml+xml")},showDataURL:function(e){return e.request.url.indexOf("data:")==0}});function HeadersTab(e){this.file=e}HeadersTab.prototype=domplate(TabView.Tab.prototype,{id:"Headers",label:Strings.Headers,bodyTag:TABLE({"class":"netInfoHeadersText netInfoText netInfoHeadersTable",cellpadding:0,cellspacing:0},TBODY(TR({"class":"netInfoResponseHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},Strings.ResponseHeaders))),TR({"class":"netInfoRequestHeadersTitle"},TD({colspan:2},DIV({"class":"netInfoHeadersGroup"},Strings.RequestHeaders))))),headerDataTag:FOR("param","$headers",TR(TD({"class":"netInfoParamName"},"$param.name"),TD({"class":"netInfoParamValue"},PRE("$param|getParamValue")))),getParamValue:function(e){return Lib.wrapText(e.value,!0)},onUpdateBody:function(e,t){this.file.response.headers&&this.insertHeaderRows(t,this.file.response.headers,"Headers","ResponseHeaders"),this.file.request.headers&&this.insertHeaderRows(t,this.file.request.headers,"Headers","RequestHeaders")},insertHeaderRows:function(e,t,n,r){var i=Lib.getElementByClass(e,"netInfo"+n+"Table"),s=Lib.getElementByClass(i,"netInfo"+r+"Title");t.length?(this.headerDataTag.insertRows({headers:t},s?s:e),Lib.removeClass(s,"collapsed")):Lib.setClass(s,"collapsed")}});function ResponseTab(e){this.file=e}ResponseTab.prototype=domplate(TabView.Tab.prototype,{id:"Response",label:Strings.Response,bodyTag:DIV({"class":"netInfoResponseText netInfoText"},PRE({"class":"javascript:nocontrols:nogutter:",name:"code"})),onUpdateBody:function(e,t){var n=Lib.getElementByClass(t,"netInfoResponseText");if(this.file.category=="image"){Lib.clearNode(n);var r=t.ownerDocument.createElement("img");r.src=this.file.href,n.appendChild(r,n)}else{Lib.clearNode(n.firstChild);var i=this.file.response.content.text,s=this.file.response.content.mimeType;s=="application/javascript"||s=="text/javascript"||s=="application/x-javascript"||s=="text/ecmascript"||s=="application/ecmascript"?(n.firstChild.innerHTML=i,dp.SyntaxHighlighter.HighlightAll(n.firstChild)):Lib.insertWrappedText(i,n.firstChild)}}});function ParamsTab(e){this.file=e}ParamsTab.prototype=domplate(HeadersTab.prototype,{id:"Params",label:Strings.URLParameters,bodyTag:TABLE({"class":"netInfoParamsText netInfoText netInfoParamsTable",cellpadding:0,cellspacing:0},TBODY()),onUpdateBody:function(e,t){if(this.file.request.queryString){var n=Lib.getElementByClass(t,"netInfoParamsText");this.insertHeaderRows(n,this.file.request.queryString,"Params")}}});function SentDataTab(e,t){t=t.charAt(0).toUpperCase()+t.slice(1).toLowerCase(),this.file=e,this.id=t,this.label=Strings[t]}SentDataTab.prototype=domplate(HeadersTab.prototype,{bodyTag:DIV({"class":"netInfo$tab.id\\Text netInfoText"},TABLE({"class":"netInfo$tab.id\\Table",cellpadding:0,cellspacing:0},TBODY())),onUpdateBody:function(e,t){var n=this.file.request.postData;if(!n)return;var r=Lib.getElementByClass(t,"netInfo"+this.id+"Text");n.mimeType=="application/x-www-form-urlencoded"?this.insertHeaderRows(r,n.params,this.id):Lib.insertWrappedText(n.text,r)}});function CookiesTab(e){this.file=e}CookiesTab.prototype=domplate(HeadersTab.prototype,{id:"Cookies",label:Strings.Cookies,bodyTag:DIV({"class":"netInfoCookiesText netInfoText"},TABLE({"class":"netInfoCookiesTable",cellpadding:0,cellspacing:0},TBODY(TR({"class":"netInfoResponseCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},Strings.ResponseCookies))),TR({"class":"netInfoRequestCookiesTitle"},TD({colspan:2},DIV({"class":"netInfoCookiesGroup"},Strings.RequestCookies)))))),onUpdateBody:function(e,t){if(file.response.cookies){var n=Lib.getElementByClass(t,"netInfoParamsText");this.insertHeaderRows(n,file.response.cookies,"Cookies","ResponseCookies")}if(file.request.cookies){var n=Lib.getElementByClass(t,"netInfoParamsText");this.insertHeaderRows(n,file.request.cookies,"Cookies","RequestCookies")}}});function CacheTab(e){this.file=e}CacheTab.prototype=domplate(HeadersTab.prototype,{id:"Cache",label:Strings.Cache,bodyTag:DIV({"class":"netInfoCacheText netInfoText"},TABLE({"class":"netInfoCacheTable",cellpadding:0,cellspacing:0},TBODY())),onUpdateBody:function(e,t){if(this.file.cache&&this.file.cache.afterRequest){var n=this.file.cache.afterRequest,r=[];for(var i in n)r.push({name:i,value:n[i]});this.insertHeaderRows(t,r,"Cache")}}});function HtmlTab(e){this.file=e}HtmlTab.prototype=domplate(HeadersTab.prototype,{id:"HTML",label:Strings.HTML,bodyTag:DIV({"class":"netInfoHtmlText netInfoText"},IFRAME({"class":"netInfoHtmlPreview",onload:"$onLoad"}),DIV({"class":"htmlPreviewResizer"})),onUpdateBody:function(e,t){this.preview=Lib.getElementByClass(t,"netInfoHtmlPreview");var n=parseInt(Cookies.getCookie("htmlPreviewHeight"));isNaN(n)||(this.preview.style.height=n+"px");var r=Lib.getElementByClass(t,"htmlPreviewResizer");this.resizer=new DragDrop.Tracker(r,{onDragStart:Lib.bind(this.onDragStart,this),onDragOver:Lib.bind(this.onDragOver,this),onDrop:Lib.bind(this.onDrop,this)})},onLoad:function(e){var t=Lib.fixEvent(e),n=Lib.getAncestorByClass(t.target,"tabHTMLBody").repObject;n.preview.contentWindow.document.body.innerHTML=n.file.response.content.text},onDragStart:function(e){var t=Lib.getBody(this.preview.ownerDocument);t.setAttribute("hResizing","true"),this.startHeight=this.preview.clientHeight},onDragOver:function(e,t){var n=this.startHeight+e.y;this.preview.style.height=n+"px",Cookies.setCookie("htmlPreviewHeight",n)},onDrop:function(e){var t=Lib.getBody(this.preview.ownerDocument);t.removeAttribute("hResizing")}});function DataURLTab(e){this.file=e}return DataURLTab.prototype=domplate(HeadersTab.prototype,{id:"DataURL",label:Strings.DataURL,bodyTag:DIV({"class":"netInfoDataURLText netInfoText"}),onUpdateBody:function(e,t){var n=Lib.getElementByClass(t,"netInfoDataURLText"),r=this.file.request.url;if(r.indexOf("data:image")==0){var i=t.ownerDocument.createElement("img");i.src=r,n.appendChild(i)}else Lib.insertWrappedText(unescape(r),n)}}),RequestBody}}),define("domplate/infoTip",["domplate/domplate","core/lib","core/trace"],function(Domplate,Lib,Trace){with(Domplate){var InfoTip=Lib.extend({listeners:[],maxWidth:100,maxHeight:80,infoTipMargin:10,infoTipWindowPadding:25,tags:domplate({infoTipTag:DIV({"class":"infoTip"})}),initialize:function(){var e=$("body");return e.bind("mouseover",Lib.bind(this.onMouseMove,this)),e.bind("mouseout",Lib.bind(this.onMouseOut,this)),e.bind("mousemove",Lib.bind(this.onMouseMove,this)),this.infoTip=this.tags.infoTipTag.append({},Lib.getBody(document))},showInfoTip:function(e,t,n,r,i,s){var o=Lib.getOverflowParent(t),u=n+(o?o.scrollLeft:0),a=Lib.dispatch2(this.listeners,"showInfoTip",[e,t,u,r,i,s]);if(a){var f=e.ownerDocument.documentElement,l=f.clientWidth,c=f.clientHeight;n+e.offsetWidth+this.infoTipMargin>l-this.infoTipWindowPadding?(e.style.left="auto",e.style.right=l-n+this.infoTipMargin+"px"):(e.style.left=n+this.infoTipMargin+"px",e.style.right="auto"),r+e.offsetHeight+this.infoTipMargin>c?(e.style.top=Math.max(0,c-(e.offsetHeight+this.infoTipMargin))+"px",e.style.bottom="auto"):(e.style.top=r+this.infoTipMargin+"px",e.style.bottom="auto"),e.setAttribute("active","true")}else this.hideInfoTip(e)},hideInfoTip:function(e){e&&e.removeAttribute("active")},onMouseOut:function(e){e.relatedTarget||this.hideInfoTip(this.infoTip)},onMouseMove:function(e){this.infoTip.setAttribute("multiline",!1);var t=e.clientX,n=e.clientY;this.showInfoTip(this.infoTip,e.target,t,n,e.rangeParent,e.rangeOffset)},populateTimingInfoTip:function(e,t){return this.tags.colorTag.replace({rgbValue:t},e),!0},addListener:function(e){this.listeners.push(e)},removeListener:function(e){Lib.remove(this.listeners,e)}});return InfoTip.initialize(),InfoTip}}),define("domplate/popupMenu",["domplate/domplate","core/lib","core/trace"],function(Domplate,Lib,Trace){with(Domplate){var Controller={controllers:[],controllerContext:{label:"controller context"},initialize:function(e){this.controllers=[],this.controllerContext=e||this.controllerContext},shutdown:function(){this.removeControllers()},addController:function(){for(var e=0,t;t=arguments[e];e++){typeof t[0]=="string"&&(t[0]=$$(t[0],this.controllerContext));var n=t[2];t[2]=Lib.bind(n,this),t[3]=n,this.controllers.push(t),Lib.addEventListener.apply(this,t)}},removeController:function(){for(var e=0,t;t=arguments[e];e++)for(var n=0,r;r=this.controllers[n];n++)t[0]==r[0]&&t[1]==r[1]&&t[2]==r[3]&&Lib.removeEventListener.apply(this,r)},removeControllers:function(){for(var e=0,t;t=this.controllers[e];e++)Lib.removeEventListener.apply(this,t)}},menuItemProps={"class":"$item.className",type:"$item.type",value:"$item.value",_command:"$item.command"};Lib.isIE6&&(menuItemProps.href="javascript:void(0)");var MenuPlate=domplate({tag:DIV({"class":"popupMenu popupMenuShadow"},DIV({"class":"popupMenuContent popupMenuShadowContent"},FOR("item","$object.items|memberIterator",TAG("$item.tag",{item:"$item"})))),itemTag:A(menuItemProps,"$item.label"),checkBoxTag:A(Lib.extend(menuItemProps,{checked:"$item.checked"}),"$item.label"),radioButtonTag:A(Lib.extend(menuItemProps,{selected:"$item.selected"}),"$item.label"),groupTag:A(Lib.extend(menuItemProps,{child:"$item.child"}),"$item.label"),shortcutTag:A(menuItemProps,"$item.label",SPAN({"class":"popupMenuShortcutKey"},"$item.key")),separatorTag:SPAN({"class":"popupMenuSeparator"}),memberIterator:function(e){var t=[];for(var n=0,r=e.length;n0?e.response.status+" ":"";return t+e.response.statusText},getType:function(e){return e.response.content.mimeType},getDomain:function(e){return Lib.getPrettyDomain(e.request.url)},getSize:function(e){var t=e.response.bodySize,n=t&&t!=-1?t:e.response.content.size;return this.formatSize(n)},isExpandable:function(e){var t=e.response.headers.length>0,n=e.request.url.indexOf("data:")==0;return t||n},formatSize:function(e){return Lib.formatSize(e)},getElapsedTime:function(e){var t=Math.round(e.time*10)/10;return Lib.formatTime(t)},onClick:function(e){var t=Lib.fixEvent(e);if(Lib.isLeftClick(e)){var n=Lib.getAncestorByClass(t.target,"netRow");n&&(this.toggleHeadersRow(n),Lib.cancelEvent(e))}else Lib.isControlClick(e)&&window.open(e.target.innerText||e.target.textContent)},toggleHeadersRow:function(e){if(!Lib.hasClass(e,"isExpandable"))return;var t=e.repObject;Lib.toggleClass(e,"opened");if(Lib.hasClass(e,"opened")){var n=this.netInfoTag.insertRows({},e)[0];n.repObject=t;var r=new RequestBody;r.render(n.firstChild,t)}else{var n=e.nextSibling,i=Lib.getElementByClass(n,"netInfoBody");e.parentNode.removeChild(n)}},onOpenOptions:function(e){var t=Lib.fixEvent(e);Lib.cancelEvent(e);if(!Lib.isLeftClick(e))return;var n=t.target,r=Lib.getAncestorByClass(n,"netRow"),i=this.getMenuItems(r);if(!i.length)return;var s=new Menu({id:"requestContextMenu",items:i});s.showPopup(n)},getMenuItems:function(e){var t=e.repObject,n=e.phase,r=n.files[0]==t&&this.phases[0]==n,i=[{label:Strings.menuBreakTimeline,type:"checkbox",disabled:r,checked:n.files[0]==t&&!r,command:Lib.bind(this.breakLayout,this,e)},"-",{label:Strings.menuOpenRequest,command:Lib.bind(this.openRequest,this,t)},{label:Strings.menuOpenResponse,disabled:!t.response.content.text,command:Lib.bind(this.openResponse,this,t)}];return Lib.dispatch(this.listeners,"getMenuItems",[i,this.input,t]),i},openRequest:function(e,t){window.open(t.request.url)},openResponse:function(e,t){var n=t.response.content.text,r=t.response.content.mimeType,i=t.response.content.encoding,s="data:"+(r?r:"")+";"+(i?i:"")+","+n;window.open(s)},breakLayout:function(e,t){var n=t.repObject,r=t.phase,i=r.files[0]==n;t.breakLayout=!i,t.setAttribute("breakLayout",t.breakLayout?"true":"false");var s=Lib.getAncestorByClass(t,"netTable"),o=HarModel.getParentPage(this.input,n);this.updateLayout(s,o)},updateLayout:function(e,t){var n=HarModel.getPageEntries(this.input,t);this.table=e;var r=this.table.firstChild,i=this.firstRow=r.firstChild.nextSibling;this.phases=[];var s=Cookies.getCookie("phaseInterval");s||(s=4e3);var o=null,u=t?Lib.parseISO8601(t.startedDateTime):null,a=t&&t.pageTimings?t.pageTimings.onLoad:-1;a>0&&(a+=u);for(var f=0;f=0&&(d=c>a&&c-h>=s&&c+l.time>=p+s),typeof i.breakLayout=="boolean"?!o||i.breakLayout?o=this.startPhase(l):o.addFile(l):!o||d?o=this.startPhase(l):o.addFile(l),this.phases[0]!=o&&i.setAttribute("breakLayout",o.files[0]==l?"true":"false");if(o.startTime==undefined||o.startTime>c)o.startTime=c;if(o.endTime==undefined||o.endTime0){var o=r+s-n.startTime,u=(o/this.phaseElapsed*100).toFixed(3);n.pageTimings[i].offset=u}}},updateTimeline:function(e){var t=this.table.firstChild,n;for(var r=this.firstRow;r;r=r.nextSibling){var i=r.repObject;if(!i)continue;if(Lib.hasClass(r,"netInfoRow"))continue;n=this.calculateFileTimes(e,i,n),r.phase=i.phase,delete i.phase;var s=Lib.getElementByClass(r,"netTimelineBar"),o=s.children[0],u=o.nextSibling,a=u.nextSibling,f=a.nextSibling,l=f.nextSibling,c=l.nextSibling;o.style.left=a.style.left=u.style.left=f.style.left=l.style.left=c.style.left=this.barOffset+"%",o.style.width=this.barBlockingWidth+"%",u.style.width=this.barResolvingWidth+"%",a.style.width=this.barConnectingWidth+"%",f.style.width=this.barSendingWidth+"%",l.style.width=this.barWaitingWidth+"%",c.style.width=this.barReceivingWidth+"%";var h=Lib.getElementsByClass(s,"netPageTimingBar");for(var p=0;p0&&t.push({label:r.name,time:i,classes:r.classes,comment:r.description})}var s=e.pageTimings?e.pageTimings._timeStamps:[];s&&t.push.apply(t,s);var o=this.phases;for(var n=0;n=u.startTime)u.startTime>c&&(u.startTime=c),u.endTime0&&(d+=" (onload: "+Lib.formatTime(e.pageTimings.onLoad)+")"),p.innerHTML=d},formatRequestCount:function(e){return e+" "+(e==1?Strings.request:Strings.requests)},summarizePhase:function(e){var t=0,n=0,r="all";r=="all"&&(r=null);var i=0,s=0,o=0;for(var u=0;uo&&(o=h)}}var p=o-s;return{cachedSize:t,totalSize:n,totalTime:p,fileCount:i}},showInfoTip:function(e,t,n,r){var i=Lib.getAncestorByClass(t,"netTable");if(!i||i.repObject!=this)return;var s=Lib.getAncestorByClass(t,"netRow");if(s){if(Lib.getAncestorByClass(t,"netBar")){e.setAttribute("multiline",!0);var o=s.repObject.startedDateTime+"-nettime";return this.infoTipURL=o,this.populateTimeInfoTip(e,s)}if(Lib.hasClass(t,"netSizeLabel")){var o=s.repObject.startedDateTime+"-netsize";return this.infoTipURL=o,this.populateSizeInfoTip(e,s)}}},populateTimeInfoTip:function(e,t){return EntryTimeInfoTip.render(this,t,e),!0},populateSizeInfoTip:function(e,t){return EntrySizeInfoTip.render(this,t,e),!0},render:function(e,t){var n=HarModel.getPageEntries(this.input,t);return n.length?this.append(e,t,n):null},append:function(e,t,n){this.table||(this.table=this.tableTag.replace({requestList:this},e,this)),this.summaryRow||(this.summaryRow=this.summaryTag.insertRows({},this.table.firstChild)[0]);var r=this.table.firstChild,i=r.lastChild.previousSibling,s=this.fileTag.insertRows({files:n},i,this);return this.updateLayout(this.table,t),s[0]},addPageTiming:function(e){this.pageTimings.push(e)}});function Phase(e){this.files=[],this.pageTimings=[],this.addFile(e)}Phase.prototype={addFile:function(e){this.files.push(e),e.phase=this},getLastStartTime:function(){return this.files[this.files.length-1].startedDateTime}};var EntryTimeInfoTip=domplate({tableTag:TABLE({"class":"timeInfoTip"},TBODY()),timingsTag:FOR("time","$timings",TR({"class":"timeInfoTipRow",$collapsed:"$time|hideBar"},TD({"class":"$time|getBarClass timeInfoTipBar",$loaded:"$time.loaded",$fromCache:"$time.fromCache"}),TD({"class":"timeInfoTipCell startTime"},"$time.start|formatStartTime"),TD({"class":"timeInfoTipCell elapsedTime"},"$time.elapsed|formatTime"),TD("$time|getLabel"))),startTimeTag:TR(TD(),TD("$startTime.time|formatStartTime"),TD({"class":"timeInfoTipStartLabel",colspan:2},"$startTime|getLabel")),separatorTag:TR({},TD({"class":"timeInfoTipSeparator",colspan:4,height:"10px"},SPAN("$label"))),eventsTag:FOR("event","$events",TR({"class":"timeInfoTipEventRow"},TD({"class":"timeInfoTipBar",align:"center"},DIV({"class":"$event|getPageTimingClass timeInfoTipEventBar"})),TD("$event.start|formatStartTime"),TD({colspan:2},"$event|getTimingLabel"))),hideBar:function(e){return!e.elapsed&&e.bar=="request.phase.Blocking"},getBarClass:function(e){var t=e.bar.substr(e.bar.lastIndexOf(".")+1);return"net"+t+"Bar"},getPageTimingClass:function(e){return e.classes?e.classes:""},formatTime:function(e){return Lib.formatTime(e)},formatStartTime:function(e){var t=e>0,n=Lib.formatTime(Math.abs(e));return e?(t>0?"+":"-")+n:n},getLabel:function(e){return Strings[e.bar]},getTimingLabel:function(e){return e.bar},render:function(e,t,n){var r=e.input,i=t.repObject,s=HarModel.getParentPage(r,i),o=s?Lib.parseISO8601(s.startedDateTime):null,u=Lib.parseISO8601(i.startedDateTime),a=EntryTimeInfoTip.tableTag.replace({},n),f={};o?f.time=u-o:f.time=u-t.phase.startTime,f.bar="request.Started",this.startTimeTag.insertRows({startTime:f},a.firstChild),this.separatorTag.insertRows({label:Strings["request.phases.label"]},a.firstChild);var l=0,c=[],h=i.timings.blocked,p=i.timings.dns,d=i.timings.ssl,v=i.timings.connect,m=i.timings.send,g=i.timings.wait,y=i.timings.receive;h>=0&&c.push({bar:"request.phase.Blocking",elapsed:h,start:l}),p>=0&&c.push({bar:"request.phase.Resolving",elapsed:p,start:l+=h<0?0:h}),v>=0&&c.push({bar:"request.phase.Connecting",elapsed:v,start:l+=p<0?0:p}),m>=0&&c.push({bar:"request.phase.Sending",elapsed:m,start:l+=v<0?0:v}),g>=0&&c.push({bar:"request.phase.Waiting",elapsed:g,start:l+=m<0?0:m}),y>=0&&c.push({bar:"request.phase.Receiving",elapsed:y,start:l+=g<0?0:g,loaded:i.loaded,fromCache:i.fromCache}),this.timingsTag.insertRows({timings:c},a.firstChild);if(!s)return!0;var b=[];for(var w=0;w-1;i.push({label:Strings["column.label."+o],type:"checkbox",checked:u,command:Lib.bindFixed(this.onToggleColumn,this,o)}),u&&(n=s,r++)}return r==1&&(i[n].disabled=!0),i.push("-"),i.push({label:Strings["action.label.Reset"],command:Lib.bindFixed(this.updateColumns,this)}),i},onToggleColumn:function(e){var t=RequestList.getVisibleColumns();Lib.remove(t,e)||t.push(e),this.updateColumns(t)},updateColumns:function(e){e||(e=RequestList.defaultColumns),RequestList.setVisibleColumns(e)},createRequestList:function(){var e=new RequestList(this.input);return e.listeners=this.listeners,e},append:function(e){var t=this.createRequestList();t.render(e,null);var n=this.input.log.pages;if(n&&n.length){var r=this.tableTag.append({input:this.input},e,this),i=Lib.getElementsByClass(r,"pageRow"),s=Lib.getElementsByClass(e,"pageTable");i.length==1&&s.length==1&&this.toggleRow(i[0]);var o=Lib.getURLParameter("expand");o&&this.expandAll(r)}},render:function(e){this.append(e)},addListener:function(e){this.listeners.push(e)},removeListener:function(e){Lib.remove(this.listeners,e)}}),PageList.prototype.pageTimings=[],PageList}}),define("domplate/toolbar",["domplate/domplate","core/lib","core/trace","domplate/popupMenu"],function(Domplate,Lib,Trace,Menu){with(Domplate){var ToolbarTempl=domplate({tag:DIV({"class":"toolbar",onclick:"$onClick"}),buttonTag:SPAN({"class":"$button|getClassName toolbarButton",title:"$button.tooltiptext",$text:"$button|hasLabel",onclick:"$button|getCommand"},"$button|getLabel"),dropDownTag:SPAN({"class":"$button|getClassName toolbarButton dropDown",_repObject:"$button",title:"$button.tooltiptext",$text:"$button|hasLabel",onclick:"$onDropDown"},"$button|getLabel",SPAN({"class":"arrow"})),separatorTag:SPAN({"class":"toolbarSeparator",style:"color: gray;"},"|"),hasLabel:function(e){return e.label?!0:!1},getLabel:function(e){return e.label?e.label:""},getClassName:function(e){return e.className?e.className:""},getCommand:function(e){return e.command?e.command:function(){}},onClick:function(e){var t=$.event.fix(e||window.event);Lib.cancelEvent(t)},onDropDown:function(e){var t=$.event.fix(e||window.event),n=t.target,r=Lib.getAncestorByClass(n,"toolbarButton"),i=r.repObject.items,s=new Menu({id:"toolbarContextMenu",items:i});s.showPopup(r)}});function Toolbar(){this.buttons=[]}return Toolbar.prototype={addButton:function(e){e.tooltiptext||(tooltiptext=""),this.buttons.push(e)},removeButton:function(e){for(var t=0;t0)return;this.toggle(e)},toggle:function(e){var t=Lib.getAncestorByClass(e,"menu"),n=Lib.getElementByClass(t,"menuContent");$(n).animate({width:"toggle"},undefined,undefined,function(){var e=Lib.getElementByClass(t,"menuHandle");n.clientWidth>0?Lib.setClass(e,"opened"):Lib.removeClass(e,"opened")})},render:function(e,t){return this.tag.append({object:t},e,this)}});return Menu}}),define("preview/validationError",["domplate/domplate","core/lib","core/trace","domplate/popupMenu"],function(Domplate,Lib,Trace,Menu){with(Domplate){var ValidationError=domplate({errorTable:TABLE({"class":"errorTable",cellpadding:3,cellspacing:0},TBODY(FOR("error","$errors",TR({"class":"errorRow",_repObject:"$error"},TD({"class":"errorProperty"},SPAN("$error.property")),TD({"class":"errorOptions",$hasTarget:"$error|hasTarget"},DIV({"class":"errorOptionsTarget",onclick:"$onOpenOptions"}," ")),TD(" "),TD({"class":"errorMessage"},SPAN("$error.message")))))),hasTarget:function(e){return e.input&&e.file},onOpenOptions:function(e){var t=Lib.fixEvent(e);Lib.cancelEvent(e);if(!Lib.isLeftClick(e))return;var n=t.target,r=Lib.getAncestorByClass(n,"errorRow"),i=r.repObject;if(!i||!i.input||!i.file)return;var s=this.getMenuItems(i.input,i.file);if(!s.length)return;var o=new Menu({id:"requestContextMenu",items:s});o.showPopup(n)},getMenuItems:function(e,t){var n=[];return Lib.dispatch(this.listeners,"getMenuItems",[n,e,t]),n},listeners:[],addListener:function(e){this.listeners.push(e)},removeListener:function(e){Lib.remove(this.listeners,e)},appendError:function(e,t){e.errors&&this.errorTable.append(e,t)}});return ValidationError}}),define("harPreview",["preview/requestList","preview/pageList","preview/harModel","core/lib","core/trace","preview/menu","preview/validationError"],function(e,t,n,r,i,s,o){function u(){this.id="harPreview",this.model=new n}u.prototype={initialize:function(e){this.topMenu=new s,this.topMenu.render(e);var t=r.bind(this.appendPreview,this),i=r.bind(this.onError,this);n.Loader.run(t,i)},appendPreview:function(e){try{var s=!0,u=r.getURLParameter("validate");u=="false"&&(s=!1);var f=n.parse(e,s);this.model.append(f);var l=new t(f);l.render(a),r.fireEvent(a,"onPreviewHARLoaded")}catch(c){i.exception("HarPreview.appendPreview; EXCEPTION ",c),o.appendError(c,a)}},onError:function(e,t,n){i.log("HarPreview; Load error ",e,t,n)},loadHar:function(e,t){return t=t||{},n.Loader.load(this,e,t.jsonp,t.jsonpCallback,t.success,t.ajaxError)},setPreviewColumns:function(t,n){e.setVisibleColumns(t,n)}};var a=document.getElementById("content"),f=a.repObject=new u;r.fireEvent(a,"onPreviewPreInit"),f.initialize(a),r.fireEvent(a,"onPreviewInit"),i.log("HarPreview; initialized OK")});