class InspectorFrontendHostStub{constructor(){function stopEventPropagation(event){const zoomModifier=this.platform()==='mac'?event.metaKey:event.ctrlKey;if(zoomModifier&&(event.keyCode===187||event.keyCode===189)){event.stopPropagation();}} document.addEventListener('keydown',stopEventPropagation.bind(this),true);this._urlsBeingSaved=new Map();this.events;} platform(){let match=navigator.userAgent.match(/Windows NT/);if(match){return'windows';} match=navigator.userAgent.match(/Mac OS X/);if(match){return'mac';} return'linux';} loadCompleted(){} bringToFront(){this._windowVisible=true;} closeWindow(){this._windowVisible=false;} setIsDocked(isDocked,callback){setTimeout(callback,0);} setInspectedPageBounds(bounds){} inspectElementCompleted(){} setInjectedScriptForOrigin(origin,script){} inspectedURLChanged(url){document.title=Common.UIString('DevTools - %s',url.replace(/^https?:\/\//,''));} copyText(text){if(text===undefined||text===null){return;} if(navigator.clipboard){navigator.clipboard.writeText(text);}else if(document.queryCommandSupported('copy')){const input=document.createElement('input');input.value=text;document.body.appendChild(input);input.select();document.execCommand('copy');document.body.removeChild(input);}else{Common.console.error('Clipboard is not enabled in hosted mode. Please inspect using chrome://inspect');}} openInNewTab(url){window.open(url,'_blank');} showItemInFolder(fileSystemPath){Common.console.error('Show item in folder is not enabled in hosted mode. Please inspect using chrome://inspect');} save(url,content,forceSaveAs){let buffer=this._urlsBeingSaved.get(url);if(!buffer){buffer=[];this._urlsBeingSaved.set(url,buffer);} buffer.push(content);this.events.dispatchEventToListeners(Host.InspectorFrontendHostAPI.Events.SavedURL,{url,fileSystemPath:url});} append(url,content){const buffer=this._urlsBeingSaved.get(url);buffer.push(content);this.events.dispatchEventToListeners(Host.InspectorFrontendHostAPI.Events.AppendedToURL,url);} close(url){const buffer=this._urlsBeingSaved.get(url);this._urlsBeingSaved.delete(url);const fileName=url?url.trimURL().removeURLFragment():'';const link=createElement('a');link.download=fileName;const blob=new Blob([buffer.join('')],{type:'text/plain'});link.href=URL.createObjectURL(blob);link.click();} sendMessageToBackend(message){} recordEnumeratedHistogram(actionName,actionCode,bucketSize){} recordPerformanceHistogram(histogramName,duration){} recordUserMetricsAction(umaName){} requestFileSystems(){this.events.dispatchEventToListeners(Host.InspectorFrontendHostAPI.Events.FileSystemsLoaded,[]);} addFileSystem(type){} removeFileSystem(fileSystemPath){} isolatedFileSystem(fileSystemId,registeredName){return null;} loadNetworkResource(url,headers,streamId,callback){Root.Runtime.loadResourcePromise(url).then(function(text){Host.ResourceLoader.streamWrite(streamId,text);callback({statusCode:200});}).catch(function(){callback({statusCode:404});});} getPreferences(callback){const prefs={};for(const name in window.localStorage){prefs[name]=window.localStorage[name];} callback(prefs);} setPreference(name,value){window.localStorage[name]=value;} removePreference(name){delete window.localStorage[name];} clearPreferences(){window.localStorage.clear();} upgradeDraggedFileSystemPermissions(fileSystem){} indexPath(requestId,fileSystemPath,excludedFolders){} stopIndexing(requestId){} searchInPath(requestId,fileSystemPath,query){} zoomFactor(){return 1;} zoomIn(){} zoomOut(){} resetZoom(){} setWhitelistedShortcuts(shortcuts){} setEyeDropperActive(active){} showCertificateViewer(certChain){} reattach(callback){} readyForTest(){} connectionReady(){} setOpenNewWindowForPopups(value){} setDevicesDiscoveryConfig(config){} setDevicesUpdatesEnabled(enabled){} performActionOnRemotePage(pageId,action){} openRemotePage(browserId,url){} openNodeFrontend(){} showContextMenuAtPoint(x,y,items,document){throw'Soft context menu should be used';} isHostedMode(){return true;} setAddExtensionCallback(callback){}} let _InspectorFrontendHost=window.InspectorFrontendHost;class InspectorFrontendAPIImpl{constructor(){this._debugFrontend=!!Root.Runtime.queryParam('debugFrontend')||(window['InspectorTest']&&window['InspectorTest']['debugTest']);const descriptors=Host.InspectorFrontendHostAPI.EventDescriptors;for(let i=0;i