@nuxt/devtools 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/chunks/module-main.mjs +96 -83
- package/dist/chunks/vscode.mjs +2 -2
- package/dist/client/200.html +17 -17
- package/dist/client/404.html +17 -17
- package/dist/client/_nuxt/{CodeDiff.vue.0700b533.js → CodeDiff.vue.d8722166.js} +2 -2
- package/dist/client/_nuxt/{ComposableItem.vue.869f4305.js → ComposableItem.vue.a0062ecc.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaButton.vue.72b202db.js → DataSchemaButton.vue.baec9a00.js} +1 -1
- package/dist/client/_nuxt/{DataSchemaDrawer.3aeebd14.js → DataSchemaDrawer.b2c7e5f0.js} +1 -1
- package/dist/client/_nuxt/{DurationDisplay.vue.37c54f2c.js → DurationDisplay.vue.75bf04c2.js} +1 -1
- package/dist/client/_nuxt/{FilepathItem.vue.ca308ea2.js → FilepathItem.vue.7a091e26.js} +1 -1
- package/dist/client/_nuxt/{HelpFab.vue.6bf23ece.js → HelpFab.vue.07720a44.js} +1 -1
- package/dist/client/_nuxt/{LaunchPage.vue.c8e4a567.js → LaunchPage.vue.51fc4c47.js} +1 -1
- package/dist/client/_nuxt/NBadge.ce033599.js +1 -0
- package/dist/client/_nuxt/NCheckbox.vue.0f5a8440.js +1 -0
- package/dist/client/_nuxt/{NCodeBlock.vue.c80c8282.js → NCodeBlock.vue.4697f7e4.js} +2 -2
- package/dist/client/_nuxt/{NDrawer.vue.e2617b9c.js → NDrawer.vue.4b4bd813.js} +1 -1
- package/dist/client/_nuxt/NDropdown.vue.ddbb4404.js +1 -0
- package/dist/client/_nuxt/{NIconTitle.vue.83cd82be.js → NIconTitle.vue.8be5866f.js} +1 -1
- package/dist/client/_nuxt/{NLink.vue.92e49c8b.js → NLink.vue.99516332.js} +1 -1
- package/dist/client/_nuxt/{NMarkdown.vue.07fe8875.js → NMarkdown.vue.d386a844.js} +1 -1
- package/dist/client/_nuxt/{NNavbar.vue.823096f1.js → NNavbar.vue.a82b9c01.js} +1 -1
- package/dist/client/_nuxt/NSectionBlock.1609c1ec.js +1 -0
- package/dist/client/_nuxt/NSelect.vue.7cf27fe7.js +1 -0
- package/dist/client/_nuxt/NSelectTabs.vue.8f4924f6.js +1 -0
- package/dist/client/_nuxt/NSwitch.vue.6fd7c26d.js +1 -0
- package/dist/client/_nuxt/StacktraceList.vue.a2e4171d.js +1 -0
- package/dist/client/_nuxt/StateEditor.vue.777f604e.js +1 -0
- package/dist/client/_nuxt/{__blank.aff34a18.js → __blank.2e21a1a7.js} +1 -1
- package/dist/client/_nuxt/analyze-build.371a5734.js +1 -0
- package/dist/client/_nuxt/assets.439f186c.js +16 -0
- package/dist/client/_nuxt/builds/latest.json +1 -1
- package/dist/client/_nuxt/builds/meta/f35e8543-749e-4b65-87f9-0ac9fa3dd3ab.json +1 -0
- package/dist/client/_nuxt/{client.b8ca1554.js → client.bd4053bc.js} +1 -1
- package/dist/client/_nuxt/{components.f8fde87c.js → components.ccf2fad3.js} +1 -1
- package/dist/client/_nuxt/{custom-_name_.779ca3e5.js → custom-_name_.b0891a20.js} +1 -1
- package/dist/client/_nuxt/{default.50175b13.js → default.97700872.js} +1 -1
- package/dist/client/_nuxt/{entry.aa8c94e8.css → entry.2732f55b.css} +1 -1
- package/dist/client/_nuxt/entry.35c58391.js +27 -0
- package/dist/client/_nuxt/{error-404.0dae1ccf.js → error-404.576aef72.js} +1 -1
- package/dist/client/_nuxt/{error-500.0a479375.js → error-500.61e43a5a.js} +1 -1
- package/dist/client/_nuxt/error.82c66fee.js +9 -0
- package/dist/client/_nuxt/full.72d92407.js +1 -0
- package/dist/client/_nuxt/{hooks.08bf14b9.js → hooks.889b91ae.js} +1 -1
- package/dist/client/_nuxt/{imports.10f1634a.js → imports.8a1177ed.js} +1 -1
- package/dist/client/_nuxt/{index.b567c37e.js → index.0214b01d.js} +1 -1
- package/dist/client/_nuxt/{index.06e4cc9c.js → index.11f08f78.js} +1 -1
- package/dist/client/_nuxt/{json-editor-vue.c3cbb111.js → json-editor-vue.24ac60a9.js} +1 -1
- package/dist/client/_nuxt/modules.0ea1264b.js +2 -0
- package/dist/client/_nuxt/{none.7a39bbba.js → none.9d86a5c5.js} +1 -1
- package/dist/client/_nuxt/{open-graph.7c382b87.js → open-graph.ce924f19.js} +2 -2
- package/dist/client/_nuxt/overview.811117a6.js +1 -0
- package/dist/client/_nuxt/{pages.e4e22a03.js → pages.f870c402.js} +1 -1
- package/dist/client/_nuxt/{payload.d7e93a46.js → payload.ae9699f5.js} +1 -1
- package/dist/client/_nuxt/{plugins.b2f10668.js → plugins.a8eafa2c.js} +1 -1
- package/dist/client/_nuxt/{runtime-configs.9fe5125f.js → runtime-configs.344cb73a.js} +1 -1
- package/dist/client/_nuxt/server-routes.d5948352.js +9 -0
- package/dist/client/_nuxt/{settings.78f334a8.js → settings.a887e1c0.js} +1 -1
- package/dist/client/_nuxt/state-components.295d8108.js +1 -0
- package/dist/client/_nuxt/state-modules.a1a00874.js +1 -0
- package/dist/client/_nuxt/{storage-options.2b389201.js → storage-options.835c9b2d.js} +1 -1
- package/dist/client/_nuxt/{storage.44a95fac.js → storage.d4c1d127.js} +1 -1
- package/dist/client/_nuxt/{terminals.539d48eb.js → terminals.3c6722c6.js} +1 -1
- package/dist/client/_nuxt/timeline.cebcddc5.js +29 -0
- package/dist/client/_nuxt/{unocss-runtime.dfaa24d0.js → unocss-runtime.eab56c8d.js} +1 -1
- package/dist/client/_nuxt/virtual-files.33dacdaf.js +1 -0
- package/dist/client/index.html +17 -17
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/plugins/devtools.client.mjs +2 -2
- package/dist/runtime/plugins/view/Main.vue +2 -0
- package/dist/shared/{devtools.6f6e0f47.mjs → devtools.371fa152.mjs} +2 -2
- package/package.json +14 -14
- package/dist/client/_nuxt/NBadge.0b42c7f8.js +0 -1
- package/dist/client/_nuxt/NCheckbox.vue.6b5ce38f.js +0 -1
- package/dist/client/_nuxt/NDropdown.vue.ff9a8df2.js +0 -1
- package/dist/client/_nuxt/NSectionBlock.c3646235.js +0 -1
- package/dist/client/_nuxt/NSelect.vue.c8c511ae.js +0 -1
- package/dist/client/_nuxt/NSelectTabs.vue.ec21a846.js +0 -1
- package/dist/client/_nuxt/NSwitch.vue.1cea2bc6.js +0 -1
- package/dist/client/_nuxt/NTip.vue.ca2f8e8a.js +0 -1
- package/dist/client/_nuxt/StateEditor.vue.2abb9bb3.js +0 -1
- package/dist/client/_nuxt/analyze-build.76d0de73.js +0 -1
- package/dist/client/_nuxt/assets.2cb4325d.js +0 -16
- package/dist/client/_nuxt/builds/meta/c6495541-4f21-430a-9b71-cda3f41cbf03.json +0 -1
- package/dist/client/_nuxt/entry.9a5af3dc.js +0 -27
- package/dist/client/_nuxt/full.f21cfe4d.js +0 -1
- package/dist/client/_nuxt/modules.63cf2a03.js +0 -2
- package/dist/client/_nuxt/overview.ea00b3f6.js +0 -1
- package/dist/client/_nuxt/server-routes.95c3caa5.js +0 -9
- package/dist/client/_nuxt/state-components.d81178a3.js +0 -1
- package/dist/client/_nuxt/state-modules.b9e84f85.js +0 -1
- package/dist/client/_nuxt/timeline.5deddf7e.js +0 -29
- package/dist/client/_nuxt/virtual-files.46ad04c9.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as Ee,r as ke,
|
|
1
|
+
import{d as Ee,r as ke,an as Pe,a1 as Ie,L as fe,M as ve,o as ee,m as he,k as oe,i as Re,f as te,h as ce,p as me,t as ge,F as xe,bA as He,_ as Ae,bC as Fe,R as We,a as Ue,az as Ne,n as $e,G as Le,bf as je,v as De,a6 as ze,j as Ke,aG as qe}from"./entry.35c58391.js";var Be={exports:{}};(function(ne,Y){(function(J,G){ne.exports=G()})(self,()=>(()=>{var J={4567:function(P,r,o){var c=this&&this.__decorate||function(i,a,l,v){var m,h=arguments.length,p=h<3?a:v===null?v=Object.getOwnPropertyDescriptor(a,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,a,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(a,l,p):m(a,l))||p);return h>3&&p&&Object.defineProperty(a,l,p),p},u=this&&this.__param||function(i,a){return function(l,v){a(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(6114),f=o(9924),g=o(844),_=o(5596),e=o(4725),s=o(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,a){super(),this._terminal=i,this._renderService=a,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);if(this._topBoundaryFocusListener=l=>this._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
2
2
|
`))),this.register(this._terminal.onA11yTab(l=>this._handleTab(l))),this.register(this._terminal.onKey(l=>this._handleKey(l.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new _.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,s.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let a=0;a<i;a++)this._handleChar(" ")}_handleChar(i){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===`
|
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),/\p{Control}/u.test(i)||this._charsToConsume.push(i)}_refreshRows(i,a){this._liveRegionDebouncer.refresh(i,a,this._terminal.rows)}_renderRows(i,a){const l=this._terminal.buffer,v=l.lines.length.toString();for(let m=i;m<=a;m++){const h=l.translateBufferLineToString(l.ydisp+m,!0),p=(l.ydisp+m+1).toString(),b=this._rowElements[m];b&&(h.length===0?b.innerText=" ":b.textContent=h,b.setAttribute("aria-posinset",p),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,a){const l=i.target,v=this._rowElements[a===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")===(a===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==v)return;let m,h;if(a===0?(m=l,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(m=this._rowElements.shift(),h=l,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),a===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(a===0?-1:1),this._rowElements[a===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let a=this._rowContainer.children.length;a<this._terminal.rows;a++)this._rowElements[a]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[a]);for(;this._rowElements.length>i;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}}_refreshRowDimensions(i){i.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=t=c([u(1,e.IRenderService)],t)},3614:(P,r)=>{function o(d){return d.replace(/\r?\n/g,"\r")}function c(d,f){return f?"\x1B[200~"+d+"\x1B[201~":d}function u(d,f,g,_){d=c(d=o(d),g.decPrivateModes.bracketedPasteMode&&_.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),f.value=""}function n(d,f,g){const _=g.getBoundingClientRect(),e=d.clientX-_.left-10,s=d.clientY-_.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${s}px`,f.style.zIndex="1000",f.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=c,r.copyHandler=function(d,f){d.clipboardData&&d.clipboardData.setData("text/plain",f.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,f,g,_){d.stopPropagation(),d.clipboardData&&u(d.clipboardData.getData("text/plain"),f,g,_)},r.paste=u,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,f,g,_,e){n(d,f,g),e&&_.rightClickSelect(d),f.value=_.selectionText,f.select()}},7239:(P,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const c=o(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(u,n,d){this._css.set(u,n,d)}getCss(u,n){return this._css.get(u,n)}setColor(u,n,d){this._color.set(u,n,d)}getColor(u,n){return this._color.get(u,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,c,u,n){o.addEventListener(c,u,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(c,u,n))}}}},6465:function(P,r,o){var c=this&&this.__decorate||function(e,s,t,i){var a,l=arguments.length,v=l<3?s:i===null?i=Object.getOwnPropertyDescriptor(s,t):i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(e,s,t,i);else for(var m=e.length-1;m>=0;m--)(a=e[m])&&(v=(l<3?a(v):l>3?a(s,t,v):a(s,t))||v);return l>3&&v&&Object.defineProperty(s,t,v),v},u=this&&this.__param||function(e,s){return function(t,i){s(t,i,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier2=void 0;const n=o(3656),d=o(8460),f=o(844),g=o(2585);let _=r.Linkifier2=class extends f.Disposable{get currentLink(){return this._currentLink}constructor(e){super(),this._bufferService=e,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,f.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,f.toDisposable)(()=>{this._lastMouseEvent=void 0})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0}))}registerLinkProvider(e){return this._linkProviders.push(e),{dispose:()=>{const s=this._linkProviders.indexOf(e);s!==-1&&this._linkProviders.splice(s,1)}}}attachToDom(e,s,t){this._element=e,this._mouseService=s,this._renderService=t,this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(e){if(this._lastMouseEvent=e,!this._element||!this._mouseService)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const t=e.composedPath();for(let i=0;i<t.length;i++){const a=t[i];if(a.classList.contains("xterm"))break;if(a.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(e,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,s){var t,i;this._activeProviderReplies&&s||((t=this._activeProviderReplies)===null||t===void 0||t.forEach(l=>{l?.forEach(v=>{v.link.dispose&&v.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let a=!1;for(const[l,v]of this._linkProviders.entries())s?!((i=this._activeProviderReplies)===null||i===void 0)&&i.get(l)&&(a=this._checkLinkProviderResult(l,e,a)):v.provideLinks(e.y,m=>{var h,p;if(this._isMouseOut)return;const b=m?.map(L=>({link:L}));(h=this._activeProviderReplies)===null||h===void 0||h.set(l,b),a=this._checkLinkProviderResult(l,e,a),((p=this._activeProviderReplies)===null||p===void 0?void 0:p.size)===this._linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,s){const t=new Set;for(let i=0;i<s.size;i++){const a=s.get(i);if(a)for(let l=0;l<a.length;l++){const v=a[l],m=v.link.range.start.y<e?0:v.link.range.start.x,h=v.link.range.end.y>e?this._bufferService.cols:v.link.range.end.x;for(let p=m;p<=h;p++){if(t.has(p)){a.splice(l--,1);break}t.add(p)}}}}_checkLinkProviderResult(e,s,t){var i;if(!this._activeProviderReplies)return t;const a=this._activeProviderReplies.get(e);let l=!1;for(let v=0;v<e;v++)this._activeProviderReplies.has(v)&&!this._activeProviderReplies.get(v)||(l=!0);if(!l&&a){const v=a.find(m=>this._linkAtPosition(m.link,s));v&&(t=!0,this._handleNewLink(v))}if(this._activeProviderReplies.size===this._linkProviders.length&&!t)for(let v=0;v<this._activeProviderReplies.size;v++){const m=(i=this._activeProviderReplies.get(v))===null||i===void 0?void 0:i.find(h=>this._linkAtPosition(h.link,s));if(m){t=!0,this._handleNewLink(m);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._element||!this._mouseService||!this._currentLink)return;const s=this._positionFromMouseEvent(e,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,s){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!s||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,f.disposeArray)(this._linkCacheDisposables))}_handleNewLink(e){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(e.link,s)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0||e.link.decorations.underline,pointerCursor:e.link.decorations===void 0||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.pointerCursor},set:t=>{var i,a;!((i=this._currentLink)===null||i===void 0)&&i.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&((a=this._element)===null||a===void 0||a.classList.toggle("xterm-cursor-pointer",t)))}},underline:{get:()=>{var t,i;return(i=(t=this._currentLink)===null||t===void 0?void 0:t.state)===null||i===void 0?void 0:i.decorations.underline},set:t=>{var i,a,l;!((i=this._currentLink)===null||i===void 0)&&i.state&&((l=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,t))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const i=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,a=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=a&&(this._clearCurrentLink(i,a),this._lastMouseEvent&&this._element)){const l=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);l&&this._askForLink(l,!1)}})))}_linkHover(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(t,s.text)}_fireUnderlineEvent(e,s){const t=e.range,i=this._bufferService.buffer.ydisp,a=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-i-1,t.end.x,t.end.y-i-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(a)}_linkLeave(e,s,t){var i;!((i=this._currentLink)===null||i===void 0)&&i.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(t,s.text)}_linkAtPosition(e,s){const t=e.range.start.y*this._bufferService.cols+e.range.start.x,i=e.range.end.y*this._bufferService.cols+e.range.end.x,a=s.y*this._bufferService.cols+s.x;return t<=a&&a<=i}_positionFromMouseEvent(e,s,t){const i=t.getCoords(e,s,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,s,t,i,a){return{x1:e,y1:s,x2:t,y2:i,cols:this._bufferService.cols,fg:a}}};r.Linkifier2=_=c([u(0,g.IBufferService)],_)},9042:(P,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(P,r,o){var c=this&&this.__decorate||function(_,e,s,t){var i,a=arguments.length,l=a<3?e:t===null?t=Object.getOwnPropertyDescriptor(e,s):t;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(_,e,s,t);else for(var v=_.length-1;v>=0;v--)(i=_[v])&&(l=(a<3?i(l):a>3?i(e,s,l):i(e,s))||l);return a>3&&l&&Object.defineProperty(e,s,l),l},u=this&&this.__param||function(_,e){return function(s,t){e(s,t,_)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=o(511),d=o(2585);let f=r.OscLinkProvider=class{constructor(_,e,s){this._bufferService=_,this._optionsService=e,this._oscLinkService=s}provideLinks(_,e){var s;const t=this._bufferService.buffer.lines.get(_-1);if(!t)return void e(void 0);const i=[],a=this._optionsService.rawOptions.linkHandler,l=new n.CellData,v=t.getTrimmedLength();let m=-1,h=-1,p=!1;for(let b=0;b<v;b++)if(h!==-1||t.hasContent(b)){if(t.loadCell(b,l),l.hasExtendedAttrs()&&l.extended.urlId){if(h===-1){h=b,m=l.extended.urlId;continue}p=l.extended.urlId!==m}else h!==-1&&(p=!0);if(p||h!==-1&&b===v-1){const L=(s=this._oscLinkService.getLinkData(m))===null||s===void 0?void 0:s.uri;if(L){const y={start:{x:h+1,y:_},end:{x:b+(p||b!==v-1?0:1),y:_}};let k=!1;if(!a?.allowNonHttpProtocols)try{const x=new URL(L);["http:","https:"].includes(x.protocol)||(k=!0)}catch{k=!0}k||i.push({text:L,range:y,activate:(x,T)=>a?a.activate(x,T,y):g(0,T),hover:(x,T)=>{var O;return(O=a?.hover)===null||O===void 0?void 0:O.call(a,x,T,y)},leave:(x,T)=>{var O;return(O=a?.leave)===null||O===void 0?void 0:O.call(a,x,T,y)}})}p=!1,l.hasExtendedAttrs()&&l.extended.urlId?(h=b,m=l.extended.urlId):(h=-1,m=-1)}}e(i)}};function g(_,e){if(confirm(`Do you want to navigate to ${e}?
|
|
4
4
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{d as B,a as w,aH as W,o as t,m as c,k as s,a9 as T,f as l,t as k,ad as O,F as f,n as F,h as y,r as C,w as Y,ay as q,a1 as j,bD as U,p as x,i as m,G as z,q as Z,e as K,ap as H,j as v,at as X,v as E,_ as G,aJ as Q,au as ee,a$ as se,bE as te,ab as ne,N as oe,ac as ae,A as le,L as R,a5 as ie,Z as re}from"./entry.35c58391.js";import{_ as M}from"./DurationDisplay.vue.75bf04c2.js";import{_ as P}from"./NBadge.ce033599.js";import{_ as ce}from"./ComposableItem.vue.a0062ecc.js";import{t as pe}from"./json-editor-vue.24ac60a9.js";import{_ as de}from"./StacktraceList.vue.a2e4171d.js";import{_ as ue}from"./NDrawer.vue.4b4bd813.js";import{_ as me}from"./LaunchPage.vue.51fc4c47.js";import{_ as ke}from"./NLink.vue.99516332.js";import{_ as _e}from"./CodeDiff.vue.d8722166.js";import{_ as he}from"./HelpFab.vue.07720a44.js";import"./NMarkdown.vue.d386a844.js";import"./client.bd4053bc.js";import"./FilepathItem.vue.7a091e26.js";import"./constants.2cc6e981.js";import"./NCodeBlock.vue.4697f7e4.js";const fe=B({__name:"TimelineItemFunction",props:{item:{}},setup(h){const d=h,p=w(()=>W(d.item.name,50,60,"_op_")),e=w(()=>p.value.replace(/_op_/,"1")),o=w(()=>W(d.item.name,50,40)),i=w(()=>p.value.replace(/_op_/,"0.2"));return(n,a)=>(t(),c("button",{class:"group",style:T({color:l(e),borderLeft:`2px solid ${l(e)}`}),relative:"","text-sm":"",transition:"","hover:z-1000":"","bg-base":""},[s("div",{style:T({backgroundColor:l(i)}),absolute:"","bottom-0":"","left--1px":"","top-0":"","w-full":"","text-sm":"","transition-all":"","duration-300":""},null,4),s("div",{style:T({color:l(o),"--c":l(e)}),border:"r-2 t-2 y-2 transparent","min-w-max":"",px1:"","text-left":"","group-hover":"border-$c"},k(n.item.name),5)],4))}}),ye={relative:"","h-full":""},ve={absolute:"","left-2":"","top-2.3em":"","text-xs":"",op50:""},be=B({__name:"TimelineSegment",props:{segment:{}},emits:["select"],setup(h,{emit:d}){const p=h,e=d,o=O(()=>p.segment.start,{updateInterval:1e3,showSecond:!0,messages:{justNow:"",past:i=>i,future:i=>i,invalid:"-",second:i=>i?`${i}s`:"",minute:i=>`${i}m`,hour:i=>`${i}h`,week:i=>`${i}w`,day:i=>`${i}d`,month:i=>`${i}mo`,year:i=>`${i}y`}});return(i,n)=>{const a=fe;return t(),c("div",ye,[s("button",{absolute:"","left-0":"","right-0":"","top-0":"","bg-green:5":"",px2:"",py1:"","text-left":"","text-xs":"","font-mono":"","text-green6":"",onClick:n[0]||(n[0]=r=>i.segment.route?e("select",i.segment.route):void 0)},k(i.segment.route?.event.to),1),s("div",ve,k(l(o))+" ago ",1),s("div",null,[(t(!0),c(f,null,F(i.segment.functions,(r,u)=>(t(),y(a,{key:u,item:r.event,style:T({position:"absolute",minWidth:`${r.relativeWidth*100}%`,maxWidth:`${r.relativeWidth*100}%`,top:`${4+r.layer*1.6}em`,left:`${r.relativeStart*100}%`}),onClick:_=>e("select",r)},null,8,["item","style","onClick"]))),128))])])}}}),ge=3e3,xe=50;function $e(h){const d=[];let p={start:0,end:0,events:[],functions:[],duration:0};for(const e of h){const o=e.end||e.start;(e.start-p.end>ge||e.type==="route")&&(p={start:e.start,end:o,events:[],functions:[],duration:0},d.push(p)),p.events.push(e),p.end=o+xe}return d.forEach((e,o)=>{const i=e.end-e.start,n=[];e.duration=i,e.previousGap=o>0?e.start-d[o-1].end:0,e.events.forEach(a=>{const r=a.end||a.start;let u=0;a.type!=="route"&&(u=n.findIndex($=>$<=a.start),u===-1?(u=n.length,n.push(r+1e3)):n[u]=r+1e3);const _={event:a,segment:e,relativeStart:(a.start-e.start)/i,relativeWidth:(r-a.start)/i,layer:u};a.type==="function"?e.functions.push(_):e.route=_})}),d}const Ae={relative:""},De={key:0,border:"x base","h-full":"","flex-inline":"","bg-true-gray-1":"",py15:"","text-xs":"","write-vertical-left":"",op50:"","dark:bg-true-gray-9":""},Ce=B({__name:"TimelineTable",props:{data:{}},emits:["select"],setup(h,{emit:d}){const p=h,e=d,o=C(),i=C(),n=C(),a=C(),r=C(!0),u=C(1.5),_=w(()=>$e(p.data.events)),$=w(()=>(p.data.events.length,o.value?.scrollWidth||window.innerWidth));function A(){a.value&&(a.value.style.width=`${$.value}px`)}function S(){r.value&&o.value&&(o.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}),n.value.scrollTo({left:o.value.scrollWidth-o.value.clientWidth,behavior:"smooth"}))}return Y(()=>p.data.events.length,async()=>{await q(),A(),S()},{flush:"post"}),j(o,"scroll",()=>{n.value.scrollLeft!==o.value.scrollLeft&&(A(),n.value.scrollLeft=o.value.scrollLeft,r.value=o.value.scrollLeft>=o.value.scrollWidth-o.value.clientWidth)}),j(n,"scroll",()=>{n.value.scrollLeft!==o.value.scrollLeft&&(A(),o.value.scrollLeft=n.value.scrollLeft)}),j(o,"wheel",b=>{b.altKey?(u.value=U(u.value+b.deltaY/200,.5,3),A()):o.value.scrollLeft+=b.deltaY}),(b,L)=>{const D=M,V=be;return t(),c(f,null,[s("div",Ae,[s("div",{ref_key:"minimap",ref:i,border:"t b base",relative:"","h-50px":"","ws-nowrap":"","border-base":""},[(t(!0),c(f,null,F(l(_),(g,N)=>(t(),c("div",{key:N,relative:"","h-full":"","flex-inline":"",style:T({width:`${Math.max(100,g.duration/10)/l($)*100}%`})},[(t(!0),c(f,null,F(g.functions,(I,J)=>(t(),c("div",{key:J,"h-3px":"",rounded:"",style:T({width:`max(${I.relativeWidth*100}%, 10px)`,position:"absolute",top:`${I.layer*4}px`,left:`${I.relativeStart*100}%`,backgroundColor:("getHashColorFromString"in b?b.getHashColorFromString:l(W))(I.event.name,50,60)})},null,4))),128)),g.route?(t(),c("div",{key:0,absolute:"","top-0":"","h-full":"","w-px":"","border-l":"","border-green6":"",op10:"",style:T({left:`${g.route.relativeStart*100}%`})},null,4)):x("",!0)],4))),128))],512),s("div",{ref_key:"minimapScroller",ref:n,class:"timeline-scroller",absolute:"","inset-0":"","h-full":"","w-full":"","of-x-scroll":""},[s("div",{ref_key:"minimapScrollerInner",ref:a,"h-1px":""},null,512)],512)]),s("div",{ref_key:"scroller",ref:o,relative:"","h-full":"","w-full":"","of-x-scroll":"","of-y-hidden":"","ws-nowrap":"","n-panel-grids":""},[(t(!0),c(f,null,F(l(_),(g,N)=>(t(),c(f,{key:N},[g.previousGap&&g.previousGap>=200?(t(),c("div",De,[m(D,{op50:"",duration:g.previousGap,color:!1},null,8,["duration"])])):x("",!0),m(V,{"flex-inline":"","of-x-hidden":"","hover:of-x-visible":"","bg-base":"",class:z(N===l(_).length-1?"border-r border-base":""),segment:g,style:T({width:`${Math.max(50,g.duration/10)*l(u)}px`}),onSelect:L[0]||(L[0]=I=>e("select",I))},null,8,["class","segment","style"])],64))),128))],512)],64)}}});const Be=Z(Ce,[["__scopeId","data-v-a2c475c0"]]),we={border:"t base",flex:"~ col","h-full":"","of-y-auto":"","text-sm":""},Te=["onClick"],Se=s("div",{"i-carbon-function":"",op50:""},null,-1),Ne={flex:"~","ml--1":"","font-mono":""},Ee=s("div",{op30:""}," ( ",-1),Fe={key:0,mr2:"",op30:""},Le={op75:""},Ie=s("div",{op30:""}," ) ",-1),Ve=s("div",{"mr-1":"","h-7":"","w-7":"",flex:"","rounded-lg":"","bg-primary:5":"",p1:"","text-green6":""},[s("div",{"i-carbon-direction-rotary-right":"",ma:"","text-lg":""})],-1),We={flex:"~ col items-start"},Me={"text-xs":"","font-mono":"",op30:""},je={"font-bold":"","font-mono":"","text-green":""},Oe=s("div",{"flex-auto":""},null,-1),ze=s("div",{"min-h-100":""},null,-1),Ge=B({__name:"TimelineList",props:{data:{}},emits:["select"],setup(h,{emit:d}){const p=d;return(e,o)=>{const i=M;return t(),c("div",we,[(t(!0),c(f,null,F(e.data.events,(n,a)=>(t(),c("button",{key:a,border:"b base",px3:"",py2:"",flex:"~ items-center gap-2",hover:"bg-active",onClick:r=>p("select",n)},[n.type==="function"?(t(),c(f,{key:0},[Se,s("div",{"font-mono":"",style:T({color:n.type==="function"?("getHashColorFromString"in e?e.getHashColorFromString:l(W))(n.name,50,60):""})},k(n.name),5),s("div",Ne,[Ee,(t(!0),c(f,null,F(n.args,(r,u)=>(t(),c(f,{key:u},[u?(t(),c("div",Fe," , ")):x("",!0),s("div",Le,k(r===null?"null":r===void 0?"undefined":typeof r=="function"?"[function]":Array.isArray(r)?"[Array]":typeof r=="object"?"[object]":JSON.stringify(r)),1)],64))),128)),Ie])],64)):(t(),c(f,{key:1},[Ve,s("div",We,[s("div",Me,k(n.from),1),s("div",je,k(n.to),1)])],64)),Oe,n.end?(t(),y(i,{key:2,duration:n.end-n.start,color:n.type==="function"},null,8,["duration","color"])):x("",!0)],8,Te))),128)),ze])}}}),Re={key:0,"text-blue":""},He={key:1,"text-purple":""},Pe={key:2,"text-green":""},Je={key:3,"text-gray":""},Ye={key:4,"text-gray":""},qe={key:5,"text-gray":""},Ue={key:0,"bg-red:10":"",px2:"",py1:"","text-red":""},Ze={key:1},Ke={p2:"","text-sm":"",border:"t base"},Xe=B({__name:"TimelineArgumentView",props:{value:{}},setup(h){const d=h,p=C(),e=C();function o(){try{p.value=JSON.parse(JSON.stringify(d.value))}catch(a){console.error(a),e.value=a}}const i=B({emits:["setup"],setup(a,{emit:r}){return r("setup"),()=>null}}),n=K();return(a,r)=>{const u=G,_=H("VMenu");return typeof a.value=="string"?(t(),c("div",Re,k(JSON.stringify(a.value)),1)):typeof a.value=="number"?(t(),c("div",He,k(a.value),1)):typeof a.value=="boolean"?(t(),c("div",Pe,k(a.value),1)):typeof a.value>"u"?(t(),c("div",Je," undefined ")):typeof a.value=="function"?(t(),c("div",Ye," [Function"+k(a.value.name?`: ${a.value.name}`:"")+"] ",1)):a.value===null?(t(),c("div",qe," null ")):(t(),y(_,{key:6,placement:"top"},{popper:v(()=>[m(l(i),{onSetup:o}),l(e)?(t(),c("div",Ue," Failed to display object: "+k(l(e)),1)):l(p)?(t(),c("div",Ze,[m(l(pe),X({"model-value":l(p)},a.$attrs,{class:["json-editor-vue",[a.$colorMode.value==="dark"?"jse-theme-dark":""]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":!0,indentation:2,"tab-size":2}),null,16,["model-value","class"]),s("div",Ke,[m(u,{title:"Copy to clipboard",icon:"carbon-copy",onClick:r[0]||(r[0]=$=>l(n)(JSON.stringify(l(p),null,2),"timeline-argument"))},{default:v(()=>[E(" Copy ")]),_:1})])])):x("",!0)]),default:v(()=>[s("span",{"rounded-sm":"",px1:"","py0.5":"","text-sm":"",class:z([Array.isArray(a.value)?"text-amber bg-amber:10":"text-orange bg-orange:10"])},k(Array.isArray(a.value)?`[Array(${a.value.length})]`:"[Object]"),3)]),_:1}))}}}),Qe={key:0,"p-4":"",flex:"~ col gap-2","text-base":""},es={"mx--1":""},ss={flex:"~ gap-1","font-mono":""},ts={key:1},ns=s("span",{ml1:"",op30:""},"(",-1),os={key:0,op30:""},as=s("span",{op30:""},")",-1),ls={flex:"~ gap-1","text-sm":""},is=s("span",{mx1:"",op50:""},"·",-1),rs={class:"text-sm text-gray-400"},cs=B({__name:"TimelineDetailsFunction",props:{record:{}},setup(h){const d=h,p=O(()=>d.record.start,{showSecond:!0}),e=Q(),o=w(()=>e.value?.metadata),i=w(()=>e.value?.imports.find(n=>n.as===d.record.name));return(n,a)=>{const r=P,u=ce,_=Xe,$=M,A=de;return n.record?(t(),c("div",Qe,[s("div",es,[m(r,{n:"yellow",textContent:"Function call"})]),s("div",ss,[l(i)?(t(),y(u,{key:0,item:l(i),metadata:l(o),counter:!1,classes:"px2 py1","mx--2":""},null,8,["item","metadata"])):(t(),c("span",ts,k(n.record.name),1)),ns,(t(!0),c(f,null,F(n.record.args,(S,b)=>(t(),c(f,{key:b},[b?(t(),c("span",os,", ")):x("",!0),m(_,{value:S},null,8,["value"])],64))),128)),as]),s("div",ls,[n.record.end?(t(),y($,{key:0,duration:n.record.end-n.record.start},null,8,["duration"])):x("",!0),is,s("div",rs,k(l(p)),1)]),n.record.stacktrace?(t(),y(A,{key:0,stacktrace:n.record.stacktrace,class:"text-xs text-gray-400"},null,8,["stacktrace"])):x("",!0)])):x("",!0)}}}),ps={key:0,"p-4":"",flex:"~ col gap-2"},ds={"mx--1":""},us={flex:"~ gap-1 items-center","font-mono":""},ms={op50:""},ks=s("span",{"i-carbon-arrow-right":"",op50:""},null,-1),_s={flex:"~ gap-1","text-sm":""},hs=s("span",{mx1:"",op50:""},"·",-1),fs={class:"text-sm text-gray-400"},ys=B({__name:"TimelineDetailsRoute",props:{record:{}},setup(h){const d=h,p=O(()=>d.record.start,{showSecond:!0});return(e,o)=>{const i=P,n=M;return e.record?(t(),c("div",ps,[s("div",ds,[m(i,{n:"green",textContent:"Route Change"})]),s("div",us,[s("span",ms,k(e.record.from),1),ks,s("span",null,k(e.record.to),1)]),s("div",_s,[e.record.end?(t(),y(n,{key:0,duration:e.record.end-e.record.start},null,8,["duration"])):x("",!0),hs,s("div",fs,k(l(p)),1)])])):x("",!0)}}}),vs={key:0,"h-screen":"","of-hidden":""},bs={"h-screen":"","w-full":"",flex:"","flex-col":""},gs={"h-10":"",flex:"~ gap-2 items-center justify-end",p2:"",px3:""},xs={"text-sm":""},$s=s("div",{"flex-auto":""},null,-1),As={"min-h-50":"",px3:"",py2:""},Ds=B({__name:"TimelineView",setup(h){const d=ee(),p=C("table"),e=C(),o=w(()=>d.value?.metrics.clientTimeline());function i(){o.value&&(o.value.events=[])}function n(){p.value=p.value==="table"?"list":"table"}return(a,r)=>{const u=H("VTooltip"),_=G,$=Be,A=Ge,S=cs,b=ys,L=ue;return l(o)?(t(),c("div",vs,[s("div",bs,[s("div",gs,[m(u,{flex:""},{popper:v(()=>[s("div",xs,k(l(o).options.enabled?"Recording...":"Paused"),1)]),default:v(()=>[s("div",{"text-lg":"",class:z(l(o).options.enabled?"i-carbon-radio-button-checked text-primary animate-pulse":"i-carbon-pause-outline op30")},null,2)]),_:1}),l(o).options.enabled?(t(),y(_,{key:1,size:"small",ml1:"","text-sm":"",n:"orange",icon:"i-carbon-stop",onClick:r[1]||(r[1]=D=>l(o).options.enabled=!1)},{default:v(()=>[E(" Stop Tracking ")]),_:1})):(t(),y(_,{key:0,size:"small",ml1:"","text-sm":"",n:"primary",icon:"i-carbon-play",onClick:r[0]||(r[0]=D=>l(o).options.enabled=!0)},{default:v(()=>[E(" Start Tracking ")]),_:1})),$s,m(_,{icon:l(p)==="table"?"i-carbon-roadmap":"i-carbon-list",class:"ml-2",title:"Toggle View",border:!1,onClick:n},null,8,["icon"]),m(_,{icon:"i-carbon-trash-can","hover-text-red":"",class:"ml-2",border:!1,onClick:i})]),l(p)==="table"?(t(),y($,{key:0,data:{...l(o)},onSelect:r[2]||(r[2]=D=>e.value=D.event)},null,8,["data"])):(t(),y(A,{key:1,data:{...l(o)},onSelect:r[3]||(r[3]=D=>e.value=D)},null,8,["data"]))]),m(L,{"model-value":!!l(e),"auto-close":"",transition:"bottom",left:"#nuxt-devtools-side-nav",onClose:r[4]||(r[4]=D=>e.value=void 0)},{default:v(()=>[s("div",As,[l(e)?.type==="function"?(t(),y(S,{key:0,record:l(e)},null,8,["record"])):l(e)?.type==="route"?(t(),y(b,{key:1,record:l(e)},null,8,["record"])):x("",!0)])]),_:1},8,["model-value"])])):x("",!0)}}}),Cs={class:"markdown-body"},Bs=s("h1",null,"Timeline",-1),ws=s("p",null,[s("blockquote",{"text-orange":"","bg-orange:10":"",py1:""}," This is an experimental feature ")],-1),Ts=se(`<p>Timeline tracks your route navigations and functions calls in your Nuxt application. It can be used to debug performance issues and to understand how your application works.</p><h2>Function calls</h2><p>Nuxt DevTools tracks function calls by wrapping them in the build time. It works for functions referenced by auto-imports, or explicit imports through <code>import {} from '#imports'</code>.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#999999;--shiki-dark:#666666;"><</span><span style="color:#1E754F;--shiki-dark:#4D9375;">script</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> setup</span><span style="color:#999999;--shiki-dark:#666666;">></span></span>
|
|
2
|
+
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">#imports</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
3
|
+
<span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">import</span><span style="color:#999999;--shiki-dark:#666666;"> {</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;"> }</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> from</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
4
|
+
<span class="line"></span>
|
|
5
|
+
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> route</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useRoute</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
6
|
+
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> app</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useNuxtApp</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // tracked</span></span>
|
|
7
|
+
<span class="line"></span>
|
|
8
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;">// NOT tracked because it's directly imported</span></span>
|
|
9
|
+
<span class="line"><span style="color:#AB5959;--shiki-dark:#CB7676;">const</span><span style="color:#B07D48;--shiki-dark:#BD976A;"> mouse</span><span style="color:#999999;--shiki-dark:#666666;"> =</span><span style="color:#59873A;--shiki-dark:#80A665;"> useMouse</span><span style="color:#999999;--shiki-dark:#666666;">()</span><span style="color:#393A34;--shiki-dark:#DBD7CAEE;"> </span></span>
|
|
10
|
+
<span class="line"></span></code></pre><p>By default, it tracks Nuxt provided composables as well as user defined functions. You can include/exclude functions by using the <code>include</code> and <code>exclude</code> options in the <code>nuxt.config.js</code> file.</p><pre class="shiki shiki-themes vitesse-light vitesse-dark" style="background-color:#ffffff;--shiki-dark-bg:#121212;color:#393a34;--shiki-dark:#dbd7caee;" tabindex="0"><code><span class="line"><span style="color:#1E754F;--shiki-dark:#4D9375;">export</span><span style="color:#1E754F;--shiki-dark:#4D9375;"> default</span><span style="color:#59873A;--shiki-dark:#80A665;"> defineNuxtConfig</span><span style="color:#999999;--shiki-dark:#666666;">({</span></span>
|
|
11
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> devtools</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
12
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> timeline</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
13
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> functions</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> {</span></span>
|
|
14
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> include</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
15
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track \`useMouse\`</span></span>
|
|
16
|
+
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useMouse</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
17
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions starting with \`use\`</span></span>
|
|
18
|
+
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> /</span><span style="color:#1E754F;--shiki-dark:#4D9375;">^</span><span style="color:#AB5E3F;--shiki-dark:#C4704F;">use</span><span style="color:#999999;--shiki-dark:#666666;">[</span><span style="color:#A65E2B;--shiki-dark:#C99076;">A-Z</span><span style="color:#999999;--shiki-dark:#666666;">]</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">/</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
19
|
+
<span class="line"><span style="color:#A0ADA0;--shiki-dark:#758575DD;"> // track all functions from @vueuse/core</span></span>
|
|
20
|
+
<span class="line"><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;"> =></span><span style="color:#B07D48;--shiki-dark:#BD976A;"> entry</span><span style="color:#999999;--shiki-dark:#666666;">.</span><span style="color:#B07D48;--shiki-dark:#BD976A;">from</span><span style="color:#AB5959;--shiki-dark:#CB7676;"> ===</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">@vueuse/core</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span><span style="color:#999999;--shiki-dark:#666666;">,</span></span>
|
|
21
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ],</span></span>
|
|
22
|
+
<span class="line"><span style="color:#998418;--shiki-dark:#B8A965;"> exclude</span><span style="color:#999999;--shiki-dark:#666666;">:</span><span style="color:#999999;--shiki-dark:#666666;"> [</span></span>
|
|
23
|
+
<span class="line"><span style="color:#B5695999;--shiki-dark:#C98A7D99;"> '</span><span style="color:#B56959;--shiki-dark:#C98A7D;">useRouter</span><span style="color:#B5695999;--shiki-dark:#C98A7D99;">'</span></span>
|
|
24
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> ]</span></span>
|
|
25
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
26
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
27
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;"> }</span></span>
|
|
28
|
+
<span class="line"><span style="color:#999999;--shiki-dark:#666666;">})</span></span>
|
|
29
|
+
<span class="line"></span></code></pre>`,6),Ss=[Bs,ws,Ts],Ns={__name:"timeline",setup(h,{expose:d}){return d({frontmatter:{}}),(e,o)=>(t(),c("div",Cs,Ss))}},Es={flex:"~ col gap-2","w-150":"",p4:"",border:"t base"},Fs=s("h2",{"text-xl":""},[s("span",{capitalize:""},"Enable Timeline?")],-1),Ls={op50:""},Is=s("p",null,[s("span",{op50:""},"Then Nuxt will "),s("span",{"text-orange":""},"restart automatically"),E(". ")],-1),Vs={flex:"~ gap-3",mt2:"","justify-end":""},Qs=B({__name:"timeline",setup(h){const d=te(),p=ne(),e=oe(),o=ae();async function i(){try{const[n,a]=await R.enableTimeline(!0);if(!await e.start(n,a))return;await R.enableTimeline(!1)}catch{ie({message:"Failed to enable timeline automatically. Check the terminal for more details.",icon:"i-carbon-warning",classes:"text-red"})}}return(n,a)=>{const r=Ds,u=me,_=le,$=ke,A=_e,S=G,b=re,L=Ns,D=he;return t(),c(f,null,[l(d)?.timeline?.enabled?(t(),y(r,{key:0})):(t(),c(f,{key:1},[m(_,null,{default:v(()=>[m(u,{icon:"i-carbon-roadmap",name:"feature-timeline",title:"Timeline",description:"Timeline enables the inspection of when composable being executed and the route changes.",actions:[{label:"Enable"}],onAction:i})]),_:1}),m(l(e),null,{default:v(({resolve:V,args:g})=>[m(b,{"model-value":!0,onClose:N=>V(!1)},{default:v(()=>[s("div",Es,[Fs,s("p",Ls,[E(" Your "),m($,{role:"button",n:"primary",underline:"",onClick:a[0]||(a[0]=N=>l(o)(l(p)?._nuxtConfigFile)),textContent:"Nuxt config"}),E(" will be updated as: ")]),m(A,{from:g[0],to:g[1],"max-h-80":"","of-auto":"",py2:"",border:"~ base rounded",lang:"ts"},null,8,["from","to"]),Is,s("div",Vs,[m(S,{onClick:N=>V(!1)},{default:v(()=>[E(" Cancel ")]),_:2},1032,["onClick"]),m(S,{n:"solid primary",capitalize:"",onClick:N=>V(!0)},{default:v(()=>[E(" Enable ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1})],64)),m(D,null,{default:v(()=>[m(L)]),_:1})],64)}}});export{Qs as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as xe}from"./entry.
|
|
1
|
+
import{$ as xe}from"./entry.35c58391.js";function $e(t){const e=t.length;let n=-1,s,r="";const i=t.charCodeAt(0);for(;++n<e;){if(s=t.charCodeAt(n),s===0){r+="�";continue}if(s===37){r+="\\%";continue}if(s===44){r+="\\,";continue}if(s>=1&&s<=31||s===127||n===0&&s>=48&&s<=57||n===1&&s>=48&&s<=57&&i===45){r+=`\\${s.toString(16)} `;continue}if(n===0&&e===1&&s===45){r+=`\\${t.charAt(n)}`;continue}if(s>=128||s===45||s===95||s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122){r+=t.charAt(n);continue}r+=`\\${t.charAt(n)}`}return r}const G=$e;function P(t=[]){return Array.isArray(t)?t:[t]}function U(t){return Array.from(new Set(t))}function _e(t,e){return t.reduce((n,s)=>(n.findIndex(i=>e(s,i))===-1&&n.push(s),n),[])}function O(t){return typeof t=="string"}function R(t){return O(t)?t:(Array.isArray(t)?t:Object.entries(t)).filter(e=>e[1]!=null)}function Ce(t){return Array.isArray(t)?t.find(e=>!Array.isArray(e)||Array.isArray(e[0]))?t.map(e=>R(e)):[t]:[R(t)]}function Ae(t){return t.filter(([e,n],s)=>{if(e.startsWith("$$"))return!1;for(let r=s-1;r>=0;r--)if(t[r][0]===e&&t[r][1]===n)return!1;return!0})}function W(t){return t==null?"":Ae(t).map(([e,n])=>n!=null?`${e}:${n};`:void 0).filter(Boolean).join("")}function D(t){return t&&typeof t=="object"&&!Array.isArray(t)}function ue(t,e,n=!1){const s=t,r=e;if(Array.isArray(r))return n&&Array.isArray(r)?[...s,...r]:[...r];const i={...s};return D(s)&&D(r)&&Object.keys(r).forEach(o=>{D(s[o])&&D(r[o])||Array.isArray(s[o])&&Array.isArray(r[o])?i[o]=ue(s[o],r[o],n):Object.assign(i,{[o]:r[o]})}),i}function B(t){let e,n,s;if(Array.isArray(t)){for(n=Array(e=t.length);e--;)n[e]=(s=t[e])&&typeof s=="object"?B(s):s;return n}if(Object.prototype.toString.call(t)==="[object Object]"){n={};for(e in t)e==="__proto__"?Object.defineProperty(n,e,{value:B(t[e]),configurable:!0,enumerable:!0,writable:!0}):n[e]=(s=t[e])&&typeof s=="object"?B(s):s;return n}return t}function Oe(t){return O(t[0])}function Me(t){return O(t[0])}const J="$$shortcut-no-merge";function Ee(t){return typeof t=="function"?{match:t}:t}function Q(t){return t.length===3}function je(t){return t!=null}function ke(){}var Pe=Object.defineProperty,Le=(t,e,n)=>e in t?Pe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ze=(t,e,n)=>(Le(t,typeof e!="symbol"?e+"":e,n),n);class Te{constructor(){ze(this,"_map",new Map)}get(e,n){const s=this._map.get(e);if(s)return s.get(n)}getFallback(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.has(n)||r.set(n,s),r.get(n)}set(e,n,s){let r=this._map.get(e);return r||(r=new Map,this._map.set(e,r)),r.set(n,s),this}has(e,n){return this._map.get(e)?.has(n)}delete(e,n){return this._map.get(e)?.delete(n)||!1}deleteTop(e){return this._map.delete(e)}map(e){return Array.from(this._map.entries()).flatMap(([n,s])=>Array.from(s.entries()).map(([r,i])=>e(i,n,r)))}}var Fe=Object.defineProperty,Ie=(t,e,n)=>e in t?Fe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Re=(t,e,n)=>(Ie(t,typeof e!="symbol"?e+"":e,n),n);class he extends Set{constructor(e){super(e),Re(this,"_map"),this._map??(this._map=new Map)}add(e){return this._map??(this._map=new Map),this._map.set(e,(this._map.get(e)??0)+1),super.add(e)}delete(e){return this._map.delete(e),super.delete(e)}clear(){this._map.clear(),super.clear()}getCount(e){return this._map.get(e)??0}setCount(e,n){return this._map.set(e,n),super.add(e)}}function Y(t){return t instanceof he}const V={};function Ne(t=["-",":"]){const e=t.join("|");return V[e]||(V[e]=new RegExp(`((?:[!@<~\\w+:_/-]|\\[&?>?:?\\S*\\])+?)(${e})\\(((?:[~!<>\\w\\s:/\\\\,%#.$?-]|\\[.*?\\])+?)\\)(?!\\s*?=>)`,"gm")),V[e].lastIndex=0,V[e]}function De(t,e=["-",":"],n=5){const s=Ne(e);let r,i=t.toString();const o=new Set,a=new Map;do r=!1,i=i.replace(s,(u,c,h,g,y)=>{if(!e.includes(h))return u;r=!0,o.add(c+h);const x=y+c.length+h.length+1,m={length:u.length,items:[]};a.set(y,m);for(const d of[...g.matchAll(/\S+/g)]){const $=x+d.index;let w=a.get($)?.items;w?a.delete($):w=[{offset:$,length:d[0].length,className:d[0]}];for(const b of w)b.className=b.className==="~"?c:b.className.replace(/^(!?)(.*)/,`$1${c}${h}$2`),m.items.push(b)}return"$".repeat(u.length)}),n-=1;while(r&&n);let f;if(typeof t=="string"){f="";let u=0;for(const[c,h]of a)f+=t.slice(u,c),f+=h.items.map(g=>g.className).join(" "),u=c+h.length;f+=t.slice(u)}else{f=t;for(const[u,c]of a)f.overwrite(u,u+c.length,c.items.map(h=>h.className).join(" "))}return{prefixes:Array.from(o),hasChanged:r,groupsByOffset:a,get expanded(){return f.toString()}}}function Ve(t,e=["-",":"],n=5){const s=De(t,e,n);return typeof t=="string"?s.expanded:t}const ee=new Set;function de(t){ee.has(t)||(console.warn("[unocss]",t),ee.add(t))}const Be=/[\\:]?[\s'"`;{}]+/g;function Ue(t){return t.split(Be)}const He={name:"@unocss/core/extractor-split",order:0,extract({code:t}){return Ue(t)}};function Ge(){return{events:{},emit(t,...e){(this.events[t]||[]).forEach(n=>n(...e))},on(t,e){return(this.events[t]=this.events[t]||[]).push(e),()=>this.events[t]=(this.events[t]||[]).filter(n=>n!==e)}}}const K="default",X="preflights",We="shortcuts",Ye="imports",qe={[Ye]:-200,[X]:-100,[We]:-10,[K]:0};function pe(t){return P(t).flatMap(e=>Array.isArray(e)?[e]:Object.entries(e))}const te="_uno_resolved";function Ke(t){let e=typeof t=="function"?t():t;if(te in e)return e;e={...e},Object.defineProperty(e,te,{value:!0,enumerable:!1});const n=e.shortcuts?pe(e.shortcuts):void 0;if(e.shortcuts=n,e.prefix||e.layer){const s=r=>{r[2]||(r[2]={});const i=r[2];i.prefix==null&&e.prefix&&(i.prefix=P(e.prefix)),i.layer==null&&e.layer&&(i.layer=e.layer)};n?.forEach(s),e.rules?.forEach(s)}return e}function me(t){const e=Ke(t);if(!e.presets)return[e];const n=(e.presets||[]).flatMap(P).flatMap(me);return[e,...n]}function ne(t={},e={}){const n=Object.assign({},e,t),s=_e((n.presets||[]).flatMap(P).flatMap(me),(l,v)=>l.name===v.name),r=[...s.filter(l=>l.enforce==="pre"),...s.filter(l=>!l.enforce),...s.filter(l=>l.enforce==="post")],i=[...r,n],o=[...i].reverse(),a=Object.assign({},qe,...i.map(l=>l.layers));function f(l){return U(i.flatMap(v=>P(v[l]||[])))}const u=f("extractors");let c=o.find(l=>l.extractorDefault!==void 0)?.extractorDefault;c===void 0&&(c=He),c&&!u.includes(c)&&u.unshift(c),u.sort((l,v)=>(l.order||0)-(v.order||0));const h=f("rules"),g={},y=h.length,x=h.map((l,v)=>{if(Oe(l)){P(l[2]?.prefix||"").forEach(A=>{g[A+l[0]]=[v,l[1],l[2],l]});return}return[v,...l]}).filter(Boolean).reverse();let m=Xe(i.map(l=>l.theme));const d=f("extendTheme");for(const l of d)m=l(m)||m;const $={templates:U(i.flatMap(l=>P(l.autocomplete?.templates))),extractors:i.flatMap(l=>P(l.autocomplete?.extractors)).sort((l,v)=>(l.order||0)-(v.order||0)),shorthands:Ze(i.map(l=>l.autocomplete?.shorthands||{}))};let w=f("separators");w.length||(w=[":","-"]);const b={mergeSelectors:!0,warn:!0,sortLayers:l=>l,...n,blocklist:f("blocklist"),presets:r,envMode:n.envMode||"build",shortcutsLayer:n.shortcutsLayer||"shortcuts",layers:a,theme:m,rulesSize:y,rulesDynamic:x,rulesStaticMap:g,preprocess:f("preprocess"),postprocess:f("postprocess"),preflights:f("preflights"),autocomplete:$,variants:f("variants").map(Ee).sort((l,v)=>(l.order||0)-(v.order||0)),shortcuts:pe(f("shortcuts")).reverse(),extractors:u,safelist:f("safelist"),separators:w,details:n.details??n.envMode==="dev"};for(const l of i)l?.configResolved?.(b);return b}function Xe(t){return t.map(e=>e?B(e):{}).reduce((e,n)=>ue(e,n),{})}function Ze(t){return t.reduce((e,n)=>{const s={};for(const r in n){const i=n[r];Array.isArray(i)?s[r]=`(${i.join("|")})`:s[r]=i}return{...e,...s}},{})}const Je="0.57.7";var Qe=Object.defineProperty,et=(t,e,n)=>e in t?Qe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,F=(t,e,n)=>(et(t,typeof e!="symbol"?e+"":e,n),n);class tt{constructor(e={},n={}){this.userConfig=e,this.defaults=n,F(this,"version",Je),F(this,"_cache",new Map),F(this,"config"),F(this,"blocked",new Set),F(this,"parentOrders",new Map),F(this,"events",Ge()),this.config=ne(e,n),this.events.emit("config",this.config)}setConfig(e,n){e&&(n&&(this.defaults=n),this.userConfig=e,this.blocked.clear(),this.parentOrders.clear(),this._cache.clear(),this.config=ne(e,this.defaults),this.events.emit("config",this.config))}async applyExtractors(e,n,s=new Set){const r={original:e,code:e,id:n,extracted:s,envMode:this.config.envMode};for(const i of this.config.extractors){const o=await i.extract?.(r);if(o)if(Y(o)&&Y(s))for(const a of o)s.setCount(a,s.getCount(a)+o.getCount(a));else for(const a of o)s.add(a)}return s}makeContext(e,n){const s={rawSelector:e,currentSelector:n[1],theme:this.config.theme,generator:this,variantHandlers:n[2],constructCSS:(...r)=>this.constructCustomCSS(s,...r),variantMatch:n};return s}async parseToken(e,n){if(this.blocked.has(e))return;const s=`${e}${n?` ${n}`:""}`;if(this._cache.has(s))return this._cache.get(s);let r=e;for(const u of this.config.preprocess)r=u(e);if(this.isBlocked(r)){this.blocked.add(e),this._cache.set(s,null);return}const i=await this.matchVariants(e,r);if(!i||this.isBlocked(i[1])){this.blocked.add(e),this._cache.set(s,null);return}const o=this.makeContext(e,[n||i[0],i[1],i[2],i[3]]);this.config.details&&(o.variants=[...i[3]]);const a=await this.expandShortcut(o.currentSelector,o),f=a?await this.stringifyShortcuts(o.variantMatch,o,a[0],a[1]):(await this.parseUtil(o.variantMatch,o))?.map(u=>this.stringifyUtil(u,o)).filter(je);if(f?.length)return this._cache.set(s,f),f;this._cache.set(s,null)}async generate(e,n={}){const{id:s,scope:r,preflights:i=!0,safelist:o=!0,minify:a=!1,extendedInfo:f=!1}=n,u=O(e)?await this.applyExtractors(e,s,f?new he:new Set):Array.isArray(e)?new Set(e):e;o&&this.config.safelist.forEach(l=>{u.has(l)||u.add(l)});const c=a?"":`
|
|
2
2
|
`,h=new Set([K]),g=f?new Map:new Set,y=new Map;let x={};const m=Array.from(u).map(async l=>{if(g.has(l))return;const v=await this.parseToken(l);if(v!=null){g instanceof Map?g.set(l,{data:v,count:Y(u)?u.getCount(l):-1}):g.add(l);for(const C of v){const A=C[3]||"",M=C[4]?.layer;y.has(A)||y.set(A,[]),y.get(A).push(C),M&&h.add(M)}}});await Promise.all(m),await(async()=>{if(!i)return;const l={generator:this,theme:this.config.theme},v=new Set([]);this.config.preflights.forEach(({layer:C=X})=>{h.add(C),v.add(C)}),x=Object.fromEntries(await Promise.all(Array.from(v).map(async C=>{const M=(await Promise.all(this.config.preflights.filter(z=>(z.layer||X)===C).map(async z=>await z.getCSS(l)))).filter(Boolean).join(c);return[C,M]})))})();const d=this.config.sortLayers(Array.from(h).sort((l,v)=>(this.config.layers[l]??0)-(this.config.layers[v]??0)||l.localeCompare(v))),$={},w=l=>{if($[l])return $[l];let v=Array.from(y).sort((A,M)=>(this.parentOrders.get(A[0])??0)-(this.parentOrders.get(M[0])??0)||A[0]?.localeCompare(M[0]||"")||0).map(([A,M])=>{const z=M.length,T=M.filter(p=>(p[4]?.layer||K)===l).sort((p,S)=>p[0]-S[0]||(p[4]?.sort||0)-(S[4]?.sort||0)||p[5]?.currentSelector?.localeCompare(S[5]?.currentSelector??"")||p[1]?.localeCompare(S[1]||"")||p[2]?.localeCompare(S[2]||"")||0).map(([,p,S,,_,,E])=>[[[(p&&it(p,r))??"",_?.sort??0]],S,!!(E??_?.noMerge)]);if(!T.length)return;const I=T.reverse().map(([p,S,_],E)=>{if(!_&&this.config.mergeSelectors)for(let j=E+1;j<z;j++){const L=T[j];if(L&&!L[2]&&(p&&L[0]||p==null&&L[0]==null)&&L[1]===S)return p&&L[0]&&L[0].push(...p),null}const k=p?U(p.sort((j,L)=>j[1]-L[1]||j[0]?.localeCompare(L[0]||"")||0).map(j=>j[0]).filter(Boolean)):[];return k.length?`${k.join(`,${c}`)}{${S}}`:S}).filter(Boolean).reverse().join(c);if(!A)return I;const N=A.split(" $$ ");return`${N.join("{")}{${c}${I}${c}${"}".repeat(N.length)}`}).filter(Boolean).join(c);i&&(v=[x[l],v].filter(Boolean).join(c));const C=a?"":`/* layer: ${l} */${c}`;return $[l]=v?C+v:""},b=(l=d,v)=>l.filter(C=>!v?.includes(C)).map(C=>w(C)||"").filter(Boolean).join(c);return{get css(){return b()},layers:d,matched:g,getLayers:b,getLayer:w}}async matchVariants(e,n){const s=new Set,r=[];let i=n||e,o=!0;const a={rawSelector:e,theme:this.config.theme,generator:this};for(;o;){o=!1;for(const f of this.config.variants){if(!f.multiPass&&s.has(f))continue;let u=await f.match(i,a);if(u){if(O(u)){if(u===i)continue;u={matcher:u}}i=u.matcher,r.unshift(u),s.add(f),o=!0;break}}if(!o)break;if(r.length>500)throw new Error(`Too many variants applied to "${e}"`)}return[e,i,r,s]}applyVariants(e,n=e[4],s=e[1]){const i=n.slice().sort((u,c)=>(u.order||0)-(c.order||0)).reduceRight((u,c)=>h=>{const g=c.body?.(h.entries)||h.entries,y=Array.isArray(c.parent)?c.parent:[c.parent,void 0];return(c.handle??at)({...h,entries:g,selector:c.selector?.(h.selector,g)||h.selector,parent:y[0]||h.parent,parentOrder:y[1]||h.parentOrder,layer:c.layer||h.layer,sort:c.sort||h.sort},u)},u=>u)({prefix:"",selector:ot(s),pseudo:"",entries:e[2]}),{parent:o,parentOrder:a}=i;o!=null&&a!=null&&this.parentOrders.set(o,a);const f={selector:[i.prefix,i.selector,i.pseudo].join(""),entries:i.entries,parent:o,layer:i.layer,sort:i.sort,noMerge:i.noMerge};for(const u of this.config.postprocess)u(f);return f}constructCustomCSS(e,n,s){const r=R(n);if(O(r))return r;const{selector:i,entries:o,parent:a}=this.applyVariants([0,s||e.rawSelector,r,void 0,e.variantHandlers]),f=`${i}{${W(o)}}`;return a?`${a}{${f}}`:f}async parseUtil(e,n,s=!1,r){const[i,o,a]=O(e)?await this.matchVariants(e):e;this.config.details&&(n.rules=n.rules??[]);const f=this.config.rulesStaticMap[o];if(f&&f[1]&&(s||!f[2]?.internal)){this.config.details&&n.rules.push(f[3]);const c=f[0],h=R(f[1]),g=f[2];return O(h)?[[c,h,g]]:[[c,i,h,g,a]]}n.variantHandlers=a;const{rulesDynamic:u}=this.config;for(const[c,h,g,y]of u){if(y?.internal&&!s)continue;let x=o;if(y?.prefix){const w=P(y.prefix);if(r){const b=P(r);if(!w.some(l=>b.includes(l)))continue}else{const b=w.find(l=>o.startsWith(l));if(b==null)continue;x=o.slice(b.length)}}const m=x.match(h);if(!m)continue;const d=await g(m,n);if(!d)continue;this.config.details&&n.rules.push([h,g,y]);const $=Ce(d).filter(w=>w.length);if($.length)return $.map(w=>O(w)?[c,w,y]:[c,i,w,y,a])}}stringifyUtil(e,n){if(!e)return;if(Q(e))return[e[0],void 0,e[1],void 0,e[2],this.config.details?n:void 0,void 0];const{selector:s,entries:r,parent:i,layer:o,sort:a,noMerge:f}=this.applyVariants(e),u=W(r);if(!u)return;const{layer:c,sort:h,...g}=e[3]??{},y={...g,layer:o??c,sort:a??h};return[e[0],s,u,i,y,this.config.details?n:void 0,f]}async expandShortcut(e,n,s=5){if(s===0)return;const r=this.config.details?a=>{n.shortcuts=n.shortcuts??[],n.shortcuts.push(a)}:ke;let i,o;for(const a of this.config.shortcuts){let f=e;if(a[2]?.prefix){const c=P(a[2].prefix).find(h=>e.startsWith(h));if(c==null)continue;f=e.slice(c.length)}if(Me(a)){if(a[0]===f){i=i||a[2],o=a[1],r(a);break}}else{const u=f.match(a[0]);if(u&&(o=a[1](u,n)),o){i=i||a[2],r(a);break}}}if(O(o)&&(o=Ve(o.trim()).split(/\s+/g)),!o){const[a,f]=O(e)?await this.matchVariants(e):e;if(a!==f){const u=await this.expandShortcut(f,n,s-1);u&&(o=u[0].map(c=>O(c)?a.replace(f,c):c))}}if(o)return[(await Promise.all(o.map(async a=>(O(a)?(await this.expandShortcut(a,n,s-1))?.[0]:void 0)||[a]))).flat(1).filter(Boolean),i]}async stringifyShortcuts(e,n,s,r={layer:this.config.shortcutsLayer}){const i=new Te,o=(await Promise.all(U(s).map(async c=>{const h=O(c)?await this.parseUtil(c,n,!0,r.prefix):[[Number.POSITIVE_INFINITY,"{inline}",R(c),void 0,[]]];return!h&&this.config.warn&&de(`unmatched utility "${c}" in shortcut "${e[1]}"`),h||[]}))).flat(1).filter(Boolean).sort((c,h)=>c[0]-h[0]),[a,,f]=e,u=[];for(const c of o){if(Q(c)){u.push([c[0],void 0,c[1],void 0,c[2],n,void 0]);continue}const{selector:h,entries:g,parent:y,sort:x,noMerge:m}=this.applyVariants(c,[...c[4],...f],a);i.getFallback(h,y,[[],c[0]])[0].push([g,!!(m??c[3]?.noMerge),x??0])}return u.concat(i.map(([c,h],g,y)=>{const x=(d,$,w)=>{const b=Math.max(...w.map(v=>v[1])),l=w.map(v=>v[0]);return(d?[l.flat(1)]:l).map(v=>{const C=W(v);if(C)return[h,g,C,y,{...r,noMerge:$,sort:b},n,void 0]})};return[[c.filter(([,d])=>d).map(([d,,$])=>[d,$]),!0],[c.filter(([,d])=>!d).map(([d,,$])=>[d,$]),!1]].map(([d,$])=>[...x(!1,$,d.filter(([w])=>w.some(b=>b[0]===J))),...x(!0,$,d.filter(([w])=>w.every(b=>b[0]!==J)))])}).flat(2).filter(Boolean))}isBlocked(e){return!e||this.config.blocklist.some(n=>typeof n=="function"?n(e):O(n)?n===e:n.test(e))}}function nt(t,e){return new tt(t,e)}const rt=/\s\$\$\s+/g;function st(t){return t.match(/\s\$\$\s/)}function it(t,e){return st(t)?t.replace(rt,e?` ${e} `:" "):e?`${e} ${t}`:t}const re=/^\[(.+?)(~?=)"(.*)"\]$/;function ot(t){return re.test(t)?t.replace(re,(e,n,s,r)=>`[${G(n)}${s}"${G(r)}"]`):`.${G(t)}`}function at(t,e){return e(t)}const ct=Object.freeze({left:0,top:0,width:16,height:16}),H=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ge=Object.freeze({...ct,...H}),lt=Object.freeze({...ge,body:"",hidden:!1}),ft=Object.freeze({width:null,height:null}),ye=Object.freeze({...ft,...H});function ut(t,e){const n={};!t.hFlip!=!e.hFlip&&(n.hFlip=!0),!t.vFlip!=!e.vFlip&&(n.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(n.rotate=s),n}function se(t,e){const n=ut(t,e);for(const s in lt)s in H?s in t&&!(s in n)&&(n[s]=H[s]):s in e?n[s]=e[s]:s in t&&(n[s]=t[s]);return n}function ht(t,e){const n=t.icons,s=t.aliases||Object.create(null),r=Object.create(null);function i(o){if(n[o])return r[o]=[];if(!(o in r)){r[o]=null;const a=s[o]&&s[o].parent,f=a&&i(a);f&&(r[o]=[a].concat(f))}return r[o]}return(e||Object.keys(n).concat(Object.keys(s))).forEach(i),r}function ie(t,e,n){const s=t.icons,r=t.aliases||Object.create(null);let i={};function o(a){i=se(s[a]||r[a],i)}return o(e),n.forEach(o),se(t,i)}function dt(t,e){if(t.icons[e])return ie(t,e,[]);const n=ht(t,[e])[e];return n?ie(t,e,n):null}const pt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mt=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function oe(t,e,n){if(e===1)return t;if(n=n||100,typeof t=="number")return Math.ceil(t*e*n)/n;if(typeof t!="string")return t;const s=t.split(pt);if(s===null||!s.length)return t;const r=[];let i=s.shift(),o=mt.test(i);for(;;){if(o){const a=parseFloat(i);isNaN(a)?r.push(i):r.push(Math.ceil(a*e*n)/n)}else r.push(i);if(i=s.shift(),i===void 0)return r.join("");o=!o}}function gt(t){let e="";const n=t.indexOf("<defs");for(;n>=0;){const s=t.indexOf(">",n),r=t.indexOf("</defs");if(s===-1||r===-1)break;const i=t.indexOf(">",r);if(i===-1)break;e+=t.slice(s+1,r).trim(),t=t.slice(0,n).trim()+t.slice(i+1)}return{defs:e,content:t}}function yt(t,e){return t?"<defs>"+t+"</defs>"+e:e}function wt(t,e,n){const s=gt(t);return yt(s.defs,e+s.content+n)}const Z=t=>t==="unset"||t==="undefined"||t==="none";function vt(t,e){const n={...ge,...t},s={...ye,...e},r={left:n.left,top:n.top,width:n.width,height:n.height};let i=n.body;[n,s].forEach(m=>{const d=[],$=m.hFlip,w=m.vFlip;let b=m.rotate;$?w?b+=2:(d.push("translate("+(r.width+r.left).toString()+" "+(0-r.top).toString()+")"),d.push("scale(-1 1)"),r.top=r.left=0):w&&(d.push("translate("+(0-r.left).toString()+" "+(r.height+r.top).toString()+")"),d.push("scale(1 -1)"),r.top=r.left=0);let l;switch(b<0&&(b-=Math.floor(b/4)*4),b=b%4,b){case 1:l=r.height/2+r.top,d.unshift("rotate(90 "+l.toString()+" "+l.toString()+")");break;case 2:d.unshift("rotate(180 "+(r.width/2+r.left).toString()+" "+(r.height/2+r.top).toString()+")");break;case 3:l=r.width/2+r.left,d.unshift("rotate(-90 "+l.toString()+" "+l.toString()+")");break}b%2===1&&(r.left!==r.top&&(l=r.left,r.left=r.top,r.top=l),r.width!==r.height&&(l=r.width,r.width=r.height,r.height=l)),d.length&&(i=wt(i,'<g transform="'+d.join(" ")+'">',"</g>"))});const o=s.width,a=s.height,f=r.width,u=r.height;let c,h;o===null?(h=a===null?"1em":a==="auto"?u:a,c=oe(h,f/u)):(c=o==="auto"?f:o,h=a===null?oe(c,u/f):a==="auto"?u:a);const g={},y=(m,d)=>{Z(d)||(g[m]=d.toString())};y("width",c),y("height",h);const x=[r.left,r.top,f,u];return g.viewBox=x.join(" "),{attributes:g,viewBox:x,body:i}}function bt(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function St(t){let e=t.startsWith("<svg>")?t.replace("<svg>","<svg >"):t;return!e.includes(" xmlns:xlink=")&&e.includes(" xlink:")&&(e=e.replace("<svg ",'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')),e.includes(" xmlns=")||(e=e.replace("<svg ",'<svg xmlns="http://www.w3.org/2000/svg" ')),bt(e)}function xt(t){return t.replace(/(['"])\s*\n\s*([^>\\/\s])/g,"$1 $2").replace(/(["';{}><])\s*\n\s*/g,"$1").replace(/\s*\n\s*/g," ").replace(/\s+"/g,'"').replace(/="\s+/g,'="').trim()}const $t=/\swidth\s*=\s*["'](\w+)["']/,_t=/\sheight\s*=\s*["'](\w+)["']/,q=/<svg\s+/;function Ct(t,e,n){const s=t.slice(0,t.indexOf(">")),r=(i,o)=>{const a=o.exec(s),f=a!=null,u=e[i];return!u&&!Z(u)&&(typeof n=="number"?n>0&&(e[i]=`${n}em`):a&&(e[i]=a[1])),f};return[r("width",$t),r("height",_t)]}async function we(t,e,n,s,r,i){const{scale:o,addXmlNs:a=!1}=s??{},{additionalProps:f={},iconCustomizer:u}=s?.customizations??{},c=await r?.()??{};await u?.(e,n,c),Object.keys(f).forEach(m=>{const d=f[m];d!=null&&(c[m]=d)}),i?.(c);const[h,g]=Ct(t,c,o);a&&(!t.includes("xmlns=")&&!c.xmlns&&(c.xmlns="http://www.w3.org/2000/svg"),!t.includes("xmlns:xlink=")&&t.includes("xlink:")&&!c["xmlns:xlink"]&&(c["xmlns:xlink"]="http://www.w3.org/1999/xlink"));const y=Object.keys(c).map(m=>m==="width"&&h||m==="height"&&g?null:`${m}="${c[m]}"`).filter(m=>m!=null);if(y.length&&(t=t.replace(q,`<svg ${y.join(" ")} `)),s){const{defaultStyle:m,defaultClass:d}=s;d&&!t.includes("class=")&&(t=t.replace(q,`<svg class="${d}" `)),m&&!t.includes("style=")&&(t=t.replace(q,`<svg style="${m}" `))}const x=s?.usedProps;return x&&(Object.keys(f).forEach(m=>{const d=c[m];d!=null&&(x[m]=d)}),typeof c.width<"u"&&c.width!==null&&(x.width=c.width),typeof c.height<"u"&&c.height!==null&&(x.height=c.height)),t}async function ae(t,e,n,s){let r;try{if(typeof t=="function")r=await t(n);else{const i=t[n];r=typeof i=="function"?await i():i}}catch(i){console.warn(`Failed to load custom icon "${n}" in "${e}":`,i);return}if(r){const i=r.indexOf("<svg");i>0&&(r=r.slice(i));const{transform:o}=s?.customizations??{};return r=typeof o=="function"?await o(r,e,n):r,r.startsWith("<svg")?await we(s?.customizations?.trimCustomSvg===!0?xt(r):r,e,n,s,void 0):(console.warn(`Custom icon "${n}" in "${e}" is not a valid SVG`),r)}}async function ve(t,e,n,s){let r;const{customize:i}=s?.customizations??{};for(const o of n)if(r=dt(t,o),r){let a={...ye};typeof i=="function"&&(a=i(a));const{attributes:{width:f,height:u,...c},body:h}=vt(r,a),g=s?.scale;return await we(`<svg >${h}</svg>`,e,o,s,()=>({...c}),y=>{const x=(m,d)=>{const $=y[m];let w;if(!Z($)){if($)return;typeof g=="number"?g&&(w=`${g}em`):w=d}w?y[m]=w:delete y[m]};x("width",f),x("height",u)})}}const be=async(t,e,n)=>{const s=n?.customCollections?.[t];if(s)if(typeof s=="function"){let r;try{r=await s(e)}catch(i){console.warn(`Failed to load custom icon "${e}" in "${t}":`,i);return}if(r){if(typeof r=="string")return await ae(()=>r,t,e,n);if("icons"in r){const i=[e,e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e.replace(/([a-z])(\d+)/g,"$1-$2")];return await ve(r,t,i,n)}}}else return await ae(s,t,e,n)};function At(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ot=["academicons","akar-icons","ant-design","arcticons","basil","bi","bpmn","brandico","bx","bxl","bxs","bytesize","carbon","charm","ci","cib","cif","cil","circle-flags","circum","clarity","codicon","covid","cryptocurrency-color","cryptocurrency","dashicons","devicon-line","devicon-original","devicon-plain","devicon","ei","el","emblemicons","emojione-monotone","emojione-v1","emojione","entypo-social","entypo","eos-icons","ep","et","eva","fa-brands","fa-regular","fa-solid","fa","fa6-brands","fa6-regular","fa6-solid","fad","fe","feather","file-icons","flag","flagpack","flat-color-icons","flat-ui","fluent-emoji-flat","fluent-emoji-high-contrast","fluent-emoji","fluent-mdl2","fluent","fontelico","fontisto","formkit","foundation","fxemoji","gala","game-icons","geo","gg","gis","gridicons","grommet-icons","guidance","healthicons","heroicons-outline","heroicons-solid","heroicons","humbleicons","ic","icomoon-free","icon-park-outline","icon-park-solid","icon-park-twotone","icon-park","iconamoon","iconoir","icons8","il","ion","iwwa","jam","la","lets-icons","line-md","logos","ls","lucide","majesticons","maki","map","material-symbols-light","material-symbols","mdi-light","mdi","medical-icon","memory","meteocons","mi","mingcute","mono-icons","mynaui","nimbus","nonicons","noto-v1","noto","octicon","oi","ooui","openmoji","pajamas","pepicons-pencil","pepicons-pop","pepicons-print","pepicons","ph","pixelarticons","prime","ps","quill","radix-icons","raphael","ri","si-glyph","simple-icons","simple-line-icons","skill-icons","solar","streamline-emojis","streamline","subway","svg-spinners","system-uicons","tabler","tdesign","teenyicons","topcoat","twemoji","typcn","uil","uim","uis","uit","uiw","vaadin","vs","vscode-icons","websymbol","whh","wi","wpf","zmdi","zondicons"];const Mt=At(Ot),Et=3;function jt(t){return(e={})=>{const{scale:n=1,mode:s="auto",prefix:r="i-",warn:i=!1,collections:o,extraProperties:a={},customizations:f={},autoInstall:u=!1,layer:c="icons",unit:h}=e,g={addXmlNs:!0,scale:n,customCollections:o,autoInstall:u,warn:void 0,customizations:{...f,additionalProps:{...a},trimCustomSvg:!0,async iconCustomizer(x,m,d){await f.iconCustomizer?.(x,m,d),h&&(d.width||(d.width=`${n}${h}`),d.height||(d.height=`${n}${h}`))}}};let y;return{name:"@unocss/preset-icons",enforce:"pre",options:e,layers:{icons:-30},rules:[[/^([a-z0-9:_-]+)(?:\?(mask|bg|auto))?$/,async([x,m,d=s])=>{let $="",w="",b;y=y||await t(e);const l={};if(m.includes(":"))[$,w]=m.split(":"),b=await y($,w,{...g,usedProps:l});else{const C=m.split(/-/g);for(let A=Et;A>=1&&($=C.slice(0,A).join("-"),w=C.slice(A).join("-"),b=await y($,w,{...g,usedProps:l}),!b);A--);}if(!b){i&&de(`failed to load icon "${x}"`);return}const v=`url("data:image/svg+xml;utf8,${St(b)}")`;return d==="auto"&&(d=b.includes("currentColor")?"mask":"bg"),d==="mask"?{"--un-icon":v,"-webkit-mask":"var(--un-icon) no-repeat",mask:"var(--un-icon) no-repeat","-webkit-mask-size":"100% 100%","mask-size":"100% 100%","background-color":"currentColor",color:"inherit",...l}:{background:`${v} no-repeat`,"background-size":"100% 100%","background-color":"transparent",...l}},{layer:c,prefix:r}]]}}}function Se(t,e){const n=new Map;function s(r){if(Mt.includes(r))return n.has(r)||n.set(r,t(`${e}@iconify-json/${r}/icons.json`)),n.get(r)}return async(r,i,o)=>{let a=await be(r,i,o);if(a)return a;const f=await s(r);if(f){const u=[i,i.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.replace(/([a-z])(\d+)/g,"$1-$2")];a=await ve(f,r,u,o)}return a}}function kt(t){return Se(xe,t)}const Pt=jt(async t=>{const e=t?.customFetch,n=t?.cdn;return e&&n?Se(e,n):n?kt(n):be});function Lt(t){return t.replace(/-(\w)/g,(e,n)=>n?n.toUpperCase():"")}function ce(t){return t.charAt(0).toUpperCase()+t.slice(1)}function le(t){return t.replace(/(?:^|\B)([A-Z])/g,"-$1").toLowerCase()}var fe=["Webkit","Moz","ms"];function zt(t){const e={};function n(s){const r=e[s];if(r)return r;let i=Lt(s);if(i!=="filter"&&i in t)return e[s]=le(i);i=ce(i);for(let o=0;o<fe.length;o++){const a=`${fe[o]}${i}`;if(a in t)return e[s]=le(ce(a))}return s}return({entries:s})=>s.forEach(r=>{r[0].startsWith("--")||(r[0]=n(r[0]))})}function Tt(t){return t.replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<")}function Ft(t={}){if(typeof window>"u"){console.warn("@unocss/runtime been used in non-browser environment, skipped.");return}const e=window,n=window.document,s=()=>n.documentElement,r=e.__unocss||{},i=Object.assign({},t,r.runtime),o=i.defaults||{},a=i.cloakAttribute??"un-cloak";i.autoPrefix&&(o.postprocess=P(o.postprocess)).unshift(zt(n.createElement("div").style)),i.configResolved?.(r,o);const f=nt(r,o),u=p=>i.inject?i.inject(p):s().prepend(p),c=()=>i.rootElement?i.rootElement():n.body,h=new Map;let g=!0,y=new Set,x,m,d=[];const $=()=>new Promise(p=>{d.push(p),m!=null&&clearTimeout(m),m=setTimeout(()=>l().then(()=>{const S=d;d=[],S.forEach(_=>_())}),0)});function w(p){if(p.nodeType!==1)return;const S=p;S.hasAttribute(a)&&S.removeAttribute(a),S.querySelectorAll(`[${a}]`).forEach(_=>{_.removeAttribute(a)})}function b(p,S){let _=h.get(p);if(!_)if(_=n.createElement("style"),_.setAttribute("data-unocss-runtime-layer",p),h.set(p,_),S==null)u(_);else{const E=b(S),k=E.parentNode;k?k.insertBefore(_,E.nextSibling):u(_)}return _}async function l(){const p=await f.generate(y);return p.layers.reduce((S,_)=>(b(_,S).innerHTML=p.getLayer(_)??"",_),void 0),y=p.matched,{...p,getStyleElement:S=>h.get(S),getStyleElements:()=>h}}async function v(p){const S=y.size;await f.applyExtractors(p,void 0,y),S!==y.size&&await $()}async function C(p=c()){const S=p&&p.outerHTML;S&&(await v(`${S} ${Tt(S)}`),w(s()),w(p))}const A=new MutationObserver(p=>{g||p.forEach(async S=>{if(S.target.nodeType!==1)return;const _=S.target;for(const E of h)if(_===E[1])return;if(S.type==="childList")S.addedNodes.forEach(async E=>{if(E.nodeType!==1)return;const k=E;x&&!x(k)||(await v(k.outerHTML),w(k))});else{if(x&&!x(_))return;if(S.attributeName!==a){const E=Array.from(_.attributes).map(j=>j.value?`${j.name}="${j.value}"`:j.name).join(" "),k=`<${_.tagName.toLowerCase()} ${E}>`;await v(k)}_.hasAttribute(a)&&_.removeAttribute(a)}})});let M=!1;function z(){if(M)return;const p=i.observer?.target?i.observer.target():c();p&&(A.observe(p,{childList:!0,subtree:!0,attributes:!0,attributeFilter:i.observer?.attributeFilter}),M=!0)}function T(){i.bypassDefined&&It(f.blocked),C(),z()}function I(){n.readyState==="loading"?e.addEventListener("DOMContentLoaded",T):T()}const N=e.__unocss_runtime=e.__unocss_runtime={version:f.version,uno:f,async extract(p){O(p)||(p.forEach(S=>y.add(S)),p=""),await v(p)},extractAll:C,inspect(p){x=p},toggleObserver(p){p===void 0?g=!g:g=!!p,!M&&!g&&I()},update:l,presets:e.__unocss_runtime?.presets??{}};i.ready?.(N)!==!1&&(g=!1,I())}function It(t=new Set){for(let e=0;e<document.styleSheets.length;e++){const n=document.styleSheets[e];let s;try{if(s=n.cssRules||n.rules,!s)continue;Array.from(s).flatMap(r=>r.selectorText?.split(/,/g)||[]).forEach(r=>{r&&(r=r.trim(),r.startsWith(".")&&(r=r.slice(1)),t.add(r))})}catch{continue}}return t}Ft({defaults:{presets:[Pt({prefix:["i-",""],collections:{},cdn:"https://esm.sh/",scale:1.2,extraProperties:{display:"inline-block","vertical-align":"middle"}})]},bypassDefined:!0});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as D}from"./NNavbar.vue.a82b9c01.js";import{_ as B}from"./NCodeBlock.vue.4697f7e4.js";import{o as c,m as _,k as s,d as S,r as v,bK as j,bL as P,az as U,a as p,ah as z,i as l,j as u,F as f,U as E,f as i,l as G,n as I,t as h,G as L,h as R,ao as W,A}from"./entry.35c58391.js";import{_ as H}from"./HelpFab.vue.07720a44.js";import"./client.bd4053bc.js";const K={class:"markdown-body"},q=s("h1",null,"Virtual Files",-1),J=s("p",null,"Virtual files are generated on the fly to support the conventions of the framework, and to provide a better developer experience.",-1),M=[q,J],O={__name:"virtual-files",setup(x,{expose:o}){return o({frontmatter:{}}),(d,a)=>(c(),_("div",K,M))}},Q=["onClick"],T=s("div",{"x-divider":""},null,-1),X={key:0,"h-full":"","of-hidden":"",flex:"~ col"},Y={border:"b base","flex-none":"",px4:"",py2:"","text-sm":"",op75:""},Z=s("span",{op75:""},"Select a file to start",-1),re=S({__name:"virtual-files",setup(x){const o=v(""),n=j(),d=P(),a=v();U(()=>{if(!d.value)return;const e=`/_vfs.json/${encodeURIComponent(d.value)}`;fetch(e,{headers:{accept:"application/json"}}).then(t=>t.json()).then(t=>a.value=t.current)});function y(e){if(n.value?.rootDir)return e.startsWith(n.value?.rootDir)?e.slice(n.value.rootDir.length):e}const m=p(()=>n.value?n.value.entries.filter(e=>!e.id.startsWith(`${n.value?.rootDir||""}/.nuxt/`)).sort((e,t)=>e.id.localeCompare(t.id)):[]),k=p(()=>new z(m.value,{keys:["id","path"]})),b=p(()=>o.value?k.value.search(o.value).map(e=>e.item):m.value);return(e,t)=>{const g=D,$=B,C=W,F=A,N=E,V=O,w=H;return c(),_(f,null,[l(N,{class:"virtual-files","storage-key":"tab-virtual-files"},{left:u(()=>[l(g,{search:i(o),"onUpdate:search":t[0]||(t[0]=r=>G(o)?o.value=r:null),"no-padding":"",p3:""},null,8,["search"]),(c(!0),_(f,null,I(i(b),r=>(c(),_(f,{key:r.id},[s("button",{block:"","w-full":"","select-none":"",truncate:"",px2:"",py1:"","text-start":"","text-sm":"","font-mono":"",class:L(r.id===i(a)?.id?"text-primary n-bg-active":"text-secondary hover:n-bg-hover"),onClick:ee=>d.value=r.id},h(y(r.id)),11,Q),T],64))),128))]),right:u(()=>[i(a)?.content?(c(),_("div",X,[s("div",Y,[s("code",null,h(i(a).id),1)]),l($,{"h-full":"","of-auto":"","text-sm":"",code:i(a).content,lang:"typescript"},null,8,["code"])])):(c(),R(F,{key:1},{default:u(()=>[l(C,{px6:"",py2:""},{default:u(()=>[Z]),_:1})]),_:1}))]),_:1}),l(w,null,{default:u(()=>[l(V)]),_:1})],64)}}});export{re as default};
|
package/dist/client/index.html
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
<html >
|
|
3
3
|
<head><meta charset="utf-8">
|
|
4
4
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
5
|
-
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.
|
|
6
|
-
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.
|
|
7
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/index.
|
|
5
|
+
<link rel="stylesheet" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.2732f55b.css">
|
|
6
|
+
<link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.35c58391.js">
|
|
7
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/index.11f08f78.js">
|
|
8
8
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/onig.0c57a370.js">
|
|
9
9
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vitesse-dark.ff0e7dcb.js">
|
|
10
10
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vitesse-light.c6996724.js">
|
|
@@ -18,24 +18,24 @@
|
|
|
18
18
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/vue-html.88dda4a8.js">
|
|
19
19
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/diff.22e0b108.js">
|
|
20
20
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/shellscript.e25d1410.js">
|
|
21
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default.
|
|
22
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full.
|
|
23
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none.
|
|
21
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/default.97700872.js">
|
|
22
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/full.72d92407.js">
|
|
23
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/none.9d86a5c5.js">
|
|
24
24
|
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/nuxt-docs.100caa70.js">
|
|
25
25
|
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.6994516c.css">
|
|
26
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DataSchemaDrawer.
|
|
27
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSelect.vue.
|
|
28
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSwitch.vue.
|
|
29
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDropdown.vue.
|
|
30
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.vue.
|
|
31
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client.
|
|
32
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDrawer.vue.
|
|
33
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime.
|
|
26
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/DataSchemaDrawer.b2c7e5f0.js">
|
|
27
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSelect.vue.7cf27fe7.js">
|
|
28
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NSwitch.vue.6fd7c26d.js">
|
|
29
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDropdown.vue.ddbb4404.js">
|
|
30
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NCodeBlock.vue.4697f7e4.js">
|
|
31
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/client.bd4053bc.js">
|
|
32
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/NDrawer.vue.4b4bd813.js">
|
|
33
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/unocss-runtime.eab56c8d.js">
|
|
34
34
|
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.82ac0ec5.css">
|
|
35
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.
|
|
35
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-404.576aef72.js">
|
|
36
36
|
<link rel="prefetch" as="style" href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.ff959f66.css">
|
|
37
|
-
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.
|
|
38
|
-
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.
|
|
37
|
+
<link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_BASE__/_nuxt/error-500.61e43a5a.js">
|
|
38
|
+
<script type="module" src="/__NUXT_DEVTOOLS_BASE__/_nuxt/entry.35c58391.js" crossorigin></script><script>"use strict";(()=>{const a=window,e=document.documentElement,m=["dark","light"],c=window&&window.localStorage&&window.localStorage.getItem&&window.localStorage.getItem("nuxt-color-mode")||"system";let n=c==="system"?d():c;const l=e.getAttribute("data-color-mode-forced");l&&(n=l),i(n),a["__NUXT_COLOR_MODE__"]={preference:c,value:n,getColorScheme:d,addColorScheme:i,removeColorScheme:f};function i(o){const t=""+o+"",s="";e.classList?e.classList.add(t):e.className+=" "+t,s&&e.setAttribute("data-"+s,o)}function f(o){const t=""+o+"",s="";e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(t,"g"),""),s&&e.removeAttribute("data-"+s)}function r(o){return a.matchMedia("(prefers-color-scheme"+o+")")}function d(){if(a.matchMedia&&r("").media!=="not all"){for(const o of m)if(r(":"+o).matches)return o}return"light"}})();
|
|
39
39
|
</script></head>
|
|
40
40
|
<body ><div id="__nuxt"></div><script type="application/json" id="__NUXT_DATA__" data-ssr="false">[{"_errors":1,"serverRendered":2,"data":3,"state":4},{},false,{},{}]</script>
|
|
41
41
|
<script>window.__NUXT__={};window.__NUXT__.config={public:{fixture4:"public runtime config from nuxt.config.ts"},app:{baseURL:"/__NUXT_DEVTOOLS_BASE__/",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script></body>
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -38,8 +38,8 @@ export default defineNuxtPlugin((nuxt) => {
|
|
|
38
38
|
if (ssrState.value.timeSsrStart)
|
|
39
39
|
timeMetric.ssrStart = ssrState.value.timeSsrStart;
|
|
40
40
|
});
|
|
41
|
-
import("./view/client").then(({ setupDevToolsClient }) => {
|
|
42
|
-
setupDevToolsClient({
|
|
41
|
+
import("./view/client").then(async ({ setupDevToolsClient }) => {
|
|
42
|
+
await setupDevToolsClient({
|
|
43
43
|
nuxt,
|
|
44
44
|
clientHooks,
|
|
45
45
|
timeMetric,
|
|
@@ -57,6 +57,8 @@ const draggingOffset = reactive({ x: 0, y: 0 })
|
|
|
57
57
|
const mousePosition = reactive({ x: 0, y: 0 })
|
|
58
58
|
|
|
59
59
|
function onPointerDown(e: PointerEvent) {
|
|
60
|
+
if (!panelEl.value)
|
|
61
|
+
return
|
|
60
62
|
isDragging.value = true
|
|
61
63
|
const { left, top, width, height } = panelEl.value!.getBoundingClientRect()
|
|
62
64
|
draggingOffset.x = e.clientX - left - width / 2
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { defineNuxtModule } from '@nuxt/kit';
|
|
2
2
|
import { isGlobalInstall } from '../dirs.mjs';
|
|
3
3
|
|
|
4
|
-
const r=Object.create(null),t=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),s=new Proxy(r,{get(e,o){return t()[o]??r[o]},has(e,o){const i=t();return o in i||o in r},set(e,o,i){const p=t(!0);return p[o]=i,!0},deleteProperty(e,o){if(!o)return !1;const i=t(!0);return delete i[o],!0},ownKeys(){const e=t(!0);return Object.keys(e)}}),E=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",d=[["APPVEYOR"],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"]];function B(){if(globalThis.process?.env)for(const e of d){const o=e[1]||e[0];if(globalThis.process?.env[o])return {name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}const I=B(),
|
|
4
|
+
const r=Object.create(null),t=e=>globalThis.process?.env||import.meta.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),s=new Proxy(r,{get(e,o){return t()[o]??r[o]},has(e,o){const i=t();return o in i||o in r},set(e,o,i){const p=t(!0);return p[o]=i,!0},deleteProperty(e,o){if(!o)return !1;const i=t(!0);return delete i[o],!0},ownKeys(){const e=t(!0);return Object.keys(e)}}),E=typeof process<"u"&&process.env&&process.env.NODE_ENV||"",d=[["APPVEYOR"],["AWS_AMPLIFY","AWS_APP_ID",{ci:!0}],["AZURE_PIPELINES","SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],["AZURE_STATIC","INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN"],["APPCIRCLE","AC_APPCIRCLE"],["BAMBOO","bamboo_planKey"],["BITBUCKET","BITBUCKET_COMMIT"],["BITRISE","BITRISE_IO"],["BUDDY","BUDDY_WORKSPACE_ID"],["BUILDKITE"],["CIRCLE","CIRCLECI"],["CIRRUS","CIRRUS_CI"],["CLOUDFLARE_PAGES","CF_PAGES",{ci:!0}],["CODEBUILD","CODEBUILD_BUILD_ARN"],["CODEFRESH","CF_BUILD_ID"],["DRONE"],["DRONE","DRONE_BUILD_EVENT"],["DSARI"],["GITHUB_ACTIONS"],["GITLAB","GITLAB_CI"],["GITLAB","CI_MERGE_REQUEST_ID"],["GOCD","GO_PIPELINE_LABEL"],["LAYERCI"],["HUDSON","HUDSON_URL"],["JENKINS","JENKINS_URL"],["MAGNUM"],["NETLIFY"],["NETLIFY","NETLIFY_LOCAL",{ci:!1}],["NEVERCODE"],["RENDER"],["SAIL","SAILCI"],["SEMAPHORE"],["SCREWDRIVER"],["SHIPPABLE"],["SOLANO","TDDIUM"],["STRIDER"],["TEAMCITY","TEAMCITY_VERSION"],["TRAVIS"],["VERCEL","NOW_BUILDER"],["VERCEL","VERCEL",{ci:!1}],["VERCEL","VERCEL_ENV",{ci:!1}],["APPCENTER","APPCENTER_BUILD_ID"],["CODESANDBOX","CODESANDBOX_SSE",{ci:!1}],["STACKBLITZ"],["STORMKIT"],["CLEAVR"]];function B(){if(globalThis.process?.env)for(const e of d){const o=e[1]||e[0];if(globalThis.process?.env[o])return {name:e[0].toLowerCase(),...e[2]}}return globalThis.process?.env?.SHELL==="/bin/jsh"&&globalThis.process?.versions?.webcontainer?{name:"stackblitz",ci:!1}:{name:"",ci:!1}}const I=B(),P=I.name;function n(e){return e?e!=="false":!1}const l=globalThis.process?.platform||"",T=n(s.CI)||I.ci!==!1,a=n(globalThis.process?.stdout&&globalThis.process?.stdout.isTTY);n(s.DEBUG);const c=E==="test"||n(s.TEST);n(s.MINIMAL)||T||c||!a;const C=/^win/i.test(l);!n(s.NO_COLOR)&&(n(s.FORCE_COLOR)||C&&s.TERM!=="dumb"||a&&s.TERM&&s.TERM==="dumb"||T);const R=(globalThis.process?.versions?.node||"").replace(/^v/,"")||null;Number(R?.split(".")[0])||null;const w=globalThis.process||Object.create(null),_={versions:{}};new Proxy(w,{get(e,o){if(o==="env")return s;if(o in e)return e[o];if(o in _)return _[o]}});const L=!!globalThis.Netlify,A=!!globalThis.EdgeRuntime,O=globalThis.navigator?.userAgent==="Cloudflare-Workers",D=!!globalThis.Deno,u=!!globalThis.__lagon__,N=globalThis.process?.release?.name==="node",S=!!globalThis.Bun||!!globalThis.process?.versions?.bun,b=!!globalThis.fastly,G=[[L,"netlify"],[A,"edge-light"],[O,"workerd"],[D,"deno"],[u,"lagon"],[N,"node"],[S,"bun"],[b,"fastly"]];function K(){const e=G.find(o=>o[0]);if(e)return {name:e[1]}}const g=K();g?.name||"";
|
|
5
5
|
|
|
6
6
|
const WS_EVENT_NAME = "nuxt:devtools:rpc";
|
|
7
|
-
const isSandboxed =
|
|
7
|
+
const isSandboxed = P === "stackblitz" || P === "codesandbox";
|
|
8
8
|
const defaultOptions = {
|
|
9
9
|
enabled: void 0,
|
|
10
10
|
// determine multiple conditions
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuxt/devtools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://devtools.nuxt.com",
|
|
7
7
|
"repository": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@antfu/utils": "^0.7.6",
|
|
38
|
-
"@nuxt/kit": "^3.8.
|
|
38
|
+
"@nuxt/kit": "^3.8.2",
|
|
39
39
|
"birpc": "^0.2.14",
|
|
40
40
|
"consola": "^3.2.3",
|
|
41
41
|
"destr": "^2.0.2",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"launch-editor": "^2.6.1",
|
|
52
52
|
"local-pkg": "^0.5.0",
|
|
53
53
|
"magicast": "^0.3.2",
|
|
54
|
-
"nitropack": "^2.
|
|
54
|
+
"nitropack": "^2.8.0",
|
|
55
55
|
"nypm": "^0.3.3",
|
|
56
56
|
"ofetch": "^1.3.3",
|
|
57
57
|
"ohash": "^1.1.3",
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
"vite-plugin-vue-inspector": "^4.0.0",
|
|
70
70
|
"which": "^3.0.1",
|
|
71
71
|
"ws": "^8.14.2",
|
|
72
|
-
"@nuxt/devtools-
|
|
73
|
-
"@nuxt/devtools-
|
|
72
|
+
"@nuxt/devtools-wizard": "1.0.4",
|
|
73
|
+
"@nuxt/devtools-kit": "1.0.4"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@iconify-json/bxl": "^1.1.7",
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
"@parcel/watcher": "^2.3.0",
|
|
85
85
|
"@types/markdown-it-link-attributes": "^3.0.4",
|
|
86
86
|
"@types/ua-parser-js": "^0.7.39",
|
|
87
|
-
"@unocss/nuxt": "^0.57.
|
|
88
|
-
"@unocss/preset-icons": "^0.57.
|
|
89
|
-
"@unocss/preset-uno": "^0.57.
|
|
90
|
-
"@unocss/runtime": "^0.57.
|
|
87
|
+
"@unocss/nuxt": "^0.57.7",
|
|
88
|
+
"@unocss/preset-icons": "^0.57.7",
|
|
89
|
+
"@unocss/preset-uno": "^0.57.7",
|
|
90
|
+
"@unocss/runtime": "^0.57.7",
|
|
91
91
|
"@vueuse/nuxt": "^10.6.1",
|
|
92
92
|
"esno": "^4.0.0",
|
|
93
93
|
"floating-vue": "2.0.0-beta.24",
|
|
@@ -96,22 +96,22 @@
|
|
|
96
96
|
"markdown-it": "^13.0.2",
|
|
97
97
|
"markdown-it-link-attributes": "^4.0.1",
|
|
98
98
|
"nanoid": "^5.0.3",
|
|
99
|
-
"nuxt": "^3.8.
|
|
100
|
-
"nuxt-vitest": "^0.11.
|
|
99
|
+
"nuxt": "^3.8.2",
|
|
100
|
+
"nuxt-vitest": "^0.11.5",
|
|
101
101
|
"quicktype-core": "^23.0.79",
|
|
102
102
|
"shikiji": "^0.6.13",
|
|
103
103
|
"theme-vitesse": "^0.7.3",
|
|
104
104
|
"ua-parser-js": "^1.0.37",
|
|
105
|
-
"unocss": "^0.57.
|
|
105
|
+
"unocss": "^0.57.7",
|
|
106
106
|
"unplugin-vue-markdown": "^0.25.2",
|
|
107
|
-
"vanilla-jsoneditor": "^0.
|
|
107
|
+
"vanilla-jsoneditor": "^0.19.0",
|
|
108
108
|
"vis-data": "^7.1.8",
|
|
109
109
|
"vis-network": "^9.1.9",
|
|
110
110
|
"vue-tsc": "^1.8.22",
|
|
111
111
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
|
112
112
|
"xterm": "^5.3.0",
|
|
113
113
|
"xterm-addon-fit": "^0.8.0",
|
|
114
|
-
"@nuxt/devtools": "1.0.
|
|
114
|
+
"@nuxt/devtools": "1.0.4"
|
|
115
115
|
},
|
|
116
116
|
"scripts": {
|
|
117
117
|
"build": "pnpm dev:prepare && pnpm build:module && pnpm build:client && esno scripts/prepare.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{q as n,o,m as s,a9 as t}from"./entry.9a5af3dc.js";const c={},_={class:"n-badge"};function a(e,r){return o(),s("span",_,[t(e.$slots,"default")])}const d=n(c,[["render",a]]);export{d as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as i,Z as r,o as p,m as b,I as u,bO as h,f as o,k as n,l as k,ad as m,i as f,a9 as v,G as _,a5 as x}from"./entry.9a5af3dc.js";const V=["checked","disabled"],y=["disabled"],B={class:"n-checkbox-box n-checked:n-checkbox-box-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},w=i({__name:"NCheckbox",props:{modelValue:{type:[Boolean,null],default:!1},disabled:{type:Boolean,default:!1}},setup(c,{emit:t}){const e=r(c,"modelValue",t,{passive:!0});return(a,s)=>{const d=x;return p(),b("label",{class:"n-checkbox hover:n-checkbox-hover select-none items-center n-disabled:n-disabled",checked:o(e)||null,disabled:a.disabled||null},[u(n("input",{"onUpdate:modelValue":s[0]||(s[0]=l=>k(e)?e.value=l:null),type:"checkbox",class:"peer absolute op0",disabled:a.disabled,onKeypress:s[1]||(s[1]=m(l=>e.value=!o(e),["enter"]))},null,40,y),[[h,o(e)]]),n("span",B,[f(d,{class:"n-checkbox-icon scale-0 transform op0 n-transition n-checked:scale-100 n-checked:op100"})]),n("span",{class:_([o(e)?"":"op50","n-transition"])},[v(a.$slots,"default")],2)],8,V)}}});export{w as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as i,Z as c,r as p,aT as u,o as m,m as f,a9 as n,i as v,j as _,v as b,f as o,k,G as V,_ as B}from"./entry.9a5af3dc.js";const $=i({__name:"NDropdown",props:{modelValue:{type:Boolean},direction:{default:"start"}},setup(r,{emit:l}){const e=c(r,"modelValue",l,{passive:!0}),a=p();return u(a,()=>{e.value=!1}),(s,t)=>{const d=B;return m(),f("div",{ref_key:"el",ref:a,class:"relative"},[n(s.$slots,"trigger",{enabled:o(e),click:()=>e.value=!o(e)},()=>[v(d,{onClick:t[0]||(t[0]=g=>e.value=!o(e))},{default:_(()=>[b(" Dropdown ")]),_:1})]),k("div",{class:V(["absolute z-10 border n-border-base rounded shadow n-transition n-bg-base",[o(e)?"op-100":"op0 pointer-events-none -translate-y-1",s.direction==="end"?"right-0":"left-0"]])},[n(s.$slots,"default")],2)],512)}}});export{$ as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as g,Z as y,m as r,k as o,G as n,i as B,j as S,f as i,F as c,I as $,J as b,a9 as s,p,o as l,v as u,t as v,h as k,y as w,z as C,a5 as N,q as I}from"./entry.9a5af3dc.js";import{_ as x}from"./NIconTitle.vue.83cd82be.js";const _=t=>(w("data-v-cb964879"),t=t(),C(),t),V=["open"],z={"text-base":""},T={key:0,"text-sm":"",op50:""},D=_(()=>o("div",{class:"flex-auto"},null,-1)),F=_(()=>o("div",{class:"x-divider"},null,-1)),j=g({__name:"NSectionBlock",props:{icon:{},text:{},description:{},containerClass:{default:""},headerClass:{},collapse:{type:Boolean,default:!0},open:{type:Boolean,default:!0},padding:{type:[Boolean,String],default:!0}},setup(t){const a=y(t,"open",void 0,{passive:!0});function f(e){a.value=e.target.open}return(e,d)=>{const m=N,h=x;return l(),r(c,null,[o("details",{open:i(a),onToggle:f},[o("summary",{class:n(["cursor-pointer select-none hover:bg-active p4",e.collapse?"":"pointer-events-none"])},[B(h,{icon:e.icon,text:e.text,"text-xl":"",transition:"",class:n([i(a)?"op100":"op60",e.headerClass])},{default:S(()=>[o("div",null,[o("div",z,[s(e.$slots,"text",{},()=>[u(v(e.text),1)],!0)]),e.description||e.$slots.description?(l(),r("div",T,[s(e.$slots,"description",{},()=>[u(v(e.description),1)],!0)])):p("",!0)]),D,s(e.$slots,"actions",{},void 0,!0),e.collapse?(l(),k(m,{key:0,icon:"carbon-chevron-down",class:"chevron","cursor-pointer":"","place-self-start":"","text-base":"",op75:"",transition:"","duration-500":""})):p("",!0)]),_:3},8,["icon","text","class"])],2),d._lazyshow1||i(a)?(d._lazyshow1=!0,l(),r(c,null,[$(o("div",{class:n(["flex flex-col flex-gap2 pb6 pt2",typeof e.padding=="string"?e.padding:e.padding?"px4":""])},[s(e.$slots,"details",{},void 0,!0),o("div",{class:n([e.containerClass,"mt1"])},[s(e.$slots,"default",{},void 0,!0)],2),s(e.$slots,"footer",{},void 0,!0)],2),[[b,i(a)]])],64)):p("v-show-if",!0)],40,V),F],64)}}});const J=I(j,[["__scopeId","data-v-cb964879"]]);export{J as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as p,Z as m,o,m as l,a9 as n,h as f,p as t,I as b,bP as h,f as v,k,t as y,l as V,G as d,a5 as B}from"./entry.9a5af3dc.js";const g=["disabled"],w={key:0,value:"",disabled:"",hidden:""},C=p({__name:"NSelect",props:{modelValue:{default:void 0},placeholder:{default:""},icon:{default:""},disabled:{type:Boolean,default:!1}},setup(i,{emit:r}){const s=m(i,"modelValue",r,{passive:!0});return(e,a)=>{const c=B;return o(),l("div",{class:d(["n-select flex flex items-center border rounded px-2 py-1 focus-within:n-focus-base focus-within:border-context n-bg-base",e.disabled?"border-gray:10":"n-border-base"])},[n(e.$slots,"icon",{},()=>[e.icon?(o(),f(c,{key:0,icon:e.icon,class:"mr-0.4em text-1.1em op50"},null,8,["icon"])):t("",!0)]),b(k("select",{"onUpdate:modelValue":a[0]||(a[0]=u=>V(s)?s.value=u:null),disabled:e.disabled,class:d(["w-full flex-auto n-bg-base !outline-none",e.disabled?"appearance-none":""])},[e.placeholder?(o(),l("option",w,y(e.placeholder),1)):t("",!0),n(e.$slots,"default")],10,g),[[h,v(s)]])],2)}}});export{C as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as m,Z as c,o as l,m as t,F as v,n as f,G as d,f as o,k as i,t as _,I as g,aK as y,l as V}from"./entry.9a5af3dc.js";const h={class:"n-select-tabs flex flex-inline flex-wrap items-center border n-border-base rounded n-bg-base"},k=["disabled","title"],x=["disabled","value","title"],D=m({__name:"NSelectTabs",props:{modelValue:{default:void 0},disabled:{type:Boolean,default:!1},options:{}},setup(r,{emit:b}){const s=c(r,"modelValue",b,{passive:!0});return(a,n)=>(l(),t("fieldset",h,[(l(!0),t(v,null,f(a.options,(e,p)=>(l(),t("label",{key:e.label,disabled:a.disabled,class:d(["relative n-border-base hover:n-bg-active px-0.5em py-0.1em",[p?"border-l n-border-base ml--1px":"",e.value===o(s)?"n-bg-active":""]]),title:e.label},[i("div",{class:d([e.value===o(s)?"":"op35"])},_(e.label),3),g(i("input",{"onUpdate:modelValue":n[0]||(n[0]=u=>V(s)?s.value=u:null),type:"radio",disabled:a.disabled,value:e.value,title:e.label,class:"absolute inset-0 op-0.1"},null,8,x),[[y,o(s)]])],10,k))),128))]))}});export{D as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as i,Z as c,o as r,m as u,I as h,bO as p,f as a,k as l,l as b,ad as m,a9 as f}from"./entry.9a5af3dc.js";const v=["checked","disabled"],k=["disabled"],w=l("div",{class:"n-switch-slider n-checked:n-switch-slider-checked peer-active:n-active-base peer-focus-visible:n-focus-base n-transition"},[l("div",{class:"n-checked:n-switch-thumb-checked n-switch-thumb n-transition"})],-1),V=i({__name:"NSwitch",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(d,{emit:o}){const e=c(d,"modelValue",o,{passive:!0});return(t,s)=>(r(),u("label",{class:"n-switch n-switch-base hover:n-switch-hover n-disabled:n-disabled",checked:a(e)||null,disabled:t.disabled||null},[h(l("input",{"onUpdate:modelValue":s[0]||(s[0]=n=>b(e)?e.value=n:null),type:"checkbox",class:"peer absolute op0",disabled:t.disabled,onKeypress:s[1]||(s[1]=m(n=>e.value=!a(e),["enter"]))},null,40,k),[[p,a(e)]]),w,f(t.$slots,"default")],8,v))}});export{V as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as a,o,m as c,a9 as n,h as t,p as i,k as r,a5 as p}from"./entry.9a5af3dc.js";const l={class:"n-tip n-tip-base"},u=a({__name:"NTip",props:{icon:{}},setup(m){return(e,_)=>{const s=p;return o(),c("div",l,[n(e.$slots,"icon",{},()=>[e.icon?(o(),t(s,{key:0,icon:e.icon,class:"n-tip-icon"},null,8,["icon"])):i("",!0)]),r("div",null,[n(e.$slots,"default")])])}}});export{u as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as V,Z as B,aj as _,r as w,bc as O,bj as C,a1 as $,o as i,m as p,k as u,G as c,f as t,t as j,p as l,a9 as J,bg as D,bh as P,F as R,I as z,i as F,h as v,as as G,bk as M,l as A,ax as E,_ as I}from"./entry.9a5af3dc.js";import{_ as T}from"./DataSchemaButton.vue.72b202db.js";import{t as U}from"./json-editor-vue.c3cbb111.js";const Y=["open"],Z={flex:"~ gap2","select-none":"","items-center":"",px4:""},Q=V({__name:"StateEditor",props:{name:{},open:{type:Boolean},state:{},readonly:{type:Boolean}},emits:["update:open"],setup(b,{emit:g}){const s=b,n=B(s,"open",g,{passive:!0}),k=_(),o=w(),m=O(s.name,"$9Gvv2FGyYa");s.state?o.value=JSON.parse(JSON.stringify(s.state)):(typeof s.state=="number"||typeof s.state!="string")&&(o.value=s.state);const d=C(o,e=>{typeof e!="number"&&typeof e!="string"?f(e,s.state):m.value=e},{deep:!0});function f(e,r){for(const a in e)e[a]===null?r[a]=null:Array.isArray(e[a])?r[a]=e[a].slice():typeof e[a]=="object"?f(e[a],r[a]):r[a]=e[a]}async function h(){d.pause(),o.value=JSON.parse(JSON.stringify(s.state)),await E(),d.resume()}return(e,r)=>{const a=I,S=T,N=$("tooltip");return i(),p("div",{class:"state-editor-details",open:e.name?t(n):!0},[u("div",Z,[e.name?(i(),p("button",{key:0,flex:"~","cursor-pointer":"","items-center":"",class:c(t(n)?"":"op50"),onClick:r[0]||(r[0]=y=>n.value=!t(n))},[u("div",{"i-carbon-chevron-right":"",transition:"",class:c(t(n)?"rotate-90 op0":"")},null,2),u("code",{px3:"",py1:"","font-mono":"",class:c(t(n)?"bg-[#8881] rounded-t":"rounded hover:bg-active")},j(e.name),3)],2)):l("",!0),J(e.$slots,"actions",D(P({isOpen:t(n),name:e.name,state:t(m)}))),t(n)?(i(),p(R,{key:1},[z(F(a,{title:"Refresh View",icon:"carbon-renew",border:!1,onClick:h},null,512),[[N,"Refresh View",void 0,{bottom:!0}]]),t(o)?(i(),v(S,{key:0,getter:()=>({name:e.name,input:JSON.stringify(t(o))})},null,8,["getter"])):l("",!0)],64)):l("",!0)]),t(n)||!e.name?(i(),v(t(U),G({key:0,modelValue:t(o),"onUpdate:modelValue":r[1]||(r[1]=y=>A(o)?o.value=y:null)},e.$attrs,{class:["json-editor-vue",[t(k).value==="dark"?"jse-theme-dark":"",(e.name,"")]],"main-menu-bar":!1,"navigation-bar":!1,"status-bar":!1,"read-only":"readonly"in e?e.readonly:t(M),indentation:2,"tab-size":2}),null,16,["modelValue","class","read-only"])):l("",!0)],8,Y)}}});export{Q as _};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{d as P,a as I,r as V,o,m as s,k as e,F as _,n as j,G as S,f as t,t as p,p as b,H as U,i as u,j as r,v as f,I as A,J as D,K as Z,L as F,M as E,_ as G,N as q,O as ee,P as ne,Q as te,R as oe,S as le,U as ie,V as se,W as C,h as z,l as R,X as ae,Y as re,A as ue}from"./entry.9a5af3dc.js";import{_ as de}from"./FilepathItem.vue.ca308ea2.js";import{_ as ce}from"./NTip.vue.ca2f8e8a.js";import{_ as me}from"./NCodeBlock.vue.c80c8282.js";import{_ as _e}from"./NCheckbox.vue.6b5ce38f.js";import{_ as pe}from"./HelpFab.vue.6bf23ece.js";import"./client.b8ca1554.js";const fe={"h-full":"",grid:"~ rows-[max-content_1fr]"},ve={flex:"~ wrap","w-full":""},he=["onClick"],ye=e("div",{border:"b base","flex-auto":""},null,-1),be={key:0,flex:"~ col gap-4 items-center justify-center",p4:""},$e=e("div",{"flex-auto":""},null,-1),ge={grid:"~ cols-[30px_1fr] gap-x-2 gap-y-3 items-center justify-center","w-100":""},xe=e("div",{"i-carbon-commit":"","text-xl":""},null,-1),we=e("div",{"text-sm":"",op50:""}," Name ",-1),ze=e("div",{"i-carbon-time":"","text-xl":""},null,-1),Be=e("div",{"text-sm":"",op50:""}," Build duration ",-1),Ce=e("div",{"i-carbon-cics-program":"","text-xl":""},null,-1),ke=e("div",{"text-sm":"",op50:""}," Client bundle size ",-1),Ne=e("div",{"i-carbon-bare-metal-server":"","text-xl":""},null,-1),Te=e("div",{"text-sm":"",op50:""}," Nitro bundle size ",-1),Ae=e("div",{"i-carbon-edge-node":"","text-xl":""},null,-1),De=e("div",{"text-sm":"",op50:""}," Built ",-1),Ie=e("div",{"i-carbon:folder-parent":"","text-xl":""},null,-1),Ve=e("div",{"text-sm":"",op50:""}," Report Path ",-1),Se=e("div",{"flex-auto":""},null,-1),Fe=P({__name:"BuildAnalyzeDetails",props:{current:{},prev:{}},setup(k){const v=k,g=`${Z().app.baseURL}/__nuxt_devtools__/analyze/`.replace(/\/+/g,"/"),x=I(()=>{const n=[{name:"Overview",id:"overview"}];return v.current.features.bundleClient&&n.push({name:"Client Bundle",id:"bundle-client"}),v.current.features.bundleNitro&&n.push({name:"Nitro Bundle",id:"bundle-nitro"}),v.current.features.viteInspect&&n.push({name:"Vite Inspect",id:"vite-inspect"}),n}),i=V(x.value[0]);function h(n){return n<1024?`${n}B`:n<1024*1024?`${(n/1024).toFixed(1)}KB`:n<1024*1024*1024?`${(n/1024/1024).toFixed(1)}MB`:`${(n/1024/1024/1024).toFixed(1)}GB`}function d(n){return`${((n.endTime-n.startTime)/1e3).toFixed(1)}s`}async function N(n){return F.clearAnalyzeBuilds(await E(),[n])}return(n,c)=>{const B=de,T=G;return o(),s("div",fe,[e("div",ve,[(o(!0),s(_,null,j(t(x),(l,m)=>(o(),s("button",{key:m,px4:"",py2:"",border:"r base",hover:"bg-active",class:S(l.id===t(i).id?"":"border-b"),onClick:w=>i.value=l},[e("div",{class:S(l.id===t(i).id?"":"op30")},p(l.name),3)],10,he))),128)),ye]),t(i).id==="overview"?(o(),s("div",be,[$e,e("div",ge,[xe,e("div",null,[we,e("div",null,p(n.current.name),1)]),ze,e("div",null,[Be,e("div",null,p(d(n.current)),1)]),n.current.size?.clientBundle?(o(),s(_,{key:0},[Ce,e("div",null,[ke,e("div",null,p(h(n.current.size.clientBundle)),1)])],64)):b("",!0),n.current.size.nitroBundle?(o(),s(_,{key:1},[Ne,e("div",null,[Te,e("div",null,p(h(n.current.size.nitroBundle)),1)])],64)):b("",!0),Ae,e("div",null,[De,e("div",null,p(t(U)(new Date(n.current.endTime))),1)]),Ie,e("div",null,[Ve,u(B,{filepath:n.current.analyzeDir},null,8,["filepath"])])]),Se,u(T,{n:"rose",icon:"carbon-delete",onClick:c[0]||(c[0]=l=>N(n.current.name))},{default:r(()=>[f(" Delete this report ")]),_:1})])):b("",!0),c._lazyshow1||t(i).id==="bundle-client"?(c._lazyshow1=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/client.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-client"]])],64)):b("v-show-if",!0),c._lazyshow2||t(i).id==="bundle-nitro"?(c._lazyshow2=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/nitro.html`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="bundle-nitro"]])],64)):b("v-show-if",!0),c._lazyshow3||t(i).id==="vite-inspect"?(c._lazyshow3=!0,o(),s(_,null,[A(e("iframe",{src:`${t(g)}${n.current.slug}/.vite-inspect/`,"h-full":"","w-full":""},null,8,["src"]),[[D,t(i).id==="vite-inspect"]])],64)):b("v-show-if",!0)])}}}),Re={class:"markdown-body"},Pe=e("h1",null,"Build Analyze",-1),je=e("p",null,[f("DevTools provides a build analyze tool to help you understand the size of your app in production. Whenever you start a new build, it runs the command "),e("code",null,"nuxt build --analyze"),f(" and present the output data directly in DevTools for easy browsing and comparing.")],-1),Ue=[Pe,je],Ee={__name:"analyze-build",setup(k,{expose:v}){return v({frontmatter:{}}),(g,x)=>(o(),s("div",Re,Ue))}},Ge={flex:"~ col"},Le=["onClick"],Oe={flex:"~ gap-1 items-center wrap","w-full":"","text-sm":"",op60:""},He=e("div",{"i-carbon-time":""},null,-1),Ke=e("div",{"flex-auto":""},null,-1),Me=e("div",{"x-divider":""},null,-1),We={flex:"~ items-center justify-center wrap",p4:""},Ye={flex:"~ col gap-1","w-250":"",p4:""},Je=e("h3",{class:"text-lg font-medium leading-6",mb2:""}," Start analyze build? ",-1),Qe=e("p",{op50:""}," Enter the name of the build: ",-1),Xe=e("div",{my3:"","x-divider":""},null,-1),Ze=e("p",{op50:""}," The following command will be executed in your terminal: ",-1),qe={flex:"~ gap-3",mt2:"","justify-end":""},rn=P({__name:"analyze-build",setup(k){const v=q(),$=ee(),g=ne(),x=te("analyze-build:slug",""),i=I(()=>$.value?.builds.find(l=>l.slug===x.value)??$.value?.builds[0]),h=V(!1),d=V(""),N=I(()=>$.value?.builds.some(l=>l.name===d.value.trim()));async function n(){d.value=await F.generateAnalyzeBuildName(),await v.start()&&(se("analyze-build:start"),C.value={name:d.value,processId:await F.startAnalyzeBuild(await E(),d.value)},h.value&&B())}const c=oe();function B(){C.value?.processId&&(c.value=C.value.processId,g.push("/modules/terminals"))}function T(l){return`${((l.endTime-l.startTime)/1e3).toFixed(1)}s`}return le(()=>[{id:"action:analyze-build: start",title:"Start a new analyze build",icon:"i-carbon-edge-node",action:n}]),(l,m)=>{const w=G,L=Fe,O=ue,H=ie,K=ae,M=ce,W=me,Y=_e,J=re,Q=Ee,X=pe;return o(),s(_,null,[u(H,{"left-size":30},{left:r(()=>[e("div",Ge,[(o(!0),s(_,null,j(t($)?.builds,a=>(o(),s(_,{key:a.slug},[e("button",{flex:"~ col gap1","hover:bg-active":"",p3:"",class:S(a.slug===t(i)?.slug?"text-primary bg-active":""),onClick:y=>x.value=a.slug},[e("code",null,p(a.name),1),e("div",Oe,[He,e("span",null,p(T(a)),1),Ke,e("span",null,p(t(U)(new Date(a.endTime))),1)])],10,Le),Me],64))),128)),e("div",We,[("processAnalyzeBuildInfo"in l?l.processAnalyzeBuildInfo:t(C))?(o(),z(w,{key:1,n:"primary",icon:"carbon-circle-dash animate-spin",onClick:m[1]||(m[1]=a=>B())},{default:r(()=>[f(" Building... ")]),_:1})):(o(),z(w,{key:0,n:"primary",icon:"carbon-edge-node",onClick:m[0]||(m[0]=a=>n())},{default:r(()=>[f(" Start a new build ")]),_:1}))])])]),right:r(()=>[t(i)?(o(),z(L,{key:0,current:t(i)},null,8,["current"])):(o(),z(O,{key:1}))]),_:1}),u(t(v),null,{default:r(({resolve:a})=>[u(J,{"model-value":!0,onClose:y=>a(!1)},{default:r(()=>[e("div",Ye,[Je,Qe,u(K,{modelValue:t(d),"onUpdate:modelValue":m[2]||(m[2]=y=>R(d)?d.value=y:null),placeholder:"Build name"},null,8,["modelValue"]),t(N)?(o(),z(M,{key:0,"n-orange":""},{default:r(()=>[f(" A build with the same name already exists, continue would overrides the previous build result. ")]),_:1})):b("",!0),Xe,Ze,u(W,{code:`npx nuxi analyze --no-serve --name=${t(d)}`,lang:"bash",px4:"",py2:"",border:"~ base rounded",lines:!1},null,8,["code"]),u(Y,{modelValue:t(h),"onUpdate:modelValue":m[3]||(m[3]=y=>R(h)?h.value=y:null),mt2:"",n:"primary"},{default:r(()=>[f(" Navigate to terminal ")]),_:1},8,["modelValue"]),e("div",qe,[u(w,{onClick:y=>a(!1)},{default:r(()=>[f(" Cancel ")]),_:2},1032,["onClick"]),u(w,{n:"solid primary",onClick:y=>a(!0)},{default:r(()=>[f(" Start ")]),_:2},1032,["onClick"])])])]),_:2},1032,["onClose"])]),_:1}),u(X,null,{default:r(()=>[u(Q)]),_:1})],64)}}});export{rn as default};
|