'use strict';const RATINGS={PASS:{label:'pass',minScore:75},AVERAGE:{label:'average',minScore:45},FAIL:{label:'fail'}};class Util{static calculateRating(score){let rating=RATINGS.FAIL.label;if(score>=RATINGS.PASS.minScore){rating=RATINGS.PASS.label;}else if(score>=RATINGS.AVERAGE.minScore){rating=RATINGS.AVERAGE.label;}
return rating;}
static formatNumber(number){return number.toLocaleString(undefined,{maximumFractionDigits:1});}
static formatDateTime(date){const options={month:'short',day:'numeric',year:'numeric',hour:'numeric',minute:'numeric',timeZoneName:'short'};let formatter=new Intl.DateTimeFormat('en-US',options);const tz=formatter.resolvedOptions().timeZone;if(!tz||tz.toLowerCase()==='etc/unknown'){options.timeZone='UTC';formatter=new Intl.DateTimeFormat('en-US',options);}
return formatter.format(new Date(date));}}
if(typeof module!=='undefined'&&module.exports){module.exports=Util;}else{self.Util=Util;};'use strict';class DOM{constructor(document){this._document=document;}
createElement(name,className,attrs={}){const element=this._document.createElement(name);if(className){element.className=className;}
Object.keys(attrs).forEach(key=>{const value=attrs[key];if(typeof value!=='undefined'){element.setAttribute(key,value);}});return element;}
cloneTemplate(selector,context){const template=(context.querySelector(selector));if(!template){throw new Error(`Template not found: template${selector}`);}
const clone=(this._document.importNode(template.content,true));if(template.hasAttribute('data-stamped')){this.findAll('style',clone).forEach(style=>style.remove());}
template.setAttribute('data-stamped',true);return clone;}
resetTemplates(){this.findAll('template[data-stamped]',this._document).forEach(t=>{t.removeAttribute('data-stamped');});}
createSpanFromMarkdown(text){const element=this.createElement('span');const parts=text.split(/\[(.*?)\]\((https?:\/\/.*?)\)/g);while(parts.length){const[preambleText,linkText,linkHref]=parts.splice(0,3);element.appendChild(this._document.createTextNode(preambleText));if(linkText&&linkHref){const a=(this.createElement('a'));a.rel='noopener';a.target='_blank';a.textContent=linkText;a.href=(new URL(linkHref)).href;element.appendChild(a);}}
return element;}
document(){return this._document;}
find(query,context){const result=context.querySelector(query);if(result===null){throw new Error(`query ${query} not found`);}
return result;}
findAll(query,context){return Array.from(context.querySelectorAll(query));}}
if(typeof module!=='undefined'&&module.exports){module.exports=DOM;}else{self.DOM=DOM;};'use strict';class DetailsRenderer{constructor(dom){this._dom=dom;}
render(details){switch(details.type){case'text':return this._renderText(details);case'cards':return this._renderCards((details));case'list':return this._renderList((details));default:throw new Error(`Unknown type: ${details.type}`);}}
_renderText(text){const element=this._dom.createElement('div','lh-text');element.textContent=text.text;return element;}
_renderList(list){const element=this._dom.createElement('details','lh-details');if(list.header){const summary=this._dom.createElement('summary','lh-list__header');summary.textContent=list.header.text;element.appendChild(summary);}
const itemsElem=this._dom.createElement('div','lh-list__items');for(const item of list.items){itemsElem.appendChild(this.render(item));}
element.appendChild(itemsElem);return element;}
_renderCards(details){const element=this._dom.createElement('details','lh-details');if(details.header){element.appendChild(this._dom.createElement('summary')).textContent=details.header.text;}
const cardsParent=this._dom.createElement('div','lh-scorecards');for(const item of details.items){const card=cardsParent.appendChild(this._dom.createElement('div','lh-scorecard',{title:item.snippet}));const titleEl=this._dom.createElement('div','lh-scorecard__title');const valueEl=this._dom.createElement('div','lh-scorecard__value');const targetEl=this._dom.createElement('div','lh-scorecard__target');card.appendChild(titleEl).textContent=item.title;card.appendChild(valueEl).textContent=item.value;if(item.target){card.appendChild(targetEl).textContent=`target: ${item.target}`;}}
element.appendChild(cardsParent);return element;}}
if(typeof module!=='undefined'&&module.exports){module.exports=DetailsRenderer;}else{self.DetailsRenderer=DetailsRenderer;}
DetailsRenderer.DetailsJSON;DetailsRenderer.ListDetailsJSON;DetailsRenderer.CardsDetailsJSON;;'use strict';class CategoryRenderer{constructor(dom,detailsRenderer){this._dom=dom;this._detailsRenderer=detailsRenderer;this._templateContext=this._dom.document();}
_renderAuditScore(audit){const tmpl=this._dom.cloneTemplate('#tmpl-lh-audit-score',this._templateContext);const scoringMode=audit.result.scoringMode;const description=audit.result.helpText;let title=audit.result.description;if(audit.result.displayValue){title+=`:  ${audit.result.displayValue}`;}
if(audit.result.optimalValue){title+=` (target: ${audit.result.optimalValue})`;}
if(audit.result.debugString){const debugStrEl=tmpl.appendChild(this._dom.createElement('div','lh-debug'));debugStrEl.textContent=audit.result.debugString;}
const header=(this._dom.find('.lh-score__header',tmpl));if(audit.result.details){header.appendChild(this._detailsRenderer.render(audit.result.details));}
const scoreEl=this._dom.find('.lh-score',tmpl);if(audit.result.informative){scoreEl.classList.add('lh-score--informative');}
return this._populateScore(tmpl,audit.score,scoringMode,title,description);}
_populateScore(element,score,scoringMode,title,description){const valueEl=this._dom.find('.lh-score__value',element);valueEl.textContent=Util.formatNumber(score);valueEl.classList.add(`lh-score__value--${Util.calculateRating(score)}`,`lh-score__value--${scoringMode}`);this._dom.find('.lh-score__title',element).textContent=title;this._dom.find('.lh-score__description',element).appendChild(this._dom.createSpanFromMarkdown(description));return(element);}
_renderCategoryScore(category){const tmpl=this._dom.cloneTemplate('#tmpl-lh-category-score',this._templateContext);const score=Math.round(category.score);const gaugeContainerEl=this._dom.find('.lh-score__gauge',tmpl);const gaugeEl=this.renderScoreGauge(category);gaugeContainerEl.appendChild(gaugeEl);return this._populateScore(tmpl,score,'numeric',category.name,category.description);}
_renderAudit(audit){const element=this._dom.createElement('div','lh-audit');element.appendChild(this._renderAuditScore(audit));return element;}
setTemplateContext(context){this._templateContext=context;}
renderScoreGauge(category){const tmpl=this._dom.cloneTemplate('#tmpl-lh-gauge',this._templateContext);this._dom.find('.lh-gauge__wrapper',tmpl).href=`#${category.id}`;this._dom.find('.lh-gauge__label',tmpl).textContent=category.name;const score=Math.round(category.score);const fillRotation=Math.floor((score/100)*180);const gauge=this._dom.find('.lh-gauge',tmpl);gauge.setAttribute('data-progress',score);gauge.classList.add(`lh-gauge--${Util.calculateRating(score)}`);this._dom.findAll('.lh-gauge__fill',gauge).forEach(el=>{el.style.transform=`rotate(${fillRotation}deg)`;});this._dom.find('.lh-gauge__mask--full',gauge).style.transform=`rotate(${fillRotation}deg)`;this._dom.find('.lh-gauge__fill--fix',gauge).style.transform=`rotate(${fillRotation * 2}deg)`;this._dom.find('.lh-gauge__percentage',gauge).textContent=score;return tmpl;}
render(category,groups){switch(category.id){case'accessibility':return this._renderAccessibilityCategory(category,groups);default:return this._renderDefaultCategory(category);}}
_renderDefaultCategory(category){const element=this._dom.createElement('div','lh-category');element.id=category.id;element.appendChild(this._renderCategoryScore(category));const passedAudits=category.audits.filter(audit=>audit.score===100);const nonPassedAudits=category.audits.filter(audit=>!passedAudits.includes(audit));for(const audit of nonPassedAudits){element.appendChild(this._renderAudit(audit));}
if(!passedAudits.length){return element;}
const passedElem=this._dom.createElement('details','lh-passed-audits');const passedSummary=this._dom.createElement('summary','lh-passed-audits-summary');passedSummary.textContent=`View ${passedAudits.length} passed items`;passedElem.appendChild(passedSummary);for(const audit of passedAudits){passedElem.appendChild(this._renderAudit(audit));}
element.appendChild(passedElem);return element;}
_renderAuditGroup(audits,group){const auditGroupElem=this._dom.createElement('details','lh-audit-group lh-expandable-details');const auditGroupHeader=this._dom.createElement('div','lh-audit-group__header lh-expandable-details__header');auditGroupHeader.textContent=group.title;const auditGroupDescription=this._dom.createElement('div','lh-audit-group__description');auditGroupDescription.textContent=group.description;const auditGroupSummary=this._dom.createElement('summary','lh-audit-group__summary lh-expandable-details__summary');const auditGroupArrow=this._dom.createElement('div','lh-toggle-arrow',{title:'See audits',});auditGroupSummary.appendChild(auditGroupHeader);auditGroupSummary.appendChild(auditGroupArrow);auditGroupElem.appendChild(auditGroupSummary);auditGroupElem.appendChild(auditGroupDescription);audits.forEach(audit=>auditGroupElem.appendChild(this._renderAudit(audit)));return auditGroupElem;}
_renderAccessibilityCategory(category,groupDefinitions){const element=this._dom.createElement('div','lh-category');element.id=category.id;element.appendChild(this._renderCategoryScore(category));const auditsGroupedByGroup=({});category.audits.forEach(audit=>{const groupId=audit.group;const groups=auditsGroupedByGroup[groupId]||{passed:[],failed:[]};if(audit.score===100){groups.passed.push(audit);}else{groups.failed.push(audit);}
auditsGroupedByGroup[groupId]=groups;});const passedElements=([]);Object.keys(auditsGroupedByGroup).forEach(groupId=>{const group=groupDefinitions[groupId];const groups=auditsGroupedByGroup[groupId];if(groups.failed.length){const auditGroupElem=this._renderAuditGroup(groups.failed,group);auditGroupElem.open=true;element.appendChild(auditGroupElem);}
if(groups.passed.length){const auditGroupElem=this._renderAuditGroup(groups.passed,group);passedElements.push(auditGroupElem);}});if(!passedElements.length)return element;const passedElem=this._dom.createElement('details','lh-passed-audits');const passedSummary=this._dom.createElement('summary','lh-passed-audits-summary');passedElem.appendChild(passedSummary);passedSummary.textContent=`View ${passedElements.length} passed items`;passedElements.forEach(elem=>passedElem.appendChild(elem));element.appendChild(passedElem);return element;}}
if(typeof module!=='undefined'&&module.exports){module.exports=CategoryRenderer;}else{self.CategoryRenderer=CategoryRenderer;};'use strict';class ReportRenderer{constructor(dom,categoryRenderer,uiFeatures=null){this._dom=dom;this._categoryRenderer=categoryRenderer;this._templateContext=this._dom.document();this._uiFeatures=uiFeatures;}
renderReport(report,container){container.textContent='';const element=container.appendChild(this._renderReport(report));if(this._uiFeatures){this._uiFeatures.initFeatures(report);}
return(element);}
setTemplateContext(context){this._templateContext=context;this._categoryRenderer.setTemplateContext(context);}
_renderReportHeader(report){const header=this._dom.cloneTemplate('#tmpl-lh-heading',this._templateContext);this._dom.find('.lh-config__timestamp',header).textContent=Util.formatDateTime(report.generatedTime);const url=this._dom.find('.lh-metadata__url',header);url.href=report.url;url.textContent=report.url;const env=this._dom.find('.lh-env__items',header);report.runtimeConfig.environment.forEach(runtime=>{const item=this._dom.cloneTemplate('#tmpl-lh-env__items',env);this._dom.find('.lh-env__name',item).textContent=runtime.name;this._dom.find('.lh-env__description',item).textContent=runtime.description;this._dom.find('.lh-env__enabled',item).textContent=runtime.enabled?'Enabled':'Disabled';env.appendChild(item);});return header;}
_renderReportFooter(report){const footer=this._dom.cloneTemplate('#tmpl-lh-footer',this._templateContext);this._dom.find('.lh-footer__version',footer).textContent=report.lighthouseVersion;this._dom.find('.lh-footer__timestamp',footer).textContent=Util.formatDateTime(report.generatedTime);return footer;}
_renderReportNav(report){const leftNav=this._dom.cloneTemplate('#tmpl-lh-leftnav',this._templateContext);this._dom.find('.leftnav__header__version',leftNav).textContent=`Version: ${report.lighthouseVersion}`;const nav=this._dom.find('.lh-leftnav',leftNav);for(const category of report.reportCategories){const itemsTmpl=this._dom.cloneTemplate('#tmpl-lh-leftnav__items',leftNav);const navItem=this._dom.find('.lh-leftnav__item',itemsTmpl);navItem.href=`#${category.id}`;this._dom.find('.leftnav-item__category',navItem).textContent=category.name;const score=this._dom.find('.leftnav-item__score',navItem);score.classList.add(`lh-score__value--${Util.calculateRating(category.score)}`);score.textContent=Math.round(Util.formatNumber(category.score));nav.appendChild(navItem);}
return leftNav;}
_renderReport(report){const container=this._dom.createElement('div','lh-container');container.appendChild(this._renderReportHeader(report));container.appendChild(this._renderReportNav(report));const reportSection=container.appendChild(this._dom.createElement('div','lh-report'));const scoreHeader=reportSection.appendChild(this._dom.createElement('div','lh-scores-header'));const categories=reportSection.appendChild(this._dom.createElement('div','lh-categories'));for(const category of report.reportCategories){scoreHeader.appendChild(this._categoryRenderer.renderScoreGauge(category));categories.appendChild(this._categoryRenderer.render(category,report.reportGroups));}
reportSection.appendChild(this._renderReportFooter(report));return container;}}
if(typeof module!=='undefined'&&module.exports){module.exports=ReportRenderer;}else{self.ReportRenderer=ReportRenderer;}
ReportRenderer.AuditJSON;ReportRenderer.CategoryJSON;ReportRenderer.GroupJSON;ReportRenderer.ReportJSON;;Audits2.Audits2Panel=class extends UI.PanelWithSidebar{constructor(){super('audits2');this.setHideOnDetach();this.registerRequiredCSS('audits2/audits2Panel.css');this.registerRequiredCSS('audits2/lighthouse/report-styles.css');this._protocolService=new Audits2.ProtocolService();this._protocolService.registerStatusCallback(msg=>this._updateStatus(Common.UIString(msg)));var toolbar=new UI.Toolbar('',this.panelSidebarElement());var newButton=new UI.ToolbarButton(Common.UIString('New audit\u2026'),'largeicon-add');toolbar.appendToolbarItem(newButton);newButton.addEventListener(UI.ToolbarButton.Events.Click,this._showLauncherUI.bind(this));var deleteButton=new UI.ToolbarButton(Common.UIString('Delete audit'),'largeicon-delete');toolbar.appendToolbarItem(deleteButton);deleteButton.addEventListener(UI.ToolbarButton.Events.Click,this._deleteSelected.bind(this));toolbar.appendSeparator();var clearButton=new UI.ToolbarButton(Common.UIString('Clear all'),'largeicon-clear');toolbar.appendToolbarItem(clearButton);clearButton.addEventListener(UI.ToolbarButton.Events.Click,this._clearAll.bind(this));this._treeOutline=new UI.TreeOutlineInShadow();this._treeOutline.registerRequiredCSS('audits2/lighthouse/report-styles.css');this._treeOutline.registerRequiredCSS('audits2/audits2Tree.css');this.panelSidebarElement().appendChild(this._treeOutline.element);this._dropTarget=new UI.DropTarget(this.contentElement,[UI.DropTarget.Types.Files],Common.UIString('Drop audit file here'),this._handleDrop.bind(this));this._showLandingPage();}
_clearAll(){this._treeOutline.removeChildren();if(!this._treeOutline.rootElement().childCount())
this._showLandingPage();}
_deleteSelected(){var selection=this._treeOutline.selectedTreeElement;if(selection)
this._treeOutline.removeChild(selection);if(!this._treeOutline.rootElement().childCount())
this._showLandingPage();}
_showLandingPage(){this.mainElement().removeChildren();var landingPage=this.mainElement().createChild('div','vbox audits2-landing-page');var landingCenter=landingPage.createChild('div','vbox audits2-landing-center');landingCenter.createChild('div','audits2-logo');var text=landingCenter.createChild('div','audits2-landing-text');text.createChild('span','audits2-landing-bold-text').textContent=Common.UIString('Audits');text.createChild('span').textContent=Common.UIString(' help you identify and fix common problems that affect'+' your site\'s performance, accessibility, and user experience. ');var link=text.createChild('span','link');link.textContent=Common.UIString('Learn more');link.addEventListener('click',()=>InspectorFrontendHost.openInNewTab('https://developers.google.com/web/tools/lighthouse/'));var newButton=UI.createTextButton(Common.UIString('Perform an audit\u2026'),this._showLauncherUI.bind(this),'material-button default');landingCenter.appendChild(newButton);}
_showLauncherUI(){this._dialog=new UI.Dialog();this._dialog.setOutsideClickCallback(event=>event.consume(true));var root=UI.createShadowRootWithCoreStyles(this._dialog.contentElement,'audits2/audits2Dialog.css');var auditsViewElement=root.createChild('div','audits2-view');var uiElement=auditsViewElement.createChild('div');var headerElement=uiElement.createChild('header');this._headerTitleElement=headerElement.createChild('p');this._headerTitleElement.textContent=Common.UIString('Audits to perform');uiElement.appendChild(headerElement);this._auditSelectorForm=uiElement.createChild('form','audits2-form');for(var preset of Audits2.Audits2Panel.Presets){preset.setting.setTitle(preset.title);var checkbox=new UI.ToolbarSettingCheckbox(preset.setting);var row=this._auditSelectorForm.createChild('div','vbox audits2-launcher-row');row.appendChild(checkbox.element);row.createChild('span','audits2-launcher-description dimmed').textContent=preset.description;}
this._statusView=this._createStatusView(uiElement);var buttonsRow=uiElement.createChild('div','audits2-dialog-buttons hbox');this._startButton=UI.createTextButton(Common.UIString('Run audit'),this._start.bind(this),'material-button default');buttonsRow.appendChild(this._startButton);this._cancelButton=UI.createTextButton(Common.UIString('Cancel'),this._cancel.bind(this),'material-button');buttonsRow.appendChild(this._cancelButton);this._dialog.setSizeBehavior(UI.GlassPane.SizeBehavior.SetExactWidthMaxHeight);this._dialog.setMaxContentSize(new UI.Size(500,400));this._dialog.show(this.mainElement());auditsViewElement.tabIndex=0;auditsViewElement.focus();}
_createStatusView(launcherUIElement){var statusView=launcherUIElement.createChild('div','audits2-status vbox hidden');this._statusIcon=statusView.createChild('div','icon');this._statusElement=statusView.createChild('div');this._updateStatus(Common.UIString('Loading...'));return statusView;}
_start(){this._dialog.setCloseOnEscape(false);this._inspectedURL=SDK.targetManager.mainTarget().inspectedURL();var categoryIDs=[];for(var preset of Audits2.Audits2Panel.Presets){if(preset.setting.get())
categoryIDs.push(preset.configID);}
return Promise.resolve().then(_=>this._protocolService.attach()).then(_=>{this._auditRunning=true;this._updateButton();this._updateStatus(Common.UIString('Loading\u2026'));}).then(_=>this._protocolService.startLighthouse(this._inspectedURL,categoryIDs)).then(lighthouseResult=>{this._finish(lighthouseResult);return this._stop();}).catch(err=>{if(err instanceof Error)
this._renderBugReport(err);});}
_hideDialog(){if(!this._dialog)
return;this._dialog.hide();delete this._dialog;delete this._statusView;delete this._statusIcon;delete this._statusElement;delete this._startButton;delete this._cancelButton;delete this._auditSelectorForm;delete this._headerTitleElement;}
_cancel(){if(this._auditRunning){this._updateStatus(Common.UIString('Cancelling\u2026'));this._stop();}else{this._hideDialog();}}
_updateButton(){if(!this._dialog)
return;this._startButton.classList.toggle('hidden',this._auditRunning);this._startButton.disabled=this._auditRunning;this._statusView.classList.toggle('hidden',!this._auditRunning);this._auditSelectorForm.classList.toggle('hidden',this._auditRunning);if(this._auditRunning)
this._headerTitleElement.textContent=Common.UIString('Auditing your web page \u2026');else
this._headerTitleElement.textContent=Common.UIString('Audits to perform');}
_updateStatus(statusMessage){if(!this._dialog)
return;this._statusElement.textContent=statusMessage;}
_stop(){return this._protocolService.detach().then(_=>{this._auditRunning=false;this._updateButton();var resourceTreeModel=SDK.targetManager.mainTarget().model(SDK.ResourceTreeModel);if(resourceTreeModel&&this._inspectedURL!==SDK.targetManager.mainTarget().inspectedURL())
resourceTreeModel.navigate(this._inspectedURL).then(()=>this._hideDialog());else
this._hideDialog();});}
_finish(lighthouseResult){if(lighthouseResult===null){this._updateStatus(Common.UIString('Auditing failed.'));return;}
var treeElement=new Audits2.Audits2Panel.TreeElement(lighthouseResult,this.mainElement());this._treeOutline.appendChild(treeElement);treeElement._populate();treeElement.select();this._hideDialog();}
_renderBugReport(err){console.error(err);this._statusElement.textContent='';this._statusIcon.classList.add('error');this._statusElement.createTextChild(Common.UIString('We ran into an error. '));this._createBugReportLink(err,this._statusElement);}
_createBugReportLink(err,parentElem){var baseURI='https://github.com/GoogleChrome/lighthouse/issues/new?';var title=encodeURI('title=DevTools Error: '+err.message.substring(0,60));var qsBody='';qsBody+='**Error Message**: '+err.message+'\n';qsBody+='**Stack Trace**:\n ```'+err.stack+'```';var body='&body='+encodeURI(qsBody);var reportErrorEl=parentElem.createChild('a','audits2-link audits2-report-error');reportErrorEl.href=baseURI+title+body;reportErrorEl.textContent=Common.UIString('Report this bug');reportErrorEl.target='_blank';}
_handleDrop(dataTransfer){var items=dataTransfer.items;if(!items.length)
return;var item=items[0];if(item.kind==='file'){var entry=items[0].webkitGetAsEntry();if(!entry.isFile)
return;entry.file(file=>{var reader=new FileReader();reader.onload=()=>this._loadedFromFile((reader.result));reader.readAsText(file);});}}
_loadedFromFile(profile){var data=JSON.parse(profile);if(!data['lighthouseVersion'])
return;this._finish((data));}};Audits2.Audits2Panel.ReportRenderer=class extends ReportRenderer{_renderReportNav(){return createDocumentFragment();}
_renderReportHeader(report){return createDocumentFragment();}};class ReportUIFeatures{initFeatures(report){}}
Audits2.Audits2Panel.Preset;Audits2.Audits2Panel.Presets=[{setting:Common.settings.createSetting('audits2.cat_pwa',true),configID:'pwa',title:'Progressive Web App',description:'Does this page meet the standard of a Progressive Web App'},{setting:Common.settings.createSetting('audits2.cat_perf',true),configID:'performance',title:'Performance',description:'How long does this app take to show content and become usable'},{setting:Common.settings.createSetting('audits2.cat_best_practices',true),configID:'best-practices',title:'Best practices',description:'Does this page follow best practices for modern web development'},{setting:Common.settings.createSetting('audits2.cat_a11y',true),configID:'accessibility',title:'Accessibility',description:'Is this page usable by people with disabilities or impairments'},];Audits2.ProtocolService=class extends Common.Object{constructor(){super();this._rawConnection=null;this._backend=null;this._backendPromise=null;this._status=null;}
attach(){return SDK.targetManager.interceptMainConnection(this._dispatchProtocolMessage.bind(this)).then(rawConnection=>{this._rawConnection=rawConnection;});}
startLighthouse(inspectedURL,categoryIDs){return this._send('start',{url:inspectedURL,categoryIDs});}
detach(){return Promise.resolve().then(()=>this._send('stop')).then(()=>this._backend.dispose()).then(()=>{delete this._backend;delete this._backendPromise;return this._rawConnection.disconnect();});}
registerStatusCallback(callback){this._status=callback;}
_dispatchProtocolMessage(message){this._send('dispatchProtocolMessage',{message:message});}
_initWorker(){this._backendPromise=Services.serviceManager.createAppService('audits2_worker','Audits2Service',false).then(backend=>{if(this._backend)
return;this._backend=backend;this._backend.on('statusUpdate',result=>this._status(result.message));this._backend.on('sendProtocolMessage',result=>this._rawConnection.sendMessage(result.message));});}
_send(method,params){if(!this._backendPromise)
this._initWorker();return this._backendPromise.then(_=>this._backend.send(method,params));}};Audits2.Audits2Panel.TreeElement=class extends UI.TreeElement{constructor(lighthouseResult,resultsView){super('',false);this._lighthouseResult=lighthouseResult;this._resultsView=resultsView;this._reportContainer=null;var url=new Common.ParsedURL(lighthouseResult.url);var timestamp=lighthouseResult.generatedTime;var titleElement=this.titleElement();titleElement.classList.add('audits2-report-tree-item');titleElement.createChild('div').textContent=url.domain();titleElement.createChild('span','dimmed').textContent=new Date(timestamp).toLocaleString();this.listItemElement.addEventListener('contextmenu',this._handleContextMenuEvent.bind(this),false);}
_populate(){for(var category of this._lighthouseResult.reportCategories){var treeElement=new Audits2.Audits2Panel.TreeSubElement(category.id,category.name,category.score);this.appendChild(treeElement);}}
onselect(selectedByUser){this._renderReport();return true;}
_handleContextMenuEvent(event){var contextMenu=new UI.ContextMenu(event);contextMenu.appendItem(Common.UIString('Save as\u2026'),()=>{var url=new Common.ParsedURL(this._lighthouseResult.url).domain();var timestamp=this._lighthouseResult.generatedTime;var fileName=`${url}-${new Date(timestamp).toISO8601Compact()}.json`;Workspace.fileManager.save(fileName,JSON.stringify(this._lighthouseResult),true);});contextMenu.show();}
onunbind(){if(this._reportContainer&&this._reportContainer.parentElement)
this._reportContainer.remove();}
_renderReport(){this._resultsView.removeChildren();if(this._reportContainer){this._resultsView.appendChild(this._reportContainer);return;}
this._reportContainer=this._resultsView.createChild('div','report-container lh-vars lh-root');var dom=new DOM((this._resultsView.ownerDocument));var detailsRenderer=new DetailsRenderer(dom);var categoryRenderer=new CategoryRenderer(dom,detailsRenderer);var renderer=new Audits2.Audits2Panel.ReportRenderer(dom,categoryRenderer);var templatesHTML=Runtime.cachedResources['audits2/lighthouse/templates.html'];var templatesDOM=new DOMParser().parseFromString(templatesHTML,'text/html');if(!templatesDOM)
return;renderer.setTemplateContext(templatesDOM);renderer.renderReport(this._lighthouseResult,this._reportContainer);}};Audits2.Audits2Panel.TreeSubElement=class extends UI.TreeElement{constructor(id,name,score){super('');this._id=id;this.listItemElement.textContent=name;var label=Util.calculateRating(score);var subtitleElement=this.listItemElement.createChild('span','lh-vars audits2-tree-subtitle-'+label);subtitleElement.textContent=String(Math.round(score));}
onselect(){this.parent._renderReport();var node=this.parent._resultsView.querySelector('.lh-category[id='+this._id+']');if(node){node.scrollIntoView(true);return true;}
return false;}};;Runtime.cachedResources["audits2/audits2Dialog.css"]="/*\n * Copyright 2017 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.audits2-view {\n    margin: 7px 20px;\n    flex: auto;\n    align-items: center;\n}\n\nheader {\n    color: #666;\n    font-weight: bold;\n    font-size: 14px;\n}\n\n.audits2-form label {\n    display: flex;\n}\n\n.audits2-form label div {\n    display: inline;\n}\n\n.audits2-status {\n    flex: auto;\n    align-items: center;\n    color: #666;\n}\n\n.audits2-status .icon {\n    width: 64px;\n    height: 64px;\n    margin: 20px;\n    animation: spinner-animation 1200ms linear infinite;\n    transform-origin: 50% 50%;\n    padding: 4px;\n}\n\n.audits2-status .icon::before {\n    display: inline-block;\n    border: 4px solid #1565C0;\n    border-radius: 28px;\n    width: 56px;\n    height: 56px;\n    content: \"\";\n    position: absolute;\n    box-sizing: border-box;\n}\n\n.audits2-status .icon::after {\n    display: inline-block;\n    width: 24px;\n    height: 28px;\n    background: white;\n    position: absolute;\n    content: \"\";\n}\n\nbutton {\n    margin: 15px 10px;\n}\n\n.audits2-status .icon.error,\n.audits2-status .icon.error::before,\n.audits2-status .icon.error::after {\n    display: none;\n}\n\n.audits2-launcher-row {\n    padding: 6px;\n}\n\n.audits2-launcher-description {\n    padding: 3px 0 0 22px;\n}\n\n.audits2-dialog-buttons {\n    justify-content: center;\n}\n\n@keyframes spinner-animation {\n    from { transform: rotate(0); }\n    to { transform: rotate(360deg); }\n\n/*# sourceURL=audits2/audits2Dialog.css */";Runtime.cachedResources["audits2/audits2Panel.css"]="/*\n * Copyright 2017 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.toolbar {\n    border-bottom: 1px solid #ccc;\n}\n\n.audits2-logo {\n    width: 210px;\n    height: 200px;\n    flex-shrink: 0;\n    background-repeat: no-repeat;\n    background-size: contain;\n    margin-top: 10px;\n    background-image: url(Images/audits_logo.svg);\n}\n\n.audits2-landing-page {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n}\n\n\n.audits2-landing-center {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    max-width: 400px;\n    margin: 50px;\n}\n\n.audits2-landing-text {\n    color: #666;\n}\n\n.audits2-landing-bold-text {\n    font-weight: bold;\n}\n\n.lh-root {\n  --report-menu-width: 0 !important;\n}\n\n.audits2-landing-center button {\n    margin-top: 20px;\n}\n\n.report-container {\n    overflow: auto;\n    position: relative;\n}\n\n/*# sourceURL=audits2/audits2Panel.css */";Runtime.cachedResources["audits2/audits2Tree.css"]="/*\n * Copyright 2017 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n */\n\n.tree-outline .audits2-report-tree-item {\n  min-height: 36px;\n  padding: 2px 3px;\n  line-height: 16px;\n}\n\n.tree-outline li {\n  min-height: 25px;\n}\n\n.audits2-tree-subtitle-pass,\n.audits2-tree-subtitle-average,\n.audits2-tree-subtitle-fail {\n  flex: auto;\n  text-align: end;\n  margin-right: 10px;\n}\n\n.audits2-tree-subtitle-pass {\n  color: var(--pass-color);\n}\n\n.audits2-tree-subtitle-average {\n  color: var(--average-color);\n}\n\n.audits2-tree-subtitle-fail {\n  color: var(--fail-color);\n}\n\n/*# sourceURL=audits2/audits2Tree.css */";Runtime.cachedResources["audits2/lighthouse/report-styles.css"]="/**\n * Copyright 2017 Google Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n.lh-vars {\n  --text-font-family: '.SFNSDisplay-Regular', 'Helvetica Neue', 'Lucida Grande', sans-serif;\n  --body-font-size: 13px;\n  --header-font-size: 16px;\n  --body-line-height: 1.5;\n  --default-padding: 16px;\n\n  --secondary-text-color: #565656;\n  /*--accent-color: #3879d9;*/\n  --fail-color: #df332f;\n  --pass-color: #2b882f;\n  --informative-color: #0c50c7;\n  --average-color: #ef6c00; /* md orange 800 */\n  --warning-color: #757575; /* md grey 600 */\n\n  --report-border-color: #ccc;\n  --report-secondary-border-color: #ebebeb;\n  --report-width: 850px;\n  --report-menu-width: 280px;\n  --report-content-width: calc(var(--report-width) + var(--report-menu-width));\n\n  --lh-score-highlight-bg: #fafafa;\n  --lh-score-icon-background-size: 24px;\n  --lh-score-margin: calc(var(--default-padding) / 2);\n  --lh-audit-score-width: 35px;\n  --lh-category-score-width: 60px;\n}\n\n.lh-root * {\n  box-sizing: border-box;\n}\n\n.lh-root {\n  font-family: var(--text-font-family);\n  font-size: var(--body-font-size);\n  margin: 0;\n  line-height: var(--body-line-height);\n  background: #f5f5f5;\n  scroll-behavior: smooth;\n}\n\n.lh-root [hidden] {\n  display: none !important;\n}\n\na {\n  color: #0c50c7;\n}\n\nsummary {\n  cursor: pointer;\n}\n\n.lh-details {\n  font-size: smaller;\n  margin-top: var(--default-padding);\n}\n\n.lh-details[open] summary {\n  margin-bottom: var(--default-padding);\n}\n\n/* Report header */\n\n.report-icon {\n  opacity: 0.7;\n}\n.report-icon:hover {\n  opacity: 1;\n}\n.report-icon[disabled] {\n  opacity: 0.3;\n  pointer-events: none;\n}\n\n.report-icon--share {\n  background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0z\"/><path d=\"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z\"/></svg>');\n}\n.report-icon--print {\n  background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z\"/><path fill=\"none\" d=\"M0 0h24v24H0z\"/></svg>');\n}\n.report-icon--copy {\n  background-image: url('data:image/svg+xml;utf8,<svg height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z\"/></svg>');\n}\n.report-icon--open {\n  background-image: url('data:image/svg+xml;utf8,<svg height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z\"/></svg>');\n}\n.report-icon--download {\n  background-image: url('data:image/svg+xml;utf8,<svg height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z\"/><path d=\"M0 0h24v24H0z\" fill=\"none\"/></svg>');\n}\n\n/* List */\n.lh-list {\n  font-size: smaller;\n  margin-top: var(--default-padding);\n}\n\n.lh-list__items {\n  padding-left: var(--default-padding);\n}\n\n.lh-list__items > * {\n  border-bottom: 1px solid gray;\n  margin-bottom: 2px;\n}\n\n/* Card */\n.lh-scorecards {\n  display: flex;\n  flex-wrap: wrap;\n}\n.lh-scorecard {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex: 0 0 180px;\n  flex-direction: column;\n  padding: var(--default-padding);\n  padding-top: calc(32px + var(--default-padding));\n  border-radius: 3px;\n  margin-right: var(--default-padding);\n  position: relative;\n  line-height: inherit;\n  border: 1px solid #ebebeb;\n}\n.lh-scorecard__title {\n  background-color: #eee;\n  position: absolute;\n  top: 0;\n  right: 0;\n  left: 0;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  padding: calc(var(--default-padding) / 2);\n}\n.lh-scorecard__value {\n  font-size: 28px;\n}\n.lh-scorecard__target {\n  margin-top: calc(var(--default-padding) / 2);\n}\n\n/* Score */\n\n.lh-score {\n  display: flex;\n  align-items: flex-start;\n}\n\n.lh-score__value {\n  flex: none;\n  margin-right: var(--lh-score-margin);\n  width: var(--lh-audit-score-width);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  border-radius: 2px;\n  position: relative;\n  font-weight: bold;\n}\n\n.lh-score__value::after {\n  content: '';\n  position: absolute;\n  left: 0;\n  right: 0;\n  top: 0;\n  bottom: 0;\n  border-radius: inherit;\n}\n\n.lh-score--informative .lh-score__value {\n  color: var(--informative-color);\n  border-radius: 50%;\n}\n\n.lh-score--informative .lh-score__value::after {\n  background: url('data:image/svg+xml;utf8,<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><title>info</title><path d=\"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z\" fill=\"#0c50c7\"/></svg>') no-repeat 50% 50%;\n  background-size: var(--lh-score-icon-background-size);\n}\n\n.lh-score__value--binary {\n  text-indent: -5000px;\n}\n\n/* No icon for audits with number scores. */\n.lh-score__value:not(.lh-score__value--binary)::after {\n  content: none;\n}\n\n.lh-score__value--pass {\n  color: var(--pass-color);\n}\n\n.lh-score__value--pass::after {\n  background: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><title>pass</title><path d=\"M9.17 2.33L4.5 7 2.83 5.33 1.5 6.66l3 3 6-6z\" fill=\"#2b882f\" fill-rule=\"evenodd\"/></svg>') no-repeat 50% 50%;\n  background-size: var(--lh-score-icon-background-size);\n}\n\n.lh-score__value--average {\n  color: var(--average-color);\n}\n\n.lh-score__value--average::after {\n  background: none;\n  content: '!';\n  color: var(--average-color);\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  font-weight: 500;\n  font-size: 15px;\n}\n\n.lh-score__value--fail {\n  color: var(--fail-color);\n}\n\n.lh-score__value--fail::after {\n  background: url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg\"><title>fail</title><path d=\"M8.33 2.33l1.33 1.33-2.335 2.335L9.66 8.33 8.33 9.66 5.995 7.325 3.66 9.66 2.33 8.33l2.335-2.335L2.33 3.66l1.33-1.33 2.335 2.335z\" fill=\"#df332f\"/></svg>') no-repeat 50% 50%;\n  background-size: var(--lh-score-icon-background-size);\n}\n\n.lh-score__description {\n  font-size: smaller;\n  color: var(--secondary-text-color);\n  margin-top: calc(var(--default-padding) / 2);\n}\n\n.lh-score__snippet {\n  align-items: center;\n  justify-content: space-between;\n  /*outline: none;*/\n}\n\n.lh-score__snippet::-moz-list-bullet {\n  display: none;\n}\n\n.lh-toggle-arrow {\n  background: url('data:image/svg+xml;utf8,<svg fill=\"black\" height=\"24\" viewBox=\"0 0 24 24\" width=\"24\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z\"/><path d=\"M0-.25h24v24H0z\" fill=\"none\"/></svg>') no-repeat 50% 50%;\n  background-size: contain;\n  background-color: transparent;\n  width: 24px;\n  height: 24px;\n  flex: none;\n  margin-left: calc(var(--default-padding) / 2);\n  transition: transform 150ms ease-in-out;\n  cursor: pointer;\n  border: none;\n}\n\n/* Expandable Details (Audit Groups, Audits) */\n\n.lh-expandable-details {\n  flex: 1;\n}\n\n.lh-expandable-details__summary {\n  display: flex;\n  cursor: pointer;\n}\n\n.lh-expandable-details__header {\n  flex: 1;\n}\n\n.lh-expandable-details[open] > .lh-expandable-details__summary > .lh-toggle-arrow {\n  transform: rotateZ(90deg);\n}\n\n.lh-expandable-details__summary::-webkit-details-marker {\n  display: none;\n}\n\n/*.lh-score__snippet:focus .lh-score__title {\n  outline: rgb(59, 153, 252) auto 5px;\n}*/\n\n/* Audit */\n\n.lh-audit {\n  margin-top: var(--default-padding);\n  padding-bottom: var(--default-padding);\n  border-bottom: 1px solid var(--report-secondary-border-color);\n}\n\n.lh-audit:last-of-type {\n  border-bottom: none;\n}\n\n.lh-audit > .lh-score {\n  font-size: 16px;\n  font-size: var(--header-font-size);\n}\n\n/* Audit Group */\n\n.lh-audit-group {\n  margin-top: var(--default-padding);\n  padding-bottom: var(--default-padding);\n  border-bottom: 1px solid var(--report-secondary-border-color);\n}\n\n.lh-audit-group:last-of-type {\n  border-bottom: none;\n}\n\n.lh-audit-group__header {\n  font-size: 18px;\n}\n\n.lh-audit-group__description {\n  font-size: 16px;\n  color: var(--secondary-text-color);\n  margin-top: calc(var(--default-padding) / 2);\n}\n\n.lh-debug {\n  margin-top: calc(var(--default-padding) / 2);\n  margin-left: calc(var(--lh-audit-score-width) + var(--lh-score-margin));\n  color: var(--fail-color);\n}\n\n/* Report */\n\n.lh-container {\n  display: flex;\n  max-width: var(--report-content-width);\n  margin: 0 auto;\n}\n\n.lh-report {\n  margin-left: var(--report-menu-width);\n  background-color: #fff;\n}\n\n.lh-exception {\n  font-size: large;\n}\n\n.lh-scores-header {\n  display: flex;\n  margin: var(--report-header-height) 0 0 0;\n  padding: calc(var(--default-padding) * 2) var(--default-padding);\n  border-bottom: 1px solid var(--report-border-color);\n}\n\n.lh-category {\n  padding: 24px calc(var(--default-padding) * 2);\n  border-top: 1px solid var(--report-border-color);\n}\n\n.lh-category:first-of-type {\n  border: none;\n}\n\n.lh-category .lh-audit {\n  margin-left: calc(var(--lh-category-score-width) + var(--lh-score-margin));\n}\n\n.lh-category .lh-audit-group {\n  margin-left: calc(var(--lh-category-score-width) + var(--default-padding));\n}\n\n.lh-category .lh-audit-group .lh-audit {\n  margin-left: var(--default-padding);\n}\n\n.lh-category > .lh-score {\n  font-size: 20px;\n  padding-bottom: 24px;\n}\n\n.lh-category > .lh-score .lh-score__value,\n.lh-category > .lh-score .lh-score__gauge .lh-gauge__label {\n  display: none;\n}\n\n.lh-category .lh-score__gauge {\n  margin: calc(var(--default-padding) / 2) var(--default-padding) 0 0;\n  flex-basis: var(--circle-size);\n  flex-shrink: 0;\n}\n\n.lh-category .lh-score__gauge .lh-gauge {\n  --circle-size: 60px;\n}\n\n/* Category snippet shouldnt have pointer cursor. */\n.lh-category > .lh-score .lh-score__snippet {\n  cursor: initial;\n}\n\n.lh-category > .lh-score .lh-score__title {\n  font-size: 24px;\n  font-weight: 400;\n}\n\n.lh-passed-audits[open] summary.lh-passed-audits-summary {\n  margin-bottom: calc(var(--default-padding) * 2);\n}\n\nsummary.lh-passed-audits-summary {\n  margin: calc(var(--default-padding) * 2) var(--default-padding);\n  margin-left: calc(var(--lh-category-score-width) + var(--default-padding));\n  margin-bottom: 0;\n  font-size: 15px;\n  display: flex;\n  align-items: center;\n}\n\nsummary.lh-passed-audits-summary::-webkit-details-marker {\n  background: var(--pass-color);\n  color: white;\n  position: relative;\n  content: '';\n  padding: 3px 3px 3px 6px;\n  border-radius: 2px;\n}\n\n.lh-passed-audits[open] summary.lh-passed-audits-summary::-webkit-details-marker {\n  padding: 3px 5px 3px 4px;\n}\n\n#lh-log {\n  position: fixed;\n  background-color: #323232;\n  color: #fff;\n  min-height: 48px;\n  min-width: 288px;\n  padding: 16px 24px;\n  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);\n  border-radius: 2px;\n  margin: 12px;\n  font-size: 14px;\n  cursor: default;\n  transition: transform 0.3s, opacity 0.3s;\n  transform: translateY(100px);\n  opacity: 0;\n  -webkit-font-smoothing: antialiased;\n  bottom: 0;\n  left: 0;\n  z-index: 3;\n}\n\n#lh-log.show {\n  opacity: 1;\n  transform: translateY(0);\n}\n\n@media screen and (max-width: 767px) {\n  .lh-report {\n    margin-left: 0;\n  }\n  .lh-category {\n    padding: 24px var(--default-padding);\n  }\n}\n\n@media print {\n  body {\n    -webkit-print-color-adjust: exact; /* print background colors */\n  }\n  .lh-report {\n    margin-left: 0;\n  }\n  .lh-categories {\n    margin-top: 0;\n  }\n}\n\n/*# sourceURL=report.styles.css */\n\n/*# sourceURL=audits2/lighthouse/report-styles.css */";Runtime.cachedResources["audits2/lighthouse/templates.html"]="<!-- Lighthouse category score -->\n<template id=\"tmpl-lh-category-score\">\n  <div class=\"lh-score\">\n    <div class=\"lh-score__value\"><!-- fill me --></div>\n    <div class=\"lh-score__gauge\"></div>\n    <div class=\"lh-score__header\">\n      <div class=\"lh-score__snippet\">\n        <span class=\"lh-score__title\"><!-- fill me --></span>\n      </div>\n      <div class=\"lh-score__description\"><!-- fill me --></div>\n    </div>\n  </div>\n</template>\n\n<!-- Lighthouse audit score -->\n<template id=\"tmpl-lh-audit-score\">\n  <div class=\"lh-score\">\n    <div class=\"lh-score__value\"><!-- fill me --></div>\n    <details class=\"lh-score__header lh-expandable-details\">\n      <summary class=\"lh-score__snippet lh-expandable-details__summary\">\n        <span class=\"lh-score__title\"><!-- fill me --></span>\n        <div class=\"lh-toggle-arrow\" title=\"See audits\"></div>\n      </summary>\n      <div class=\"lh-score__description\"><!-- fill me --></div>\n    </details>\n  </div>\n</template>\n\n<!-- Lighthouse left nav -->\n<template id=\"tmpl-lh-leftnav\">\n  <style>\n    .lh-leftnav {\n      width: var(--report-menu-width);\n      border-right: 1px solid var(--report-secondary-border-color);\n      position: fixed;\n      height: 100%;\n      background: #fff;\n      will-change: transform; /* prevent excessive paints */\n      z-index: 2;\n    }\n    .lh-leftnav__item {\n      padding: var(--default-padding);\n      color: var(--secondary-text-color);\n      font-size: 16px;\n      display: flex;\n      justify-content: space-between;\n      text-decoration: none;\n      color: inherit;\n    }\n    .leftnav-item__score {\n      background: transparent;\n    }\n    .leftnav-item__score::after {\n      content: '';\n    }\n    .leftnav-item__score.lh-score__value--pass {\n      color: var(--pass-color);\n    }\n    .leftnav-item__score.lh-score__value--average {\n      color: var(--average-color);\n    }\n    .leftnav-item__score.lh-score__value--fail {\n      color: var(--fail-color);\n    }\n    .leftnav__header {\n      padding: 0 20px;\n      height: 115px;\n      font-size: 18px;\n      display: flex;\n      flex-direction: column;\n      justify-content: center;\n      background: url(data:image/png;base64, ) no-repeat 150% 100%;\n      background-color: #2238b3;\n      background-size: 205px;\n      background-blend-mode: luminosity;\n    }\n    .leftnav__header__title {\n      font-family: var(--text-font-family);\n      font-weight: 300;\n      color: #fff;\n      margin: 0;\n      padding: 0;\n      line-height: 1.5;\n    }\n    .leftnav__header__version {\n      color: #aab3ed;\n      font-family: var(--text-font-family);\n      font-size: 14px;\n      line-height: 1.5;\n    }\n    @media screen and (max-width: 767px) {\n      .lh-leftnav {\n        display: none;\n      }\n    }\n    @media print {\n      .lh-leftnav {\n        display: none;\n      }\n    }\n  </style>\n  <nav class=\"lh-leftnav\">\n    <div class=\"leftnav__header\">\n      <h1 class=\"leftnav__header__title\">Lighthouse</h1>\n      <div class=\"leftnav__header__version\"><!-- fill me --></div>\n    </div>\n    <template id=\"tmpl-lh-leftnav__items\">\n      <a href=\"#\" class=\"lh-leftnav__item\">\n        <span class=\"leftnav-item__category\"><!-- fill me --></span>\n        <span class=\"leftnav-item__score\"><!-- fill me --></span>\n      </a>\n    </template>\n  </nav>\n</template>\n\n<!-- Lighthouse header -->\n<template id=\"tmpl-lh-heading\">\n  <style>\n    :root {\n      --report-header-height: 58px;\n      --report-header-bg-color: #fafafa;\n    }\n    .lh-header {\n      display: flex;\n      height: var(--report-header-height);\n      width: var(--report-width);\n      max-width: 100%; /* support text-overflow on url */\n      border-bottom: 1px solid var(--report-secondary-border-color);\n      position: fixed;\n      z-index: 1;\n      will-change: transform;\n      background-color: var(--report-header-bg-color);\n      margin-left: var(--report-menu-width);\n      align-items: center;\n      padding: 0 calc(var(--default-padding) * 2);\n    }\n    .lh-metadata {\n      flex: 1 1 0;\n      padding-right: calc(var(--default-padding) / 2);\n      line-height: 20px;\n      color: var(--secondary-text-color);\n      overflow-x: hidden;\n    }\n    .lh-metadata__results {\n      overflow: hidden;\n      text-overflow: ellipsis;\n      white-space: nowrap;\n    }\n    .lh-metadata__url {\n      color: currentColor;\n    }\n    .lh-export {\n      position: relative;\n    }\n    .lh-export__button {\n      background-color: #fff;\n      border: 1px solid var(--report-border-color);\n      border-radius: 3px;\n      cursor: pointer;\n      outline: none;\n      height: 32px;\n      width: 48px;\n      background-repeat: no-repeat;\n      background-size: 20px;\n      background-position: 50% 50%;\n    }\n    .lh-export__button:focus,\n    .lh-export__button.active {\n      box-shadow: 1px 1px 3px #ccc;\n    }\n    .lh-export__button.active + .lh-export__dropdown {\n      opacity: 1;\n      clip: rect(0, 164px, 200px, 0);\n    }\n    .lh-export__dropdown {\n      position: absolute;\n      background-color: #fff;\n      border: 1px solid var(--report-border-color);\n      border-radius: 3px;\n      padding: calc(var(--default-padding) / 2) 0;\n      cursor: pointer;\n      top: 36px;\n      right: 0;\n      box-shadow: 1px 1px 3px #ccc;\n      min-width: 125px;\n      clip: rect(0, 164px, 0, 0);\n      opacity: 0;\n      transition: all 200ms cubic-bezier(0,0,0.2,1);\n    }\n    .lh-export__dropdown a {\n      display: block;\n      color: currentColor;\n      text-decoration: none;\n      white-space: nowrap;\n      padding: 0 12px;\n      line-height: 2;\n    }\n    .lh-export__dropdown a:hover,\n    .lh-export__dropdown a:focus {\n      background-color: #efefef;\n      outline: none;\n    }\n    .lh-export__dropdown .report-icon {\n      cursor: pointer;\n      background-repeat: no-repeat;\n      background-position: 8px 50%;\n      background-size: 18px;\n      background-color: transparent;\n      text-indent: 18px;\n    }\n    /* copy icon needs slight adjustments to look great */\n    .lh-export__dropdown .report-icon--copy {\n      background-size: 16px;\n      background-position: 9px 50%;\n    }\n    .lh-config {\n      display: flex;\n    }\n    .lh-env {\n      padding: var(--default-padding) 0 var(--default-padding) calc(var(--default-padding) * 2);\n      left: 0;\n      top: 100%;\n      position: absolute;\n      width: 100%;\n      background-color: var(--report-header-bg-color);\n      border-top: 1px solid var(--report-secondary-border-color);\n      border-bottom: 1px solid var(--report-secondary-border-color);\n    }\n    .lh-env__title {\n      font-size: var(--header-font-size);\n    }\n    .lh-env__items {\n      margin: var(--default-padding) 0 0 0;\n    }\n    .lh-config__timestamp {\n      margin-right: 6px;\n    }\n    .lh-config__settings-toggle {\n      margin-left: 6px;\n    }\n    .lh-config__timestamp,\n    .lh-config__settings-toggle summary {\n      color: var(--secondary-text-color);\n    }\n    .lh-config__settings-toggle summary {\n      display: flex;\n      align-items: center;\n    }\n    .lh-config__settings-toggle .lh-toggle-arrow {\n      width: 16px;\n      height: 16px;\n      margin-left: 2px;\n    }\n    .lh-config__settings-toggle[open] .lh-toggle-arrow {\n      transform: rotateZ(90deg);\n    }\n    .lh-config__settings-toggle summary::-moz-list-bullet {\n      display: none;\n    }\n    .lh-config__settings-toggle summary::-webkit-details-marker {\n      display: none;\n    }\n    @media screen and (max-width: 767px) {\n      .lh-export__dropdown {\n        right: 0;\n        left: initial;\n      }\n      .lh-header {\n        padding: 0 var(--default-padding);\n        margin-left: 0;\n      }\n    }\n    @media print {\n      .lh-header {\n        display: none;\n        margin-left: 0;\n      }\n    }\n  </style>\n  <div class=\"lh-header\">\n    <div class=\"lh-metadata\">\n      <div class=\"lh-metadata__results\">Results for: <a href=\"\" class=\"lh-metadata__url\" target=\"_blank\" rel=\"noopener\"><!-- fill me --></a></div>\n      <div class=\"lh-config\">\n        <span class=\"lh-config__timestamp\"><!-- fill me --></span> &bullet;\n        <details class=\"lh-config__settings-toggle\">\n          <summary>\n            <span>Runtime settings</span>\n            <span class=\"lh-toggle-arrow\" title=\"See report's runtime settings\"></span>\n          </summary>\n          <div class=\"lh-env\">\n            <div class=\"lh-env__title\">Runtime environment</div>\n            <ul class=\"lh-env__items\">\n              <template id=\"tmpl-lh-env__items\">\n                <li class=\"lh-env__item\">\n                  <span class=\"lh-env__name\"><!-- fill me --></span>\n                  <span class=\"lh-env__description\"><!-- fill me --></span>:\n                  <b class=\"lh-env__enabled\"><!-- fill me --></b>\n                </li>\n              </template>\n            </ul>\n          </div>\n        </details>\n      </div>\n    </div>\n    <div class=\"lh-export\">\n      <button class=\"report-icon report-icon--share lh-export__button\" title=\"Export report\"></button>\n      <div class=\"lh-export__dropdown\">\n        <a href=\"#\" class=\"report-icon report-icon--print\" data-action=\"print\">Print...</a>\n        <a href=\"#\" class=\"report-icon report-icon--copy\" data-action=\"copy\">Copy JSON</a>\n        <a href=\"#\" class=\"report-icon report-icon--download\" data-action=\"save-html\">Save as HTML</a>\n        <a href=\"#\" class=\"report-icon report-icon--download\" data-action=\"save-json\">Save as JSON</a>\n      </div>\n    </div>\n  </div>\n</template>\n\n<!-- Lighthouse footer -->\n<template id=\"tmpl-lh-footer\">\n  <style>\n    .lh-footer {\n      text-align: center;\n      line-height: 90px;\n      background-color: var(--report-header-bg-color);\n      border-top: 1px solid var(--report-secondary-border-color);\n    }\n  </style>\n  <footer class=\"lh-footer\">\n    Generated by <b>Lighthouse</b> <span class=\"lh-footer__version\"><!-- fill me --></span> on\n    <span class=\"lh-footer__timestamp\"><!-- fill me --></span> |\n    <a href=\"https://github.com/GoogleChrome/Lighthouse/issues\" target=\"_blank\" rel=\"noopener\">File an issue</a>\n  </footer>\n</template>\n\n<!-- Lighthouse score gauge -->\n<template id=\"tmpl-lh-gauge\">\n  <style>\n    .lh-gauge {\n      --circle-size: 80px;\n      --circle-size-half: calc(var(--circle-size) / 2);\n      --circle-background: #eee;\n      --circle-border-width: 8px;\n      --inset-size: calc(var(--circle-size) - var(--circle-border-width));\n      --inset-color: #fff;\n      --transition-length: 1s;\n      width: var(--circle-size);\n      height: var(--circle-size);\n      background-color: var(--circle-background);\n      border-radius: 50%;\n    }\n    .lh-gauge--pass {\n      --circle-color: var(--pass-color);\n      color: var(--circle-color);\n    }\n    .lh-gauge--average {\n      --circle-color: var(--average-color);\n      color: var(--circle-color);\n    }\n    .lh-gauge--fail {\n      --circle-color: var(--fail-color);\n      color: var(--circle-color);\n    }\n    .lh-gauge__mask,\n    .lh-gauge__fill {\n      width: var(--circle-size);\n      height: var(--circle-size);\n      position: absolute;\n      transition: transform var(--transition-length);\n      border-radius: 50%;\n    }\n    .lh-gauge__mask {\n      clip: rect(0px, var(--circle-size), var(--circle-size), var(--circle-size-half));\n    }\n    .lh-gauge__mask .lh-gauge__fill {\n      clip: rect(0px, var(--circle-size-half), var(--circle-size), 0px);\n      background-color: var(--circle-color);\n      backface-visibility: hidden;\n    }\n    .lh-gauge__percentage {\n      --spacer: calc((var(--circle-size) - var(--inset-size)) / 2);\n      width: var(--inset-size);\n      height: var(--inset-size);\n      position: absolute;\n      margin-left: var(--spacer);\n      margin-top: var(--spacer);\n      background-color: var(--inset-color);\n      border-radius: inherit;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      font-size: calc(var(--circle-size) / 3);\n    }\n    .lh-gauge__wrapper {\n      display: inline-flex;\n      align-items: center;\n      flex-direction: column;\n      text-decoration: none;\n      color: inherit;\n      flex: 1;\n    }\n    .lh-gauge__label {\n      font-size: 16px;\n      margin-top: var(--default-padding);\n    }\n    @media screen and (max-width: 767px) {\n      .lh-gauge__label {\n        font-size: 12px;\n      }\n    }\n  </style>\n  <a href=\"#\" class=\"lh-gauge__wrapper\">\n    <div class=\"lh-gauge\" data-progress=\"0\">\n      <div class=\"lh-gauge__circle\">\n        <div class=\"lh-gauge__mask lh-gauge__mask--full\">\n          <div class=\"lh-gauge__fill\"></div>\n        </div>\n        <div class=\"lh-gauge__mask lh-gauge__mask--half\">\n          <div class=\"lh-gauge__fill\"></div>\n          <div class=\"lh-gauge__fill lh-gauge__fill--fix\"></div>\n        </div>\n      </div>\n      <div class=\"lh-gauge__percentage\"></div>\n    </div>\n    <div class=\"lh-gauge__label\"><!-- fill me --></div>\n  </a>\n</template>\n\n/*# sourceURL=audits2/lighthouse/templates.html */";