PageSourceSearch

https://www.gumloop.com/_next/static/immutable/chunks/1ujxeswns6rf2.js

js gumloop.com collected 2026-10-03 19:42:22 UTC 382,161 bytes, 219 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,683255,e=>{"use strict";var t=e.i(994940),n=e.i(718032),i=e.i(910353),r=e.i(546907),a=e.i(240918),o=e.i(569566),s=e.i(980566),l=e.i(130256),d=e.i(164116),u=e.i(576369),h=e.i(441344),c=e.i(285479),f=e.i(45215),p=e.i(828339),m=e.i(45806),g=e.i(815115),b=e.i(730981),v=e.i(54233),y=e.i(559436),S=e.i(144003),k=e.i(462974),C=e.i(908045),A=e.i(915697);e.i(657628);var x=e.i(552831);let w=[""],E=-1;var L=class{options;workerManager;isContainerManaged;static LoadedCustomComponent=!0;__id=`file:${++E}`;type="file";fileContainer;spriteSVG;pre;code;bufferBefore;bufferAfter;themeCSSStyle;appliedThemeCSS;hasAdoptedThemeCSS=!1;unsafeCSSStyle;appliedUnsafeCSS;gutterUtilityContent;errorWrapper;placeHolder;lastRenderedHeaderHTML;cachedHeaderHTML;appliedPreAttributes;lastRowCount;mounted=!1;headerElement;headerCustom;headerPrefix;headerFilenameSuffix;headerMetadata;fileRenderer;resizeManager;interactionManager;annotationCache=new Map;lineAnnotations=[];managersDirty=!1;file;renderRange;enabled=!0;editor;constructor(e={theme:t.DEFAULT_THEMES},n,i=!1){this.options=e,this.workerManager=n,this.isContainerManaged=i,this.fileRenderer=new u.FileRen
1derer(e,this.handleHighlightRender,this.workerManager),this.resizeManager=new o.ResizeManager,this.interactionManager=new a.InteractionManager("file",(0,a.pluckInteractionOptions)(e)),this.workerManager?.subscribeToThemeChanges(this)}handleHighlightRender=()=>{this.rerender()};rerender(){this.enabled&&null!=this.file&&this.render({file:this.file,forceRender:!0,renderRange:this.renderRange})}__getCurrentFile(){return this.file}onThemeChange(){this.fileRenderer.clearRenderCache(),this.rerender()}setOptions(e){null!=e&&(this.options=e,this.cachedHeaderHTML=void 0,this.syncInteractionOptions())}syncInteractionOptions(){this.interactionManager.setOptions((0,a.pluckInteractionOptions)(this.options))}mergeOptions(e){this.options={...this.options,...e}}setThemeType(e){(this.options.themeType??"system")!==e&&(this.mergeOptions({themeType:e}),this.applyCachedThemeState(e))}applyCachedThemeState(e){if("string"==typeof this.options.theme||null==this.fileContainer||null==this.appliedThemeCSS)return!1;let t=this.appliedThemeCSS.baseThemeType??e;return this.appliedThemeCSS.themeType!==t&&(this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType),!0)}hasThemeChanged(){return null!=this.appliedThemeCSS&&!(0,n.areThemesEqual)(this.appliedThemeCSS.theme,this.options.theme??t.DEFAULT_THEMES)}getHoveredLine=()=>this.interactionManager.getHoveredLine();setLineAnnotations(e){this.lineAnnotations=e}setSelectedLines(e,t){this.interactionManager.setSelection(e,t)}setEditorActiveLine(e,t){this.interactionManager.setEditorActiveLine(e,{lineNumberOnly:t?.lineNumberOnly,side:t?.side??"additions"})}getCodeScrollLeft(){return this.code?.scrollLeft??0}setCodeScrollLeft(e){null!=this.code&&(this.code.scrollLeft=e)}flushManagers(){if(!this.managersDirty||null==this.pre){this.managersDirty=!1;return}let{overflow:e="scroll"}=this.options;this.interactionManager.setup(this.pre),this.resizeManager.setup(this.pre,{disableAnnotations:"wrap"===e,columnVariables:this.shouldApplyColumnVariables(e)?"apply":"measure"}),this.managersDirty=!1}shouldApplyColumnVariables(e){return"scroll"===e&&this.lineAnnotations.length>0}cleanUp(e=!1){this.emitPostRender(!0),this.editor?.cleanUp(e),this.editor=void 0,this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.managersDirty=!1,this.workerManager?.unsubscribeToThemeChanges(this),this.renderRange=void 0,this.isContainerManaged||this.fileContainer?.remove(),this.fileContainer=void 0,this.mounted=!1,e||(this.lineAnnotations=[]),this.clearAuxiliaryNodes(),this.pre=void 0,this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0,this.headerElement=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.lastRenderedHeaderHTML=void 0,e||(this.cachedHeaderHTML=void 0),this.errorWrapper?.remove(),this.errorWrapper=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.placeHolder?.remove(),this.placeHolder=void 0,this.unsafeCSSStyle=void 0,e?this.fileRenderer.recycle():(this.fileRenderer.cleanUp(),this.workerManager=void 0,this.file=void 0),this.enabled=!1}virtualizedSetup(){this.enabled=!0,this.workerManager?.subscribeToThemeChanges(this)}hydrate(e){let{fileContainer:t,prerenderedHTML:n,preventEmit:i=!1,file:r,lineAnnotations:a}=e;if(!this.enabled)throw Error("File.hydrate: attempting to call hydrate after cleaned up");if(null!=this.fileContainer)throw Error("File.hydrate: hydrate can only be called before the instance has rendered or hydrated");this.hydrateElements(t,n),function(e,t,n=!1){return!n&&null==e&&null!=t}(this.pre,r,this.options.collapsed)||function(e,t,n=!1){return null==e&&null!=t&&!n}(this.headerElement,r,this.options.disableFileHeader)?this.render({...e,preventEmit:!0}):this.hydrationSetup({file:r,lineAnnotations:a}),i||this.emitPostRender()}hydrateElements(e,t){for(let n of(this.fileContainer!==e&&this.emitPostRender(!0),(0,C.prerenderHTMLIfNecessary)(e,t),Array.from(e.shadowRoot?.children??[]))){if(n instanceof SVGElement){this.spriteSVG=n;continue}if(n instanceof HTMLElement){if(n instanceof HTMLPreElement){this.pre=n,this.appliedPreAttributes=void 0;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute("data-theme-css")){this.themeCSSStyle=n;continue}if(n instanceof HTMLStyleElement&&n.hasAttribute("data-unsafe-css")){this.unsafeCSSStyle=n,this.appliedUnsafeCSS=n.textContent;continue}if("diffsHeader"in n.dataset){this.headerElement=n,this.lastRenderedHeaderHTML=void 0;continue}}}null!=this.pre&&(this.syncCodeNodeFromPre(this.pre),this.pre.removeAttribute("data-dehydrated")),this.fileContainer=e,this.hydrateMeasuredScrollbar()}hydrationSetup({file:e,lineAnnotations:t}){this.lineAnnotations=t??this.lineAnnotations,this.file=e,this.fileRenderer.setOptions((0,y.getFileRen
1dererOptions)(this.options)),this.syncInteractionOptions(),null!=this.pre&&(this.fileRenderer.hydrate(e),this.renderAnnotations(),this.renderGutterUtility(),this.injectUnsafeCSS(),this.managersDirty=!0,this.flushManagers())}getOrCreateLineCache(e=this.file){return null!=e?this.fileRenderer.getOrCreateLineCache(e):w}updateBuffers(e){null!=this.pre&&this.applyBuffers(this.pre,e)}syncRenderViewToEditor(){let e=this.editor,t=this.fileContainer,n=this.file,i=this.lineAnnotations,r=this.renderRange;null!=e&&null!=t&&null!=n&&this.fileRenderer.initializeHighlighter().then(a=>{this.enabled&&this.editor===e&&this.fileContainer===t&&this.file===n&&e.__syncRenderView(a,t,n,i,r)})}attachEditor(e){this.editor?.cleanUp(),this.editor=e;let t=null==this.file?void 0:e.__prepareFile?.(this.file);return void 0!==t&&t!==this.file?this.renderPreparedFile({file:t,forceRender:!0,preventEmit:!0,renderRange:this.renderRange}):this.syncRenderViewToEditor(),()=>{this.editor=void 0}}applyDocumentChange(e,t){this.fileRenderer.applyDocumentChange(e),null!=t&&t!==this.lineAnnotations&&null!=this.file&&(this.setLineAnnotations(t),this.fileRenderer.setLineAnnotations(this.lineAnnotations),this.renderAnnotations())}updateRenderCache(e,t){this.fileRenderer.updateRenderCache(e,t)}render(e){if(!this.enabled)throw Error("File.render: attempting to call render after cleaned up");let t=this.editor?.__prepareFile?.(e.file)??e.file;return this.renderPreparedFile(t===e.file?e:{...e,file:t})}renderPreparedFile({file:e,fileContainer:n,forceRender:i=!1,preventEmit:a=!1,containerWrapper:o,deferManagers:l=!1,lineAnnotations:d,renderRange:u}){this.editor?.__postponeBgTokenizeToNextFrame();let{collapsed:h=!1,themeType:c="system"}=this.options,f=h?void 0:u,p=this.renderRange,m=this.hasThemeChanged(),g=null!=d&&(d.length>0||this.lineAnnotations.length>0)&&d!==this.lineAnnotations,b=!(0,r.areFilesEqual)(this.file,e)||this.fileRenderer.hasUnkeyedFileContentsChanged(e);if(!h&&!i&&(0,s.areRenderRangesEqual)(f,this.renderRange)&&!b&&!g&&!m)return this.applyCachedThemeState(c);this.renderRange=f,b&&(this.cachedHeaderHTML=void 0),this.file=e,this.fileRenderer.setOptions((0,y.getFileRendererOptions)(this.options)),this.syncInteractionOptions(),null!=d&&this.setLineAnnotations(d),this.fileRenderer.setLineAnnotations(this.lineAnnotations);let{disableErrorHandling:v=!1,disableFileHeader:S=!1}=this.options;if(S&&(null!=this.headerElement&&(this.headerElement.remove(),this.headerElement=void 0,this.lastRenderedHeaderHTML=void 0),this.clearHeaderSlots()),n=this.getOrCreateFileContainerNode(n,o),this.applyCachedThemeState(c),h){this.removeRenderedCode(),this.clearAuxiliaryNodes();try{let i=this.fileRenderer.renderFile(e,t.EMPTY_RENDER_RANGE);null!=i&&this.applyThemeState(n,i.themeStyles,c,i.baseThemeType),i?.headerAST!=null&&this.applyHeaderToDOM(i.headerAST,n),this.injectUnsafeCSS()}catch(e){if(v)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,n)}return a||this.emitPostRender(),!0}try{let t=this.getOrCreatePreNode(n);if(!this.canPartiallyRender(i,g,b||m)||!this.applyPartialRender(p,f)){let i=this.fileRenderer.renderFile(e,f);if(null==i)return this.workerManager?.isInitialized()===!1&&this.workerManager.initialize().then(()=>this.rerender()),!1;this.applyThemeState(n,i.themeStyles,c,i.baseThemeType),null!=i.headerAST&&this.applyHeaderToDOM(i.headerAST,n),this.applyFullRender(i,t)}this.applyBuffers(t,f),this.injectUnsafeCSS(),this.managersDirty=!0,l||this.flushManagers(),this.renderAnnotations(),this.renderGutterUtility(),null!=this.editor&&this.syncRenderViewToEditor()}catch(e){if(v)throw e;console.error(e),e instanceof Error&&this.applyErrorToDOM(e,n)}return a||this.emitPostRender(),!0}emitPostRender(e=!1){let{fileContainer:t,options:{onPostRender:n}}=this;if(e){if(!this.mounted||(this.mounted=!1,null==t))return;n?.(t,this,"unmount");return}if(null==t)return;let i=this.mounted?"update":"mount";this.mounted=!0,n?.(t,this,i)}removeRenderedCode(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferBefore?.remove(),this.bufferBefore=void 0,this.bufferAfter?.remove(),this.bufferAfter=void 0,this.code?.remove(),this.code=void 0,this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0,this.lastRowCount=void 0}clearAuxiliaryNodes(){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear(),this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0}canPartiallyRender(e,t,n){return!e&&!t&&!n}renderPlaceholder(e){if(null==this.fileContainer)return!1;if(this.emitPostRender(!0),this.cleanChildNodes(),null==this.placeHolder){let e=this.fileContainer.shadowRoot??this.fileContainer.attachShadow({mode:"open"});this.placeHolder=document.createElement("div"),this.placeHolder.dataset.placeholder="",e.appendChild(this.placeHolder)}return this.placeHolder.style.setProperty("height",`${e}px`),!0}primeHighlightCache(){let{file:e,workerManager:t}=this;
1null==e||null==e.cacheKey||null==t||(0,d.isFilePlainText)(e)||this.fileRenderer.getOrCreateLineCache(e).length>(this.options.tokenizeMaxLength??1e5)||t.primeFileHighlightCache(e).catch(()=>void 0)}cleanChildNodes(){this.resizeManager.cleanUp(),this.interactionManager.cleanUp(),this.bufferAfter?.remove(),this.bufferBefore?.remove(),this.code?.remove(),this.errorWrapper?.remove(),this.headerElement?.remove(),this.gutterUtilityContent?.remove(),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.pre?.remove(),this.spriteSVG?.remove(),this.themeCSSStyle?.remove(),this.unsafeCSSStyle?.remove(),this.bufferAfter=void 0,this.bufferBefore=void 0,this.code=void 0,this.errorWrapper=void 0,this.headerElement=void 0,this.gutterUtilityContent=void 0,this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0,this.pre=void 0,this.spriteSVG=void 0,this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0,this.hasAdoptedThemeCSS=!1,this.unsafeCSSStyle=void 0,this.appliedUnsafeCSS=void 0,this.lastRenderedHeaderHTML=void 0,this.lastRowCount=void 0,this.mounted=!1}renderAnnotations(){if(this.isContainerManaged||null==this.fileContainer){for(let{element:e}of this.annotationCache.values())e.remove();this.annotationCache.clear();return}let e=new Map(this.annotationCache),{renderAnnotation:t}=this.options;if(null!=t&&this.lineAnnotations.length>0)for(let[n,i]of this.lineAnnotations.entries()){let r=`${n}-${(0,l.getLineAnnotationName)(i)}`,a=this.annotationCache.get(r);if(null==a||!(0,c.areLineAnnotationsEqual)(i,a.annotation)){a?.element.remove();let e=t(i);if(null==e)continue;(a={element:(0,p.createAnnotationWrapperNode)((0,l.getLineAnnotationName)(i)),annotation:i}).element.appendChild(e),this.fileContainer.appendChild(a.element),this.annotationCache.set(r,a)}e.delete(r)}for(let[t,{element:n}]of e.entries())this.annotationCache.delete(t),n.remove()}renderGutterUtility(){let{renderGutterUtility:e}=this.options;if(null==this.fileContainer||null==e){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let t=e(this.interactionManager.getHoveredLine);if(null!=t&&null!=this.gutterUtilityContent)return;if(null==t){this.gutterUtilityContent?.remove(),this.gutterUtilityContent=void 0;return}let n=(0,m.createGutterUtilityContentNode)();n.appendChild(t),this.fileContainer.appendChild(n),this.gutterUtilityContent=n}injectUnsafeCSS(){let{unsafeCSS:e}=this.options,t=this.fileContainer?.shadowRoot;if(null!=t){if(null==e||""===e){null!=this.unsafeCSSStyle&&(this.unsafeCSSStyle.remove(),this.unsafeCSSStyle=void 0),this.appliedUnsafeCSS=void 0;return}(this.unsafeCSSStyle?.parentNode!==t||this.appliedUnsafeCSS!==e)&&(this.unsafeCSSStyle??=(0,g.createUnsafeCSSStyleNode)(),this.unsafeCSSStyle.parentNode!==t&&t.appendChild(this.unsafeCSSStyle),this.unsafeCSSStyle.textContent=(0,v.wrapUnsafeCSS)(e),this.appliedUnsafeCSS=e)}}applyThemeState(e,n,i,r){let a=e.shadowRoot??e.attachShadow({mode:"open"}),o=r??i,s=this.options.theme??t.DEFAULT_THEMES,l="string"==typeof s?s:{...s},d=(0,b.getMeasuredScrollbarGutter)(a);if(this.themeCSSStyle?.parentNode===a&&this.appliedThemeCSS?.themeStyles===n&&this.appliedThemeCSS.themeType===o&&this.appliedThemeCSS.scrollbarGutter===d){this.appliedThemeCSS.theme=l;return}if(this.hasAdoptedThemeCSS&&this.themeCSSStyle?.parentNode===a){this.hasAdoptedThemeCSS=!1,this.appliedThemeCSS={theme:l,themeStyles:n,themeType:o,baseThemeType:r,scrollbarGutter:d};return}this.themeCSSStyle=(0,k.upsertHostThemeStyle)({shadowRoot:a,currentNode:this.themeCSSStyle,themeCSS:(0,v.wrapThemeCSS)(n,o,d)}),this.appliedThemeCSS=null!=this.themeCSSStyle?{theme:l,themeStyles:n,themeType:o,baseThemeType:r,scrollbarGutter:d}:void 0}hydrateMeasuredScrollbar(){let e=this.fileContainer?.shadowRoot;null!=e&&null!=this.themeCSSStyle&&(this.themeCSSStyle.textContent=(0,v.patchScrollbarGutterSize)(this.themeCSSStyle.textContent??"",(0,b.getMeasuredScrollbarGutter)(e)))}applyFullRender(e,t){this.cleanupErrorWrapper(),this.applyPreNodeAttributes(t,e),this.code=(0,S.getOrCreateCodeNode)({code:this.code});let n=this.fileRenderer.renderCodeAST(e);if(this.code.childElementCount>=2)for(let e=0;e<2;e++){let t=this.code.children[e],i=n[e];t.innerHTML=(0,x.toHtml)(i.children),t.style.cssText=i.properties.style}else this.code.innerHTML=(0,x.toHtml)(n);t.contains(this.code)||t.replaceChildren(this.code),this.lastRowCount=e.rowCount}applyPartialRender(e,t){if(null==e||null==t)return!1;let{file:n,code:i}=this,r=null!=i?this.getColumns(i):void 0;if(null==n||null==i||null==r)return!1;let a=e.startingLine,o=t.startingLine,s=e.totalLines===1/0?1/0:a+e.totalLines,l=t.totalLines===1/0?1/0:o+t.totalLines,d=Math.max(a,o),u=Math.min(s,l);if(u<=d||!this.trimDOMToOverlap(r.gutter,d,u)||!this.trimDOMToOverlap(r.content,d,u))return!1;let{length:h}=r.content.children,c=(e,t)=>{if(!(t<=0))return this.fileRenderer.renderFile(n,{startingLine:e,totalLines:t,bufferBefore:0,bufferAfter:0})},f=o<d?c(o,d-o):void 0;if(void 0===f&&o<d)return!1;let p=l===1/0?1/0:Math.max(0,l-u),m=l>u?c(u,p):void 0;return(void 0!==m||!(l>u))&&(this.cleanupErrorWrapper(),null!=f&&(r.gutter.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(f.gutterAST)),r.content.insertAdjacentHTML("afterbegin",this.fileRenderer.renderPartialHTML(f.contentAST)),h+=f.rowCount),null!=m&&(r.gutter.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(m.gutterAST)),r.content.insertAdjacentHTML("beforeend",this.fileRenderer.renderPartialHTML(m.contentAST)),h+=m.rowCount),this.lastRowCount!==h&&(r.gutter.style.setProperty("grid-row",`span ${h}`),r.content.style.setProperty("grid-row",`span ${h}`),this.lastRowCount=h),!0)}getColumns(e){let t=e.children[0],n=e.children[1];if(t instanceof HTMLElement&&n instanceof HTMLElement&&null!=t.dataset.gutter&&null!=n.dataset.content)return{gutter:t,content:n}}trimDOMToOverlap(e,t,n){let i=this.getDOMBoundaryIndices(e,[t,n]),r=i.get(t)??e.children.length,a=i.get(n)??e.children.length;if(r>a)return!1;for(let t=e.children.length-1;t>=a;t-=1)e.children[t]?.remove();for(let t=r-1;t>=0;t-=1)e.children[t]?.remove();return!0}getDOMBoundaryIndices(e,t){let n=[...new Set(t)].sort((e,t)=>
1e-t),i=new Map;if(0===n.length)return i;let r=0,a=n[0],{children:o}=e;0===a&&(i.set(0,0),r+=1,a=n[r]);for(let e=0;e<o.length;e+=1){let t=o[e];if(!(t instanceof HTMLElement))continue;let s=this.getLineIndexFromDOMNode(t);if(null!=s){for(;null!=a&&s>=a;)i.set(a,e),r+=1,a=n[r];if(r>=n.length)break}}for(let e of n)i.has(e)||i.set(e,o.length);return i}getLineIndexFromDOMNode(e){let t=e.dataset.lineIndex;if(null==t)return;let n=Number(t);return Number.isNaN(n)?void 0:n}applyBuffers(e,t){if(null==t||this.shouldDisableVirtualizationBuffers()){null!=this.bufferBefore&&(this.bufferBefore.remove(),this.bufferBefore=void 0),null!=this.bufferAfter&&(this.bufferAfter.remove(),this.bufferAfter=void 0);return}t.bufferBefore>0?(null==this.bufferBefore&&(this.bufferBefore=document.createElement("div"),this.bufferBefore.dataset.virtualizerBuffer="before",e.before(this.bufferBefore)),this.bufferBefore.style.setProperty("height",`${t.bufferBefore}px`),this.bufferBefore.style.setProperty("contain","strict")):null!=this.bufferBefore&&(this.bufferBefore.remove(),this.bufferBefore=void 0),t.bufferAfter>0?(null==this.bufferAfter&&(this.bufferAfter=document.createElement("div"),this.bufferAfter.dataset.virtualizerBuffer="after",e.after(this.bufferAfter)),this.bufferAfter.style.setProperty("height",`${t.bufferAfter}px`),this.bufferAfter.style.setProperty("contain","strict")):null!=this.bufferAfter&&(this.bufferAfter.remove(),this.bufferAfter=void 0)}shouldDisableVirtualizationBuffers(){return this.options.disableVirtualizationBuffers??!1}applyHeaderToDOM(e,n){let{file:i}=this;if(null==i)return;this.cleanupErrorWrapper(),this.placeHolder?.remove(),this.placeHolder=void 0;let r=this.cachedHeaderHTML??(0,x.toHtml)(e);if(this.cachedHeaderHTML=r,r!==this.lastRenderedHeaderHTML){let e=document.createElement("div");e.innerHTML=r;let t=e.firstElementChild;if(!(t instanceof HTMLElement))return;null!=this.headerElement?n.shadowRoot?.replaceChild(t,this.headerElement):n.shadowRoot?.prepend(t),this.headerElement=t,this.lastRenderedHeaderHTML=r}if(this.isContainerManaged)return;let{renderHeaderPrefix:a,renderHeaderFilenameSuffix:o,renderCustomHeader:s,renderHeaderMetadata:l}=this.options;if(null!=s){let e=s(i)??void 0;this.headerCustom=this.upsertHeaderSlotElement(n,this.headerCustom,t.CUSTOM_HEADER_SLOT_ID,e),this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0}else{let e=a?.(i)??void 0,r=o?.(i)??void 0,s=l?.(i)??void 0;this.headerPrefix=this.upsertHeaderSlotElement(n,this.headerPrefix,t.HEADER_PREFIX_SLOT_ID,e),this.headerFilenameSuffix=this.upsertHeaderSlotElement(n,this.headerFilenameSuffix,t.HEADER_FILENAME_SUFFIX_SLOT_ID,r),this.headerMetadata=this.upsertHeaderSlotElement(n,this.headerMetadata,t.HEADER_METADATA_SLOT_ID,s),this.headerCustom?.remove(),this.headerCustom=void 0}}clearHeaderSlots(){this.headerPrefix?.remove(),this.headerFilenameSuffix?.remove(),this.headerMetadata?.remove(),this.headerCustom?.remove(),this.headerPrefix=void 0,this.headerFilenameSuffix=void 0,this.headerMetadata=void 0,this.headerCustom=void 0}upsertHeaderSlotElement(e,t,n,i){if(null==i)return void t?.remove();let r=t??this.createHeaderSlotElement(n);return null==t&&e.appendChild(r),this.replaceHeaderSlotContent(r,i),r}replaceHeaderSlotContent(e,t){e.replaceChildren(),t instanceof Element?e.appendChild(t):e.innerText=`${t}`}createHeaderSlotElement(e){let t=document.createElement("div");return t.slot=e,t}getOrCreateFileContainerNode(e,t){let{fileContainer:n}=this,i=e??n??document.createElement("diffs-container"),r=n!==i;return null!=n&&r&&this.editor?.__captureFocusForDOMReplacement(),r&&this.emitPostRender(!0),this.fileContainer=i,null!=n&&r&&(this.lastRenderedHeaderHTML=void 0,this.headerElement=void 0),null!=t&&this.fileContainer.parentNode!==t&&t.appendChild(this.fileContainer),r&&this.adoptReusableShellElements(this.fileContainer),this.ensureSpriteSVG(this.fileContainer),this.fileContainer}adoptReusableShellElements(e){let{shadowRoot:t}=e;if(null!=t)for(let e of t.children)e instanceof SVGElement?this.spriteSVG??=e:(0,i.isStyleNode)(e)&&e.hasAttribute("data-theme-css")?(this.themeCSSStyle??=e,this.hasAdoptedThemeCSS=!0):(0,i.isStyleNode)(e)&&e.hasAttribute("data-unsafe-css")&&(this.unsafeCSSStyle??=e,this.appliedUnsafeCSS??=this.options.unsafeCSS??void 0)}ensureSpriteSVG(e){let t=e.shadowRoot??e.attachShadow({mode:"open"});if(null==this.spriteSVG){let e=document.createElement("div");e.innerHTML=h.SVGSpriteSheet;let t=e.firstChild;t instanceof SVGElement&&(this.spriteSVG=t)}null!=this.spriteSVG&&this.spriteSVG.parentNode!==t&&t.appendChild(this.spriteSVG)}getOrCreatePreNode(e){let t=e.shadowRoot??e.attachShadow({mode:"open"});return null==this.pre?(this.pre=document.createElement("pre"),this.appliedPreAttributes=void 0,this.code=void 0,t.appendChild(this.pre)):this.pre.parentNode!==t&&(this.editor?.__captureFocusForDOMReplacement(),e.shadowRoot?.appendChild(this.pre),this.appliedPreAttributes=void 0),this.placeHolder?.remove(),this.placeHolder=void 0,this.pre}syncCodeNodeFromPre(e){for(let t of(this.code=void 0,Array.from(e.children)))if(t instanceof HTMLElement&&t.hasAttribute("data-code")){this.co
1de=t;return}}applyPreNodeAttributes(e,{totalLines:t}){let{overflow:n="scroll",disableLineNumbers:i=!1}=this.options,r={type:"file",split:!1,overflow:n,disableLineNumbers:i,diffIndicators:"none",disableBackground:!0,totalLines:t};(0,f.arePrePropertiesEqual)(r,this.appliedPreAttributes)||((0,A.setPreNodeProperties)(e,r),this.appliedPreAttributes=r)}applyErrorToDOM(e,t){this.cleanupErrorWrapper(),this.pre?.remove(),this.pre=void 0,this.appliedPreAttributes=void 0;let n=t.shadowRoot??t.attachShadow({mode:"open"});this.errorWrapper??=document.createElement("div"),this.errorWrapper.dataset.errorWrapper="",this.errorWrapper.textContent="",n.appendChild(this.errorWrapper);let i=document.createElement("div");i.dataset.errorMessage="",i.innerText=e.message,this.errorWrapper.appendChild(i);let r=document.createElement("pre");r.dataset.errorStack="",r.innerText=e.stack??"No Error Stack",this.errorWrapper.appendChild(r)}cleanupErrorWrapper(){this.errorWrapper?.remove(),this.errorWrapper=void 0}};e.s(["File",0,L])},522588,e=>{"use strict";var t=e.i(994940),n=e.i(340300),i=e.i(672165),r=e.i(813329),a=e.i(546907),o=e.i(964526),s=e.i(683255);let l=-1;var d=class extends s.File{virtualizer;metrics;__id=`virtualized-file:${++l}`;top;height=0;cache={heights:new Map,checkpoints:[],fileAnnotationHeight:0};isVisible=!1;isSetup=!1;layoutDirty=!0;forceRenderOverride;currentCollapsed;constructor(e,n,i=t.DEFAULT_VIRTUAL_FILE_METRICS,r,a=!1){super(e,r,a),this.virtualizer=n,this.metrics=i}setMetrics(e,t=!1){!t&&(0,n.areObjectsEqual)(this.metrics,e)||(this.metrics=e,this.resetLayoutCache())}setLineAnnotations(e){this.syncLineAnnotations(e)&&this.resetLayoutCache()}syncLineAnnotations(e){return null!=e&&e!==this.lineAnnotations&&(0!==e.length||0!==this.lineAnnotations.length)&&(super.setLineAnnotations(e),!0)}hasLineAnnotations(){return this.lineAnnotations.some(e=>e.lineNumber>0)}getLineHeight(e,t=!1){let n=this.cache.heights.get(e);return null!=n?n:this.metrics.lineHeight*(t?2:1)}setOptions(e){if(this.isAdvancedMode())throw Error("VirtualizedFile.setOptions cannot be used inside CodeView. Update CodeView options instead.");if(null==e)return;let{options:t}=this,n=!(0,i.areOptionsEqual)(t,e),r=(t.overflow??"scroll")!==(e.overflow??"scroll")||(t.collapsed??!1)!==(e.collapsed??!1)||(t.disableLineNumbers??!1)!==(e.disableLineNumbers??!1)||(t.disableFileHeader??!1)!==(e.disableFileHeader??!1)||t.unsafeCSS!==e.unsafeCSS;super.setOptions(e),r&&this.resetLayoutCache(!0),n&&(this.forceRenderOverride=!0),n&&this.virtualizer.instanceChanged(this,r)}setThemeType(e){if(this.isAdvancedMode())throw Error("VirtualizedFile.setThemeType cannot be used inside CodeView. Update CodeView options instead.");super.setThemeType(e)}resetLayoutCache(e=!1,t=!0){this.layoutDirty=!0,this.cache.fileAnnotationHeight=0,this.cache.heights.size>0&&this.cache.heights.clear(),this.cache.checkpoints.length>0&&(this.cache.checkpoints.length=0),null!=this.renderRange&&t&&(this.renderRange=void 0),e&&this.isSimpleMode()&&this.computeApproximateSize()}reconcileHeights(){let e=!1;if(null==this.fileContainer||null==this.file)return 0!==this.height&&(e=!0),this.height=0,e;let{overflow:t="scroll"}=this.options;if(this.top=this.getVirtualizedTop(),"scroll"===t&&0===this.lineAnnotations.length&&!this.isResizeDebuggingEnabled()||null==this.code)return e;let n=this.code.children[1];if(!(n instanceof HTMLElement))return e;let i=(0,o.includesFileAnnotations)(this.lineAnnotations);if(null!=this.renderRange&&i&&(0,o.shouldRenderFileAnnotations)(this.renderRange)){let t=function(e){let t;for(let n of e.children)n instanceof HTMLElement&&n.dataset.lineAnnotation===o.FILE_ANNOTATION_DOM_KEY&&(t=Math.max(t??0,n.getBoundingClientRect().height));return t}(n)??0;t!==this.cache.fileAnnotationHeight&&(this.cache.fileAnnotationHeight=t,e=!0)}else i||0===this.cache.fileAnnotationHeight||(this.cache.fileAnnotationHeight=0,e=!0);for(let t of n.children){if(!(t instanceof HTMLElement))continue;let n=t.dataset.lineIndex;if(null==n)continue;let i=Number(n),r=t.getBoundingClientRect().height,a=!1;t.nextElementSibling instanceof HTMLElement&&("lineAnnotation"in t.nextElementSibling.dataset||"noNewline"in t.nextElementSibling.dataset)&&("noNe
1wline"in t.nextElementSibling.dataset&&(a=!0),r+=t.nextElementSibling.getBoundingClientRect().height),r!==this.getLineHeight(i,a)&&(e=!0,r===this.metrics.lineHeight*(a?2:1)?this.cache.heights.delete(i):this.cache.heights.set(i,r))}return(e||this.isResizeDebuggingEnabled())&&this.computeApproximateSize(!0),e}onRender=e=>null!=this.fileContainer&&null!=this.file&&(e&&(this.top=this.getVirtualizedTop()),this.render({file:this.file}));prepareCodeViewItem(e,t,n,i){let r=this.syncLineAnnotations(i),a=this.fileRenderer.hasUnkeyedFileContentsChanged(e),o=n?.resetFileLayoutCache===!0||r||a;n?.metrics!=null&&(this.metrics=n.metrics,o=!0);let{collapsed:s=!1}=this.options;return this.currentCollapsed!==s&&(this.currentCollapsed=s,o=!0),o&&this.resetLayoutCache(),this.file!==e&&(this.layoutDirty=!0),this.file=e,this.top=t,this.computeApproximateSize(),this.height}getLinePosition(e){if(null==this.file||e<1)return;let{disableFileHeader:t=!1,collapsed:n=!1}=this.options,i=this.fileRenderer.getLineCount(this.file)-1,a=(0,r.getVirtualFileHeaderRegion)(this.metrics,t);if(n||i<0)return{top:a,height:0};let o=Math.min(Math.max(e-1,0),i),{overflow:s="scroll"}=this.options,{lineHeight:l}=this.metrics;if(a+=this.cache.fileAnnotationHeight,"scroll"===s&&!this.hasLineAnnotations())return{top:a+o*l,height:l};let d=this.getLayoutCheckpointBeforeLineIndex(o);a=d?.top??a;for(let e=d?.lineIndex??0;e<o;e++)a+=this.getLineHeight(e,!1);return{top:a,height:this.getLineHeight(o,!1)}}getEditorViewport(){return"simple"===this.virtualizer.type?this.virtualizer.getRoot():this.virtualizer.getContainerElement()}getNumericScrollAnchor(e){if(null==this.file||null==this.renderRange)return;let{disableFileHeader:t=!1,collapsed:n=!1,overflow:i="scroll"}=this.options;if(n||this.renderRange.totalLines<=0)return;let a=this.fileRenderer.getLineCount(this.file)-1;if(a<0)return;let o=(0,r.getVirtualFileHeaderRegion)(this.metrics,t),s=Math.min(this.renderRange.startingLine,a),l=Math.min(s+this.renderRange.totalLines-1,a);if(l<s)return;let{fileAnnotationHeight:d}=this.cache;if("scroll"===i&&!this.hasLineAnnotations()){let{lineHeight:t}=this.metrics,n=o+(0===s?d:this.renderRange.bufferBefore),i=s+Math.max(Math.ceil((e-n)/t),0);if(i>l)return;return{lineNumber:i+1,top:o+d+i*t}}let u=o+(0===s?d:this.renderRange.bufferBefore);for(let t=s;t<=l;t++){if(u>=e)return{lineNumber:t+1,top:u};u+=this.getLineHeight(t)}}getVirtualizedHeight(){return this.height}getAdvancedStickySpecs(e){if(null==this.top||null==this.file)return;if(!0===this.options.collapsed)return{topOffset:this.top,height:this.height};let t=null!=e?this.computeRenderRangeFromWindow(this.file,this.top,e):this.renderRange;if(null==t)return;let{bufferBefore:n,bufferAfter:i,totalLines:r}=t,a=0;if(0===r){let t=e??this.virtualizer.getWindowSpecs();this.top<t.top&&(a=i)}return{topOffset:this.top+n+a,height:this.height-(n+i)}}cleanUp(e=!1){null!=this.fileContainer&&this.isSimpleMode()&&this.getSimpleVirtualizer()?.disconnect(this.fileContainer),e||this.resetLayoutCache(),this.isSetup=!1,super.cleanUp(e)}computeApproximateSize(e=!1){let t=this.isResizeDebuggingEnabled();if(!e&&!this.layoutDirty&&!t)return;let n=0===this.height;if(this.height=0,this.cache.checkpoints=[],null==this.file){this.layoutDirty=!1;return}let{disableFileHeader:i=!1,collapsed:a=!1,overflow:o="scroll"}=this.options,{lineHeight:s}=this.metrics,l=this.fileRenderer.getLineCount(this.file),d=(0,r.getVirtualFileHeaderRegion)(this.metrics,i),u=(0,r.getVirtualFilePaddingBottom)(this.metrics);if(this.height+=d,a){this.layoutDirty=!1;return}if(this.height+=this.cache.fileAnnotationHeight,"scroll"!==o||this.hasLineAnnotations())for(let e=0;e<l;e++)this.addLayoutCheckpoint(e,this.height),this.height+=this.getLineHeight(e,!1);else this.height+=l*s;if(l>0&&(this.height+=u),null!=this.fileContainer&&t&&!n){let e=this.fileContainer.getBoundingClientRect();e.height!==this.height?console.log("VirtualizedFile.computeApproximateSize: computed height doesnt match",{name:this.file.name,elementHeight:e.height,computedHeight:this.height}):console.log("VirtualizedFile.computeApproximateSize: computed height IS CORRECT")}this.layoutDirty=!1}setVisibility(e){this.isAdvancedMode()||null==this.fileContainer||(e&&!this.isVisible?(this.top=this.getVirtualizedTop(),this.isVisible=!0):!e&&this.isVisible&&(this.isVisible=!1,this.rerender()))}rerender(){this.enabled&&null!=this.file&&(this.forceRenderOverride=!0,this.virtualizer.instanceChanged(this,!1))}applyDocumentChange(e,t,n=!1){let i=this.renderRange;
1if(super.applyDocumentChange(e,t),this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache(this.isSimpleMode(),!1),n&&void 0!==i&&void 0!==this.file){let e=this.virtualizer.getWindowSpecs(),t=this.computeRenderRangeFromWindow(this.file,this.top??0,e);t.bufferAfter!==i.bufferAfter&&this.updateBuffers(t)}}renderPreparedFile({fileContainer:e,file:t,forceRender:n=!1,lineAnnotations:i,...r}){let o=null==this.file||!(0,a.areFilesEqual)(this.file,t)||this.fileRenderer.hasUnkeyedFileContentsChanged(t),{forceRenderOverride:s,isSetup:l}=this;this.forceRenderOverride=void 0;let d=this.syncLineAnnotations(i);if(d&&this.resetLayoutCache(),this.file=t,e=this.getOrCreateFileContainerNode(e),null==this.file)return console.error("VirtualizedFile.render: attempting to virtually render when we dont have file"),!1;if(l)this.top??=this.getVirtualizedTop(),o&&this.isSimpleMode()&&(this.getSimpleVirtualizer()?.markDOMDirty(),this.resetLayoutCache(!0));else{this.computeApproximateSize();let t=this.getSimpleVirtualizer();if(this.top??=this.getVirtualizedTop(),this.isAdvancedMode())this.isVisible=!0;else{if(null==t)throw Error("VirtualizedFile.render: simple virtualizer is not available");t.connect(e,this),this.isVisible=t.isInstanceVisible(this.top??0,this.height)}this.isSetup=!0}if(!this.isVisible&&this.isSimpleMode())return this.renderPlaceholder(this.height);let u=this.virtualizer.getWindowSpecs(),h=this.top??0,c=this.computeRenderRangeFromWindow(this.file,h,u),f=super.renderPreparedFile({file:this.file,fileContainer:e,renderRange:c,lineAnnotations:i,forceRender:(s??n)||d,...r});return this.isSimpleMode()&&f&&this.getSimpleVirtualizer()?.requestHeightReconcile(this),f}syncVirtualizedTop(){this.top=this.getVirtualizedTop()}shouldDisableVirtualizationBuffers(){return this.isAdvancedMode()||super.shouldDisableVirtualizationBuffers()}isSimpleMode(){return"simple"===this.virtualizer.type}isAdvancedMode(){return"advanced"===this.virtualizer.type}addLayoutCheckpoint(e,t){e%5e3==0&&this.cache.checkpoints.push({lineIndex:e,top:t})}getLayoutCheckpointBeforeLineIndex(e){let t;if(e<=0||0===this.cache.checkpoints.length)return;let n=0,i=this.cache.checkpoints.length-1;for(;n<=i;){let r=n+i>>1,a=this.cache.checkpoints[r];if(null==a)throw Error("VirtualizedFile: invalid checkpoint index");a.lineIndex<=e?(t=a,n=r+1):i=r-1}return t}getLayoutCheckpointBeforeTop(e,t){let n=0,i=this.cache.checkpoints.length-1,r=-1;for(;n<=i;){let t=n+i>>1,a=this.cache.checkpoints[t];if(null==a)throw Error("VirtualizedFile: invalid checkpoint index");a.top<=e?(r=t,n=t+1):i=t-1}if(null==t)return r>=0?this.cache.checkpoints[r]:void 0;for(let e=r;e>=0;e--){let n=this.cache.checkpoints[e];if(null==n)throw Error("VirtualizedFile: invalid checkpoint index");if(n.lineIndex%t==0)return n}}getVirtualizedTop(){return"advanced"===this.virtualizer.type?this.virtualizer.getLocalTopForInstance(this):null!=this.fileContainer?this.virtualizer.getOffsetInScrollContainer(this.fileContainer):0}getSimpleVirtualizer(){return"simple"===this.virtualizer.type?this.virtualizer:void 0}isResizeDebuggingEnabled(){return this.getSimpleVirtualizer()?.config.resizeDebugging??!1}computeRenderRangeFromWindow(e,t,{top:n,bottom:i}){let a,s,l,{disableFileHeader:d=!1,overflow:u="scroll"}=this.options,{hunkLineCount:h,lineHeight:c}=this.metrics,f=this.fileRenderer.getLineCount(e),p=this.height,m=(0,r.getVirtualFileHeaderRegion)(this.metrics,d),g=f>0?(0,r.getVirtualFilePaddingBottom)(this.metrics):0,{fileAnnotationHeight:b}=this.cache,v=m+b,y=Math.max(0,p-m-b-g),S=(0,o.includesFileAnnotations)(this.lineAnnotations),k=t+m,C=b>0&&S&&k<i&&k+b>n;if(t<n-p||t>i)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-m-g};if(f<=h)return{startingLine:0,totalLines:h,bufferBefore:0,bufferAfter:0};let A=Math.ceil(Math.ceil(Math.max(i-n,0)/c)/h)*h+2*h,x=A/h,w=(n+i)/2;if("scroll"===u&&!this.hasLineAnnotations()){let e=t+v;if(!C&&!(e<i&&e+y>n))return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-m-g};let r=Math.floor(Math.floor(C&&w<t+v?0:(w-(t+v))/c)/h)-Math.floor(x/2),a=Math.max(0,Math.min(r,Math.ceil(f/h
1)))*h,o=r<0?A+r*h:A,s=Math.min(o,f-a);return{startingLine:a,totalLines:o,bufferBefore:0===a?0:b+a*c,bufferAfter:Math.max(0,(f-a-s)*c)}}let E=[],L=this.getLayoutCheckpointBeforeTop(Math.max(0,n-t-A*c*2),h),_=t+(L?.top??v),T=L?.lineIndex??0,N=L?.lineIndex??0;for(let e=N;e<f;e++){let r=T%h==0,o=Math.floor(T/h);if(r&&(E[o]=_-(t+v),null!=l)){if(l<=0)break;l--}let d=this.getLineHeight(e,!1);_>n-d&&_<i&&(a??=o),_+d>w&&(s??=o),null==l&&_>=i&&r&&(l=x),T++,_+=d}if(null==a)if(!C)return{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:p-m-g};else a=0,s=0;let R=Math.round((s??=a)-x/2),M=Math.max(0,Math.min(R,Math.max(0,Math.ceil(f/h)-x))),I=M*h,P=R<0?A+R*h:A,F=E[M]??0,$=M+P/h;return{startingLine:I,totalLines:P,bufferBefore:0===I?0:b+F,bufferAfter:Math.max(0,$<E.length?y-E[$]:y-(_-t-v))}}};e.s(["VirtualizedFile",0,d])},994940,e=>{"use strict";e.i(350461),(()=>{try{return!1}catch{return!1}})();let t={hunkLineCount:50,lineHeight:20,diffHeaderHeight:44,spacing:8};({...t,hunkLineCount:1});let n=Object.freeze({fromStart:0,fromEnd:0});e.s(["ALTERNATE_FILE_NAMES_GIT",0,/^diff --git (?:"a\/(.+?)"|a\/(.+?)) (?:"b\/(.+?)"|b\/(.+?))$/,"COMMIT_METADATA_SPLIT",0,/(?=^From [a-f0-9]+ .+$)/m,"CUSTOM_HEADER_SLOT_ID",0,"header-custom","DEFAULT_EXPANDED_REGION",0,n,"DEFAULT_RENDER_RANGE",0,{startingLine:0,totalLines:1/0,bufferBefore:0,bufferAfter:0},"DEFAULT_THEMES",0,{dark:"pierre-dark",light:"pierre-light"},"DEFAULT_TOKENIZE_MAX_LENGTH",0,1e5,"DEFAULT_VIRTUAL_FILE_METRICS",0,t,"DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY",0,"--diffs-scrollbar-gutter-measured","DIFFS_SCROLLBAR_MEASURE_ATTRIBUTE",0,"data-diffs-scrollbar-measure","DIFFS_TAG_NAME",0,"diffs-container","EMPTY_RENDER_RANGE",0,{startingLine:0,totalLines:0,bufferBefore:0,bufferAfter:0},"FILENAME_HEADER_REGEX",0,/^(---|\+\+\+)\s+([^\t\r\n]+)/,"FILENAME_HEADER_REGEX_GIT",0,/^(---|\+\+\+)\s+[ab]\/([^\t\r\n]+)/,"GIT_DIFF_FILE_BREAK_REGEX",0,/(?=^diff --git)/gm,"HEADER_FILENAME_SUFFIX_SLOT_ID",0,"header-filename-suffix","HEADER_METADATA_SLOT_ID",0,"header-metadata","HEADER_PREFIX_SLOT_ID",0,"header-prefix","INDEX_LINE_METADATA",0,/^index ([0-9a-f]+)\.\.([0-9a-f]+)(?: (\d+))?$/i,"SPLIT_WITH_NEWLINES",0,/(?<=\n)/,"THEME_CSS_ATTRIBUTE",0,"data-theme-css","UNSAFE_CSS_ATTRIBUTE",0,"data-unsafe-css"])},287384,e=>{"use strict";var t=e.i(693445);e.s(["hasResolvedThemes",0,function(e){return t.themeResolver.hasResolvedThemes(e)}])},240918,509899,579190,552831,569566,980566,e=>{"use strict";let t;var n=e.i(931288);function i(e,t){return e?.start===t?.start&&e?.end===t?.end&&e?.side===t?.side&&e?.endSide===t?.endSide}function r(e){return{type:"text",value:e}}function a({tagName:e,children:t=[],properties:n={}}){return{type:"element",tagName:e,properties:n,children:t}}function o({name:e,width:t=16,height:n=16,properties:i}){return a({tagName:"svg",properties:{width:t,height:n,viewBox:"0 0 16 16",...i},children:[a({tagName:"use",properties:{href:`#${e.replace(/^#/,"")}`}})]})}function s(e){for(let t of e)if(t instanceof HTMLElement&&(t.hasAttribute("data-utility-button")||t.hasAttribute("data-gutter-utility-slot")||"gutter-utility-slot"===t.getAttribute("slot")||"gutter-utility-slot"===t.getAttribute("name")))return!0;return!1}e.s(["createGutterGap",0,function(e,t,n){return a({tagName:"div",properties:{"data-gutter-buffer":t,"data-buffer-size":n,"data-line-type":"annotation"===t?void 0:e,style:"annotation"===t?`grid-row: span ${n};
1`:`grid-row: span ${n};min-height:calc(${n} * 1lh);`}})},"createGutterItem",0,function(e,t,n,i={}){return a({tagName:"div",properties:{"data-line-type":e,"data-column-number":t,"data-line-index":n,...i},children:null!=t?[a({tagName:"span",properties:{"data-line-number-content":""},children:[r(`${t}`)]})]:void 0})},"createGutterWrapper",0,function(e){return a({tagName:"div",properties:{"data-gutter":""},children:e})},"createHastElement",0,a,"createIconElement",0,o,"createTextNodeElement",0,r,"findCodeElement",0,function(e){let t=e.children[0];for(;null!=t;){if("element"===t.type&&"code"===t.tagName)return t;t="children"in t?t.children[0]:null}}],509899),e.s(["isGutterUtilityPath",0,s],579190);var l=e.i(582933),d=e.i(783892),u=e.i(792455);let h=/["&'<>`]/g,c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,p=/[|\\{}()[\]^$+*?.]/g,m=new WeakMap,g=/[\dA-Fa-f]/,b=/\d/,v=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","
1sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],y={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub
1:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},S=["cent","copy","divide","gt","lt","not","para","times"],k={}.hasOwnProperty,C={};for(t in y)k.call(y,t)&&(C[y[t]]=t);let A=/[^\dA-Za-z]/;function x(e,t,n){var i,r;let a,o,s=(i=n.omitOptionalSemicolons,a="&#x"+e.toString(16).toUpperCase(),i&&t&&!g.test(String.fromCharCode(t))?a:a+";");if((n.useNamedReferences||n.useShortestReferences)&&(o=function(e,t,n,i){let r=String.fromCharCode(e);if(k.call(C,r)){let e=C[r],a="&"+e;return n&&v.includes(e)&&!S.includes(e)&&(!i||t&&61!==t&&A.test(String.fromCharCode(t)))?a:a+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!o)&&n.useShortestReferences){let i,a=(r=n.omitOptionalSemicolons,i="&#"+String(e),r&&t&&!b.test(String.fromCharCode(t))?i:i+";");a.length<s.length&&(s=a)}return o&&(!n.useShortestReferences||o.length<s.length)?o:s}function w(e,t){let n;var i,r=e,a=Object.assign({format:x},t);if(r=r.replace(a.subset?(i=a.subset,(n=m.get(i))||(n=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(p,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(i),m.set(i,n)),n):h,o),a.subset||a.escapeOnly)return r;return r.replace(c,function(e,t,n){return a.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,n.charCodeAt(t+2),a)}).replace(f,o);function o(e,t,n){return a.format(e.charCodeAt(0),n.charCodeAt(t+1),a)}}let E=/^>|^->|<!--|-->|--!>|<!-$/g,L=[">"],_=["<",">"];var T=e.i(669462),N=e.i(243351),R=e.i(124359),M=e.i(228220),I=e.i(253528);let P=D(1),F=D(-1),$=[];function D(e){return function(t,n,i){let r=t?t.children:$,a=(n||0)+e,o=r[a];if(!i)for(;o&&(0,I.whitespace)(o);)a+=e,o=r[a];return o}}let O={}.hasOwnProperty;function H(e){return function(t,n,i){return O.call(e,t.tagName)&&e[t.tagName](t,n,i)}}let U=H({body:function(e,t,n){let i=P(n,t);return!i||"comment"!==i.type},caption:B,colgroup:B,dd:function(e,t,n){let i=P(n,t);return!i||"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName)},dt:function(e,t,n){let i=P(n,t);return!!(i&&"element"===i.type&&("dt"===i.tagName||"dd"===i.tagName))},head:B,html:function(e,t,n){let i=P(n,t);return!i||"comment"!==i.type},li:function(e,t,n){let i=P(n,t);return!i||"element"===i.type&&"li"===i.tagName},optgroup:function(e,t,n){let i=P(n,t);return!i||"element"===i.type&&"optgroup"===i.tagName},option:function(e,t,n){let i=P(n,t);return!i||"element"===i.type&&("option"===i.tagName||"optgroup"===i.tagName)},p:function(e,t,n){let i=P(n,t);return i?"element"===i.type&&("address"===i.tagName||"article"===i.tagName||"aside"===i.tagName||"blockquote"===i.tagName||"details"===i.tagName||"div"===i.tagName||"dl"===i.tagName||"fieldset"===i.tagName||"figcaption"===i.tagName||"figure"===i.tagName||"footer"===i.tagName||"form"===i.tagName||"h1"===i.tagName||"h2"===i.tagName||"h3"===i.tagName||"h4"===i.tagName||"h5"===i.tagName||"h6"===i.tagName||"header"===i.tagName||"hgroup"===i.tagName||"hr"===i.tagName||"main"===i.tagName||"menu"===i.tagName||"nav"===i.tagName||"ol"===i.tagName||"p"===i.tagName||"pre"===i.tagName||"section"===i.tagName||"table"===i.tagName||"ul"===i.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName},rp:z,rt:z,tbody:function(e,t,n){let i=P(n,t);return!i||"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName)},td:G,tfoot:function(e,t,n){return!P(n,t)},th:G,thead:function(e,t,n){let i=P(n,t);return!!(i&&"element"===i.type&&("tbody"===i.tagName||"tfoot"===i.tagName))},tr:function(e,t,n){let i=P(n,t);return!i||"element"===i.type&&"tr"===i.tagName}});function B(e,t,n){let i=P(n,t,!0);return!i||"comment"!==i.type&&!("text"===i.type&&(0,I.whitespace)(i.value.charAt(0)))}function z(e,t,n){let i=P(n,t);return!i||"element"===i.type&&("rp"===i.tagName||"rt"===i.tagName)}function G(e,t,n){let i=P(n,t);return!i||"element"===i.type&&("td"===i.tagName||"th"===i.tagName)}let j=H({body:function(e){let t=P(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&(0,I.whitespace)(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,n){let i=F(n,t),r=P(e,-1,!0);return!(n&&i&&"element"===i.type&&"colgroup"===i.tagName&&U(i,n.children.indexOf(i),n))&&!!(r&&"element"===r.type&&"col"===r.tagName)},head:function(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type},html:function(e){let t=P(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let i=F(n,t),r=P(e,-1);return!(n&&i&&"element"===i.type&&("thead"===i.tagName||"tbody"===i.tagName)&&U(i,n.children.indexOf(i),n))&&!!(r&&"element"===r.type&&"tr"===r.tagName)}}),W={name:[["	\n\f\r &/=>".split(""),"	\n\f\r \"&'/=>
1`".split("")],["\0	\n\f\r \"&'/<=>".split(""),"\0	\n\f\r \"&'/<=>`".split("")]],unquoted:[["	\n\f\r &>".split(""),"\0	\n\f\r \"&'<=>`".split("")],["\0	\n\f\r \"&'<=>`".split(""),"\0	\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},V=["<","&"];function q(e,t,n,i){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:w(e.value,Object.assign({},i.settings.characterReferences,{subset:V}))}let X=(0,u.zwitch)("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,i){return i.settings.bogusComments?"<?"+w(e.value,Object.assign({},i.settings.characterReferences,{subset:L}))+">":"<!--"+e.value.replace(E,function(e){return w(e,Object.assign({},i.settings.characterReferences,{subset:_}))})+"-->"},doctype:function(e,t,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,i){let r,a=i.schema,o="svg"!==a.space&&i.settings.omitOptionalTags,s="svg"===a.space?i.settings.closeEmptyElements:i.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===a.space&&"svg"===e.tagName&&(i.schema=d.svg);let u=function(e,t){let n,i=[],r=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let r=function(e,t,n){let i,r=(0,R.find)(e.schema,t),a=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,o=+!e.settings.allowDangerousCharacters,s=e.quote;if(r.overloadedBoolean&&(n===r.attribute||""===n)?n=!0:(r.boolean||r.overloadedBoolean)&&("string"!=typeof n||n===r.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=w(r.attribute,Object.assign({},e.settings.characterReferences,{subset:W.name[a][o]}));return!0===n||(n=Array.isArray(n)?(r.commaSeparated?N.stringify:M.stringify)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(i=w(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:W.unquoted[a][o]}))),i!==n&&(e.settings.quoteSmart&&(0,T.ccount)(n,s)>(0,T.ccount)(n,e.alternative)&&(s=e.alternative),i=s+w(n,Object.assign({},e.settings.characterReferences,{subset:("'"===s?W.single:W.double)[a][o],attribute:!0}))+s),l+(i?"="+i:i))}(e,n,t[n]);r&&i.push(r)}}for(;++r<i.length;){let t=e.settings.tightAttributes?i[r].charAt(i[r].length-1):void 0;r!==i.length-1&&'"'!==t&&"'"!==t&&(i[r]+=" ")}return i.join("")}(i,e.properties),h=i.all("html"===a.space&&"template"===e.tagName?e.content:e);return i.schema=a,h&&(s=!1),!u&&o&&j(e,t,n)||(l.push("<",e.tagName,u?" "+u:""),s&&("svg"===a.space||i.settings.closeSelfClosing)&&(r=u.charAt(u.length-1),(!i.settings.tightSelfClosing||"/"===r||r&&'"'!==r&&"'"!==r)&&l.push(" "),l.push("/")),l.push(">")),l.push(h),s||o&&U(e,t,n)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,n,i){return i.settings.allowDangerousHtml?e.value:q(e,t,n,i)},root:function(e,t,n,i){return i.all(e)},text:q}}),K={},Q={},J=[];function Z(e,t){let n=t||K,i=n.quote||'"';if('"'!==i&&"'"!==i)throw Error("Invalid quote `"+i+"`, expected `'` or `\"`");return({one:Y,all:ee,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||l.htmlVoidElements,characterReferences:n.characterReferences||Q,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?d.svg:d.html,quote:i,alternative:'"'===i?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Y(e,t,n){return X(e,t,n,this)}function ee(e){let t=[],n=e&&e.children||J,i=-1;for(;++i<n.length;)t[i]=this.one(n[i],i,e);return t.join("")}e.s(["toHtml",0,Z],552831);var et=class{mode;options;hoveredLine;hoveredToken;pre;gutterUtilityLine;gutterUtilityContainer;gutterUtilityButton;gutterUtilitySlot;interactiveLinesAttr=!1;
1interactiveLineNumbersAttr=!1;hasPointerListeners=!1;hasDocumentPointerListeners=!1;selectedRange=null;selectedRangeHighlightSide;selectedRangeLineNumberOnly=!1;editorActiveLine=null;editorActiveLineSide;editorLineNumberOnly=!1;proposedSelectedRange;renderedSelectedLinesState;renderedEditorActiveLineState;selectionAnchor;pointerSession={mode:"idle"};constructor(e,t){this.mode=e,this.options=t}setOptions(e){this.options=e}cleanUp(){this.pre?.removeEventListener("click",this.handlePointerClick),this.pre?.removeEventListener("pointerdown",this.handlePointerDown),this.pre?.removeEventListener("pointermove",this.handlePointerMove),this.pre?.removeEventListener("pointerleave",this.handlePointerLeave),this.pre?.removeAttribute("data-interactive-lines"),this.pre?.removeAttribute("data-interactive-line-numbers"),this.pre=void 0,this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,this.clearHoveredLine(),this.clearHoveredToken(),this.detachDocumentPointerListeners(),this.clearPointerSession(),(0,n.dequeueRender)(this.renderSelection),this.interactiveLinesAttr=!1,this.interactiveLineNumbersAttr=!1,this.hasPointerListeners=!1,this.setSelectionDirty()}setup(e){this.setSelectionDirty();let{usesCustomGutterUtility:t=!1,enableGutterUtility:n=!1}=this.options;this.pre!==e&&(this.cleanUp(),this.pre=e),n?this.ensureGutterUtilityNode(t):null!=this.gutterUtilityContainer&&(this.gutterUtilityContainer.remove(),this.gutterUtilityLine=void 0,this.gutterUtilityContainer=void 0,this.gutterUtilityButton=void 0,this.gutterUtilitySlot=void 0,"gutterSelecting"===this.pointerSession.mode&&(this.clearPointerSession(),this.detachDocumentPointerListeners())),this.syncPointerListeners(e),this.updateInteractiveLineAttributes(),this.renderSelection(),this.placeUtility()}setSelectionDirty(){this.renderedSelectedLinesState=void 0,this.renderedEditorActiveLineState=void 0}isSelectionDirty(){return void 0===this.renderedSelectedLinesState||void 0===this.renderedEditorActiveLineState}setSelection(e,t){let n=!(e===this.selectedRange||i(e??void 0,this.selectedRange??void 0)),r=t?.lineNumberOnly??!1,a=t?.activeLineSide!==this.selectedRangeHighlightSide||r!==this.selectedRangeLineNumberOnly;(this.isSelectionDirty()||n||a)&&(this.proposedSelectedRange=void 0,this.selectedRange=e,this.selectedRangeHighlightSide=t?.activeLineSide,this.selectedRangeLineNumberOnly=r,this.renderSelection(),this.placeUtility(),n&&t?.notify!==!1&&this.notifySelectionCommitted(e))}setEditorActiveLine(e,{lineNumberOnly:t=!1,side:n}={}){let i=e!==this.editorActiveLine,r=n!==this.editorActiveLineSide||t!==this.editorLineNumberOnly;(this.isSelectionDirty()||i||r)&&(this.editorActiveLine=e,this.editorActiveLineSide=n,this.editorLineNumberOnly=t,this.renderSelection())}getSelection(){return this.selectedRange}getHoveredLine=()=>{let e=this.gutterUtilityLine??this.hoveredLine;if(null!=e){if("diff"===this.mode&&"diff-line"===e.type)return{lineNumber:e.lineNumber,side:e.annotationSide};if("file"===this.mode&&"line"===e.type)return{lineNumber:e.lineNumber}}};handlePointerClick=e=>{let{onHunkExpand:t,onLineClick:n,onLineNumberClick:i,onTokenClick:r,onMergeConflictActionClick:a}=this.options;null==t&&null==n&&null==i&&null==a&&null==r||null!=this.options.onGutterUtilityClick&&s(e.composedPath())||(eh(this.options.__debugPointerEvents,"click","FileDiff.DEBUG.handlePointerClick:",e),this.handlePointerEvent({eventType:"click",event:e}))};handlePointerMove=e=>{if("mouse"!==e.pointerType)return;let{lineHoverHighlight:t="disabled",onLineEnter:n,onLineLeave:i,onTokenEnter:r,onTokenLeave:a,enableGutterUtility:o=!1}=this.options;("disabled"!==t||o||null!=n||null!=i||null!=r||null!=a)&&(eh(this.options.__debugPointerEvents,"move","FileDiff.DEBUG.handlePointerMove:",e),this.handlePointerEvent({eventType:"move",event:e}))};handlePointerLeave=e=>{let{__debugPointerEvents:t}=this.options;(eh(t,"move","FileDiff.DEBUG.handlePointerLeave: no event"),null==this.hoveredLine&&null==this.hoveredToken)?eh(t,"move","FileDiff.DEBUG.handlePointerLeave: returned early, no hovered line or token"):(null!=this.hoveredToken&&(this.options.onTokenLeave?.(this.hoveredToken,e),this.clearHoveredToken()),null!=this.hoveredLine&&(this.options.onLineLeave?.({...this.hoveredLine,event:e}),this.clearHoveredLine()),this.placeUtility())};handlePointerEvent({eventType:e,event:t}){let{__debugPointerEvents:n}=this.options,i=t.composedPath();eh(n,e,"FileDiff.DEBUG.handlePointerEvent:",{eventType:e,composedPath:i});let r=this.resolvePointerTarget(i);eh(n,e,"FileDiff.DEBUG.handlePointerEvent: resolvePointerTarget result:",r);let{onLineClick:a,onLineNumberClick:o,onLineEnter:s,onLineLeave:l,onTokenClick:d,onTokenEnter:u,onTokenLeave:h,onHunkExpand:c,onMergeConflictActionClick:f}=this.options;switch(e){case"move":{let e=er(r)&&this.hoveredLine?.lineElement===r.lineElement;!(ei(r)&&this.hoveredToken?.tokenElement===r.tokenElement)&&(null!=this.hoveredToken&&(h?.(this.hoveredToken,t),this.clearHoveredToken()),ei(r)&&(this.setHoveredToken(this.toTokenEventBaseProps(r)),u?.(this.hoveredToken,t))),e||(null!=this.hoveredLine&&(l?.({...this.hoveredLine,event:t}),this.clearHoveredLine()),er(r)?(this.setHoveredLine(this.toEventBaseProps(r)),this.placeUtility(),s?.({...this.hoveredLine,event:t})):this.placeUtility());break}case"click":{var p,m;if(null==r)break;
1if("kind"in(p=r)&&"merge-conflict-action"===p.kind&&null!=f){f(r);break}if("type"in(m=r)&&"line-info"===m.type&&null!=c){c(r.hunkIndex,r.all||t.shiftKey?"both":r.direction,r.all||t.shiftKey?1/0:void 0);break}if(!er(r))break;ei(r)&&null!=d&&d(this.toTokenEventBaseProps(r),t);let e=this.toEventBaseProps(r);null!=o&&r.numberColumn?o({...e,event:t}):null!=a&&a({...e,event:t})}}}syncPointerListeners(e){let{__debugPointerEvents:t,lineHoverHighlight:n="disabled",onLineClick:i,onLineNumberClick:r,onLineEnter:a,onLineLeave:o,onTokenClick:s,onTokenEnter:l,onTokenLeave:d,onHunkExpand:u,onMergeConflictActionClick:h,enableGutterUtility:c=!1,enableLineSelection:f=!1,onGutterUtilityClick:p}=this.options,m=null!=p,g="disabled"!==n||null!=i||null!=r||null!=a||null!=o||null!=s||null!=l||null!=d||null!=u||null!=h||c||f||m;if(g&&!this.hasPointerListeners){let n;e.addEventListener("click",this.handlePointerClick),e.addEventListener("pointerdown",this.handlePointerDown),e.addEventListener("pointermove",this.handlePointerMove),e.addEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!0,eh(t,"click","FileDiff.DEBUG.attachEventListeners: Attaching click events for:",(n=[],("both"===t||"click"===t)&&(null!=i&&n.push("onLineClick"),null!=r&&n.push("onLineNumberClick"),null!=u&&n.push("expandable hunk separators"),null!=h&&n.push("merge conflict actions")),n)),eh(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer move event"),eh(t,"move","FileDiff.DEBUG.attachEventListeners: Attaching pointer leave event")}else!g&&this.hasPointerListeners&&(e.removeEventListener("click",this.handlePointerClick),e.removeEventListener("pointerdown",this.handlePointerDown),e.removeEventListener("pointermove",this.handlePointerMove),e.removeEventListener("pointerleave",this.handlePointerLeave),this.hasPointerListeners=!1);let b="selecting"===this.pointerSession.mode||"pendingSingleLineUnselect"===this.pointerSession.mode,v="gutterSelecting"===this.pointerSession.mode;(!f&&b||!m&&v)&&(this.clearPointerSession(),this.detachDocumentPointerListeners(),this.selectionAnchor=void 0,this.clearPendingSingleLineState())}updateInteractiveLineAttributes(){if(null==this.pre)return;let{onLineClick:e,onLineNumberClick:t,enableLineSelection:n=!1}=this.options,i=null!=e,r=null!=t||n;i&&!this.interactiveLinesAttr?(this.pre.setAttribute("data-interactive-lines",""),this.interactiveLinesAttr=!0):!i&&this.interactiveLinesAttr&&(this.pre.removeAttribute("data-interactive-lines"),this.interactiveLinesAttr=!1),r&&!this.interactiveLineNumbersAttr?(this.pre.setAttribute("data-interactive-line-numbers",""),this.interactiveLineNumbersAttr=!0):!r&&this.interactiveLineNumbersAttr&&(this.pre.removeAttribute("data-interactive-line-numbers"),this.interactiveLineNumbersAttr=!1)}handlePointerDown=e=>{if("mouse"===e.pointerType&&0!==e.button||null==this.pre||"idle"!==this.pointerSession.mode)return;let t=e.composedPath();s(t)&&null!=this.options.onGutterUtilityClick?this.startGutterSelectionFromPointerDown(e):("mouse"!==e.pointerType&&this.revealUtilityFromGutterPath(t),this.startLineSelectionFromPointerDown(e))};startLineSelectionFromPointerDown(e){let{enableLineSelection:t=!1}=this.options;if(!t)return;let n=this.resolveSelectionInfo(e,{source:"event-path",requireNumberColumn:!0});if(null==n)return;let{pre:i}=this;if(null==i)return;let{lineNumber:r,eventSide:a,lineIndex:o}=n;if(e.shiftKey&&null!=this.selectedRange){let t=this.getIndexesFromSelection(this.selectedRange,"split"===i.getAttribute("data-diff-type"));if(null==t)return;let n=t.start<=t.end?o>=t.start:o<=t.end;this.selectionAnchor={lineNumber:n?this.selectedRange.start:this.selectedRange.end,side:n?this.selectedRange.side:this.selectedRange.endSide??this.selectedRange.side},this.updateSelection(r,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners();return}if(this.selectedRange?.start===r&&this.selectedRange?.end===r){let t={lineNumber:r,side:a};this.selectionAnchor=t,this.pointerSession={mode:"pendingSingleLineUnselect",pointerId:e.pointerId,anchor:t,pending:t},this.attachDocumentPointerListeners();return}!0===this.options.controlledSelection?this.proposedSelectedRange=null:this.selectedRange=null,this.placeUtility(),this.selectionAnchor={lineNumber:r,side:a},this.updateSelection(r,a,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.pointerSession={mode:"selecting",pointerId:e.pointerId},this.attachDocumentPointerListeners()}startGutterSelectionFromPointerDown(e){let{onGutterUtilityClick:t}=this.options;if(null==t)return;let n=this.currentSelectionEnds(),i=n?.bottom??this.resolveSelectionPoint(e,{source:"event-path",excludeUtility:!1}),r=n?.top??i;null!=i&&null!=r&&(e.preventDefault(),e.stopPropagation(),this.pointerSession={mode:"gutterSelecting",pointerId:e.pointerId,anchor:r,current:i},this.selectionAnchor={lineNumber:r.lineNumber,side:r.side},this.updateSelection(i.lineNumber,i.side,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.attachDocumentPointerListeners())}handleDocumentPointerMove=e=>{switch(this.pointerSession.mode){case"idle":return;
1case"gutterSelecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionPoint(e,{source:"coordinates-first"});if(null==t)return;this.pointerSession.current=t,this.updateSelection(t.lineNumber,t.side);return}case"selecting":{if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let t=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(null==t||null==this.selectionAnchor)return;this.updateSelection(t.lineNumber,t.eventSide);return}case"pendingSingleLineUnselect":{var t;if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault();let n=this.resolveSelectionInfo(e,{source:"coordinates-first",requireNumberColumn:!1});if(null==n||null==this.selectionAnchor)return;let i={lineNumber:n.lineNumber,side:n.eventSide};if(t=this.pointerSession.pending,t.lineNumber===i.lineNumber&&t.side===i.side)return;this.updateSelection(n.lineNumber,n.eventSide,!1),this.notifySelectionStart(this.getCurrentSelectionRange()),this.notifySelectionChangeDelta(),this.pointerSession={mode:"selecting",pointerId:e.pointerId};return}}};handleDocumentPointerUp=e=>{let{onGutterUtilityClick:t}=this.options;switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":{let{pointerSession:n}=this;if(e.pointerId!==n.pointerId)return;e.preventDefault();let i=this.resolveSelectionPoint(e,{source:"coordinates-first"});null!=i&&(n.current=i,this.updateSelection(i.lineNumber,i.side));
1let r=this.buildSelectedLineRange(n.anchor,n.current);t?.({...r}),this.selectionAnchor=void 0,this.notifySelectionEnd(r),this.notifySelectionCommitted(r),this.clearProposedSelection(),this.clearPointerSession(),this.detachDocumentPointerListeners();return}case"pendingSingleLineUnselect":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.updateSelection(null,void 0,!1),this.selectionAnchor=void 0,this.clearPendingSingleLineState(),this.detachDocumentPointerListeners(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection();return;case"selecting":if(e.pointerId!==this.pointerSession.pointerId)return;e.preventDefault(),this.selectionAnchor=void 0,this.detachDocumentPointerListeners(),this.clearPointerSession(),this.notifySelectionEnd(this.getCurrentSelectionRange()),this.notifySelectionCommitted(this.getCurrentSelectionRange()),this.clearProposedSelection()}};handleDocumentPointerCancel=e=>{switch(this.pointerSession.mode){case"idle":return;case"gutterSelecting":case"selecting":case"pendingSingleLineUnselect":if("pointerId"in this.pointerSession&&e.pointerId!==this.pointerSession.pointerId)return;this.selectionAnchor=void 0,this.clearProposedSelection(),this.clearPendingSingleLineState(),this.clearPointerSession(),this.detachDocumentPointerListeners()}};clearHoveredLine(){null!=this.hoveredLine&&(this.hoveredLine.lineElement.removeAttribute("data-hovered"),this.hoveredLine.numberElement.removeAttribute("data-hovered"),this.hoveredLine=void 0)}setHoveredLine(e){let{lineHoverHighlight:t="disabled"}=this.options;null!=this.hoveredLine&&this.clearHoveredLine(),this.hoveredLine=e,"disabled"!==t&&(("both"===t||"line"===t)&&this.hoveredLine.lineElement.setAttribute("data-hovered",""),("both"===t||"number"===t)&&this.hoveredLine.numberElement.setAttribute("data-hovered",""))}clearHoveredToken(){null!=this.hoveredToken&&(this.hoveredToken=void 0)}setHoveredToken(e){null!=this.hoveredToken&&this.clearHoveredToken(),this.hoveredToken=e}ensureGutterUtilityNode(e){if(null==this.gutterUtilityContainer&&(this.gutterUtilityContainer=document.createElement("div"),this.gutterUtilityContainer.setAttribute("data-gutter-utility-slot","")),e)null!=this.gutterUtilityButton&&(this.gutterUtilityButton.remove(),this.gutterUtilityButton=void 0),null==this.gutterUtilitySlot&&(this.gutterUtilitySlot=document.createElement("slot"),this.gutterUtilitySlot.name="gutter-utility-slot"),this.gutterUtilitySlot.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilitySlot);else{if(this.gutterUtilitySlot?.remove(),this.gutterUtilitySlot=void 0,null==this.gutterUtilityButton){let e=document.createElement("div");e.innerHTML=Z(a({tagName:"button",properties:{"data-utility-button":"",type:"button"},children:[o({name:"diffs-icon-plus",properties:{"data-icon":""}})]}));let t=e.firstElementChild;if(!(t instanceof HTMLButtonElement))throw Error("InteractionManager.ensureGutterUtilityNode: Node element should be a button");t.remove(),this.gutterUtilityButton=t}this.gutterUtilityButton.parentNode!==this.gutterUtilityContainer&&this.gutterUtilityContainer.replaceChildren(this.gutterUtilityButton)}}revealUtilityFromGutterPath(e){if(this.placeUtilityFromSelection())return;let t=this.resolvePointerTarget(e);en(t)&&t.numberColumn&&this.showUtilityOnLine(this.toEventBaseProps(t))}
1placeUtility(){if(!this.placeUtilityFromSelection()){if(null!=this.hoveredLine)return void this.showUtilityOnLine(this.hoveredLine);this.hideUtility()}}placeUtilityFromSelection(){let e=this.currentSelectionEnds();if(null==e)return!1;let t=this.targetForSelectionPoint(e.bottom);return null==t?this.hideUtility():this.showUtilityOnLine(this.toEventBaseProps(t)),!0}showUtilityOnLine(e){null!=this.gutterUtilityContainer&&(this.gutterUtilityLine=e,e.numberElement.appendChild(this.gutterUtilityContainer))}hideUtility(){this.gutterUtilityContainer?.remove(),this.gutterUtilityLine=void 0}currentSelectionEnds(){let e=this.getCurrentSelectionRange();return null==e?void 0:this.selectionEnds(e)}selectionEnds(e){let t={lineNumber:e.start,side:e.side},n={lineNumber:e.end,side:e.endSide??e.side},i=this.selectionPointRowIndex(t),r=this.selectionPointRowIndex(n);if(null!=i&&null!=r)return i>r?{top:n,bottom:t}:{top:t,bottom:n}}selectionPointRowIndex(e){let t=this.getLineIndex(e.lineNumber,e.side);if(null!=t)return this.isSplitDiff()?t[1]:t[0]}targetForSelectionPoint(e){if(null==this.pre)return;let t=this.getLineIndex(e.lineNumber,e.side);if(null==t)return;let n="diff"===this.mode?`${t[0]},${t[1]}`:`${t[0]}`;for(let t of this.pre.querySelectorAll(`[data-column-number="${e.lineNumber}"][data-line-index="${n}"]`)){if(!(t instanceof HTMLElement))continue;let n=this.resolvePointerTarget(eo(t));if(en(n)&&("diff"!==this.mode||null==e.side||n.side===e.side))return n}}attachDocumentPointerListeners(){this.hasDocumentPointerListeners||(document.addEventListener("pointermove",this.handleDocumentPointerMove),document.addEventListener("pointerup",this.handleDocumentPointerUp),document.addEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!0)}detachDocumentPointerListeners(){this.hasDocumentPointerListeners&&(document.removeEventListener("pointermove",this.handleDocumentPointerMove),document.removeEventListener("pointerup",this.handleDocumentPointerUp),document.removeEventListener("pointercancel",this.handleDocumentPointerCancel),this.hasDocumentPointerListeners=!1)}clearPointerSession(){this.pointerSession={mode:"idle"}}clearPendingSingleLineState(){"pendingSingleLineUnselect"===this.pointerSession.mode&&(this.pointerSession={mode:"idle"})}selectionInfoFromPath(e,t){let n=this.resolvePointerTarget(e);if(en(n)&&(!t||n.numberColumn)&&null!=n.splitLineIndex)return{lineIndex:n.splitLineIndex,lineNumber:n.lineNumber,eventSide:"diff"===this.mode?n.side:void 0}}resolveSelectionInfo(e,t){let n=this.resolveSelectionPath(e,t);return null!=n?this.selectionInfoFromPath(n,t.requireNumberColumn):void 0}selectionPointFromPath(e){let t=this.resolvePointerTarget(e);if(en(t))return{lineNumber:t.lineNumber,side:"diff"===this.mode?t.side:void 0}}resolveSelectionPoint(e,t){let n=this.resolveSelectionPath(e,t);return null!=n?this.selectionPointFromPath(n):void 0}resolveSelectionPath(e,t){let n=!1!==t.excludeUtility;switch(t.source){case"event-path":return this.pathFromEventPath(e.composedPath(),n);case"coordinates-first":{let t=this.pathFromCoordinates(e,n);if(void 0!==t)return t??void 0;return this.pathFromEventPath(e.composedPath(),n)}}}pathFromCoordinates(e,t){let n=this.hitTest(e);if(void 0!==n)return null===n?null:this.pathFromElement(n,t)??null}pathFromEventPath(e,t){if(!(t&&s(e))){for(let n of e)if(n instanceof Element)return this.pathFromElement(n,t)}}pathFromElement(e,t){let n=eo(e);if(t&&s(n))return;let i=function(e){let t=e.closest("[data-line], [data-column-number]");if(t instanceof HTMLElement)return t;let n=e.closest('[data-line-annotation], [data-gutter-buffer="annotation"]');if(!(n instanceof HTMLElement))return;let i=n.previousElementSibling;return i instanceof HTMLElement&&(i.hasAttribute("data-line")||i.hasAttribute("data-column-number"))?i:void 0}(e);return null!=i?eo(i):this.pathFromAnnotationSlot(e)}pathFromAnnotationSlot(e){let t=function(e){if(null==e)return;let t=/^annotation-(?:(additions|deletions)-)?(\d+)$/.exec(e);if(null==t)return;let n=Number.parseInt(t[2],10);if(Number.isFinite(n)&&!(n<=0))return{lineNumber:n,side:t[1]}}(function(e){let t=e.closest('[slot^="annotation-"]');if(t instanceof HTMLElement)return t.getAttribute("slot")??void 0;if(e instanceof HTMLElement){let t=e.getAttribute("name")??void 0;return null!=t&&t.startsWith("annotation-")?t:void 0}}(e));if(null==t)return;let n=this.targetForSelectionPoint(t);return null!=n?eo(n.lineElement):void 0}
1hitTest(e){if(!Number.isFinite(e.clientX)||!Number.isFinite(e.clientY))return;let t=this.pre?.getRootNode(),n=es(t)?t:es(document)?document:void 0;if(null!=n)return n.elementFromPoint(e.clientX,e.clientY)}getLineIndex(e,t){let{getLineIndex:n}=this.options;return null!=n?n(e,t):[e-1,e-1]}getCurrentSelectionRange(){return void 0!==this.proposedSelectedRange?this.proposedSelectedRange:this.selectedRange}clearProposedSelection(){this.proposedSelectedRange=void 0}updateSelection(e,t,r=!0){let a,o=this.getCurrentSelectionRange();if(null==e)a=null;else{let n=this.selectionAnchor?.side??t,i=this.selectionAnchor?.lineNumber??e;a=this.buildSelectionRange(i,e,n,t)}!i(o??void 0,a??void 0)&&(this.selectedRangeHighlightSide=void 0,this.selectedRangeLineNumberOnly=!1,!0===this.options.controlledSelection?this.proposedSelectedRange=a:(this.selectedRange=a,(0,n.queueRender)(this.renderSelection)),this.placeUtility(),r&&this.notifySelectionChangeDelta())}getIndexesFromSelection(e,t){if(null==this.pre)return;let n=this.getLineIndex(e.start,e.side),i=this.getLineIndex(e.end,e.endSide??e.side);return null!=n&&null!=i?{start:t?n[1]:n[0],end:t?i[1]:i[0]}:void 0}getSelectionRenderState(){return{selectedLines:{range:this.selectedRange,highlightSide:this.selectedRangeHighlightSide,lineNumberOnly:this.selectedRangeLineNumberOnly},editorActiveLine:{range:null==this.editorActiveLine?null:{start:this.editorActiveLine,end:this.editorActiveLine,side:this.editorActiveLineSide},highlightSide:this.editorActiveLineSide,lineNumberOnly:this.editorLineNumberOnly}}}resolveLineRenderRange(e,t,n){if(null==e.range)return;let i=this.getIndexesFromSelection(e.range,t);if(null==i)throw console.error({rowRange:i,range:e.range}),Error(`InteractionManager.renderSelection: No valid ${n} rowRange`);return i}getLineRenderColumns(e,t,n,i){if(null==this.pre||null==t&&null==i)return[];let{children:r}=this.pre;if(r.length>2)throw console.error(r),Error("InteractionManager.renderSelection: Somehow there are more than 2 code elements...");let a=[];for(let o of r){let r=o.hasAttribute("data-deletions")?"deletions":o.hasAttribute("data-additions")?"additions":void 0,s=null!=e&&null!=t&&(null==e.highlightSide||null==r||e.highlightSide===r),l=null!=n&&null!=i&&(null==n.highlightSide||null==r||n.highlightSide===r);if(!s&&!l)continue;let[d,u]=o.children;if(!(d instanceof HTMLElement)||!(u instanceof HTMLElement))throw Error("InteractionManager.renderSelection: missing gutter or content element");if(u.children.length!==d.children.length)throw Error("InteractionManager.renderSelection: gutter and content children dont match, something is wrong");a.push({content:u,gutter:d,renderEditorActiveLine:l,renderSelectedLines:s})}return a}renderSelection=()=>{(0,n.dequeueRender)(this.renderSelection);let e=this.getSelectionRenderState();if(null==this.pre)return;let{editorActiveLine:t,selectedLines:i}=e,r=!el(this.renderedSelectedLinesState,i),a=!el(this.renderedEditorActiveLineState,t);if(!r&&!a)return;r&&(this.renderedSelectedLinesState=void 0),a&&(this.renderedEditorActiveLineState=void 0);let o="split"===this.pre.getAttribute("data-diff-type"),s=r?this.resolveLineRenderRange(i,o,"selected-lines"):void 0,l=a?this.resolveLineRenderRange(t,o,"editor-active-line"):void 0,d=this.getLineRenderColumns(r?i:void 0,s,a?t:void 0,l),u=null==i.range||d.some(e=>e.renderSelectedLines),h=null==t.range||d.some(e=>e.renderEditorActiveLine);if(r)for(let e of this.pre.querySelectorAll("[data-selected-line]"))e.removeAttribute("data-selected-line");if(a)for(let e of this.pre.querySelectorAll("[data-editor-active-line]"))e.removeAttribute("data-editor-active-line");let c=null==s?void 0:Math.min(s.start,s.end),f=null==s?void 0:Math.max(s.start,s.end),p=c===f,m=l?.start;for(let e of d){let{content:n,gutter:r,renderEditorActiveLine:a,renderSelectedLines:s}=e,l=Math.max(s?f??-1/0:-1/0,a?m??-1/0:-1/0),d=n.children.length;for(let e=0;e<d;e++){let d=n.children[e],u=r.children[e];if(!(d instanceof HTMLElement)||!(u instanceof HTMLElement))continue;let h=this.parseLineIndex(d,o);if((h??0)>l)break;if(null!=h){if(s&&null!=c&&null!=f&&h>=c&&h<=f){let e=p?"single":h===c?"first":h===f?"last":"";u.setAttribute("data-selected-line",e),!i.lineNumberOnly&&(d.setAttribute("data-selected-line",e),u.nextSibling instanceof HTMLElement&&d.nextSibling instanceof HTMLElement&&(d.nextSibling.hasAttribute("data-line-annotation")||d.nextSibling.hasAttribute("data-merge-conflict-actions"))&&(p?(e="last",d.setAttribute("data-selected-line","first")):h===c?e="":h===f&&d.setAttribute("data-selected-line",""),d.nextSibling.setAttribute("data-selected-line",e),u.nextSibling.setAttribute("data-selected-line",e)))}a&&h===m&&(u.setAttribute("data-editor-active-line",""),t.lineNumberOnly||d.setAttribute("data-editor-active-line",""))}}}r&&u&&(this.renderedSelectedLinesState=i),a&&h&&(this.renderedEditorActiveLineState=t)};notifySelectionCommitted(e){this.options.onLineSelected?.(e)}notifySelectionChangeDelta(){this.options.onLineSelectionChange?.(this.getCurrentSelectionRange()??null)}notifySelectionStart(e){this.options.onLineSelectionStart?.(e)}notifySelectionEnd(e){this.options.onLineSelectionEnd?.(e)}toEventBaseProps(e){return"file"===this.mode?{type:"line",lineElement:e.lineElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn,numberElement:e.numberElement}:{type:"diff-line",annotationSide:e.side,lineType:e.lineType,lineElement:e.lineElement,numberElement:e.numberElement,lineNumber:e.lineNumber,numberColumn:e.numberColumn}}toTokenEventBaseProps({lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:a}){return"file"===this.mode?{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,tokenElement:r,tokenText:a}:{type:"token",lineCharEnd:e,lineCharStart:t,lineNumber:n,side:i,tokenElement:r,tokenText:a}}buildSelectedLineRange(e,t){return this.buildSelectionRange(e.lineNumber,t.lineNumber,e.side,t.side)}buildSelectionRange(e,t,n,i){return{start:e,end:t,...null!=n?{side:n}:{},...n!==i&&null!=i?{endSide:i}:{}}}resolvePointerTarget(e){let t,n,i,r,a,o,s,l,d,u,h=!1;for(let f of e){if(!(f instanceof HTMLElement))continue;if(null==u&&f.hasAttribute("data-merge-conflict-action")){var c;let e=f.getAttribute("data-merge-conflict-action")??void 0,t=f.getAttribute("data-merge-conflict-conflict-index")??void 0,n=null!=t?Number.parseInt(t,10):NaN;("current"===(c=e)||"incoming"===c||"both"===c)&&Number.isFinite(n)&&(u={kind:"merge-conflict-action",resolution:e,conflictIndex:n})}if(null==o&&f.hasAttribute("data-char")){o=f;let e=f.getAttribute("data-char");if(null!=e){let t=Number.parseInt(e,10);if(!Number.isNaN(t)){let e=f.textContent??"",n=t+e.length;(""!==e.trim()||!0===this.options.enableTokenInteractionsOnWhitespace)&&(s={tokenElement:o,lineCharStart:t,lineCharEnd:n,tokenText:e});continue}}}let e=null==a?f.getAttribute("data-column-number")??void 0:void 0;if(null!=e){a=f,d=Number.parseInt(e,10),h=!0,t=eu(f),r=f.getAttribute("data-line-index")??void 0;continue}let p=null==i?f.getAttribute("data-line")??void 0:void 0;if(null!=p){i=f,d=Number.parseInt(p,10),t=eu(f),r=f.getAttribute("data-line-index")??void 0;continue}if(null==l&&(f.hasAttribute("data-expand-button")||f.hasAttribute("data-unmodified-lines"))){l={hunkIndex:void 0,direction:f.hasAttribute("data-expand-up")?"up":f.hasAttribute("data-expand-down")?"down":"both",all:f.hasAttribute("data-expand-all-button")};continue}let m=null!=l?f.getAttribute("data-expand-index")??void 0:void 0;if(null!=l&&null!=m){let e=Number.parseInt(m,10);Number.isNaN(e)||(l.hunkIndex=e);continue}if(null==n&&f.hasAttribute("data-code")){n=f;break}}if(null!=u)return u;if(l?.hunkIndex!=null)return{type:"line-info",hunkIndex:l.hunkIndex,direction:l.direction,all:l.all};if(i??=null!=r?ea(n,`[data-line][data-line-index="${r}"]`):void 0,a??=null!=r?ea(n,`[data-column-number][data-line-index="${r}"]`):void 0,null==n||null==i||null==a||null==t||null==d||Number.isNaN(d))return;let f=this.parseLineIndex(i,this.isSplitDiff());return null!=s?"file"===this.mode?{kind:"token",lineType:t,lineElement:i,lineNumber:d,numberColumn:h,numberElement:a,side:void 0,splitLineIndex:f,...s}:{kind:"token",lineType:t,lineElement:i,lineNumber:d,numberColumn:h,numberElement:a,side:ed(t,n),splitLineIndex:f,...s}:"file"===this.mode?{kind:"line",lineType:t,lineElement:i,lineNumber:d,numberColumn:h,numberElement:a,side:void 0,splitLineIndex:f}:{kind:"line",lineType:t,lineElement:i,lineNumber:d,numberColumn:h,numberElement:a,side:ed(t,n),splitLineIndex:f}}isSplitDiff(){return this.pre?.getAttribute("data-diff-type")==="split"}parseLineIndex(e,t){let n=(e.getAttribute("data-line-index")??"").split(",").map(e=>Number.parseInt(e,10)).filter(e=>!Number.isNaN(e));return t&&2===n.length?n[1]:t?void 0:n[0]}};function en(e){return null!=e&&"kind"in e&&"line"===e.kind}function ei(e){return null!=e&&"kind"in e&&"token"===e.kind}function er(e){return en(e)||ei(e)}function ea(e,t){let n=e?.querySelector(t);return n instanceof HTMLElement?n:void 0}function eo(e){let t=[],n=e;for(;null!=n;)t.push(n),n=n.parentNode;return t}function es(e){return null!=e&&"function"==typeof e.elementFromPoint}function el(e,t){var n,r;return e?.highlightSide===t.highlightSide&&e?.lineNumberOnly===t.lineNumberOnly&&((n=e?.range??null)===(r=t.range)||i(n??void 0,r??void 0))}function ed(e,t){switch(e){case"change-deletion":return"deletions";case"change-addition":return"additions";default:return t.hasAttribute("data-deletions")?"deletions":"additions"}}function eu(e){let t=e.getAttribute("data-line-type");if(null!=t)switch(t){case"change-deletion":case"change-addition":case"context":case"context-expanded":return t;default:return}}function eh(e="none",t,...n){switch(e){case"none":return;case"both":break;case"click":if("click"!==t)return;break;case"move":if("move"!==t)return}console.log(...n)}e.s(["InteractionManager",0,et,"pluckInteractionOptions",0,function({enableTokenInteractionsOnWhitespace:e,enableGutterUtility:t,lineHoverHighlight:n,onGutterUtilityClick:i,onLineClick:r,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:l,onTokenEnter:d,onTokenLeave:u,renderGutterUtility:h,__debugPointerEvents:c,enableLineSelection:f,controlledSelection:p,onLineSelected:m,onLineSelectionStart:g,onLineSelectionChange:b,onLineSelectionEnd:v},y,S,k){return{enableTokenInteractionsOnWhitespace:e,enableGutterUtility:function({enableGutterUtility:e,renderGutterUtility:t,onGutterUtilityClick:n}){if(null!=n&&null!=t)throw Error("Cannot use both 'onGutterUtilityClick' and 'renderGutterUtility'. Use only one gutter utility API.");return e??!1}({enableGutterUtility:t,renderGutterUtility:h,onGutterUtilityClick:i}),usesCustomGutterUtility:null!=h,lineHoverHighlight:n,onGutterUtilityClick:i,onHunkExpand:y,onMergeConflictActionClick:k,onLineClick:r,onLineEnter:a,onLineLeave:o,onLineNumberClick:s,onTokenClick:l,onTokenEnter:d,onTokenLeave:u,__debugPointerEvents:c,enableLineSelection:f,controlledSelection:p,onLineSelected:m,onLineSelectionStart:g,onLineSelectionChange:b,onLineSelectionEnd:v,getLineIndex:S}}],240918);var ec=class e{static resizeObserver;static managersByElement=new Map;static getResizeObserver(){let t=e.resizeObserver??new ResizeObserver(e.handleSharedResizeEntries);return e.resizeObserver=t,t}static handleSharedResizeEntries(t){let n=new Map;for(let i of t){let t=e.managersByElement.get(i.target);if(null==t)continue;let r=n.get(t);null==r?n.set(t,[i]):r.push(i)}for(let[e,t]of n)e.handleResizeEntries(t)}observedNodes=new Map;setup(e,{disableAnnotations:t,columnVariables:n="apply"}){var i,r,a,o;let s=new Set,l="apply"===n,d=0,u=new Map(this.observedNodes);for(let t of(this.observedNodes.clear(),e.children)){if(2===d)break;let e=(()=>
1{if(t instanceof HTMLElement&&"CODE"===t.tagName)return t})();if(null==e)continue;d++;let n=u.get(e);if(null!=n&&"code"!==n.type)throw Error("ResizeManager.setup: somehow a code node is being used for an annotation, should be impossible");let a=e.firstElementChild;a instanceof HTMLElement||(a=null),null!=n?(this.observedNodes.set(e,n),u.delete(e),n.numberElement!==a?(null!=n.numberElement&&(this.unobserve(n.numberElement),u.delete(n.numberElement)),null!=a&&(this.observe(a),u.delete(a),this.observedNodes.set(a,n)),n.numberElement=a,n.numberWidth=0):null!=n.numberElement?(u.delete(n.numberElement),this.observedNodes.set(n.numberElement,n)):n.numberWidth=0,i=n,r=l,i.applyColumnVariables!==r&&(i.applyColumnVariables=r,r?ef(i,{codeWidthChanged:!0,numberWidthChanged:!0}):ep(i))):(n={type:"code",codeElement:e,numberElement:a,codeWidth:"auto",numberWidth:0,applyColumnVariables:l},this.observedNodes.set(e,n),this.observe(e),null!=a&&(this.observedNodes.set(a,n),this.observe(a)))}if(d>1&&!t){let t=e.querySelectorAll('[data-line-annotation*=","]'),n=new Map;for(let e of t){if(!(e instanceof HTMLElement))continue;let t=e.getAttribute("data-line-annotation")??"";if(!/^-?\d+,-?\d+$/.test(t)){console.error("DiffFileRenderer.setupResizeObserver: Invalid element or annotation",{lineAnnotation:t,element:e});continue}let i=n.get(t);null==i&&(i=[],n.set(t,i)),i.push(e)}for(let[e,t]of n){if(2!==t.length){console.error("DiffFileRenderer.setupResizeObserver: Bad Pair",e,t);continue}let[n,i]=t,r=n.firstElementChild,a=i.firstElementChild;if(!(n instanceof HTMLElement)||!(i instanceof HTMLElement)||!(r instanceof HTMLElement)||!(a instanceof HTMLElement))continue;let o=u.get(r);if(null!=o){this.observedNodes.set(r,o),this.observedNodes.set(a,o),u.delete(r),u.delete(a);continue}let l=r.getBoundingClientRect().height,d=a.getBoundingClientRect().height;o={type:"annotations",column1:{container:n,child:r,childHeight:l},column2:{container:i,child:a,childHeight:d},currentHeight:"auto"},s.add({child1:r,child2:a,item:o,newHeight:Math.max(l,d)})}for(let e of s)this.applyNewHeight(e.item,e.newHeight),this.observedNodes.set(e.child1,e.item),this.observedNodes.set(e.child2,e.item),this.observe(e.child1),this.observe(e.child2);s.clear()}for(let[e,t]of u){this.unobserve(e),"code"===t.type?(a=t).codeElement.isConnected&&ep(a):((o=t).column1.container.isConnected&&o.column1.container.style.removeProperty("--diffs-annotation-min-height"),o.column2.container.isConnected&&o.column2.container.style.removeProperty("--diffs-annotation-min-height"))}u.clear()}cleanUp(){for(let e of this.observedNodes.keys())this.unobserve(e);this.observedNodes.clear()}observe(t){let{managersByElement:n}=e,i=n.get(t);if(i!==this){if(null!=i&&i!==this)throw Error("ResizeManager.observe: element is already owned by another ResizeManager");n.set(t,this),e.getResizeObserver().observe(t)}}unobserve(t){let{managersByElement:n,resizeObserver:i}=e,r=n.get(t);if(null!=r){if(r!==this)throw Error("ResizeManager.unobserve: element is owned by another ResizeManager");n.delete(t),i?.unobserve(t),null!=i&&0===n.size&&(i.disconnect(),e.resizeObserver=void 0)}}handleResizeEntries(e){let t=new Map,n=new Set;for(let i of e){let{target:e,borderBoxSize:r,contentBoxSize:a}=i;if(!(e instanceof HTMLElement)){console.error("ResizeManager.handleResizeEntries: Invalid element for ResizeObserver",i);continue}let o=this.observedNodes.get(e);if(null==o){console.error("ResizeManager.handleResizeEntries: Not a valid observed node",i);continue}if("annotations"===o.type){let t=e===o.column1.child?o.column1:e===o.column2.child?o.column2:void 0;if(null==t){console.error("ResizeManager.handleResizeEntries: Couldn't find a column for",{item:o,target:e});continue}t.childHeight=r[0].blockSize,n.add(o)}else if("code"===o.type){let n=t.get(o)??{},i=a[0].inlineSize;e===o.codeElement?n.codeInlineSize=i:e===o.numberElement&&(n.numberInlineSize=i),t.set(o,n)}}this.applyAnnotationUpdates(n),n.clear(),this.applyColumnUpdates(t),t.clear()}applyAnnotationUpdates(e){for(let t of e)this.applyNewHeight(t,Math.max(t.column1.childHeight,t.column2.childHeight))}applyColumnUpdates=e=>{for(let[t,n]of e){let e=null!=n.codeInlineSize?function(e){let t=Math.max(Math.floor(e),0);return 0===t?"auto":t}(n.codeInlineSize):t.codeWidth,i=null!=n.numberInlineSize?Math.max(Math.ceil(n.numberInlineSize),0):t.numberWidth,r=e!==t.codeWidth,a=i!==t.numberWidth;(r||a)&&(t.codeWidth=e,t.numberWidth=i,t.applyColumnVariables&&ef(t,{codeWidthChanged:r,numberWidthChanged:a}))}};applyNewHeight(e,t){t!==e.currentHeight&&(e.currentHeight=Math.max(t,0),e.column1.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`),e.column2.container.style.setProperty("--diffs-annotation-min-height",`${e.currentHeight}px`))}};function ef(e,{codeWidthChanged:t,numberWidthChanged:n}
1){let{codeElement:i,codeWidth:r,numberWidth:a}=e;if(t&&i.style.setProperty("--diffs-column-width",`${"number"==typeof r?`${r}px`:"auto"}`),n&&i.style.setProperty("--diffs-column-number-width",`${0===a?"auto":`${a}px`}`),t||n&&"auto"!==r){let e="number"==typeof r?Math.max(r-a,0):0;i.style.setProperty("--diffs-column-content-width",`${e>0?`${e}px`:"auto"}`)}}function ep(e){e.codeElement.style.removeProperty("--diffs-column-content-width"),e.codeElement.style.removeProperty("--diffs-column-number-width"),e.codeElement.style.removeProperty("--diffs-column-width")}e.s(["ResizeManager",0,ec],569566),e.s(["areRenderRangesEqual",0,function(e,t){return null==e||null==t?e===t:e.startingLine===t.startingLine&&e.totalLines===t.totalLines&&e.bufferBefore===t.bufferBefore&&e.bufferAfter===t.bufferAfter}],980566)},931288,e=>{"use strict";let t=new Set,n=null;function i(e){let r=new Set(t);for(let n of(t.clear(),r))try{n(e)}catch(e){console.error(e)}n=t.size>0?requestAnimationFrame(i):null}e.s(["dequeueRender",0,function(e){t.delete(e)&&0===t.size&&null!=n&&(cancelAnimationFrame(n),n=null)},"queueRender",0,function(e){t.add(e),n??=requestAnimationFrame(i)}])},896328,580149,e=>{"use strict";e.i(994940),e.i(718032),e.i(546907),e.i(82733),e.i(444855),e.i(642036),e.i(287384),e.i(663996);e.i(389569),e.i(164116),e.i(537750),e.i(364186),e.i(117998),e.i(771357),e.i(276269),e.i(695049);e.i(710703),e.i(713937);e.i(693445);e.i(820408);e.i(766762),Symbol("IGNORE_RESPONSE");var t=e.i(191788);e.i(391398);let n=(0,t.createContext)(void 0);e.s(["WorkerPoolContext",0,n],896328),e.i(931288);let i=(0,t.createContext)(void 0);e.s(["useVirtualizer",0,function(){return(0,t.useContext)(i)}],580149)},258304,e=>{"use strict";var t=e.i(994940),n=e.i(130256),i=e.i(116396),r=e.i(391398);e.s(["renderFileChildren",0,function({file:e,renderCustomHeader:a,renderHeaderPrefix:o,renderHeaderFilenameSuffix:s,renderHeaderMetadata:l,renderAnnotation:d,lineAnnotations:u,renderGutterUtility:h,getHoveredLine:c}){let f=a?.(e),p=o?.(e),m=s?.(e),g=l?.(e);return(0,r.jsxs)(r.Fragment,{children:[null!=f?(0,r.jsx)("div",{slot:t.CUSTOM_HEADER_SLOT_ID,children:f}):(0,r.jsxs)(r.Fragment,{children:[null!=p&&(0,r.jsx)("div",{slot:"header-prefix",children:p}),null!=m&&(0,r.jsx)("div",{slot:"header-filename-suffix",children:m}),null!=g&&(0,r.jsx)("div",{slot:"header-metadata",children:g})]}),null!=d&&u?.map((e,t)=>(0,r.jsx)("div",{slot:(0,n.getLineAnnotationName)(e),children:d(e)},t)),null!=h&&(0,r.jsx)("div",{slot:"gutter-utility-slot",style:i.GutterUtilitySlotStyles,children:h(c)})]})}])},891359,340300,718032,672165,e=>{"use strict";var t=e.i(391398);e.s(["templateRender",0,function(e,n){return"u"<typeof window&&null!=n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("template",{shadowrootmode:"open",dangerouslySetInnerHTML:{__html:n}}),e]}):(0,t.jsx)(t.Fragment,{children:e})}],891359);var n=e.i(994940);function i(e,t,n){if(e===t||null==e||null==t)return e===t;let i=new Set(n),r=Object.keys(e),a=new Set(Object.keys(t));for(let n of r)if(a.delete(n),!i.has(n)&&(!(n in t)||e[n]!==t[n]))return!1;for(let e of Array.from(a))if(!i.has(e))return!1;return!0}function r(e,t){return null==e||null==t||"string"==typeof e||"string"==typeof t?e===t:e.dark===t.dar
1k&&e.light===t.light}function a(e){if(null!=e&&"parseDiffOptions"in e)return e.parseDiffOptions}e.s(["areObjectsEqual",0,i],340300),e.s(["areThemesEqual",0,r],718032),e.s(["areOptionsEqual",0,function(e,t){let o=e?.theme??n.DEFAULT_THEMES,s=t?.theme??n.DEFAULT_THEMES,l=a(e),d=a(t);return r(o,s)&&i(e,t,["theme","parseDiffOptions"])&&i(l,d)}],672165)},598038,563951,e=>{"use strict";var t=e.i(191788);function n(e){let n=(0,t.useRef)(e);return(0,t.useInsertionEffect)(()=>void(n.current=e)),(0,t.useCallback)((...e)=>n.current(...e),[])}e.s(["useStableCallback",0,n],598038);var i=e.i(391398);let r=(0,t.createContext)(void 0);e.s(["EditProvider",0,function({children:e,createEditor:t}){let a=n(t);return(0,i.jsx)(r.Provider,{value:a,children:e})},"useCreateEditor",0,function(){return(0,t.useContext)(r)}],563951)},576369,e=>{"use strict";var t=e.i(994940),n=e.i(546907),i=e.i(964526),r=e.i(509899),a=e.i(454949),o=e.i(444855),s=e.i(642036),l=e.i(533160),d=e.i(287384),u=e.i(624513),h=e.i(663996),c=e.i(980566),f=e.i(66117),p=e.i(704828),m=e.i(534571),g=e.i(790853),b=e.i(129362),v=e.i(389569),y=e.i(96516),S=e.i(130256),k=e.i(164116),C=e.i(537750),A=e.i(894640),x=e.i(552831);function w(e,t){return null==t.cacheKey?e.file===t&&e.sourceContents===t.contents:e.cacheKey===t.cacheKey}let E=-1;var L=class{options;
1onRenderUpdate;workerManager;__id=`file-renderer:${++E}`;highlighter;renderCache;computedLang="text";lineAnnotations={};lineCache;textDocumentCache=new WeakMap;constructor(e={theme:t.DEFAULT_THEMES},n,i){this.options=e,this.onRenderUpdate=n,this.workerManager=i,i?.isWorkingPool()!==!0&&(this.highlighter=(0,l.areThemesAttached)(e.theme??t.DEFAULT_THEMES)?(0,o.getHighlighterIfLoaded)():void 0)}setOptions(e){this.options=e}mergeOptions(e){this.options={...this.options,...e}}setLineAnnotations(e){for(let t of(this.lineAnnotations={},e)){let e=this.lineAnnotations[t.lineNumber]??[];this.lineAnnotations[t.lineNumber]=e,e.push(t)}}cleanUp(){this.recycle(),this.workerManager=void 0,this.onRenderUpdate=void 0}recycle(){this.clearRenderCache(),this.highlighter=void 0,this.workerManager?.cleanUpTasks(this),this.lineCache=void 0,this.textDocumentCache=new WeakMap}syncEditedContentsToFile(){let{renderCache:e,lineCache:t}=this;e?.isDirty===!0&&null!=t&&w(t,e.file)&&(e.file.contents=t.lines.join(""))}hasUnkeyedFileContentsChanged(e){let{lineCache:t}=this;return null==e.cacheKey&&null!=t&&t.file===e&&t.sourceContents!==e.contents}invalidateChangedUnkeyedFile(e){this.hasUnkeyedFileContentsChanged(e)&&(this.workerManager?.cleanUpTasks(this),this.clearRenderCache(),this.lineCache=void 0,this.textDocumentCache=new WeakMap)}clearRenderCache(){this.syncEditedContentsToFile();let e=this.renderCache;this.renderCache=void 0,null!=e&&!0===e.isDirty&&null!=e.file.cacheKey&&this.workerManager?.evictFileFromCache(e.file.cacheKey)}hydrate(e){var t;let{options:n}=this.getRenderOptions(e),i=(t=this.getOrCreateLineCache(e).length,t>this.getTokenizeMaxLength()),r=this.workerManager?.getFileResultCache(e);null==r||(0,h.areFileRenderOptionsEqual)(n,r.options)||(r=void 0),this.renderCache??={file:e,options:n,highlighted:!i&&!(0,k.isFilePlainText)(e),result:i?void 0:r?.result,renderRange:void 0},this.workerManager?.isWorkingPool()===!0?null!=this.renderCache.result||i||this.workerManager.highlightFileAST(this,e):null==this.highlighter&&(this.computedLang=e.lang??(0,v.getFiletypeFromFileName)(e.name),this.initializeHighlighter())}getRenderOptions(e){let i=(()=>{if(this.workerManager?.isWorkingPool()===!0)return this.workerManager.getFileRenderOptions();let{theme:e=t.DEFAULT_THEMES,tokenizeMaxLineLength:n=1e3}=this.options;return{theme:e,useTokenTransformer:(0,A.shouldUseTokenTransformer)(this.options),tokenizeMaxLineLength:n}})(),{renderCache:r}=this;return r?.result!=null&&(0,n.areFilesEqual)(e,r.file)&&(0,h.areFileRenderOptionsEqual)(i,r.options)?{options:i,forceHighlight:!1}:{options:i,forceHighlight:!0}}getOrCreateLineCache(e){this.invalidateChangedUnkeyedFile(e);let{lineCache:t}=this;return null!=t&&w(t,e)||(t={cacheKey:e.cacheKey,file:e,sourceContents:e.contents,lines:(0,f.linesFromFileContents)(e.contents)}),this.lineCache=t,t.lines}getLineCount(e){let t=this.getOrCreateLineCache(e);return this.textDocumentCache.get(e)?.lineCount??t.length}updateRenderCache(e,t){if(null==this.renderCache)return;let{file:n,result:i}=this.renderCache;if(null==i)return;let r=null!=this.lineCache&&w(this.lineCache,n)?this.lineCache:void 0;for(let[t,n]of e){if(null!=r&&t<r.lines.length){let e=n.map(e=>e[2]).join("");r.lines[t]=(0,u.applyLineTextWithNewline)(r.lines[t]??"",e)}i.code[t]={type:"element",tagName:"div",properties:{"data-line":t+1,"data-line-type":"context","data-line-index":t},children:n.map(([e,t,n])=>0===e&&""===t?""===n?{type:"element",tagName:"br",properties:{},children:[]}:{type:"text",value:n}:{type:"element",tagName:"span",properties:{"data-char":e,style:`color:${t};`},children:[{type:"text",value:n}]})}}i.baseThemeType=t,this.renderCache.isDirty=!0}applyDocumentChange(e){if(null==this.renderCache)return;let{file:t,result:n}=this.renderCache;if(null!=n){if(n.code.length!==e.lineCount){n.code.length=Math.min(n.code.length,e.lineCount);for(let t=n.code.length;t<e.lineCount;t++)n.code.push({type:"element",tagName:"div",properties:{"data-line":t+1,"data-line-type":"context","data-line-index":t},children:[{type:"element",tagName:"span",properties:{"data-char":0},children:[{type:"text",value:e.getLineText(t)}]}]});this.renderCache.isDirty=!0}this.lineCache={cacheKey:t.cacheKey,file:t,sourceContents:t.contents,lines:(0,f.linesFromFileContents)(e.getText())},this.textDocumentCache.set(t,e)}}renderFile(e=this.renderCache?.file,i=t.DEFAULT_RENDER_RANGE){var r;if(null==e)return;this.invalidateChangedUnkeyedFile(e),this.renderCache?.isDirty!==!0||(0,n.areFilesEqual)(e,this.renderCache.file)||(this.clearRenderCache(),this.lineCache=void 0,this.textDocumentCache=new WeakMap);let{options:o,forceHighlight:s}=this.getRenderOptions(e),d=this.getMatchingWorkerResultCache(e,o);null==d||this.hasHighlightedRenderCache(e,o)||(this.renderCache={file:e,highlighted:!0,renderRange:void 0,...d},s=!1),this.renderCache??={file:e,highlighted:!1,options:o,result:void 0,renderRange:void 0};let u=this.getOrCreateLineCache(e),h=e.contents.length>0,f=!h||(0,k.isFilePlainText)(e)||(r=u.length,r>this.getTokenizeMaxLength()),p=!(0,n.areFilesEqual)(e,this.renderCache.file),m=!(0,c.areRenderRangesEqual)(this.renderCache.renderRange,i);if(this.workerManager?.isWorkingPool()===!0)(f||null==this.renderCache.result||!this.renderCache.highlighted&&(p||m))&&(this.renderCache.file=e,this.renderCache.options=o,this.renderCache.highlighted=!1,(null==this.renderCache.result||p||m||s)&&(this.renderCache.result=this.workerManager.getPlainFileAST(e,i.startingLine,i.totalLines,u)),this.renderCache.renderRange=i),!f&&h&&(!this.renderCache.highlighted||s)&&this.workerManager.highlightFileAST(this,e);else{this.computedLang=e.lang??(0,v.getFiletypeFromFileName)(e.name);let t=null!=this.highlighter&&(0,l.areThemesAttached)(o.theme),n=null!=this.highlighter&&(0,a.areLanguagesAttached)(this.computedLang),i=!f&&n;if(null!=this.highlighter&&t&&(s||f||!this.renderCache.highlighted&&i||null==this.renderCache.result)){let{result:t,options:r}=this.renderFileWithHighlighter(e,this.highlighter,f||!n);this.renderCache={file:e,options:r,highlighted:i,result:t,renderRange:void 0}}t&&(f||n)||this.asyncHighlight(e).then(({result:t,options:n})=>{null!=this.renderCache&&(this.renderCache.highlighted=!1),this.onHighlightSuccess(e,t,n,!f)})}return null!=this.renderCache.result?this.processFileResult(this.renderCache.file,i,this.renderCache.result):void 0}async asyncRender(e,n=t.DEFAULT_RENDER_RANGE){let{result:i}=await this.asyncHighlight(e);return this.processFileResult(e,n,i)}async asyncHighlight(e){var t;let n=(t=this.getOrCreateLineCache(e).length,t>this.getTokenizeMaxLength());this.computedLang=n?"text":e.lang??(0,v.getFiletypeFromFileName)(e.name);let i=null!=this.highlighter&&(0,d.hasResolvedThemes)((0,s.getThemes)(this.options.theme)),r=n||null!=this.highlighter&&(0,a.areLanguagesAttached)(this.computedLang);return null!=this.highlighter&&i&&r||(this.highlighter=await this.initializeHighlighter()),this.renderFileWithHighlighter(e,this.highlighter,n)}renderFileWithHighlighter(e,t,n=!1){let{options:i}=this.getRenderOptions(e);return{result:(0,C.renderFileWithHighlighter)(e,t,i,{forcePlainText:n}),options:i}}
1processFileResult(e,t,{code:n,themeStyles:a,baseThemeType:o}){let s=this.getLineCount(e),{disableFileHeader:l=!1}=this.options,d=[],u=(0,r.createGutterWrapper)(),h=Math.min(t.startingLine+t.totalLines,s),c=0,f=(0,i.shouldRenderFileAnnotations)(t)?(0,i.getFileAnnotations)(this.lineAnnotations):void 0;null!=f&&(u.children.push((0,r.createGutterGap)("context","annotation",1)),d.push((0,p.createAnnotationElement)({type:"annotation",hunkIndex:-1,lineIndex:-1,annotations:f.map(e=>(0,S.getLineAnnotationName)(e))})),c++);for(let i=t.startingLine;i<h;i++){let t=i+1,a=n[i];if(null==a){let n="FileRenderer.processFileResult: Line doesnt exist";throw console.error(n,{name:e.name,lineIndex:i,lineNumber:t}),Error(n)}u.children.push((0,r.createGutterItem)("context",t,`${i}`)),d.push(a),c++;let o=this.lineAnnotations[t];null!=o&&(u.children.push((0,r.createGutterGap)("context","annotation",1)),d.push((0,p.createAnnotationElement)({type:"annotation",hunkIndex:0,lineIndex:t,annotations:o.map(e=>(0,S.getLineAnnotationName)(e))})),c++)}
1return u.properties.style=`grid-row: span ${c}`,{gutterAST:u.children??[],contentAST:d,preAST:this.createPreElement(s),headerAST:l?void 0:this.renderHeader(e),totalLines:s,rowCount:c,themeStyles:a,baseThemeType:o,bufferBefore:t.bufferBefore,bufferAfter:t.bufferAfter,css:""}}renderHeader(e){let{headerRenderMode:t="default",stickyHeader:n=!1}=this.options;return(0,g.createFileHeaderElement)({fileOrDiff:e,mode:t,stickyHeader:n})}renderFullHTML(e){return(0,x.toHtml)(this.renderFullAST(e))}renderFullAST(e,t=[]){return t.push((0,r.createHastElement)({tagName:"code",children:this.renderCodeAST(e),properties:{"data-code":""}})),{...e.preAST,children:t}}renderCodeAST(e){let t=(0,r.createGutterWrapper)();return t.children=e.gutterAST,t.properties.style=`grid-row: span ${e.rowCount}`,[t,(0,m.createContentColumn)(e.contentAST,e.rowCount)]}renderPartialHTML(e,t=!1){return t?(0,x.toHtml)((0,r.createHastElement)({tagName:"code",children:e,properties:{"data-code":""}})):(0,x.toHtml)(e)}async initializeHighlighter(){return this.highlighter=await (0,o.getSharedHighlighter)((0,y.getHighlighterOptions)(this.computedLang,this.options)),this.highlighter}onHighlightSuccess(e,t,i,r=!0){if(null==this.renderCache)return;let a=!(0,n.areFilesEqual)(e,this.renderCache.file)||!this.renderCache.highlighted||!(0,h.areFileRenderOptionsEqual)(i,this.renderCache.options);this.renderCache={file:e,options:i,highlighted:r,result:t,renderRange:void 0},a&&this.onRenderUpdate?.()}getMatchingWorkerResultCache(e,t){let n=this.workerManager?.getFileResultCache(e);if(null!=n&&(0,h.areFileRenderOptionsEqual)(t,n.options))return n}hasHighlightedRenderCache(e,t){let{renderCache:i}=this;return i?.result!=null&&i.highlighted&&(0,n.areFilesEqual)(e,i.file)&&(0,h.areFileRenderOptionsEqual)(t,i.options)}onHighlightError(e){console.error(e)}getTokenizeMaxLength(){return this.options.tokenizeMaxLength??1e5}createPreElement(e){let{disableLineNumbers:t=!1,overflow:n="scroll"}=this.options;return(0,b.createPreElement)({type:"file",diffIndicators:"none",disableBackground:!0,disableLineNumbers:t,overflow:n,split:!1,totalLines:e})}};e.s(["FileRenderer",0,L])},441344,e=>{"use strict";let t=`<svg data-icon-sprite aria-hidden="true" width="0" height="0">
2  <symbol id="diffs-icon-arrow-right-short" viewBox="0 0 16 16">
3    <path d="M8.47 4.22a.75.75 0 0 0 0 1.06l1.97 1.97H3.75a.75.75 0 0 0 0 1.5h6.69l-1.97 1.97a.75.75 0 1 0 1.06 1.06l3.25-3.25a.75.75 0 0 0 0-1.06L9.53 4.22a.75.75 0 0 0-1.06 0"/>
4  </symbol>
5  <symbol id="diffs-icon-brand-github" viewBox="0 0 16 16">
6    <path d="M8 0c4.42 0 8 3.58 8 8a8.01 8.01 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27s-1.36.09-2 .27c-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8"/>
7  </symbol>
8  <symbol id="diffs-icon-chevron" viewBox="0 0 16 16">
9    <path d="M1.47 4.47a.75.75 0 0 1 1.06 0L8 9.94l5.47-5.47a.75.75 0 1 1 1.06 1.06l-6 6a.75.75 0 0 1-1.06 0l-6-6a.75.75 0 0 1 0-1.06"/>
10  </symbol>
11  <symbol id="diffs-icon-chevrons-narrow" viewBox="0 0 10 16">
12    <path d="M4.47 2.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1-1.06 1.06L5 3.81 2.28 6.53a.75.75 0 0 1-1.06-1.06zM1.22 9.47a.75.75 0 0 1 1.06 0L5 12.19l2.72-2.72a.75.75 0 0 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 0 1 0-1.06"/>
13  </symbol>
14  <symbol id="diffs-icon-diff-split" viewBox="0 0 16 16">
15    <path d="M14 0H8.5v16H14a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2m-1.5 6.5v1h1a.5.5 0 0 1 0 1h-1v1a.5.5 0 0 1-1 0v-1h-1a.5.5 0 0 1 0-1h1v-1a.5.5 0 0 1 1 0"/><path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h5.5V0zm.5 7.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1" opacity=".3"/>
16  </symbol>
17  <symbol id="diffs-icon-diff-unified" viewBox="0 0 16 16">
18    <path fill-rule="evenodd" d="M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V8.5h16zm-8-4a.5.5 0 0 0-.5.5v1h-1a.5.5 0 0 0 0 1h1v1a.5.5 0 0 0 1 0v-1h1a.5.5 0 0 0 0-1h-1v-1A.5.5 0 0 0 8 10" clip-rule="evenodd"/><path fill-rule="evenodd" d="M14 0a2 2 0 0 1 2 2v5.5H0V2a2 2 0 0 1 2-2zM6.5 3.5a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1z" clip-rule="evenodd" opacity=".4"/>
19  </symbol>
20  <symbol id="diffs-icon-expand" viewBox="0 0 16 16">
21    <path d="M3.47 5.47a.75.75 0 0 1 1.06 0L8 8.94l3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06"/>
22  </symbol>
23  <symbol id="diffs-icon-expand-all" viewBox="0 0 16 16">
24    <path d="M11.47 9.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06L8 12.94zM7.526 1.418a.75.75 0 0 1 1.004.052l4 4a.75.75 0 1 1-1.06 1.06L8 3.06 4.53 6.53a.75.75 0 1 1-1.06-1.06l4-4z"/>
25  </symbol>
26  <symbol id="diffs-icon-file-code" viewBox="0 0 16 16">
27    <path d="M10.75 0c.199 0 .39.08.53.22l3.5 3.5c.14.14.22.331.22.53v9A2.75 2.75 0 0 1 12.25 16h-8.5A2.75 2.75 0 0 1 1 13.25V2.75A2.75 2.75 0 0 1 3.75 0zm-7 1.5c-.69 0-1.25.56-1.25 1.25v10.5c0 .69.56 1.25 1.25 1.25h8.5c.69 0 1.25-.56 1.25-1.25V5h-1.25A2.25 2.25 0 0 1 10 2.75V1.5z"/><path d="M7.248 6.19a.75.75 0 0 1 .063 1.058L5.753 9l1.558 1.752a.75.75 0 0 1-1.122.996l-2-2.25a.75.75 0 0 1 0-.996l2-2.25a.75.75 0 0 1 1.06-.063M8.69 7.248a.75.75 0 1 1 1.12-.996l2 2.25a.75.75 0 0 1 0 .996l-2 2.25a.75.75 0 1 1-1.12-.996L10.245 9z"/>
28  </symbol>
29  <symbol id="diffs-icon-plus" viewBox="0 0 16 16">
30    <path d="M8 3a.75.75 0 0 1 .75.75v3.5h3.5a.75.75 0 0 1 0 1.5h-3.5v3.5a.75.75 0 0 1-1.5 0v-3.5h-3.5a.75.75 0 0 1 0-1.5h3.5v-3.5A.75.75 0 0 1 8 3"/>
31  </symbol>
32  <symbol id="diffs-icon-symbol-added" viewBox="0 0 16 16">
33    <path d="M8 4a.75.75 0 0 1 .75.75v2.5h2.5a.75.75 0 0 1 0 1.5h-2.5v2.5a.75.75 0 0 1-1.5 0v-2.5h-2.5a.75.75 0 0 1 0-1.5h2.5v-2.5A.75.75 0 0 1 8 4"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
34  </symbol>
35  <symbol id="diffs-icon-symbol-deleted" viewBox="0 0 16 16">
36    <path d="M4 8a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5A.75.75 0 0 1 4 8"/><path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/>
37  </symbol>
38  <symbol id="diffs-icon-symbol-diffstat" viewBox="0 0 16 16">
39    <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.75 4.296a.75.75 0 0 0-1.5 0V6.25h-2a.75.75 0 0 0 0 1.5h2v1.5h1.5v-1.5h2a.75.75 0 0 0 0-1.5h-2zM5.25 10a.75.75 0 0 0 0 1.5h5.5a.75.75 0 0 0 0-1.5z"/>
40  </symbol>
41  <symbol id="diffs-icon-symbol-ignored" viewBox="0 0 16 16">
42    <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m11.53-2.47a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06z"/>
43  </symbol>
44  <symbol id="diffs-icon-symbol-modified" viewBox="0 0 16 16">
45    <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706s.826.607 1.706.802c.898.2 2.091.288 3.704.288s2.806-.088 3.704-.288c.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5s-2.806.088-3.704.288c-.88.196-1.381.478-1.706.802s-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8M0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m8 3a3 3 0 1 0 0-6 3 3 0 0 0 0 6"/>
46  </symbol>
47  <symbol id="diffs-icon-symbol-moved" viewBox="0 0 16 16">
48    <path d="M1.788 4.296c.196-.88.478-1.381.802-1.706s.826-.606 1.706-.802C5.194 1.588 6.387 1.5 8 1.5s2.806.088 3.704.288c.88.196 1.381.478 1.706.802s.607.826.802 1.706c.2.898.288 2.091.288 3.704s-.088 2.806-.288 3.704c-.195.88-.478 1.381-.802 1.706s-.826.607-1.706.802c-.898.2-2.091.288-3.704.288s-2.806-.088-3.704-.288c-.88-.195-1.381-.478-1.706-.802s-.606-.826-.802-1.706C1.588 10.806 1.5 9.613 1.5 8s.088-2.806.288-3.704M8 0C1.412 0 0 1.412 0 8s1.412 8 8 8 8-1.412 8-8-1.412-8-8-8"/><path d="M8.495 4.695a.75.75 0 0 0-.05 1.06L10.486 8l-2.041 2.246a.75.75 0 0 0 1.11 1.008l2.5-2.75a.75.75 0 0 0 0-1.008l-2.5-2.75a.75.75 0 0 0-1.06-.051m-4 0a.75.75 0 0 0-.05 1.06l2.044 2.248-1.796 1.995a.75.75 0 0 0 1.114 1.004l2.25-2.5a.75.75 0 0 0-.002-1.007l-2.5-2.75a.75.75 0 0 0-1.06-.05"/>
49  </symbol>
50  <symbol id="diffs-icon-symbol-ref" viewBox="0 0 16 16">
51    <path d="M1.5 8c0 1.613.088 2.806.288 3.704.196.88.478 1.381.802 1.706.286.286.71.54 1.41.73V1.86c-.7.19-1.124.444-1.41.73-.324.325-.606.826-.802 1.706C1.588 5.194 1.5 6.387 1.5 8m4 6.397c.697.07 1.522.103 2.5.103 1.613 0 2.806-.088 3.704-.288.88-.195 1.381-.478 1.706-.802s.607-.826.802-1.706c.2-.898.288-2.091.288-3.704s-.088-2.806-.288-3.704c-.195-.88-.478-1.381-.802-1.706s-.826-.606-1.706-.802C10.806 1.588 9.613 1.5 8 1.5c-.978 0-1.803.033-2.5.103zM0 8c0-6.588 1.412-8 8-8s8 1.412 8 8-1.412 8-8 8-8-1.412-8-8m7-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z"/>
52  </symbol>
53</svg>`;e.s(["SVGSpriteSheet",0,t])},624513,e=>{"use strict";e.s(["applyLineTextWithNewline",0,function(e,t){return e.endsWith("\r\n")?t+"\r\n":e.endsWith("\r")?t+"\r":e.endsWith("\n")?t+"\n":t}])},364186,117998,e=>{"use strict";e.s(["areDiffTargetsEqual",0,function(e,t){return e===t||e?.cacheKey!=null&&e.cacheKey===t?.cacheKey}],364186);var t=e.i(718032);e.s(["areDiffRenderOptionsEqual",0,function(e,n){return(0,t.areThemesEqual)(e.theme,n.theme)&&e.useTokenTransformer===n.useTokenTransformer&&e.tokenizeMaxLineLength===n.tokenizeMaxLineLength&&e.lineDiffType===n.lineDiffType&&e.maxLineDiffLength===n.maxLineDiffLength}],117998)},663996,e=>{"use strict";var t=e.i(718032);e.s(["areFileRenderOptionsEqual",0,function(e,n){return(0,t.areThemesEqual)(e.theme,n.theme)&&e.useTokenTransformer===n.useTokenTransformer&&e.tokenizeMaxLineLength===n.tokenizeMaxLineLength}])},285479,e=>{"use strict";e.s(["areLineAnnotationsEqual",0,function(e,t){return e.lineNumber===t.lineNumber&&e.metadata===t.metadata}])},45215,828339,45806,815115,730981,953282,54233,e=>{"use strict";let t,n={};e.s(["arePrePropertiesEqual",0,function(e,t){return null==e||null==t?e===t:function(e=n,t=n){if(e===t)return!0;let i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(let n of i)if(e[n]!==t[n])return!1;return!0}(e.customProperties,t.customProperties)&&e.type===t.type&&e.diffIndicators===t.diffIndicators&&e.disableBackgroun
53d===t.disableBackground&&e.disableLineNumbers===t.disableLineNumbers&&e.overflow===t.overflow&&e.split===t.split&&e.totalLines===t.totalLines}],45215),e.s(["createAnnotationWrapperNode",0,function(e){let t=document.createElement("div");return t.dataset.annotationSlot="",t.slot=e,t.style.whiteSpace="normal",t}],828339),e.s(["createGutterUtilityContentNode",0,function(){let e=document.createElement("div");return e.slot="gutter-utility-slot",e.style.position="absolute",e.style.top="0",e.style.bottom="0",e.style.textAlign="center",e.style.whiteSpace="normal",e.style.touchAction="none",e}],45806);var i=e.i(994940);function r(e){return`${i.DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY}: ${null==e?"var(--diffs-scrollbar-gutter-fallback)":`${e}px`};`}e.s(["createUnsafeCSSStyleNode",0,function(){let e=document.createElement("style");return e.setAttribute(i.UNSAFE_CSS_ATTRIBUTE,""),e}],815115),e.s(["createMeasuredScrollbarGutterDeclaration",0,r,"getMeasuredScrollbarGutter",0,function(e){if(null!=t)return t;let n=e.host;if("u">typeof HTMLElement&&n instanceof HTMLElement&&!n.isConnected)return;let r=document.createElement("div");r.setAttribute("data-code",""),r.setAttribute(i.DIFFS_SCROLLBAR_MEASURE_ATTRIBUTE,"true");let a=document.createElement("div");return a.style.position="relative",a.style.width="200%",a.style.height="200%",r.appendChild(a),e.appendChild(r),t=Math.max(r.offsetHeight-r.clientHeight,0),r.remove(),t}],730981),e.s(["default",0,'@layer base {\n  :host {\n    --diffs-font-fallback: "SF Mono", Monaco, Consolas, "Ubuntu Mono", "Liberation Mono",\n      "Courier New", monospace;\n    --diffs-header-font-fallback: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",\n      "Noto Sans", "Liberation Sans", Arial, sans-serif;\n    --diffs-mixer: light-dark(#000, #fff);\n    --diffs-gap-fallback: 8px;\n    --diffs-scrollbar-gutter-fallback: 6px;\n    --diffs-scrollbar-gutter: var(--diffs-scrollbar-gutter-override, var(--diffs-scrollbar-gutter-measured, var(--diffs-scrollbar-gutter-fallback)));\n    --diffs-added-light: #0dbe4e;\n    --diffs-added-dark: #5ecc71;\n    --diffs-modified-light: #009fff;\n    --diffs-modified-dark: #69b1ff;\n    --diffs-deleted-light: #ff2e3f;\n    --diffs-deleted-dark: #ff6762;\n    --diffs-warning-light: #d5a910;\n    --diffs-warning-dark: #ffd452;\n    color-scheme: light dark;\n    font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));\n    font-size: var(--diffs-font-size, 13px);\n    line-height: var(--diffs-line-height, 20px);\n    font-feature-settings: var(--diffs-font-features);\n    --diffs-bg: light-dark(var(--diffs-light-bg, #fff), var(--diffs-dark-bg, #000));\n    --diffs-bg-buffer: var(--diffs-bg-buffer-override, light-dark(color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92%, var(--diffs-mixer))));\n    --diffs-bg-context: var(--diffs-bg-context-override, light-dark(color-mix(in lab, var(--diffs-bg) 98.5%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 92.5%, var(--diffs-mixer))));\n    --diffs-bg-context-gutter: var(--diffs-bg-context-gutter-override, light-dark(color-mix(in lab, var(--diffs-bg-context) 90%, var(--diffs-bg)), color-mix(in lab, var(--diffs-bg-context) 45%, var(--diffs-bg))));\n    --diffs-bg-separator: var(--diffs-bg-separator-override, light-dark(color-mix(in lab, var(--diffs-bg) 96%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-bg) 85%, var(--diffs-mixer))));\n    --diffs-fg: light-dark(var(--diffs-light, #000), var(--diffs-dark, #fff));\n    --diffs-fg-number: var(--diffs-fg-number-override, light-dark(color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg)), color-mix(in lab, var(--diffs-fg) 65%, var(--diffs-bg))));\n    --diffs-fg-conflict-marker: var(--diffs-fg-conflict-marker-override, var(--diffs-fg-number));\n    --diffs-deletion-base: var(--diffs-deletion-color-override, light-dark(var(--diffs-light-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-light))), var(--diffs-dark-deletion-color, var(--diffs-deletion-color, var(--diffs-deleted-dark)))));\n    --diffs-addition-base: var(--diffs-addition-color-override, light-dark(var(--diffs-light-addition-color, var(--diffs-addition-color, var(--diffs-added-light))), var(--diffs-dark-addition-color, var(--diffs-addition-color, var(--diffs-added-dark)))));\n    --diffs-modified-base: var(--diffs-modified-color-override, light-dark(var(--diffs-light-modified-color, var(--diffs-modified-color, var(--diffs-modified-light))), var(--diffs-dark-modified-color, var(--diffs-modified-color, var(--diffs-modified-dark)))));\n    --diffs-bg-deletion: var(--diffs-bg-deletion-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-deletion-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-deletion-base))));\n    --diffs-bg-deletion-emphasis: var(--diffs-bg-deletion-emphasis-override, light-dark(rgb(from var(--diffs-deletion-base) r g b / .15), rgb(from var(--diffs-deletion-base) r g b / .2)));\n    --diffs-bg-addition: var(--diffs-bg-addition-override, light-dark(color-mix(in lab, var(--diffs-bg) 88%, var(--diffs-addition-base)), color-mix(in lab, var(--diffs-bg) 80%, var(--diffs-addition-base))));\n    --diffs-bg-addition-emphasis: var(--diffs-bg-addition-emphasis-override, light-dark(rgb(from var(--diffs-addition-base) r g b / .15), rgb(from var(--diffs-addition-base) r g b / .2)));\n    --diffs-selection-base: var(--diffs-modified-base);\n    --diffs-selection-number-fg: light-dark(color-mix(in lab, var(--diffs-selection-base) 65%, var(--diffs-mixer)), color-mix(in lab, var(--diffs-selection-base) 75%, var(--diffs-mixer)));\n    background-color: var(--diffs-bg);\n    color: var(--diffs-fg);\n    display: block;\n  }\n\n  pre, code, [data-error-wrapper] {\n    isolation: isolate;\n    font-family: var(--diffs-font-family, var(--diffs-font-fallback));\n    outline: none;\n    margin: 0;\n    padding: 0;\n    display: block;\n  }\n\n  pre, code {\n    background-color: var(--diffs-bg);\n  }\n\n  code {\n    contain: content;\n  }\n\n  input, button {\n    font-family: inherit;\n    font-size: inherit;\n    line-height: inherit;\n  }\n\n  *, :before, :after {\n    box-sizing: border-box;\n  }\n\n  [data-icon-sprite] {\n    display: none;\n  }\n\n  [data-diffs-header], [data-separator] {\n    font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));\n  }\n\n  [data-diffs-header][data-sticky] {\n    z-index: 1;\n    background-color: var(--diffs-bg);\n    position: sticky;\n    top: 0;\n  }\n\n  [data-file-info] {\n    color: var(--fg);\n    background-color: color-mix(in lab, var(--bg) 98%, var(--fg));\n    border-block: 1px solid color-mix(in lab, var(--bg) 95%, var(--fg));\n    padding: 10px;\n    font-weight: 700;\n  }\n\n  [data-diff], [data-file] {\n    --diffs-grid-number-column-width: minmax(min-content, max-content);\n    --diffs-code-grid: var(--diffs-grid-number-column-width) 1fr;\n\n    &[data-dehydrated] {\n      --diffs-code-grid: var(--diffs-grid-number-column-width) minmax(0, 1fr);\n    }\n\n    &:hover [data-code]::-webkit-scrollbar-thumb {\n      background-color: var(--diffs-bg-context);\n    }\n  }\n\n  @supports (-webkit-touch-callout: none) {\n    :host {\n      --diffs-scrollbar-gutter-fallback: 0px;\n    }\n  }\n\n  [data-line] span {\n    color: light-dark(var(--diffs-token-light, var(--diffs-light)), var(--diffs-token-dark, var(--diffs-dark)));\n    background-color: light-dark(var(--diffs-token-light-bg, inherit), var(--diffs-token-dark-bg, inherit));
53\n    font-weight: light-dark(var(--diffs-token-light-font-weight, inherit), var(--diffs-token-dark-font-weight, inherit));\n    font-style: light-dark(var(--diffs-token-light-font-style, inherit), var(--diffs-token-dark-font-style, inherit));\n    text-decoration: light-dark(var(--diffs-token-light-text-decoration, inherit), var(--diffs-token-dark-text-decoration, inherit));\n  }\n\n  [data-line], [data-gutter-buffer], [data-column-number], [data-line-annotation], [data-no-newline], [data-merge-conflict], [data-merge-conflict-actions], [data-editor-overlay] {\n    --diffs-computed-decoration-bg: var(--diffs-bg);\n    --diffs-computed-diff-line-bg: var(--diffs-computed-decoration-bg);\n    --diffs-computed-selected-line-bg: var(--diffs-computed-diff-line-bg);\n    --diffs-computed-editor-active-line-bg: var(--diffs-computed-selected-line-bg);\n    --diffs-computed-hovered-line-bg: var(--diffs-computed-editor-active-line-bg);\n    --diffs-hover-mix-target: var(--diffs-bg-hover-override, var(--diffs-mixer));\n    --diffs-line-bg: var(--diffs-computed-hovered-line-bg);\n    color: var(--diffs-fg);\n    background-color: var(--diffs-line-bg, var(--diffs-bg));\n  }\n\n  [data-line], [data-no-newline] {\n    &[data-decoration-bg] {\n      --mix-deco-light: 92%;\n      --mix-deco-dark: 85%;\n\n      &[data-decoration-bg-depth="2"] {\n        --mix-deco-light: 88%;\n        --mix-deco-dark: 80%;\n      }\n\n      &[data-decoration-bg-depth="3"] {\n        --mix-deco-light: 85%;\n        --mix-deco-dark: 78%;\n      }\n\n      --diffs-hover-mix-target: var(--diffs-decoration-bg);\n      --diffs-computed-decoration-bg: light-dark(color-mix(in lab,\n          var(--diffs-bg) var(--mix-deco-light),\n          var(--diffs-decoration-bg)), color-mix(in lab,\n          var(--diffs-bg) var(--mix-deco-dark),\n          var(--diffs-decoration-bg)));\n    }\n  }\n\n  [data-line-annotation], [data-gutter-buffer="annotation"] {\n    --diffs-annotation-bg: var(--diffs-bg-context);\n    --diffs-computed-decoration-bg: var(--diffs-annotation-bg);\n    --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);\n  }\n\n  [data-merge-conflict-actions], [data-gutter-buffer="merge-conflict-action"], [data-gutter-buffer="merge-conflict-marker-base"], [data-gutter-buffer="merge-conflict-marker-separator"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"] {\n    --diffs-computed-decoration-bg: var(--diffs-bg-context);\n    --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);\n  }\n\n  [data-gutter-buffer="merge-conflict-marker-start"], [data-merge-conflict="marker-start"] {\n    --diffs-computed-decoration-bg: light-dark(color-mix(in lab,\n        var(--diffs-bg) 78%,\n        var(--conflict-bg-current-header-override, var(--diffs-addition-base))), color-mix(in lab,\n        var(--diffs-bg) 68%,\n        var(--conflict-bg-current-header-override, var(--diffs-addition-base))));\n    --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);\n  }\n\n  [data-gutter-buffer="merge-conflict-marker-end"], [data-merge-conflict="marker-end"] {\n    --diffs-computed-decoration-bg: light-dark(color-mix(in lab,\n        var(--diffs-bg) 78%,\n        var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))), color-mix(in lab,\n        var(--diffs-bg) 68%,\n        var(--conflict-bg-incoming-header-override, var(--diffs-modified-base))));\n    --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);\n  }\n\n  [data-has-merge-conflict] [data-line-annotation], [data-has-merge-conflict] [data-gutter-buffer="annotation"] {\n    --diffs-computed-decoration-bg: var(--diffs-bg);\n    --diffs-hover-mix-target: var(--diffs-computed-editor-active-line-bg);\n  }\n\n  :where([data-background]) {\n    & [data-gutter-buffer], & [data-column-number] {\n      --mix-light: 91%;\n      --mix-dark: 85%;\n    }\n\n    & [data-line], & [data-no-newline] {\n      --mix-light: 88%;\n      --mix-dark: 80%;\n    }\n\n    & [data-gutter-buffer], & [data-column-number], & [data-line], & [data-no-newline] {\n      --diffs-diff-line-mix-target: var(--diffs-bg);\n\n      &[data-line-type="change-deletion"] {\n        --diffs-diff-line-mix-target: var(--diffs-bg-deletion-override, var(--diffs-deletion-base));\n        --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);\n\n        &:where([data-gutter-buffer], [data-column-number]) {\
53n          color: var(--diffs-fg-number-deletion-override, var(--diffs-deletion-base));\n          --diffs-diff-line-mix-target: var(--diffs-bg-deletion-number-override, var(--diffs-deletion-base));\n        }\n\n        --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,\n            var(--diffs-computed-decoration-bg) var(--mix-light),\n            var(--diffs-diff-line-mix-target)), color-mix(in lab,\n            var(--diffs-computed-decoration-bg) var(--mix-dark),\n            var(--diffs-diff-line-mix-target)));\n      }\n\n      &[data-line-type="change-addition"] {\n        --diffs-diff-line-mix-target: var(--diffs-bg-addition-override, var(--diffs-addition-base));\n        --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);\n\n        &:where([data-gutter-buffer], [data-column-number]) {\n          color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));\n          --diffs-diff-line-mix-target: var(--diffs-bg-addition-number-override, var(--diffs-addition-base));\n        }\n\n        --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,\n            var(--diffs-computed-decoration-bg) var(--mix-light),\n            var(--diffs-diff-line-mix-target)), color-mix(in lab,\n            var(--diffs-computed-decoration-bg) var(--mix-dark),\n            var(--diffs-diff-line-mix-target)));\n      }\n\n      &[data-merge-conflict="current"] {\n        --diffs-diff-line-mix-target: var(--conflict-bg-current-override, var(--diffs-addition-base));\n        --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);\n\n        &:where([data-gutter-buffer], [data-column-number]) {\n          color: var(--diffs-fg-number-addition-override, var(--diffs-addition-base));\n          --diffs-diff-line-mix-target: var(--conflict-bg-current-number-override, var(--diffs-addition-base));\n        }\n\n        --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,\n            var(--diffs-computed-decoration-bg) var(--mix-light),\n            var(--diffs-diff-line-mix-target)), color-mix(in lab,\n            var(--diffs-computed-decoration-bg) var(--mix-dark),\n            var(--diffs-diff-line-mix-target)));\n      }\n\n      &[data-merge-conflict="incoming"] {\n        --diffs-diff-line-mix-target: var(--conflict-bg-incoming-override, var(--diffs-modified-base));\n        --diffs-hover-mix-target: var(--diffs-diff-line-mix-target);\n\n        &:where([data-gutter-buffer], [data-column-number]) {\n          color: var(--diffs-modified-base);\n          --diffs-diff-line-mix-target: var(--conflict-bg-incoming-number-override, var(--diffs-modified-base));\n        }\n\n        --diffs-computed-diff-line-bg: light-dark(color-mix(in lab,\n            var(--diffs-computed-decoration-bg) var(--mix-light),\n            var(--diffs-diff-line-mix-target)), color-mix(in lab,\n            var(--diffs-computed-decoration-bg) var(--mix-dark),\n            var(--diffs-diff-line-mix-target)));\n      }\n    }\n  }\n\n  [data-gutter-buffer], [data-column-number], [data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline], [data-editor-overlay] {\n    --diffs-selection-mix-target: var(--diffs-bg-selection-override, var(--diffs-selection-base));\n    --diffs-selection-emphasis-mix-target: var(--diffs-selection-mix-target);\n\n    &:where([data-editor-overlay]), &:where([data-line], [data-line-annotation], [data-merge-conflict], [data-merge-conflict-actions], [data-no-newline])[data-selected-line] {\n      --mix-selection-light: 82%;\n      --mix-selection-dark: 75%;\n      --diffs-hover-mix-target: var(--diffs-selection-mix-target);\n    }\n\n    &:where([data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line])) {\n      --mix-selection-light: 75%;\n      --mix-selection-dark: 60%;\n      --diffs-selection-mix-target: var(--diffs-bg-selection-number-override, var(--diffs-selection-base));\n      --diffs-hover-mix-target: var(--diffs-selection-mix-target);\n    }\n\n    &:where([data-line][data-selected-line]):is([data-line-type="change-addition"], [data-line-type="change-deletion"]) {\n      --diffs-selection-emphasis-mix-target: light-dark(color-mix(in lab,\n          var(--diffs-diff-line-mix-target, var(--diffs-selection-mix-target))\n            var(--mix-selection-light),\n          var(--diffs-selection-mix-target)), var(--diffs-selection-mix-target));\n    }\n\n    &:where([data-editor-overlay]), &[data-selected-line] {\n      --diffs-computed-selected-line-bg: light-dark(color-mix(in lab,\n          var(--diffs-computed-diff-line-bg) var(--mix-selection-light),\n          var(--diffs-selection-mix-target)), color-mix(in lab,\n          var(--diffs-computed-diff-line-bg) var(--mix-selection-dark),\n          var(--diffs-selection-mix-target)));\n    }\n  }\n\n  [data-line][data-editor-active-line], [data-column-number][data-editor-active-line] {\n    --diffs-computed-editor-active-line-bg: color-mix(in lab,\n      var(--diffs-computed-selected-line-bg)\n        var(--diffs-editor-active-line-source-mix, 100%),\n      var(--diffs-selection-emphasis-mix-target));\n  }\n\n  @media (pointer: fine) {\n    [data-line][data-hovered], [data-gutter-buffer][data-hovered], [data-column-number][data-hovered], [data-line-annotation][data-hovered], [data-no-newline][data-hovered], [data-merge-conflict][data-hovered], [data-merge-conflict-actions][data-hovered], [data-editor-overlay][data-hovered] {\n      --diffs-computed-hovered-line-bg: light-dark(color-mix(in lab,\n          var(--diffs-computed-editor-active-line-bg) 97%,\n          var(--diffs-hover-mix-target)), color-mix(in lab,\n          var(--diffs-computed-editor-active-line-bg) 91%,\n          var(--diffs-hover-mix-target)));\n    }\n  }\n\n  [data-gutter-buffer][data-selected-line], [data-column-number]:is([data-selected-line], [data-editor-active-line]) {\
53n    color: var(--diffs-selection-number-fg);\n  }\n\n  [data-no-newline] {\n    user-select: none;\n\n    & span {\n      opacity: .6;\n    }\n  }\n\n  [data-diff-type="split"][data-overflow="scroll"] {\n    grid-template-columns: 1fr 1fr;\n    display: grid;\n\n    & [data-additions] {\n      border-left: 1px solid var(--diffs-bg);\n    }\n\n    & [data-deletions] {\n      border-right: 1px solid var(--diffs-bg);\n    }\n  }\n\n  [data-code] {\n    grid-auto-flow: dense;\n    grid-template-columns: var(--diffs-code-grid);\n    overflow: var(--diffs-overflow-override, scroll) clip;\n    overscroll-behavior-x: none;\n    tab-size: var(--diffs-tab-size, 2);\n    padding-top: var(--diffs-gap-block, var(--diffs-gap-fallback));\n    padding-bottom: max(0px,\n      calc(var(--diffs-gap-block, var(--diffs-gap-fallback)) -\n          var(--diffs-scrollbar-gutter)));\n    scrollbar-gutter: stable;\n    align-self: flex-start;\n    display: grid;\n  }\n\n  [data-diffs-scrollbar-measure] {\n    opacity: 0;\n    pointer-events: none;\n    scrollbar-gutter: auto;\n    grid-template-columns: none;\n    width: 100px;\n    height: 100px;\n    padding: 0;\n    position: absolute;\n    top: -200px;\n    left: -200px;\n  }\n\n  [data-container-size] {\n    container-type: inline-size;\n  }\n\n  [data-code]::-webkit-scrollbar {\n    width: 0;\n    height: var(--diffs-scrollbar-gutter);\n  }\n\n  [data-code]::-webkit-scrollbar-track {\n    background: none;\n  }\n\n  [data-code]::-webkit-scrollbar-thumb {\n    background-color: #0000;\n    background-clip: content-box;\n    border: 1px solid #0000;\n    border-radius: 3px;\n  }\n\n  [data-code]::-webkit-scrollbar-corner {\n    background-color: #0000;\n  }\n\n  @supports ((-moz-appearance: none)) {\n    [data-code] {\n      scrollbar-width: thin;\n      scrollbar-color: var(--diffs-bg-context) transparent;\n      padding-bottom: var(--diffs-gap-block, var(--diffs-gap-fallback));\n    }\n  }\n\n  [data-diffs-header] ~ [data-diff], [data-diffs-header] ~ [data-file] {\n    & [data-code], &[data-overflow="wrap"], &[data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {\n      padding-top: 0;\n    }\n  }\n\n  [data-gutter] {\n    grid-template-rows: subgrid;\n    grid-template-columns: subgrid;\n    z-index: 3;\n    background-color: var(--diffs-bg);\n    grid-column: 1;\n    display: grid;\n    position: relative;\n\n    & [data-gutter-buffer], & [data-column-number] {\n      border-right: var(--diffs-gap-style, 2px solid var(--diffs-bg));\n    }\n  }\n\n  [data-content] {\n    grid-template-rows: subgrid;\n    grid-template-columns: subgrid;\n    background-color: var(--diffs-bg);\n    grid-column: 2;\n    min-width: 0;\n    display: grid;\n  }\n\n  [data-diff-type="split"][data-overflow="wrap"], [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] {\n    grid-auto-flow: dense;\n    grid-template-columns: repeat(2, var(--diffs-code-grid));\n    padding-block: var(--diffs-gap-block, var(--diffs-gap-fallback));\n    display: grid;\n\n    & [data-code] {\n      display: contents;\n    }\n\n    & [data-deletions] {\n      & [data-gutter] {\n        grid-column: 1;\n      }\n\n      & [data-content] {\n        border-right: 1px solid var(--diffs-bg);\n        grid-column: 2;\n      }\n    }\n\n    & [data-additions] {\n      & [data-gutter] {\n        border-left: 1px solid var(--diffs-bg);\n        grid-column: 3;\n      }\n\n      & [data-content] {\n        grid-column: 4;\n      }\n    }\n  }\n\n  [data-dehydrated][data-diff-type="split"][data-overflow="scroll"] [data-content] {\n    overflow: clip;\n  }\n\n  [data-overflow="scroll"] [data-gutter] {\n    position: sticky;\n    left: 0;\n  }\n\n  [data-interactive-lines] [data-line] {\n    cursor: pointer;\n  }\n\n  [data-interactive-line-numbers] [data-column-number] {\n    cursor: pointer;\n    touch-action: none;\n  }\n\n  [data-content-buffer], [data-gutter-buffer] {\n    user-select: none;\n    min-height: 1lh;\n    position: relative;\n  }\n\n  [data-gutter-buffer] {\n    padding-left: 2ch;\n    padding-right: 1ch;\n\n    &:before {\n      content: "";\n      min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));\n      display: block;\n    }\n  }\n\n  [data-gutter-buffer="annotation"] {\n    --diffs-annotation-bg: var(--diffs-bg-context-gutter);\n    min-height: 0;\n  }\n\n  [data-gutter-buffer="buffer"] {\n    --diffs-line-bg: var(--diffs-bg-context-gutter);\n  }\n\n  [data-content-buffer] {\n    background-position: 5px 0;\n    background-size: 8px 8px;\n    background-origin: border-box;\n    background-image: repeating-linear-gradient(-45deg,\n      transparent,\n      transparent calc(3px * 1.414),\n      var(--diffs-bg-buffer) calc(3px * 1.414),\n      var(--diffs-bg-buffer) calc(4px * 1.414));\n    grid-column: 1;\n  }\n\n  [data-separator] {\n    box-sizing: content-box;\n    background-color: var(--diffs-bg);\n  }\n\n  [data-separator="simple"] {\n    min-height: 4px;\n  }\n\n  [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"], [data-separator="simple"] {\n    background-color: var(--diffs-bg-separator);\n  }\n\n  [data-separator="line-info"], [data-separator="line-info-basic"], [data-separator="metadata"] {\n    height: 32px;\n    position: relative;\n  }\n\n  [data-separator-wrapper] {\n    user-select: none;\n    fill: currentColor;\n    background-color: var(--diffs-bg);
53\n    align-items: center;\n    height: 100%;\n    display: flex;\n    position: absolute;\n    inset-inline: 0;\n  }\n\n  [data-content] [data-separator-wrapper] {\n    display: none;\n  }\n\n  [data-separator="metadata"] [data-separator-wrapper] {\n    background-color: var(--diffs-bg-separator);\n    height: 100%;\n    color: var(--diffs-fg-number);\n    white-space: nowrap;\n    text-overflow: ellipsis;\n    min-width: min-content;\n    padding-inline: 1ch;\n    inset-inline: 100% auto;\n    overflow: hidden;\n  }\n\n  [data-separator="line-info"] {\n    margin-block: var(--diffs-gap-block, var(--diffs-gap-fallback));\n\n    & [data-separator-wrapper] {\n      min-width: 16px;\n    }\n  }\n\n  [data-separator="line-info-basic"], [data-separator="metadata"] {\n    margin-block: 0;\n  }\n\n  [data-separator="line-info"][data-separator-first] {\n    margin-top: 0;\n  }\n\n  [data-separator="line-info"][data-separator-last] {\n    margin-bottom: 0;\n  }\n\n  [data-expand-index] [data-separator-wrapper] {\n    grid-template-columns: 32px auto;\n    display: grid;\n  }\n\n  [data-expand-index] [data-separator-wrapper][data-separator-multi-button] {\n    grid-template-columns: 32px 32px auto;\n  }\n\n  [data-expand-button], [data-separator-content] {\n    background-color: var(--diffs-bg-separator);\n    flex: none;\n    align-items: center;\n    display: flex;\n  }\n\n  [data-expand-index] [data-separator-content]:hover {\n    cursor: pointer;\n    text-decoration: underline;\n  }\n\n  [data-expand-button] {\n    cursor: pointer;\n    min-width: 32px;\n    color: var(--diffs-fg-number);\n    border-right: 2px solid var(--diffs-bg);\n    flex-shrink: 0;\n    justify-content: center;
53\n    align-self: stretch;\n\n    &:hover {\n      color: var(--diffs-fg);\n    }\n\n    &[data-expand-all-button] {\n      display: none;\n    }\n  }\n\n  [data-expand-down] [data-icon] {\n    transform: scaleY(-1);\n  }\n\n  [data-separator-content] {\n    height: 100%;\n    color: var(--diffs-fg-number);\n    flex: auto;\n    justify-content: flex-start;\n    padding: 0 1ch;\n    overflow: hidden;\n  }\n\n  [data-separator="line-info"], [data-separator="line-info-basic"] {\n    & [data-separator-content] {\n      user-select: none;\n      height: 100%;\n      overflow: clip;\n    }\n  }\n\n  [data-unmodified-lines] {\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    flex: 0 auto;\n    min-width: 0;\n    display: block;\n    overflow: hidden;\n  }\n\n  @supports (width: 1cqi) {\n    [data-unified] {\n      & [data-separator="line-info"] [data-separator-wrapper] {\n        padding-inline: var(--diffs-gap-inline, var(--diffs-gap-fallback));\n        width: 100cqi;\n\n        & [data-separator-content] {\n          border-radius: 6px;\n        }\n      }\n\n      & [data-separator="line-info"][data-expand-index] [data-separator-wrapper] [data-separator-content] {\n        border-top-left-radius: unset;\n        border-bottom-left-radius: unset;\n      }\n    }\n\n    [data-gutter] {\n      & [data-separator="line-info"] [data-separator-wrapper] {\n        padding-left: var(--diffs-gap-inline, var(--diffs-gap-fallback));\n      }\n\n      & [data-separator="line-info"] [data-separator-content] {\n        border-top-left-radius: 6px;\n        border-bottom-left-radius: 6px;\n      }\n\n      & [data-separator="line-info"][data-expand-index] [data-separator-content] {\n        border-top-left-radius: unset;\n        border-bottom-left-radius: unset;\n      }\n    }\n\n    [data-additions] {\n      & [data-content] [data-separator="line-info"] {\n        background-color: var(--diffs-bg);\n\n        & [data-separator-wrapper] {\n          display: none;\n        }\n      }\n\n      & [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {\n        background-color: var(--diffs-bg-separator);\n        border-top-right-radius: 6px;\n        border-bottom-right-radius: 6px;\n        height: 100%;\n        display: block;\n\n        & [data-separator-content], & [data-expand-button] {\n          display: none;\n        }\n      }\n    }\n\n    [data-overflow="scroll"] [data-additions] [data-gutter] [data-separator="line-info"] [data-separator-wrapper] {\n      width: calc(100cqi - var(--diffs-gap-inline, var(--diffs-gap-fallback)));\n    }\n\n    [data-overflow="wrap"] [data-additions] [data-content] [data-separator="line-info"] [data-separator-wrapper] {\n      background-color: var(--diffs-bg-separator);\n      height: 100%;\n      margin-right: var(--diffs-gap-inline, var(--diffs-gap-fallback));\n      border-top-right-radius: 6px;\n      border-bottom-right-radius: 6px;\n      display: block;\n\n      & [data-separator-content], & [data-expand-button] {\n        display: none;\n      }\n    }\n\n    [data-separator="line-info"] [data-separator-wrapper] {\n      & [data-expand-both], & [data-expand-down], & [data-expand-up] {\n        border-top-left-radius: 6px;\n        border-bottom-left-radius: 6px;\n      }\n    }\n\n    @media (pointer: fine) {\n      [data-separator="line-info"] [data-separator-wrapper] {\n        &[data-separator-multi-button] {\n          & [data-expand-up] {\n            border-top-left-radius: 6px;\n            border-bottom-left-radius: unset;\n          }\n\n          & [data-expand-down] {\n            border-bottom-left-radius: 6px;\n            border-top-left-radius: unset;\n          }\n        }\n      }\n    }\n  }\n\n  @media (pointer: coarse) {\n    [data-separator="line-info-basic"] [data-separator-wrapper][data-separator-multi-button] {\n      grid-template-columns: 34px 34px auto;\n\n      & [data-separator-content] {\n        grid-column: unset;\n        grid-row: unset;\n      }\n    }\n\n    @supports (width: 1cqi) {\n      [data-separator="line-info"] [data-separator-wrapper] {\n        & [data-expand-both], & [data-expand-down], & [data-expand-up] {\n          border-top-left-radius: 6px;\n          border-bottom-left-radius: 6px;\n        }\n\n        &[data-separator-multi-button] {\n          & [data-expand-up] {\n            border-top-left-radius: 6px;\n            border-bottom-left-radius: 6px;\n          }\n\n          & [data-expand-down] {\n            border-bottom-left-radius: unset;\n            border-top-left-radius: unset;\n          }\n        }\n      }\n    }\n  }\n\n  @media (pointer: fine) {\n    [data-separator-wrapper][data-separator-multi-button] {\n      grid-template-rows: 50% 50%;\n      display: grid;\n\n      & [data-separator-content] {\n        grid-area: 1 / 2 / -1;\n        min-width: min-content;\n      }\n\n      & [data-expand-button] {\n        grid-column: 1;\n      }\n    }\n\n    [data-separator="line-info"] [data-separator-wrapper], [data-separator="line-info"] [data-separator-wrapper][data-separator-multi-button] {\n      grid-template-columns: 34px auto;\n    }\n\n    [data-separator="line-info-basic"][data-expand-index] [data-separator-wrapper] {\n      grid-template-columns: 100% auto;\n    }\n\n    [data-separator="line-info"], [data-separator="line-info-basic"] {\n      & [data-separator-multi-button] {\n        & [data-expand-up] {\n          border-bottom: 1px solid var(--diffs-bg);\n          border-right: 2px solid var(--diffs-bg);\n        }\n\n        & [data-expand-down] {\n          border-top: 1px solid var(--diffs-bg);\n          border-right: 2px solid var(--diffs-bg);\n        }\n      }\n    }\n  }\n\n  [data-additions] [data-gutter] [data-separator-wrapper], [data-additions] [data-separator="line-info-basic"] [data-separator-wrapper], [data-content] [data-separator-wrapper] {\n    display: none;\n  }\n\n  [data-line-annotation] {\n    min-height: var(--diffs-annotation-min-height, 0);\n    z-index: 2;\n  }\n\n  [data-merge-conflict-actions] {\n    z-index: 2;\n  }\n\n  [data-separator="custom"] {\n    grid-template-columns: subgrid;\n    display: grid;\n  }\n\n  [data-line], [data-column-number], [data-no-newline] {\n    padding-inline: 1ch;\n    position: relative;\n  }\n\n  [data-indicators="classic"] [data-line] {\n    padding-inline-start: 2ch;\n  }\n\n  [data-indicators="classic"] {\n    & [data-line-type="change-addition"], & [data-line-type="change-deletion"] {\n      &[data-no-newline], &[data-line] {\n        &:before {\n          user-select: none;\n          width: 1ch;\n          height: 1lh;\n          display: inline-block;\n          position: absolute;\n          top: 0;\n          left: 0;\n        }\n      }\n    }\n\n    & [data-line-type="change-addition"] {\n      &[data-line], &[data-no-newline] {\n        &:before {\n          content: "+";\n          color: var(--diffs-addition-base);\n        }\n      }\n    }\n\n    & [data-line-type="change-deletion"] {\n      &[data-line], &[data-no-newline] {\n        &:before {\n          content: "-";\n          color: var(--diffs-deletion-base);\n        }\n      }\n    }\n  }\n\n  [data-indicators="bars"] {\n    & [data-line-type="change-deletion"], & [data-line-type="change-addition"] {\n      &[data-column-number] {\n        &:before {\n          content: "";\n          user-select: none;\n          contain: strict;\n          width: 4px;\n          height: 100%;\n          display: block;\n          position: absolute;\n          top: 0;\n          left: 0;\n        }\n      }\n    }\n\n    & [data-line-type="change-deletion"] {\n      &[data-column-number] {\n        &:before {\n          background-image: linear-gradient(0deg,\n            var(--diffs-bg-deletion) 50%,\n            var(--diffs-deletion-base) 50%);\n          background-repeat: repeat;\n          background-size: 2px 2px;\n          background-size: calc(1lh / round(1lh / 2px))\n            calc(1lh / round(1lh / 2px));\n        }\n      }\n    }\n\n    & [data-line-type="change-addition"] {\n      &[data-column-number] {\n        &:before {\n          background-color: var(--diffs-addition-base);\n        }\n      }\n    }\n  }\n\n  [data-overflow="wrap"] {\n    & [data-line] {\n      white-space: pre-wrap;\n      word-break: break-word;\n    }\n\n    & [data-annotation-content] {\n      word-break: break-word;\n    }\n  }\n\n  [data-overflow="scroll"] [data-line] {\n    white-space: pre;\n    min-height: 1lh;\n  }\n\n  [data-column-number] {\n    box-sizing: content-box;\n    text-align: right;\n    user-select: none;\n    color: var(--diffs-fg-number);\n    padding-left: 2ch;\n  }\n\n  [data-line-number-content] {\n    min-width: var(--diffs-min-number-column-width, var(--diffs-min-number-column-width-default, 3ch));\n    z-index: 1;\n    display: inline-block;\n    position: relative;\n  }
53\n\n  [data-disable-line-numbers] {\n    & [data-gutter-buffer], & [data-column-number] {\n      min-width: 4px;\n      padding: 0;\n\n      &:before {\n        min-width: 0;\n      }\n    }\n\n    & [data-line-number-content] {\n      display: none;\n    }\n\n    & [data-gutter-utility-slot] {\n      right: unset;\n      justify-content: flex-start;\n      left: 0;\n    }\n\n    &[data-indicators="bars"] [data-gutter-utility-slot] {\n      left: 6px;\n    }\n  }\n\n  [data-file][data-disable-line-numbers] {\n    & [data-gutter-buffer], & [data-column-number] {\n      border-right: 0;\n      min-width: 0;\n    }\n  }\n\n  [data-diff-span] {\n    box-decoration-break: clone;\n    border-radius: 3px;\n  }\n\n  [data-line-type="change-addition"] [data-diff-span] {\n    background-color: var(--diffs-bg-addition-emphasis);\n  }\n\n  [data-line-type="change-deletion"] [data-diff-span] {\n    background-color: var(--diffs-bg-deletion-emphasis);\n  }\n\n  [data-merge-conflict="marker-start"], [data-merge-conflict="marker-base"], [data-merge-conflict="marker-separator"], [data-merge-conflict="marker-end"] {\n    color: var(--diffs-fg);\n    padding-left: 1ch;\n  }\n\n  [data-merge-conflict="marker-start"], [data-merge-conflict="marker-end"] {\n    align-items: center;\n    display: flex;\n\n    &:after {\n      color: var(--diffs-fg-conflict-marker);\n      font-size: .75rem;\n      font-style: normal;\n      line-height: 1.25rem;\n      font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));\n      padding-left: 1ch;\n    }\n  }\n\n  [data-merge-conflict="marker-start"]:after {\n    content: "(Current Change)";\n  }\n\n  [data-merge-conflict="marker-end"]:after {\n    content: "(Incoming Change)";\n  }\n\n  [data-merge-conflict-actions-content] {\n    min-height: 1.75rem;\n    font-family: var(--diffs-header-font-family, var(--diffs-header-font-fallback));\n    color: var(--diffs-fg);\n    align-items: center;\n    gap: .25rem;\n    padding-inline: .5rem;\n    font-size: .75rem;\n    line-height: 1.2;\n    display: flex;\n  }\n\n  [data-merge-conflict-action] {\n    appearance: none;\n    color: var(--diffs-fg-number);\n    font: inherit;\n    cursor: pointer;\n    background: none;\n    border: 0;\n    padding: 0;\n    font-style: normal;\n  }\n\n  [data-merge-conflict-action]:hover {\n    color: var(--diffs-fg);\n  }\n\n  [data-merge-conflict-action="current"]:hover {\n    color: var(--diffs-addition-base);\n  }\n\n  [data-merge-conflict-action="incoming"]:hover {\n    color: var(--diffs-modified-base);\n  }\n\n  [data-merge-conflict-action-separator] {\n    color: var(--diffs-fg-number);\n    opacity: .6;\n    user-select: none;\n  }\n\n  [data-diffs-header="default"] {\n    background-color: var(--diffs-bg);\n    justify-content: space-between;\n    align-items: center;\n    gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));\n    min-height: calc(1lh + (var(--diffs-gap-block, var(--diffs-gap-fallback)) * 3));\n    z-index: 2;\n    flex-direction: row;\n    padding-inline: 16px;\n    display: flex;\n    position: relative;\n    top: 0;\n  }\n\n  [data-header-content] {\n    align-items: center;\n    gap: var(--diffs-gap-inline, var(--diffs-gap-fallback));\n    white-space: nowrap;\n    flex-direction: row;\n    min-width: 0;\n    display: flex;\n  }\n\n  [data-header-content] [data-prev-name], [data-header-content] [data-title] {\n    text-overflow: ellipsis;\n    white-space: nowrap;\n    direction: rtl;\n    min-width: 0;\n    overflow: hidden;\n  }\n\n  [data-prev-name] {\n    opacity: .7;\n  }\n\n  [data-rename-icon] {\n    fill: currentColor;\n    flex-grow: 0;\n    flex-shrink: 0;\n  }\n\n  [data-diffs-header="default"] [data-metadata] {\n    white-space: nowrap;\n    align-items: center;\n    gap: 1ch;\n    display: flex;\n  }\n\n  [data-diffs-header="default"] [data-additions-count] {\n    font-family: var(--diffs-font-family, var(--diffs-font-fallback));\n    color: var(--diffs-addition-base);\n  }\n\n  [data-diffs-header="default"] [data-deletions-count] {\n    font-family: var(--diffs-font-family, var(--diffs-font-fallback));\n    color: var(--diffs-deletion-base);\n  }\n\n  [data-change-icon] {\n    fill: currentColor;\n    flex-shrink: 0;\n  }\n\n  [data-change-icon="change"], [data-change-icon="rename-pure"], [data-change-icon="rename-changed"] {\n    color: var(--diffs-modified-base);\n  }\n\n  [data-change-icon="new"] {\n    color: var(--diffs-addition-base);\n  }\n\n  [data-change-icon="deleted"] {\n    color: var(--diffs-deletion-base);\n  }\n\n  [data-change-icon="file"] {\n    opacity: .6;\n  }\n\n  [data-annotation-content] {\n    z-index: 2;\n    isolation: isolate;\n    white-space: normal;
53\n    align-self: flex-start;\n    min-width: 0;\n    display: flow-root;\n    position: relative;\n  }\n\n  [data-overflow="scroll"] [data-annotation-content], [data-overflow="scroll"] [data-merge-conflict-actions-content] {\n    width: var(--diffs-column-content-width, auto);\n    left: var(--diffs-column-number-width, 0);\n    position: sticky;\n  }\n\n  [data-annotation-slot] {\n    text-wrap-mode: wrap;\n    word-break: normal;\n    white-space-collapse: collapse;\n  }\n\n  [data-gutter-utility-slot] {\n    touch-action: none;\n    justify-content: flex-end;\n    display: flex;\n    position: absolute;\n    top: 0;\n    bottom: 0;\n    right: 0;\n  }\n\n  [data-utility-button] {\n    appearance: none;\n    cursor: pointer;\n    width: 1lh;\n    height: 1lh;\n    font-size: var(--diffs-font-size, 13px);\n    line-height: var(--diffs-line-height, 20px);\n    background-color: var(--diffs-modified-base);\n    color: var(--diffs-bg);\n    fill: currentColor;\n    z-index: 4;\n    touch-action: none;\n    border: none;\n    border-radius: 4px;\n    justify-content: center;
53\n    align-items: center;\n    margin-right: calc(-1lh + 1ch);\n    padding: 0;\n    display: flex;\n    position: relative;\n\n    &:before {\n      content: "";\n      display: block;\n      position: absolute;\n      inset: 0 0 0 -4px;\n    }\n  }\n\n  [data-decoration-bar-stack] {\n    pointer-events: none;\n    isolation: isolate;\n    z-index: 1;\n    background-color: var(--diffs-decoration-bar-color, transparent);\n    box-sizing: content-box;\n    border-left: 2px solid var(--diffs-bg);\n    border-right: 2px solid var(--diffs-bg);\n    width: 6px;\n    position: absolute;\n    top: 0;\n    bottom: 0;\n    right: -2px;\n\n    [data-decoration-bar-depth="1"] & {\n      background-color: color-mix(in lab,\n        var(--diffs-bg) 20%,\n        var(--diffs-decoration-bar-color, transparent));\n    }\n\n    [data-decoration-bar-depth="2"] & {\n      background-color: color-mix(in lab,\n        var(--diffs-bg) 45%,\n        var(--diffs-decoration-bar-color, transparent));\n    }\n\n    [data-decoration-bar-depth="3"] & {\n      background-color: color-mix(in lab,\n        var(--diffs-bg) 65%,\n        var(--diffs-decoration-bar-color, transparent));\n    }\n\n    [data-decoration-bar-start] & {\n      border-top-left-radius: 5px;\n      border-top-right-radius: 5px;\n    }\n\n    [data-decoration-bar-end] & {\n      z-index: 3;\n      border-bottom-right-radius: 5px;\n      border-bottom-left-radius: 5px;\n    }\n  }\n\n  [data-placeholder] {\n    contain: strict;\n  }\n\n  [data-error-wrapper] {\n    padding: var(--diffs-gap-block, var(--diffs-gap-fallback))\n      var(--diffs-gap-inline, var(--diffs-gap-fallback));\n    scrollbar-width: none;\n    max-height: 400px;\n    overflow: auto;\n\n    & [data-error-message] {\n      color: var(--diffs-deletion-base);\n      font-size: 18px;\n      font-weight: bold;\n    }\n\n    & [data-error-stack] {\n      color: var(--diffs-fg-number);\n    }\n  }\n}\n\n@layer theme, rendered, unsafe;\n'],953282);let a="@layer base, theme, rendered, unsafe;",o=RegExp(`${i.DIFFS_SCROLLBAR_GUTTER_MEASURED_PROPERTY.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*:\\s*[^;]+;`);e.s(["patchScrollbarGutterSize",0,function(e,t){let n=r(t);return e.replace(o,n)},"wrapThemeCSS",0,function(e,t="system",n){return`${a}
54@layer rendered {
55  :host {${"system"===t?"":`
56  color-scheme: ${t};`}
57  ${r(n)}
58  ${e}
59  }
60}`},"wrapUnsafeCSS",0,function(e){return`${a}
61@layer unsafe {
62  ${e}
63}`}],54233)},974329,e=>{"use strict";e.s(["cleanLastNewline",0,function(e){let t=e.length;return 10===e.charCodeAt(t-1)&&(t--,13===e.charCodeAt(t-1)&&t--),e.slice(0,t)}])},66117,e=>{"use strict";function t(e){let t=[0],n=e.indexOf("\r"),i=e.indexOf("\n"),r=0,a=0;for(;-1!==n||-1!==i;){let o;if(-1!==n&&(-1===i||n<i)?i===n+1?(o=i+1,n=e.indexOf("\r",o),i=e.indexOf("\n",o)):(o=n+1,n=e.indexOf("\r",o)):(o=i+1,i=e.indexOf("\n",o)),t.push(o),4==++a){if(o-r<=40){for(let n=o;n<e.length;n++){let i=e.charCodeAt(n);(10===i||13===i)&&(13===i&&n+1<e.length&&10===e.charCodeAt(n+1)&&n++,t.push(n+1))}return t}r=o,a=0}}return t}e.s(["computeLineOffsets",0,t,"countLineBreaks",0,function(e){let t=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);(10===i||13===i)&&(13===i&&n+1<e.length&&10===e.charCodeAt(n+1)&&n++,t++)}return t},"linesFromFileContents",0,function(e){let n=t(e);return Array.from({length:n.length},(t,i)=>{let r=n[i],a=n[i+1]??e.length;return e.slice(r,a)})}])},813329,e=>{"use strict";var t=e.i(994940);e.s(["computeVirtualFileMetrics",0,function(e){return{...t.DEFAULT_VIRTUAL_FILE_METRICS,...e}},"getDefaultHunkSeparatorHeight",0,function(e){switch(e){case"simple":return 4;case"metadata":case"line-info":case"line-info-basic":case"custom":return 32}},"getVirtualFileHeaderRegion",0,function(e,t){var n,i;let r=(n=e,i=t,n.paddingTop??(i?n.spacing:0));return t?r:e.diffHeaderHeight+r},"getVirtualFilePaddingBottom",0,function(e){return e.paddingBottom??e.spacing}])},704828,534571,790853,129362,96516,e=>{"use strict";var t=e.i(509899);e.s(["createAnnotationElement",0,function(e){return(0,t.createHastElement)({tagName:"div",children:[(0,t.createHastElement)({tagName:"div",children:e.annotations?.map(e=>(0,t.createHastElement)({tagName:"slot",properties:{name:e}})),properties:{"data-annotation-content":""}})],properties:{"data-line-annotation":`${e.hunkIndex},${e.lineIndex}`}})}],704828),e.s(["createContentColumn",0,function(e,n){return(0,t.createHastElement)({tagName:"div",children:e,properties:{"data-content":"",style:`grid-row: 
63span ${n}`}})}],534571);var n=e.i(994940);e.s(["createFileHeaderElement",0,function({fileOrDiff:e,mode:i,stickyHeader:r}){let a="type"in e?e:void 0,o={"data-diffs-header":i,"data-change-type":a?.type,"data-sticky":r?"":void 0};return(0,t.createHastElement)({tagName:"div",children:["custom"===i?(0,t.createHastElement)({tagName:"slot",properties:{name:n.CUSTOM_HEADER_SLOT_ID}}):function({name:e,prevName:i,iconType:r}){let a=[(0,t.createHastElement)({tagName:"slot",properties:{name:n.HEADER_PREFIX_SLOT_ID}}),(0,t.createIconElement)({name:function(e){switch(e){case"file":return"diffs-icon-file-code";case"change":return"diffs-icon-symbol-modified";case"new":return"diffs-icon-symbol-added";case"deleted":return"diffs-icon-symbol-deleted";case"rename-pure":case"rename-changed":return"diffs-icon-symbol-moved"}}(r),properties:{"data-change-icon":r}})];return null!=i&&(a.push((0,t.createHastElement)({tagName:"div",children:[(0,t.createHastElement)({tagName:"bdi",children:[(0,t.createTextNodeElement)(i)]})],properties:{"data-prev-name":""}})),a.push((0,t.createIconElement)({name:"diffs-icon-arrow-right-short",properties:{"data-rename-icon":""}}))),a.push((0,t.createHastElement)({tagName:"div",children:[(0,t.createHastElement)({tagName:"bdi",children:[(0,t.createTextNodeElement)(e)]})],properties:{"data-title":""}})),a.push((0,t.createHastElement)({tagName:"slot",properties:{name:n.HEADER_FILENAME_SUFFIX_SLOT_ID}})),(0,t.createHastElement)({tagName:"div",children:a,properties:{"data-header-content":""}})}({name:e.name,prevName:"prevName"in e?e.prevName:void 0,iconType:a?.type??"file"}),..."custom"===i?[]:[function(e){let i=[];if(null!=e){let n=0,r=0;for(let t of e.hunks)n+=t.additionLines,r+=t.deletionLines;(r>0||0===n)&&i.push((0,t.createHastElement)({tagName:"span",children:[(0,t.createTextNodeElement)(`-${r}`)],properties:{"data-deletions-count":""}})),(n>0||0===r)&&i.push((0,t.createHastElement)({tagName:"span",children:[(0,t.createTextNodeElement)(`+${n}`)],properties:{"data-additions-count":""}}))}return i.push((0,t.createHastElement)({tagName:"slot",properties:{name:n.HEADER_METADATA_SLOT_ID}})),(0,t.createHastElement)({tagName:"div",children:i,properties:{"data-metadata":""}})}(a)]],properties:o})}],790853),e.s(["createPreElement",0,function(e){return(0,t.createHastElement)({tagName:"pre",properties:function({diffIndicators:e,disableBackground:t,disableLineNumbers:n,overflow:i,split:r,totalLines:a,type:o,customProperties:s}){return{...s,"data-diff":"diff"===o?"":void 0,"data-file":"file"===o?"":void 0,"data-diff-type":"diff"===o?r?"split":"single":void 0,"data-overflow":i,"data-disable-line-numbers":n?"":void 0,"data-background":t?void 0:"","data-indicators":"bars"===e||"classic"===e?e:void 0,style:`--diffs-min-number-column-width-default:${`${a}`.length}ch;`}}(e)})}],129362);var i=e.i(642036);e.s(["getHighlighterOptions",0,function(e,{theme:t,preferredHighlighter:n="shiki-js"}){return{langs:[e??"text"],themes:(0,i.getThemes)(t),preferredHighlighter:n}}],96516)},646611,77142,653598,948366,791352,56523,e=>{"use strict";var t=e.i(509899);let n=Symbol("no-token"),i=Symbol("multiple-tokens");function r(e){if("element"===e.type)for(let t of(e.properties["data-char"]=void 0,e.children))r(t)}let a=function(e={}){let{classPrefix:t="__shiki_",classSuffix:n="",classReplacer:i=e=>e}=e,r=new Map;function a(e){return Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}function o(e){let o=t+function(e,t=0){let n=0xdeadbeef^t,i=0x41c6ce57^t;for(let t=0,r;t<e.length;t++)n=Math.imul(n^(r=e.charCodeAt(t)),0x9e3779b1),i=Math.imul(i^r,0x5f356495);return n=Math.imul(n^n>>>16,0x85ebca6b)^Math.imul(i^i>>>13,0xc2b2ae35),(0x100000000*(2097151&(i=Math.imul(i^i>>>16,0x85ebca6b)^Math.imul(n^n>>>13,0xc2b2ae35)))+(n>>>0)).toString(36).slice(0,6)}("string"==typeof e?e:a(e))+n;return o=i(o),r.has(o)||r.set(o,"string"==typeof e?e:{...e}),o}return{name:"@shikijs/transformers:style-to-class",pre(e){if(!e.properties.style)return;let t=o(e.properties.style);delete e.properties.style,this.addClassToHast(e,t)},tokens(e){for(let t of e)for(let e of t){if(!e.htmlStyle)continue;let t=o(e.htmlStyle);e.htmlStyle={},e.htmlAttrs||={},e.htmlAttrs.class?e.htmlAttrs.class+=` ${t}`:e.htmlAttrs.class=t}},getClassRegistry:()=>r,getCSS(){let e="";for(let[t,n]of r.entries())e+=`.${t}{${"string"==typeof n?n:a(n)}}`;return e},clearRegistry(){r.clear()}}}({classPrefix:"hl-"}),o={name:"token-style-normalizer",tokens(e){for(let t of e)for(let e of t){if(null!=e.htmlStyle)continue;let t={};null!=e.color&&(t.color=e.color),null!=e.bgColor&&(t["background-color"]=e.bgColor),null!=e.fontStyle&&0!==e.fontStyle&&((1&e.fontStyle)!=0&&(t["font-style"]="italic"),(2&e.fontStyle)!=0&&(t["font-weight"]="bold"),(4&e.fontStyle)!=0&&(t["text-decoration"]="underline")),Object.keys(t).length>0&&(e.htmlStyle=t)}}};function s(e){return`--${"token"===e?"diffs-token":"diffs"}-`}e.s(["createTransformerWithState",0,function(e=!1,s=!1){let l={lineInfo:[]},d=[{line:e=>(delete e.properties.class,e),pre(a){let o=(0,t.findCodeElement)(a),s=[];if(null!=o){let a=1;for(let d of o.children)"element"===d.type&&(e&&function e(a){let o,s=function(e){let t=e.properties["data-char"];if("number"==typeof t)return t}(a);if(null!=s)return s;let l=n,d=[],u=[],h=()=>
63{if(0===u.length||null==o){u=[],o=void 0;return}if(1===u.length){let t=u[0];if(t?.type==="element"){var e,n;for(let i of(e=t,n=o,e.properties["data-char"]=n,t.children))r(i)}else r(t);d.push(t),u=[],o=void 0;return}for(let e of u)r(e);d.push((0,t.createHastElement)({tagName:"span",properties:{"data-char":o},children:u})),u=[],o=void 0},c=e=>{if(e!==n){if(e===i){l=i;return}if(l===n){l=e;return}l!==e&&(l=i)}};for(let t of a.children){let i="element"===t.type?e(t):n;if(c(i),"number"!=typeof i){h(),d.push(t);continue}null!=o&&o!==i&&h(),o??=i,u.push(t)}return h(),a.children=d,l}(d),s.push(function(e,n,i){let r="function"==typeof i.lineInfo?i.lineInfo(n):i.lineInfo[n-1];if(null==r){let t=`processLine: line ${n}, contains no state.lineInfo`;throw console.error(t,{node:e,line:n,state:i}),Error(t)}return e.tagName="div",e.properties["data-line"]=r.lineNumber,e.properties["data-alt-line"]=r.altLineNumber,e.properties["data-line-type"]=r.type,e.properties["data-line-index"]=r.lineIndex,0===e.children.length&&e.children.push((0,t.createTextNodeElement)("\n")),e}(d,a,l)),a++);o.children=s}return a},...e?{tokens(e){for(let t of e){let e=0;for(let n of t)n.__lineChar??=e,e+=n.content.length}},preprocess(e,t){t.mergeWhitespaces="never"},span(e,t,n,i,r){if(r?.offset!=null&&null!=r.content){let t=r.__lineChar;null!=t&&(e.properties["data-char"]=t)}return e}}:null}];return s&&d.push(o,a),e&&d.push({line:e=>("element"===e.type&&0===e.children.length&&e.children.push({type:"element",tagName:"br",properties:{},children:[]}),e)}),{state:l,transformers:d,toClass:a}}],646611),e.s(["formatCSSVariablePrefix",0,s],77142);var l=e.i(994940);let d=/^#(?:[0-9a-f]{3}0|[0-9a-f]{6}00)$/i,u=/^0(?:\.0+)?%?$/;function h(e){let t,n=/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})\b/i.exec(e.trim());if(null==n)return null;let i=n[1],r=1;return 3===i.length?t=i.split("").map(e=>e+e).join(""):6===i.length?t=i:(t=i.slice(0,6),r=parseInt(i.slice(6,8),16)/255),[parseInt(t.slice(0,2),16),parseInt(t.slice(2,4),16),parseInt(t.slice(4,6),16),r]}function c(e){if(null==e)return null;let t=h(e);if(null==t)return null;let n=t[0]/255,i=t[1]/255,r=t[2]/255,a=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;return .2126*a(n)+.7152*a(i)+.0722*a(r)}function f(e,t){let[n,i]=e>t?[e,t]:[t,e];return(n+.05)/(i+.05)}function p(e){if(null==e)return!1;let t=e.trim().toLowerCase();if("transparent"===t||d.test(t))return!0;let n=function(e){let t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return;let n=e.slice(0,t).trim();if(!/^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)$/i.test(n))return;let i=e.slice(t+1,-1).trim();if(0===i.length)return;let r=i.lastIndexOf("/");if(-1!==r)return i.slice(r+1).trim();if(/^(?:rgba|hsla)$/i.test(n)){let e=i.split(",");if(4===e.length)return e[3]?.trim()}}(t);return null!=n&&u.test(n)}function m(e,t,n){if(null==t||null==n)return!1;let i=c(e),r=c(t),a=c(n);return null!=i&&null!=r&&null!=a&&Math.abs(i-a)<Math.abs(i-r)}e.s(["compositeOverBg",0,function(e,t){if(null==t)return;let n=h(e),i=h(t);if(null==n||null==i)return;let[r,a,o,s]=n,[l,d,u]=i;return"#"+[Math.round(r*s+l*(1-s)),Math.round(a*s+d*(1-s)),Math.round(o*s+u*(1-s))].map(e=>e.toString(16).padStart(2,"0")).join("")},"contrastRatio",0,f,"deriveMutedFg",0,function(e,t){if(null==t)return e;let n=h(e),i=h(t),r=c(t);if(null==n||null==i||null==r)return`color-mix(in srgb, ${e} 70%, ${t})`;let[a,o,s]=n,[l,d,u]=i;for(let e of[.6,.7,.8,.9]){let t="#"+[Math.round(a*e+l*(1-e)),Math.round(o*e+d*(1-e)),Math.round(s*e+u*(1-e))].map(e=>e.toString(16).padStart(2,"0")).join(""),n=c(t);if(null!=n&&f(r,n)>=4.5)return t}return e},"hoverWouldEraseText",0,m,"isDarkSurface",0,function(e,t){let n=c(e);if(null!=n)return n<.4;let i=c(t);return null!=i&&i>.6},"isFullyTransparent",0,p,"pickReadableForeground",0,function(e,t){let n,i=c(e),r=t.find(e=>null!=e&&""!==e);if(null==i)return r;let a=-1;for(let e of t){if(null==e||""===e)continue;let t=c(e);if(null==t)continue;let r=f(i,t);if(r>=3)return e;r>a&&(n=e,a=r)}return n??r},"relativeLuminance",0,c,"surfacesMatch",0,function(e,t){if(null==e||null==t)return!1;if(e.trim().toLowerCase()===t.trim().toLowerCase())return!0;let n=c(e),i=c(t);return null!=n&&null!=i&&.06>Math.abs(n-i)}],653598);let g=new WeakMap;function b(e){var t,n;let i=g.get(e);if(null!=i)return i;let r=e.colors??{},a={...r},o=r["editor.background"]??e.bg,s=r["editor.foreground"]??e.fg,l=r["sideBar.background"]??o,d=r["sideBar.foreground"]??s;v(a,"editor.background",o),v(a,"editor.foreground",s),v(a,"sideBar.background",l),v(a,"sideBar.foreground",d),v(a,"input.background",r["input.background"]??l),v(a,"sideBarSectionHeader.foreground",r["
63sideBarSectionHeader.foreground"]??d),v(a,"list.activeSelectionForeground",r["list.activeSelectionForeground"]??d),v(a,"gitDecoration.addedResourceForeground",y(r["gitDecoration.addedResourceForeground"],r["terminal.ansiGreen"],r["editorGutter.addedBackground"])),v(a,"gitDecoration.modifiedResourceForeground",y(r["gitDecoration.modifiedResourceForeground"],r["terminal.ansiBlue"],r["editorGutter.modifiedBackground"])),v(a,"gitDecoration.deletedResourceForeground",y(r["gitDecoration.deletedResourceForeground"],r["terminal.ansiRed"],r["editorGutter.deletedBackground"]));let u=(p(r["list.focusOutline"])?void 0:r["list.focusOutline"])??(p(r.focusBorder)?void 0:r.focusBorder);null!=u?a["list.focusOutline"]=u:delete a["list.focusOutline"];let h=r["list.hoverBackground"];null!=h&&(t=h,null!=(n=l)&&t.toLowerCase()===n.toLowerCase()||m(h,l,d))&&delete a["list.hoverBackground"];let c=Object.freeze({...e,colors:Object.freeze(a)});return g.set(e,c),c}function v(e,t,n){null!=n&&""!==n&&(e[t]=n)}function y(...e){for(let t of e)if(null!=t&&""!==t)return t}function S(e,t){t=null!=t?`${t}-`:"";let n="",i=e.colors?.["gitDecoration.addedResourceForeground"]??e.colors?.["terminal.ansiGreen"];null!=i&&(n+=`${s("global")}${t}addition-color:${i};`);let r=e.colors?.["gitDecoration.deletedResourceForeground"]??e.colors?.["terminal.ansiRed"];null!=r&&(n+=`${s("global")}${t}deletion-color:${r};`);let a=e.colors?.["gitDecoration.modifiedResourceForeground"]??e.colors?.["terminal.ansiBlue"];return null!=a&&(n+=`${s("global")}${t}modified-color:${a};`),n}e.s(["normalizeThemeColors",0,b],948366),e.s(["getHighlighterThemeStyles",0,function({theme:e=l.DEFAULT_THEMES,highlighter:t,prefix:n}){let i="";if("string"==typeof e){let r=t.getTheme(e),a=b(r);i+=`color:${a.fg};`,i+=`background-color:${a.bg};`,i+=`${s("global")}fg:${a.fg};`,i+=`${s("global")}bg:${a.bg};`,i+=S(r,n)}else{let n=t.getTheme(e.dark),r=b(n);i+=`${s("global")}dark:${r.fg};`,i+=`${s("global")}dark-bg:${r.bg};`,i+=S(n,"dark"),r=b(n=t.getTheme(e.light)),i+=`${s("global")}light:${r.fg};`,i+=`${s("global")}light-bg:${r.bg};`,i+=S(n,"light")}return i}],791352),e.s(["getLineNodes",0,function(e){let t=e.children[0];for(;null!=t;){if("element"===t.type&&"code"===t.tagName)return t.children;t="children"in t?t.children[0]:null}throw console.error(e),Error("getLineNodes: Unable to find children")}],56523)},559436,e=>{"use strict";e.s(["getFileRendererOptions",0,function(e){return{theme:e?.theme,disableLineNumbers:e?.disableLineNumbers,overflow:e?.overflow,themeType:e?.themeType,collapsed:e?.collapsed,disableFileHeader:e?.disableFileHeader,disableVirtualizationBuffers:e?.disableVirtualizationBuffers,stickyHeader:e?.stickyHeader,preferredHighlighter:e?.preferredHighlighter,useCSSClasses:e?.useCSSClasses,useTokenTransformer:e?.useTokenTransformer,tokenizeMaxLineLength:e?.tokenizeMaxLineLength,tokenizeMaxLength:e?.tokenizeMaxLength,unsafeCSS:e?.unsafeCSS,headerRenderMode:e?.renderCustomHeader!=null?"custom":"default"}}])},389569,e=>{"use strict";let t=new Map,n={"1c":"1c",abap:"abap",as:"actionscript-3",ada:"ada",adb:"ada",ads:"ada",adoc:"asciidoc",asciidoc:"asciidoc","component.html":"angular-html","component.ts":"angular-ts",conf:"nginx",htaccess:"apache",cls:"tex",trigger:"apex",apl:"apl",applescript:"applescript",scpt:"applescript",ara:"ara",asm:"asm",s:"riscv",astro:"astro",awk:"awk",bal:"ballerina",sh:"zsh",bash:"zsh",bat:"cmd",cmd:"cmd",be:"berry",beancount:"beancount",bib:"bibtex",bicep:"bicep","blade.php":"blade",bsl:"bsl",c:"c",h:"objective-cpp",cs:"csharp",cpp:"cpp",hpp:"cpp",cc:"cpp",cxx:"cpp",hh:"cpp",cdc:"cdc",cairo:"cairo",clar:"clarity",clj:"clojure",cljs:"clojure",cljc:"clojure",soy:"soy",cmake:"cmake","CMakeLists.txt":"cmake",cob:"cobol",cbl:"cobol",cobol:"cobol",CODEOWNERS:"codeowners",ql:"ql",coffee:"coffeescript",lisp:"lisp",cl:"lisp",lsp:"lisp",log:"log",v:"verilog",cql:"cql",cr:"crystal",css:"css",csv:"csv",cue:"cue",cypher:"cypher",cyp:"cypher",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",patch:"diff",Dockerfile:"dockerfile",dockerfile:"dockerfile",env:"dotenv",dm:"dream-maker",edge:"edge",el:"emacs-lisp",ex:"elixir",exs:"elixir",elm:"elm",erb:"erb",erl:"erlang",hrl:"erlang",f:"fortran-fixed-form",for:"fortran-fixed-form",fs:"fsharp",fsi:"fsharp",fsx:"fsharp",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"fortran-free-form",f95:"fortran-free-form",fnl:"fennel",fish:"fish",ftl:"ftl",tres:"gdresource",res:"gdresource",gd:"gdscript",gdshader:"gdshader",gs:"genie",feature:"gherkin",COMM
63IT_EDITMSG:"git-commit","git-rebase-todo":"git-rebase",gjs:"glimmer-js",gleam:"gleam",gts:"glimmer-ts",glsl:"glsl",vert:"glsl",frag:"glsl",shader:"shaderlab",gp:"gnuplot",plt:"gnuplot",gnuplot:"gnuplot",go:"go",graphql:"graphql",gql:"graphql",groovy:"groovy",gvy:"groovy",hack:"hack",haml:"haml",hbs:"handlebars",handlebars:"handlebars",hs:"haskell",lhs:"haskell",hx:"haxe",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",fx:"hlsl",html:"html",htm:"html",http:"http",rest:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",cfg:"ini",jade:"pug",pug:"pug",java:"java",js:"javascript",mjs:"javascript",cjs:"javascript",jinja:"jinja",jinja2:"jinja",j2:"jinja",jison:"jison",jl:"julia",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",libsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",kt:"kotlin",kts:"kts",kql:"kusto",tex:"tex",ltx:"tex",lean:"lean4",less:"less",liquid:"liquid",lit:"lit",ll:"llvm",logo:"logo",lua:"lua",luau:"luau",Makefile:"makefile",mk:"makefile",makefile:"makefile",md:"markdown",markdown:"markdown",marko:"marko",m:"wolfram",mat:"matlab",mdc:"mdc",mdx:"mdx",wiki:"wikitext",mediawiki:"wikitext",mmd:"mermaid",mermaid:"mermaid",mips:"mipsasm",mojo:"mojo","🔥":"mojo",move:"move",nar:"narrat",nf:"nextflow",nim:"nim",nims:"nim",nimble:"nim",nix:"nix",nu:"nushell",mm:"objective-cpp",ml:"ocaml",mli:"ocaml",mll:"ocaml",mly:"ocaml",pas:"pascal",p:"pascal",pl:"prolog",pm:"perl",t:"perl",raku:"raku",p6:"raku",pl6:"raku",php:"php",phtml:"php",pls:"plsql",sql:"sql",po:"po",polar:"polar",pcss:"postcss",pot:"pot",potx:"potx",pq:"powerquery",pqm:"powerquery",ps1:"powershell",psm1:"powershell",psd1:"powershell",prisma:"prisma",pro:"prolog",P:"prolog",properties:"properties",proto:"protobuf",pp:"puppet",purs:"purescript",py:"python",pyw:"python",pyi:"python",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",R:"r",rkt:"racket",rktl:"racket",razor:"razor",cshtml:"razor",rb:"ruby",rbw:"ruby",reg:"reg",regex:"regexp",rel:"rel",rs:"rust",rst:"rst",rake:"ruby",gemspec:"ruby",jbuilder:"ruby",builder:"ruby",rabl:"ruby",arb:"ruby",ru:"ruby",podspec:"ruby",Gemfile:"ruby",Rakefile:"ruby",Guardfile:"ruby",Capfile:"ruby",Berksfile:"ruby",Brewfile:"ruby",Vagrantfile:"ruby",Thorfile:"ruby",Appraisals:"ruby",Dangerfile:"ruby",sas:"sas",sass:"sass",scala:"scala",sc:"scala",scm:"scheme",ss:"scheme",sld:"scheme",scss:"scss",sdbl:"sdbl",shadergraph:"shader",st:"smalltalk",sol:"solidity",sparql:"sparql",rq:"sparql",spl:"splunk",config:"ssh-config",do:"stata",ado:"stata",dta:"stata",styl:"stylus",stylus:"stylus",svelte:"svelte",swift:"swift",sv:"system-verilog",svh:"system-verilog",service:"systemd",socket:"systemd",device:"systemd",timer:"systemd",talon:"talonscript",tasl:"tasl",tcl:"tcl",templ:"templ",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"typescript",mts:"typescript",cts:"typescript",tsp:"typespec",tsv:"tsv",tsx:"tsx",ttl:"turtle",twig:"twig",typ:"typst",vv:"v",vala:"vala",vapi:"vala",vb:"vb",vbs:"vb",bas:"vb",vh:"verilog",vhd:"vhdl",vhdl:"vhdl",vim:"vimscript",vue:"vue","vine.ts":"vue-vine",vy:"vyper",wasm:"wasm",wat:"wasm",wy:"文言",wgsl:"wgsl",wit:"wit",wl:"wolfram",nb:"wolfram",xml:"xml",xsl:"xsl",xslt:"xsl",yaml:"yaml",yml:"yml",zs:"zenscript",zig:"zig",zsh:"zsh",sty:"tex"};e.s(["getCustomExtensionsMap",0,function(){return Object.fromEntries(t)},"getCustomExtensionsVersion",0,function(){return 0},"getFiletypeFromFileName",0,function(e){if(t.has(e))return t.get(e)??"text";if(null!=n[e])return n[e];let i=e.match(/\.([^/\\]+\.[^/\\]+)$/);if(null!=i){if(t.has(i[1]))return t.get(i[1])??"text";if(null!=n[i[1]])return n[i[1]]??"text"}let r=e.match(/\.([^.]+)$/)?.[1]??"";return t.has(r)?t.get(r)??"text":n[r]??"text"}])},390624,e=>{"use strict";function t(e,t){return e-(0!==t)}e.s(["getHunkSideEndBoundary",0,function(e,n){return t(e,n)+n},"getHunkSideStartBoundary",0,t])},130256,116396,e=>{"use strict";e.s(["getLineAnnotationName",0,function(e){return`annotation-${"side"in e?`${e.side}-`:""}${e.lineNumber}`}],130256),e.s(["GutterUtilitySlotStyles",0,{position:"absolute",top:0,bottom:0,textAlign:"center",whiteSpace:"normal",touchAction:"none"},"MergeConflictSlotStyles",0,{display:"contents"},"noopRender",0,function(){return null}],116396)},144003,462974,908045,915697,657628,e=>{"use strict";e.s(["getOrCreateCodeNode",0,function({code:e,pre:t,columnType:n,rowSpan:i,containerSize:r=!1}={}){return null==e&&((e=document.createElement("code")).setAttribute("data-code",""),null!=n&&e.setAttribute(`data-${n}`,""),t?.appendChild(e)),null!=i?e.style.setProperty("grid-row",`span ${i}`):e.style.removeProperty("grid-row"),r?e.setAttribute("data-container-size",""):e.removeAttribute("data-container-size"),e}],144003);var t=e.i(994940);e.s(["upsertHostThemeStyle",0,function({shadowRoot:e,currentNode:n,themeCSS:i}){let r;return""===i.trim()?void n?.remove():((n??=((r=document.createElement("style")).setAttribute(t.THEME_CSS_ATTRIBUTE,""),r)).textContent=i,n.parentNode!==e&&e.appendChild(n),n)}],462974),e.s(["prerenderHTMLIfNecessary",0,function(e,t){if(null==t)return;let n=e.shadowRoot??e.attachShadow({mode:"open"});""===n.innerHTML&&(n.innerHTML=t)}],908045),e.s(["setPreNodeProperties",0,function(e,{type:t,diffIndicators:n,disableBackgroun
63d:i,disableLineNumbers:r,overflow:a,split:o,totalLines:s,customProperties:l}){if(null!=l)for(let t in l){let n=l[t];null!=n&&e.setAttribute(t,`${n}`)}switch("diff"===t?(e.setAttribute("data-diff",""),e.removeAttribute("data-file")):(e.setAttribute("data-file",""),e.removeAttribute("data-diff")),n){case"bars":case"classic":e.setAttribute("data-indicators",n);break;case"none":e.removeAttribute("data-indicators")}return r?e.setAttribute("data-disable-line-numbers",""):e.removeAttribute("data-disable-line-numbers"),i?e.removeAttribute("data-background"):e.setAttribute("data-background",""),"diff"===t?e.setAttribute("data-diff-type",o?"split":"single"):e.removeAttribute("data-diff-type"),e.setAttribute("data-overflow",a),e.style.setProperty("--diffs-min-number-column-width-default",`${`${s}`.length}ch`),e}],915697);var n=e.i(953282),i=e.i(730981);if("u">typeof HTMLElement&&null==customElements.get("diffs-container")){let e;class r extends HTMLElement{constructor(){if(super(),null!=this.shadowRoot)return;const t=this.attachShadow({mode:"open"});null==e&&(e=new CSSStyleSheet).replaceSync(n.default),t.adoptedStyleSheets=[e]}connectedCallback(){(0,i.getMeasuredScrollbarGutter)(this.shadowRoot??this.attachShadow({mode:"open"}))}}customElements.define(t.DIFFS_TAG_NAME,r)}e.s([],657628)},964526,695049,454949,321347,710703,713937,693445,82733,553788,820408,444855,642036,533160,e=>{"use strict";let t,n,i,r,a;e.s(["FILE_ANNOTATION_DOM_KEY",0,"-1,-1","getFileAnnotations",0,function(e){let t=e[0];return null!=t&&t.length>0?t:void 0},"includesFileAnnotations",0,function(e){return e?.some(e=>0===e.lineNumber)??!1},"shouldRenderFileAnnotations",0,function(e){return 0===e.startingLine&&e.totalLines>0}],964526);let o=new Map,s=new Map,l=new Map,d=new Set;function u(e,t){for(let n of e=Array.isArray(e)?e:[e]){if(d.has(n.name))continue;let e=o.get(n.name);null==e&&(e=n,o.set(n.name,e)),d.add(e.name),t.loadLanguageSync(e.data)}}function h(){return"u">typeof WorkerGlobalScope&&"u">typeof self&&self instanceof WorkerGlobalScope}e.s(["AttachedLanguages",0,d,"RegisteredCustomLanguages",0,l,"ResolvedLanguages",0,o,"ResolvingLanguages",0,s],695049),e.s(["areLanguagesAttached",0,function(e){for(let t of Array.isArray(e)?e:[e])if("text"!==t&&"ansi"!==t&&!d.has(t))return!1;return!0}],454949);let c=[{id:"abap",name:"ABAP",import:()=>e.A(86433)},{id:"actionscript-3",name:"ActionScript",import:()=>e.A(767804)},{id:"ada",name:"Ada",import:()=>e.A(616727)},{id:"angular-html",name:"Angular HTML",import:()=>e.A(579438)},{id:"angular-ts",name:"Angular TypeScript",import:()=>e.A(940556)},{id:"apache",name:"Apache Conf",import:()=>e.A(612926)},{id:"apex",name:"Apex",import:()=>e.A(243476)},{id:"apl",name:"APL",import:()=>e.A(224574)},{id:"applescript",name:"AppleScript",import:()=>e.A(720651)},{id:"ara",name:"Ara",import:()=>e.A(773862)},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>e.A(326701)},{id:"asm",name:"Assembly",import:()=>e.A(25868)},{id:"astro",name:"Astro",import:()=>e.A(874400)},{id:"awk",name:"AWK",import:()=>e.A(176944)},{id:"ballerina",name:"Ballerina",import:()=>e.A(448166)},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>e.A(882798)},{id:"beancount",name:"Beancount",import:()=>e.A(334987)},{id:"berry",name:"Berry",aliases:["be"],import:()=>e.A(697174)},{id:"bibtex",name:"BibTeX",import:()=>e.A(971688)},{id:"bicep",name:"Bicep",import:()=>e.A(943897)},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>e.A(645006)},{id:"blade",name:"Blade",import:()=>e.A(510008)},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>e.A(530370)},{id:"c",name:"C",import:()=>e.A(245697)},{id:"c3",name:"C3",import:()=>e.A(935918)},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>e.A(753295)},{id:"cairo",name:"Cairo",import:()=>e.A(462701)},{id:"clarity",name:"Clarity",import:()=>e.A(50731)},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>e.A(593641)},{id:"cmake",name:"CMake",import:()=>e.A(354763)},{id:"cobol",name:"COBOL",import:()=>e.A(92650)},{id:"codeowners",name:"CODEOWNERS",import:()=>e.A(747877)},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>e.A(632822)},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>e.A(33094)},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>e.A(495035)},{id:"coq",name:"Coq",import:()=>e.A(258411)},{id:"cpp",name:"C++",aliases:["c++"],import:()=>e.A(430713)},{id:"crystal",name:"Crystal",import:()=>e.A(518972)}
63,{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>e.A(85582)},{id:"css",name:"CSS",import:()=>e.A(579274)},{id:"csv",name:"CSV",import:()=>e.A(296068)},{id:"cue",name:"CUE",import:()=>e.A(382742)},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>e.A(61210)},{id:"d",name:"D",import:()=>e.A(466159)},{id:"dart",name:"Dart",import:()=>e.A(6152)},{id:"dax",name:"DAX",import:()=>e.A(35998)},{id:"desktop",name:"Desktop",import:()=>e.A(547910)},{id:"diff",name:"Diff",import:()=>e.A(219221)},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>e.A(863925)},{id:"dotenv",name:"dotEnv",import:()=>e.A(414733)},{id:"dream-maker",name:"Dream Maker",import:()=>e.A(638810)},{id:"edge",name:"Edge",import:()=>e.A(478033)},{id:"elixir",name:"Elixir",import:()=>e.A(400717)},{id:"elm",name:"Elm",import:()=>e.A(921962)},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>e.A(963111)},{id:"erb",name:"ERB",import:()=>e.A(722538)},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>e.A(540999)},{id:"fennel",name:"Fennel",import:()=>e.A(822355)},{id:"fish",name:"Fish",import:()=>e.A(932967)},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>e.A(172396)},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>e.A(560153)},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>e.A(281887)},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>e.A(82816)},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>e.A(666904)},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>e.A(433358)},{id:"gdshader",name:"GDShader",import:()=>e.A(810421)},{id:"genie",name:"Genie",import:()=>e.A(67011)},{id:"gherkin",name:"Gherkin",import:()=>e.A(356993)},{id:"git-commit",name:"Git Commit Message",import:()=>e.A(537355)},{id:"git-rebase",name:"Git Rebase Message",import:()=>e.A(559119)},{id:"gleam",name:"Gleam",import:()=>e.A(59205)},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>e.A(934843)},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>e.A(198870)},{id:"glsl",name:"GLSL",import:()=>e.A(752447)},{id:"gn",name:"GN",import:()=>e.A(556581)},{id:"gnuplot",name:"Gnuplot",import:()=>e.A(475924)},{id:"go",name:"Go",import:()=>e.A(477842)},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>e.A(998649)},{id:"groovy",name:"Groovy",import:()=>e.A(525979)},{id:"hack",name:"Hack",import:()=>e.A(28952)},{id:"haml",name:"Ruby Haml",import:()=>e.A(482881)},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>e.A(599027)},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>e.A(282379)},{id:"haxe",name:"Haxe",import:()=>e.A(620692)},{id:"hcl",name:"HashiCorp HCL",import:()=>e.A(543968)},{id:"hjson",name:"Hjson",import:()=>e.A(338666)},{id:"hlsl",name:"HLSL",import:()=>e.A(310847)},{id:"html",name:"HTML",import:()=>e.A(278669)},{id:"html-derivative",name:"HTML (Derivative)",import:()=>e.A(929689)},{id:"http",name:"HTTP",import:()=>e.A(621884)},{id:"hurl",name:"Hurl",import:()=>e.A(340214)},{id:"hxml",name:"HXML",import:()=>e.A(204626)},{id:"hy",name:"Hy",import:()=>e.A(950492)},{id:"imba",name:"Imba",import:()=>e.A(452634)},{id:"ini",name:"INI",aliases:["properties"],import:()=>e.A(573748)},{id:"java",name:"Java",import:()=>e.A(346813)},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>e.A(585793)},{id:"jinja",name:"Jinja",import:()=>e.A(821050)},{id:"jison",name:"Jison",import:()=>e.A(587254)},{id:"json",name:"JSON",import:()=>e.A(8178)},{id:"json5",name:"JSON5",import:()=>e.A(273938)},{id:"jsonc",name:"JSON with Comments",import:()=>e.A(352923)},{id:"jsonl",name:"JSON Lines",import:()=>e.A(951389)},{id:"jsonnet",name:"Jsonnet",import:()=>e.A(427856)},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>e.A(411821)},{id:"jsx",name:"JSX",import:()=>e.A(9817)},{id:"julia",name:"Julia",aliases:["jl"],import:()=>e.A(132637)},{id:"just",name:"Just",import:()=>e.A(909114)},{id:"kdl",name:"KDL",import:()=>e.A(396855)},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>e.A(178515)},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>e.A(32861)},{id:"latex",name:"LaTeX",import:()=>e.A(793626)},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>e.A(682375)},{id:"less",name:"Less",import:()=>e.A(843947)},{id:"liquid",name:"Liquid",import:()=>e.A(490321)},{id:"llvm",name:"LLVM IR",import:()=>e.A(581187)},{id:"log",name:"Log file",import:()=>e.A(302044)},{id:"logo",name:"Logo",import:()=>e.A(878229)},{id:"lua",name:"Lua",import:()=>e.A(972108)}
63,{id:"luau",name:"Luau",import:()=>e.A(341326)},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>e.A(351558)},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>e.A(326957)},{id:"marko",name:"Marko",import:()=>e.A(335332)},{id:"matlab",name:"MATLAB",import:()=>e.A(54878)},{id:"mdc",name:"MDC",import:()=>e.A(699764)},{id:"mdx",name:"MDX",import:()=>e.A(667454)},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>e.A(26466)},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>e.A(180655)},{id:"mojo",name:"Mojo",import:()=>e.A(917901)},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>e.A(414447)},{id:"move",name:"Move",import:()=>e.A(216672)},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>e.A(369690)},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>e.A(190669)},{id:"nextflow-groovy",name:"nextflow-groovy",import:()=>e.A(946077)},{id:"nginx",name:"Nginx",import:()=>e.A(760315)},{id:"nim",name:"Nim",import:()=>e.A(410687)},{id:"nix",name:"Nix",import:()=>e.A(988502)},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>e.A(36838)},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>e.A(148221)},{id:"objective-cpp",name:"Objective-C++",import:()=>e.A(416890)},{id:"ocaml",name:"OCaml",import:()=>e.A(134618)},{id:"odin",name:"Odin",import:()=>e.A(948990)},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>e.A(676226)},{id:"pascal",name:"Pascal",import:()=>e.A(550057)},{id:"perl",name:"Perl",import:()=>e.A(650476)},{id:"php",name:"PHP",import:()=>e.A(82875)},{id:"pkl",name:"Pkl",import:()=>e.A(153965)},{id:"plsql",name:"PL/SQL",import:()=>e.A(856957)},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>e.A(568921)},{id:"polar",name:"Polar",import:()=>e.A(410727)},{id:"postcss",name:"PostCSS",import:()=>e.A(493006)},{id:"powerquery",name:"PowerQuery",import:()=>e.A(293016)},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>e.A(11659)},{id:"prisma",name:"Prisma",import:()=>e.A(915707)},{id:"prolog",name:"Prolog",import:()=>e.A(412243)},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>e.A(855986)},{id:"pug",name:"Pug",aliases:["jade"],import:()=>e.A(602509)},{id:"puppet",name:"Puppet",import:()=>e.A(480896)},{id:"purescript",name:"PureScript",import:()=>e.A(283646)},{id:"python",name:"Python",aliases:["py"],import:()=>e.A(994616)},{id:"qml",name:"QML",import:()=>e.A(824667)},{id:"qmldir",name:"QML Directory",import:()=>e.A(626434)},{id:"qss",name:"Qt Style Sheets",import:()=>e.A(743970)},{id:"r",name:"R",import:()=>e.A(731254)},{id:"racket",name:"Racket",import:()=>e.A(52833)},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>e.A(965275)},{id:"razor",name:"ASP.NET Razor",import:()=>e.A(55640)},{id:"reg",name:"Windows Registry Script",import:()=>e.A(454585)},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>e.A(206342)},{id:"rel",name:"Rel",import:()=>e.A(443181)},{id:"riscv",name:"RISC-V",import:()=>e.A(28962)},{id:"ron",name:"RON",import:()=>e.A(857580)},{id:"rosmsg",name:"ROS Interface",import:()=>e.A(864543)},{id:"rst",name:"reStructuredText",import:()=>e.A(784120)},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>e.A(675833)},{id:"rust",name:"Rust",aliases:["rs"],import:()=>e.A(710344)},{id:"sas",name:"SAS",import:()=>e.A(149349)},{id:"sass",name:"Sass",import:()=>e.A(14759)},{id:"scala",name:"Scala",import:()=>e.A(952780)},{id:"scheme",name:"Scheme",import:()=>e.A(238430)},{id:"scss",name:"SCSS",import:()=>e.A(740454)},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>e.A(270111)},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>e.A(604128)},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>e.A(893971)},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>e.A(735991)},{id:"smalltalk",name:"Smalltalk",import:()=>e.A(681366)},{id:"solidity",name:"Solidity",import:()=>e.A(803565)},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>e.A(335050)},{id:"sparql",name:"SPARQL",import:()=>e.A(63752)}
63,{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>e.A(357880)},{id:"sql",name:"SQL",import:()=>e.A(495435)},{id:"ssh-config",name:"SSH Config",import:()=>e.A(977846)},{id:"stata",name:"Stata",import:()=>e.A(288225)},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>e.A(358717)},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>e.A(89668)},{id:"svelte",name:"Svelte",import:()=>e.A(549111)},{id:"swift",name:"Swift",import:()=>e.A(517054)},{id:"system-verilog",name:"SystemVerilog",import:()=>e.A(18253)},{id:"systemd",name:"Systemd Units",import:()=>e.A(515761)},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>e.A(539345)},{id:"tasl",name:"Tasl",import:()=>e.A(100102)},{id:"tcl",name:"Tcl",import:()=>e.A(588626)},{id:"templ",name:"Templ",import:()=>e.A(689031)},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>e.A(354461)},{id:"tex",name:"TeX",import:()=>e.A(871764)},{id:"toml",name:"TOML",import:()=>e.A(148908)},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>e.A(321080)},{id:"tsv",name:"TSV",import:()=>e.A(323337)},{id:"tsx",name:"TSX",import:()=>e.A(637660)},{id:"turtle",name:"Turtle",import:()=>e.A(342128)},{id:"twig",name:"Twig",import:()=>e.A(364420)},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>e.A(261718)},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>e.A(344153)},{id:"typst",name:"Typst",aliases:["typ"],import:()=>e.A(408532)}
63,{id:"v",name:"V",import:()=>e.A(378951)},{id:"vala",name:"Vala",import:()=>e.A(107078)},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>e.A(816750)},{id:"verilog",name:"Verilog",import:()=>e.A(252441)},{id:"vhdl",name:"VHDL",import:()=>e.A(456594)},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>e.A(945441)},{id:"vue",name:"Vue",import:()=>e.A(738356)},{id:"vue-html",name:"Vue HTML",import:()=>e.A(311224)},{id:"vue-vine",name:"Vue Vine",import:()=>e.A(397833)},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>e.A(445879)},{id:"wasm",name:"WebAssembly",import:()=>e.A(807431)},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>e.A(534365)},{id:"wgsl",name:"WGSL",import:()=>e.A(359770)},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>e.A(363732)},{id:"wit",name:"WebAssembly Interface Types",import:()=>e.A(95223)},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>e.A(615651)},{id:"xml",name:"XML",import:()=>e.A(757885)},{id:"xsl",name:"XSL",import:()=>e.A(351301)},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>e.A(225298)},{id:"zenscript",name:"ZenScript",import:()=>e.A(459644)},{id:"zig",name:"Zig",import:()=>e.A(180495)}],f=Object.fromEntries(c.map(e=>[e.id,e.import])),p=Object.fromEntries(c.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),m={...f,...p};async function g(e){if(h())throw Error(`resolveLanguage("${e}") cannot be called from a worker context. Languages must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);let t=s.get(e);if(null!=t)return t;try{let t=l.get(e);if(null==t&&Object.prototype.hasOwnProperty.call(m,e)&&(t=m[e]),null==t)throw Error(`resolveLanguage: "${e}" not found in bundled or custom languages`);let n=t().then(({default:t})=>{let n={name:e,data:t};return o.has(e)||o.set(e,n),n});return s.set(e,n),await n}finally{s.delete(e)}}function b(e){return o.get(e)??g(e)}function v(e){return null!==e&&"object"==typeof e&&"default"in e?e.default:e}e.s(["bundledLanguages",0,m],321347),e.s(["resolveLanguage",0,g],710703),e.s(["getResolvedOrResolveLanguage",0,b],713937);var y,S,k,C=class extends Error{constructor(e){super(`Theme "${e}" is already registered`),this.name="DuplicateThemeError"}},A=class extends Error{constructor(e){super(`No loader registered for theme "${e}"`),this.name="UnregisteredThemeError"}},x=class extends Error{constructor(e){super(`Theme "${e}" has not been resolved`),this.name="UnresolvedThemeError"}};let w=function(){let e=new Map,t=new Map,n=new Map,i=0;function r(r){let a=t.get(r);if(void 0!==a)return Promise.resolve(a);let o=n.get(r);if(void 0!==o)return o;let s=e.get(r);if(void 0===s)return Promise.reject(new A(r));let l=i,d=s().then(e=>{let a=v(e);return l===i&&t.set(r,a),n.get(r)===d&&n.delete(r),a}).catch(e=>{throw n.get(r)===d&&n.delete(r),e});return n.set(r,d),d}function a(e,n){t.set(e,n)}return{clearResolvedThemes:function(){i++,t.clear(),n.clear()},getResolvedOrResolveTheme:function(e){let n=t.get(e);return void 0!==n?n:r(e)},getResolvedTheme:function(e){return t.get(e)},getResolvedThemes:function(e){let n=[];for(let i of e){let e=t.get(i);if(void 0===e)throw new x(i);n.push(e)}return n},hasRegisteredTheme:function(t){return e.has(t)},hasResolvedTheme:function(e){return t.has(e)},hasResolvedThemes:function(e){for(let n of e)if(!t.has(n))return!1;return!0},registerTheme:function(t,n){if(e.has(t))throw new C(t);e.set(t,n)},registerThemeIfAbsent:function(t,n){return!e.has(t)&&(e.set(t,n),!0)},resolveTheme:r,resolveThemes:function(e){return Promise.all(e.map(e=>r(e)))},seedResolvedTheme:a,seedResolvedThemes:function(e){for(let[t,n]of e)a(t,n)}}}();e.s(["themeResolver",0,w],693445);let E=new Set;function L(e,t){for(let n of e=Array.isArray(e)?e:[e]){let e;if("string"==typeof n){if(null==(e=w.getResolvedTheme(n)))throw Error(`loadResolvedThemes: ${n} is not resolved, you must resolve it before calling loadResolvedThemes`)}else e=n,n=n.name,null==w.getResolvedTheme(n)&&w.seedResolvedTheme(n,e);E.has(n)||(E.add(n),t.loadThemeSync(e))}}function _(e){var t,n,i;let r=[],a=new Set;for(let o of T(n=t=e.themes)||"string"==typeof(i=n).name&&"function"==typeof i.load?[t]:t)for(let e of T(o)?o.getThemes():[o]){if(a.has(e.name))throw Error(`Theme collection already contains theme "${e.name}"`);a.add(e.name),r.push(e)}let o=Object.freeze([...r]),s=Object.freeze(o.filter(e=>"light"===e.colorScheme)),l=Object.freeze(o.filter(e=>"dark"===e.colorScheme)),d=new Map(o.map(e=>[e.name,e])),u=Object.freeze(o.map(e=>e.name)),h=Object.freeze(s.map(e=>e.name)),c=Object.freeze(l.map(e=>e.name));function f(e){if(null==e)return o;let{colorScheme:t,collection:n}=e;return null==n?"light"===t?s:"dark"===t?l:o:o.filter(e=>e.collection===n&&(null==t||e.colorScheme===t))}return{getTheme:e=>d.get(e),getThemes:e=>f(e),getThemeNames:e=>e?.collection==null?e?.colorScheme==="light"?h:e?.colorScheme==="dark"?c:u:f(e).map(e=>e.name),hasTheme:e=>d.has(e),orderBy:e=>_({themes:o.map((e,t)=>({descriptor:e,index:t})).sort((t,n)=>{let i=e(t.descriptor,n.descriptor);return 0!==i?i:t.index-n.index}).map(e=>e.descriptor)}),pick(e){let t=[],n=new Set;for(let i of e){if(n.has(i))throw Error(`Theme collection pick already includes theme "${i}"`);n.add(i);let e=d.get(i);if(null==e)throw Error(`Theme collection does not contain theme "${i}"`);t.push(e)}return _({themes:t})},registerInto(e){for(let t of o)e.registerThemeIfAbsent(t.name,t.load)}}}function T(e){return"function"==typeof e.getThemes}e.s(["attachResolvedThemes",0,L],82733);
63class N extends Error{constructor(e){super(e),this.name="ShikiError"}}var R=e.i(350461);function M(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}var I=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,P=class{static hasCaptures(e){return null!==e&&(I.lastIndex=0,I.test(e))}static replaceCaptures(e,t,n){return e.replace(I,(e,i,r,a)=>{let o=n[parseInt(i||r,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(a){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function F(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,i=t.length;if(n===i){for(let i=0;i<n;i++){var r,a;let n=(r=e[i],r<(a=t[i])?-1:+(r>a));if(0!==n)return n}return 0}return n-i}function $(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function D(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var O=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},H=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],i=0;for(let e=0,r=t.length;e<r;e++){let r,a=t[e];if(!a.settings)continue;if("string"==typeof a.scope){let e=a.scope;r=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else r=Array.isArray(a.scope)?a.scope:[""];let o=-1;if("string"==typeof a.settings.fontStyle){o=0;let e=a.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let s=null;"string"==typeof a.settings.foreground&&$(a.settings.foreground)&&(s=a.settings.foreground);let l=null;"string"==typeof a.settings.background&&$(a.settings.background)&&(l=a.settings.background);for(let t=0,a=r.length;t<a;t++){let a=r[t].trim().split(" "),d=a[a.length-1],u=null;a.length>1&&(u=a.slice(0,a.length-1)).reverse(),n[i++]=new z(d,u,e,o,s,l)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{var n,i;let r=(n=e.scope,n<(i=t.scope)?-1:+(n>i));return 0!==r||0!==(r=F(e.parentScopes,t.parentScopes))?r:e.index-t.index});let n=0,i="#000000",r="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(i=t.foreground),null!==t.background&&(r=t.background)}let a=new j(t),o=new B(n,a.getId(i),a.getId(r)),s=new q(new V(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new H(a,o,s)}(e,t)}_cachedMatchRoot=new O(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let r=0;r<t.length;r++){var n,i;let a=t[r],o=!1;if(">"===a){if(r===t.length-1)return!1;a=t[++r],o=!0}for(;e&&(n=e.scopeName,!((i=a)===n||n.startsWith(i)&&"."===n[i.length]));){if(o)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return n?new B(n.fontStyle,n.foreground,n.background):null}},U=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let i of n)t=new e(t,i);return t}static from(...t){let n=null;for(let i=0;i<t.length;i++)n=new e(n,t[i]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}},B=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}},z=class{constructor(e,t,n,i,r,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=i,this.foreground=r,this.background=a}},G=((y=G||{}
63)[y.NotSet=-1]="NotSet",y[y.None=0]="None",y[y.Italic=1]="Italic",y[y.Bold=2]="Bold",y[y.Underline=4]="Underline",y[y.Strikethrough=8]="Strikethrough",y),j=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},W=Object.freeze([]),V=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,i,r){this.scopeDepth=e,this.parentScopes=t||W,this.fontStyle=n,this.foreground=i,this.background=r}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,i=e.length;n<i;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==i&&(this.background=i)}},q=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,i=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[i]&&i++,!(n>=e.parentScopes.length)&&!(i>=t.parentScopes.length);){let r=t.parentScopes[i].length-e.parentScopes[n].length;if(0!==r)return r;n++,i++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,i=t.indexOf(".");if(-1===i?(e=t,n=""):(e=t.substring(0,i),n=t.substring(i+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,i,r,a,o){let s,l,d;if(""===n)return void this._doInsertHere(t,i,r,a,o);let u=n.indexOf(".");-1===u?(s=n,l=""):(s=n.substring(0,u),l=n.substring(u+1)),this._children.hasOwnProperty(s)?d=this._children[s]:(d=new e(this._mainRule.clone(),V.cloneArr(this._rulesWithParentScopes)),this._children[s]=d),d.insert(t+1,l,i,r,a,o)}_doInsertHere(e,t,n,i,r){if(null===t)return void this._mainRule.acceptOverwrite(e,n,i,r);for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(0===F(o.parentScopes,t))return void o.acceptOverwrite(e,n,i,r)}-1===n&&(n=this._mainRule.fontStyle),0===i&&(i=this._mainRule.foreground),0===r&&(r=this._mainRule.background),this._rulesWithParentScopes.push(new V(e,t,n,i,r))}},X=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let n=e.getLanguageId(t),i=e.getTokenType(t),r=e.getFontStyle(t);console.log({languageId:n,tokenType:i,fontStyle:r,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,i,r,a,o,s){let l=e.getLanguageId(t),d=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),h=e.getFontStyle(t),c=e.getForeground(t),f=e.getBackground(t);return 0!==n&&(l=n),8!==i&&(d=i),null!==r&&(u=+!!r),-1!==a&&(h=a),0!==o&&(c=o),0!==s&&(f=s),(l|d<<8|u<<10|h<<11|c<<15|f<<24)>>>0}};function K(e,t){var n;let i,r,a=[],o=(n=e,r=(i=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(n),{next:()=>{if(!r)return null;let e=r[0];return r=i.exec(n),e}}),s=o.next();for(;null!==s;){let e=0;if(2===s.length&&":"===s.charAt(1)){switch(s.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=o.next()}let t=d();if(a.push({matcher:t,priority:e}),","!==s)break;s=o.next()}return a;function l(){if("-"===s){s=o.next();let e=l();return t=>!!e&&!e(t)}if("("===s){s=o.next();let e=function(){let e=[],t=d();for(;t&&(e.push(t),"|"===s||","===s);){do s=o.next();while("|"===s||","===s)t=d()}return t=>e.some(e=>e(t))}();return")"===s&&(s=o.next()),e}if(Q(s)){let e=[];do e.push(s),s=o.next();while(Q(s))return n=>t(e,n)}return null}function d(){let e=[],t=l();for(;t;)e.push(t),t=l();return t=>e.every(e=>e(t))}}function Q(e){return!!e&&!!e.match(/[\w\.:]+/)}var J=((S=J||{})[S.None=0]="None",S[S.NotBeginString=1]="NotBeginString",S[S.NotEndString=2]="NotEndString",S[S.NotBeginPosition=4]="NotBeginPosition",S[S.DebugCall=8]="DebugCall",S);function Z(e){"function"==typeof e.dispose&&e.dispose()}var Y=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},ee=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},et=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},en=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Y(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new et;for(let n of e)!function(e,t,n,i){let r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof Y?er({baseGrammar:a,selfGrammar:r},i):ei(e.ruleName,{baseGrammar:a,selfGrammar:r,repository:r.repository},i);let o=n.injections(e.scopeName);if(o)for(let e of o)i.add(new Y(e))}(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof Y){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};
63function ei(e,t,n){t.repository&&t.repository[e]&&ea([t.repository[e]],t,n)}function er(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ea(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ea(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ea(e,t,n){for(let i of e){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);let e=i.repository?M({},t.repository,i.repository):t.repository;Array.isArray(i.patterns)&&ea(i.patterns,{...t,repository:e},n);let r=i.include;if(!r)continue;let a=eh(r);switch(a.kind){case 0:er({...t,selfGrammar:t.baseGrammar},n);break;case 1:er(t,n);break;case 2:ei(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){let i={baseGrammar:t.baseGrammar,selfGrammar:o,repository:e};4===a.kind?ei(a.ruleName,i,n):er(i,n)}else 4===a.kind?n.add(new ee(a.scopeName,a.ruleName)):n.add(new Y(a.scopeName))}}}var eo=class{kind=0},es=class{kind=1},el=class{constructor(e){this.ruleName=e}kind=2},ed=class{constructor(e){this.scopeName=e}kind=3},eu=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};
63function eh(e){if("$base"===e)return new eo;if("$self"===e)return new es;let t=e.indexOf("#");return -1===t?new ed(e):0===t?new el(e.substring(1)):new eu(e.substring(0,t),e.substring(t+1))}var ec=/\\(\d+)/,ef=/\\(\d+)/g;Symbol("RuleId");var ep=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,i){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=P.hasCaptures(this._name),this._contentName=i||null,this._contentNameIsCapturing=P.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(~n+1)}(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?P.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?P.replaceCaptures(this._contentName,e,t):this._contentName}},em=class extends ep{retokenizeCapturedWithRuleId;constructor(e,t,n,i,r){super(e,t,n,i),this.retokenizeCapturedWithRuleId=r}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,i){throw Error("Not supported!")}},eg=class extends ep{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,i,r){super(e,t,n,null),this._match=new ek(i,this.id),this.captures=r,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eC,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},eb=class extends ep{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,r){super(e,t,n,i),this.patterns=r.patterns,this.hasMissingPatterns=r.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eC,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ev=class extends ep{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,i,r,a,o,s,l,d){super(e,t,n,i),this._begin=new ek(r,this.id),this.beginCaptures=a,this._end=new ek(o||"ï¿¿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=l||!1,this.patterns=d.patterns,this.hasMissingPatterns=d.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,i)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new eC,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ey=class extends ep{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,i,r,a,o,s,l){super(e,t,n,i),this._begin=new ek(r,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=ne
63w ek(o,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,i){return this._getCachedCompiledPatterns(e).compileAG(e,n,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new eC,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,i){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,i)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new eC,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"ï¿¿"),this._cachedCompiledWhilePatterns}
63},eS=class e{static createCaptureRule(e,t,n,i,r){return e.registerRule(e=>new em(t,e,n,i,r))}static getCompiledRuleId(t,n,i){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new eg(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,i));if(void 0===t.begin){t.repository&&(i=M({},i,t.repository));let r=t.patterns;return void 0===r&&t.include&&(r=[{include:t.include}]),new eb(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(r,n,i))}return t.while?new ey(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,i),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,i),e._compilePatterns(t.patterns,n,i)):new ev(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,i),t.end,e._compileCaptures(t.endCaptures||t.captures,n,i),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,i))}),t.id}static _compileCaptures(t,n,i){let r=[];if(t){let a=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)r[e]=null;for(let a in t){if("$vscodeTextmateLocation"===a)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,i)),r[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return r}static _compilePatterns(t,n,i){let r=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=eh(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(i[o.include],n,i);break;case 2:let r=i[t.ruleName];r&&(s=e.getCompiledRuleId(r,n,i));break;case 3:case 4:let a=t.scopeName,l=4===t.kind?t.ruleName:null,d=n.getExternalGrammar(a,i);if(d)if(l){let t=d.repository[l];t&&(s=e.getCompiledRuleId(t,n,d.repository))}else s=e.getCompiledRuleId(d.repository.$self,n,d.repository)}}else s=e.getCompiledRuleId(o,n,i);if(-1!==s){let e=n.getRule(s),t=!1;if((e instanceof eb||e instanceof ev||e instanceof ey)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;r.push(s)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},ek=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,i=[],r=!1;for(let a=0;a<t;a++)if("\\"===e.charAt(a)&&a+1<t){const t=e.charAt(a+1);"z"===t?(i.push(e.substring(n,a)),i.push("$(?!\\n)(?<!\\n)"),n=a+2):("A"===t||"G"===t)&&(r=!0),a++}this.hasAnchor=r,0===n?this.source=e:(i.push(e.substring(n,t)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=ec.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return ef.lastIndex=0,this.source.replace(ef,(e,t)=>D(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,i;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let r=[],a=[],o=[],s=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),r[e]=n,a[e]=n,o[e]=n,s[e]=n,"\\"===n&&e+1<t&&("A"===(i=this.source.charAt(e+1))?(r[e+1]="ï¿¿",a[e+1]="ï¿¿",o[e+1]="A",s[e+1]="A"):"G"===i?(r[e+1]="ï¿¿",a[e+1]="G",o[e+1]="ï¿¿",s[e+1]="G"):(r[e+1]=i,a[e+1]=i,o[e+1]=i,s[e+1]=i),e++);return{A0_G0:r.join(""),A0_G1:a.join(""),A1_G0:o.join(""),A1_G1:s.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},eC=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}
63push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new eA(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new eA(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},eA=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push("   - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let i=this.scanner.findNextMatchSync(e,t,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},ex=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ew=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new ex(e,8),this._embeddedLanguagesMatcher=new eE(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ex(0,0);_getBasicScopeAttributes=new O(e=>new ex(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},eE=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>D(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};void 0!==R.default&&R.default.env.VSCODE_TEXTMATE_DEBUG;var eL=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function e_(e,t,n,i,r,a,o,s){let l=t.content.length,d=!1,u=-1;if(o){let o=function(e,t,n,i,r,a){let o=r.beginRuleCapturedEOL?0:-1,s=[];for(let t=r;t;t=t.pop()){let n=t.getRule(e);n instanceof ey&&s.push({rule:n,stack:t})}for(let f=s.pop();f;f=s.pop()){var l,d,u,h,c;let{ruleScanner:s,findOptions:p}=(l=f.rule,d=e,u=f.stack.endRule,h=n,c=i===o,{ruleScanner:l.compileWhileAG(d,u,h,c),findOptions:0}),m=s.findNextMatchSync(t,i,p);if(m){if(-2!==m.ruleId){r=f.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(a.produce(f.stack,m.captureIndices[0].start),eN(e,t,n,f.stack,a,f.rule.whileCaptures,m.captureIndices),a.produce(f.stack,m.captureIndices[0].end),o=m.captureIndices[0].end,m.captureIndices[0].end>i&&(i=m.captureIndices[0].end,n=!1))}else{r=f.stack.pop();break}}return{stack:r,linePos:i,anchorPosition:o,isFirstLine:n}}(e,t,n,i,r,a);r=o.stack,i=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let h=Date.now();for(;!d;){if(0!==s&&Date.now()-h>s)return new eL(r,!0);!function(){let o=function(e,t,n,i,r,a){let o=function(e,t,n,i,r,a){let{ruleScanner:o,findOptions:s}=eT(r.getRule(e),e,r.endRule,n,i===a),l=o.findNextMatchSync(t,i,s);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,n,i,r,a),s=e.getInjections();if(0===s.length)return o;let l=function(e,t,n,i,r,a,o){let s,l=Number.MAX_VALUE,d=null,u=0,h=a.contentNameScopesList.getScopeNames();for(let a=0,c=e.length;a<c;a++){let c=e[a];if(!c.matcher(h))continue;let{ruleScanner:f,findOptions:p}=eT(t.getRule(c.ruleId),t,null,i,r===o),m=f.findNextMatchSync(n,r,p);if(!m)continue;let g=m.captureIndices[0].start;if(!(g>=l)&&(l=g,d=m.captureIndices,s=m.ruleId,u=c.priority,l===r))break}return d?{priorityMatch:-1===u,captureIndices:d,matchedRuleId:s}:null}(s,e,t,n,i,r,a);if(!l)return o;if(!o)return l;let d=o.captureIndices[0].start,u=l.captureIndices[0].start;return u<d||l.priorityMatch&&u===d?l:o}(e,t,n,i,r,u);if(!o){a.produce(r,l),d=!0;return}let s=o.captureIndices,h=o.matchedRuleId,c=!!s&&s.length>0&&s[0].end>i;if(-1===h){let o=r.getRule(e);a.produce(r,s[0].start),r=r.withContentNameScopesList(r.nameScopesList),eN(e,t,n,r,a,o.endCaptures,s),a.produce(r,s[0].end);let h=r;if(r=r.parent,u=h.getAnchorPos(),!c&&h.getEnterPos()===i){r=h,a.produce(r,l),d=!0;return}}else{let o=e.getRule(h);a.produce(r,s[0].start);let f=r,p=o.getName(t.content,s),m=r.contentNameScopesList.pushAttributed(p,e);if(r=r.push(h,i,u,s[0].end===l,null,m,m),o instanceof ev){eN(e,t,n,r,a,o.beginCaptures,s),a.produce(r,s[0].end),u=s[0].end;let i=o.getContentName(t.content,s),h=m.pushAttributed(i,e);if(r=r.withContentNameScopesList(h),o.endHasBackReferences&&(r=r.withEndRule(o.getEndWithResolvedBackReferences(t.content,s))),!c&&f.hasSameRuleAs(r)){r=r.pop(),a.produce(r,l),d=!0;return}}else if(o instanceof ey){eN(e,t,n,r,a,o.beginCaptures,s),a.produce(r,s[0].end),u=s[0].end;let i=o.getContentName(t.content,s),h=m.pushAttributed(i,e);if(r=r.withContentNameScopesList(h),o.whileHasBackReferences&&(r=r.withEndRule(o.getWhileWithRes
63olvedBackReferences(t.content,s))),!c&&f.hasSameRuleAs(r)){r=r.pop(),a.produce(r,l),d=!0;return}}else if(eN(e,t,n,r,a,o.captures,s),a.produce(r,s[0].end),r=r.pop(),!c){r=r.safePop(),a.produce(r,l),d=!0;return}}s[0].end>i&&(i=s[0].end,n=!1)}()}return new eL(r,!1)}function eT(e,t,n,i,r){return{ruleScanner:e.compileAG(t,n,i,r),findOptions:0}}function eN(e,t,n,i,r,a,o){if(0===a.length)return;let s=t.content,l=Math.min(a.length,o.length),d=[],u=o[0].end;for(let t=0;t<l;t++){let l=a[t];if(null===l)continue;let h=o[t];if(0===h.length)continue;if(h.start>u)break;for(;d.length>0&&d[d.length-1].endPos<=h.start;)r.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop();if(d.length>0?r.produceFromScopes(d[d.length-1].scopes,h.start):r.produce(i,h.start),l.retokenizeCapturedWithRuleId){let t=l.getName(s,o),a=i.contentNameScopesList.pushAttributed(t,e),d=l.getContentName(s,o),u=a.pushAttributed(d,e),c=i.push(l.retokenizeCapturedWithRuleId,h.start,-1,!1,null,a,u),f=e.createOnigString(s.substring(0,h.end));e_(e,f,n&&0===h.start,h.start,c,r,!1,0),Z(f);continue}let c=l.getName(s,o);if(null!==c){let t=(d.length>0?d[d.length-1].scopes:i.contentNameScopesList).pushAttributed(c,e);d.push(new eR(t,h.end))}}for(;d.length>0;)r.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop()}var eR=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function eM(e,t,n,i,r){let a=K(t,eI),o=eS.getCompiledRuleId(n,i,r.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:r,priority:n.priority})}function eI(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let i=n;i<t.length;i++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}(t[i],e))return n=i+1,!0;return!1})}var eP=class{constructor(e,t,n,i,r,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new ew(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=eF(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const e of Object.keys(r))for(const t of K(e,eI))this._tokenTypeMatchers.push({matcher:t.matcher,type:r[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(n){let i=n.injections;if(i)for(let t in i)eM(e,t,i[t],this,n);let r=this._grammarRepository.injections(t);r&&r.forEach(t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&eM(e,t,n,this,n)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=eF(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let i=this._tokenize(e,t,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(e,t,n=0){let i=this._tokenize(e,t,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(e,t,n,i){let r;if(-1===this._rootId&&(this._rootId=eS.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==eD.NULL)r=!1,t.reset();else{let e;r=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),i=this.themeProvider.getDefaults(),a=X.set(0,n.languageId,n.tokenType,null,i.fontStyle,i.foregroundId,i.backgroundId),o=this.getRule(this._rootId).getName(null,null);e=o?e$.createRootAndLookUpScopeName(o,a,this):e$.createRoot("unknown",a),t=new eD(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let a=this.createOnigString(e),o=a.content.length,s=new eH(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=e_(this,a,r,0,t,s,!0,i);return Z(a),{lineLength:o,lineTokens:s,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function eF(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let n=[];for(let i=0,r=t.length;i<r;i++)n[i]=e(t[i]);return n}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let n={};for(let i in t)n[i]=e(t[i]);return n}(t):t}(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName}
63,e.repository.$base=t||e.repository.$self,e}var e$=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let i=t,r=t?.scopePath??null;for(let t of n)i=new e(i,r=U.push(r,t.scopeNames),t.encodedTokenAttributes);return i}static createRoot(t,n){return new e(null,new U(null,t),n)}static createRootAndLookUpScopeName(t,n,i){let r=i.getMetadataForScope(t),a=new U(null,t),o=i.themeProvider.themeMatch(a),s=e.mergeAttributes(n,r,o);return new e(null,a,s)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let i=-1,r=0,a=0;return null!==n&&(i=n.fontStyle,r=n.foregroundId,a=n.backgroundId),X.set(e,t.languageId,t.tokenType,null,i,r,a)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let i=t.split(/ /g),r=this;for(let t of i)r=e._pushAttributed(r,t,n);return r}static _pushAttributed(t,n,i){let r=i.getMetadataForScope(n),a=t.scopePath.push(n),o=i.themeProvider.themeMatch(a),s=e.mergeAttributes(t.tokenAttributes,r,o);return new e(t,a,s)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},eD=class e{constructor(e,t,n,i,r,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=r,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e$.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,i,r,a,o,s){return new e(this,t,n,i,r,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let i=e$.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,e$.fromExtension(i,n.contentNameScopesList))}},eO=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):K(e,eI).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>K(e,eI).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},eH=class{constructor(e,t,n,i){this.balancedBracketSelectors=i,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>
630||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=X.set(n,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(t))}if(i&&(n=X.set(n,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},eU=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,i,r){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,new eP(e,a,t,n,i,r,this,this._onigLib))}return this._grammars.get(e)}},eB=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new eU(H.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(H.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new eO(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,i,r){let a=new en(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,i,r)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,i=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,i)}_grammarForScopeName(e,t=0,n=null,i=null,r=null){return this._syncRegistry.grammarForScopeName(e,t,n,i,r)}},ez=eD.NULL;e.s(["EncodedTokenMetadata",0,X,"FontStyle",0,G,"INITIAL",0,ez,"Registry",0,eB,"Theme",0,H],553788);var eG=e.i(552831);function ej(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},i="string"==typeof e?e:e.name;for(let[e,r]of Object.entries(t?.colorReplacements||{}))"string"==typeof r?n[e]=r:e===i&&Object.assign(n,r);return n}function eW(e,t){return e&&t?.[e?.toLowerCase()]||e}async function eV(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function eq(e){return!e||["plaintext","txt","text","plain"].includes(e)}function eX(e){return"ansi"===e||eq(e)}function eK(e){return"none"===e}function eQ(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(/\s+/g)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function eJ(e,t=!1){if(0===e.length)return[["",0]];let n=e.split(/(\r?\n)/g),i=0,r=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||""):n[e];r.push([a,i]),i+=n[e].length,i+=n[e+1]?.length||0}return r}let eZ="light-dark()",eY=["color","background-color"];function e0(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&G.Italic&&(t["font-style"]="italic"),e.fontStyle&G.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&G.Underline&&n.push("underline"),e.fontStyle&G.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function e1(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let e8=new WeakMap;function e2(e,t){e8.set(e,t)}function e5(e){return e8.get(e)}class e6{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new e6(Object.fromEntries((Array.isArray(t)?t:[t]).map(e=>[e,ez])),e)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,i]=e;this.lang=n,this._stacks={[i]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){var t;let n,i;return t=this._stacks[e],n=[],i=new Set,!function e(t){if(i.has(t))return;i.add(t);let r=t?.nameScopesList?.scopeName;r&&n.push(r),t.parent&&e(t.parent)}(t),n}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}let e3=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){var n;let i,r=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new N(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...a.indexToPos(e),offset:e}}{let t=a.lines[e.line];if(void 0===t)throw new N(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${a.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new N(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:a.posToIndex(e.line,n)}}},a={lines:i=eJ(n=t.source,!0).map(([e])=>e),indexToPos:function(e){if(e===n.length)return{line:i.length-1,character:i[i.length-1].length};let t=e,r=0;for(let e of i){if(t<e.length)break;t-=e.length,r++}return{line:r,character:t}},posToIndex:function(e,t){let n=0;for(let t=0;t<e;t++)n+=i[t].length;return n+t}},o=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));(function(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new N(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=t+1;i<e.length;i++){let t=e[i],r=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;
63if(r||a||o||s){if(r&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new N(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(o),e.set(t.meta,{decorations:o,converter:a,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){let n;if(!this.options.decorations?.length)return;let i=t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]);return(n=Array.from(i instanceof Set?i:new Set(i)).sort((e,t)=>e-t)).length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);if(!t.length)return e;let i=0,r=[];for(let n of t)n>i&&r.push({...e,content:e.content.slice(i,n),offset:e.offset+i}),i=n;return i<e.content.length&&r.push({...e,content:e.content.slice(i),offset:e.offset+i}),r})):e},code(e){if(!this.options.decorations?.length)return;let n=t(this),i=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(i.length!==n.converter.lines.length)throw new N(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function r(e,t,n,r){let o=i[e],s="",l=-1,d=-1;if(0===t&&(l=0),0===n&&(d=0),n===1/0&&(d=o.children.length),-1===l||-1===d)for(let e=0;e<o.children.length;e++)s+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(o.children[e]),-1===l&&s.length===t&&(l=e+1),-1===d&&s.length===n&&(d=e+1);if(-1===l)throw new N(`Failed to find start index for decoration ${JSON.stringify(r.start)}`);if(-1===d)throw new N(`Failed to find end index for decoration ${JSON.stringify(r.end)}`);let u=o.children.slice(l,d);if(r.alwaysWrap||u.length!==o.children.length)if(r.alwaysWrap||1!==u.length||"element"!==u[0].type){let e={type:"element",tagName:"span",properties:{},children:u};a(e,r,"wrapper"),o.children.splice(l,u.length,e)}else a(u[0],r,"token");else a(o,r,"line")}function a(e,t,n){let i=t.properties||{},r=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...i,class:e.properties.class},t.properties?.class&&eQ(e,t.properties.class),e=r(e,n)||e}let o=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)r(t.line,t.character,n.character,e);else if(t.line<n.line){r(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)o.unshift(()=>{var t;i[t=r]=a(i[t],e,"line")});r(n.line,0,n.character,e)}}o.forEach(e=>e())}}}()];function e4(e){let t=function(e){let t=[],n=[],i=[];for(let r of e)switch(r.enforce){case"pre":t.push(r);break;case"post":n.push(r);break;default:i.push(r)}return{pre:t,post:n,normal:i}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...e3]}var e7=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],e9={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function te(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}var tt={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};let tn={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function ti(e,t,n={}){var i,r;let a,o,{theme:s=e.getLoadedThemes()[0]}=n,l=e.resolveLangAlias(n.lang||"text");if(eq(l)||eK(s))return eJ(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:d,colorMap:u}=e.setTheme(s);if("ansi"===l){let e,i,r,a,o,s,l;return e=ej(d,n),i=eJ(t),r=function(e=tt){let t;function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(i){switch(i.type){case"named":return e[i.name];case"rgb":return n(i.rgb);case"table":var r;return r=i.index,function(){if(t)return t;t=[];for(let n=0;n<e7.length;n++)t.push(e[e7[n]]);let i=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let r=0;r<6;r++)for(let a=0;a<6;a++)t.push(n([i[e],i[r],i[a]]));let r=8;for(let e=0;e<24;e++,r+=10)t.push(n([r,r,r]));return t}()[r]}}}}(Object.fromEntries(e7.map(e=>{let t=`terminal.ansi${e[0].toUpperCase()}${e.substring(1)}`;return[e,d.colors?.[t]||tn[e]]}
63))),a=null,o=null,s=new Set,l={parse(e){let t=[],n=0;do{let i=function(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}(e,n),r=i.sequence?e.substring(n,i.startPosition):e.substring(n);if(r.length>0&&t.push({value:r,foreground:a,background:o,decorations:new Set(s)}),i.sequence){let e=function(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let i=Number.parseInt(n);if(!Number.isNaN(i))if(0===i)t.push({type:"resetAll"});else if(i<=9)e9[i]&&t.push({type:"setDecoration",value:e9[i]});else if(i<=29){let e=e9[i-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(i<=37)t.push({type:"setForegroundColor",value:{type:"named",name:e7[i-30]}});else if(38===i){let n=te(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===i)t.push({type:"resetForegroundColor"});else if(i<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:e7[i-40]}});else if(48===i){let n=te(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===i?t.push({type:"resetBackgroundColor"}):53===i?t.push({type:"setDecoration",value:"overline"}):55===i?t.push({type:"resetDecoration",value:"overline"}):i>=90&&i<=97?t.push({type:"setForegroundColor",value:{type:"named",name:e7[i-90+8]}}):i>=100&&i<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:e7[i-100+8]}})}return t}(i.sequence);for(let t of e)"resetAll"===t.type?(a=null,o=null,s.clear()):"resetForegroundColor"===t.type?a=null:"resetBackgroundColor"===t.type?o=null:"resetDecoration"===t.type&&s.delete(t.value);for(let t of e)"setForegroundColor"===t.type?a=t.value:"setBackgroundColor"===t.type?o=t.value:"setDecoration"===t.type&&s.add(t.value)}n=i.position}while(n<e.length)return t}},i.map(t=>l.parse(t[0]).map(n=>{let i,a;n.decorations.has("reverse")?(i=n.background?r.value(n.background):d.bg,a=n.foreground?r.value(n.foreground):d.fg):(i=n.foreground?r.value(n.foreground):d.fg,a=n.background?r.value(n.background):void 0),i=eW(i,e),a=eW(a,e),n.decorations.has("dim")&&(i=function(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(8===e.length){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){let t=e[0],n=e[1],i=e[2],r=e[3],a=Math.round(Number.parseInt(`${r}${r}`,16)/2).toString(16).padStart(2,"0");return`#${t}${t}${n}${n}${i}${i}${a}`}else if(3===e.length){let t=e[0],n=e[1],i=e[2];return`#${t}${t}${n}${n}${i}${i}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(i));let o=G.None;return n.decorations.has("bold")&&(o|=G.Bold),n.decorations.has("italic")&&(o|=G.Italic),n.decorations.has("underline")&&(o|=G.Underline),n.decorations.has("strikethrough")&&(o|=G.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:a,fontStyle:o}}))}let h=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==h.name)throw new N(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${h.name}"`);if(!n.grammarState.themes.includes(d.name))throw new N(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${d.name}"`)}return o=new e6((a=tr(t,i=h,r=d,u,n)).stateStack,i.name,r.name),e2(a.tokens,o),a.tokens}function tr(e,t,n,i,r){let a=ej(n,r),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=r,l=eJ(e),d=r.grammarState?function(e,t){if(!(e instanceof e6))throw new N("Invalid grammar state");return e.getInternalStack(t)}(r.grammarState,n.name)??ez:null!=r.grammarContextCode?tr(r.grammarContextCode,t,n,i,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:ez,u=[],h=[];for(let e=0,c=l.length;e<c;e++){let c,f,[p,m]=l[e];if(""===p){u=[],h.push([]);continue}if(o>0&&p.length>=o){u=[],h.push([{content:p,offset:m,color:"",fontStyle:0}]);continue}r.includeExplanation&&(c=t.tokenizeLine(p,d,s).tokens,f=0);let g=t.tokenizeLine2(p,d,s),b=g.tokens.length/2;for(let e=0;e<b;e++){let t=g.tokens[2*e],o=e+1<b?g.tokens[2*e+2]:p.length;if(t===o)continue;let s=g.tokens[2*e+1],l=eW(i[X.getForeground(s)],a),d=X.getFontStyle(s),h={content:p.substring(t,o),offset:m+t,color:l,fontStyle:d};if(r.includeExplanation){let e=[];
63if("scopeName"!==r.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}h.explanation=[];let i=0;for(;t+i<o;){let t=c[f],n=p.substring(t.startIndex,t.endIndex);i+=n.length,h.explanation.push({content:n,scopes:"scopeName"===r.includeExplanation?t.scopes.map(e=>({scopeName:e})):function(e,t){let n=[];for(let i=0,r=t.length;i<r;i++){let r=t[i];n[i]={scopeName:r,themeMatches:function(e,t,n){let i=[];for(let{selectors:r,settings:a}of e)for(let e of r)if(function(e,t,n){if(!ta(e[e.length-1],t))return!1;let i=e.length-2,r=n.length-1;for(;i>=0&&r>=0;)ta(e[i],n[r])&&(i-=1),r-=1;return -1===i}(e,t,n)){i.push(a);break}return i}(e,r,t.slice(0,i))}}return n}(e,t.scopes)}),f+=1}}u.push(h)}h.push(u),u=[],d=g.ruleStack}return{tokens:h,stateStack:d}}function ta(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function to(e,t,n){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),r=i.map(i=>{let r=ti(e,t,{...n,theme:i.theme}),a=e5(r);return{tokens:r,state:a,theme:"string"==typeof i.theme?i.theme:i.theme.name}}),a=function(...e){let t=e.map(()=>[]),n=e.length;for(let i=0;i<e[0].length;i++){let r=e.map(e=>e[i]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=r.map(()=>0),s=r.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=r[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...r.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,r)=>{let o={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:s,offset:l,...d}=e[t][r];o.variants[i[n].color]=d}),o})),s=r[0].state?new e6(Object.fromEntries(r.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),r[0].state.lang):void 0;return s&&e2(o,s),o}function ts(e,t,n){let i,r,a,o,s,l;if("themes"in n){let{defaultColor:d="light",cssVariablePrefix:u="--shiki-",colorsRendering:h="css-vars"}=n,c=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===d?-1:+(t.color===d));if(0===c.length)throw new N("`themes` option must not be empty");let f=to(e,t,n);if(l=e5(f),d&&eZ!==d&&!c.find(e=>e.color===d))throw new N(`\`themes\` option must contain the defaultColor key \`${d}\``);let p=c.map(t=>e.getTheme(t.theme)),m=c.map(e=>e.color);a=f.map(e=>e.map(e=>(function(e,t,n,i,r="css-vars"){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>e0(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),l={},d=(e,i)=>{let r="color"===i?"":"background-color"===i?"-bg":`-${i}`;
63return n+t[e]+("color"===i?"":r)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||"inherit";if(0===n&&i&&eY.includes(a))if(i===eZ&&o.length>1){let e=t.findIndex(e=>"light"===e),i=t.findIndex(e=>"dark"===e);if(-1===e||-1===i)throw new N('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][a]||"inherit",h=o[i][a]||"inherit";l[a]=`light-dark(${u}, ${h})`,"css-vars"===r&&(l[d(n,a)]=s)}else l[a]=s;else"css-vars"===r&&(l[d(n,a)]=s)}}),a.htmlStyle=l,a})(e,m,u,d,h))),l&&e2(a,l);let g=c.map(e=>ej(e.theme,n));r=tl(c,p,g,u,d,"fg",h),i=tl(c,p,g,u,d,"bg",h),o=`shiki-themes ${p.map(e=>e.name).join(" ")}`,s=d?void 0:[r,i].join(";")}else if("theme"in n){let s=ej(n.theme,n);a=ti(e,t,n);let d=e.getTheme(n.theme);i=eW(d.bg,s),r=eW(d.fg,s),o=d.name,l=e5(a)}else throw new N("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:r,bg:i,themeName:o,rootStyle:s,grammarState:l}}function tl(e,t,n,i,r,a,o){return e.map((s,l)=>{let d=eW(t[l][a],n[l])||"inherit",u=`${i+s.color}${"bg"===a?"-bg":""}:${d}`;if(0===l&&r){if(r===eZ&&e.length>1){let i=e.findIndex(e=>"light"===e.color),r=e.findIndex(e=>"dark"===e.color);if(-1===i||-1===r)throw new N('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let o=eW(t[i][a],n[i])||"inherit",s=eW(t[r][a],n[r])||"inherit";return`light-dark(${o}, ${s});${u}`}return d}return"css-vars"===o?u:null}).filter(e=>!!e).join(";")}function td(e,t,n,i={meta:{},options:n,codeToHast:(t,n)=>td(e,t,n),codeToTokens:(t,n)=>ts(e,t,n)}){let r=t;for(let e of e4(n))r=e.preprocess?.call(i,r,n)||r;let{tokens:a,fg:o,bg:s,themeName:l,rootStyle:d,grammarState:u}=ts(e,r,n),{mergeWhitespaces:h=!0,mergeSameStyleTokens:c=!1}=n;!0===h?a=a.map(e=>{let t,n=[],i="";return e.forEach((r,a)=>{let o=!(r.fontStyle&&(r.fontStyle&G.Underline||r.fontStyle&G.Strikethrough));o&&r.content.match(/^\s+$/)&&e[a+1]?(void 0===t&&(t=r.offset),i+=r.content):i?(o?n.push({...r,offset:t,content:i+r.content}):n.push({content:i,offset:t},r),t=void 0,i=""):n.push(r)}),n}):"never"===h&&(a=a.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,i,r]=t;if(!n&&!r)return e;let a=[{...e,offset:e.offset+n.length,content:i}];return n&&a.unshift({content:n,offset:e.offset}),r&&a.push({content:r,offset:e.offset+n.length+i.length}),a}))),c&&(a=a.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t[t.length-1],i=e1(e.htmlStyle||e0(e)),r=e1(n.htmlStyle||e0(n)),a=e.fontStyle&&(e.fontStyle&G.Underline||e.fontStyle&G.Strikethrough),o=n.fontStyle&&(n.fontStyle&G.Underline||n.fontStyle&G.Strikethrough);a||o||i!==r?t.push({...n}):e.content+=n.content}return t}));let f={...i,get source(){return r}};for(let e of e4(n))a=e.tokens?.call(f,a)||a;return function(e,t,n,i=e5(e)){let r=e4(t),a=[],o={type:"root",children:[]},{structure:s="classic",tabindex:l="0"}=t,d={class:`shiki ${t.themeName||""}`};for(let[e,n]of(!1!==t.rootStyle&&(null!=t.rootStyle?d.style=t.rootStyle:d.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(d.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(d[e]=n);let u={type:"element",tagName:"pre",properties:d,children:[],data:t.data},h={type:"element",tagName:"code",properties:{},children:a},c=[],f={...n,structure:s,addClassToHast:eQ,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return h},get lines(){return c}};if(e.forEach((e,t)=>{t&&("inline"===s?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===s&&a.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},i=0;for(let a of e){let e={type:"element",tagName:"span",properties:{...a.htmlAttrs},children:[{type:"text",value:a.content}]},l=e1(a.htmlStyle||e0(a));for(let o of(l&&(e.properties.style=l),r))e=o?.span?.call(f,e,t+1,i,n,a)||e;"inline"===s?o.children.push(e):"classic"===s&&n.children.push(e),i+=a.content.length}if("classic"===s){for(let e of r)n=e?.line?.call(f,n,t+1)||n;c.push(n),a.push(n)}else"inline"===s&&c.push(n)}),"classic"===s){for(let e of r)h=e?.code?.call(f,h)||h;for(let e of(u.children.push(h),r))u=e?.pre?.call(f,u)||u;o.children.push(u)}else if("inline"===s){let e=[],t={type:"element",tagName:"span",properties:{class:"line"}
63,children:[]};for(let n of o.children)"element"===n.type&&"br"===n.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===n.type||"text"===n.type)&&t.children.push(n);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(let e of r)n=e?.code?.call(f,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=n.children[e];"element"===t.type&&o.children.push(...t.children)}}let p=o;for(let e of r)p=e?.root?.call(f,p)||p;return i&&e2(p,i),p}(a,{...n,fg:o,bg:s,themeName:l,rootStyle:!1!==n.rootStyle&&(n.rootStyle??d)},f,u)}let tu=eG.toHtml,th="__shiki_resolved";function tc(e){if(e?.[th])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:i}=t;if(!n||!i){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(i=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!i&&t?.colors?.["editor.foreground"]&&(i=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),i||(i="light"===t.type?"#333333":"#bbbbbb"),n||(n="light"===t.type?"#fffffe":"#1e1e1e"),t.fg=i,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let r=0,a=new Map;function o(e){if(a.has(e))return a.get(e);r+=1;let n=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),i=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!i)return e;let r={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,r.settings.foreground=n}if(i){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,r.settings.background=n}return r}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,th,{enumerable:!1,writable:!1,value:!0}),t}async function tf(e){return Array.from(new Set((await Promise.all(e.filter(e=>!eX(e)).map(async e=>await eV(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function tp(e){return(await Promise.all(e.map(async e=>eK(e)?null:tc(await eV(e))))).filter(e=>!!e)}class tm extends Error{constructor(e){super(e),this.name="ShikiError"}}function tg(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new tm(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class tb extends eB{constructor(e,t,n,i={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=i,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=tc(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=H.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=tg(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let i=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(i.name=e.name,this._resolvedGrammars.set(e.name,i),e.aliases&&e.aliases.forEac
63h(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>{if(!t)return!1;let i=t.embeddedLanguages||t.embeddedLangs;return i?.some(e=>n.map(([e])=>e).includes(e))}).filter(e=>!n.includes(e));throw new tm(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}}class tv{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let i=t.slice(0,e).join(".");n=[...n,...this._injections.get(i)||[]]}return n}}let ty=0;async function tS(e){e.engine||function(e,t=3){if(!(t>3))if(1)console.trace(`[SHIKI DEPRECATE]: ${e}`);else throw Error(`[SHIKI DEPRECATE]: ${e}`)}("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,i]=await Promise.all([tp(e.themes||[]),tf(e.langs||[]),e.engine]);return function(e){let t;ty+=1,!1!==e.warnings&&ty>=10&&ty%10==0&&console.warn(`[Shiki] ${ty} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!e.engine)throw new tm("`engine` option is required for synchronous mode");let i=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(tc),a=new tb(new tv(e.engine,i),r,i,e.langAlias);function o(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};d();let t=a.getTheme(e);if(!t)throw new tm(`Theme \`${e}\` not found, you may need to load it first`);return t}function s(...e){d(),a.loadLanguages(e.flat(1))}function l(...e){for(let t of(d(),e.flat(1)))a.loadTheme(t)}function d(){if(n)throw new tm("Shiki instance has been disposed")}function u(){n||(n=!0,a.dispose(),ty-=1)}return{setTheme:function(e){d();let n=o(e);return t!==e&&(a.setTheme(n),t=e),{theme:n,colorMap:a.getColorMap()}},getTheme:o,getLanguage:function(e){d();let t=a.getGrammar("string"==typeof e?e:e.name);if(!t)throw new tm(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return d(),a.getLoadedThemes()},getLoadedLanguages:function(){return d(),a.getLoadedLanguages()},resolveLangAlias:function(t){return tg(t,e.langAlias)},loadLanguage:async function(...e){return s(await tf(e))},loadLanguageSync:s,loadTheme:async function(...e){return d(),l(await tp(e))},loadThemeSync:l,dispose:u,[Symbol.dispose]:u}}({...e,themes:t,langs:n,engine:i})}async function tk(e){let t=await tS(e);return{getLastGrammarState:(...e)=>(function(...e){if(2===e.length)return e5(e[1]);let[t,n,i={}]=e,{lang:r="text",theme:a=t.getLoadedThemes()[0]}=i;if(eq(r)||eK(a))throw new N("Plain language does not have grammar state");if("ansi"===r)throw new N("ANSI language does not have grammar state");
63let{theme:o,colorMap:s}=t.setTheme(a),l=t.getLanguage(r);return new e6(tr(n,l,o,s,i).stateStack,l.name,o.name)})(t,...e),codeToTokensBase:(e,n)=>ti(t,e,n),codeToTokensWithThemes:(e,n)=>to(t,e,n),codeToTokens:(e,n)=>ts(t,e,n),codeToHast:(e,n)=>td(t,e,n),codeToHtml:(e,n)=>(function(e,t,n){let i={meta:{},options:n,codeToHast:(t,n)=>td(e,t,n),codeToTokens:(t,n)=>ts(e,t,n)},r=tu(td(e,t,n,i));for(let e of e4(n))r=e.postprocess?.call(i,r,n)||r;return r})(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function tC({name:e,load:t,colorScheme:n,collection:i,displayName:r}){var a;return{name:e,colorScheme:n,collection:i,displayName:r,load:(a=t,async()=>tc(v(await a())))}}let tA=["ayu-light","catppuccin-latte","everforest-light","github-light","github-light-default","github-light-high-contrast","gruvbox-light-hard","gruvbox-light-medium","gruvbox-light-soft","horizon-bright","kanagawa-lotus","light-plus","material-theme-lighter","min-light","night-owl-light","one-light","rose-pine-dawn","slack-ochin","snazzy-light","solarized-light","vitesse-light"],tx=new Set(tA),tw={andromeeda:()=>e.A(294818),"aurora-x":()=>e.A(508462),"ayu-dark":()=>e.A(816354),"ayu-light":()=>e.A(56627),"ayu-mirage":()=>e.A(31320),"catppuccin-frappe":()=>e.A(688597),"catppuccin-latte":()=>e.A(634622),"catppuccin-macchiato":()=>e.A(258058),"catppuccin-mocha":()=>e.A(71719),"dark-plus":()=>e.A(280388),dracula:()=>e.A(220472),"dracula-soft":()=>e.A(853248),"everforest-dark":()=>e.A(546292),"everforest-light":()=>e.A(325134),"github-dark":()=>e.A(256025),"github-dark-default":()=>e.A(524750),"github-dark-dimmed":()=>e.A(192591),"github-dark-high-contrast":()=>e.A(416212),"github-light":()=>e.A(582849),"github-light-default":()=>e.A(221730),"github-light-high-contrast":()=>e.A(100186),"gruvbox-dark-hard":()=>e.A(991678),"gruvbox-dark-medium":()=>e.A(761690),"gruvbox-dark-soft":()=>e.A(477513),"gruvbox-light-hard":()=>e.A(815190),"gruvbox-light-medium":()=>e.A(990738),"gruvbox-light-soft":()=>e.A(57113),horizon:()=>e.A(489328),"horizon-bright":()=>e.A(670820),houston:()=>e.A(566138),"kanagawa-dragon":()=>e.A(715687),"kanagawa-lotus":()=>e.A(293475),"kanagawa-wave":()=>e.A(925670),laserwave:()=>e.A(151812),"light-plus":()=>e.A(20054),"material-theme":()=>e.A(850431),"material-theme-darker":()=>e.A(142786),"material-theme-lighter":()=>e.A(691343),"material-theme-ocean":()=>e.A(566718),"material-theme-palenight":()=>e.A(611549),"min-dark":()=>e.A(660721),"min-light":()=>e.A(438428),monokai:()=>e.A(387885),"night-owl":()=>e.A(400104),"night-owl-light":()=>e.A(786042),nord:()=>e.A(375059),"one-dark-pro":()=>e.A(576184),"one-light":()=>e.A(724673),plastic:()=>e.A(410892),poimandres:()=>e.A(615900),red:()=>e.A(689654),"rose-pine":()=>e.A(602348),"rose-pine-dawn":()=>e.A(531990),"rose-pine-moon":()=>e.A(449175),"slack-dark":()=>e.A(55348),"slack-ochin":()=>e.A(704566),"snazzy-light":()=>e.A(409865),"solarized-dark":()=>e.A(194470),"solarized-light":()=>e.A(844886),"synthwave-84":()=>e.A(988294),"tokyo-night":()=>e.A(160168),vesper:()=>e.A(289515),"vitesse-black":()=>e.A(156021),"vitesse-dark":()=>e.A(468881),"vitesse-light":()=>e.A(108315)};function tE(e){return tC({name:e,collection:"shiki",colorScheme:tx.has(e)?"light":"dark",load:tw[e]})}let tL=_({themes:Object.freeze([...tA.map(e=>tE(e)),...["andromeeda","aurora-x","ayu-dark","ayu-mirage","catppuccin-frappe","catppuccin-macchiato","catppuccin-mocha","dark-plus","dracula","dracula-soft","everforest-dark","github-dark","github-dark-default","github-dark-dimmed","github-dark-high-contrast","gruvbox-dark-hard","gruvbox-dark-medium","gruvbox-dark-soft","horizon","houston","kanagawa-dragon","kanagawa-wave","laserwave","material-theme","material-theme-darker","material-theme-ocean","material-theme-palenight","min-dark","monokai","night-owl","nord","one-dark-pro","plastic","poimandres","red","rose-pine","rose-pine-moon","slack-dark","solarized-dark","synthwave-84","tokyo-night","vesper","vitesse-black","vitesse-dark"].map(e=>tE(e))])});function t_(e){if(h())throw Error(`Theme "${e}" cannot be resolved from a worker context. Themes must be pre-resolved on the main thread and passed to the worker via the resolvedLanguages parameter.`);if(w.hasRegisteredTheme(e))return;let t=tL.getTheme(e);if(null!=t)return void w.registerThemeIfAbsent(t.name,t.load);throw Error(`No valid theme loader registered for "${e}"`)}function tT(e,t){if(t.name!==e)throw Error(`resolvedTheme: themeName: ${e} does not match theme.name: ${t.name}`)}async function tN(e){t_(e);let t=await w.resolveTheme(e);return tT(e,t),t}e.s(["prepareThemeResolution",0,t_,"validateResolvedThemeName",0,tT],820408);let tR=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>e.A(294818)},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>e.A(508462)},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>e.A(816354)},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>e.A(56627)},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>e.A(31320)}
63,{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>e.A(688597)},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>e.A(634622)},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>e.A(258058)},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>e.A(71719)},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>e.A(280388)},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>e.A(220472)},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>e.A(853248)},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>e.A(546292)},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>e.A(325134)},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>e.A(256025)},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>e.A(524750)},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>e.A(192591)},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>e.A(416212)},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>e.A(582849)},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>e.A(221730)},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>e.A(100186)},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>e.A(991678)},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>e.A(761690)},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>e.A(477513)},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>e.A(815190)},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>e.A(990738)},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>e.A(57113)},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>e.A(489328)},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:()=>e.A(670820)},{id:"houston",displayName:"Houston",type:"dark",import:()=>e.A(566138)},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>e.A(715687)},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>e.A(293475)},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>e.A(925670)},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>e.A(151812)},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>e.A(20054)},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>e.A(850431)},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>e.A(142786)},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>e.A(691343)},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>e.A(566718)},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>e.A(611549)},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>e.A(660721)},{id:"min-light",displayName:"Min Light",type:"light",import:()=>e.A(438428)},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>e.A(387885)},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>e.A(400104)},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>e.A(786042)},{id:"nord",displayName:"Nord",type:"dark",import:()=>e.A(375059)},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>e.A(576184)},{id:"one-light",displayName:"One Light",type:"light",import:()=>e.A(724673)},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>e.A(410892)},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>e.A(615900)},{id:"red",displayName:"Red",type:"dark",import:()=>e.A(689654)},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>e.A(602348)},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>e.A(531990)},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>e.A(449175)},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>e.A(55348)},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>e.A(704566)},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>e.A(409865)},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>e.A(194470)},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>e.A(844886)}
63,{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>e.A(988294)},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>e.A(160168)},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>e.A(289515)},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>e.A(156021)},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>e.A(468881)},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>e.A(108315)}].map(e=>[e.id,e.import]));var tM=e.i(221168);class tI extends Error{constructor(e){super(e),this.name="ShikiError"}}function tP(){return"u">typeof performance?performance.now():Date.now()}let tF=(e,t)=>e+(t-e%t)%t;async function t$(e){let t,n,i={};function r(e){n=e,i.HEAPU8=new Uint8Array(e),i.HEAPU32=new Uint32Array(e)}let a="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function o(e,t){return e?function(e,t,n=1024){let i=t+n,r=t;for(;e[r]&&!(r>=i);)++r;if(r-t>16&&e.buffer&&a)return a.decode(e.subarray(t,r));let o="";for(;t<r;){let n=e[t++];if(!(128&n)){o+=String.fromCharCode(n);continue}let i=63&e[t++];if((224&n)==192){o+=String.fromCharCode((31&n)<<6|i);continue}let r=63&e[t++];if((n=(240&n)==224?(15&n)<<12|i<<6|r:(7&n)<<18|i<<12|r<<6|63&e[t++])<65536)o+=String.fromCharCode(n);else{let e=n-65536;o+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return o}(i.HEAPU8,e,t):""}let s={emscripten_get_now:tP,emscripten_memcpy_big:function(e,t,n){i.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){let a=i.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let i=1;i<=4;i*=2){let o=a*(1+.2/i);if(o=Math.min(o,e+0x6000000),function(e){try{return t.grow(e-n.byteLength+65535>>>16),r(t.buffer),1}catch{}}(Math.min(0x80000000,tF(Math.max(e,o),65536))))return!0}return!1},fd_write:()=>0};async function l(){let n=await e({env:s,wasi_snapshot_preview1:s});r((t=n.memory).buffer),Object.assign(i,n),i.UTF8ToString=o}return await l(),i}var tD=Object.defineProperty,tO=(e,t,n)=>{let i;return(i="symbol"!=typeof t?t+"":t)in e?tD(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n};let tH=null;class tU{constructor(e){tO(this,"utf16Length"),tO(this,"utf8Length"),tO(this,"utf16Value"),tO(this,"utf8Value"),tO(this,"utf16OffsetToUtf8"),tO(this,"utf8OffsetToUtf16");const t=e.length,n=tU._utf8ByteLength(e),i=n!==t,r=i?new Uint32Array(t+1):null;i&&(r[t]=n);const a=i?new Uint32Array(n+1):null;i&&(a[n]=t);const o=new Uint8Array(n);let s=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let d=l,u=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(d=(l-55296<<10)+65536|t-56320,u=!0)}i&&(r[n]=s,u&&(r[n+1]=s),d<=127?a[s+0]=n:d<=2047?(a[s+0]=n,a[s+1]=n):d<=65535?(a[s+0]=n,a[s+1]=n,a[s+2]=n):(a[s+0]=n,a[s+1]=n,a[s+2]=n,a[s+3]=n)),d<=127?o[s++]=d:(d<=2047?o[s++]=192|(1984&d)>>>6:(d<=65535?o[s++]=224|(61440&d)>>>12:(o[s++]=240|(1835008&d)>>>18,o[s++]=128|(258048&d)>>>12),o[s++]=128|(4032&d)>>>6),o[s++]=128|(63&d)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=r,this.utf8OffsetToUtf16=a}static _utf8ByteLength(e){let t=0;for(let n=0,i=e.length;n<i;n++){let r=e.charCodeAt(n),a=r,o=!1;if(r>=55296&&r<=56319&&n+1<i){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(r-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let tB=class e{constructor(t){if(tO(this,"id",++e.LAST_ID),tO(this,"_onigBinding"),tO(this,"content"),tO(this,"utf16Length"),tO(this,"utf8Length"),tO(this,"utf16OffsetToUtf8"),tO(this,"utf8OffsetToUtf16"),tO(this,"ptr"),!tH)throw new tI("Must invoke loadWasm first.");this._onigBinding=tH,this.content=t;const n=new tU(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=tH.omalloc(1e4)),e._sharedPtrInUse=!0,tH.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(tH)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};tO(tB,"LAST_ID",0),tO(tB,"_sharedPtr",0),tO(tB,"_sharedPtrInUse",!1);class tz{constructor(e){if(tO(this,"_onigBinding"),tO(this,"_ptr"),!tH)throw new tI("Must invoke loadWasm first.");const t=[],n=[];for(let i=0,r=e.length;i<r;i++){const r=new tU(e[i]);t[i]=r.createString(tH),n[i]=r.utf8Length}const i=tH.omalloc(4*e.length);tH.HEAPU32.set(t,i/4);const r=tH.omalloc(4*e.length);tH.HEAPU32.set(n,r/4);const a=tH.createOnigScanner(i,r,e.length);for(let n=0,i=e.length;n<i;n++)tH.ofree(t[n]);tH.ofree(r),tH.ofree(i),0===a&&function(e){throw new tI(e.UTF8ToString(e.getLastO
63nigError()))}(tH),this._onigBinding=tH,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let i=0;if("number"==typeof n&&(i=n),"string"==typeof e){e=new tB(e);let n=this._findNextMatchSync(e,t,!1,i);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,i)}_findNextMatchSync(e,t,n,i){let r=this._onigBinding,a=r.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),i);if(0===a)return null;let o=r.HEAPU32,s=a/4,l=o[s++],d=o[s++],u=[];for(let t=0;t<d;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),i=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:i,length:i-n}}return{index:l,captureIndices:u}}}function tG(e){return t=>WebAssembly.instantiate(e,t)}async function tj(e){return e&&await (t||(t=async function(){tH=await t$(async t=>{let n=e;if("function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),"function"==typeof n.instantiator)n=await n.instantiator(t);else if("function"==typeof n.default)n=await n.default(t);else{var i,r,a,o;if(void 0!==n.data&&(n=n.data),i=n,"u">typeof Response&&i instanceof Response){n="function"==typeof WebAssembly.instantiateStreaming?await (a=n,e=>WebAssembly.instantiateStreaming(a,e))(t):await (o=n,async e=>{let t=await o.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(r=n,"u">typeof ArrayBuffer&&(r instanceof ArrayBuffer||ArrayBuffer.isView(r))||void 0!==tM.Buffer&&tM.Buffer.isBuffer?.(r)||"u">typeof SharedArrayBuffer&&r instanceof SharedArrayBuffer||"u">typeof Uint32Array&&r instanceof Uint32Array||n instanceof WebAssembly.Module)?n=await tG(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await tG(n.default)(t))}return"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())),{createScanner:e=>new tz(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new tB(e)}}let tW=(i=(k={langs:m,themes:tR,engine:()=>tj(e.A(421617))}).langs,r=k.themes,a=k.engine,async function(e){function t(t){if("string"==typeof t){if(eX(t=e.langAlias?.[t]||t))return[];let n=i[t];if(!n)throw new N(`Language \`${t}\` is not included in this bundle. You may want to load it from external source.`);return n}return t}function n(e){if(eK(e))return"none";if("string"==typeof e){let t=r[e];if(!t)throw new N(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>n(e)),s=(e.langs??[]).map(e=>t(e)),l=await tk({engine:e.engine??a(),...e,themes:o,langs:s});return{...l,loadLanguage:(...e)=>l.loadLanguage(...e.map(t)),loadTheme:(...e)=>l.loadTheme(...e.map(n)),getBundledLanguages:()=>i,getBundledThemes:()=>r}});function tV(e){if(1!=[...e].length)throw Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}let tq=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),tX=String.raw;function tK(e,t){if(null==e)throw Error(t??"Value expected");return e}let tQ=tX`\[\^?`,tJ=`c.? | C(?:-.?)?|${tX`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${tX`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${tX`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${tX`o\{[^\}]*\}?`}|${tX`\d{1,3}`}`,tZ=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,tY=RegExp(tX`
64  \\ (?:
65    ${tJ}
66    | [gk]<[^>]*>?
67    | [gk]'[^']*'?
68    | .
69  )
70  | \( (?:
71    \? (?:
72      [:=!>({]
73      | <[=!]
74      | <[^>]*>
75      | '[^']*'
76      | ~\|?
77      | #(?:[^)\\]|\\.?)*
78      | [^:)]*[:)]
79    )?
80    | \*[^\)]*\)?
81  )?
82  | (?:${tZ.source})+
83  | ${tQ}
84  | .
85`.replace(/\s+/g,""),"gsu"),t0=RegExp(tX`
86  \\ (?:
87    ${tJ}
88    | .
89  )
90  | \[:(?:\^?\p{Alpha}+|\^):\]
91  | ${tQ}
92  | &&
93  | .
94`.replace(/\s+/g,""),"gsu");function t1(e,{inCharClass:t}){let n=e[1];if("c"===n||"C"===n){var i,r=e;let t="c"===r[1]?r[2]:r[3];if(!t||!/[A-Za-z]/.test(t))throw Error(`Unsupported control character "${r}"`);return t5(tV(t.toUpperCase())-64,r)}if("dDhHsSwW".includes(n)){let t;return t3({d:"digit",h:"hex",s:"space",w:"word"}[t=(i=e)[1].toLowerCase()],i,{negate:i[1]!==t})}if(e.startsWith(tX`\o{`))throw Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);
94if(/^\\[pP]\{/.test(e)){if(3===e.length)throw Error(`Incomplete or invalid Unicode property "${e}"`);return function(e){let{p:t,neg:n,value:i}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return t3("property",e,{value:i,negate:"P"===t&&!n||"p"===t&&!!n})}(e)}if(/^\\x[89A-Fa-f]\p{AHex}/u.test(e))try{let t=e.split(/\\x/).slice(1).map(e=>parseInt(e,16)),n=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(t)),i=new TextEncoder;return[...n].map(e=>{let t=[...i.encode(e)].map(e=>`\\x${e.toString(16)}`).join("");return t5(tV(e),t)})}catch{throw Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if("u"===n||"x"===n)return t5(function(e){if(/^(?:\\u(?!\p{AHex}{4})|\\x(?!\p{AHex}{1,2}|\{\p{AHex}{1,8}\}))/u.test(e))throw Error(`Incomplete or invalid escape "${e}"`);return parseInt("{"===e[2]?/^\\x\{\s*(?<hex>\p{AHex}+)/u.exec(e).groups.hex:e.slice(2),16)}(e),e);if(ne.has(n))return t5(ne.get(n),e);if(/\d/.test(n))return{type:"EscapedNumber",inCharClass:t,raw:e};if("\\"===e)throw Error(tX`Incomplete escape "\"`);if("M"===n)throw Error(`Unsupported meta "${e}"`);if(2==[...e].length)return t5(e.codePointAt(1),e);throw Error(`Unexpected escape "${e}"`)}function t8(e,t){return{type:"Assertion",kind:e,raw:t}}function t2(e){return{type:"Backreference",raw:e}}function t5(e,t){return{type:"Character",value:e,raw:t}}function t6(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function t3(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function t4(e,t,n={}){return"keep"===e?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:tK(n.flags),raw:t}}function t7(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}let t9=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),ne=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function nt(e){let t=null,n,i;if("{"===e[0]){let{minStr:r,maxStr:a}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups;if(+r>1e5||a&&+a>1e5)throw Error("Quantifier value unsupported in Oniguruma");if((n=+r)>(i=void 0===a?+r:""===a?1/0:+a)&&(t="possessive",[n,i]=[i,n]),e.endsWith("?")){if("possessive"===t)throw Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=+("+"===e[0]),i="?"===e[0]?1:1/0,t="+"===e[1]?"possessive":"?"===e[1]?"lazy":"greedy";return{type:"Quantifier",kind:t,min:n,max:i,raw:e}}function nn(e){let t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function ni(e,t){if(!Array.isArray(e.body))throw Error("Expected node with body array");if(1!==e.body.length)return!1;let n=e.body[0];return!t||Object.keys(t).every(e=>t[e]===n[e])}let nr=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function na(e,t={}){var n;let i={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=function(e,t={}){let n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if("string"!=typeof e)throw Error("String expected as pattern");let i=function(e){let t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){let i=e[n];if(!"imxDPSWy".includes(i))throw Error(`Invalid flag "${i}"`);if("y"===i){if(!/^y{[gw]}/.test(e.slice(n)))throw Error('Invalid or unspecified flag "y" mode');t.textSegmentMode="g"===e[n+2]?"grapheme":"word",n+=3;continue}t[({i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"})[i]]=!0}return t}(n.flags),r=[i.extended],a={captureGroup:n.rules.captureGroup,getCurrentModX:()=>r.at(-1),numOpenGroups:0,popModX(){r.pop()},pushModX(e){r.push(e)},replaceCurrentModX(e){r[r.length-1]=e},singleline:n.rules.singleline},o=[],s;for(tY.lastIndex=0;s=tY.exec(e);){let t=function(e,t,n,i){let[r,a]=n;if("["===n||"[^"===n){let e=function(e,t,n){let i=[t6("^"===t[1],t)],r=1,a;for(t0.lastIndex=n;a=t0.exec(e);){let e=a[0];if("["===e[0]&&":"!==e[1])r++,i.push(t6("^"===e[1],e));else if("]"===e){if("CharacterClassOpen"===i.at(-1).type)i.push(t5(93,e));else if(r--,i.push({type:"CharacterClassClose",raw:e}),!r)break}else{let t=function(e){if("\\"===e[0])return t1(e,{inCharClass:!0});if("["===e[0]){let t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!tq.has(t.groups.name))throw Error(`Invalid POSIX class "${e}"`);return t3("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return"-"===e?{type:"CharacterClassHyphen",raw:e}:"&&"===e?{type:"CharacterClassIntersector",raw:e}:t5(tV(e),e)}(e);Array.isArray(t)?i.push(...t):i.push(t)}}return{tokens:i,lastIndex:t0.lastIndex||e.length}}(t,n,i);return{tokens:e.tokens,lastIndex:e.lastIndex}}if("\\"===r){if("AbBGyYzZ".includes(a))return{token:t8(n,n)};
94if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:{type:"Subroutine",raw:n}}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw Error(`Invalid group name "${n}"`);return{token:t2(n)}}if("K"===a)return{token:t4("keep",n)};if("N"===a||"R"===a)return{token:t3("newline",n,{negate:"N"===a})};if("O"===a)return{token:t3("any",n)};if("X"===a)return{token:t3("text_segment",n)};let e=t1(n,{inCharClass:!1});return Array.isArray(e)?{tokens:e}:{token:e}}if("("===r){if("*"===a)return{token:function(e){let t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw Error(`Incomplete or invalid named callout "${e}"`);let{name:n,tag:i,args:r}=t.groups;if(!n)throw Error(`Invalid named callout "${e}"`);if(""===i)throw Error(`Named callout tag with empty value not allowed "${e}"`);let a=r?r.split(",").filter(e=>""!==e).map(e=>/^[+-]?\d+$/.test(e)?+e:e):[],[o,s,l]=a,d=t9.has(n)?n.toLowerCase():"custom";switch(d){case"fail":case"mismatch":case"skip":if(a.length>0)throw Error(`Named callout arguments not allowed "${a}"`);break;case"error":if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if("string"==typeof o)throw Error(`Named callout argument must be a number "${o}"`);break;case"max":if(!a.length||a.length>2)throw Error(`Named callout must have one or two arguments "${a}"`);if("string"==typeof o&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if(2===a.length&&("number"==typeof s||!/^[<>X]$/.test(s)))throw Error(`Named callout optional argument two must be '<', '>', or 'X' "${s}"`);break;case"count":case"total_count":if(a.length>1)throw Error(`Named callout allows only one argument "${a}"`);if(1===a.length&&("number"==typeof o||!/^[<>X]$/.test(o)))throw Error(`Named callout optional argument must be '<', '>', or 'X' "${o}"`);break;case"cmp":if(3!==a.length)throw Error(`Named callout must have three arguments "${a}"`);if("string"==typeof o&&!/^[A-Za-z_]\w*$/.test(o))throw Error(`Named callout argument one must be a tag or number "${o}"`);if("number"==typeof s||!/^(?:[<>!=]=|[<>])$/.test(s))throw Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${s}"`);if("string"==typeof l&&!/^[A-Za-z_]\w*$/.test(l))throw Error(`Named callout argument three must be a tag or number "${l}"`);break;case"custom":throw Error(`Undefined callout name "${n}"`);default:throw Error(`Unexpected named callout kind "${d}"`)}return{type:"NamedCallout",kind:d,tag:i??null,arguments:r?.split(",")??null,raw:e}}(n)};if("(?{"===n)throw Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(")"!==t[i])throw Error('Unclosed comment group "(?#"');return{lastIndex:i+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:function(e,t){let{on:n,off:i}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;i??="";let r=(t.getCurrentModX()||n.includes("x"))&&!i.includes("x"),a=nn(n),o=nn(i),s={};if(a&&(s.enable=a),o&&(s.disable=o),e.endsWith(")"))return t.replaceCurrentModX(r),t4("flags",e,{flags:s});if(e.endsWith(":"))return t.pushModX(r),t.numOpenGroups++,t7("group",e,{...(a||o)&&{flags:s}});throw Error(`Unexpected flag modifier "${e}"`)}(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,"("===n&&!e.captureGroup||"(?:"===n)return{token:t7("group",n)};if("(?>"===n)return{token:t7("atomic",n)};if("(?="===n||"(?!"===n||"(?<="===n||"(?<!"===n)return{token:t7("<"===n[2]?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if("("===n&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:t7("capturing",n,{..."("!==n&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if("(?~|"===n)throw Error(`Unsupported absence function kind "${n}"`);return{token:t7("absence_repeater",n)}}throw"(?("===n?Error(`Unsupported conditional "${n}"`):Error(`Invalid or unsupported group option "${n}"`)}if(")"===n){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw Error('Unmatched ")"');return{token:{type:"GroupClose",raw:n}}}if(e.getCurrentModX()){if("#"===n){let e=t.indexOf(`
95`,i);return{lastIndex:-1===e?t.length:e}}if(/^\s$/.test(n)){let e=/\s+/y;return e.lastIndex=i,{lastIndex:e.exec(t)?e.lastIndex:i}}}return"."===n?{token:t3("dot",n)}:"^"===n||"$"===n?{token:t8(e.singleline?({"^":tX`\A`,$:tX`\Z`})[n]:n,n)}:"|"===n?{token:{type:"Alternator",raw:n}}:tZ.test(n)?{tokens:function(e){let t,n=[],i=RegExp(tZ,"gy");for(;t=i.exec(e);){let e=t[0];if("{"===e[0]){let t=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(e);if(t){let{min:r,max:a}=t.groups;if(+r>+a&&e.endsWith("?")){i.lastIndex--,n.push(nt(e.slice(0,-1)));continue}}}n.push(nt(e))}return n}(n)}:{token:t5(tV(n),n)}}(a,e,s[0],tY.lastIndex);t.tokens?o.push(...t.tokens):t.token&&o.push(t.token),void 0!==t.lastIndex&&(tY.lastIndex=t.lastIndex)}let l=[],d=0;o.filter(e=>
95"GroupOpen"===e.type).forEach(e=>{"capturing"===e.kind?e.number=++d:"("===e.raw&&l.push(e)}),d||l.forEach((e,t)=>{e.kind="capturing",e.number=t+1});let u=d||l.length;return{tokens:o.map(e=>"EscapedNumber"===e.type?function(e,t){let{raw:n,inCharClass:i}=e,r=n.slice(1);if(!i&&("0"!==r&&1===r.length||"0"!==r[0]&&+r<=t))return[t2(n)];let a=[],o=r.match(/^[0-7]+|\d/g);for(let e=0;e<o.length;e++){let t,i=o[e];if(0===e&&"8"!==i&&"9"!==i){if((t=parseInt(i,8))>127)throw Error(tX`Octal encoded byte above 177 unsupported "${n}"`)}else t=tV(i);a.push(t5(t,(0===e?"\\":"")+i))}return a}(e,u):e).flat(),flags:i}}(e,{flags:i.flags,rules:{captureGroup:i.rules.captureGroup,singleline:i.rules.singleline}}),a=(e,t)=>{let n=r.tokens[o.nextIndex];switch(o.parent=e,o.nextIndex++,n.type){case"Alternator":return no();case"Assertion":return function({kind:e}){return ns(tK({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===tX`\B`||e===tX`\Y`})}(n);case"Backreference":return function({raw:e},t){let n=/^\\k[<']/.test(e),i=n?e.slice(3,-1):e.slice(1),r=(n,i=!1)=>{let r=t.capturingGroups.length,a=!1;if(n>r)if(t.skipBackrefValidation)a=!0;else throw Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,nl(i?r+1-n:n,{orphan:a})};if(n){let n=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(i);if(n)return r(+n.groups.num,!!n.groups.sign);if(/[-+]/.test(i))throw Error(`Invalid backref name "${e}"`);
95if(!t.namedGroupsByName.has(i))throw Error(`Group name not defined to the left "${e}"`);return nl(i)}return r(+i)}(n,o);case"Character":return nu(n.value,{useLastValid:!!t.isCheckingRangeEnd});case"CharacterClassHyphen":return function(e,t){let{tokens:n,walk:i}=e,r=e.parent,a=r.body.at(-1),o=n[e.nextIndex];if(!t.isCheckingRangeEnd&&a&&"CharacterClass"!==a.type&&"CharacterClassRange"!==a.type&&o&&"CharacterClassOpen"!==o.type&&"CharacterClassClose"!==o.type&&"CharacterClassIntersector"!==o.type){let e=i(r,{...t,isCheckingRangeEnd:!0});if("Character"===a.type&&"Character"===e.type)return r.body.pop(),function(e,t){if(t.value<e.value)throw Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}(a,e);throw Error("Invalid character class range")}return nu(tV("-"))}(o,t);case"CharacterClassOpen":return function({negate:e},t,n){let{tokens:i,walk:r}=t,a=i[t.nextIndex],o=[nh()],s=nA(a);for(;"CharacterClassClose"!==s.type;){if("CharacterClassIntersector"===s.type)o.push(nh()),t.nextIndex++;else{let e=o.at(-1);e.body.push(r(e,n))}s=nA(i[t.nextIndex],a)}let l=nh({negate:e});return 1===o.length?l.body=o[0].body:(l.kind="intersection",l.body=o.map(e=>1===e.body.length?e.body[0]:e)),t.nextIndex++,l}(n,o,t);case"CharacterSet":return function({kind:e,negate:t,value:n},i){let{normalizeUnknownPropertyNames:r,skipPropertyNameValidation:a,unicodePropertyMap:o}=i;if("property"===e){let i=nC(n);if(!tq.has(i)||o?.has(i))return nb(n,{negate:t,normalizeUnknownPropertyNames:r,skipPropertyNameValidation:a,unicodePropertyMap:o});e="posix",n=i}return"posix"===e?function(e,t){let n=!!t?.negate;if(!tq.has(e))throw Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}(n,{negate:t}):nc(e,{negate:t})}(n,o);case"Directive":return function(e,t={}){if("keep"===e)return{type:"Directive",kind:e};if("flags"===e)return{type:"Directive",kind:e,flags:tK(t.flags)};throw Error(`Unexpected directive kind "${e}"`)}(n.kind,{flags:n.flags});case"GroupOpen":return function(e,t,n){var i,r;let{tokens:a,capturingGroups:o,namedGroupsByName:s,skipLookbehindValidation:l,walk:d}=t,u=function({flags:e,kind:t,name:n,negate:i,number:r}){switch(t){case"absence_repeater":var a="repeater";!1;return{type:"AbsenceFunction",kind:a,body:nv(void 0)};case"atomic":return nf({atomic:!0});case"capturing":return nd(r,{name:n});case"group":return nf({flags:e});case"lookahead":case"lookbehind":return np({behind:"lookbehind"===t,negate:i});default:throw Error(`Unexpected group kind "${t}"`)}}(e),h="AbsenceFunction"===u.type,c=nk(u),f=c&&u.negate;if("CapturingGroup"===u.type&&(o.push(u),u.name&&(i=u.name,r=[],s.has(i)||s.set(i,r),s.get(i)).push(u)),h&&n.isInAbsenceFunction)throw Error("Nested absence function not supported by Oniguruma");let p=nx(a[t.nextIndex]);for(;"GroupClose"!==p.type;){if("Alternator"===p.type)u.body.push(no()),t.nextIndex++;else{let e=u.body.at(-1),t=d(e,{...n,isInAbsenceFunction:n.isInAbsenceFunction||h,isInLookbehind:n.isInLookbehind||c,isInNegLookbehind:n.isInNegLookbehind||f});if(e.body.push(t),(c||n.isInLookbehind)&&!l){let e="Lookbehind includes a pattern not allowed by Oniguruma";if(f||n.isInNegLookbehind){if(nS(t)||"CapturingGroup"===t.type)throw Error(e)}else if(nS(t)||nk(t)&&t.negate)throw Error(e)}}p=nx(a[t.nextIndex])}return t.nextIndex++,u}(n,o,t);case"NamedCallout":var i,a;return i=n.kind,a=n.tag,{type:"NamedCallout",kind:i,tag:a,arguments:n.arguments};case"Quantifier":return function({kind:e,min:t,max:n},i){let r=i.parent,a=r.body.at(-1);if(!a||!nr.has(a.type))throw Error("Quantifier requires a repeatable token");let o=nm(e,t,n,a);return r.body.pop(),o}(n,o);
95case"Subroutine":return function({raw:e},t){let{capturingGroups:n,subroutines:i}=t,r=e.slice(3,-1),a=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(r);if(a){let e=+a.groups.num,i=n.length;if(t.hasNumberedRef=!0,(r=({"":e,"+":i+e,"-":i+1-e})[a.groups.sign])<1)throw Error("Invalid subroutine number")}else"0"===r&&(r=0);let o=ng(r);return i.push(o),o}(n,o);default:throw Error(`Unexpected token type "${n.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:i.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:i.skipBackrefValidation,skipLookbehindValidation:i.skipLookbehindValidation,skipPropertyNameValidation:i.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:i.unicodePropertyMap,walk:a},s=(n={type:"Flags",...r.flags},{type:"Regex",body:nv(void 0),flags:n}),l=s.body[0];for(;o.nextIndex<r.tokens.length;){let e=a(l,{});"Alternative"===e.type?(s.body.push(e),l=e):l.body.push(e)}let{capturingGroups:d,hasNumberedRef:u,namedGroupsByName:h,subroutines:c}=o;if(u&&h.size&&!i.rules.captureGroup)throw Error("Numbered backref/subroutine not allowed when using named capture");for(let{ref:e}of c)if("number"==typeof e){if(e>d.length)throw Error("Subroutine uses a group number that's not defined");e&&(d[e-1].isSubroutined=!0)}else if(h.has(e)){if(h.get(e).length>1)throw Error(tX`Subroutine uses a duplicate group name "\g<${e}>"`);h.get(e)[0].isSubroutined=!0}else throw Error(tX`Subroutine uses a group name that's not defined "\g<${e}>"`);return s}function no(e){return{type:"Alternative",body:ny(e?.body)}}function ns(e,t){let n={type:"Assertion",kind:e};return("word_boundary"===e||"text_segment_boundary"===e)&&(n.negate=!!t?.negate),n}function nl(e,t){let n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function nd(e,t){var n;let i={name:void 0,isSubroutined:!1,...t};if(void 0!==i.name&&(n=i.name,!/^[\p{Alpha}\p{Pc}][^)]*$/u.test(n)))throw Error(`Group name "${i.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...i.name&&{name:i.name},...i.isSubroutined&&{isSubroutined:i.isSubroutined},body:nv(t?.body)}}function nu(e,t){let n={useLastValid:!1,...t};if(e>1114111){let t=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?Error(`Invalid code point out of range "\\x{${t}}"`):Error(`Invalid code point out of range in JS "\\x{${t}}"`)}return{type:"Character",value:e}}function nh(e){let t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:ny(e?.body)}}function nc(e,t){let n=!!t?.negate,i={type:"CharacterSet",kind:e};return("digit"===e||"hex"===e||"newline"===e||"space"===e||"word"===e)&&(i.negate=n),"text_segment"!==e&&("newline"!==e||n)||(i.variableLength=!0),i}function nf(e){let t=e?.atomic,n=e?.flags;if(t&&n)throw Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:nv(e?.body)}}function np(e){let t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:nv(e?.body)}}function nm(e,t,n,i){if(t>n)throw Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:i}}function ng(e){return{type:"Subroutine",ref:e}}function nb(e,t){let n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t},i=n.unicodePropertyMap?.get(nC(e));if(!i){if(n.normalizeUnknownPropertyNames)i=e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,e=>e[0].toUpperCase()+e.slice(1).toLowerCase());else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw Error(tX`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:i??e,negate:n.negate}}function nv(e){if(void 0===e)e=[no()];else if(!Array.isArray(e)||!e.length||!e.every(e=>"Alternative"===e.type))throw Error("Invalid body; expected array of one or more Alternative nodes");return e}function ny(e){if(void 0===e)e=[];else if(!Array.isArray(e)||!e.every(e=>!!e.type))throw Error("Invalid body; expected array of nodes");return e}function nS(e){return"LookaroundAssertion"===e.type&&"lookahead"===e.kind}function nk(e){return"LookaroundAssertion"===e.type&&"lookbehind"===e.kind}function nC(e){return e.replace(/[- _]+/g,"").toLowerCase()}function nA(e,t){return tK(e,`${t?.type==="Character"&&93===t.value?"Empty":"Unclosed"} character class`)}function nx(e){return tK(e,"Unclosed group")}function nw(e,t,n=null){function i(e,t){for(let n=0;n<e.length;n++){let i=r(e[n],t,n,e);n=Math.max(-1,n+i)}}function r(a,o=null,s=null,l=null){let d=0,u=!1,h={node:a,parent:o,key:s,container:l,root:e,remove(){nE(l).splice(Math.max(0,nL(s)+d),1),d--,u=!0},removeAllNextSiblings:()=>nE(l).splice(nL(s)+1),removeAllPrevSiblings(){let e=nL(s)+d;return d-=e,nE(l).splice(0,Math.max(0,e))},replaceWith(e,t={}){let n=!!t.traverse;l?l[Math.max(0,nL(s)+d)]=e:tK(o,"Can't replace root node")[s]=e,n&&r(e,o,s,l),u=!0},replaceWithMultiple(e,t={}){let n=!!t.traverse;if(nE(l).splice(Math.max(0,nL(s)+d),1,...e),d+=e.length-1,n){let t=0;for(let n=0;n<e.length;n++)t+=r(e[n],o,nL(s)+n+t,l)}u=!0},skip(){u=!0}},{type:c}=a,f=t["*"],p=t[c],m="function"==typeof f?f:f?.enter,g="function"==typeof p?p:p?.enter;if(m?.(h,n),g?.(h,n),!u)switch(c){case"AbsenceFunction":case"CapturingGroup":case"Group":case"Alternative":case"CharacterClass":case"LookaroundAssertion":i(a.body,a);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subrout
95ine":break;case"CharacterClassRange":r(a.min,a,"min"),r(a.max,a,"max");break;case"Quantifier":r(a.body,a,"body");break;case"Regex":i(a.body,a),r(a.flags,a,"flags");break;default:throw Error(`Unexpected node type "${c}"`)}return p?.exit?.(h,n),f?.exit?.(h,n),d}return r(e),e}function nE(e){if(!Array.isArray(e))throw Error("Container expected");return e}function nL(e){if("number"!=typeof e)throw Error("Numeric key expected");return e}let n_=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`,nT=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function nN(e,t,n,i){let r=RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),a=[!1],o=0,s="";for(let t of e.matchAll(r)){let{0:e,groups:{$skip:r}}=t;if(!r&&(!i||i===nT.DEFAULT==!o)){n instanceof Function?s+=n(t,{context:o?nT.CHAR_CLASS:nT.DEFAULT,negated:a[a.length-1]}):s+=n;continue}"["===e[0]?(o++,a.push("^"===e[1])):"]"===e&&o&&(o--,a.pop()),s+=e}return s}function nR(e,t,n){return!!function(e,t,n=0,i){let r;if(!RegExp(t,"su").test(e))return null;let a=RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");a.lastIndex=n;let o=0;for(;r=a.exec(e);){let{0:e,groups:{$skip:t}}=r;if(!t&&(!i||i===nT.DEFAULT==!o))return r;"["===e?o++:"]"===e&&o&&o--,a.lastIndex==r.index&&a.lastIndex++}return null}(e,t,0,n)}let nM=RegExp(String.raw`(?<noncapturingStart>${n_})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu"),nI=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,nP=RegExp(String.raw`
96\\(?: \d+
97  | c[A-Za-z]
98  | [gk]<[^>]+>
99  | [pPu]\{[^\}]+\}
100  | u[A-Fa-f\d]{4}
101  | x[A-Fa-f\d]{2}
102  )
103| \((?: \? (?: [:=!>]
104  | <(?:[=!]|[^>]+>)
105  | [A-Za-z\-]+:
106  | \(DEFINE\)
107  ))?
108| (?<qBase>${nI})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
109| \\?.
110`.replace(/\s+/g,""),"gsu"),nF=String.raw,n$=nF`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,nD=nF`\(\?R=(?<rDepth>[^\)]+)\)|${n$}`,nO=nF`\(\?<(?![=!])(?<captureName>[^>]+)>`,nH=nF`${nO}|(?<unnamed>\()(?!\?)`,nU=RegExp(nF`${nO}|${nD}|\(\?|\\?.`,"gsu"),nB="Cannot use multiple overlapping recursions";function nz(e){let t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e)||(e*=1)<2||e>100)throw Error(t)}function nG(e,t,n,i,r,a,o){let s=new Set;i&&nN(e+t,nO,({groups:{captureName:e}})=>{s.add(e)},nT.DEFAULT);let l=[n,i?s:null,r,a,o];return`${e}${nj(`(?:${e}`,"forward",...l)}(?:)${nj(`${t})`,"backward",...l)}${t}`}function nj(e,t,n,i,r,a,o){let s=e=>"forward"===t?e+2:n-e+2-1,l="";for(let t=0;t<n;t++){let n=s(t);l+=nN(e,nF`${nH}|\\k<(?<backref>[^>]+)>`,({0:e,groups:{captureName:t,unnamed:s,backref:l}})=>{if(l&&i&&!i.has(l))return e;let d=`_$${n}`;if(s||t){let n=o+a.length+1;return a.push(n),function(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}(r,n),s?e:`(?<${t}${d}>`}return nF`\k<${l}${d}>`},nT.DEFAULT)}return l}function nW(e,t,n,i,r,a){if(e.size&&i){let o=0;nN(t,nH,()=>o++,nT.DEFAULT);let s=a-o+r,l=new Map;return e.forEach((e,t)=>{let r=(i-o*n)/n,a=o*n,d=t>s+o?t+i:t,u=[];for(let t of e)if(t<=s)u.push(t);else if(t>s+o+r)u.push(t+i);else if(t<=s+o)for(let e=0;e<=n;e++)u.push(t+o*e);else for(let e=0;e<=n;e++)u.push(t+a+r*e);l.set(d,u)}),l}return e}var nV=String.fromCodePoint,nq=String.raw,nX={},nK=globalThis.RegExp;function nQ(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function nJ(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}nX.flagGroups=(()=>{try{new nK("(?i:)")}catch{return!1}return!0})(),nX.unicodeSets=(()=>{try{new nK("[[]]","v")}catch{return!1}return!0})(),nX.bugFlagVLiteralHyphenIsRange=!!nX.unicodeSets&&(()=>{try{new nK(nq`[\d\-a]`,"v")}catch{return!0}return!1})(),nX.bugNestedClassIgnoresNegation=nX.unicodeSets&&new nK("[[^a]]","v").test("a");var nZ={ES2025:2025,ES2024:2024,ES2018:2018},nY={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function n0(e={}){if("[object Object]"!==({}).toString.call(e))throw Error("Unexpected options");
110if(void 0!==e.target&&!nY[e.target])throw Error(`Unexpected target "${e.target}"`);let t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return"auto"===t.target&&(t.target=nX.flagGroups?"ES2025":nX.unicodeSets?"ES2024":"ES2018"),t}var n1=new Set([nV(304),nV(305)]),n8=nq`[\p{L}\p{M}\p{N}\p{Pc}]`;function n2(e){if(n1.has(e))return[e];let t=new Set,n=e.toLowerCase(),i=n.toUpperCase(),r=n4.get(n),a=n6.get(n),o=n3.get(n);return 1==[...i].length&&t.add(i),o&&t.add(o),r&&t.add(r),t.add(n),a&&t.add(a),[...t]}var n5=new Map(`C Other
111Cc Control cntrl
112Cf Format
113Cn Unassigned
114Co Private_Use
115Cs Surrogate
116L Letter
117LC Cased_Letter
118Ll Lowercase_Letter
119Lm Modifier_Letter
120Lo Other_Letter
121Lt Titlecase_Letter
122Lu Uppercase_Letter
123M Mark Combining_Mark
124Mc Spacing_Mark
125Me Enclosing_Mark
126Mn Nonspacing_Mark
127N Number
128Nd Decimal_Number digit
129Nl Letter_Number
130No Other_Number
131P Punctuation punct
132Pc Connector_Punctuation
133Pd Dash_Punctuation
134Pe Close_Punctuation
135Pf Final_Punctuation
136Pi Initial_Punctuation
137Po Other_Punctuation
138Ps Open_Punctuation
139S Symbol
140Sc Currency_Symbol
141Sk Modifier_Symbol
142Sm Math_Symbol
143So Other_Symbol
144Z Separator
145Zl Line_Separator
146Zp Paragraph_Separator
147Zs Space_Separator
148ASCII
149ASCII_Hex_Digit AHex
150Alphabetic Alpha
151Any
152Assigned
153Bidi_Control Bidi_C
154Bidi_Mirrored Bidi_M
155Case_Ignorable CI
156Cased
157Changes_When_Casefolded CWCF
158Changes_When_Casemapped CWCM
159Changes_When_Lowercased CWL
160Changes_When_NFKC_Casefolded CWKCF
161Changes_When_Titlecased CWT
162Changes_When_Uppercased CWU
163Dash
164Default_Ignorable_Code_Point DI
165Deprecated Dep
166Diacritic Dia
167Emoji
168Emoji_Component EComp
169Emoji_Modifier EMod
170Emoji_Modifier_Base EBase
171Emoji_Presentation EPres
172Extended_Pictographic ExtPict
173Extender Ext
174Grapheme_Base Gr_Base
175Grapheme_Extend Gr_Ext
176Hex_Digit Hex
177IDS_Binary_Operator IDSB
178IDS_Trinary_Operator IDST
179ID_Continue IDC
180ID_Start IDS
181Ideographic Ideo
182Join_Control Join_C
183Logical_Order_Exception LOE
184Lowercase Lower
185Math
186Noncharacter_Code_Point NChar
187Pattern_Syntax Pat_Syn
188Pattern_White_Space Pat_WS
189Quotation_Mark QMark
190Radical
191Regional_Indicator RI
192Sentence_Terminal STerm
193Soft_Dotted SD
194Terminal_Punctuation Term
195Unified_Ideograph UIdeo
196Uppercase Upper
197Variation_Selector VS
198White_Space space
199XID_Continue XIDC
200XID_Start XIDS`.split(/\s/).map(e=>[nC(e),e])),n6=new Map([["s",nV(383)],[nV(383),"s"]]),n3=new Map([[nV(223),nV(7838)],[nV(107),nV(8490)],[nV(229),nV(8491)],[nV(969),nV(8486)]]),n4=new Map([n9(453),n9(456),n9(459),n9(498),...ie(8072,8079),...ie(8088,8095),...ie(8104,8111),n9(8124),n9(8140),n9(8188)]),n7=new Map([["alnum",nq`[\p{Alpha}\p{Nd}]`],["alpha",nq`\p{Alpha}`],["ascii",nq`\p{ASCII}`],["blank",nq`[\p{Zs}\t]`],["cntrl",nq`\p{Cc}`],["digit",nq`\p{Nd}`],["graph",nq`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",nq`\p{Lower}`],["print",nq`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",nq`[\p{P}\p{S}]`],["space",nq`\p{space}`],["upper",nq`\p{Upper}`],["word",nq`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",nq`\p{AHex}`]]);function n9(e){let t=nV(e);return[t.toLowerCase(),t]}function ie(e,t){return(function(e,t){let n=[];for(let i=e;i<=t;i++)n.push(i);return n})(e,t).map(e=>n9(e))}var it=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]),ii={AbsenceFunction({node:e,parent:t,replaceWith:n}){let{body:i,kind:r}=e;if("repeater"===r){let e=nf();e.body[0].body.push(np({negate:!0,body:i}),nb("Any"));let r=nf();r.body[0].body.push(nm("greedy",0,1/0,e)),n(ig(r,t),{traverse:!0})}else throw Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:i}){let r=e.body.filter(e=>"flags"===e.kind);for(let e=n+1;e<t.body.length;e++)nJ(i,t.body[e],[]).push(...r)},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){let n=id(t.get(e));if(n){let t=nf({flags:n});t.body[0].body=e.body,e.body=[ig(t,e)]}}}},Assertion({node:e,parent:t,key:n,container:i,root:r,remove:a,replaceWith:o},s){let{kind:l,negate:d}=e,{asciiWordBoundaries:u,avoidSubclass:h,supportedGNodes:c,wordIsAscii:f}=s;if("text_segment_boundary"===l)throw Error(`Unsupported text segment boundary "\\${d?"Y":"y"}"`);if("line_end"===l)o(ig(np({body:[no({body:[ns("string_end")]}),no({body:[nu(10)]})]}),t));else if("line_start"===l)o(ig(ic(nq`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if("search_start"===l)if(c.has(e))r.flags.sticky=!0,a();else{var p;let e,r=i[n-1];if(r&&((e=["Character","CharacterClass","CharacterSet"]).includes((p=r).type)||"Quantifier"===p.type&&p.min&&e.includes(p.body.type)))o(ig(np({negate:!0}),t));else if(h)throw Error(nq`Uses "\G" in a way that requires a subclass`);else o(im(ns("string_start"),t)),s.strategy="clip_search"}else if("string_end"===l||"string_start"===l);else if("string_end_newline"===l)o(ig(ic(nq`(?=\n?\z)`),t));else if("word_boundary"===l){if(!f&&!u){let e=`(?:(?<=${n8})(?!${n8})|(?<!${n8})(?=${n8}))`,n=`(?:(?<=${n8})(?=${n8})|(?<!${n8})(?!${n8}))`;o(ig(ic(d?n:e),t))}}else throw Error(`Unexpected assertion kind "${l}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||ih(n)||(e.ref=n=il(n,t))},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:i}=e;i&&!ih(i)&&(e.name=i=il(i,t)),n.set(e.number,e),i&&n.set(i,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){"intersection"===t.kind&&n(ig(nh({body:[e]}),t),{traverse:!0})},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:i,minTargetEs2024:r,digitIsAscii:a,spaceIsAscii:o,wordIsAscii:s}){let{kind:l,negate:d,value:u}=e;if(a&&("digit"===l||"digit"===u))return void n(im(nc("digit",{negate:d}),t));
200if(o&&("space"===l||"space"===u))return void n(ig(ip(ic("[	-\r ]"),d),t));if(s&&("word"===l||"word"===u))return void n(im(nc("word",{negate:d}),t));if("any"===l)n(im(nb("Any"),t));else if("digit"===l)n(im(nb("Nd",{negate:d}),t));else if("dot"===l);else if("text_segment"===l){if("strict"===i)throw Error(nq`Use of "\X" requires non-strict accuracy`);let e="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",a=nq`\p{RI}{2}|${e}(?:\u200D${e})*`;n(ig(ic(nq`(?>\r\n|${r?nq`\p{RGI_Emoji}`:a}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if("hex"===l)n(im(nb("AHex",{negate:d}),t));else if("newline"===l)n(ig(ic(d?"[^\n]":"(?>\r\n?|[\n\v\f…\u2028\u2029])"),t));else if("posix"===l)if(r||"graph"!==u&&"print"!==u)n(ig(ip(ic(n7.get(u)),d),t));else{if("strict"===i)throw Error(`POSIX class "${u}" requires min target ES2024 or non-strict accuracy`);let e={graph:"!-~",print:" -~"}[u];d&&(e=`\0-${nV(e.codePointAt(0)-1)}${nV(e.codePointAt(2)+1)}-\u{10FFFF}`),n(ig(ic(`[${e}]`),t))}else if("property"===l)n5.has(nC(u))||(e.key="sc");else if("space"===l)n(im(nb("space",{negate:d}),t));else if("word"===l)n(ig(ip(ic(n8),d),t));else throw Error(`Unexpected character set kind "${l}"`)},Directive({node:e,parent:t,root:n,remove:i,replaceWith:r,removeAllPrevSiblings:a,removeAllNextSiblings:o}){let{kind:s,flags:l}=e;if("flags"===s)if(l.enable||l.disable){let e=nf({flags:l});e.body[0].body=o(),r(ig(e,t),{traverse:!0})}else i();else if("keep"===s){let e=n.body[0],i=1===n.body.length&&ni(e,{type:"Group"})&&1===e.body[0].body.length?e.body[0]:n;if(t.parent!==i||i.body.length>1)throw Error(nq`Uses "\K" in a way that's unsupported`);let o=np({behind:!0});o.body[0].body=a(),r(ig(o,t))}else throw Error(`Unexpected directive kind "${s}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw Error('Unsupported flag "P"');if("word"===e.textSegmentMode)throw Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(t=>delete e[t]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;let{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,e.flags.enable||e.flags.disable||delete e.flags},LookaroundAssertion({node:e},t){let{kind:n}=e;"lookbehind"===n&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){let{kind:i}=e;if("fail"===i)n(ig(np({negate:!0}),t));else throw Error(`Unsupported named callout "(*${i.toUpperCase()}"`)},Quantifier({node:e}){if("Quantifier"===e.body.type){let t=nf();t.body[0].body.push(e.body),e.body=ig(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){let n=[],i=!1,r=!1;for(let t of e.body)if(1===t.body.length&&"search_start"===t.body[0].kind)t.body.pop();else{let e=function e(t){let n=t.find(e=>"search_start"===e.kind||function(e,t){let n={negate:null,...t};return"LookaroundAssertion"===e.type&&(null===n.negate||e.negate===n.negate)&&1===e.body.length&&ni(e.body[0],{type:"Assertion",kind:"search_start"})}(e,{negate:!1})||!function({type:e}){return"Assertion"===e||"Directive"===e||"LookaroundAssertion"===e}(e));if(!n)return null;if("search_start"===n.kind)return n;if("LookaroundAssertion"===n.type)return n.body[0].body[0];if("CapturingGroup"===n.type||"Group"===n.type){let t=[];for(let i of n.body){let n=e(i.body);if(!n)return null;Array.isArray(n)?t.push(...n):t.push(n)}return t}return null}(t.body);e?(i=!0,Array.isArray(e)?n.push(...e):n.push(e)):r=!0}i&&!r&&n.forEach(e=>t.add(e))},exit(e,{accuracy:t,passedLookbehind:n,strategy:i}){if("strict"===t&&n&&i)throw Error(nq`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;"string"!=typeof n||ih(n)||(e.ref=n=il(n,t))}},ir={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){let{orphan:i,ref:r}=e;i||n.set(e,[...t.get(r).map(({node:e})=>e)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:i},{groupOriginByCopy:r,groupsByName:a,multiplexCapturesToLeftByRef:o,openRefs:s,reffedNodesByReferencer:l}){let d=r.get(e);if(d&&s.has(e.number)){let i=im(is(e.number),t);l.set(i,s.get(e.number)),n(i);return}s.set(e.number,e),o.set(e.number,[]),e.name&&nJ(o,e.name,[]);let u=o.get(e.name??e.number);for(let t=0;t<u.length;t++){let n=u[t];if(d===n.node||d&&d===n.origin||e===n.origin){u.splice(t,1);break}}if(o.get(e.number).push({node:e,origin:d}),e.name&&o.get(e.name).push({node:e,origin:d}),e.name){let t=nJ(a,e.name,new Map),n=!1;if(d)n=!0;else for(let e of t.values())if(!e.hasDuplicateNameToRemove){n=!0;break}a.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:n})}}
200,exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=nQ(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},i){let{isRecursive:r,ref:a}=e;if(r){let n=t;for(;(n=n.parent)&&("CapturingGroup"!==n.type||n.name!==a&&n.number!==a););i.reffedNodesByReferencer.set(e,n);return}let o=i.subroutineRefMap.get(a),s=0===a,l=s?is(0):function e(t,n,i,r){let a=Array.isArray(t)?[]:{};for(let[o,s]of Object.entries(t))"parent"===o?a.parent=Array.isArray(i)?r:i:s&&"object"==typeof s?a[o]=e(s,n,a,i):("type"===o&&"CapturingGroup"===s&&n.set(a,n.get(t)??t),a[o]=s);return a}(o,i.groupOriginByCopy,null),d=l;if(!s){var u,h;let e=id(function(e,t){let n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}(o,e=>"Group"===e.type&&!!e.flags)),t=e?nQ(i.globalFlags,e):i.globalFlags;u=t,h=i.currentFlags,(u.dotAll!==h.dotAll||u.ignoreCase!==h.ignoreCase)&&(d=nf({flags:function({dotAll:e,ignoreCase:t}){let n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),e&&t||(n.disable={},e||(n.disable.dotAll=!0),t||(n.disable.ignoreCase=!0)),n}(t)})).body[0].body.push(l)}n(ig(d,t),{traverse:!s})}},ia={Backreference({node:e,parent:t,replaceWith:n},i){if(e.orphan){i.highestOrphanBackref=Math.max(i.highestOrphanBackref,e.ref);return}let r=i.reffedNodesByReferencer.get(e).filter(t=>(function(e,t){let n=t;do{if("Regex"===n.type)return!1;if("Alternative"===n.type)continue;if(n===e)return!1;for(let t of iu(n.parent)){if(t===n)break;if(t===e||function e(t,n){for(let i of iu(t)??[])if(i===n||e(i,n))return!0;return!1}(t,e))return!0}}while(n=n.parent)throw Error("Unexpected path")})(t,e));r.length?r.length>1?n(ig(nf({atomic:!0,body:r.reverse().map(e=>no({body:[nl(e.number)]}
200))}),t)):e.ref=r[0].number:n(ig(np({negate:!0}),t))},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){let n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let t=0;t<n;t++){let t=nd();e.body.at(-1).body.push(t)}}},Subroutine({node:e},t){e.isRecursive&&0!==e.ref&&(e.ref=t.reffedNodesByReferencer.get(e).number)}};function io(e){nw(e,{"*"({node:e,parent:t}){e.parent=t}})}function is(e){let t=ng(e);return t.isRecursive=!0,t}function il(e,t){if(t.has(e))return t.get(e);let n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function id(e){let t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return(e.forEach(({flags:e})=>{t.forEach(t=>{e.enable?.[t]&&(delete n.disable[t],n.enable[t]=!0),e.disable?.[t]&&(n.disable[t]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable)?n:null}function iu(e){if(!e)throw Error("Node expected");let{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function ih(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ic(e,t){let n=na(e,{...t,unicodePropertyMap:n5}).body;return n.length>1||n[0].body.length>1?nf({body:n}):n[0].body[0]}function ip(e,t){return e.negate=t,e}function im(e,t){return e.parent=t,e}function ig(e,t){return io(e),e.parent=t,e}var ib={"*":{enter({node:e},t){if(iL(e)){let n=t.getCurrentModI();t.pushModI(e.flags?nQ({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){iL(e)&&t.popModI()}}
200,Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){ix(nV(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),iw(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){"property"===e.kind&&it.has(e.value)&&t.setHasCasedChar()}},iv={Alternative:({body:e},t,n)=>e.map(n).join(""),Assertion({kind:e,negate:t}){if("string_end"===e)return"$";if("string_start"===e)return"^";if("word_boundary"===e)return t?nq`\B`:nq`\b`;throw Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if("number"!=typeof e)throw Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&"strict"===t.accuracy&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){let{body:i,name:r,number:a}=e,o={ignoreCase:t.currentFlags.ignoreCase},s=t.originMap.get(e);return s&&(o.hidden=!0,a>s.number&&(o.transferTo=s.number)),t.captureMap.set(a,o),`(${r?`?<${r}>`:""}${i.map(n).join("|")})`},Character({value:e},t){let n=nV(e),i=iE(e,{escDigit:"Backreference"===t.lastNode.type,inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(i!==n)return i;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&ix(n)){let e=n2(n);return t.inCharClass?e.join(""):e.length>1?`[${e.join("")}]`:e[0]}return n},CharacterClass(e,t,n){let{kind:i,negate:r,parent:a}=e,{body:o}=e;if("intersection"===i&&!t.useFlagV)throw Error("Use of character class intersection requires min target ES2024");nX.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&o.some(i_)&&(o=[nu(45),...o.filter(e=>!i_(e))]);let s=()=>`[${r?"^":""}${o.map(n).join("intersection"===i?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||nX.bugNestedClassIgnoresNegation)&&!r){let t=o.filter(e=>"CharacterClass"===e.type&&"union"===e.kind&&e.negate);if(t.length){let i=nf(),r=i.body[0];return i.parent=a,r.parent=i,e.body=o=o.filter(e=>!t.includes(e)),o.length?(e.parent=r,r.body.push(e)):i.body.pop(),t.forEach(e=>{let t=no({body:[e]});e.parent=t,t.parent=i,i.body.push(t)}),n(i)}}t.inCharClass=!0;let i=s();return t.inCharClass=!1,i}let l=o[0];if("union"===i&&!r&&l&&((!t.useFlagV||!t.verbose)&&"union"===a.kind&&!(nX.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&"intersection"===a.kind&&1===o.length&&"CharacterClassRange"!==l.type))return o.map(n).join("");if(!t.useFlagV&&"CharacterClass"===a.type)throw Error("Uses nested character class in a way that requires min target ES2024");return s()},CharacterClassRange(e,t){let n=e.min.value,i=e.max.value,r={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},a=iE(n,r),o=iE(i,r),s=new Set;return t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&(function(e){let t=e.map(e=>e.codePointAt(0)).sort((e,t)=>e-t),n=[],i=null;for(let e=0;e<t.length;e++)t[e+1]===t[e]+1?i??=t[e]:null===i?n.push(t[e]):(n.push([i,t[e]]),i=null);return n})(iw(e)).forEach(e=>{s.add(Array.isArray(e)?`${iE(e[0],r)}-${iE(e[1],r)}`:iE(e,r))}),`${a}-${o}${[...s].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:i},r){if("dot"===e)return r.currentFlags.dotAll?r.appliedGlobalFlags.dotAll||r.useFlagMods?".":"[^]":nq`[^\n]`;if("digit"===e)return t?nq`\D`:nq`\d`;if("property"===e){if(r.useAppliedIgnoreCase&&r.currentFlags.ignoreCase&&it.has(n))throw Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?nq`\P`:nq`\p`}{${i?`${i}=`:""}${n}}`}if("word"===e)return t?nq`\W`:nq`\w`;throw Error(`Unexpected character set kind "${e}"`)},Flags:(e,t)=>(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":""),Group({atomic:e,body:t,flags:n,parent:i},r,a){let o=r.currentFlags;n&&(r.currentFlags=nQ(o,n));let s=t.map(a).join("|"),l=r.verbose||1!==t.length||"Quantifier"===i.type||e||r.useFlagMods&&n?`(?${function(e,t,n){if(e)return">";let i="";if(t&&n){let{enable:e,disable:n}=t;i=(e?.ignoreCase?"i":"")+(e?.dotAll?"s":"")+(n?"-":"")+(n?.ignoreCase?"i":"")+(n?.dotAll?"s":"")}return`${i}:`}(e,n,r.useFlagMods)}${s})`:s;return r.currentFlags=o,l},LookaroundAssertion({body:e,kind:t,negate:n},i,r){let a=`${"lookahead"===t?"":"<"}${n?"!":"="}`;return`(?${a}${e.map(r).join("|")})`},Quantifier:(e,t,n)=>n(e.body)+function({kind:e,max:t,min:n}){return(n||1!==t?n||t!==1/0?1===n&&t===1/0?"+":n===t?`{${n}}`:`{${n},${t===1/0?"":t}}`:"*":"?")+({greedy:"",lazy:"?",possessive:"+"})[e]}(e),Subroutine({isRecursive:e,ref:t},n){if(!e)throw Error("Unexpected non-recursive subroutine in transformed AST");let i=n.recursionLimit;return 0===t?`(?R=${i})`:nq`\g<${t}&R=${i}>`}},iy=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),iS=new Set(["-","\\","]","^","["]),ik=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),iC=new Map([[9,nq`\t`],[10,nq`\n`],[11,nq`\v`],[12,nq`\f`],[13,nq`\r`],[8232,nq`\u2028`],[8233,nq`\u2029`],[65279,nq`\uFEFF`]]),iA=/^\p{Cased}$/u;function ix(e){return iA.test(e)}function iw(e,t){let n=!!t?.firstOnly,i=e.min.value,r=e.max.value,a=[];if(i<65&&(65535===r||r>=131071)||65536===i&&r>=131071)return a;for(let e=i;e<=r;e++){let t=nV(e);if(!ix(t))continue;let o=n2(t).filter(e=>{let t=e.codePointAt(0);return t<i||t>r});if(o.length&&(a.push(...o),n))break}return a}function iE(e,{escDigit:t,inCharClass:n,useFlagV:i}){var r;if(iC.has(e))return iC.get(e);if(e<32||e>126&&e<160||e>262143||t&&(r=e)>47&&r<58)return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;let a=nV(e);return((n?i?ik:iS:iy).has(a)?"\\":"")+a}function iL({type:e}){return"CapturingGroup"===e||"Group"===e||"LookaroundAssertion"===e}function i_({type:e,value:t}){return"Character"===e&&45===t}var iT=class e extends RegExp{#e=new Map;#t=null;#n;#i=null;#r=null;rawOptions={};get source(){return this.#n||"(?:)"}constructor(t,n,i){const r=!!i?.lazyCompile;
200if(t instanceof RegExp){if(i)throw Error("Cannot provide options when copying a regexp");super(t,n),this.#n=t.source,t instanceof e&&(this.#e=t.#e,this.#i=t.#i,this.#r=t.#r,this.rawOptions=t.rawOptions)}else{const e={hiddenCaptures:[],strategy:null,transfers:[],...i};super(r?"":t,n),this.#n=t,this.#e=function(e,t){let n=new Map;for(let t of e)n.set(t,{hidden:!0});for(let[e,i]of t)for(let t of i)nJ(n,t,{}).transferTo=e;return n}(e.hiddenCaptures,e.transfers),this.#r=e.strategy,this.rawOptions=i??{}}r||(this.#t=this)}exec(t){if(!this.#t){let{lazyCompile:t,...n}=this.rawOptions;this.#t=new e(this.#n,this.flags,n)}let n=this.global||this.sticky,i=this.lastIndex;if("clip_search"===this.#r&&n&&i){this.lastIndex=0;let e=this.#a(t.slice(i));return e&&(function(e,t,n,i){if(e.index+=t,e.input=n,i){let n=e.indices;for(let e=0;e<n.length;e++){let i=n[e];i&&(n[e]=[i[0]+t,i[1]+t])}let i=n.groups;i&&Object.keys(i).forEach(e=>{let n=i[e];n&&(i[e]=[n[0]+t,n[1]+t])})}}(e,i,t,this.hasIndices),this.lastIndex+=i),e}return this.#a(t)}#a(e){let t;this.#t.lastIndex=this.lastIndex;let n=super.exec.call(this.#t,e);if(this.lastIndex=this.#t.lastIndex,!n||!this.#e.size)return n;let i=[...n];n.length=1,this.hasIndices&&(t=[...n.indices],n.indices.length=1);let r=[0];for(let e=1;e<i.length;e++){let{hidden:a,transferTo:o}=this.#e.get(e)??{};if(a?r.push(null):(r.push(n.length),n.push(i[e]),this.hasIndices&&n.indices.push(t[e])),o&&void 0!==i[e]){let a=r[o];if(!a)throw Error(`Invalid capture transfer to "${a}"`);if(n[a]=i[e],this.hasIndices&&(n.indices[a]=t[e]),n.groups){this.#i||(this.#i=function(e){let t,n=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,i=new Map,r=0,a=0;for(;t=n.exec(e);){let{0:e,groups:{capture:n,name:o}}=t;"["===e?r++:r?"]"===e&&r--:n&&(a++,o&&i.set(a,o))}return i}(this.source));let r=this.#i.get(o);r&&(n.groups[r]=i[e],this.hasIndices&&(n.indices.groups[r]=t[e]))}}}return n}};class iN{constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:i,regexConstructor:r}=t;if(!r)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if("string"!=typeof e)return e;let t=i?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=r(e);return i?.set(e,t),t}catch(t){if(i?.set(e,t),n)return null;throw t}})}regexps;findNextMatchSync(e,t,n){let i="string"==typeof e?e:e.content,r=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>null==e?{start:0xffffffff,end:0xffffffff,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(i);if(!o)continue;if(o.index===t)return a(e,o,0);r.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(r.length){let e=Math.min(...r.map(e=>e[1].index));for(let[t,n,i]of r)if(n.index===e)return a(t,n,i)}return null}}let iR=["pierre-light","pierre-light-soft","pierre-light-vibrant","pierre-light-protanopia-deuteranopia","pierre-light-tritanopia"],iM=[...iR,"pierre-dark","pierre-dark-soft","pierre-dark-vibrant","pierre-dark-protanopia-deuteranopia","pierre-dark-tritanopia"],iI=new Set(iR),iP={"pierre-dark":"Pierre Dark","pierre-dark-soft":"Pierre Dark Soft","pierre-dark-vibrant":"Pierre Dark Vibrant","pierre-dark-protanopia-deuteranopia":"Pierre Dark Protanopia & Deuteranopia","pierre-dark-tritanopia":"Pierre Dark Tritanopia","pierre-light":"Pierre Light","pierre-light-soft":"Pierre Light Soft","pierre-light-vibrant":"Pierre Light Vibrant","pierre-light-protanopia-deuteranopia":"Pierre Light Protanopia & Deuteranopia","pierre-light-tritanopia":"Pierre Light Tritanopia"},iF={"pierre-dark":()=>e.A(758400),"pierre-dark-soft":()=>e.A(963242),"pierre-dark-vibrant":()=>e.A(492615),"pierre-dark-protanopia-deuteranopia":()=>e.A(961381),"pierre-dark-tritanopia":()=>e.A(325115),"pierre-light":()=>e.A(586031),"pierre-light-soft":()=>e.A(129761),"pierre-light-vibrant":()=>e.A(143355),"pierre-light-protanopia-deuteranopia":()=>e.A(103015),"pierre-light-tritanopia":()=>e.A(536399)};async function i$({themes:t,langs:i,preferredHighlighter:r="shiki-js"}){let a=!function(e=n){return null!=e&&"then"in e}(n??=tW({themes:[],langs:["text"],engine:"shiki-wasm"===r?tj(e.A(421617)):function(e={}){let t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=e=>{let n;return(n=function(e,t){var n;let i,r,a,o,s=n0(t),l=(n=na(e,{flags:s.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:s.rules.captureGroup,singleline:s.rules.singleline},skipBackrefValidation:s.rules.allowOrphanBackrefs,unicodePropertyMap:n5}),i={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...{accuracy:s.accuracy,asciiWordBoundaries:s.rules.asciiWordBoundaries,avoidSubclass:s.avoidSubclass,bestEffortTarget:s.target}},io(n),r={accuracy:i.accuracy,asciiWordBoundaries:i.asciiWordBoundaries,avoidSubclass:i.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:nZ[i.bestEffortTarget]>
200=nZ.ES2024,passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:n.flags.digitIsAscii,spaceIsAscii:n.flags.spaceIsAscii,wordIsAscii:n.flags.wordIsAscii},nw(n,ii,r),o={currentFlags:a={dotAll:n.flags.dotAll,ignoreCase:n.flags.ignoreCase},prevFlags:null,globalFlags:a,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap},nw(n,ir,o),nw(n,ia,{groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer}),n._originMap=o.groupOriginByCopy,n._strategy=r.strategy,n),d=function(e,t){let n=n0(t),i=nZ[n.target]>=nZ.ES2024,r=nZ[n.target]>=nZ.ES2025,a=n.rules.recursionLimit;if(!Number.isInteger(a)||a<2||a>20)throw Error("Invalid recursionLimit; use 2-20");let o=null,s=null;if(!r){let t=[e.flags.ignoreCase];nw(e,ib,{getCurrentModI:()=>t.at(-1),popModI(){t.pop()},pushModI(e){t.push(e)},setHasCasedChar(){t.at(-1)?o=!0:s=!0}})}let l={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||o)&&!s)},d=e,u={accuracy:n.accuracy,appliedGlobalFlags:l,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:d,originMap:e._originMap,recursionLimit:a,useAppliedIgnoreCase:!!(!r&&o&&s),useFlagMods:r,useFlagV:i,verbose:n.verbose};function h(e){return u.lastNode=d,d=e,(function(e,t){if(null==e)throw Error(t??"Value expected");return e})(iv[e.type],`Unexpected node type "${e.type}"`)(e,u,h)}let c={pattern:e.body.map(h).join("|"),flags:h(e.flags),options:{...e.options}};return i||(delete c.options.force.v,c.options.disable.v=!0,c.options.unicodeSetsPlugin=null),c._captureTransfers=new Map,c._hiddenCaptures=[],u.captureMap.forEach((e,t)=>{e.hidden&&c._hiddenCaptures.push(t),e.transferTo&&nJ(c._captureTransfers,e.transferTo,[]).push(t)}),c}(l,s),u=function(e,t){let n,{hiddenCaptures:i,mode:r}={hiddenCaptures:[],mode:"plugin",...t},a=t?.captureTransfers??new Map;if(!RegExp(nD,"su").test(e))return{pattern:e,captureTransfers:a,hiddenCaptures:i};if("plugin"===r&&nR(e,nF`\(\?\(DEFINE\)`,nT.DEFAULT))throw Error("DEFINE groups cannot be used with recursion");let o=[],s=nR(e,nF`\\[1-9]`,nT.DEFAULT),l=new Map,d=[],u=!1,h=0,c=0;for(nU.lastIndex=0;n=nU.exec(e);){let{0:t,groups:{captureName:f,rDepth:p,gRNameOrNum:m,gRDepth:g}}=n;if("["===t)h++;else if(h)"]"===t&&h--;else if(p){if(nz(p),u)throw Error(nB);if(s)throw Error(`${"external"===r?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);let t=e.slice(0,n.index),l=e.slice(nU.lastIndex);if(nR(l,nD,nT.DEFAULT))throw Error(nB);let d=p-1;e=nG(t,l,d,!1,i,o,c),a=nW(a,t,d,o.length,0,c);break}else if(m){nz(g);let h=!1;for(let e of d)if(e.name===m||e.num===+m){if(h=!0,e.hasRecursedWithin)throw Error(nB);break}if(!h)throw Error(nF`Recursive \g cannot be used outside the referenced group "${"external"===r?m:nF`\g<${m}&R=${g}>`}"`);let f=l.get(m),p=function(e,t){let n,i=/\\?./gsu;i.lastIndex=t;let r=e.length,a=0,o=1;for(;n=i.exec(e);){let[e]=n;if("["===e)a++;else if(a)"]"===e&&a--;else if("("===e)o++;else if(")"===e&&!--o){r=n.index;break}}return e.slice(t,r)}(e,f);if(s&&nR(p,nF`${nO}|\((?!\?)`,nT.DEFAULT))throw Error(`${"external"===r?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);let b=e.slice(f,n.index),v=p.slice(b.length+t.length),y=o.length,S=g-1,k=nG(b,v,S,!0,i,o,c);a=nW(a,b,S,o.length-y,y,c);let C=e.slice(0,f),A=e.slice(f+p.length);e=`${C}${k}${A}`,nU.lastIndex+=k.length-t.length-b.length-v.length,d.forEach(e=>e.hasRecursedWithin=!0),u=!0}else if(f)c++,l.set(String(c),nU.lastIndex),l.set(f,nU.lastIndex),d.push({num:c,name:f});else if("("===t[0]){let e="("===t;e&&(c++,l.set(String(c),nU.lastIndex)),d.push(e?{num:c}:{})}else")"===t&&d.pop()}return i.push(...o),{pattern:e,captureTransfers:a,hiddenCaptures:i}}(d.pattern,{captureTransfers:d._captureTransfers,hiddenCaptures:d._hiddenCaptures,mode:"external"}),h=function(e,t){let n,i=t?.hiddenCaptures??[],r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:i};let a="(?:(?=(",o=[0],s=[],l=0,d=0,u=NaN;do{let t;n=!1;let h=0,c=0,f=!1;for(nM.lastIndex=Number.isNaN(u)?0:u+a.length;t=nM.exec(e);){let{0:p,index:m,groups:{capturingStart:g,noncapturingStart:b}}=t;if("["===p)h++;else if(h)"]"===p&&h--;else if("(?>"!==p||f){if(f&&b)c++;else if(g)f?c++:(l++,o.push(l+d));else if(")"===p&&f){if(!c){let t=l+ ++d;e=`${e.slice(0,u)}${a}${e.slice(u+3,m)}))<$$${t}>)${e.slice(m+1)}`,n=!0,s.push(t);for(let e=0;e<i.length;e++)i[e]>=t&&i[e]++;if(r.size){let e=new Map;r.forEach((n,i)=>{e.set(i>=t?i+1:i,n.map(e=>e>=t?e+1:e))}
200),r=e}break}c--}}else u=m,f=!0}}while(n)return i.push(...s),{pattern:e=nN(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:e,groups:{backrefNum:t,wrappedBackrefNum:n}})=>{if(t){let n=+t;if(n>o.length-1)throw Error(`Backref "${e}" greater than number of captures`);return`\\${o[n]}`}return`\\${n}`},nT.DEFAULT),captureTransfers:r,hiddenCaptures:i}}(function(e){let t;if(!RegExp(`${nI}\\+`).test(e))return{pattern:e};let n=[],i=null,r=null,a="",o=0;for(nP.lastIndex=0;t=nP.exec(e);){let{0:d,index:u,groups:{qBase:h,qMod:c,invalidQ:f}}=t;if("["===d)o||(r=u),o++;else if("]"===d)o?o--:r=null;else if(!o)if("+"===c&&a&&!a.startsWith("(")){if(f)throw Error(`Invalid quantifier "${d}"`);let t=-1;if(/^\{\d+\}$/.test(h)){var s,l;s=e,l=u+h.length,e=s.slice(0,l)+""+s.slice(l+c.length)}else{if(")"===a||"]"===a){let t=")"===a?i:r;if(null===t)throw Error(`Invalid unmatched "${a}"`);e=`${e.slice(0,t)}(?>${e.slice(t,u)}${h})${e.slice(u+d.length)}`}else e=`${e.slice(0,u-a.length)}(?>${a}${h})${e.slice(u+d.length)}`;t+=4}nP.lastIndex+=t}else"("===d[0]?n.push(u):")"===d&&(i=n.length?n.pop():null);a=d}return{pattern:e}}(u.pattern).pattern,{captureTransfers:u.captureTransfers,hiddenCaptures:u.hiddenCaptures}),c={pattern:h.pattern,flags:`${s.hasIndices?"d":""}${s.global?"g":""}${d.flags}${d.options.disable.v?"u":"v"}`};if(s.avoidSubclass){if(s.lazyCompileLength!==1/0)throw Error("Lazy compilation requires subclass")}else{let e=h.hiddenCaptures.sort((e,t)=>e-t),t=Array.from(h.captureTransfers),n=l._strategy,i=c.pattern.length>=s.lazyCompileLength;(e.length||t.length||n||i)&&(c.options={...e.length&&{hiddenCaptures:e},...t.length&&{transfers:t},...n&&{strategy:n},...i&&{lazyCompile:i}})}return c}(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...{target:t.target}})).options?new iT(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)},{createScanner:e=>new iN(e,t),createString:e=>({content:e})}}()}))?n:await n;n=a;let o=[];for(let e of i){if("text"===e||"ansi"===e)continue;let t=b(e);"then"in t?o.push(t):u(t,a)}let s=[];for(let e of t){let t=w.getResolvedTheme(e)??tN(e);"then"in t?s.push(t):L(t,n)}return(o.length>0||s.length>0)&&await Promise.all([Promise.all(o).then(e=>{u(e,a)}),Promise.all(s).then(e=>{L(e,a)})]),a}for(let e of _({themes:iM.map(e=>tC({name:e,collection:"pierre",colorScheme:iI.has(e)?"light":"dark",displayName:iP[e],load:iF[e]}))}).getThemes())w.registerThemeIfAbsent(e.name,e.load);e.s(["getHighlighterIfLoaded",0,function(){if(null!=n&&!("then"in n))return n},"getSharedHighlighter",0,i$],444855);var iD=e.i(994940);function iO(e=iD.DEFAULT_THEMES){let t=[];return"string"==typeof e?t.push(e):(t.push(e.dark),t.push(e.light)),t}e.s(["getThemes",0,iO],642036),e.s(["areThemesAttached",0,function(e){for(let t of iO(e))if(!E.has(t))return!1;return!0}],533160)},771357,e=>{"use strict";var t=e.i(389569);e.s(["isDiffPlainText",0,function(e){let n=e.lang??(0,t.getFiletypeFromFileName)(e.name),i=e.lang??(null!=e.prevName?(0,t.getFiletypeFromFileName)(e.prevName):"text");return"text"===n&&"text"===i}])},164116,e=>{"use strict";var t=e.i(389569);e.s(["isFilePlainText",0,function(e){return(e.lang??(0,t.getFiletypeFromFileName)(e.name))==="text"}])},910353,546907,e=>{"use strict";e.s(["isStyleNode",0,function(e){if("u">typeof HTMLStyleElement&&e instanceof HTMLStyleElement)return!0;let t=e.tagName??e.nodeName;return"string"==typeof t&&"style"===t.toLowerCase()}],910353),e.s(["areFilesEqual",0,function(e,t){return e?.cacheKey===t?.cacheKey&&e?.contents===t?.contents&&e?.name===t?.name&&e?.lang===t?.lang}],546907)},14795,e=>{"use strict";var t=e.i(390624),n=e.i(632145);function i(e,t,n,i,r,a){let[o,s]=function(e,t,n){if(!e.isWindowedHighlight||t<=0)return[0,t];let i=[];function r(n){let r=Math.max(0,e.viewportStart-n),a=Math.min(t,e.viewportEnd-n);a>r&&i.push([r,a])}if("split"!==n&&r(e.unifiedCount),"unified"!==n&&r(e.splitCount),0===i.length)return[0,0];let a=i[0][0],o=i[0][1];for(let e=1;e<i.length;e++){let t=i[e];a=Math.min(a,t[0]),o=Math.max(o,t[1])}return[a,o]}
200(e,t,n);o>0&&(e.incrementCounts(o,o),r?.());let l=o;for(;l<t;){if(a?.()===!0)return!0;if(l>=s){e.incrementCounts(t-l,t-l);break}if(e.isInWindow(0,0)){if(!0===i(l))return!0}else e.incrementCounts(1,1);l++}return!1}e.s(["iterateOverDiff",0,function({diff:e,diffStyle:r,startingLine:a=0,totalLines:o=1/0,expandedHunks:s,collapsedContextThreshold:l=1,callback:d}){let u=function({diff:e,diffStyle:t,startingLine:i,expandedHunks:r,collapsedContextThreshold:a}){if(i<=0||"both"===t)return{hunkIndex:0,splitCount:0,unifiedCount:0};let o=function({diff:e,expandedHunks:t,collapsedContextThreshold:i}){let r=0,a=0,o=e.hunks.length-1,s=[{splitCount:0,unifiedCount:0}];for(let l=0;l<e.hunks.length;l++){let d=e.hunks[l];if(null==d)throw Error("iterateOverDiff: invalid hunk summary index");let u=(0,n.getExpandedRegion)({isPartial:e.isPartial,rangeSize:d.collapsedBefore,expandedHunks:t,hunkIndex:l,collapsedContextThreshold:i}),h=u.fromStart+u.fromEnd;r+=h+d.splitLineCount,a+=h+d.unifiedLineCount;let c=l===o?(0,n.getTrailingExpandedRegion)({fileDiff:e,hunkIndex:l,expandedHunks:t,collapsedContextThreshold:i,errorPrefix:"iterateOverDiff"}):void 0;if(null!=c){let e=c.fromStart+c.fromEnd;r+=e,a+=e}s.push({splitCount:r,unifiedCount:a})}return s}({diff:e,expandedHunks:r,collapsedContextThreshold:a}),s=0,l=e.hunks.length-1,d=e.hunks.length;for(;s<=l;){let e=s+l>>1,n=o[e+1];if(null==n)throw Error("iterateOverDiff: invalid hunk prefix index");("unified"===t?n.unifiedCount:n.splitCount)>i?(d=e,l=e-1):s=e+1}if(d>=e.hunks.length){let t=o[e.hunks.length];if(null==t)throw Error("iterateOverDiff: invalid terminal hunk prefix index");return{hunkIndex:e.hunks.length,splitCount:t.splitCount,unifiedCount:t.unifiedCount}}let u=o[d];if(null==u)throw Error("iterateOverDiff: invalid selected hunk prefix index");return{hunkIndex:d,splitCount:u.splitCount,unifiedCount:u.unifiedCount}}({diff:e,diffStyle:r,startingLine:a,expandedHunks:s,collapsedContextThreshold:l}),h={viewportStart:a,viewportEnd:a+o,isWindowedHighlight:a>0||o<1/0,splitCount:u.splitCount,unifiedCount:u.unifiedCount,finalHunkIndex:e.hunks.length-1,shouldBreak(){if(!h.isWindowedHighlight)return!1;let e=h.unifiedCount>=a+o,t=h.splitCount>=a+o;return"unified"===r?e:"split"===r?t:e&&t},shouldSkip(e,t){if(!h.isWindowedHighlight)return!1;let n=e>0&&h.unifiedCount+e<=a,i=t>0&&h.splitCount+t<=a;return"unified"===r?n:"split"===r?i:n&&i},incrementCounts(e,t){("unified"===r||"both"===r)&&(h.unifiedCount+=e),("split"===r||"both"===r)&&(h.splitCount+=t)},isInWindow(e,t){if(!h.isWindowedHighlight)return!0;let n=h.isInUnifiedWindow(e),i=h.isInSplitWindow(t);return"unified"===r?n:"split"===r?i:n||i},isInUnifiedWindow:e=>!h.isWindowedHighlight||h.unifiedCount>=a-e&&h.unifiedCount<a+o,isInSplitWindow:e=>!h.isWindowedHighlight||h.splitCount>=a-e&&h.splitCount<a+o,emit:(e,t=!1)=>(t||("unified"===r?h.incrementCounts(1,0):"split"===r?h.incrementCounts(0,1):h.incrementCounts(1,1)),d(e)??!1)};e:for(let a=u.hunkIndex;a<e.hunks.length;a++){let o=e.hunks[a];if(null==o)throw Error("iterateOverDiff: invalid hunk index");if(h.shouldBreak())break;let d=(0,t.getHunkSideStartBoundary)(o.deletionStart,o.deletionCount),u=(0,t.getHunkSideStartBoundary)(o.additionStart,o.additionCount),p=e.isPartial||0!==o.deletionCount?o.deletionLineIndex:d,m=e.isPartial||0!==o.additionCount?o.additionLineIndex:u,g=(0,n.getExpandedRegion)({isPartial:e.isPartial,rangeSize:o.collapsedBefore,expandedHunks:s,hunkIndex:a,collapsedContextThreshold:l}),b=a===h.finalHunkIndex?(0,n.getTrailingExpandedRegion)({fileDiff:e,hunkIndex:a,expandedHunks:s,collapsedContextThreshold:l,errorPrefix:"iterateOverDiff"}):void 0,v=g.fromStart+g.fromEnd;function c(e,t){return null==b||b.collapsedLines<=0||b.fromStart+b.fromEnd>0?0:"unified"===r?e===o.unifiedLineStart+o.unifiedLineCount-1?b.collapsedLines:0:t===o.splitLineStart+o.splitLineCount-1?b.collapsedLines:0}let y=0===g.collapsedLines;function f(){return y?0:(y=!0,g.collapsedLines)}if(h.shouldSkip(v,v))h.incrementCounts(v,v),f();else{let e=o.unifiedLineStart-g.rangeSize,t=o.splitLineStart-g.rangeSize,n=p-g.rangeSize,s=m-g.rangeSize,l=d+1-g.rangeSize,c=u+1-g.rangeSize;if(i(h,g.fromStart,r,i=>h.emit({hunkIndex:a,hunk:o,collapsedBefore:0,collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:l+i,lineIndex:n+i,noEOFCR:!1,unifiedLineIndex:e+i,splitLineIndex:t+i},additionLine:{unifiedLineIndex:e+i,splitLineIndex:t+i,lineIndex:s+i,lineNumber:c+i,noEOFCR:!1}}))||(e=o.unifiedLineStart-g.fromEnd,t=o.splitLineStart-g.fromEnd,n=p-g.from
200End,s=m-g.fromEnd,l=d+1-g.fromEnd,c=u+1-g.fromEnd,i(h,g.fromEnd,r,i=>h.emit({hunkIndex:a,hunk:o,collapsedBefore:f(),collapsedAfter:0,type:"context-expanded",deletionLine:{lineNumber:l+i,lineIndex:n+i,noEOFCR:!1,unifiedLineIndex:e+i,splitLineIndex:t+i},additionLine:{unifiedLineIndex:e+i,splitLineIndex:t+i,lineIndex:s+i,lineNumber:c+i,noEOFCR:!1}}),()=>{f()})))break}let S=o.unifiedLineStart,k=o.splitLineStart,C=p,A=m,x=d+1,w=u+1,E=o.hunkContent.at(-1);for(let e of o.hunkContent){if(h.shouldBreak())break e;let t=e===E;if("context"===e.type){if(h.shouldSkip(e.lines,e.lines))h.incrementCounts(e.lines,e.lines),f();else if(i(h,e.lines,r,n=>{let i=t&&n===e.lines-1,r=S+n,s=k+n;return h.emit({hunkIndex:a,hunk:o,collapsedBefore:f(),collapsedAfter:c(r,s),type:"context",deletionLine:{lineNumber:x+n,lineIndex:C+n,noEOFCR:i&&o.noEOFCRDeletions,unifiedLineIndex:r,splitLineIndex:s},additionLine:{unifiedLineIndex:r,splitLineIndex:s,lineIndex:A+n,lineNumber:w+n,noEOFCR:i&&o.noEOFCRAdditions}})},()=>{f()}))break e;S+=e.lines,k+=e.lines,C+=e.lines,A+=e.lines,x+=e.lines,w+=e.lines}else{let n=Math.max(e.deletions,e.additions),i=e.deletions+e.additions;if(!h.shouldSkip(i,n)){let s=function(e,t,n){if(!e.isWindowedHighlight)return[[0,"unified"===n?t.deletions+t.additions:Math.max(t.deletions,t.additions)]];let i="unified"===n?"unified":"split",r=[];function a(t,n){if(t+n<=e.viewportStart||t>=e.viewportEnd)return;let i=Math.max(0,e.viewportStart-t),r=Math.min(n,e.viewportEnd-t);return r>i?[i,r]:void 0}function o(e,n){if(null==e)return;let[a,o]="split"===i?e:"additions"===n?[e[0]+t.deletions,e[1]+t.deletions]:e;o>a&&r.push([a,o])}if("split"!==n&&(o(a(e.unifiedCount,t.deletions),"deletions"),o(a(e.unifiedCount+t.deletions,t.additions),"additions")),"unified"!==n&&(o(a(e.splitCount,t.deletions),"deletions"),o(a(e.splitCount,t.additions),"additions")),0===r.length)return r;r.sort((e,t)=>e[0]-t[0]);let s=[r[0]];for(let[e,t]of r.slice(1)){let n=s[s.length-1];e<=n[1]?n[1]=Math.max(n[1],t):s.push([e,t])}return s}(h,e,r);for(let[l,d]of((s[0]?.[0]??0)>0&&f(),s))for(let s=l;s<d;s++){let l=c(S+s,"unified"===r?k+(s<e.deletions?s:s-e.deletions):k+s);if(h.emit(function({hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,diffStyle:r,index:a,unifiedLineIndex:o,splitLineIndex:s,additionLineIndex:l,deletionLineIndex:d,additionLineNumber:u,deletionLineNumber:h,content:c,isLastContent:f,unifiedCount:p,splitCount:m}){let g=a<c.deletions?o+a:void 0,b="unified"===r?a>=c.deletions?o+a:void 0:a<c.additions?o+c.deletions+a:void 0,v="unified"===r?s+(a<c.deletions?a:a-c.deletions):s+a,y=a<c.deletions?d+a:void 0,S=a<c.deletions?h+a:void 0,k="unified"===r?a>=c.deletions?l+(a-c.deletions):void 0:a<c.additions?l+a:void 0,C="unified"===r?a>=c.deletions?u+(a-c.deletions):void 0:a<c.additions?u+a:void 0,A="unified"===r?f&&a===c.deletions-1&&t.noEOFCRDeletions:f&&a===m-1&&t.noEOFCRDeletions,x="unified"===r?f&&a===p-1&&t.noEOFCRAdditions:f&&a===m-1&&t.noEOFCRAdditions,w=null!=y&&null!=S&&null!=g?{lineNumber:S,lineIndex:y,noEOFCR:A,unifiedLineIndex:g,splitLineIndex:v}:void 0,E=null!=k&&null!=C&&null!=b?{unifiedLineIndex:b,splitLineIndex:v,lineIndex:k,lineNumber:C,noEOFCR:x}:void 0;if(null==w&&null!=E)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:void 0,additionLine:E};if(null!=w&&null==E)return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:w,additionLine:void 0};if(null==w||null==E)throw Error("iterateOverDiff: missing change line data");return{type:"change",hunkIndex:e,hunk:t,collapsedAfter:n,collapsedBefore:i,deletionLine:w,additionLine:E}}({hunkIndex:a,hunk:o,collapsedBefore:f(),collapsedAfter:l,diffStyle:r,index:s,unifiedLineIndex:S,splitLineIndex:k,additionLineIndex:A,deletionLineIndex:C,additionLineNumber:w,deletionLineNumber:x,content:e,isLastContent:t,unifiedCount:i,splitCount:n}),!0))break e}}f(),h.incrementCounts(i,n),S+=i,k+=n,C+=e.deletions,A+=e.additions,x+=e.deletions,w+=e.additions}}if(null!=b){let{collapsedLines:t,fromStart:n,fromEnd:a}=b,o=n+a;if(i(h,o,r,n=>{let i=n===o-1;return h.emit({hunkIndex:e.hunks.length,hunk:void 0,collapsedBefore:0,collapsedAfter:i?t:0,type:"context-expanded",deletionLine:{lineNumber:x+n,lineIndex:C+n,noEOFCR:!1,unifiedLineIndex:S+n,splitLineIndex:k+n},additionLine:{unifiedLineIndex:S+n,splitLineIndex:k+n,lineIndex:A+n,lineNumber:w+n,noEOFCR:!1}})},void 0,()=>h.shouldBreak()))break}}}])},86478,e=>{"use strict";e.s(["createDiffSpanDecoration",0,function({line:e,spanStart:t,spanLength:n}){return{start:{line:e,character:t},end:{line:e,character:t+n},properties:{"data-diff-span":""},alwaysWrap:!0}},"pushOrJoinSpan",0,function({item:e,arr:t,enableJoin:n,isNeutral:i=!1,isLastItem:r=!1}){let a=t[t.length-1];if(null==a||r||!n)return void t.push([+!i,e.value]);let o=0===a[0];if(i===o||i&&1===e.value.length&&!o){a[1]+=e.value;return}t.push([+!i,e.value])}])},276269,e=>{"use strict";var t=e.i(994940),n=e.i(974329),i=e.i(389569),r=e.i(646611),a=e.i(77142),o=e.i(791352),s=e.i(56523),l=e.i(14795),d=e.i(86478),u=e.i(41805);class h extends u.default{}let c=new h;var f=u;function p(e,t){let n;for(n=0;n<e.length&&n<t.length&&e[n]==t[n];n++);return e.slice(0,n)}function m(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return"";for(n=0;n<e.length&&n<t.length&&e[e.length-(n+1)]==t[t.length-(n+1)];n++);return e.slice(-n)}function g(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function b(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function v(e,t){return g(e,t,"")}function y(e,t){return t.slice(0,function(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let i=t.length;e.length<t.length&&(i=e.length);let r=Array(i),a=0;r[0]=0;for(let e=1;e<i;e++){for(t[e]==t[a]?r[e]=r[a]:r[e]=a;a>0&&t[e]!=t[a];)a=r[a];t[e]==t[a]&&a++}a=0;for(let i=n;i<e.length;i++){for(;a>
2000&&e[i]!=t[a];)a=r[a];e[i]==t[a]&&a++}return a}(e,t))}function S(e,t){let n=[];for(let i of Array.from(t.segment(e))){let e=i.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function k(e,t){let n;if(t)return A(e,t)[1];for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function C(e,t){if(t)return A(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:""}function A(e,t){if(!t)return[C(e),k(e)];if("word"!=t.resolvedOptions().granularity)throw Error('The segmenter passed must have a granularity of "word"');let n=S(e,t),i=n[0],r=n[n.length-1];return[/\s/.test(i)?i:"",/\s/.test(r)?r:""]}let x="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}",w=RegExp(`[${x}]+|\\s+|[^${x}]`,"ug");class E extends f.default{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let i=t.intlSegmenter;if("word"!=i.resolvedOptions().granularity)throw Error('The segmenter passed must have a granularity of "word"');n=S(e,i)}else n=e.match(w)||[];let i=[],r=null;return n.forEach(e=>{/\s/.test(e)?null==r?i.push(e):i.push(i.pop()+e):null!=r&&/\s/.test(r)?i[i.length-1]==r?i.push(i.pop()+e):i.push(r+e):i.push(e),r=e}),i}join(e){return e.map((e,t)=>0==t?e:e.replace(/^\s+/,"")).join("")}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,i=null,r=null;return e.forEach(e=>{e.added?i=e:e.removed?r=e:((i||r)&&L(n,r,i,e,t.intlSegmenter),n=e,i=null,r=null)}),(i||r)&&L(n,r,i,null,t.intlSegmenter),e}}function L(e,t,n,i,r){var a,o,s,l;if(t&&n){let[s,l]=A(t.value,r),[d,u]=A(n.value,r);if(e){let i=p(s,d);e.value=b(e.value,d,i),t.value=v(t.value,i),n.value=v(n.value,i)}if(i){let e=m(l,u);i.value=g(i.value,u,e),a=t.value,t.value=b(a,e,""),o=n.value,n.value=b(o,e,"")}}else if(n){if(e){let e=C(n.value,r);n.value=n.value.substring(e.length)}if(i){let e=C(i.value,r);i.value=i.value.substring(e.length)}}else if(e&&i){let n=C(i.value,r),[a,o]=A(t.value,r),l=p(n,a);t.value=v(t.value,l);let d=m(v(n,l),o);s=t.value,t.value=b(s,d,""),i.value=g(i.value,n,d),e.value=b(e.value,n,n.slice(0,n.length-d.length))}else if(i){let e=C(i.value,r),n=y(k(t.value,r),e);l=t.value,t.value=b(l,n,"")}else if(e){let n=y(k(e.value,r),C(t.value,r));t.value=v(t.value,n)}}new E;class _ extends f.default{tokenize(e){let t=RegExp(`(\\r?\\n)|[${x}]+|[^\\S\\n\\r]+|[^${x}]`,"ug");return e.match(t)||[]}}let T=new _,N={forcePlainText:!1};e.s(["renderDiffWithHighlighter",0,function(e,u,h,{forcePlainText:f,startingLine:p,totalLines:m,expandedHunks:g,collapsedContextThreshold:b=1}=N){f?(p??=0,m??=1/0):(p=0,m=1/0);let v=p>0||m<1/0,y="string"==typeof h.theme?u.getTheme(h.theme).type:void 0,S=(0,o.getHighlighterThemeStyles)({theme:h.theme,highlighter:u}),k=f&&!v&&(e.unifiedLineCount>1e3||e.splitLineCount>1e3)?"none":h.lineDiffType,C={deletionLines:[],additionLines:[]},{maxLineDiffLength:A}=h,x=!f&&!e.isPartial,w=new Map;function E(e,t,n,i){if(v){let e=n.at(-1);(null==e||e.targetIndex+e.count!==t)&&(e={targetIndex:t,originalOffset:i.length,count:0},n.push(e)),e.count++}i.push(e)}for(let o of((0,l.iterateOverDiff)({diff:e,diffStyle:"both",startingLine:p,totalLines:m,expandedHunks:!v||(f?g:void 0),collapsedContextThreshold:b,callback:({hunkIndex:t,additionLine:i,deletionLine:r,type:a})=>{let o,s,l=(o=x?0:t,s=w.get(o)??{deletionContent:{push(e){this.value+=e,this.length++},value:"",length:0},additionContent:{push(e){this.value+=e,this.length++},value:"",length:0},deletionInfo:[],additionInfo:[],deletionDecorations:[],additionDecorations:[],deletionSegments:[],additionSegments:[]},w.set(o,s),s),u=null!=i?i.splitLineIndex:r.splitLineIndex;"change"===a&&null!=i&&null!=r&&function({deletionLine:e,additionLine:t,deletionLineIndex:i,additionLineIndex:r,deletionDecorations:a,additionDecorations:o,lineDiffType:s,maxLineDiffLength:l}){var u,h,f,p;if(null==e||null==t||"none"===s||(e=(0,n.cleanLastNewline)(e),t=(0,n.cleanLastNewline)(t),e.length>l||t.length>l))return;let m="char"===s?(u=e,h=t,c.diff(u,h,void 0)):(f=e,p=t,T.diff(f,p,void 0)),g=[],b=[],v="word-alt"
200===s,y=m.at(-1);for(let e of m){let t=e===y;e.added||e.removed?e.removed?(0,d.pushOrJoinSpan)({item:e,arr:g,enableJoin:v,isLastItem:t}):(0,d.pushOrJoinSpan)({item:e,arr:b,enableJoin:v,isLastItem:t}):((0,d.pushOrJoinSpan)({item:e,arr:g,enableJoin:v,isNeutral:!0,isLastItem:t}),(0,d.pushOrJoinSpan)({item:e,arr:b,enableJoin:v,isNeutral:!0,isLastItem:t}))}let S=0;for(let e of g)1===e[0]&&a.push((0,d.createDiffSpanDecoration)({line:i,spanStart:S,spanLength:e[1].length})),S+=e[1].length;for(let e of(S=0,b))1===e[0]&&o.push((0,d.createDiffSpanDecoration)({line:r,spanStart:S,spanLength:e[1].length})),S+=e[1].length}({additionLine:e.additionLines[i.lineIndex],deletionLine:e.deletionLines[r.lineIndex],deletionLineIndex:l.deletionContent.length,additionLineIndex:l.additionContent.length,deletionDecorations:l.deletionDecorations,additionDecorations:l.additionDecorations,lineDiffType:k,maxLineDiffLength:A}),null!=r&&(E(e.deletionLines[r.lineIndex],r.lineIndex,l.deletionSegments,l.deletionContent),l.deletionInfo.push({type:"change"===a?"change-deletion":a,lineNumber:r.lineNumber,altLineNumber:"change"===a?void 0:i.lineNumber??void 0,lineIndex:`${r.unifiedLineIndex},${u}`})),null!=i&&(E(e.additionLines[i.lineIndex],i.lineIndex,l.additionSegments,l.additionContent),l.additionInfo.push({type:"change"===a?"change-addition":a,lineNumber:i.lineNumber,altLineNumber:"change"===a?void 0:r.lineNumber??void 0,lineIndex:`${i.unifiedLineIndex},${u}`}))}}),w.values())){if(0===o.deletionContent.length&&0===o.additionContent.length)continue;let l={name:e.prevName??e.name,contents:o.deletionContent.value},d={name:e.name,contents:o.additionContent.value},{deletionLines:c,additionLines:p}=function({deletionFile:e,additionFile:o,deletionInfo:l,additionInfo:d,highlighter:u,deletionDecorations:h,additionDecorations:c,languageOverride:f,options:{theme:p=t.DEFAULT_THEMES,...m}}){let g=f??(0,i.getFiletypeFromFileName)(e.name),b=f??(0,i.getFiletypeFromFileName)(o.name),{state:v,transformers:y}=(0,r.createTransformerWithState)(m.useTokenTransformer),S="string"==typeof p?{...m,lang:"text",theme:p,transformers:y,decorations:void 0,defaultColor:!1,cssVariablePrefix:(0,a.formatCSSVariablePrefix)("token"),tokenizeTimeLimit:0}:{...m,lang:"text",themes:p,transformers:y,decorations:void 0,defaultColor:!1,cssVariablePrefix:(0,a.formatCSSVariablePrefix)("token"),tokenizeTimeLimit:0};return{deletionLines:""===e.contents?[]:(S.lang=g,v.lineInfo=l,S.decorations=h,(0,s.getLineNodes)(u.codeToHast((0,n.cleanLastNewline)(e.contents),S))),additionLines:""===o.contents?[]:(S.lang=b,S.decorations=c,v.lineInfo=d,(0,s.getLineNodes)(u.codeToHast((0,n.cleanLastNewline)(o.contents),S)))}}({deletionFile:l,deletionInfo:o.deletionInfo,deletionDecorations:o.deletionDecorations,additionFile:d,additionInfo:o.additionInfo,additionDecorations:o.additionDecorations,highlighter:u,options:h,languageOverride:f?"text":e.lang});if(x){C.deletionLines=c,C.additionLines=p;continue}if(o.deletionSegments.length>0)for(let e of o.deletionSegments)for(let t=0;t<e.count;t++)C.deletionLines[e.targetIndex+t]=c[e.originalOffset+t];else C.deletionLines.push(...c);if(o.additionSegments.length>0)for(let e of o.additionSegments)for(let t=0;t<e.count;t++)C.additionLines[e.targetIndex+t]=p[e.originalOffset+t];else C.additionLines.push(...p)}return{code:C,themeStyles:S,baseThemeType:y}}],276269)},537750,e=>{"use strict";var t=e.i(994940),n=e.i(66117),i=e.i(389569),r=e.i(646611),a=e.i(77142),o=e.i(791352),s=e.i(56523);let l={forcePlainText:!1};e.s(["renderFileWithHighlighter",0,function(e,d,{theme:u=t.DEFAULT_THEMES,tokenizeMaxLineLength:h,useTokenTransformer:c},{forcePlainText:f,startingLine:p,totalLines:m,lines:g}=l){f?(p??=0,m??=1/0):(p=0,m=1/0);let b=p>0||m<1/0,{state:v,transformers:y}=(0,r.createTransformerWithState)(c),S=f?"text":e.lang??(0,i.getFiletypeFromFileName)(e.name),k="string"==typeof u?d.getTheme(u).type:void 0,C=(0,o.getHighlighterThemeStyles)({theme:u,highlighter:d});v.lineInfo=e=>({type:"context",lineIndex:e-1+p,lineNumber:e+p});let A="string"==typeof u?{lang:S,theme:u,transformers:y,defaultColor:!1,cssVariablePrefix:(0,a.formatCSSVariablePrefix)("token"),tokenizeMaxLineLength:h,tokenizeTimeLimit:0}:{lang:S,themes:u,transformers:y,defaultColor:!1,cssVariablePrefix:(0,a.formatCSSVariablePrefix)("token"),tokenizeMaxLineLength:h,tokenizeTimeLimit:0},x=(0,s.getLineNodes)(d.codeToHast(b?function(e,t,n){if(0===e.length)return"";let i=Math.min(t+n,e.length);return e.slice(t,i).join("")}(g??(0,n.linesFromFileContents)(e.contents),p,m):e.contents,A)),w=b?Array(p):x;
200return b&&w.push(...x),{code:w,themeStyles:C,baseThemeType:k}}])},894640,e=>{"use strict";e.s(["shouldUseTokenTransformer",0,function(e){return!0===e.useTokenTransformer||null!=e.onTokenClick||null!=e.onTokenEnter||null!=e.onTokenLeave}])},632145,e=>{"use strict";var t=e.i(390624),n=e.i(813329);function i(e){return[(0,t.getHunkSideStartBoundary)(e.additionStart,e.additionCount)+1,(0,t.getHunkSideEndBoundary)(e.additionStart,e.additionCount)+1]}function r({isPartial:e,rangeSize:t,expandedHunks:n,hunkIndex:i,collapsedContextThreshold:a}){let o=Math.max(t,0);if(0===o||e)return{fromStart:0,fromEnd:0,rangeSize:o,collapsedLines:o,renderAll:!1};if(!0===n||o<=a)return{fromStart:o,fromEnd:0,rangeSize:o,collapsedLines:0,renderAll:!0};let s=n?.get(i),l=Math.min(Math.max(s?.fromStart??0,0),o),d=Math.min(Math.max(s?.fromEnd??0,0),o),u=l+d,h=u>=o;return{fromStart:h?o:l,fromEnd:h?0:d,rangeSize:o,collapsedLines:Math.max(o-u,0),renderAll:h}}function a({fileDiff:e,errorPrefix:n}){let i=e.hunks[e.hunks.length-1];if(null==i||e.isPartial||0===e.additionLines.length||0===e.deletionLines.length)return 0;let r=e.additionLines.length-(0,t.getHunkSideEndBoundary)(i.additionStart,i.additionCount),o=e.deletionLines.length-(0,t.getHunkSideEndBoundary)(i.deletionStart,i.deletionCount);if(r<=0&&o<=0)return 0;if(r!==o)throw Error(`${n}: trailing context mismatch (additions=${r}, deletions=${o}) for ${e.name}`);return Math.min(r,o)}function o({fileDiff:e,hunkIndex:t,expandedHunks:n,collapsedContextThreshold:i,errorPrefix:r}){if(t!==e.hunks.length-1)return;let s=a({fileDiff:e,errorPrefix:r});if(s<=0)return;if(!0===n||s<=i)return{fromStart:s,fromEnd:0,rangeSize:s,collapsedLines:0,renderAll:!0};let l=n?.get(e.hunks.length),d=Math.min(Math.max(l?.fromStart??0,0),s);return{fromStart:d,fromEnd:0,rangeSize:s,collapsedLines:s-d,renderAll:d>=s}}function s({type:e,metrics:t}){return t.hunkSeparatorHeight??(0,n.getDefaultHunkSeparatorHeight)(e)}function l({type:e,metrics:t}){return"simple"===e||"metadata"===e||"line-info-basic"===e?0:t.spacing}e.s(["getExpandedRegion",0,r,"getHunkAdditionLineRange",0,i,"getLeadingHunkSeparatorLayout",0,function({type:e,metrics:t,hunkIndex:n,hunkSpecs:i}){if(!function({type:e,hunkIndex:t,hunkSpecs:n}){switch(e){case"simple":return t>0;case"metadata":return null!=n;case"line-info":case"line-info-basic":case"custom":return!0}}({type:e,hunkIndex:n,hunkSpecs:i}))return;let r=s({type:e,metrics:t}),a=l({type:e,metrics:t}),o=n>0?a:0;return{height:r,gapBefore:o,gapAfter:a,totalHeight:o+r+a}},"getNearestRenderableAdditionLine",0,function({fileDiff:e,lineNumber:t,direction:n,expandedHunks:a,collapsedContextThreshold:s}){if(!0===a||e.isPartial)return t;let l=[],d=1;for(let[t,n]of e.hunks.entries()){let[o,u]=i(n),h=r({isPartial:e.isPartial,rangeSize:n.collapsedBefore,expandedHunks:a,hunkIndex:t,collapsedContextThreshold:s}),c=o-h.rangeSize;h.renderAll?l.push([c,o]):(h.fromStart>0&&l.push([c,c+h.fromStart]),h.fromEnd>0&&l.push([o-h.fromEnd,o])),l.push([o,u]),d=u}let u=o({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:a,collapsedContextThreshold:s,errorPrefix:"getNearestRenderableAdditionLine"});if(null!=u){let e=d;d=e+u.rangeSize,u.renderAll?l.push([e,d]):u.fromStart>0&&l.push([e,e+u.fromStart])}if(t>=d)return t;if("down"===n){for(let[e,n]of l)if(n>t)return Math.max(e,t);return}for(let e=l.length-1;e>=0;e--){let[n,i]=l[e];if(n<=t)return Math.min(i-1,t)}},"getTrailingContextRangeSize",0,a,"getTrailingExpandedRegion",0,o,"getTrailingHunkSeparatorLayout",0,function({type:e,metrics:t}){if("simple"===e||"metadata"===e)return;let n=s({type:e,metrics:t}),i=l({type:e,metrics:t});return{height:n,gapBefore:i,gapAfter:0,totalHeight:i+n}},"hasTrailingContextMismatch",0,function(e){let n=e.hunks[e.hunks.length-1];if(null==n||e.isPartial||0===e.additionLines.length||0===e.deletionLines.length)return!1;let i=e.additionLines.length-(0,t.getHunkSideEndBoundary)(n.additionStart,n.additionCount),r=e.deletionLines.length-(0,t.getHunkSideEndBoundary)(n.deletionStart,n.deletionCount);return(!(i<=0)||!(r<=0))&&i!==r},"isAdditionLineRenderable",0,function({fileDiff:e,lineNumber:t,expandedHunks:n,collapsedContextThreshold:a}
200){if(!0===n||e.isPartial)return!0;for(let[o,s]of e.hunks.entries()){let[l,d]=i(s);if(t<l){let i=r({isPartial:e.isPartial,rangeSize:s.collapsedBefore,expandedHunks:n,hunkIndex:o,collapsedContextThreshold:a}),d=l-i.rangeSize;return i.renderAll||t<d+i.fromStart||t>=l-i.fromEnd}if(t<d)return!0}let s=o({fileDiff:e,hunkIndex:e.hunks.length-1,expandedHunks:n,collapsedContextThreshold:a,errorPrefix:"isAdditionLineRenderable"});if(null==s||s.renderAll)return!0;let[,l]=i(e.hunks[e.hunks.length-1]);return t<l+s.fromStart||t>=l+s.rangeSize}])},41805,e=>{"use strict";e.s(["default",0,class{diff(e,t,n={}){let i;"function"==typeof n?(i=n,n={}):"callback"in n&&(i=n.callback);let r=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(r,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,i)}diffWithOptionsObj(e,t,n,i){var r;let a=e=>(e=this.postProcess(e,n),i)?void setTimeout(function(){i(e)},0):e,o=t.length,s=e.length,l=1,d=o+s;null!=n.maxEditLength&&(d=Math.min(d,n.maxEditLength));let u=null!=(r=n.timeout)?r:1/0,h=Date.now()+u,c=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(c[0],t,e,0,n);if(c[0].oldPos+1>=s&&f+1>=o)return a(this.buildValues(c[0].lastComponent,t,e));let p=-1/0,m=1/0,g=()=>{for(let i=Math.max(p,-l);i<=Math.min(m,l);i+=2){let r,l=c[i-1],d=c[i+1];l&&(c[i-1]=void 0);let u=!1;if(d){let e=d.oldPos-i;u=d&&0<=e&&e<o}let h=l&&l.oldPos+1<s;if(!u&&!h){c[i]=void 0;continue}if(r=!h||u&&l.oldPos<d.oldPos?this.addToPath(d,!0,!1,0,n):this.addToPath(l,!1,!0,1,n),f=this.extractCommon(r,t,e,i,n),r.oldPos+1>=s&&f+1>=o)return a(this.buildValues(r.lastComponent,t,e))||!0;c[i]=r,r.oldPos+1>=s&&(m=Math.min(m,i-1)),f+1>=o&&(p=Math.max(p,i+1))}l++};if(i)!function e(){setTimeout(function(){if(l>d||Date.now()>h)return i(void 0);g()||e()},0)}();else for(;l<=d&&Date.now()<=h;){let e=g();if(e)return e}}addToPath(e,t,n,i,r){let a=e.lastComponent;return a&&!r.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+i,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+i,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,i,r){let a=t.length,o=n.length,s=e.oldPos,l=s-i,d=0;for(;l+1<a&&s+1<o&&this.equals(n[s+1],t[l+1],r);)l++,s++,d++,r.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return d&&!r.oneChangePerToken&&(e.lastComponent={count:d,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,l}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join("")}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let i,r=[];for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,l=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(l,l+e.count)),l+=e.count;else{if(!e.added&&this.useLongestToken){let i=t.slice(s,s+e.count);i=i.map(function(e,t){let i=n[l+t];return i.length>e.length?i:e}),e.value=this.join(i)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(l+=e.count)}}return r}}])},766762,(e,t,n)=>{e.e,function(e){let t=Symbol("newer"),n=Symbol("older");class i{constructor(e,t){"number"!=typeof e&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}_markEntryAsUsed(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)}assign(e){let i,a=this.limit||Number.MAX_VALUE;this._keymap.clear();let o=e[Symbol.iterator]();for(let e=o.next();!e.done;e=o.next()){let o=new r(e.value[0],e.value[1]);if(this._keymap.set(o.key,o),i?(i[t]=o,o[n]=i):this.oldest=o,i=o,0==a--)throw Error("overflow")}this.newest=i,this.size=this._keymap.size}get(e){var t=this._keymap.get(e);return t?(this._markEntryAsUsed(t),t.value):void 0}set(e,i){var a=this._keymap.get(e);return a?(a.value=i,this._markEntryAsUsed(a)):(this._keymap.set(e,a=new r(e,i)),this.newest?(this.newest[t]=a,a[n]=this.newest):this.oldest=a,this.newest=a,++this.size,this.size>this.limit&&this.shift()),this}shift(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap.delete(e.key),--this.size,[e.key,e.value]}find(e){let t=this._keymap.get(e);return t?t.value:void 0}has(e){return this._keymap.has(e)}delete(e){var i=this._keymap.get(e);return i?(this._keymap.delete(i.key),i[t]&&i[n]?(i[n][t]=i[t],i[t][n]=i[n]):i[t]?(i[t][n]=void 0,this.oldest=i[t]):i[n]?(i[n][t]=void 0,this.newest=i[n]):this.oldest=this.newest=void 0,this.size--,i.value):void 0}clear(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()}keys(){return new o(this.oldest)}values(){return new s(this.oldest)}entries(){return this}[Symbol.iterator](){return new a(this.oldest)}forEach(e,n){"object"!=typeof n&&(n=this);let i=this.oldest;for(;i;)e.call(n,i.value,i.key,this),i=i[t]}toJSON(){for(var e=Array(this.size),n=0,i=this.oldest;i;)e[n++]={key:i.key,value:i.value},i=i[t];return e}toString(){for(var e="",n=this.oldest;n;)e+=String(n.key)+":"+n.value,(n=n[t])&&(e+=" < ");return e}}function r(e,i){this.key=e,this.value=i,this[t]=void 0,this[n]=void 0}function a(e){this.entry=e}function o(e){this.entry=e}function s(e){this.entry=e}e.LRUMap=i,a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:[e.key,e.value]}):{done:!0,value:void 0}},o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.key}):{done:!0,value:void 0}},s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let e=this.entry;return e?(this.entry=e[t],{done:!1,value:e.value}):{done:!0,value:void 0}}}(n)},731772,32783,e=>{"use strict";var t=e.i(391398),n=e.i(191788),i=e.i(994940),r=e.i(258304),a=e.i(891359),o=e.i(672165),s=e.i(683255),l=e.i(522588),d=e.i(598038),u=e.i(563951),h=e.i(116396),c=e.i(896328),f=e.i(580149);let p="u"<typeof window?n.useEffect:n.useLayoutEffect;function m({options:e,controlledSelection:t,edit:n,hasCustomHeader:i,hasEditor:r,hasGutterRenderUtility:a}){let o=n&&r,s=t||a||i;if(!s&&!o)return e;let l={...e};return s&&(l={...l,controlledSelection:t,renderCustomHeader:i?h.noopRender:e?.renderCustomHeader,renderGutterUtility:a?h.noopRender:e?.renderGutterUtility}),o&&(l={...l,useTokenTransformer:!0}),l}function g({file:e,lineAnnotations:h,selectedLines:b,options:v,editorOptions:y,metrics:S,className:k,style:C,renderAnnotation:A,renderCustomHeader:x,renderHeaderPrefix:w,renderHeaderFilenameSuffix:E,renderHeaderMetadata:L,prerenderedHTML:_,renderGutterUtility:T,disableWorkerPool:N=!1,edit:R=!1}){let{ref:M,getHoveredLine:I}=function({file:e,options:t,editorOptions:i,lineAnnotations:r,selectedLines:a,prerenderedHTML:h,metrics:g,hasGutterRenderUtility:b,hasCustomHeader:v,disableWorkerPool:y,edit:S}
200){let k=(0,f.useVirtualizer)(),C=void 0!==a,A=(0,n.useContext)(c.WorkerPoolContext),x=(0,u.useCreateEditor)(),w=(0,n.useRef)(null),E=(0,d.useStableCallback)(n=>{if(null!=n){if(null!=w.current)throw Error("File: An instance should not already exist when a node is created");null!=k?w.current=new l.VirtualizedFile(m({controlledSelection:C,edit:S,hasCustomHeader:v,hasEditor:void 0!==x,hasGutterRenderUtility:b,options:t}),k,g,!y?A:void 0,!0):w.current=new s.File(m({controlledSelection:C,edit:S,hasCustomHeader:v,hasEditor:void 0!==x,hasGutterRenderUtility:b,options:t}),!y?A:void 0,!0),w.current.hydrate({file:e,fileContainer:n,lineAnnotations:r,prerenderedHTML:h})}else{if(null==w.current)throw Error("File: A File instance should exist when unmounting");w.current.cleanUp(),w.current=null}});return p(()=>{if(null==w.current)return;let n=m({controlledSelection:C,edit:S,hasCustomHeader:v,hasEditor:void 0!==x,hasGutterRenderUtility:b,options:t}),i=!(0,o.areOptionsEqual)(w.current.options,n);w.current.setOptions(n),w.current.render({file:e,lineAnnotations:r,forceRender:i}),void 0!==a&&w.current.setSelectedLines(a)}),p(()=>{if(S&&null!=w.current){if(void 0===x)throw Error("File: EditContext is not attached");let e=x(i??{});if(null==e)throw Error("File: EditProvider.createEditor must return an editor instance");try{return e.edit(w.current)}catch(t){throw e.cleanUp(),t}}},[S]),{ref:E,getHoveredLine:(0,n.useCallback)(()=>w.current?.getHoveredLine(),[])}}({file:e,options:v,editorOptions:y,metrics:S,lineAnnotations:h,selectedLines:b,prerenderedHTML:_,hasGutterRenderUtility:null!=T,hasCustomHeader:null!=x,disableWorkerPool:N,edit:R});return(0,t.jsx)(i.DIFFS_TAG_NAME,{ref:M,className:k,style:C,children:(0,a.templateRender)((0,r.renderFileChildren)({file:e,renderAnnotation:A,renderCustomHeader:x,renderHeaderPrefix:w,renderHeaderFilenameSuffix:E,renderHeaderMetadata:L,renderGutterUtility:T,lineAnnotations:h,getHoveredLine:I}),_)})}e.s(["File",0,g],32783);var b=e.i(603331),v=e.i(321347),y=e.i(434413),S=e.i(349029),k=e.i(382248),C=e.i(582512);let A=e=>`
201  :host {
202    color-scheme: ${e};
203    --diffs-bg: var(--background);
204    --diffs-fg: var(--foreground);
205    --diffs-fg-number-override: var(--muted-foreground);
206    --diffs-bg-context-override: var(--background);
207    --diffs-bg-separator-override: var(--muted);
208    --diffs-bg-hover-override: var(--accent);
209    --diffs-bg-buffer-override: var(--muted);
210    --diffs-gap-style: 1px solid var(--border);
211    --diffs-font-family: var(--font-mono);
212    --diffs-header-font-family: var(--font-sans);
213    --diffs-font-size: 12px;
214  }
215`,x=A("light"),w=A("dark"),E=e=>"dark"===e?w:x,L=`
216  :host {
217    --diffs-gap-style: 1px solid transparent;
218  }
219`,_=e=>e&&e in v.bundledLanguages?e:"text";e.s(["AppCodePreviewCopyButton",0,function({code:e,entity:n="code",className:i,disabled:r,...a}){let{handleCopyText:o,CopyIcon:s,copyText:l,isCopied:d}=(0,k.default)(e,{entity:n});return(0,t.jsxs)(S.Tooltip,{children:[(0,t.jsx)(S.TooltipTrigger,{asChild:!0,children:(0,t.jsx)(y.Button,{variant:"ghost",size:"icon-xs",className:(0,C.cn)("text-muted-foreground hover:text-foreground",i),"aria-label":l,disabled:r||!e,onClick:o,...a,children:(0,t.jsx)(s,{className:(0,C.cn)(d&&"text-success-foreground")})})}),(0,t.jsx)(S.TooltipContent,{children:l})]})},"default",0,({content:e,filename:i,lang:r,options:a,title:o,headerActions:s,headerClassName:l,minLines:d,className:u})=>{let{resolvedTheme:h}=(0,b.useTheme)(),c=(0,n.useMemo)(()=>({...a,unsafeCSS:`${E(h)}${L}${a?.unsafeCSS??""}`,disableFileHeader:!0}),[h,a]),f=(0,n.useMemo)(()=>{let t;return{name:i??"code",contents:d?(t=e.split("\n").length)>=d?e:e+"\n".repeat(d-t):e,...r?{lang:_(r)}:{}}},[i,e,r,d]),p=(0,t.jsx)("div",{className:(0,C.cn)("w-full overflow-auto",void 0===o&&void 0===s&&u),children:(0,t.jsx)(g,{file:f,options:c})});return void 0===o&&void 0===s?p:(0,t.jsxs)("div",{className:(0,C.cn)("flex w-full flex-col overflow-hidden rounded-md border",u),children:[(0,t.jsxs)("div",{className:(0,C.cn)("bg-sidebar flex h-8 w-full shrink-0 items-center justify-between gap-2 border-b px-2 py-1.5",l),children:[(0,t.jsx)("span",{className:"text-muted-foreground truncate font-mono text-xs",children:o}),(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-0.5",children:s})]}),p]})},"getDiffsThemeCSS",0,E,"toSupportedDiffsLanguage",0,_],731772)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.