PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
← All changes | build/index.js +1 -1 1.27.31.13.0 View file →
@@ -1 +1 @@
1 -(()=>{var e,t={69:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)},s=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!("get"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,s)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return o(t,e),t},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var l=a(n(609)),c="undefined"!=typeof window&&"navigator"in window&&/Win/i.test(navigator.platform),u="undefined"!=typeof window&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),d="npm__react-simple-code-editor__textarea",p="\n/**\n * Reset the text fill color so that placeholder is visible\n */\n.".concat(d,":empty {\n -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * Hack to apply on some CSS on IE10 and IE11\n */\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n /**\n * IE doesn't support '-webkit-text-fill-color'\n * So we use 'color: transparent' to make the text transparent on IE\n * Unlike other browsers, it doesn't affect caret color in IE\n */\n .").concat(d," {\n color: transparent !important;\n }\n\n .").concat(d,"::selection {\n background-color: #accef7 !important;\n color: transparent !important;\n }\n}\n"),h=l.forwardRef((function(e,t){var n=e.autoFocus,s=e.disabled,o=e.form,a=e.highlight,h=e.ignoreTabKey,g=void 0!==h&&h,f=e.insertSpaces,b=void 0===f||f,y=e.maxLength,k=e.minLength,v=e.name,_=e.onBlur,x=e.onClick,S=e.onFocus,C=e.onKeyDown,j=e.onKeyUp,N=e.onValueChange,w=e.padding,L=void 0===w?0:w,P=e.placeholder,T=e.preClassName,A=e.readOnly,R=e.required,B=e.style,O=e.tabSize,E=void 0===O?2:O,M=e.textareaClassName,I=e.textareaId,F=e.value,H=i(e,["autoFocus","disabled","form","highlight","ignoreTabKey","insertSpaces","maxLength","minLength","name","onBlur","onClick","onFocus","onKeyDown","onKeyUp","onValueChange","padding","placeholder","preClassName","readOnly","required","style","tabSize","textareaClassName","textareaId","value"]),D=l.useRef({stack:[],offset:-1}),G=l.useRef(null),$=l.useState(!0),W=$[0],z=$[1],U={paddingTop:"object"==typeof L?L.top:L,paddingRight:"object"==typeof L?L.right:L,paddingBottom:"object"==typeof L?L.bottom:L,paddingLeft:"object"==typeof L?L.left:L},q=a(F),V=function(e,t){return e.substring(0,t).split("\n")},J=l.useCallback((function(e,t){var n,s,o;void 0===t&&(t=!1);var a=D.current,i=a.stack,l=a.offset;if(i.length&&l>-1){D.current.stack=i.slice(0,l+1);var c=D.current.stack.length;if(c>100){var u=c-100;D.current.stack=i.slice(u,c),D.current.offset=Math.max(D.current.offset-u,0)}}var d=Date.now();if(t){var p=D.current.stack[D.current.offset];if(p&&d-p.timestamp<3e3){var h=/[^a-z0-9]([a-z0-9]+)$/i,m=null===(n=V(p.value,p.selectionStart).pop())||void 0===n?void 0:n.match(h),g=null===(s=V(e.value,e.selectionStart).pop())||void 0===s?void 0:s.match(h);if((null==m?void 0:m[1])&&(null===(o=null==g?void 0:g[1])||void 0===o?void 0:o.startsWith(m[1])))return void(D.current.stack[D.current.offset]=r(r({},e),{timestamp:d}))}}D.current.stack.push(r(r({},e),{timestamp:d})),D.current.offset++}),[]),K=l.useCallback((function(){var e=G.current;if(e){var t=e.value,n=e.selectionStart,r=e.selectionEnd;J({value:t,selectionStart:n,selectionEnd:r})}}),[J]),X=function(e){var t=G.current;t&&(t.value=e.value,t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd,null==N||N(e.value))},Q=function(e){var t=G.current,n=D.current.stack[D.current.offset];n&&t&&(D.current.stack[D.current.offset]=r(r({},n),{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})),J(e),X(e)};return l.useEffect((function(){K()}),[K]),l.useImperativeHandle(t,(function(){return{get session(){return{history:D.current}},set session(e){D.current=e.history}}}),[]),l.createElement("div",r({},H,{style:r(r({},m.container),B)}),l.createElement("pre",r({className:T,"aria-hidden":"true",style:r(r(r({},m.editor),m.highlight),U)},"string"==typeof q?{dangerouslySetInnerHTML:{__html:q+"<br />"}}:{children:q})),l.createElement("textarea",{ref:function(e){return G.current=e},style:r(r(r({},m.editor),m.textarea),U),className:d+(M?" ".concat(M):""),id:I,value:F,onChange:function(e){var t=e.currentTarget,n=t.value,r=t.selectionStart,s=t.selectionEnd;J({value:n,selectionStart:r,selectionEnd:s},!0),N(n)},onKeyDown:function(e){if(!C||(C(e),!e.defaultPrevented)){"Escape"===e.key&&e.currentTarget.blur();var t=e.currentTarget,n=t.value,r=t.selectionStart,s=t.selectionEnd,o=(b?" ":"\t").repeat(E);if("Tab"===e.key&&!g&&W)if(e.preventDefault(),e.shiftKey){var a=(p=V(n,r)).length-1,i=V(n,s).length-1,l=n.split("\n").map((function(e,t){return t>=a&&t<=i&&e.startsWith(o)?e.substring(o.length):e})).join("\n");if(n!==l){var d=p[a];Q({value:l,selectionStart:(null==d?void 0:d.startsWith(o))?r-o.length:r,selectionEnd:s-(n.length-l.length)})}}else if(r!==s){var p,h=(p=V(n,r)).length-1,m=V(n,s).length-1;d=p[h],Q({value:n.split("\n").map((function(e,t){return t>=h&&t<=m?o+e:e})).join("\n"),selectionStart:d&&/\S/.test(d)?r+o.length:r,selectionEnd:s+o.length*(m-h+1)})}else{var f=r+o.length;Q({value:n.substring(0,r)+o+n.substring(s),selectionStart:f,selectionEnd:f})}else if("Backspace"===e.key){var y=r!==s;n.substring(0,r).endsWith(o)&&!y&&(e.preventDefault(),f=r-o.length,Q({value:n.substring(0,r-o.length)+n.substring(s),selectionStart:f,selectionEnd:f}))}else if("Enter"===e.key){if(r===s){var k=V(n,r).pop(),v=null==k?void 0:k.match(/^\s+/);if(null==v?void 0:v[0]){e.preventDefault();var _="\n"+v[0];f=r+_.length,Q({value:n.substring(0,r)+_+n.substring(s),selectionStart:f,selectionEnd:f})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var x=void 0;57===e.keyCode&&e.shiftKey?x=["(",")"]:219===e.keyCode?x=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?x=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(x=["`","`"]),r!==s&&x&&(e.preventDefault(),Q({value:n.substring(0,r)+x[0]+n.substring(r,s)+x[1]+n.substring(s),selectionStart:r,selectionEnd:s+2}))}else!(u?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(u?e.metaKey&&90===e.keyCode&&e.shiftKey:c?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),function(){var e=D.current,t=e.stack,n=e.offset,r=t[n+1];r&&(X(r),D.current.offset=Math.min(n+1,t.length-1))}()):77!==e.keyCode||!e.ctrlKey||u&&!e.shiftKey||(e.preventDefault(),z((function(e){return!e}))):(e.preventDefault(),function(){var e=D.current,t=e.stack,n=e.offset,r=t[n-1];r&&(X(r),D.current.offset=Math.max(n-1,0))}())}},onClick:x,onKeyUp:j,onFocus:S,onBlur:_,disabled:s,form:o,maxLength:y,minLength:k,name:v,placeholder:P,readOnly:A,required:R,autoFocus:n,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),l.createElement("style",{dangerouslySetInnerHTML:{__html:p}}))})),m={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}};t.default=h},217:function(e){e.exports=(()=>{"use strict";var e={350:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:"undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},36:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.toOptionalTokenType=t.EncodedTokenAttributes=void 0,(n=t.EncodedTokenAttributes||(t.EncodedTokenAttributes={})).toBinaryStr=function(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t},n.print=function(e){const t=n.getLanguageId(e),r=n.getTokenType(e),s=n.getFontStyle(e),o=n.getForeground(e),a=n.getBackground(e);console.log({languageId:t,tokenType:r,fontStyle:s,foreground:o,background:a})},n.getLanguageId=function(e){return(255&e)>>>0},n.getTokenType=function(e){return(768&e)>>>8},n.containsBalancedBrackets=function(e){return!!(1024&e)},n.getFontStyle=function(e){return(30720&e)>>>11},n.getForeground=function(e){return(16744448&e)>>>15},n.getBackground=function(e){return(4278190080&e)>>>24},n.set=function(e,t,r,s,o,a,i){let l=n.getLanguageId(e),c=n.getTokenType(e),u=n.containsBalancedBrackets(e)?1:0,d=n.getFontStyle(e),p=n.getForeground(e),h=n.getBackground(e);return 0!==t&&(l=t),8!==r&&(c=r),null!==s&&(u=s?1:0),-1!==o&&(d=o),0!==a&&(p=a),0!==i&&(h=i),(l|c<<8|u<<10|d<<11|p<<15|h<<24)>>>0},t.toOptionalTokenType=function(e){return e}},996:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasicScopeAttributesProvider=t.BasicScopeAttributes=void 0;const r=n(878);class s{constructor(e,t){this.languageId=e,this.tokenType=t}}t.BasicScopeAttributes=s;class o{constructor(e,t){this._getBasicScopeAttributes=new r.CachedFn((e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new s(t,n)})),this._defaultAttributes=new s(e,8),this._embeddedLanguagesMatcher=new a(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?o._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(o.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}t.BasicScopeAttributesProvider=o,o._NULL_SCOPE_METADATA=new s(0,0),o.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class a{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map((([e,t])=>r.escapeRegExpCharacters(e)));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}},947:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LineTokens=t.BalancedBracketSelectors=t.StateStack=t.AttributedScopeStack=t.Grammar=t.createGrammar=void 0;const r=n(350),s=n(36),o=n(736),a=n(44),i=n(792),l=n(583),c=n(878),u=n(996),d=n(47);function p(e,t,n,r,s){const a=o.createMatchers(t,h),l=i.RuleFactory.getCompiledRuleId(n,r,s.repository);for(const n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:l,grammar:s,priority:n.priority})}function h(e,t){if(t.length<e.length)return!1;let n=0;return e.every((e=>{for(let r=n;r<t.length;r++)if(m(t[r],e))return n=r+1,!0;return!1}))}function m(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}t.createGrammar=function(e,t,n,r,s,o,a,i){return new g(e,t,n,r,s,o,a,i)};class g{constructor(e,t,n,r,s,a,i,l){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=l,this._basicScopeAttributesProvider=new u.BasicScopeAttributesProvider(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=f(t,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const e of Object.keys(s)){const t=o.createMatchers(e,h);for(const n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:s[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const 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(){const e=[],t=this._rootScopeName,n=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(n){const r=n.injections;if(r)for(let t in r)p(e,t,r[t],this,n);const s=this._grammarRepository.injections(t);s&&s.forEach((t=>{const n=this.getExternalGrammar(t);if(n){const t=n.injectionSelector;t&&p(e,t,n,this,n)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),r.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const e of this._injections)console.log(` - ${e.debugSelector}`)}return this._injections}registerRule(e){const t=++this._lastRuleId,n=e(i.ruleIdFromNumber(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[i.ruleIdToNumber(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=f(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let o;if(-1===this._rootId&&(this._rootId=i.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository)),t&&t!==y.NULL)o=!1,t.reset();else{o=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=s.EncodedTokenAttributes.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null);let i;i=a?b.createRootAndLookUpScopeName(a,r,this):b.createRoot("unknown",r),t=new y(null,this._rootId,-1,-1,!1,null,i,i)}e+="\n";const l=this.createOnigString(e),c=l.content.length,u=new k(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),p=d._tokenizeString(this,l,o,0,t,u,!0,r);return a.disposeOnigString(l),{lineLength:c,lineTokens:u,ruleStack:p.stack,stoppedEarly:p.stoppedEarly}}}function f(e,t){return(e=c.clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}t.Grammar=g;class b{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static createRoot(e,t){return new b(null,new l.ScopeStack(null,e),t)}static createRootAndLookUpScopeName(e,t,n){const r=n.getMetadataForScope(e),s=new l.ScopeStack(null,e),o=n.themeProvider.themeMatch(s),a=b.mergeAttributes(t,r,o);return new b(null,s,a)}get scopeName(){return this.scopePath.scopeName}equals(e){return b._equals(this,e)}static _equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,o=0,a=0;return null!==n&&(r=n.fontStyle,o=n.foregroundId,a=n.backgroundId),s.EncodedTokenAttributes.set(e,t.languageId,t.tokenType,null,r,o,a)}pushAttributed(e,t){if(null===e)return this;if(-1===e.indexOf(" "))return b._pushAttributed(this,e,t);const n=e.split(/ /g);let r=this;for(const e of n)r=b._pushAttributed(r,e,t);return r}static _pushAttributed(e,t,n){const r=n.getMetadataForScope(t),s=e.scopePath.push(t),o=n.themeProvider.themeMatch(s),a=b.mergeAttributes(e.tokenAttributes,r,o);return new b(e,s,a)}getScopeNames(){return this.scopePath.getSegments()}}t.AttributedScopeStack=b;class y{constructor(e,t,n,r,s,o,a,i){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=i,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}equals(e){return null!==e&&y._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e.contentNameScopesList.equals(t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(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(){y._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,r,s,o,a){return new y(this,e,t,n,r,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, TODO-${this.nameScopesList}, TODO-${this.contentNameScopesList})`,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(e){return this.endRule===e?this:new y(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,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}}t.StateStack=y,y.NULL=new y(null,0,0,0,!1,null,null,null),t.BalancedBracketSelectors=class{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>"*"===e?(this.allowAny=!0,[]):o.createMatchers(e,h).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>o.createMatchers(e,h).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(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}};class k{constructor(e,t,n,s){this.balancedBracketSelectors=s,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,r.DebugFlags.InDebugMode?this._lineText=t:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e.tokenAttributes,o=!1;if(this.balancedBracketSelectors?.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e.getScopeNames();for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=s.EncodedTokenAttributes.set(n,0,s.toOptionalTokenType(e.type),null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(t))}if(o&&(n=s.EncodedTokenAttributes.set(n,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n)return void(this._lastTokenEndIndex=t);if(r.DebugFlags.InDebugMode){const n=e.getScopeNames();console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log(" * "+n[e])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t)}const n=e.getScopeNames();if(r.DebugFlags.InDebugMode){console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log(" * "+n[e])}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);const n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}}t.LineTokens=k},965:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseInclude=t.TopLevelRepositoryReference=t.TopLevelReference=t.RelativeReference=t.SelfReference=t.BaseReference=t.ScopeDependencyProcessor=t.ExternalReferenceCollector=t.TopLevelRepositoryRuleReference=t.TopLevelRuleReference=void 0;const r=n(878);class s{constructor(e){this.scopeName=e}toKey(){return this.scopeName}}t.TopLevelRuleReference=s;class o{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}}t.TopLevelRepositoryRuleReference=o;class a{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}}function i(e,t,n,r){const o=n.lookup(e.scopeName);if(!o){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const a=n.lookup(t);e instanceof s?c({baseGrammar:a,selfGrammar:o},r):l(e.ruleName,{baseGrammar:a,selfGrammar:o,repository:o.repository},r);const i=n.injections(e.scopeName);if(i)for(const e of i)r.add(new s(e))}function l(e,t,n){t.repository&&t.repository[e]&&u([t.repository[e]],t,n)}function c(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&u(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&u(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function u(e,t,n){for(const a of e){if(n.visitedRule.has(a))continue;n.visitedRule.add(a);const e=a.repository?r.mergeObjects({},t.repository,a.repository):t.repository;Array.isArray(a.patterns)&&u(a.patterns,{...t,repository:e},n);const i=a.include;if(!i)continue;const d=f(i);switch(d.kind){case 0:c({...t,selfGrammar:t.baseGrammar},n);break;case 1:c(t,n);break;case 2:l(d.ruleName,{...t,repository:e},n);break;case 3:case 4:const r=d.scopeName===t.selfGrammar.scopeName?t.selfGrammar:d.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){const s={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};4===d.kind?l(d.ruleName,s,n):c(s,n)}else 4===d.kind?n.add(new o(d.scopeName,d.ruleName)):n.add(new s(d.scopeName))}}}t.ExternalReferenceCollector=a,t.ScopeDependencyProcessor=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new s(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new a;for(const n of e)i(n,this.initialScopeName,this.repo,t);for(const e of t.references)if(e instanceof s){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName))continue;if(this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};class d{constructor(){this.kind=0}}t.BaseReference=d;class p{constructor(){this.kind=1}}t.SelfReference=p;class h{constructor(e){this.ruleName=e,this.kind=2}}t.RelativeReference=h;class m{constructor(e){this.scopeName=e,this.kind=3}}t.TopLevelReference=m;class g{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function f(e){if("$base"===e)return new d;if("$self"===e)return new p;const t=e.indexOf("#");if(-1===t)return new m(e);if(0===t)return new h(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new g(n,r)}}t.TopLevelRepositoryReference=g,t.parseInclude=f},391:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),s(n(947),t)},47:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStackElement=t._tokenizeString=void 0;const r=n(350),s=n(44),o=n(792),a=n(878);class i{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function l(e,t,n,s,l,d,h,m){const g=t.content.length;let f=!1,b=-1;if(h){const a=function(e,t,n,s,a,i){let l=a.beginRuleCapturedEOL?0:-1;const c=[];for(let t=a;t;t=t.pop()){const n=t.getRule(e);n instanceof o.BeginWhileRule&&c.push({rule:n,stack:t})}for(let d=c.pop();d;d=c.pop()){const{ruleScanner:c,findOptions:h}=u(d.rule,e,d.stack.endRule,n,s===l),m=c.findNextMatchSync(t,s,h);if(r.DebugFlags.InDebugMode&&(console.log(" scanning for while rule"),console.log(c.toString())),!m){r.DebugFlags.InDebugMode&&console.log(" popping "+d.rule.debugName+" - "+d.rule.debugWhileRegExp),a=d.stack.pop();break}if(m.ruleId!==o.whileRuleId){a=d.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(i.produce(d.stack,m.captureIndices[0].start),p(e,t,n,d.stack,i,d.rule.whileCaptures,m.captureIndices),i.produce(d.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>s&&(s=m.captureIndices[0].end,n=!1))}return{stack:a,linePos:s,anchorPosition:l,isFirstLine:n}}(e,t,n,s,l,d);l=a.stack,s=a.linePos,n=a.isFirstLine,b=a.anchorPosition}const y=Date.now();for(;!f;){if(0!==m&&Date.now()-y>m)return new i(l,!0);k()}return new i(l,!1);function k(){r.DebugFlags.InDebugMode&&(console.log(""),console.log(`@@scanNext ${s}: |${t.content.substr(s).replace(/\n$/,"\\n")}|`));const i=function(e,t,n,s,o,i){const l=function(e,t,n,s,o,i){const l=o.getRule(e),{ruleScanner:u,findOptions:d}=c(l,e,o.endRule,n,s===i);let p=0;r.DebugFlags.InDebugMode&&(p=a.performanceNow());const h=u.findNextMatchSync(t,s,d);if(r.DebugFlags.InDebugMode){const e=a.performanceNow()-p;e>5&&console.warn(`Rule ${l.debugName} (${l.id}) matching took ${e} against '${t}'`),console.log(` scanning for (linePos: ${s}, anchorPosition: ${i})`),console.log(u.toString()),h&&console.log(`matched rule id: ${h.ruleId} from ${h.captureIndices[0].start} to ${h.captureIndices[0].end}`)}return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}(e,t,n,s,o,i),u=e.getInjections();if(0===u.length)return l;const d=function(e,t,n,s,o,a,i){let l,u=Number.MAX_VALUE,d=null,p=0;const h=a.contentNameScopesList.getScopeNames();for(let a=0,m=e.length;a<m;a++){const m=e[a];if(!m.matcher(h))continue;const g=t.getRule(m.ruleId),{ruleScanner:f,findOptions:b}=c(g,t,null,s,o===i),y=f.findNextMatchSync(n,o,b);if(!y)continue;r.DebugFlags.InDebugMode&&(console.log(` matched injection: ${m.debugSelector}`),console.log(f.toString()));const k=y.captureIndices[0].start;if(!(k>=u)&&(u=k,d=y.captureIndices,l=y.ruleId,p=m.priority,u===o))break}return d?{priorityMatch:-1===p,captureIndices:d,matchedRuleId:l}:null}(u,e,t,n,s,o,i);if(!d)return l;if(!l)return d;const p=l.captureIndices[0].start,h=d.captureIndices[0].start;return h<p||d.priorityMatch&&h===p?d:l}(e,t,n,s,l,b);if(!i)return r.DebugFlags.InDebugMode&&console.log(" no more matches."),d.produce(l,g),void(f=!0);const u=i.captureIndices,h=i.matchedRuleId,m=!!(u&&u.length>0)&&u[0].end>s;if(h===o.endRuleId){const o=l.getRule(e);r.DebugFlags.InDebugMode&&console.log(" popping "+o.debugName+" - "+o.debugEndRegExp),d.produce(l,u[0].start),l=l.withContentNameScopesList(l.nameScopesList),p(e,t,n,l,d,o.endCaptures,u),d.produce(l,u[0].end);const a=l;if(l=l.parent,b=a.getAnchorPos(),!m&&a.getEnterPos()===s)return r.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),l=a,d.produce(l,g),void(f=!0)}else{const a=e.getRule(h);d.produce(l,u[0].start);const i=l,c=a.getName(t.content,u),y=l.contentNameScopesList.pushAttributed(c,e);if(l=l.push(h,s,b,u[0].end===g,null,y,y),a instanceof o.BeginEndRule){const s=a;r.DebugFlags.InDebugMode&&console.log(" pushing "+s.debugName+" - "+s.debugBeginRegExp),p(e,t,n,l,d,s.beginCaptures,u),d.produce(l,u[0].end),b=u[0].end;const o=s.getContentName(t.content,u),c=y.pushAttributed(o,e);if(l=l.withContentNameScopesList(c),s.endHasBackReferences&&(l=l.withEndRule(s.getEndWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return r.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),d.produce(l,g),void(f=!0)}else if(a instanceof o.BeginWhileRule){const s=a;r.DebugFlags.InDebugMode&&console.log(" pushing "+s.debugName),p(e,t,n,l,d,s.beginCaptures,u),d.produce(l,u[0].end),b=u[0].end;const o=s.getContentName(t.content,u),c=y.pushAttributed(o,e);if(l=l.withContentNameScopesList(c),s.whileHasBackReferences&&(l=l.withEndRule(s.getWhileWithResolvedBackReferences(t.content,u))),!m&&i.hasSameRuleAs(l))return r.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),d.produce(l,g),void(f=!0)}else{const s=a;if(r.DebugFlags.InDebugMode&&console.log(" matched "+s.debugName+" - "+s.debugMatchRegExp),p(e,t,n,l,d,s.captures,u),d.produce(l,u[0].end),l=l.pop(),!m)return r.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),l=l.safePop(),d.produce(l,g),void(f=!0)}}u[0].end>s&&(s=u[0].end,n=!1)}}function c(e,t,n,s,o){return r.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:d(s,o)}:{ruleScanner:e.compileAG(t,n,s,o),findOptions:0}}function u(e,t,n,s,o){return r.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:d(s,o)}:{ruleScanner:e.compileWhileAG(t,n,s,o),findOptions:0}}function d(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function p(e,t,n,r,o,a,i){if(0===a.length)return;const c=t.content,u=Math.min(a.length,i.length),d=[],p=i[0].end;for(let t=0;t<u;t++){const u=a[t];if(null===u)continue;const m=i[t];if(0===m.length)continue;if(m.start>p)break;for(;d.length>0&&d[d.length-1].endPos<=m.start;)o.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop();if(d.length>0?o.produceFromScopes(d[d.length-1].scopes,m.start):o.produce(r,m.start),u.retokenizeCapturedWithRuleId){const t=u.getName(c,i),a=r.contentNameScopesList.pushAttributed(t,e),d=u.getContentName(c,i),p=a.pushAttributed(d,e),h=r.push(u.retokenizeCapturedWithRuleId,m.start,-1,!1,null,a,p),g=e.createOnigString(c.substring(0,m.end));l(e,g,n&&0===m.start,m.start,h,o,!1,0),s.disposeOnigString(g);continue}const g=u.getName(c,i);if(null!==g){const t=(d.length>0?d[d.length-1].scopes:r.contentNameScopesList).pushAttributed(g,e);d.push(new h(t,m.end))}}for(;d.length>0;)o.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop()}t._tokenizeString=l;class h{constructor(e,t){this.scopes=e,this.endPos=t}}t.LocalStackElement=h},974:(e,t)=>{function n(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSON=void 0,t.parseJSON=function(e,t,a){let i=new r(e),l=new s,c=0,u=null,d=[],p=[];function h(){d.push(c),p.push(u)}function m(){c=d.pop(),u=p.pop()}function g(e){n(i,e)}for(;o(i,l);){if(0===c){if(null!==u&&g("too many constructs in root"),3===l.type){u={},a&&(u.$vscodeTextmateLocation=l.toLocation(t)),h(),c=1;continue}if(2===l.type){u=[],h(),c=4;continue}g("unexpected token in root")}if(2===c){if(5===l.type){m();continue}if(7===l.type){c=3;continue}g("expected , or }")}if(1===c||3===c){if(1===c&&5===l.type){m();continue}if(1===l.type){let e=l.value;if(o(i,l)&&6===l.type||g("expected colon"),o(i,l)||g("expected value"),c=2,1===l.type){u[e]=l.value;continue}if(8===l.type){u[e]=null;continue}if(9===l.type){u[e]=!0;continue}if(10===l.type){u[e]=!1;continue}if(11===l.type){u[e]=parseFloat(l.value);continue}if(2===l.type){let t=[];u[e]=t,h(),c=4,u=t;continue}if(3===l.type){let n={};a&&(n.$vscodeTextmateLocation=l.toLocation(t)),u[e]=n,h(),c=1,u=n;continue}}g("unexpected token in dict")}if(5===c){if(4===l.type){m();continue}if(7===l.type){c=6;continue}g("expected , or ]")}if(4===c||6===c){if(4===c&&4===l.type){m();continue}if(c=5,1===l.type){u.push(l.value);continue}if(8===l.type){u.push(null);continue}if(9===l.type){u.push(!0);continue}if(10===l.type){u.push(!1);continue}if(11===l.type){u.push(parseFloat(l.value));continue}if(2===l.type){let e=[];u.push(e),h(),c=4,u=e;continue}if(3===l.type){let e={};a&&(e.$vscodeTextmateLocation=l.toLocation(t)),u.push(e),h(),c=1,u=e;continue}g("unexpected token in array")}g("unknown state")}return 0!==p.length&&g("unclosed constructs"),u};class r{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class s{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function o(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let r,s=e.source,o=e.pos,a=e.len,i=e.line,l=e.char;for(;;){if(o>=a)return!1;if(r=s.charCodeAt(o),32!==r&&9!==r&&13!==r){if(10!==r)break;o++,i++,l=0}else o++,l++}if(t.offset=o,t.line=i,t.char=l,34===r){for(t.type=1,o++,l++;;){if(o>=a)return!1;if(r=s.charCodeAt(o),o++,l++,92!==r){if(34===r)break}else o++,l++}t.value=s.substring(t.offset+1,o-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,r)=>{switch(r){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:n(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===r)t.type=2,o++,l++;else if(123===r)t.type=3,o++,l++;else if(93===r)t.type=4,o++,l++;else if(125===r)t.type=5,o++,l++;else if(58===r)t.type=6,o++,l++;else if(44===r)t.type=7,o++,l++;else if(110===r){if(t.type=8,o++,l++,r=s.charCodeAt(o),117!==r)return!1;if(o++,l++,r=s.charCodeAt(o),108!==r)return!1;if(o++,l++,r=s.charCodeAt(o),108!==r)return!1;o++,l++}else if(116===r){if(t.type=9,o++,l++,r=s.charCodeAt(o),114!==r)return!1;if(o++,l++,r=s.charCodeAt(o),117!==r)return!1;if(o++,l++,r=s.charCodeAt(o),101!==r)return!1;o++,l++}else if(102===r){if(t.type=10,o++,l++,r=s.charCodeAt(o),97!==r)return!1;if(o++,l++,r=s.charCodeAt(o),108!==r)return!1;if(o++,l++,r=s.charCodeAt(o),115!==r)return!1;if(o++,l++,r=s.charCodeAt(o),101!==r)return!1;o++,l++}else for(t.type=11;;){if(o>=a)return!1;if(r=s.charCodeAt(o),!(46===r||r>=48&&r<=57||101===r||69===r||45===r||43===r))break;o++,l++}return t.len=o-t.offset,null===t.value&&(t.value=s.substr(t.offset,t.len)),e.pos=o,e.line=i,e.char=l,!0}},787:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=t.INITIAL=t.Registry=void 0;const o=n(391),a=n(50),i=n(652),l=n(583),c=n(965);s(n(44),t),t.Registry=class{constructor(e){this._options=e,this._syncRegistry=new i.SyncRegistry(l.Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(l.Theme.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 o.BalancedBracketSelectors(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}async _loadGrammar(e,t,n,r,s){const o=new c.ScopeDependencyProcessor(this._syncRegistry,e);for(;o.Q.length>0;)await Promise.all(o.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),o.processQueue();return this._grammarForScopeName(e,t,n,r,s)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}async addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,s)}},t.INITIAL=o.StateStack.NULL,t.parseRawGrammar=a.parseRawGrammar},736:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){const r=[],s=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}(e);let o=s.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${o} in scope selector`)}o=s.next()}let t=i();if(r.push({matcher:t,priority:e}),","!==o)break;o=s.next()}return r;function a(){if("-"===o){o=s.next();const e=a();return t=>!!e&&!e(t)}if("("===o){o=s.next();const e=function(){const e=[];let t=i();for(;t&&(e.push(t),"|"===o||","===o);){do{o=s.next()}while("|"===o||","===o);t=i()}return t=>e.some((e=>e(t)))}();return")"===o&&(o=s.next()),e}if(n(o)){const e=[];do{e.push(o),o=s.next()}while(n(o));return n=>t(e,n)}return null}function i(){const e=[];let t=a();for(;t;)e.push(t),t=a();return t=>e.every((e=>e(t)))}}},44:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.disposeOnigString=void 0,t.disposeOnigString=function(e){"function"==typeof e.dispose&&e.dispose()}},50:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=void 0;const r=n(69),s=n(350),o=n(974);t.parseRawGrammar=function(e,t=null){return null!==t&&/\.json$/.test(t)?(n=e,a=t,s.DebugFlags.InDebugMode?o.parseJSON(n,a,!0):JSON.parse(n)):function(e,t){return s.DebugFlags.InDebugMode?r.parseWithLocation(e,t,"$vscodeTextmateLocation"):r.parsePLIST(e)}(e,t);var n,a}},69:(e,t)=>{function n(e,t,n){const r=e.length;let s=0,o=1,a=0;function i(t){if(null===n)s+=t;else for(;t>0;)10===e.charCodeAt(s)?(s++,o++,a=0):(s++,a++),t--}function l(e){null===n?s=e:i(e-s)}function c(){for(;s<r;){let t=e.charCodeAt(s);if(32!==t&&9!==t&&13!==t&&10!==t)break;i(1)}}function u(t){return e.substr(s,t.length)===t&&(i(t.length),!0)}function d(t){let n=e.indexOf(t,s);l(-1!==n?n+t.length:r)}function p(t){let n=e.indexOf(t,s);if(-1!==n){let r=e.substring(s,n);return l(n+t.length),r}{let t=e.substr(s);return l(r),t}}r>0&&65279===e.charCodeAt(0)&&(s=1);let h=0,m=null,g=[],f=[],b=null;function y(e,t){g.push(h),f.push(m),h=e,m=t}function k(){if(0===g.length)return v("illegal state stack");h=g.pop(),m=f.pop()}function v(t){throw new Error("Near offset "+s+": "+t+" ~~~"+e.substr(s,50)+"~~~")}const _=function(){if(null===b)return v("missing <key>");let e={};null!==n&&(e[n]={filename:t,line:o,char:a}),m[b]=e,b=null,y(1,e)},x=function(){if(null===b)return v("missing <key>");let e=[];m[b]=e,b=null,y(2,e)},S=function(){let e={};null!==n&&(e[n]={filename:t,line:o,char:a}),m.push(e),y(1,e)},C=function(){let e=[];m.push(e),y(2,e)};function j(){if(1!==h)return v("unexpected </dict>");k()}function N(){return 1===h||2!==h?v("unexpected </array>"):void k()}function w(e){if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function L(e){if(isNaN(e))return v("cannot parse float");if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function P(e){if(isNaN(e))return v("cannot parse integer");if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function T(e){if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function A(e){if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function R(e){if(1===h){if(null===b)return v("missing <key>");m[b]=e,b=null}else 2===h?m.push(e):m=e}function B(){let e=p(">"),t=!1;return 47===e.charCodeAt(e.length-1)&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function O(e){if(e.isClosed)return"";let t=p("</");return d(">"),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&amp;|&lt;|&gt;|&quot;|&apos;/g,(function(e){switch(e){case"&amp;":return"&";case"&lt;":return"<";case"&gt;":return">";case"&quot;":return'"';case"&apos;":return"'"}return e}))}for(;s<r&&(c(),!(s>=r));){const l=e.charCodeAt(s);if(i(1),60!==l)return v("expected <");if(s>=r)return v("unexpected end of input");const p=e.charCodeAt(s);if(63===p){i(1),d("?>");continue}if(33===p){if(i(1),u("--")){d("--\x3e");continue}d(">");continue}if(47===p){if(i(1),c(),u("plist")){d(">");continue}if(u("dict")){d(">"),j();continue}if(u("array")){d(">"),N();continue}return v("unexpected closed tag")}let g=B();switch(g.name){case"dict":1===h?_():2===h?S():(m={},null!==n&&(m[n]={filename:t,line:o,char:a}),y(1,m)),g.isClosed&&j();continue;case"array":1===h?x():2===h?C():(m=[],y(2,m)),g.isClosed&&N();continue;case"key":E=O(g),1!==h?v("unexpected <key>"):null!==b?v("too many <key>"):b=E;continue;case"string":w(O(g));continue;case"real":L(parseFloat(O(g)));continue;case"integer":P(parseInt(O(g),10));continue;case"date":T(new Date(O(g)));continue;case"data":A(O(g));continue;case"true":O(g),R(!0);continue;case"false":O(g),R(!1);continue}if(!/^plist/.test(g.name))return v("unexpected opened tag "+g.name)}var E;return m}Object.defineProperty(t,"__esModule",{value:!0}),t.parsePLIST=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,r){return n(e,t,r)},t.parsePLIST=function(e){return n(e,null,null)}},652:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRegistry=void 0;const r=n(391);t.SyncRegistry=class{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(const 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)}async grammarForScopeName(e,t,n,s,o){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,r.createGrammar(e,a,t,n,s,o,this,await this._onigLibPromise))}return this._grammars.get(e)}}},792:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompiledRule=t.RegExpSourceList=t.RegExpSource=t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.CaptureRule=t.Rule=t.ruleIdToNumber=t.ruleIdFromNumber=t.whileRuleId=t.endRuleId=void 0;const r=n(878),s=n(965),o=/\\(\d+)/,a=/\\(\d+)/g;Symbol("RuleId"),t.endRuleId=-1,t.whileRuleId=-2,t.ruleIdFromNumber=function(e){return e},t.ruleIdToNumber=function(e){return e};class i{constructor(e,t,n,s){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=r.RegexSource.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=r.RegexSource.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${r.basename(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?r.RegexSource.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?r.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName}}t.Rule=i;class l extends i{constructor(e,t,n,r,s){super(e,t,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}}t.CaptureRule=l;class c extends i{constructor(e,t,n,r,s){super(e,t,n,null),this._match=new m(r,this.id),this.captures=s,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,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.MatchRule=c;class u extends i{constructor(e,t,n,r,s){super(e,t,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new g,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.IncludeOnlyRule=u;class d extends i{constructor(e,t,n,r,s,o,a,i,l,c){super(e,t,n,r),this._begin=new m(s,this.id),this.beginCaptures=o,this._end=new m(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=i,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.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,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of 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}}t.BeginEndRule=d;class p extends i{constructor(e,n,r,s,o,a,i,l,c){super(e,n,r,s),this._begin=new m(o,this.id),this.beginCaptures=a,this.whileCaptures=l,this._while=new m(i,t.whileRuleId),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.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,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new g;for(const t of 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,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new g,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}t.BeginWhileRule=p;class h{static createCaptureRule(e,t,n,r,s){return e.registerRule((e=>new l(t,e,n,r,s)))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule((s=>{if(e.id=s,e.match)return new c(e.$vscodeTextmateLocation,e.id,e.name,e.match,h._compileCaptures(e.captures,t,n));if(void 0===e.begin){e.repository&&(n=r.mergeObjects({},n,e.repository));let s=e.patterns;return void 0===s&&e.include&&(s=[{include:e.include}]),new u(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,h._compilePatterns(s,t,n))}return e.while?new p(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,h._compileCaptures(e.whileCaptures||e.captures,t,n),h._compilePatterns(e.patterns,t,n)):new d(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,h._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,h._compilePatterns(e.patterns,t,n))})),e.id}static _compileCaptures(e,t,n){let r=[];if(e){let s=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>s&&(s=e)}for(let e=0;e<=s;e++)r[e]=null;for(const s in e){if("$vscodeTextmateLocation"===s)continue;const o=parseInt(s,10);let a=0;e[s].patterns&&(a=h.getCompiledRuleId(e[s],t,n)),r[o]=h.createCaptureRule(t,e[s].$vscodeTextmateLocation,e[s].name,e[s].contentName,a)}}return r}static _compilePatterns(e,t,n){let r=[];if(e)for(let o=0,a=e.length;o<a;o++){const a=e[o];let i=-1;if(a.include){const e=s.parseInclude(a.include);switch(e.kind){case 0:case 1:i=h.getCompiledRuleId(n[a.include],t,n);break;case 2:let r=n[e.ruleName];r&&(i=h.getCompiledRuleId(r,t,n));break;case 3:case 4:const s=e.scopeName,o=4===e.kind?e.ruleName:null,l=t.getExternalGrammar(s,n);if(l)if(o){let e=l.repository[o];e&&(i=h.getCompiledRuleId(e,t,l.repository))}else i=h.getCompiledRuleId(l.repository.$self,t,l.repository)}}else i=h.getCompiledRuleId(a,t,n);if(-1!==i){const e=t.getRule(i);let n=!1;if((e instanceof u||e instanceof d||e instanceof p)&&e.hasMissingPatterns&&0===e.patterns.length&&(n=!0),n)continue;r.push(i)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}}t.RuleFactory=h;class m{constructor(e,t){if(e){const t=e.length;let n=0,r=[],s=!1;for(let o=0;o<t;o++)if("\\"===e.charAt(o)&&o+1<t){const t=e.charAt(o+1);"z"===t?(r.push(e.substring(n,o)),r.push("$(?!\\n)(?<!\\n)"),n=o+2):"A"!==t&&"G"!==t||(s=!0),o++}this.hasAnchor=s,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,this.hasBackReferences=o.test(this.source)}clone(){return new m(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){let n=t.map((t=>e.substring(t.start,t.end)));return a.lastIndex=0,this.source.replace(a,((e,t)=>r.escapeRegExpCharacters(n[parseInt(t,10)]||"")))}_buildAnchorCache(){let e,t,n,r,s=[],o=[],a=[],i=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),s[e]=n,o[e]=n,a[e]=n,i[e]=n,"\\"===n&&e+1<t&&(r=this.source.charAt(e+1),"A"===r?(s[e+1]="￿",o[e+1]="￿",a[e+1]="A",i[e+1]="A"):"G"===r?(s[e+1]="￿",o[e+1]="G",a[e+1]="￿",i[e+1]="G"):(s[e+1]=r,o[e+1]=r,a[e+1]=r,i[e+1]=r),e++);return{A0_G0:s.join(""),A0_G1:o.join(""),A1_G0:a.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}t.RegExpSource=m;class g{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)}push(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 f(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):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):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map((e=>e.resolveAnchors(t,n)));return new f(e,r,this._items.map((e=>e.ruleId)))}}t.RegExpSourceList=g;class f{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const 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){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}}t.CompiledRule=f},583:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.ColorMap=t.fontStyleToString=t.ParsedThemeRule=t.parseTheme=t.StyleAttributes=t.ScopeStack=t.Theme=void 0;const r=n(878);class s{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n,this._cachedMatchRoot=new r.CachedFn((e=>this._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(l(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let n=r.strcmp(e.scope,t.scope);return 0!==n?n:(n=r.strArrCmp(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)}));let n=0,o="#000000",a="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(o=t.foreground),null!==t.background&&(a=t.background)}let l=new u(t),c=new i(n,l.getId(o),l.getId(a)),h=new p(new d(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];h.insert(0,n.scope,n.parentScopes,n.fontStyle,l.getId(n.foreground),l.getId(n.background))}return new s(l,c,h)}(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find((t=>function(e,t){if(null===t)return!0;let n=0,r=t[n];for(;e;){if(a(e.scopeName,r)){if(n++,n===t.length)return!0;r=t[n]}e=e.parent}return!1}(e.parent,t.parentScopes)));return n?new i(n.fontStyle,n.foreground,n.background):null}}t.Theme=s;class o{constructor(e,t){this.parent=e,this.scopeName=t}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new o(t,e[n]);return t}push(e){return new o(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}}function a(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}t.ScopeStack=o;class i{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}}function l(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],s=0;for(let e=0,o=t.length;e<o;e++){let o,a=t[e];if(!a.settings)continue;if("string"==typeof a.scope){let e=a.scope;e=e.replace(/^[,]+/,""),e=e.replace(/[,]+$/,""),o=e.split(",")}else o=Array.isArray(a.scope)?a.scope:[""];let i=-1;if("string"==typeof a.settings.fontStyle){i=0;let e=a.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":i|=1;break;case"bold":i|=2;break;case"underline":i|=4;break;case"strikethrough":i|=8}}let l=null;"string"==typeof a.settings.foreground&&r.isValidHexColor(a.settings.foreground)&&(l=a.settings.foreground);let u=null;"string"==typeof a.settings.background&&r.isValidHexColor(a.settings.background)&&(u=a.settings.background);for(let t=0,r=o.length;t<r;t++){let r=o[t].trim().split(" "),a=r[r.length-1],d=null;r.length>1&&(d=r.slice(0,r.length-1),d.reverse()),n[s++]=new c(a,d,e,i,l,u)}}return n}t.StyleAttributes=i,t.parseTheme=l;class c{constructor(e,t,n,r,s,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=s,this.background=o}}t.ParsedThemeRule=c,t.fontStyleToString=function(e){if(-1===e)return"not set";let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),""===t&&(t="none"),t.trim()};class u{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 new 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)}}t.ColorMap=u;class d{constructor(e,t,n,r,s){this.scopeDepth=e,this.parentScopes=t,this.fontStyle=n,this.foreground=r,this.background=s}clone(){return new d(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}}t.ThemeTrieElementRule=d;class p{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return 1===e.length||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const n=e.parentScopes,r=t.parentScopes;let s=null===n?0:n.length,o=null===r?0:r.length;if(s===o)for(let e=0;e<s;e++){const t=n[e].length,s=r[e].length;if(t!==s)return s-t}return o-s}return t.scopeDepth-e.scopeDepth}match(e){if(""===e)return p._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));let t,n,r=e.indexOf(".");return-1===r?(t=e,n=""):(t=e.substring(0,r),n=e.substring(r+1)),this._children.hasOwnProperty(t)?this._children[t].match(n):p._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes))}insert(e,t,n,r,s,o){if(""===t)return void this._doInsertHere(e,n,r,s,o);let a,i,l,c=t.indexOf(".");-1===c?(a=t,i=""):(a=t.substring(0,c),i=t.substring(c+1)),this._children.hasOwnProperty(a)?l=this._children[a]:(l=new p(this._mainRule.clone(),d.cloneArr(this._rulesWithParentScopes)),this._children[a]=l),l.insert(e+1,i,n,r,s,o)}_doInsertHere(e,t,n,s,o){if(null!==t){for(let a=0,i=this._rulesWithParentScopes.length;a<i;a++){let i=this._rulesWithParentScopes[a];if(0===r.strArrCmp(i.parentScopes,t))return void i.acceptOverwrite(e,n,s,o)}-1===n&&(n=this._mainRule.fontStyle),0===s&&(s=this._mainRule.foreground),0===o&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new d(e,t,n,s,o))}else this._mainRule.acceptOverwrite(e,n,s,o)}}t.ThemeTrieElement=p},878:(e,t)=>{function n(e){return Array.isArray(e)?function(e){let t=[];for(let r=0,s=e.length;r<s;r++)t[r]=n(e[r]);return t}(e):"object"==typeof e?function(e){let t={};for(let r in e)t[r]=n(e[r]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.performanceNow=t.CachedFn=t.escapeRegExpCharacters=t.isValidHexColor=t.strArrCmp=t.strcmp=t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(e)},t.mergeObjects=function(e,...t){return t.forEach((t=>{for(let n in t)e[n]=t[n]})),e},t.basename=function e(t){const n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(1+~n)};let r=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function s(e,t){return e<t?-1:e>t?1:0}t.RegexSource=class{static hasCaptures(e){return null!==e&&(r.lastIndex=0,r.test(e))}static replaceCaptures(e,t,n){return e.replace(r,((e,r,s,o)=>{let a=n[parseInt(r||s,10)];if(!a)return e;{let e=t.substring(a.start,a.end);for(;"."===e[0];)e=e.substring(1);switch(o){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}}))}},t.strcmp=s,t.strArrCmp=function(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=s(e[r],t[r]);if(0!==n)return n}return 0}return n-r},t.isValidHexColor=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))},t.escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},t.CachedFn=class{constructor(e){this.fn=e,this.cache=new Map}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},t.performanceNow="undefined"==typeof performance?function(){return Date.now()}:function(){return performance.now()}}},t={};return function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(787)})()},347:(e,t,n)=>{"use strict";const r=window.wp.blocks,s=window.wp.hooks,o=window.wp.i18n,a=window.wp.blockEditor;var i=n(942),l=n.n(i);const c=JSON.parse('{"dark-plus":{"name":"Dark Plus"},"dracula-soft":{"name":"Dracula Soft"},"dracula":{"name":"Dracula"},"github-dark-dimmed":{"name":"GitHub Dark Dimmed"},"github-dark":{"name":"Github Dark"},"github-light":{"name":"Github Light"},"light-plus":{"name":"Light Plus"},"material-darker":{"name":"Material Darker","alias":"material-theme-darker"},"material-default":{"name":"Material Default","alias":"material-theme"},"material-lighter":{"name":"Material Lighter","alias":"material-theme-lighter"},"material-ocean":{"name":"Material Ocean","alias":"material-theme-ocean"},"material-palenight":{"name":"Material Palenight","alias":"material-theme-palenight"},"min-dark":{"name":"Min Dark"},"min-light":{"name":"Min Light"},"monokai":{"name":"Monokai"},"nord":{"name":"Nord"},"one-dark-pro":{"name":"One Dark Pro"},"poimandres":{"name":"Poimandres"},"rose-pine-dawn":{"name":"Rose Pine Dawn"},"rose-pine-moon":{"name":"Rose Pine Moon"},"rose-pine":{"name":"Rose Pine"},"slack-dark":{"name":"Slack Dark"},"slack-ochin":{"name":"Slack Ochin"},"solarized-dark":{"name":"Solarized Dark"},"solarized-light":{"name":"Solarized Light"},"vitesse-dark":{"name":"Vitesse Dark"},"vitesse-light":{"name":"Vitesse Light"}}'),u=window.wp.element;var d=n(69),p=n.n(d);const h=window.wp.apiFetch;var m=n.n(h),g=n(609),f=n(888),b=Object.prototype.hasOwnProperty;const y=new WeakMap,k=()=>{},v=k(),_=Object,x=e=>e===v,S=e=>"function"==typeof e,C=(e,t)=>({...e,...t}),j=e=>S(e.then),N={},w={},L="undefined",P=typeof window!=L,T=typeof document!=L,A=P&&"Deno"in window,R=(e,t)=>{const n=y.get(e);return[()=>!x(t)&&e.get(t)||N,r=>{if(!x(t)){const s=e.get(t);t in w||(w[t]=s),n[5](t,C(s,r),s||N)}},n[6],()=>!x(t)&&t in w?w[t]:!x(t)&&e.get(t)||N]};let B=!0;const[O,E]=P&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[k,k],M={isOnline:()=>B,isVisible:()=>{const e=T&&document.visibilityState;return x(e)||"hidden"!==e}},I={initFocus:e=>(T&&document.addEventListener("visibilitychange",e),O("focus",e),()=>{T&&document.removeEventListener("visibilitychange",e),E("focus",e)}),initReconnect:e=>{const t=()=>{B=!0,e()},n=()=>{B=!1};return O("online",t),O("offline",n),()=>{E("online",t),E("offline",n)}}},F=!g.useId,H=!P||A,D=H?g.useEffect:g.useLayoutEffect,G="undefined"!=typeof navigator&&navigator.connection,$=!H&&G&&(["slow-2g","2g"].includes(G.effectiveType)||G.saveData),W=new WeakMap,z=(e,t)=>_.prototype.toString.call(e)===`[object ${t}]`;let U=0;const q=e=>{const t=typeof e,n=z(e,"Date"),r=z(e,"RegExp"),s=z(e,"Object");let o,a;if(_(e)!==e||n||r)o=n?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=W.get(e),o)return o;if(o=++U+"~",W.set(e,o),Array.isArray(e)){for(o="@",a=0;a<e.length;a++)o+=q(e[a])+",";W.set(e,o)}if(s){o="#";const t=_.keys(e).sort();for(;!x(a=t.pop());)x(e[a])||(o+=a+":"+q(e[a])+",");W.set(e,o)}}return o},V=e=>{if(S(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?q(e):"",t]};let J=0;const K=()=>++J;async function X(...e){const[t,n,r,s]=e,o=C({populateCache:!0,throwOnError:!0},"boolean"==typeof s?{revalidate:s}:s||{});let a=o.populateCache;const i=o.rollbackOnError;let l=o.optimisticData;const c=o.throwOnError;if(S(n)){const e=n,r=[],s=t.keys();for(const n of s)!/^\$(inf|sub)\$/.test(n)&&e(t.get(n)._k)&&r.push(n);return Promise.all(r.map(u))}return u(n);async function u(n){const[s]=V(n);if(!s)return;const[u,d]=R(t,s),[p,h,m,g]=y.get(t),f=()=>{const e=p[s];return(S(o.revalidate)?o.revalidate(u().data,n):!1!==o.revalidate)&&(delete m[s],delete g[s],e&&e[0])?e[0](2).then((()=>u().data)):u().data};if(e.length<3)return f();let b,k=r;const _=K();h[s]=[_,0];const C=!x(l),N=u(),w=N.data,L=N._c,P=x(L)?w:L;if(C&&(l=S(l)?l(P,w):l,d({data:l,_c:P})),S(k))try{k=k(P)}catch(e){b=e}if(k&&j(k)){if(k=await k.catch((e=>{b=e})),_!==h[s][0]){if(b)throw b;return k}b&&C&&(e=>"function"==typeof i?i(e):!1!==i)(b)&&(a=!0,d({data:P,_c:v}))}if(a&&!b)if(S(a)){const e=a(k,P);d({data:e,error:v,_c:v})}else d({data:k,error:v,_c:v});if(h[s][1]=K(),Promise.resolve(f()).then((()=>{d({_c:v})})),!b)return k;if(c)throw b}}const Q=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Y=(e,t)=>{if(!y.has(e)){const n=C(I,t),r=Object.create(null),s=X.bind(v,e);let o=k;const a=Object.create(null),i=(e,t)=>{const n=a[e]||[];return a[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,r)=>{e.set(t,n);const s=a[t];if(s)for(const e of s)e(n,r)},c=()=>{if(!y.has(e)&&(y.set(e,[r,Object.create(null),Object.create(null),Object.create(null),s,l,i]),!H)){const t=n.initFocus(setTimeout.bind(v,Q.bind(v,r,0))),s=n.initReconnect(setTimeout.bind(v,Q.bind(v,r,1)));o=()=>{t&&t(),s&&s(),y.delete(e)}}};return c(),[e,s,c,o]}return[e,y.get(e)[4]]},[Z,ee]=Y(new Map),te=C({onLoadingSlow:k,onSuccess:k,onError:k,onErrorRetry:(e,__,t,n,r)=>{const s=t.errorRetryCount,o=r.retryCount,a=~~((Math.random()+.5)*(1<<(o<8?o:8)))*t.errorRetryInterval;!x(s)&&o>s||setTimeout(n,a,r)},onDiscarded:k,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:$?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:$?5e3:3e3,compare:function e(t,n){var r,s;if(t===n)return!0;if(t&&n&&(r=t.constructor)===n.constructor){if(r===Date)return t.getTime()===n.getTime();if(r===RegExp)return t.toString()===n.toString();if(r===Array){if((s=t.length)===n.length)for(;s--&&e(t[s],n[s]););return-1===s}if(!r||"object"==typeof t){for(r in s=0,t){if(b.call(t,r)&&++s&&!b.call(n,r))return!1;if(!(r in n)||!e(t[r],n[r]))return!1}return Object.keys(n).length===s}}return t!=t&&n!=n},isPaused:()=>!1,cache:Z,mutate:ee,fallback:{}},M),ne=(e,t)=>{const n=C(e,t);if(t){const{use:r,fallback:s}=e,{use:o,fallback:a}=t;r&&o&&(n.use=r.concat(o)),s&&a&&(n.fallback=C(s,a))}return n},re=(0,g.createContext)({}),se=P&&window.__SWR_DEVTOOLS_USE__,oe=se?window.__SWR_DEVTOOLS_USE__:[],ae=e=>S(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],ie=oe.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const[r]=V(t),[,,,s]=y.get(Z);if(r.startsWith("$inf$"))return n(...e);const o=s[r];return x(o)?n(...e):(delete s[r],o)}),r)));se&&(window.__SWR_DEVTOOLS_REACT__=g);const le=()=>{};le(),new WeakMap;const ce=g.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then((t=>{e.status="fulfilled",e.value=t}),(t=>{e.status="rejected",e.reason=t})),e}}),ue={dedupe:!0},de=(_.defineProperty((e=>{const{value:t}=e,n=(0,g.useContext)(re),r=S(t),s=(0,g.useMemo)((()=>r?t(n):t),[r,n,t]),o=(0,g.useMemo)((()=>r?s:ne(n,s)),[r,n,s]),a=s&&s.provider,i=(0,g.useRef)(v);a&&!i.current&&(i.current=Y(a(o.cache||Z),s));const l=i.current;return l&&(o.cache=l[0],o.mutate=l[1]),D((()=>{if(l)return l[2]&&l[2](),l[3]}),[]),(0,g.createElement)(re.Provider,C(e,{value:o}))}),"defaultValue",{value:te}),pe=(e,t,n)=>{const{cache:r,compare:s,suspense:o,fallbackData:a,revalidateOnMount:i,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:p}=n,[h,m,b,k]=y.get(r),[_,N]=V(e),w=(0,g.useRef)(!1),T=(0,g.useRef)(!1),A=(0,g.useRef)(_),B=(0,g.useRef)(t),O=(0,g.useRef)(n),E=()=>O.current,M=()=>E().isVisible()&&E().isOnline(),[I,G,$,W]=R(r,_),z=(0,g.useRef)({}).current,U=x(a)?x(n.fallback)?v:n.fallback[_]:a,q=(e,t)=>{for(const n in z){const r=n;if("data"===r){if(!s(e[r],t[r])){if(!x(e[r]))return!1;if(!s(se,t[r]))return!1}}else if(t[r]!==e[r])return!1}return!0},J=(0,g.useMemo)((()=>{const e=!!_&&!!t&&(x(i)?!E().isPaused()&&!o&&!1!==l:i),n=t=>{const n=C(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n},r=I(),s=W(),a=n(r),c=r===s?a:n(s);let u=a;return[()=>{const e=n(I());return q(e,u)?(u.data=e.data,u.isLoading=e.isLoading,u.isValidating=e.isValidating,u.error=e.error,u):(u=e,e)},()=>c]}),[r,_]),Q=(0,f.useSyncExternalStore)((0,g.useCallback)((e=>$(_,((t,n)=>{q(n,t)||e()}))),[r,_]),J[0],J[1]),Y=!w.current,Z=h[_]&&h[_].length>0,ee=Q.data,te=x(ee)?U&&j(U)?ce(U):U:ee,ne=Q.error,re=(0,g.useRef)(te),se=p?x(ee)?x(re.current)?te:re.current:ee:te,oe=!(Z&&!x(ne))&&(Y&&!x(i)?i:!E().isPaused()&&(o?!x(te)&&l:x(te)||l)),ae=!!(_&&t&&Y&&oe),ie=x(Q.isValidating)?ae:Q.isValidating,le=x(Q.isLoading)?ae:Q.isLoading,de=(0,g.useCallback)((async e=>{const t=B.current;if(!_||!t||T.current||E().isPaused())return!1;let r,o,a=!0;const i=e||{},l=!b[_]||!i.dedupe,c=()=>F?!T.current&&_===A.current&&w.current:_===A.current,u={isValidating:!1,isLoading:!1},d=()=>{G(u)},p=()=>{const e=b[_];e&&e[1]===o&&delete b[_]},g={isValidating:!0};x(I().data)&&(g.isLoading=!0);try{if(l&&(G(g),n.loadingTimeout&&x(I().data)&&setTimeout((()=>{a&&c()&&E().onLoadingSlow(_,n)}),n.loadingTimeout),b[_]=[t(N),K()]),[r,o]=b[_],r=await r,l&&setTimeout(p,n.dedupingInterval),!b[_]||b[_][1]!==o)return l&&c()&&E().onDiscarded(_),!1;u.error=v;const e=m[_];if(!x(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return d(),l&&c()&&E().onDiscarded(_),!1;const i=I().data;u.data=s(i,r)?i:r,l&&c()&&E().onSuccess(r,_,n)}catch(e){p();const t=E(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,_,t),(!0===n||S(n)&&n(e))&&(E().revalidateOnFocus&&E().revalidateOnReconnect&&!M()||t.onErrorRetry(e,_,t,(e=>{const t=h[_];t&&t[0]&&t[0](3,e)}),{retryCount:(i.retryCount||0)+1,dedupe:!0}))))}return a=!1,d(),!0}),[_,r]),pe=(0,g.useCallback)(((...e)=>X(r,A.current,...e)),[]);if(D((()=>{B.current=t,O.current=n,x(ee)||(re.current=ee)})),D((()=>{if(!_)return;const e=de.bind(v,ue);let t=0;if(E().revalidateOnFocus){const e=Date.now();t=e+E().focusThrottleInterval}const n=((e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}})(_,h,((n,r={})=>{if(0==n){const n=Date.now();E().revalidateOnFocus&&n>t&&M()&&(t=n+E().focusThrottleInterval,e())}else if(1==n)E().revalidateOnReconnect&&M()&&e();else{if(2==n)return de();if(3==n)return de(r)}}));return T.current=!1,A.current=_,w.current=!0,G({_k:N}),oe&&(x(te)||H?e():(e=>{P&&typeof window.requestAnimationFrame!=L?window.requestAnimationFrame(e):setTimeout(e,1)})(e)),()=>{T.current=!0,n()}}),[_]),D((()=>{let e;function t(){const t=S(c)?c(I().data):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){I().error||!u&&!E().isVisible()||!d&&!E().isOnline()?t():de(ue).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[c,u,d,_]),(0,g.useDebugValue)(se),o&&x(te)&&_){if(!F&&H)throw new Error("Fallback data is required when using Suspense in SSR.");B.current=t,O.current=n,T.current=!1;const e=k[_];if(!x(e)){const t=pe(e);ce(t)}if(!x(ne))throw ne;{const e=de(ue);x(se)||(e.status="fulfilled",e.value=!0),ce(e)}}return{mutate:pe,get data(){return z.data=!0,se},get error(){return z.error=!0,ne},get isValidating(){return z.isValidating=!0,ie},get isLoading(){return z.isLoading=!0,le}}},function(...e){const t=C(te,(0,g.useContext)(re)),[n,r,s]=ae(e),o=ne(t,s);let a=pe;const{use:i}=o,l=(i||[]).concat(ie);for(let e=l.length;e--;)a=l[e](a);return a(n,r||o.fetcher||null,o)});var pe;const he=((e,t)=>(...n)=>{const[r,s,o]=ae(n),a=(o.use||[]).concat(t);return e(r,s,{...o,use:a})})(de,(e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r)))),me=e=>m()({path:e}),ge=()=>{const{data:e}=he("/code-block-pro/v1/can-save-html",me);return e},fe=e=>{let t;const n=new Set,r=(e,r)=>{const s="function"==typeof e?e(t):e;if(!Object.is(s,t)){const e=t;t=(null!=r?r:"object"!=typeof s||null===s)?s:Object.assign({},t,s),n.forEach((n=>n(t,e)))}},s=()=>t,o={setState:r,getState:s,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e))},a=t=e(r,s,o);return o},be=e=>e,ye=e=>{const t=(e=>e?fe(e):fe)(e),n=e=>function(e,t=be){const n=g.useSyncExternalStore(e.subscribe,(()=>t(e.getState())),(()=>t(e.getInitialState())));return g.useDebugValue(n),n}(t,e);return Object.assign(n,t),n},ke=e=>e?ye(e):ye,ve=new Map,_e=e=>{const t=ve.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},xe=(e,t={})=>(n,r,s)=>{const{enabled:o,anonymousActionType:a,store:i,...l}=t;let c;try{c=(null==o||o)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!c)return e(n,r,s);const{connection:u,...d}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const r=ve.get(n.name);if(r)return{type:"tracked",store:e,...r};const s={connection:t.connect(n),stores:{}};return ve.set(n.name,s),{type:"tracked",store:e,...s}})(i,c,l);let p=!0;s.setState=(e,t,o)=>{const c=n(e,t);if(!p)return c;const d=void 0===o?{type:a||"anonymous"}:"string"==typeof o?{type:o}:o;return void 0===i?(null==u||u.send(d,r()),c):(null==u||u.send({...d,type:`${i}/${d.type}`},{..._e(l.name),[i]:s.getState()}),c)};const h=(...e)=>{const t=p;p=!1,n(...e),p=t},m=e(s.setState,r,s);if("untracked"===d.type?null==u||u.init(m):(d.stores[d.store]=s,null==u||u.init(Object.fromEntries(Object.entries(d.stores).map((([e,t])=>[e,e===d.store?m:t.getState()]))))),s.dispatchFromDevtools&&"function"==typeof s.dispatch){let e=!1;const t=s.dispatch;s.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):Se(e.payload,(e=>{if("__setState"!==e.type)s.dispatchFromDevtools&&"function"==typeof s.dispatch&&s.dispatch(e);else{if(void 0===i)return void h(e.state);1!==Object.keys(e.state).length&&console.error('\n [zustand devtools middleware] Unsupported __setState action format.\n When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n ');const t=e.state[i];if(null==t)return;JSON.stringify(s.getState())!==JSON.stringify(t)&&h(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return h(m),void 0===i?null==u?void 0:u.init(s.getState()):null==u?void 0:u.init(_e(l.name));case"COMMIT":return void 0===i?void(null==u||u.init(s.getState())):null==u?void 0:u.init(_e(l.name));case"ROLLBACK":return Se(e.state,(e=>{if(void 0===i)return h(e),void(null==u||u.init(s.getState()));h(e[i]),null==u||u.init(_e(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Se(e.state,(e=>{void 0!==i?JSON.stringify(s.getState())!==JSON.stringify(e[i])&&h(e[i]):h(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,r=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;return h(void 0===i?r:r[i]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return p=!p}return}})),m},Se=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)};function Ce(e,t){let n;try{n=e()}catch(e){return}const r={getItem:e=>{var r;const s=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),o=null!=(r=n.getItem(e))?r:null;return o instanceof Promise?o.then(s):s(o)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)};return r}const je=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>je(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>je(t)(e)}}},Ne=(e,t)=>(n,r,s)=>{let o={storage:Ce((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},a=!1;const i=new Set,l=new Set;let c=o.storage;if(!c)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...e)}),r,s);const u=()=>{const e=o.partialize({...r()});return c.setItem(o.name,{state:e,version:o.version})},d=s.setState;s.setState=(e,t)=>{d(e,t),u()};const p=e(((...e)=>{n(...e),u()}),r,s);let h;s.getInitialState=()=>p;const m=()=>{var e,t;if(!c)return;a=!1,i.forEach((e=>{var t;return e(null!=(t=r())?t:p)}));const s=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,null!=(e=r())?e:p))||void 0;return je(c.getItem.bind(c))(o.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===o.version)return[!1,e.state];if(o.migrate){const t=o.migrate(e.state,e.version);return t instanceof Promise?t.then((e=>[!0,e])):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]})).then((e=>{var t;const[s,a]=e;if(h=o.merge(a,null!=(t=r())?t:p),n(h,!0),s)return u()})).then((()=>{null==s||s(h,void 0),h=r(),a=!0,l.forEach((e=>e(h)))})).catch((e=>{null==s||s(void 0,e)}))};return s.persist={setOptions:e=>{o={...o,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:e=>(i.add(e),()=>{i.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},o.skipHydration||m(),h||p},we="/code-block-pro/v1/settings",Le=async e=>{const t=await m()({path:we});return t?.[e]},Pe={previousTheme:"nord",previousLineHeight:"1.25rem",previousFontFamily:"Code-Pro-JetBrains-Mono",previousFontSize:".875rem",previousHeaderType:"headlights",previousFooterType:"none",previousClampFonts:!1,previousDisablePadding:!1,previousLineNumbers:!1,previousHighlightingHover:!1,previousCopyButton:!0,previousCopyButtonType:"heroicons",previousCopyButtonString:(0,o.__)("Copy","code-block-pro"),previusCopyButtonStringCopied:(0,o.__)("Copied","code-block-pro"),previousCopyButtonUseTextarea:!0,previousTabSize:2,previousUseTabs:!1,previousSeeMoreType:"",previousSeeMoreString:"",previousSeeMoreTransition:!1,previousSeeMoreCollapse:!1,previousSeeMoreCollapseString:""},Te={getItem:async e=>{var t;const n=await Le(e);return JSON.stringify({version:null!==(t=n?.version)&&void 0!==t?t:0,state:n||Pe})},setItem:async(e,t)=>{const{state:n,version:r}=JSON.parse(t),s={[e]:Object.assign(await Le(e)||Pe,n,r)};await m()({path:we,method:"POST",data:s})},removeItem:async e=>{const t={[e]:null};await m()({path:we,method:"POST",data:t})}},Ae=ke()(Ne(xe((e=>({...Pe,updateThemeHistory(t){e((e=>Object.keys(t).reduce(((n,r)=>{const s=r,o=`previous${r.charAt(0).toUpperCase()+r.slice(1)}`;return Object.keys(e).includes(o)?{...n,[o]:t[s]}:n}),{...e})))}})),{name:"Code Block Pro Theme Settings"}),{name:"code_block_pro_settings",storage:Ce((()=>Te))}));var Re=n(486),Be=n(217);const Oe=[{id:"abap",scopeName:"source.abap",path:"abap.tmLanguage.json",displayName:"ABAP",samplePath:"abap.sample"},{id:"actionscript-3",scopeName:"source.actionscript.3",path:"actionscript-3.tmLanguage.json",displayName:"ActionScript",samplePath:"actionscript-3.sample"},{id:"ada",scopeName:"source.ada",path:"ada.tmLanguage.json",displayName:"Ada",samplePath:"ada.sample"},{id:"apache",scopeName:"source.apacheconf",path:"apache.tmLanguage.json",displayName:"Apache Conf",samplePath:"apache.sample"},{id:"apex",scopeName:"source.apex",path:"apex.tmLanguage.json",displayName:"Apex",samplePath:"apex.sample"},{id:"apl",scopeName:"source.apl",path:"apl.tmLanguage.json",displayName:"APL",samplePath:"apl.sample",embeddedLangs:["html","xml","css","javascript","json"]},{id:"applescript",scopeName:"source.applescript",path:"applescript.tmLanguage.json",displayName:"AppleScript",samplePath:"applescript.sample"},{id:"ara",scopeName:"source.ara",path:"ara.tmLanguage.json",displayName:"Ara",samplePath:"ara.sample"},{id:"asm",scopeName:"source.asm.x86_64",path:"asm.tmLanguage.json",displayName:"Assembly",samplePath:"asm.sample"},{id:"astro",scopeName:"source.astro",path:"astro.tmLanguage.json",displayName:"Astro",samplePath:"astro.sample",embeddedLangs:["json","javascript","typescript","stylus","sass","css","scss","less","postcss","tsx"]},{id:"awk",scopeName:"source.awk",path:"awk.tmLanguage.json",displayName:"AWK",samplePath:"awk.sample"},{id:"ballerina",scopeName:"source.ballerina",path:"ballerina.tmLanguage.json",displayName:"Ballerina",samplePath:"ballerina.sample"},{id:"bat",scopeName:"source.batchfile",path:"bat.tmLanguage.json",displayName:"Batch",samplePath:"bat.sample",aliases:["batch"]},{id:"beancount",scopeName:"text.beancount",path:"beancount.tmLanguage.json",displayName:"Beancount",samplePath:"beancount.sample"},{id:"berry",scopeName:"source.berry",path:"berry.tmLanguage.json",displayName:"Berry",samplePath:"berry.sample",aliases:["be"]},{id:"bibtex",scopeName:"text.bibtex",path:"bibtex.tmLanguage.json",displayName:"BibTeX",samplePath:"bibtex.sample"},{id:"bicep",scopeName:"source.bicep",path:"bicep.tmLanguage.json",displayName:"Bicep",samplePath:"bicep.sample"},{id:"blade",scopeName:"text.html.php.blade",path:"blade.tmLanguage.json",displayName:"Blade",samplePath:"blade.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"c",scopeName:"source.c",path:"c.tmLanguage.json",displayName:"C",samplePath:"c.sample"},{id:"cadence",scopeName:"source.cadence",path:"cadence.tmLanguage.json",displayName:"Cadence",samplePath:"cadence.sample",aliases:["cdc"]},{id:"clarity",scopeName:"source.clar",path:"clarity.tmLanguage.json",displayName:"Clarity",samplePath:"clarity.sample"},{id:"clojure",scopeName:"source.clojure",path:"clojure.tmLanguage.json",displayName:"Clojure",samplePath:"clojure.sample",aliases:["clj"]},{id:"cmake",scopeName:"source.cmake",path:"cmake.tmLanguage.json",displayName:"CMake",samplePath:"cmake.sample"},{id:"cobol",scopeName:"source.cobol",path:"cobol.tmLanguage.json",displayName:"COBOL",samplePath:"cobol.sample",embeddedLangs:["sql","html","java"]},{id:"codeql",scopeName:"source.ql",path:"codeql.tmLanguage.json",displayName:"CodeQL",samplePath:"codeql.sample",aliases:["ql"]},{id:"coffee",scopeName:"source.coffee",path:"coffee.tmLanguage.json",displayName:"CoffeeScript",samplePath:"coffee.sample",embeddedLangs:["javascript"]},{id:"cpp",scopeName:"source.cpp",path:"cpp.tmLanguage.json",displayName:"C++",samplePath:"cpp.sample",aliases:["c++"],embeddedLangs:["glsl","sql"]},{id:"crystal",scopeName:"source.crystal",path:"crystal.tmLanguage.json",displayName:"Crystal",samplePath:"crystal.sample",embeddedLangs:["html","sql","css","c","javascript","shellscript"]},{id:"csharp",scopeName:"source.cs",path:"csharp.tmLanguage.json",displayName:"C#",samplePath:"csharp.sample",aliases:["c#","cs"]},{id:"css",scopeName:"source.css",path:"css.tmLanguage.json",displayName:"CSS",samplePath:"css.sample"},{id:"csv",scopeName:"text.csv",path:"csv.tmLanguage.json",displayName:"csv syntax",samplePath:"csv.sample"},{id:"cue",scopeName:"source.cue",path:"cue.tmLanguage.json",displayName:"CUE",samplePath:"cue.sample"},{id:"cypher",scopeName:"source.cypher",path:"cypher.tmLanguage.json",displayName:"Cypher",samplePath:"cypher.sample",aliases:["cql"]},{id:"d",scopeName:"source.d",path:"d.tmLanguage.json",displayName:"D",samplePath:"d.sample"},{id:"dart",scopeName:"source.dart",path:"dart.tmLanguage.json",displayName:"Dart",samplePath:"dart.sample"},{id:"dax",scopeName:"source.dax",path:"dax.tmLanguage.json",displayName:"DAX",samplePath:"dax.sample"},{id:"diff",scopeName:"source.diff",path:"diff.tmLanguage.json",displayName:"Diff",samplePath:"diff.sample"},{id:"docker",scopeName:"source.dockerfile",path:"docker.tmLanguage.json",displayName:"Docker",samplePath:"docker.sample",aliases:["dockerfile"]},{id:"dream-maker",scopeName:"source.dm",path:"dream-maker.tmLanguage.json",displayName:"Dream Maker",samplePath:"dream-maker.sample"},{id:"elixir",scopeName:"source.elixir",path:"elixir.tmLanguage.json",displayName:"Elixir",samplePath:"elixir.sample",embeddedLangs:["html"]},{id:"elm",scopeName:"source.elm",path:"elm.tmLanguage.json",displayName:"Elm",samplePath:"elm.sample",embeddedLangs:["glsl"]},{id:"erb",scopeName:"text.html.erb",path:"erb.tmLanguage.json",displayName:"ERB",samplePath:"erb.sample",embeddedLangs:["html","ruby"]},{id:"erlang",scopeName:"source.erlang",path:"erlang.tmLanguage.json",displayName:"Erlang",samplePath:"erlang.sample",aliases:["erl"]},{id:"fish",scopeName:"source.fish",path:"fish.tmLanguage.json",displayName:"Fish",samplePath:"fish.sample"},{id:"fsharp",scopeName:"source.fsharp",path:"fsharp.tmLanguage.json",displayName:"F#",samplePath:"fsharp.sample",aliases:["f#","fs"],embeddedLangs:["markdown"]},{id:"gdresource",scopeName:"source.gdresource",path:"gdresource.tmLanguage.json",displayName:"GDResource",samplePath:"gdresource.sample",embeddedLangs:["gdshader","gdscript"]},{id:"gdscript",scopeName:"source.gdscript",path:"gdscript.tmLanguage.json",displayName:"GDScript",samplePath:"gdscript.sample"},{id:"gdshader",scopeName:"source.gdshader",path:"gdshader.tmLanguage.json",displayName:"GDShader",samplePath:"gdshader.sample"},{id:"gherkin",scopeName:"text.gherkin.feature",path:"gherkin.tmLanguage.json",displayName:"Gherkin",samplePath:"gherkin.sample"},{id:"git-commit",scopeName:"text.git-commit",path:"git-commit.tmLanguage.json",displayName:"Git Commit Message",embeddedLangs:["diff"]},{id:"git-rebase",scopeName:"text.git-rebase",path:"git-rebase.tmLanguage.json",displayName:"Git Rebase Message",embeddedLangs:["shellscript"]},{id:"glimmer-js",scopeName:"source.gjs",path:"glimmer-js.tmLanguage.json",displayName:"Glimmer JS",aliases:["gjs"],embeddedLangs:["javascript","handlebars"]},{id:"glimmer-ts",scopeName:"source.gts",path:"glimmer-ts.tmLanguage.json",displayName:"Glimmer TS",aliases:["gts"],embeddedLangs:["typescript","handlebars"]},{id:"glsl",scopeName:"source.glsl",path:"glsl.tmLanguage.json",displayName:"GLSL",samplePath:"glsl.sample",embeddedLangs:["c"]},{id:"gnuplot",scopeName:"source.gnuplot",path:"gnuplot.tmLanguage.json",displayName:"Gnuplot",samplePath:"gnuplot.sample"},{id:"go",scopeName:"source.go",path:"go.tmLanguage.json",displayName:"Go",samplePath:"go.sample"},{id:"graphql",scopeName:"source.graphql",path:"graphql.tmLanguage.json",displayName:"GraphQL",samplePath:"graphql.sample",aliases:["gql"],embeddedLangs:["javascript","typescript","jsx","tsx"]},{id:"groovy",scopeName:"source.groovy",path:"groovy.tmLanguage.json",displayName:"Groovy",samplePath:"groovy.sample"},{id:"hack",scopeName:"source.hack",path:"hack.tmLanguage.json",displayName:"Hack",samplePath:"hack.sample",embeddedLangs:["html","sql"]},{id:"haml",scopeName:"text.haml",path:"haml.tmLanguage.json",displayName:"Ruby Haml",samplePath:"haml.sample",embeddedLangs:["ruby","javascript","sass","coffee","markdown","css"]},{id:"handlebars",scopeName:"text.html.handlebars",path:"handlebars.tmLanguage.json",displayName:"Handlebars",samplePath:"handlebars.sample",aliases:["hbs"],embeddedLangs:["html","css","javascript","yaml"]},{id:"haskell",scopeName:"source.haskell",path:"haskell.tmLanguage.json",displayName:"Haskell",samplePath:"haskell.sample",aliases:["hs"]},{id:"hcl",scopeName:"source.hcl",path:"hcl.tmLanguage.json",displayName:"HashiCorp HCL",samplePath:"hcl.sample"},{id:"hjson",scopeName:"source.hjson",path:"hjson.tmLanguage.json",displayName:"Hjson",samplePath:"hjson.sample"},{id:"hlsl",scopeName:"source.hlsl",path:"hlsl.tmLanguage.json",displayName:"HLSL",samplePath:"hlsl.sample"},{id:"html",scopeName:"text.html.basic",path:"html.tmLanguage.json",displayName:"HTML",samplePath:"html.sample",embeddedLangs:["javascript","css"]},{id:"http",scopeName:"source.http",path:"http.tmLanguage.json",displayName:"HTTP",samplePath:"http.sample",embeddedLangs:["shellscript","json","xml","graphql"]},{id:"imba",scopeName:"source.imba",path:"imba.tmLanguage.json",displayName:"Imba",samplePath:"imba.sample"},{id:"ini",scopeName:"source.ini",path:"ini.tmLanguage.json",displayName:"INI",samplePath:"ini.sample",aliases:["properties"]},{id:"java",scopeName:"source.java",path:"java.tmLanguage.json",displayName:"Java",samplePath:"java.sample"},{id:"javascript",scopeName:"source.js",path:"javascript.tmLanguage.json",displayName:"JavaScript",samplePath:"javascript.sample",aliases:["js"]},{id:"jinja-html",scopeName:"text.html.jinja",path:"jinja-html.tmLanguage.json",displayName:"Jinja",samplePath:"jinja-html.sample",embeddedLangs:["html"]},{id:"jison",scopeName:"source.jison",path:"jison.tmLanguage.json",displayName:"Jison",samplePath:"jison.sample",embeddedLangs:["javascript"]},{id:"json",scopeName:"source.json",path:"json.tmLanguage.json",displayName:"JSON",samplePath:"json.sample"},{id:"json5",scopeName:"source.json5",path:"json5.tmLanguage.json",displayName:"JSON5",samplePath:"json5.sample"},{id:"jsonc",scopeName:"source.json.comments",path:"jsonc.tmLanguage.json",displayName:"JSON with Comments",samplePath:"jsonc.sample"},{id:"jsonl",scopeName:"source.json.lines",path:"jsonl.tmLanguage.json",displayName:"JSON Lines",samplePath:"jsonl.sample"},{id:"jsonnet",scopeName:"source.jsonnet",path:"jsonnet.tmLanguage.json",displayName:"Jsonnet",samplePath:"jsonnet.sample"},{id:"jssm",scopeName:"source.jssm",path:"jssm.tmLanguage.json",displayName:"JSSM",samplePath:"jssm.sample",aliases:["fsl"]},{id:"jsx",scopeName:"source.js.jsx",path:"jsx.tmLanguage.json",displayName:"JSX",samplePath:"jsx.sample"},{id:"julia",scopeName:"source.julia",path:"julia.tmLanguage.json",displayName:"Julia",samplePath:"julia.sample",embeddedLangs:["cpp","python","javascript","r","sql"]},{id:"kotlin",scopeName:"source.kotlin",path:"kotlin.tmLanguage.json",displayName:"Kotlin",samplePath:"kotlin.sample",aliases:["kt","kts"]},{id:"kusto",scopeName:"source.kusto",path:"kusto.tmLanguage.json",displayName:"Kusto",samplePath:"kusto.sample",aliases:["kql"]},{id:"latex",scopeName:"text.tex.latex",path:"latex.tmLanguage.json",displayName:"LaTeX",samplePath:"latex.sample",embeddedLangs:["tex","css","haskell","html","xml","java","lua","julia","ruby","javascript","typescript","python","yaml","rust","scala","gnuplot"]},{id:"less",scopeName:"source.css.less",path:"less.tmLanguage.json",displayName:"Less",samplePath:"less.sample"},{id:"liquid",scopeName:"text.html.liquid",path:"liquid.tmLanguage.json",displayName:"Liquid",samplePath:"liquid.sample",embeddedLangs:["html","css","json","javascript"]},{id:"lisp",scopeName:"source.lisp",path:"lisp.tmLanguage.json",displayName:"Lisp",samplePath:"lisp.sample"},{id:"logo",scopeName:"source.logo",path:"logo.tmLanguage.json",displayName:"Logo",samplePath:"logo.sample"},{id:"lua",scopeName:"source.lua",path:"lua.tmLanguage.json",displayName:"Lua",samplePath:"lua.sample",embeddedLangs:["c"]},{id:"make",scopeName:"source.makefile",path:"make.tmLanguage.json",displayName:"Makefile",samplePath:"make.sample",aliases:["makefile"]},{id:"markdown",scopeName:"text.html.markdown",path:"markdown.tmLanguage.json",displayName:"Markdown",samplePath:"markdown.sample",aliases:["md"],embeddedLangs:["css","html","ini","java","lua","make","perl","r","ruby","php","sql","vb","xml","xsl","yaml","bat","clojure","coffee","c","cpp","diff","docker","git-commit","git-rebase","go","groovy","pug","javascript","json","jsonc","less","objective-c","swift","scss","raku","powershell","python","julia","rust","scala","shellscript","typescript","tsx","csharp","fsharp","dart","handlebars","erlang","elixir","latex","bibtex"]},{id:"marko",scopeName:"text.marko",path:"marko.tmLanguage.json",displayName:"Marko",samplePath:"marko.sample",embeddedLangs:["css","less","scss","javascript"]},{id:"matlab",scopeName:"source.matlab",path:"matlab.tmLanguage.json",displayName:"MATLAB",samplePath:"matlab.sample"},{id:"mdc",scopeName:"text.markdown.mdc",path:"mdc.tmLanguage.json",displayName:"mdc",samplePath:"mdc.sample",embeddedLangs:["markdown","yaml"]},{id:"mdx",scopeName:"source.mdx",path:"mdx.tmLanguage.json",displayName:"MDX",samplePath:"mdx.sample",embeddedLangs:["tsx","toml","yaml","c","clojure","coffee","cpp","csharp","css","diff","docker","elixir","elm","erlang","go","graphql","haskell","html","ini","java","javascript","json","julia","kotlin","less","lua","make","markdown","objective-c","perl","python","r","ruby","rust","scala","scss","shellscript","shellsession","sql","xml","swift","typescript"]},{id:"mermaid",scopeName:"source.mermaid",path:"mermaid.tmLanguage.json",displayName:"Mermaid",samplePath:"mermaid.sample"},{id:"mojo",scopeName:"source.mojo",path:"mojo.tmLanguage.json",displayName:"MagicPython",samplePath:"mojo.sample"},{id:"narrat",scopeName:"source.narrat",path:"narrat.tmLanguage.json",displayName:"Narrat Language",samplePath:"narrat.sample",aliases:["nar"]},{id:"nextflow",scopeName:"source.nextflow",path:"nextflow.tmLanguage.json",displayName:"Nextflow",samplePath:"nextflow.sample",aliases:["nf"]},{id:"nginx",scopeName:"source.nginx",path:"nginx.tmLanguage.json",displayName:"Nginx",samplePath:"nginx.sample",embeddedLangs:["lua"]},{id:"nim",scopeName:"source.nim",path:"nim.tmLanguage.json",displayName:"Nim",samplePath:"nim.sample",embeddedLangs:["c","html","xml","javascript","css","glsl","markdown"]},{id:"nix",scopeName:"source.nix",path:"nix.tmLanguage.json",displayName:"Nix",samplePath:"nix.sample"},{id:"nushell",scopeName:"source.nushell",path:"nushell.tmLanguage.json",displayName:"nushell",samplePath:"nushell.sample",aliases:["nu"]},{id:"objective-c",scopeName:"source.objc",path:"objective-c.tmLanguage.json",displayName:"Objective-C",samplePath:"objective-c.sample",aliases:["objc"]},{id:"objective-cpp",scopeName:"source.objcpp",path:"objective-cpp.tmLanguage.json",displayName:"Objective-C++",samplePath:"objective-cpp.sample"},{id:"ocaml",scopeName:"source.ocaml",path:"ocaml.tmLanguage.json",displayName:"OCaml",samplePath:"ocaml.sample"},{id:"pascal",scopeName:"source.pascal",path:"pascal.tmLanguage.json",displayName:"Pascal",samplePath:"pascal.sample"},{id:"perl",scopeName:"source.perl",path:"perl.tmLanguage.json",displayName:"Perl",samplePath:"perl.sample",embeddedLangs:["html","xml","css","javascript","sql"]},{id:"php",scopeName:"source.php",path:"php.tmLanguage.json",displayName:"PHP",samplePath:"php.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"plsql",scopeName:"source.plsql.oracle",path:"plsql.tmLanguage.json",displayName:"PL/SQL",samplePath:"plsql.sample"},{id:"postcss",scopeName:"source.css.postcss",path:"postcss.tmLanguage.json",displayName:"PostCSS",samplePath:"postcss.sample"},{id:"powerquery",scopeName:"source.powerquery",path:"powerquery.tmLanguage.json",displayName:"PowerQuery",samplePath:"powerquery.sample"},{id:"powershell",scopeName:"source.powershell",path:"powershell.tmLanguage.json",displayName:"PowerShell",samplePath:"powershell.sample",aliases:["ps","ps1"]},{id:"prisma",scopeName:"source.prisma",path:"prisma.tmLanguage.json",displayName:"Prisma",samplePath:"prisma.sample"},{id:"prolog",scopeName:"source.prolog",path:"prolog.tmLanguage.json",displayName:"Prolog",samplePath:"prolog.sample"},{id:"proto",scopeName:"source.proto",path:"proto.tmLanguage.json",displayName:"Protocol Buffer 3",samplePath:"proto.sample"},{id:"pug",scopeName:"text.pug",path:"pug.tmLanguage.json",displayName:"Pug",samplePath:"pug.sample",aliases:["jade"],embeddedLangs:["javascript","css","sass","scss","stylus","coffee","html"]},{id:"puppet",scopeName:"source.puppet",path:"puppet.tmLanguage.json",displayName:"Puppet",samplePath:"puppet.sample"},{id:"purescript",scopeName:"source.purescript",path:"purescript.tmLanguage.json",displayName:"PureScript",samplePath:"purescript.sample"},{id:"python",scopeName:"source.python",path:"python.tmLanguage.json",displayName:"Python",samplePath:"python.sample",aliases:["py"]},{id:"r",scopeName:"source.r",path:"r.tmLanguage.json",displayName:"R",samplePath:"r.sample"},{id:"raku",scopeName:"source.perl.6",path:"raku.tmLanguage.json",displayName:"Raku",samplePath:"raku.sample",aliases:["perl6"]},{id:"razor",scopeName:"text.aspnetcorerazor",path:"razor.tmLanguage.json",displayName:"ASP.NET Razor",samplePath:"razor.sample",embeddedLangs:["html","csharp"]},{id:"reg",scopeName:"source.reg",path:"reg.tmLanguage.json",displayName:"Windows Registry Script",samplePath:"reg.sample"},{id:"rel",scopeName:"source.rel",path:"rel.tmLanguage.json",displayName:"Rel",samplePath:"rel.sample"},{id:"riscv",scopeName:"source.riscv",path:"riscv.tmLanguage.json",displayName:"RISC-V",samplePath:"riscv.sample"},{id:"rst",scopeName:"source.rst",path:"rst.tmLanguage.json",displayName:"reStructuredText",samplePath:"rst.sample",embeddedLangs:["cpp","python","javascript","shellscript","yaml","cmake","ruby"]},{id:"ruby",scopeName:"source.ruby",path:"ruby.tmLanguage.json",displayName:"Ruby",samplePath:"ruby.sample",aliases:["rb"],embeddedLangs:["html","xml","sql","css","c","javascript","shellscript","lua"]},{id:"rust",scopeName:"source.rust",path:"rust.tmLanguage.json",displayName:"Rust",samplePath:"rust.sample",aliases:["rs"]},{id:"sas",scopeName:"source.sas",path:"sas.tmLanguage.json",displayName:"SAS",samplePath:"sas.sample",embeddedLangs:["sql"]},{id:"sass",scopeName:"source.sass",path:"sass.tmLanguage.json",displayName:"Sass",samplePath:"sass.sample"},{id:"scala",scopeName:"source.scala",path:"scala.tmLanguage.json",displayName:"Scala",samplePath:"scala.sample"},{id:"scheme",scopeName:"source.scheme",path:"scheme.tmLanguage.json",displayName:"Scheme",samplePath:"scheme.sample"},{id:"scss",scopeName:"source.css.scss",path:"scss.tmLanguage.json",displayName:"SCSS",samplePath:"scss.sample",embeddedLangs:["css"]},{id:"shaderlab",scopeName:"source.shaderlab",path:"shaderlab.tmLanguage.json",displayName:"ShaderLab",samplePath:"shaderlab.sample",aliases:["shader"],embeddedLangs:["hlsl"]},{id:"shellscript",scopeName:"source.shell",path:"shellscript.tmLanguage.json",displayName:"Shell",samplePath:"shellscript.sample",aliases:["bash","sh","shell","zsh"]},{id:"shellsession",scopeName:"text.shell-session",path:"shellsession.tmLanguage.json",displayName:"Shell Session",samplePath:"shellsession.sample",aliases:["console"],embeddedLangs:["shellscript"]},{id:"smalltalk",scopeName:"source.smalltalk",path:"smalltalk.tmLanguage.json",displayName:"Smalltalk",samplePath:"smalltalk.sample"},{id:"solidity",scopeName:"source.solidity",path:"solidity.tmLanguage.json",displayName:"Solidity",samplePath:"solidity.sample"},{id:"sparql",scopeName:"source.sparql",path:"sparql.tmLanguage.json",displayName:"SPARQL",samplePath:"sparql.sample",embeddedLangs:["turtle"]},{id:"splunk",scopeName:"source.splunk_search",path:"splunk.tmLanguage.json",displayName:"Splunk Query Language",samplePath:"splunk.sample",aliases:["spl"]},{id:"sql",scopeName:"source.sql",path:"sql.tmLanguage.json",displayName:"SQL",samplePath:"sql.sample"},{id:"ssh-config",scopeName:"source.ssh-config",path:"ssh-config.tmLanguage.json",displayName:"SSH Config",samplePath:"ssh-config.sample"},{id:"stata",scopeName:"source.stata",path:"stata.tmLanguage.json",displayName:"Stata",samplePath:"stata.sample",embeddedLangs:["sql"]},{id:"stylus",scopeName:"source.stylus",path:"stylus.tmLanguage.json",displayName:"Stylus",samplePath:"stylus.sample",aliases:["styl"]},{id:"svelte",scopeName:"source.svelte",path:"svelte.tmLanguage.json",displayName:"Svelte",samplePath:"svelte.sample",embeddedLangs:["javascript","typescript","coffee","stylus","sass","css","scss","less","postcss","pug","markdown"]},{id:"swift",scopeName:"source.swift",path:"swift.tmLanguage.json",displayName:"Swift",samplePath:"swift.sample"},{id:"system-verilog",scopeName:"source.systemverilog",path:"system-verilog.tmLanguage.json",displayName:"SystemVerilog",samplePath:"system-verilog.sample"},{id:"tasl",scopeName:"source.tasl",path:"tasl.tmLanguage.json",displayName:"Tasl",samplePath:"tasl.sample"},{id:"tcl",scopeName:"source.tcl",path:"tcl.tmLanguage.json",displayName:"Tcl",samplePath:"tcl.sample"},{id:"tex",scopeName:"text.tex",path:"tex.tmLanguage.json",displayName:"TeX",samplePath:"tex.sample",embeddedLangs:["r"]},{id:"toml",scopeName:"source.toml",path:"toml.tmLanguage.json",displayName:"TOML",samplePath:"toml.sample"},{id:"tsx",scopeName:"source.tsx",path:"tsx.tmLanguage.json",displayName:"TSX",samplePath:"tsx.sample"},{id:"turtle",scopeName:"source.turtle",path:"turtle.tmLanguage.json",displayName:"Turtle",samplePath:"turtle.sample"},{id:"twig",scopeName:"text.html.twig",path:"twig.tmLanguage.json",displayName:"Twig",samplePath:"twig.sample",embeddedLangs:["css","javascript","scss","php","python","ruby"]},{id:"typescript",scopeName:"source.ts",path:"typescript.tmLanguage.json",displayName:"TypeScript",samplePath:"typescript.sample",aliases:["ts"]},{id:"v",scopeName:"source.v",path:"v.tmLanguage.json",displayName:"V",samplePath:"v.sample"},{id:"vb",scopeName:"source.asp.vb.net",path:"vb.tmLanguage.json",displayName:"Visual Basic",samplePath:"vb.sample",aliases:["cmd"]},{id:"verilog",scopeName:"source.verilog",path:"verilog.tmLanguage.json",displayName:"Verilog",samplePath:"verilog.sample"},{id:"vhdl",scopeName:"source.vhdl",path:"vhdl.tmLanguage.json",displayName:"VHDL",samplePath:"vhdl.sample"},{id:"viml",scopeName:"source.viml",path:"viml.tmLanguage.json",displayName:"Vim Script",samplePath:"viml.sample",aliases:["vim","vimscript"]},{id:"vue-html",scopeName:"text.html.vue-html",path:"vue-html.tmLanguage.json",displayName:"Vue HTML",samplePath:"vue-html.sample",embeddedLangs:["vue","javascript"]},{id:"vue",scopeName:"source.vue",path:"vue.tmLanguage.json",displayName:"Vue",samplePath:"vue.sample",embeddedLangs:["html","markdown","pug","stylus","sass","css","scss","less","javascript","typescript","jsx","tsx","json","jsonc","json5","yaml","toml","graphql"]},{id:"vyper",scopeName:"source.vyper",path:"vyper.tmLanguage.json",displayName:"Vyper",samplePath:"vyper.sample",aliases:["vy"]},{id:"wasm",scopeName:"source.wat",path:"wasm.tmLanguage.json",displayName:"WebAssembly",samplePath:"wasm.sample"},{id:"wenyan",scopeName:"source.wenyan",path:"wenyan.tmLanguage.json",displayName:"Wenyan",samplePath:"wenyan.sample",aliases:["文言"]},{id:"wgsl",scopeName:"source.wgsl",path:"wgsl.tmLanguage.json",displayName:"WGSL",samplePath:"wgsl.sample"},{id:"wolfram",scopeName:"source.wolfram",path:"wolfram.tmLanguage.json",displayName:"Wolfram",samplePath:"wolfram.sample",aliases:["wl"]},{id:"xml",scopeName:"text.xml",path:"xml.tmLanguage.json",displayName:"XML",samplePath:"xml.sample",embeddedLangs:["java"]},{id:"xsl",scopeName:"text.xml.xsl",path:"xsl.tmLanguage.json",displayName:"XSL",samplePath:"xsl.sample",embeddedLangs:["xml"]},{id:"yaml",scopeName:"source.yaml",path:"yaml.tmLanguage.json",displayName:"YAML",samplePath:"yaml.sample",aliases:["yml"]},{id:"zenscript",scopeName:"source.zenscript",path:"zenscript.tmLanguage.json",displayName:"ZenScript",samplePath:"zenscript.sample"},{id:"zig",scopeName:"source.zig",path:"zig.tmLanguage.json",displayName:"zig",samplePath:"zig.sample"}];var Ee,Me,Ie,Fe,He=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e))(He||{});class De{static toBinaryStr(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t}static printMetadata(e){let t=De.getLanguageId(e),n=De.getTokenType(e),r=De.getFontStyle(e),s=De.getForeground(e),o=De.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:r,foreground:s,background:o})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>15}static getBackground(e){return(4286578688&e)>>>24}static containsBalancedBrackets(e){return!!(1024&e)}static set(e,t,n,r,s,o){let a=De.getLanguageId(e),i=De.getTokenType(e),l=De.getFontStyle(e),c=De.getForeground(e),u=De.getBackground(e);return 0!==t&&(a=t),0!==n&&(i=8===n?0:n),-1!==r&&(l=r),0!==s&&(c=s),0!==o&&(u=o),(a|i<<8|l<<11|(De.containsBalancedBrackets(e)?1:0)<<10|c<<15|u<<24)>>>0}}function Ge(e){return e.endsWith("/")||e.endsWith("\\")?e.slice(0,-1):e}function $e(e){return e.startsWith("./")?e.slice(2):e}function We(e){const t=e.split(/[\/\\]/g);return t.slice(0,t.length-1)}function ze(...e){return e.map(Ge).map($e).join("/")}function Ue(e){return 32===e||9===e}function qe(e){return 10===e||13===e}function Ve(e){return e>=48&&e<=57}!function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(Ee||(Ee={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(Me||(Me={})),function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(Ie||(Ie={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(Fe||(Fe={}));const Je=function(e,t=[],n=Me.DEFAULT){let r=null,s=[];const o=[];function a(e){Array.isArray(s)?s.push(e):null!==r&&(s[r]=e)}return function(e,t,n=Me.DEFAULT){const r=function(e,t=!1){const n=e.length;let r=0,s="",o=0,a=16,i=0,l=0,c=0,u=0,d=0;function p(t,n){let s=0,o=0;for(;s<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)o=16*o+t-48;else if(t>=65&&t<=70)o=16*o+t-65+10;else{if(!(t>=97&&t<=102))break;o=16*o+t-97+10}r++,s++}return s<t&&(o=-1),o}function h(){if(s="",d=0,o=r,l=i,u=c,r>=n)return o=n,a=17;let t=e.charCodeAt(r);if(Ue(t)){do{r++,s+=String.fromCharCode(t),t=e.charCodeAt(r)}while(Ue(t));return a=15}if(qe(t))return r++,s+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,s+="\n"),i++,c=r,a=14;switch(t){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,s=function(){let t="",s=r;for(;;){if(r>=n){t+=e.substring(s,r),d=2;break}const o=e.charCodeAt(r);if(34===o){t+=e.substring(s,r),r++;break}if(92!==o){if(o>=0&&o<=31){if(qe(o)){t+=e.substring(s,r),d=2;break}d=6}r++}else{if(t+=e.substring(s,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=p(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}s=r}}return t}(),a=10;case 47:const l=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!qe(e.charCodeAt(r));)r++;return s=e.substring(l,r),a=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let o=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,o=!0;break}r++,qe(t)&&(13===t&&10===e.charCodeAt(r)&&r++,i++,c=r)}return o||(r++,d=1),s=e.substring(l,r),a=13}return s+=String.fromCharCode(t),r++,a=16;case 45:if(s+=String.fromCharCode(t),r++,r===n||!Ve(e.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return s+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&Ve(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&Ve(e.charCodeAt(r))))return d=3,e.substring(t,r);for(r++;r<e.length&&Ve(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&Ve(e.charCodeAt(r))){for(r++;r<e.length&&Ve(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}(),a=11;default:for(;r<n&&m(t);)r++,t=e.charCodeAt(r);if(o!==r){switch(s=e.substring(o,r),s){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return s+=String.fromCharCode(t),r++,a=16}}function m(e){if(Ue(e)||qe(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,s="",o=0,a=16,d=0},getPosition:()=>r,scan:t?function(){let e;do{e=h()}while(e>=12&&e<=15);return e}:h,getToken:()=>a,getTokenValue:()=>s,getTokenOffset:()=>o,getTokenLength:()=>r-o,getTokenStartLine:()=>l,getTokenStartCharacter:()=>o-u,getTokenError:()=>d}}(e,!1),s=[];function o(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function a(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>s.slice())):()=>!0}function i(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>s.slice())):()=>!0}const c=a(t.onObjectBegin),u=l(t.onObjectProperty),d=o(t.onObjectEnd),p=a(t.onArrayBegin),h=o(t.onArrayEnd),m=l(t.onLiteralValue),g=i(t.onSeparator),f=o(t.onComment),b=i(t.onError),y=n&&n.disallowComments,k=n&&n.allowTrailingComma;function v(){for(;;){const e=r.scan();switch(r.getTokenError()){case 4:_(14);break;case 5:_(15);break;case 3:_(13);break;case 1:y||_(11);break;case 2:_(12);break;case 6:_(16)}switch(e){case 12:case 13:y?_(10):f();break;case 16:_(1);break;case 15:case 14:break;default:return e}}}function _(e,t=[],n=[]){if(b(e),t.length+n.length>0){let e=r.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){v();break}if(-1!==n.indexOf(e))break;e=v()}}}function x(e){const t=r.getTokenValue();return e?m(t):(u(t),s.push(t)),v(),!0}function S(){switch(r.getToken()){case 3:return function(){p(),v();let e=!0,t=!1;for(;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||_(4,[],[]),g(","),v(),4===r.getToken()&&k)break}else t&&_(6,[],[]);e?(s.push(0),e=!1):s[s.length-1]++,S()||_(4,[],[4,5]),t=!0}return h(),e||s.pop(),4!==r.getToken()?_(8,[4],[]):v(),!0}();case 1:return function(){c(),v();let e=!1;for(;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||_(4,[],[]),g(","),v(),2===r.getToken()&&k)break}else e&&_(6,[],[]);(10!==r.getToken()?(_(3,[],[2,5]),!1):(x(!1),6===r.getToken()?(g(":"),v(),S()||_(4,[],[2,5])):_(5,[],[2,5]),s.pop(),!0))||_(4,[],[2,5]),e=!0}return d(),2!==r.getToken()?_(7,[2],[]):v(),!0}();case 10:return x(!0);default:return function(){switch(r.getToken()){case 11:const e=r.getTokenValue();let t=Number(e);isNaN(t)&&(_(2),t=0),m(t);break;case 7:m(null);break;case 8:m(!0);break;case 9:m(!1);break;default:return!1}return v(),!0}()}}v(),17===r.getToken()?!!n.allowEmptyContent||_(4,[],[]):S()?17!==r.getToken()&&_(9,[],[]):_(4,[],[])}(e,{onObjectBegin:()=>{const e={};a(e),o.push(s),s=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{s=o.pop()},onArrayBegin:()=>{const e=[];a(e),o.push(s),s=e,r=null},onArrayEnd:()=>{s=o.pop()},onLiteralValue:a,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),s[0]};var Ke;!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(Ke||(Ke={}));const Xe="undefined"!=typeof self&&void 0!==self.WorkerGlobalScope,Qe="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"node"===process.release.name,Ye="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"bun"===process.release.name,Ze=Xe||!Qe&&!Ye;let et="",tt="";let nt=null;function rt(e){if(Ze)return`${et}${e}`;{const t=n(485);return t.isAbsolute(e)?e:t.resolve("/","..",e)}}async function st(e){const t=[],r=await async function(e){const t=rt(e);if(Ze)return await fetch(t).then((e=>e.text()));{const e=n(673);return await e.promises.readFile(t,"utf-8")}}(e);let s;try{s=JSON.parse(r)}catch(e){if(s=Je(r,t,{allowTrailingComma:!0}),t.length)throw t[0]}return s}async function ot(e){const t=at(await st(e));if(t.include){const n=await ot(ze(...We(e),t.include));n.settings&&(t.settings=n.settings.concat(t.settings)),n.bg&&!t.bg&&(t.bg=n.bg),n.colors&&(t.colors={...n.colors,...t.colors}),delete t.include}return t}function at(e){const t=e.type||"dark",n={name:e.name,type:t,...e,...ct(e)};var r;return e.include&&(n.include=e.include),e.tokenColors&&(n.settings=e.tokenColors,delete n.tokenColors),(r=n).settings||(r.settings=[]),r.settings[0]&&r.settings[0].settings&&!r.settings[0].scope||r.settings.unshift({settings:{foreground:r.fg,background:r.bg}}),n}const it={light:"#333333",dark:"#bbbbbb"},lt={light:"#fffffe",dark:"#1e1e1e"};function ct(e){let t,n,r=e.settings?e.settings:e.tokenColors;const s=r?r.find((e=>!e.name&&!e.scope)):void 0;return s?.settings?.foreground&&(t=s.settings.foreground),s?.settings?.background&&(n=s.settings.background),!t&&e?.colors?.["editor.foreground"]&&(t=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),t||(t="light"===e.type?it.light:it.dark),n||(n="light"===e.type?lt.light:lt.dark),{fg:t,bg:n}}class ut{constructor(e,t){this.languagesPath="languages/",this.languageMap={},this.scopeToLangMap={},this._onigLibPromise=e,this._onigLibName=t}get onigLib(){return this._onigLibPromise}getOnigLibName(){return this._onigLibName}getLangRegistration(e){return this.languageMap[e]}async loadGrammar(e){const t=this.scopeToLangMap[e];if(!t)return null;if(t.grammar)return t.grammar;const n=await async function(e){return await st(e)}(Oe.includes(t)?`${this.languagesPath}${t.path}`:t.path);return t.grammar=n,n}addLanguage(e){this.languageMap[e.id]=e,e.aliases&&e.aliases.forEach((t=>{this.languageMap[t]=e})),this.scopeToLangMap[e.scopeName]=e}}function dt(e,t){let n=[];for(let r=0,s=t.length;r<s;r++){let s=t.slice(0,r),o=t[r];n[r]={scopeName:o,themeMatches:mt(e,o,s)}}return n}function pt(e,t){let n=e+".";return e===t||t.substring(0,n.length)===n}function ht(e,t,n,r){if(!pt(e,n))return!1;let s=t.length-1,o=r.length-1;for(;s>=0&&o>=0;)pt(t[s],r[o])&&s--,o--;return-1===s}function mt(e,t,n){let r=[],s=0;for(let o=0,a=e.settings.length;o<a;o++){let a,i=e.settings[o];if("string"==typeof i.scope)a=i.scope.split(/,/).map((e=>e.trim()));else{if(!Array.isArray(i.scope))continue;a=i.scope}for(let e=0,o=a.length;e<o;e++){let l=a[e].split(/ /);ht(l[l.length-1],l.slice(0,l.length-1),t,n)&&(r[s++]=i,e=o)}}return r}var gt=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],ft={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function bt(e,t){const n=e.indexOf("",t);if(-1!==n&&"["===e[n+1]){const t=e.indexOf("m",n);return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function yt(e){const t=e.shift();if("2"===t){const 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){const t=e.shift();if(t)return{type:"table",index:Number(t)}}}function kt(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)ft[r]&&t.push({type:"setDecoration",value:ft[r]});else if(r<=29){const e=ft[r-20];e&&t.push({type:"resetDecoration",value:e})}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:gt[r-30]}});else if(38===r){const n=yt(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:gt[r-40]}});else if(48===r){const n=yt(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:gt[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:gt[r-100+8]}})}return t}var vt={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"};function _t(e=vt){function t(t){return e[t]}function n(e){return`#${e.map((e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0"))).join("")}`}let r;return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return s=e.index,function(){if(r)return r;r=[];for(let e=0;e<gt.length;e++)r.push(t(gt[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let s=0;s<6;s++)for(let o=0;o<6;o++)r.push(n([e[t],e[s],e[o]]));let s=8;for(let e=0;e<24;e++,s+=10)r.push(n([s,s,s]));return r}()[s]}var s}}}const xt={pre:({className:e,style:t,children:n})=>`<pre class="${e}" style="${t}" tabindex="0">${n}</pre>`,code:({children:e})=>`<code>${e}</code>`,line:({className:e,children:t})=>`<span class="${e}">${t}</span>`,token:({style:e,children:t})=>`<span style="${e}">${t}</span>`};function St(e,t={}){const n=t.bg||"#fff",r=function(e){const t=new Map;for(const n of e){const e=n.line;t.has(e)?t.get(e).push(n):t.set(e,[n])}return t}(t.lineOptions??[]),s=t.elements||{};function o(e="",t={},n){const r=s[e]||xt[e];return r?(n=n.filter(Boolean),r({...t,children:"code"===e?n.join("\n"):n.join("")})):""}return o("pre",{className:"shiki "+(t.themeName||""),style:`background-color: ${n}`},[t.langId?`<div class="language-id">${t.langId}</div>`:"",o("code",{},e.map(((n,s)=>{const a=s+1;return o("line",{className:function(e){const t=new Set(["line"]);for(const n of e)for(const e of n.classes??[])t.add(e);return Array.from(t)}(r.get(a)??[]).join(" "),lines:e,line:n,index:s},n.map(((e,r)=>{const s=[`color: ${e.color||t.fg}`];return e.fontStyle&He.Italic&&s.push("font-style: italic"),e.fontStyle&He.Bold&&s.push("font-weight: bold"),e.fontStyle&He.Underline&&s.push("text-decoration: underline"),o("token",{style:s.join("; "),tokens:n,token:e,index:r},[(a=e.content,a.replace(/[&<>"']/g,(e=>Ct[e])))]);var a})))})))])}const Ct={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};class jt extends Be.Registry{constructor(e){super(e),this._resolver=e,this.themesPath="themes/",this._resolvedThemes={},this._resolvedGrammars={},this._langGraph=new Map,this._langMap=Oe.reduce(((e,t)=>(e[t.id]=t,e)),{})}getTheme(e){return"string"==typeof e?this._resolvedThemes[e]:e}async loadTheme(e){return"string"==typeof e?(this._resolvedThemes[e]||(this._resolvedThemes[e]=await ot(`${this.themesPath}${e}.json`)),this._resolvedThemes[e]):((e=at(e)).name&&(this._resolvedThemes[e.name]=e),e)}async loadThemes(e){return await Promise.all(e.map((e=>this.loadTheme(e))))}getLoadedThemes(){return Object.keys(this._resolvedThemes)}getGrammar(e){return this._resolvedGrammars[e]}async loadLanguage(e){const t=e.embeddedLangs?.reduce((async(e,t,n)=>{if(!this.getLoadedLanguages().includes(t)&&this._resolver.getLangRegistration(t))return await this._resolver.loadGrammar(this._resolver.getLangRegistration(t).scopeName),e[this._resolver.getLangRegistration(t).scopeName]=n+2,e}),{}),n={embeddedLanguages:t,balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]},r=await this.loadGrammarWithConfiguration(e.scopeName,1,n);this._resolvedGrammars[e.id]=r,e.aliases&&e.aliases.forEach((e=>{this._resolvedGrammars[e]=r}))}async loadLanguages(e){for(const t of e)this.resolveEmbeddedLanguages(t);const t=Array.from(this._langGraph.values());for(const e of t)this._resolver.addLanguage(e);for(const e of t)await this.loadLanguage(e)}getLoadedLanguages(){return Object.keys(this._resolvedGrammars)}resolveEmbeddedLanguages(e){if(this._langGraph.has(e.id)||this._langGraph.set(e.id,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap[t])}}function Nt(e){return"string"==typeof e?Oe.find((t=>t.id===e||t.aliases?.includes(e))):e}async function wt(e){const{_languages:t,_themes:r,_wasmPath:s}=function(e){let t=Oe,n=e.themes||[],r=e.paths?.wasm?e.paths.wasm.endsWith("/")?e.paths.wasm:e.paths.wasm+"/":"dist/";return e.langs&&(t=e.langs.map(Nt)),e.theme&&n.unshift(e.theme),n.length||(n=["nord"]),{_languages:t,_themes:n,_wasmPath:r}}(e),o=new ut(async function(e){if(!nt){let t;if(Ze)t="string"==typeof tt?(0,Re.loadWASM)({data:await fetch(rt(ze(...We(e),"onig.wasm")))}):(0,Re.loadWASM)({data:tt});else{const e=n(485).join(486,"../onig.wasm"),r=n(673).readFileSync(e).buffer;t=(0,Re.loadWASM)(r)}nt=t.then((()=>({createOnigScanner:e=>(0,Re.createOnigScanner)(e),createOnigString:e=>(0,Re.createOnigString)(e)})))}return nt}(s),"vscode-oniguruma"),a=new jt(o);e.paths?.themes&&(a.themesPath=e.paths.themes.endsWith("/")?e.paths.themes:e.paths.themes+"/"),e.paths?.languages&&(o.languagesPath=e.paths.languages.endsWith("/")?e.paths.languages:e.paths.languages+"/");const i=(await a.loadThemes(r))[0];let l;await a.loadLanguages(t);let c=function(){const e={"#000001":"var(--shiki-color-text)","#000002":"var(--shiki-color-background)","#000004":"var(--shiki-token-constant)","#000005":"var(--shiki-token-string)","#000006":"var(--shiki-token-comment)","#000007":"var(--shiki-token-keyword)","#000008":"var(--shiki-token-parameter)","#000009":"var(--shiki-token-function)","#000010":"var(--shiki-token-string-expression)","#000011":"var(--shiki-token-punctuation)","#000012":"var(--shiki-token-link)"};for(let t=0;t<gt.length;t++){const n=`#A${t.toString().padStart(5,"0")}`,r=gt[t].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();e[n]=`var(--shiki-color-ansi-${r})`}return e}();function u(e){const t=e?a.getTheme(e):i;if(!t)throw Error(`No theme registration for ${e}`);l&&l.name===t.name||(a.setTheme(t),l=t);const n=a.getColorMap();return"css"===t.type&&function(e,t){e.bg=c[e.bg]||e.bg,e.fg=c[e.fg]||e.fg,Object.entries(e.colors).forEach((([t,n])=>{e.colors[t]=c[n]||n})),t.forEach(((e,n)=>{t[n]=c[e]||e}))}(t,n),{_theme:t,_colorMap:n}}function d(e,t="text",n,r={includeExplanation:!0}){if(function(e){return!e||["plaintext","txt","text"].includes(e)}(t))return[...e.split(/\r\n|\r|\n/).map((e=>[{content:e}]))];const{_grammar:s}=function(e){const t=a.getGrammar(e);if(!t)throw Error(`No language registration for ${e}`);return{_grammar:t}}(t),{_theme:o,_colorMap:i}=u(n);return function(e,t,n,r,s){let o=n.split(/\r\n|\r|\n/),a=Be.INITIAL,i=[],l=[];for(let n=0,c=o.length;n<c;n++){let c,u,d,p=o[n];if(""===p){i=[],l.push([]);continue}s.includeExplanation&&(c=r.tokenizeLine(p,a),u=c.tokens,d=0);let h=r.tokenizeLine2(p,a),m=h.tokens.length/2;for(let n=0;n<m;n++){let r=h.tokens[2*n],o=n+1<m?h.tokens[2*n+2]:p.length;if(r===o)continue;let a=h.tokens[2*n+1],l=t[De.getForeground(a)],c=De.getFontStyle(a),g=[];if(s.includeExplanation){let t=0;for(;r+t<o;){let n=u[d],r=p.substring(n.startIndex,n.endIndex);t+=r.length,g.push({content:r,scopes:dt(e,n.scopes)}),d++}}i.push({content:p.substring(r,o),color:l,fontStyle:c,explanation:g})}l.push(i),i=[],a=h.ruleStack}return l}(o,i,e,s,r)}function p(e,t){const{_theme:n}=u(t);return function(e,t){const n=t.split(/\r?\n/),r=_t(Object.fromEntries(gt.map((t=>[t,e.colors[`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`]])))),s=function(){let e=null,t=null,n=new Set;return{parse(r){const s=[];let o=0;do{const a=bt(r,o),i=a.sequence?r.substring(o,a.startPosition):r.substring(o);if(i.length>0&&s.push({value:i,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const r=kt(a.sequence);for(const s of r)"resetAll"===s.type?(e=null,t=null,n.clear()):"resetForegroundColor"===s.type?e=null:"resetBackgroundColor"===s.type?t=null:"resetDecoration"===s.type&&n.delete(s.value);for(const s of r)"setForegroundColor"===s.type?e=s.value:"setBackgroundColor"===s.type?t=s.value:"setDecoration"===s.type&&n.add(s.value)}o=a.position}while(o<r.length);return s}}}();return n.map((t=>s.parse(t).map((t=>{let n;n=t.decorations.has("reverse")?t.background?r.value(t.background):e.bg:t.foreground?r.value(t.foreground):e.fg,t.decorations.has("dim")&&(n=function(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t){if(t[3]){const e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map((e=>`${e}${e}`)).join("")}80`}const n=e.match(/var\((--shiki-color-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}(n));let s=He.None;return t.decorations.has("bold")&&(s|=He.Bold),t.decorations.has("italic")&&(s|=He.Italic),t.decorations.has("underline")&&(s|=He.Underline),{content:t.value,color:n,fontStyle:s}}))))}(n,e)}return{codeToThemedTokens:d,codeToHtml:function(e,t="text",n){let r;r="object"==typeof t?t:{lang:t,theme:n};const s=d(e,r.lang,r.theme,{includeExplanation:!1}),{_theme:o}=u(r.theme);return St(s,{fg:o.fg,bg:o.bg,lineOptions:r?.lineOptions,themeName:o.name})},ansiToThemedTokens:p,ansiToHtml:function(e,t){const n=p(e,t?.theme),{_theme:r}=u(t?.theme);return St(n,{fg:r.fg,bg:r.bg,lineOptions:t?.lineOptions,themeName:r.name})},getTheme:e=>u(e)._theme,loadTheme:async function(e){await a.loadTheme(e)},loadLanguage:async function(e){const t=Nt(e);o.addLanguage(t),await a.loadLanguage(t)},getBackgroundColor:function(e){const{_theme:t}=u(e);return t.bg},getForegroundColor:function(e){const{_theme:t}=u(e);return t.fg},getLoadedThemes:function(){return a.getLoadedThemes()},getLoadedLanguages:function(){return a.getLoadedLanguages()},setColorReplacements:function(e){c=e}}}const Lt={"actionscript-3":["as3"],bat:["batch"],berry:["be"],cadence:["cdc"],clojure:["clj"],codeql:["ql"],cpp:["arduino"],csharp:["c#","cs"],cypher:["cql"],docker:["dockerfile"],erlang:["erl"],fsharp:["f#","fs"],gjs:["glimmer-js"],gts:["glimmer-ts"],haskell:["hs"],handlebars:["hbs"],ini:["properties"],java:["javafx"],javascript:["jscript","js"],jssm:["fsl"],kusto:["kql"],make:["makefile"],markdown:["md"],matlab:["matlabkey"],narrat:["nar"],nextflow:["nf"],"objective-c":["objc"],pascal:["delphi"],powershell:["ps","ps1"],pug:["jade"],python:["py"],raku:["perl6"],ruby:["rb"],rust:["rs"],shaderlab:["shader"],shellscript:["shell","sh","git-commit","git-rebase"],sellsession:["console"],stylus:["styl"],typescript:["ts"],vb:["cmd"],viml:["vim","vimscript"],vyper:["vy"],wenyan:["文言"],xml:["coldfusion"],yaml:["yml"]},Pt=e=>{if(e)return Object.keys(Lt).find((t=>Lt[t].includes(e)))},Tt=(e=>{const t=Object.values(Lt).flat();return Object.keys(e).reduce(((n,r)=>(t.includes(r)||(n[r]=e[r]),n)),{})})(JSON.parse('{"abap":"ABAP","actionscript-3":"ActionScript 3","ada":"Ada","ansi":"ANSI","apache":"Apache","apex":"Apex","apl":"APL","applescript":"AppleScript","ara":"Ara","asm":"ASM","astro":"Astro","awk":"Awk","ballerina":"Ballerina","bat":"BAT (Batchfile)","batch":"BAT (Batchfile)","beancount":"Ledger (Beancount)","berry":"Berry","be":"Berry","bibtex":"BibTeX","bicep":"BICEP","blade":"Blade","c":"C","cadence":"Cadence","cdc":"Cadence","clarity":"Clarity","clj":"Clojure","clojure":"Clojure","cmake":"CMake","cobol":"COBOL","codeql":"CodeQL","console":"Console","shellsession":"ShellSession","cypher":"Cypher","cql":"Cypher","ql":"CodeQL","coffee":"CoffeeScript","cpp":"C++","crystal":"Crystal","csharp":"C#","c#":"C#","cs":"C#","css":"CSS","cue":"CUE","d":"D","dart":"Dart","dax":"DAX","diff":"Diff","docker":"Dockerfile","dockerfile":"Dockerfile","dream-maker":"DreamMaker","elixir":"Elixir","elm":"Elm","erb":"ERB","erlang":"Erlang","erl":"Erlang","fish":"Fish","fsharp":"F#","f#":"F#","fs":"F#","gdresource":"GDResource","gdscript":"GDScript","gdshader":"GDShader","gherkin":"Gherkin","git-commit":"Git Commit","git-rebase":"Git Rebase","glsl":"GLSL","glimmer-js":"Glimmer (JS)","gjs":"Glimmer (JS)","glimmer-ts":"Glimmer (TS)","gts":"Glimmer (TS)","gnuplot":"Gnuplot","go":"Go","graphql":"GraphQL","groovy":"Groovy","hack":"Hack","haml":"HAML","handlebars":"Handlebars","hbs":"Handlebars","haskell":"Haskell","hs":"Haskell","hcl":"HCL","hjson":"Hjson","hlsl":"HLSL","html":"HTML","http":"HTTP","imba":"Imba","ini":"INI","properties":"INI","java":"Java","javascript":"JavaScript","js":"JavaScript","jinja-html":"Jinja HTML","jison":"Jison","json":"JSON","json5":"JSON5","jsonc":"JSONC","jsonl":"JSONL","jsonnet":"JSONnet","jssm":"JSSM","fsl":"JSSM","jsx":"JSX","julia":"Julia","kotlin":"Kotlin","kusto":"Kusto","kql":"Kusto","latex":"LaTeX","less":"LESS","liquid":"Liquid","lisp":"Lisp","logo":"Logo","lua":"Lua","make":"Makefile","makefile":"Makefile","markdown":"Markdown","md":"Markdown","marko":"Marko","matlab":"MATLAB","mdx":"MDX","mermaid":"Mermaid","mojo":"Mojo","narrat":"Narrat","nar":"Narrat","nextflow":"Nextflow","nf":"Nextflow","nginx":"Nginx","nim":"Nim","nix":"Nix","objective-c":"Objective-C","objc":"Objective-C","objective-cpp":"Objective-C++","ocaml":"OCaml","pascal":"Pascal","perl":"Perl","php":"PHP","plaintext":"Plaintext","plsql":"PLSQL","postcss":"PostCSS","powerquery":"Power Query","powershell":"PowerShell","ps":"PowerShell","ps1":"PowerShell","prisma":"Prisma","prolog":"Prolog","proto":"Protocol Buffers","pug":"Pug","jade":"Pug","puppet":"Puppet","purescript":"PureScript","python":"Python","py":"Python","r":"R","raku":"Raku","perl6":"Raku","razor":"Razor","reg":"Windows Registry","rel":"Rel","riscv":"RISC-V","rst":"RST","ruby":"Ruby","rb":"Ruby","rust":"Rust","rs":"Rust","sas":"SAS","sass":"Sass","scala":"Scala","scheme":"Scheme","scss":"SCSS","shaderlab":"ShaderLab","shader":"Shader","shellscript":"ShellScript","splunk":"Splunk SPL","bash":"Bash","shell":"ShellScript","sh":"ShellScript","zsh":"Zsh","smalltalk":"Smalltalk","solidity":"Solidity","sparql":"SPARQL","sql":"SQL","ssh-config":"SSH Config","stata":"Stata","stylus":"Stylus","styl":"Stylus","svelte":"Svelte","swift":"Swift","system-verilog":"SystemVerilog","tasl":"TASL","tcl":"TCL","tex":"TeX","toml":"TOML","tsx":"TSX","turtle":"Turtle","twig":"Twig","typescript":"TypeScript","ts":"TypeScript","v":"V","vb":"VB","cmd":"VB","verilog":"Verilog","vhdl":"VHDL","viml":"VimL","vim":"VimL","vimscript":"VimL","vue-html":"Vue HTML","vue":"Vue","vyper":"Vyper","vy":"Vyper","wasm":"WASM","wenyan":"Wenyan","文言":"Wenyan","wgsl":"WGSL","wolfram":"Wolfram","xml":"XML","xsl":"XSL","yaml":"YAML","yml":"YAML","zig":"Zig","zenscript":"ZenScript"}')),At=e=>"ansi"===e?"shellscript":e,Rt=({theme:e,lang:t,ready:n})=>{if(!n)throw new Error;const r=(0,s.applyFilters)("blocks.codeBlockPro.theme",e),o=c?.[r]?.alias;return wt({langs:"plaintext"===t?[]:[At(t)],theme:null!=o?o:r})};let Bt=!1;const Ot=({theme:e,lang:t,ready:n=!0})=>{const[r,o]=(0,u.useState)(!1),a=(0,s.applyFilters)("blocks.codeBlockPro.themes",c);if(!Bt){Bt=!0;const e=window.codeBlockPro?.pluginUrl+"build/shiki/";i=(0,s.applyFilters)("blocks.codeBlockPro.assetDir",e),et=i.endsWith("/")?i:i+"/"}var i;a[e]?.custom&&(e="css-variables");const{data:l,error:d}=he({theme:e,lang:t,ready:n&&r},Rt);return(0,u.useEffect)((()=>{const e=window.codeBlockPro?.pluginUrl+"build/shiki/";fetch(e+"dist/onig.wasm").then((e=>e.arrayBuffer())).then((e=>{tt=e,o(!0)}))}),[]),{highlighter:l,error:d,loading:!l&&!d||!r}},Et=ke()(Ne(xe(((e,t)=>({previousLanguage:"javascript",setPreviousLanguage(n){e({previousLanguage:n}),t().addRecentLanguage(n)},recentLanguages:[],addRecentLanguage(t){e((e=>e.recentLanguages.includes(t)?e:{recentLanguages:[...e.recentLanguages?.slice(-4)||[],t]}))}})),{name:"Code Block Pro Language"}),{name:"code-block-pro-last-language"})),Mt=(e,t)=>{try{return JSON.parse(`[${null!=e?e:""}]`).map((e=>{const n=isNaN(Number(t))?0:Math.max(Number(t)-1,0);return"number"==typeof e?e-n:Array.from({length:e[1]-e[0]+1},((t,r)=>e[0]+r-n))})).filter((e=>!Array.isArray(e)||e?.length>0)).flat().filter((e=>e>=0))}catch(e){return console.error(e),[]}},It=e=>{const t=JSON.parse(`[${null!=e?e:""}]`).filter((e=>Array.isArray(e))),n=t.some((e=>e.some((e=>Array.isArray(e)))));if(n)throw new Error("Nested arrays not allowed");if(t.some((e=>e[0]>=e[1])))throw new Error("Nested arrays must be in order");return!0},Ft=window.wp.escapeHtml,Ht=window.wp.htmlEntities,Dt=(e,{useDecodeURI:t})=>{if(t)try{return encodeURIComponent(e)}catch(t){return console.error(t),e}return(0,Ft.escapeHTML)(e)},Gt=(e,{useDecodeURI:t})=>{if(t)try{return decodeURIComponent(e)}catch(t){return console.error(t),e}return(0,Ht.decodeEntities)(e)};var $t={grad:.9,turn:360,rad:360/(2*Math.PI)},Wt=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},zt=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},Ut=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},qt=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Vt=function(e){return{r:Ut(e.r,0,255),g:Ut(e.g,0,255),b:Ut(e.b,0,255),a:Ut(e.a)}},Jt=function(e){return{r:zt(e.r),g:zt(e.g),b:zt(e.b),a:zt(e.a,3)}},Kt=/^#([0-9a-f]{3,8})$/i,Xt=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Qt=function(e){var t=e.r,n=e.g,r=e.b,s=e.a,o=Math.max(t,n,r),a=o-Math.min(t,n,r),i=a?o===t?(n-r)/a:o===n?2+(r-t)/a:4+(t-n)/a:0;return{h:60*(i<0?i+6:i),s:o?a/o*100:0,v:o/255*100,a:s}},Yt=function(e){var t=e.h,n=e.s,r=e.v,s=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),a=r*(1-n),i=r*(1-(t-o)*n),l=r*(1-(1-t+o)*n),c=o%6;return{r:255*[r,i,a,a,l,r][c],g:255*[l,r,r,i,a,a][c],b:255*[a,a,l,r,r,i][c],a:s}},Zt=function(e){return{h:qt(e.h),s:Ut(e.s,0,100),l:Ut(e.l,0,100),a:Ut(e.a)}},en=function(e){return{h:zt(e.h),s:zt(e.s),l:zt(e.l),a:zt(e.a,3)}},tn=function(e){return Yt((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},nn=function(e){return{h:(t=Qt(e)).h,s:(s=(200-(n=t.s))*(r=t.v)/100)>0&&s<200?n*r/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,n,r,s},rn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sn=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,on=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,an=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ln={string:[[function(e){var t=Kt.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?zt(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?zt(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=on.exec(e)||an.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Vt({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=rn.exec(e)||sn.exec(e);if(!t)return null;var n,r,s=Zt({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*($t[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return tn(s)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,s=e.a,o=void 0===s?1:s;return Wt(t)&&Wt(n)&&Wt(r)?Vt({r:Number(t),g:Number(n),b:Number(r),a:Number(o)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,s=e.a,o=void 0===s?1:s;if(!Wt(t)||!Wt(n)||!Wt(r))return null;var a=Zt({h:Number(t),s:Number(n),l:Number(r),a:Number(o)});return tn(a)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,s=e.a,o=void 0===s?1:s;if(!Wt(t)||!Wt(n)||!Wt(r))return null;var a=function(e){return{h:qt(e.h),s:Ut(e.s,0,100),v:Ut(e.v,0,100),a:Ut(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(o)});return Yt(a)},"hsv"]]},cn=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},un=function(e,t){var n=nn(e);return{h:n.h,s:Ut(n.s+100*t,0,100),l:n.l,a:n.a}},dn=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},pn=function(e,t){var n=nn(e);return{h:n.h,s:n.s,l:Ut(n.l+100*t,0,100),a:n.a}},hn=function(){function e(e){this.parsed=function(e){return"string"==typeof e?cn(e.trim(),ln.string):"object"==typeof e&&null!==e?cn(e,ln.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return zt(dn(this.rgba),2)},e.prototype.isDark=function(){return dn(this.rgba)<.5},e.prototype.isLight=function(){return dn(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Jt(this.rgba)).r,n=e.g,r=e.b,o=(s=e.a)<1?Xt(zt(255*s)):"","#"+Xt(t)+Xt(n)+Xt(r)+o;var e,t,n,r,s,o},e.prototype.toRgb=function(){return Jt(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Jt(this.rgba)).r,n=e.g,r=e.b,(s=e.a)<1?"rgba("+t+", "+n+", "+r+", "+s+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,s},e.prototype.toHsl=function(){return en(nn(this.rgba))},e.prototype.toHslString=function(){return t=(e=en(nn(this.rgba))).h,n=e.s,r=e.l,(s=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+s+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,s},e.prototype.toHsv=function(){return e=Qt(this.rgba),{h:zt(e.h),s:zt(e.s),v:zt(e.v),a:zt(e.a,3)};var e},e.prototype.invert=function(){return mn({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),mn(un(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),mn(un(this.rgba,-e))},e.prototype.grayscale=function(){return mn(un(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),mn(pn(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),mn(pn(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?mn({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):zt(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=nn(this.rgba);return"number"==typeof e?mn({h:e,s:t.s,l:t.l,a:t.a}):zt(t.h)},e.prototype.isEqual=function(e){return this.toHex()===mn(e).toHex()},e}(),mn=function(e){return e instanceof hn?e:new hn(e)},gn=[];!function(e){e.forEach((function(e){gn.indexOf(e)<0&&(e(hn,ln),gn.push(e))}))}([function(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var s in n)r[n[s]]=s;var o={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var s,a,i=r[this.toHex()];if(i)return i;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!o.length)for(var d in n)o[d]=new e(n[d]).toRgb();for(var p in n){var h=(s=l,a=o[p],Math.pow(s.r-a.r,2)+Math.pow(s.g-a.g,2)+Math.pow(s.b-a.b,2));h<c&&(c=h,u=p)}return u}},t.string.push([function(t){var r=t.toLowerCase(),s="transparent"===r?"#0000":n[r];return s?new e(s).toRgb():null},"name"])}]);const fn=(e,t)=>{const n=(0,s.applyFilters)("blocks.codeBlockPro.themes",c);if(n?.[t.theme]?.styles?.["line-background"])return n?.[t?.theme]?.styles?.["line-background"];if(e.startsWith("var")){const t=document.documentElement,n=getComputedStyle(t).getPropertyValue(e.replace(/^var\((--[\w-]+)\)$/,"$1")).trim()||getComputedStyle(t).getPropertyValue("--cbp-text");return mn(n).saturate(.5).alpha(.2).toRgbString()}return mn(e).saturate(.5).alpha(.2).toRgbString()},bn=e=>{const t=(0,s.applyFilters)("blocks.codeBlockPro.themes",c);return t?.[e.theme]?.styles?.["line-number-color"]?t?.[e?.theme]?.styles?.["line-number-color"]:e.textColor},yn=e=>{const t=(0,s.applyFilters)("blocks.codeBlockPro.themes",c);return e?.theme&&t?.[e?.theme]?.styles?.["color-background"]?t?.[e?.theme]?.styles?.["color-background"]:e.bgColor},kn=e=>{const t=(0,s.applyFilters)("blocks.codeBlockPro.themes",c);return e?.theme&&t?.[e?.theme]?.styles?.["color-text"]?t?.[e?.theme]?.styles?.["color-text"]:e.textColor},vn=e=>{if(e)return[e.split(".")[0],"ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas","monospace"].join(",")},xn=(e,t)=>{if(e)return t&&parseFloat(e)?`clamp(${16*parseFloat(e)}px, ${e}, ${24*parseFloat(e)}px)`:e},Sn=window.wp.components,Cn=window.ReactJSXRuntime,jn=()=>(0,Cn.jsx)(Sn.Card,{children:(0,Cn.jsx)(Sn.CardBody,{children:(0,Cn.jsx)(Sn.Tip,{children:(0,Cn.jsx)("span",{className:"text-sm",dangerouslySetInnerHTML:{__html:(0,o.sprintf)((0,o.__)("Read-only mode: The %s capability is required.","code-block-pro"),"<code>unfiltered_html</code>")}})})})}),Nn=({attributes:e,setAttributes:t})=>{const{language:n,theme:r,code:a="",bgColor:i,textColor:l,disablePadding:c,lineNumbers:d,startingLineNumber:h,footerType:m,fontSize:g,lineBlurs:f,lineHighlights:b,enableBlurring:y,enableHighlighting:k,seeMoreAfterLine:v,seeMoreTransition:_,enableMaxHeight:x,editorHeight:S,useDecodeURI:C,useEscapeShortCodes:j,tabSize:N,useTabs:w}=e,L=(0,u.useRef)(null),P=ge(),[T,A]=(0,u.useState)(0),R=(0,u.useRef)(null),{previousLanguage:B}=Et(),{highlighter:O,error:E,loading:M}=Ot({theme:r,lang:null!=n?n:B}),I=m&&"none"!==m;(({attributes:e,setAttributes:t})=>{const{theme:n,fontSize:r,fontFamily:s,lineHeight:o,copyButton:a,copyButtonType:i,copyButtonString:l,copyButtonStringCopied:c,headerType:d,footerType:p,clampFonts:h,disablePadding:m,lineNumbers:g,highlightingHover:f,tabSize:b,useTabs:y,seeMoreType:k,seeMoreString:v,seeMoreTransition:_,seeMoreCollapse:x,seeMoreCollapseString:S}=e,{previousTheme:C,previousFontSize:j,previousFontFamily:N,previousLineHeight:w,previousHeaderType:L,previousFooterType:P,previousClampFonts:T,previousDisablePadding:A,previousLineNumbers:R,previousHighlightingHover:B,previousCopyButton:O,previousCopyButtonType:E,previousCopyButtonString:M,previousCopyButtonStringCopied:I,previousCopyButtonUseTextarea:F,previousTabSize:H,previousUseTabs:D,previousSeeMoreType:G,previousSeeMoreString:$,previousSeeMoreTransition:W,previousSeeMoreCollapse:z,previousSeeMoreCollapseString:U}=Ae(),q=(()=>{const[e,t]=(0,u.useState)(Ae.persist.hasHydrated);return(0,u.useEffect)((()=>{const e=Ae.persist.onFinishHydration((()=>t(!0)));return()=>{e()}}),[]),e})(),V=(0,u.useRef)(!1);(0,u.useEffect)((()=>{V.current||void 0===a&&O&&t({copyButton:O})}),[O,a,t]),(0,u.useEffect)((()=>{V.current||i||t({copyButtonType:E})}),[E,i,t]),(0,u.useEffect)((()=>{V.current||l||void 0===l||t({copyButtonString:M})}),[M,l,t]),(0,u.useEffect)((()=>{V.current||c||void 0===c||t({copyButtonStringCopied:I})}),[I,c,t]),(0,u.useEffect)((()=>{V.current||t({copyButtonUseTextarea:F})}),[F,t]),(0,u.useEffect)((()=>{V.current||n||t({theme:C})}),[C,n,t]),(0,u.useEffect)((()=>{V.current||r||t({fontSize:j})}),[j,r,t]),(0,u.useEffect)((()=>{V.current||s||""===s||t({fontFamily:N})}),[N,s,t]),(0,u.useEffect)((()=>{V.current||o||t({lineHeight:w})}),[w,o,t]),(0,u.useEffect)((()=>{V.current||d||t({headerType:L})}),[L,d,t]),(0,u.useEffect)((()=>{V.current||void 0===p&&t({footerType:P})}),[P,p,t]),(0,u.useEffect)((()=>{V.current||void 0===h&&t({clampFonts:T})}),[T,h,t]),(0,u.useEffect)((()=>{V.current||void 0===m&&t({disablePadding:A})}),[A,m,t]),(0,u.useEffect)((()=>{V.current||void 0===g&&t({lineNumbers:R})}),[R,g,t]),(0,u.useEffect)((()=>{V.current||void 0===b&&t({tabSize:H})}),[H,b,t]),(0,u.useEffect)((()=>{V.current||void 0===y&&t({useTabs:D})}),[D,y,t]),(0,u.useEffect)((()=>{V.current||void 0===k&&t({seeMoreType:G})}),[G,k,t]),(0,u.useEffect)((()=>{V.current||void 0===v&&t({seeMoreString:$})}),[$,v,t]),(0,u.useEffect)((()=>{V.current||void 0===_&&t({seeMoreTransition:W})}),[W,_,t]),(0,u.useEffect)((()=>{V.current||void 0===x&&t({seeMoreCollapse:z})}),[z,x,t]),(0,u.useEffect)((()=>{V.current||void 0===S&&t({seeMoreCollapseString:U})}),[U,S,t]),(0,u.useEffect)((()=>{V.current||void 0===f&&t({highlightingHover:B})}),[B,f,t]),(0,u.useEffect)((()=>{requestAnimationFrame((()=>{V.current=!0}))}),[q])})({attributes:e,setAttributes:t});const F=(0,u.useCallback)((()=>k?Mt(b,h).map((e=>({line:e,classes:["cbp-line-highlight"]}))):[]),[k,b,h]),H=(0,u.useCallback)((()=>y?Mt(f,h).map((e=>({line:e,classes:["cbp-no-blur"]}))):[]),[y,f,h]);return(0,u.useEffect)((()=>{O&&t({bgColor:O.getBackgroundColor(),textColor:O.getForegroundColor()})}),[r,O,t,P]),(0,u.useEffect)((()=>{if(!O)return;const r=null!=n?n:B,o=At(r),i=Gt(a,{useDecodeURI:C}),c=[...F(),...H(),x&&!Number.isNaN(v)?{line:Number(v),classes:["cbp-see-more-line",_?"cbp-see-more-transition":""]}:{}],u="ansi"===r?O.ansiToHtml(i,{lineOptions:c}):O.codeToHtml(i,{lang:o,lineOptions:c}),d=(0,s.applyFilters)("blocks.codeBlockPro.codeHTML",u,e),p=fn(l,e);var h;t({codeHTML:j?(h=d,h.replaceAll(/\[([^<>&/[\]\x00-\x20=]+)\]/g,(e=>e.replace("[","&#91;").replace("]","&#93;")))):d,lineHighlightColor:p})}),[O,v,_,P,l,a,x,n,t,B,e,b,f,H,F,C,j]),(0,u.useLayoutEffect)((()=>{var e;if(!R.current)return;if(!d)return void t({lineNumbersWidth:void 0});const n=R?.current?.querySelectorAll(".line"),r=Number(null!=h?h:0)+(null!==(e=n?.length)&&void 0!==e?e:0);if(!n?.[0])return;t({highestLineNumber:r});const{font:s}=getComputedStyle(n?.[0]);A(((e,t)=>{const n=document.createElement("canvas").getContext("2d");return n?(n.font=t||getComputedStyle(document.body).font,n.measureText(e).width):0})(String(r),s))}),[d,h,a,M,P,E,L,R,t,g,M]),M||O?M&&a||E?(0,Cn.jsx)("div",{className:"px-4 text-left flex items-center",style:{backgroundColor:i,color:l,minHeight:36},children:null!==(D=E?.message)&&void 0!==D?D:""}):void 0===P?null:(0,Cn.jsxs)("div",{ref:R,style:{maxHeight:Number(S)?Number(S):void 0,overflow:Number(S)?"auto":void 0},children:[P?null:(0,Cn.jsx)("div",{className:"absolute inset-0 z-10",children:(0,Cn.jsx)(jn,{})}),(0,Cn.jsx)(p(),{value:Gt(a,{useDecodeURI:C}),onValueChange:n=>t({code:Dt(n,e)}),autoFocus:!a,tabSize:w?1:N||2,insertSpaces:!w,padding:{top:c?0:16,bottom:c||I?0:16,left:!d&&c?0:d?c?(null!=T?T:0)+16:(null!=T?T:0)+32:16,right:0},style:{backgroundColor:i,color:l,minHeight:P?void 0:200},onKeyDown:e=>"Tab"===e.key&&R.current?.querySelector("textarea")?.focus(),highlight:e=>O?.codeToHtml(Gt(e,{useDecodeURI:C}),{lang:At(null!=n?n:B),lineOptions:[...F(),...H()]})?.replace(/<\/?[pre|code][^>]*>/g,"")})]}):(0,Cn.jsx)("div",{className:"px-4 text-left flex items-center",style:{backgroundColor:i,color:l,minHeight:36},children:(0,o.sprintf)((0,o.__)("Theme %s not found. Please select a different theme.","code-block-pro"),r)});var D},wn=e=>{var t,n;const{language:r,bgColor:s,textColor:o,footerString:a,footerLink:i,footerLinkTarget:l,disablePadding:c}=e,u=mn(o),d=o?.startsWith("var(")?null!==(t=kn(e))&&void 0!==t?t:o:u.isDark()?u.lighten(.05).toHex():u.darken(.05).toHex();return(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"flex-end",padding:c?"10px 0 0 0":"10px",width:"100%",justifyContent:"flex-end",backgroundColor:null!==(n=yn(e))&&void 0!==n?n:s,color:d,fontSize:"12px",lineHeight:"1",position:"relative"},children:(0,Cn.jsx)(Ln,{text:a||Tt[r],color:d,link:i,linkTarget:l})})},Ln=({text:e,color:t,link:n,linkTarget:r})=>{if(!n)return(0,Cn.jsx)(Cn.Fragment,{children:e});const s={color:t,textDecoration:"none",fontWeight:"normal",border:"none",background:"none",borderRadius:"0",padding:"0",margin:"0"};return r?(0,Cn.jsx)("a",{className:"cbp-footer-link",href:n,style:s,target:"_blank",rel:"noopener noreferrer",children:e}):(0,Cn.jsx)("a",{className:"cbp-footer-link",href:n,style:s,children:e})},Pn=e=>{var t,n;const{language:r,bgColor:s,textColor:o,footerString:a,footerLink:i,footerLinkTarget:l,disablePadding:c}=e,u=mn(o),d=o?.startsWith("var(")?null!==(t=kn(e))&&void 0!==t?t:o:u.isDark()?u.lighten(.05).toHex():u.darken(.05).toHex();return(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"flex-end",padding:c?"10px 0 0 0":"10px",width:"100%",justifyContent:"flex-start",backgroundColor:null!==(n=yn(e))&&void 0!==n?n:s,color:d,fontSize:"12px",lineHeight:"1",position:"relative"},children:(0,Cn.jsx)(Tn,{text:a||Tt[r],color:d,link:i,linkTarget:l})})},Tn=({text:e,color:t,link:n,linkTarget:r})=>{if(!n)return(0,Cn.jsx)(Cn.Fragment,{children:e});const s={color:t,textDecoration:"none",fontWeight:"normal",border:"none",background:"none",borderRadius:"0",padding:"0",margin:"0"};return r?(0,Cn.jsx)("a",{className:"cbp-footer-link",href:n,style:s,target:"_blank",rel:"noopener noreferrer",children:e}):(0,Cn.jsx)("a",{className:"cbp-footer-link",href:n,style:s,children:e})},An=({attributes:e,onClick:t})=>{const{footerType:n,...r}=e,{bgColor:s}=e,a={none:(0,o.__)("None","code-block-pro"),simpleStringEnd:(0,o.__)("Simple string end","code-block-pro"),simpleStringStart:(0,o.__)("Simple string start","code-block-pro")};return(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:Object.entries(a).map((([e,a])=>(0,Cn.jsx)(Sn.BaseControl,{id:`code-block-pro-footer-${e}`,label:n===e?(0,o.sprintf)((0,o.__)("%s (current)","code-block-pro"),a):a,help:["simpleStringEnd","simpleStringStart"].includes(e)?(0,o.__)("Set the text at the top of this panel.","code-block-pro"):void 0,children:(0,Cn.jsx)("button",{id:`code-block-pro-footer-${e}`,type:"button",onClick:()=>t(e),className:"p-0 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto",children:(0,Cn.jsxs)("span",{className:"pointer-events-none w-full",children:[(0,Cn.jsx)("span",{className:"block w-full h-8",style:{backgroundColor:s}}),(0,Cn.jsx)(Rn,{footerType:e,...r})]})})},e)))})},Rn=e=>{const{footerType:t}=e;return"simpleStringEnd"===t?(0,Cn.jsx)(wn,{...e}):"simpleStringStart"===t?(0,Cn.jsx)(Pn,{...e}):null},Bn=e=>(0,Cn.jsx)("span",{style:{display:"block",padding:"16px 0 0 16px",marginBottom:"-1px",width:"100%",textAlign:"left",backgroundColor:yn(e)},children:(0,Cn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:54,height:14,viewBox:"0 0 54 14",children:(0,Cn.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",children:[(0,Cn.jsx)("circle",{cx:"6",cy:"6",r:"6",fill:"#FF5F56",stroke:"#E0443E",strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"26",cy:"6",r:"6",fill:"#FFBD2E",stroke:"#DEA123",strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"46",cy:"6",r:"6",fill:"#27C93F",stroke:"#1AAB29",strokeWidth:".5"})]})})}),On=e=>{const{textColor:t}=e;return(0,Cn.jsx)("span",{style:{display:"block",padding:"16px 0 0 16px",marginBottom:"-1px",width:"100%",textAlign:"left",backgroundColor:yn(e)},children:(0,Cn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:54,height:14,viewBox:"0 0 54 14",children:(0,Cn.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",children:[(0,Cn.jsx)("circle",{cx:"6",cy:"6",r:"6",fill:mn(t).alpha(.2).toHex(),stroke:mn(t).alpha(.3).toHex(),strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"26",cy:"6",r:"6",fill:mn(t).alpha(.2).toHex(),stroke:mn(t).alpha(.3).toHex(),strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"46",cy:"6",r:"6",fill:mn(t).alpha(.2).toHex(),stroke:mn(t).alpha(.3).toHex(),strokeWidth:".5"})]})})})},En=({bgColor:e})=>{const t=mn(e),n=t.isDark()?t.lighten(.05):t.darken(.05);return(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"center",padding:"10px 0px 10px 16px",marginBottom:"-2px",width:"100%",textAlign:"left",backgroundColor:n.toHex()},children:(0,Cn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:62,height:20,viewBox:"0 0 62 20",children:(0,Cn.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",children:[(0,Cn.jsx)("circle",{cx:"8",cy:"8",r:"8",fill:e,stroke:e,strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"30",cy:"8",r:"8",fill:e,stroke:e,strokeWidth:".5"}),(0,Cn.jsx)("circle",{cx:"52",cy:"8",r:"8",fill:e,stroke:e,strokeWidth:".5"})]})})})},Mn=e=>{const{language:t,bgColor:n,textColor:r,headerString:s}=e;let o=mn(n).toHex();const a=mn(r);let i=a.isDark()?a.lighten(.05).toHex():a.darken(.05).toHex();var l,c;return n?.startsWith("var(")&&(o=null!==(l=yn(e))&&void 0!==l?l:n),r?.startsWith("var(")&&(i=null!==(c=kn(e))&&void 0!==c?c:r),(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"center",padding:"16px 0 0 16px",width:"100%",textAlign:"left",backgroundColor:o},children:(0,Cn.jsx)("span",{style:{background:i,padding:"0.3rem 0.5rem 0.2rem",borderRadius:"1rem",fontSize:"0.8em",lineHeight:1,height:"1.25rem",textAlign:"center",display:"inline-flex",alignItems:"center",justifyContent:"center",color:o},children:s||Tt[t]})})},In=e=>{const{language:t,bgColor:n,textColor:r,headerString:s}=e,o=mn(n);let a=o.isDark()?o.lighten(.05).toHex():o.darken(.05).toHex();const i=mn(r);let l=i.isDark()?i.lighten(.05).toHex():i.darken(.05).toHex();var c,u;return n?.startsWith("var(")&&(a=null!==(c=yn(e))&&void 0!==c?c:n),r?.startsWith("var(")&&(l=null!==(u=kn(e))&&void 0!==u?u:r),(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"center",padding:"10px 0px 10px 16px",marginBottom:"-2px",width:"100%",textAlign:"left",backgroundColor:a,color:l},children:s||Tt[t]})},Fn=e=>{const{language:t,bgColor:n,textColor:r,headerString:s}=e;let o=fn(r,e);var a;return r?.startsWith("var(")&&(o=null!==(a=kn(e))&&void 0!==a?a:r),(0,Cn.jsx)("span",{style:{display:"flex",alignItems:"center",padding:"10px 0px 0 16px",fontSize:"0.8em",width:"100%",textAlign:"left",backgroundColor:n,fontStyle:"italic",color:r},children:(0,Cn.jsx)("span",{style:{borderBottom:`1px solid ${o}`},children:s||Tt[t]})})},Hn=()=>(0,Cn.jsx)("div",{className:"block w-full h-8 pt-2",children:(0,o.__)("Not supported with this theme","code-block-pro")}),Dn=["headlightsMutedAlt"],Gn=({attributes:e,onClick:t})=>{const{headerType:n,...r}=e,{bgColor:s}=e,a={none:(0,o.__)("None","code-block-pro"),headlights:(0,o.__)("Headlights","code-block-pro"),headlightsMuted:(0,o.__)("Headlights muted","code-block-pro"),headlightsMutedAlt:(0,o.__)("Headlights muted alt","code-block-pro"),simpleString:(0,o.__)("Simple string","code-block-pro"),stringSmall:(0,o.__)("String muted","code-block-pro"),pillString:(0,o.__)("Pill string","code-block-pro")},i=s?.startsWith("var(");return(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:Object.entries(a).map((([e,a])=>(0,Cn.jsxs)(Sn.BaseControl,{id:`code-block-pro-header-${e}`,label:n===e?(0,o.sprintf)((0,o.__)("%s (current)","code-block-pro"),a):a,help:["simpleString","pillString","stringSmall"].includes(e)?(0,o.__)("Set the text at the top of this panel.","code-block-pro"):void 0,children:[(0,Cn.jsx)("button",{id:`code-block-pro-header-${e}`,type:"button",onClick:()=>t(e),className:"p-0 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto",children:(0,Cn.jsxs)("span",{className:"pointer-events-none w-full",children:[(0,Cn.jsx)($n,{headerType:e,...r}),(0,Cn.jsx)("span",{className:"block w-full h-8",style:{backgroundColor:s}})]})}),i&&Dn.includes(e)&&(0,Cn.jsx)(Hn,{})]},e)))})},$n=e=>{const{headerType:t,bgColor:n}=e,r=n?.startsWith("var(");return r&&Dn.includes(null!=t?t:"")?null:"headlights"===t?(0,Cn.jsx)(Bn,{...e}):"headlightsMuted"===t?(0,Cn.jsx)(On,{...e}):"headlightsMutedAlt"===t?(0,Cn.jsx)(En,{...e}):"simpleString"===t?(0,Cn.jsx)(In,{...e}):"stringSmall"===t?(0,Cn.jsx)(Fn,{...e}):"pillString"===t?(0,Cn.jsx)(Mn,{...e}):null},Wn=e=>{const{bgColor:t,textColor:n,seeMoreString:r,disablePadding:s,context:a,footerType:i,seeMoreCollapse:l,seeMoreCollapseString:c}=e;let u=mn(t).toHex();const d=mn(n);let p=d.isDark()?d.lighten(.05).toHex():d.darken(.05).toHex();const h="none"!==i,m="editor"===a,g=r||(0,o.__)("Expand","code-block-pro");var f;return t?.startsWith("var(")&&(u=null!==(f=yn(e))&&void 0!==f?f:t),n?.startsWith("var(")&&(p=n),(0,Cn.jsx)("div",{className:"cbp-see-more-container","data-see-more-collapse-string":l?c||(0,o.__)("Collapse","code-block-pro"):void 0,"data-see-more-string":l?g:void 0,style:{display:"front"===a?"none":"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",backgroundColor:"transparent",fontSize:"12px",lineHeight:"1",position:"relative",marginBottom:h||m?0:"-16px",height:h&&!m?"16px":"32px"},children:(0,Cn.jsx)("span",{role:m?"presentation":"button",tabIndex:m?-1:0,className:"cbp-see-more-simple-btn cbp-see-more-simple-btn-hover",style:{color:p,backgroundColor:u,padding:s?"10px 0 0":"10px 16px",cursor:"default"},children:g})})},zn=e=>{const{bgColor:t,textColor:n,seeMoreString:r,disablePadding:s,context:a,footerType:i,seeMoreCollapse:l,seeMoreCollapseString:c}=e;let u=mn(t).toHex();const d=mn(n);let p=d.isDark()?d.lighten(.05).toHex():d.darken(.05).toHex();const h="none"!==i,m="editor"===a,g=r||(0,o.__)("Expand","code-block-pro");var f,b;return n?.startsWith("var(")&&(p=null!==(f=kn(e))&&void 0!==f?f:n),t?.startsWith("var(")&&(u=null!==(b=yn(e))&&void 0!==b?b:t),(0,Cn.jsx)("div",{className:"cbp-see-more-container","data-see-more-collapse-string":l?c||(0,o.__)("Collapse","code-block-pro"):void 0,"data-see-more-string":l?g:void 0,style:{display:"front"===a?"none":"flex",flexDirection:"column",alignItems:"flex-end",width:"100%",backgroundColor:"transparent",fontSize:"12px",lineHeight:"1",position:"relative",marginBottom:h||m?0:"-16px",height:h&&!m?"16px":"32px"},children:(0,Cn.jsx)("span",{role:m?"presentation":"button",tabIndex:m?-1:0,className:"cbp-see-more-simple-btn cbp-see-more-simple-btn-hover",style:{color:p,backgroundColor:u,padding:s?"10px 0 0":"10px 16px",cursor:"default"},children:g})})},Un=e=>{const{bgColor:t,textColor:n,seeMoreString:r,context:s,footerType:a,seeMoreCollapse:i,seeMoreCollapseString:l}=e;let c,u,d;if(t?.startsWith("var(")){var p,h;c=null!==(p=yn(e))&&void 0!==p?p:t,d=c,u=null!==(h=kn(e))&&void 0!==h?h:n}else{const e=mn(t),r=mn(n);u=e.isDark()?r.lighten(.15).toHex():r.darken(.15).toHex(),d=e.isDark()?e.lighten(.1).toHex():e.darken(.1).toHex(),c=e.toHex()}const m="none"!==a,g="editor"===s,f=r||(0,o.__)("Expand","code-block-pro");return(0,Cn.jsxs)("div",{className:"cbp-see-more-container","data-see-more-collapse-string":i?l||(0,o.__)("Collapse","code-block-pro"):void 0,"data-see-more-string":i?f:void 0,style:{display:"front"===s?"none":"flex",flexDirection:"column",alignItems:"center",width:"100%",fontSize:"12px",lineHeight:"1",position:"relative",paddingTop:m?0:"4px",marginBottom:m||g?0:"-16px",height:m&&!g?0:"32px"},children:[!m&&(0,Cn.jsx)("div",{style:{backgroundColor:c,height:"50%",position:"absolute",top:0,left:0,right:0},"aria-hidden":"true"}),(0,Cn.jsx)("span",{role:g?"presentation":"button",tabIndex:g?-1:0,className:"cbp-see-more-simple-btn cbp-see-more-simple-btn-hover",style:{color:u,backgroundColor:d,padding:"6px 14px",cursor:"default",position:"relative",borderRadius:"6px",transform:m?"translateY(-50%)":void 0},children:f})]})},qn=({attributes:e,onClick:t})=>{const{seeMoreType:n,...r}=e,{bgColor:s}=e,a={none:(0,o.__)("None","code-block-pro"),roundCenter:(0,o.__)("See more center","code-block-pro"),blockLeft:(0,o.__)("See more left","code-block-pro"),blockRight:(0,o.__)("See more right","code-block-pro")};return(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:Object.entries(a).map((([e,a])=>(0,Cn.jsx)(Sn.BaseControl,{id:`code-block-pro-see-more-${e}`,label:n===e||!n&&"none"===e?(0,o.sprintf)((0,o.__)("%s (current)","code-block-pro"),a):a,children:(0,Cn.jsx)("button",{id:`code-block-pro-see-more-${e}`,type:"button",onClick:()=>t(e),className:"p-0 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto",children:(0,Cn.jsxs)("span",{className:"pointer-events-none w-full",children:[(0,Cn.jsx)("span",{className:"block w-full h-8",style:{backgroundColor:s}}),(0,Cn.jsx)(Vn,{seeMoreType:e,context:"editor",...r})]})})},e)))})},Vn=e=>{const{seeMoreType:t,enableMaxHeight:n,context:r}=e;return n?"roundCenter"===t?(0,Cn.jsx)(Un,{...e,context:r}):"blockLeft"===t?(0,Cn.jsx)(Wn,{...e,context:r}):"blockRight"===t?(0,Cn.jsx)(zn,{...e,context:r}):null:null},Jn=function({onlyFirst:e=!1}={}){const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?(?:\\u0007|\\u001B\\u005C|\\u009C))","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}(),Kn=(0,u.forwardRef)((function({icon:e,size:t=24,...n},r){return(0,u.cloneElement)(e,{width:t,height:t,...n,ref:r})})),Xn=window.wp.primitives,Qn=(0,Cn.jsx)(Xn.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,Cn.jsx)(Xn.Path,{d:"M12.9 6h-2l-4 11h1.9l1.1-3h4.2l1.1 3h1.9L12.9 6zm-2.5 6.5l1.5-4.9 1.7 4.9h-3.2z"})}),Yn=({text:e,color:t})=>void 0===e?(0,Cn.jsx)(Kn,{icon:Qn,fill:t,className:"border border-solid border-gray-900"}):(0,Cn.jsx)("span",{className:"cbp-btn-text",children:e||(0,o.__)("Copy","code-block-pro")}),Zn={heroicons:{label:(0,o.__)("Clipboard","code-block-pro"),Component:()=>(0,Cn.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:24,height:24},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[(0,Cn.jsx)("path",{className:"with-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),(0,Cn.jsx)("path",{className:"without-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})]})},twoSquares:{label:(0,o.__)("Two Squares","code-block-pro"),Component:()=>(0,Cn.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:24,height:24},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:[(0,Cn.jsx)("path",{className:"with-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"}),(0,Cn.jsx)("path",{className:"without-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6"})]})},textSimple:{label:(0,o.__)("Text Simple","code-block-pro"),Component:e=>(0,Cn.jsx)(Yn,{...e})}},er=({attributes:e})=>{var t;const{copyButtonType:n,copyButtonString:r,copyButtonStringCopied:s,copyButtonUseTextarea:a,useDecodeURI:i,code:l,textColor:c,bgColor:u,headerType:d}=e,p="textSimple"===n,h=p?u:c,m=p?c:void 0,{Component:g}=null!==(t=Zn?.[n])&&void 0!==t?t:Zn.heroicons,f=function(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(Jn,"")}(i?encodeURIComponent(null!=l?l:""):null!=l?l:"");return(0,Cn.jsxs)("span",{role:"button",tabIndex:0,"data-encoded":!!i||void 0,"data-code":a?void 0:f,style:{color:null!=h?h:"inherit",display:"none",backgroundColor:m},"aria-label":null!=r?r:(0,o.__)("Copy","code-block-pro"),"data-copied-text":p?null!=s?s:(0,o.__)("Copied!","code-block-pro"):void 0,"data-has-text-button":p?n:void 0,"data-inside-header-type":p?d:void 0,"aria-live":p?"polite":void 0,className:"code-block-pro-copy-button",children:[a?(0,Cn.jsx)("textarea",{className:"code-block-pro-copy-button-textarea","aria-hidden":"true",readOnly:!0,value:f}):null,(0,Cn.jsx)(g,{text:r})]})},tr=e=>{const{copyButton:t}=e;return t?(0,Cn.jsx)(er,{attributes:e}):null},nr=window.wp.data,rr=window.wp.editPost,sr=({attributes:e,setAttributes:t})=>{const[n,r]=(0,u.useState)(e.language),{previousLanguage:s,setPreviousLanguage:o}=Et();return(0,u.useEffect)((()=>{n||t({language:s})}),[n,s,t]),(0,u.useEffect)((()=>{r(e.language)}),[e.language]),[n,e=>{t({language:e}),r(e),o(e)}]},or=ke()(xe((e=>({bringAttentionToPanel:!1,setBringAttentionToPanel:t=>{e((()=>({bringAttentionToPanel:t})))}})),{name:"Code Block Pro Globals"})),ar=({attributes:e,setAttributes:t})=>{var n,r;const{updateThemeHistory:s}=Ae();return(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-show-copy-button",children:[(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"copy-button",label:(0,o.__)("Copy Button","code-block-pro"),help:(0,o.__)("Adds a button to copy the code","code-block-pro"),checked:e.copyButton,onChange:e=>{t({copyButton:e}),s({copyButton:e})}}),e.copyButton&&(0,Cn.jsx)("div",{className:"flex gap-2",children:Object.entries(Zn).map((([n,r])=>{const{Component:o}=r,{copyButtonType:a,bgColor:i,textColor:c}=e,u=a===n;return(0,Cn.jsx)("div",{style:{backgroundColor:i},children:(0,Cn.jsxs)("button",{id:`code-block-pro-copy-button-${n}`,type:"button",onClick:()=>{t({copyButtonType:n}),s({copyButtonType:n})},style:{color:c},"aria-current":u,className:l()("sidebar-copy-button relative border-0 flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none ring-wp-theme-500 focus:ring-wp overflow-x-auto top-0 right-0 left-auto bg-transparent border-none transition-opacity duration-200 ease-in-out leading-none z-10 p-1 opacity-90",{"ring-wp":u}),children:[(0,Cn.jsx)("span",{className:"sr-only",children:r.label}),(0,Cn.jsx)("span",{className:"pointer-events-none w-full",children:(0,Cn.jsx)(o,{color:c})})]})},n)}))}),e.copyButton&&(0,Cn.jsxs)("div",{style:{marginTop:"1rem"},children:[(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-copy-button-text",autoComplete:"off",label:(0,o.__)("Button label","code-block-pro"),placeholder:(0,o.__)("Copy","code-block-pro"),onChange:e=>{t({copyButtonString:e})},value:null!==(n=e.copyButtonString)&&void 0!==n?n:""}),"textSimple"===e.copyButtonType&&(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-copy-button-text-copied",autoComplete:"off",label:(0,o.__)("Copied Text","code-block-pro"),placeholder:(0,o.__)("Copied!","code-block-pro"),onChange:e=>{t({copyButtonStringCopied:e})},value:null!==(r=e.copyButtonStringCopied)&&void 0!==r?r:"",help:(0,o.__)("Text briefly shown after the code is copied")}),(0,Cn.jsx)(Sn.CheckboxControl,{label:(0,o.__)("Use Textarea","code-block-pro"),help:(0,o.__)("Use a <textarea> to to store the code, otherwise a `data-code` attribute","code-block-pro"),checked:e.copyButtonUseTextarea,onChange:e=>{t({copyButtonUseTextarea:e}),s({copyButtonUseTextarea:e})}})]})]})},ir=({attributes:e,setAttributes:t})=>(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:(0,Cn.jsx)(Sn.PanelBody,{title:(0,o.__)("Buttons","code-block-pro"),initialOpen:!1,children:(0,Cn.jsx)(ar,{attributes:e,setAttributes:t})})}),lr=({value:e,onChange:t})=>(0,Cn.jsx)(Sn.FontSizePicker,{onChange:e=>{t(null!=e?e:".875rem")},value:e,fontSizes:[{name:"Tiny",size:".75rem",slug:"tiny"},{name:"Small",size:".875rem",slug:"small"},{name:"Normal",size:"1rem",slug:"normal"},{name:"Big",size:"1.125rem",slug:"big"}]}),cr=({value:e,onChange:t})=>(0,Cn.jsx)(Sn.FontSizePicker,{onChange:e=>{t(null!=e?e:".875rem")},value:e,fontSizes:[{name:"None",size:"1rem",slug:"none"},{name:"Tight",size:"1.25rem",slug:"tight"},{name:"Normal",size:"1.5rem",slug:"normal"},{name:"Relaxed",size:"1.625rem",slug:"relaxed"}]}),ur=({value:e,onChange:t})=>{const n={"":(0,o.__)("System Default","code-block-pro"),"Code-Pro-Comic-Mono.ttf":"Comic Mono","Code-Pro-Cozette":"Cozette","Code-Pro-Deja-Vu-Mono.ttf":"DejaVu Mono","Code-Pro-Fantasque-Sans-Mono":"Fantasque Sans Mono","Code-Pro-Fira-Code":"Fira Code","Code-Pro-Geist-Mono":"Geist Mono","Code-Pro-Hack":"Hack","Code-Pro-JetBrains-Mono":"JetBrains Mono","Code-Pro-JetBrains-Mono-NL.ttf":"JetBrains Mono (No Ligatures)","Code-Pro-Monaspace-Argon.woff":"Monaspace Argon","Code-Pro-Monaspace-Krypton.woff":"Monaspace Krypton","Code-Pro-Monaspace-Neon.woff":"Monaspace Neon","Code-Pro-Monaspace-Radon.woff":"Monaspace Radon","Code-Pro-Monaspace-Xenon.woff":"Monaspace Xenon","Code-Pro-Roboto-Mono.ttf":"Roboto Mono"};return(0,Cn.jsx)(Sn.SelectControl,{id:"code-block-pro-font-family",label:(0,o.__)("Font Family","code-block-pro"),value:e,onChange:t,options:Object.entries(n).map((([e,t])=>({label:t,value:e})))})},dr=({attributes:e,setAttributes:t})=>{var n,r,s,a,i,l;const[c,d]=(0,u.useState)(e?.editorHeight),[p,h]=(0,u.useState)(null!==(n=e?.enableMaxHeight)&&void 0!==n&&n),[m,g]=(0,u.useState)(null!==(r=e?.seeMoreString)&&void 0!==r?r:""),[f,b]=(0,u.useState)(null!==(s=e?.seeMoreAfterLine)&&void 0!==s?s:""),[y,k]=(0,u.useState)(null!==(a=e?.seeMoreTransition)&&void 0!==a&&a),[v,_]=(0,u.useState)(null!==(i=e?.seeMoreCollapse)&&void 0!==i&&i),[x,S]=(0,u.useState)(null!==(l=e?.seeMoreCollapseString)&&void 0!==l?l:""),C=(0,u.useRef)(Number(e?.editorHeight)>0),{updateThemeHistory:j}=Ae();return(0,u.useEffect)((()=>{t({editorHeight:c,seeMoreString:m,seeMoreAfterLine:f,seeMoreTransition:y,seeMoreCollapse:v,seeMoreCollapseString:x,enableMaxHeight:p})}),[c,m,f,y,v,x,t,p]),(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Max Height","code-block-pro"),initialOpen:C.current,children:[(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-editor-height",children:(0,Cn.jsx)(Sn.TextControl,{spellCheck:!1,autoComplete:"off","data-cy-cbp":"editor-height",type:"number",label:(0,o.__)("Max editor height (admin only)","code-block-pro"),help:(0,o.__)("Set to 0 to disable.","code-block-pro"),placeholder:"0",onChange:e=>{d(e)},value:c})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-see-more-enabled",children:(0,Cn.jsx)(Sn.CheckboxControl,{label:(0,o.__)("Enable frontend max height","code-block-pro"),help:(0,o.__)("Enable this, then select a specific line number below.","code-block-pro"),"data-cy":"enable-max-height",checked:p,onChange:e=>{h(e)}})}),p&&(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-see-more-line",children:(0,Cn.jsx)(Sn.TextControl,{"data-cy":"see-more-line",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Hide after line","code-block-pro"),help:(0,o.__)("Enter the last visible line number.","code-block-pro"),onChange:e=>{b(e)},value:f})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-see-more-transition",children:(0,Cn.jsx)(Sn.CheckboxControl,{label:(0,o.__)("Animate height transition","code-block-pro"),checked:y,onChange:e=>{k(e),j({seeMoreTransition:e})}})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-see-more-text",children:(0,Cn.jsx)(Sn.TextControl,{"data-cy":"see-more-text",spellCheck:!1,autoComplete:"off",label:(0,o.__)("See more text","code-block-pro"),placeholder:(0,o.__)("Expand","code-block-pro"),onChange:e=>{g(e),j({seeMoreString:e})},value:null!=m?m:""})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-see-more-collapse",children:(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"enable-collapse",label:(0,o.__)("Allow users to collapse","code-block-pro"),checked:v,onChange:e=>{_(e),j({seeMoreCollapse:e})}})}),v?(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-collapse-text",children:(0,Cn.jsx)(Sn.TextControl,{"data-cy":"collapse-text",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Collapse text","code-block-pro"),placeholder:(0,o.__)("Collapse","code-block-pro"),onChange:e=>{S(e),j({seeMoreCollapseString:e})},value:null!=x?x:""})}):null,(0,Cn.jsx)(qn,{attributes:e,onClick:e=>{t({seeMoreType:e}),j({seeMoreType:e})}})]})]})},pr=({name:e,attributes:t,setAttributes:n})=>{const{Slot:r}=(0,u.useMemo)((()=>(0,Sn.createSlotFill)(e)),[e]);return(0,Cn.jsx)(r,{fillProps:{attributes:t,setAttributes:n,languages:Tt,getCode:()=>Gt(t.code,t),setCode:e=>n({code:Dt(e,t)})}})},hr="/code-block-pro/v1/settings",mr=async e=>{const t=await m()({path:hr});return t?.[e]},gr={seenNotices:[],hiddenThemes:[]},fr={getItem:async e=>{var t;const n=await mr(e);return JSON.stringify({version:null!==(t=n?.version)&&void 0!==t?t:0,state:n||gr})},setItem:async(e,t)=>{const{state:n,version:r}=JSON.parse(t),s={[e]:Object.assign(await mr(e)||gr,n,{version:r})};await m()({path:hr,method:"POST",data:s})},removeItem:async e=>{const t={[e]:null};await m()({path:hr,method:"POST",data:t})}},br=ke()(Ne(xe((e=>({...gr,setSeenNotice(t){e((e=>e.seenNotices.includes(t)?e:{seenNotices:[...e.seenNotices,t]}))},toggleHiddenTheme(t){e((e=>({hiddenThemes:e.hiddenThemes.includes(t)?e.hiddenThemes.filter((e=>e!==t)):[...e.hiddenThemes,t]})))}})),{name:"Code Block Pro Settings"}),{name:"code_block_pro_settings_2",storage:Ce((()=>fr))})),yr=()=>Object.entries((0,s.applyFilters)("blocks.codeBlockPro.themes",c)).map((([e,{name:t,priority:n,custom:r}])=>({name:t,slug:e,priority:n,custom:r}))),kr=()=>yr().filter((({priority:e})=>e)),vr=({search:e,setSearch:t})=>{const[n,r]=(0,u.useState)(!1);return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-filter-themes",children:[(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-search-themes",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Search themes","code-block-pro"),onChange:t,value:e}),(0,Cn.jsxs)("div",{className:"-mt-2 mb-4 flex flex-wrap gap-2",children:[(0,Cn.jsx)(Sn.Button,{"data-cy":"manage-themes",variant:"secondary",size:"small",onClick:()=>r(!0),children:(0,o.__)("Manage themes","code-block-pro")}),(0,s.applyFilters)("blocks.codeBlockPro.themesPanelButtons",null)]})]})}),n&&(0,Cn.jsx)(_r,{closeModal:()=>r(!1)})]})},_r=({closeModal:e})=>{const{hiddenThemes:t,toggleHiddenTheme:n}=br(),r=kr();return(0,Cn.jsx)(Sn.Modal,{title:(0,o.__)("Manage Themes","code-block-pro"),onRequestClose:e,className:"code-block-pro-editor",children:(0,Cn.jsxs)("div",{id:"code-block-pro-theme-manager",className:"flex flex-col gap-4 mt-2",children:[r?.length>0?(0,Cn.jsxs)("div",{className:"flex flex-col gap-4 bg-gray-100 p-4",children:[(0,Cn.jsx)("h2",{className:"m-0 my-2 text-center",children:(0,o.__)("Priority themes","code-block-pro")}),(0,Cn.jsx)("div",{className:"md:grid gap-3 grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:[...yr().filter((({custom:e})=>e)),...r].map((({name:e,slug:r})=>(0,Cn.jsx)(Sn.ToggleControl,{checked:!t.includes(r),label:e,onChange:()=>n(r)},r)))})]}):null,(0,Cn.jsx)("div",{className:l()("md:grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",{"p-4":r?.length>0}),children:yr().filter((({priority:e,custom:t})=>!e&&!t)).map((({name:e,slug:r})=>(0,Cn.jsx)(Sn.ToggleControl,{checked:!t.includes(r),label:e,onChange:()=>n(r)},r)))}),r?.length>0?null:(0,Cn.jsx)("div",{className:"font-semibold text-base",children:(0,Cn.jsx)(Sn.ExternalLink,{href:"https://code-block-pro.com/themes?utm_campaign=notice&utm_source=manage-themes",children:(0,o.__)("Get 25+ more themes here","code-block-pro")})})]})})},xr=({id:e,theme:t,lang:n,onClick:r,code:s,fontSize:a,lineHeight:i,fontFamily:l,clampFonts:c,styles:d})=>{const[p,h]=(0,u.useState)(!1),{highlighter:m,error:g,loading:f}=Ot({theme:t,lang:s?n:"c",ready:p}),[b,y]=(0,u.useState)(""),[k,v]=(0,u.useState)("#ffffff"),_=(0,u.useRef)(new IntersectionObserver((([e])=>{e.isIntersecting&&(h(!0),_.current.disconnect())}))),x="\nfloat Q_rsqrt( float number )\n{\n long i;\n float x2, y;\n const float threehalfs = 1.5F;\n\n x2 = number * 0.5F;\n y = number;\n i = * ( long * ) &y; // evil floating point bit level hacking\n i = 0x5f3759df - ( i >> 1 ); // what the frack?\n y = * ( float * ) &i;\n y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration\n// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed\n\n return y;\n}".trim();return(0,u.useEffect)((()=>{if(!m)return;if("ansi"===n&&s)return y(m.ansiToHtml(s)),void v(m.getBackgroundColor());const e=s?m.codeToHtml((0,Ht.decodeEntities)(s),{lang:n}):m.codeToHtml((0,Ht.decodeEntities)(x),{lang:"c"});y(e),v(m.getBackgroundColor())}),[m,n,s,x]),(0,Cn.jsx)("button",{id:e,type:"button",onClick:r,className:"cbp-theme-preview p-4 px-3 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto max-h-80 overflow-y-hidden",style:{backgroundColor:k,minHeight:"50px",...Object.entries(null!=d?d:{}).reduce(((e,[t,n])=>({...e,[`--shiki-${t}`]:n})),{})},children:f||g||!p?(0,Cn.jsx)("span",{id:e,ref:e=>{e&&_.current.observe(e)},style:{minHeight:"200px"},className:"flex items-center justify-center p-6 w-full",children:g?.message||(0,o.__)("Loading...","code-block-pro")}):(0,Cn.jsx)("span",{className:"pointer-events-none",style:{fontSize:xn(a,c),fontFamily:vn(l),lineHeight:xn(i,c)},dangerouslySetInnerHTML:{__html:b}})})},Sr=e=>{const{hiddenThemes:t}=br(),n=(0,s.applyFilters)("blocks.codeBlockPro.themes",c),r=Object.entries(n).filter((([e])=>!t.includes(e))).filter((([t])=>t.includes(e.search.toLocaleLowerCase()))).map((([e,t])=>({slug:e,...t}))).sort(((e,t)=>e.priority===t.priority?0:e.priority?-1:1)).sort(((e,t)=>e.custom===t.custom?0:e.custom?-1:1)),a=kr();return(0,Cn.jsxs)("div",{className:"code-block-pro-editor",style:{tabSize:e.tabSize},children:[e.search?.length>0?(0,Cn.jsx)(Sn.BaseControl,{id:"add-on-themes",children:a?.length>0?null:(0,Cn.jsx)("div",{className:"font-semibold text-base",children:(0,Cn.jsx)(Sn.ExternalLink,{href:"https://code-block-pro.com/?utm_campaign=notice&utm_source=search",children:(0,o.__)("Get 25+ more themes here","code-block-pro")})})}):null,r.slice(0,9).map((t=>(0,Cn.jsx)(Cr,{...t,...e},t.slug))),e.search?.length>0?null:(0,Cn.jsx)(Sn.BaseControl,{id:"add-on-themes",children:a?.length>0?null:(0,Cn.jsx)("div",{className:"font-semibold text-base",children:(0,Cn.jsx)(Sn.ExternalLink,{href:"https://code-block-pro.com/themes?utm_campaign=notice&utm_source=mid-themes",children:(0,o.__)("Get 25+ more themes here","code-block-pro")})})}),r.slice(9).map((t=>(0,Cn.jsx)(Cr,{...t,...e},t.slug))),e.search?.length>0?null:(0,Cn.jsx)(Sn.BaseControl,{id:"add-on-themes",children:a?.length>0?null:(0,Cn.jsx)("div",{className:"font-semibold text-base",children:(0,Cn.jsx)(Sn.ExternalLink,{href:"https://code-block-pro.com/themes?utm_campaign=notice&utm_source=below-themes",children:(0,o.__)("Get 25+ more themes here","code-block-pro")})})})]})},Cr=({slug:e,name:t,theme:n,language:r,code:s,fontSize:a,lineHeight:i,fontFamily:l,clampFonts:c,onClick:u,styles:d,helpUrl:p})=>(0,Cn.jsx)(Sn.BaseControl,{id:`code-block-pro-theme-${e}`,label:n===e?(0,o.sprintf)((0,o.__)("%s (current)","code-block-pro"),t):t,children:(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(xr,{id:`code-block-pro-theme-${e}`,theme:e,lang:r,fontSize:a,lineHeight:i,fontFamily:l,clampFonts:c,styles:d,onClick:()=>{u(e)},code:s}),p?.url?(0,Cn.jsx)("div",{className:"mt-2",children:(0,Cn.jsx)(Sn.ExternalLink,{href:p.url,children:p?.text||(0,o.__)("Read more","code-block-pro")})}):null]})}),jr=({bringAttentionToThemes:e,attributes:t,setAttributes:n})=>{const{updateThemeHistory:r}=Ae(),[s,a]=(0,u.useState)(""),i=(()=>{const[e,t]=(0,u.useState)(br.persist.hasHydrated);return(0,u.useEffect)((()=>{const e=br.persist.onFinishHydration((()=>t(!0)));return()=>{e()}}),[]),e})();return(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Theme","code-block-pro"),initialOpen:null!=e&&e,children:[i&&(0,Cn.jsx)(vr,{search:s,setSearch:a}),i&&(0,Cn.jsx)(Sr,{...t,search:s,onClick:e=>{n({theme:e}),r({theme:e})}})]})},Nr=({attributes:e,setAttributes:t})=>{var n,r,s;const a=(0,u.useRef)(null);return(0,u.useEffect)((()=>{try{It(e.lineBlurs),a.current?.querySelector("input")?.classList.remove("cbp-input-error")}catch(e){console.error(e),a.current?.querySelector("input")?.classList.add("cbp-input-error")}}),[e.lineBlurs]),(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-show-blurring",children:[(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"enable-blur",label:(0,o.__)("Line blurring","code-block-pro"),help:(0,o.__)("Blur surrounding code to focus on specific lines.","code-block-pro"),checked:null!==(n=e.enableBlurring)&&void 0!==n&&n,onChange:e=>{t({enableBlurring:e})}}),e.enableBlurring&&(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-show-blurred-lines",children:[(0,Cn.jsx)("div",{ref:a,children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-show-blurred-lines",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Focus on the following","code-block-pro"),help:(0,o.sprintf)((0,o.__)("Try %1$s or %2$s for a range.","code-block-pro"),"1,5","1,[3,5]"),onChange:e=>{t({lineBlurs:e})},value:null!==(r=e?.lineBlurs)&&void 0!==r?r:""})}),(0,Cn.jsx)(Sn.CheckboxControl,{label:(0,o.__)("Remove blur on hover","code-block-pro"),checked:null!==(s=e.removeBlurOnHover)&&void 0!==s&&s,onChange:e=>{t({removeBlurOnHover:e})}})]})]})},wr=({attributes:e,setAttributes:t})=>{var n,r,s;const a=(0,u.useRef)(null);return(0,u.useEffect)((()=>{try{It(e.lineHighlights),a.current?.querySelector("input")?.classList.remove("cbp-input-error")}catch(e){console.error(e),a.current?.querySelector("input")?.classList.add("cbp-input-error")}}),[e.lineHighlights]),(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-show-highlighting",children:[(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"enable-highlighting",label:(0,o.__)("Line highlights","code-block-pro"),help:(0,o.__)("Highlight individual lines to bring attention to specific code.","code-block-pro"),checked:null!==(n=e.enableHighlighting)&&void 0!==n&&n,onChange:e=>{t({enableHighlighting:e})}}),e.enableHighlighting&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-show-highlighted-lines",children:(0,Cn.jsx)("div",{ref:a,children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-show-highlighted-lines",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Highlight the following","code-block-pro"),help:(0,o.sprintf)((0,o.__)("Try %1$s or %2$s for a range.","code-block-pro"),"1,5","1,[3,5]"),onChange:e=>{t({lineHighlights:e})},value:null!==(r=e?.lineHighlights)&&void 0!==r?r:""})})}),(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"enable-highlighting-hover",label:(0,o.__)("Line highlights on hover","code-block-pro"),help:(0,o.__)("Every line will be highlighted when hovered.","code-block-pro"),checked:null!==(s=e.highlightingHover)&&void 0!==s&&s,onChange:e=>{t({highlightingHover:e})}})]})},Lr=({attributes:e,setAttributes:t})=>{var n,r,s;const[i,l]=sr({attributes:e,setAttributes:t}),{recentLanguages:c}=Et(),{updateThemeHistory:d}=Ae(),{bringAttentionToPanel:p}=or(),{headerType:h,footerType:m}=e,g=new Map(Object.entries(Tt).sort(((e,t)=>e[1].localeCompare(t[1])))),f=ge(),b=["simpleStringEnd","simpleStringStart"],y=["simpleString","pillString","stringSmall"].includes(h),k=b.includes(null!=m?m:""),v=b.includes(null!=m?m:""),_=b.includes(null!=m?m:""),[x,S]=(0,u.useState)(!1),{openGeneralSidebar:C,closeGeneralSidebar:j}=(0,nr.useDispatch)(rr.store);return(0,u.useEffect)((()=>{p&&j("edit-post/block").then((()=>{S(p),C("edit-post/block")}))}),[p,j,C]),f?(0,Cn.jsxs)(a.InspectorControls,{children:[(0,Cn.jsx)(pr,{name:"CodeBlockPro.Sidebar.Start",attributes:e,setAttributes:t}),(0,Cn.jsx)(Sn.PanelBody,{title:(0,o.__)("Line Settings","code-block-pro"),initialOpen:!1,children:(0,Cn.jsxs)("div",{className:"code-block-pro-editor",children:[(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-show-line-numbers",children:[(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"show-line-numbers",label:(0,o.__)("Line numbers","code-block-pro"),help:(0,o.__)("Enable line numbers and set a starting number.","code-block-pro"),checked:e.lineNumbers,onChange:e=>{t({lineNumbers:e}),d({lineNumbers:e})}}),e.lineNumbers&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-line-number-start",children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-line-number-start",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Start from","code-block-pro"),onChange:e=>{t({startingLineNumber:e})},value:e.startingLineNumber})})]}),(0,Cn.jsx)(wr,{attributes:e,setAttributes:t}),(0,Cn.jsx)(Nr,{attributes:e,setAttributes:t})]})}),(0,Cn.jsx)(jr,{bringAttentionToThemes:"theme-select"===x,attributes:e,setAttributes:t}),(0,Cn.jsx)(Sn.PanelBody,{title:(0,o.__)("Language","code-block-pro"),initialOpen:"language-select"===x,children:(0,Cn.jsx)("div",{className:"code-block-pro-editor",children:(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-language",children:[(0,Cn.jsx)(Sn.SelectControl,{id:"code-block-pro-language",label:(0,o.__)("Code Language","code-block-pro"),"data-cy-cbp":"language-select",value:i,onChange:e=>l(e),help:"ansi"===i?(0,o.__)("Some code themes may not render ANSI correctly. Control sequences render only on the front.","code-block-pro"):null,options:[...g.entries()].map((([e,t])=>({label:t.replace("ANSI","ANSI (experimental)"),value:e})))}),c?.length>0?(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)("span",{className:"mb-2 block",children:(0,o.__)("Recently Used","code-block-pro")}),(0,Cn.jsx)("div",{className:"flex flex-col gap-1",children:c?.map((e=>{var t;return(0,Cn.jsx)(Sn.Button,{variant:"link",onClick:()=>l(e),children:null!==(t=Tt[e])&&void 0!==t?t:e},e)}))})]}):null]})})}),(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Header Type","code-block-pro"),initialOpen:!1,children:[y&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-header-text",children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-header-text",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Header Text","code-block-pro"),placeholder:Tt[i],onChange:e=>{t({headerString:e})},value:null!==(n=e.headerString)&&void 0!==n?n:""})}),(0,Cn.jsx)(Gn,{attributes:e,onClick:e=>{t({headerType:e}),d({headerType:e})}})]}),(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Footer Type","code-block-pro"),initialOpen:!1,children:[k&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-footer-text",children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-footer-text",spellCheck:!1,autoComplete:"off",label:(0,o.__)("Footer Text","code-block-pro"),placeholder:Tt[i],onChange:e=>{t({footerString:e})},value:null!==(r=e.footerString)&&void 0!==r?r:""})}),v&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-footer-link",children:(0,Cn.jsx)(Sn.TextControl,{id:"code-block-pro-footer-link",spellCheck:!1,type:"url",autoComplete:"off",label:(0,o.__)("Footer Link","code-block-pro"),placeholder:"https://example.com",help:(0,o.__)("Leave blank to disable","code-block-pro"),onChange:e=>{t({footerLink:e})},value:null!==(s=e.footerLink)&&void 0!==s?s:""})}),_&&(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-footer-link-target",children:(0,Cn.jsx)(Sn.CheckboxControl,{id:"code-block-pro-footer-link-target",label:(0,o.__)("Open in new tab?","code-block-pro"),checked:e.footerLinkTarget,onChange:e=>{t({footerLinkTarget:e}),d({footerLinkTarget:e})}})}),(0,Cn.jsx)(An,{attributes:e,onClick:e=>{t({footerType:e}),d({footerType:e})}})]}),(0,Cn.jsx)(pr,{name:"CodeBlockPro.Sidebar.Middle",attributes:e,setAttributes:t}),(0,Cn.jsx)(ir,{attributes:e,setAttributes:t}),(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Font Styling","code-block-pro"),initialOpen:!1,children:[(0,Cn.jsxs)("div",{className:"code-block-pro-editor","data-cy":"font-size-select",children:[(0,Cn.jsx)("h2",{className:"m-0",children:(0,o.__)("Font Size","code-block-pro")}),(0,Cn.jsx)(lr,{value:e.fontSize,onChange:e=>{t({fontSize:e}),d({fontSize:e})}})]}),(0,Cn.jsxs)("div",{className:"code-block-pro-editor","data-cy":"font-line-height-select",children:[(0,Cn.jsx)("h2",{className:"m-0",children:(0,o.__)("Line Height","code-block-pro")}),(0,Cn.jsx)(cr,{value:e.lineHeight,onChange:e=>{t({lineHeight:e}),d({lineHeight:e})}})]}),(0,Cn.jsx)("div",{className:"code-block-pro-editor","data-cy":"font-family-select",children:(0,Cn.jsx)(ur,{value:e.fontFamily,onChange:e=>{t({fontFamily:e}),d({fontFamily:e})}})}),(0,Cn.jsx)("div",{className:"code-block-pro-editor","data-cy":"clamp-fonts",children:(0,Cn.jsx)("div",{className:"mt-6",children:(0,Cn.jsx)(Sn.CheckboxControl,{label:(0,o.__)("Clamp Font Sizes","code-block-pro"),help:(0,o.__)("Check this if your font sizes are unusually large or tiny.","code-block-pro"),checked:e.clampFonts,onChange:e=>{t({clampFonts:e}),d({clampFonts:e})}})})})]}),(0,Cn.jsx)(dr,{attributes:e,setAttributes:t}),(0,Cn.jsxs)(Sn.PanelBody,{title:(0,o.__)("Extra Settings","code-block-pro"),initialOpen:!1,children:[(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-disable-padding",children:(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"disable-padding",label:(0,o.__)("Disable Padding","code-block-pro"),help:(0,o.__)("This is useful if you pick a theme that matches your background color, and want the code to line up to the edge of your content. You may need to add your own padding with CSS.","code-block-pro"),checked:e.disablePadding,onChange:e=>{t({disablePadding:e}),d({disablePadding:e})}})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-decode-uri",children:(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"use-decode-uri",label:(0,o.__)("Encode special characters","code-block-pro"),help:(0,o.__)("Select this to allow HTML entities such as &lt; and &gt; and others to be displayed. You may need to re-add the code after changing this","code-block-pro"),checked:e.useDecodeURI,onChange:e=>{t({useDecodeURI:e}),d({useDecodeURI:e})}})}),(0,Cn.jsx)(Sn.BaseControl,{id:"code-block-pro-escape-shortcodes",children:(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"use-escape-shortcodes",label:(0,o.__)("Escape WordPress shortcodes","code-block-pro"),help:(0,o.__)("Select this to prevent php shortcodes from executing.","code-block-pro"),checked:e.useEscapeShortCodes,onChange:e=>{t({useEscapeShortCodes:e}),d({useEscapeShortCodes:e})}})}),(0,Cn.jsxs)(Sn.BaseControl,{id:"code-block-pro-editor-tab-size",children:[(0,Cn.jsx)(Sn.TextControl,{spellCheck:!1,autoComplete:"off",type:"number","data-cy":"editor-tab-size",label:(0,o.__)("Editor tab size","code-block-pro"),help:(0,o.__)("The number of spaces to insert when pressing tab key.","code-block-pro"),value:e.tabSize,onChange:e=>{const n=e?Number(e):void 0;t({tabSize:n}),d({tabSize:n})}}),(0,Cn.jsx)(Sn.CheckboxControl,{"data-cy":"use-tabs",label:(0,o.__)("Use real tabs","code-block-pro"),help:(0,o.__)("Inserts an actual tab character instead of a space. The width defined above.","code-block-pro"),checked:e.useTabs,onChange:e=>{t({useTabs:e}),d({useTabs:e})}})]})]}),(0,Cn.jsx)(pr,{name:"CodeBlockPro.Sidebar.End",attributes:e,setAttributes:t})]}):(0,Cn.jsx)(a.InspectorControls,{children:f?null:(0,Cn.jsx)(jn,{})})},Pr=({attributes:e,setAttributes:t})=>{var n,r;const[i]=sr({attributes:e,setAttributes:t}),{theme:l,bgColor:u,textColor:d}=e,p=(0,s.applyFilters)("blocks.codeBlockPro.themes",c),{setBringAttentionToPanel:h}=or();return void 0===ge()?null:(0,Cn.jsxs)(a.BlockControls,{children:[(0,Cn.jsx)(Sn.ToolbarGroup,{className:"code-block-pro-editor",children:(0,Cn.jsx)(Sn.ToolbarButton,{icon:()=>{var e;return(null!==(e=Tt[i])&&void 0!==e?e:i)?.replace("ANSI","ANSI (experimental)")},onClick:()=>h("language-select"),label:(0,o.__)("Press to open sidebar panel","code-block-pro"),style:{width:"auto"}})}),p[l]?.name&&(0,Cn.jsx)(Sn.ToolbarGroup,{className:"code-block-pro-editor",children:(0,Cn.jsx)(Sn.ToolbarButton,{icon:()=>p[l]?.name,onClick:()=>h("theme-select"),label:(0,o.__)("Press to open sidebar panel","code-block-pro"),style:{width:"auto"},children:(0,Cn.jsxs)("span",{className:"flex mx-2",children:[(0,Cn.jsx)("span",{style:{backgroundColor:null!==(n=p[l]?.styles?.["color-background"])&&void 0!==n?n:u},className:"w-3 h-3 border border-gray-400 border-solid border-1 rounded-full inline-block"}),(0,Cn.jsx)("span",{style:{backgroundColor:null!==(r=p[l]?.styles?.["color-text"])&&void 0!==r?r:d},className:"w-3 h-3 border border-gray-400 border-solid border-1 rounded-full inline-block transform -translate-x-1"})]})})})]})},Tr=({attributes:e,setAttributes:t})=>{const{clampFonts:n,disablePadding:r,enableBlurring:o,enableHighlighting:i,footerType:u,fontSize:d,fontFamily:p,highestLineNumber:h,highlightingHover:m,lineHeight:g,lineHighlightColor:f,lineNumbers:b,lineNumbersWidth:y,removeBlurOnHover:k,startingLineNumber:v,tabSize:_,theme:x,useTabs:S}=e,C=(0,s.applyFilters)("blocks.codeBlockPro.themes",c),j=C[x]?.styles;return(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)(Lr,{attributes:e,setAttributes:t}),(0,Cn.jsx)(Pr,{attributes:e,setAttributes:t}),(0,Cn.jsxs)("div",{...(0,a.useBlockProps)({className:l()("code-block-pro-editor",{"padding-disabled":r,"padding-bottom-disabled":u&&"none"!==u,"cbp-has-line-numbers":b,"cbp-blur-enabled":o,"cbp-unblur-on-hover":k,"cbp-highlight-hover":m}),style:{fontSize:xn(d,n),"--cbp-line-number-color":b?bn(e):void 0,"--cbp-line-number-start":Number(v)>1?v:void 0,"--cbp-line-number-width":h?`calc(${String(h).length} * ${d})`:y?`${y}px`:void 0,"--cbp-line-highlight-color":i||m?f:void 0,"--cbp-line-height":g,tabSize:void 0===S?void 0:_,fontFamily:vn(p),lineHeight:xn(g,n),...Object.entries(null!=j?j:{}).reduce(((e,[t,n])=>({...e,[`--shiki-${t}`]:n})),{}),...(0,s.applyFilters)("blocks.codeBlockPro.additionalEditorAttributes",{},e)}}),children:[(0,Cn.jsx)($n,{...e}),(0,Cn.jsx)(tr,{...e}),(0,Cn.jsx)(Nn,{attributes:e,setAttributes:t}),(0,Cn.jsx)(Rn,{...e}),(0,Cn.jsx)(Vn,{...e})]})]})},Ar=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"kevinbatdorf/code-block-pro","version":"1.13.0","title":"Code Block Pro - Beautiful syntax highlighting","category":"common","description":"Code highlighting powered by the VS Code engine. No overhead.","attributes":{"code":{"type":"string"},"codeHTML":{"type":"string"},"language":{"type":"string"},"theme":{"type":"string"},"align":{"type":"string"},"bgColor":{"type":"string","default":"#282a37"},"textColor":{"type":"string","default":"#f8f8f2"},"fontSize":{"type":"string"},"fontFamily":{"type":"string"},"lineHeight":{"type":"string"},"lineNumbers":{"type":"boolean"},"clampFonts":{"type":"boolean"},"editorHeight":{"type":"string"},"headerType":{"type":"string"},"footerType":{"type":"string"},"headerString":{"type":"string"},"disablePadding":{"type":"boolean"},"footerString":{"type":"string"},"footerLink":{"type":"string"},"enableMaxHeight":{"type":"boolean"},"seeMoreType":{"type":"string"},"seeMoreString":{"type":"string"},"seeMoreAfterLine":{"type":"string"},"seeMoreTransition":{"type":"boolean"},"seeMoreCollapse":{"type":"boolean"},"seeMoreCollapseString":{"type":"string"},"footerLinkTarget":{"type":"boolean"},"startingLineNumber":{"type":"number","default":1},"lineNumbersWidth":{"type":"number"},"enableHighlighting":{"type":"boolean"},"highlightingHover":{"type":"boolean"},"lineHighlights":{"type":"string"},"lineHighlightColor":{"type":"string"},"enableBlurring":{"type":"boolean"},"lineBlurs":{"type":"string"},"removeBlurOnHover":{"type":"boolean"},"frame":{"type":"boolean"},"renderType":{"type":"string","default":"code"},"label":{"type":"string","default":""},"copyButton":{"type":"boolean"},"copyButtonType":{"type":"string"},"copyButtonString":{"type":"string"},"copyButtonStringCopied":{"type":"string"},"copyButtonUseTextarea":{"type":"boolean","default":false},"tabSize":{"type":"number"},"useTabs":{"type":"boolean"}},"supports":{"html":false,"align":["wide","full"]},"textdomain":"code-block-pro","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./front/front.js"}'),Rr=()=>(0,Cn.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:24,height:24},fill:"none",viewBox:"0 0 24 24",stroke:"#1e1e1e",strokeWidth:"2",children:(0,Cn.jsx)("path",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),Br=({attributes:e})=>{const{clampFonts:t,code:n,codeHTML:r,disablePadding:o,enableBlurring:i,enableHighlighting:u,footerType:d,fontSize:p,fontFamily:h,highestLineNumber:m,highlightingHover:g,lineHeight:f,lineHighlightColor:b,lineNumbers:y,lineNumbersWidth:k,removeBlurOnHover:v,startingLineNumber:_,tabSize:x,theme:S,useTabs:C}=e,j=(0,s.applyFilters)("blocks.codeBlockPro.themes",c),N=j[S]?.styles;return(0,Cn.jsx)("div",{...a.useBlockProps.save({className:l()({"padding-disabled":o,"padding-bottom-disabled":d&&"none"!==d,"cbp-has-line-numbers":y,"cbp-blur-enabled":i,"cbp-unblur-on-hover":v,"cbp-highlight-hover":g})}),"data-code-block-pro-font-family":h,style:{fontSize:xn(p,t),fontFamily:vn(h),"--cbp-line-number-color":y?bn(e):void 0,"--cbp-line-number-start":Number(_)>1?_:void 0,"--cbp-line-number-width":m?`calc(${String(m).length} * ${(e=>"Code-Pro-Fantasque-Sans-Mono"===e?.5:.6)(h)} * ${p})`:k?`${k}px`:void 0,"--cbp-line-highlight-color":u||g?b:void 0,lineHeight:xn(f,t),"--cbp-tab-width":void 0===C?void 0:String(x),tabSize:void 0===C?void 0:"var(--cbp-tab-width, 2)",...Object.entries(null!=N?N:{}).reduce(((e,[t,n])=>({...e,[`--shiki-${t}`]:n})),{}),...(0,s.applyFilters)("blocks.codeBlockPro.additionalOutputAttributes",{},e)},children:n?.length>0?(0,Cn.jsxs)(Cn.Fragment,{children:[(0,Cn.jsx)($n,{...e}),(0,Cn.jsx)(tr,{...e}),(0,Cn.jsx)(a.RichText.Content,{value:r}),(0,Cn.jsx)(Rn,{...e}),(0,Cn.jsx)(Vn,{...e})]}):null})};(0,r.registerBlockType)(Ar.name,{...Ar,icon:Rr,attributes:{code:{type:"string"},codeHTML:{type:"string"},language:{type:"string"},theme:{type:"string"},align:{type:"string"},bgColor:{type:"string",default:"#282a37"},textColor:{type:"string",default:"#f8f8f2"},fontSize:{type:"string"},fontFamily:{type:"string"},lineHeight:{type:"string"},clampFonts:{type:"boolean"},editorHeight:{type:"string"},lineNumbers:{type:"boolean"},headerType:{type:"string"},headerString:{type:"string"},disablePadding:{type:"boolean"},footerType:{type:"string"},footerString:{type:"string"},footerLink:{type:"string"},footerLinkTarget:{type:"boolean"},enableMaxHeight:{type:"boolean"},seeMoreType:{type:"string"},seeMoreString:{type:"string"},seeMoreAfterLine:{type:"string"},seeMoreTransition:{type:"boolean"},seeMoreCollapse:{type:"boolean"},seeMoreCollapseString:{type:"string"},startingLineNumber:{type:"string"},lineNumbersWidth:{type:"number"},highestLineNumber:{type:"number"},enableHighlighting:{type:"boolean"},highlightingHover:{type:"boolean"},lineHighlights:{type:"string"},lineHighlightColor:{type:"string"},enableBlurring:{type:"boolean"},lineBlurs:{type:"string"},removeBlurOnHover:{type:"boolean"},frame:{type:"boolean"},renderType:{type:"string",default:"code"},label:{type:"string",default:""},copyButton:{type:"boolean"},copyButtonType:{type:"string"},copyButtonString:{type:"string",default:(0,o.__)("Copy","code-block-pro")},copyButtonStringCopied:{type:"string",default:(0,o.__)("Copied!","code-block-pro")},copyButtonUseTextarea:{type:"boolean",default:!1},useDecodeURI:{type:"boolean",default:!1},useEscapeShortCodes:{type:"boolean",default:!1},tabSize:{type:"number",default:2},useTabs:{type:"boolean"}},supports:{html:!1,align:["wide","full"]},title:(0,o.__)("Code Pro","code-block-pro"),edit:({attributes:e,setAttributes:t})=>(0,Cn.jsx)(Tr,{attributes:e,setAttributes:t}),save:({attributes:e})=>(0,Cn.jsx)(Br,{attributes:e}),transforms:{from:[{type:"block",blocks:["core/code","syntaxhighlighter/code"],transform:e=>{const{content:t,language:n}=e;return(0,r.createBlock)(Ar.name,{code:t?(0,Ft.escapeHTML)((e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value})(t)):void 0,language:Pt(n)})}}],to:[{type:"block",blocks:["core/code"],transform:e=>{const{code:t}=e;return(0,r.createBlock)("core/code",{content:t})}}]}}),(0,s.addFilter)("editor.BlockEdit",Ar.name,(e=>t=>((e,t)=>{const{attributes:n,clientId:s}=t,{previousLanguage:i}=Et(),l=(0,nr.useSelect)((e=>{const t=e(a.store).getBlock(s);return["core/code","syntaxhighlighter/code"].includes(t.name)}),[s]),{replaceBlock:c}=(0,nr.useDispatch)(a.store),u=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value};return l?(0,Cn.jsxs)(Cn.Fragment,{children:[e&&(0,Cn.jsx)(e,{...t}),(0,Cn.jsx)(a.BlockControls,{children:(0,Cn.jsx)(Sn.ToolbarGroup,{children:(0,Cn.jsx)(Sn.ToolbarButton,{icon:Rr,label:(0,o.__)("Convert to Code Pro","code-block-pro"),onClick:()=>{var e;const t=(0,r.createBlock)(Ar.name,{code:n?.content?u(n.content):void 0,language:null!==(e=Pt(n?.language))&&void 0!==e?e:i});c(s,[t])}})})})]}):(0,Cn.jsx)(e,{...t})})(e,t)))},485:()=>{},486:function(e){var t;t=()=>{return e={770:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultDebugCall=t.createOnigScanner=t.createOnigString=t.loadWASM=t.OnigScanner=t.OnigString=void 0;const s=r(n(418));let o=null,a=!1;class i{static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){const s=e.charCodeAt(n);let o=s,a=!1;if(s>=55296&&s<=56319&&n+1<r){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(o=65536+(s-55296<<10)|t-56320,a=!0)}t+=o<=127?1:o<=2047?2:o<=65535?3:4,a&&n++}return t}constructor(e){const t=e.length,n=i._utf8ByteLength(e),r=n!==t,s=r?new Uint32Array(t+1):null;r&&(s[t]=n);const o=r?new Uint32Array(n+1):null;r&&(o[n]=t);const a=new Uint8Array(n);let l=0;for(let n=0;n<t;n++){const i=e.charCodeAt(n);let c=i,u=!1;if(i>=55296&&i<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=65536+(i-55296<<10)|t-56320,u=!0)}r&&(s[n]=l,u&&(s[n+1]=l),c<=127?o[l+0]=n:c<=2047?(o[l+0]=n,o[l+1]=n):c<=65535?(o[l+0]=n,o[l+1]=n,o[l+2]=n):(o[l+0]=n,o[l+1]=n,o[l+2]=n,o[l+3]=n)),c<=127?a[l++]=c:c<=2047?(a[l++]=192|(1984&c)>>>6,a[l++]=128|(63&c)>>>0):c<=65535?(a[l++]=224|(61440&c)>>>12,a[l++]=128|(4032&c)>>>6,a[l++]=128|(63&c)>>>0):(a[l++]=240|(1835008&c)>>>18,a[l++]=128|(258048&c)>>>12,a[l++]=128|(4032&c)>>>6,a[l++]=128|(63&c)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class l{constructor(e){if(this.id=++l.LAST_ID,!o)throw new Error("Must invoke loadWASM first.");this._onigBinding=o,this.content=e;const t=new i(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!l._sharedPtrInUse?(l._sharedPtr||(l._sharedPtr=o._omalloc(1e4)),l._sharedPtrInUse=!0,o.HEAPU8.set(t.utf8Value,l._sharedPtr),this.ptr=l._sharedPtr):this.ptr=t.createString(o)}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===l._sharedPtr?l._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}t.OnigString=l,l.LAST_ID=0,l._sharedPtr=0,l._sharedPtrInUse=!1;class c{constructor(e){if(!o)throw new Error("Must invoke loadWASM first.");const t=[],n=[];for(let r=0,s=e.length;r<s;r++){const s=new i(e[r]);t[r]=s.createString(o),n[r]=s.utf8Length}const r=o._omalloc(4*e.length);o.HEAPU32.set(t,r/4);const s=o._omalloc(4*e.length);o.HEAPU32.set(n,s/4);const a=o._createOnigScanner(r,s,e.length);for(let n=0,r=e.length;n<r;n++)o._ofree(t[n]);o._ofree(s),o._ofree(r),0===a&&function(e){throw new Error(e.UTF8ToString(e._getLastOnigError()))}(o),this._onigBinding=o,this._ptr=a}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=a,s=0;if("number"==typeof n?(8&n&&(r=!0),s=n):"boolean"==typeof n&&(r=n),"string"==typeof e){e=new l(e);const n=this._findNextMatchSync(e,t,r,s);return e.dispose(),n}return this._findNextMatchSync(e,t,r,s)}_findNextMatchSync(e,t,n,r){const s=this._onigBinding;let o;if(o=n?s._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r):s._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r),0===o)return null;const a=s.HEAPU32;let i=o/4;const l=a[i++],c=a[i++];let u=[];for(let t=0;t<c;t++){const n=e.convertUtf8OffsetToUtf16(a[i++]),r=e.convertUtf8OffsetToUtf16(a[i++]);u[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:u}}}t.OnigScanner=c;let u=!1,d=null;t.loadWASM=function(e){if(u)return d;let t,n,r,a;if(u=!0,function(e){return"function"==typeof e.instantiator}(e))t=e.instantiator,n=e.print;else{let r;!function(e){return void 0!==e.data}(e)?r=e:(r=e.data,n=e.print),t=function(e){return"undefined"!=typeof Response&&e instanceof Response}(r)?"function"==typeof WebAssembly.instantiateStreaming?function(e){return t=>WebAssembly.instantiateStreaming(e,t)}(r):function(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(r):function(e){return t=>WebAssembly.instantiate(e,t)}(r)}return d=new Promise(((e,t)=>{r=e,a=t})),function(e,t,n,r){(0,s.default)({print:t,instantiateWasm:(t,n)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>n(e.instance)),r),{}}}).then((e=>{o=e,n()}))}(t,n,r,a),d},t.createOnigString=function(e){return new l(e)},t.createOnigScanner=function(e){return new c(e)},t.setDefaultDebugCall=function(e){a=e}},418:e=>{var t=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,n,r=void 0!==(e=e||{})?e:{};r.ready=new Promise((function(e,r){t=e,n=r}));var s,o=Object.assign({},r),a=[];s=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),function(e){e||L(void 0)}("object"==typeof t),t)},"undefined"!=typeof scriptArgs?a=scriptArgs:void 0!==arguments&&(a=arguments),"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print);var i,l,c=r.print||console.log.bind(console),u=r.printErr||console.warn.bind(console);Object.assign(r,o),o=null,r.arguments&&(a=r.arguments),r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(i=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&L("no native wasm support detected");var d,p,h,m=!1,g="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function f(e,t,n){for(var r=t+n,s=t;e[s]&&!(s>=r);)++s;if(s-t>16&&e.buffer&&g)return g.decode(e.subarray(t,s));for(var o="";t<s;){var a=e[t++];if(128&a){var i=63&e[t++];if(192!=(224&a)){var l=63&e[t++];if((a=224==(240&a)?(15&a)<<12|i<<6|l:(7&a)<<18|i<<12|l<<6|63&e[t++])<65536)o+=String.fromCharCode(a);else{var c=a-65536;o+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|i)}else o+=String.fromCharCode(a)}return o}function b(e){d=e,r.HEAP8=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU8=p=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=h=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}r.INITIAL_MEMORY;var y=[],k=[],v=[];function _(e){y.unshift(e)}function x(e){v.unshift(e)}var S,C,j=0,N=null,w=null;function L(e){r.onAbort&&r.onAbort(e),u(e="Aborted("+e+")"),m=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}function P(e){return e.startsWith("data:application/octet-stream;base64,")}function T(e){try{if(e==S&&i)return new Uint8Array(i);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}catch(e){L(e)}}function A(e){for(;e.length>0;)e.shift()(r)}function R(e){try{return l.grow(e-d.byteLength+65535>>>16),b(l.buffer),1}catch(e){}}P(S="onig.wasm")||(S=function(e){return r.locateFile?r.locateFile(e,""):""+e}(S)),C="undefined"!=typeof dateNow?dateNow:()=>performance.now();var B=[null,[],[]];function O(e,t){var n=B[e];0===t||10===t?((1===e?c:u)(f(n,0)),n.length=0):n.push(t)}var E,M={emscripten_get_now:C,emscripten_memcpy_big:function(e,t,n){p.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){var t,n=p.length,r=2147483648;if((e>>>=0)>r)return!1;for(var s=1;s<=4;s*=2){var o=n*(1+.2/s);if(o=Math.min(o,e+100663296),R(Math.min(r,(t=Math.max(e,o))+(65536-t%65536)%65536)))return!0}return!1},fd_write:function(e,t,n,r){for(var s=0,o=0;o<n;o++){var a=h[t>>2],i=h[t+4>>2];t+=8;for(var l=0;l<i;l++)O(e,p[a+l]);s+=i}return h[r>>2]=s,0}};function I(e){function n(){E||(E=!0,r.calledRun=!0,m||(A(k),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)x(r.postRun.shift());A(v)}()))}e=e||a,j>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)_(r.preRun.shift());A(y)}(),j>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),n()}),1)):n()))}if(function(){var e={env:M,wasi_snapshot_preview1:M};function t(e,t){var n=e.exports;r.asm=n,b((l=r.asm.memory).buffer),r.asm.__indirect_function_table,function(e){k.unshift(e)}(r.asm.__wasm_call_ctors),function(){if(j--,r.monitorRunDependencies&&r.monitorRunDependencies(j),0==j&&(null!==N&&(clearInterval(N),N=null),w)){var e=w;w=null,e()}}()}function s(e){t(e.instance)}function o(t){return Promise.resolve().then((function(){return T(S)})).then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){u("failed to asynchronously prepare wasm: "+e),L(e)}))}if(j++,r.monitorRunDependencies&&r.monitorRunDependencies(j),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){u("Module.instantiateWasm callback failed with error: "+e),n(e)}(i||"function"!=typeof WebAssembly.instantiateStreaming||P(S)||"function"!=typeof fetch?o(s):fetch(S,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(s,(function(e){return u("wasm streaming compile failed: "+e),u("falling back to ArrayBuffer instantiation"),o(s)}))}))).catch(n)}(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r.___errno_location=function(){return(r.___errno_location=r.asm.__errno_location).apply(null,arguments)},r._omalloc=function(){return(r._omalloc=r.asm.omalloc).apply(null,arguments)},r._ofree=function(){return(r._ofree=r.asm.ofree).apply(null,arguments)},r._getLastOnigError=function(){return(r._getLastOnigError=r.asm.getLastOnigError).apply(null,arguments)},r._createOnigScanner=function(){return(r._createOnigScanner=r.asm.createOnigScanner).apply(null,arguments)},r._freeOnigScanner=function(){return(r._freeOnigScanner=r.asm.freeOnigScanner).apply(null,arguments)},r._findNextOnigScannerMatch=function(){return(r._findNextOnigScannerMatch=r.asm.findNextOnigScannerMatch).apply(null,arguments)},r._findNextOnigScannerMatchDbg=function(){return(r._findNextOnigScannerMatchDbg=r.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},r.stackSave=function(){return(r.stackSave=r.asm.stackSave).apply(null,arguments)},r.stackRestore=function(){return(r.stackRestore=r.asm.stackRestore).apply(null,arguments)},r.stackAlloc=function(){return(r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r.UTF8ToString=function(e,t){return e?f(p,e,t):""},w=function e(){E||I(),E||(w=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return I(),e.ready});e.exports=t}},t={},function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}(770);var e,t},e.exports=t()},493:(e,t,n)=>{"use strict";var r=n(609),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,a=r.useEffect,i=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!s(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),s=r[0].inst,u=r[1];return i((function(){s.value=n,s.getSnapshot=t,c(s)&&u({inst:s})}),[e,n,t]),a((function(){return c(s)&&u({inst:s}),e((function(){c(s)&&u({inst:s})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},609:e=>{"use strict";e.exports=window.React},673:()=>{},888:(e,t,n)=>{"use strict";e.exports=n(493)},942:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function s(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return s.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=a(t,n));return t}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(s.default=s,e.exports=s):void 0===(n=function(){return s}.apply(t,[]))||(e.exports=n)}()}},n={};function r(e){var s=n[e];if(void 0!==s)return s.exports;var o=n[e]={exports:{}};return t[e].call(o.exports,o,o.exports,r),o.exports}r.m=t,e=[],r.O=(t,n,s,o)=>{if(!n){var a=1/0;for(u=0;u<e.length;u++){for(var[n,s,o]=e[u],i=!0,l=0;l<n.length;l++)(!1&o||a>=o)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(i=!1,o<a&&(a=o));if(i){e.splice(u--,1);var c=s();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,s,o]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={57:0,350:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var s,o,[a,i,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(s in i)r.o(i,s)&&(r.m[s]=i[s]);if(l)var u=l(r)}for(t&&t(n);c<a.length;c++)o=a[c],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return r.O(u)},n=globalThis.webpackChunkcode_block_pro=globalThis.webpackChunkcode_block_pro||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var s=r.O(void 0,[350],(()=>r(347)));s=r.O(s)})();
1 +(()=>{var e,t={11:(e,t,n)=>{"use strict";const r=window.wp.element,o=window.wp.blockEditor,a=window.wp.blocks,s=window.wp.hooks,i=window.wp.i18n;var l=n(184),c=n.n(l);const u=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"kevinbatdorf/code-block-pro","version":"1.13.0","title":"Code Block Pro - Beautiful syntax highlighting","category":"common","description":"Code highlighting powered by the VS Code engine. No overhead.","attributes":{"code":{"type":"string"},"codeHTML":{"type":"string"},"language":{"type":"string"},"theme":{"type":"string"},"align":{"type":"string"},"bgColor":{"type":"string","default":"#282a37"},"textColor":{"type":"string","default":"#f8f8f2"},"fontSize":{"type":"string"},"fontFamily":{"type":"string"},"lineHeight":{"type":"string"},"lineNumbers":{"type":"boolean"},"clampFonts":{"type":"boolean"},"editorHeight":{"type":"string"},"headerType":{"type":"string"},"footerType":{"type":"string"},"headerString":{"type":"string"},"disablePadding":{"type":"boolean"},"footerString":{"type":"string"},"footerLink":{"type":"string"},"enableMaxHeight":{"type":"boolean"},"seeMoreType":{"type":"string"},"seeMoreString":{"type":"string"},"seeMoreAfterLine":{"type":"string"},"seeMoreTransition":{"type":"boolean"},"footerLinkTarget":{"type":"boolean"},"startingLineNumber":{"type":"number","default":1},"lineNumbersWidth":{"type":"number"},"enableHighlighting":{"type":"boolean"},"lineHighlights":{"type":"string"},"lineHighlightColor":{"type":"string"},"enableBlurring":{"type":"boolean"},"lineBlurs":{"type":"string"},"removeBlurOnHover":{"type":"boolean"},"frame":{"type":"boolean"},"renderType":{"type":"string","default":"code"},"label":{"type":"string","default":""},"copyButton":{"type":"boolean"}},"supports":{"html":false,"align":["wide","full"]},"textdomain":"code-block-pro","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css","viewScript":"file:./front/front.js"}'),d=window.wp.escapeHtml,p=window.wp.htmlEntities;var h={grad:.9,turn:360,rad:360/(2*Math.PI)},g=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},m=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},f=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},b=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},y=function(e){return{r:f(e.r,0,255),g:f(e.g,0,255),b:f(e.b,0,255),a:f(e.a)}},v=function(e){return{r:m(e.r),g:m(e.g),b:m(e.b),a:m(e.a,3)}},_=/^#([0-9a-f]{3,8})$/i,k=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},S=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),i=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:60*(i<0?i+6:i),s:a?s/a*100:0,v:a/255*100,a:o}},C=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),i=r*(1-(t-a)*n),l=r*(1-(1-t+a)*n),c=a%6;return{r:255*[r,i,s,s,l,r][c],g:255*[l,r,r,i,s,s][c],b:255*[s,s,l,r,r,i][c],a:o}},w=function(e){return{h:b(e.h),s:f(e.s,0,100),l:f(e.l,0,100),a:f(e.a)}},x=function(e){return{h:m(e.h),s:m(e.s),l:m(e.l),a:m(e.a,3)}},E=function(e){return C((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},L=function(e){return{h:(t=S(e)).h,s:(o=(200-(n=t.s))*(r=t.v)/100)>0&&o<200?n*r/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,r,o},N=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,T=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,j=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,P=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,A={string:[[function(e){var t=_.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?m(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?m(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=j.exec(e)||P.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:y({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=N.exec(e)||T.exec(e);if(!t)return null;var n,r,o=w({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(h[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return E(o)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=void 0===o?1:o;return g(t)&&g(n)&&g(r)?y({r:Number(t),g:Number(n),b:Number(r),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,o=e.a,a=void 0===o?1:o;if(!g(t)||!g(n)||!g(r))return null;var s=w({h:Number(t),s:Number(n),l:Number(r),a:Number(a)});return E(s)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,o=e.a,a=void 0===o?1:o;if(!g(t)||!g(n)||!g(r))return null;var s=function(e){return{h:b(e.h),s:f(e.s,0,100),v:f(e.v,0,100),a:f(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(a)});return C(s)},"hsv"]]},O=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},R=function(e,t){var n=L(e);return{h:n.h,s:f(n.s+100*t,0,100),l:n.l,a:n.a}},I=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},B=function(e,t){var n=L(e);return{h:n.h,s:n.s,l:f(n.l+100*t,0,100),a:n.a}},M=function(){function e(e){this.parsed=function(e){return"string"==typeof e?O(e.trim(),A.string):"object"==typeof e&&null!==e?O(e,A.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return m(I(this.rgba),2)},e.prototype.isDark=function(){return I(this.rgba)<.5},e.prototype.isLight=function(){return I(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=v(this.rgba)).r,n=e.g,r=e.b,a=(o=e.a)<1?k(m(255*o)):"","#"+k(t)+k(n)+k(r)+a;var e,t,n,r,o,a},e.prototype.toRgb=function(){return v(this.rgba)},e.prototype.toRgbString=function(){return t=(e=v(this.rgba)).r,n=e.g,r=e.b,(o=e.a)<1?"rgba("+t+", "+n+", "+r+", "+o+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,o},e.prototype.toHsl=function(){return x(L(this.rgba))},e.prototype.toHslString=function(){return t=(e=x(L(this.rgba))).h,n=e.s,r=e.l,(o=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+o+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,o},e.prototype.toHsv=function(){return e=S(this.rgba),{h:m(e.h),s:m(e.s),v:m(e.v),a:m(e.a,3)};var e},e.prototype.invert=function(){return F({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),F(R(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),F(R(this.rgba,-e))},e.prototype.grayscale=function(){return F(R(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),F(B(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),F(B(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?F({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):m(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=L(this.rgba);return"number"==typeof e?F({h:e,s:t.s,l:t.l,a:t.a}):m(t.h)},e.prototype.isEqual=function(e){return this.toHex()===F(e).toHex()},e}(),F=function(e){return e instanceof M?e:new M(e)},D=n(460),H=n.n(D);const G=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,a={setState:r,getState:o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The destroy method will be unsupported in the future version. You should use unsubscribe function returned by subscribe. Everything will be garbage collected if store is garbage collected."),n.clear()}};return t=e(r,o,a),a};var $=n(196),W=n(798);const{useSyncExternalStoreWithSelector:z}=W,U=e=>{"function"!=typeof e&&console.warn('[DEPRECATED] Passing a vanilla store will be unsupported in the future version. Please use `import { useStore } from "zustand"` to use the vanilla store in React.');const t="function"==typeof e?(e=>e?G(e):G)(e):e,n=(e,n)=>function(e,t=e.getState,n){const r=z(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return(0,$.useDebugValue)(r),r}(t,e,n);return Object.assign(n,t),n};var q=e=>(console.warn("[DEPRECATED] default export is deprecated, instead import { create } from'zustand'"),(e=>e?U(e):U)(e));const V=new Map,K=e=>{const t=V.get(e);return t?Object.fromEntries(Object.entries(t.stores).map((([e,t])=>[e,t.getState()]))):{}},J=(e,t={})=>(n,r,o)=>{const{enabled:a,anonymousActionType:s,store:i,...l}=t;let c;try{c=(null==a||a)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(e){}if(!c)return a&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,o);const{connection:u,...d}=((e,t,n)=>{if(void 0===e)return{type:"untracked",connection:t.connect(n)};const r=V.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return V.set(n.name,o),{type:"tracked",store:e,...o}})(i,c,l);let p=!0;o.setState=(e,t,a)=>{const c=n(e,t);if(!p)return c;const d=void 0===a?{type:s||"anonymous"}:"string"==typeof a?{type:a}:a;return void 0===i?(null==u||u.send(d,r()),c):(null==u||u.send({...d,type:`${i}/${d.type}`},{...K(l.name),[i]:o.getState()}),c)};const h=(...e)=>{const t=p;p=!1,n(...e),p=t},g=e(o.setState,r,o);if("untracked"===d.type?null==u||u.init(g):(d.stores[d.store]=o,null==u||u.init(Object.fromEntries(Object.entries(d.stores).map((([e,t])=>[e,e===d.store?g:t.getState()]))))),o.dispatchFromDevtools&&"function"==typeof o.dispatch){let e=!1;const t=o.dispatch;o.dispatch=(...n)=>{"__setState"!==n[0].type||e||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),e=!0),t(...n)}}return u.subscribe((e=>{var t;switch(e.type){case"ACTION":return"string"!=typeof e.payload?void console.error("[zustand devtools middleware] Unsupported action format"):Q(e.payload,(e=>{if("__setState"!==e.type)o.dispatchFromDevtools&&"function"==typeof o.dispatch&&o.dispatch(e);else{if(void 0===i)return void h(e.state);1!==Object.keys(e.state).length&&console.error('\n [zustand devtools middleware] Unsupported __setState action format. \n When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n ');const t=e.state[i];if(null==t)return;JSON.stringify(o.getState())!==JSON.stringify(t)&&h(t)}}));case"DISPATCH":switch(e.payload.type){case"RESET":return h(g),void 0===i?null==u?void 0:u.init(o.getState()):null==u?void 0:u.init(K(l.name));case"COMMIT":return void 0===i?void(null==u||u.init(o.getState())):null==u?void 0:u.init(K(l.name));case"ROLLBACK":return Q(e.state,(e=>{if(void 0===i)return h(e),void(null==u||u.init(o.getState()));h(e[i]),null==u||u.init(K(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Q(e.state,(e=>{void 0!==i?JSON.stringify(o.getState())!==JSON.stringify(e[i])&&h(e[i]):h(e)}));case"IMPORT_STATE":{const{nextLiftedState:n}=e.payload,r=null==(t=n.computedStates.slice(-1)[0])?void 0:t.state;if(!r)return;return h(void 0===i?r:r[i]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return p=!p}return}})),g},Q=(e,t)=>{let n;try{n=JSON.parse(e)}catch(e){console.error("[zustand devtools middleware] Could not parse the received json",e)}void 0!==n&&t(n)};function X(e){let t;try{t=e()}catch(e){return}const n={getItem:e=>{var n;const r=e=>null===e?null:JSON.parse(e),o=null!=(n=t.getItem(e))?n:null;return o instanceof Promise?o.then(r):r(o)},setItem:(e,n)=>t.setItem(e,JSON.stringify(n)),removeItem:e=>t.removeItem(e)};return n}const Y=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then:e=>Y(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>Y(t)(e)}}},Z=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Please use `storage` option instead."),((e,t)=>(n,r,o)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const i=new Set,l=new Set;let c;try{c=a.getStorage()}catch(e){}if(!c)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const u=Y(a.serialize),d=()=>{const e=a.partialize({...r()});let t;const n=u({state:e,version:a.version}).then((e=>c.setItem(a.name,e))).catch((e=>{t=e}));if(t)throw t;return n},p=o.setState;o.setState=(e,t)=>{p(e,t),d()};const h=e(((...e)=>{n(...e),d()}),r,o);let g;const m=()=>{var e;if(!c)return;s=!1,i.forEach((e=>e(r())));const t=(null==(e=a.onRehydrateStorage)?void 0:e.call(a,r()))||void 0;return Y(c.getItem.bind(c))(a.name).then((e=>{if(e)return a.deserialize(e)})).then((e=>{if(e){if("number"!=typeof e.version||e.version===a.version)return e.state;if(a.migrate)return a.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return g=a.merge(e,null!=(t=r())?t:h),n(g,!0),d()})).then((()=>{null==t||t(g,void 0),s=!0,l.forEach((e=>e(g)))})).catch((e=>{null==t||t(void 0,e)}))};return o.persist={setOptions:e=>{a={...a,...e},e.getStorage&&(c=e.getStorage())},clearStorage:()=>{null==c||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:e=>(i.add(e),()=>{i.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},m(),g||h})(e,t)):((e,t)=>(n,r,o)=>{let a={storage:X((()=>localStorage)),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1;const i=new Set,l=new Set;let c=a.storage;if(!c)return e(((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)}),r,o);const u=()=>{const e=a.partialize({...r()});return c.setItem(a.name,{state:e,version:a.version})},d=o.setState;o.setState=(e,t)=>{d(e,t),u()};const p=e(((...e)=>{n(...e),u()}),r,o);let h;const g=()=>{var e;if(!c)return;s=!1,i.forEach((e=>e(r())));const t=(null==(e=a.onRehydrateStorage)?void 0:e.call(a,r()))||void 0;return Y(c.getItem.bind(c))(a.name).then((e=>{if(e){if("number"!=typeof e.version||e.version===a.version)return e.state;if(a.migrate)return a.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((e=>{var t;return h=a.merge(e,null!=(t=r())?t:p),n(h,!0),u()})).then((()=>{null==t||t(h,void 0),s=!0,l.forEach((e=>e(h)))})).catch((e=>{null==t||t(void 0,e)}))};return o.persist={setOptions:e=>{a={...a,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>g(),hasHydrated:()=>s,onHydrate:e=>(i.add(e),()=>{i.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},g(),h||p})(e,t),ee=q()(Z(J((e=>({previousSettings:{copyButton:!0},setPreviousSettings(t){e((e=>({previousSettings:{...e.previousSettings,...t}})))}})),{name:"Code Block Pro Globals"}),{name:"code-block-pro-last-globals",getStorage:()=>localStorage,partialize:e=>{var t;return{previousSettings:null!==(t=e?.previousSettings)&&void 0!==t?t:{}}}})),te=window.wp.apiFetch;var ne=n.n(te);const re="/wp/v2/settings",oe=async e=>(await ne()({path:re}))?.[e],ae=q()(Z(J((e=>({previousTheme:"nord",previousLineHeight:"1.25rem",previousFontFamily:void 0,previousFontSize:".875rem",previousHeaderType:"headlights",previousFooterType:void 0,previousClampFonts:void 0,previousDisablePadding:void 0,previousLineNumbers:void 0,updateThemeHistory(t){e((e=>({...e,previousTheme:t.theme,previousLineHeight:t.lineHeight,previousFontFamily:t.fontFamily,previousFontSize:t.fontSize,previousHeaderType:t.headerType,previousFooterType:t.footerType,previousClampFonts:t.clampFonts,previousDisablePadding:t.disablePadding,previousLineNumbers:t.lineNumbers})))}})),{name:"Code Block Pro Theme Settings"}),{name:"code_block_pro_settings",getStorage:()=>({getItem:async e=>{var t;const n=await oe(e);return JSON.stringify({version:null!==(t=n?.version)&&void 0!==t?t:0,state:n})},setItem:async(e,t)=>{var n;const{state:r,version:o}=JSON.parse(t),a={[e]:Object.assign(null!==(n=await oe(e))&&void 0!==n?n:{},r,o)};await ne()({path:re,method:"POST",data:a})},removeItem:async e=>{const t={[e]:null};return await ne()({path:re,method:"POST",data:t})}})}));var se=n(930),ie=n(190);const le=[{id:"abap",scopeName:"source.abap",path:"abap.tmLanguage.json",samplePath:"abap.sample"},{id:"actionscript-3",scopeName:"source.actionscript.3",path:"actionscript-3.tmLanguage.json",samplePath:"actionscript-3.sample"},{id:"ada",scopeName:"source.ada",path:"ada.tmLanguage.json",samplePath:"ada.sample"},{id:"apache",scopeName:"source.apacheconf",path:"apache.tmLanguage.json"},{id:"apex",scopeName:"source.apex",path:"apex.tmLanguage.json",samplePath:"apex.sample"},{id:"apl",scopeName:"source.apl",path:"apl.tmLanguage.json",embeddedLangs:["html","xml","css","javascript","json"]},{id:"applescript",scopeName:"source.applescript",path:"applescript.tmLanguage.json",samplePath:"applescript.sample"},{id:"ara",scopeName:"source.ara",path:"ara.tmLanguage.json",samplePath:"ara.sample"},{id:"asm",scopeName:"source.asm.x86_64",path:"asm.tmLanguage.json",samplePath:"asm.sample"},{id:"astro",scopeName:"source.astro",path:"astro.tmLanguage.json",samplePath:"astro.sample",embeddedLangs:["json","javascript","typescript","stylus","sass","css","scss","less","postcss","tsx"]},{id:"awk",scopeName:"source.awk",path:"awk.tmLanguage.json",samplePath:"awk.sample"},{id:"ballerina",scopeName:"source.ballerina",path:"ballerina.tmLanguage.json",samplePath:"ballerina.sample"},{id:"bat",scopeName:"source.batchfile",path:"bat.tmLanguage.json",samplePath:"bat.sample",aliases:["batch"]},{id:"berry",scopeName:"source.berry",path:"berry.tmLanguage.json",samplePath:"berry.sample",aliases:["be"]},{id:"bibtex",scopeName:"text.bibtex",path:"bibtex.tmLanguage.json"},{id:"bicep",scopeName:"source.bicep",path:"bicep.tmLanguage.json",samplePath:"bicep.sample"},{id:"blade",scopeName:"text.html.php.blade",path:"blade.tmLanguage.json",samplePath:"blade.sample",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"c",scopeName:"source.c",path:"c.tmLanguage.json",samplePath:"c.sample"},{id:"cadence",scopeName:"source.cadence",path:"cadence.tmLanguage.json",samplePath:"cadence.sample",aliases:["cdc"]},{id:"clarity",scopeName:"source.clar",path:"clarity.tmLanguage.json",samplePath:"clarity.sample"},{id:"clojure",scopeName:"source.clojure",path:"clojure.tmLanguage.json",samplePath:"clojure.sample",aliases:["clj"]},{id:"cmake",scopeName:"source.cmake",path:"cmake.tmLanguage.json",samplePath:"cmake.sample"},{id:"cobol",scopeName:"source.cobol",path:"cobol.tmLanguage.json",samplePath:"cobol.sample",embeddedLangs:["sql","html","java"]},{id:"codeql",scopeName:"source.ql",path:"codeql.tmLanguage.json",samplePath:"codeql.sample",aliases:["ql"],embeddedLangs:["markdown"]},{id:"coffee",scopeName:"source.coffee",path:"coffee.tmLanguage.json",samplePath:"coffee.sample",embeddedLangs:["javascript"]},{id:"cpp",scopeName:"source.cpp",path:"cpp.tmLanguage.json",samplePath:"cpp.sample",embeddedLangs:["glsl","sql"]},{id:"crystal",scopeName:"source.crystal",path:"crystal.tmLanguage.json",samplePath:"crystal.sample",embeddedLangs:["html","sql","css","c","javascript","shellscript"]},{id:"csharp",scopeName:"source.cs",path:"csharp.tmLanguage.json",samplePath:"csharp.sample",aliases:["c#","cs"]},{id:"css",scopeName:"source.css",path:"css.tmLanguage.json",samplePath:"css.sample"},{id:"cue",scopeName:"source.cue",path:"cue.tmLanguage.json",samplePath:"cue.sample"},{id:"d",scopeName:"source.d",path:"d.tmLanguage.json",samplePath:"d.sample"},{id:"dart",scopeName:"source.dart",path:"dart.tmLanguage.json",samplePath:"dart.sample"},{id:"dax",scopeName:"source.dax",path:"dax.tmLanguage.json",samplePath:"dax.sample"},{id:"diff",scopeName:"source.diff",path:"diff.tmLanguage.json",samplePath:"diff.sample"},{id:"docker",scopeName:"source.dockerfile",path:"docker.tmLanguage.json",samplePath:"docker.sample"},{id:"dream-maker",scopeName:"source.dm",path:"dream-maker.tmLanguage.json"},{id:"elixir",scopeName:"source.elixir",path:"elixir.tmLanguage.json",samplePath:"elixir.sample",embeddedLangs:["html"]},{id:"elm",scopeName:"source.elm",path:"elm.tmLanguage.json",samplePath:"elm.sample",embeddedLangs:["glsl"]},{id:"erb",scopeName:"text.html.erb",path:"erb.tmLanguage.json",samplePath:"erb.sample",embeddedLangs:["html","ruby"]},{id:"erlang",scopeName:"source.erlang",path:"erlang.tmLanguage.json",samplePath:"erlang.sample",aliases:["erl"]},{id:"fish",scopeName:"source.fish",path:"fish.tmLanguage.json",samplePath:"fish.sample"},{id:"fsharp",scopeName:"source.fsharp",path:"fsharp.tmLanguage.json",samplePath:"fsharp.sample",aliases:["f#","fs"],embeddedLangs:["markdown"]},{id:"gherkin",scopeName:"text.gherkin.feature",path:"gherkin.tmLanguage.json"},{id:"git-commit",scopeName:"text.git-commit",path:"git-commit.tmLanguage.json",embeddedLangs:["diff"]},{id:"git-rebase",scopeName:"text.git-rebase",path:"git-rebase.tmLanguage.json",embeddedLangs:["shellscript"]},{id:"glsl",scopeName:"source.glsl",path:"glsl.tmLanguage.json",samplePath:"glsl.sample",embeddedLangs:["c"]},{id:"gnuplot",scopeName:"source.gnuplot",path:"gnuplot.tmLanguage.json"},{id:"go",scopeName:"source.go",path:"go.tmLanguage.json",samplePath:"go.sample"},{id:"graphql",scopeName:"source.graphql",path:"graphql.tmLanguage.json",embeddedLangs:["javascript","typescript","jsx","tsx"]},{id:"groovy",scopeName:"source.groovy",path:"groovy.tmLanguage.json"},{id:"hack",scopeName:"source.hack",path:"hack.tmLanguage.json",embeddedLangs:["html","sql"]},{id:"haml",scopeName:"text.haml",path:"haml.tmLanguage.json",embeddedLangs:["ruby","javascript","sass","coffee","markdown","css"]},{id:"handlebars",scopeName:"text.html.handlebars",path:"handlebars.tmLanguage.json",aliases:["hbs"],embeddedLangs:["html","css","javascript","yaml"]},{id:"haskell",scopeName:"source.haskell",path:"haskell.tmLanguage.json",aliases:["hs"]},{id:"hcl",scopeName:"source.hcl",path:"hcl.tmLanguage.json",samplePath:"hcl.sample"},{id:"hlsl",scopeName:"source.hlsl",path:"hlsl.tmLanguage.json"},{id:"html",scopeName:"text.html.basic",path:"html.tmLanguage.json",samplePath:"html.sample",embeddedLangs:["javascript","css"]},{id:"http",scopeName:"source.http",path:"http.tmLanguage.json",samplePath:"http.sample",embeddedLangs:["shellscript","json","xml","graphql"]},{id:"imba",scopeName:"source.imba",path:"imba.tmLanguage.json",samplePath:"imba.sample"},{id:"ini",scopeName:"source.ini",path:"ini.tmLanguage.json",aliases:["properties"]},{id:"java",scopeName:"source.java",path:"java.tmLanguage.json",samplePath:"java.sample"},{id:"javascript",scopeName:"source.js",path:"javascript.tmLanguage.json",samplePath:"javascript.sample",aliases:["js"]},{id:"jinja-html",scopeName:"text.html.jinja",path:"jinja-html.tmLanguage.json",embeddedLangs:["html"]},{id:"jison",scopeName:"source.jison",path:"jison.tmLanguage.json",samplePath:"jison.sample",embeddedLangs:["javascript"]},{id:"json",scopeName:"source.json",path:"json.tmLanguage.json"},{id:"json5",scopeName:"source.json5",path:"json5.tmLanguage.json",samplePath:"json5.sample"},{id:"jsonc",scopeName:"source.json.comments",path:"jsonc.tmLanguage.json"},{id:"jsonnet",scopeName:"source.jsonnet",path:"jsonnet.tmLanguage.json"},{id:"jssm",scopeName:"source.jssm",path:"jssm.tmLanguage.json",samplePath:"jssm.sample",aliases:["fsl"]},{id:"jsx",scopeName:"source.js.jsx",path:"jsx.tmLanguage.json"},{id:"julia",scopeName:"source.julia",path:"julia.tmLanguage.json",embeddedLangs:["cpp","python","javascript","r","sql"]},{id:"kotlin",scopeName:"source.kotlin",path:"kotlin.tmLanguage.json"},{id:"latex",scopeName:"text.tex.latex",path:"latex.tmLanguage.json",embeddedLangs:["tex","css","haskell","html","xml","java","lua","julia","ruby","javascript","typescript","python","yaml","rust","scala","gnuplot"]},{id:"less",scopeName:"source.css.less",path:"less.tmLanguage.json",embeddedLangs:["css"]},{id:"liquid",scopeName:"text.html.liquid",path:"liquid.tmLanguage.json",samplePath:"liquid.sample",embeddedLangs:["html","css","json","javascript"]},{id:"lisp",scopeName:"source.lisp",path:"lisp.tmLanguage.json"},{id:"logo",scopeName:"source.logo",path:"logo.tmLanguage.json"},{id:"lua",scopeName:"source.lua",path:"lua.tmLanguage.json",embeddedLangs:["c"]},{id:"make",scopeName:"source.makefile",path:"make.tmLanguage.json",aliases:["makefile"]},{id:"markdown",scopeName:"text.html.markdown",path:"markdown.tmLanguage.json",aliases:["md"],embeddedLangs:["css","html","ini","java","lua","make","perl","r","ruby","php","sql","vb","xml","xsl","yaml","bat","clojure","coffee","c","cpp","diff","docker","git-commit","git-rebase","go","groovy","pug","javascript","json","jsonc","less","objective-c","swift","scss","raku","powershell","python","julia","rust","scala","shellscript","typescript","tsx","csharp","fsharp","dart","handlebars","erlang","elixir","latex","bibtex"]},{id:"marko",scopeName:"text.marko",path:"marko.tmLanguage.json",embeddedLangs:["css","less","scss","typescript"]},{id:"matlab",scopeName:"source.matlab",path:"matlab.tmLanguage.json"},{id:"mdx",scopeName:"text.html.markdown.jsx",path:"mdx.tmLanguage.json",embeddedLangs:["jsx","markdown"]},{id:"mermaid",scopeName:"source.mermaid",path:"mermaid.tmLanguage.json"},{id:"nginx",scopeName:"source.nginx",path:"nginx.tmLanguage.json",embeddedLangs:["lua"]},{id:"nim",scopeName:"source.nim",path:"nim.tmLanguage.json",embeddedLangs:["c","html","xml","javascript","css","glsl","markdown"]},{id:"nix",scopeName:"source.nix",path:"nix.tmLanguage.json"},{id:"objective-c",scopeName:"source.objc",path:"objective-c.tmLanguage.json",aliases:["objc"]},{id:"objective-cpp",scopeName:"source.objcpp",path:"objective-cpp.tmLanguage.json"},{id:"ocaml",scopeName:"source.ocaml",path:"ocaml.tmLanguage.json"},{id:"pascal",scopeName:"source.pascal",path:"pascal.tmLanguage.json"},{id:"perl",scopeName:"source.perl",path:"perl.tmLanguage.json",embeddedLangs:["html","xml","css","javascript","sql"]},{id:"php",scopeName:"source.php",path:"php.tmLanguage.json",embeddedLangs:["html","xml","sql","javascript","json","css"]},{id:"plsql",scopeName:"source.plsql.oracle",path:"plsql.tmLanguage.json"},{id:"postcss",scopeName:"source.css.postcss",path:"postcss.tmLanguage.json"},{id:"powerquery",scopeName:"source.powerquery",path:"powerquery.tmLanguage.json",samplePath:"powerquery.sample"},{id:"powershell",scopeName:"source.powershell",path:"powershell.tmLanguage.json",aliases:["ps","ps1"]},{id:"prisma",scopeName:"source.prisma",path:"prisma.tmLanguage.json",samplePath:"prisma.sample"},{id:"prolog",scopeName:"source.prolog",path:"prolog.tmLanguage.json"},{id:"proto",scopeName:"source.proto",path:"proto.tmLanguage.json",samplePath:"proto.sample"},{id:"pug",scopeName:"text.pug",path:"pug.tmLanguage.json",aliases:["jade"],embeddedLangs:["javascript","css","sass","scss","stylus","coffee","html"]},{id:"puppet",scopeName:"source.puppet",path:"puppet.tmLanguage.json"},{id:"purescript",scopeName:"source.purescript",path:"purescript.tmLanguage.json"},{id:"python",scopeName:"source.python",path:"python.tmLanguage.json",samplePath:"python.sample",aliases:["py"]},{id:"r",scopeName:"source.r",path:"r.tmLanguage.json"},{id:"raku",scopeName:"source.perl.6",path:"raku.tmLanguage.json",aliases:["perl6"]},{id:"razor",scopeName:"text.aspnetcorerazor",path:"razor.tmLanguage.json",embeddedLangs:["html","csharp"]},{id:"rel",scopeName:"source.rel",path:"rel.tmLanguage.json",samplePath:"rel.sample"},{id:"riscv",scopeName:"source.riscv",path:"riscv.tmLanguage.json"},{id:"rst",scopeName:"source.rst",path:"rst.tmLanguage.json",embeddedLangs:["cpp","python","javascript","shellscript","yaml","cmake","ruby"]},{id:"ruby",scopeName:"source.ruby",path:"ruby.tmLanguage.json",samplePath:"ruby.sample",aliases:["rb"],embeddedLangs:["html","xml","sql","css","c","javascript","shellscript","lua"]},{id:"rust",scopeName:"source.rust",path:"rust.tmLanguage.json",aliases:["rs"]},{id:"sas",scopeName:"source.sas",path:"sas.tmLanguage.json",embeddedLangs:["sql"]},{id:"sass",scopeName:"source.sass",path:"sass.tmLanguage.json"},{id:"scala",scopeName:"source.scala",path:"scala.tmLanguage.json"},{id:"scheme",scopeName:"source.scheme",path:"scheme.tmLanguage.json"},{id:"scss",scopeName:"source.css.scss",path:"scss.tmLanguage.json",embeddedLangs:["css"]},{id:"shaderlab",scopeName:"source.shaderlab",path:"shaderlab.tmLanguage.json",aliases:["shader"],embeddedLangs:["hlsl"]},{id:"shellscript",scopeName:"source.shell",path:"shellscript.tmLanguage.json",aliases:["bash","console","sh","shell","zsh"]},{id:"smalltalk",scopeName:"source.smalltalk",path:"smalltalk.tmLanguage.json"},{id:"solidity",scopeName:"source.solidity",path:"solidity.tmLanguage.json"},{id:"sparql",scopeName:"source.sparql",path:"sparql.tmLanguage.json",samplePath:"sparql.sample",embeddedLangs:["turtle"]},{id:"sql",scopeName:"source.sql",path:"sql.tmLanguage.json"},{id:"ssh-config",scopeName:"source.ssh-config",path:"ssh-config.tmLanguage.json"},{id:"stata",scopeName:"source.stata",path:"stata.tmLanguage.json",samplePath:"stata.sample",embeddedLangs:["sql"]},{id:"stylus",scopeName:"source.stylus",path:"stylus.tmLanguage.json",aliases:["styl"]},{id:"svelte",scopeName:"source.svelte",path:"svelte.tmLanguage.json",embeddedLangs:["javascript","typescript","coffee","stylus","sass","css","scss","less","postcss","pug","markdown"]},{id:"swift",scopeName:"source.swift",path:"swift.tmLanguage.json"},{id:"system-verilog",scopeName:"source.systemverilog",path:"system-verilog.tmLanguage.json"},{id:"tasl",scopeName:"source.tasl",path:"tasl.tmLanguage.json",samplePath:"tasl.sample"},{id:"tcl",scopeName:"source.tcl",path:"tcl.tmLanguage.json"},{id:"tex",scopeName:"text.tex",path:"tex.tmLanguage.json",embeddedLangs:["r"]},{id:"toml",scopeName:"source.toml",path:"toml.tmLanguage.json"},{id:"tsx",scopeName:"source.tsx",path:"tsx.tmLanguage.json",samplePath:"tsx.sample"},{id:"turtle",scopeName:"source.turtle",path:"turtle.tmLanguage.json",samplePath:"turtle.sample"},{id:"twig",scopeName:"text.html.twig",path:"twig.tmLanguage.json",embeddedLangs:["css","javascript","php","python","ruby"]},{id:"typescript",scopeName:"source.ts",path:"typescript.tmLanguage.json",aliases:["ts"]},{id:"v",scopeName:"source.v",path:"v.tmLanguage.json",samplePath:"v.sample"},{id:"vb",scopeName:"source.asp.vb.net",path:"vb.tmLanguage.json",aliases:["cmd"]},{id:"verilog",scopeName:"source.verilog",path:"verilog.tmLanguage.json"},{id:"vhdl",scopeName:"source.vhdl",path:"vhdl.tmLanguage.json"},{id:"viml",scopeName:"source.viml",path:"viml.tmLanguage.json",aliases:["vim","vimscript"]},{id:"vue-html",scopeName:"text.html.vue-html",path:"vue-html.tmLanguage.json",embeddedLangs:["vue","javascript"]},{id:"vue",scopeName:"source.vue",path:"vue.tmLanguage.json",embeddedLangs:["html","markdown","pug","stylus","sass","css","scss","less","javascript","typescript","jsx","tsx","json","jsonc","json5","yaml","toml","graphql"]},{id:"wasm",scopeName:"source.wat",path:"wasm.tmLanguage.json"},{id:"wenyan",scopeName:"source.wenyan",path:"wenyan.tmLanguage.json",aliases:["文言"]},{id:"wgsl",scopeName:"source.wgsl",path:"wgsl.tmLanguage.json",samplePath:"wgsl.sample"},{id:"xml",scopeName:"text.xml",path:"xml.tmLanguage.json",embeddedLangs:["java"]},{id:"xsl",scopeName:"text.xml.xsl",path:"xsl.tmLanguage.json",embeddedLangs:["xml"]},{id:"yaml",scopeName:"source.yaml",path:"yaml.tmLanguage.json",aliases:["yml"]},{id:"zenscript",scopeName:"source.zenscript",path:"zenscript.tmLanguage.json",samplePath:"zenscript.sample"}];var ce,ue,de,pe,he=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e))(he||{});class ge{static toBinaryStr(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t}static printMetadata(e){let t=ge.getLanguageId(e),n=ge.getTokenType(e),r=ge.getFontStyle(e),o=ge.getForeground(e),a=ge.getBackground(e);console.log({languageId:t,tokenType:n,fontStyle:r,foreground:o,background:a})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>15}static getBackground(e){return(4286578688&e)>>>24}static containsBalancedBrackets(e){return 0!=(1024&e)}static set(e,t,n,r,o,a){let s=ge.getLanguageId(e),i=ge.getTokenType(e),l=ge.getFontStyle(e),c=ge.getForeground(e),u=ge.getBackground(e);return 0!==t&&(s=t),0!==n&&(i=8===n?0:n),-1!==r&&(l=r),0!==o&&(c=o),0!==a&&(u=a),(s<<0|i<<8|l<<11|(ge.containsBalancedBrackets(e)?1:0)<<10|c<<15|u<<24)>>>0}}function me(e){return e.endsWith("/")||e.endsWith("\\")?e.slice(0,-1):e}function fe(e){return e.startsWith("./")?e.slice(2):e}function be(e){const t=e.split(/[\/\\]/g);return t.slice(0,t.length-1)}function ye(...e){return e.map(me).map(fe).join("/")}function ve(e){return 32===e||9===e}function _e(e){return 10===e||13===e}function ke(e){return e>=48&&e<=57}!function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(ce||(ce={})),function(e){e.DEFAULT={allowTrailingComma:!1}}(ue||(ue={})),function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(de||(de={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(pe||(pe={}));const Se=function(e,t=[],n=ue.DEFAULT){let r=null,o=[];const a=[];function s(e){Array.isArray(o)?o.push(e):null!==r&&(o[r]=e)}return function(e,t,n=ue.DEFAULT){const r=function(e,t=!1){const n=e.length;let r=0,o="",a=0,s=16,i=0,l=0,c=0,u=0,d=0;function p(t,n){let o=0,a=0;for(;o<t||!n;){let t=e.charCodeAt(r);if(t>=48&&t<=57)a=16*a+t-48;else if(t>=65&&t<=70)a=16*a+t-65+10;else{if(!(t>=97&&t<=102))break;a=16*a+t-97+10}r++,o++}return o<t&&(a=-1),a}function h(){if(o="",d=0,a=r,l=i,u=c,r>=n)return a=n,s=17;let t=e.charCodeAt(r);if(ve(t)){do{r++,o+=String.fromCharCode(t),t=e.charCodeAt(r)}while(ve(t));return s=15}if(_e(t))return r++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,o+="\n"),i++,c=r,s=14;switch(t){case 123:return r++,s=1;case 125:return r++,s=2;case 91:return r++,s=3;case 93:return r++,s=4;case 58:return r++,s=6;case 44:return r++,s=5;case 34:return r++,o=function(){let t="",o=r;for(;;){if(r>=n){t+=e.substring(o,r),d=2;break}const a=e.charCodeAt(r);if(34===a){t+=e.substring(o,r),r++;break}if(92!==a){if(a>=0&&a<=31){if(_e(a)){t+=e.substring(o,r),d=2;break}d=6}r++}else{if(t+=e.substring(o,r),r++,r>=n){d=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:const e=p(4,!0);e>=0?t+=String.fromCharCode(e):d=4;break;default:d=5}o=r}}return t}(),s=10;case 47:const l=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!_e(e.charCodeAt(r));)r++;return o=e.substring(l,r),s=12}if(42===e.charCodeAt(r+1)){r+=2;const t=n-1;let a=!1;for(;r<t;){const t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,a=!0;break}r++,_e(t)&&(13===t&&10===e.charCodeAt(r)&&r++,i++,c=r)}return a||(r++,d=1),o=e.substring(l,r),s=13}return o+=String.fromCharCode(t),r++,s=16;case 45:if(o+=String.fromCharCode(t),r++,r===n||!ke(e.charCodeAt(r)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=function(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&ke(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(r++,!(r<e.length&&ke(e.charCodeAt(r))))return d=3,e.substring(t,r);for(r++;r<e.length&&ke(e.charCodeAt(r));)r++}let n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if(r++,(r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&ke(e.charCodeAt(r))){for(r++;r<e.length&&ke(e.charCodeAt(r));)r++;n=r}else d=3;return e.substring(t,n)}(),s=11;default:for(;r<n&&g(t);)r++,t=e.charCodeAt(r);if(a!==r){switch(o=e.substring(a,r),o){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return o+=String.fromCharCode(t),r++,s=16}}function g(e){if(ve(e)||_e(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,o="",a=0,s=16,d=0},getPosition:()=>r,scan:t?function(){let e;do{e=h()}while(e>=12&&e<=15);return e}:h,getToken:()=>s,getTokenValue:()=>o,getTokenOffset:()=>a,getTokenLength:()=>r-a,getTokenStartLine:()=>l,getTokenStartCharacter:()=>a-u,getTokenError:()=>d}}(e,!1),o=[];function a(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function s(e){return e?()=>e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>o.slice())):()=>!0}function i(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter()):()=>!0}function l(e){return e?t=>e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter(),(()=>o.slice())):()=>!0}const c=s(t.onObjectBegin),u=l(t.onObjectProperty),d=a(t.onObjectEnd),p=s(t.onArrayBegin),h=a(t.onArrayEnd),g=l(t.onLiteralValue),m=i(t.onSeparator),f=a(t.onComment),b=i(t.onError),y=n&&n.disallowComments,v=n&&n.allowTrailingComma;function _(){for(;;){const e=r.scan();switch(r.getTokenError()){case 4:k(14);break;case 5:k(15);break;case 3:k(13);break;case 1:y||k(11);break;case 2:k(12);break;case 6:k(16)}switch(e){case 12:case 13:y?k(10):f();break;case 16:k(1);break;case 15:case 14:break;default:return e}}}function k(e,t=[],n=[]){if(b(e),t.length+n.length>0){let e=r.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){_();break}if(-1!==n.indexOf(e))break;e=_()}}}function S(e){const t=r.getTokenValue();return e?g(t):(u(t),o.push(t)),_(),!0}function C(){switch(r.getToken()){case 3:return function(){p(),_();let e=!0,t=!1;for(;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(t||k(4,[],[]),m(","),_(),4===r.getToken()&&v)break}else t&&k(6,[],[]);e?(o.push(0),e=!1):o[o.length-1]++,C()||k(4,[],[4,5]),t=!0}return h(),e||o.pop(),4!==r.getToken()?k(8,[4],[]):_(),!0}();case 1:return function(){c(),_();let e=!1;for(;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||k(4,[],[]),m(","),_(),2===r.getToken()&&v)break}else e&&k(6,[],[]);(10!==r.getToken()?(k(3,[],[2,5]),!1):(S(!1),6===r.getToken()?(m(":"),_(),C()||k(4,[],[2,5])):k(5,[],[2,5]),o.pop(),!0))||k(4,[],[2,5]),e=!0}return d(),2!==r.getToken()?k(7,[2],[]):_(),!0}();case 10:return S(!0);default:return function(){switch(r.getToken()){case 11:const e=r.getTokenValue();let t=Number(e);isNaN(t)&&(k(2),t=0),g(t);break;case 7:g(null);break;case 8:g(!0);break;case 9:g(!1);break;default:return!1}return _(),!0}()}}_(),17===r.getToken()?!!n.allowEmptyContent||k(4,[],[]):C()?17!==r.getToken()&&k(9,[],[]):k(4,[],[])}(e,{onObjectBegin:()=>{const e={};s(e),a.push(o),o=e,r=null},onObjectProperty:e=>{r=e},onObjectEnd:()=>{o=a.pop()},onArrayBegin:()=>{const e=[];s(e),a.push(o),o=e,r=null},onArrayEnd:()=>{o=a.pop()},onLiteralValue:s,onError:(e,n,r)=>{t.push({error:e,offset:n,length:r})}},n),o[0]};var Ce;!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(Ce||(Ce={}));const we="undefined"!=typeof self&&void 0!==self.WorkerGlobalScope,xe="process"in globalThis&&"undefined"!=typeof process&&void 0!==process.release&&"node"===process.release.name,Ee=we||!xe;let Le="",Ne="";let Te=null;function je(e){if(Ee)return`${Le}${e}`;{const t=n(318);return t.isAbsolute(e)?e:t.resolve("/","..",e)}}async function Pe(e){const t=[],r=Se(await async function(e){const t=je(e);if(Ee)return await fetch(t).then((e=>e.text()));{const e=n(799);return await e.promises.readFile(t,"utf-8")}}(e),t,{allowTrailingComma:!0});if(t.length)throw t[0];return r}async function Ae(e){const t=Oe(await Pe(e));if(t.include){const n=await Ae(ye(...be(e),t.include));n.settings&&(t.settings=n.settings.concat(t.settings)),n.bg&&!t.bg&&(t.bg=n.bg),n.colors&&(t.colors={...n.colors,...t.colors}),delete t.include}return t}function Oe(e){const t=e.type||"dark",n={name:e.name,type:t,...e,...Re(e)};var r;return e.include&&(n.include=e.include),e.tokenColors&&(n.settings=e.tokenColors,delete n.tokenColors),(r=n).settings||(r.settings=[]),r.settings[0]&&r.settings[0].settings&&!r.settings[0].scope||r.settings.unshift({settings:{foreground:r.fg,background:r.bg}}),n}function Re(e){let t,n,r=e.settings?e.settings:e.tokenColors;const o=r?r.find((e=>!e.name&&!e.scope)):void 0;return o?.settings?.foreground&&(t=o.settings.foreground),o?.settings?.background&&(n=o.settings.background),!t&&e?.colors?.["editor.foreground"]&&(t=e.colors["editor.foreground"]),!n&&e?.colors?.["editor.background"]&&(n=e.colors["editor.background"]),t||(t="light"===e.type?"#333333":"#bbbbbb"),n||(n="light"===e.type?"#fffffe":"#1e1e1e"),{fg:t,bg:n}}class Ie{constructor(e,t){this.languagesPath="languages/",this.languageMap={},this.scopeToLangMap={},this._onigLibPromise=e,this._onigLibName=t}get onigLib(){return this._onigLibPromise}getOnigLibName(){return this._onigLibName}getLangRegistration(e){return this.languageMap[e]}async loadGrammar(e){const t=this.scopeToLangMap[e];if(!t)return null;if(t.grammar)return t.grammar;const n=await async function(e){return await Pe(e)}(le.includes(t)?`${this.languagesPath}${t.path}`:t.path);return t.grammar=n,n}addLanguage(e){this.languageMap[e.id]=e,e.aliases&&e.aliases.forEach((t=>{this.languageMap[t]=e})),this.scopeToLangMap[e.scopeName]=e}}function Be(e,t){let n=[];for(let r=0,o=t.length;r<o;r++){let o=t.slice(0,r),a=t[r];n[r]={scopeName:a,themeMatches:De(e,a,o)}}return n}function Me(e,t){let n=e+".";return e===t||t.substring(0,n.length)===n}function Fe(e,t,n,r){if(!Me(e,n))return!1;let o=t.length-1,a=r.length-1;for(;o>=0&&a>=0;)Me(t[o],r[a])&&o--,a--;return-1===o}function De(e,t,n){let r=[],o=0;for(let a=0,s=e.settings.length;a<s;a++){let s,i=e.settings[a];if("string"==typeof i.scope)s=i.scope.split(/,/).map((e=>e.trim()));else{if(!Array.isArray(i.scope))continue;s=i.scope}for(let e=0,a=s.length;e<a;e++){let l=s[e].split(/ /);Fe(l[l.length-1],l.slice(0,l.length-1),t,n)&&(r[o++]=i,e=a)}}return r}var He=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Ge={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function $e(e,t){const n=e.indexOf("",t);if(-1!==n&&"["===e[n+1]){const t=e.indexOf("m",n);return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function We(e){const t=e.shift();if("2"===t){const 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){const t=e.shift();if(t)return{type:"table",index:Number(t)}}}function ze(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)Ge[r]&&t.push({type:"setDecoration",value:Ge[r]});else if(r<=29){const e=Ge[r-20];e&&t.push({type:"resetDecoration",value:e})}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:He[r-30]}});else if(38===r){const n=We(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:He[r-40]}});else if(48===r){const n=We(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:He[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:He[r-100+8]}})}return t}var Ue={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"};function qe(e=Ue){function t(t){return e[t]}function n(e){return`#${e.map((e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0"))).join("")}`}let r;return{value:function(e){switch(e.type){case"named":return t(e.name);case"rgb":return n(e.rgb);case"table":return function(e){return function(){if(r)return r;r=[];for(let e=0;e<He.length;e++)r.push(t(He[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let o=0;o<6;o++)for(let a=0;a<6;a++)r.push(n([e[t],e[o],e[a]]));let o=8;for(let e=0;e<24;e++,o+=10)r.push(n([o,o,o]));return r}()[e]}(e.index)}}}}const Ve={pre:({className:e,style:t,children:n})=>`<pre class="${e}" style="${t}">${n}</pre>`,code:({children:e})=>`<code>${e}</code>`,line:({className:e,children:t})=>`<span class="${e}">${t}</span>`,token:({style:e,children:t})=>`<span style="${e}">${t}</span>`};function Ke(e,t={}){const n=t.bg||"#fff",r=function(e,t){const n=new Map;for(const t of e){const e=t.line;n.has(e)?n.get(e).push(t):n.set(e,[t])}return n}(t.lineOptions??[]),o=t.elements||{};function a(e="",t={},n){const r=o[e]||Ve[e];return r?(n=n.filter(Boolean),r({...t,children:"code"===e?n.join("\n"):n.join("")})):""}return a("pre",{className:"shiki "+(t.themeName||""),style:`background-color: ${n}`},[t.langId?`<div class="language-id">${t.langId}</div>`:"",a("code",{},e.map(((n,o)=>{const s=o+1;return a("line",{className:function(e){const t=new Set(["line"]);for(const n of e)for(const e of n.classes??[])t.add(e);return Array.from(t)}(r.get(s)??[]).join(" "),lines:e,line:n,index:o},n.map(((e,r)=>{const o=[`color: ${e.color||t.fg}`];return e.fontStyle&he.Italic&&o.push("font-style: italic"),e.fontStyle&he.Bold&&o.push("font-weight: bold"),e.fontStyle&he.Underline&&o.push("text-decoration: underline"),a("token",{style:o.join("; "),tokens:n,token:e,index:r},[(s=e.content,s.replace(/[&<>"']/g,(e=>Je[e])))]);var s})))})))])}const Je={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};class Qe extends ie.Registry{constructor(e){super(e),this._resolver=e,this.themesPath="themes/",this._resolvedThemes={},this._resolvedGrammars={},this._langGraph=new Map,this._langMap=le.reduce(((e,t)=>(e[t.id]=t,e)),{})}getTheme(e){return"string"==typeof e?this._resolvedThemes[e]:e}async loadTheme(e){return"string"==typeof e?(this._resolvedThemes[e]||(this._resolvedThemes[e]=await Ae(`${this.themesPath}${e}.json`)),this._resolvedThemes[e]):((e=Oe(e)).name&&(this._resolvedThemes[e.name]=e),e)}async loadThemes(e){return await Promise.all(e.map((e=>this.loadTheme(e))))}getLoadedThemes(){return Object.keys(this._resolvedThemes)}getGrammar(e){return this._resolvedGrammars[e]}async loadLanguage(e){const t=e.embeddedLangs?.reduce((async(e,t,n)=>{if(!this.getLoadedLanguages().includes(t)&&this._resolver.getLangRegistration(t))return await this._resolver.loadGrammar(this._resolver.getLangRegistration(t).scopeName),e[this._resolver.getLangRegistration(t).scopeName]=n+2,e}),{}),n={embeddedLanguages:t,balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]},r=await this.loadGrammarWithConfiguration(e.scopeName,1,n);this._resolvedGrammars[e.id]=r,e.aliases&&e.aliases.forEach((e=>{this._resolvedGrammars[e]=r}))}async loadLanguages(e){for(const t of e)this.resolveEmbeddedLanguages(t);const t=Array.from(this._langGraph.values());for(const e of t)this._resolver.addLanguage(e);for(const e of t)await this.loadLanguage(e)}getLoadedLanguages(){return Object.keys(this._resolvedGrammars)}resolveEmbeddedLanguages(e){if(this._langGraph.has(e.id)||this._langGraph.set(e.id,e),e.embeddedLangs)for(const t of e.embeddedLangs)this._langGraph.set(t,this._langMap[t])}}function Xe(e){return"string"==typeof e?le.find((t=>t.id===e||t.aliases?.includes(e))):e}async function Ye(e){const{_languages:t,_themes:r,_wasmPath:o}=function(e){let t=le,n=e.themes||[],r=e.paths?.wasm?e.paths.wasm.endsWith("/")?e.paths.wasm:e.paths.wasm+"/":"dist/";return e.langs&&(t=e.langs.map(Xe)),e.theme&&n.unshift(e.theme),n.length||(n=["nord"]),{_languages:t,_themes:n,_wasmPath:r}}(e),a=new Ie(async function(e){if(!Te){let t;if(Ee)t="string"==typeof Ne?(0,se.loadWASM)({data:await fetch(je(ye(...be(e),"onig.wasm")))}):(0,se.loadWASM)({data:Ne});else{const e=n(318).join(930,"../onig.wasm"),r=n(799).readFileSync(e).buffer;t=(0,se.loadWASM)(r)}Te=t.then((()=>({createOnigScanner:e=>(0,se.createOnigScanner)(e),createOnigString:e=>(0,se.createOnigString)(e)})))}return Te}(o),"vscode-oniguruma"),s=new Qe(a);e.paths?.themes&&(s.themesPath=e.paths.themes.endsWith("/")?e.paths.themes:e.paths.themes+"/"),e.paths?.languages&&(a.languagesPath=e.paths.languages.endsWith("/")?e.paths.languages:e.paths.languages+"/");const i=(await s.loadThemes(r))[0];let l;await s.loadLanguages(t);let c={"#000001":"var(--shiki-color-text)","#000002":"var(--shiki-color-background)","#000004":"var(--shiki-token-constant)","#000005":"var(--shiki-token-string)","#000006":"var(--shiki-token-comment)","#000007":"var(--shiki-token-keyword)","#000008":"var(--shiki-token-parameter)","#000009":"var(--shiki-token-function)","#000010":"var(--shiki-token-string-expression)","#000011":"var(--shiki-token-punctuation)","#000012":"var(--shiki-token-link)"};function u(e){const t=e?s.getTheme(e):i;if(!t)throw Error(`No theme registration for ${e}`);l&&l.name===t.name||(s.setTheme(t),l=t);const n=s.getColorMap();return"css"===t.type&&function(e,t){e.bg=c[e.bg]||e.bg,e.fg=c[e.fg]||e.fg,t.forEach(((e,n)=>{t[n]=c[e]||e}))}(t,n),{_theme:t,_colorMap:n}}function d(e,t="text",n,r={includeExplanation:!0}){if(function(e){return!e||["plaintext","txt","text"].includes(e)}(t))return[...e.split(/\r\n|\r|\n/).map((e=>[{content:e}]))];const{_grammar:o}=function(e){const t=s.getGrammar(e);if(!t)throw Error(`No language registration for ${e}`);return{_grammar:t}}(t),{_theme:a,_colorMap:i}=u(n);return function(e,t,n,r,o){let a=n.split(/\r\n|\r|\n/),s=ie.INITIAL,i=[],l=[];for(let n=0,c=a.length;n<c;n++){let c,u,d,p=a[n];if(""===p){i=[],l.push([]);continue}o.includeExplanation&&(c=r.tokenizeLine(p,s),u=c.tokens,d=0);let h=r.tokenizeLine2(p,s),g=h.tokens.length/2;for(let n=0;n<g;n++){let r=h.tokens[2*n],a=n+1<g?h.tokens[2*n+2]:p.length;if(r===a)continue;let s=h.tokens[2*n+1],l=t[ge.getForeground(s)],c=ge.getFontStyle(s),m=[];if(o.includeExplanation){let t=0;for(;r+t<a;){let n=u[d],r=p.substring(n.startIndex,n.endIndex);t+=r.length,m.push({content:r,scopes:Be(e,n.scopes)}),d++}}i.push({content:p.substring(r,a),color:l,fontStyle:c,explanation:m})}l.push(i),i=[],s=h.ruleStack}return l}(a,i,e,o,r)}function p(e,t){const{_theme:n}=u(t);return function(e,t){const n=t.split(/\r?\n/),r=qe(Object.fromEntries(He.map((t=>[t,e.colors[`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`]])))),o=function(){let e=null,t=null,n=new Set;return{parse(r){const o=[];let a=0;do{const s=$e(r,a),i=s.sequence?r.substring(a,s.startPosition):r.substring(a);if(i.length>0&&o.push({value:i,foreground:e,background:t,decorations:new Set(n)}),s.sequence){const r=ze(s.sequence);for(const o of r)"resetAll"===o.type?(e=null,t=null,n.clear()):"resetForegroundColor"===o.type?e=null:"resetBackgroundColor"===o.type?t=null:"resetDecoration"===o.type&&n.delete(o.value);for(const o of r)"setForegroundColor"===o.type?e=o.value:"setBackgroundColor"===o.type?t=o.value:"setDecoration"===o.type&&n.add(o.value)}a=s.position}while(a<r.length);return o}}}();return n.map((t=>o.parse(t).map((t=>{let n;n=t.decorations.has("reverse")?t.background?r.value(t.background):e.bg:t.foreground?r.value(t.foreground):e.fg,t.decorations.has("dim")&&(n=function(e){const t=e.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(t){if(t[3]){const e=Math.round(Number.parseInt(t[3],16)/2).toString(16).padStart(2,"0");return`#${t[1]}${t[2]}${e}`}return t[2]?`#${t[1]}${t[2]}80`:`#${Array.from(t[1]).map((e=>`${e}${e}`)).join("")}80`}return e}(n));let o=he.None;return t.decorations.has("bold")&&(o|=he.Bold),t.decorations.has("italic")&&(o|=he.Italic),t.decorations.has("underline")&&(o|=he.Underline),{content:t.value,color:n,fontStyle:o}}))))}(n,e)}return{codeToThemedTokens:d,codeToHtml:function(e,t="text",n){let r;r="object"==typeof t?t:{lang:t,theme:n};const o=d(e,r.lang,r.theme,{includeExplanation:!1}),{_theme:a}=u(r.theme);return Ke(o,{fg:a.fg,bg:a.bg,lineOptions:r?.lineOptions,themeName:a.name})},ansiToThemedTokens:p,ansiToHtml:function(e,t){const n=p(e,t?.theme),{_theme:r}=u(t?.theme);return Ke(n,{fg:r.fg,bg:r.bg,lineOptions:t?.lineOptions,themeName:r.name})},getTheme:e=>u(e)._theme,loadTheme:async function(e){await s.loadTheme(e)},loadLanguage:async function(e){const t=Xe(e);a.addLanguage(t),await s.loadLanguage(t)},getBackgroundColor:function(e){const{_theme:t}=u(e);return t.bg},getForegroundColor:function(e){const{_theme:t}=u(e);return t.fg},getLoadedThemes:function(){return s.getLoadedThemes()},getLoadedLanguages:function(){return s.getLoadedLanguages()},setColorReplacements:function(e){c=e}}}var Ze=n(688);const et=new WeakMap,tt={},nt={},rt=()=>{},ot=rt(),at=Object,st=e=>e===ot,it=e=>"function"==typeof e,lt=(e,t)=>({...e,...t}),ct="undefined",ut=typeof window!=ct,dt=typeof document!=ct,pt=(e,t)=>{const n=et.get(e);return[()=>e.get(t)||tt,r=>{if(!st(t)){const o=e.get(t);t in nt||(nt[t]=o),n[5](t,lt(o,r),o||tt)}},n[6],()=>!st(t)&&t in nt?nt[t]:e.get(t)||tt]},ht=new WeakMap;let gt=0;const mt=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,a;if(at(e)!==e||r||n==RegExp)o=r?e.toJSON():"symbol"==t?e.toString():"string"==t?JSON.stringify(e):""+e;else{if(o=ht.get(e),o)return o;if(o=++gt+"~",ht.set(e,o),n==Array){for(o="@",a=0;a<e.length;a++)o+=mt(e[a])+",";ht.set(e,o)}if(n==at){o="#";const t=at.keys(e).sort();for(;!st(a=t.pop());)st(e[a])||(o+=a+":"+mt(e[a])+",");ht.set(e,o)}}return o};let ft=!0;const[bt,yt]=ut&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[rt,rt],vt={isOnline:()=>ft,isVisible:()=>{const e=dt&&document.visibilityState;return st(e)||"hidden"!==e}},_t={initFocus:e=>(dt&&document.addEventListener("visibilitychange",e),bt("focus",e),()=>{dt&&document.removeEventListener("visibilitychange",e),yt("focus",e)}),initReconnect:e=>{const t=()=>{ft=!0,e()},n=()=>{ft=!1};return bt("online",t),bt("offline",n),()=>{yt("online",t),yt("offline",n)}}},kt=!$.useId,St=!ut||"Deno"in window,Ct=St?$.useEffect:$.useLayoutEffect,wt="undefined"!=typeof navigator&&navigator.connection,xt=!St&&wt&&(["slow-2g","2g"].includes(wt.effectiveType)||wt.saveData),Et=e=>{if(it(e))try{e=e()}catch(t){e=""}const t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?mt(e):"",t]};let Lt=0;const Nt=()=>++Lt;async function Tt(...e){const[t,n,r,o]=e,a=lt({populateCache:!0,throwOnError:!0},"boolean"==typeof o?{revalidate:o}:o||{});let s=a.populateCache;const i=a.rollbackOnError;let l=a.optimisticData;const c=!1!==a.revalidate,u=a.throwOnError;if(it(n)){const e=n,r=[],o=t.keys();for(let n=o.next();!n.done;n=o.next()){const o=n.value;!o.startsWith("$inf$")&&e(t.get(o)._k)&&r.push(o)}return Promise.all(r.map(d))}return d(n);async function d(n){const[o]=Et(n);if(!o)return;const[a,d]=pt(t,o),[p,h,g]=et.get(t),m=p[o],f=()=>c&&(delete g[o],m&&m[0])?m[0](2).then((()=>a().data)):a().data;if(e.length<3)return f();let b,y=r;const v=Nt();h[o]=[v,0];const _=!st(l),k=a(),S=k.data,C=k._c,w=st(C)?S:C;if(_&&(l=it(l)?l(w):l,d({data:l,_c:w})),it(y))try{y=y(w)}catch(e){b=e}if(y&&it(y.then)){if(y=await y.catch((e=>{b=e})),v!==h[o][0]){if(b)throw b;return y}b&&_&&(e=>"function"==typeof i?i(e):!1!==i)(b)&&(s=!0,y=w,d({data:y,_c:ot}))}s&&(b||(it(s)&&(y=s(y,w)),d({data:y,_c:ot}))),h[o][1]=Nt();const x=await f();if(d({_c:ot}),!b)return s?x:y;if(u)throw b}}const jt=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},Pt=(e,t)=>{if(!et.has(e)){const n=lt(_t,t),r={},o=Tt.bind(ot,e);let a=rt;const s={},i=(e,t)=>{const n=s[e]||[];return s[e]=n,n.push(t),()=>n.splice(n.indexOf(t),1)},l=(t,n,r)=>{e.set(t,n);const o=s[t];if(o)for(let e=o.length;e--;)o[e](n,r)},c=()=>{if(!et.has(e)&&(et.set(e,[r,{},{},{},o,l,i]),!St)){const t=n.initFocus(setTimeout.bind(ot,jt.bind(ot,r,0))),o=n.initReconnect(setTimeout.bind(ot,jt.bind(ot,r,1)));a=()=>{t&&t(),o&&o(),et.delete(e)}}};return c(),[e,o,c,a]}return[e,et.get(e)[4]]},[At,Ot]=Pt(new Map),Rt=lt({onLoadingSlow:rt,onSuccess:rt,onError:rt,onErrorRetry:(e,__,t,n,r)=>{const o=t.errorRetryCount,a=r.retryCount,s=~~((Math.random()+.5)*(1<<(a<8?a:8)))*t.errorRetryInterval;!st(o)&&a>o||setTimeout(n,s,r)},onDiscarded:rt,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:xt?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:xt?5e3:3e3,compare:(e,t)=>mt(e)==mt(t),isPaused:()=>!1,cache:At,mutate:Ot,fallback:{}},vt),It=(e,t)=>{const n=lt(e,t);if(t){const{use:r,fallback:o}=e,{use:a,fallback:s}=t;r&&a&&(n.use=r.concat(a)),o&&s&&(n.fallback=lt(o,s))}return n},Bt=(0,$.createContext)({}),Mt=ut&&window.__SWR_DEVTOOLS_USE__,Ft=Mt?window.__SWR_DEVTOOLS_USE__:[],Dt=e=>it(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],Ht=Ft.concat((e=>(t,n,r)=>e(t,n&&((...e)=>{const r=Et(t)[0],[,,,o]=et.get(At),a=o[r];return a?(delete o[r],a):n(...e)}),r)));Mt&&(window.__SWR_DEVTOOLS_REACT__=$);const Gt={dedupe:!0};at.defineProperty((e=>{const{value:t}=e,n=(0,$.useContext)(Bt),r=it(t),o=(0,$.useMemo)((()=>r?t(n):t),[r,n,t]),a=(0,$.useMemo)((()=>r?o:It(n,o)),[r,n,o]),s=o&&o.provider,[i]=(0,$.useState)((()=>s?Pt(s(a.cache||At),o):ot));return i&&(a.cache=i[0],a.mutate=i[1]),Ct((()=>{if(i)return i[2]&&i[2](),i[3]}),[]),(0,$.createElement)(Bt.Provider,lt(e,{value:a}))}),"defaultValue",{value:Rt});var $t,Wt=($t=(e,t,n)=>{const{cache:r,compare:o,suspense:a,fallbackData:s,revalidateOnMount:i,revalidateIfStale:l,refreshInterval:c,refreshWhenHidden:u,refreshWhenOffline:d,keepPreviousData:p}=n,[h,g,m]=et.get(r),[f,b]=Et(e),y=(0,$.useRef)(!1),v=(0,$.useRef)(!1),_=(0,$.useRef)(f),k=(0,$.useRef)(t),S=(0,$.useRef)(n),C=()=>S.current,w=()=>C().isVisible()&&C().isOnline(),[x,E,L,N]=pt(r,f),T=(0,$.useRef)({}).current,j=st(s)?n.fallback[f]:s,P=(e,t)=>{let n=!0;for(const r in T){const a=r;"data"===a?o(t[a],e[a])||st(e[a])&&o(t[a],H)||(n=!1):t[a]!==e[a]&&(n=!1)}return n},A=(0,$.useMemo)((()=>{const e=!!f&&!!t&&(st(i)?!C().isPaused()&&!a&&(!!st(l)||l):i),n=t=>{const n=lt(t);return delete n._k,e?{isValidating:!0,isLoading:!0,...n}:n};let r=n(x());const o=n(N());return[()=>{const e=n(x());return P(e,r)?r:r=e},()=>o]}),[r,f]),O=(0,Ze.useSyncExternalStore)((0,$.useCallback)((e=>L(f,((t,n)=>{P(n,t)||e()}))),[r,f]),A[0],A[1]),R=!y.current,I=h[f]&&h[f].length>0,B=O.data,M=st(B)?j:B,F=O.error,D=(0,$.useRef)(M),H=p?st(B)?D.current:B:M,G=!(I&&!st(F))&&(R&&!st(i)?i:!C().isPaused()&&(a?!st(M)&&l:st(M)||l)),W=!!(f&&t&&R&&G),z=st(O.isValidating)?W:O.isValidating,U=st(O.isLoading)?W:O.isLoading,q=(0,$.useCallback)((async e=>{const t=k.current;if(!f||!t||v.current||C().isPaused())return!1;let r,a,s=!0;const i=e||{},l=!m[f]||!i.dedupe,c=()=>kt?!v.current&&f===_.current&&y.current:f===_.current,u={isValidating:!1,isLoading:!1},d=()=>{E(u)},p=()=>{const e=m[f];e&&e[1]===a&&delete m[f]},h={isValidating:!0};st(x().data)&&(h.isLoading=!0);try{if(l&&(E(h),n.loadingTimeout&&st(x().data)&&setTimeout((()=>{s&&c()&&C().onLoadingSlow(f,n)}),n.loadingTimeout),m[f]=[t(b),Nt()]),[r,a]=m[f],r=await r,l&&setTimeout(p,n.dedupingInterval),!m[f]||m[f][1]!==a)return l&&c()&&C().onDiscarded(f),!1;u.error=ot;const e=g[f];if(!st(e)&&(a<=e[0]||a<=e[1]||0===e[1]))return d(),l&&c()&&C().onDiscarded(f),!1;const i=x().data;u.data=o(i,r)?i:r,l&&c()&&C().onSuccess(r,f,n)}catch(e){p();const t=C(),{shouldRetryOnError:n}=t;t.isPaused()||(u.error=e,l&&c()&&(t.onError(e,f,t),(!0===n||it(n)&&n(e))&&w()&&t.onErrorRetry(e,f,t,q,{retryCount:(i.retryCount||0)+1,dedupe:!0})))}return s=!1,d(),!0}),[f,r]),V=(0,$.useCallback)(((...e)=>Tt(r,_.current,...e)),[]);if(Ct((()=>{k.current=t,S.current=n,st(B)||(D.current=B)})),Ct((()=>{if(!f)return;const e=q.bind(ot,Gt);let t=0;const n=((e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const e=r.indexOf(n);e>=0&&(r[e]=r[r.length-1],r.pop())}})(f,h,(n=>{if(0==n){const n=Date.now();C().revalidateOnFocus&&n>t&&w()&&(t=n+C().focusThrottleInterval,e())}else if(1==n)C().revalidateOnReconnect&&w()&&e();else if(2==n)return q()}));return v.current=!1,_.current=f,y.current=!0,E({_k:b}),G&&(st(M)||St?e():(e=>{ut&&typeof window.requestAnimationFrame!=ct?window.requestAnimationFrame(e):setTimeout(e,1)})(e)),()=>{v.current=!0,n()}}),[f]),Ct((()=>{let e;function t(){const t=it(c)?c(M):c;t&&-1!==e&&(e=setTimeout(n,t))}function n(){x().error||!u&&!C().isVisible()||!d&&!C().isOnline()?t():q(Gt).then(t)}return t(),()=>{e&&(clearTimeout(e),e=-1)}}),[c,u,d,f]),(0,$.useDebugValue)(H),a&&st(M)&&f){if(!kt&&St)throw new Error("Fallback data is required when using suspense in SSR.");throw k.current=t,S.current=n,v.current=!1,st(F)?q(Gt):F}return{mutate:V,get data(){return T.data=!0,H},get error(){return T.error=!0,F},get isValidating(){return T.isValidating=!0,z},get isLoading(){return T.isLoading=!0,U}}},function(...e){const t=lt(Rt,(0,$.useContext)(Bt)),[n,r,o]=Dt(e),a=It(t,o);let s=$t;const{use:i}=a,l=(i||[]).concat(Ht);for(let e=l.length;e--;)s=l[e](s);return s(n,r||a.fetcher||null,a)}),zt=((e,t)=>(...n)=>{const[r,o,a]=Dt(n),s=(a.use||[]).concat(t);return e(r,o,{...a,use:s})})(Wt,(e=>(t,n,r)=>(r.revalidateOnFocus=!1,r.revalidateIfStale=!1,r.revalidateOnReconnect=!1,e(t,n,r))));const Ut=JSON.parse('{"dark-plus":{"name":"Dark Plus"},"dracula-soft":{"name":"Dracula Soft"},"dracula":{"name":"Dracula"},"github-dark-dimmed":{"name":"GitHub Dark Dimmed"},"github-dark":{"name":"Github Dark"},"github-light":{"name":"Github Light"},"light-plus":{"name":"Light Plus"},"material-darker":{"name":"Material Darker","alias":"material-theme-darker"},"material-default":{"name":"Material Default","alias":"material-theme"},"material-lighter":{"name":"Material Lighter","alias":"material-theme-lighter"},"material-ocean":{"name":"Material Ocean","alias":"material-theme-ocean"},"material-palenight":{"name":"Material Palenight","alias":"material-theme-palenight"},"min-dark":{"name":"Min Dark"},"min-light":{"name":"Min Light"},"monokai":{"name":"Monokai"},"nord":{"name":"Nord"},"one-dark-pro":{"name":"One Dark Pro"},"poimandres":{"name":"Poimandres"},"rose-pine-dawn":{"name":"Rose Pine Dawn"},"rose-pine-moon":{"name":"Rose Pine Moon"},"rose-pine":{"name":"Rose Pine"},"slack-dark":{"name":"Slack Dark"},"slack-ochin":{"name":"Slack Ochin"},"solarized-dark":{"name":"Solarized Dark"},"solarized-light":{"name":"Solarized Light"},"vitesse-dark":{"name":"Vitesse Dark"},"vitesse-light":{"name":"Vitesse Light"}}'),qt=JSON.parse('{"abap":"ABAP","actionscript-3":"ActionScript 3","ada":"Ada","ansi":"ANSI","apache":"Apache","apex":"Apex","apl":"APL","applescript":"AppleScript","ara":"Ara","asm":"ASM","astro":"Astro","awk":"Awk","ballerina":"Ballerina","bat":"BAT","batch":"Batch","be":"BE","berry":"Berry","bibtex":"BibTeX","bicep":"BICEP","blade":"Blade","c":"C","cadence":"Cadence","cdc":"CDC","clarity":"Clarity","clj":"Clojure","clojure":"Clojure","cmake":"CMake","cobol":"COBOL","codeql":"CodeQL","ql":"CodeQL","coffee":"CoffeeScript","cpp":"C++","crystal":"Crystal","csharp":"C#","c#":"C#","css":"CSS","cue":"CUE","d":"D","dart":"Dart","dax":"DAX","diff":"Diff","docker":"Docker","dream-maker":"DreamMaker","elixir":"Elixir","elm":"Elm","erb":"ERB","html-ruby-erb":"ERB","erlang":"Erlang","fish":"Fish","fsharp":"F#","f#":"F#","fsl":"FSL","gherkin":"Gherkin","git-commit":"Git Commit","git-rebase":"Git Rebase","glsl":"GLSL","gnuplot":"Gnuplot","go":"Go","graphql":"GraphQL","groovy":"Groovy","hack":"Hack","haml":"HAML","handlebars":"Handlebars","haskell":"Haskell","hbs":"HBS","hcl":"HCL","hlsl":"HLSL","html":"HTML","http":"HTTP","ini":"INI","java":"Java","javascript":"JavaScript","js":"JavaScript","jinja-html":"Jinja HTML","json":"JSON","jsonc":"JSONC","jsonnet":"JSONnet","jssm":"JSSM","jsx":"JSX","julia":"Julia","kotlin":"Kotlin","latex":"LaTeX","less":"LESS","liquid":"Liquid","lisp":"Lisp","logo":"Logo","lua":"Lua","make":"Makefile","makefile":"Makefile","markdown":"Markdown","md":"Markdown","marko":"Marko","matlab":"MATLAB","mdx":"MDX","mermaid":"Mermaid","nginx":"Nginx","nim":"Nim","nix":"Nix","objective-c":"Objective-C","objc":"Objective-C","objective-cpp":"Objective-C++","ocaml":"OCaml","pascal":"Pascal","powerquery":"Power Query","perl":"Perl","php":"PHP","plsql":"PLSQL","postcss":"PostCSS","powershell":"PowerShell","ps":"PowerShell","ps1":"PowerShell","prisma":"Prisma","prolog":"Prolog","pug":"Pug","jade":"Pug","puppet":"Puppet","purescript":"PureScript","python":"Python","py":"Python","r":"R","raku":"Raku","perl6":"Raku","razor":"Razor","rel":"Rel","riscv":"RISC-V","rst":"RST","ruby":"Ruby","rb":"Ruby","rust":"Rust","rs":"Rust","sas":"SAS","sass":"Sass","scala":"Scala","scheme":"Scheme","scss":"SCSS","shaderlab":"ShaderLab","shader":"Shader","shellscript":"ShellScript","bash":"ShellScript","shell":"ShellScript","sh":"ShellScript","zsh":"ShellScript","smalltalk":"Smalltalk","solidity":"Solidity","sparql":"SPARQL","sql":"SQL","ssh-config":"SSH Config","stata":"Stata","stylus":"Stylus","styl":"Stylus","svelte":"Svelte","swift":"Swift","system-verilog":"SystemVerilog","tasl":"TASL","tcl":"TCL","tex":"TeX","toml":"TOML","tsx":"TSX","turtle":"Turtle","twig":"Twig","typescript":"TypeScript","ts":"TypeScript","vb":"VB","cmd":"VB","verilog":"Verilog","vhdl":"VHDL","viml":"VimL","vim":"VimL","vimscript":"VimL","vue-html":"Vue HTML","vue":"Vue","wasm":"WASM","wenyan":"Wenyan","文言":"Wenyan","xml":"XML","xsl":"XSL","yaml":"YAML","zenscript":"ZenScript"}'),Vt={"actionscript-3":["as3"],bat:["batch"],berry:["be"],cadence:["cdc"],clojure:["clj"],codeql:["ql"],cpp:["arduino"],csharp:["c#","cs"],erlang:["erl"],fsharp:["f#"],haskell:["hs"],handlebars:["hbs"],"html-ruby-erb":["erb"],java:["javafx"],javascript:["jscript","js"],jssm:["fsl"],make:["makefile"],markdown:["md"],matlab:["matlabkey"],"objective-c":["objc"],pascal:["delphi"],powershell:["ps","ps1"],pug:["jade"],python:["py"],raku:["perl6"],ruby:["rb"],rust:["rs"],shaderlab:["shader"],shellscript:["shell","bash","sh","zsh"],stylus:["styl"],typescript:["ts"],vb:["cmd"],viml:["vim","vimscript"],wenyan:["文言"],xml:["coldfusion"],yaml:["yml"]},Kt=e=>{if(e)return Object.keys(Vt).find((t=>Vt[t].includes(e)))},Jt=(e=>{const t=Object.values(Vt).flat();return Object.keys(e).reduce(((n,r)=>(t.includes(r)||(n[r]=e[r]),n)),{})})(qt),Qt=e=>"ansi"===e?"shellscript":e,Xt=e=>{let{theme:t,lang:n,ready:r}=e;if(!r)throw new Error;const o=(0,s.applyFilters)("blocks.codeBlockPro.theme",t),a=Ut?.[o]?.alias;return Ye({langs:[Qt(n)],theme:null!=a?a:o})};let Yt=!1;const Zt=e=>{let{theme:t,lang:n,ready:o=!0}=e;const[a,i]=(0,r.useState)(!1);if(!Yt){Yt=!0;const e=window.codeBlockPro?.pluginUrl+"build/shiki/";l=(0,s.applyFilters)("blocks.codeBlockPro.assetDir",e),Le=l.endsWith("/")?l:l+"/"}var l;const{data:c,error:u}=zt({theme:t,lang:n,ready:o&&a},Xt);return(0,r.useEffect)((()=>{const e=window.codeBlockPro?.pluginUrl+"build/shiki/";fetch(e+"dist/onig.wasm").then((e=>e.arrayBuffer())).then((e=>{Ne=e,i(!0)}))}),[]),{highlighter:c,error:u,loading:!c&&!u||!a}},en=q()(Z(J(((e,t)=>({previousLanguage:"javascript",setPreviousLanguage(n){e({previousLanguage:n}),t().addRecentLanguage(n)},recentLanguages:[],addRecentLanguage(t){e((e=>{var n;return e.recentLanguages.includes(t)?e:{recentLanguages:[...null!==(n=e.recentLanguages?.slice(-2))&&void 0!==n?n:[],t]}}))}})),{name:"Code Block Pro Language"}),{name:"code-block-pro-last-language",getStorage:()=>localStorage,partialize:e=>{var t,n;return{previousLanguage:null!==(t=e?.previousLanguage)&&void 0!==t?t:null,recentLanguages:null!==(n=e?.recentLanguages)&&void 0!==n?n:[]}}})),tn=(e,t)=>{try{return JSON.parse(`[${null!=e?e:""}]`).map((e=>{const n=isNaN(Number(t))?0:Math.max(Number(t)-1,0);return"number"==typeof e?e-n:Array.from({length:e[1]-e[0]+1},((t,r)=>e[0]+r-n))})).filter((e=>!Array.isArray(e)||e?.length>0)).flat().filter((e=>e>=0))}catch(e){return[]}},nn=e=>{const t=JSON.parse(`[${null!=e?e:""}]`).filter((e=>Array.isArray(e))),n=t.some((e=>e.some((e=>Array.isArray(e)))));if(n)throw new Error("Nested arrays not allowed");if(t.some((e=>e[0]>=e[1])))throw new Error("Nested arrays must be in order");return!0},rn=e=>{let{attributes:t,setAttributes:n}=e;const{language:o,theme:a,code:l="",bgColor:c,textColor:u,disablePadding:h,lineNumbersWidth:g,lineNumbers:m,startingLineNumber:f,footerType:b,fontSize:y,fontFamily:v,lineHeight:_,lineBlurs:k,lineHighlights:S,enableBlurring:C,enableHighlighting:w,seeMoreAfterLine:x,seeMoreTransition:E,enableMaxHeight:L,editorHeight:N}=t,T=(0,r.useRef)(null),{previousLanguage:j}=en(),{highlighter:P,error:A,loading:O}=Zt({theme:a,lang:null!=o?o:j}),R=b&&"none"!==b;(e=>{let{attributes:t,setAttributes:n}=e;const{theme:o,fontSize:a,fontFamily:s,lineHeight:i,copyButton:l,headerType:c,footerType:u,clampFonts:d,disablePadding:p,lineNumbers:h}=t,{previousSettings:g}=ee(),{previousTheme:m,previousFontSize:f,previousFontFamily:b,previousLineHeight:y,previousHeaderType:v,previousFooterType:_,previousClampFonts:k,previousDisablePadding:S,previousLineNumbers:C}=ae(),w=(0,r.useRef)(!1);(0,r.useEffect)((()=>{w.current||void 0===l&&g.copyButton&&n({copyButton:g.copyButton})}),[g,l,n]),(0,r.useEffect)((()=>{w.current||!o&&m&&n({theme:m})}),[m,o,n]),(0,r.useEffect)((()=>{w.current||!a&&f&&n({fontSize:f})}),[f,a,n]),(0,r.useEffect)((()=>{w.current||s||""===s||void 0===b||n({fontFamily:b})}),[b,s,n]),(0,r.useEffect)((()=>{w.current||!i&&y&&n({lineHeight:y})}),[y,i,n]),(0,r.useEffect)((()=>{w.current||!c&&v&&n({headerType:v})}),[v,c,n]),(0,r.useEffect)((()=>{w.current||void 0===u&&void 0!==_&&n({footerType:_})}),[_,u,n]),(0,r.useEffect)((()=>{w.current||void 0===d&&void 0!==k&&n({clampFonts:k})}),[k,d,n]),(0,r.useEffect)((()=>{w.current||void 0===p&&void 0!==S&&n({disablePadding:S})}),[S,p,n]),(0,r.useEffect)((()=>{w.current||void 0===h&&void 0!==C&&n({lineNumbers:C})}),[C,h,n]),(0,r.useEffect)((()=>{requestAnimationFrame((()=>{w.current=!0}))}),[])})({attributes:t,setAttributes:n});const I=(0,r.useCallback)((()=>w?tn(S,f).map((e=>({line:e,classes:["cbp-line-highlight"]}))):[]),[w,S,f]),B=(0,r.useCallback)((()=>C?tn(k,f).map((e=>({line:e,classes:["cbp-no-blur"]}))):[]),[C,k,f]);return(0,r.useEffect)((()=>{P&&n({bgColor:P.getBackgroundColor(),textColor:P.getForegroundColor()})}),[a,P,n]),(0,r.useEffect)((()=>{if(!P)return;const e=null!=o?o:j,r=Qt(e),a=(0,p.decodeEntities)(l),i=[...I(),...B(),L&&!Number.isNaN(x)?{line:Number(x),classes:["cbp-see-more-line",E?"cbp-see-more-transition":""]}:{}],c="ansi"===e?P.ansiToHtml(a,{lineOptions:i}):P.codeToHtml(a,{lang:r,lineOptions:i}),d=(0,s.applyFilters)("blocks.codeBlockPro.codeHTML",c,t),h=F(u).saturate(.5).alpha(.2).toRgbString();n({codeHTML:d,lineHighlightColor:h})}),[P,x,E,u,l,L,o,n,j,t,S,k,B,I]),(0,r.useLayoutEffect)((()=>{var e,t,r;if(!T.current)return;if(!m)return void n({lineNumbersWidth:void 0});const o=Array.from(null!==(e=T?.current?.querySelectorAll(".line"))&&void 0!==e?e:[])?.at(-1);o?.classList?.add("cbp-line-number-width-forced");const a=null!==(t=o?.getBoundingClientRect()?.width)&&void 0!==t?t:0;o?.classList.add("cbp-line-number-disabled");const s=null!==(r=o?.getBoundingClientRect()?.width)&&void 0!==r?r:0;o?.classList.remove("cbp-line-number-disabled"),o?.classList?.remove("cbp-line-number-width-forced"),a-s>0&&n({lineNumbersWidth:a-s-12})}),[m,f,l,O,A,T,n,y,v,_]),O||P?O&&l||A?(0,r.createElement)("div",{className:"p-6 px-4 text-left",style:{backgroundColor:c,color:u}},null!==(M=A?.message)&&void 0!==M?M:""):(0,r.createElement)("div",{ref:T,style:{maxHeight:Number(N)?Number(N):void 0,overflow:Number(N)?"auto":void 0}},(0,r.createElement)(H(),{value:(0,p.decodeEntities)(l),onValueChange:e=>n({code:(0,d.escapeHTML)(e)}),padding:{top:h?0:16,bottom:h||R?0:16,left:!m&&h?0:m?h?(null!=g?g:0)+16:(null!=g?g:0)+32:16,right:0},style:{backgroundColor:c,color:u},onKeyDown:e=>"Tab"===e.key&&T.current?.querySelector("textarea")?.focus(),highlight:e=>P?.codeToHtml((0,p.decodeEntities)(e),{lang:Qt(null!=o?o:j),lineOptions:[...I(),...B()]})?.replace(/<\/?[pre|code][^>]*>/g,"")})):(0,r.createElement)("div",{className:"p-8 px-4 text-left",style:{backgroundColor:c,color:u}},(0,i.sprintf)((0,i.__)("Theme %s not found. Please select a different theme.","code-block-pro"),a));var M},on=window.wp.components,an=window.wp.data,sn=()=>(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:24,height:24},fill:"none",viewBox:"0 0 24 24",stroke:"#1e1e1e",strokeWidth:"2"},(0,r.createElement)("path",{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"}));function ln(){return ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ln.apply(this,arguments)}const cn=e=>{let{language:t,bgColor:n,textColor:o,footerString:a,footerLink:s,footerLinkTarget:i,disablePadding:l}=e;const c=F(n),u=F(o),d=u.isDark()?u.lighten(.05):u.darken(.05);return(0,r.createElement)("span",{style:{display:"flex",alignItems:"flex-end",padding:l?"10px 0 0 0":"10px",width:"100%",justifyContent:"flex-end",backgroundColor:c.toHex(),color:d.toHex(),fontSize:"12px",lineHeight:"1",position:"relative"}},(0,r.createElement)(un,{text:a||Jt[t],color:d.toHex(),link:s,linkTarget:i}))},un=e=>{let{text:t,color:n,link:o,linkTarget:a}=e;if(!o)return(0,r.createElement)(r.Fragment,null,t);const s={color:n,textDecoration:"none",fontWeight:"normal",border:"none",background:"none",borderRadius:"0",padding:"0",margin:"0"};return a?(0,r.createElement)("a",{className:"cbp-footer-link",href:o,style:s,target:"_blank",rel:"noopener noreferrer"},t):(0,r.createElement)("a",{className:"cbp-footer-link",href:o,style:s},t)},dn=e=>{let{language:t,bgColor:n,textColor:o,footerString:a,footerLink:s,footerLinkTarget:i,disablePadding:l}=e;const c=F(n),u=F(o),d=u.isDark()?u.lighten(.05):u.darken(.05);return(0,r.createElement)("span",{style:{display:"flex",alignItems:"flex-end",padding:l?"10px 0 0 0":"10px",width:"100%",justifyContent:"flex-start",backgroundColor:c.toHex(),color:d.toHex(),fontSize:"12px",lineHeight:"1",position:"relative"}},(0,r.createElement)(pn,{text:a||Jt[t],color:d.toHex(),link:s,linkTarget:i}))},pn=e=>{let{text:t,color:n,link:o,linkTarget:a}=e;if(!o)return(0,r.createElement)(r.Fragment,null,t);const s={color:n,textDecoration:"none",fontWeight:"normal",border:"none",background:"none",borderRadius:"0",padding:"0",margin:"0"};return a?(0,r.createElement)("a",{className:"cbp-footer-link",href:o,style:s,target:"_blank",rel:"noopener noreferrer"},t):(0,r.createElement)("a",{className:"cbp-footer-link",href:o,style:s},t)},hn=e=>{let{attributes:t,onClick:n}=e;const{footerType:o,...a}=t,{bgColor:s}=t,l={none:(0,i.__)("None","code-block-pro"),simpleStringEnd:(0,i.__)("Simple string end","code-block-pro"),simpleStringStart:(0,i.__)("Simple string start","code-block-pro")};return(0,r.createElement)("div",{className:"code-block-pro-editor"},Object.entries(l).map((e=>{let[t,l]=e;return(0,r.createElement)(on.BaseControl,{id:`code-block-pro-footer-${t}`,label:o===t?(0,i.sprintf)((0,i.__)("%s (current)","code-block-pro"),l):l,help:["simpleStringEnd","simpleStringStart"].includes(t)?(0,i.__)("Update extras in the Settings panel","code-block-pro"):void 0,key:t},(0,r.createElement)("button",{id:`code-block-pro-footer-${t}`,type:"button",onClick:()=>n(t),className:"p-0 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto"},(0,r.createElement)("span",{className:"pointer-events-none w-full"},(0,r.createElement)("span",{className:"block w-full h-8",style:{backgroundColor:s}}),(0,r.createElement)(gn,ln({footerType:t},a)))))})))},gn=e=>{const{footerType:t}=e;return"simpleStringEnd"===t?(0,r.createElement)(cn,e):"simpleStringStart"===t?(0,r.createElement)(dn,e):null},mn=e=>{let{bgColor:t}=e;return(0,r.createElement)("span",{style:{display:"block",padding:"16px 0 0 16px",marginBottom:"-1px",width:"100%",textAlign:"left",backgroundColor:t}},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:54,height:14,viewBox:"0 0 54 14"},(0,r.createElement)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)"},(0,r.createElement)("circle",{cx:"6",cy:"6",r:"6",fill:"#FF5F56",stroke:"#E0443E",strokeWidth:".5"}),(0,r.createElement)("circle",{cx:"26",cy:"6",r:"6",fill:"#FFBD2E",stroke:"#DEA123",strokeWidth:".5"}),(0,r.createElement)("circle",{cx:"46",cy:"6",r:"6",fill:"#27C93F",stroke:"#1AAB29",strokeWidth:".5"}))))},fn=e=>{let{textColor:t,bgColor:n}=e;return(0,r.createElement)("span",{style:{display:"block",padding:"16px 0 0 16px",marginBottom:"-1px",width:"100%",textAlign:"left",backgroundColor:n}},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:54,height:14,viewBox:"0 0 54 14"},(0,r.createElement)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)"},(0,r.createElement)("circle",{cx:"6",cy:"6",r:"6",fill:F(t).alpha(.2).toHex(),stroke:F(t).alpha(.3).toHex(),strokeWidth:".5"}),(0,r.createElement)("circle",{cx:"26",cy:"6",r:"6",fill:F(t).alpha(.2).toHex(),stroke:F(t).alpha(.3).toHex(),strokeWidth:".5"}),(0,r.createElement)("circle",{cx:"46",cy:"6",r:"6",fill:F(t).alpha(.2).toHex(),stroke:F(t).alpha(.3).toHex(),strokeWidth:".5"}))))},bn=e=>{let{bgColor:t}=e;const n=F(t),o=n.isDark()?n.lighten(.05):n.darken(.05);return(0,r.createElement)("span",{style:{display:"flex",alignItems:"center",padding:"10px 0px 10px 16px",marginBottom:"-2px",width:"100%",textAlign:"left",backgroundColor:o.toHex()}},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:62,height:20,viewBox:"0 0 62 20"},(0,r.createElement)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)"},(0,r.createElement)("circle",{cx:"8",cy:"8",r:"8",fill:t,stroke:t,strokeWidth:".5"}),(0,r.createElement)("circle",{cx:"30",cy:"8",r:"8",fill:t,stroke:t,strokeWidth:".5"}),(0,r.createElement)("circle",{cx:"52",cy:"8",r:"8",fill:t,stroke:t,strokeWidth:".5"}))))},yn=e=>{let{language:t,bgColor:n,textColor:o,headerString:a}=e;const s=F(n),i=s.isDark()?s.lighten(.05):s.darken(.05),l=F(o),c=l.isDark()?l.lighten(.05):l.darken(.05);return(0,r.createElement)("span",{style:{display:"flex",alignItems:"center",padding:"10px 0px 10px 16px",marginBottom:"-2px",width:"100%",textAlign:"left",backgroundColor:i.toHex(),color:c.toHex()}},a||Jt[t])},vn=e=>{let{attributes:t,onClick:n}=e;const{headerType:o,...a}=t,{bgColor:s}=t,l={none:(0,i.__)("None","code-block-pro"),headlights:(0,i.__)("Headlights","code-block-pro"),headlightsMuted:(0,i.__)("Headlights muted","code-block-pro"),headlightsMutedAlt:(0,i.__)("Headlights muted alt","code-block-pro"),simpleString:(0,i.__)("Simple string","code-block-pro")};return(0,r.createElement)("div",{className:"code-block-pro-editor"},Object.entries(l).map((e=>{let[t,l]=e;return(0,r.createElement)(on.BaseControl,{id:`code-block-pro-header-${t}`,label:o===t?(0,i.sprintf)((0,i.__)("%s (current)","code-block-pro"),l):l,help:["simpleString"].includes(t)?(0,i.__)("Update extras in the Settings panel","code-block-pro"):void 0,key:t},(0,r.createElement)("button",{id:`code-block-pro-header-${t}`,type:"button",onClick:()=>n(t),className:"p-0 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto"},(0,r.createElement)("span",{className:"pointer-events-none w-full"},(0,r.createElement)(kn,ln({headerType:t},a)),(0,r.createElement)("span",{className:"block w-full h-8",style:{backgroundColor:s}}))))})))},kn=e=>{const{headerType:t}=e;return"headlights"===t?(0,r.createElement)(mn,e):"headlightsMuted"===t?(0,r.createElement)(fn,e):"headlightsMutedAlt"===t?(0,r.createElement)(bn,e):"simpleString"===t?(0,r.createElement)(yn,e):null},Sn=e=>{let{bgColor:t,textColor:n,seeMoreString:o,disablePadding:a,context:s,footerType:l}=e;const c=F(t).toHex(),u=F(n),d=u.isDark()?u.lighten(.05).toHex():u.darken(.05).toHex(),p="none"!==l,h="editor"===s;return(0,r.createElement)("div",{className:"cbp-see-more-container",style:{display:"front"===s?"none":"flex",flexDirection:"column",alignItems:"flex-start",width:"100%",backgroundColor:"transparent",fontSize:"12px",lineHeight:"1",position:"relative",marginBottom:p||h?0:"-16px",height:p&&!h?"16px":"32px"}},(0,r.createElement)("span",{role:h?"presentation":"button",tabIndex:h?-1:0,className:"cbp-see-more-simple-btn cbp-see-more-simple-btn-hover",style:{color:d,backgroundColor:c,padding:a?"10px 0 0":"10px 16px",cursor:"default"}},o||(0,i.__)("Expand","code-block-pro")))},Cn=e=>{let{bgColor:t,textColor:n,seeMoreString:o,disablePadding:a,context:s,footerType:l}=e;const c=F(t).toHex(),u=F(n),d=u.isDark()?u.lighten(.05).toHex():u.darken(.05).toHex(),p="none"!==l,h="editor"===s;return(0,r.createElement)("div",{className:"cbp-see-more-container",style:{display:"front"===s?"none":"flex",flexDirection:"column",alignItems:"flex-end",width:"100%",backgroundColor:"transparent",fontSize:"12px",lineHeight:"1",position:"relative",marginBottom:p||h?0:"-16px",height:p&&!h?"16px":"32px"}},(0,r.createElement)("span",{role:h?"presentation":"button",tabIndex:h?-1:0,className:"cbp-see-more-simple-btn cbp-see-more-simple-btn-hover",style:{color:d,backgroundColor:c,padding:a?"10px 0 0":"10px 16px",cursor:"default"}},o||(0,i.__)("Expand","code-block-pro")))},wn=e=>{let{bgColor:t,textColor:n,seeMoreString:o,context:a,footerType:s}=e;const l=F(t),c=F(n),u=l.isDark()?c.lighten(.15).toHex():c.darken(.15).toHex(),d=l.isDark()?l.lighten(.1):l.darken(.1),p="none"!==s,h="editor"===a;return(0,r.createElement)("div",{className:"cbp-see-more-container",style:{display:"front"===a?"none":"flex",flexDirection:"column",alignItems:"center",width:"100%",fontSize:"12px",lineHeight:"1",position:"relative",paddingTop:p?0:"4px",marginBottom:p||h?0:"-16px",height:p&&!h?0:"32px"}},!p&&(0,r.createElement)("div",{style:{backgroundColor:l.toHex(),height:"50%",position:"absolute",top:0,left:0,right:0},"aria-hidden":"true"}),(0,r.createElement)("span",{role:h?"presentation":"button",tabIndex:h?-1:0,className:"cbp-see-more-simple-btn cbp-see-more-simple-btn-hover",style:{color:u,backgroundColor:d.toHex(),padding:"6px 14px",cursor:"default",position:"relative",borderRadius:"6px",transform:p?"translateY(-50%)":void 0}},o||(0,i.__)("Expand","code-block-pro")))},xn=e=>{let{attributes:t,onClick:n}=e;const{seeMoreType:o,...a}=t,{bgColor:s}=t,l={none:(0,i.__)("None","code-block-pro"),roundCenter:(0,i.__)("See more center","code-block-pro"),blockLeft:(0,i.__)("See more left","code-block-pro"),blockRight:(0,i.__)("See more right","code-block-pro")};return(0,r.createElement)("div",{className:"code-block-pro-editor"},Object.entries(l).map((e=>{let[t,l]=e;return(0,r.createElement)(on.BaseControl,{id:`code-block-pro-see-more-${t}`,label:o!==t&&o?l:(0,i.sprintf)((0,i.__)("%s (current)","code-block-pro"),l),key:t},(0,r.createElement)("button",{id:`code-block-pro-see-more-${t}`,type:"button",onClick:()=>n(t),className:"p-0 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto"},(0,r.createElement)("span",{className:"pointer-events-none w-full"},(0,r.createElement)("span",{className:"block w-full h-8",style:{backgroundColor:s}}),(0,r.createElement)(En,ln({seeMoreType:t,context:"editor"},a)))))})))},En=e=>{const{seeMoreType:t,enableMaxHeight:n,context:o}=e;return n?"roundCenter"===t?(0,r.createElement)(wn,ln({},e,{context:o})):"blockLeft"===t?(0,r.createElement)(Sn,ln({},e,{context:o})):"blockRight"===t?(0,r.createElement)(Cn,ln({},e,{context:o})):null:null},Ln=e=>{let{attributes:t,setAttributes:n}=e;const[o,a]=(0,r.useState)(t.language),{previousLanguage:s,setPreviousLanguage:i}=en();return(0,r.useEffect)((()=>{o||n({language:s})}),[o,s,n]),(0,r.useEffect)((()=>{a(t.language)}),[t.language]),[o,e=>{n({language:e}),a(e),i(e)}]},Nn=e=>{let{value:t,onChange:n}=e;return(0,r.createElement)(on.FontSizePicker,{onChange:e=>{n(null!=e?e:".875rem")},value:t,fontSizes:[{name:"Tiny",size:".75rem",slug:"tiny"},{name:"Small",size:".875rem",slug:"small"},{name:"Normal",size:"1rem",slug:"normal"},{name:"Big",size:"1.125rem",slug:"big"}]})},Tn=e=>{let{value:t,onChange:n}=e;return(0,r.createElement)(on.FontSizePicker,{onChange:e=>{n(null!=e?e:".875rem")},value:t,fontSizes:[{name:"None",size:"1rem",slug:"none"},{name:"Tight",size:"1.25rem",slug:"tight"},{name:"Normal",size:"1.5rem",slug:"normal"},{name:"Relaxed",size:"1.625rem",slug:"relaxed"}]})},jn=e=>{let{value:t,onChange:n}=e;const o={"":(0,i.__)("System Default","code-block-pro"),"Code-Pro-JetBrains-Mono":"JetBrains Mono","Code-Pro-Fira-Code":"Fira Code"};return(0,r.createElement)(on.SelectControl,{id:"code-block-pro-font-family",label:(0,i.__)("Font Family","code-block-pro"),help:(0,i.__)("Fonts only render on the frontend.","code-block-pro"),value:t,onChange:n,options:Object.entries(o).map((e=>{let[t,n]=e;return{label:n,value:t}}))})},Pn=e=>{var t,n,o,a,s;let{attributes:l,setAttributes:c}=e;const[u,d]=(0,r.useState)(null!==(t=l?.editorHeight)&&void 0!==t&&t),[p,h]=(0,r.useState)(null!==(n=l?.enableMaxHeight)&&void 0!==n&&n),[g,m]=(0,r.useState)(null!==(o=l?.seeMoreString)&&void 0!==o?o:""),[f,b]=(0,r.useState)(null!==(a=l?.seeMoreAfterLine)&&void 0!==a?a:""),[y,v]=(0,r.useState)(null!==(s=l?.seeMoreTransition)&&void 0!==s&&s),_=(0,r.useRef)(Number(l?.editorHeight)>0);return(0,r.useEffect)((()=>{c({editorHeight:u,seeMoreString:g,seeMoreAfterLine:f,seeMoreTransition:y,enableMaxHeight:p})}),[u,g,f,y,c,p]),(0,r.createElement)(on.PanelBody,{title:(0,i.__)("Max Height","code-block-pro"),initialOpen:_.current},(0,r.createElement)(on.BaseControl,{id:"code-block-pro-editor-height"},(0,r.createElement)(on.TextControl,{spellCheck:!1,autoComplete:"off","data-cy-cbp":"editor-height",type:"number",label:(0,i.__)("Max editor height","code-block-pro"),help:(0,i.__)("Admin only. Set to 0 to disable.","code-block-pro"),placeholder:"0",onChange:d,value:u})),(0,r.createElement)(on.BaseControl,{id:"code-block-pro-see-more-enabled"},(0,r.createElement)(on.CheckboxControl,{label:(0,i.__)("Enable max height","code-block-pro"),"data-cy":"enable-max-height",checked:p,onChange:h})),p&&(0,r.createElement)(r.Fragment,null,(0,r.createElement)(on.BaseControl,{id:"code-block-pro-see-more-text"},(0,r.createElement)(on.TextControl,{"data-cy":"see-more-text",spellCheck:!1,autoComplete:"off",label:(0,i.__)("See more text","code-block-pro"),placeholder:(0,i.__)("Expand","code-block-pro"),onChange:m,value:null!=g?g:""})),(0,r.createElement)(on.BaseControl,{id:"code-block-pro-see-more-line"},(0,r.createElement)(on.TextControl,{"data-cy":"see-more-line",spellCheck:!1,autoComplete:"off",label:(0,i.__)("Hide after line","code-block-pro"),help:(0,i.__)("Enter the last visible line number.","code-block-pro"),onChange:b,value:f})),(0,r.createElement)(on.BaseControl,{id:"code-block-pro-see-more-transition"},(0,r.createElement)(on.CheckboxControl,{label:(0,i.__)("Animate height transition","code-block-pro"),checked:y,onChange:v})),(0,r.createElement)(xn,{attributes:l,onClick:e=>{c({seeMoreType:e})}})))},An="/wp/v2/settings",On=async e=>(await ne()({path:An}))?.[e],Rn=q()(Z(J((e=>({seenNotices:[],hiddenThemes:[],setSeenNotice(t){e((e=>e.seenNotices.includes(t)?e:{seenNotices:[...e.seenNotices,t]}))},toggleHiddenTheme(t){e((e=>({hiddenThemes:e.hiddenThemes.includes(t)?e.hiddenThemes.filter((e=>e!==t)):[...e.hiddenThemes,t]})))}})),{name:"Code Block Pro Settings"}),{name:"code_block_pro_settings_2",getStorage:()=>({getItem:async e=>{var t;const n=await On(e);return JSON.stringify({version:null!==(t=n?.version)&&void 0!==t?t:0,state:n})},setItem:async(e,t)=>{var n;const{state:r,version:o}=JSON.parse(t),a={[e]:Object.assign(null!==(n=await On(e))&&void 0!==n?n:{},r,o)};await ne()({path:An,method:"POST",data:a})},removeItem:async e=>{const t={[e]:null};return await ne()({path:An,method:"POST",data:t})}})})),In=()=>Object.entries((0,s.applyFilters)("blocks.codeBlockPro.themes",Ut)).map((e=>{let[t,{name:n,priority:r}]=e;return{name:n,slug:t,priority:r}})),Bn=()=>In().filter((e=>{let{priority:t}=e;return t})),Mn=e=>{let{search:t,setSearch:n}=e;const[o,a]=(0,r.useState)(!1);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"code-block-pro-editor"},(0,r.createElement)(on.BaseControl,{id:"code-block-pro-filter-themes"},(0,r.createElement)(on.TextControl,{id:"code-block-pro-search-themes",spellCheck:!1,autoComplete:"off",label:(0,i.__)("Search themes","code-block-pro"),onChange:n,value:t}),(0,r.createElement)(on.Button,{className:"block -mt-4 mb-4","data-cy":"manage-themes",variant:"link",onClick:()=>a(!0)},(0,i.__)("Manage themes","code-block-pro")))),o&&(0,r.createElement)(Fn,{closeModal:()=>a(!1)}))},Fn=e=>{let{closeModal:t}=e;const{hiddenThemes:n,toggleHiddenTheme:o}=Rn(),a=Bn();return(0,r.createElement)(on.Modal,{title:(0,i.__)("Manage Themes","code-block-pro"),onRequestClose:t,className:"code-block-pro-editor"},(0,r.createElement)("div",{id:"code-block-pro-theme-manager",className:"flex flex-col gap-4"},a?.length>0?(0,r.createElement)("div",{className:"flex flex-col gap-4 bg-gray-100 p-4"},(0,r.createElement)("h2",{className:"m-0 my-2 text-center"},(0,i.__)("Priority themes","code-block-pro")),(0,r.createElement)("div",{className:"md:grid gap-3 grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"},a.map((e=>{let{name:t,slug:a}=e;return(0,r.createElement)(on.ToggleControl,{key:a,checked:!n.includes(a),label:t,onChange:()=>o(a)})})))):null,(0,r.createElement)("div",{className:c()("md:grid grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",{"p-4":a?.length>0})},In().filter((e=>{let{priority:t}=e;return!t})).map((e=>{let{name:t,slug:a}=e;return(0,r.createElement)(on.ToggleControl,{key:a,checked:!n.includes(a),label:t,onChange:()=>o(a)})}))),a?.length>0?null:(0,r.createElement)("div",{className:"font-semibold text-base"},(0,r.createElement)(on.ExternalLink,{href:"https://code-block-pro.com/themes?utm_campaign=notice&utm_source=manage-themes"},(0,i.__)("Get 25+ more themes here","code-block-pro")))))},Dn=e=>{if(e)return[e,"ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas","monospace"].join(",")},Hn=(e,t)=>{if(e)return t&&parseFloat(e)?`clamp(${16*parseFloat(e)}px, ${e}, ${24*parseFloat(e)}px)`:e},Gn=e=>{let{id:t,theme:n,lang:o,onClick:a,code:s,fontSize:l,lineHeight:c,fontFamily:u,clampFonts:d}=e;const[h,g]=(0,r.useState)(!1),{highlighter:m,error:f,loading:b}=Zt({theme:n,lang:s?o:"c",ready:h}),[y,v]=(0,r.useState)(""),[_,k]=(0,r.useState)("#ffffff"),S=(0,r.useRef)(new IntersectionObserver((e=>{let[t]=e;t.isIntersecting&&(g(!0),S.current.disconnect())}))),C="\nfloat Q_rsqrt( float number )\n{\n long i;\n float x2, y;\n const float threehalfs = 1.5F;\n\n x2 = number * 0.5F;\n y = number;\n i = * ( long * ) &y; // evil floating point bit level hacking\n i = 0x5f3759df - ( i >> 1 ); // what the frack?\n y = * ( float * ) &i;\n y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration\n// y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed\n\n return y;\n}".trim();return(0,r.useEffect)((()=>{if(!m)return;if("ansi"===o&&s)return v(m.ansiToHtml(s)),void k(m.getBackgroundColor());const e=s?m.codeToHtml((0,p.decodeEntities)(s),{lang:o}):m.codeToHtml((0,p.decodeEntities)(C),{lang:"c"});v(e),k(m.getBackgroundColor())}),[m,o,s,C]),(0,r.createElement)("button",{id:t,type:"button",onClick:a,className:"cbp-theme-preview p-4 px-3 border flex items-start w-full text-left outline-none cursor-pointer no-underline ring-offset-2 ring-offset-white focus:shadow-none focus:ring-wp overflow-x-auto max-h-80 overflow-y-hidden",style:{backgroundColor:_,minHeight:"50px"}},b||f||!h?(0,r.createElement)("span",{id:t,ref:e=>{e&&S.current.observe(e)},style:{minHeight:"200px"},className:"flex items-center justify-center p-6 w-full"},f?.message||(0,i.__)("Loading...","code-block-pro")):(0,r.createElement)("span",{className:"pointer-events-none",style:{fontSize:Hn(l,d),fontFamily:Dn(u),lineHeight:Hn(c,d)},dangerouslySetInnerHTML:{__html:y}}))},$n=e=>{const{hiddenThemes:t}=Rn(),n=(0,s.applyFilters)("blocks.codeBlockPro.themes",Ut),o=Object.entries(n).filter((e=>{let[n]=e;return!t.includes(n)})).filter((t=>{let[n]=t;return n.includes(e.search.toLocaleLowerCase())})).map((e=>{let[t,{name:n,priority:r}]=e;return{name:n,slug:t,priority:r}})).sort(((e,t)=>e.priority===t.priority?0:e.priority?-1:1)),a=Bn();return(0,r.createElement)("div",{className:"code-block-pro-editor"},e.search?.length>0?(0,r.createElement)(on.BaseControl,{id:"add-on-themes"},a?.length>0?null:(0,r.createElement)("div",{className:"font-semibold text-base"},(0,r.createElement)(on.ExternalLink,{href:"https://code-block-pro.com/?utm_campaign=notice&utm_source=search"},(0,i.__)("Get 25+ more themes here","code-block-pro")))):null,o.slice(0,9).map((t=>{let{name:n,slug:o}=t;return(0,r.createElement)(Wn,ln({key:o,slug:o,name:n},e))})),e.search?.length>0?null:(0,r.createElement)(on.BaseControl,{id:"add-on-themes"},a?.length>0?null:(0,r.createElement)("div",{className:"font-semibold text-base"},(0,r.createElement)(on.ExternalLink,{href:"https://code-block-pro.com/themes?utm_campaign=notice&utm_source=mid-themes"},(0,i.__)("Get 25+ more themes here","code-block-pro")))),o.slice(9).map((t=>{let{name:n,slug:o}=t;return(0,r.createElement)(Wn,ln({key:o,slug:o,name:n},e))})),e.search?.length>0?null:(0,r.createElement)(on.BaseControl,{id:"add-on-themes"},a?.length>0?null:(0,r.createElement)("div",{className:"font-semibold text-base"},(0,r.createElement)(on.ExternalLink,{href:"https://code-block-pro.com/themes?utm_campaign=notice&utm_source=below-themes"},(0,i.__)("Get 25+ more themes here","code-block-pro")))))},Wn=e=>{let{slug:t,name:n,theme:o,language:a,code:s,fontSize:l,lineHeight:c,fontFamily:u,clampFonts:d,onClick:p}=e;return(0,r.createElement)(on.BaseControl,{id:`code-block-pro-theme-${t}`,label:o===t?(0,i.sprintf)((0,i.__)("%s (current)","code-block-pro"),n):n},(0,r.createElement)(Gn,{id:`code-block-pro-theme-${t}`,theme:t,lang:a,fontSize:l,lineHeight:c,fontFamily:u,clampFonts:d,onClick:()=>{p(t)},code:s}))},zn=e=>{let{attributes:t,setAttributes:n}=e;const{updateThemeHistory:o}=ae(),[a,s]=(0,r.useState)(""),l=(()=>{const[e,t]=(0,r.useState)(Rn.persist.hasHydrated);return(0,r.useEffect)((()=>{const e=Rn.persist.onFinishHydration((()=>t(!0)));return()=>{e()}}),[]),e})();return(0,r.createElement)(on.PanelBody,{title:(0,i.__)("Themes","code-block-pro"),initialOpen:!1},l&&(0,r.createElement)(Mn,{search:a,setSearch:s}),l&&(0,r.createElement)($n,ln({},t,{search:a,onClick:e=>{n({theme:e}),o({...t,theme:e})}})))},Un=e=>{var t,n,o;let{attributes:a,setAttributes:s}=e;const l=(0,r.useRef)(null);return(0,r.useEffect)((()=>{try{nn(a.lineBlurs),l.current?.querySelector("input")?.classList.remove("cbp-input-error")}catch(e){console.error(e),l.current?.querySelector("input")?.classList.add("cbp-input-error")}}),[a.lineBlurs]),(0,r.createElement)(on.BaseControl,{id:"code-block-pro-show-blurring"},(0,r.createElement)(on.CheckboxControl,{"data-cy":"enable-blur",label:(0,i.__)("Enable blur emphesis","code-block-pro"),help:(0,i.__)("Blur surrounding code to focus on specific lines.","code-block-pro"),checked:null!==(t=a.enableBlurring)&&void 0!==t&&t,onChange:e=>{s({enableBlurring:e})}}),a.enableBlurring&&(0,r.createElement)(on.BaseControl,{id:"code-block-pro-show-blurred-lines"},(0,r.createElement)("div",{ref:l},(0,r.createElement)(on.TextControl,{id:"code-block-pro-show-blurred-lines",spellCheck:!1,autoComplete:"off",label:(0,i.__)("Focus on the following","code-block-pro"),help:(0,i.sprintf)((0,i.__)("Try %1$s or %2$s for a range.","code-block-pro"),"1,5","1,[3,5]"),onChange:e=>{s({lineBlurs:e})},value:null!==(n=a?.lineBlurs)&&void 0!==n?n:""})),(0,r.createElement)(on.CheckboxControl,{label:(0,i.__)("Remove blur on hover","code-block-pro"),checked:null!==(o=a.removeBlurOnHover)&&void 0!==o&&o,onChange:e=>{s({removeBlurOnHover:e})}})))},qn=e=>{var t,n;let{attributes:o,setAttributes:a}=e;const s=(0,r.useRef)(null);return(0,r.useEffect)((()=>{try{nn(o.lineHighlights),s.current?.querySelector("input")?.classList.remove("cbp-input-error")}catch(e){console.error(e),s.current?.querySelector("input")?.classList.add("cbp-input-error")}}),[o.lineHighlights]),(0,r.createElement)(on.BaseControl,{id:"code-block-pro-show-highlighting"},(0,r.createElement)(on.CheckboxControl,{"data-cy":"enable-highlighting",label:(0,i.__)("Enable line highlighting","code-block-pro"),help:(0,i.__)("Highlight individual lines to bring attention to specific code.","code-block-pro"),checked:null!==(t=o.enableHighlighting)&&void 0!==t&&t,onChange:e=>{a({enableHighlighting:e})}}),o.enableHighlighting&&(0,r.createElement)(on.BaseControl,{id:"code-block-pro-show-highlighted-lines"},(0,r.createElement)("div",{ref:s},(0,r.createElement)(on.TextControl,{id:"code-block-pro-show-highlighted-lines",spellCheck:!1,autoComplete:"off",label:(0,i.__)("Highlight the following","code-block-pro"),help:(0,i.sprintf)((0,i.__)("Try %1$s or %2$s for a range.","code-block-pro"),"1,5","1,[3,5]"),onChange:e=>{a({lineHighlights:e})},value:null!==(n=o?.lineHighlights)&&void 0!==n?n:""}))))},Vn=e=>{var t,n,a;let{attributes:s,setAttributes:l}=e;const[c,u]=Ln({attributes:s,setAttributes:l}),{recentLanguages:d}=en(),{updateThemeHistory:p}=ae(),{setPreviousSettings:h}=ee(),{headerType:g,footerType:m}=s,f=["simpleStringEnd","simpleStringStart"],b=["simpleString"].includes(g),y=f.includes(m),v=f.includes(m),_=f.includes(m);return(0,r.createElement)(o.InspectorControls,null,(0,r.createElement)(on.PanelBody,{title:(0,i.__)("Settings","code-block-pro"),initialOpen:!0},(0,r.createElement)("div",{className:"code-block-pro-editor"},(0,r.createElement)(on.BaseControl,{id:"code-block-pro-language"},(0,r.createElement)(on.SelectControl,{id:"code-block-pro-language",label:(0,i.__)("Code Language","code-block-pro"),"data-cy-cbp":"language-select",value:c,onChange:u,help:"ansi"===c?(0,i.__)("Some code themes may not render ANSI correctly. Control sequences render only on the front.","code-block-pro"):null,options:Object.entries(Jt).map((e=>{let[t,n]=e;return{label:n.replace("ANSI","ANSI (experimental)"),value:t}}))}),d?.length>0?(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"mb-2 block"},(0,i.__)("Recently Used","code-block-pro")),(0,r.createElement)("div",{className:"flex gap-1"},d?.map((e=>{var t;return(0,r.createElement)(on.Button,{key:e,className:"bg-gray-100 text-black no-underline p-1 px-2 ",variant:"link",onClick:()=>u(e)},null!==(t=Jt[e])&&void 0!==t?t:e)})))):null),b&&(0,r.createElement)(on.BaseControl,{id:"code-block-pro-header-text"},(0,r.createElement)(on.TextControl,{id:"code-block-pro-header-text",spellCheck:!1,autoComplete:"off",label:(0,i.__)("Header Text","code-block-pro"),placeholder:Jt[c],onChange:e=>{l({headerString:e})},value:null!==(t=s.headerString)&&void 0!==t?t:""})),y&&(0,r.createElement)(on.BaseControl,{id:"code-block-pro-footer-text"},(0,r.createElement)(on.TextControl,{id:"code-block-pro-footer-text",spellCheck:!1,autoComplete:"off",label:(0,i.__)("Footer Text","code-block-pro"),placeholder:Jt[c],onChange:e=>{l({footerString:e})},value:null!==(n=s.footerString)&&void 0!==n?n:""})),v&&(0,r.createElement)(on.BaseControl,{id:"code-block-pro-footer-link"},(0,r.createElement)(on.TextControl,{id:"code-block-pro-footer-link",spellCheck:!1,type:"url",autoComplete:"off",label:(0,i.__)("Footer Link","code-block-pro"),placeholder:"https://example.com",help:(0,i.__)("Leave blank to disable","code-block-pro"),onChange:e=>{l({footerLink:e})},value:null!==(a=s.footerLink)&&void 0!==a?a:""})),_&&(0,r.createElement)(on.BaseControl,{id:"code-block-pro-footer-link-target"},(0,r.createElement)(on.CheckboxControl,{id:"code-block-pro-footer-link-target",label:(0,i.__)("Open in new tab?","code-block-pro"),checked:s.footerLinkTarget,onChange:e=>{l({footerLinkTarget:e}),p({...s,footerLinkTarget:e})}})))),(0,r.createElement)(on.PanelBody,{title:(0,i.__)("Line Settings","code-block-pro"),initialOpen:!1},(0,r.createElement)("div",{className:"code-block-pro-editor"},(0,r.createElement)(on.BaseControl,{id:"code-block-pro-show-line-numbers"},(0,r.createElement)(on.CheckboxControl,{"data-cy":"show-line-numbers",label:(0,i.__)("Enable line numbers","code-block-pro"),help:(0,i.__)("Enable line numbers and set a starting number.","code-block-pro"),checked:s.lineNumbers,onChange:e=>{l({lineNumbers:e}),p({...s,lineNumbers:e})}}),s.lineNumbers&&(0,r.createElement)(on.BaseControl,{id:"code-block-pro-line-number-start"},(0,r.createElement)(on.TextControl,{id:"code-block-pro-line-number-start",spellCheck:!1,autoComplete:"off",label:(0,i.__)("Start from","code-block-pro"),onChange:e=>{l({startingLineNumber:e})},value:s.startingLineNumber}))),(0,r.createElement)(qn,{attributes:s,setAttributes:l}),(0,r.createElement)(Un,{attributes:s,setAttributes:l}))),(0,r.createElement)(on.PanelBody,{title:(0,i.__)("Header Type","code-block-pro"),initialOpen:!1},(0,r.createElement)(vn,{attributes:s,onClick:e=>{l({headerType:e}),p({...s,headerType:e})}})),(0,r.createElement)(on.PanelBody,{title:(0,i.__)("Footer Type","code-block-pro"),initialOpen:!1},(0,r.createElement)(hn,{attributes:s,onClick:e=>{l({footerType:e}),p({...s,footerType:e})}})),(0,r.createElement)(zn,{attributes:s,setAttributes:l}),(0,r.createElement)(on.PanelBody,{title:(0,i.__)("Styling","code-block-pro"),initialOpen:!1},(0,r.createElement)("div",{className:"code-block-pro-editor","data-cy":"font-size-select"},(0,r.createElement)("h2",{className:"m-0"},(0,i.__)("Font Size","code-block-pro")),(0,r.createElement)(Nn,{value:s.fontSize,onChange:e=>{l({fontSize:e}),p({...s,fontSize:e})}})),(0,r.createElement)("div",{className:"code-block-pro-editor","data-cy":"font-line-height-select"},(0,r.createElement)("h2",{className:"m-0"},(0,i.__)("Line Height","code-block-pro")),(0,r.createElement)(Tn,{value:s.lineHeight,onChange:e=>{l({lineHeight:e}),p({...s,lineHeight:e})}})),(0,r.createElement)("div",{className:"code-block-pro-editor","data-cy":"font-family-select"},(0,r.createElement)(jn,{value:s.fontFamily,onChange:e=>{l({fontFamily:e}),p({...s,fontFamily:e})}})),(0,r.createElement)("div",{className:"code-block-pro-editor","data-cy":"clamp-fonts"},(0,r.createElement)("div",{className:"mt-6"},(0,r.createElement)(on.CheckboxControl,{label:(0,i.__)("Clamp Values","code-block-pro"),help:(0,i.__)("Check this if your font sizes are unusually large or tiny.","code-block-pro"),checked:s.clampFonts,onChange:e=>{l({clampFonts:e}),p({...s,clampFonts:e})}})))),(0,r.createElement)(Pn,{attributes:s,setAttributes:l}),(0,r.createElement)(on.PanelBody,{title:(0,i.__)("Extra Settings","code-block-pro"),initialOpen:!1},(0,r.createElement)(on.BaseControl,{id:"code-block-pro-show-copy-button"},(0,r.createElement)(on.CheckboxControl,{"data-cy":"copy-button",label:(0,i.__)("Copy Button","code-block-pro"),help:(0,i.__)("If checked, users will be able to copy your code snippet to their clipboard.","code-block-pro"),checked:s.copyButton,onChange:e=>{h({copyButton:e}),l({copyButton:e})}})),(0,r.createElement)(on.BaseControl,{id:"code-block-pro-disable-padding"},(0,r.createElement)(on.CheckboxControl,{"data-cy":"disable-padding",label:(0,i.__)("Disable Padding","code-block-pro"),help:(0,i.__)("This is useful if you pick a theme that matches your background color, and want the code to line up to the edge of your content. You maybe need to add your own padding with CSS.","code-block-pro"),checked:s.disablePadding,onChange:e=>{l({disablePadding:e}),p({...s,disablePadding:e})}}))))},Kn=e=>{let{attributes:t,setAttributes:n}=e;const[a,s]=Ln({attributes:t,setAttributes:n});return(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(on.ToolbarGroup,{className:"code-block-pro-editor"},(0,r.createElement)(on.Dropdown,{renderContent:()=>(0,r.createElement)(Jn,{language:a,setLanguage:s}),renderToggle:e=>{var t;let{isOpen:n,onToggle:o}=e;return(0,r.createElement)(on.Button,{onClick:o,"aria-expanded":n,"aria-haspopup":"true"},(null!==(t=Jt[a])&&void 0!==t?t:a).replace("ANSI","ANSI (experimental)"))}})))},Jn=e=>{let{language:t,setLanguage:n}=e;return(0,r.createElement)(on.NavigableMenu,{orientation:"vertical",role:"menu",style:{minWidth:"200px"}},(0,r.createElement)(on.MenuGroup,{label:(0,i.__)("Select language","code-block-pro")},Object.entries(Jt).map((e=>{let[o,a]=e;return(0,r.createElement)(on.MenuItem,{key:o,role:"menuitem",style:{width:"100%"},isSelected:t===o,variant:t===o?"primary":void 0,onClick:()=>{n(o)}},a)}))))};function Qn(e){if("string"!=typeof e)throw new TypeError(`Expected a \`string\`, got \`${typeof e}\``);return e.replace(function({onlyFirst:e=!1}={}){const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}(),"")}const Xn=e=>{var t,n;let{attributes:o}=e;return(0,r.createElement)("span",{role:"button",tabIndex:0,"data-code":Qn(null!==(t=o.code)&&void 0!==t?t:""),style:{color:null!==(n=o?.textColor)&&void 0!==n?n:"inherit",display:"none"},"aria-label":(0,i.__)("Copy","code-block-pro"),className:"code-block-pro-copy-button"},(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",style:{width:24,height:24},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2"},(0,r.createElement)("path",{className:"with-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"}),(0,r.createElement)("path",{className:"without-check",strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})))},Yn=e=>{let{attributes:t}=e;return(0,r.createElement)("div",ln({},o.useBlockProps.save({className:c()({"padding-disabled":t.disablePadding,"padding-bottom-disabled":t?.footerType&&"none"!==t?.footerType,"cbp-has-line-numbers":t.lineNumbers,"cbp-blur-enabled":t.enableBlurring,"cbp-unblur-on-hover":t.removeBlurOnHover})}),{"data-code-block-pro-font-family":t.fontFamily,style:{fontSize:Hn(t.fontSize,t.clampFonts),fontFamily:Dn(t.fontFamily),"--cbp-line-number-color":t?.lineNumbers?t.textColor:void 0,"--cbp-line-number-start":Number(t?.startingLineNumber)>1?t.startingLineNumber:void 0,"--cbp-line-number-width":t.lineNumbersWidth?`${t.lineNumbersWidth}px`:void 0,"--cbp-line-highlight-color":t?.enableHighlighting?t.lineHighlightColor:void 0,lineHeight:Hn(t.lineHeight,t.clampFonts)}}),t.code?.length>0?(0,r.createElement)(r.Fragment,null,(0,r.createElement)(kn,t),t.copyButton&&(0,r.createElement)(Xn,{attributes:t}),(0,r.createElement)(o.RichText.Content,{value:t.codeHTML}),(0,r.createElement)(gn,t),(0,r.createElement)(En,t)):null)};(0,a.registerBlockType)(u.name,{...u,icon:sn,attributes:{code:{type:"string"},codeHTML:{type:"string"},language:{type:"string"},theme:{type:"string"},align:{type:"string"},bgColor:{type:"string",default:"#282a37"},textColor:{type:"string",default:"#f8f8f2"},fontSize:{type:"string"},fontFamily:{type:"string"},lineHeight:{type:"string"},clampFonts:{type:"boolean"},editorHeight:{type:"string"},lineNumbers:{type:"boolean"},headerType:{type:"string"},headerString:{type:"string"},disablePadding:{type:"boolean"},footerType:{type:"string"},footerString:{type:"string"},footerLink:{type:"string"},footerLinkTarget:{type:"boolean"},enableMaxHeight:{type:"boolean"},seeMoreType:{type:"string"},seeMoreString:{type:"string"},seeMoreAfterLine:{type:"string"},seeMoreTransition:{type:"boolean"},startingLineNumber:{type:"string"},lineNumbersWidth:{type:"number"},enableHighlighting:{type:"boolean"},lineHighlights:{type:"string"},lineHighlightColor:{type:"string"},enableBlurring:{type:"boolean"},lineBlurs:{type:"string"},removeBlurOnHover:{type:"boolean"},frame:{type:"boolean"},renderType:{type:"string",default:"code"},label:{type:"string",default:""},copyButton:{type:"boolean"}},supports:{html:!1,align:["wide","full"]},title:(0,i.__)("Code Pro","code-block-pro"),edit:e=>{let{attributes:t,setAttributes:n}=e;return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(Vn,{attributes:t,setAttributes:n}),(0,r.createElement)(Kn,{attributes:t,setAttributes:n}),(0,r.createElement)("div",(0,o.useBlockProps)({className:c()("code-block-pro-editor",{"padding-disabled":t.disablePadding,"padding-bottom-disabled":t?.footerType&&"none"!==t?.footerType,"cbp-has-line-numbers":t.lineNumbers,"cbp-blur-enabled":t.enableBlurring,"cbp-unblur-on-hover":t.removeBlurOnHover}),style:{fontSize:Hn(t.fontSize,t.clampFonts),"--cbp-line-number-color":t?.lineNumbers?t.textColor:void 0,"--cbp-line-number-start":Number(t?.startingLineNumber)>1?t.startingLineNumber:void 0,"--cbp-line-number-width":t.lineNumbersWidth?`${t.lineNumbersWidth}px`:void 0,"--cbp-line-highlight-color":t?.enableHighlighting?t.lineHighlightColor:void 0,"--cbp-line-height":t.lineHeight,fontFamily:Dn(""),lineHeight:Hn(t.lineHeight,t.clampFonts)}}),(0,r.createElement)(kn,t),t.copyButton&&(0,r.createElement)(Xn,{attributes:t}),(0,r.createElement)(rn,{attributes:t,setAttributes:n}),(0,r.createElement)(gn,t),(0,r.createElement)(En,t)))},save:e=>{let{attributes:t}=e;return(0,r.createElement)(Yn,{attributes:t})},transforms:{from:[{type:"block",blocks:["core/code","syntaxhighlighter/code"],transform:e=>{const{content:t,language:n}=e;return(0,a.createBlock)(u.name,{code:t?(e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value})(t):void 0,language:Kt(n)})}}]}}),(0,s.addFilter)("editor.BlockEdit",u.name,(e=>t=>((e,t)=>{const{attributes:n,clientId:s}=t,{previousLanguage:l}=en(),c=(0,an.useSelect)((e=>{const t=e(o.store).getBlock(s);return["core/code","syntaxhighlighter/code"].includes(t.name)}),[s]),{replaceBlock:d}=(0,an.useDispatch)(o.store),p=e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value};return c?(0,r.createElement)(r.Fragment,null,e&&(0,r.createElement)(e,t),(0,r.createElement)(o.BlockControls,null,(0,r.createElement)(on.ToolbarGroup,null,(0,r.createElement)(on.ToolbarButton,{icon:sn,label:(0,i.__)("Convert to Code Pro","code-block-pro"),onClick:()=>{var e;const t=(0,a.createBlock)(u.name,{code:n?.content?p(n.content):void 0,language:null!==(e=Kt(n?.language))&&void 0!==e?e:l});d(s,[t])}})))):(0,r.createElement)(e,t)})(e,t)))},184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var s=o.apply(null,n);s&&e.push(s)}}else if("object"===a){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var i in n)r.call(n,i)&&n[i]&&e.push(i)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},460:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)},s=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return i(t,e),t},c=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var u=l(n(196)),d=90,p=219,h=222,g=192,m=100,f="undefined"!=typeof window&&"navigator"in window&&/Win/i.test(navigator.platform),b="undefined"!=typeof window&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),y="npm__react-simple-code-editor__textarea",v="\n/**\n * Reset the text fill color so that placeholder is visible\n */\n.".concat(y,":empty {\n -webkit-text-fill-color: inherit !important;\n}\n\n/**\n * Hack to apply on some CSS on IE10 and IE11\n */\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n /**\n * IE doesn't support '-webkit-text-fill-color'\n * So we use 'color: transparent' to make the text transparent on IE\n * Unlike other browsers, it doesn't affect caret color in IE\n */\n .").concat(y," {\n color: transparent !important;\n }\n\n .").concat(y,"::selection {\n background-color: #accef7 !important;\n color: transparent !important;\n }\n}\n"),_=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={capture:!0},t._recordCurrentState=function(){var e=t._input;if(e){var n=e.value,r=e.selectionStart,o=e.selectionEnd;t._recordChange({value:n,selectionStart:r,selectionEnd:o})}},t._getLines=function(e,t){return e.substring(0,t).split("\n")},t._recordChange=function(e,n){var r,o,s;void 0===n&&(n=!1);var i=t._history,l=i.stack,c=i.offset;if(l.length&&c>-1){t._history.stack=l.slice(0,c+1);var u=t._history.stack.length;if(u>m){var d=u-m;t._history.stack=l.slice(d,u),t._history.offset=Math.max(t._history.offset-d,0)}}var p=Date.now();if(n){var h=t._history.stack[t._history.offset];if(h&&p-h.timestamp<3e3){var g=/[^a-z0-9]([a-z0-9]+)$/i,f=null===(r=t._getLines(h.value,h.selectionStart).pop())||void 0===r?void 0:r.match(g),b=null===(o=t._getLines(e.value,e.selectionStart).pop())||void 0===o?void 0:o.match(g);if((null==f?void 0:f[1])&&(null===(s=null==b?void 0:b[1])||void 0===s?void 0:s.startsWith(f[1])))return void(t._history.stack[t._history.offset]=a(a({},e),{timestamp:p}))}}t._history.stack.push(a(a({},e),{timestamp:p})),t._history.offset++},t._updateInput=function(e){var n=t._input;n&&(n.value=e.value,n.selectionStart=e.selectionStart,n.selectionEnd=e.selectionEnd,t.props.onValueChange(e.value))},t._applyEdits=function(e){var n=t._input,r=t._history.stack[t._history.offset];r&&n&&(t._history.stack[t._history.offset]=a(a({},r),{selectionStart:n.selectionStart,selectionEnd:n.selectionEnd})),t._recordChange(e),t._updateInput(e)},t._undoEdit=function(){var e=t._history,n=e.stack,r=e.offset,o=n[r-1];o&&(t._updateInput(o),t._history.offset=Math.max(r-1,0))},t._redoEdit=function(){var e=t._history,n=e.stack,r=e.offset,o=n[r+1];o&&(t._updateInput(o),t._history.offset=Math.min(r+1,n.length-1))},t._handleKeyDown=function(e){var n=t.props,r=n.tabSize,o=n.insertSpaces,a=n.ignoreTabKey,s=n.onKeyDown;if(!s||(s(e),!e.defaultPrevented)){27===e.keyCode&&e.currentTarget.blur();var i=e.currentTarget,l=i.value,c=i.selectionStart,u=i.selectionEnd,m=(o?" ":"\t").repeat(r);if(9===e.keyCode&&!a&&t.state.capture)if(e.preventDefault(),e.shiftKey){var y=(S=t._getLines(l,c)).length-1,v=t._getLines(l,u).length-1,_=l.split("\n").map((function(e,t){return t>=y&&t<=v&&e.startsWith(m)?e.substring(m.length):e})).join("\n");if(l!==_){var k=S[y];t._applyEdits({value:_,selectionStart:(null==k?void 0:k.startsWith(m))?c-m.length:c,selectionEnd:u-(l.length-_.length)})}}else if(c!==u){var S,C=(S=t._getLines(l,c)).length-1,w=t._getLines(l,u).length-1;k=S[C],t._applyEdits({value:l.split("\n").map((function(e,t){return t>=C&&t<=w?m+e:e})).join("\n"),selectionStart:k&&/\S/.test(k)?c+m.length:c,selectionEnd:u+m.length*(w-C+1)})}else{var x=c+m.length;t._applyEdits({value:l.substring(0,c)+m+l.substring(u),selectionStart:x,selectionEnd:x})}else if(8===e.keyCode){var E=c!==u;l.substring(0,c).endsWith(m)&&!E&&(e.preventDefault(),x=c-m.length,t._applyEdits({value:l.substring(0,c-m.length)+l.substring(u),selectionStart:x,selectionEnd:x}))}else if(13===e.keyCode){if(c===u){var L=t._getLines(l,c).pop(),N=null==L?void 0:L.match(/^\s+/);if(null==N?void 0:N[0]){e.preventDefault();var T="\n"+N[0];x=c+T.length,t._applyEdits({value:l.substring(0,c)+T+l.substring(u),selectionStart:x,selectionEnd:x})}}}else if(57===e.keyCode||e.keyCode===p||e.keyCode===h||e.keyCode===g){var j=void 0;57===e.keyCode&&e.shiftKey?j=["(",")"]:e.keyCode===p?j=e.shiftKey?["{","}"]:["[","]"]:e.keyCode===h?j=e.shiftKey?['"','"']:["'","'"]:e.keyCode!==g||e.shiftKey||(j=["`","`"]),c!==u&&j&&(e.preventDefault(),t._applyEdits({value:l.substring(0,c)+j[0]+l.substring(c,u)+j[1]+l.substring(u),selectionStart:c,selectionEnd:u+2}))}else!(b?e.metaKey&&e.keyCode===d:e.ctrlKey&&e.keyCode===d)||e.shiftKey||e.altKey?(b?e.metaKey&&e.keyCode===d&&e.shiftKey:f?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&e.keyCode===d&&e.shiftKey)&&!e.altKey?(e.preventDefault(),t._redoEdit()):77!==e.keyCode||!e.ctrlKey||b&&!e.shiftKey||(e.preventDefault(),t.setState((function(e){return{capture:!e.capture}}))):(e.preventDefault(),t._undoEdit())}},t._handleChange=function(e){var n=e.currentTarget,r=n.value,o=n.selectionStart,a=n.selectionEnd;t._recordChange({value:r,selectionStart:o,selectionEnd:a},!0),t.props.onValueChange(r)},t._history={stack:[],offset:-1},t._input=null,t}return o(t,e),t.prototype.componentDidMount=function(){this._recordCurrentState()},Object.defineProperty(t.prototype,"session",{get:function(){return{history:this._history}},set:function(e){this._history=e.history},enumerable:!1,configurable:!0}),t.prototype.render=function(){var e=this,t=this.props,n=t.value,r=t.style,o=t.padding,s=t.highlight,i=t.textareaId,l=t.textareaClassName,d=t.autoFocus,p=t.disabled,h=t.form,g=t.maxLength,m=t.minLength,f=t.name,b=t.placeholder,_=t.readOnly,S=t.required,C=t.onClick,w=t.onFocus,x=t.onBlur,E=t.onKeyUp,L=(t.onKeyDown,t.onValueChange,t.tabSize,t.insertSpaces,t.ignoreTabKey,t.preClassName),N=c(t,["value","style","padding","highlight","textareaId","textareaClassName","autoFocus","disabled","form","maxLength","minLength","name","placeholder","readOnly","required","onClick","onFocus","onBlur","onKeyUp","onKeyDown","onValueChange","tabSize","insertSpaces","ignoreTabKey","preClassName"]),T={paddingTop:"object"==typeof o?o.top:o,paddingRight:"object"==typeof o?o.right:o,paddingBottom:"object"==typeof o?o.bottom:o,paddingLeft:"object"==typeof o?o.left:o},j=s(n);return u.createElement("div",a({},N,{style:a(a({},k.container),r)}),u.createElement("pre",a({className:L,"aria-hidden":"true",style:a(a(a({},k.editor),k.highlight),T)},"string"==typeof j?{dangerouslySetInnerHTML:{__html:j+"<br />"}}:{children:j})),u.createElement("textarea",{ref:function(t){return e._input=t},style:a(a(a({},k.editor),k.textarea),T),className:y+(l?" ".concat(l):""),id:i,value:n,onChange:this._handleChange,onKeyDown:this._handleKeyDown,onClick:C,onKeyUp:E,onFocus:w,onBlur:x,disabled:p,form:h,maxLength:g,minLength:m,name:f,placeholder:b,readOnly:_,required:S,autoFocus:d,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),u.createElement("style",{dangerouslySetInnerHTML:{__html:v}}))},t.defaultProps={tabSize:2,insertSpaces:!0,ignoreTabKey:!1,padding:0},t}(u.Component);t.default=_;var k={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}}},250:(e,t,n)=>{"use strict";var r=n(196),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,s=r.useEffect,i=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return i((function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,n,t]),s((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},139:(e,t,n)=>{"use strict";var r=n(196),o=n(688),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=o.useSyncExternalStore,i=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=i(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;d=c((function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==o&&p.hasValue){var t=p.value;if(o(t,e))return i=t}return i=e}if(t=i,a(s,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(s=e,i=n)}var s,i,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var h=s(e,d[0],d[1]);return l((function(){p.hasValue=!0,p.value=h}),[h]),u(h),h}},688:(e,t,n)=>{"use strict";e.exports=n(250)},798:(e,t,n)=>{"use strict";e.exports=n(139)},930:function(e){var t;t=()=>{return e={770:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setDefaultDebugCall=t.createOnigScanner=t.createOnigString=t.loadWASM=t.OnigScanner=t.OnigString=void 0;const o=r(n(418));let a=null,s=!1;class i{static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){const o=e.charCodeAt(n);let a=o,s=!1;if(o>=55296&&o<=56319&&n+1<r){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=65536+(o-55296<<10)|t-56320,s=!0)}t+=a<=127?1:a<=2047?2:a<=65535?3:4,s&&n++}return t}constructor(e){const t=e.length,n=i._utf8ByteLength(e),r=n!==t,o=r?new Uint32Array(t+1):null;r&&(o[t]=n);const a=r?new Uint32Array(n+1):null;r&&(a[n]=t);const s=new Uint8Array(n);let l=0;for(let n=0;n<t;n++){const i=e.charCodeAt(n);let c=i,u=!1;if(i>=55296&&i<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=65536+(i-55296<<10)|t-56320,u=!0)}r&&(o[n]=l,u&&(o[n+1]=l),c<=127?a[l+0]=n:c<=2047?(a[l+0]=n,a[l+1]=n):c<=65535?(a[l+0]=n,a[l+1]=n,a[l+2]=n):(a[l+0]=n,a[l+1]=n,a[l+2]=n,a[l+3]=n)),c<=127?s[l++]=c:c<=2047?(s[l++]=192|(1984&c)>>>6,s[l++]=128|(63&c)>>>0):c<=65535?(s[l++]=224|(61440&c)>>>12,s[l++]=128|(4032&c)>>>6,s[l++]=128|(63&c)>>>0):(s[l++]=240|(1835008&c)>>>18,s[l++]=128|(258048&c)>>>12,s[l++]=128|(4032&c)>>>6,s[l++]=128|(63&c)>>>0),u&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=s,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=a}createString(e){const t=e._omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}class l{constructor(e){if(this.id=++l.LAST_ID,!a)throw new Error("Must invoke loadWASM first.");this._onigBinding=a,this.content=e;const t=new i(e);this.utf16Length=t.utf16Length,this.utf8Length=t.utf8Length,this.utf16OffsetToUtf8=t.utf16OffsetToUtf8,this.utf8OffsetToUtf16=t.utf8OffsetToUtf16,this.utf8Length<1e4&&!l._sharedPtrInUse?(l._sharedPtr||(l._sharedPtr=a._omalloc(1e4)),l._sharedPtrInUse=!0,a.HEAPU8.set(t.utf8Value,l._sharedPtr),this.ptr=l._sharedPtr):this.ptr=t.createString(a)}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===l._sharedPtr?l._sharedPtrInUse=!1:this._onigBinding._ofree(this.ptr)}}t.OnigString=l,l.LAST_ID=0,l._sharedPtr=0,l._sharedPtrInUse=!1;class c{constructor(e){if(!a)throw new Error("Must invoke loadWASM first.");const t=[],n=[];for(let r=0,o=e.length;r<o;r++){const o=new i(e[r]);t[r]=o.createString(a),n[r]=o.utf8Length}const r=a._omalloc(4*e.length);a.HEAPU32.set(t,r/4);const o=a._omalloc(4*e.length);a.HEAPU32.set(n,o/4);const s=a._createOnigScanner(r,o,e.length);for(let n=0,r=e.length;n<r;n++)a._ofree(t[n]);a._ofree(o),a._ofree(r),0===s&&function(e){throw new Error(e.UTF8ToString(e._getLastOnigError()))}(a),this._onigBinding=a,this._ptr=s}dispose(){this._onigBinding._freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=s,o=0;if("number"==typeof n?(8&n&&(r=!0),o=n):"boolean"==typeof n&&(r=n),"string"==typeof e){e=new l(e);const n=this._findNextMatchSync(e,t,r,o);return e.dispose(),n}return this._findNextMatchSync(e,t,r,o)}_findNextMatchSync(e,t,n,r){const o=this._onigBinding;let a;if(a=n?o._findNextOnigScannerMatchDbg(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r):o._findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r),0===a)return null;const s=o.HEAPU32;let i=a/4;const l=s[i++],c=s[i++];let u=[];for(let t=0;t<c;t++){const n=e.convertUtf8OffsetToUtf16(s[i++]),r=e.convertUtf8OffsetToUtf16(s[i++]);u[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:u}}}t.OnigScanner=c;let u=!1,d=null;t.loadWASM=function(e){if(u)return d;let t,n,r,s;if(u=!0,function(e){return"function"==typeof e.instantiator}(e))t=e.instantiator,n=e.print;else{let r;!function(e){return void 0!==e.data}(e)?r=e:(r=e.data,n=e.print),t=function(e){return"undefined"!=typeof Response&&e instanceof Response}(r)?"function"==typeof WebAssembly.instantiateStreaming?function(e){return t=>WebAssembly.instantiateStreaming(e,t)}(r):function(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}(r):function(e){return t=>WebAssembly.instantiate(e,t)}(r)}return d=new Promise(((e,t)=>{r=e,s=t})),function(e,t,n,r){(0,o.default)({print:t,instantiateWasm:(t,n)=>{if("undefined"==typeof performance){const e=()=>Date.now();t.env.emscripten_get_now=e,t.wasi_snapshot_preview1.emscripten_get_now=e}return e(t).then((e=>n(e.instance)),r),{}}}).then((e=>{a=e,n()}))}(t,n,r,s),d},t.createOnigString=function(e){return new l(e)},t.createOnigScanner=function(e){return new c(e)},t.setDefaultDebugCall=function(e){s=e}},418:e=>{var t=("undefined"!=typeof document&&document.currentScript&&document.currentScript.src,function(e){var t,n,r=void 0!==(e=e||{})?e:{};r.ready=new Promise((function(e,r){t=e,n=r}));var o,a=Object.assign({},r),s=[],i=!1,l=!1,c=!0,u="";function d(e){return r.locateFile?r.locateFile(e,u):u+e}c&&(o=function(e){let t;return"function"==typeof readbuffer?new Uint8Array(readbuffer(e)):(t=read(e,"binary"),b("object"==typeof t),t)},"undefined"!=typeof scriptArgs?s=scriptArgs:void 0!==arguments&&(s=arguments),"undefined"!=typeof onig_print&&("undefined"==typeof console&&(console={}),console.log=onig_print,console.warn=console.error="undefined"!=typeof printErr?printErr:onig_print));var p,h,g=r.print||console.log.bind(console),m=r.printErr||console.warn.bind(console);Object.assign(r,a),a=null,r.arguments&&(s=r.arguments),r.thisProgram&&r.thisProgram,r.quit&&r.quit,r.wasmBinary&&(p=r.wasmBinary),r.noExitRuntime,"object"!=typeof WebAssembly&&D("no native wasm support detected");var f=!1;function b(e,t){e||D(t)}var y,v,_,k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function S(e,t,n){for(var r=t+n,o=t;e[o]&&!(o>=r);)++o;if(o-t>16&&e.buffer&&k)return k.decode(e.subarray(t,o));for(var a="";t<o;){var s=e[t++];if(128&s){var i=63&e[t++];if(192!=(224&s)){var l=63&e[t++];if((s=224==(240&s)?(15&s)<<12|i<<6|l:(7&s)<<18|i<<12|l<<6|63&e[t++])<65536)a+=String.fromCharCode(s);else{var c=s-65536;a+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else a+=String.fromCharCode((31&s)<<6|i)}else a+=String.fromCharCode(s)}return a}function C(e,t){return e?S(v,e,t):""}function w(e){y=e,r.HEAP8=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=new Int32Array(e),r.HEAPU8=v=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=_=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=new Float64Array(e)}r.INITIAL_MEMORY;var x=[],E=[],L=[];function N(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)P(r.preRun.shift());V(x)}function T(){V(E)}function j(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)O(r.postRun.shift());V(L)}function P(e){x.unshift(e)}function A(e){E.unshift(e)}function O(e){L.unshift(e)}var R=0,I=null,B=null;function M(e){R++,r.monitorRunDependencies&&r.monitorRunDependencies(R)}function F(e){if(R--,r.monitorRunDependencies&&r.monitorRunDependencies(R),0==R&&(null!==I&&(clearInterval(I),I=null),B)){var t=B;B=null,t()}}function D(e){r.onAbort&&r.onAbort(e),m(e="Aborted("+e+")"),f=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);throw n(t),t}var H,G,$="data:application/octet-stream;base64,";function W(e){return e.startsWith($)}function z(e){try{if(e==H&&p)return new Uint8Array(p);if(o)return o(e);throw"both async and sync fetching of the wasm failed"}catch(e){D(e)}}function U(){return p||!i&&!l||"function"!=typeof fetch?Promise.resolve().then((function(){return z(H)})):fetch(H,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+H+"'";return e.arrayBuffer()})).catch((function(){return z(H)}))}function q(){var e={env:te,wasi_snapshot_preview1:te};function t(e,t){var n=e.exports;r.asm=n,w((h=r.asm.memory).buffer),r.asm.__indirect_function_table,A(r.asm.__wasm_call_ctors),F()}function o(e){t(e.instance)}function a(t){return U().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){m("failed to asynchronously prepare wasm: "+e),D(e)}))}if(M(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){m("Module.instantiateWasm callback failed with error: "+e),n(e)}return(p||"function"!=typeof WebAssembly.instantiateStreaming||W(H)||"function"!=typeof fetch?a(o):fetch(H,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(o,(function(e){return m("wasm streaming compile failed: "+e),m("falling back to ArrayBuffer instantiation"),a(o)}))}))).catch(n),{}}function V(e){for(;e.length>0;)e.shift()(r)}function K(e,t,n){v.copyWithin(e,t,t+n)}function J(e){try{return h.grow(e-y.byteLength+65535>>>16),w(h.buffer),1}catch(e){}}function Q(e){var t,n=v.length,r=2147483648;if((e>>>=0)>r)return!1;for(var o=1;o<=4;o*=2){var a=n*(1+.2/o);if(a=Math.min(a,e+100663296),J(Math.min(r,(t=Math.max(e,a))+(65536-t%65536)%65536)))return!0}return!1}W(H="onig.wasm")||(H=d(H)),G="undefined"!=typeof dateNow?dateNow:()=>performance.now();var X=[null,[],[]];function Y(e,t){var n=X[e];0===t||10===t?((1===e?g:m)(S(n,0)),n.length=0):n.push(t)}function Z(e,t,n,r){for(var o=0,a=0;a<n;a++){var s=_[t>>2],i=_[t+4>>2];t+=8;for(var l=0;l<i;l++)Y(e,v[s+l]);o+=i}return _[r>>2]=o,0}var ee,te={emscripten_get_now:G,emscripten_memcpy_big:K,emscripten_resize_heap:Q,fd_write:Z};function ne(e){function n(){ee||(ee=!0,r.calledRun=!0,f||(T(),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),j()))}e=e||s,R>0||(N(),R>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),n()}),1)):n()))}if(q(),r.___wasm_call_ctors=function(){return(r.___wasm_call_ctors=r.asm.__wasm_call_ctors).apply(null,arguments)},r.___errno_location=function(){return(r.___errno_location=r.asm.__errno_location).apply(null,arguments)},r._omalloc=function(){return(r._omalloc=r.asm.omalloc).apply(null,arguments)},r._ofree=function(){return(r._ofree=r.asm.ofree).apply(null,arguments)},r._getLastOnigError=function(){return(r._getLastOnigError=r.asm.getLastOnigError).apply(null,arguments)},r._createOnigScanner=function(){return(r._createOnigScanner=r.asm.createOnigScanner).apply(null,arguments)},r._freeOnigScanner=function(){return(r._freeOnigScanner=r.asm.freeOnigScanner).apply(null,arguments)},r._findNextOnigScannerMatch=function(){return(r._findNextOnigScannerMatch=r.asm.findNextOnigScannerMatch).apply(null,arguments)},r._findNextOnigScannerMatchDbg=function(){return(r._findNextOnigScannerMatchDbg=r.asm.findNextOnigScannerMatchDbg).apply(null,arguments)},r.stackSave=function(){return(r.stackSave=r.asm.stackSave).apply(null,arguments)},r.stackRestore=function(){return(r.stackRestore=r.asm.stackRestore).apply(null,arguments)},r.stackAlloc=function(){return(r.stackAlloc=r.asm.stackAlloc).apply(null,arguments)},r.dynCall_jiji=function(){return(r.dynCall_jiji=r.asm.dynCall_jiji).apply(null,arguments)},r.UTF8ToString=C,B=function e(){ee||ne(),ee||(B=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return ne(),e.ready});e.exports=t}},t={},function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(770);var e,t},e.exports=t()},190:function(e){e.exports=(()=>{"use strict";var e={350:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UseOnigurumaFindOptions=t.DebugFlags=void 0,t.DebugFlags={InDebugMode:"undefined"!=typeof process&&!!process.env.VSCODE_TEXTMATE_DEBUG},t.UseOnigurumaFindOptions=!1},36:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.toOptionalTokenType=t.EncodedTokenAttributes=void 0,(n=t.EncodedTokenAttributes||(t.EncodedTokenAttributes={})).toBinaryStr=function(e){let t=e.toString(2);for(;t.length<32;)t="0"+t;return t},n.print=function(e){const t=n.getLanguageId(e),r=n.getTokenType(e),o=n.getFontStyle(e),a=n.getForeground(e),s=n.getBackground(e);console.log({languageId:t,tokenType:r,fontStyle:o,foreground:a,background:s})},n.getLanguageId=function(e){return(255&e)>>>0},n.getTokenType=function(e){return(768&e)>>>8},n.containsBalancedBrackets=function(e){return 0!=(1024&e)},n.getFontStyle=function(e){return(30720&e)>>>11},n.getForeground=function(e){return(16744448&e)>>>15},n.getBackground=function(e){return(4278190080&e)>>>24},n.set=function(e,t,r,o,a,s,i){let l=n.getLanguageId(e),c=n.getTokenType(e),u=n.containsBalancedBrackets(e)?1:0,d=n.getFontStyle(e),p=n.getForeground(e),h=n.getBackground(e);return 0!==t&&(l=t),8!==r&&(c=r),null!==o&&(u=o?1:0),-1!==a&&(d=a),0!==s&&(p=s),0!==i&&(h=i),(l<<0|c<<8|u<<10|d<<11|p<<15|h<<24)>>>0},t.toOptionalTokenType=function(e){return e}},996:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasicScopeAttributesProvider=t.BasicScopeAttributes=void 0;const r=n(878);class o{constructor(e,t){this.languageId=e,this.tokenType=t}}t.BasicScopeAttributes=o;class a{constructor(e,t){this._getBasicScopeAttributes=new r.CachedFn((e=>{const t=this._scopeToLanguage(e),n=this._toStandardTokenType(e);return new o(t,n)})),this._defaultAttributes=new o(e,8),this._embeddedLanguagesMatcher=new s(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return null===e?a._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const t=e.match(a.STANDARD_TOKEN_TYPE_REGEXP);if(!t)return 8;switch(t[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}}t.BasicScopeAttributesProvider=a,a._NULL_SCOPE_METADATA=new o(0,0),a.STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/;class s{constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map((([e,t])=>r.escapeRegExpCharacters(e)));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);return t?this.values.get(t[1]):void 0}}},947:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LineTokens=t.BalancedBracketSelectors=t.StateStack=t.AttributedScopeStack=t.Grammar=t.createGrammar=void 0;const r=n(350),o=n(36),a=n(736),s=n(44),i=n(792),l=n(583),c=n(878),u=n(996),d=n(47);function p(e,t,n,r,o){const s=a.createMatchers(t,h),l=i.RuleFactory.getCompiledRuleId(n,r,o.repository);for(const n of s)e.push({debugSelector:t,matcher:n.matcher,ruleId:l,grammar:o,priority:n.priority})}function h(e,t){if(t.length<e.length)return!1;let n=0;return e.every((e=>{for(let r=n;r<t.length;r++)if(g(t[r],e))return n=r+1,!0;return!1}))}function g(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}t.createGrammar=function(e,t,n,r,o,a,s,i){return new m(e,t,n,r,o,a,s,i)};class m{constructor(e,t,n,r,o,s,i,l){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=l,this._basicScopeAttributesProvider=new u.BasicScopeAttributesProvider(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=f(t,null),this._injections=null,this._tokenTypeMatchers=[],o)for(const e of Object.keys(o)){const t=a.createMatchers(e,h);for(const n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:o[e]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const 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(){const e=[],t=this._rootScopeName,n=(e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e))(t);if(n){const r=n.injections;if(r)for(let t in r)p(e,t,r[t],this,n);const o=this._grammarRepository.injections(t);o&&o.forEach((t=>{const n=this.getExternalGrammar(t);if(n){const t=n.injectionSelector;t&&p(e,t,n,this,n)}}))}return e.sort(((e,t)=>e.priority-t.priority)),e}getInjections(){if(null===this._injections&&(this._injections=this._collectInjections(),r.DebugFlags.InDebugMode&&this._injections.length>0)){console.log(`Grammar ${this._rootScopeName} contains the following injections:`);for(const e of this._injections)console.log(` - ${e.debugSelector}`)}return this._injections}registerRule(e){const t=++this._lastRuleId,n=e(i.ruleIdFromNumber(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[i.ruleIdToNumber(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=f(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let a;if(-1===this._rootId&&(this._rootId=i.RuleFactory.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository)),t&&t!==y.NULL)a=!1,t.reset();else{a=!0;const e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=o.EncodedTokenAttributes.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),s=this.getRule(this._rootId).getName(null,null);let i;i=s?b.createRootAndLookUpScopeName(s,r,this):b.createRoot("unknown",r),t=new y(null,this._rootId,-1,-1,!1,null,i,i)}e+="\n";const l=this.createOnigString(e),c=l.content.length,u=new v(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),p=d._tokenizeString(this,l,a,0,t,u,!0,r);return s.disposeOnigString(l),{lineLength:c,lineTokens:u,ruleStack:p.stack,stoppedEarly:p.stoppedEarly}}}function f(e,t){return(e=c.clone(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}t.Grammar=m;class b{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static createRoot(e,t){return new b(null,new l.ScopeStack(null,e),t)}static createRootAndLookUpScopeName(e,t,n){const r=n.getMetadataForScope(e),o=new l.ScopeStack(null,e),a=n.themeProvider.themeMatch(o),s=b.mergeAttributes(t,r,a);return new b(null,o,s)}get scopeName(){return this.scopePath.scopeName}equals(e){return b._equals(this,e)}static _equals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,a=0,s=0;return null!==n&&(r=n.fontStyle,a=n.foregroundId,s=n.backgroundId),o.EncodedTokenAttributes.set(e,t.languageId,t.tokenType,null,r,a,s)}pushAttributed(e,t){if(null===e)return this;if(-1===e.indexOf(" "))return b._pushAttributed(this,e,t);const n=e.split(/ /g);let r=this;for(const e of n)r=b._pushAttributed(r,e,t);return r}static _pushAttributed(e,t,n){const r=n.getMetadataForScope(t),o=e.scopePath.push(t),a=n.themeProvider.themeMatch(o),s=b.mergeAttributes(e.tokenAttributes,r,a);return new b(e,o,s)}getScopeNames(){return this.scopePath.getSegments()}}t.AttributedScopeStack=b;class y{constructor(e,t,n,r,o,a,s,i){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=o,this.endRule=a,this.nameScopesList=s,this.contentNameScopesList=i,this._stackElementBrand=void 0,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}equals(e){return null!==e&&y._equals(this,e)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e.contentNameScopesList.equals(t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t)return!0;if(!e&&!t)return!0;if(!e||!t)return!1;if(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(){y._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,t,n,r,o,a,s){return new y(this,e,t,n,r,o,a,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, TODO-${this.nameScopesList}, TODO-${this.contentNameScopesList})`,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(e){return this.endRule===e?this:new y(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,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}}t.StateStack=y,y.NULL=new y(null,0,0,0,!1,null,null,null),t.BalancedBracketSelectors=class{constructor(e,t){this.allowAny=!1,this.balancedBracketScopes=e.flatMap((e=>"*"===e?(this.allowAny=!0,[]):a.createMatchers(e,h).map((e=>e.matcher)))),this.unbalancedBracketScopes=t.flatMap((e=>a.createMatchers(e,h).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(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}};class v{constructor(e,t,n,o){this.balancedBracketSelectors=o,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,r.DebugFlags.InDebugMode?this._lineText=t:this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e.tokenAttributes,a=!1;if(this.balancedBracketSelectors?.matchesAlways&&(a=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const t=e.getScopeNames();for(const e of this._tokenTypeOverrides)e.matcher(t)&&(n=o.EncodedTokenAttributes.set(n,0,o.toOptionalTokenType(e.type),null,-1,0,0));this.balancedBracketSelectors&&(a=this.balancedBracketSelectors.match(t))}if(a&&(n=o.EncodedTokenAttributes.set(n,0,8,a,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n)return void(this._lastTokenEndIndex=t);if(r.DebugFlags.InDebugMode){const n=e.getScopeNames();console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log(" * "+n[e])}return this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),void(this._lastTokenEndIndex=t)}const n=e.getScopeNames();if(r.DebugFlags.InDebugMode){console.log(" token: |"+this._lineText.substring(this._lastTokenEndIndex,t).replace(/\n$/,"\\n")+"|");for(let e=0;e<n.length;e++)console.log(" * "+n[e])}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);const n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}}t.LineTokens=v},965:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseInclude=t.TopLevelRepositoryReference=t.TopLevelReference=t.RelativeReference=t.SelfReference=t.BaseReference=t.ScopeDependencyProcessor=t.ExternalReferenceCollector=t.TopLevelRepositoryRuleReference=t.TopLevelRuleReference=void 0;const r=n(878);class o{constructor(e){this.scopeName=e}toKey(){return this.scopeName}}t.TopLevelRuleReference=o;class a{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}}t.TopLevelRepositoryRuleReference=a;class s{constructor(){this._references=[],this._seenReferenceKeys=new Set,this.visitedRule=new Set}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}}function i(e,t,n,r){const a=n.lookup(e.scopeName);if(!a){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const s=n.lookup(t);e instanceof o?c({baseGrammar:s,selfGrammar:a},r):l(e.ruleName,{baseGrammar:s,selfGrammar:a,repository:a.repository},r);const i=n.injections(e.scopeName);if(i)for(const e of i)r.add(new o(e))}function l(e,t,n){t.repository&&t.repository[e]&&u([t.repository[e]],t,n)}function c(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&u(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&u(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function u(e,t,n){for(const s of e){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const e=s.repository?r.mergeObjects({},t.repository,s.repository):t.repository;Array.isArray(s.patterns)&&u(s.patterns,{...t,repository:e},n);const i=s.include;if(!i)continue;const d=f(i);switch(d.kind){case 0:c({...t,selfGrammar:t.baseGrammar},n);break;case 1:c(t,n);break;case 2:l(d.ruleName,{...t,repository:e},n);break;case 3:case 4:const r=d.scopeName===t.selfGrammar.scopeName?t.selfGrammar:d.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){const o={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};4===d.kind?l(d.ruleName,o,n):c(o,n)}else 4===d.kind?n.add(new a(d.scopeName,d.ruleName)):n.add(new o(d.scopeName))}}}t.ExternalReferenceCollector=s,t.ScopeDependencyProcessor=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests=new Set,this.seenPartialScopeRequests=new Set,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new o(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new s;for(const n of e)i(n,this.initialScopeName,this.repo,t);for(const e of t.references)if(e instanceof o){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName))continue;if(this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};class d{constructor(){this.kind=0}}t.BaseReference=d;class p{constructor(){this.kind=1}}t.SelfReference=p;class h{constructor(e){this.ruleName=e,this.kind=2}}t.RelativeReference=h;class g{constructor(e){this.scopeName=e,this.kind=3}}t.TopLevelReference=g;class m{constructor(e,t){this.scopeName=e,this.ruleName=t,this.kind=4}}function f(e){if("$base"===e)return new d;if("$self"===e)return new p;const t=e.indexOf("#");if(-1===t)return new g(e);if(0===t)return new h(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new m(n,r)}}t.TopLevelRepositoryReference=m,t.parseInclude=f},391:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(947),t)},47:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStackElement=t._tokenizeString=void 0;const r=n(350),o=n(44),a=n(792),s=n(878);class i{constructor(e,t){this.stack=e,this.stoppedEarly=t}}function l(e,t,n,o,l,d,h,g){const m=t.content.length;let f=!1,b=-1;if(h){const s=function(e,t,n,o,s,i){let l=s.beginRuleCapturedEOL?0:-1;const c=[];for(let t=s;t;t=t.pop()){const n=t.getRule(e);n instanceof a.BeginWhileRule&&c.push({rule:n,stack:t})}for(let d=c.pop();d;d=c.pop()){const{ruleScanner:c,findOptions:h}=u(d.rule,e,d.stack.endRule,n,o===l),g=c.findNextMatchSync(t,o,h);if(r.DebugFlags.InDebugMode&&(console.log(" scanning for while rule"),console.log(c.toString())),!g){r.DebugFlags.InDebugMode&&console.log(" popping "+d.rule.debugName+" - "+d.rule.debugWhileRegExp),s=d.stack.pop();break}if(g.ruleId!==a.whileRuleId){s=d.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(i.produce(d.stack,g.captureIndices[0].start),p(e,t,n,d.stack,i,d.rule.whileCaptures,g.captureIndices),i.produce(d.stack,g.captureIndices[0].end),l=g.captureIndices[0].end,g.captureIndices[0].end>o&&(o=g.captureIndices[0].end,n=!1))}return{stack:s,linePos:o,anchorPosition:l,isFirstLine:n}}(e,t,n,o,l,d);l=s.stack,o=s.linePos,n=s.isFirstLine,b=s.anchorPosition}const y=Date.now();for(;!f;){if(0!==g&&Date.now()-y>g)return new i(l,!0);v()}return new i(l,!1);function v(){r.DebugFlags.InDebugMode&&(console.log(""),console.log(`@@scanNext ${o}: |${t.content.substr(o).replace(/\n$/,"\\n")}|`));const i=function(e,t,n,o,a,i){const l=function(e,t,n,o,a,i){const l=a.getRule(e),{ruleScanner:u,findOptions:d}=c(l,e,a.endRule,n,o===i);let p=0;r.DebugFlags.InDebugMode&&(p=s.performanceNow());const h=u.findNextMatchSync(t,o,d);if(r.DebugFlags.InDebugMode){const e=s.performanceNow()-p;e>5&&console.warn(`Rule ${l.debugName} (${l.id}) matching took ${e} against '${t}'`),console.log(` scanning for (linePos: ${o}, anchorPosition: ${i})`),console.log(u.toString()),h&&console.log(`matched rule id: ${h.ruleId} from ${h.captureIndices[0].start} to ${h.captureIndices[0].end}`)}return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}(e,t,n,o,a,i),u=e.getInjections();if(0===u.length)return l;const d=function(e,t,n,o,a,s,i){let l,u=Number.MAX_VALUE,d=null,p=0;const h=s.contentNameScopesList.getScopeNames();for(let s=0,g=e.length;s<g;s++){const g=e[s];if(!g.matcher(h))continue;const m=t.getRule(g.ruleId),{ruleScanner:f,findOptions:b}=c(m,t,null,o,a===i),y=f.findNextMatchSync(n,a,b);if(!y)continue;r.DebugFlags.InDebugMode&&(console.log(` matched injection: ${g.debugSelector}`),console.log(f.toString()));const v=y.captureIndices[0].start;if(!(v>=u)&&(u=v,d=y.captureIndices,l=y.ruleId,p=g.priority,u===a))break}return d?{priorityMatch:-1===p,captureIndices:d,matchedRuleId:l}:null}(u,e,t,n,o,a,i);if(!d)return l;if(!l)return d;const p=l.captureIndices[0].start,h=d.captureIndices[0].start;return h<p||d.priorityMatch&&h===p?d:l}(e,t,n,o,l,b);if(!i)return r.DebugFlags.InDebugMode&&console.log(" no more matches."),d.produce(l,m),void(f=!0);const u=i.captureIndices,h=i.matchedRuleId,g=!!(u&&u.length>0)&&u[0].end>o;if(h===a.endRuleId){const a=l.getRule(e);r.DebugFlags.InDebugMode&&console.log(" popping "+a.debugName+" - "+a.debugEndRegExp),d.produce(l,u[0].start),l=l.withContentNameScopesList(l.nameScopesList),p(e,t,n,l,d,a.endCaptures,u),d.produce(l,u[0].end);const s=l;if(l=l.parent,b=s.getAnchorPos(),!g&&s.getEnterPos()===o)return r.DebugFlags.InDebugMode&&console.error("[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"),l=s,d.produce(l,m),void(f=!0)}else{const s=e.getRule(h);d.produce(l,u[0].start);const i=l,c=s.getName(t.content,u),y=l.contentNameScopesList.pushAttributed(c,e);if(l=l.push(h,o,b,u[0].end===m,null,y,y),s instanceof a.BeginEndRule){const o=s;r.DebugFlags.InDebugMode&&console.log(" pushing "+o.debugName+" - "+o.debugBeginRegExp),p(e,t,n,l,d,o.beginCaptures,u),d.produce(l,u[0].end),b=u[0].end;const a=o.getContentName(t.content,u),c=y.pushAttributed(a,e);if(l=l.withContentNameScopesList(c),o.endHasBackReferences&&(l=l.withEndRule(o.getEndWithResolvedBackReferences(t.content,u))),!g&&i.hasSameRuleAs(l))return r.DebugFlags.InDebugMode&&console.error("[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),d.produce(l,m),void(f=!0)}else if(s instanceof a.BeginWhileRule){const o=s;r.DebugFlags.InDebugMode&&console.log(" pushing "+o.debugName),p(e,t,n,l,d,o.beginCaptures,u),d.produce(l,u[0].end),b=u[0].end;const a=o.getContentName(t.content,u),c=y.pushAttributed(a,e);if(l=l.withContentNameScopesList(c),o.whileHasBackReferences&&(l=l.withEndRule(o.getWhileWithResolvedBackReferences(t.content,u))),!g&&i.hasSameRuleAs(l))return r.DebugFlags.InDebugMode&&console.error("[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"),l=l.pop(),d.produce(l,m),void(f=!0)}else{const o=s;if(r.DebugFlags.InDebugMode&&console.log(" matched "+o.debugName+" - "+o.debugMatchRegExp),p(e,t,n,l,d,o.captures,u),d.produce(l,u[0].end),l=l.pop(),!g)return r.DebugFlags.InDebugMode&&console.error("[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"),l=l.safePop(),d.produce(l,m),void(f=!0)}}u[0].end>o&&(o=u[0].end,n=!1)}}function c(e,t,n,o,a){return r.UseOnigurumaFindOptions?{ruleScanner:e.compile(t,n),findOptions:d(o,a)}:{ruleScanner:e.compileAG(t,n,o,a),findOptions:0}}function u(e,t,n,o,a){return r.UseOnigurumaFindOptions?{ruleScanner:e.compileWhile(t,n),findOptions:d(o,a)}:{ruleScanner:e.compileWhileAG(t,n,o,a),findOptions:0}}function d(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function p(e,t,n,r,a,s,i){if(0===s.length)return;const c=t.content,u=Math.min(s.length,i.length),d=[],p=i[0].end;for(let t=0;t<u;t++){const u=s[t];if(null===u)continue;const g=i[t];if(0===g.length)continue;if(g.start>p)break;for(;d.length>0&&d[d.length-1].endPos<=g.start;)a.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop();if(d.length>0?a.produceFromScopes(d[d.length-1].scopes,g.start):a.produce(r,g.start),u.retokenizeCapturedWithRuleId){const t=u.getName(c,i),s=r.contentNameScopesList.pushAttributed(t,e),d=u.getContentName(c,i),p=s.pushAttributed(d,e),h=r.push(u.retokenizeCapturedWithRuleId,g.start,-1,!1,null,s,p),m=e.createOnigString(c.substring(0,g.end));l(e,m,n&&0===g.start,g.start,h,a,!1,0),o.disposeOnigString(m);continue}const m=u.getName(c,i);if(null!==m){const t=(d.length>0?d[d.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);d.push(new h(t,g.end))}}for(;d.length>0;)a.produceFromScopes(d[d.length-1].scopes,d[d.length-1].endPos),d.pop()}t._tokenizeString=l;class h{constructor(e,t){this.scopes=e,this.endPos=t}}t.LocalStackElement=h},974:(e,t)=>{function n(e,t){throw new Error("Near offset "+e.pos+": "+t+" ~~~"+e.source.substr(e.pos,50)+"~~~")}Object.defineProperty(t,"__esModule",{value:!0}),t.parseJSON=void 0,t.parseJSON=function(e,t,s){let i=new r(e),l=new o,c=0,u=null,d=[],p=[];function h(){d.push(c),p.push(u)}function g(){c=d.pop(),u=p.pop()}function m(e){n(i,e)}for(;a(i,l);){if(0===c){if(null!==u&&m("too many constructs in root"),3===l.type){u={},s&&(u.$vscodeTextmateLocation=l.toLocation(t)),h(),c=1;continue}if(2===l.type){u=[],h(),c=4;continue}m("unexpected token in root")}if(2===c){if(5===l.type){g();continue}if(7===l.type){c=3;continue}m("expected , or }")}if(1===c||3===c){if(1===c&&5===l.type){g();continue}if(1===l.type){let e=l.value;if(a(i,l)&&6===l.type||m("expected colon"),a(i,l)||m("expected value"),c=2,1===l.type){u[e]=l.value;continue}if(8===l.type){u[e]=null;continue}if(9===l.type){u[e]=!0;continue}if(10===l.type){u[e]=!1;continue}if(11===l.type){u[e]=parseFloat(l.value);continue}if(2===l.type){let t=[];u[e]=t,h(),c=4,u=t;continue}if(3===l.type){let n={};s&&(n.$vscodeTextmateLocation=l.toLocation(t)),u[e]=n,h(),c=1,u=n;continue}}m("unexpected token in dict")}if(5===c){if(4===l.type){g();continue}if(7===l.type){c=6;continue}m("expected , or ]")}if(4===c||6===c){if(4===c&&4===l.type){g();continue}if(c=5,1===l.type){u.push(l.value);continue}if(8===l.type){u.push(null);continue}if(9===l.type){u.push(!0);continue}if(10===l.type){u.push(!1);continue}if(11===l.type){u.push(parseFloat(l.value));continue}if(2===l.type){let e=[];u.push(e),h(),c=4,u=e;continue}if(3===l.type){let e={};s&&(e.$vscodeTextmateLocation=l.toLocation(t)),u.push(e),h(),c=1,u=e;continue}m("unexpected token in array")}m("unknown state")}return 0!==p.length&&m("unclosed constructs"),u};class r{constructor(e){this.source=e,this.pos=0,this.len=e.length,this.line=1,this.char=0}}class o{constructor(){this.value=null,this.type=0,this.offset=-1,this.len=-1,this.line=-1,this.char=-1}toLocation(e){return{filename:e,line:this.line,char:this.char}}}function a(e,t){t.value=null,t.type=0,t.offset=-1,t.len=-1,t.line=-1,t.char=-1;let r,o=e.source,a=e.pos,s=e.len,i=e.line,l=e.char;for(;;){if(a>=s)return!1;if(r=o.charCodeAt(a),32!==r&&9!==r&&13!==r){if(10!==r)break;a++,i++,l=0}else a++,l++}if(t.offset=a,t.line=i,t.char=l,34===r){for(t.type=1,a++,l++;;){if(a>=s)return!1;if(r=o.charCodeAt(a),a++,l++,92!==r){if(34===r)break}else a++,l++}t.value=o.substring(t.offset+1,a-1).replace(/\\u([0-9A-Fa-f]{4})/g,((e,t)=>String.fromCodePoint(parseInt(t,16)))).replace(/\\(.)/g,((t,r)=>{switch(r){case'"':return'"';case"\\":return"\\";case"/":return"/";case"b":return"\b";case"f":return"\f";case"n":return"\n";case"r":return"\r";case"t":return"\t";default:n(e,"invalid escape sequence")}throw new Error("unreachable")}))}else if(91===r)t.type=2,a++,l++;else if(123===r)t.type=3,a++,l++;else if(93===r)t.type=4,a++,l++;else if(125===r)t.type=5,a++,l++;else if(58===r)t.type=6,a++,l++;else if(44===r)t.type=7,a++,l++;else if(110===r){if(t.type=8,a++,l++,r=o.charCodeAt(a),117!==r)return!1;if(a++,l++,r=o.charCodeAt(a),108!==r)return!1;if(a++,l++,r=o.charCodeAt(a),108!==r)return!1;a++,l++}else if(116===r){if(t.type=9,a++,l++,r=o.charCodeAt(a),114!==r)return!1;if(a++,l++,r=o.charCodeAt(a),117!==r)return!1;if(a++,l++,r=o.charCodeAt(a),101!==r)return!1;a++,l++}else if(102===r){if(t.type=10,a++,l++,r=o.charCodeAt(a),97!==r)return!1;if(a++,l++,r=o.charCodeAt(a),108!==r)return!1;if(a++,l++,r=o.charCodeAt(a),115!==r)return!1;if(a++,l++,r=o.charCodeAt(a),101!==r)return!1;a++,l++}else for(t.type=11;;){if(a>=s)return!1;if(r=o.charCodeAt(a),!(46===r||r>=48&&r<=57||101===r||69===r||45===r||43===r))break;a++,l++}return t.len=a-t.offset,null===t.value&&(t.value=o.substr(t.offset,t.len)),e.pos=a,e.line=i,e.char=l,!0}},787:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=t.INITIAL=t.Registry=void 0;const a=n(391),s=n(50),i=n(652),l=n(583),c=n(965);o(n(44),t),t.Registry=class{constructor(e){this._options=e,this._syncRegistry=new i.SyncRegistry(l.Theme.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(l.Theme.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 a.BalancedBracketSelectors(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}async _loadGrammar(e,t,n,r,o){const a=new c.ScopeDependencyProcessor(this._syncRegistry,e);for(;a.Q.length>0;)await Promise.all(a.Q.map((e=>this._loadSingleGrammar(e.scopeName)))),a.processQueue();return this._grammarForScopeName(e,t,n,r,o)}async _loadSingleGrammar(e){return this._ensureGrammarCache.has(e)||this._ensureGrammarCache.set(e,this._doLoadSingleGrammar(e)),this._ensureGrammarCache.get(e)}async _doLoadSingleGrammar(e){const t=await this._options.loadGrammar(e);if(t){const n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}async addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),await this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,o)}},t.INITIAL=a.StateStack.NULL,t.parseRawGrammar=s.parseRawGrammar},736:(e,t)=>{function n(e){return!!e&&!!e.match(/[\w\.:]+/)}Object.defineProperty(t,"__esModule",{value:!0}),t.createMatchers=void 0,t.createMatchers=function(e,t){const r=[],o=function(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}(e);let a=o.next();for(;null!==a;){let e=0;if(2===a.length&&":"===a.charAt(1)){switch(a.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${a} in scope selector`)}a=o.next()}let t=i();if(r.push({matcher:t,priority:e}),","!==a)break;a=o.next()}return r;function s(){if("-"===a){a=o.next();const e=s();return t=>!!e&&!e(t)}if("("===a){a=o.next();const e=function(){const e=[];let t=i();for(;t&&(e.push(t),"|"===a||","===a);){do{a=o.next()}while("|"===a||","===a);t=i()}return t=>e.some((e=>e(t)))}();return")"===a&&(a=o.next()),e}if(n(a)){const e=[];do{e.push(a),a=o.next()}while(n(a));return n=>t(e,n)}return null}function i(){const e=[];let t=s();for(;t;)e.push(t),t=s();return t=>e.every((e=>e(t)))}}},44:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.disposeOnigString=void 0,t.disposeOnigString=function(e){"function"==typeof e.dispose&&e.dispose()}},50:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.parseRawGrammar=void 0;const r=n(69),o=n(350),a=n(974);t.parseRawGrammar=function(e,t=null){return null!==t&&/\.json$/.test(t)?(n=e,s=t,o.DebugFlags.InDebugMode?a.parseJSON(n,s,!0):JSON.parse(n)):function(e,t){return o.DebugFlags.InDebugMode?r.parseWithLocation(e,t,"$vscodeTextmateLocation"):r.parsePLIST(e)}(e,t);var n,s}},69:(e,t)=>{function n(e,t,n){const r=e.length;let o=0,a=1,s=0;function i(t){if(null===n)o+=t;else for(;t>0;)10===e.charCodeAt(o)?(o++,a++,s=0):(o++,s++),t--}function l(e){null===n?o=e:i(e-o)}function c(){for(;o<r;){let t=e.charCodeAt(o);if(32!==t&&9!==t&&13!==t&&10!==t)break;i(1)}}function u(t){return e.substr(o,t.length)===t&&(i(t.length),!0)}function d(t){let n=e.indexOf(t,o);l(-1!==n?n+t.length:r)}function p(t){let n=e.indexOf(t,o);if(-1!==n){let r=e.substring(o,n);return l(n+t.length),r}{let t=e.substr(o);return l(r),t}}r>0&&65279===e.charCodeAt(0)&&(o=1);let h=0,g=null,m=[],f=[],b=null;function y(e,t){m.push(h),f.push(g),h=e,g=t}function v(){if(0===m.length)return _("illegal state stack");h=m.pop(),g=f.pop()}function _(t){throw new Error("Near offset "+o+": "+t+" ~~~"+e.substr(o,50)+"~~~")}const k=function(){if(null===b)return _("missing <key>");let e={};null!==n&&(e[n]={filename:t,line:a,char:s}),g[b]=e,b=null,y(1,e)},S=function(){if(null===b)return _("missing <key>");let e=[];g[b]=e,b=null,y(2,e)},C=function(){let e={};null!==n&&(e[n]={filename:t,line:a,char:s}),g.push(e),y(1,e)},w=function(){let e=[];g.push(e),y(2,e)};function x(){if(1!==h)return _("unexpected </dict>");v()}function E(){return 1===h||2!==h?_("unexpected </array>"):void v()}function L(e){if(1===h){if(null===b)return _("missing <key>");g[b]=e,b=null}else 2===h?g.push(e):g=e}function N(e){if(isNaN(e))return _("cannot parse float");if(1===h){if(null===b)return _("missing <key>");g[b]=e,b=null}else 2===h?g.push(e):g=e}function T(e){if(isNaN(e))return _("cannot parse integer");if(1===h){if(null===b)return _("missing <key>");g[b]=e,b=null}else 2===h?g.push(e):g=e}function j(e){if(1===h){if(null===b)return _("missing <key>");g[b]=e,b=null}else 2===h?g.push(e):g=e}function P(e){if(1===h){if(null===b)return _("missing <key>");g[b]=e,b=null}else 2===h?g.push(e):g=e}function A(e){if(1===h){if(null===b)return _("missing <key>");g[b]=e,b=null}else 2===h?g.push(e):g=e}function O(){let e=p(">"),t=!1;return 47===e.charCodeAt(e.length-1)&&(t=!0,e=e.substring(0,e.length-1)),{name:e.trim(),isClosed:t}}function R(e){if(e.isClosed)return"";let t=p("</");return d(">"),t.replace(/&#([0-9]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,10))})).replace(/&#x([0-9a-f]+);/g,(function(e,t){return String.fromCodePoint(parseInt(t,16))})).replace(/&amp;|&lt;|&gt;|&quot;|&apos;/g,(function(e){switch(e){case"&amp;":return"&";case"&lt;":return"<";case"&gt;":return">";case"&quot;":return'"';case"&apos;":return"'"}return e}))}for(;o<r&&(c(),!(o>=r));){const l=e.charCodeAt(o);if(i(1),60!==l)return _("expected <");if(o>=r)return _("unexpected end of input");const p=e.charCodeAt(o);if(63===p){i(1),d("?>");continue}if(33===p){if(i(1),u("--")){d("--\x3e");continue}d(">");continue}if(47===p){if(i(1),c(),u("plist")){d(">");continue}if(u("dict")){d(">"),x();continue}if(u("array")){d(">"),E();continue}return _("unexpected closed tag")}let m=O();switch(m.name){case"dict":1===h?k():2===h?C():(g={},null!==n&&(g[n]={filename:t,line:a,char:s}),y(1,g)),m.isClosed&&x();continue;case"array":1===h?S():2===h?w():(g=[],y(2,g)),m.isClosed&&E();continue;case"key":I=R(m),1!==h?_("unexpected <key>"):null!==b?_("too many <key>"):b=I;continue;case"string":L(R(m));continue;case"real":N(parseFloat(R(m)));continue;case"integer":T(parseInt(R(m),10));continue;case"date":j(new Date(R(m)));continue;case"data":P(R(m));continue;case"true":R(m),A(!0);continue;case"false":R(m),A(!1);continue}if(!/^plist/.test(m.name))return _("unexpected opened tag "+m.name)}var I;return g}Object.defineProperty(t,"__esModule",{value:!0}),t.parsePLIST=t.parseWithLocation=void 0,t.parseWithLocation=function(e,t,r){return n(e,t,r)},t.parsePLIST=function(e){return n(e,null,null)}},652:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRegistry=void 0;const r=n(391);t.SyncRegistry=class{constructor(e,t){this._onigLibPromise=t,this._grammars=new Map,this._rawGrammars=new Map,this._injectionGrammars=new Map,this._theme=e}dispose(){for(const 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)}async grammarForScopeName(e,t,n,o,a){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,r.createGrammar(e,s,t,n,o,a,this,await this._onigLibPromise))}return this._grammars.get(e)}}},792:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CompiledRule=t.RegExpSourceList=t.RegExpSource=t.RuleFactory=t.BeginWhileRule=t.BeginEndRule=t.IncludeOnlyRule=t.MatchRule=t.CaptureRule=t.Rule=t.ruleIdToNumber=t.ruleIdFromNumber=t.whileRuleId=t.endRuleId=void 0;const r=n(878),o=n(965),a=/\\(\d+)/,s=/\\(\d+)/g;Symbol("RuleId"),t.endRuleId=-1,t.whileRuleId=-2,t.ruleIdFromNumber=function(e){return e},t.ruleIdToNumber=function(e){return e};class i{constructor(e,t,n,o){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=r.RegexSource.hasCaptures(this._name),this._contentName=o||null,this._contentNameIsCapturing=r.RegexSource.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${r.basename(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?r.RegexSource.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?r.RegexSource.replaceCaptures(this._contentName,e,t):this._contentName}}t.Rule=i;class l extends i{constructor(e,t,n,r,o){super(e,t,n,r),this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}}t.CaptureRule=l;class c extends i{constructor(e,t,n,r,o){super(e,t,n,null),this._match=new g(r,this.id),this.captures=o,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,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new m,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.MatchRule=c;class u extends i{constructor(e,t,n,r,o){super(e,t,n,r),this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new m,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}}t.IncludeOnlyRule=u;class d extends i{constructor(e,t,n,r,o,a,s,i,l,c){super(e,t,n,r),this._begin=new g(o,this.id),this.beginCaptures=a,this._end=new g(s||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=i,this.applyEndPatternLast=l||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.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,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new m;for(const t of 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}}t.BeginEndRule=d;class p extends i{constructor(e,n,r,o,a,s,i,l,c){super(e,n,r,o),this._begin=new g(a,this.id),this.beginCaptures=s,this.whileCaptures=l,this._while=new g(i,t.whileRuleId),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.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,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new m;for(const t of 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,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new m,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}}t.BeginWhileRule=p;class h{static createCaptureRule(e,t,n,r,o){return e.registerRule((e=>new l(t,e,n,r,o)))}static getCompiledRuleId(e,t,n){return e.id||t.registerRule((o=>{if(e.id=o,e.match)return new c(e.$vscodeTextmateLocation,e.id,e.name,e.match,h._compileCaptures(e.captures,t,n));if(void 0===e.begin){e.repository&&(n=r.mergeObjects({},n,e.repository));let o=e.patterns;return void 0===o&&e.include&&(o=[{include:e.include}]),new u(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,h._compilePatterns(o,t,n))}return e.while?new p(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.while,h._compileCaptures(e.whileCaptures||e.captures,t,n),h._compilePatterns(e.patterns,t,n)):new d(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,h._compileCaptures(e.beginCaptures||e.captures,t,n),e.end,h._compileCaptures(e.endCaptures||e.captures,t,n),e.applyEndPatternLast,h._compilePatterns(e.patterns,t,n))})),e.id}static _compileCaptures(e,t,n){let r=[];if(e){let o=0;for(const t in e){if("$vscodeTextmateLocation"===t)continue;const e=parseInt(t,10);e>o&&(o=e)}for(let e=0;e<=o;e++)r[e]=null;for(const o in e){if("$vscodeTextmateLocation"===o)continue;const a=parseInt(o,10);let s=0;e[o].patterns&&(s=h.getCompiledRuleId(e[o],t,n)),r[a]=h.createCaptureRule(t,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,s)}}return r}static _compilePatterns(e,t,n){let r=[];if(e)for(let a=0,s=e.length;a<s;a++){const s=e[a];let i=-1;if(s.include){const e=o.parseInclude(s.include);switch(e.kind){case 0:case 1:i=h.getCompiledRuleId(n[s.include],t,n);break;case 2:let r=n[e.ruleName];r&&(i=h.getCompiledRuleId(r,t,n));break;case 3:case 4:const o=e.scopeName,a=4===e.kind?e.ruleName:null,l=t.getExternalGrammar(o,n);if(l)if(a){let e=l.repository[a];e&&(i=h.getCompiledRuleId(e,t,l.repository))}else i=h.getCompiledRuleId(l.repository.$self,t,l.repository)}}else i=h.getCompiledRuleId(s,t,n);if(-1!==i){const e=t.getRule(i);let n=!1;if((e instanceof u||e instanceof d||e instanceof p)&&e.hasMissingPatterns&&0===e.patterns.length&&(n=!0),n)continue;r.push(i)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}}t.RuleFactory=h;class g{constructor(e,t){if(e){const t=e.length;let n=0,r=[],o=!1;for(let a=0;a<t;a++)if("\\"===e.charAt(a)&&a+1<t){const t=e.charAt(a+1);"z"===t?(r.push(e.substring(n,a)),r.push("$(?!\\n)(?<!\\n)"),n=a+2):"A"!==t&&"G"!==t||(o=!0),a++}this.hasAnchor=o,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,this.hasBackReferences=a.test(this.source)}clone(){return new g(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){let n=t.map((t=>e.substring(t.start,t.end)));return s.lastIndex=0,this.source.replace(s,((e,t)=>r.escapeRegExpCharacters(n[parseInt(t,10)]||"")))}_buildAnchorCache(){let e,t,n,r,o=[],a=[],s=[],i=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),o[e]=n,a[e]=n,s[e]=n,i[e]=n,"\\"===n&&e+1<t&&(r=this.source.charAt(e+1),"A"===r?(o[e+1]="￿",a[e+1]="￿",s[e+1]="A",i[e+1]="A"):"G"===r?(o[e+1]="￿",a[e+1]="G",s[e+1]="￿",i[e+1]="G"):(o[e+1]=r,a[e+1]=r,s[e+1]=r,i[e+1]=r),e++);return{A0_G0:o.join(""),A0_G1:a.join(""),A1_G0:s.join(""),A1_G1:i.join("")}}resolveAnchors(e,t){return this.hasAnchor&&this._anchorCache?e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0:this.source}}t.RegExpSource=g;class m{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)}push(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 f(e,t,this._items.map((e=>e.ruleId)))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):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):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map((e=>e.resolveAnchors(t,n)));return new f(e,r,this._items.map((e=>e.ruleId)))}}t.RegExpSourceList=m;class f{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){const 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){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}}t.CompiledRule=f},583:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeTrieElement=t.ThemeTrieElementRule=t.ColorMap=t.fontStyleToString=t.ParsedThemeRule=t.parseTheme=t.StyleAttributes=t.ScopeStack=t.Theme=void 0;const r=n(878);class o{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n,this._cachedMatchRoot=new r.CachedFn((e=>this._root.match(e)))}static createFromRawTheme(e,t){return this.createFromParsedTheme(l(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort(((e,t)=>{let n=r.strcmp(e.scope,t.scope);return 0!==n?n:(n=r.strArrCmp(e.parentScopes,t.parentScopes),0!==n?n:e.index-t.index)}));let n=0,a="#000000",s="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(a=t.foreground),null!==t.background&&(s=t.background)}let l=new u(t),c=new i(n,l.getId(a),l.getId(s)),h=new p(new d(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];h.insert(0,n.scope,n.parentScopes,n.fontStyle,l.getId(n.foreground),l.getId(n.background))}return new o(l,c,h)}(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;const t=e.scopeName,n=this._cachedMatchRoot.get(t).find((t=>function(e,t){if(null===t)return!0;let n=0,r=t[n];for(;e;){if(s(e.scopeName,r)){if(n++,n===t.length)return!0;r=t[n]}e=e.parent}return!1}(e.parent,t.parentScopes)));return n?new i(n.fontStyle,n.foreground,n.background):null}}t.Theme=o;class a{constructor(e,t){this.parent=e,this.scopeName=t}static from(...e){let t=null;for(let n=0;n<e.length;n++)t=new a(t,e[n]);return t}push(e){return new a(this,e)}getSegments(){let e=this;const t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}}function s(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}t.ScopeStack=a;class i{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}}function l(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],o=0;for(let e=0,a=t.length;e<a;e++){let a,s=t[e];if(!s.settings)continue;if("string"==typeof s.scope){let e=s.scope;e=e.replace(/^[,]+/,""),e=e.replace(/[,]+$/,""),a=e.split(",")}else a=Array.isArray(s.scope)?s.scope:[""];let i=-1;if("string"==typeof s.settings.fontStyle){i=0;let e=s.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":i|=1;break;case"bold":i|=2;break;case"underline":i|=4;break;case"strikethrough":i|=8}}let l=null;"string"==typeof s.settings.foreground&&r.isValidHexColor(s.settings.foreground)&&(l=s.settings.foreground);let u=null;"string"==typeof s.settings.background&&r.isValidHexColor(s.settings.background)&&(u=s.settings.background);for(let t=0,r=a.length;t<r;t++){let r=a[t].trim().split(" "),s=r[r.length-1],d=null;r.length>1&&(d=r.slice(0,r.length-1),d.reverse()),n[o++]=new c(s,d,e,i,l,u)}}return n}t.StyleAttributes=i,t.parseTheme=l;class c{constructor(e,t,n,r,o,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=o,this.background=a}}t.ParsedThemeRule=c,t.fontStyleToString=function(e){if(-1===e)return"not set";let t="";return 1&e&&(t+="italic "),2&e&&(t+="bold "),4&e&&(t+="underline "),8&e&&(t+="strikethrough "),""===t&&(t="none"),t.trim()};class u{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 new 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)}}t.ColorMap=u;class d{constructor(e,t,n,r,o){this.scopeDepth=e,this.parentScopes=t,this.fontStyle=n,this.foreground=r,this.background=o}clone(){return new d(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}}t.ThemeTrieElementRule=d;class p{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}static _sortBySpecificity(e){return 1===e.length||e.sort(this._cmpBySpecificity),e}static _cmpBySpecificity(e,t){if(e.scopeDepth===t.scopeDepth){const n=e.parentScopes,r=t.parentScopes;let o=null===n?0:n.length,a=null===r?0:r.length;if(o===a)for(let e=0;e<o;e++){const t=n[e].length,o=r[e].length;if(t!==o)return o-t}return a-o}return t.scopeDepth-e.scopeDepth}match(e){if(""===e)return p._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes));let t,n,r=e.indexOf(".");return-1===r?(t=e,n=""):(t=e.substring(0,r),n=e.substring(r+1)),this._children.hasOwnProperty(t)?this._children[t].match(n):p._sortBySpecificity([].concat(this._mainRule).concat(this._rulesWithParentScopes))}insert(e,t,n,r,o,a){if(""===t)return void this._doInsertHere(e,n,r,o,a);let s,i,l,c=t.indexOf(".");-1===c?(s=t,i=""):(s=t.substring(0,c),i=t.substring(c+1)),this._children.hasOwnProperty(s)?l=this._children[s]:(l=new p(this._mainRule.clone(),d.cloneArr(this._rulesWithParentScopes)),this._children[s]=l),l.insert(e+1,i,n,r,o,a)}_doInsertHere(e,t,n,o,a){if(null!==t){for(let s=0,i=this._rulesWithParentScopes.length;s<i;s++){let i=this._rulesWithParentScopes[s];if(0===r.strArrCmp(i.parentScopes,t))return void i.acceptOverwrite(e,n,o,a)}-1===n&&(n=this._mainRule.fontStyle),0===o&&(o=this._mainRule.foreground),0===a&&(a=this._mainRule.background),this._rulesWithParentScopes.push(new d(e,t,n,o,a))}else this._mainRule.acceptOverwrite(e,n,o,a)}}t.ThemeTrieElement=p},878:(e,t)=>{function n(e){return Array.isArray(e)?function(e){let t=[];for(let r=0,o=e.length;r<o;r++)t[r]=n(e[r]);return t}(e):"object"==typeof e?function(e){let t={};for(let r in e)t[r]=n(e[r]);return t}(e):e}Object.defineProperty(t,"__esModule",{value:!0}),t.performanceNow=t.CachedFn=t.escapeRegExpCharacters=t.isValidHexColor=t.strArrCmp=t.strcmp=t.RegexSource=t.basename=t.mergeObjects=t.clone=void 0,t.clone=function(e){return n(e)},t.mergeObjects=function(e,...t){return t.forEach((t=>{for(let n in t)e[n]=t[n]})),e},t.basename=function e(t){const n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(1+~n)};let r=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;function o(e,t){return e<t?-1:e>t?1:0}t.RegexSource=class{static hasCaptures(e){return null!==e&&(r.lastIndex=0,r.test(e))}static replaceCaptures(e,t,n){return e.replace(r,((e,r,o,a)=>{let s=n[parseInt(r||o,10)];if(!s)return e;{let e=t.substring(s.start,s.end);for(;"."===e[0];)e=e.substring(1);switch(a){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}}))}},t.strcmp=o,t.strArrCmp=function(e,t){if(null===e&&null===t)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=o(e[r],t[r]);if(0!==n)return n}return 0}return n-r},t.isValidHexColor=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))},t.escapeRegExpCharacters=function(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")},t.CachedFn=class{constructor(e){this.fn=e,this.cache=new Map}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},t.performanceNow="undefined"==typeof performance?function(){return Date.now()}:function(){return performance.now()}}},t={};return function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}(787)})()},196:e=>{"use strict";e.exports=window.React},799:()=>{},318:()=>{}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var a=n[e]={exports:{}};return t[e].call(a.exports,a,a.exports,r),a.exports}r.m=t,e=[],r.O=(t,n,o,a)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){n=e[u][0],o=e[u][1],a=e[u][2];for(var i=!0,l=0;l<n.length;l++)(!1&a||s>=a)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(i=!1,a<s&&(s=a));if(i){e.splice(u--,1);var c=o();void 0!==c&&(t=c)}}return t}a=a||0;for(var u=e.length;u>0&&e[u-1][2]>a;u--)e[u]=e[u-1];e[u]=[n,o,a]},r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={826:0,431:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,a,s=n[0],i=n[1],l=n[2],c=0;if(s.some((t=>0!==e[t]))){for(o in i)r.o(i,o)&&(r.m[o]=i[o]);if(l)var u=l(r)}for(t&&t(n);c<s.length;c++)a=s[c],r.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return r.O(u)},n=self.webpackChunkcode_block_pro=self.webpackChunkcode_block_pro||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=r.O(void 0,[431],(()=>r(11)));o=r.O(o)})();